@seeqdev/qomponents 0.0.64 → 0.0.65
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/ButtonWithDropdown/ButtonWithDropdown.js +19 -14
- package/dist/ButtonWithDropdown/ButtonWithDropdown.js.map +1 -1
- package/dist/ButtonWithDropdown/ButtonWithDropdown.stories.js +6 -6
- package/dist/ButtonWithDropdown/ButtonWithDropdown.stories.js.map +1 -1
- package/dist/ButtonWithDropdown/ButtonWithDropdown.test.js +1 -1
- package/dist/ButtonWithDropdown/ButtonWithDropdown.test.js.map +1 -1
- package/dist/ButtonWithPopover/ButtonWithPopover.js +12 -3
- package/dist/ButtonWithPopover/ButtonWithPopover.js.map +1 -1
- package/dist/ButtonWithPopover/ButtonWithPopover.stories.js +7 -7
- package/dist/ButtonWithPopover/ButtonWithPopover.stories.js.map +1 -1
- package/dist/ButtonWithPopover/ButtonWithPopover.test.js +1 -1
- package/dist/ButtonWithPopover/ButtonWithPopover.test.js.map +1 -1
- package/dist/ButtonWithPopover/ButtonWithPopover.types.d.ts +2 -0
- package/dist/Checkbox/Checkbox.js +2 -4
- package/dist/Checkbox/Checkbox.js.map +1 -1
- package/dist/Checkbox/Checkbox.stories.js +5 -7
- package/dist/Checkbox/Checkbox.stories.js.map +1 -1
- package/dist/Icon/Icon.js +11 -3
- package/dist/Icon/Icon.js.map +1 -1
- package/dist/index.esm.js +2018 -376
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +2018 -376
- package/dist/index.js.map +1 -1
- package/dist/styles.css +28 -10
- package/package.json +2 -1
- package/dist/Tooltip/qTip.utilities.js +0 -11
- package/dist/Tooltip/qTip.utilities.js.map +0 -1
package/dist/index.js
CHANGED
|
@@ -210,7 +210,7 @@ function _extends() {
|
|
|
210
210
|
return _extends.apply(this, arguments);
|
|
211
211
|
}
|
|
212
212
|
|
|
213
|
-
function $e42e1063c40fb3ef$export$b9ecd428b558ff10(originalEventHandler, ourEventHandler, { checkForDefaultPrevented: checkForDefaultPrevented = true } = {}) {
|
|
213
|
+
function $e42e1063c40fb3ef$export$b9ecd428b558ff10$1(originalEventHandler, ourEventHandler, { checkForDefaultPrevented: checkForDefaultPrevented = true } = {}) {
|
|
214
214
|
return function handleEvent(event) {
|
|
215
215
|
originalEventHandler === null || originalEventHandler === void 0 || originalEventHandler(event);
|
|
216
216
|
if (checkForDefaultPrevented === false || !event.defaultPrevented) return ourEventHandler === null || ourEventHandler === void 0 ? void 0 : ourEventHandler(event);
|
|
@@ -220,29 +220,29 @@ function $e42e1063c40fb3ef$export$b9ecd428b558ff10(originalEventHandler, ourEven
|
|
|
220
220
|
/**
|
|
221
221
|
* Set a given ref to a given value
|
|
222
222
|
* This utility takes care of different types of refs: callback refs and RefObject(s)
|
|
223
|
-
*/ function $6ed0406888f73fc4$var$setRef(ref, value) {
|
|
223
|
+
*/ function $6ed0406888f73fc4$var$setRef$1(ref, value) {
|
|
224
224
|
if (typeof ref === 'function') ref(value);
|
|
225
225
|
else if (ref !== null && ref !== undefined) ref.current = value;
|
|
226
226
|
}
|
|
227
227
|
/**
|
|
228
228
|
* A utility to compose multiple refs together
|
|
229
229
|
* Accepts callback refs and RefObject(s)
|
|
230
|
-
*/ function $6ed0406888f73fc4$export$43e446d32b3d21af(...refs) {
|
|
231
|
-
return (node)=>refs.forEach((ref)=>$6ed0406888f73fc4$var$setRef(ref, node)
|
|
230
|
+
*/ function $6ed0406888f73fc4$export$43e446d32b3d21af$1(...refs) {
|
|
231
|
+
return (node)=>refs.forEach((ref)=>$6ed0406888f73fc4$var$setRef$1(ref, node)
|
|
232
232
|
)
|
|
233
233
|
;
|
|
234
234
|
}
|
|
235
235
|
/**
|
|
236
236
|
* A custom hook that composes multiple refs
|
|
237
237
|
* Accepts callback refs and RefObject(s)
|
|
238
|
-
*/ function $6ed0406888f73fc4$export$c7b2cbe3552a0d05(...refs) {
|
|
238
|
+
*/ function $6ed0406888f73fc4$export$c7b2cbe3552a0d05$1(...refs) {
|
|
239
239
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
240
|
-
return React.useCallback($6ed0406888f73fc4$export$43e446d32b3d21af(...refs), refs);
|
|
240
|
+
return React.useCallback($6ed0406888f73fc4$export$43e446d32b3d21af$1(...refs), refs);
|
|
241
241
|
}
|
|
242
242
|
|
|
243
243
|
/* -------------------------------------------------------------------------------------------------
|
|
244
244
|
* createContextScope
|
|
245
|
-
* -----------------------------------------------------------------------------------------------*/ function $c512c27ab02ef895$export$50c7b4e9d9f19c1(scopeName, createContextScopeDeps = []) {
|
|
245
|
+
* -----------------------------------------------------------------------------------------------*/ function $c512c27ab02ef895$export$50c7b4e9d9f19c1$1(scopeName, createContextScopeDeps = []) {
|
|
246
246
|
let defaultContexts = [];
|
|
247
247
|
/* -----------------------------------------------------------------------------------------------
|
|
248
248
|
* createContext
|
|
@@ -299,12 +299,12 @@ function $e42e1063c40fb3ef$export$b9ecd428b558ff10(originalEventHandler, ourEven
|
|
|
299
299
|
createScope.scopeName = scopeName;
|
|
300
300
|
return [
|
|
301
301
|
$c512c27ab02ef895$export$fd42f52fd3ae1109,
|
|
302
|
-
$c512c27ab02ef895$var$composeContextScopes(createScope, ...createContextScopeDeps)
|
|
302
|
+
$c512c27ab02ef895$var$composeContextScopes$1(createScope, ...createContextScopeDeps)
|
|
303
303
|
];
|
|
304
304
|
}
|
|
305
305
|
/* -------------------------------------------------------------------------------------------------
|
|
306
306
|
* composeContextScopes
|
|
307
|
-
* -----------------------------------------------------------------------------------------------*/ function $c512c27ab02ef895$var$composeContextScopes(...scopes) {
|
|
307
|
+
* -----------------------------------------------------------------------------------------------*/ function $c512c27ab02ef895$var$composeContextScopes$1(...scopes) {
|
|
308
308
|
const baseScope = scopes[0];
|
|
309
309
|
if (scopes.length === 1) return baseScope;
|
|
310
310
|
const createScope1 = ()=>{
|
|
@@ -339,10 +339,10 @@ function $e42e1063c40fb3ef$export$b9ecd428b558ff10(originalEventHandler, ourEven
|
|
|
339
339
|
|
|
340
340
|
/* -------------------------------------------------------------------------------------------------
|
|
341
341
|
* Slot
|
|
342
|
-
* -----------------------------------------------------------------------------------------------*/ const $5e63c961fc1ce211$export$8c6ed5c666ac1360 = /*#__PURE__*/ React.forwardRef((props, forwardedRef)=>{
|
|
342
|
+
* -----------------------------------------------------------------------------------------------*/ const $5e63c961fc1ce211$export$8c6ed5c666ac1360$1 = /*#__PURE__*/ React.forwardRef((props, forwardedRef)=>{
|
|
343
343
|
const { children: children , ...slotProps } = props;
|
|
344
344
|
const childrenArray = React.Children.toArray(children);
|
|
345
|
-
const slottable = childrenArray.find($5e63c961fc1ce211$var$isSlottable);
|
|
345
|
+
const slottable = childrenArray.find($5e63c961fc1ce211$var$isSlottable$1);
|
|
346
346
|
if (slottable) {
|
|
347
347
|
// the new element to render is the one passed as a child of `Slottable`
|
|
348
348
|
const newElement = slottable.props.children;
|
|
@@ -354,35 +354,35 @@ function $e42e1063c40fb3ef$export$b9ecd428b558ff10(originalEventHandler, ourEven
|
|
|
354
354
|
return /*#__PURE__*/ React.isValidElement(newElement) ? newElement.props.children : null;
|
|
355
355
|
} else return child;
|
|
356
356
|
});
|
|
357
|
-
return /*#__PURE__*/ React.createElement($5e63c961fc1ce211$var$SlotClone, _extends({}, slotProps, {
|
|
357
|
+
return /*#__PURE__*/ React.createElement($5e63c961fc1ce211$var$SlotClone$1, _extends({}, slotProps, {
|
|
358
358
|
ref: forwardedRef
|
|
359
359
|
}), /*#__PURE__*/ React.isValidElement(newElement) ? /*#__PURE__*/ React.cloneElement(newElement, undefined, newChildren) : null);
|
|
360
360
|
}
|
|
361
|
-
return /*#__PURE__*/ React.createElement($5e63c961fc1ce211$var$SlotClone, _extends({}, slotProps, {
|
|
361
|
+
return /*#__PURE__*/ React.createElement($5e63c961fc1ce211$var$SlotClone$1, _extends({}, slotProps, {
|
|
362
362
|
ref: forwardedRef
|
|
363
363
|
}), children);
|
|
364
364
|
});
|
|
365
|
-
$5e63c961fc1ce211$export$8c6ed5c666ac1360.displayName = 'Slot';
|
|
365
|
+
$5e63c961fc1ce211$export$8c6ed5c666ac1360$1.displayName = 'Slot';
|
|
366
366
|
/* -------------------------------------------------------------------------------------------------
|
|
367
367
|
* SlotClone
|
|
368
|
-
* -----------------------------------------------------------------------------------------------*/ const $5e63c961fc1ce211$var$SlotClone = /*#__PURE__*/ React.forwardRef((props, forwardedRef)=>{
|
|
368
|
+
* -----------------------------------------------------------------------------------------------*/ const $5e63c961fc1ce211$var$SlotClone$1 = /*#__PURE__*/ React.forwardRef((props, forwardedRef)=>{
|
|
369
369
|
const { children: children , ...slotProps } = props;
|
|
370
370
|
if (/*#__PURE__*/ React.isValidElement(children)) return /*#__PURE__*/ React.cloneElement(children, {
|
|
371
|
-
...$5e63c961fc1ce211$var$mergeProps(slotProps, children.props),
|
|
372
|
-
ref: forwardedRef ? $6ed0406888f73fc4$export$43e446d32b3d21af(forwardedRef, children.ref) : children.ref
|
|
371
|
+
...$5e63c961fc1ce211$var$mergeProps$1(slotProps, children.props),
|
|
372
|
+
ref: forwardedRef ? $6ed0406888f73fc4$export$43e446d32b3d21af$1(forwardedRef, children.ref) : children.ref
|
|
373
373
|
});
|
|
374
374
|
return React.Children.count(children) > 1 ? React.Children.only(null) : null;
|
|
375
375
|
});
|
|
376
|
-
$5e63c961fc1ce211$var$SlotClone.displayName = 'SlotClone';
|
|
376
|
+
$5e63c961fc1ce211$var$SlotClone$1.displayName = 'SlotClone';
|
|
377
377
|
/* -------------------------------------------------------------------------------------------------
|
|
378
378
|
* Slottable
|
|
379
|
-
* -----------------------------------------------------------------------------------------------*/ const $5e63c961fc1ce211$export$d9f1ccf0bdb05d45 = ({ children: children })=>{
|
|
379
|
+
* -----------------------------------------------------------------------------------------------*/ const $5e63c961fc1ce211$export$d9f1ccf0bdb05d45$1 = ({ children: children })=>{
|
|
380
380
|
return /*#__PURE__*/ React.createElement(React.Fragment, null, children);
|
|
381
381
|
};
|
|
382
|
-
/* ---------------------------------------------------------------------------------------------- */ function $5e63c961fc1ce211$var$isSlottable(child) {
|
|
383
|
-
return /*#__PURE__*/ React.isValidElement(child) && child.type === $5e63c961fc1ce211$export$d9f1ccf0bdb05d45;
|
|
382
|
+
/* ---------------------------------------------------------------------------------------------- */ function $5e63c961fc1ce211$var$isSlottable$1(child) {
|
|
383
|
+
return /*#__PURE__*/ React.isValidElement(child) && child.type === $5e63c961fc1ce211$export$d9f1ccf0bdb05d45$1;
|
|
384
384
|
}
|
|
385
|
-
function $5e63c961fc1ce211$var$mergeProps(slotProps, childProps) {
|
|
385
|
+
function $5e63c961fc1ce211$var$mergeProps$1(slotProps, childProps) {
|
|
386
386
|
// all child props should override
|
|
387
387
|
const overrideProps = {
|
|
388
388
|
...childProps
|
|
@@ -413,7 +413,7 @@ function $5e63c961fc1ce211$var$mergeProps(slotProps, childProps) {
|
|
|
413
413
|
};
|
|
414
414
|
}
|
|
415
415
|
|
|
416
|
-
const $8927f6f2acc4f386$var$NODES = [
|
|
416
|
+
const $8927f6f2acc4f386$var$NODES$1 = [
|
|
417
417
|
'a',
|
|
418
418
|
'button',
|
|
419
419
|
'div',
|
|
@@ -435,10 +435,10 @@ const $8927f6f2acc4f386$var$NODES = [
|
|
|
435
435
|
// prettier-ignore
|
|
436
436
|
/* -------------------------------------------------------------------------------------------------
|
|
437
437
|
* Primitive
|
|
438
|
-
* -----------------------------------------------------------------------------------------------*/ const $8927f6f2acc4f386$export$250ffa63cdc0d034 = $8927f6f2acc4f386$var$NODES.reduce((primitive, node)=>{
|
|
438
|
+
* -----------------------------------------------------------------------------------------------*/ const $8927f6f2acc4f386$export$250ffa63cdc0d034$1 = $8927f6f2acc4f386$var$NODES$1.reduce((primitive, node)=>{
|
|
439
439
|
const Node = /*#__PURE__*/ React.forwardRef((props, forwardedRef)=>{
|
|
440
440
|
const { asChild: asChild , ...primitiveProps } = props;
|
|
441
|
-
const Comp = asChild ? $5e63c961fc1ce211$export$8c6ed5c666ac1360 : node;
|
|
441
|
+
const Comp = asChild ? $5e63c961fc1ce211$export$8c6ed5c666ac1360$1 : node;
|
|
442
442
|
React.useEffect(()=>{
|
|
443
443
|
window[Symbol.for('radix-ui')] = true;
|
|
444
444
|
}, []);
|
|
@@ -489,7 +489,7 @@ const $8927f6f2acc4f386$var$NODES = [
|
|
|
489
489
|
* Note: though React classifies `focus`, `focusin` and `focusout` events as `discrete`, it's not recommended to use
|
|
490
490
|
* this utility with them. This is because it's possible for those handlers to be called implicitly during render
|
|
491
491
|
* e.g. when focus is within a component as it is unmounted, or when managing focus on mount.
|
|
492
|
-
*/ function $8927f6f2acc4f386$export$6d1a0317bde7de7f(target, event) {
|
|
492
|
+
*/ function $8927f6f2acc4f386$export$6d1a0317bde7de7f$1(target, event) {
|
|
493
493
|
if (target) ReactDOM.flushSync(()=>target.dispatchEvent(event)
|
|
494
494
|
);
|
|
495
495
|
}
|
|
@@ -497,7 +497,7 @@ const $8927f6f2acc4f386$var$NODES = [
|
|
|
497
497
|
/**
|
|
498
498
|
* A custom hook that converts a callback to a ref to avoid triggering re-renders when passed as a
|
|
499
499
|
* prop or avoid re-executing effects when passed as a dependency
|
|
500
|
-
*/ function $b1b2314f5f9a1d84$export$25bec8c6f54ee79a(callback) {
|
|
500
|
+
*/ function $b1b2314f5f9a1d84$export$25bec8c6f54ee79a$1(callback) {
|
|
501
501
|
const callbackRef = React.useRef(callback);
|
|
502
502
|
React.useEffect(()=>{
|
|
503
503
|
callbackRef.current = callback;
|
|
@@ -511,8 +511,8 @@ const $8927f6f2acc4f386$var$NODES = [
|
|
|
511
511
|
|
|
512
512
|
/**
|
|
513
513
|
* Listens for when the escape key is down
|
|
514
|
-
*/ function $addc16e1bbe58fd0$export$3a72a57244d6e765(onEscapeKeyDownProp, ownerDocument = globalThis === null || globalThis === void 0 ? void 0 : globalThis.document) {
|
|
515
|
-
const onEscapeKeyDown = $b1b2314f5f9a1d84$export$25bec8c6f54ee79a(onEscapeKeyDownProp);
|
|
514
|
+
*/ function $addc16e1bbe58fd0$export$3a72a57244d6e765$1(onEscapeKeyDownProp, ownerDocument = globalThis === null || globalThis === void 0 ? void 0 : globalThis.document) {
|
|
515
|
+
const onEscapeKeyDown = $b1b2314f5f9a1d84$export$25bec8c6f54ee79a$1(onEscapeKeyDownProp);
|
|
516
516
|
React.useEffect(()=>{
|
|
517
517
|
const handleKeyDown = (event)=>{
|
|
518
518
|
if (event.key === 'Escape') onEscapeKeyDown(event);
|
|
@@ -526,23 +526,23 @@ const $8927f6f2acc4f386$var$NODES = [
|
|
|
526
526
|
]);
|
|
527
527
|
}
|
|
528
528
|
|
|
529
|
-
const $5cb92bef7577960e$var$CONTEXT_UPDATE = 'dismissableLayer.update';
|
|
530
|
-
const $5cb92bef7577960e$var$POINTER_DOWN_OUTSIDE = 'dismissableLayer.pointerDownOutside';
|
|
531
|
-
const $5cb92bef7577960e$var$FOCUS_OUTSIDE = 'dismissableLayer.focusOutside';
|
|
532
|
-
let $5cb92bef7577960e$var$originalBodyPointerEvents;
|
|
533
|
-
const $5cb92bef7577960e$var$DismissableLayerContext = /*#__PURE__*/ React.createContext({
|
|
529
|
+
const $5cb92bef7577960e$var$CONTEXT_UPDATE$1 = 'dismissableLayer.update';
|
|
530
|
+
const $5cb92bef7577960e$var$POINTER_DOWN_OUTSIDE$1 = 'dismissableLayer.pointerDownOutside';
|
|
531
|
+
const $5cb92bef7577960e$var$FOCUS_OUTSIDE$1 = 'dismissableLayer.focusOutside';
|
|
532
|
+
let $5cb92bef7577960e$var$originalBodyPointerEvents$1;
|
|
533
|
+
const $5cb92bef7577960e$var$DismissableLayerContext$1 = /*#__PURE__*/ React.createContext({
|
|
534
534
|
layers: new Set(),
|
|
535
535
|
layersWithOutsidePointerEventsDisabled: new Set(),
|
|
536
536
|
branches: new Set()
|
|
537
537
|
});
|
|
538
|
-
const $5cb92bef7577960e$export$177fb62ff3ec1f22 = /*#__PURE__*/ React.forwardRef((props, forwardedRef)=>{
|
|
538
|
+
const $5cb92bef7577960e$export$177fb62ff3ec1f22$1 = /*#__PURE__*/ React.forwardRef((props, forwardedRef)=>{
|
|
539
539
|
var _node$ownerDocument;
|
|
540
540
|
const { disableOutsidePointerEvents: disableOutsidePointerEvents = false , onEscapeKeyDown: onEscapeKeyDown , onPointerDownOutside: onPointerDownOutside , onFocusOutside: onFocusOutside , onInteractOutside: onInteractOutside , onDismiss: onDismiss , ...layerProps } = props;
|
|
541
|
-
const context = React.useContext($5cb92bef7577960e$var$DismissableLayerContext);
|
|
541
|
+
const context = React.useContext($5cb92bef7577960e$var$DismissableLayerContext$1);
|
|
542
542
|
const [node1, setNode] = React.useState(null);
|
|
543
543
|
const ownerDocument = (_node$ownerDocument = node1 === null || node1 === void 0 ? void 0 : node1.ownerDocument) !== null && _node$ownerDocument !== void 0 ? _node$ownerDocument : globalThis === null || globalThis === void 0 ? void 0 : globalThis.document;
|
|
544
544
|
const [, force] = React.useState({});
|
|
545
|
-
const composedRefs = $6ed0406888f73fc4$export$c7b2cbe3552a0d05(forwardedRef, (node)=>setNode(node)
|
|
545
|
+
const composedRefs = $6ed0406888f73fc4$export$c7b2cbe3552a0d05$1(forwardedRef, (node)=>setNode(node)
|
|
546
546
|
);
|
|
547
547
|
const layers = Array.from(context.layers);
|
|
548
548
|
const [highestLayerWithOutsidePointerEventsDisabled] = [
|
|
@@ -552,7 +552,7 @@ const $5cb92bef7577960e$export$177fb62ff3ec1f22 = /*#__PURE__*/ React.forwardRef
|
|
|
552
552
|
const index = node1 ? layers.indexOf(node1) : -1;
|
|
553
553
|
const isBodyPointerEventsDisabled = context.layersWithOutsidePointerEventsDisabled.size > 0;
|
|
554
554
|
const isPointerEventsEnabled = index >= highestLayerWithOutsidePointerEventsDisabledIndex;
|
|
555
|
-
const pointerDownOutside = $5cb92bef7577960e$var$usePointerDownOutside((event)=>{
|
|
555
|
+
const pointerDownOutside = $5cb92bef7577960e$var$usePointerDownOutside$1((event)=>{
|
|
556
556
|
const target = event.target;
|
|
557
557
|
const isPointerDownOnBranch = [
|
|
558
558
|
...context.branches
|
|
@@ -563,7 +563,7 @@ const $5cb92bef7577960e$export$177fb62ff3ec1f22 = /*#__PURE__*/ React.forwardRef
|
|
|
563
563
|
onInteractOutside === null || onInteractOutside === void 0 || onInteractOutside(event);
|
|
564
564
|
if (!event.defaultPrevented) onDismiss === null || onDismiss === void 0 || onDismiss();
|
|
565
565
|
}, ownerDocument);
|
|
566
|
-
const focusOutside = $5cb92bef7577960e$var$useFocusOutside((event)=>{
|
|
566
|
+
const focusOutside = $5cb92bef7577960e$var$useFocusOutside$1((event)=>{
|
|
567
567
|
const target = event.target;
|
|
568
568
|
const isFocusInBranch = [
|
|
569
569
|
...context.branches
|
|
@@ -574,7 +574,7 @@ const $5cb92bef7577960e$export$177fb62ff3ec1f22 = /*#__PURE__*/ React.forwardRef
|
|
|
574
574
|
onInteractOutside === null || onInteractOutside === void 0 || onInteractOutside(event);
|
|
575
575
|
if (!event.defaultPrevented) onDismiss === null || onDismiss === void 0 || onDismiss();
|
|
576
576
|
}, ownerDocument);
|
|
577
|
-
$addc16e1bbe58fd0$export$3a72a57244d6e765((event)=>{
|
|
577
|
+
$addc16e1bbe58fd0$export$3a72a57244d6e765$1((event)=>{
|
|
578
578
|
const isHighestLayer = index === context.layers.size - 1;
|
|
579
579
|
if (!isHighestLayer) return;
|
|
580
580
|
onEscapeKeyDown === null || onEscapeKeyDown === void 0 || onEscapeKeyDown(event);
|
|
@@ -587,15 +587,15 @@ const $5cb92bef7577960e$export$177fb62ff3ec1f22 = /*#__PURE__*/ React.forwardRef
|
|
|
587
587
|
if (!node1) return;
|
|
588
588
|
if (disableOutsidePointerEvents) {
|
|
589
589
|
if (context.layersWithOutsidePointerEventsDisabled.size === 0) {
|
|
590
|
-
$5cb92bef7577960e$var$originalBodyPointerEvents = ownerDocument.body.style.pointerEvents;
|
|
590
|
+
$5cb92bef7577960e$var$originalBodyPointerEvents$1 = ownerDocument.body.style.pointerEvents;
|
|
591
591
|
ownerDocument.body.style.pointerEvents = 'none';
|
|
592
592
|
}
|
|
593
593
|
context.layersWithOutsidePointerEventsDisabled.add(node1);
|
|
594
594
|
}
|
|
595
595
|
context.layers.add(node1);
|
|
596
|
-
$5cb92bef7577960e$var$dispatchUpdate();
|
|
596
|
+
$5cb92bef7577960e$var$dispatchUpdate$1();
|
|
597
597
|
return ()=>{
|
|
598
|
-
if (disableOutsidePointerEvents && context.layersWithOutsidePointerEventsDisabled.size === 1) ownerDocument.body.style.pointerEvents = $5cb92bef7577960e$var$originalBodyPointerEvents;
|
|
598
|
+
if (disableOutsidePointerEvents && context.layersWithOutsidePointerEventsDisabled.size === 1) ownerDocument.body.style.pointerEvents = $5cb92bef7577960e$var$originalBodyPointerEvents$1;
|
|
599
599
|
};
|
|
600
600
|
}, [
|
|
601
601
|
node1,
|
|
@@ -613,7 +613,7 @@ const $5cb92bef7577960e$export$177fb62ff3ec1f22 = /*#__PURE__*/ React.forwardRef
|
|
|
613
613
|
if (!node1) return;
|
|
614
614
|
context.layers.delete(node1);
|
|
615
615
|
context.layersWithOutsidePointerEventsDisabled.delete(node1);
|
|
616
|
-
$5cb92bef7577960e$var$dispatchUpdate();
|
|
616
|
+
$5cb92bef7577960e$var$dispatchUpdate$1();
|
|
617
617
|
};
|
|
618
618
|
}, [
|
|
619
619
|
node1,
|
|
@@ -622,27 +622,27 @@ const $5cb92bef7577960e$export$177fb62ff3ec1f22 = /*#__PURE__*/ React.forwardRef
|
|
|
622
622
|
React.useEffect(()=>{
|
|
623
623
|
const handleUpdate = ()=>force({})
|
|
624
624
|
;
|
|
625
|
-
document.addEventListener($5cb92bef7577960e$var$CONTEXT_UPDATE, handleUpdate);
|
|
626
|
-
return ()=>document.removeEventListener($5cb92bef7577960e$var$CONTEXT_UPDATE, handleUpdate)
|
|
625
|
+
document.addEventListener($5cb92bef7577960e$var$CONTEXT_UPDATE$1, handleUpdate);
|
|
626
|
+
return ()=>document.removeEventListener($5cb92bef7577960e$var$CONTEXT_UPDATE$1, handleUpdate)
|
|
627
627
|
;
|
|
628
628
|
}, []);
|
|
629
|
-
return /*#__PURE__*/ React.createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.div, _extends({}, layerProps, {
|
|
629
|
+
return /*#__PURE__*/ React.createElement($8927f6f2acc4f386$export$250ffa63cdc0d034$1.div, _extends({}, layerProps, {
|
|
630
630
|
ref: composedRefs,
|
|
631
631
|
style: {
|
|
632
632
|
pointerEvents: isBodyPointerEventsDisabled ? isPointerEventsEnabled ? 'auto' : 'none' : undefined,
|
|
633
633
|
...props.style
|
|
634
634
|
},
|
|
635
|
-
onFocusCapture: $e42e1063c40fb3ef$export$b9ecd428b558ff10(props.onFocusCapture, focusOutside.onFocusCapture),
|
|
636
|
-
onBlurCapture: $e42e1063c40fb3ef$export$b9ecd428b558ff10(props.onBlurCapture, focusOutside.onBlurCapture),
|
|
637
|
-
onPointerDownCapture: $e42e1063c40fb3ef$export$b9ecd428b558ff10(props.onPointerDownCapture, pointerDownOutside.onPointerDownCapture)
|
|
635
|
+
onFocusCapture: $e42e1063c40fb3ef$export$b9ecd428b558ff10$1(props.onFocusCapture, focusOutside.onFocusCapture),
|
|
636
|
+
onBlurCapture: $e42e1063c40fb3ef$export$b9ecd428b558ff10$1(props.onBlurCapture, focusOutside.onBlurCapture),
|
|
637
|
+
onPointerDownCapture: $e42e1063c40fb3ef$export$b9ecd428b558ff10$1(props.onPointerDownCapture, pointerDownOutside.onPointerDownCapture)
|
|
638
638
|
}));
|
|
639
639
|
});
|
|
640
640
|
/* -----------------------------------------------------------------------------------------------*/ /**
|
|
641
641
|
* Listens for `pointerdown` outside a react subtree. We use `pointerdown` rather than `pointerup`
|
|
642
642
|
* to mimic layer dismissing behaviour present in OS.
|
|
643
643
|
* Returns props to pass to the node we want to check for outside events.
|
|
644
|
-
*/ function $5cb92bef7577960e$var$usePointerDownOutside(onPointerDownOutside, ownerDocument = globalThis === null || globalThis === void 0 ? void 0 : globalThis.document) {
|
|
645
|
-
const handlePointerDownOutside = $b1b2314f5f9a1d84$export$25bec8c6f54ee79a(onPointerDownOutside);
|
|
644
|
+
*/ function $5cb92bef7577960e$var$usePointerDownOutside$1(onPointerDownOutside, ownerDocument = globalThis === null || globalThis === void 0 ? void 0 : globalThis.document) {
|
|
645
|
+
const handlePointerDownOutside = $b1b2314f5f9a1d84$export$25bec8c6f54ee79a$1(onPointerDownOutside);
|
|
646
646
|
const isPointerInsideReactTreeRef = React.useRef(false);
|
|
647
647
|
const handleClickRef = React.useRef(()=>{});
|
|
648
648
|
React.useEffect(()=>{
|
|
@@ -652,7 +652,7 @@ const $5cb92bef7577960e$export$177fb62ff3ec1f22 = /*#__PURE__*/ React.forwardRef
|
|
|
652
652
|
originalEvent: event
|
|
653
653
|
};
|
|
654
654
|
function handleAndDispatchPointerDownOutsideEvent() {
|
|
655
|
-
$5cb92bef7577960e$var$handleAndDispatchCustomEvent($5cb92bef7577960e$var$POINTER_DOWN_OUTSIDE, handlePointerDownOutside, eventDetail, {
|
|
655
|
+
$5cb92bef7577960e$var$handleAndDispatchCustomEvent$1($5cb92bef7577960e$var$POINTER_DOWN_OUTSIDE$1, handlePointerDownOutside, eventDetail, {
|
|
656
656
|
discrete: true
|
|
657
657
|
});
|
|
658
658
|
}
|
|
@@ -711,8 +711,8 @@ const $5cb92bef7577960e$export$177fb62ff3ec1f22 = /*#__PURE__*/ React.forwardRef
|
|
|
711
711
|
/**
|
|
712
712
|
* Listens for when focus happens outside a react subtree.
|
|
713
713
|
* Returns props to pass to the root (node) of the subtree we want to check.
|
|
714
|
-
*/ function $5cb92bef7577960e$var$useFocusOutside(onFocusOutside, ownerDocument = globalThis === null || globalThis === void 0 ? void 0 : globalThis.document) {
|
|
715
|
-
const handleFocusOutside = $b1b2314f5f9a1d84$export$25bec8c6f54ee79a(onFocusOutside);
|
|
714
|
+
*/ function $5cb92bef7577960e$var$useFocusOutside$1(onFocusOutside, ownerDocument = globalThis === null || globalThis === void 0 ? void 0 : globalThis.document) {
|
|
715
|
+
const handleFocusOutside = $b1b2314f5f9a1d84$export$25bec8c6f54ee79a$1(onFocusOutside);
|
|
716
716
|
const isFocusInsideReactTreeRef = React.useRef(false);
|
|
717
717
|
React.useEffect(()=>{
|
|
718
718
|
const handleFocus = (event)=>{
|
|
@@ -720,7 +720,7 @@ const $5cb92bef7577960e$export$177fb62ff3ec1f22 = /*#__PURE__*/ React.forwardRef
|
|
|
720
720
|
const eventDetail = {
|
|
721
721
|
originalEvent: event
|
|
722
722
|
};
|
|
723
|
-
$5cb92bef7577960e$var$handleAndDispatchCustomEvent($5cb92bef7577960e$var$FOCUS_OUTSIDE, handleFocusOutside, eventDetail, {
|
|
723
|
+
$5cb92bef7577960e$var$handleAndDispatchCustomEvent$1($5cb92bef7577960e$var$FOCUS_OUTSIDE$1, handleFocusOutside, eventDetail, {
|
|
724
724
|
discrete: false
|
|
725
725
|
});
|
|
726
726
|
}
|
|
@@ -738,11 +738,11 @@ const $5cb92bef7577960e$export$177fb62ff3ec1f22 = /*#__PURE__*/ React.forwardRef
|
|
|
738
738
|
onBlurCapture: ()=>isFocusInsideReactTreeRef.current = false
|
|
739
739
|
};
|
|
740
740
|
}
|
|
741
|
-
function $5cb92bef7577960e$var$dispatchUpdate() {
|
|
742
|
-
const event = new CustomEvent($5cb92bef7577960e$var$CONTEXT_UPDATE);
|
|
741
|
+
function $5cb92bef7577960e$var$dispatchUpdate$1() {
|
|
742
|
+
const event = new CustomEvent($5cb92bef7577960e$var$CONTEXT_UPDATE$1);
|
|
743
743
|
document.dispatchEvent(event);
|
|
744
744
|
}
|
|
745
|
-
function $5cb92bef7577960e$var$handleAndDispatchCustomEvent(name, handler, detail, { discrete: discrete }) {
|
|
745
|
+
function $5cb92bef7577960e$var$handleAndDispatchCustomEvent$1(name, handler, detail, { discrete: discrete }) {
|
|
746
746
|
const target = detail.originalEvent.target;
|
|
747
747
|
const event = new CustomEvent(name, {
|
|
748
748
|
bubbles: false,
|
|
@@ -752,7 +752,7 @@ function $5cb92bef7577960e$var$handleAndDispatchCustomEvent(name, handler, detai
|
|
|
752
752
|
if (handler) target.addEventListener(name, handler, {
|
|
753
753
|
once: true
|
|
754
754
|
});
|
|
755
|
-
if (discrete) $8927f6f2acc4f386$export$6d1a0317bde7de7f(target, event);
|
|
755
|
+
if (discrete) $8927f6f2acc4f386$export$6d1a0317bde7de7f$1(target, event);
|
|
756
756
|
else target.dispatchEvent(event);
|
|
757
757
|
}
|
|
758
758
|
|
|
@@ -791,10 +791,10 @@ const $d3863c46a17e8a28$var$EVENT_OPTIONS = {
|
|
|
791
791
|
const $d3863c46a17e8a28$export$20e40289641fbbb6 = /*#__PURE__*/ React.forwardRef((props, forwardedRef)=>{
|
|
792
792
|
const { loop: loop = false , trapped: trapped = false , onMountAutoFocus: onMountAutoFocusProp , onUnmountAutoFocus: onUnmountAutoFocusProp , ...scopeProps } = props;
|
|
793
793
|
const [container1, setContainer] = React.useState(null);
|
|
794
|
-
const onMountAutoFocus = $b1b2314f5f9a1d84$export$25bec8c6f54ee79a(onMountAutoFocusProp);
|
|
795
|
-
const onUnmountAutoFocus = $b1b2314f5f9a1d84$export$25bec8c6f54ee79a(onUnmountAutoFocusProp);
|
|
794
|
+
const onMountAutoFocus = $b1b2314f5f9a1d84$export$25bec8c6f54ee79a$1(onMountAutoFocusProp);
|
|
795
|
+
const onUnmountAutoFocus = $b1b2314f5f9a1d84$export$25bec8c6f54ee79a$1(onUnmountAutoFocusProp);
|
|
796
796
|
const lastFocusedElementRef = React.useRef(null);
|
|
797
|
-
const composedRefs = $6ed0406888f73fc4$export$c7b2cbe3552a0d05(forwardedRef, (node)=>setContainer(node)
|
|
797
|
+
const composedRefs = $6ed0406888f73fc4$export$c7b2cbe3552a0d05$1(forwardedRef, (node)=>setContainer(node)
|
|
798
798
|
);
|
|
799
799
|
const focusScope = React.useRef({
|
|
800
800
|
paused: false,
|
|
@@ -927,7 +927,7 @@ const $d3863c46a17e8a28$export$20e40289641fbbb6 = /*#__PURE__*/ React.forwardRef
|
|
|
927
927
|
trapped,
|
|
928
928
|
focusScope.paused
|
|
929
929
|
]);
|
|
930
|
-
return /*#__PURE__*/ React.createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.div, _extends({
|
|
930
|
+
return /*#__PURE__*/ React.createElement($8927f6f2acc4f386$export$250ffa63cdc0d034$1.div, _extends({
|
|
931
931
|
tabIndex: -1
|
|
932
932
|
}, scopeProps, {
|
|
933
933
|
ref: composedRefs,
|
|
@@ -1057,14 +1057,14 @@ function $d3863c46a17e8a28$var$removeLinks(items) {
|
|
|
1057
1057
|
* We use this safe version which suppresses the warning by replacing it with a noop on the server.
|
|
1058
1058
|
*
|
|
1059
1059
|
* See: https://reactjs.org/docs/hooks-reference.html#uselayouteffect
|
|
1060
|
-
*/ const $9f79659886946c16$export$e5c5a5f917a5871c = Boolean(globalThis === null || globalThis === void 0 ? void 0 : globalThis.document) ? React.useLayoutEffect : ()=>{};
|
|
1060
|
+
*/ const $9f79659886946c16$export$e5c5a5f917a5871c$1 = Boolean(globalThis === null || globalThis === void 0 ? void 0 : globalThis.document) ? React.useLayoutEffect : ()=>{};
|
|
1061
1061
|
|
|
1062
1062
|
const $1746a345f3d73bb7$var$useReactId = React__namespace['useId'.toString()] || (()=>undefined
|
|
1063
1063
|
);
|
|
1064
1064
|
let $1746a345f3d73bb7$var$count = 0;
|
|
1065
1065
|
function $1746a345f3d73bb7$export$f680877a34711e37(deterministicId) {
|
|
1066
1066
|
const [id, setId] = React__namespace.useState($1746a345f3d73bb7$var$useReactId()); // React versions older than 18 will have client-side ids only.
|
|
1067
|
-
$9f79659886946c16$export$e5c5a5f917a5871c(()=>{
|
|
1067
|
+
$9f79659886946c16$export$e5c5a5f917a5871c$1(()=>{
|
|
1068
1068
|
if (!deterministicId) setId((reactId)=>reactId !== null && reactId !== void 0 ? reactId : String($1746a345f3d73bb7$var$count++)
|
|
1069
1069
|
);
|
|
1070
1070
|
}, [
|
|
@@ -1415,7 +1415,7 @@ async function detectOverflow(state, options) {
|
|
|
1415
1415
|
* appears centered to the reference element.
|
|
1416
1416
|
* @see https://floating-ui.com/docs/arrow
|
|
1417
1417
|
*/
|
|
1418
|
-
const arrow$
|
|
1418
|
+
const arrow$3 = options => ({
|
|
1419
1419
|
name: 'arrow',
|
|
1420
1420
|
options,
|
|
1421
1421
|
async fn(state) {
|
|
@@ -2723,7 +2723,7 @@ const hide = hide$1;
|
|
|
2723
2723
|
* appears centered to the reference element.
|
|
2724
2724
|
* @see https://floating-ui.com/docs/arrow
|
|
2725
2725
|
*/
|
|
2726
|
-
const arrow$
|
|
2726
|
+
const arrow$2 = arrow$3;
|
|
2727
2727
|
|
|
2728
2728
|
/**
|
|
2729
2729
|
* Built-in `limiter` that will stop `shift()` at a certain point.
|
|
@@ -2759,7 +2759,7 @@ const computePosition = (reference, floating, options) => {
|
|
|
2759
2759
|
* This wraps the core `arrow` middleware to allow React refs as the element.
|
|
2760
2760
|
* @see https://floating-ui.com/docs/arrow
|
|
2761
2761
|
*/
|
|
2762
|
-
const arrow = options => {
|
|
2762
|
+
const arrow$1 = options => {
|
|
2763
2763
|
function isRef(value) {
|
|
2764
2764
|
return {}.hasOwnProperty.call(value, 'current');
|
|
2765
2765
|
}
|
|
@@ -2773,14 +2773,14 @@ const arrow = options => {
|
|
|
2773
2773
|
} = typeof options === 'function' ? options(state) : options;
|
|
2774
2774
|
if (element && isRef(element)) {
|
|
2775
2775
|
if (element.current != null) {
|
|
2776
|
-
return arrow$
|
|
2776
|
+
return arrow$2({
|
|
2777
2777
|
element: element.current,
|
|
2778
2778
|
padding
|
|
2779
2779
|
}).fn(state);
|
|
2780
2780
|
}
|
|
2781
2781
|
return {};
|
|
2782
2782
|
} else if (element) {
|
|
2783
|
-
return arrow$
|
|
2783
|
+
return arrow$2({
|
|
2784
2784
|
element,
|
|
2785
2785
|
padding
|
|
2786
2786
|
}).fn(state);
|
|
@@ -2790,11 +2790,11 @@ const arrow = options => {
|
|
|
2790
2790
|
};
|
|
2791
2791
|
};
|
|
2792
2792
|
|
|
2793
|
-
var index$
|
|
2793
|
+
var index$2 = typeof document !== 'undefined' ? React.useLayoutEffect : React.useEffect;
|
|
2794
2794
|
|
|
2795
2795
|
// Fork of `fast-deep-equal` that only does the comparisons we need and compares
|
|
2796
2796
|
// functions
|
|
2797
|
-
function deepEqual(a, b) {
|
|
2797
|
+
function deepEqual$1(a, b) {
|
|
2798
2798
|
if (a === b) {
|
|
2799
2799
|
return true;
|
|
2800
2800
|
}
|
|
@@ -2810,7 +2810,7 @@ function deepEqual(a, b) {
|
|
|
2810
2810
|
length = a.length;
|
|
2811
2811
|
if (length != b.length) return false;
|
|
2812
2812
|
for (i = length; i-- !== 0;) {
|
|
2813
|
-
if (!deepEqual(a[i], b[i])) {
|
|
2813
|
+
if (!deepEqual$1(a[i], b[i])) {
|
|
2814
2814
|
return false;
|
|
2815
2815
|
}
|
|
2816
2816
|
}
|
|
@@ -2831,7 +2831,7 @@ function deepEqual(a, b) {
|
|
|
2831
2831
|
if (key === '_owner' && a.$$typeof) {
|
|
2832
2832
|
continue;
|
|
2833
2833
|
}
|
|
2834
|
-
if (!deepEqual(a[key], b[key])) {
|
|
2834
|
+
if (!deepEqual$1(a[key], b[key])) {
|
|
2835
2835
|
return false;
|
|
2836
2836
|
}
|
|
2837
2837
|
}
|
|
@@ -2853,9 +2853,9 @@ function roundByDPR(element, value) {
|
|
|
2853
2853
|
return Math.round(value * dpr) / dpr;
|
|
2854
2854
|
}
|
|
2855
2855
|
|
|
2856
|
-
function useLatestRef(value) {
|
|
2856
|
+
function useLatestRef$1(value) {
|
|
2857
2857
|
const ref = React__namespace.useRef(value);
|
|
2858
|
-
index$
|
|
2858
|
+
index$2(() => {
|
|
2859
2859
|
ref.current = value;
|
|
2860
2860
|
});
|
|
2861
2861
|
return ref;
|
|
@@ -2865,7 +2865,7 @@ function useLatestRef(value) {
|
|
|
2865
2865
|
* Provides data to position a floating element.
|
|
2866
2866
|
* @see https://floating-ui.com/docs/useFloating
|
|
2867
2867
|
*/
|
|
2868
|
-
function useFloating(options) {
|
|
2868
|
+
function useFloating$1(options) {
|
|
2869
2869
|
if (options === void 0) {
|
|
2870
2870
|
options = {};
|
|
2871
2871
|
}
|
|
@@ -2891,7 +2891,7 @@ function useFloating(options) {
|
|
|
2891
2891
|
isPositioned: false
|
|
2892
2892
|
});
|
|
2893
2893
|
const [latestMiddleware, setLatestMiddleware] = React__namespace.useState(middleware);
|
|
2894
|
-
if (!deepEqual(latestMiddleware, middleware)) {
|
|
2894
|
+
if (!deepEqual$1(latestMiddleware, middleware)) {
|
|
2895
2895
|
setLatestMiddleware(middleware);
|
|
2896
2896
|
}
|
|
2897
2897
|
const [_reference, _setReference] = React__namespace.useState(null);
|
|
@@ -2913,8 +2913,8 @@ function useFloating(options) {
|
|
|
2913
2913
|
const referenceRef = React__namespace.useRef(null);
|
|
2914
2914
|
const floatingRef = React__namespace.useRef(null);
|
|
2915
2915
|
const dataRef = React__namespace.useRef(data);
|
|
2916
|
-
const whileElementsMountedRef = useLatestRef(whileElementsMounted);
|
|
2917
|
-
const platformRef = useLatestRef(platform);
|
|
2916
|
+
const whileElementsMountedRef = useLatestRef$1(whileElementsMounted);
|
|
2917
|
+
const platformRef = useLatestRef$1(platform);
|
|
2918
2918
|
const update = React__namespace.useCallback(() => {
|
|
2919
2919
|
if (!referenceRef.current || !floatingRef.current) {
|
|
2920
2920
|
return;
|
|
@@ -2932,7 +2932,7 @@ function useFloating(options) {
|
|
|
2932
2932
|
...data,
|
|
2933
2933
|
isPositioned: true
|
|
2934
2934
|
};
|
|
2935
|
-
if (isMountedRef.current && !deepEqual(dataRef.current, fullData)) {
|
|
2935
|
+
if (isMountedRef.current && !deepEqual$1(dataRef.current, fullData)) {
|
|
2936
2936
|
dataRef.current = fullData;
|
|
2937
2937
|
ReactDOM__namespace.flushSync(() => {
|
|
2938
2938
|
setData(fullData);
|
|
@@ -2940,7 +2940,7 @@ function useFloating(options) {
|
|
|
2940
2940
|
}
|
|
2941
2941
|
});
|
|
2942
2942
|
}, [latestMiddleware, placement, strategy, platformRef]);
|
|
2943
|
-
index$
|
|
2943
|
+
index$2(() => {
|
|
2944
2944
|
if (open === false && dataRef.current.isPositioned) {
|
|
2945
2945
|
dataRef.current.isPositioned = false;
|
|
2946
2946
|
setData(data => ({
|
|
@@ -2950,13 +2950,13 @@ function useFloating(options) {
|
|
|
2950
2950
|
}
|
|
2951
2951
|
}, [open]);
|
|
2952
2952
|
const isMountedRef = React__namespace.useRef(false);
|
|
2953
|
-
index$
|
|
2953
|
+
index$2(() => {
|
|
2954
2954
|
isMountedRef.current = true;
|
|
2955
2955
|
return () => {
|
|
2956
2956
|
isMountedRef.current = false;
|
|
2957
2957
|
};
|
|
2958
2958
|
}, []);
|
|
2959
|
-
index$
|
|
2959
|
+
index$2(() => {
|
|
2960
2960
|
if (referenceEl) referenceRef.current = referenceEl;
|
|
2961
2961
|
if (floatingEl) floatingRef.current = floatingEl;
|
|
2962
2962
|
if (referenceEl && floatingEl) {
|
|
@@ -3012,9 +3012,9 @@ function useFloating(options) {
|
|
|
3012
3012
|
}), [data, update, refs, elements, floatingStyles]);
|
|
3013
3013
|
}
|
|
3014
3014
|
|
|
3015
|
-
const $7e8f5cd07187803e$export$21b07c8f274aebd5 = /*#__PURE__*/ React.forwardRef((props, forwardedRef)=>{
|
|
3015
|
+
const $7e8f5cd07187803e$export$21b07c8f274aebd5$1 = /*#__PURE__*/ React.forwardRef((props, forwardedRef)=>{
|
|
3016
3016
|
const { children: children , width: width = 10 , height: height = 5 , ...arrowProps } = props;
|
|
3017
|
-
return /*#__PURE__*/ React.createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.svg, _extends({}, arrowProps, {
|
|
3017
|
+
return /*#__PURE__*/ React.createElement($8927f6f2acc4f386$export$250ffa63cdc0d034$1.svg, _extends({}, arrowProps, {
|
|
3018
3018
|
ref: forwardedRef,
|
|
3019
3019
|
width: width,
|
|
3020
3020
|
height: height,
|
|
@@ -3024,11 +3024,11 @@ const $7e8f5cd07187803e$export$21b07c8f274aebd5 = /*#__PURE__*/ React.forwardRef
|
|
|
3024
3024
|
points: "0,0 30,0 15,10"
|
|
3025
3025
|
}));
|
|
3026
3026
|
});
|
|
3027
|
-
/* -----------------------------------------------------------------------------------------------*/ const $7e8f5cd07187803e$export$be92b6f5f03c0fe9 = $7e8f5cd07187803e$export$21b07c8f274aebd5;
|
|
3027
|
+
/* -----------------------------------------------------------------------------------------------*/ const $7e8f5cd07187803e$export$be92b6f5f03c0fe9$1 = $7e8f5cd07187803e$export$21b07c8f274aebd5$1;
|
|
3028
3028
|
|
|
3029
|
-
function $db6c3485150b8e66$export$1ab7ae714698c4b8(element) {
|
|
3029
|
+
function $db6c3485150b8e66$export$1ab7ae714698c4b8$1(element) {
|
|
3030
3030
|
const [size, setSize] = React.useState(undefined);
|
|
3031
|
-
$9f79659886946c16$export$e5c5a5f917a5871c(()=>{
|
|
3031
|
+
$9f79659886946c16$export$e5c5a5f917a5871c$1(()=>{
|
|
3032
3032
|
if (element) {
|
|
3033
3033
|
// provide size as early as possible
|
|
3034
3034
|
setSize({
|
|
@@ -3075,13 +3075,13 @@ function $db6c3485150b8e66$export$1ab7ae714698c4b8(element) {
|
|
|
3075
3075
|
|
|
3076
3076
|
/* -------------------------------------------------------------------------------------------------
|
|
3077
3077
|
* Popper
|
|
3078
|
-
* -----------------------------------------------------------------------------------------------*/ const $cf1ac5d9fe0e8206$var$POPPER_NAME = 'Popper';
|
|
3079
|
-
const [$cf1ac5d9fe0e8206$var$createPopperContext, $cf1ac5d9fe0e8206$export$722aac194ae923] = $c512c27ab02ef895$export$50c7b4e9d9f19c1($cf1ac5d9fe0e8206$var$POPPER_NAME);
|
|
3080
|
-
const [$cf1ac5d9fe0e8206$var$PopperProvider, $cf1ac5d9fe0e8206$var$usePopperContext] = $cf1ac5d9fe0e8206$var$createPopperContext($cf1ac5d9fe0e8206$var$POPPER_NAME);
|
|
3081
|
-
const $cf1ac5d9fe0e8206$export$badac9ada3a0bdf9 = (props)=>{
|
|
3078
|
+
* -----------------------------------------------------------------------------------------------*/ const $cf1ac5d9fe0e8206$var$POPPER_NAME$1 = 'Popper';
|
|
3079
|
+
const [$cf1ac5d9fe0e8206$var$createPopperContext$1, $cf1ac5d9fe0e8206$export$722aac194ae923$1] = $c512c27ab02ef895$export$50c7b4e9d9f19c1$1($cf1ac5d9fe0e8206$var$POPPER_NAME$1);
|
|
3080
|
+
const [$cf1ac5d9fe0e8206$var$PopperProvider$1, $cf1ac5d9fe0e8206$var$usePopperContext$1] = $cf1ac5d9fe0e8206$var$createPopperContext$1($cf1ac5d9fe0e8206$var$POPPER_NAME$1);
|
|
3081
|
+
const $cf1ac5d9fe0e8206$export$badac9ada3a0bdf9$1 = (props)=>{
|
|
3082
3082
|
const { __scopePopper: __scopePopper , children: children } = props;
|
|
3083
3083
|
const [anchor, setAnchor] = React.useState(null);
|
|
3084
|
-
return /*#__PURE__*/ React.createElement($cf1ac5d9fe0e8206$var$PopperProvider, {
|
|
3084
|
+
return /*#__PURE__*/ React.createElement($cf1ac5d9fe0e8206$var$PopperProvider$1, {
|
|
3085
3085
|
scope: __scopePopper,
|
|
3086
3086
|
anchor: anchor,
|
|
3087
3087
|
onAnchorChange: setAnchor
|
|
@@ -3089,35 +3089,35 @@ const $cf1ac5d9fe0e8206$export$badac9ada3a0bdf9 = (props)=>{
|
|
|
3089
3089
|
};
|
|
3090
3090
|
/* -------------------------------------------------------------------------------------------------
|
|
3091
3091
|
* PopperAnchor
|
|
3092
|
-
* -----------------------------------------------------------------------------------------------*/ const $cf1ac5d9fe0e8206$var$ANCHOR_NAME = 'PopperAnchor';
|
|
3093
|
-
const $cf1ac5d9fe0e8206$export$ecd4e1ccab6ed6d = /*#__PURE__*/ React.forwardRef((props, forwardedRef)=>{
|
|
3092
|
+
* -----------------------------------------------------------------------------------------------*/ const $cf1ac5d9fe0e8206$var$ANCHOR_NAME$1 = 'PopperAnchor';
|
|
3093
|
+
const $cf1ac5d9fe0e8206$export$ecd4e1ccab6ed6d$1 = /*#__PURE__*/ React.forwardRef((props, forwardedRef)=>{
|
|
3094
3094
|
const { __scopePopper: __scopePopper , virtualRef: virtualRef , ...anchorProps } = props;
|
|
3095
|
-
const context = $cf1ac5d9fe0e8206$var$usePopperContext($cf1ac5d9fe0e8206$var$ANCHOR_NAME, __scopePopper);
|
|
3095
|
+
const context = $cf1ac5d9fe0e8206$var$usePopperContext$1($cf1ac5d9fe0e8206$var$ANCHOR_NAME$1, __scopePopper);
|
|
3096
3096
|
const ref = React.useRef(null);
|
|
3097
|
-
const composedRefs = $6ed0406888f73fc4$export$c7b2cbe3552a0d05(forwardedRef, ref);
|
|
3097
|
+
const composedRefs = $6ed0406888f73fc4$export$c7b2cbe3552a0d05$1(forwardedRef, ref);
|
|
3098
3098
|
React.useEffect(()=>{
|
|
3099
3099
|
// Consumer can anchor the popper to something that isn't
|
|
3100
3100
|
// a DOM node e.g. pointer position, so we override the
|
|
3101
3101
|
// `anchorRef` with their virtual ref in this case.
|
|
3102
3102
|
context.onAnchorChange((virtualRef === null || virtualRef === void 0 ? void 0 : virtualRef.current) || ref.current);
|
|
3103
3103
|
});
|
|
3104
|
-
return virtualRef ? null : /*#__PURE__*/ React.createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.div, _extends({}, anchorProps, {
|
|
3104
|
+
return virtualRef ? null : /*#__PURE__*/ React.createElement($8927f6f2acc4f386$export$250ffa63cdc0d034$1.div, _extends({}, anchorProps, {
|
|
3105
3105
|
ref: composedRefs
|
|
3106
3106
|
}));
|
|
3107
3107
|
});
|
|
3108
3108
|
/* -------------------------------------------------------------------------------------------------
|
|
3109
3109
|
* PopperContent
|
|
3110
|
-
* -----------------------------------------------------------------------------------------------*/ const $cf1ac5d9fe0e8206$var$CONTENT_NAME = 'PopperContent';
|
|
3111
|
-
const [$cf1ac5d9fe0e8206$var$PopperContentProvider, $cf1ac5d9fe0e8206$var$useContentContext] = $cf1ac5d9fe0e8206$var$createPopperContext($cf1ac5d9fe0e8206$var$CONTENT_NAME);
|
|
3112
|
-
const $cf1ac5d9fe0e8206$export$bc4ae5855d3c4fc = /*#__PURE__*/ React.forwardRef((props, forwardedRef)=>{
|
|
3110
|
+
* -----------------------------------------------------------------------------------------------*/ const $cf1ac5d9fe0e8206$var$CONTENT_NAME$1 = 'PopperContent';
|
|
3111
|
+
const [$cf1ac5d9fe0e8206$var$PopperContentProvider$1, $cf1ac5d9fe0e8206$var$useContentContext$1] = $cf1ac5d9fe0e8206$var$createPopperContext$1($cf1ac5d9fe0e8206$var$CONTENT_NAME$1);
|
|
3112
|
+
const $cf1ac5d9fe0e8206$export$bc4ae5855d3c4fc$1 = /*#__PURE__*/ React.forwardRef((props, forwardedRef)=>{
|
|
3113
3113
|
var _arrowSize$width, _arrowSize$height, _middlewareData$arrow, _middlewareData$arrow2, _middlewareData$arrow3, _middlewareData$trans, _middlewareData$trans2, _middlewareData$hide;
|
|
3114
3114
|
const { __scopePopper: __scopePopper , side: side = 'bottom' , sideOffset: sideOffset = 0 , align: align = 'center' , alignOffset: alignOffset = 0 , arrowPadding: arrowPadding = 0 , avoidCollisions: avoidCollisions = true , collisionBoundary: collisionBoundary = [] , collisionPadding: collisionPaddingProp = 0 , sticky: sticky = 'partial' , hideWhenDetached: hideWhenDetached = false , updatePositionStrategy: updatePositionStrategy = 'optimized' , onPlaced: onPlaced , ...contentProps } = props;
|
|
3115
|
-
const context = $cf1ac5d9fe0e8206$var$usePopperContext($cf1ac5d9fe0e8206$var$CONTENT_NAME, __scopePopper);
|
|
3115
|
+
const context = $cf1ac5d9fe0e8206$var$usePopperContext$1($cf1ac5d9fe0e8206$var$CONTENT_NAME$1, __scopePopper);
|
|
3116
3116
|
const [content, setContent] = React.useState(null);
|
|
3117
|
-
const composedRefs = $6ed0406888f73fc4$export$c7b2cbe3552a0d05(forwardedRef, (node)=>setContent(node)
|
|
3117
|
+
const composedRefs = $6ed0406888f73fc4$export$c7b2cbe3552a0d05$1(forwardedRef, (node)=>setContent(node)
|
|
3118
3118
|
);
|
|
3119
|
-
const [arrow
|
|
3120
|
-
const arrowSize = $db6c3485150b8e66$export$1ab7ae714698c4b8(arrow
|
|
3119
|
+
const [arrow, setArrow] = React.useState(null);
|
|
3120
|
+
const arrowSize = $db6c3485150b8e66$export$1ab7ae714698c4b8$1(arrow);
|
|
3121
3121
|
const arrowWidth = (_arrowSize$width = arrowSize === null || arrowSize === void 0 ? void 0 : arrowSize.width) !== null && _arrowSize$width !== void 0 ? _arrowSize$width : 0;
|
|
3122
3122
|
const arrowHeight = (_arrowSize$height = arrowSize === null || arrowSize === void 0 ? void 0 : arrowSize.height) !== null && _arrowSize$height !== void 0 ? _arrowSize$height : 0;
|
|
3123
3123
|
const desiredPlacement = side + (align !== 'center' ? '-' + align : '');
|
|
@@ -3134,11 +3134,11 @@ const $cf1ac5d9fe0e8206$export$bc4ae5855d3c4fc = /*#__PURE__*/ React.forwardRef(
|
|
|
3134
3134
|
const hasExplicitBoundaries = boundary.length > 0;
|
|
3135
3135
|
const detectOverflowOptions = {
|
|
3136
3136
|
padding: collisionPadding,
|
|
3137
|
-
boundary: boundary.filter($cf1ac5d9fe0e8206$var$isNotNull),
|
|
3137
|
+
boundary: boundary.filter($cf1ac5d9fe0e8206$var$isNotNull$1),
|
|
3138
3138
|
// with `strategy: 'fixed'`, this is the only way to get it to respect boundaries
|
|
3139
3139
|
altBoundary: hasExplicitBoundaries
|
|
3140
3140
|
};
|
|
3141
|
-
const { refs: refs , floatingStyles: floatingStyles , placement: placement , isPositioned: isPositioned , middlewareData: middlewareData } = useFloating({
|
|
3141
|
+
const { refs: refs , floatingStyles: floatingStyles , placement: placement , isPositioned: isPositioned , middlewareData: middlewareData } = useFloating$1({
|
|
3142
3142
|
// default to `fixed` strategy so users don't have to pick and we also avoid focus scroll issues
|
|
3143
3143
|
strategy: 'fixed',
|
|
3144
3144
|
placement: desiredPlacement,
|
|
@@ -3176,11 +3176,11 @@ const $cf1ac5d9fe0e8206$export$bc4ae5855d3c4fc = /*#__PURE__*/ React.forwardRef(
|
|
|
3176
3176
|
contentStyle.setProperty('--radix-popper-anchor-height', `${anchorHeight}px`);
|
|
3177
3177
|
}
|
|
3178
3178
|
}),
|
|
3179
|
-
arrow
|
|
3180
|
-
element: arrow
|
|
3179
|
+
arrow && arrow$1({
|
|
3180
|
+
element: arrow,
|
|
3181
3181
|
padding: arrowPadding
|
|
3182
3182
|
}),
|
|
3183
|
-
$cf1ac5d9fe0e8206$var$transformOrigin({
|
|
3183
|
+
$cf1ac5d9fe0e8206$var$transformOrigin$1({
|
|
3184
3184
|
arrowWidth: arrowWidth,
|
|
3185
3185
|
arrowHeight: arrowHeight
|
|
3186
3186
|
}),
|
|
@@ -3190,9 +3190,9 @@ const $cf1ac5d9fe0e8206$export$bc4ae5855d3c4fc = /*#__PURE__*/ React.forwardRef(
|
|
|
3190
3190
|
})
|
|
3191
3191
|
]
|
|
3192
3192
|
});
|
|
3193
|
-
const [placedSide, placedAlign] = $cf1ac5d9fe0e8206$var$getSideAndAlignFromPlacement(placement);
|
|
3194
|
-
const handlePlaced = $b1b2314f5f9a1d84$export$25bec8c6f54ee79a(onPlaced);
|
|
3195
|
-
$9f79659886946c16$export$e5c5a5f917a5871c(()=>{
|
|
3193
|
+
const [placedSide, placedAlign] = $cf1ac5d9fe0e8206$var$getSideAndAlignFromPlacement$1(placement);
|
|
3194
|
+
const handlePlaced = $b1b2314f5f9a1d84$export$25bec8c6f54ee79a$1(onPlaced);
|
|
3195
|
+
$9f79659886946c16$export$e5c5a5f917a5871c$1(()=>{
|
|
3196
3196
|
if (isPositioned) handlePlaced === null || handlePlaced === void 0 || handlePlaced();
|
|
3197
3197
|
}, [
|
|
3198
3198
|
isPositioned,
|
|
@@ -3202,7 +3202,7 @@ const $cf1ac5d9fe0e8206$export$bc4ae5855d3c4fc = /*#__PURE__*/ React.forwardRef(
|
|
|
3202
3202
|
const arrowY = (_middlewareData$arrow2 = middlewareData.arrow) === null || _middlewareData$arrow2 === void 0 ? void 0 : _middlewareData$arrow2.y;
|
|
3203
3203
|
const cannotCenterArrow = ((_middlewareData$arrow3 = middlewareData.arrow) === null || _middlewareData$arrow3 === void 0 ? void 0 : _middlewareData$arrow3.centerOffset) !== 0;
|
|
3204
3204
|
const [contentZIndex, setContentZIndex] = React.useState();
|
|
3205
|
-
$9f79659886946c16$export$e5c5a5f917a5871c(()=>{
|
|
3205
|
+
$9f79659886946c16$export$e5c5a5f917a5871c$1(()=>{
|
|
3206
3206
|
if (content) setContentZIndex(window.getComputedStyle(content).zIndex);
|
|
3207
3207
|
}, [
|
|
3208
3208
|
content
|
|
@@ -3223,14 +3223,14 @@ const $cf1ac5d9fe0e8206$export$bc4ae5855d3c4fc = /*#__PURE__*/ React.forwardRef(
|
|
|
3223
3223
|
} // Floating UI interally calculates logical alignment based the `dir` attribute on
|
|
3224
3224
|
,
|
|
3225
3225
|
dir: props.dir
|
|
3226
|
-
}, /*#__PURE__*/ React.createElement($cf1ac5d9fe0e8206$var$PopperContentProvider, {
|
|
3226
|
+
}, /*#__PURE__*/ React.createElement($cf1ac5d9fe0e8206$var$PopperContentProvider$1, {
|
|
3227
3227
|
scope: __scopePopper,
|
|
3228
3228
|
placedSide: placedSide,
|
|
3229
3229
|
onArrowChange: setArrow,
|
|
3230
3230
|
arrowX: arrowX,
|
|
3231
3231
|
arrowY: arrowY,
|
|
3232
3232
|
shouldHideArrow: cannotCenterArrow
|
|
3233
|
-
}, /*#__PURE__*/ React.createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.div, _extends({
|
|
3233
|
+
}, /*#__PURE__*/ React.createElement($8927f6f2acc4f386$export$250ffa63cdc0d034$1.div, _extends({
|
|
3234
3234
|
"data-side": placedSide,
|
|
3235
3235
|
"data-align": placedAlign
|
|
3236
3236
|
}, contentProps, {
|
|
@@ -3247,17 +3247,17 @@ const $cf1ac5d9fe0e8206$export$bc4ae5855d3c4fc = /*#__PURE__*/ React.forwardRef(
|
|
|
3247
3247
|
});
|
|
3248
3248
|
/* -------------------------------------------------------------------------------------------------
|
|
3249
3249
|
* PopperArrow
|
|
3250
|
-
* -----------------------------------------------------------------------------------------------*/ const $cf1ac5d9fe0e8206$var$ARROW_NAME = 'PopperArrow';
|
|
3251
|
-
const $cf1ac5d9fe0e8206$var$OPPOSITE_SIDE = {
|
|
3250
|
+
* -----------------------------------------------------------------------------------------------*/ const $cf1ac5d9fe0e8206$var$ARROW_NAME$1 = 'PopperArrow';
|
|
3251
|
+
const $cf1ac5d9fe0e8206$var$OPPOSITE_SIDE$1 = {
|
|
3252
3252
|
top: 'bottom',
|
|
3253
3253
|
right: 'left',
|
|
3254
3254
|
bottom: 'top',
|
|
3255
3255
|
left: 'right'
|
|
3256
3256
|
};
|
|
3257
|
-
const $cf1ac5d9fe0e8206$export$79d62cd4e10a3fd0 = /*#__PURE__*/ React.forwardRef(function $cf1ac5d9fe0e8206$export$79d62cd4e10a3fd0(props, forwardedRef) {
|
|
3257
|
+
const $cf1ac5d9fe0e8206$export$79d62cd4e10a3fd0$1 = /*#__PURE__*/ React.forwardRef(function $cf1ac5d9fe0e8206$export$79d62cd4e10a3fd0(props, forwardedRef) {
|
|
3258
3258
|
const { __scopePopper: __scopePopper , ...arrowProps } = props;
|
|
3259
|
-
const contentContext = $cf1ac5d9fe0e8206$var$useContentContext($cf1ac5d9fe0e8206$var$ARROW_NAME, __scopePopper);
|
|
3260
|
-
const baseSide = $cf1ac5d9fe0e8206$var$OPPOSITE_SIDE[contentContext.placedSide];
|
|
3259
|
+
const contentContext = $cf1ac5d9fe0e8206$var$useContentContext$1($cf1ac5d9fe0e8206$var$ARROW_NAME$1, __scopePopper);
|
|
3260
|
+
const baseSide = $cf1ac5d9fe0e8206$var$OPPOSITE_SIDE$1[contentContext.placedSide];
|
|
3261
3261
|
return(/*#__PURE__*/ // we have to use an extra wrapper because `ResizeObserver` (used by `useSize`)
|
|
3262
3262
|
// doesn't report size as we'd expect on SVG elements.
|
|
3263
3263
|
// it reports their bounding box which is effectively the largest path inside the SVG.
|
|
@@ -3282,7 +3282,7 @@ const $cf1ac5d9fe0e8206$export$79d62cd4e10a3fd0 = /*#__PURE__*/ React.forwardRef
|
|
|
3282
3282
|
}[contentContext.placedSide],
|
|
3283
3283
|
visibility: contentContext.shouldHideArrow ? 'hidden' : undefined
|
|
3284
3284
|
}
|
|
3285
|
-
}, /*#__PURE__*/ React.createElement($7e8f5cd07187803e$export$be92b6f5f03c0fe9, _extends({}, arrowProps, {
|
|
3285
|
+
}, /*#__PURE__*/ React.createElement($7e8f5cd07187803e$export$be92b6f5f03c0fe9$1, _extends({}, arrowProps, {
|
|
3286
3286
|
ref: forwardedRef,
|
|
3287
3287
|
style: {
|
|
3288
3288
|
...arrowProps.style,
|
|
@@ -3291,10 +3291,10 @@ const $cf1ac5d9fe0e8206$export$79d62cd4e10a3fd0 = /*#__PURE__*/ React.forwardRef
|
|
|
3291
3291
|
}
|
|
3292
3292
|
}))));
|
|
3293
3293
|
});
|
|
3294
|
-
/* -----------------------------------------------------------------------------------------------*/ function $cf1ac5d9fe0e8206$var$isNotNull(value) {
|
|
3294
|
+
/* -----------------------------------------------------------------------------------------------*/ function $cf1ac5d9fe0e8206$var$isNotNull$1(value) {
|
|
3295
3295
|
return value !== null;
|
|
3296
3296
|
}
|
|
3297
|
-
const $cf1ac5d9fe0e8206$var$transformOrigin = (options)=>({
|
|
3297
|
+
const $cf1ac5d9fe0e8206$var$transformOrigin$1 = (options)=>({
|
|
3298
3298
|
name: 'transformOrigin',
|
|
3299
3299
|
options: options,
|
|
3300
3300
|
fn (data) {
|
|
@@ -3304,7 +3304,7 @@ const $cf1ac5d9fe0e8206$var$transformOrigin = (options)=>({
|
|
|
3304
3304
|
const isArrowHidden = cannotCenterArrow;
|
|
3305
3305
|
const arrowWidth = isArrowHidden ? 0 : options.arrowWidth;
|
|
3306
3306
|
const arrowHeight = isArrowHidden ? 0 : options.arrowHeight;
|
|
3307
|
-
const [placedSide, placedAlign] = $cf1ac5d9fe0e8206$var$getSideAndAlignFromPlacement(placement);
|
|
3307
|
+
const [placedSide, placedAlign] = $cf1ac5d9fe0e8206$var$getSideAndAlignFromPlacement$1(placement);
|
|
3308
3308
|
const noArrowAlign = {
|
|
3309
3309
|
start: '0%',
|
|
3310
3310
|
center: '50%',
|
|
@@ -3336,27 +3336,27 @@ const $cf1ac5d9fe0e8206$var$transformOrigin = (options)=>({
|
|
|
3336
3336
|
}
|
|
3337
3337
|
})
|
|
3338
3338
|
;
|
|
3339
|
-
function $cf1ac5d9fe0e8206$var$getSideAndAlignFromPlacement(placement) {
|
|
3339
|
+
function $cf1ac5d9fe0e8206$var$getSideAndAlignFromPlacement$1(placement) {
|
|
3340
3340
|
const [side, align = 'center'] = placement.split('-');
|
|
3341
3341
|
return [
|
|
3342
3342
|
side,
|
|
3343
3343
|
align
|
|
3344
3344
|
];
|
|
3345
3345
|
}
|
|
3346
|
-
const $cf1ac5d9fe0e8206$export$be92b6f5f03c0fe9 = $cf1ac5d9fe0e8206$export$badac9ada3a0bdf9;
|
|
3347
|
-
const $cf1ac5d9fe0e8206$export$b688253958b8dfe7 = $cf1ac5d9fe0e8206$export$ecd4e1ccab6ed6d;
|
|
3348
|
-
const $cf1ac5d9fe0e8206$export$7c6e2c02157bb7d2 = $cf1ac5d9fe0e8206$export$bc4ae5855d3c4fc;
|
|
3349
|
-
const $cf1ac5d9fe0e8206$export$21b07c8f274aebd5 = $cf1ac5d9fe0e8206$export$79d62cd4e10a3fd0;
|
|
3346
|
+
const $cf1ac5d9fe0e8206$export$be92b6f5f03c0fe9$1 = $cf1ac5d9fe0e8206$export$badac9ada3a0bdf9$1;
|
|
3347
|
+
const $cf1ac5d9fe0e8206$export$b688253958b8dfe7$1 = $cf1ac5d9fe0e8206$export$ecd4e1ccab6ed6d$1;
|
|
3348
|
+
const $cf1ac5d9fe0e8206$export$7c6e2c02157bb7d2$1 = $cf1ac5d9fe0e8206$export$bc4ae5855d3c4fc$1;
|
|
3349
|
+
const $cf1ac5d9fe0e8206$export$21b07c8f274aebd5$1 = $cf1ac5d9fe0e8206$export$79d62cd4e10a3fd0$1;
|
|
3350
3350
|
|
|
3351
|
-
const $f1701beae083dbae$export$602eac185826482c = /*#__PURE__*/ React.forwardRef((props, forwardedRef)=>{
|
|
3351
|
+
const $f1701beae083dbae$export$602eac185826482c$1 = /*#__PURE__*/ React.forwardRef((props, forwardedRef)=>{
|
|
3352
3352
|
var _globalThis$document;
|
|
3353
3353
|
const { container: container = globalThis === null || globalThis === void 0 ? void 0 : (_globalThis$document = globalThis.document) === null || _globalThis$document === void 0 ? void 0 : _globalThis$document.body , ...portalProps } = props;
|
|
3354
|
-
return container ? /*#__PURE__*/ ReactDOM.createPortal(/*#__PURE__*/ React.createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.div, _extends({}, portalProps, {
|
|
3354
|
+
return container ? /*#__PURE__*/ ReactDOM.createPortal(/*#__PURE__*/ React.createElement($8927f6f2acc4f386$export$250ffa63cdc0d034$1.div, _extends({}, portalProps, {
|
|
3355
3355
|
ref: forwardedRef
|
|
3356
3356
|
})), container) : null;
|
|
3357
3357
|
});
|
|
3358
3358
|
|
|
3359
|
-
function $fe963b355347cc68$export$3e6543de14f8614f(initialState, machine) {
|
|
3359
|
+
function $fe963b355347cc68$export$3e6543de14f8614f$1(initialState, machine) {
|
|
3360
3360
|
return React.useReducer((state, event)=>{
|
|
3361
3361
|
const nextState = machine[state][event];
|
|
3362
3362
|
return nextState !== null && nextState !== void 0 ? nextState : state;
|
|
@@ -3364,28 +3364,28 @@ function $fe963b355347cc68$export$3e6543de14f8614f(initialState, machine) {
|
|
|
3364
3364
|
}
|
|
3365
3365
|
|
|
3366
3366
|
|
|
3367
|
-
const $921a889cee6df7e8$export$99c2b779aa4e8b8b = (props)=>{
|
|
3367
|
+
const $921a889cee6df7e8$export$99c2b779aa4e8b8b$1 = (props)=>{
|
|
3368
3368
|
const { present: present , children: children } = props;
|
|
3369
|
-
const presence = $921a889cee6df7e8$var$usePresence(present);
|
|
3369
|
+
const presence = $921a889cee6df7e8$var$usePresence$1(present);
|
|
3370
3370
|
const child = typeof children === 'function' ? children({
|
|
3371
3371
|
present: presence.isPresent
|
|
3372
3372
|
}) : React.Children.only(children);
|
|
3373
|
-
const ref = $6ed0406888f73fc4$export$c7b2cbe3552a0d05(presence.ref, child.ref);
|
|
3373
|
+
const ref = $6ed0406888f73fc4$export$c7b2cbe3552a0d05$1(presence.ref, child.ref);
|
|
3374
3374
|
const forceMount = typeof children === 'function';
|
|
3375
3375
|
return forceMount || presence.isPresent ? /*#__PURE__*/ React.cloneElement(child, {
|
|
3376
3376
|
ref: ref
|
|
3377
3377
|
}) : null;
|
|
3378
3378
|
};
|
|
3379
|
-
$921a889cee6df7e8$export$99c2b779aa4e8b8b.displayName = 'Presence';
|
|
3379
|
+
$921a889cee6df7e8$export$99c2b779aa4e8b8b$1.displayName = 'Presence';
|
|
3380
3380
|
/* -------------------------------------------------------------------------------------------------
|
|
3381
3381
|
* usePresence
|
|
3382
|
-
* -----------------------------------------------------------------------------------------------*/ function $921a889cee6df7e8$var$usePresence(present) {
|
|
3382
|
+
* -----------------------------------------------------------------------------------------------*/ function $921a889cee6df7e8$var$usePresence$1(present) {
|
|
3383
3383
|
const [node1, setNode] = React.useState();
|
|
3384
3384
|
const stylesRef = React.useRef({});
|
|
3385
3385
|
const prevPresentRef = React.useRef(present);
|
|
3386
3386
|
const prevAnimationNameRef = React.useRef('none');
|
|
3387
3387
|
const initialState = present ? 'mounted' : 'unmounted';
|
|
3388
|
-
const [state, send] = $fe963b355347cc68$export$3e6543de14f8614f(initialState, {
|
|
3388
|
+
const [state, send] = $fe963b355347cc68$export$3e6543de14f8614f$1(initialState, {
|
|
3389
3389
|
mounted: {
|
|
3390
3390
|
UNMOUNT: 'unmounted',
|
|
3391
3391
|
ANIMATION_OUT: 'unmountSuspended'
|
|
@@ -3399,18 +3399,18 @@ $921a889cee6df7e8$export$99c2b779aa4e8b8b.displayName = 'Presence';
|
|
|
3399
3399
|
}
|
|
3400
3400
|
});
|
|
3401
3401
|
React.useEffect(()=>{
|
|
3402
|
-
const currentAnimationName = $921a889cee6df7e8$var$getAnimationName(stylesRef.current);
|
|
3402
|
+
const currentAnimationName = $921a889cee6df7e8$var$getAnimationName$1(stylesRef.current);
|
|
3403
3403
|
prevAnimationNameRef.current = state === 'mounted' ? currentAnimationName : 'none';
|
|
3404
3404
|
}, [
|
|
3405
3405
|
state
|
|
3406
3406
|
]);
|
|
3407
|
-
$9f79659886946c16$export$e5c5a5f917a5871c(()=>{
|
|
3407
|
+
$9f79659886946c16$export$e5c5a5f917a5871c$1(()=>{
|
|
3408
3408
|
const styles = stylesRef.current;
|
|
3409
3409
|
const wasPresent = prevPresentRef.current;
|
|
3410
3410
|
const hasPresentChanged = wasPresent !== present;
|
|
3411
3411
|
if (hasPresentChanged) {
|
|
3412
3412
|
const prevAnimationName = prevAnimationNameRef.current;
|
|
3413
|
-
const currentAnimationName = $921a889cee6df7e8$var$getAnimationName(styles);
|
|
3413
|
+
const currentAnimationName = $921a889cee6df7e8$var$getAnimationName$1(styles);
|
|
3414
3414
|
if (present) send('MOUNT');
|
|
3415
3415
|
else if (currentAnimationName === 'none' || (styles === null || styles === void 0 ? void 0 : styles.display) === 'none') // If there is no exit animation or the element is hidden, animations won't run
|
|
3416
3416
|
// so we unmount instantly
|
|
@@ -3431,14 +3431,14 @@ $921a889cee6df7e8$export$99c2b779aa4e8b8b.displayName = 'Presence';
|
|
|
3431
3431
|
present,
|
|
3432
3432
|
send
|
|
3433
3433
|
]);
|
|
3434
|
-
$9f79659886946c16$export$e5c5a5f917a5871c(()=>{
|
|
3434
|
+
$9f79659886946c16$export$e5c5a5f917a5871c$1(()=>{
|
|
3435
3435
|
if (node1) {
|
|
3436
3436
|
/**
|
|
3437
3437
|
* Triggering an ANIMATION_OUT during an ANIMATION_IN will fire an `animationcancel`
|
|
3438
3438
|
* event for ANIMATION_IN after we have entered `unmountSuspended` state. So, we
|
|
3439
3439
|
* make sure we only trigger ANIMATION_END for the currently active animation.
|
|
3440
3440
|
*/ const handleAnimationEnd = (event)=>{
|
|
3441
|
-
const currentAnimationName = $921a889cee6df7e8$var$getAnimationName(stylesRef.current);
|
|
3441
|
+
const currentAnimationName = $921a889cee6df7e8$var$getAnimationName$1(stylesRef.current);
|
|
3442
3442
|
const isCurrentAnimation = currentAnimationName.includes(event.animationName);
|
|
3443
3443
|
if (event.target === node1 && isCurrentAnimation) // With React 18 concurrency this update is applied
|
|
3444
3444
|
// a frame after the animation ends, creating a flash of visible content.
|
|
@@ -3448,7 +3448,7 @@ $921a889cee6df7e8$export$99c2b779aa4e8b8b.displayName = 'Presence';
|
|
|
3448
3448
|
};
|
|
3449
3449
|
const handleAnimationStart = (event)=>{
|
|
3450
3450
|
if (event.target === node1) // if animation occurred, store its name as the previous animation.
|
|
3451
|
-
prevAnimationNameRef.current = $921a889cee6df7e8$var$getAnimationName(stylesRef.current);
|
|
3451
|
+
prevAnimationNameRef.current = $921a889cee6df7e8$var$getAnimationName$1(stylesRef.current);
|
|
3452
3452
|
};
|
|
3453
3453
|
node1.addEventListener('animationstart', handleAnimationStart);
|
|
3454
3454
|
node1.addEventListener('animationcancel', handleAnimationEnd);
|
|
@@ -3476,18 +3476,18 @@ $921a889cee6df7e8$export$99c2b779aa4e8b8b.displayName = 'Presence';
|
|
|
3476
3476
|
}, [])
|
|
3477
3477
|
};
|
|
3478
3478
|
}
|
|
3479
|
-
/* -----------------------------------------------------------------------------------------------*/ function $921a889cee6df7e8$var$getAnimationName(styles) {
|
|
3479
|
+
/* -----------------------------------------------------------------------------------------------*/ function $921a889cee6df7e8$var$getAnimationName$1(styles) {
|
|
3480
3480
|
return (styles === null || styles === void 0 ? void 0 : styles.animationName) || 'none';
|
|
3481
3481
|
}
|
|
3482
3482
|
|
|
3483
|
-
function $71cd76cc60e0454e$export$6f32135080cb4c3({ prop: prop , defaultProp: defaultProp , onChange: onChange = ()=>{} }) {
|
|
3484
|
-
const [uncontrolledProp, setUncontrolledProp] = $71cd76cc60e0454e$var$useUncontrolledState({
|
|
3483
|
+
function $71cd76cc60e0454e$export$6f32135080cb4c3$1({ prop: prop , defaultProp: defaultProp , onChange: onChange = ()=>{} }) {
|
|
3484
|
+
const [uncontrolledProp, setUncontrolledProp] = $71cd76cc60e0454e$var$useUncontrolledState$1({
|
|
3485
3485
|
defaultProp: defaultProp,
|
|
3486
3486
|
onChange: onChange
|
|
3487
3487
|
});
|
|
3488
3488
|
const isControlled = prop !== undefined;
|
|
3489
3489
|
const value1 = isControlled ? prop : uncontrolledProp;
|
|
3490
|
-
const handleChange = $b1b2314f5f9a1d84$export$25bec8c6f54ee79a(onChange);
|
|
3490
|
+
const handleChange = $b1b2314f5f9a1d84$export$25bec8c6f54ee79a$1(onChange);
|
|
3491
3491
|
const setValue = React.useCallback((nextValue)=>{
|
|
3492
3492
|
if (isControlled) {
|
|
3493
3493
|
const setter = nextValue;
|
|
@@ -3505,11 +3505,11 @@ function $71cd76cc60e0454e$export$6f32135080cb4c3({ prop: prop , defaultProp: de
|
|
|
3505
3505
|
setValue
|
|
3506
3506
|
];
|
|
3507
3507
|
}
|
|
3508
|
-
function $71cd76cc60e0454e$var$useUncontrolledState({ defaultProp: defaultProp , onChange: onChange }) {
|
|
3508
|
+
function $71cd76cc60e0454e$var$useUncontrolledState$1({ defaultProp: defaultProp , onChange: onChange }) {
|
|
3509
3509
|
const uncontrolledState = React.useState(defaultProp);
|
|
3510
3510
|
const [value] = uncontrolledState;
|
|
3511
3511
|
const prevValueRef = React.useRef(value);
|
|
3512
|
-
const handleChange = $b1b2314f5f9a1d84$export$25bec8c6f54ee79a(onChange);
|
|
3512
|
+
const handleChange = $b1b2314f5f9a1d84$export$25bec8c6f54ee79a$1(onChange);
|
|
3513
3513
|
React.useEffect(()=>{
|
|
3514
3514
|
if (prevValueRef.current !== value) {
|
|
3515
3515
|
handleChange(value);
|
|
@@ -4361,22 +4361,22 @@ var $epM9y$RemoveScroll = ReactRemoveScroll;
|
|
|
4361
4361
|
/* -------------------------------------------------------------------------------------------------
|
|
4362
4362
|
* Popover
|
|
4363
4363
|
* -----------------------------------------------------------------------------------------------*/ const $cb5cc270b50c6fcd$var$POPOVER_NAME = 'Popover';
|
|
4364
|
-
const [$cb5cc270b50c6fcd$var$createPopoverContext, $cb5cc270b50c6fcd$export$c8393c9e73286932] = $c512c27ab02ef895$export$50c7b4e9d9f19c1($cb5cc270b50c6fcd$var$POPOVER_NAME, [
|
|
4365
|
-
$cf1ac5d9fe0e8206$export$722aac194ae923
|
|
4364
|
+
const [$cb5cc270b50c6fcd$var$createPopoverContext, $cb5cc270b50c6fcd$export$c8393c9e73286932] = $c512c27ab02ef895$export$50c7b4e9d9f19c1$1($cb5cc270b50c6fcd$var$POPOVER_NAME, [
|
|
4365
|
+
$cf1ac5d9fe0e8206$export$722aac194ae923$1
|
|
4366
4366
|
]);
|
|
4367
|
-
const $cb5cc270b50c6fcd$var$usePopperScope = $cf1ac5d9fe0e8206$export$722aac194ae923();
|
|
4367
|
+
const $cb5cc270b50c6fcd$var$usePopperScope = $cf1ac5d9fe0e8206$export$722aac194ae923$1();
|
|
4368
4368
|
const [$cb5cc270b50c6fcd$var$PopoverProvider, $cb5cc270b50c6fcd$var$usePopoverContext] = $cb5cc270b50c6fcd$var$createPopoverContext($cb5cc270b50c6fcd$var$POPOVER_NAME);
|
|
4369
4369
|
const $cb5cc270b50c6fcd$export$5b6b19405a83ff9d = (props)=>{
|
|
4370
4370
|
const { __scopePopover: __scopePopover , children: children , open: openProp , defaultOpen: defaultOpen , onOpenChange: onOpenChange , modal: modal = false } = props;
|
|
4371
4371
|
const popperScope = $cb5cc270b50c6fcd$var$usePopperScope(__scopePopover);
|
|
4372
4372
|
const triggerRef = React.useRef(null);
|
|
4373
4373
|
const [hasCustomAnchor, setHasCustomAnchor] = React.useState(false);
|
|
4374
|
-
const [open = false, setOpen] = $71cd76cc60e0454e$export$6f32135080cb4c3({
|
|
4374
|
+
const [open = false, setOpen] = $71cd76cc60e0454e$export$6f32135080cb4c3$1({
|
|
4375
4375
|
prop: openProp,
|
|
4376
4376
|
defaultProp: defaultOpen,
|
|
4377
4377
|
onChange: onOpenChange
|
|
4378
4378
|
});
|
|
4379
|
-
return /*#__PURE__*/ React.createElement($cf1ac5d9fe0e8206$export$be92b6f5f03c0fe9, popperScope, /*#__PURE__*/ React.createElement($cb5cc270b50c6fcd$var$PopoverProvider, {
|
|
4379
|
+
return /*#__PURE__*/ React.createElement($cf1ac5d9fe0e8206$export$be92b6f5f03c0fe9$1, popperScope, /*#__PURE__*/ React.createElement($cb5cc270b50c6fcd$var$PopoverProvider, {
|
|
4380
4380
|
scope: __scopePopover,
|
|
4381
4381
|
contentId: $1746a345f3d73bb7$export$f680877a34711e37(),
|
|
4382
4382
|
triggerRef: triggerRef,
|
|
@@ -4395,6 +4395,26 @@ const $cb5cc270b50c6fcd$export$5b6b19405a83ff9d = (props)=>{
|
|
|
4395
4395
|
modal: modal
|
|
4396
4396
|
}, children));
|
|
4397
4397
|
};
|
|
4398
|
+
/* -------------------------------------------------------------------------------------------------
|
|
4399
|
+
* PopoverAnchor
|
|
4400
|
+
* -----------------------------------------------------------------------------------------------*/ const $cb5cc270b50c6fcd$var$ANCHOR_NAME = 'PopoverAnchor';
|
|
4401
|
+
const $cb5cc270b50c6fcd$export$96e5381f42521a79 = /*#__PURE__*/ React.forwardRef((props, forwardedRef)=>{
|
|
4402
|
+
const { __scopePopover: __scopePopover , ...anchorProps } = props;
|
|
4403
|
+
const context = $cb5cc270b50c6fcd$var$usePopoverContext($cb5cc270b50c6fcd$var$ANCHOR_NAME, __scopePopover);
|
|
4404
|
+
const popperScope = $cb5cc270b50c6fcd$var$usePopperScope(__scopePopover);
|
|
4405
|
+
const { onCustomAnchorAdd: onCustomAnchorAdd , onCustomAnchorRemove: onCustomAnchorRemove } = context;
|
|
4406
|
+
React.useEffect(()=>{
|
|
4407
|
+
onCustomAnchorAdd();
|
|
4408
|
+
return ()=>onCustomAnchorRemove()
|
|
4409
|
+
;
|
|
4410
|
+
}, [
|
|
4411
|
+
onCustomAnchorAdd,
|
|
4412
|
+
onCustomAnchorRemove
|
|
4413
|
+
]);
|
|
4414
|
+
return /*#__PURE__*/ React.createElement($cf1ac5d9fe0e8206$export$b688253958b8dfe7$1, _extends({}, popperScope, anchorProps, {
|
|
4415
|
+
ref: forwardedRef
|
|
4416
|
+
}));
|
|
4417
|
+
});
|
|
4398
4418
|
/* -------------------------------------------------------------------------------------------------
|
|
4399
4419
|
* PopoverTrigger
|
|
4400
4420
|
* -----------------------------------------------------------------------------------------------*/ const $cb5cc270b50c6fcd$var$TRIGGER_NAME = 'PopoverTrigger';
|
|
@@ -4402,8 +4422,8 @@ const $cb5cc270b50c6fcd$export$7dacb05d26466c3 = /*#__PURE__*/ React.forwardRef(
|
|
|
4402
4422
|
const { __scopePopover: __scopePopover , ...triggerProps } = props;
|
|
4403
4423
|
const context = $cb5cc270b50c6fcd$var$usePopoverContext($cb5cc270b50c6fcd$var$TRIGGER_NAME, __scopePopover);
|
|
4404
4424
|
const popperScope = $cb5cc270b50c6fcd$var$usePopperScope(__scopePopover);
|
|
4405
|
-
const composedTriggerRef = $6ed0406888f73fc4$export$c7b2cbe3552a0d05(forwardedRef, context.triggerRef);
|
|
4406
|
-
const trigger = /*#__PURE__*/ React.createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.button, _extends({
|
|
4425
|
+
const composedTriggerRef = $6ed0406888f73fc4$export$c7b2cbe3552a0d05$1(forwardedRef, context.triggerRef);
|
|
4426
|
+
const trigger = /*#__PURE__*/ React.createElement($8927f6f2acc4f386$export$250ffa63cdc0d034$1.button, _extends({
|
|
4407
4427
|
type: "button",
|
|
4408
4428
|
"aria-haspopup": "dialog",
|
|
4409
4429
|
"aria-expanded": context.open,
|
|
@@ -4411,9 +4431,9 @@ const $cb5cc270b50c6fcd$export$7dacb05d26466c3 = /*#__PURE__*/ React.forwardRef(
|
|
|
4411
4431
|
"data-state": $cb5cc270b50c6fcd$var$getState(context.open)
|
|
4412
4432
|
}, triggerProps, {
|
|
4413
4433
|
ref: composedTriggerRef,
|
|
4414
|
-
onClick: $e42e1063c40fb3ef$export$b9ecd428b558ff10(props.onClick, context.onOpenToggle)
|
|
4434
|
+
onClick: $e42e1063c40fb3ef$export$b9ecd428b558ff10$1(props.onClick, context.onOpenToggle)
|
|
4415
4435
|
}));
|
|
4416
|
-
return context.hasCustomAnchor ? trigger : /*#__PURE__*/ React.createElement($cf1ac5d9fe0e8206$export$b688253958b8dfe7, _extends({
|
|
4436
|
+
return context.hasCustomAnchor ? trigger : /*#__PURE__*/ React.createElement($cf1ac5d9fe0e8206$export$b688253958b8dfe7$1, _extends({
|
|
4417
4437
|
asChild: true
|
|
4418
4438
|
}, popperScope), trigger);
|
|
4419
4439
|
});
|
|
@@ -4423,6 +4443,19 @@ const $cb5cc270b50c6fcd$export$7dacb05d26466c3 = /*#__PURE__*/ React.forwardRef(
|
|
|
4423
4443
|
const [$cb5cc270b50c6fcd$var$PortalProvider, $cb5cc270b50c6fcd$var$usePortalContext] = $cb5cc270b50c6fcd$var$createPopoverContext($cb5cc270b50c6fcd$var$PORTAL_NAME, {
|
|
4424
4444
|
forceMount: undefined
|
|
4425
4445
|
});
|
|
4446
|
+
const $cb5cc270b50c6fcd$export$dd679ffb4362d2d4 = (props)=>{
|
|
4447
|
+
const { __scopePopover: __scopePopover , forceMount: forceMount , children: children , container: container } = props;
|
|
4448
|
+
const context = $cb5cc270b50c6fcd$var$usePopoverContext($cb5cc270b50c6fcd$var$PORTAL_NAME, __scopePopover);
|
|
4449
|
+
return /*#__PURE__*/ React.createElement($cb5cc270b50c6fcd$var$PortalProvider, {
|
|
4450
|
+
scope: __scopePopover,
|
|
4451
|
+
forceMount: forceMount
|
|
4452
|
+
}, /*#__PURE__*/ React.createElement($921a889cee6df7e8$export$99c2b779aa4e8b8b$1, {
|
|
4453
|
+
present: forceMount || context.open
|
|
4454
|
+
}, /*#__PURE__*/ React.createElement($f1701beae083dbae$export$602eac185826482c$1, {
|
|
4455
|
+
asChild: true,
|
|
4456
|
+
container: container
|
|
4457
|
+
}, children)));
|
|
4458
|
+
};
|
|
4426
4459
|
/* -------------------------------------------------------------------------------------------------
|
|
4427
4460
|
* PopoverContent
|
|
4428
4461
|
* -----------------------------------------------------------------------------------------------*/ const $cb5cc270b50c6fcd$var$CONTENT_NAME = 'PopoverContent';
|
|
@@ -4430,7 +4463,7 @@ const $cb5cc270b50c6fcd$export$d7e1f420b25549ff = /*#__PURE__*/ React.forwardRef
|
|
|
4430
4463
|
const portalContext = $cb5cc270b50c6fcd$var$usePortalContext($cb5cc270b50c6fcd$var$CONTENT_NAME, props.__scopePopover);
|
|
4431
4464
|
const { forceMount: forceMount = portalContext.forceMount , ...contentProps } = props;
|
|
4432
4465
|
const context = $cb5cc270b50c6fcd$var$usePopoverContext($cb5cc270b50c6fcd$var$CONTENT_NAME, props.__scopePopover);
|
|
4433
|
-
return /*#__PURE__*/ React.createElement($921a889cee6df7e8$export$99c2b779aa4e8b8b, {
|
|
4466
|
+
return /*#__PURE__*/ React.createElement($921a889cee6df7e8$export$99c2b779aa4e8b8b$1, {
|
|
4434
4467
|
present: forceMount || context.open
|
|
4435
4468
|
}, context.modal ? /*#__PURE__*/ React.createElement($cb5cc270b50c6fcd$var$PopoverContentModal, _extends({}, contentProps, {
|
|
4436
4469
|
ref: forwardedRef
|
|
@@ -4441,26 +4474,26 @@ const $cb5cc270b50c6fcd$export$d7e1f420b25549ff = /*#__PURE__*/ React.forwardRef
|
|
|
4441
4474
|
/* -----------------------------------------------------------------------------------------------*/ const $cb5cc270b50c6fcd$var$PopoverContentModal = /*#__PURE__*/ React.forwardRef((props, forwardedRef)=>{
|
|
4442
4475
|
const context = $cb5cc270b50c6fcd$var$usePopoverContext($cb5cc270b50c6fcd$var$CONTENT_NAME, props.__scopePopover);
|
|
4443
4476
|
const contentRef = React.useRef(null);
|
|
4444
|
-
const composedRefs = $6ed0406888f73fc4$export$c7b2cbe3552a0d05(forwardedRef, contentRef);
|
|
4477
|
+
const composedRefs = $6ed0406888f73fc4$export$c7b2cbe3552a0d05$1(forwardedRef, contentRef);
|
|
4445
4478
|
const isRightClickOutsideRef = React.useRef(false); // aria-hide everything except the content (better supported equivalent to setting aria-modal)
|
|
4446
4479
|
React.useEffect(()=>{
|
|
4447
4480
|
const content = contentRef.current;
|
|
4448
4481
|
if (content) return hideOthers(content);
|
|
4449
4482
|
}, []);
|
|
4450
4483
|
return /*#__PURE__*/ React.createElement($epM9y$RemoveScroll, {
|
|
4451
|
-
as: $5e63c961fc1ce211$export$8c6ed5c666ac1360,
|
|
4484
|
+
as: $5e63c961fc1ce211$export$8c6ed5c666ac1360$1,
|
|
4452
4485
|
allowPinchZoom: true
|
|
4453
4486
|
}, /*#__PURE__*/ React.createElement($cb5cc270b50c6fcd$var$PopoverContentImpl, _extends({}, props, {
|
|
4454
4487
|
ref: composedRefs // we make sure we're not trapping once it's been closed
|
|
4455
4488
|
,
|
|
4456
4489
|
trapFocus: context.open,
|
|
4457
4490
|
disableOutsidePointerEvents: true,
|
|
4458
|
-
onCloseAutoFocus: $e42e1063c40fb3ef$export$b9ecd428b558ff10(props.onCloseAutoFocus, (event)=>{
|
|
4491
|
+
onCloseAutoFocus: $e42e1063c40fb3ef$export$b9ecd428b558ff10$1(props.onCloseAutoFocus, (event)=>{
|
|
4459
4492
|
var _context$triggerRef$c;
|
|
4460
4493
|
event.preventDefault();
|
|
4461
4494
|
if (!isRightClickOutsideRef.current) (_context$triggerRef$c = context.triggerRef.current) === null || _context$triggerRef$c === void 0 || _context$triggerRef$c.focus();
|
|
4462
4495
|
}),
|
|
4463
|
-
onPointerDownOutside: $e42e1063c40fb3ef$export$b9ecd428b558ff10(props.onPointerDownOutside, (event)=>{
|
|
4496
|
+
onPointerDownOutside: $e42e1063c40fb3ef$export$b9ecd428b558ff10$1(props.onPointerDownOutside, (event)=>{
|
|
4464
4497
|
const originalEvent = event.detail.originalEvent;
|
|
4465
4498
|
const ctrlLeftClick = originalEvent.button === 0 && originalEvent.ctrlKey === true;
|
|
4466
4499
|
const isRightClick = originalEvent.button === 2 || ctrlLeftClick;
|
|
@@ -4469,7 +4502,7 @@ const $cb5cc270b50c6fcd$export$d7e1f420b25549ff = /*#__PURE__*/ React.forwardRef
|
|
|
4469
4502
|
checkForDefaultPrevented: false
|
|
4470
4503
|
}) // When focus is trapped, a `focusout` event may still happen.
|
|
4471
4504
|
,
|
|
4472
|
-
onFocusOutside: $e42e1063c40fb3ef$export$b9ecd428b558ff10(props.onFocusOutside, (event)=>event.preventDefault()
|
|
4505
|
+
onFocusOutside: $e42e1063c40fb3ef$export$b9ecd428b558ff10$1(props.onFocusOutside, (event)=>event.preventDefault()
|
|
4473
4506
|
, {
|
|
4474
4507
|
checkForDefaultPrevented: false
|
|
4475
4508
|
})
|
|
@@ -4525,7 +4558,7 @@ const $cb5cc270b50c6fcd$var$PopoverContentNonModal = /*#__PURE__*/ React.forward
|
|
|
4525
4558
|
trapped: trapFocus,
|
|
4526
4559
|
onMountAutoFocus: onOpenAutoFocus,
|
|
4527
4560
|
onUnmountAutoFocus: onCloseAutoFocus
|
|
4528
|
-
}, /*#__PURE__*/ React.createElement($5cb92bef7577960e$export$177fb62ff3ec1f22, {
|
|
4561
|
+
}, /*#__PURE__*/ React.createElement($5cb92bef7577960e$export$177fb62ff3ec1f22$1, {
|
|
4529
4562
|
asChild: true,
|
|
4530
4563
|
disableOutsidePointerEvents: disableOutsidePointerEvents,
|
|
4531
4564
|
onInteractOutside: onInteractOutside,
|
|
@@ -4533,7 +4566,7 @@ const $cb5cc270b50c6fcd$var$PopoverContentNonModal = /*#__PURE__*/ React.forward
|
|
|
4533
4566
|
onPointerDownOutside: onPointerDownOutside,
|
|
4534
4567
|
onFocusOutside: onFocusOutside,
|
|
4535
4568
|
onDismiss: ()=>context.onOpenChange(false)
|
|
4536
|
-
}, /*#__PURE__*/ React.createElement($cf1ac5d9fe0e8206$export$7c6e2c02157bb7d2, _extends({
|
|
4569
|
+
}, /*#__PURE__*/ React.createElement($cf1ac5d9fe0e8206$export$7c6e2c02157bb7d2$1, _extends({
|
|
4537
4570
|
"data-state": $cb5cc270b50c6fcd$var$getState(context.open),
|
|
4538
4571
|
role: "dialog",
|
|
4539
4572
|
id: context.contentId
|
|
@@ -4549,10 +4582,24 @@ const $cb5cc270b50c6fcd$var$PopoverContentNonModal = /*#__PURE__*/ React.forward
|
|
|
4549
4582
|
}
|
|
4550
4583
|
}))));
|
|
4551
4584
|
});
|
|
4585
|
+
/* -------------------------------------------------------------------------------------------------
|
|
4586
|
+
* PopoverClose
|
|
4587
|
+
* -----------------------------------------------------------------------------------------------*/ const $cb5cc270b50c6fcd$var$CLOSE_NAME = 'PopoverClose';
|
|
4588
|
+
const $cb5cc270b50c6fcd$export$d6ac43ebaa40d53e = /*#__PURE__*/ React.forwardRef((props, forwardedRef)=>{
|
|
4589
|
+
const { __scopePopover: __scopePopover , ...closeProps } = props;
|
|
4590
|
+
const context = $cb5cc270b50c6fcd$var$usePopoverContext($cb5cc270b50c6fcd$var$CLOSE_NAME, __scopePopover);
|
|
4591
|
+
return /*#__PURE__*/ React.createElement($8927f6f2acc4f386$export$250ffa63cdc0d034$1.button, _extends({
|
|
4592
|
+
type: "button"
|
|
4593
|
+
}, closeProps, {
|
|
4594
|
+
ref: forwardedRef,
|
|
4595
|
+
onClick: $e42e1063c40fb3ef$export$b9ecd428b558ff10$1(props.onClick, ()=>context.onOpenChange(false)
|
|
4596
|
+
)
|
|
4597
|
+
}));
|
|
4598
|
+
});
|
|
4552
4599
|
const $cb5cc270b50c6fcd$export$3152841115e061b2 = /*#__PURE__*/ React.forwardRef((props, forwardedRef)=>{
|
|
4553
4600
|
const { __scopePopover: __scopePopover , ...arrowProps } = props;
|
|
4554
4601
|
const popperScope = $cb5cc270b50c6fcd$var$usePopperScope(__scopePopover);
|
|
4555
|
-
return /*#__PURE__*/ React.createElement($cf1ac5d9fe0e8206$export$21b07c8f274aebd5, _extends({}, popperScope, arrowProps, {
|
|
4602
|
+
return /*#__PURE__*/ React.createElement($cf1ac5d9fe0e8206$export$21b07c8f274aebd5$1, _extends({}, popperScope, arrowProps, {
|
|
4556
4603
|
ref: forwardedRef
|
|
4557
4604
|
}));
|
|
4558
4605
|
});
|
|
@@ -4560,10 +4607,32 @@ const $cb5cc270b50c6fcd$export$3152841115e061b2 = /*#__PURE__*/ React.forwardRef
|
|
|
4560
4607
|
return open ? 'open' : 'closed';
|
|
4561
4608
|
}
|
|
4562
4609
|
const $cb5cc270b50c6fcd$export$be92b6f5f03c0fe9 = $cb5cc270b50c6fcd$export$5b6b19405a83ff9d;
|
|
4610
|
+
const $cb5cc270b50c6fcd$export$b688253958b8dfe7 = $cb5cc270b50c6fcd$export$96e5381f42521a79;
|
|
4563
4611
|
const $cb5cc270b50c6fcd$export$41fb9f06171c75f4 = $cb5cc270b50c6fcd$export$7dacb05d26466c3;
|
|
4612
|
+
const $cb5cc270b50c6fcd$export$602eac185826482c = $cb5cc270b50c6fcd$export$dd679ffb4362d2d4;
|
|
4564
4613
|
const $cb5cc270b50c6fcd$export$7c6e2c02157bb7d2 = $cb5cc270b50c6fcd$export$d7e1f420b25549ff;
|
|
4614
|
+
const $cb5cc270b50c6fcd$export$f39c2d165cd861fe = $cb5cc270b50c6fcd$export$d6ac43ebaa40d53e;
|
|
4565
4615
|
const $cb5cc270b50c6fcd$export$21b07c8f274aebd5 = $cb5cc270b50c6fcd$export$3152841115e061b2;
|
|
4566
4616
|
|
|
4617
|
+
var PopoverPrimitive = /*#__PURE__*/Object.freeze({
|
|
4618
|
+
__proto__: null,
|
|
4619
|
+
Anchor: $cb5cc270b50c6fcd$export$b688253958b8dfe7,
|
|
4620
|
+
Arrow: $cb5cc270b50c6fcd$export$21b07c8f274aebd5,
|
|
4621
|
+
Close: $cb5cc270b50c6fcd$export$f39c2d165cd861fe,
|
|
4622
|
+
Content: $cb5cc270b50c6fcd$export$7c6e2c02157bb7d2,
|
|
4623
|
+
Popover: $cb5cc270b50c6fcd$export$5b6b19405a83ff9d,
|
|
4624
|
+
PopoverAnchor: $cb5cc270b50c6fcd$export$96e5381f42521a79,
|
|
4625
|
+
PopoverArrow: $cb5cc270b50c6fcd$export$3152841115e061b2,
|
|
4626
|
+
PopoverClose: $cb5cc270b50c6fcd$export$d6ac43ebaa40d53e,
|
|
4627
|
+
PopoverContent: $cb5cc270b50c6fcd$export$d7e1f420b25549ff,
|
|
4628
|
+
PopoverPortal: $cb5cc270b50c6fcd$export$dd679ffb4362d2d4,
|
|
4629
|
+
PopoverTrigger: $cb5cc270b50c6fcd$export$7dacb05d26466c3,
|
|
4630
|
+
Portal: $cb5cc270b50c6fcd$export$602eac185826482c,
|
|
4631
|
+
Root: $cb5cc270b50c6fcd$export$be92b6f5f03c0fe9,
|
|
4632
|
+
Trigger: $cb5cc270b50c6fcd$export$41fb9f06171c75f4,
|
|
4633
|
+
createPopoverScope: $cb5cc270b50c6fcd$export$c8393c9e73286932
|
|
4634
|
+
});
|
|
4635
|
+
|
|
4567
4636
|
const borderStyles$3 = [
|
|
4568
4637
|
'tw-border-solid',
|
|
4569
4638
|
'tw-border',
|
|
@@ -6570,7 +6639,7 @@ const QTip = () => {
|
|
|
6570
6639
|
if (tooltipRef.current && tooltipTarget.current) {
|
|
6571
6640
|
computePosition(tooltipTarget.current, tooltipRef.current, {
|
|
6572
6641
|
placement: position,
|
|
6573
|
-
middleware: [offset(10), arrow$
|
|
6642
|
+
middleware: [offset(10), arrow$2({ element: tooltipArrowRef.current })],
|
|
6574
6643
|
}).then(({ x, y, middlewareData }) => {
|
|
6575
6644
|
Object.assign(tooltipRef.current?.style, {
|
|
6576
6645
|
left: `${x}px`,
|
|
@@ -9562,7 +9631,7 @@ function _taggedTemplateLiteral(strings, raw) {
|
|
|
9562
9631
|
}));
|
|
9563
9632
|
}
|
|
9564
9633
|
|
|
9565
|
-
var index = React.useLayoutEffect ;
|
|
9634
|
+
var index$1 = React.useLayoutEffect ;
|
|
9566
9635
|
|
|
9567
9636
|
var _excluded$3 = ["className", "clearValue", "cx", "getStyles", "getClassNames", "getValue", "hasValue", "isMulti", "isRtl", "options", "selectOption", "selectProps", "setValue", "theme"];
|
|
9568
9637
|
// ==============================
|
|
@@ -9816,10 +9885,10 @@ var options = {
|
|
|
9816
9885
|
}
|
|
9817
9886
|
};
|
|
9818
9887
|
// check for SSR
|
|
9819
|
-
var w = typeof window !== 'undefined' ? window : {};
|
|
9820
|
-
if (w.addEventListener && w.removeEventListener) {
|
|
9821
|
-
w.addEventListener('p', noop, options);
|
|
9822
|
-
w.removeEventListener('p', noop, false);
|
|
9888
|
+
var w$1 = typeof window !== 'undefined' ? window : {};
|
|
9889
|
+
if (w$1.addEventListener && w$1.removeEventListener) {
|
|
9890
|
+
w$1.addEventListener('p', noop, options);
|
|
9891
|
+
w$1.removeEventListener('p', noop, false);
|
|
9823
9892
|
}
|
|
9824
9893
|
var supportsPassiveEvents = passiveOptionAccessed;
|
|
9825
9894
|
function notNullish(item) {
|
|
@@ -10061,7 +10130,7 @@ var MenuPlacer = function MenuPlacer(props) {
|
|
|
10061
10130
|
placement = _useState4[0],
|
|
10062
10131
|
setPlacement = _useState4[1];
|
|
10063
10132
|
var controlHeight = theme.spacing.controlHeight;
|
|
10064
|
-
index(function () {
|
|
10133
|
+
index$1(function () {
|
|
10065
10134
|
var menuEl = ref.current;
|
|
10066
10135
|
if (!menuEl) return;
|
|
10067
10136
|
|
|
@@ -10222,7 +10291,7 @@ var MenuPortal = function MenuPortal(props) {
|
|
|
10222
10291
|
});
|
|
10223
10292
|
}
|
|
10224
10293
|
}, [controlElement, menuPosition, placement, computedPosition === null || computedPosition === void 0 ? void 0 : computedPosition.offset, computedPosition === null || computedPosition === void 0 ? void 0 : computedPosition.rect.left, computedPosition === null || computedPosition === void 0 ? void 0 : computedPosition.rect.width]);
|
|
10225
|
-
index(function () {
|
|
10294
|
+
index$1(function () {
|
|
10226
10295
|
updateComputedPosition();
|
|
10227
10296
|
}, [updateComputedPosition]);
|
|
10228
10297
|
var runAutoUpdate = React.useCallback(function () {
|
|
@@ -10236,7 +10305,7 @@ var MenuPortal = function MenuPortal(props) {
|
|
|
10236
10305
|
});
|
|
10237
10306
|
}
|
|
10238
10307
|
}, [controlElement, updateComputedPosition]);
|
|
10239
|
-
index(function () {
|
|
10308
|
+
index$1(function () {
|
|
10240
10309
|
runAutoUpdate();
|
|
10241
10310
|
}, [runAutoUpdate]);
|
|
10242
10311
|
var setMenuPortalElement = React.useCallback(function (menuPortalElement) {
|
|
@@ -11436,8 +11505,8 @@ var anyDiacritic = new RegExp('[' + diacritics.map(function (d) {
|
|
|
11436
11505
|
return d.letters;
|
|
11437
11506
|
}).join('') + ']', 'g');
|
|
11438
11507
|
var diacriticToBase = {};
|
|
11439
|
-
for (var i = 0; i < diacritics.length; i++) {
|
|
11440
|
-
var diacritic = diacritics[i];
|
|
11508
|
+
for (var i$2 = 0; i$2 < diacritics.length; i$2++) {
|
|
11509
|
+
var diacritic = diacritics[i$2];
|
|
11441
11510
|
for (var j = 0; j < diacritic.letters.length; j++) {
|
|
11442
11511
|
diacriticToBase[diacritic.letters[j]] = diacritic.base;
|
|
11443
11512
|
}
|
|
@@ -13780,13 +13849,13 @@ const Select = ({ options, value, placeholder = 'select', noOptionsMessage = 'no
|
|
|
13780
13849
|
/* -------------------------------------------------------------------------------------------------
|
|
13781
13850
|
* Dialog
|
|
13782
13851
|
* -----------------------------------------------------------------------------------------------*/ const $5d3850c4d0b4e6c7$var$DIALOG_NAME = 'Dialog';
|
|
13783
|
-
const [$5d3850c4d0b4e6c7$var$createDialogContext, $5d3850c4d0b4e6c7$export$cc702773b8ea3e41] = $c512c27ab02ef895$export$50c7b4e9d9f19c1($5d3850c4d0b4e6c7$var$DIALOG_NAME);
|
|
13852
|
+
const [$5d3850c4d0b4e6c7$var$createDialogContext, $5d3850c4d0b4e6c7$export$cc702773b8ea3e41] = $c512c27ab02ef895$export$50c7b4e9d9f19c1$1($5d3850c4d0b4e6c7$var$DIALOG_NAME);
|
|
13784
13853
|
const [$5d3850c4d0b4e6c7$var$DialogProvider, $5d3850c4d0b4e6c7$var$useDialogContext] = $5d3850c4d0b4e6c7$var$createDialogContext($5d3850c4d0b4e6c7$var$DIALOG_NAME);
|
|
13785
13854
|
const $5d3850c4d0b4e6c7$export$3ddf2d174ce01153 = (props)=>{
|
|
13786
13855
|
const { __scopeDialog: __scopeDialog , children: children , open: openProp , defaultOpen: defaultOpen , onOpenChange: onOpenChange , modal: modal = true } = props;
|
|
13787
13856
|
const triggerRef = React.useRef(null);
|
|
13788
13857
|
const contentRef = React.useRef(null);
|
|
13789
|
-
const [open = false, setOpen] = $71cd76cc60e0454e$export$6f32135080cb4c3({
|
|
13858
|
+
const [open = false, setOpen] = $71cd76cc60e0454e$export$6f32135080cb4c3$1({
|
|
13790
13859
|
prop: openProp,
|
|
13791
13860
|
defaultProp: defaultOpen,
|
|
13792
13861
|
onChange: onOpenChange
|
|
@@ -13820,9 +13889,9 @@ const $5d3850c4d0b4e6c7$export$dad7c95542bacce0 = (props)=>{
|
|
|
13820
13889
|
return /*#__PURE__*/ React.createElement($5d3850c4d0b4e6c7$var$PortalProvider, {
|
|
13821
13890
|
scope: __scopeDialog,
|
|
13822
13891
|
forceMount: forceMount
|
|
13823
|
-
}, React.Children.map(children, (child)=>/*#__PURE__*/ React.createElement($921a889cee6df7e8$export$99c2b779aa4e8b8b, {
|
|
13892
|
+
}, React.Children.map(children, (child)=>/*#__PURE__*/ React.createElement($921a889cee6df7e8$export$99c2b779aa4e8b8b$1, {
|
|
13824
13893
|
present: forceMount || context.open
|
|
13825
|
-
}, /*#__PURE__*/ React.createElement($f1701beae083dbae$export$602eac185826482c, {
|
|
13894
|
+
}, /*#__PURE__*/ React.createElement($f1701beae083dbae$export$602eac185826482c$1, {
|
|
13826
13895
|
asChild: true,
|
|
13827
13896
|
container: container
|
|
13828
13897
|
}, child))
|
|
@@ -13835,7 +13904,7 @@ const $5d3850c4d0b4e6c7$export$b6d9565de1e068cf = /*#__PURE__*/ React.forwardRef
|
|
|
13835
13904
|
const portalContext = $5d3850c4d0b4e6c7$var$usePortalContext($5d3850c4d0b4e6c7$var$CONTENT_NAME, props.__scopeDialog);
|
|
13836
13905
|
const { forceMount: forceMount = portalContext.forceMount , ...contentProps } = props;
|
|
13837
13906
|
const context = $5d3850c4d0b4e6c7$var$useDialogContext($5d3850c4d0b4e6c7$var$CONTENT_NAME, props.__scopeDialog);
|
|
13838
|
-
return /*#__PURE__*/ React.createElement($921a889cee6df7e8$export$99c2b779aa4e8b8b, {
|
|
13907
|
+
return /*#__PURE__*/ React.createElement($921a889cee6df7e8$export$99c2b779aa4e8b8b$1, {
|
|
13839
13908
|
present: forceMount || context.open
|
|
13840
13909
|
}, context.modal ? /*#__PURE__*/ React.createElement($5d3850c4d0b4e6c7$var$DialogContentModal, _extends({}, contentProps, {
|
|
13841
13910
|
ref: forwardedRef
|
|
@@ -13846,7 +13915,7 @@ const $5d3850c4d0b4e6c7$export$b6d9565de1e068cf = /*#__PURE__*/ React.forwardRef
|
|
|
13846
13915
|
/* -----------------------------------------------------------------------------------------------*/ const $5d3850c4d0b4e6c7$var$DialogContentModal = /*#__PURE__*/ React.forwardRef((props, forwardedRef)=>{
|
|
13847
13916
|
const context = $5d3850c4d0b4e6c7$var$useDialogContext($5d3850c4d0b4e6c7$var$CONTENT_NAME, props.__scopeDialog);
|
|
13848
13917
|
const contentRef = React.useRef(null);
|
|
13849
|
-
const composedRefs = $6ed0406888f73fc4$export$c7b2cbe3552a0d05(forwardedRef, context.contentRef, contentRef); // aria-hide everything except the content (better supported equivalent to setting aria-modal)
|
|
13918
|
+
const composedRefs = $6ed0406888f73fc4$export$c7b2cbe3552a0d05$1(forwardedRef, context.contentRef, contentRef); // aria-hide everything except the content (better supported equivalent to setting aria-modal)
|
|
13850
13919
|
React.useEffect(()=>{
|
|
13851
13920
|
const content = contentRef.current;
|
|
13852
13921
|
if (content) return hideOthers(content);
|
|
@@ -13856,12 +13925,12 @@ const $5d3850c4d0b4e6c7$export$b6d9565de1e068cf = /*#__PURE__*/ React.forwardRef
|
|
|
13856
13925
|
,
|
|
13857
13926
|
trapFocus: context.open,
|
|
13858
13927
|
disableOutsidePointerEvents: true,
|
|
13859
|
-
onCloseAutoFocus: $e42e1063c40fb3ef$export$b9ecd428b558ff10(props.onCloseAutoFocus, (event)=>{
|
|
13928
|
+
onCloseAutoFocus: $e42e1063c40fb3ef$export$b9ecd428b558ff10$1(props.onCloseAutoFocus, (event)=>{
|
|
13860
13929
|
var _context$triggerRef$c;
|
|
13861
13930
|
event.preventDefault();
|
|
13862
13931
|
(_context$triggerRef$c = context.triggerRef.current) === null || _context$triggerRef$c === void 0 || _context$triggerRef$c.focus();
|
|
13863
13932
|
}),
|
|
13864
|
-
onPointerDownOutside: $e42e1063c40fb3ef$export$b9ecd428b558ff10(props.onPointerDownOutside, (event)=>{
|
|
13933
|
+
onPointerDownOutside: $e42e1063c40fb3ef$export$b9ecd428b558ff10$1(props.onPointerDownOutside, (event)=>{
|
|
13865
13934
|
const originalEvent = event.detail.originalEvent;
|
|
13866
13935
|
const ctrlLeftClick = originalEvent.button === 0 && originalEvent.ctrlKey === true;
|
|
13867
13936
|
const isRightClick = originalEvent.button === 2 || ctrlLeftClick; // If the event is a right-click, we shouldn't close because
|
|
@@ -13869,7 +13938,7 @@ const $5d3850c4d0b4e6c7$export$b6d9565de1e068cf = /*#__PURE__*/ React.forwardRef
|
|
|
13869
13938
|
if (isRightClick) event.preventDefault();
|
|
13870
13939
|
}) // When focus is trapped, a `focusout` event may still happen.
|
|
13871
13940
|
,
|
|
13872
|
-
onFocusOutside: $e42e1063c40fb3ef$export$b9ecd428b558ff10(props.onFocusOutside, (event)=>event.preventDefault()
|
|
13941
|
+
onFocusOutside: $e42e1063c40fb3ef$export$b9ecd428b558ff10$1(props.onFocusOutside, (event)=>event.preventDefault()
|
|
13873
13942
|
)
|
|
13874
13943
|
}));
|
|
13875
13944
|
});
|
|
@@ -13915,7 +13984,7 @@ const $5d3850c4d0b4e6c7$export$b6d9565de1e068cf = /*#__PURE__*/ React.forwardRef
|
|
|
13915
13984
|
const { __scopeDialog: __scopeDialog , trapFocus: trapFocus , onOpenAutoFocus: onOpenAutoFocus , onCloseAutoFocus: onCloseAutoFocus , ...contentProps } = props;
|
|
13916
13985
|
const context = $5d3850c4d0b4e6c7$var$useDialogContext($5d3850c4d0b4e6c7$var$CONTENT_NAME, __scopeDialog);
|
|
13917
13986
|
const contentRef = React.useRef(null);
|
|
13918
|
-
const composedRefs = $6ed0406888f73fc4$export$c7b2cbe3552a0d05(forwardedRef, contentRef); // Make sure the whole tree has focus guards as our `Dialog` will be
|
|
13987
|
+
const composedRefs = $6ed0406888f73fc4$export$c7b2cbe3552a0d05$1(forwardedRef, contentRef); // Make sure the whole tree has focus guards as our `Dialog` will be
|
|
13919
13988
|
// the last element in the DOM (beacuse of the `Portal`)
|
|
13920
13989
|
$3db38b7d1fb3fe6a$export$b7ece24a22aeda8c();
|
|
13921
13990
|
return /*#__PURE__*/ React.createElement(React.Fragment, null, /*#__PURE__*/ React.createElement($d3863c46a17e8a28$export$20e40289641fbbb6, {
|
|
@@ -13924,7 +13993,7 @@ const $5d3850c4d0b4e6c7$export$b6d9565de1e068cf = /*#__PURE__*/ React.forwardRef
|
|
|
13924
13993
|
trapped: trapFocus,
|
|
13925
13994
|
onMountAutoFocus: onOpenAutoFocus,
|
|
13926
13995
|
onUnmountAutoFocus: onCloseAutoFocus
|
|
13927
|
-
}, /*#__PURE__*/ React.createElement($5cb92bef7577960e$export$177fb62ff3ec1f22, _extends({
|
|
13996
|
+
}, /*#__PURE__*/ React.createElement($5cb92bef7577960e$export$177fb62ff3ec1f22$1, _extends({
|
|
13928
13997
|
role: "dialog",
|
|
13929
13998
|
id: context.contentId,
|
|
13930
13999
|
"aria-describedby": context.descriptionId,
|
|
@@ -13941,7 +14010,7 @@ const $5d3850c4d0b4e6c7$export$b6d9565de1e068cf = /*#__PURE__*/ React.forwardRef
|
|
|
13941
14010
|
const $5d3850c4d0b4e6c7$export$16f7638e4a34b909 = /*#__PURE__*/ React.forwardRef((props, forwardedRef)=>{
|
|
13942
14011
|
const { __scopeDialog: __scopeDialog , ...titleProps } = props;
|
|
13943
14012
|
const context = $5d3850c4d0b4e6c7$var$useDialogContext($5d3850c4d0b4e6c7$var$TITLE_NAME, __scopeDialog);
|
|
13944
|
-
return /*#__PURE__*/ React.createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.h2, _extends({
|
|
14013
|
+
return /*#__PURE__*/ React.createElement($8927f6f2acc4f386$export$250ffa63cdc0d034$1.h2, _extends({
|
|
13945
14014
|
id: context.titleId
|
|
13946
14015
|
}, titleProps, {
|
|
13947
14016
|
ref: forwardedRef
|
|
@@ -13953,7 +14022,7 @@ const $5d3850c4d0b4e6c7$export$16f7638e4a34b909 = /*#__PURE__*/ React.forwardRef
|
|
|
13953
14022
|
const $5d3850c4d0b4e6c7$export$94e94c2ec2c954d5 = /*#__PURE__*/ React.forwardRef((props, forwardedRef)=>{
|
|
13954
14023
|
const { __scopeDialog: __scopeDialog , ...descriptionProps } = props;
|
|
13955
14024
|
const context = $5d3850c4d0b4e6c7$var$useDialogContext($5d3850c4d0b4e6c7$var$DESCRIPTION_NAME, __scopeDialog);
|
|
13956
|
-
return /*#__PURE__*/ React.createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.p, _extends({
|
|
14025
|
+
return /*#__PURE__*/ React.createElement($8927f6f2acc4f386$export$250ffa63cdc0d034$1.p, _extends({
|
|
13957
14026
|
id: context.descriptionId
|
|
13958
14027
|
}, descriptionProps, {
|
|
13959
14028
|
ref: forwardedRef
|
|
@@ -13965,11 +14034,11 @@ const $5d3850c4d0b4e6c7$export$94e94c2ec2c954d5 = /*#__PURE__*/ React.forwardRef
|
|
|
13965
14034
|
const $5d3850c4d0b4e6c7$export$fba2fb7cd781b7ac = /*#__PURE__*/ React.forwardRef((props, forwardedRef)=>{
|
|
13966
14035
|
const { __scopeDialog: __scopeDialog , ...closeProps } = props;
|
|
13967
14036
|
const context = $5d3850c4d0b4e6c7$var$useDialogContext($5d3850c4d0b4e6c7$var$CLOSE_NAME, __scopeDialog);
|
|
13968
|
-
return /*#__PURE__*/ React.createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.button, _extends({
|
|
14037
|
+
return /*#__PURE__*/ React.createElement($8927f6f2acc4f386$export$250ffa63cdc0d034$1.button, _extends({
|
|
13969
14038
|
type: "button"
|
|
13970
14039
|
}, closeProps, {
|
|
13971
14040
|
ref: forwardedRef,
|
|
13972
|
-
onClick: $e42e1063c40fb3ef$export$b9ecd428b558ff10(props.onClick, ()=>context.onOpenChange(false)
|
|
14041
|
+
onClick: $e42e1063c40fb3ef$export$b9ecd428b558ff10$1(props.onClick, ()=>context.onOpenChange(false)
|
|
13973
14042
|
)
|
|
13974
14043
|
}));
|
|
13975
14044
|
});
|
|
@@ -14147,7 +14216,7 @@ function $e02a7d9cb1dc128c$export$c74125a8e3af6bb2(name) {
|
|
|
14147
14216
|
/* -----------------------------------------------------------------------------------------------
|
|
14148
14217
|
* CollectionProvider
|
|
14149
14218
|
* ---------------------------------------------------------------------------------------------*/ const PROVIDER_NAME = name + 'CollectionProvider';
|
|
14150
|
-
const [createCollectionContext, createCollectionScope] = $c512c27ab02ef895$export$50c7b4e9d9f19c1(PROVIDER_NAME);
|
|
14219
|
+
const [createCollectionContext, createCollectionScope] = $c512c27ab02ef895$export$50c7b4e9d9f19c1$1(PROVIDER_NAME);
|
|
14151
14220
|
const [CollectionProviderImpl, useCollectionContext] = createCollectionContext(PROVIDER_NAME, {
|
|
14152
14221
|
collectionRef: {
|
|
14153
14222
|
current: null
|
|
@@ -14170,8 +14239,8 @@ function $e02a7d9cb1dc128c$export$c74125a8e3af6bb2(name) {
|
|
|
14170
14239
|
const CollectionSlot = /*#__PURE__*/ React.forwardRef((props, forwardedRef)=>{
|
|
14171
14240
|
const { scope: scope , children: children } = props;
|
|
14172
14241
|
const context = useCollectionContext(COLLECTION_SLOT_NAME, scope);
|
|
14173
|
-
const composedRefs = $6ed0406888f73fc4$export$c7b2cbe3552a0d05(forwardedRef, context.collectionRef);
|
|
14174
|
-
return /*#__PURE__*/ React.createElement($5e63c961fc1ce211$export$8c6ed5c666ac1360, {
|
|
14242
|
+
const composedRefs = $6ed0406888f73fc4$export$c7b2cbe3552a0d05$1(forwardedRef, context.collectionRef);
|
|
14243
|
+
return /*#__PURE__*/ React.createElement($5e63c961fc1ce211$export$8c6ed5c666ac1360$1, {
|
|
14175
14244
|
ref: composedRefs
|
|
14176
14245
|
}, children);
|
|
14177
14246
|
});
|
|
@@ -14182,7 +14251,7 @@ function $e02a7d9cb1dc128c$export$c74125a8e3af6bb2(name) {
|
|
|
14182
14251
|
const CollectionItemSlot = /*#__PURE__*/ React.forwardRef((props, forwardedRef)=>{
|
|
14183
14252
|
const { scope: scope , children: children , ...itemData } = props;
|
|
14184
14253
|
const ref = React.useRef(null);
|
|
14185
|
-
const composedRefs = $6ed0406888f73fc4$export$c7b2cbe3552a0d05(forwardedRef, ref);
|
|
14254
|
+
const composedRefs = $6ed0406888f73fc4$export$c7b2cbe3552a0d05$1(forwardedRef, ref);
|
|
14186
14255
|
const context = useCollectionContext(ITEM_SLOT_NAME, scope);
|
|
14187
14256
|
React.useEffect(()=>{
|
|
14188
14257
|
context.itemMap.set(ref, {
|
|
@@ -14192,7 +14261,7 @@ function $e02a7d9cb1dc128c$export$c74125a8e3af6bb2(name) {
|
|
|
14192
14261
|
return ()=>void context.itemMap.delete(ref)
|
|
14193
14262
|
;
|
|
14194
14263
|
});
|
|
14195
|
-
return /*#__PURE__*/ React.createElement($5e63c961fc1ce211$export$8c6ed5c666ac1360, {
|
|
14264
|
+
return /*#__PURE__*/ React.createElement($5e63c961fc1ce211$export$8c6ed5c666ac1360$1, {
|
|
14196
14265
|
[ITEM_DATA_ATTR]: '',
|
|
14197
14266
|
ref: composedRefs
|
|
14198
14267
|
}, children);
|
|
@@ -14241,7 +14310,7 @@ const $d7bdfb9eb0fdf311$var$EVENT_OPTIONS = {
|
|
|
14241
14310
|
* RovingFocusGroup
|
|
14242
14311
|
* -----------------------------------------------------------------------------------------------*/ const $d7bdfb9eb0fdf311$var$GROUP_NAME = 'RovingFocusGroup';
|
|
14243
14312
|
const [$d7bdfb9eb0fdf311$var$Collection, $d7bdfb9eb0fdf311$var$useCollection, $d7bdfb9eb0fdf311$var$createCollectionScope] = $e02a7d9cb1dc128c$export$c74125a8e3af6bb2($d7bdfb9eb0fdf311$var$GROUP_NAME);
|
|
14244
|
-
const [$d7bdfb9eb0fdf311$var$createRovingFocusGroupContext, $d7bdfb9eb0fdf311$export$c7109489551a4f4] = $c512c27ab02ef895$export$50c7b4e9d9f19c1($d7bdfb9eb0fdf311$var$GROUP_NAME, [
|
|
14313
|
+
const [$d7bdfb9eb0fdf311$var$createRovingFocusGroupContext, $d7bdfb9eb0fdf311$export$c7109489551a4f4] = $c512c27ab02ef895$export$50c7b4e9d9f19c1$1($d7bdfb9eb0fdf311$var$GROUP_NAME, [
|
|
14245
14314
|
$d7bdfb9eb0fdf311$var$createCollectionScope
|
|
14246
14315
|
]);
|
|
14247
14316
|
const [$d7bdfb9eb0fdf311$var$RovingFocusProvider, $d7bdfb9eb0fdf311$var$useRovingFocusContext] = $d7bdfb9eb0fdf311$var$createRovingFocusGroupContext($d7bdfb9eb0fdf311$var$GROUP_NAME);
|
|
@@ -14257,15 +14326,15 @@ const $d7bdfb9eb0fdf311$export$8699f7c8af148338 = /*#__PURE__*/ React.forwardRef
|
|
|
14257
14326
|
/* -----------------------------------------------------------------------------------------------*/ const $d7bdfb9eb0fdf311$var$RovingFocusGroupImpl = /*#__PURE__*/ React.forwardRef((props, forwardedRef)=>{
|
|
14258
14327
|
const { __scopeRovingFocusGroup: __scopeRovingFocusGroup , orientation: orientation , loop: loop = false , dir: dir , currentTabStopId: currentTabStopIdProp , defaultCurrentTabStopId: defaultCurrentTabStopId , onCurrentTabStopIdChange: onCurrentTabStopIdChange , onEntryFocus: onEntryFocus , ...groupProps } = props;
|
|
14259
14328
|
const ref = React.useRef(null);
|
|
14260
|
-
const composedRefs = $6ed0406888f73fc4$export$c7b2cbe3552a0d05(forwardedRef, ref);
|
|
14329
|
+
const composedRefs = $6ed0406888f73fc4$export$c7b2cbe3552a0d05$1(forwardedRef, ref);
|
|
14261
14330
|
const direction = $f631663db3294ace$export$b39126d51d94e6f3(dir);
|
|
14262
|
-
const [currentTabStopId = null, setCurrentTabStopId] = $71cd76cc60e0454e$export$6f32135080cb4c3({
|
|
14331
|
+
const [currentTabStopId = null, setCurrentTabStopId] = $71cd76cc60e0454e$export$6f32135080cb4c3$1({
|
|
14263
14332
|
prop: currentTabStopIdProp,
|
|
14264
14333
|
defaultProp: defaultCurrentTabStopId,
|
|
14265
14334
|
onChange: onCurrentTabStopIdChange
|
|
14266
14335
|
});
|
|
14267
14336
|
const [isTabbingBackOut, setIsTabbingBackOut] = React.useState(false);
|
|
14268
|
-
const handleEntryFocus = $b1b2314f5f9a1d84$export$25bec8c6f54ee79a(onEntryFocus);
|
|
14337
|
+
const handleEntryFocus = $b1b2314f5f9a1d84$export$25bec8c6f54ee79a$1(onEntryFocus);
|
|
14269
14338
|
const getItems = $d7bdfb9eb0fdf311$var$useCollection(__scopeRovingFocusGroup);
|
|
14270
14339
|
const isClickFocusRef = React.useRef(false);
|
|
14271
14340
|
const [focusableItemsCount, setFocusableItemsCount] = React.useState(0);
|
|
@@ -14297,7 +14366,7 @@ const $d7bdfb9eb0fdf311$export$8699f7c8af148338 = /*#__PURE__*/ React.forwardRef
|
|
|
14297
14366
|
onFocusableItemRemove: React.useCallback(()=>setFocusableItemsCount((prevCount)=>prevCount - 1
|
|
14298
14367
|
)
|
|
14299
14368
|
, [])
|
|
14300
|
-
}, /*#__PURE__*/ React.createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.div, _extends({
|
|
14369
|
+
}, /*#__PURE__*/ React.createElement($8927f6f2acc4f386$export$250ffa63cdc0d034$1.div, _extends({
|
|
14301
14370
|
tabIndex: isTabbingBackOut || focusableItemsCount === 0 ? -1 : 0,
|
|
14302
14371
|
"data-orientation": orientation
|
|
14303
14372
|
}, groupProps, {
|
|
@@ -14306,10 +14375,10 @@ const $d7bdfb9eb0fdf311$export$8699f7c8af148338 = /*#__PURE__*/ React.forwardRef
|
|
|
14306
14375
|
outline: 'none',
|
|
14307
14376
|
...props.style
|
|
14308
14377
|
},
|
|
14309
|
-
onMouseDown: $e42e1063c40fb3ef$export$b9ecd428b558ff10(props.onMouseDown, ()=>{
|
|
14378
|
+
onMouseDown: $e42e1063c40fb3ef$export$b9ecd428b558ff10$1(props.onMouseDown, ()=>{
|
|
14310
14379
|
isClickFocusRef.current = true;
|
|
14311
14380
|
}),
|
|
14312
|
-
onFocus: $e42e1063c40fb3ef$export$b9ecd428b558ff10(props.onFocus, (event)=>{
|
|
14381
|
+
onFocus: $e42e1063c40fb3ef$export$b9ecd428b558ff10$1(props.onFocus, (event)=>{
|
|
14313
14382
|
// We normally wouldn't need this check, because we already check
|
|
14314
14383
|
// that the focus is on the current target and not bubbling to it.
|
|
14315
14384
|
// We do this because Safari doesn't focus buttons when clicked, and
|
|
@@ -14337,7 +14406,7 @@ const $d7bdfb9eb0fdf311$export$8699f7c8af148338 = /*#__PURE__*/ React.forwardRef
|
|
|
14337
14406
|
}
|
|
14338
14407
|
isClickFocusRef.current = false;
|
|
14339
14408
|
}),
|
|
14340
|
-
onBlur: $e42e1063c40fb3ef$export$b9ecd428b558ff10(props.onBlur, ()=>setIsTabbingBackOut(false)
|
|
14409
|
+
onBlur: $e42e1063c40fb3ef$export$b9ecd428b558ff10$1(props.onBlur, ()=>setIsTabbingBackOut(false)
|
|
14341
14410
|
)
|
|
14342
14411
|
})));
|
|
14343
14412
|
});
|
|
@@ -14368,20 +14437,20 @@ const $d7bdfb9eb0fdf311$export$ab9df7c53fe8454 = /*#__PURE__*/ React.forwardRef(
|
|
|
14368
14437
|
id: id,
|
|
14369
14438
|
focusable: focusable,
|
|
14370
14439
|
active: active
|
|
14371
|
-
}, /*#__PURE__*/ React.createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.span, _extends({
|
|
14440
|
+
}, /*#__PURE__*/ React.createElement($8927f6f2acc4f386$export$250ffa63cdc0d034$1.span, _extends({
|
|
14372
14441
|
tabIndex: isCurrentTabStop ? 0 : -1,
|
|
14373
14442
|
"data-orientation": context.orientation
|
|
14374
14443
|
}, itemProps, {
|
|
14375
14444
|
ref: forwardedRef,
|
|
14376
|
-
onMouseDown: $e42e1063c40fb3ef$export$b9ecd428b558ff10(props.onMouseDown, (event)=>{
|
|
14445
|
+
onMouseDown: $e42e1063c40fb3ef$export$b9ecd428b558ff10$1(props.onMouseDown, (event)=>{
|
|
14377
14446
|
// We prevent focusing non-focusable items on `mousedown`.
|
|
14378
14447
|
// Even though the item has tabIndex={-1}, that only means take it out of the tab order.
|
|
14379
14448
|
if (!focusable) event.preventDefault(); // Safari doesn't focus a button when clicked so we run our logic on mousedown also
|
|
14380
14449
|
else context.onItemFocus(id);
|
|
14381
14450
|
}),
|
|
14382
|
-
onFocus: $e42e1063c40fb3ef$export$b9ecd428b558ff10(props.onFocus, ()=>context.onItemFocus(id)
|
|
14451
|
+
onFocus: $e42e1063c40fb3ef$export$b9ecd428b558ff10$1(props.onFocus, ()=>context.onItemFocus(id)
|
|
14383
14452
|
),
|
|
14384
|
-
onKeyDown: $e42e1063c40fb3ef$export$b9ecd428b558ff10(props.onKeyDown, (event)=>{
|
|
14453
|
+
onKeyDown: $e42e1063c40fb3ef$export$b9ecd428b558ff10$1(props.onKeyDown, (event)=>{
|
|
14385
14454
|
if (event.key === 'Tab' && event.shiftKey) {
|
|
14386
14455
|
context.onItemShiftTab();
|
|
14387
14456
|
return;
|
|
@@ -14458,7 +14527,7 @@ const $d7bdfb9eb0fdf311$export$6d08773d2e66f8f2 = $d7bdfb9eb0fdf311$export$ab9df
|
|
|
14458
14527
|
/* -------------------------------------------------------------------------------------------------
|
|
14459
14528
|
* Tabs
|
|
14460
14529
|
* -----------------------------------------------------------------------------------------------*/ const $69cb30bb0017df05$var$TABS_NAME = 'Tabs';
|
|
14461
|
-
const [$69cb30bb0017df05$var$createTabsContext, $69cb30bb0017df05$export$355f5bd209d7b13a] = $c512c27ab02ef895$export$50c7b4e9d9f19c1($69cb30bb0017df05$var$TABS_NAME, [
|
|
14530
|
+
const [$69cb30bb0017df05$var$createTabsContext, $69cb30bb0017df05$export$355f5bd209d7b13a] = $c512c27ab02ef895$export$50c7b4e9d9f19c1$1($69cb30bb0017df05$var$TABS_NAME, [
|
|
14462
14531
|
$d7bdfb9eb0fdf311$export$c7109489551a4f4
|
|
14463
14532
|
]);
|
|
14464
14533
|
const $69cb30bb0017df05$var$useRovingFocusGroupScope = $d7bdfb9eb0fdf311$export$c7109489551a4f4();
|
|
@@ -14466,7 +14535,7 @@ const [$69cb30bb0017df05$var$TabsProvider, $69cb30bb0017df05$var$useTabsContext]
|
|
|
14466
14535
|
const $69cb30bb0017df05$export$b2539bed5023c21c = /*#__PURE__*/ React.forwardRef((props, forwardedRef)=>{
|
|
14467
14536
|
const { __scopeTabs: __scopeTabs , value: valueProp , onValueChange: onValueChange , defaultValue: defaultValue , orientation: orientation = 'horizontal' , dir: dir , activationMode: activationMode = 'automatic' , ...tabsProps } = props;
|
|
14468
14537
|
const direction = $f631663db3294ace$export$b39126d51d94e6f3(dir);
|
|
14469
|
-
const [value, setValue] = $71cd76cc60e0454e$export$6f32135080cb4c3({
|
|
14538
|
+
const [value, setValue] = $71cd76cc60e0454e$export$6f32135080cb4c3$1({
|
|
14470
14539
|
prop: valueProp,
|
|
14471
14540
|
onChange: onValueChange,
|
|
14472
14541
|
defaultProp: defaultValue
|
|
@@ -14479,7 +14548,7 @@ const $69cb30bb0017df05$export$b2539bed5023c21c = /*#__PURE__*/ React.forwardRef
|
|
|
14479
14548
|
orientation: orientation,
|
|
14480
14549
|
dir: direction,
|
|
14481
14550
|
activationMode: activationMode
|
|
14482
|
-
}, /*#__PURE__*/ React.createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.div, _extends({
|
|
14551
|
+
}, /*#__PURE__*/ React.createElement($8927f6f2acc4f386$export$250ffa63cdc0d034$1.div, _extends({
|
|
14483
14552
|
dir: direction,
|
|
14484
14553
|
"data-orientation": orientation
|
|
14485
14554
|
}, tabsProps, {
|
|
@@ -14499,7 +14568,7 @@ const $69cb30bb0017df05$export$9712d22edc0d78c1 = /*#__PURE__*/ React.forwardRef
|
|
|
14499
14568
|
orientation: context.orientation,
|
|
14500
14569
|
dir: context.dir,
|
|
14501
14570
|
loop: loop
|
|
14502
|
-
}), /*#__PURE__*/ React.createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.div, _extends({
|
|
14571
|
+
}), /*#__PURE__*/ React.createElement($8927f6f2acc4f386$export$250ffa63cdc0d034$1.div, _extends({
|
|
14503
14572
|
role: "tablist",
|
|
14504
14573
|
"aria-orientation": context.orientation
|
|
14505
14574
|
}, listProps, {
|
|
@@ -14521,7 +14590,7 @@ const $69cb30bb0017df05$export$8114b9fdfdf9f3ba = /*#__PURE__*/ React.forwardRef
|
|
|
14521
14590
|
}, rovingFocusGroupScope, {
|
|
14522
14591
|
focusable: !disabled,
|
|
14523
14592
|
active: isSelected
|
|
14524
|
-
}), /*#__PURE__*/ React.createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.button, _extends({
|
|
14593
|
+
}), /*#__PURE__*/ React.createElement($8927f6f2acc4f386$export$250ffa63cdc0d034$1.button, _extends({
|
|
14525
14594
|
type: "button",
|
|
14526
14595
|
role: "tab",
|
|
14527
14596
|
"aria-selected": isSelected,
|
|
@@ -14532,20 +14601,20 @@ const $69cb30bb0017df05$export$8114b9fdfdf9f3ba = /*#__PURE__*/ React.forwardRef
|
|
|
14532
14601
|
id: triggerId
|
|
14533
14602
|
}, triggerProps, {
|
|
14534
14603
|
ref: forwardedRef,
|
|
14535
|
-
onMouseDown: $e42e1063c40fb3ef$export$b9ecd428b558ff10(props.onMouseDown, (event)=>{
|
|
14604
|
+
onMouseDown: $e42e1063c40fb3ef$export$b9ecd428b558ff10$1(props.onMouseDown, (event)=>{
|
|
14536
14605
|
// only call handler if it's the left button (mousedown gets triggered by all mouse buttons)
|
|
14537
14606
|
// but not when the control key is pressed (avoiding MacOS right click)
|
|
14538
14607
|
if (!disabled && event.button === 0 && event.ctrlKey === false) context.onValueChange(value);
|
|
14539
14608
|
else // prevent focus to avoid accidental activation
|
|
14540
14609
|
event.preventDefault();
|
|
14541
14610
|
}),
|
|
14542
|
-
onKeyDown: $e42e1063c40fb3ef$export$b9ecd428b558ff10(props.onKeyDown, (event)=>{
|
|
14611
|
+
onKeyDown: $e42e1063c40fb3ef$export$b9ecd428b558ff10$1(props.onKeyDown, (event)=>{
|
|
14543
14612
|
if ([
|
|
14544
14613
|
' ',
|
|
14545
14614
|
'Enter'
|
|
14546
14615
|
].includes(event.key)) context.onValueChange(value);
|
|
14547
14616
|
}),
|
|
14548
|
-
onFocus: $e42e1063c40fb3ef$export$b9ecd428b558ff10(props.onFocus, ()=>{
|
|
14617
|
+
onFocus: $e42e1063c40fb3ef$export$b9ecd428b558ff10$1(props.onFocus, ()=>{
|
|
14549
14618
|
// handle "automatic" activation if necessary
|
|
14550
14619
|
// ie. activate tab following focus
|
|
14551
14620
|
const isAutomaticActivation = context.activationMode !== 'manual';
|
|
@@ -14569,9 +14638,9 @@ const $69cb30bb0017df05$export$bd905d70e8fd2ebb = /*#__PURE__*/ React.forwardRef
|
|
|
14569
14638
|
return ()=>cancelAnimationFrame(rAF)
|
|
14570
14639
|
;
|
|
14571
14640
|
}, []);
|
|
14572
|
-
return /*#__PURE__*/ React.createElement($921a889cee6df7e8$export$99c2b779aa4e8b8b, {
|
|
14641
|
+
return /*#__PURE__*/ React.createElement($921a889cee6df7e8$export$99c2b779aa4e8b8b$1, {
|
|
14573
14642
|
present: forceMount || isSelected
|
|
14574
|
-
}, ({ present: present })=>/*#__PURE__*/ React.createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.div, _extends({
|
|
14643
|
+
}, ({ present: present })=>/*#__PURE__*/ React.createElement($8927f6f2acc4f386$export$250ffa63cdc0d034$1.div, _extends({
|
|
14575
14644
|
"data-state": isSelected ? 'active' : 'inactive',
|
|
14576
14645
|
"data-orientation": context.orientation,
|
|
14577
14646
|
role: "tabpanel",
|
|
@@ -14620,11 +14689,11 @@ const Tabs = ({ tabs, defaultActiveTab, activeTab, onTabSelect, extraClassNames,
|
|
|
14620
14689
|
/* -------------------------------------------------------------------------------------------------
|
|
14621
14690
|
* Collapsible
|
|
14622
14691
|
* -----------------------------------------------------------------------------------------------*/ const $409067139f391064$var$COLLAPSIBLE_NAME = 'Collapsible';
|
|
14623
|
-
const [$409067139f391064$var$createCollapsibleContext, $409067139f391064$export$952b32dcbe73087a] = $c512c27ab02ef895$export$50c7b4e9d9f19c1($409067139f391064$var$COLLAPSIBLE_NAME);
|
|
14692
|
+
const [$409067139f391064$var$createCollapsibleContext, $409067139f391064$export$952b32dcbe73087a] = $c512c27ab02ef895$export$50c7b4e9d9f19c1$1($409067139f391064$var$COLLAPSIBLE_NAME);
|
|
14624
14693
|
const [$409067139f391064$var$CollapsibleProvider, $409067139f391064$var$useCollapsibleContext] = $409067139f391064$var$createCollapsibleContext($409067139f391064$var$COLLAPSIBLE_NAME);
|
|
14625
14694
|
const $409067139f391064$export$6eb0f7ddcda6131f = /*#__PURE__*/ React.forwardRef((props, forwardedRef)=>{
|
|
14626
14695
|
const { __scopeCollapsible: __scopeCollapsible , open: openProp , defaultOpen: defaultOpen , disabled: disabled , onOpenChange: onOpenChange , ...collapsibleProps } = props;
|
|
14627
|
-
const [open = false, setOpen] = $71cd76cc60e0454e$export$6f32135080cb4c3({
|
|
14696
|
+
const [open = false, setOpen] = $71cd76cc60e0454e$export$6f32135080cb4c3$1({
|
|
14628
14697
|
prop: openProp,
|
|
14629
14698
|
defaultProp: defaultOpen,
|
|
14630
14699
|
onChange: onOpenChange
|
|
@@ -14639,7 +14708,7 @@ const $409067139f391064$export$6eb0f7ddcda6131f = /*#__PURE__*/ React.forwardRef
|
|
|
14639
14708
|
, [
|
|
14640
14709
|
setOpen
|
|
14641
14710
|
])
|
|
14642
|
-
}, /*#__PURE__*/ React.createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.div, _extends({
|
|
14711
|
+
}, /*#__PURE__*/ React.createElement($8927f6f2acc4f386$export$250ffa63cdc0d034$1.div, _extends({
|
|
14643
14712
|
"data-state": $409067139f391064$var$getState(open),
|
|
14644
14713
|
"data-disabled": disabled ? '' : undefined
|
|
14645
14714
|
}, collapsibleProps, {
|
|
@@ -14652,7 +14721,7 @@ const $409067139f391064$export$6eb0f7ddcda6131f = /*#__PURE__*/ React.forwardRef
|
|
|
14652
14721
|
const $409067139f391064$export$c135dce7b15bbbdc = /*#__PURE__*/ React.forwardRef((props, forwardedRef)=>{
|
|
14653
14722
|
const { __scopeCollapsible: __scopeCollapsible , ...triggerProps } = props;
|
|
14654
14723
|
const context = $409067139f391064$var$useCollapsibleContext($409067139f391064$var$TRIGGER_NAME, __scopeCollapsible);
|
|
14655
|
-
return /*#__PURE__*/ React.createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.button, _extends({
|
|
14724
|
+
return /*#__PURE__*/ React.createElement($8927f6f2acc4f386$export$250ffa63cdc0d034$1.button, _extends({
|
|
14656
14725
|
type: "button",
|
|
14657
14726
|
"aria-controls": context.contentId,
|
|
14658
14727
|
"aria-expanded": context.open || false,
|
|
@@ -14661,7 +14730,7 @@ const $409067139f391064$export$c135dce7b15bbbdc = /*#__PURE__*/ React.forwardRef
|
|
|
14661
14730
|
disabled: context.disabled
|
|
14662
14731
|
}, triggerProps, {
|
|
14663
14732
|
ref: forwardedRef,
|
|
14664
|
-
onClick: $e42e1063c40fb3ef$export$b9ecd428b558ff10(props.onClick, context.onOpenToggle)
|
|
14733
|
+
onClick: $e42e1063c40fb3ef$export$b9ecd428b558ff10$1(props.onClick, context.onOpenToggle)
|
|
14665
14734
|
}));
|
|
14666
14735
|
});
|
|
14667
14736
|
/* -------------------------------------------------------------------------------------------------
|
|
@@ -14670,7 +14739,7 @@ const $409067139f391064$export$c135dce7b15bbbdc = /*#__PURE__*/ React.forwardRef
|
|
|
14670
14739
|
const $409067139f391064$export$aadde00976f34151 = /*#__PURE__*/ React.forwardRef((props, forwardedRef)=>{
|
|
14671
14740
|
const { forceMount: forceMount , ...contentProps } = props;
|
|
14672
14741
|
const context = $409067139f391064$var$useCollapsibleContext($409067139f391064$var$CONTENT_NAME, props.__scopeCollapsible);
|
|
14673
|
-
return /*#__PURE__*/ React.createElement($921a889cee6df7e8$export$99c2b779aa4e8b8b, {
|
|
14742
|
+
return /*#__PURE__*/ React.createElement($921a889cee6df7e8$export$99c2b779aa4e8b8b$1, {
|
|
14674
14743
|
present: forceMount || context.open
|
|
14675
14744
|
}, ({ present: present })=>/*#__PURE__*/ React.createElement($409067139f391064$var$CollapsibleContentImpl, _extends({}, contentProps, {
|
|
14676
14745
|
ref: forwardedRef,
|
|
@@ -14683,7 +14752,7 @@ const $409067139f391064$export$aadde00976f34151 = /*#__PURE__*/ React.forwardRef
|
|
|
14683
14752
|
const context = $409067139f391064$var$useCollapsibleContext($409067139f391064$var$CONTENT_NAME, __scopeCollapsible);
|
|
14684
14753
|
const [isPresent, setIsPresent] = React.useState(present);
|
|
14685
14754
|
const ref = React.useRef(null);
|
|
14686
|
-
const composedRefs = $6ed0406888f73fc4$export$c7b2cbe3552a0d05(forwardedRef, ref);
|
|
14755
|
+
const composedRefs = $6ed0406888f73fc4$export$c7b2cbe3552a0d05$1(forwardedRef, ref);
|
|
14687
14756
|
const heightRef = React.useRef(0);
|
|
14688
14757
|
const height = heightRef.current;
|
|
14689
14758
|
const widthRef = React.useRef(0);
|
|
@@ -14698,7 +14767,7 @@ const $409067139f391064$export$aadde00976f34151 = /*#__PURE__*/ React.forwardRef
|
|
|
14698
14767
|
return ()=>cancelAnimationFrame(rAF)
|
|
14699
14768
|
;
|
|
14700
14769
|
}, []);
|
|
14701
|
-
$9f79659886946c16$export$e5c5a5f917a5871c(()=>{
|
|
14770
|
+
$9f79659886946c16$export$e5c5a5f917a5871c$1(()=>{
|
|
14702
14771
|
const node = ref.current;
|
|
14703
14772
|
if (node) {
|
|
14704
14773
|
originalStylesRef.current = originalStylesRef.current || {
|
|
@@ -14725,7 +14794,7 @@ const $409067139f391064$export$aadde00976f34151 = /*#__PURE__*/ React.forwardRef
|
|
|
14725
14794
|
context.open,
|
|
14726
14795
|
present
|
|
14727
14796
|
]);
|
|
14728
|
-
return /*#__PURE__*/ React.createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.div, _extends({
|
|
14797
|
+
return /*#__PURE__*/ React.createElement($8927f6f2acc4f386$export$250ffa63cdc0d034$1.div, _extends({
|
|
14729
14798
|
"data-state": $409067139f391064$var$getState(context.open),
|
|
14730
14799
|
"data-disabled": context.disabled ? '' : undefined,
|
|
14731
14800
|
id: context.contentId,
|
|
@@ -14758,7 +14827,7 @@ const $1bf158f521e1b1b4$var$ACCORDION_KEYS = [
|
|
|
14758
14827
|
'ArrowRight'
|
|
14759
14828
|
];
|
|
14760
14829
|
const [$1bf158f521e1b1b4$var$Collection, $1bf158f521e1b1b4$var$useCollection, $1bf158f521e1b1b4$var$createCollectionScope] = $e02a7d9cb1dc128c$export$c74125a8e3af6bb2($1bf158f521e1b1b4$var$ACCORDION_NAME);
|
|
14761
|
-
const [$1bf158f521e1b1b4$var$createAccordionContext, $1bf158f521e1b1b4$export$9748edc328a73be1] = $c512c27ab02ef895$export$50c7b4e9d9f19c1($1bf158f521e1b1b4$var$ACCORDION_NAME, [
|
|
14830
|
+
const [$1bf158f521e1b1b4$var$createAccordionContext, $1bf158f521e1b1b4$export$9748edc328a73be1] = $c512c27ab02ef895$export$50c7b4e9d9f19c1$1($1bf158f521e1b1b4$var$ACCORDION_NAME, [
|
|
14762
14831
|
$1bf158f521e1b1b4$var$createCollectionScope,
|
|
14763
14832
|
$409067139f391064$export$952b32dcbe73087a
|
|
14764
14833
|
]);
|
|
@@ -14793,7 +14862,7 @@ const [$1bf158f521e1b1b4$var$AccordionCollapsibleProvider, $1bf158f521e1b1b4$var
|
|
|
14793
14862
|
});
|
|
14794
14863
|
const $1bf158f521e1b1b4$var$AccordionImplSingle = /*#__PURE__*/ React.forwardRef((props, forwardedRef)=>{
|
|
14795
14864
|
const { value: valueProp , defaultValue: defaultValue , onValueChange: onValueChange = ()=>{} , collapsible: collapsible = false , ...accordionSingleProps } = props;
|
|
14796
|
-
const [value, setValue] = $71cd76cc60e0454e$export$6f32135080cb4c3({
|
|
14865
|
+
const [value, setValue] = $71cd76cc60e0454e$export$6f32135080cb4c3$1({
|
|
14797
14866
|
prop: valueProp,
|
|
14798
14867
|
defaultProp: defaultValue,
|
|
14799
14868
|
onChange: onValueChange
|
|
@@ -14818,7 +14887,7 @@ const $1bf158f521e1b1b4$var$AccordionImplSingle = /*#__PURE__*/ React.forwardRef
|
|
|
14818
14887
|
});
|
|
14819
14888
|
/* -----------------------------------------------------------------------------------------------*/ const $1bf158f521e1b1b4$var$AccordionImplMultiple = /*#__PURE__*/ React.forwardRef((props, forwardedRef)=>{
|
|
14820
14889
|
const { value: valueProp , defaultValue: defaultValue , onValueChange: onValueChange = ()=>{} , ...accordionMultipleProps } = props;
|
|
14821
|
-
const [value1 = [], setValue] = $71cd76cc60e0454e$export$6f32135080cb4c3({
|
|
14890
|
+
const [value1 = [], setValue] = $71cd76cc60e0454e$export$6f32135080cb4c3$1({
|
|
14822
14891
|
prop: valueProp,
|
|
14823
14892
|
defaultProp: defaultValue,
|
|
14824
14893
|
onChange: onValueChange
|
|
@@ -14853,11 +14922,11 @@ const $1bf158f521e1b1b4$var$AccordionImplSingle = /*#__PURE__*/ React.forwardRef
|
|
|
14853
14922
|
const $1bf158f521e1b1b4$var$AccordionImpl = /*#__PURE__*/ React.forwardRef((props, forwardedRef)=>{
|
|
14854
14923
|
const { __scopeAccordion: __scopeAccordion , disabled: disabled , dir: dir , orientation: orientation = 'vertical' , ...accordionProps } = props;
|
|
14855
14924
|
const accordionRef = React.useRef(null);
|
|
14856
|
-
const composedRefs = $6ed0406888f73fc4$export$c7b2cbe3552a0d05(accordionRef, forwardedRef);
|
|
14925
|
+
const composedRefs = $6ed0406888f73fc4$export$c7b2cbe3552a0d05$1(accordionRef, forwardedRef);
|
|
14857
14926
|
const getItems = $1bf158f521e1b1b4$var$useCollection(__scopeAccordion);
|
|
14858
14927
|
const direction = $f631663db3294ace$export$b39126d51d94e6f3(dir);
|
|
14859
14928
|
const isDirectionLTR = direction === 'ltr';
|
|
14860
|
-
const handleKeyDown = $e42e1063c40fb3ef$export$b9ecd428b558ff10(props.onKeyDown, (event)=>{
|
|
14929
|
+
const handleKeyDown = $e42e1063c40fb3ef$export$b9ecd428b558ff10$1(props.onKeyDown, (event)=>{
|
|
14861
14930
|
var _triggerCollection$cl;
|
|
14862
14931
|
if (!$1bf158f521e1b1b4$var$ACCORDION_KEYS.includes(event.key)) return;
|
|
14863
14932
|
const target = event.target;
|
|
@@ -14917,7 +14986,7 @@ const $1bf158f521e1b1b4$var$AccordionImpl = /*#__PURE__*/ React.forwardRef((prop
|
|
|
14917
14986
|
orientation: orientation
|
|
14918
14987
|
}, /*#__PURE__*/ React.createElement($1bf158f521e1b1b4$var$Collection.Slot, {
|
|
14919
14988
|
scope: __scopeAccordion
|
|
14920
|
-
}, /*#__PURE__*/ React.createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.div, _extends({}, accordionProps, {
|
|
14989
|
+
}, /*#__PURE__*/ React.createElement($8927f6f2acc4f386$export$250ffa63cdc0d034$1.div, _extends({}, accordionProps, {
|
|
14921
14990
|
"data-orientation": orientation,
|
|
14922
14991
|
ref: composedRefs,
|
|
14923
14992
|
onKeyDown: disabled ? undefined : handleKeyDown
|
|
@@ -15014,105 +15083,1678 @@ const Accordion = ({ accordionItems, defaultValue, value, onItemSelect, disabled
|
|
|
15014
15083
|
React.createElement($1bf158f521e1b1b4$export$7c6e2c02157bb7d2, { className: `data-[state=open]:tw-animate-slideDown data-[state=closed]:tw-animate-slideUp tw-overflow-hidden focus-visible:tw-outline-none ${item.contentClassNames || ''}` }, item.content))))));
|
|
15015
15084
|
};
|
|
15016
15085
|
|
|
15017
|
-
|
|
15018
|
-
|
|
15019
|
-
|
|
15020
|
-
|
|
15021
|
-
|
|
15022
|
-
|
|
15023
|
-
'dark:tw-border-gray-700',
|
|
15024
|
-
].join(' ');
|
|
15025
|
-
const disabledClasses$1 = ['tw-opacity-50', 'tw-cursor-not-allowed'].join(' ');
|
|
15026
|
-
const ButtonWithPopover = ({ children, trigger, id, hasArrow, extraTriggerClassNames, extraPopoverClassNames, containerTestId, disabled = false, align = 'end', alignOffset = -5, placement = 'bottom', placementOffset = 2, onOpenChange, isOpen, isCloseOnContentClick = false, setFocusOnTriggerOnClose = true, ...tooltipProps }) => {
|
|
15027
|
-
const tooltipData = getQTipData(tooltipProps);
|
|
15028
|
-
return (React__namespace.createElement($cb5cc270b50c6fcd$export$be92b6f5f03c0fe9, { open: isOpen, defaultOpen: false, onOpenChange: onOpenChange },
|
|
15029
|
-
React__namespace.createElement($cb5cc270b50c6fcd$export$41fb9f06171c75f4, { id: id, className: `tw-border-none`, disabled: disabled },
|
|
15030
|
-
React__namespace.createElement("div", { ...tooltipData, className: `tw-bg-transparent tw-flex tw-flex-col tw-items-center tw-justify-center ${disabled ? disabledClasses$1 : ''} ${extraTriggerClassNames || ''}` }, trigger)),
|
|
15031
|
-
React__namespace.createElement($cb5cc270b50c6fcd$export$7c6e2c02157bb7d2, { sideOffset: placementOffset, align: align, side: placement, alignOffset: alignOffset, onCloseAutoFocus: (e) => !setFocusOnTriggerOnClose && e.preventDefault(), asChild: true, onClick: () => isCloseOnContentClick && onOpenChange && onOpenChange(false), className: "focus-visible:tw-outline-none tw-outline-none" },
|
|
15032
|
-
React__namespace.createElement("div", { "data-testid": containerTestId, className: `${bgStyles$1} ${borderStyles$1} tw-relative tw-z-[1000] tw-min-w-6 tw-p-[0.5rem] focus-visible:tw-outline-none tw-outline-none data-[state=open]:tw-animate-in data-[state=closed]:tw-animate-out
|
|
15033
|
-
data-[side=top]:tw-animate-slideDownAndFade data-[side=right]:tw-animate-slideLeftAndFade data-[side=bottom]:tw-animate-slideUpAndFade data-[side=left]:tw-animate-slideRightAndFade
|
|
15034
|
-
${extraPopoverClassNames || ''}` },
|
|
15035
|
-
hasArrow && (React__namespace.createElement($cb5cc270b50c6fcd$export$21b07c8f274aebd5, { asChild: true },
|
|
15036
|
-
React__namespace.createElement("div", { className: " tw-fill-transparent tw-bg-white tw-w-[6px] tw-h-[6px] tw-rotate-45 dark:tw-bg-sq-dark-background tw-border-b tw-border-r tw-border-sq-disabled-gray dark:tw-border-gray-700 tw-mt-[-2px]" }))),
|
|
15037
|
-
children))));
|
|
15038
|
-
};
|
|
15086
|
+
function $e42e1063c40fb3ef$export$b9ecd428b558ff10(originalEventHandler, ourEventHandler, { checkForDefaultPrevented: checkForDefaultPrevented = true } = {}) {
|
|
15087
|
+
return function handleEvent(event) {
|
|
15088
|
+
originalEventHandler === null || originalEventHandler === void 0 || originalEventHandler(event);
|
|
15089
|
+
if (checkForDefaultPrevented === false || !event.defaultPrevented) return ourEventHandler === null || ourEventHandler === void 0 ? void 0 : ourEventHandler(event);
|
|
15090
|
+
};
|
|
15091
|
+
}
|
|
15039
15092
|
|
|
15040
|
-
const $6cc32821e9371a1c$var$SELECTION_KEYS = [
|
|
15041
|
-
'Enter',
|
|
15042
|
-
' '
|
|
15043
|
-
];
|
|
15044
|
-
const $6cc32821e9371a1c$var$FIRST_KEYS = [
|
|
15045
|
-
'ArrowDown',
|
|
15046
|
-
'PageUp',
|
|
15047
|
-
'Home'
|
|
15048
|
-
];
|
|
15049
|
-
const $6cc32821e9371a1c$var$LAST_KEYS = [
|
|
15050
|
-
'ArrowUp',
|
|
15051
|
-
'PageDown',
|
|
15052
|
-
'End'
|
|
15053
|
-
];
|
|
15054
|
-
const $6cc32821e9371a1c$var$FIRST_LAST_KEYS = [
|
|
15055
|
-
...$6cc32821e9371a1c$var$FIRST_KEYS,
|
|
15056
|
-
...$6cc32821e9371a1c$var$LAST_KEYS
|
|
15057
|
-
];
|
|
15058
15093
|
/* -------------------------------------------------------------------------------------------------
|
|
15059
|
-
*
|
|
15060
|
-
* -----------------------------------------------------------------------------------------------*/
|
|
15061
|
-
|
|
15062
|
-
|
|
15063
|
-
|
|
15064
|
-
|
|
15065
|
-
|
|
15066
|
-
|
|
15067
|
-
|
|
15068
|
-
|
|
15069
|
-
|
|
15070
|
-
|
|
15071
|
-
|
|
15072
|
-
|
|
15073
|
-
|
|
15074
|
-
|
|
15075
|
-
|
|
15076
|
-
|
|
15077
|
-
|
|
15078
|
-
|
|
15079
|
-
|
|
15080
|
-
|
|
15081
|
-
|
|
15082
|
-
|
|
15083
|
-
|
|
15084
|
-
|
|
15085
|
-
|
|
15086
|
-
});
|
|
15087
|
-
|
|
15088
|
-
|
|
15089
|
-
|
|
15090
|
-
|
|
15091
|
-
|
|
15092
|
-
|
|
15093
|
-
|
|
15094
|
-
|
|
15095
|
-
|
|
15096
|
-
|
|
15097
|
-
|
|
15098
|
-
|
|
15099
|
-
|
|
15100
|
-
|
|
15101
|
-
|
|
15102
|
-
|
|
15103
|
-
|
|
15104
|
-
|
|
15105
|
-
|
|
15106
|
-
|
|
15107
|
-
|
|
15108
|
-
|
|
15109
|
-
|
|
15110
|
-
|
|
15111
|
-
|
|
15112
|
-
|
|
15113
|
-
|
|
15114
|
-
|
|
15115
|
-
|
|
15094
|
+
* createContextScope
|
|
15095
|
+
* -----------------------------------------------------------------------------------------------*/ function $c512c27ab02ef895$export$50c7b4e9d9f19c1(scopeName, createContextScopeDeps = []) {
|
|
15096
|
+
let defaultContexts = [];
|
|
15097
|
+
/* -----------------------------------------------------------------------------------------------
|
|
15098
|
+
* createContext
|
|
15099
|
+
* ---------------------------------------------------------------------------------------------*/ function $c512c27ab02ef895$export$fd42f52fd3ae1109(rootComponentName, defaultContext) {
|
|
15100
|
+
const BaseContext = /*#__PURE__*/ React.createContext(defaultContext);
|
|
15101
|
+
const index = defaultContexts.length;
|
|
15102
|
+
defaultContexts = [
|
|
15103
|
+
...defaultContexts,
|
|
15104
|
+
defaultContext
|
|
15105
|
+
];
|
|
15106
|
+
function Provider(props) {
|
|
15107
|
+
const { scope: scope , children: children , ...context } = props;
|
|
15108
|
+
const Context = (scope === null || scope === void 0 ? void 0 : scope[scopeName][index]) || BaseContext; // Only re-memoize when prop values change
|
|
15109
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
15110
|
+
const value = React.useMemo(()=>context
|
|
15111
|
+
, Object.values(context));
|
|
15112
|
+
return /*#__PURE__*/ React.createElement(Context.Provider, {
|
|
15113
|
+
value: value
|
|
15114
|
+
}, children);
|
|
15115
|
+
}
|
|
15116
|
+
function useContext(consumerName, scope) {
|
|
15117
|
+
const Context = (scope === null || scope === void 0 ? void 0 : scope[scopeName][index]) || BaseContext;
|
|
15118
|
+
const context = React.useContext(Context);
|
|
15119
|
+
if (context) return context;
|
|
15120
|
+
if (defaultContext !== undefined) return defaultContext; // if a defaultContext wasn't specified, it's a required context.
|
|
15121
|
+
throw new Error(`\`${consumerName}\` must be used within \`${rootComponentName}\``);
|
|
15122
|
+
}
|
|
15123
|
+
Provider.displayName = rootComponentName + 'Provider';
|
|
15124
|
+
return [
|
|
15125
|
+
Provider,
|
|
15126
|
+
useContext
|
|
15127
|
+
];
|
|
15128
|
+
}
|
|
15129
|
+
/* -----------------------------------------------------------------------------------------------
|
|
15130
|
+
* createScope
|
|
15131
|
+
* ---------------------------------------------------------------------------------------------*/ const createScope = ()=>{
|
|
15132
|
+
const scopeContexts = defaultContexts.map((defaultContext)=>{
|
|
15133
|
+
return /*#__PURE__*/ React.createContext(defaultContext);
|
|
15134
|
+
});
|
|
15135
|
+
return function useScope(scope) {
|
|
15136
|
+
const contexts = (scope === null || scope === void 0 ? void 0 : scope[scopeName]) || scopeContexts;
|
|
15137
|
+
return React.useMemo(()=>({
|
|
15138
|
+
[`__scope${scopeName}`]: {
|
|
15139
|
+
...scope,
|
|
15140
|
+
[scopeName]: contexts
|
|
15141
|
+
}
|
|
15142
|
+
})
|
|
15143
|
+
, [
|
|
15144
|
+
scope,
|
|
15145
|
+
contexts
|
|
15146
|
+
]);
|
|
15147
|
+
};
|
|
15148
|
+
};
|
|
15149
|
+
createScope.scopeName = scopeName;
|
|
15150
|
+
return [
|
|
15151
|
+
$c512c27ab02ef895$export$fd42f52fd3ae1109,
|
|
15152
|
+
$c512c27ab02ef895$var$composeContextScopes(createScope, ...createContextScopeDeps)
|
|
15153
|
+
];
|
|
15154
|
+
}
|
|
15155
|
+
/* -------------------------------------------------------------------------------------------------
|
|
15156
|
+
* composeContextScopes
|
|
15157
|
+
* -----------------------------------------------------------------------------------------------*/ function $c512c27ab02ef895$var$composeContextScopes(...scopes) {
|
|
15158
|
+
const baseScope = scopes[0];
|
|
15159
|
+
if (scopes.length === 1) return baseScope;
|
|
15160
|
+
const createScope1 = ()=>{
|
|
15161
|
+
const scopeHooks = scopes.map((createScope)=>({
|
|
15162
|
+
useScope: createScope(),
|
|
15163
|
+
scopeName: createScope.scopeName
|
|
15164
|
+
})
|
|
15165
|
+
);
|
|
15166
|
+
return function useComposedScopes(overrideScopes) {
|
|
15167
|
+
const nextScopes1 = scopeHooks.reduce((nextScopes, { useScope: useScope , scopeName: scopeName })=>{
|
|
15168
|
+
// We are calling a hook inside a callback which React warns against to avoid inconsistent
|
|
15169
|
+
// renders, however, scoping doesn't have render side effects so we ignore the rule.
|
|
15170
|
+
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
15171
|
+
const scopeProps = useScope(overrideScopes);
|
|
15172
|
+
const currentScope = scopeProps[`__scope${scopeName}`];
|
|
15173
|
+
return {
|
|
15174
|
+
...nextScopes,
|
|
15175
|
+
...currentScope
|
|
15176
|
+
};
|
|
15177
|
+
}, {});
|
|
15178
|
+
return React.useMemo(()=>({
|
|
15179
|
+
[`__scope${baseScope.scopeName}`]: nextScopes1
|
|
15180
|
+
})
|
|
15181
|
+
, [
|
|
15182
|
+
nextScopes1
|
|
15183
|
+
]);
|
|
15184
|
+
};
|
|
15185
|
+
};
|
|
15186
|
+
createScope1.scopeName = baseScope.scopeName;
|
|
15187
|
+
return createScope1;
|
|
15188
|
+
}
|
|
15189
|
+
|
|
15190
|
+
/**
|
|
15191
|
+
* A custom hook that converts a callback to a ref to avoid triggering re-renders when passed as a
|
|
15192
|
+
* prop or avoid re-executing effects when passed as a dependency
|
|
15193
|
+
*/ function $b1b2314f5f9a1d84$export$25bec8c6f54ee79a(callback) {
|
|
15194
|
+
const callbackRef = React.useRef(callback);
|
|
15195
|
+
React.useEffect(()=>{
|
|
15196
|
+
callbackRef.current = callback;
|
|
15197
|
+
}); // https://github.com/facebook/react/issues/19240
|
|
15198
|
+
return React.useMemo(()=>(...args)=>{
|
|
15199
|
+
var _callbackRef$current;
|
|
15200
|
+
return (_callbackRef$current = callbackRef.current) === null || _callbackRef$current === void 0 ? void 0 : _callbackRef$current.call(callbackRef, ...args);
|
|
15201
|
+
}
|
|
15202
|
+
, []);
|
|
15203
|
+
}
|
|
15204
|
+
|
|
15205
|
+
function $71cd76cc60e0454e$export$6f32135080cb4c3({ prop: prop , defaultProp: defaultProp , onChange: onChange = ()=>{} }) {
|
|
15206
|
+
const [uncontrolledProp, setUncontrolledProp] = $71cd76cc60e0454e$var$useUncontrolledState({
|
|
15207
|
+
defaultProp: defaultProp,
|
|
15208
|
+
onChange: onChange
|
|
15209
|
+
});
|
|
15210
|
+
const isControlled = prop !== undefined;
|
|
15211
|
+
const value1 = isControlled ? prop : uncontrolledProp;
|
|
15212
|
+
const handleChange = $b1b2314f5f9a1d84$export$25bec8c6f54ee79a(onChange);
|
|
15213
|
+
const setValue = React.useCallback((nextValue)=>{
|
|
15214
|
+
if (isControlled) {
|
|
15215
|
+
const setter = nextValue;
|
|
15216
|
+
const value = typeof nextValue === 'function' ? setter(prop) : nextValue;
|
|
15217
|
+
if (value !== prop) handleChange(value);
|
|
15218
|
+
} else setUncontrolledProp(nextValue);
|
|
15219
|
+
}, [
|
|
15220
|
+
isControlled,
|
|
15221
|
+
prop,
|
|
15222
|
+
setUncontrolledProp,
|
|
15223
|
+
handleChange
|
|
15224
|
+
]);
|
|
15225
|
+
return [
|
|
15226
|
+
value1,
|
|
15227
|
+
setValue
|
|
15228
|
+
];
|
|
15229
|
+
}
|
|
15230
|
+
function $71cd76cc60e0454e$var$useUncontrolledState({ defaultProp: defaultProp , onChange: onChange }) {
|
|
15231
|
+
const uncontrolledState = React.useState(defaultProp);
|
|
15232
|
+
const [value] = uncontrolledState;
|
|
15233
|
+
const prevValueRef = React.useRef(value);
|
|
15234
|
+
const handleChange = $b1b2314f5f9a1d84$export$25bec8c6f54ee79a(onChange);
|
|
15235
|
+
React.useEffect(()=>{
|
|
15236
|
+
if (prevValueRef.current !== value) {
|
|
15237
|
+
handleChange(value);
|
|
15238
|
+
prevValueRef.current = value;
|
|
15239
|
+
}
|
|
15240
|
+
}, [
|
|
15241
|
+
value,
|
|
15242
|
+
prevValueRef,
|
|
15243
|
+
handleChange
|
|
15244
|
+
]);
|
|
15245
|
+
return uncontrolledState;
|
|
15246
|
+
}
|
|
15247
|
+
|
|
15248
|
+
/**
|
|
15249
|
+
* Set a given ref to a given value
|
|
15250
|
+
* This utility takes care of different types of refs: callback refs and RefObject(s)
|
|
15251
|
+
*/ function $6ed0406888f73fc4$var$setRef(ref, value) {
|
|
15252
|
+
if (typeof ref === 'function') ref(value);
|
|
15253
|
+
else if (ref !== null && ref !== undefined) ref.current = value;
|
|
15254
|
+
}
|
|
15255
|
+
/**
|
|
15256
|
+
* A utility to compose multiple refs together
|
|
15257
|
+
* Accepts callback refs and RefObject(s)
|
|
15258
|
+
*/ function $6ed0406888f73fc4$export$43e446d32b3d21af(...refs) {
|
|
15259
|
+
return (node)=>refs.forEach((ref)=>$6ed0406888f73fc4$var$setRef(ref, node)
|
|
15260
|
+
)
|
|
15261
|
+
;
|
|
15262
|
+
}
|
|
15263
|
+
/**
|
|
15264
|
+
* A custom hook that composes multiple refs
|
|
15265
|
+
* Accepts callback refs and RefObject(s)
|
|
15266
|
+
*/ function $6ed0406888f73fc4$export$c7b2cbe3552a0d05(...refs) {
|
|
15267
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
15268
|
+
return React.useCallback($6ed0406888f73fc4$export$43e446d32b3d21af(...refs), refs);
|
|
15269
|
+
}
|
|
15270
|
+
|
|
15271
|
+
function t(t){return t.split("-")[0]}function e(t){return t.split("-")[1]}function n$1(e){return ["top","bottom"].includes(t(e))?"x":"y"}function r$1(t){return "y"===t?"height":"width"}function i$1(i,o,a){let{reference:l,floating:s}=i;const c=l.x+l.width/2-s.width/2,f=l.y+l.height/2-s.height/2,u=n$1(o),m=r$1(u),g=l[m]/2-s[m]/2,d="x"===u;let p;switch(t(o)){case"top":p={x:c,y:l.y-s.height};break;case"bottom":p={x:c,y:l.y+l.height};break;case"right":p={x:l.x+l.width,y:f};break;case"left":p={x:l.x-s.width,y:f};break;default:p={x:l.x,y:l.y};}switch(e(o)){case"start":p[u]-=g*(a&&d?-1:1);break;case"end":p[u]+=g*(a&&d?-1:1);}return p}const o$1=async(t,e,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:a=[],platform:l}=n,s=await(null==l.isRTL?void 0:l.isRTL(e));let c=await l.getElementRects({reference:t,floating:e,strategy:o}),{x:f,y:u}=i$1(c,r,s),m=r,g={},d=0;for(let n=0;n<a.length;n++){const{name:p,fn:h}=a[n],{x:y,y:x,data:w,reset:v}=await h({x:f,y:u,initialPlacement:r,placement:m,strategy:o,middlewareData:g,rects:c,platform:l,elements:{reference:t,floating:e}});f=null!=y?y:f,u=null!=x?x:u,g={...g,[p]:{...g[p],...w}},v&&d<=50&&(d++,"object"==typeof v&&(v.placement&&(m=v.placement),v.rects&&(c=!0===v.rects?await l.getElementRects({reference:t,floating:e,strategy:o}):v.rects),({x:f,y:u}=i$1(c,m,s))),n=-1);}return {x:f,y:u,placement:m,strategy:o,middlewareData:g}};function a$1(t){return "number"!=typeof t?function(t){return {top:0,right:0,bottom:0,left:0,...t}}(t):{top:t,right:t,bottom:t,left:t}}function l$1(t){return {...t,top:t.y,left:t.x,right:t.x+t.width,bottom:t.y+t.height}}async function s$1(t,e){var n;void 0===e&&(e={});const{x:r,y:i,platform:o,rects:s,elements:c,strategy:f}=t,{boundary:u="clippingAncestors",rootBoundary:m="viewport",elementContext:g="floating",altBoundary:d=!1,padding:p=0}=e,h=a$1(p),y=c[d?"floating"===g?"reference":"floating":g],x=l$1(await o.getClippingRect({element:null==(n=await(null==o.isElement?void 0:o.isElement(y)))||n?y:y.contextElement||await(null==o.getDocumentElement?void 0:o.getDocumentElement(c.floating)),boundary:u,rootBoundary:m,strategy:f})),w=l$1(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({rect:"floating"===g?{...s.floating,x:r,y:i}:s.reference,offsetParent:await(null==o.getOffsetParent?void 0:o.getOffsetParent(c.floating)),strategy:f}):s[g]);return {top:x.top-w.top+h.top,bottom:w.bottom-x.bottom+h.bottom,left:x.left-w.left+h.left,right:w.right-x.right+h.right}}const c$1=Math.min,f$1=Math.max;function u$1(t,e,n){return f$1(t,c$1(e,n))}const m$1=t=>({name:"arrow",options:t,async fn(i){const{element:o,padding:l=0}=null!=t?t:{},{x:s,y:c,placement:f,rects:m,platform:g}=i;if(null==o)return {};const d=a$1(l),p={x:s,y:c},h=n$1(f),y=e(f),x=r$1(h),w=await g.getDimensions(o),v="y"===h?"top":"left",b="y"===h?"bottom":"right",R=m.reference[x]+m.reference[h]-p[h]-m.floating[x],A=p[h]-m.reference[h],P=await(null==g.getOffsetParent?void 0:g.getOffsetParent(o));let T=P?"y"===h?P.clientHeight||0:P.clientWidth||0:0;0===T&&(T=m.floating[x]);const O=R/2-A/2,D=d[v],L=T-w[x]-d[b],k=T/2-w[x]/2+O,E=u$1(D,k,L),C=("start"===y?d[v]:d[b])>0&&k!==E&&m.reference[x]<=m.floating[x];return {[h]:p[h]-(C?k<D?D-k:L-k:0),data:{[h]:E,centerOffset:k-E}}}}),g$1={left:"right",right:"left",bottom:"top",top:"bottom"};function d$1(t){return t.replace(/left|right|bottom|top/g,(t=>g$1[t]))}function p$1(t,i,o){void 0===o&&(o=!1);const a=e(t),l=n$1(t),s=r$1(l);let c="x"===l?a===(o?"end":"start")?"right":"left":"start"===a?"bottom":"top";return i.reference[s]>i.floating[s]&&(c=d$1(c)),{main:c,cross:d$1(c)}}const h$1={start:"end",end:"start"};function y$1(t){return t.replace(/start|end/g,(t=>h$1[t]))}const x$1=["top","right","bottom","left"];x$1.reduce(((t,e)=>t.concat(e,e+"-start",e+"-end")),[]);const b$1=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(n){var r;const{placement:i,middlewareData:o,rects:a,initialPlacement:l,platform:c,elements:f}=n,{mainAxis:u=!0,crossAxis:m=!0,fallbackPlacements:g,fallbackStrategy:h="bestFit",flipAlignment:x=!0,...w}=e,v=t(i),b=g||(v===l||!x?[d$1(l)]:function(t){const e=d$1(t);return [y$1(t),e,y$1(e)]}(l)),R=[l,...b],A=await s$1(n,w),P=[];let T=(null==(r=o.flip)?void 0:r.overflows)||[];if(u&&P.push(A[v]),m){const{main:t,cross:e}=p$1(i,a,await(null==c.isRTL?void 0:c.isRTL(f.floating)));P.push(A[t],A[e]);}if(T=[...T,{placement:i,overflows:P}],!P.every((t=>t<=0))){var O,D;const t=(null!=(O=null==(D=o.flip)?void 0:D.index)?O:0)+1,e=R[t];if(e)return {data:{index:t,overflows:T},reset:{placement:e}};let n="bottom";switch(h){case"bestFit":{var L;const t=null==(L=T.map((t=>[t,t.overflows.filter((t=>t>0)).reduce(((t,e)=>t+e),0)])).sort(((t,e)=>t[1]-e[1]))[0])?void 0:L[0].placement;t&&(n=t);break}case"initialPlacement":n=l;}if(i!==n)return {reset:{placement:n}}}return {}}}};function R$1(t,e){return {top:t.top-e.height,right:t.right-e.width,bottom:t.bottom-e.height,left:t.left-e.width}}function A(t){return x$1.some((e=>t[e]>=0))}const P=function(t){let{strategy:e="referenceHidden",...n}=void 0===t?{}:t;return {name:"hide",async fn(t){const{rects:r}=t;switch(e){case"referenceHidden":{const e=R$1(await s$1(t,{...n,elementContext:"reference"}),r.reference);return {data:{referenceHiddenOffsets:e,referenceHidden:A(e)}}}case"escaped":{const e=R$1(await s$1(t,{...n,altBoundary:!0}),r.floating);return {data:{escapedOffsets:e,escaped:A(e)}}}default:return {}}}}};const T$1=function(r){return void 0===r&&(r=0),{name:"offset",options:r,async fn(i){const{x:o,y:a}=i,l=await async function(r,i){const{placement:o,platform:a,elements:l}=r,s=await(null==a.isRTL?void 0:a.isRTL(l.floating)),c=t(o),f=e(o),u="x"===n$1(o),m=["left","top"].includes(c)?-1:1,g=s&&u?-1:1,d="function"==typeof i?i(r):i;let{mainAxis:p,crossAxis:h,alignmentAxis:y}="number"==typeof d?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...d};return f&&"number"==typeof y&&(h="end"===f?-1*y:y),u?{x:h*g,y:p*m}:{x:p*m,y:h*g}}(i,r);return {x:o+l.x,y:a+l.y,data:l}}}};function O(t){return "x"===t?"y":"x"}const D$1=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(r){const{x:i,y:o,placement:a}=r,{mainAxis:l=!0,crossAxis:c=!1,limiter:f={fn:t=>{let{x:e,y:n}=t;return {x:e,y:n}}},...m}=e,g={x:i,y:o},d=await s$1(r,m),p=n$1(t(a)),h=O(p);let y=g[p],x=g[h];if(l){const t="y"===p?"bottom":"right";y=u$1(y+d["y"===p?"top":"left"],y,y-d[t]);}if(c){const t="y"===h?"bottom":"right";x=u$1(x+d["y"===h?"top":"left"],x,x-d[t]);}const w=f.fn({...r,[p]:y,[h]:x});return {...w,data:{x:w.x-i,y:w.y-o}}}}},L$1=function(e){return void 0===e&&(e={}),{options:e,fn(r){const{x:i,y:o,placement:a,rects:l,middlewareData:s}=r,{offset:c=0,mainAxis:f=!0,crossAxis:u=!0}=e,m={x:i,y:o},g=n$1(a),d=O(g);let p=m[g],h=m[d];const y="function"==typeof c?c({...l,placement:a}):c,x="number"==typeof y?{mainAxis:y,crossAxis:0}:{mainAxis:0,crossAxis:0,...y};if(f){const t="y"===g?"height":"width",e=l.reference[g]-l.floating[t]+x.mainAxis,n=l.reference[g]+l.reference[t]-x.mainAxis;p<e?p=e:p>n&&(p=n);}if(u){var w,v,b,R;const e="y"===g?"width":"height",n=["top","left"].includes(t(a)),r=l.reference[d]-l.floating[e]+(n&&null!=(w=null==(v=s.offset)?void 0:v[d])?w:0)+(n?0:x.crossAxis),i=l.reference[d]+l.reference[e]+(n?0:null!=(b=null==(R=s.offset)?void 0:R[d])?b:0)-(n?x.crossAxis:0);h<r?h=r:h>i&&(h=i);}return {[g]:p,[d]:h}}}},k=function(n){return void 0===n&&(n={}),{name:"size",options:n,async fn(r){const{placement:i,rects:o,platform:a,elements:l}=r,{apply:c,...u}=n,m=await s$1(r,u),g=t(i),d=e(i);let p,h;"top"===g||"bottom"===g?(p=g,h=d===(await(null==a.isRTL?void 0:a.isRTL(l.floating))?"start":"end")?"left":"right"):(h=g,p="end"===d?"top":"bottom");const y=f$1(m.left,0),x=f$1(m.right,0),w=f$1(m.top,0),v=f$1(m.bottom,0),b={availableHeight:o.floating.height-(["left","right"].includes(i)?2*(0!==w||0!==v?w+v:f$1(m.top,m.bottom)):m[p]),availableWidth:o.floating.width-(["top","bottom"].includes(i)?2*(0!==y||0!==x?y+x:f$1(m.left,m.right)):m[h])},R=await a.getDimensions(l.floating);null==c||c({...r,...b});const A=await a.getDimensions(l.floating);return R.width!==A.width||R.height!==A.height?{reset:{rects:!0}}:{}}}};
|
|
15272
|
+
|
|
15273
|
+
function n(t){return t&&t.document&&t.location&&t.alert&&t.setInterval}function o(t){if(null==t)return window;if(!n(t)){const e=t.ownerDocument;return e&&e.defaultView||window}return t}function i(t){return o(t).getComputedStyle(t)}function r(t){return n(t)?"":t?(t.nodeName||"").toLowerCase():""}function l(){const t=navigator.userAgentData;return null!=t&&t.brands?t.brands.map((t=>t.brand+"/"+t.version)).join(" "):navigator.userAgent}function c(t){return t instanceof o(t).HTMLElement}function f(t){return t instanceof o(t).Element}function s(t){if("undefined"==typeof ShadowRoot)return !1;return t instanceof o(t).ShadowRoot||t instanceof ShadowRoot}function u(t){const{overflow:e,overflowX:n,overflowY:o}=i(t);return /auto|scroll|overlay|hidden/.test(e+o+n)}function d(t){return ["table","td","th"].includes(r(t))}function h(t){const e=/firefox/i.test(l()),n=i(t);return "none"!==n.transform||"none"!==n.perspective||"paint"===n.contain||["transform","perspective"].includes(n.willChange)||e&&"filter"===n.willChange||e&&!!n.filter&&"none"!==n.filter}function a(){return !/^((?!chrome|android).)*safari/i.test(l())}const g=Math.min,p=Math.max,m=Math.round;function w(t,e,n){var i,r,l,s;void 0===e&&(e=!1),void 0===n&&(n=!1);const u=t.getBoundingClientRect();let d=1,h=1;e&&c(t)&&(d=t.offsetWidth>0&&m(u.width)/t.offsetWidth||1,h=t.offsetHeight>0&&m(u.height)/t.offsetHeight||1);const g=f(t)?o(t):window,p=!a()&&n,w=(u.left+(p&&null!=(i=null==(r=g.visualViewport)?void 0:r.offsetLeft)?i:0))/d,v=(u.top+(p&&null!=(l=null==(s=g.visualViewport)?void 0:s.offsetTop)?l:0))/h,y=u.width/d,x=u.height/h;return {width:y,height:x,top:v,right:w+y,bottom:v+x,left:w,x:w,y:v}}function v(t){return (e=t,(e instanceof o(e).Node?t.ownerDocument:t.document)||window.document).documentElement;var e;}function y(t){return f(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function x(t){return w(v(t)).left+y(t).scrollLeft}function b(t,e,n){const o=c(e),i=v(e),l=w(t,o&&function(t){const e=w(t);return m(e.width)!==t.offsetWidth||m(e.height)!==t.offsetHeight}(e),"fixed"===n);let f={scrollLeft:0,scrollTop:0};const s={x:0,y:0};if(o||!o&&"fixed"!==n)if(("body"!==r(e)||u(i))&&(f=y(e)),c(e)){const t=w(e,!0);s.x=t.x+e.clientLeft,s.y=t.y+e.clientTop;}else i&&(s.x=x(i));return {x:l.left+f.scrollLeft-s.x,y:l.top+f.scrollTop-s.y,width:l.width,height:l.height}}function L(t){return "html"===r(t)?t:t.assignedSlot||t.parentNode||(s(t)?t.host:null)||v(t)}function R(t){return c(t)&&"fixed"!==getComputedStyle(t).position?t.offsetParent:null}function T(t){const e=o(t);let n=R(t);for(;n&&d(n)&&"static"===getComputedStyle(n).position;)n=R(n);return n&&("html"===r(n)||"body"===r(n)&&"static"===getComputedStyle(n).position&&!h(n))?e:n||function(t){let e=L(t);for(s(e)&&(e=e.host);c(e)&&!["html","body"].includes(r(e));){if(h(e))return e;e=e.parentNode;}return null}(t)||e}function W(t){if(c(t))return {width:t.offsetWidth,height:t.offsetHeight};const e=w(t);return {width:e.width,height:e.height}}function E(t){const e=L(t);return ["html","body","#document"].includes(r(e))?t.ownerDocument.body:c(e)&&u(e)?e:E(e)}function H(t,e){var n;void 0===e&&(e=[]);const i=E(t),r=i===(null==(n=t.ownerDocument)?void 0:n.body),l=o(i),c=r?[l].concat(l.visualViewport||[],u(i)?i:[]):i,f=e.concat(c);return r?f:f.concat(H(c))}function C(e,n,r){return "viewport"===n?l$1(function(t,e){const n=o(t),i=v(t),r=n.visualViewport;let l=i.clientWidth,c=i.clientHeight,f=0,s=0;if(r){l=r.width,c=r.height;const t=a();(t||!t&&"fixed"===e)&&(f=r.offsetLeft,s=r.offsetTop);}return {width:l,height:c,x:f,y:s}}(e,r)):f(n)?function(t,e){const n=w(t,!1,"fixed"===e),o=n.top+t.clientTop,i=n.left+t.clientLeft;return {top:o,left:i,x:i,y:o,right:i+t.clientWidth,bottom:o+t.clientHeight,width:t.clientWidth,height:t.clientHeight}}(n,r):l$1(function(t){var e;const n=v(t),o=y(t),r=null==(e=t.ownerDocument)?void 0:e.body,l=p(n.scrollWidth,n.clientWidth,r?r.scrollWidth:0,r?r.clientWidth:0),c=p(n.scrollHeight,n.clientHeight,r?r.scrollHeight:0,r?r.clientHeight:0);let f=-o.scrollLeft+x(t);const s=-o.scrollTop;return "rtl"===i(r||n).direction&&(f+=p(n.clientWidth,r?r.clientWidth:0)-l),{width:l,height:c,x:f,y:s}}(v(e)))}function S(t){const e=H(t),n=["absolute","fixed"].includes(i(t).position)&&c(t)?T(t):t;return f(n)?e.filter((t=>f(t)&&function(t,e){const n=null==e.getRootNode?void 0:e.getRootNode();if(t.contains(e))return !0;if(n&&s(n)){let n=e;do{if(n&&t===n)return !0;n=n.parentNode||n.host;}while(n)}return !1}(t,n)&&"body"!==r(t))):[]}const D={getClippingRect:function(t){let{element:e,boundary:n,rootBoundary:o,strategy:i}=t;const r=[..."clippingAncestors"===n?S(e):[].concat(n),o],l=r[0],c=r.reduce(((t,n)=>{const o=C(e,n,i);return t.top=p(o.top,t.top),t.right=g(o.right,t.right),t.bottom=g(o.bottom,t.bottom),t.left=p(o.left,t.left),t}),C(e,l,i));return {width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}},convertOffsetParentRelativeRectToViewportRelativeRect:function(t){let{rect:e,offsetParent:n,strategy:o}=t;const i=c(n),l=v(n);if(n===l)return e;let f={scrollLeft:0,scrollTop:0};const s={x:0,y:0};if((i||!i&&"fixed"!==o)&&(("body"!==r(n)||u(l))&&(f=y(n)),c(n))){const t=w(n,!0);s.x=t.x+n.clientLeft,s.y=t.y+n.clientTop;}return {...e,x:e.x-f.scrollLeft+s.x,y:e.y-f.scrollTop+s.y}},isElement:f,getDimensions:W,getOffsetParent:T,getDocumentElement:v,getElementRects:t=>{let{reference:e,floating:n,strategy:o}=t;return {reference:b(e,T(n),o),floating:{...W(n),x:0,y:0}}},getClientRects:t=>Array.from(t.getClientRects()),isRTL:t=>"rtl"===i(t).direction};function N(t,e,n,o){void 0===o&&(o={});const{ancestorScroll:i=!0,ancestorResize:r=!0,elementResize:l=!0,animationFrame:c=!1}=o,s=i&&!c,u=r&&!c,d=s||u?[...f(t)?H(t):[],...H(e)]:[];d.forEach((t=>{s&&t.addEventListener("scroll",n,{passive:!0}),u&&t.addEventListener("resize",n);}));let h,a=null;if(l){let o=!0;a=new ResizeObserver((()=>{o||n(),o=!1;})),f(t)&&!c&&a.observe(t),a.observe(e);}let g=c?w(t):null;return c&&function e(){const o=w(t);!g||o.x===g.x&&o.y===g.y&&o.width===g.width&&o.height===g.height||n();g=o,h=requestAnimationFrame(e);}(),n(),()=>{var t;d.forEach((t=>{s&&t.removeEventListener("scroll",n),u&&t.removeEventListener("resize",n);})),null==(t=a)||t.disconnect(),a=null,c&&cancelAnimationFrame(h);}}const z=(t,n,o)=>o$1(t,n,{platform:D,...o});
|
|
15274
|
+
|
|
15275
|
+
var index = typeof document !== 'undefined' ? React.useLayoutEffect : React.useEffect;
|
|
15276
|
+
|
|
15277
|
+
// Fork of `fast-deep-equal` that only does the comparisons we need and compares
|
|
15278
|
+
// functions
|
|
15279
|
+
function deepEqual(a, b) {
|
|
15280
|
+
if (a === b) {
|
|
15281
|
+
return true;
|
|
15282
|
+
}
|
|
15283
|
+
|
|
15284
|
+
if (typeof a !== typeof b) {
|
|
15285
|
+
return false;
|
|
15286
|
+
}
|
|
15287
|
+
|
|
15288
|
+
if (typeof a === 'function' && a.toString() === b.toString()) {
|
|
15289
|
+
return true;
|
|
15290
|
+
}
|
|
15291
|
+
|
|
15292
|
+
let length, i, keys;
|
|
15293
|
+
|
|
15294
|
+
if (a && b && typeof a == 'object') {
|
|
15295
|
+
if (Array.isArray(a)) {
|
|
15296
|
+
length = a.length;
|
|
15297
|
+
if (length != b.length) return false;
|
|
15298
|
+
|
|
15299
|
+
for (i = length; i-- !== 0;) {
|
|
15300
|
+
if (!deepEqual(a[i], b[i])) {
|
|
15301
|
+
return false;
|
|
15302
|
+
}
|
|
15303
|
+
}
|
|
15304
|
+
|
|
15305
|
+
return true;
|
|
15306
|
+
}
|
|
15307
|
+
|
|
15308
|
+
keys = Object.keys(a);
|
|
15309
|
+
length = keys.length;
|
|
15310
|
+
|
|
15311
|
+
if (length !== Object.keys(b).length) {
|
|
15312
|
+
return false;
|
|
15313
|
+
}
|
|
15314
|
+
|
|
15315
|
+
for (i = length; i-- !== 0;) {
|
|
15316
|
+
if (!Object.prototype.hasOwnProperty.call(b, keys[i])) {
|
|
15317
|
+
return false;
|
|
15318
|
+
}
|
|
15319
|
+
}
|
|
15320
|
+
|
|
15321
|
+
for (i = length; i-- !== 0;) {
|
|
15322
|
+
const key = keys[i];
|
|
15323
|
+
|
|
15324
|
+
if (key === '_owner' && a.$$typeof) {
|
|
15325
|
+
continue;
|
|
15326
|
+
}
|
|
15327
|
+
|
|
15328
|
+
if (!deepEqual(a[key], b[key])) {
|
|
15329
|
+
return false;
|
|
15330
|
+
}
|
|
15331
|
+
}
|
|
15332
|
+
|
|
15333
|
+
return true;
|
|
15334
|
+
}
|
|
15335
|
+
|
|
15336
|
+
return a !== a && b !== b;
|
|
15337
|
+
}
|
|
15338
|
+
|
|
15339
|
+
function useLatestRef(value) {
|
|
15340
|
+
const ref = React__namespace.useRef(value);
|
|
15341
|
+
index(() => {
|
|
15342
|
+
ref.current = value;
|
|
15343
|
+
});
|
|
15344
|
+
return ref;
|
|
15345
|
+
}
|
|
15346
|
+
|
|
15347
|
+
function useFloating(_temp) {
|
|
15348
|
+
let {
|
|
15349
|
+
middleware,
|
|
15350
|
+
placement = 'bottom',
|
|
15351
|
+
strategy = 'absolute',
|
|
15352
|
+
whileElementsMounted
|
|
15353
|
+
} = _temp === void 0 ? {} : _temp;
|
|
15354
|
+
const reference = React__namespace.useRef(null);
|
|
15355
|
+
const floating = React__namespace.useRef(null);
|
|
15356
|
+
const whileElementsMountedRef = useLatestRef(whileElementsMounted);
|
|
15357
|
+
const cleanupRef = React__namespace.useRef(null);
|
|
15358
|
+
const [data, setData] = React__namespace.useState({
|
|
15359
|
+
// Setting these to `null` will allow the consumer to determine if
|
|
15360
|
+
// `computePosition()` has run yet
|
|
15361
|
+
x: null,
|
|
15362
|
+
y: null,
|
|
15363
|
+
strategy,
|
|
15364
|
+
placement,
|
|
15365
|
+
middlewareData: {}
|
|
15366
|
+
});
|
|
15367
|
+
const [latestMiddleware, setLatestMiddleware] = React__namespace.useState(middleware);
|
|
15368
|
+
|
|
15369
|
+
if (!deepEqual(latestMiddleware == null ? void 0 : latestMiddleware.map(_ref => {
|
|
15370
|
+
let {
|
|
15371
|
+
options
|
|
15372
|
+
} = _ref;
|
|
15373
|
+
return options;
|
|
15374
|
+
}), middleware == null ? void 0 : middleware.map(_ref2 => {
|
|
15375
|
+
let {
|
|
15376
|
+
options
|
|
15377
|
+
} = _ref2;
|
|
15378
|
+
return options;
|
|
15379
|
+
}))) {
|
|
15380
|
+
setLatestMiddleware(middleware);
|
|
15381
|
+
}
|
|
15382
|
+
|
|
15383
|
+
const update = React__namespace.useCallback(() => {
|
|
15384
|
+
if (!reference.current || !floating.current) {
|
|
15385
|
+
return;
|
|
15386
|
+
}
|
|
15387
|
+
|
|
15388
|
+
z(reference.current, floating.current, {
|
|
15389
|
+
middleware: latestMiddleware,
|
|
15390
|
+
placement,
|
|
15391
|
+
strategy
|
|
15392
|
+
}).then(data => {
|
|
15393
|
+
if (isMountedRef.current) {
|
|
15394
|
+
ReactDOM__namespace.flushSync(() => {
|
|
15395
|
+
setData(data);
|
|
15396
|
+
});
|
|
15397
|
+
}
|
|
15398
|
+
});
|
|
15399
|
+
}, [latestMiddleware, placement, strategy]);
|
|
15400
|
+
index(() => {
|
|
15401
|
+
// Skip first update
|
|
15402
|
+
if (isMountedRef.current) {
|
|
15403
|
+
update();
|
|
15404
|
+
}
|
|
15405
|
+
}, [update]);
|
|
15406
|
+
const isMountedRef = React__namespace.useRef(false);
|
|
15407
|
+
index(() => {
|
|
15408
|
+
isMountedRef.current = true;
|
|
15409
|
+
return () => {
|
|
15410
|
+
isMountedRef.current = false;
|
|
15411
|
+
};
|
|
15412
|
+
}, []);
|
|
15413
|
+
const runElementMountCallback = React__namespace.useCallback(() => {
|
|
15414
|
+
if (typeof cleanupRef.current === 'function') {
|
|
15415
|
+
cleanupRef.current();
|
|
15416
|
+
cleanupRef.current = null;
|
|
15417
|
+
}
|
|
15418
|
+
|
|
15419
|
+
if (reference.current && floating.current) {
|
|
15420
|
+
if (whileElementsMountedRef.current) {
|
|
15421
|
+
const cleanupFn = whileElementsMountedRef.current(reference.current, floating.current, update);
|
|
15422
|
+
cleanupRef.current = cleanupFn;
|
|
15423
|
+
} else {
|
|
15424
|
+
update();
|
|
15425
|
+
}
|
|
15426
|
+
}
|
|
15427
|
+
}, [update, whileElementsMountedRef]);
|
|
15428
|
+
const setReference = React__namespace.useCallback(node => {
|
|
15429
|
+
reference.current = node;
|
|
15430
|
+
runElementMountCallback();
|
|
15431
|
+
}, [runElementMountCallback]);
|
|
15432
|
+
const setFloating = React__namespace.useCallback(node => {
|
|
15433
|
+
floating.current = node;
|
|
15434
|
+
runElementMountCallback();
|
|
15435
|
+
}, [runElementMountCallback]);
|
|
15436
|
+
const refs = React__namespace.useMemo(() => ({
|
|
15437
|
+
reference,
|
|
15438
|
+
floating
|
|
15439
|
+
}), []);
|
|
15440
|
+
return React__namespace.useMemo(() => ({ ...data,
|
|
15441
|
+
update,
|
|
15442
|
+
refs,
|
|
15443
|
+
reference: setReference,
|
|
15444
|
+
floating: setFloating
|
|
15445
|
+
}), [data, update, refs, setReference, setFloating]);
|
|
15446
|
+
}
|
|
15447
|
+
|
|
15448
|
+
/**
|
|
15449
|
+
* Positions an inner element of the floating element such that it is centered
|
|
15450
|
+
* to the reference element.
|
|
15451
|
+
* This wraps the core `arrow` middleware to allow React refs as the element.
|
|
15452
|
+
* @see https://floating-ui.com/docs/arrow
|
|
15453
|
+
*/
|
|
15454
|
+
|
|
15455
|
+
const arrow = options => {
|
|
15456
|
+
const {
|
|
15457
|
+
element,
|
|
15458
|
+
padding
|
|
15459
|
+
} = options;
|
|
15460
|
+
|
|
15461
|
+
function isRef(value) {
|
|
15462
|
+
return Object.prototype.hasOwnProperty.call(value, 'current');
|
|
15463
|
+
}
|
|
15464
|
+
|
|
15465
|
+
return {
|
|
15466
|
+
name: 'arrow',
|
|
15467
|
+
options,
|
|
15468
|
+
|
|
15469
|
+
fn(args) {
|
|
15470
|
+
if (isRef(element)) {
|
|
15471
|
+
if (element.current != null) {
|
|
15472
|
+
return m$1({
|
|
15473
|
+
element: element.current,
|
|
15474
|
+
padding
|
|
15475
|
+
}).fn(args);
|
|
15476
|
+
}
|
|
15477
|
+
|
|
15478
|
+
return {};
|
|
15479
|
+
} else if (element) {
|
|
15480
|
+
return m$1({
|
|
15481
|
+
element,
|
|
15482
|
+
padding
|
|
15483
|
+
}).fn(args);
|
|
15484
|
+
}
|
|
15485
|
+
|
|
15486
|
+
return {};
|
|
15487
|
+
}
|
|
15488
|
+
|
|
15489
|
+
};
|
|
15490
|
+
};
|
|
15491
|
+
|
|
15492
|
+
/* -------------------------------------------------------------------------------------------------
|
|
15493
|
+
* Slot
|
|
15494
|
+
* -----------------------------------------------------------------------------------------------*/ const $5e63c961fc1ce211$export$8c6ed5c666ac1360 = /*#__PURE__*/ React.forwardRef((props, forwardedRef)=>{
|
|
15495
|
+
const { children: children , ...slotProps } = props;
|
|
15496
|
+
const childrenArray = React.Children.toArray(children);
|
|
15497
|
+
const slottable = childrenArray.find($5e63c961fc1ce211$var$isSlottable);
|
|
15498
|
+
if (slottable) {
|
|
15499
|
+
// the new element to render is the one passed as a child of `Slottable`
|
|
15500
|
+
const newElement = slottable.props.children;
|
|
15501
|
+
const newChildren = childrenArray.map((child)=>{
|
|
15502
|
+
if (child === slottable) {
|
|
15503
|
+
// because the new element will be the one rendered, we are only interested
|
|
15504
|
+
// in grabbing its children (`newElement.props.children`)
|
|
15505
|
+
if (React.Children.count(newElement) > 1) return React.Children.only(null);
|
|
15506
|
+
return /*#__PURE__*/ React.isValidElement(newElement) ? newElement.props.children : null;
|
|
15507
|
+
} else return child;
|
|
15508
|
+
});
|
|
15509
|
+
return /*#__PURE__*/ React.createElement($5e63c961fc1ce211$var$SlotClone, _extends({}, slotProps, {
|
|
15510
|
+
ref: forwardedRef
|
|
15511
|
+
}), /*#__PURE__*/ React.isValidElement(newElement) ? /*#__PURE__*/ React.cloneElement(newElement, undefined, newChildren) : null);
|
|
15512
|
+
}
|
|
15513
|
+
return /*#__PURE__*/ React.createElement($5e63c961fc1ce211$var$SlotClone, _extends({}, slotProps, {
|
|
15514
|
+
ref: forwardedRef
|
|
15515
|
+
}), children);
|
|
15516
|
+
});
|
|
15517
|
+
$5e63c961fc1ce211$export$8c6ed5c666ac1360.displayName = 'Slot';
|
|
15518
|
+
/* -------------------------------------------------------------------------------------------------
|
|
15519
|
+
* SlotClone
|
|
15520
|
+
* -----------------------------------------------------------------------------------------------*/ const $5e63c961fc1ce211$var$SlotClone = /*#__PURE__*/ React.forwardRef((props, forwardedRef)=>{
|
|
15521
|
+
const { children: children , ...slotProps } = props;
|
|
15522
|
+
if (/*#__PURE__*/ React.isValidElement(children)) return /*#__PURE__*/ React.cloneElement(children, {
|
|
15523
|
+
...$5e63c961fc1ce211$var$mergeProps(slotProps, children.props),
|
|
15524
|
+
ref: $6ed0406888f73fc4$export$43e446d32b3d21af(forwardedRef, children.ref)
|
|
15525
|
+
});
|
|
15526
|
+
return React.Children.count(children) > 1 ? React.Children.only(null) : null;
|
|
15527
|
+
});
|
|
15528
|
+
$5e63c961fc1ce211$var$SlotClone.displayName = 'SlotClone';
|
|
15529
|
+
/* -------------------------------------------------------------------------------------------------
|
|
15530
|
+
* Slottable
|
|
15531
|
+
* -----------------------------------------------------------------------------------------------*/ const $5e63c961fc1ce211$export$d9f1ccf0bdb05d45 = ({ children: children })=>{
|
|
15532
|
+
return /*#__PURE__*/ React.createElement(React.Fragment, null, children);
|
|
15533
|
+
};
|
|
15534
|
+
/* ---------------------------------------------------------------------------------------------- */ function $5e63c961fc1ce211$var$isSlottable(child) {
|
|
15535
|
+
return /*#__PURE__*/ React.isValidElement(child) && child.type === $5e63c961fc1ce211$export$d9f1ccf0bdb05d45;
|
|
15536
|
+
}
|
|
15537
|
+
function $5e63c961fc1ce211$var$mergeProps(slotProps, childProps) {
|
|
15538
|
+
// all child props should override
|
|
15539
|
+
const overrideProps = {
|
|
15540
|
+
...childProps
|
|
15541
|
+
};
|
|
15542
|
+
for(const propName in childProps){
|
|
15543
|
+
const slotPropValue = slotProps[propName];
|
|
15544
|
+
const childPropValue = childProps[propName];
|
|
15545
|
+
const isHandler = /^on[A-Z]/.test(propName);
|
|
15546
|
+
if (isHandler) {
|
|
15547
|
+
// if the handler exists on both, we compose them
|
|
15548
|
+
if (slotPropValue && childPropValue) overrideProps[propName] = (...args)=>{
|
|
15549
|
+
childPropValue(...args);
|
|
15550
|
+
slotPropValue(...args);
|
|
15551
|
+
};
|
|
15552
|
+
else if (slotPropValue) overrideProps[propName] = slotPropValue;
|
|
15553
|
+
} else if (propName === 'style') overrideProps[propName] = {
|
|
15554
|
+
...slotPropValue,
|
|
15555
|
+
...childPropValue
|
|
15556
|
+
};
|
|
15557
|
+
else if (propName === 'className') overrideProps[propName] = [
|
|
15558
|
+
slotPropValue,
|
|
15559
|
+
childPropValue
|
|
15560
|
+
].filter(Boolean).join(' ');
|
|
15561
|
+
}
|
|
15562
|
+
return {
|
|
15563
|
+
...slotProps,
|
|
15564
|
+
...overrideProps
|
|
15565
|
+
};
|
|
15566
|
+
}
|
|
15567
|
+
|
|
15568
|
+
const $8927f6f2acc4f386$var$NODES = [
|
|
15569
|
+
'a',
|
|
15570
|
+
'button',
|
|
15571
|
+
'div',
|
|
15572
|
+
'h2',
|
|
15573
|
+
'h3',
|
|
15574
|
+
'img',
|
|
15575
|
+
'label',
|
|
15576
|
+
'li',
|
|
15577
|
+
'nav',
|
|
15578
|
+
'ol',
|
|
15579
|
+
'p',
|
|
15580
|
+
'span',
|
|
15581
|
+
'svg',
|
|
15582
|
+
'ul'
|
|
15583
|
+
]; // Temporary while we await merge of this fix:
|
|
15584
|
+
// https://github.com/DefinitelyTyped/DefinitelyTyped/pull/55396
|
|
15585
|
+
// prettier-ignore
|
|
15586
|
+
/* -------------------------------------------------------------------------------------------------
|
|
15587
|
+
* Primitive
|
|
15588
|
+
* -----------------------------------------------------------------------------------------------*/ const $8927f6f2acc4f386$export$250ffa63cdc0d034 = $8927f6f2acc4f386$var$NODES.reduce((primitive, node)=>{
|
|
15589
|
+
const Node = /*#__PURE__*/ React.forwardRef((props, forwardedRef)=>{
|
|
15590
|
+
const { asChild: asChild , ...primitiveProps } = props;
|
|
15591
|
+
const Comp = asChild ? $5e63c961fc1ce211$export$8c6ed5c666ac1360 : node;
|
|
15592
|
+
React.useEffect(()=>{
|
|
15593
|
+
window[Symbol.for('radix-ui')] = true;
|
|
15594
|
+
}, []);
|
|
15595
|
+
return /*#__PURE__*/ React.createElement(Comp, _extends({}, primitiveProps, {
|
|
15596
|
+
ref: forwardedRef
|
|
15597
|
+
}));
|
|
15598
|
+
});
|
|
15599
|
+
Node.displayName = `Primitive.${node}`;
|
|
15600
|
+
return {
|
|
15601
|
+
...primitive,
|
|
15602
|
+
[node]: Node
|
|
15603
|
+
};
|
|
15604
|
+
}, {});
|
|
15605
|
+
/* -------------------------------------------------------------------------------------------------
|
|
15606
|
+
* Utils
|
|
15607
|
+
* -----------------------------------------------------------------------------------------------*/ /**
|
|
15608
|
+
* Flush custom event dispatch
|
|
15609
|
+
* https://github.com/radix-ui/primitives/pull/1378
|
|
15610
|
+
*
|
|
15611
|
+
* React batches *all* event handlers since version 18, this introduces certain considerations when using custom event types.
|
|
15612
|
+
*
|
|
15613
|
+
* Internally, React prioritises events in the following order:
|
|
15614
|
+
* - discrete
|
|
15615
|
+
* - continuous
|
|
15616
|
+
* - default
|
|
15617
|
+
*
|
|
15618
|
+
* https://github.com/facebook/react/blob/a8a4742f1c54493df00da648a3f9d26e3db9c8b5/packages/react-dom/src/events/ReactDOMEventListener.js#L294-L350
|
|
15619
|
+
*
|
|
15620
|
+
* `discrete` is an important distinction as updates within these events are applied immediately.
|
|
15621
|
+
* React however, is not able to infer the priority of custom event types due to how they are detected internally.
|
|
15622
|
+
* Because of this, it's possible for updates from custom events to be unexpectedly batched when
|
|
15623
|
+
* dispatched by another `discrete` event.
|
|
15624
|
+
*
|
|
15625
|
+
* In order to ensure that updates from custom events are applied predictably, we need to manually flush the batch.
|
|
15626
|
+
* This utility should be used when dispatching a custom event from within another `discrete` event, this utility
|
|
15627
|
+
* is not nessesary when dispatching known event types, or if dispatching a custom type inside a non-discrete event.
|
|
15628
|
+
* For example:
|
|
15629
|
+
*
|
|
15630
|
+
* dispatching a known click 👎
|
|
15631
|
+
* target.dispatchEvent(new Event(‘click’))
|
|
15632
|
+
*
|
|
15633
|
+
* dispatching a custom type within a non-discrete event 👎
|
|
15634
|
+
* onScroll={(event) => event.target.dispatchEvent(new CustomEvent(‘customType’))}
|
|
15635
|
+
*
|
|
15636
|
+
* dispatching a custom type within a `discrete` event 👍
|
|
15637
|
+
* onPointerDown={(event) => dispatchDiscreteCustomEvent(event.target, new CustomEvent(‘customType’))}
|
|
15638
|
+
*
|
|
15639
|
+
* Note: though React classifies `focus`, `focusin` and `focusout` events as `discrete`, it's not recommended to use
|
|
15640
|
+
* this utility with them. This is because it's possible for those handlers to be called implicitly during render
|
|
15641
|
+
* e.g. when focus is within a component as it is unmounted, or when managing focus on mount.
|
|
15642
|
+
*/ function $8927f6f2acc4f386$export$6d1a0317bde7de7f(target, event) {
|
|
15643
|
+
if (target) ReactDOM.flushSync(()=>target.dispatchEvent(event)
|
|
15644
|
+
);
|
|
15645
|
+
}
|
|
15646
|
+
|
|
15647
|
+
const $7e8f5cd07187803e$export$21b07c8f274aebd5 = /*#__PURE__*/ React.forwardRef((props, forwardedRef)=>{
|
|
15648
|
+
const { children: children , width: width = 10 , height: height = 5 , ...arrowProps } = props;
|
|
15649
|
+
return /*#__PURE__*/ React.createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.svg, _extends({}, arrowProps, {
|
|
15650
|
+
ref: forwardedRef,
|
|
15651
|
+
width: width,
|
|
15652
|
+
height: height,
|
|
15653
|
+
viewBox: "0 0 30 10",
|
|
15654
|
+
preserveAspectRatio: "none"
|
|
15655
|
+
}), props.asChild ? children : /*#__PURE__*/ React.createElement("polygon", {
|
|
15656
|
+
points: "0,0 30,0 15,10"
|
|
15657
|
+
}));
|
|
15658
|
+
});
|
|
15659
|
+
/* -----------------------------------------------------------------------------------------------*/ const $7e8f5cd07187803e$export$be92b6f5f03c0fe9 = $7e8f5cd07187803e$export$21b07c8f274aebd5;
|
|
15660
|
+
|
|
15661
|
+
/**
|
|
15662
|
+
* On the server, React emits a warning when calling `useLayoutEffect`.
|
|
15663
|
+
* This is because neither `useLayoutEffect` nor `useEffect` run on the server.
|
|
15664
|
+
* We use this safe version which suppresses the warning by replacing it with a noop on the server.
|
|
15665
|
+
*
|
|
15666
|
+
* See: https://reactjs.org/docs/hooks-reference.html#uselayouteffect
|
|
15667
|
+
*/ const $9f79659886946c16$export$e5c5a5f917a5871c = Boolean(globalThis === null || globalThis === void 0 ? void 0 : globalThis.document) ? React.useLayoutEffect : ()=>{};
|
|
15668
|
+
|
|
15669
|
+
function $db6c3485150b8e66$export$1ab7ae714698c4b8(element) {
|
|
15670
|
+
const [size, setSize] = React.useState(undefined);
|
|
15671
|
+
$9f79659886946c16$export$e5c5a5f917a5871c(()=>{
|
|
15672
|
+
if (element) {
|
|
15673
|
+
// provide size as early as possible
|
|
15674
|
+
setSize({
|
|
15675
|
+
width: element.offsetWidth,
|
|
15676
|
+
height: element.offsetHeight
|
|
15677
|
+
});
|
|
15678
|
+
const resizeObserver = new ResizeObserver((entries)=>{
|
|
15679
|
+
if (!Array.isArray(entries)) return;
|
|
15680
|
+
// Since we only observe the one element, we don't need to loop over the
|
|
15681
|
+
// array
|
|
15682
|
+
if (!entries.length) return;
|
|
15683
|
+
const entry = entries[0];
|
|
15684
|
+
let width;
|
|
15685
|
+
let height;
|
|
15686
|
+
if ('borderBoxSize' in entry) {
|
|
15687
|
+
const borderSizeEntry = entry['borderBoxSize']; // iron out differences between browsers
|
|
15688
|
+
const borderSize = Array.isArray(borderSizeEntry) ? borderSizeEntry[0] : borderSizeEntry;
|
|
15689
|
+
width = borderSize['inlineSize'];
|
|
15690
|
+
height = borderSize['blockSize'];
|
|
15691
|
+
} else {
|
|
15692
|
+
// for browsers that don't support `borderBoxSize`
|
|
15693
|
+
// we calculate it ourselves to get the correct border box.
|
|
15694
|
+
width = element.offsetWidth;
|
|
15695
|
+
height = element.offsetHeight;
|
|
15696
|
+
}
|
|
15697
|
+
setSize({
|
|
15698
|
+
width: width,
|
|
15699
|
+
height: height
|
|
15700
|
+
});
|
|
15701
|
+
});
|
|
15702
|
+
resizeObserver.observe(element, {
|
|
15703
|
+
box: 'border-box'
|
|
15704
|
+
});
|
|
15705
|
+
return ()=>resizeObserver.unobserve(element)
|
|
15706
|
+
;
|
|
15707
|
+
} else // We only want to reset to `undefined` when the element becomes `null`,
|
|
15708
|
+
// not if it changes to another element.
|
|
15709
|
+
setSize(undefined);
|
|
15710
|
+
}, [
|
|
15711
|
+
element
|
|
15712
|
+
]);
|
|
15713
|
+
return size;
|
|
15714
|
+
}
|
|
15715
|
+
|
|
15716
|
+
/* -------------------------------------------------------------------------------------------------
|
|
15717
|
+
* Popper
|
|
15718
|
+
* -----------------------------------------------------------------------------------------------*/ const $cf1ac5d9fe0e8206$var$POPPER_NAME = 'Popper';
|
|
15719
|
+
const [$cf1ac5d9fe0e8206$var$createPopperContext, $cf1ac5d9fe0e8206$export$722aac194ae923] = $c512c27ab02ef895$export$50c7b4e9d9f19c1($cf1ac5d9fe0e8206$var$POPPER_NAME);
|
|
15720
|
+
const [$cf1ac5d9fe0e8206$var$PopperProvider, $cf1ac5d9fe0e8206$var$usePopperContext] = $cf1ac5d9fe0e8206$var$createPopperContext($cf1ac5d9fe0e8206$var$POPPER_NAME);
|
|
15721
|
+
const $cf1ac5d9fe0e8206$export$badac9ada3a0bdf9 = (props)=>{
|
|
15722
|
+
const { __scopePopper: __scopePopper , children: children } = props;
|
|
15723
|
+
const [anchor, setAnchor] = React.useState(null);
|
|
15724
|
+
return /*#__PURE__*/ React.createElement($cf1ac5d9fe0e8206$var$PopperProvider, {
|
|
15725
|
+
scope: __scopePopper,
|
|
15726
|
+
anchor: anchor,
|
|
15727
|
+
onAnchorChange: setAnchor
|
|
15728
|
+
}, children);
|
|
15729
|
+
};
|
|
15730
|
+
/* -------------------------------------------------------------------------------------------------
|
|
15731
|
+
* PopperAnchor
|
|
15732
|
+
* -----------------------------------------------------------------------------------------------*/ const $cf1ac5d9fe0e8206$var$ANCHOR_NAME = 'PopperAnchor';
|
|
15733
|
+
const $cf1ac5d9fe0e8206$export$ecd4e1ccab6ed6d = /*#__PURE__*/ React.forwardRef((props, forwardedRef)=>{
|
|
15734
|
+
const { __scopePopper: __scopePopper , virtualRef: virtualRef , ...anchorProps } = props;
|
|
15735
|
+
const context = $cf1ac5d9fe0e8206$var$usePopperContext($cf1ac5d9fe0e8206$var$ANCHOR_NAME, __scopePopper);
|
|
15736
|
+
const ref = React.useRef(null);
|
|
15737
|
+
const composedRefs = $6ed0406888f73fc4$export$c7b2cbe3552a0d05(forwardedRef, ref);
|
|
15738
|
+
React.useEffect(()=>{
|
|
15739
|
+
// Consumer can anchor the popper to something that isn't
|
|
15740
|
+
// a DOM node e.g. pointer position, so we override the
|
|
15741
|
+
// `anchorRef` with their virtual ref in this case.
|
|
15742
|
+
context.onAnchorChange((virtualRef === null || virtualRef === void 0 ? void 0 : virtualRef.current) || ref.current);
|
|
15743
|
+
});
|
|
15744
|
+
return virtualRef ? null : /*#__PURE__*/ React.createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.div, _extends({}, anchorProps, {
|
|
15745
|
+
ref: composedRefs
|
|
15746
|
+
}));
|
|
15747
|
+
});
|
|
15748
|
+
/* -------------------------------------------------------------------------------------------------
|
|
15749
|
+
* PopperContent
|
|
15750
|
+
* -----------------------------------------------------------------------------------------------*/ const $cf1ac5d9fe0e8206$var$CONTENT_NAME = 'PopperContent';
|
|
15751
|
+
const [$cf1ac5d9fe0e8206$var$PopperContentProvider, $cf1ac5d9fe0e8206$var$useContentContext] = $cf1ac5d9fe0e8206$var$createPopperContext($cf1ac5d9fe0e8206$var$CONTENT_NAME);
|
|
15752
|
+
const [$cf1ac5d9fe0e8206$var$PositionContextProvider, $cf1ac5d9fe0e8206$var$usePositionContext] = $cf1ac5d9fe0e8206$var$createPopperContext($cf1ac5d9fe0e8206$var$CONTENT_NAME, {
|
|
15753
|
+
hasParent: false,
|
|
15754
|
+
positionUpdateFns: new Set()
|
|
15755
|
+
});
|
|
15756
|
+
const $cf1ac5d9fe0e8206$export$bc4ae5855d3c4fc = /*#__PURE__*/ React.forwardRef((props, forwardedRef)=>{
|
|
15757
|
+
var _arrowSize$width, _arrowSize$height, _middlewareData$arrow, _middlewareData$arrow2, _middlewareData$arrow3, _middlewareData$hide, _middlewareData$trans, _middlewareData$trans2;
|
|
15758
|
+
const { __scopePopper: __scopePopper , side: side = 'bottom' , sideOffset: sideOffset = 0 , align: align = 'center' , alignOffset: alignOffset = 0 , arrowPadding: arrowPadding = 0 , collisionBoundary: collisionBoundary = [] , collisionPadding: collisionPaddingProp = 0 , sticky: sticky = 'partial' , hideWhenDetached: hideWhenDetached = false , avoidCollisions: avoidCollisions = true , onPlaced: onPlaced , ...contentProps } = props;
|
|
15759
|
+
const context = $cf1ac5d9fe0e8206$var$usePopperContext($cf1ac5d9fe0e8206$var$CONTENT_NAME, __scopePopper);
|
|
15760
|
+
const [content, setContent] = React.useState(null);
|
|
15761
|
+
const composedRefs = $6ed0406888f73fc4$export$c7b2cbe3552a0d05(forwardedRef, (node)=>setContent(node)
|
|
15762
|
+
);
|
|
15763
|
+
const [arrow$1, setArrow] = React.useState(null);
|
|
15764
|
+
const arrowSize = $db6c3485150b8e66$export$1ab7ae714698c4b8(arrow$1);
|
|
15765
|
+
const arrowWidth = (_arrowSize$width = arrowSize === null || arrowSize === void 0 ? void 0 : arrowSize.width) !== null && _arrowSize$width !== void 0 ? _arrowSize$width : 0;
|
|
15766
|
+
const arrowHeight = (_arrowSize$height = arrowSize === null || arrowSize === void 0 ? void 0 : arrowSize.height) !== null && _arrowSize$height !== void 0 ? _arrowSize$height : 0;
|
|
15767
|
+
const desiredPlacement = side + (align !== 'center' ? '-' + align : '');
|
|
15768
|
+
const collisionPadding = typeof collisionPaddingProp === 'number' ? collisionPaddingProp : {
|
|
15769
|
+
top: 0,
|
|
15770
|
+
right: 0,
|
|
15771
|
+
bottom: 0,
|
|
15772
|
+
left: 0,
|
|
15773
|
+
...collisionPaddingProp
|
|
15774
|
+
};
|
|
15775
|
+
const boundary = Array.isArray(collisionBoundary) ? collisionBoundary : [
|
|
15776
|
+
collisionBoundary
|
|
15777
|
+
];
|
|
15778
|
+
const hasExplicitBoundaries = boundary.length > 0;
|
|
15779
|
+
const detectOverflowOptions = {
|
|
15780
|
+
padding: collisionPadding,
|
|
15781
|
+
boundary: boundary.filter($cf1ac5d9fe0e8206$var$isNotNull),
|
|
15782
|
+
// with `strategy: 'fixed'`, this is the only way to get it to respect boundaries
|
|
15783
|
+
altBoundary: hasExplicitBoundaries
|
|
15784
|
+
};
|
|
15785
|
+
const { reference: reference , floating: floating , strategy: strategy , x: x , y: y , placement: placement , middlewareData: middlewareData , update: update } = useFloating({
|
|
15786
|
+
// default to `fixed` strategy so users don't have to pick and we also avoid focus scroll issues
|
|
15787
|
+
strategy: 'fixed',
|
|
15788
|
+
placement: desiredPlacement,
|
|
15789
|
+
whileElementsMounted: N,
|
|
15790
|
+
middleware: [
|
|
15791
|
+
$cf1ac5d9fe0e8206$var$anchorCssProperties(),
|
|
15792
|
+
T$1({
|
|
15793
|
+
mainAxis: sideOffset + arrowHeight,
|
|
15794
|
+
alignmentAxis: alignOffset
|
|
15795
|
+
}),
|
|
15796
|
+
avoidCollisions ? D$1({
|
|
15797
|
+
mainAxis: true,
|
|
15798
|
+
crossAxis: false,
|
|
15799
|
+
limiter: sticky === 'partial' ? L$1() : undefined,
|
|
15800
|
+
...detectOverflowOptions
|
|
15801
|
+
}) : undefined,
|
|
15802
|
+
arrow$1 ? arrow({
|
|
15803
|
+
element: arrow$1,
|
|
15804
|
+
padding: arrowPadding
|
|
15805
|
+
}) : undefined,
|
|
15806
|
+
avoidCollisions ? b$1({
|
|
15807
|
+
...detectOverflowOptions
|
|
15808
|
+
}) : undefined,
|
|
15809
|
+
k({
|
|
15810
|
+
...detectOverflowOptions,
|
|
15811
|
+
apply: ({ elements: elements , availableWidth: width , availableHeight: height })=>{
|
|
15812
|
+
elements.floating.style.setProperty('--radix-popper-available-width', `${width}px`);
|
|
15813
|
+
elements.floating.style.setProperty('--radix-popper-available-height', `${height}px`);
|
|
15814
|
+
}
|
|
15815
|
+
}),
|
|
15816
|
+
$cf1ac5d9fe0e8206$var$transformOrigin({
|
|
15817
|
+
arrowWidth: arrowWidth,
|
|
15818
|
+
arrowHeight: arrowHeight
|
|
15819
|
+
}),
|
|
15820
|
+
hideWhenDetached ? P({
|
|
15821
|
+
strategy: 'referenceHidden'
|
|
15822
|
+
}) : undefined
|
|
15823
|
+
].filter($cf1ac5d9fe0e8206$var$isDefined)
|
|
15824
|
+
}); // assign the reference dynamically once `Content` has mounted so we can collocate the logic
|
|
15825
|
+
$9f79659886946c16$export$e5c5a5f917a5871c(()=>{
|
|
15826
|
+
reference(context.anchor);
|
|
15827
|
+
}, [
|
|
15828
|
+
reference,
|
|
15829
|
+
context.anchor
|
|
15830
|
+
]);
|
|
15831
|
+
const isPlaced = x !== null && y !== null;
|
|
15832
|
+
const [placedSide, placedAlign] = $cf1ac5d9fe0e8206$var$getSideAndAlignFromPlacement(placement);
|
|
15833
|
+
const handlePlaced = $b1b2314f5f9a1d84$export$25bec8c6f54ee79a(onPlaced);
|
|
15834
|
+
$9f79659886946c16$export$e5c5a5f917a5871c(()=>{
|
|
15835
|
+
if (isPlaced) handlePlaced === null || handlePlaced === void 0 || handlePlaced();
|
|
15836
|
+
}, [
|
|
15837
|
+
isPlaced,
|
|
15838
|
+
handlePlaced
|
|
15839
|
+
]);
|
|
15840
|
+
const arrowX = (_middlewareData$arrow = middlewareData.arrow) === null || _middlewareData$arrow === void 0 ? void 0 : _middlewareData$arrow.x;
|
|
15841
|
+
const arrowY = (_middlewareData$arrow2 = middlewareData.arrow) === null || _middlewareData$arrow2 === void 0 ? void 0 : _middlewareData$arrow2.y;
|
|
15842
|
+
const cannotCenterArrow = ((_middlewareData$arrow3 = middlewareData.arrow) === null || _middlewareData$arrow3 === void 0 ? void 0 : _middlewareData$arrow3.centerOffset) !== 0;
|
|
15843
|
+
const [contentZIndex, setContentZIndex] = React.useState();
|
|
15844
|
+
$9f79659886946c16$export$e5c5a5f917a5871c(()=>{
|
|
15845
|
+
if (content) setContentZIndex(window.getComputedStyle(content).zIndex);
|
|
15846
|
+
}, [
|
|
15847
|
+
content
|
|
15848
|
+
]);
|
|
15849
|
+
const { hasParent: hasParent , positionUpdateFns: positionUpdateFns } = $cf1ac5d9fe0e8206$var$usePositionContext($cf1ac5d9fe0e8206$var$CONTENT_NAME, __scopePopper);
|
|
15850
|
+
const isRoot = !hasParent;
|
|
15851
|
+
React.useLayoutEffect(()=>{
|
|
15852
|
+
if (!isRoot) {
|
|
15853
|
+
positionUpdateFns.add(update);
|
|
15854
|
+
return ()=>{
|
|
15855
|
+
positionUpdateFns.delete(update);
|
|
15856
|
+
};
|
|
15857
|
+
}
|
|
15858
|
+
}, [
|
|
15859
|
+
isRoot,
|
|
15860
|
+
positionUpdateFns,
|
|
15861
|
+
update
|
|
15862
|
+
]); // when nested contents are rendered in portals, they are appended out of order causing
|
|
15863
|
+
// children to be positioned incorrectly if initially open.
|
|
15864
|
+
// we need to re-compute the positioning once the parent has finally been placed.
|
|
15865
|
+
// https://github.com/floating-ui/floating-ui/issues/1531
|
|
15866
|
+
$9f79659886946c16$export$e5c5a5f917a5871c(()=>{
|
|
15867
|
+
if (isRoot && isPlaced) Array.from(positionUpdateFns).reverse().forEach((fn)=>requestAnimationFrame(fn)
|
|
15868
|
+
);
|
|
15869
|
+
}, [
|
|
15870
|
+
isRoot,
|
|
15871
|
+
isPlaced,
|
|
15872
|
+
positionUpdateFns
|
|
15873
|
+
]);
|
|
15874
|
+
const commonProps = {
|
|
15875
|
+
'data-side': placedSide,
|
|
15876
|
+
'data-align': placedAlign,
|
|
15877
|
+
...contentProps,
|
|
15878
|
+
ref: composedRefs,
|
|
15879
|
+
style: {
|
|
15880
|
+
...contentProps.style,
|
|
15881
|
+
// if the PopperContent hasn't been placed yet (not all measurements done)
|
|
15882
|
+
// we prevent animations so that users's animation don't kick in too early referring wrong sides
|
|
15883
|
+
animation: !isPlaced ? 'none' : undefined,
|
|
15884
|
+
// hide the content if using the hide middleware and should be hidden
|
|
15885
|
+
opacity: (_middlewareData$hide = middlewareData.hide) !== null && _middlewareData$hide !== void 0 && _middlewareData$hide.referenceHidden ? 0 : undefined
|
|
15886
|
+
}
|
|
15887
|
+
};
|
|
15888
|
+
return /*#__PURE__*/ React.createElement("div", {
|
|
15889
|
+
ref: floating,
|
|
15890
|
+
"data-radix-popper-content-wrapper": "",
|
|
15891
|
+
style: {
|
|
15892
|
+
position: strategy,
|
|
15893
|
+
left: 0,
|
|
15894
|
+
top: 0,
|
|
15895
|
+
transform: isPlaced ? `translate3d(${Math.round(x)}px, ${Math.round(y)}px, 0)` : 'translate3d(0, -200%, 0)',
|
|
15896
|
+
// keep off the page when measuring
|
|
15897
|
+
minWidth: 'max-content',
|
|
15898
|
+
zIndex: contentZIndex,
|
|
15899
|
+
['--radix-popper-transform-origin']: [
|
|
15900
|
+
(_middlewareData$trans = middlewareData.transformOrigin) === null || _middlewareData$trans === void 0 ? void 0 : _middlewareData$trans.x,
|
|
15901
|
+
(_middlewareData$trans2 = middlewareData.transformOrigin) === null || _middlewareData$trans2 === void 0 ? void 0 : _middlewareData$trans2.y
|
|
15902
|
+
].join(' ')
|
|
15903
|
+
} // Floating UI interally calculates logical alignment based the `dir` attribute on
|
|
15904
|
+
,
|
|
15905
|
+
dir: props.dir
|
|
15906
|
+
}, /*#__PURE__*/ React.createElement($cf1ac5d9fe0e8206$var$PopperContentProvider, {
|
|
15907
|
+
scope: __scopePopper,
|
|
15908
|
+
placedSide: placedSide,
|
|
15909
|
+
onArrowChange: setArrow,
|
|
15910
|
+
arrowX: arrowX,
|
|
15911
|
+
arrowY: arrowY,
|
|
15912
|
+
shouldHideArrow: cannotCenterArrow
|
|
15913
|
+
}, isRoot ? /*#__PURE__*/ React.createElement($cf1ac5d9fe0e8206$var$PositionContextProvider, {
|
|
15914
|
+
scope: __scopePopper,
|
|
15915
|
+
hasParent: true,
|
|
15916
|
+
positionUpdateFns: positionUpdateFns
|
|
15917
|
+
}, /*#__PURE__*/ React.createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.div, commonProps)) : /*#__PURE__*/ React.createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.div, commonProps)));
|
|
15918
|
+
});
|
|
15919
|
+
/* -------------------------------------------------------------------------------------------------
|
|
15920
|
+
* PopperArrow
|
|
15921
|
+
* -----------------------------------------------------------------------------------------------*/ const $cf1ac5d9fe0e8206$var$ARROW_NAME = 'PopperArrow';
|
|
15922
|
+
const $cf1ac5d9fe0e8206$var$OPPOSITE_SIDE = {
|
|
15923
|
+
top: 'bottom',
|
|
15924
|
+
right: 'left',
|
|
15925
|
+
bottom: 'top',
|
|
15926
|
+
left: 'right'
|
|
15927
|
+
};
|
|
15928
|
+
const $cf1ac5d9fe0e8206$export$79d62cd4e10a3fd0 = /*#__PURE__*/ React.forwardRef(function $cf1ac5d9fe0e8206$export$79d62cd4e10a3fd0(props, forwardedRef) {
|
|
15929
|
+
const { __scopePopper: __scopePopper , ...arrowProps } = props;
|
|
15930
|
+
const contentContext = $cf1ac5d9fe0e8206$var$useContentContext($cf1ac5d9fe0e8206$var$ARROW_NAME, __scopePopper);
|
|
15931
|
+
const baseSide = $cf1ac5d9fe0e8206$var$OPPOSITE_SIDE[contentContext.placedSide];
|
|
15932
|
+
return(/*#__PURE__*/ // we have to use an extra wrapper because `ResizeObserver` (used by `useSize`)
|
|
15933
|
+
// doesn't report size as we'd expect on SVG elements.
|
|
15934
|
+
// it reports their bounding box which is effectively the largest path inside the SVG.
|
|
15935
|
+
React.createElement("span", {
|
|
15936
|
+
ref: contentContext.onArrowChange,
|
|
15937
|
+
style: {
|
|
15938
|
+
position: 'absolute',
|
|
15939
|
+
left: contentContext.arrowX,
|
|
15940
|
+
top: contentContext.arrowY,
|
|
15941
|
+
[baseSide]: 0,
|
|
15942
|
+
transformOrigin: {
|
|
15943
|
+
top: '',
|
|
15944
|
+
right: '0 0',
|
|
15945
|
+
bottom: 'center 0',
|
|
15946
|
+
left: '100% 0'
|
|
15947
|
+
}[contentContext.placedSide],
|
|
15948
|
+
transform: {
|
|
15949
|
+
top: 'translateY(100%)',
|
|
15950
|
+
right: 'translateY(50%) rotate(90deg) translateX(-50%)',
|
|
15951
|
+
bottom: `rotate(180deg)`,
|
|
15952
|
+
left: 'translateY(50%) rotate(-90deg) translateX(50%)'
|
|
15953
|
+
}[contentContext.placedSide],
|
|
15954
|
+
visibility: contentContext.shouldHideArrow ? 'hidden' : undefined
|
|
15955
|
+
}
|
|
15956
|
+
}, /*#__PURE__*/ React.createElement($7e8f5cd07187803e$export$be92b6f5f03c0fe9, _extends({}, arrowProps, {
|
|
15957
|
+
ref: forwardedRef,
|
|
15958
|
+
style: {
|
|
15959
|
+
...arrowProps.style,
|
|
15960
|
+
// ensures the element can be measured correctly (mostly for if SVG)
|
|
15961
|
+
display: 'block'
|
|
15962
|
+
}
|
|
15963
|
+
}))));
|
|
15964
|
+
});
|
|
15965
|
+
/* -----------------------------------------------------------------------------------------------*/ function $cf1ac5d9fe0e8206$var$isDefined(value) {
|
|
15966
|
+
return value !== undefined;
|
|
15967
|
+
}
|
|
15968
|
+
function $cf1ac5d9fe0e8206$var$isNotNull(value) {
|
|
15969
|
+
return value !== null;
|
|
15970
|
+
}
|
|
15971
|
+
const $cf1ac5d9fe0e8206$var$anchorCssProperties = ()=>({
|
|
15972
|
+
name: 'anchorCssProperties',
|
|
15973
|
+
fn (data) {
|
|
15974
|
+
const { rects: rects , elements: elements } = data;
|
|
15975
|
+
const { width: width , height: height } = rects.reference;
|
|
15976
|
+
elements.floating.style.setProperty('--radix-popper-anchor-width', `${width}px`);
|
|
15977
|
+
elements.floating.style.setProperty('--radix-popper-anchor-height', `${height}px`);
|
|
15978
|
+
return {};
|
|
15979
|
+
}
|
|
15980
|
+
})
|
|
15981
|
+
;
|
|
15982
|
+
const $cf1ac5d9fe0e8206$var$transformOrigin = (options)=>({
|
|
15983
|
+
name: 'transformOrigin',
|
|
15984
|
+
options: options,
|
|
15985
|
+
fn (data) {
|
|
15986
|
+
var _middlewareData$arrow4, _middlewareData$arrow5, _middlewareData$arrow6, _middlewareData$arrow7, _middlewareData$arrow8;
|
|
15987
|
+
const { placement: placement , rects: rects , middlewareData: middlewareData } = data;
|
|
15988
|
+
const cannotCenterArrow = ((_middlewareData$arrow4 = middlewareData.arrow) === null || _middlewareData$arrow4 === void 0 ? void 0 : _middlewareData$arrow4.centerOffset) !== 0;
|
|
15989
|
+
const isArrowHidden = cannotCenterArrow;
|
|
15990
|
+
const arrowWidth = isArrowHidden ? 0 : options.arrowWidth;
|
|
15991
|
+
const arrowHeight = isArrowHidden ? 0 : options.arrowHeight;
|
|
15992
|
+
const [placedSide, placedAlign] = $cf1ac5d9fe0e8206$var$getSideAndAlignFromPlacement(placement);
|
|
15993
|
+
const noArrowAlign = {
|
|
15994
|
+
start: '0%',
|
|
15995
|
+
center: '50%',
|
|
15996
|
+
end: '100%'
|
|
15997
|
+
}[placedAlign];
|
|
15998
|
+
const arrowXCenter = ((_middlewareData$arrow5 = (_middlewareData$arrow6 = middlewareData.arrow) === null || _middlewareData$arrow6 === void 0 ? void 0 : _middlewareData$arrow6.x) !== null && _middlewareData$arrow5 !== void 0 ? _middlewareData$arrow5 : 0) + arrowWidth / 2;
|
|
15999
|
+
const arrowYCenter = ((_middlewareData$arrow7 = (_middlewareData$arrow8 = middlewareData.arrow) === null || _middlewareData$arrow8 === void 0 ? void 0 : _middlewareData$arrow8.y) !== null && _middlewareData$arrow7 !== void 0 ? _middlewareData$arrow7 : 0) + arrowHeight / 2;
|
|
16000
|
+
let x = '';
|
|
16001
|
+
let y = '';
|
|
16002
|
+
if (placedSide === 'bottom') {
|
|
16003
|
+
x = isArrowHidden ? noArrowAlign : `${arrowXCenter}px`;
|
|
16004
|
+
y = `${-arrowHeight}px`;
|
|
16005
|
+
} else if (placedSide === 'top') {
|
|
16006
|
+
x = isArrowHidden ? noArrowAlign : `${arrowXCenter}px`;
|
|
16007
|
+
y = `${rects.floating.height + arrowHeight}px`;
|
|
16008
|
+
} else if (placedSide === 'right') {
|
|
16009
|
+
x = `${-arrowHeight}px`;
|
|
16010
|
+
y = isArrowHidden ? noArrowAlign : `${arrowYCenter}px`;
|
|
16011
|
+
} else if (placedSide === 'left') {
|
|
16012
|
+
x = `${rects.floating.width + arrowHeight}px`;
|
|
16013
|
+
y = isArrowHidden ? noArrowAlign : `${arrowYCenter}px`;
|
|
16014
|
+
}
|
|
16015
|
+
return {
|
|
16016
|
+
data: {
|
|
16017
|
+
x: x,
|
|
16018
|
+
y: y
|
|
16019
|
+
}
|
|
16020
|
+
};
|
|
16021
|
+
}
|
|
16022
|
+
})
|
|
16023
|
+
;
|
|
16024
|
+
function $cf1ac5d9fe0e8206$var$getSideAndAlignFromPlacement(placement) {
|
|
16025
|
+
const [side, align = 'center'] = placement.split('-');
|
|
16026
|
+
return [
|
|
16027
|
+
side,
|
|
16028
|
+
align
|
|
16029
|
+
];
|
|
16030
|
+
}
|
|
16031
|
+
const $cf1ac5d9fe0e8206$export$be92b6f5f03c0fe9 = $cf1ac5d9fe0e8206$export$badac9ada3a0bdf9;
|
|
16032
|
+
const $cf1ac5d9fe0e8206$export$b688253958b8dfe7 = $cf1ac5d9fe0e8206$export$ecd4e1ccab6ed6d;
|
|
16033
|
+
const $cf1ac5d9fe0e8206$export$7c6e2c02157bb7d2 = $cf1ac5d9fe0e8206$export$bc4ae5855d3c4fc;
|
|
16034
|
+
const $cf1ac5d9fe0e8206$export$21b07c8f274aebd5 = $cf1ac5d9fe0e8206$export$79d62cd4e10a3fd0;
|
|
16035
|
+
|
|
16036
|
+
const $f1701beae083dbae$export$602eac185826482c = /*#__PURE__*/ React.forwardRef((props, forwardedRef)=>{
|
|
16037
|
+
var _globalThis$document;
|
|
16038
|
+
const { container: container = globalThis === null || globalThis === void 0 ? void 0 : (_globalThis$document = globalThis.document) === null || _globalThis$document === void 0 ? void 0 : _globalThis$document.body , ...portalProps } = props;
|
|
16039
|
+
return container ? /*#__PURE__*/ ReactDOM.createPortal(/*#__PURE__*/ React.createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.div, _extends({}, portalProps, {
|
|
16040
|
+
ref: forwardedRef
|
|
16041
|
+
})), container) : null;
|
|
16042
|
+
});
|
|
16043
|
+
|
|
16044
|
+
function $fe963b355347cc68$export$3e6543de14f8614f(initialState, machine) {
|
|
16045
|
+
return React.useReducer((state, event)=>{
|
|
16046
|
+
const nextState = machine[state][event];
|
|
16047
|
+
return nextState !== null && nextState !== void 0 ? nextState : state;
|
|
16048
|
+
}, initialState);
|
|
16049
|
+
}
|
|
16050
|
+
|
|
16051
|
+
|
|
16052
|
+
const $921a889cee6df7e8$export$99c2b779aa4e8b8b = (props)=>{
|
|
16053
|
+
const { present: present , children: children } = props;
|
|
16054
|
+
const presence = $921a889cee6df7e8$var$usePresence(present);
|
|
16055
|
+
const child = typeof children === 'function' ? children({
|
|
16056
|
+
present: presence.isPresent
|
|
16057
|
+
}) : React.Children.only(children);
|
|
16058
|
+
const ref = $6ed0406888f73fc4$export$c7b2cbe3552a0d05(presence.ref, child.ref);
|
|
16059
|
+
const forceMount = typeof children === 'function';
|
|
16060
|
+
return forceMount || presence.isPresent ? /*#__PURE__*/ React.cloneElement(child, {
|
|
16061
|
+
ref: ref
|
|
16062
|
+
}) : null;
|
|
16063
|
+
};
|
|
16064
|
+
$921a889cee6df7e8$export$99c2b779aa4e8b8b.displayName = 'Presence';
|
|
16065
|
+
/* -------------------------------------------------------------------------------------------------
|
|
16066
|
+
* usePresence
|
|
16067
|
+
* -----------------------------------------------------------------------------------------------*/ function $921a889cee6df7e8$var$usePresence(present) {
|
|
16068
|
+
const [node1, setNode] = React.useState();
|
|
16069
|
+
const stylesRef = React.useRef({});
|
|
16070
|
+
const prevPresentRef = React.useRef(present);
|
|
16071
|
+
const prevAnimationNameRef = React.useRef('none');
|
|
16072
|
+
const initialState = present ? 'mounted' : 'unmounted';
|
|
16073
|
+
const [state, send] = $fe963b355347cc68$export$3e6543de14f8614f(initialState, {
|
|
16074
|
+
mounted: {
|
|
16075
|
+
UNMOUNT: 'unmounted',
|
|
16076
|
+
ANIMATION_OUT: 'unmountSuspended'
|
|
16077
|
+
},
|
|
16078
|
+
unmountSuspended: {
|
|
16079
|
+
MOUNT: 'mounted',
|
|
16080
|
+
ANIMATION_END: 'unmounted'
|
|
16081
|
+
},
|
|
16082
|
+
unmounted: {
|
|
16083
|
+
MOUNT: 'mounted'
|
|
16084
|
+
}
|
|
16085
|
+
});
|
|
16086
|
+
React.useEffect(()=>{
|
|
16087
|
+
const currentAnimationName = $921a889cee6df7e8$var$getAnimationName(stylesRef.current);
|
|
16088
|
+
prevAnimationNameRef.current = state === 'mounted' ? currentAnimationName : 'none';
|
|
16089
|
+
}, [
|
|
16090
|
+
state
|
|
16091
|
+
]);
|
|
16092
|
+
$9f79659886946c16$export$e5c5a5f917a5871c(()=>{
|
|
16093
|
+
const styles = stylesRef.current;
|
|
16094
|
+
const wasPresent = prevPresentRef.current;
|
|
16095
|
+
const hasPresentChanged = wasPresent !== present;
|
|
16096
|
+
if (hasPresentChanged) {
|
|
16097
|
+
const prevAnimationName = prevAnimationNameRef.current;
|
|
16098
|
+
const currentAnimationName = $921a889cee6df7e8$var$getAnimationName(styles);
|
|
16099
|
+
if (present) send('MOUNT');
|
|
16100
|
+
else if (currentAnimationName === 'none' || (styles === null || styles === void 0 ? void 0 : styles.display) === 'none') // If there is no exit animation or the element is hidden, animations won't run
|
|
16101
|
+
// so we unmount instantly
|
|
16102
|
+
send('UNMOUNT');
|
|
16103
|
+
else {
|
|
16104
|
+
/**
|
|
16105
|
+
* When `present` changes to `false`, we check changes to animation-name to
|
|
16106
|
+
* determine whether an animation has started. We chose this approach (reading
|
|
16107
|
+
* computed styles) because there is no `animationrun` event and `animationstart`
|
|
16108
|
+
* fires after `animation-delay` has expired which would be too late.
|
|
16109
|
+
*/ const isAnimating = prevAnimationName !== currentAnimationName;
|
|
16110
|
+
if (wasPresent && isAnimating) send('ANIMATION_OUT');
|
|
16111
|
+
else send('UNMOUNT');
|
|
16112
|
+
}
|
|
16113
|
+
prevPresentRef.current = present;
|
|
16114
|
+
}
|
|
16115
|
+
}, [
|
|
16116
|
+
present,
|
|
16117
|
+
send
|
|
16118
|
+
]);
|
|
16119
|
+
$9f79659886946c16$export$e5c5a5f917a5871c(()=>{
|
|
16120
|
+
if (node1) {
|
|
16121
|
+
/**
|
|
16122
|
+
* Triggering an ANIMATION_OUT during an ANIMATION_IN will fire an `animationcancel`
|
|
16123
|
+
* event for ANIMATION_IN after we have entered `unmountSuspended` state. So, we
|
|
16124
|
+
* make sure we only trigger ANIMATION_END for the currently active animation.
|
|
16125
|
+
*/ const handleAnimationEnd = (event)=>{
|
|
16126
|
+
const currentAnimationName = $921a889cee6df7e8$var$getAnimationName(stylesRef.current);
|
|
16127
|
+
const isCurrentAnimation = currentAnimationName.includes(event.animationName);
|
|
16128
|
+
if (event.target === node1 && isCurrentAnimation) // With React 18 concurrency this update is applied
|
|
16129
|
+
// a frame after the animation ends, creating a flash of visible content.
|
|
16130
|
+
// By manually flushing we ensure they sync within a frame, removing the flash.
|
|
16131
|
+
ReactDOM.flushSync(()=>send('ANIMATION_END')
|
|
16132
|
+
);
|
|
16133
|
+
};
|
|
16134
|
+
const handleAnimationStart = (event)=>{
|
|
16135
|
+
if (event.target === node1) // if animation occurred, store its name as the previous animation.
|
|
16136
|
+
prevAnimationNameRef.current = $921a889cee6df7e8$var$getAnimationName(stylesRef.current);
|
|
16137
|
+
};
|
|
16138
|
+
node1.addEventListener('animationstart', handleAnimationStart);
|
|
16139
|
+
node1.addEventListener('animationcancel', handleAnimationEnd);
|
|
16140
|
+
node1.addEventListener('animationend', handleAnimationEnd);
|
|
16141
|
+
return ()=>{
|
|
16142
|
+
node1.removeEventListener('animationstart', handleAnimationStart);
|
|
16143
|
+
node1.removeEventListener('animationcancel', handleAnimationEnd);
|
|
16144
|
+
node1.removeEventListener('animationend', handleAnimationEnd);
|
|
16145
|
+
};
|
|
16146
|
+
} else // Transition to the unmounted state if the node is removed prematurely.
|
|
16147
|
+
// We avoid doing so during cleanup as the node may change but still exist.
|
|
16148
|
+
send('ANIMATION_END');
|
|
16149
|
+
}, [
|
|
16150
|
+
node1,
|
|
16151
|
+
send
|
|
16152
|
+
]);
|
|
16153
|
+
return {
|
|
16154
|
+
isPresent: [
|
|
16155
|
+
'mounted',
|
|
16156
|
+
'unmountSuspended'
|
|
16157
|
+
].includes(state),
|
|
16158
|
+
ref: React.useCallback((node)=>{
|
|
16159
|
+
if (node) stylesRef.current = getComputedStyle(node);
|
|
16160
|
+
setNode(node);
|
|
16161
|
+
}, [])
|
|
16162
|
+
};
|
|
16163
|
+
}
|
|
16164
|
+
/* -----------------------------------------------------------------------------------------------*/ function $921a889cee6df7e8$var$getAnimationName(styles) {
|
|
16165
|
+
return (styles === null || styles === void 0 ? void 0 : styles.animationName) || 'none';
|
|
16166
|
+
}
|
|
16167
|
+
|
|
16168
|
+
/**
|
|
16169
|
+
* Listens for when the escape key is down
|
|
16170
|
+
*/ function $addc16e1bbe58fd0$export$3a72a57244d6e765(onEscapeKeyDownProp, ownerDocument = globalThis === null || globalThis === void 0 ? void 0 : globalThis.document) {
|
|
16171
|
+
const onEscapeKeyDown = $b1b2314f5f9a1d84$export$25bec8c6f54ee79a(onEscapeKeyDownProp);
|
|
16172
|
+
React.useEffect(()=>{
|
|
16173
|
+
const handleKeyDown = (event)=>{
|
|
16174
|
+
if (event.key === 'Escape') onEscapeKeyDown(event);
|
|
16175
|
+
};
|
|
16176
|
+
ownerDocument.addEventListener('keydown', handleKeyDown);
|
|
16177
|
+
return ()=>ownerDocument.removeEventListener('keydown', handleKeyDown)
|
|
16178
|
+
;
|
|
16179
|
+
}, [
|
|
16180
|
+
onEscapeKeyDown,
|
|
16181
|
+
ownerDocument
|
|
16182
|
+
]);
|
|
16183
|
+
}
|
|
16184
|
+
|
|
16185
|
+
const $5cb92bef7577960e$var$CONTEXT_UPDATE = 'dismissableLayer.update';
|
|
16186
|
+
const $5cb92bef7577960e$var$POINTER_DOWN_OUTSIDE = 'dismissableLayer.pointerDownOutside';
|
|
16187
|
+
const $5cb92bef7577960e$var$FOCUS_OUTSIDE = 'dismissableLayer.focusOutside';
|
|
16188
|
+
let $5cb92bef7577960e$var$originalBodyPointerEvents;
|
|
16189
|
+
const $5cb92bef7577960e$var$DismissableLayerContext = /*#__PURE__*/ React.createContext({
|
|
16190
|
+
layers: new Set(),
|
|
16191
|
+
layersWithOutsidePointerEventsDisabled: new Set(),
|
|
16192
|
+
branches: new Set()
|
|
16193
|
+
});
|
|
16194
|
+
const $5cb92bef7577960e$export$177fb62ff3ec1f22 = /*#__PURE__*/ React.forwardRef((props, forwardedRef)=>{
|
|
16195
|
+
var _node$ownerDocument;
|
|
16196
|
+
const { disableOutsidePointerEvents: disableOutsidePointerEvents = false , onEscapeKeyDown: onEscapeKeyDown , onPointerDownOutside: onPointerDownOutside , onFocusOutside: onFocusOutside , onInteractOutside: onInteractOutside , onDismiss: onDismiss , ...layerProps } = props;
|
|
16197
|
+
const context = React.useContext($5cb92bef7577960e$var$DismissableLayerContext);
|
|
16198
|
+
const [node1, setNode] = React.useState(null);
|
|
16199
|
+
const ownerDocument = (_node$ownerDocument = node1 === null || node1 === void 0 ? void 0 : node1.ownerDocument) !== null && _node$ownerDocument !== void 0 ? _node$ownerDocument : globalThis === null || globalThis === void 0 ? void 0 : globalThis.document;
|
|
16200
|
+
const [, force] = React.useState({});
|
|
16201
|
+
const composedRefs = $6ed0406888f73fc4$export$c7b2cbe3552a0d05(forwardedRef, (node)=>setNode(node)
|
|
16202
|
+
);
|
|
16203
|
+
const layers = Array.from(context.layers);
|
|
16204
|
+
const [highestLayerWithOutsidePointerEventsDisabled] = [
|
|
16205
|
+
...context.layersWithOutsidePointerEventsDisabled
|
|
16206
|
+
].slice(-1); // prettier-ignore
|
|
16207
|
+
const highestLayerWithOutsidePointerEventsDisabledIndex = layers.indexOf(highestLayerWithOutsidePointerEventsDisabled); // prettier-ignore
|
|
16208
|
+
const index = node1 ? layers.indexOf(node1) : -1;
|
|
16209
|
+
const isBodyPointerEventsDisabled = context.layersWithOutsidePointerEventsDisabled.size > 0;
|
|
16210
|
+
const isPointerEventsEnabled = index >= highestLayerWithOutsidePointerEventsDisabledIndex;
|
|
16211
|
+
const pointerDownOutside = $5cb92bef7577960e$var$usePointerDownOutside((event)=>{
|
|
16212
|
+
const target = event.target;
|
|
16213
|
+
const isPointerDownOnBranch = [
|
|
16214
|
+
...context.branches
|
|
16215
|
+
].some((branch)=>branch.contains(target)
|
|
16216
|
+
);
|
|
16217
|
+
if (!isPointerEventsEnabled || isPointerDownOnBranch) return;
|
|
16218
|
+
onPointerDownOutside === null || onPointerDownOutside === void 0 || onPointerDownOutside(event);
|
|
16219
|
+
onInteractOutside === null || onInteractOutside === void 0 || onInteractOutside(event);
|
|
16220
|
+
if (!event.defaultPrevented) onDismiss === null || onDismiss === void 0 || onDismiss();
|
|
16221
|
+
}, ownerDocument);
|
|
16222
|
+
const focusOutside = $5cb92bef7577960e$var$useFocusOutside((event)=>{
|
|
16223
|
+
const target = event.target;
|
|
16224
|
+
const isFocusInBranch = [
|
|
16225
|
+
...context.branches
|
|
16226
|
+
].some((branch)=>branch.contains(target)
|
|
16227
|
+
);
|
|
16228
|
+
if (isFocusInBranch) return;
|
|
16229
|
+
onFocusOutside === null || onFocusOutside === void 0 || onFocusOutside(event);
|
|
16230
|
+
onInteractOutside === null || onInteractOutside === void 0 || onInteractOutside(event);
|
|
16231
|
+
if (!event.defaultPrevented) onDismiss === null || onDismiss === void 0 || onDismiss();
|
|
16232
|
+
}, ownerDocument);
|
|
16233
|
+
$addc16e1bbe58fd0$export$3a72a57244d6e765((event)=>{
|
|
16234
|
+
const isHighestLayer = index === context.layers.size - 1;
|
|
16235
|
+
if (!isHighestLayer) return;
|
|
16236
|
+
onEscapeKeyDown === null || onEscapeKeyDown === void 0 || onEscapeKeyDown(event);
|
|
16237
|
+
if (!event.defaultPrevented && onDismiss) {
|
|
16238
|
+
event.preventDefault();
|
|
16239
|
+
onDismiss();
|
|
16240
|
+
}
|
|
16241
|
+
}, ownerDocument);
|
|
16242
|
+
React.useEffect(()=>{
|
|
16243
|
+
if (!node1) return;
|
|
16244
|
+
if (disableOutsidePointerEvents) {
|
|
16245
|
+
if (context.layersWithOutsidePointerEventsDisabled.size === 0) {
|
|
16246
|
+
$5cb92bef7577960e$var$originalBodyPointerEvents = ownerDocument.body.style.pointerEvents;
|
|
16247
|
+
ownerDocument.body.style.pointerEvents = 'none';
|
|
16248
|
+
}
|
|
16249
|
+
context.layersWithOutsidePointerEventsDisabled.add(node1);
|
|
16250
|
+
}
|
|
16251
|
+
context.layers.add(node1);
|
|
16252
|
+
$5cb92bef7577960e$var$dispatchUpdate();
|
|
16253
|
+
return ()=>{
|
|
16254
|
+
if (disableOutsidePointerEvents && context.layersWithOutsidePointerEventsDisabled.size === 1) ownerDocument.body.style.pointerEvents = $5cb92bef7577960e$var$originalBodyPointerEvents;
|
|
16255
|
+
};
|
|
16256
|
+
}, [
|
|
16257
|
+
node1,
|
|
16258
|
+
ownerDocument,
|
|
16259
|
+
disableOutsidePointerEvents,
|
|
16260
|
+
context
|
|
16261
|
+
]);
|
|
16262
|
+
/**
|
|
16263
|
+
* We purposefully prevent combining this effect with the `disableOutsidePointerEvents` effect
|
|
16264
|
+
* because a change to `disableOutsidePointerEvents` would remove this layer from the stack
|
|
16265
|
+
* and add it to the end again so the layering order wouldn't be _creation order_.
|
|
16266
|
+
* We only want them to be removed from context stacks when unmounted.
|
|
16267
|
+
*/ React.useEffect(()=>{
|
|
16268
|
+
return ()=>{
|
|
16269
|
+
if (!node1) return;
|
|
16270
|
+
context.layers.delete(node1);
|
|
16271
|
+
context.layersWithOutsidePointerEventsDisabled.delete(node1);
|
|
16272
|
+
$5cb92bef7577960e$var$dispatchUpdate();
|
|
16273
|
+
};
|
|
16274
|
+
}, [
|
|
16275
|
+
node1,
|
|
16276
|
+
context
|
|
16277
|
+
]);
|
|
16278
|
+
React.useEffect(()=>{
|
|
16279
|
+
const handleUpdate = ()=>force({})
|
|
16280
|
+
;
|
|
16281
|
+
document.addEventListener($5cb92bef7577960e$var$CONTEXT_UPDATE, handleUpdate);
|
|
16282
|
+
return ()=>document.removeEventListener($5cb92bef7577960e$var$CONTEXT_UPDATE, handleUpdate)
|
|
16283
|
+
;
|
|
16284
|
+
}, []);
|
|
16285
|
+
return /*#__PURE__*/ React.createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.div, _extends({}, layerProps, {
|
|
16286
|
+
ref: composedRefs,
|
|
16287
|
+
style: {
|
|
16288
|
+
pointerEvents: isBodyPointerEventsDisabled ? isPointerEventsEnabled ? 'auto' : 'none' : undefined,
|
|
16289
|
+
...props.style
|
|
16290
|
+
},
|
|
16291
|
+
onFocusCapture: $e42e1063c40fb3ef$export$b9ecd428b558ff10(props.onFocusCapture, focusOutside.onFocusCapture),
|
|
16292
|
+
onBlurCapture: $e42e1063c40fb3ef$export$b9ecd428b558ff10(props.onBlurCapture, focusOutside.onBlurCapture),
|
|
16293
|
+
onPointerDownCapture: $e42e1063c40fb3ef$export$b9ecd428b558ff10(props.onPointerDownCapture, pointerDownOutside.onPointerDownCapture)
|
|
16294
|
+
}));
|
|
16295
|
+
});
|
|
16296
|
+
/* -----------------------------------------------------------------------------------------------*/ /**
|
|
16297
|
+
* Listens for `pointerdown` outside a react subtree. We use `pointerdown` rather than `pointerup`
|
|
16298
|
+
* to mimic layer dismissing behaviour present in OS.
|
|
16299
|
+
* Returns props to pass to the node we want to check for outside events.
|
|
16300
|
+
*/ function $5cb92bef7577960e$var$usePointerDownOutside(onPointerDownOutside, ownerDocument = globalThis === null || globalThis === void 0 ? void 0 : globalThis.document) {
|
|
16301
|
+
const handlePointerDownOutside = $b1b2314f5f9a1d84$export$25bec8c6f54ee79a(onPointerDownOutside);
|
|
16302
|
+
const isPointerInsideReactTreeRef = React.useRef(false);
|
|
16303
|
+
const handleClickRef = React.useRef(()=>{});
|
|
16304
|
+
React.useEffect(()=>{
|
|
16305
|
+
const handlePointerDown = (event)=>{
|
|
16306
|
+
if (event.target && !isPointerInsideReactTreeRef.current) {
|
|
16307
|
+
const eventDetail = {
|
|
16308
|
+
originalEvent: event
|
|
16309
|
+
};
|
|
16310
|
+
function handleAndDispatchPointerDownOutsideEvent() {
|
|
16311
|
+
$5cb92bef7577960e$var$handleAndDispatchCustomEvent($5cb92bef7577960e$var$POINTER_DOWN_OUTSIDE, handlePointerDownOutside, eventDetail, {
|
|
16312
|
+
discrete: true
|
|
16313
|
+
});
|
|
16314
|
+
}
|
|
16315
|
+
/**
|
|
16316
|
+
* On touch devices, we need to wait for a click event because browsers implement
|
|
16317
|
+
* a ~350ms delay between the time the user stops touching the display and when the
|
|
16318
|
+
* browser executres events. We need to ensure we don't reactivate pointer-events within
|
|
16319
|
+
* this timeframe otherwise the browser may execute events that should have been prevented.
|
|
16320
|
+
*
|
|
16321
|
+
* Additionally, this also lets us deal automatically with cancellations when a click event
|
|
16322
|
+
* isn't raised because the page was considered scrolled/drag-scrolled, long-pressed, etc.
|
|
16323
|
+
*
|
|
16324
|
+
* This is why we also continuously remove the previous listener, because we cannot be
|
|
16325
|
+
* certain that it was raised, and therefore cleaned-up.
|
|
16326
|
+
*/ if (event.pointerType === 'touch') {
|
|
16327
|
+
ownerDocument.removeEventListener('click', handleClickRef.current);
|
|
16328
|
+
handleClickRef.current = handleAndDispatchPointerDownOutsideEvent;
|
|
16329
|
+
ownerDocument.addEventListener('click', handleClickRef.current, {
|
|
16330
|
+
once: true
|
|
16331
|
+
});
|
|
16332
|
+
} else handleAndDispatchPointerDownOutsideEvent();
|
|
16333
|
+
}
|
|
16334
|
+
isPointerInsideReactTreeRef.current = false;
|
|
16335
|
+
};
|
|
16336
|
+
/**
|
|
16337
|
+
* if this hook executes in a component that mounts via a `pointerdown` event, the event
|
|
16338
|
+
* would bubble up to the document and trigger a `pointerDownOutside` event. We avoid
|
|
16339
|
+
* this by delaying the event listener registration on the document.
|
|
16340
|
+
* This is not React specific, but rather how the DOM works, ie:
|
|
16341
|
+
* ```
|
|
16342
|
+
* button.addEventListener('pointerdown', () => {
|
|
16343
|
+
* console.log('I will log');
|
|
16344
|
+
* document.addEventListener('pointerdown', () => {
|
|
16345
|
+
* console.log('I will also log');
|
|
16346
|
+
* })
|
|
16347
|
+
* });
|
|
16348
|
+
*/ const timerId = window.setTimeout(()=>{
|
|
16349
|
+
ownerDocument.addEventListener('pointerdown', handlePointerDown);
|
|
16350
|
+
}, 0);
|
|
16351
|
+
return ()=>{
|
|
16352
|
+
window.clearTimeout(timerId);
|
|
16353
|
+
ownerDocument.removeEventListener('pointerdown', handlePointerDown);
|
|
16354
|
+
ownerDocument.removeEventListener('click', handleClickRef.current);
|
|
16355
|
+
};
|
|
16356
|
+
}, [
|
|
16357
|
+
ownerDocument,
|
|
16358
|
+
handlePointerDownOutside
|
|
16359
|
+
]);
|
|
16360
|
+
return {
|
|
16361
|
+
// ensures we check React component tree (not just DOM tree)
|
|
16362
|
+
onPointerDownCapture: ()=>isPointerInsideReactTreeRef.current = true
|
|
16363
|
+
};
|
|
16364
|
+
}
|
|
16365
|
+
/**
|
|
16366
|
+
* Listens for when focus happens outside a react subtree.
|
|
16367
|
+
* Returns props to pass to the root (node) of the subtree we want to check.
|
|
16368
|
+
*/ function $5cb92bef7577960e$var$useFocusOutside(onFocusOutside, ownerDocument = globalThis === null || globalThis === void 0 ? void 0 : globalThis.document) {
|
|
16369
|
+
const handleFocusOutside = $b1b2314f5f9a1d84$export$25bec8c6f54ee79a(onFocusOutside);
|
|
16370
|
+
const isFocusInsideReactTreeRef = React.useRef(false);
|
|
16371
|
+
React.useEffect(()=>{
|
|
16372
|
+
const handleFocus = (event)=>{
|
|
16373
|
+
if (event.target && !isFocusInsideReactTreeRef.current) {
|
|
16374
|
+
const eventDetail = {
|
|
16375
|
+
originalEvent: event
|
|
16376
|
+
};
|
|
16377
|
+
$5cb92bef7577960e$var$handleAndDispatchCustomEvent($5cb92bef7577960e$var$FOCUS_OUTSIDE, handleFocusOutside, eventDetail, {
|
|
16378
|
+
discrete: false
|
|
16379
|
+
});
|
|
16380
|
+
}
|
|
16381
|
+
};
|
|
16382
|
+
ownerDocument.addEventListener('focusin', handleFocus);
|
|
16383
|
+
return ()=>ownerDocument.removeEventListener('focusin', handleFocus)
|
|
16384
|
+
;
|
|
16385
|
+
}, [
|
|
16386
|
+
ownerDocument,
|
|
16387
|
+
handleFocusOutside
|
|
16388
|
+
]);
|
|
16389
|
+
return {
|
|
16390
|
+
onFocusCapture: ()=>isFocusInsideReactTreeRef.current = true
|
|
16391
|
+
,
|
|
16392
|
+
onBlurCapture: ()=>isFocusInsideReactTreeRef.current = false
|
|
16393
|
+
};
|
|
16394
|
+
}
|
|
16395
|
+
function $5cb92bef7577960e$var$dispatchUpdate() {
|
|
16396
|
+
const event = new CustomEvent($5cb92bef7577960e$var$CONTEXT_UPDATE);
|
|
16397
|
+
document.dispatchEvent(event);
|
|
16398
|
+
}
|
|
16399
|
+
function $5cb92bef7577960e$var$handleAndDispatchCustomEvent(name, handler, detail, { discrete: discrete }) {
|
|
16400
|
+
const target = detail.originalEvent.target;
|
|
16401
|
+
const event = new CustomEvent(name, {
|
|
16402
|
+
bubbles: false,
|
|
16403
|
+
cancelable: true,
|
|
16404
|
+
detail: detail
|
|
16405
|
+
});
|
|
16406
|
+
if (handler) target.addEventListener(name, handler, {
|
|
16407
|
+
once: true
|
|
16408
|
+
});
|
|
16409
|
+
if (discrete) $8927f6f2acc4f386$export$6d1a0317bde7de7f(target, event);
|
|
16410
|
+
else target.dispatchEvent(event);
|
|
16411
|
+
}
|
|
16412
|
+
|
|
16413
|
+
/* -------------------------------------------------------------------------------------------------
|
|
16414
|
+
* HoverCard
|
|
16415
|
+
* -----------------------------------------------------------------------------------------------*/ let $cef8881cdc69808e$var$originalBodyUserSelect;
|
|
16416
|
+
const $cef8881cdc69808e$var$HOVERCARD_NAME = 'HoverCard';
|
|
16417
|
+
const [$cef8881cdc69808e$var$createHoverCardContext, $cef8881cdc69808e$export$47b6998a836b7260] = $c512c27ab02ef895$export$50c7b4e9d9f19c1($cef8881cdc69808e$var$HOVERCARD_NAME, [
|
|
16418
|
+
$cf1ac5d9fe0e8206$export$722aac194ae923
|
|
16419
|
+
]);
|
|
16420
|
+
const $cef8881cdc69808e$var$usePopperScope = $cf1ac5d9fe0e8206$export$722aac194ae923();
|
|
16421
|
+
const [$cef8881cdc69808e$var$HoverCardProvider, $cef8881cdc69808e$var$useHoverCardContext] = $cef8881cdc69808e$var$createHoverCardContext($cef8881cdc69808e$var$HOVERCARD_NAME);
|
|
16422
|
+
const $cef8881cdc69808e$export$57a077cc9fbe653e = (props)=>{
|
|
16423
|
+
const { __scopeHoverCard: __scopeHoverCard , children: children , open: openProp , defaultOpen: defaultOpen , onOpenChange: onOpenChange , openDelay: openDelay = 700 , closeDelay: closeDelay = 300 } = props;
|
|
16424
|
+
const popperScope = $cef8881cdc69808e$var$usePopperScope(__scopeHoverCard);
|
|
16425
|
+
const openTimerRef = React.useRef(0);
|
|
16426
|
+
const closeTimerRef = React.useRef(0);
|
|
16427
|
+
const hasSelectionRef = React.useRef(false);
|
|
16428
|
+
const isPointerDownOnContentRef = React.useRef(false);
|
|
16429
|
+
const [open = false, setOpen] = $71cd76cc60e0454e$export$6f32135080cb4c3({
|
|
16430
|
+
prop: openProp,
|
|
16431
|
+
defaultProp: defaultOpen,
|
|
16432
|
+
onChange: onOpenChange
|
|
16433
|
+
});
|
|
16434
|
+
const handleOpen = React.useCallback(()=>{
|
|
16435
|
+
clearTimeout(closeTimerRef.current);
|
|
16436
|
+
openTimerRef.current = window.setTimeout(()=>setOpen(true)
|
|
16437
|
+
, openDelay);
|
|
16438
|
+
}, [
|
|
16439
|
+
openDelay,
|
|
16440
|
+
setOpen
|
|
16441
|
+
]);
|
|
16442
|
+
const handleClose = React.useCallback(()=>{
|
|
16443
|
+
clearTimeout(openTimerRef.current);
|
|
16444
|
+
if (!hasSelectionRef.current && !isPointerDownOnContentRef.current) closeTimerRef.current = window.setTimeout(()=>setOpen(false)
|
|
16445
|
+
, closeDelay);
|
|
16446
|
+
}, [
|
|
16447
|
+
closeDelay,
|
|
16448
|
+
setOpen
|
|
16449
|
+
]);
|
|
16450
|
+
const handleDismiss = React.useCallback(()=>setOpen(false)
|
|
16451
|
+
, [
|
|
16452
|
+
setOpen
|
|
16453
|
+
]); // cleanup any queued state updates on unmount
|
|
16454
|
+
React.useEffect(()=>{
|
|
16455
|
+
return ()=>{
|
|
16456
|
+
clearTimeout(openTimerRef.current);
|
|
16457
|
+
clearTimeout(closeTimerRef.current);
|
|
16458
|
+
};
|
|
16459
|
+
}, []);
|
|
16460
|
+
return /*#__PURE__*/ React.createElement($cef8881cdc69808e$var$HoverCardProvider, {
|
|
16461
|
+
scope: __scopeHoverCard,
|
|
16462
|
+
open: open,
|
|
16463
|
+
onOpenChange: setOpen,
|
|
16464
|
+
onOpen: handleOpen,
|
|
16465
|
+
onClose: handleClose,
|
|
16466
|
+
onDismiss: handleDismiss,
|
|
16467
|
+
hasSelectionRef: hasSelectionRef,
|
|
16468
|
+
isPointerDownOnContentRef: isPointerDownOnContentRef
|
|
16469
|
+
}, /*#__PURE__*/ React.createElement($cf1ac5d9fe0e8206$export$be92b6f5f03c0fe9, popperScope, children));
|
|
16470
|
+
};
|
|
16471
|
+
/* -------------------------------------------------------------------------------------------------
|
|
16472
|
+
* HoverCardTrigger
|
|
16473
|
+
* -----------------------------------------------------------------------------------------------*/ const $cef8881cdc69808e$var$TRIGGER_NAME = 'HoverCardTrigger';
|
|
16474
|
+
const $cef8881cdc69808e$export$ef9f7fd8e4ba882f = /*#__PURE__*/ React.forwardRef((props, forwardedRef)=>{
|
|
16475
|
+
const { __scopeHoverCard: __scopeHoverCard , ...triggerProps } = props;
|
|
16476
|
+
const context = $cef8881cdc69808e$var$useHoverCardContext($cef8881cdc69808e$var$TRIGGER_NAME, __scopeHoverCard);
|
|
16477
|
+
const popperScope = $cef8881cdc69808e$var$usePopperScope(__scopeHoverCard);
|
|
16478
|
+
return /*#__PURE__*/ React.createElement($cf1ac5d9fe0e8206$export$b688253958b8dfe7, _extends({
|
|
16479
|
+
asChild: true
|
|
16480
|
+
}, popperScope), /*#__PURE__*/ React.createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.a, _extends({
|
|
16481
|
+
"data-state": context.open ? 'open' : 'closed'
|
|
16482
|
+
}, triggerProps, {
|
|
16483
|
+
ref: forwardedRef,
|
|
16484
|
+
onPointerEnter: $e42e1063c40fb3ef$export$b9ecd428b558ff10(props.onPointerEnter, $cef8881cdc69808e$var$excludeTouch(context.onOpen)),
|
|
16485
|
+
onPointerLeave: $e42e1063c40fb3ef$export$b9ecd428b558ff10(props.onPointerLeave, $cef8881cdc69808e$var$excludeTouch(context.onClose)),
|
|
16486
|
+
onFocus: $e42e1063c40fb3ef$export$b9ecd428b558ff10(props.onFocus, context.onOpen),
|
|
16487
|
+
onBlur: $e42e1063c40fb3ef$export$b9ecd428b558ff10(props.onBlur, context.onClose) // prevent focus event on touch devices
|
|
16488
|
+
,
|
|
16489
|
+
onTouchStart: $e42e1063c40fb3ef$export$b9ecd428b558ff10(props.onTouchStart, (event)=>event.preventDefault()
|
|
16490
|
+
)
|
|
16491
|
+
})));
|
|
16492
|
+
});
|
|
16493
|
+
/* -------------------------------------------------------------------------------------------------
|
|
16494
|
+
* HoverCardPortal
|
|
16495
|
+
* -----------------------------------------------------------------------------------------------*/ const $cef8881cdc69808e$var$PORTAL_NAME = 'HoverCardPortal';
|
|
16496
|
+
const [$cef8881cdc69808e$var$PortalProvider, $cef8881cdc69808e$var$usePortalContext] = $cef8881cdc69808e$var$createHoverCardContext($cef8881cdc69808e$var$PORTAL_NAME, {
|
|
16497
|
+
forceMount: undefined
|
|
16498
|
+
});
|
|
16499
|
+
const $cef8881cdc69808e$export$b384c6e0a789f88b = (props)=>{
|
|
16500
|
+
const { __scopeHoverCard: __scopeHoverCard , forceMount: forceMount , children: children , container: container } = props;
|
|
16501
|
+
const context = $cef8881cdc69808e$var$useHoverCardContext($cef8881cdc69808e$var$PORTAL_NAME, __scopeHoverCard);
|
|
16502
|
+
return /*#__PURE__*/ React.createElement($cef8881cdc69808e$var$PortalProvider, {
|
|
16503
|
+
scope: __scopeHoverCard,
|
|
16504
|
+
forceMount: forceMount
|
|
16505
|
+
}, /*#__PURE__*/ React.createElement($921a889cee6df7e8$export$99c2b779aa4e8b8b, {
|
|
16506
|
+
present: forceMount || context.open
|
|
16507
|
+
}, /*#__PURE__*/ React.createElement($f1701beae083dbae$export$602eac185826482c, {
|
|
16508
|
+
asChild: true,
|
|
16509
|
+
container: container
|
|
16510
|
+
}, children)));
|
|
16511
|
+
};
|
|
16512
|
+
/* -------------------------------------------------------------------------------------------------
|
|
16513
|
+
* HoverCardContent
|
|
16514
|
+
* -----------------------------------------------------------------------------------------------*/ const $cef8881cdc69808e$var$CONTENT_NAME = 'HoverCardContent';
|
|
16515
|
+
const $cef8881cdc69808e$export$aa4724a5938c586 = /*#__PURE__*/ React.forwardRef((props, forwardedRef)=>{
|
|
16516
|
+
const portalContext = $cef8881cdc69808e$var$usePortalContext($cef8881cdc69808e$var$CONTENT_NAME, props.__scopeHoverCard);
|
|
16517
|
+
const { forceMount: forceMount = portalContext.forceMount , ...contentProps } = props;
|
|
16518
|
+
const context = $cef8881cdc69808e$var$useHoverCardContext($cef8881cdc69808e$var$CONTENT_NAME, props.__scopeHoverCard);
|
|
16519
|
+
return /*#__PURE__*/ React.createElement($921a889cee6df7e8$export$99c2b779aa4e8b8b, {
|
|
16520
|
+
present: forceMount || context.open
|
|
16521
|
+
}, /*#__PURE__*/ React.createElement($cef8881cdc69808e$var$HoverCardContentImpl, _extends({
|
|
16522
|
+
"data-state": context.open ? 'open' : 'closed'
|
|
16523
|
+
}, contentProps, {
|
|
16524
|
+
onPointerEnter: $e42e1063c40fb3ef$export$b9ecd428b558ff10(props.onPointerEnter, $cef8881cdc69808e$var$excludeTouch(context.onOpen)),
|
|
16525
|
+
onPointerLeave: $e42e1063c40fb3ef$export$b9ecd428b558ff10(props.onPointerLeave, $cef8881cdc69808e$var$excludeTouch(context.onClose)),
|
|
16526
|
+
ref: forwardedRef
|
|
16527
|
+
})));
|
|
16528
|
+
});
|
|
16529
|
+
/* ---------------------------------------------------------------------------------------------- */ const $cef8881cdc69808e$var$HoverCardContentImpl = /*#__PURE__*/ React.forwardRef((props, forwardedRef)=>{
|
|
16530
|
+
const { __scopeHoverCard: __scopeHoverCard , onEscapeKeyDown: onEscapeKeyDown , onPointerDownOutside: onPointerDownOutside , onFocusOutside: onFocusOutside , onInteractOutside: onInteractOutside , ...contentProps } = props;
|
|
16531
|
+
const context = $cef8881cdc69808e$var$useHoverCardContext($cef8881cdc69808e$var$CONTENT_NAME, __scopeHoverCard);
|
|
16532
|
+
const popperScope = $cef8881cdc69808e$var$usePopperScope(__scopeHoverCard);
|
|
16533
|
+
const ref = React.useRef(null);
|
|
16534
|
+
const composedRefs = $6ed0406888f73fc4$export$c7b2cbe3552a0d05(forwardedRef, ref);
|
|
16535
|
+
const [containSelection, setContainSelection] = React.useState(false);
|
|
16536
|
+
React.useEffect(()=>{
|
|
16537
|
+
if (containSelection) {
|
|
16538
|
+
const body = document.body; // Safari requires prefix
|
|
16539
|
+
$cef8881cdc69808e$var$originalBodyUserSelect = body.style.userSelect || body.style.webkitUserSelect;
|
|
16540
|
+
body.style.userSelect = 'none';
|
|
16541
|
+
body.style.webkitUserSelect = 'none';
|
|
16542
|
+
return ()=>{
|
|
16543
|
+
body.style.userSelect = $cef8881cdc69808e$var$originalBodyUserSelect;
|
|
16544
|
+
body.style.webkitUserSelect = $cef8881cdc69808e$var$originalBodyUserSelect;
|
|
16545
|
+
};
|
|
16546
|
+
}
|
|
16547
|
+
}, [
|
|
16548
|
+
containSelection
|
|
16549
|
+
]);
|
|
16550
|
+
React.useEffect(()=>{
|
|
16551
|
+
if (ref.current) {
|
|
16552
|
+
const handlePointerUp = ()=>{
|
|
16553
|
+
setContainSelection(false);
|
|
16554
|
+
context.isPointerDownOnContentRef.current = false; // Delay a frame to ensure we always access the latest selection
|
|
16555
|
+
setTimeout(()=>{
|
|
16556
|
+
var _document$getSelectio;
|
|
16557
|
+
const hasSelection = ((_document$getSelectio = document.getSelection()) === null || _document$getSelectio === void 0 ? void 0 : _document$getSelectio.toString()) !== '';
|
|
16558
|
+
if (hasSelection) context.hasSelectionRef.current = true;
|
|
16559
|
+
});
|
|
16560
|
+
};
|
|
16561
|
+
document.addEventListener('pointerup', handlePointerUp);
|
|
16562
|
+
return ()=>{
|
|
16563
|
+
document.removeEventListener('pointerup', handlePointerUp);
|
|
16564
|
+
context.hasSelectionRef.current = false;
|
|
16565
|
+
context.isPointerDownOnContentRef.current = false;
|
|
16566
|
+
};
|
|
16567
|
+
}
|
|
16568
|
+
}, [
|
|
16569
|
+
context.isPointerDownOnContentRef,
|
|
16570
|
+
context.hasSelectionRef
|
|
16571
|
+
]);
|
|
16572
|
+
React.useEffect(()=>{
|
|
16573
|
+
if (ref.current) {
|
|
16574
|
+
const tabbables = $cef8881cdc69808e$var$getTabbableNodes(ref.current);
|
|
16575
|
+
tabbables.forEach((tabbable)=>tabbable.setAttribute('tabindex', '-1')
|
|
16576
|
+
);
|
|
16577
|
+
}
|
|
16578
|
+
});
|
|
16579
|
+
return /*#__PURE__*/ React.createElement($5cb92bef7577960e$export$177fb62ff3ec1f22, {
|
|
16580
|
+
asChild: true,
|
|
16581
|
+
disableOutsidePointerEvents: false,
|
|
16582
|
+
onInteractOutside: onInteractOutside,
|
|
16583
|
+
onEscapeKeyDown: onEscapeKeyDown,
|
|
16584
|
+
onPointerDownOutside: onPointerDownOutside,
|
|
16585
|
+
onFocusOutside: $e42e1063c40fb3ef$export$b9ecd428b558ff10(onFocusOutside, (event)=>{
|
|
16586
|
+
event.preventDefault();
|
|
16587
|
+
}),
|
|
16588
|
+
onDismiss: context.onDismiss
|
|
16589
|
+
}, /*#__PURE__*/ React.createElement($cf1ac5d9fe0e8206$export$7c6e2c02157bb7d2, _extends({}, popperScope, contentProps, {
|
|
16590
|
+
onPointerDown: $e42e1063c40fb3ef$export$b9ecd428b558ff10(contentProps.onPointerDown, (event)=>{
|
|
16591
|
+
// Contain selection to current layer
|
|
16592
|
+
if (event.currentTarget.contains(event.target)) setContainSelection(true);
|
|
16593
|
+
context.hasSelectionRef.current = false;
|
|
16594
|
+
context.isPointerDownOnContentRef.current = true;
|
|
16595
|
+
}),
|
|
16596
|
+
ref: composedRefs,
|
|
16597
|
+
style: {
|
|
16598
|
+
...contentProps.style,
|
|
16599
|
+
userSelect: containSelection ? 'text' : undefined,
|
|
16600
|
+
// Safari requires prefix
|
|
16601
|
+
WebkitUserSelect: containSelection ? 'text' : undefined,
|
|
16602
|
+
'--radix-hover-card-content-transform-origin': 'var(--radix-popper-transform-origin)',
|
|
16603
|
+
'--radix-hover-card-content-available-width': 'var(--radix-popper-available-width)',
|
|
16604
|
+
'--radix-hover-card-content-available-height': 'var(--radix-popper-available-height)',
|
|
16605
|
+
'--radix-hover-card-trigger-width': 'var(--radix-popper-anchor-width)',
|
|
16606
|
+
'--radix-hover-card-trigger-height': 'var(--radix-popper-anchor-height)'
|
|
16607
|
+
}
|
|
16608
|
+
})));
|
|
16609
|
+
});
|
|
16610
|
+
const $cef8881cdc69808e$export$b9744d3e7456d806 = /*#__PURE__*/ React.forwardRef((props, forwardedRef)=>{
|
|
16611
|
+
const { __scopeHoverCard: __scopeHoverCard , ...arrowProps } = props;
|
|
16612
|
+
const popperScope = $cef8881cdc69808e$var$usePopperScope(__scopeHoverCard);
|
|
16613
|
+
return /*#__PURE__*/ React.createElement($cf1ac5d9fe0e8206$export$21b07c8f274aebd5, _extends({}, popperScope, arrowProps, {
|
|
16614
|
+
ref: forwardedRef
|
|
16615
|
+
}));
|
|
16616
|
+
});
|
|
16617
|
+
/* -----------------------------------------------------------------------------------------------*/ function $cef8881cdc69808e$var$excludeTouch(eventHandler) {
|
|
16618
|
+
return (event)=>event.pointerType === 'touch' ? undefined : eventHandler()
|
|
16619
|
+
;
|
|
16620
|
+
}
|
|
16621
|
+
/**
|
|
16622
|
+
* Returns a list of nodes that can be in the tab sequence.
|
|
16623
|
+
* @see: https://developer.mozilla.org/en-US/docs/Web/API/TreeWalker
|
|
16624
|
+
*/ function $cef8881cdc69808e$var$getTabbableNodes(container) {
|
|
16625
|
+
const nodes = [];
|
|
16626
|
+
const walker = document.createTreeWalker(container, NodeFilter.SHOW_ELEMENT, {
|
|
16627
|
+
acceptNode: (node)=>{
|
|
16628
|
+
// `.tabIndex` is not the same as the `tabindex` attribute. It works on the
|
|
16629
|
+
// runtime's understanding of tabbability, so this automatically accounts
|
|
16630
|
+
// for any kind of element that could be tabbed to.
|
|
16631
|
+
return node.tabIndex >= 0 ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP;
|
|
16632
|
+
}
|
|
16633
|
+
});
|
|
16634
|
+
while(walker.nextNode())nodes.push(walker.currentNode);
|
|
16635
|
+
return nodes;
|
|
16636
|
+
}
|
|
16637
|
+
const $cef8881cdc69808e$export$be92b6f5f03c0fe9 = $cef8881cdc69808e$export$57a077cc9fbe653e;
|
|
16638
|
+
const $cef8881cdc69808e$export$41fb9f06171c75f4 = $cef8881cdc69808e$export$ef9f7fd8e4ba882f;
|
|
16639
|
+
const $cef8881cdc69808e$export$602eac185826482c = $cef8881cdc69808e$export$b384c6e0a789f88b;
|
|
16640
|
+
const $cef8881cdc69808e$export$7c6e2c02157bb7d2 = $cef8881cdc69808e$export$aa4724a5938c586;
|
|
16641
|
+
const $cef8881cdc69808e$export$21b07c8f274aebd5 = $cef8881cdc69808e$export$b9744d3e7456d806;
|
|
16642
|
+
|
|
16643
|
+
var HoverPrimitive = /*#__PURE__*/Object.freeze({
|
|
16644
|
+
__proto__: null,
|
|
16645
|
+
Arrow: $cef8881cdc69808e$export$21b07c8f274aebd5,
|
|
16646
|
+
Content: $cef8881cdc69808e$export$7c6e2c02157bb7d2,
|
|
16647
|
+
HoverCard: $cef8881cdc69808e$export$57a077cc9fbe653e,
|
|
16648
|
+
HoverCardArrow: $cef8881cdc69808e$export$b9744d3e7456d806,
|
|
16649
|
+
HoverCardContent: $cef8881cdc69808e$export$aa4724a5938c586,
|
|
16650
|
+
HoverCardPortal: $cef8881cdc69808e$export$b384c6e0a789f88b,
|
|
16651
|
+
HoverCardTrigger: $cef8881cdc69808e$export$ef9f7fd8e4ba882f,
|
|
16652
|
+
Portal: $cef8881cdc69808e$export$602eac185826482c,
|
|
16653
|
+
Root: $cef8881cdc69808e$export$be92b6f5f03c0fe9,
|
|
16654
|
+
Trigger: $cef8881cdc69808e$export$41fb9f06171c75f4,
|
|
16655
|
+
createHoverCardScope: $cef8881cdc69808e$export$47b6998a836b7260
|
|
16656
|
+
});
|
|
16657
|
+
|
|
16658
|
+
const bgStyles$1 = ['tw-bg-sq-white', 'dark:tw-bg-sq-dark-background'].join(' ');
|
|
16659
|
+
const borderStyles$1 = [
|
|
16660
|
+
'tw-border-solid',
|
|
16661
|
+
'tw-border',
|
|
16662
|
+
'tw-rounded-sm',
|
|
16663
|
+
'tw-border-sq-disabled-gray',
|
|
16664
|
+
'dark:tw-border-gray-500',
|
|
16665
|
+
].join(' ');
|
|
16666
|
+
const disabledClasses$1 = ['tw-opacity-50', 'tw-cursor-not-allowed'].join(' ');
|
|
16667
|
+
const ButtonWithPopover = ({ children, trigger, id, hasArrow, extraTriggerClassNames, extraPopoverClassNames, containerTestId, disabled = false, align = 'end', alignOffset = -35, placement = 'bottom', placementOffset = 5, onOpenChange, isOpen, isCloseOnContentClick = false, setFocusOnTriggerOnClose = true, isHoverEnabled = false, ...tooltipProps }) => {
|
|
16668
|
+
const tooltipData = getQTipData(tooltipProps);
|
|
16669
|
+
const Primitive = isHoverEnabled ? HoverPrimitive : PopoverPrimitive;
|
|
16670
|
+
return (React__namespace.createElement(Primitive.Root, { open: isOpen, defaultOpen: false, onOpenChange: onOpenChange, openDelay: isHoverEnabled ? 300 : undefined, closeDelay: isHoverEnabled ? 200 : undefined },
|
|
16671
|
+
React__namespace.createElement(Primitive.Trigger, { id: id, className: `tw-border-none`, disabled: disabled },
|
|
16672
|
+
React__namespace.createElement("div", { ...tooltipData, className: `tw-bg-transparent tw-flex tw-flex-col tw-items-center tw-justify-center ${disabled ? disabledClasses$1 : ''} ${extraTriggerClassNames || ''}` }, trigger)),
|
|
16673
|
+
React__namespace.createElement(Primitive.Content, { sideOffset: placementOffset, align: align, side: placement, alignOffset: alignOffset, onCloseAutoFocus: (e) => !setFocusOnTriggerOnClose && e.preventDefault(), asChild: true, onClick: () => isCloseOnContentClick && onOpenChange && onOpenChange(false), className: "focus-visible:tw-outline-none tw-outline-none" },
|
|
16674
|
+
React__namespace.createElement("div", { "data-testid": containerTestId, className: `${bgStyles$1} ${borderStyles$1} tw-relative tw-z-[1000] tw-min-w-6 focus-visible:tw-outline-none tw-outline-none data-[state=open]:tw-animate-in data-[state=closed]:tw-animate-out
|
|
16675
|
+
data-[side=top]:tw-animate-slideDownAndFade data-[side=right]:tw-animate-slideLeftAndFade data-[side=bottom]:tw-animate-slideUpAndFade data-[side=left]:tw-animate-slideRightAndFade tw-text-sq-text-color
|
|
16676
|
+
${extraPopoverClassNames || ''}` },
|
|
16677
|
+
hasArrow && (React__namespace.createElement(Primitive.Arrow, { asChild: true },
|
|
16678
|
+
React__namespace.createElement("div", { className: " tw-fill-transparent tw-bg-white tw-w-[15px] tw-h-[15px] tw-mt-[-7px] tw-rotate-45 dark:tw-bg-sq-dark-background tw-border-b tw-border-r tw-border-sq-disabled-gray dark:tw-border-gray-500" }))),
|
|
16679
|
+
children))));
|
|
16680
|
+
};
|
|
16681
|
+
|
|
16682
|
+
const $6cc32821e9371a1c$var$SELECTION_KEYS = [
|
|
16683
|
+
'Enter',
|
|
16684
|
+
' '
|
|
16685
|
+
];
|
|
16686
|
+
const $6cc32821e9371a1c$var$FIRST_KEYS = [
|
|
16687
|
+
'ArrowDown',
|
|
16688
|
+
'PageUp',
|
|
16689
|
+
'Home'
|
|
16690
|
+
];
|
|
16691
|
+
const $6cc32821e9371a1c$var$LAST_KEYS = [
|
|
16692
|
+
'ArrowUp',
|
|
16693
|
+
'PageDown',
|
|
16694
|
+
'End'
|
|
16695
|
+
];
|
|
16696
|
+
const $6cc32821e9371a1c$var$FIRST_LAST_KEYS = [
|
|
16697
|
+
...$6cc32821e9371a1c$var$FIRST_KEYS,
|
|
16698
|
+
...$6cc32821e9371a1c$var$LAST_KEYS
|
|
16699
|
+
];
|
|
16700
|
+
/* -------------------------------------------------------------------------------------------------
|
|
16701
|
+
* Menu
|
|
16702
|
+
* -----------------------------------------------------------------------------------------------*/ const $6cc32821e9371a1c$var$MENU_NAME = 'Menu';
|
|
16703
|
+
const [$6cc32821e9371a1c$var$Collection, $6cc32821e9371a1c$var$useCollection, $6cc32821e9371a1c$var$createCollectionScope] = $e02a7d9cb1dc128c$export$c74125a8e3af6bb2($6cc32821e9371a1c$var$MENU_NAME);
|
|
16704
|
+
const [$6cc32821e9371a1c$var$createMenuContext, $6cc32821e9371a1c$export$4027731b685e72eb] = $c512c27ab02ef895$export$50c7b4e9d9f19c1$1($6cc32821e9371a1c$var$MENU_NAME, [
|
|
16705
|
+
$6cc32821e9371a1c$var$createCollectionScope,
|
|
16706
|
+
$cf1ac5d9fe0e8206$export$722aac194ae923$1,
|
|
16707
|
+
$d7bdfb9eb0fdf311$export$c7109489551a4f4
|
|
16708
|
+
]);
|
|
16709
|
+
const $6cc32821e9371a1c$var$usePopperScope = $cf1ac5d9fe0e8206$export$722aac194ae923$1();
|
|
16710
|
+
const $6cc32821e9371a1c$var$useRovingFocusGroupScope = $d7bdfb9eb0fdf311$export$c7109489551a4f4();
|
|
16711
|
+
const [$6cc32821e9371a1c$var$MenuProvider, $6cc32821e9371a1c$var$useMenuContext] = $6cc32821e9371a1c$var$createMenuContext($6cc32821e9371a1c$var$MENU_NAME);
|
|
16712
|
+
const [$6cc32821e9371a1c$var$MenuRootProvider, $6cc32821e9371a1c$var$useMenuRootContext] = $6cc32821e9371a1c$var$createMenuContext($6cc32821e9371a1c$var$MENU_NAME);
|
|
16713
|
+
const $6cc32821e9371a1c$export$d9b273488cd8ce6f = (props)=>{
|
|
16714
|
+
const { __scopeMenu: __scopeMenu , open: open = false , children: children , dir: dir , onOpenChange: onOpenChange , modal: modal = true } = props;
|
|
16715
|
+
const popperScope = $6cc32821e9371a1c$var$usePopperScope(__scopeMenu);
|
|
16716
|
+
const [content, setContent] = React.useState(null);
|
|
16717
|
+
const isUsingKeyboardRef = React.useRef(false);
|
|
16718
|
+
const handleOpenChange = $b1b2314f5f9a1d84$export$25bec8c6f54ee79a$1(onOpenChange);
|
|
16719
|
+
const direction = $f631663db3294ace$export$b39126d51d94e6f3(dir);
|
|
16720
|
+
React.useEffect(()=>{
|
|
16721
|
+
// Capture phase ensures we set the boolean before any side effects execute
|
|
16722
|
+
// in response to the key or pointer event as they might depend on this value.
|
|
16723
|
+
const handleKeyDown = ()=>{
|
|
16724
|
+
isUsingKeyboardRef.current = true;
|
|
16725
|
+
document.addEventListener('pointerdown', handlePointer, {
|
|
16726
|
+
capture: true,
|
|
16727
|
+
once: true
|
|
16728
|
+
});
|
|
16729
|
+
document.addEventListener('pointermove', handlePointer, {
|
|
16730
|
+
capture: true,
|
|
16731
|
+
once: true
|
|
16732
|
+
});
|
|
16733
|
+
};
|
|
16734
|
+
const handlePointer = ()=>isUsingKeyboardRef.current = false
|
|
16735
|
+
;
|
|
16736
|
+
document.addEventListener('keydown', handleKeyDown, {
|
|
16737
|
+
capture: true
|
|
16738
|
+
});
|
|
16739
|
+
return ()=>{
|
|
16740
|
+
document.removeEventListener('keydown', handleKeyDown, {
|
|
16741
|
+
capture: true
|
|
16742
|
+
});
|
|
16743
|
+
document.removeEventListener('pointerdown', handlePointer, {
|
|
16744
|
+
capture: true
|
|
16745
|
+
});
|
|
16746
|
+
document.removeEventListener('pointermove', handlePointer, {
|
|
16747
|
+
capture: true
|
|
16748
|
+
});
|
|
16749
|
+
};
|
|
16750
|
+
}, []);
|
|
16751
|
+
return /*#__PURE__*/ React.createElement($cf1ac5d9fe0e8206$export$be92b6f5f03c0fe9$1, popperScope, /*#__PURE__*/ React.createElement($6cc32821e9371a1c$var$MenuProvider, {
|
|
16752
|
+
scope: __scopeMenu,
|
|
16753
|
+
open: open,
|
|
16754
|
+
onOpenChange: handleOpenChange,
|
|
16755
|
+
content: content,
|
|
16756
|
+
onContentChange: setContent
|
|
16757
|
+
}, /*#__PURE__*/ React.createElement($6cc32821e9371a1c$var$MenuRootProvider, {
|
|
15116
16758
|
scope: __scopeMenu,
|
|
15117
16759
|
onClose: React.useCallback(()=>handleOpenChange(false)
|
|
15118
16760
|
, [
|
|
@@ -15126,7 +16768,7 @@ const $6cc32821e9371a1c$export$d9b273488cd8ce6f = (props)=>{
|
|
|
15126
16768
|
const $6cc32821e9371a1c$export$9fa5ebd18bee4d43 = /*#__PURE__*/ React.forwardRef((props, forwardedRef)=>{
|
|
15127
16769
|
const { __scopeMenu: __scopeMenu , ...anchorProps } = props;
|
|
15128
16770
|
const popperScope = $6cc32821e9371a1c$var$usePopperScope(__scopeMenu);
|
|
15129
|
-
return /*#__PURE__*/ React.createElement($cf1ac5d9fe0e8206$export$b688253958b8dfe7, _extends({}, popperScope, anchorProps, {
|
|
16771
|
+
return /*#__PURE__*/ React.createElement($cf1ac5d9fe0e8206$export$b688253958b8dfe7$1, _extends({}, popperScope, anchorProps, {
|
|
15130
16772
|
ref: forwardedRef
|
|
15131
16773
|
}));
|
|
15132
16774
|
});
|
|
@@ -15147,7 +16789,7 @@ const $6cc32821e9371a1c$export$479f0f2f71193efe = /*#__PURE__*/ React.forwardRef
|
|
|
15147
16789
|
const rootContext = $6cc32821e9371a1c$var$useMenuRootContext($6cc32821e9371a1c$var$CONTENT_NAME, props.__scopeMenu);
|
|
15148
16790
|
return /*#__PURE__*/ React.createElement($6cc32821e9371a1c$var$Collection.Provider, {
|
|
15149
16791
|
scope: props.__scopeMenu
|
|
15150
|
-
}, /*#__PURE__*/ React.createElement($921a889cee6df7e8$export$99c2b779aa4e8b8b, {
|
|
16792
|
+
}, /*#__PURE__*/ React.createElement($921a889cee6df7e8$export$99c2b779aa4e8b8b$1, {
|
|
15151
16793
|
present: forceMount || context.open
|
|
15152
16794
|
}, /*#__PURE__*/ React.createElement($6cc32821e9371a1c$var$Collection.Slot, {
|
|
15153
16795
|
scope: props.__scopeMenu
|
|
@@ -15160,7 +16802,7 @@ const $6cc32821e9371a1c$export$479f0f2f71193efe = /*#__PURE__*/ React.forwardRef
|
|
|
15160
16802
|
/* ---------------------------------------------------------------------------------------------- */ const $6cc32821e9371a1c$var$MenuRootContentModal = /*#__PURE__*/ React.forwardRef((props, forwardedRef)=>{
|
|
15161
16803
|
const context = $6cc32821e9371a1c$var$useMenuContext($6cc32821e9371a1c$var$CONTENT_NAME, props.__scopeMenu);
|
|
15162
16804
|
const ref = React.useRef(null);
|
|
15163
|
-
const composedRefs = $6ed0406888f73fc4$export$c7b2cbe3552a0d05(forwardedRef, ref); // Hide everything from ARIA except the `MenuContent`
|
|
16805
|
+
const composedRefs = $6ed0406888f73fc4$export$c7b2cbe3552a0d05$1(forwardedRef, ref); // Hide everything from ARIA except the `MenuContent`
|
|
15164
16806
|
React.useEffect(()=>{
|
|
15165
16807
|
const content = ref.current;
|
|
15166
16808
|
if (content) return hideOthers(content);
|
|
@@ -15173,7 +16815,7 @@ const $6cc32821e9371a1c$export$479f0f2f71193efe = /*#__PURE__*/ React.forwardRef
|
|
|
15173
16815
|
disableOutsidePointerEvents: context.open,
|
|
15174
16816
|
disableOutsideScroll: true // When focus is trapped, a `focusout` event may still happen.
|
|
15175
16817
|
,
|
|
15176
|
-
onFocusOutside: $e42e1063c40fb3ef$export$b9ecd428b558ff10(props.onFocusOutside, (event)=>event.preventDefault()
|
|
16818
|
+
onFocusOutside: $e42e1063c40fb3ef$export$b9ecd428b558ff10$1(props.onFocusOutside, (event)=>event.preventDefault()
|
|
15177
16819
|
, {
|
|
15178
16820
|
checkForDefaultPrevented: false
|
|
15179
16821
|
}),
|
|
@@ -15199,7 +16841,7 @@ const $6cc32821e9371a1c$var$MenuRootContentNonModal = /*#__PURE__*/ React.forwar
|
|
|
15199
16841
|
const getItems = $6cc32821e9371a1c$var$useCollection(__scopeMenu);
|
|
15200
16842
|
const [currentItemId, setCurrentItemId] = React.useState(null);
|
|
15201
16843
|
const contentRef = React.useRef(null);
|
|
15202
|
-
const composedRefs = $6ed0406888f73fc4$export$c7b2cbe3552a0d05(forwardedRef, contentRef, context.onContentChange);
|
|
16844
|
+
const composedRefs = $6ed0406888f73fc4$export$c7b2cbe3552a0d05$1(forwardedRef, contentRef, context.onContentChange);
|
|
15203
16845
|
const timerRef = React.useRef(0);
|
|
15204
16846
|
const searchRef = React.useRef('');
|
|
15205
16847
|
const pointerGraceTimerRef = React.useRef(0);
|
|
@@ -15208,7 +16850,7 @@ const $6cc32821e9371a1c$var$MenuRootContentNonModal = /*#__PURE__*/ React.forwar
|
|
|
15208
16850
|
const lastPointerXRef = React.useRef(0);
|
|
15209
16851
|
const ScrollLockWrapper = disableOutsideScroll ? $epM9y$RemoveScroll : React.Fragment;
|
|
15210
16852
|
const scrollLockWrapperProps = disableOutsideScroll ? {
|
|
15211
|
-
as: $5e63c961fc1ce211$export$8c6ed5c666ac1360,
|
|
16853
|
+
as: $5e63c961fc1ce211$export$8c6ed5c666ac1360$1,
|
|
15212
16854
|
allowPinchZoom: true
|
|
15213
16855
|
} : undefined;
|
|
15214
16856
|
const handleTypeaheadSearch = (key)=>{
|
|
@@ -15275,7 +16917,7 @@ const $6cc32821e9371a1c$var$MenuRootContentNonModal = /*#__PURE__*/ React.forwar
|
|
|
15275
16917
|
}, /*#__PURE__*/ React.createElement(ScrollLockWrapper, scrollLockWrapperProps, /*#__PURE__*/ React.createElement($d3863c46a17e8a28$export$20e40289641fbbb6, {
|
|
15276
16918
|
asChild: true,
|
|
15277
16919
|
trapped: trapFocus,
|
|
15278
|
-
onMountAutoFocus: $e42e1063c40fb3ef$export$b9ecd428b558ff10(onOpenAutoFocus, (event)=>{
|
|
16920
|
+
onMountAutoFocus: $e42e1063c40fb3ef$export$b9ecd428b558ff10$1(onOpenAutoFocus, (event)=>{
|
|
15279
16921
|
var _contentRef$current2;
|
|
15280
16922
|
// when opening, explicitly focus the content area only and leave
|
|
15281
16923
|
// `onEntryFocus` in control of focusing first item
|
|
@@ -15283,7 +16925,7 @@ const $6cc32821e9371a1c$var$MenuRootContentNonModal = /*#__PURE__*/ React.forwar
|
|
|
15283
16925
|
(_contentRef$current2 = contentRef.current) === null || _contentRef$current2 === void 0 || _contentRef$current2.focus();
|
|
15284
16926
|
}),
|
|
15285
16927
|
onUnmountAutoFocus: onCloseAutoFocus
|
|
15286
|
-
}, /*#__PURE__*/ React.createElement($5cb92bef7577960e$export$177fb62ff3ec1f22, {
|
|
16928
|
+
}, /*#__PURE__*/ React.createElement($5cb92bef7577960e$export$177fb62ff3ec1f22$1, {
|
|
15287
16929
|
asChild: true,
|
|
15288
16930
|
disableOutsidePointerEvents: disableOutsidePointerEvents,
|
|
15289
16931
|
onEscapeKeyDown: onEscapeKeyDown,
|
|
@@ -15299,11 +16941,11 @@ const $6cc32821e9371a1c$var$MenuRootContentNonModal = /*#__PURE__*/ React.forwar
|
|
|
15299
16941
|
loop: loop,
|
|
15300
16942
|
currentTabStopId: currentItemId,
|
|
15301
16943
|
onCurrentTabStopIdChange: setCurrentItemId,
|
|
15302
|
-
onEntryFocus: $e42e1063c40fb3ef$export$b9ecd428b558ff10(onEntryFocus, (event)=>{
|
|
16944
|
+
onEntryFocus: $e42e1063c40fb3ef$export$b9ecd428b558ff10$1(onEntryFocus, (event)=>{
|
|
15303
16945
|
// only focus first item when using keyboard
|
|
15304
16946
|
if (!rootContext.isUsingKeyboardRef.current) event.preventDefault();
|
|
15305
16947
|
})
|
|
15306
|
-
}), /*#__PURE__*/ React.createElement($cf1ac5d9fe0e8206$export$7c6e2c02157bb7d2, _extends({
|
|
16948
|
+
}), /*#__PURE__*/ React.createElement($cf1ac5d9fe0e8206$export$7c6e2c02157bb7d2$1, _extends({
|
|
15307
16949
|
role: "menu",
|
|
15308
16950
|
"aria-orientation": "vertical",
|
|
15309
16951
|
"data-state": $6cc32821e9371a1c$var$getOpenState(context.open),
|
|
@@ -15315,7 +16957,7 @@ const $6cc32821e9371a1c$var$MenuRootContentNonModal = /*#__PURE__*/ React.forwar
|
|
|
15315
16957
|
outline: 'none',
|
|
15316
16958
|
...contentProps.style
|
|
15317
16959
|
},
|
|
15318
|
-
onKeyDown: $e42e1063c40fb3ef$export$b9ecd428b558ff10(contentProps.onKeyDown, (event)=>{
|
|
16960
|
+
onKeyDown: $e42e1063c40fb3ef$export$b9ecd428b558ff10$1(contentProps.onKeyDown, (event)=>{
|
|
15319
16961
|
// submenu key events bubble through portals. We only care about keys in this menu.
|
|
15320
16962
|
const target = event.target;
|
|
15321
16963
|
const isKeyDownInside = target.closest('[data-radix-menu-content]') === event.currentTarget;
|
|
@@ -15337,14 +16979,14 @@ const $6cc32821e9371a1c$var$MenuRootContentNonModal = /*#__PURE__*/ React.forwar
|
|
|
15337
16979
|
if ($6cc32821e9371a1c$var$LAST_KEYS.includes(event.key)) candidateNodes.reverse();
|
|
15338
16980
|
$6cc32821e9371a1c$var$focusFirst(candidateNodes);
|
|
15339
16981
|
}),
|
|
15340
|
-
onBlur: $e42e1063c40fb3ef$export$b9ecd428b558ff10(props.onBlur, (event)=>{
|
|
16982
|
+
onBlur: $e42e1063c40fb3ef$export$b9ecd428b558ff10$1(props.onBlur, (event)=>{
|
|
15341
16983
|
// clear search buffer when leaving the menu
|
|
15342
16984
|
if (!event.currentTarget.contains(event.target)) {
|
|
15343
16985
|
window.clearTimeout(timerRef.current);
|
|
15344
16986
|
searchRef.current = '';
|
|
15345
16987
|
}
|
|
15346
16988
|
}),
|
|
15347
|
-
onPointerMove: $e42e1063c40fb3ef$export$b9ecd428b558ff10(props.onPointerMove, $6cc32821e9371a1c$var$whenMouse((event)=>{
|
|
16989
|
+
onPointerMove: $e42e1063c40fb3ef$export$b9ecd428b558ff10$1(props.onPointerMove, $6cc32821e9371a1c$var$whenMouse((event)=>{
|
|
15348
16990
|
const target = event.target;
|
|
15349
16991
|
const pointerXHasChanged = lastPointerXRef.current !== event.clientX; // We don't use `event.movementX` for this check because Safari will
|
|
15350
16992
|
// always return `0` on a pointer event.
|
|
@@ -15358,7 +17000,7 @@ const $6cc32821e9371a1c$var$MenuRootContentNonModal = /*#__PURE__*/ React.forwar
|
|
|
15358
17000
|
});
|
|
15359
17001
|
const $6cc32821e9371a1c$export$dd37bec0e8a99143 = /*#__PURE__*/ React.forwardRef((props, forwardedRef)=>{
|
|
15360
17002
|
const { __scopeMenu: __scopeMenu , ...labelProps } = props;
|
|
15361
|
-
return /*#__PURE__*/ React.createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.div, _extends({}, labelProps, {
|
|
17003
|
+
return /*#__PURE__*/ React.createElement($8927f6f2acc4f386$export$250ffa63cdc0d034$1.div, _extends({}, labelProps, {
|
|
15362
17004
|
ref: forwardedRef
|
|
15363
17005
|
}));
|
|
15364
17006
|
});
|
|
@@ -15371,7 +17013,7 @@ const $6cc32821e9371a1c$export$2ce376c2cc3355c8 = /*#__PURE__*/ React.forwardRef
|
|
|
15371
17013
|
const ref = React.useRef(null);
|
|
15372
17014
|
const rootContext = $6cc32821e9371a1c$var$useMenuRootContext($6cc32821e9371a1c$var$ITEM_NAME, props.__scopeMenu);
|
|
15373
17015
|
const contentContext = $6cc32821e9371a1c$var$useMenuContentContext($6cc32821e9371a1c$var$ITEM_NAME, props.__scopeMenu);
|
|
15374
|
-
const composedRefs = $6ed0406888f73fc4$export$c7b2cbe3552a0d05(forwardedRef, ref);
|
|
17016
|
+
const composedRefs = $6ed0406888f73fc4$export$c7b2cbe3552a0d05$1(forwardedRef, ref);
|
|
15375
17017
|
const isPointerDownRef = React.useRef(false);
|
|
15376
17018
|
const handleSelect = ()=>{
|
|
15377
17019
|
const menuItem = ref.current;
|
|
@@ -15384,7 +17026,7 @@ const $6cc32821e9371a1c$export$2ce376c2cc3355c8 = /*#__PURE__*/ React.forwardRef
|
|
|
15384
17026
|
, {
|
|
15385
17027
|
once: true
|
|
15386
17028
|
});
|
|
15387
|
-
$8927f6f2acc4f386$export$6d1a0317bde7de7f(menuItem, itemSelectEvent);
|
|
17029
|
+
$8927f6f2acc4f386$export$6d1a0317bde7de7f$1(menuItem, itemSelectEvent);
|
|
15388
17030
|
if (itemSelectEvent.defaultPrevented) isPointerDownRef.current = false;
|
|
15389
17031
|
else rootContext.onClose();
|
|
15390
17032
|
}
|
|
@@ -15392,20 +17034,20 @@ const $6cc32821e9371a1c$export$2ce376c2cc3355c8 = /*#__PURE__*/ React.forwardRef
|
|
|
15392
17034
|
return /*#__PURE__*/ React.createElement($6cc32821e9371a1c$var$MenuItemImpl, _extends({}, itemProps, {
|
|
15393
17035
|
ref: composedRefs,
|
|
15394
17036
|
disabled: disabled,
|
|
15395
|
-
onClick: $e42e1063c40fb3ef$export$b9ecd428b558ff10(props.onClick, handleSelect),
|
|
17037
|
+
onClick: $e42e1063c40fb3ef$export$b9ecd428b558ff10$1(props.onClick, handleSelect),
|
|
15396
17038
|
onPointerDown: (event)=>{
|
|
15397
17039
|
var _props$onPointerDown;
|
|
15398
17040
|
(_props$onPointerDown = props.onPointerDown) === null || _props$onPointerDown === void 0 || _props$onPointerDown.call(props, event);
|
|
15399
17041
|
isPointerDownRef.current = true;
|
|
15400
17042
|
},
|
|
15401
|
-
onPointerUp: $e42e1063c40fb3ef$export$b9ecd428b558ff10(props.onPointerUp, (event)=>{
|
|
17043
|
+
onPointerUp: $e42e1063c40fb3ef$export$b9ecd428b558ff10$1(props.onPointerUp, (event)=>{
|
|
15402
17044
|
var _event$currentTarget;
|
|
15403
17045
|
// Pointer down can move to a different menu item which should activate it on pointer up.
|
|
15404
17046
|
// We dispatch a click for selection to allow composition with click based triggers and to
|
|
15405
17047
|
// prevent Firefox from getting stuck in text selection mode when the menu closes.
|
|
15406
17048
|
if (!isPointerDownRef.current) (_event$currentTarget = event.currentTarget) === null || _event$currentTarget === void 0 || _event$currentTarget.click();
|
|
15407
17049
|
}),
|
|
15408
|
-
onKeyDown: $e42e1063c40fb3ef$export$b9ecd428b558ff10(props.onKeyDown, (event)=>{
|
|
17050
|
+
onKeyDown: $e42e1063c40fb3ef$export$b9ecd428b558ff10$1(props.onKeyDown, (event)=>{
|
|
15409
17051
|
const isTypingAhead = contentContext.searchRef.current !== '';
|
|
15410
17052
|
if (disabled || isTypingAhead && event.key === ' ') return;
|
|
15411
17053
|
if ($6cc32821e9371a1c$var$SELECTION_KEYS.includes(event.key)) {
|
|
@@ -15425,7 +17067,7 @@ const $6cc32821e9371a1c$export$2ce376c2cc3355c8 = /*#__PURE__*/ React.forwardRef
|
|
|
15425
17067
|
const contentContext = $6cc32821e9371a1c$var$useMenuContentContext($6cc32821e9371a1c$var$ITEM_NAME, __scopeMenu);
|
|
15426
17068
|
const rovingFocusGroupScope = $6cc32821e9371a1c$var$useRovingFocusGroupScope(__scopeMenu);
|
|
15427
17069
|
const ref = React.useRef(null);
|
|
15428
|
-
const composedRefs = $6ed0406888f73fc4$export$c7b2cbe3552a0d05(forwardedRef, ref);
|
|
17070
|
+
const composedRefs = $6ed0406888f73fc4$export$c7b2cbe3552a0d05$1(forwardedRef, ref);
|
|
15429
17071
|
const [isFocused, setIsFocused] = React.useState(false); // get the item's `.textContent` as default strategy for typeahead `textValue`
|
|
15430
17072
|
const [textContent, setTextContent] = React.useState('');
|
|
15431
17073
|
React.useEffect(()=>{
|
|
@@ -15445,14 +17087,14 @@ const $6cc32821e9371a1c$export$2ce376c2cc3355c8 = /*#__PURE__*/ React.forwardRef
|
|
|
15445
17087
|
asChild: true
|
|
15446
17088
|
}, rovingFocusGroupScope, {
|
|
15447
17089
|
focusable: !disabled
|
|
15448
|
-
}), /*#__PURE__*/ React.createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.div, _extends({
|
|
17090
|
+
}), /*#__PURE__*/ React.createElement($8927f6f2acc4f386$export$250ffa63cdc0d034$1.div, _extends({
|
|
15449
17091
|
role: "menuitem",
|
|
15450
17092
|
"data-highlighted": isFocused ? '' : undefined,
|
|
15451
17093
|
"aria-disabled": disabled || undefined,
|
|
15452
17094
|
"data-disabled": disabled ? '' : undefined
|
|
15453
17095
|
}, itemProps, {
|
|
15454
17096
|
ref: composedRefs,
|
|
15455
|
-
onPointerMove: $e42e1063c40fb3ef$export$b9ecd428b558ff10(props.onPointerMove, $6cc32821e9371a1c$var$whenMouse((event)=>{
|
|
17097
|
+
onPointerMove: $e42e1063c40fb3ef$export$b9ecd428b558ff10$1(props.onPointerMove, $6cc32821e9371a1c$var$whenMouse((event)=>{
|
|
15456
17098
|
if (disabled) contentContext.onItemLeave(event);
|
|
15457
17099
|
else {
|
|
15458
17100
|
contentContext.onItemEnter(event);
|
|
@@ -15462,11 +17104,11 @@ const $6cc32821e9371a1c$export$2ce376c2cc3355c8 = /*#__PURE__*/ React.forwardRef
|
|
|
15462
17104
|
}
|
|
15463
17105
|
}
|
|
15464
17106
|
})),
|
|
15465
|
-
onPointerLeave: $e42e1063c40fb3ef$export$b9ecd428b558ff10(props.onPointerLeave, $6cc32821e9371a1c$var$whenMouse((event)=>contentContext.onItemLeave(event)
|
|
17107
|
+
onPointerLeave: $e42e1063c40fb3ef$export$b9ecd428b558ff10$1(props.onPointerLeave, $6cc32821e9371a1c$var$whenMouse((event)=>contentContext.onItemLeave(event)
|
|
15466
17108
|
)),
|
|
15467
|
-
onFocus: $e42e1063c40fb3ef$export$b9ecd428b558ff10(props.onFocus, ()=>setIsFocused(true)
|
|
17109
|
+
onFocus: $e42e1063c40fb3ef$export$b9ecd428b558ff10$1(props.onFocus, ()=>setIsFocused(true)
|
|
15468
17110
|
),
|
|
15469
|
-
onBlur: $e42e1063c40fb3ef$export$b9ecd428b558ff10(props.onBlur, ()=>setIsFocused(false)
|
|
17111
|
+
onBlur: $e42e1063c40fb3ef$export$b9ecd428b558ff10$1(props.onBlur, ()=>setIsFocused(false)
|
|
15470
17112
|
)
|
|
15471
17113
|
}))));
|
|
15472
17114
|
});
|
|
@@ -15485,7 +17127,7 @@ $6cc32821e9371a1c$var$createMenuContext($6cc32821e9371a1c$var$ITEM_INDICATOR_NAM
|
|
|
15485
17127
|
});
|
|
15486
17128
|
const $6cc32821e9371a1c$export$1cec7dcdd713e220 = /*#__PURE__*/ React.forwardRef((props, forwardedRef)=>{
|
|
15487
17129
|
const { __scopeMenu: __scopeMenu , ...separatorProps } = props;
|
|
15488
|
-
return /*#__PURE__*/ React.createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.div, _extends({
|
|
17130
|
+
return /*#__PURE__*/ React.createElement($8927f6f2acc4f386$export$250ffa63cdc0d034$1.div, _extends({
|
|
15489
17131
|
role: "separator",
|
|
15490
17132
|
"aria-orientation": "horizontal"
|
|
15491
17133
|
}, separatorProps, {
|
|
@@ -15495,7 +17137,7 @@ const $6cc32821e9371a1c$export$1cec7dcdd713e220 = /*#__PURE__*/ React.forwardRef
|
|
|
15495
17137
|
const $6cc32821e9371a1c$export$bcdda4773debf5fa = /*#__PURE__*/ React.forwardRef((props, forwardedRef)=>{
|
|
15496
17138
|
const { __scopeMenu: __scopeMenu , ...arrowProps } = props;
|
|
15497
17139
|
const popperScope = $6cc32821e9371a1c$var$usePopperScope(__scopeMenu);
|
|
15498
|
-
return /*#__PURE__*/ React.createElement($cf1ac5d9fe0e8206$export$21b07c8f274aebd5, _extends({}, popperScope, arrowProps, {
|
|
17140
|
+
return /*#__PURE__*/ React.createElement($cf1ac5d9fe0e8206$export$21b07c8f274aebd5$1, _extends({}, popperScope, arrowProps, {
|
|
15499
17141
|
ref: forwardedRef
|
|
15500
17142
|
}));
|
|
15501
17143
|
});
|
|
@@ -15589,7 +17231,7 @@ const $6cc32821e9371a1c$export$21b07c8f274aebd5 = $6cc32821e9371a1c$export$bcdda
|
|
|
15589
17231
|
/* -------------------------------------------------------------------------------------------------
|
|
15590
17232
|
* DropdownMenu
|
|
15591
17233
|
* -----------------------------------------------------------------------------------------------*/ const $d08ef79370b62062$var$DROPDOWN_MENU_NAME = 'DropdownMenu';
|
|
15592
|
-
const [$d08ef79370b62062$var$createDropdownMenuContext, $d08ef79370b62062$export$c0623cd925aeb687] = $c512c27ab02ef895$export$50c7b4e9d9f19c1($d08ef79370b62062$var$DROPDOWN_MENU_NAME, [
|
|
17234
|
+
const [$d08ef79370b62062$var$createDropdownMenuContext, $d08ef79370b62062$export$c0623cd925aeb687] = $c512c27ab02ef895$export$50c7b4e9d9f19c1$1($d08ef79370b62062$var$DROPDOWN_MENU_NAME, [
|
|
15593
17235
|
$6cc32821e9371a1c$export$4027731b685e72eb
|
|
15594
17236
|
]);
|
|
15595
17237
|
const $d08ef79370b62062$var$useMenuScope = $6cc32821e9371a1c$export$4027731b685e72eb();
|
|
@@ -15598,7 +17240,7 @@ const $d08ef79370b62062$export$e44a253a59704894 = (props)=>{
|
|
|
15598
17240
|
const { __scopeDropdownMenu: __scopeDropdownMenu , children: children , dir: dir , open: openProp , defaultOpen: defaultOpen , onOpenChange: onOpenChange , modal: modal = true } = props;
|
|
15599
17241
|
const menuScope = $d08ef79370b62062$var$useMenuScope(__scopeDropdownMenu);
|
|
15600
17242
|
const triggerRef = React.useRef(null);
|
|
15601
|
-
const [open = false, setOpen] = $71cd76cc60e0454e$export$6f32135080cb4c3({
|
|
17243
|
+
const [open = false, setOpen] = $71cd76cc60e0454e$export$6f32135080cb4c3$1({
|
|
15602
17244
|
prop: openProp,
|
|
15603
17245
|
defaultProp: defaultOpen,
|
|
15604
17246
|
onChange: onOpenChange
|
|
@@ -15632,7 +17274,7 @@ const $d08ef79370b62062$export$d2469213b3befba9 = /*#__PURE__*/ React.forwardRef
|
|
|
15632
17274
|
const menuScope = $d08ef79370b62062$var$useMenuScope(__scopeDropdownMenu);
|
|
15633
17275
|
return /*#__PURE__*/ React.createElement($6cc32821e9371a1c$export$b688253958b8dfe7, _extends({
|
|
15634
17276
|
asChild: true
|
|
15635
|
-
}, menuScope), /*#__PURE__*/ React.createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.button, _extends({
|
|
17277
|
+
}, menuScope), /*#__PURE__*/ React.createElement($8927f6f2acc4f386$export$250ffa63cdc0d034$1.button, _extends({
|
|
15636
17278
|
type: "button",
|
|
15637
17279
|
id: context.triggerId,
|
|
15638
17280
|
"aria-haspopup": "menu",
|
|
@@ -15642,8 +17284,8 @@ const $d08ef79370b62062$export$d2469213b3befba9 = /*#__PURE__*/ React.forwardRef
|
|
|
15642
17284
|
"data-disabled": disabled ? '' : undefined,
|
|
15643
17285
|
disabled: disabled
|
|
15644
17286
|
}, triggerProps, {
|
|
15645
|
-
ref: $6ed0406888f73fc4$export$43e446d32b3d21af(forwardedRef, context.triggerRef),
|
|
15646
|
-
onPointerDown: $e42e1063c40fb3ef$export$b9ecd428b558ff10(props.onPointerDown, (event)=>{
|
|
17287
|
+
ref: $6ed0406888f73fc4$export$43e446d32b3d21af$1(forwardedRef, context.triggerRef),
|
|
17288
|
+
onPointerDown: $e42e1063c40fb3ef$export$b9ecd428b558ff10$1(props.onPointerDown, (event)=>{
|
|
15647
17289
|
// only call handler if it's the left button (mousedown gets triggered by all mouse buttons)
|
|
15648
17290
|
// but not when the control key is pressed (avoiding MacOS right click)
|
|
15649
17291
|
if (!disabled && event.button === 0 && event.ctrlKey === false) {
|
|
@@ -15652,7 +17294,7 @@ const $d08ef79370b62062$export$d2469213b3befba9 = /*#__PURE__*/ React.forwardRef
|
|
|
15652
17294
|
if (!context.open) event.preventDefault();
|
|
15653
17295
|
}
|
|
15654
17296
|
}),
|
|
15655
|
-
onKeyDown: $e42e1063c40fb3ef$export$b9ecd428b558ff10(props.onKeyDown, (event)=>{
|
|
17297
|
+
onKeyDown: $e42e1063c40fb3ef$export$b9ecd428b558ff10$1(props.onKeyDown, (event)=>{
|
|
15656
17298
|
if (disabled) return;
|
|
15657
17299
|
if ([
|
|
15658
17300
|
'Enter',
|
|
@@ -15681,13 +17323,13 @@ const $d08ef79370b62062$export$6e76d93a37c01248 = /*#__PURE__*/ React.forwardRef
|
|
|
15681
17323
|
"aria-labelledby": context.triggerId
|
|
15682
17324
|
}, menuScope, contentProps, {
|
|
15683
17325
|
ref: forwardedRef,
|
|
15684
|
-
onCloseAutoFocus: $e42e1063c40fb3ef$export$b9ecd428b558ff10(props.onCloseAutoFocus, (event)=>{
|
|
17326
|
+
onCloseAutoFocus: $e42e1063c40fb3ef$export$b9ecd428b558ff10$1(props.onCloseAutoFocus, (event)=>{
|
|
15685
17327
|
var _context$triggerRef$c;
|
|
15686
17328
|
if (!hasInteractedOutsideRef.current) (_context$triggerRef$c = context.triggerRef.current) === null || _context$triggerRef$c === void 0 || _context$triggerRef$c.focus();
|
|
15687
17329
|
hasInteractedOutsideRef.current = false; // Always prevent auto focus because we either focus manually or want user agent focus
|
|
15688
17330
|
event.preventDefault();
|
|
15689
17331
|
}),
|
|
15690
|
-
onInteractOutside: $e42e1063c40fb3ef$export$b9ecd428b558ff10(props.onInteractOutside, (event)=>{
|
|
17332
|
+
onInteractOutside: $e42e1063c40fb3ef$export$b9ecd428b558ff10$1(props.onInteractOutside, (event)=>{
|
|
15691
17333
|
const originalEvent = event.detail.originalEvent;
|
|
15692
17334
|
const ctrlLeftClick = originalEvent.button === 0 && originalEvent.ctrlKey === true;
|
|
15693
17335
|
const isRightClick = originalEvent.button === 2 || ctrlLeftClick;
|
|
@@ -15744,22 +17386,22 @@ const borderStyles = [
|
|
|
15744
17386
|
'tw-border',
|
|
15745
17387
|
'tw-rounded-sm',
|
|
15746
17388
|
'tw-border-sq-disabled-gray',
|
|
15747
|
-
'dark:tw-border-gray-
|
|
17389
|
+
'dark:tw-border-gray-500',
|
|
15748
17390
|
].join(' ');
|
|
15749
17391
|
const bgStyles = ['tw-bg-sq-white', 'dark:tw-bg-sq-dark-background'].join(' ');
|
|
15750
17392
|
const disabledClasses = ['tw-opacity-50', 'tw-cursor-not-allowed'].join(' ');
|
|
15751
|
-
const ButtonWithDropdown = ({ dropdownItems, triggerIcon, id, extraClassNames, containerTestId, disabled = false, align = 'end', placement = 'bottom', placementOffset =
|
|
17393
|
+
const ButtonWithDropdown = ({ dropdownItems, triggerIcon, id, extraClassNames, containerTestId, disabled = false, align = 'end', placement = 'bottom', placementOffset = 5, alignOffset = -35, hasArrow = false, onOpenChange, isOpen, setFocusOnTriggerOnClose = true, keepFocusInsideDropdown = true, ...tooltipProps }) => {
|
|
15752
17394
|
const tooltipData = getQTipData(tooltipProps);
|
|
15753
17395
|
return (React__namespace.createElement($d08ef79370b62062$export$be92b6f5f03c0fe9, { defaultOpen: false, open: isOpen, onOpenChange: onOpenChange, modal: keepFocusInsideDropdown },
|
|
15754
17396
|
React__namespace.createElement($d08ef79370b62062$export$41fb9f06171c75f4, { id: id, className: `tw-border-none focus-visible:tw-outline-none focus:tw-outline-none focus-within:tw-outline-none`, disabled: disabled },
|
|
15755
17397
|
React__namespace.createElement("div", { ...tooltipData, className: `tw-bg-transparent tw-flex tw-flex-col tw-items-center focus-visible:tw-outline-none focus:tw-outline-none focus-within:tw-outline-none ${disabled ? disabledClasses : ''} ${extraClassNames || ''}` }, triggerIcon)),
|
|
15756
17398
|
React__namespace.createElement($d08ef79370b62062$export$7c6e2c02157bb7d2, { sideOffset: placementOffset, side: placement, align: align, alignOffset: alignOffset, asChild: true, onCloseAutoFocus: (e) => !setFocusOnTriggerOnClose && e.preventDefault(), className: "focus-visible:tw-outline-none tw-outline-none" },
|
|
15757
17399
|
React__namespace.createElement("div", { "data-testid": containerTestId, className: bgStyles +
|
|
15758
|
-
' tw-relative tw-z-[1000] tw-min-w-6 focus-visible:tw-outline-none tw-outline-none data-[state=open]:tw-animate-in data-[state=closed]:tw-animate-out' +
|
|
17400
|
+
' tw-relative tw-z-[1000] tw-min-w-6 tw-pt-2 focus-visible:tw-outline-none tw-outline-none data-[state=open]:tw-animate-in data-[state=closed]:tw-animate-out' +
|
|
15759
17401
|
' forceFont data-[side=top]:tw-animate-slideDownAndFade data-[side=right]:tw-animate-slideLeftAndFade data-[side=bottom]:tw-animate-slideUpAndFade data-[side=left]:tw-animate-slideRightAndFade ' +
|
|
15760
17402
|
borderStyles },
|
|
15761
17403
|
hasArrow && (React__namespace.createElement($d08ef79370b62062$export$21b07c8f274aebd5, { asChild: true },
|
|
15762
|
-
React__namespace.createElement("div", { className: " tw-fill-transparent tw-bg-white tw-w-[
|
|
17404
|
+
React__namespace.createElement("div", { className: " tw-fill-transparent tw-bg-white tw-w-[15px] tw-h-[15px] tw-rotate-45 dark:tw-bg-sq-dark-background tw-border-b tw-border-r tw-border-sq-disabled-gray dark:tw-border-gray-500 tw-mt-[-7px]" }))),
|
|
15763
17405
|
dropdownItems.map((item, index) => {
|
|
15764
17406
|
return item.isLabel ? (React__namespace.createElement($d08ef79370b62062$export$b04be29aa201d4f5, { key: (item.label || '') + index, className: item.containerExtraClassNames },
|
|
15765
17407
|
item.icon && (React__namespace.createElement(Icon, { icon: item.icon, testId: item.iconTestId, type: "text", color: item.iconColor, extraClassNames: "tw-text-sq-text-color dark:tw-text-sq-white tw-w-[18px]" })),
|
|
@@ -15769,7 +17411,7 @@ const ButtonWithDropdown = ({ dropdownItems, triggerIcon, id, extraClassNames, c
|
|
|
15769
17411
|
}, className: `tw-cursor-pointer tw-flex dark:tw-text-sq-white hover:tw-bg-sq-colored-hover hover:dark:tw-bg-sq-colored-hover-dark tw-leading-none tw-items-center tw-h-[27px] tw-px-[19px] tw-relative tw-select-none tw-outline-none data-[disabled]:tw-text-sq-disabled-gray data-[disabled]:tw-pointer-events-none ${item.containerExtraClassNames || ''}`, "data-testid": item.testId, disabled: item.disabled },
|
|
15770
17412
|
item.icon && (React__namespace.createElement(Icon, { icon: item.icon, testId: item.iconTestId, type: (item.iconType || 'text'), color: item.iconColor, customId: item.iconCustomId, extraClassNames: `tw-text-sq-text-color dark:tw-text-sq-white tw-w-[18px] ${item.iconExtraClassNames || ''}` })),
|
|
15771
17413
|
React__namespace.createElement("div", { "data-testid": item.labelTestId, "data-customid": item.labelCustomId, className: `tw-text-[13px] tw-ml-1 ${item.labelClasses}` }, item.label)),
|
|
15772
|
-
item.hasDivider && (React__namespace.createElement($d08ef79370b62062$export$1ff3c3f08ae963c0, { "data-testid": `dropdown-divider-${index}`, className: "tw-h-[1px] tw-bg-sq-disabled-gray dark:tw-bg-gray-
|
|
17414
|
+
item.hasDivider && (React__namespace.createElement($d08ef79370b62062$export$1ff3c3f08ae963c0, { "data-testid": `dropdown-divider-${index}`, className: "tw-h-[1px] tw-bg-sq-disabled-gray dark:tw-bg-gray-500 tw-my-[8px]" }))));
|
|
15773
17415
|
})))));
|
|
15774
17416
|
};
|
|
15775
17417
|
|