@tamagui/popover 3.0.0-beta.924.1 → 3.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -124,7 +124,7 @@ function usePopoverTriggerSetup(open) {
124
124
  unregisterTrigger
125
125
  };
126
126
  }
127
- const PopoverContextProvider = React.memo(({ scope, children, open, onOpenChange, onOpenToggle, triggerRef, id = "", contentId, hasCustomAnchor = false, onCustomAnchorAdd = voidFn, onCustomAnchorRemove = voidFn, anchorTo, adaptScope, breakpointActive, keepChildrenMounted, disableDismissable, hoverable }) => {
127
+ const PopoverContextProvider = React.memo(({ scope, children, open, onOpenChange, onOpenToggle, triggerRef, id = "", contentId, hasCustomAnchor = false, onCustomAnchorAdd = voidFn, onCustomAnchorRemove = voidFn, anchorTo, adaptScope, breakpointActive, keepChildrenMounted, disableDismissable, hoverable, closeReasonRef }) => {
128
128
  const [branches] = React.useState(() => /* @__PURE__ */ new Set());
129
129
  const { setActiveTrigger, registerTrigger, unregisterTrigger } = usePopoverTriggerSetup(open);
130
130
  return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(PopoverContext.Provider, {
@@ -146,6 +146,7 @@ const PopoverContextProvider = React.memo(({ scope, children, open, onOpenChange
146
146
  keepChildrenMounted,
147
147
  disableDismissable,
148
148
  hoverable,
149
+ closeReasonRef,
149
150
  children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(PopoverTriggerContext.Provider, {
150
151
  scope,
151
152
  triggerRef,
@@ -177,6 +178,7 @@ const PopoverAnchor = React.memo((0, import_core.createRefComponent)(function Po
177
178
  const PopoverTrigger = React.memo((0, import_core.createRefComponent)(function PopoverTrigger2(props, forwardedRef) {
178
179
  const { scope, disablePressTrigger, ...rest } = props;
179
180
  const triggerContext = usePopoverTriggerContext(scope);
181
+ const popperContext = (0, import_popper.usePopperContextSlow)(scope);
180
182
  const triggerId = React.useId();
181
183
  const [open, setOpen] = React.useState(false);
182
184
  const anchorTo = triggerContext.anchorTo;
@@ -211,7 +213,13 @@ const PopoverTrigger = React.memo((0, import_core.createRefComponent)(function P
211
213
  }),
212
214
  onMouseEnter: (0, import_helpers.composeEventHandlers)(rest.onMouseEnter, activateSelf),
213
215
  onPressIn: (0, import_helpers.composeEventHandlers)(rest.onPressIn, activateSelf),
214
- onFocus: (0, import_helpers.composeEventHandlers)(rest.onFocus, activateSelf)
216
+ onFocus: (0, import_helpers.composeEventHandlers)(rest.onFocus, (event) => {
217
+ activateSelf();
218
+ popperContext.getReferenceProps?.({ ref: triggerElRef }).onFocus?.(event);
219
+ }),
220
+ onBlur: (0, import_helpers.composeEventHandlers)(rest.onBlur, (event) => {
221
+ popperContext.getReferenceProps?.({ ref: triggerElRef }).onBlur?.(event);
222
+ })
215
223
  });
216
224
  const virtualRef = React.useMemo(() => {
217
225
  if (!anchorTo) return null;
@@ -380,7 +388,8 @@ const PopoverContentImpl = (0, import_core.createRefComponent)(function PopoverC
380
388
  disable: context.breakpointActive,
381
389
  children
382
390
  });
383
- const handleDismiss = React.useCallback(() => {
391
+ const handleDismiss = React.useCallback((details) => {
392
+ if (context.closeReasonRef) context.closeReasonRef.current = details.reason === "escape-key" ? "escape-key" : "dismiss";
384
393
  context.onOpenChange(false, "press");
385
394
  }, [context]);
386
395
  if (!context.breakpointActive) {
@@ -465,6 +474,7 @@ const Popover = (0, import_helpers.withStaticProperties)((0, import_core.createR
465
474
  const adaptScope = `PopoverAdapt${scope}`;
466
475
  const { open: openProp, defaultOpen, onOpenChange } = props;
467
476
  const viaRef = React.useRef(void 0);
477
+ const closeReasonRef = React.useRef(void 0);
468
478
  const [open, setOpen] = (0, import_use_controllable_state.useControllableState)({
469
479
  prop: openProp,
470
480
  defaultProp: defaultOpen || false,
@@ -485,6 +495,7 @@ const Popover = (0, import_helpers.withStaticProperties)((0, import_core.createR
485
495
  }, [open, setOpen]);
486
496
  return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_adapt.AdaptParent, {
487
497
  scope: adaptScope,
498
+ adaptChildren: props.children,
488
499
  open,
489
500
  onOpenChange: setOpen,
490
501
  children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(PopoverInner, {
@@ -495,6 +506,7 @@ const Popover = (0, import_helpers.withStaticProperties)((0, import_core.createR
495
506
  open,
496
507
  setOpen,
497
508
  handleOpenChange,
509
+ closeReasonRef,
498
510
  ...props
499
511
  })
500
512
  });
@@ -509,7 +521,7 @@ const Popover = (0, import_helpers.withStaticProperties)((0, import_core.createR
509
521
  FocusScope: import_focus_scope.FocusScopeController
510
522
  });
511
523
  const PopoverInner = (0, import_core.createRefComponent)(function PopoverInner2(props, forwardedRef) {
512
- const { children, open: _openProp, defaultOpen: _defaultOpen, onOpenChange: _onOpenChange, scope = DEFAULT_SCOPE, keepChildrenMounted: keepChildrenMountedProp, hoverable, disableFocus, disableDismissable, zIndex, id, adaptScope, open, setOpen, handleOpenChange, ...restProps } = props;
524
+ const { children, open: _openProp, defaultOpen: _defaultOpen, onOpenChange: _onOpenChange, scope = DEFAULT_SCOPE, keepChildrenMounted: keepChildrenMountedProp, hoverable, disableFocus = !hoverable, disableDismissable, zIndex, id, adaptScope, open, setOpen, handleOpenChange, closeReasonRef, ...restProps } = props;
513
525
  const triggerRef = React.useRef(null);
514
526
  const [hasCustomAnchor, setHasCustomAnchor] = React.useState(false);
515
527
  const [keepChildrenMounted] = (0, import_use_controllable_state.useControllableState)({
@@ -521,6 +533,7 @@ const PopoverInner = (0, import_core.createRefComponent)(function PopoverInner2(
521
533
  const floatingContext = (0, import_useFloatingContext.useFloatingContext)({
522
534
  open,
523
535
  setOpen: handleOpenChange,
536
+ closeReasonRef,
524
537
  disable: isAdapted,
525
538
  hoverable,
526
539
  disableFocus
@@ -537,6 +550,7 @@ const PopoverInner = (0, import_core.createRefComponent)(function PopoverInner2(
537
550
  const contentId = React.useId();
538
551
  const onOpenToggle = (0, import_core.useEvent)(() => {
539
552
  if (open && isAdapted) return;
553
+ closeReasonRef.current = open ? "reference-press" : void 0;
540
554
  setOpen(!open);
541
555
  });
542
556
  const onCustomAnchorAdd = React.useCallback(() => setHasCustomAnchor(true), []);
@@ -564,6 +578,7 @@ const PopoverInner = (0, import_core.createRefComponent)(function PopoverInner2(
564
578
  keepChildrenMounted,
565
579
  disableDismissable,
566
580
  hoverable,
581
+ closeReasonRef,
567
582
  children
568
583
  })
569
584
  });
@@ -138,7 +138,7 @@ function usePopoverTriggerSetup(open) {
138
138
  };
139
139
  }
140
140
  var PopoverContextProvider = /* @__PURE__ */ React.memo(function(param) {
141
- var { scope, children, open, onOpenChange, onOpenToggle, triggerRef, id = "", contentId, hasCustomAnchor = false, onCustomAnchorAdd = voidFn, onCustomAnchorRemove = voidFn, anchorTo, adaptScope, breakpointActive, keepChildrenMounted, disableDismissable, hoverable } = param;
141
+ var { scope, children, open, onOpenChange, onOpenToggle, triggerRef, id = "", contentId, hasCustomAnchor = false, onCustomAnchorAdd = voidFn, onCustomAnchorRemove = voidFn, anchorTo, adaptScope, breakpointActive, keepChildrenMounted, disableDismissable, hoverable, closeReasonRef } = param;
142
142
  var [branches] = React.useState(function() {
143
143
  return /* @__PURE__ */ new Set();
144
144
  });
@@ -162,6 +162,7 @@ var PopoverContextProvider = /* @__PURE__ */ React.memo(function(param) {
162
162
  keepChildrenMounted,
163
163
  disableDismissable,
164
164
  hoverable,
165
+ closeReasonRef,
165
166
  children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(PopoverTriggerContext.Provider, {
166
167
  scope,
167
168
  triggerRef,
@@ -195,6 +196,7 @@ var PopoverAnchor = /* @__PURE__ */ React.memo((0, import_core.createRefComponen
195
196
  var PopoverTrigger = /* @__PURE__ */ React.memo((0, import_core.createRefComponent)(function PopoverTrigger2(props, forwardedRef) {
196
197
  var { scope, disablePressTrigger, ...rest } = props;
197
198
  var triggerContext = usePopoverTriggerContext(scope);
199
+ var popperContext = (0, import_popper.usePopperContextSlow)(scope);
198
200
  var triggerId = React.useId();
199
201
  var [open, setOpen] = React.useState(false);
200
202
  var anchorTo = triggerContext.anchorTo;
@@ -229,7 +231,15 @@ var PopoverTrigger = /* @__PURE__ */ React.memo((0, import_core.createRefCompone
229
231
  }),
230
232
  onMouseEnter: (0, import_helpers.composeEventHandlers)(rest.onMouseEnter, activateSelf),
231
233
  onPressIn: (0, import_helpers.composeEventHandlers)(rest.onPressIn, activateSelf),
232
- onFocus: (0, import_helpers.composeEventHandlers)(rest.onFocus, activateSelf)
234
+ onFocus: (0, import_helpers.composeEventHandlers)(rest.onFocus, function(event) {
235
+ var _popperContext_getReferenceProps_onFocus, _popperContext_getReferenceProps, _popperContext_getReferenceProps_call;
236
+ activateSelf();
237
+ (_popperContext_getReferenceProps = popperContext.getReferenceProps) === null || _popperContext_getReferenceProps === void 0 || (_popperContext_getReferenceProps_onFocus = (_popperContext_getReferenceProps_call = _popperContext_getReferenceProps.call(popperContext, { ref: triggerElRef })).onFocus) == null || _popperContext_getReferenceProps_onFocus.call(_popperContext_getReferenceProps_call, event);
238
+ }),
239
+ onBlur: (0, import_helpers.composeEventHandlers)(rest.onBlur, function(event) {
240
+ var _popperContext_getReferenceProps_onBlur, _popperContext_getReferenceProps, _popperContext_getReferenceProps_call;
241
+ (_popperContext_getReferenceProps = popperContext.getReferenceProps) === null || _popperContext_getReferenceProps === void 0 || (_popperContext_getReferenceProps_onBlur = (_popperContext_getReferenceProps_call = _popperContext_getReferenceProps.call(popperContext, { ref: triggerElRef })).onBlur) == null || _popperContext_getReferenceProps_onBlur.call(_popperContext_getReferenceProps_call, event);
242
+ })
233
243
  });
234
244
  var virtualRef = React.useMemo(function() {
235
245
  if (!anchorTo) return null;
@@ -409,7 +419,8 @@ var PopoverContentImpl = (0, import_core.createRefComponent)(function PopoverCon
409
419
  disable: context.breakpointActive,
410
420
  children
411
421
  });
412
- React.useCallback(function() {
422
+ React.useCallback(function(details) {
423
+ if (context.closeReasonRef) context.closeReasonRef.current = details.reason === "escape-key" ? "escape-key" : "dismiss";
413
424
  context.onOpenChange(false, "press");
414
425
  }, [context]);
415
426
  if (!context.breakpointActive) {}
@@ -476,6 +487,7 @@ var Popover = (0, import_helpers.withStaticProperties)((0, import_core.createRef
476
487
  var adaptScope = `PopoverAdapt${scope}`;
477
488
  var { open: openProp, defaultOpen, onOpenChange } = props;
478
489
  var viaRef = React.useRef(void 0);
490
+ var closeReasonRef = React.useRef(void 0);
479
491
  var [open, setOpen] = (0, import_use_controllable_state.useControllableState)({
480
492
  prop: openProp,
481
493
  defaultProp: defaultOpen || false,
@@ -496,6 +508,7 @@ var Popover = (0, import_helpers.withStaticProperties)((0, import_core.createRef
496
508
  }, [open, setOpen]);
497
509
  return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_adapt.AdaptParent, {
498
510
  scope: adaptScope,
511
+ adaptChildren: props.children,
499
512
  open,
500
513
  onOpenChange: setOpen,
501
514
  children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(PopoverInner, {
@@ -506,6 +519,7 @@ var Popover = (0, import_helpers.withStaticProperties)((0, import_core.createRef
506
519
  open,
507
520
  setOpen,
508
521
  handleOpenChange,
522
+ closeReasonRef,
509
523
  ...props
510
524
  })
511
525
  });
@@ -520,7 +534,7 @@ var Popover = (0, import_helpers.withStaticProperties)((0, import_core.createRef
520
534
  FocusScope: import_focus_scope.FocusScopeController
521
535
  });
522
536
  var PopoverInner = (0, import_core.createRefComponent)(function PopoverInner2(props, forwardedRef) {
523
- var { children, open: _openProp, defaultOpen: _defaultOpen, onOpenChange: _onOpenChange, scope = DEFAULT_SCOPE, keepChildrenMounted: keepChildrenMountedProp, hoverable, disableFocus, disableDismissable, zIndex, id, adaptScope, open, setOpen, handleOpenChange, ...restProps } = props;
537
+ var { children, open: _openProp, defaultOpen: _defaultOpen, onOpenChange: _onOpenChange, scope = DEFAULT_SCOPE, keepChildrenMounted: keepChildrenMountedProp, hoverable, disableFocus = !hoverable, disableDismissable, zIndex, id, adaptScope, open, setOpen, handleOpenChange, closeReasonRef, ...restProps } = props;
524
538
  var triggerRef = React.useRef(null);
525
539
  var [hasCustomAnchor, setHasCustomAnchor] = React.useState(false);
526
540
  var [keepChildrenMounted] = (0, import_use_controllable_state.useControllableState)({
@@ -532,6 +546,7 @@ var PopoverInner = (0, import_core.createRefComponent)(function PopoverInner2(pr
532
546
  var floatingContext = (0, import_useFloatingContext.useFloatingContext)({
533
547
  open,
534
548
  setOpen: handleOpenChange,
549
+ closeReasonRef,
535
550
  disable: isAdapted,
536
551
  hoverable,
537
552
  disableFocus
@@ -558,6 +573,7 @@ var PopoverInner = (0, import_core.createRefComponent)(function PopoverInner2(pr
558
573
  var contentId = React.useId();
559
574
  var onOpenToggle = (0, import_core.useEvent)(function() {
560
575
  if (open && isAdapted) return;
576
+ closeReasonRef.current = open ? "reference-press" : void 0;
561
577
  setOpen(!open);
562
578
  });
563
579
  var onCustomAnchorAdd = React.useCallback(function() {
@@ -589,6 +605,7 @@ var PopoverInner = (0, import_core.createRefComponent)(function PopoverInner2(pr
589
605
  keepChildrenMounted,
590
606
  disableDismissable,
591
607
  hoverable,
608
+ closeReasonRef,
592
609
  children
593
610
  })
594
611
  });
@@ -138,7 +138,7 @@ function usePopoverTriggerSetup(open) {
138
138
  };
139
139
  }
140
140
  var PopoverContextProvider = /* @__PURE__ */ React.memo(function(param) {
141
- var { scope, children, open, onOpenChange, onOpenToggle, triggerRef, id = "", contentId, hasCustomAnchor = false, onCustomAnchorAdd = voidFn, onCustomAnchorRemove = voidFn, anchorTo, adaptScope, breakpointActive, keepChildrenMounted, disableDismissable, hoverable } = param;
141
+ var { scope, children, open, onOpenChange, onOpenToggle, triggerRef, id = "", contentId, hasCustomAnchor = false, onCustomAnchorAdd = voidFn, onCustomAnchorRemove = voidFn, anchorTo, adaptScope, breakpointActive, keepChildrenMounted, disableDismissable, hoverable, closeReasonRef } = param;
142
142
  var [branches] = React.useState(function() {
143
143
  return /* @__PURE__ */ new Set();
144
144
  });
@@ -162,6 +162,7 @@ var PopoverContextProvider = /* @__PURE__ */ React.memo(function(param) {
162
162
  keepChildrenMounted,
163
163
  disableDismissable,
164
164
  hoverable,
165
+ closeReasonRef,
165
166
  children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(PopoverTriggerContext.Provider, {
166
167
  scope,
167
168
  triggerRef,
@@ -195,6 +196,7 @@ var PopoverAnchor = /* @__PURE__ */ React.memo((0, import_core.createRefComponen
195
196
  var PopoverTrigger = /* @__PURE__ */ React.memo((0, import_core.createRefComponent)(function PopoverTrigger2(props, forwardedRef) {
196
197
  var { scope, disablePressTrigger, ...rest } = props;
197
198
  var triggerContext = usePopoverTriggerContext(scope);
199
+ var popperContext = (0, import_popper.usePopperContextSlow)(scope);
198
200
  var triggerId = React.useId();
199
201
  var [open, setOpen] = React.useState(false);
200
202
  var anchorTo = triggerContext.anchorTo;
@@ -229,7 +231,15 @@ var PopoverTrigger = /* @__PURE__ */ React.memo((0, import_core.createRefCompone
229
231
  }),
230
232
  onMouseEnter: (0, import_helpers.composeEventHandlers)(rest.onMouseEnter, activateSelf),
231
233
  onPressIn: (0, import_helpers.composeEventHandlers)(rest.onPressIn, activateSelf),
232
- onFocus: (0, import_helpers.composeEventHandlers)(rest.onFocus, activateSelf)
234
+ onFocus: (0, import_helpers.composeEventHandlers)(rest.onFocus, function(event) {
235
+ var _popperContext_getReferenceProps_onFocus, _popperContext_getReferenceProps, _popperContext_getReferenceProps_call;
236
+ activateSelf();
237
+ (_popperContext_getReferenceProps = popperContext.getReferenceProps) === null || _popperContext_getReferenceProps === void 0 || (_popperContext_getReferenceProps_onFocus = (_popperContext_getReferenceProps_call = _popperContext_getReferenceProps.call(popperContext, { ref: triggerElRef })).onFocus) == null || _popperContext_getReferenceProps_onFocus.call(_popperContext_getReferenceProps_call, event);
238
+ }),
239
+ onBlur: (0, import_helpers.composeEventHandlers)(rest.onBlur, function(event) {
240
+ var _popperContext_getReferenceProps_onBlur, _popperContext_getReferenceProps, _popperContext_getReferenceProps_call;
241
+ (_popperContext_getReferenceProps = popperContext.getReferenceProps) === null || _popperContext_getReferenceProps === void 0 || (_popperContext_getReferenceProps_onBlur = (_popperContext_getReferenceProps_call = _popperContext_getReferenceProps.call(popperContext, { ref: triggerElRef })).onBlur) == null || _popperContext_getReferenceProps_onBlur.call(_popperContext_getReferenceProps_call, event);
242
+ })
233
243
  });
234
244
  var virtualRef = React.useMemo(function() {
235
245
  if (!anchorTo) return null;
@@ -409,7 +419,8 @@ var PopoverContentImpl = (0, import_core.createRefComponent)(function PopoverCon
409
419
  disable: context.breakpointActive,
410
420
  children
411
421
  });
412
- React.useCallback(function() {
422
+ React.useCallback(function(details) {
423
+ if (context.closeReasonRef) context.closeReasonRef.current = details.reason === "escape-key" ? "escape-key" : "dismiss";
413
424
  context.onOpenChange(false, "press");
414
425
  }, [context]);
415
426
  if (!context.breakpointActive) {}
@@ -476,6 +487,7 @@ var Popover = (0, import_helpers.withStaticProperties)((0, import_core.createRef
476
487
  var adaptScope = `PopoverAdapt${scope}`;
477
488
  var { open: openProp, defaultOpen, onOpenChange } = props;
478
489
  var viaRef = React.useRef(void 0);
490
+ var closeReasonRef = React.useRef(void 0);
479
491
  var [open, setOpen] = (0, import_use_controllable_state.useControllableState)({
480
492
  prop: openProp,
481
493
  defaultProp: defaultOpen || false,
@@ -496,6 +508,7 @@ var Popover = (0, import_helpers.withStaticProperties)((0, import_core.createRef
496
508
  }, [open, setOpen]);
497
509
  return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_adapt.AdaptParent, {
498
510
  scope: adaptScope,
511
+ adaptChildren: props.children,
499
512
  open,
500
513
  onOpenChange: setOpen,
501
514
  children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(PopoverInner, {
@@ -506,6 +519,7 @@ var Popover = (0, import_helpers.withStaticProperties)((0, import_core.createRef
506
519
  open,
507
520
  setOpen,
508
521
  handleOpenChange,
522
+ closeReasonRef,
509
523
  ...props
510
524
  })
511
525
  });
@@ -520,7 +534,7 @@ var Popover = (0, import_helpers.withStaticProperties)((0, import_core.createRef
520
534
  FocusScope: import_focus_scope.FocusScopeController
521
535
  });
522
536
  var PopoverInner = (0, import_core.createRefComponent)(function PopoverInner2(props, forwardedRef) {
523
- var { children, open: _openProp, defaultOpen: _defaultOpen, onOpenChange: _onOpenChange, scope = DEFAULT_SCOPE, keepChildrenMounted: keepChildrenMountedProp, hoverable, disableFocus, disableDismissable, zIndex, id, adaptScope, open, setOpen, handleOpenChange, ...restProps } = props;
537
+ var { children, open: _openProp, defaultOpen: _defaultOpen, onOpenChange: _onOpenChange, scope = DEFAULT_SCOPE, keepChildrenMounted: keepChildrenMountedProp, hoverable, disableFocus = !hoverable, disableDismissable, zIndex, id, adaptScope, open, setOpen, handleOpenChange, closeReasonRef, ...restProps } = props;
524
538
  var triggerRef = React.useRef(null);
525
539
  var [hasCustomAnchor, setHasCustomAnchor] = React.useState(false);
526
540
  var [keepChildrenMounted] = (0, import_use_controllable_state.useControllableState)({
@@ -532,6 +546,7 @@ var PopoverInner = (0, import_core.createRefComponent)(function PopoverInner2(pr
532
546
  var floatingContext = (0, import_useFloatingContext.useFloatingContext)({
533
547
  open,
534
548
  setOpen: handleOpenChange,
549
+ closeReasonRef,
535
550
  disable: isAdapted,
536
551
  hoverable,
537
552
  disableFocus
@@ -558,6 +573,7 @@ var PopoverInner = (0, import_core.createRefComponent)(function PopoverInner2(pr
558
573
  var contentId = React.useId();
559
574
  var onOpenToggle = (0, import_core.useEvent)(function() {
560
575
  if (open && isAdapted) return;
576
+ closeReasonRef.current = open ? "reference-press" : void 0;
561
577
  setOpen(!open);
562
578
  });
563
579
  var onCustomAnchorAdd = React.useCallback(function() {
@@ -589,6 +605,7 @@ var PopoverInner = (0, import_core.createRefComponent)(function PopoverInner2(pr
589
605
  keepChildrenMounted,
590
606
  disableDismissable,
591
607
  hoverable,
608
+ closeReasonRef,
592
609
  children
593
610
  })
594
611
  });
@@ -1 +1 @@
1
- {"version":3,"file":"Popover.native.js","names":[],"sources":["cjs/Popover.native.js"],"sourcesContent":["\"use strict\";\nvar __create = Object.create;\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __getProtoOf = Object.getPrototypeOf;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n\tfor (var name in all) __defProp(target, name, {\n\t\tget: all[name],\n\t\tenumerable: true\n\t});\n};\nvar __copyProps = (to, from, except, desc) => {\n\tif (from && typeof from === \"object\" || typeof from === \"function\") {\n\t\tfor (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {\n\t\t\tget: () => from[key],\n\t\t\tenumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable\n\t\t});\n\t}\n\treturn to;\n};\nvar __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(\n\t// If the importer is in node compatibility mode or this is not an ESM\n\t// file that has been converted to a CommonJS file using a Babel-\n\t// compatible transform (i.e. \"__esModule\" has not been set), then set\n\t// \"default\" to the CommonJS \"module.exports\" for node compatibility.\n\tisNodeMode || !mod || !mod.__esModule ? __defProp(target, \"default\", {\n\t\tvalue: mod,\n\t\tenumerable: true\n\t}) : target,\n\tmod\n));\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar Popover_exports = {};\n__export(Popover_exports, {\n\tPopover: () => Popover,\n\tPopoverAnchor: () => PopoverAnchor,\n\tPopoverArrow: () => PopoverArrow,\n\tPopoverClose: () => PopoverClose,\n\tPopoverContent: () => PopoverContent,\n\tPopoverContext: () => PopoverContext,\n\tPopoverContextProvider: () => PopoverContextProvider,\n\tPopoverTrigger: () => PopoverTrigger,\n\tPopoverTriggerContext: () => PopoverTriggerContext,\n\tPopoverZIndexContext: () => PopoverZIndexContext,\n\tcloseLastOpenedPopover: () => closeLastOpenedPopover,\n\tcloseOpenPopovers: () => closeOpenPopovers,\n\thasOpenPopovers: () => hasOpenPopovers,\n\tusePopoverContext: () => usePopoverContext,\n\tusePopoverOpen: () => usePopoverOpen,\n\tusePopoverTriggerContext: () => usePopoverTriggerContext,\n\tusePopoverTriggerSetup: () => usePopoverTriggerSetup\n});\nmodule.exports = __toCommonJS(Popover_exports);\nvar import_jsx_runtime = require(\"react/jsx-runtime\");\nrequire(\"@tamagui/polyfill-dev\");\nvar import_adapt = require(\"@tamagui/adapt\");\nvar import_animate = require(\"@tamagui/animate\");\nvar import_animate_presence = require(\"@tamagui/animate-presence\");\nvar import_compose_refs = require(\"@tamagui/compose-refs\");\nvar import_constants = require(\"@tamagui/constants\");\nvar import_core = require(\"@tamagui/core\");\nvar import_dismissable = require(\"@tamagui/dismissable\");\nvar import_floating = require(\"@tamagui/floating\");\nvar import_focus_scope = require(\"@tamagui/focus-scope\");\nvar import_helpers = require(\"@tamagui/helpers\");\nvar import_popper = require(\"@tamagui/popper\");\nvar import_portal = require(\"@tamagui/portal\");\nrequire(\"@tamagui/remove-scroll\");\nvar import_scroll_view = require(\"@tamagui/scroll-view\");\nvar import_stacks = require(\"@tamagui/stacks\");\nvar import_use_controllable_state = require(\"@tamagui/use-controllable-state\");\nvar React = __toESM(require(\"react\"), 1);\nvar import_useFloatingContext = require(\"./useFloatingContext\");\nvar needsRepropagation = (0, import_portal.needsPortalRepropagation)();\nvar openPopovers = /* @__PURE__ */ new Set();\nvar hasOpenPopovers = function() {\n\treturn openPopovers.size > 0;\n};\nvar closeOpenPopovers = function() {\n\tif (openPopovers.size === 0) return false;\n\topenPopovers.forEach(function(setOpen) {\n\t\treturn setOpen(false);\n\t});\n\treturn true;\n};\nvar closeLastOpenedPopover = function() {\n\tif (openPopovers.size === 0) return false;\n\tvar last = Array.from(openPopovers).pop();\n\tif (last) {\n\t\tlast(false);\n\t\treturn true;\n\t}\n\treturn false;\n};\nvar PopoverContext = (0, import_core.createStyledContext)(\n\t// since we always provide this we can avoid setting here\n\t{},\n\t\"Popover__\"\n);\nvar PopoverZIndexContext = /* @__PURE__ */ React.createContext(void 0);\nvar PopoverTriggerContext = (0, import_core.createStyledContext)({}, \"PopoverTrigger__\");\nvar usePopoverContext = PopoverContext.useStyledContext;\nvar usePopoverTriggerContext = PopoverTriggerContext.useStyledContext;\nfunction usePopoverOpen(scope) {\n\treturn usePopoverContext(scope).open;\n}\nfunction usePopoverTriggerSetup(open) {\n\tvar triggerStateSettersRef = React.useRef(/* @__PURE__ */ new Map());\n\tvar activeTriggerIdRef = React.useRef(null);\n\tvar setActiveTrigger = (0, import_core.useEvent)(function(id) {\n\t\tvar prevId = activeTriggerIdRef.current;\n\t\tif (prevId === id) return;\n\t\tif (prevId) {\n\t\t\tvar _triggerStateSettersRef_current_get;\n\t\t\t(_triggerStateSettersRef_current_get = triggerStateSettersRef.current.get(prevId)) === null || _triggerStateSettersRef_current_get === void 0 || _triggerStateSettersRef_current_get(false);\n\t\t}\n\t\tactiveTriggerIdRef.current = id;\n\t\tif (id && open) {\n\t\t\tvar _triggerStateSettersRef_current_get1;\n\t\t\t(_triggerStateSettersRef_current_get1 = triggerStateSettersRef.current.get(id)) === null || _triggerStateSettersRef_current_get1 === void 0 || _triggerStateSettersRef_current_get1(true);\n\t\t}\n\t});\n\tvar registerTrigger = (0, import_core.useEvent)(function(id, setOpenState) {\n\t\ttriggerStateSettersRef.current.set(id, setOpenState);\n\t\tsetOpenState(activeTriggerIdRef.current === id && open);\n\t});\n\tvar unregisterTrigger = (0, import_core.useEvent)(function(id) {\n\t\ttriggerStateSettersRef.current.delete(id);\n\t\tif (activeTriggerIdRef.current === id) activeTriggerIdRef.current = null;\n\t});\n\tReact.useEffect(function() {\n\t\tif (!open) {\n\t\t\tsetActiveTrigger(null);\n\t\t\treturn;\n\t\t}\n\t\tvar activeId = activeTriggerIdRef.current;\n\t\tif (activeId) {\n\t\t\tvar _triggerStateSettersRef_current_get;\n\t\t\t(_triggerStateSettersRef_current_get = triggerStateSettersRef.current.get(activeId)) === null || _triggerStateSettersRef_current_get === void 0 || _triggerStateSettersRef_current_get(true);\n\t\t}\n\t}, [open, setActiveTrigger]);\n\treturn {\n\t\tsetActiveTrigger,\n\t\tregisterTrigger,\n\t\tunregisterTrigger\n\t};\n}\nvar PopoverContextProvider = /* @__PURE__ */ React.memo(function(param) {\n\tvar { scope, children, open, onOpenChange, onOpenToggle, triggerRef, id = \"\", contentId, hasCustomAnchor = false, onCustomAnchorAdd = voidFn, onCustomAnchorRemove = voidFn, anchorTo, adaptScope, breakpointActive, keepChildrenMounted, disableDismissable, hoverable } = param;\n\tvar [branches] = React.useState(function() {\n\t\treturn /* @__PURE__ */ new Set();\n\t});\n\tvar { setActiveTrigger, registerTrigger, unregisterTrigger } = usePopoverTriggerSetup(open);\n\treturn /* @__PURE__ */ (0, import_jsx_runtime.jsx)(PopoverContext.Provider, {\n\t\tscope,\n\t\tpopoverScope: scope,\n\t\tadaptScope,\n\t\tid,\n\t\tcontentId,\n\t\ttriggerRef,\n\t\topen,\n\t\tonOpenChange,\n\t\tonOpenToggle,\n\t\thasCustomAnchor,\n\t\tonCustomAnchorAdd,\n\t\tonCustomAnchorRemove,\n\t\tanchorTo,\n\t\tbranches,\n\t\tbreakpointActive,\n\t\tkeepChildrenMounted,\n\t\tdisableDismissable,\n\t\thoverable,\n\t\tchildren: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(PopoverTriggerContext.Provider, {\n\t\t\tscope,\n\t\t\ttriggerRef,\n\t\t\thasCustomAnchor,\n\t\t\tanchorTo,\n\t\t\tbranches,\n\t\t\tonOpenToggle,\n\t\t\tsetActiveTrigger,\n\t\t\tregisterTrigger,\n\t\t\tunregisterTrigger,\n\t\t\tchildren\n\t\t})\n\t});\n});\nvar voidFn = function() {};\nvar PopoverAnchor = /* @__PURE__ */ React.memo((0, import_core.createRefComponent)(function PopoverAnchor2(props, forwardedRef) {\n\tvar { scope, ...rest } = props;\n\tvar { onCustomAnchorAdd, onCustomAnchorRemove } = usePopoverContext(scope) || {};\n\tReact.useEffect(function() {\n\t\tonCustomAnchorAdd();\n\t\treturn function() {\n\t\t\treturn onCustomAnchorRemove();\n\t\t};\n\t}, [onCustomAnchorAdd, onCustomAnchorRemove]);\n\treturn /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_popper.PopperAnchor, {\n\t\tscope,\n\t\t...rest,\n\t\tref: forwardedRef\n\t});\n}));\nvar PopoverTrigger = /* @__PURE__ */ React.memo((0, import_core.createRefComponent)(function PopoverTrigger2(props, forwardedRef) {\n\tvar { scope, disablePressTrigger, ...rest } = props;\n\tvar triggerContext = usePopoverTriggerContext(scope);\n\tvar triggerId = React.useId();\n\tvar [open, setOpen] = React.useState(false);\n\tvar anchorTo = triggerContext.anchorTo;\n\tvar triggerElRef = React.useRef(null);\n\tvar composedTriggerRef = (0, import_compose_refs.useComposedRefs)(forwardedRef, triggerElRef);\n\tvar { registerTrigger, unregisterTrigger } = triggerContext;\n\tReact.useEffect(function() {\n\t\tregisterTrigger(triggerId, setOpen);\n\t\treturn function() {\n\t\t\tunregisterTrigger(triggerId);\n\t\t};\n\t}, [\n\t\tregisterTrigger,\n\t\tunregisterTrigger,\n\t\ttriggerId\n\t]);\n\tif (!rest.children) return null;\n\tvar activateSelf = function() {\n\t\ttriggerContext.setActiveTrigger(triggerId);\n\t\tvar el = triggerElRef.current;\n\t\tif (el) triggerContext.triggerRef.current = el;\n\t};\n\tvar trigger = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_core.View, {\n\t\t\"aria-expanded\": open,\n\t\t\"data-state\": getState(open),\n\t\t...rest,\n\t\tref: composedTriggerRef,\n\t\tonPress: (0, import_helpers.composeEventHandlers)(rest.onPress, function() {\n\t\t\tif (disablePressTrigger) return;\n\t\t\ttriggerContext.setActiveTrigger(open ? null : triggerId);\n\t\t\ttriggerContext.onOpenToggle();\n\t\t}),\n\t\tonMouseEnter: (0, import_helpers.composeEventHandlers)(rest.onMouseEnter, activateSelf),\n\t\tonPressIn: (0, import_helpers.composeEventHandlers)(rest.onPressIn, activateSelf),\n\t\tonFocus: (0, import_helpers.composeEventHandlers)(rest.onFocus, activateSelf)\n\t});\n\tvar virtualRef = React.useMemo(function() {\n\t\tif (!anchorTo) return null;\n\t\treturn { current: {\n\t\t\tgetBoundingClientRect: function() {\n\t\t\t\treturn import_constants.isWeb ? DOMRect.fromRect(anchorTo) : anchorTo;\n\t\t\t},\n\t\t\t...!import_constants.isWeb && {\n\t\t\t\tmeasure: function(c) {\n\t\t\t\t\treturn c(anchorTo === null || anchorTo === void 0 ? void 0 : anchorTo.x, anchorTo === null || anchorTo === void 0 ? void 0 : anchorTo.y, anchorTo === null || anchorTo === void 0 ? void 0 : anchorTo.width, anchorTo === null || anchorTo === void 0 ? void 0 : anchorTo.height);\n\t\t\t\t},\n\t\t\t\tmeasureInWindow: function(c) {\n\t\t\t\t\treturn c(anchorTo === null || anchorTo === void 0 ? void 0 : anchorTo.x, anchorTo === null || anchorTo === void 0 ? void 0 : anchorTo.y, anchorTo === null || anchorTo === void 0 ? void 0 : anchorTo.width, anchorTo === null || anchorTo === void 0 ? void 0 : anchorTo.height);\n\t\t\t\t}\n\t\t\t}\n\t\t} };\n\t}, [\n\t\ttriggerContext.anchorTo,\n\t\tanchorTo === null || anchorTo === void 0 ? void 0 : anchorTo.x,\n\t\tanchorTo === null || anchorTo === void 0 ? void 0 : anchorTo.y,\n\t\tanchorTo === null || anchorTo === void 0 ? void 0 : anchorTo.height,\n\t\tanchorTo === null || anchorTo === void 0 ? void 0 : anchorTo.width\n\t]);\n\tvar wrappedTrigger = import_constants.isWeb ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_dismissable.DismissableBranch, {\n\t\tbranches: triggerContext.branches,\n\t\tchildren: trigger\n\t}) : trigger;\n\treturn triggerContext.hasCustomAnchor ? wrappedTrigger : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_popper.PopperAnchor, {\n\t\t...virtualRef && { virtualRef },\n\t\tscope,\n\t\tasChild: true,\n\t\tchildren: wrappedTrigger\n\t});\n}));\nvar PopoverContent = (0, import_core.createStyledHOC)(import_popper.PopperContentFrame, function PopoverContent2(props, forwardedRef) {\n\tvar { trapFocus, enableRemoveScroll = false, zIndex: zIndexProp, scope, forceMount, ...contentImplProps } = props;\n\tvar context = usePopoverContext(scope);\n\tvar adaptContext = (0, import_adapt.useAdaptContext)(context.adaptScope);\n\tvar zIndexFromContext = React.useContext(PopoverZIndexContext);\n\tvar zIndex = zIndexProp !== null && zIndexProp !== void 0 ? zIndexProp : zIndexFromContext;\n\tvar open = usePopoverOpen(scope);\n\tvar contentRef = React.useRef(null);\n\tvar composedRefs = (0, import_compose_refs.useComposedRefs)(forwardedRef, contentRef);\n\tvar isRightClickOutsideRef = React.useRef(false);\n\tvar [isFullyHidden, setIsFullyHidden] = React.useState(!open);\n\t(0, import_constants.useIsomorphicLayoutEffect)(function() {\n\t\tif (open && isFullyHidden) setIsFullyHidden(false);\n\t}, [open, isFullyHidden]);\n\tif (!forceMount && !context.keepChildrenMounted) {\n\t\tif (context.breakpointActive) {\n\t\t\tif (!open && adaptContext.targetFullyHidden) return null;\n\t\t} else if (isFullyHidden && !open) return null;\n\t}\n\tvar _contentImplProps_pointerEvents;\n\treturn /* @__PURE__ */ (0, import_jsx_runtime.jsx)(PopoverPortal, {\n\t\tpassThrough: context.breakpointActive,\n\t\tcontext,\n\t\topen,\n\t\tvisuallyActive: open || !isFullyHidden,\n\t\tzIndex,\n\t\tchildren: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_core.View, {\n\t\t\tpassThrough: context.breakpointActive,\n\t\t\tpointerEvents: open ? (_contentImplProps_pointerEvents = contentImplProps.pointerEvents) !== null && _contentImplProps_pointerEvents !== void 0 ? _contentImplProps_pointerEvents : \"auto\" : \"none\",\n\t\t\tchildren: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(PopoverContentImpl, {\n\t\t\t\t...contentImplProps,\n\t\t\t\tcontext,\n\t\t\t\topen,\n\t\t\t\tforceMount,\n\t\t\t\tenableRemoveScroll,\n\t\t\t\tref: composedRefs,\n\t\t\t\tsetIsFullyHidden,\n\t\t\t\tscope,\n\t\t\t\ttrapFocus: trapFocus !== null && trapFocus !== void 0 ? trapFocus : open,\n\t\t\t\tdisableOutsidePointerEvents: true,\n\t\t\t\tonCloseAutoFocus: props.onCloseAutoFocus === false ? void 0 : (0, import_helpers.composeEventHandlers)(props.onCloseAutoFocus, function(event) {\n\t\t\t\t\tvar _context_triggerRef_current;\n\t\t\t\t\tif (event.isCanceled) return;\n\t\t\t\t\tevent.cancel();\n\t\t\t\t\tif (!isRightClickOutsideRef.current) (_context_triggerRef_current = context.triggerRef.current) === null || _context_triggerRef_current === void 0 || _context_triggerRef_current.focus();\n\t\t\t\t}),\n\t\t\t\tonPointerDownOutside: (0, import_helpers.composeEventHandlers)(props.onPointerDownOutside, function(event) {\n\t\t\t\t\tvar originalEvent = event.event;\n\t\t\t\t\tif (!originalEvent) return;\n\t\t\t\t\tvar ctrlLeftClick = originalEvent.button === 0 && originalEvent.ctrlKey === true;\n\t\t\t\t\tisRightClickOutsideRef.current = originalEvent.button === 2 || ctrlLeftClick;\n\t\t\t\t}, { checkDefaultPrevented: false }),\n\t\t\t\tonFocusOutside: (0, import_helpers.composeEventHandlers)(props.onFocusOutside, function(event) {\n\t\t\t\t\tif (trapFocus !== null && trapFocus !== void 0 ? trapFocus : open) event.cancel();\n\t\t\t\t}, { checkDefaultPrevented: false })\n\t\t\t})\n\t\t})\n\t});\n}, { staticConfig: { inlineProps: /* @__PURE__ */ new Set([\n\t...import_popper.PopperContentFrame.staticConfig.inlineProps || [],\n\t\"zIndex\",\n\t\"opacity\",\n\t\"y\"\n]) } });\nvar useParentContexts = function(scope) {\n\tvar context = usePopoverContext(scope);\n\tvar triggerContext = usePopoverTriggerContext(scope);\n\treturn {\n\t\tpopperContext: (0, import_popper.usePopperContext)(scope),\n\t\tadaptContext: (0, import_adapt.useAdaptContext)(context.adaptScope),\n\t\tcontext,\n\t\ttriggerContext\n\t};\n};\nfunction RepropagateParentContexts(param) {\n\tvar { adaptContext, children, context, triggerContext, popperContext } = param;\n\treturn /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_popper.PopperProvider, {\n\t\tscope: context.popoverScope,\n\t\t...popperContext,\n\t\tchildren: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(PopoverContext.Provider, {\n\t\t\tscope: context.popoverScope,\n\t\t\t...context,\n\t\t\tchildren: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(PopoverTriggerContext.Provider, {\n\t\t\t\tscope: context.popoverScope,\n\t\t\t\t...triggerContext,\n\t\t\t\tchildren: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_adapt.ProvideAdaptContext, {\n\t\t\t\t\t...adaptContext,\n\t\t\t\t\tchildren\n\t\t\t\t})\n\t\t\t})\n\t\t})\n\t});\n}\nvar PortalAdaptSafe = function(param) {\n\t\"use no memo\";\n\tvar { children, context } = param;\n\tif (needsRepropagation) {\n\t\tvar parentContexts = useParentContexts(context.popoverScope);\n\t\treturn /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_adapt.AdaptPortalContents, {\n\t\t\tscope: context.adaptScope,\n\t\t\tchildren: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(RepropagateParentContexts, {\n\t\t\t\t...parentContexts,\n\t\t\t\tchildren\n\t\t\t})\n\t\t});\n\t}\n\treturn /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_adapt.AdaptPortalContents, {\n\t\tscope: context.adaptScope,\n\t\tchildren\n\t});\n};\nfunction PopoverPortal(param) {\n\t\"use no memo\";\n\tvar { context, open, visuallyActive, zIndex, passThrough, children, onPress } = param;\n\tvar content = children;\n\tif (needsRepropagation) {\n\t\tvar parentContexts = useParentContexts(context.popoverScope);\n\t\tcontent = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(RepropagateParentContexts, {\n\t\t\t...parentContexts,\n\t\t\tchildren: content\n\t\t});\n\t}\n\treturn /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_portal.Portal, {\n\t\tpassThrough,\n\t\tstackZIndex: true,\n\t\tzIndex,\n\t\thidden: !visuallyActive,\n\t\tchildren: [!!open && !context.breakpointActive && !context.hoverable && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_stacks.YStack, {\n\t\t\tposition: \"absolute\",\n\t\t\tinset: 0,\n\t\t\tonPress: (0, import_helpers.composeEventHandlers)(onPress, context.onOpenToggle)\n\t\t}), content]\n\t});\n}\nvar PopoverContentImpl = (0, import_core.createRefComponent)(function PopoverContentImpl2(props, forwardedRef) {\n\tvar { trapFocus, scope, onOpenAutoFocus, onCloseAutoFocus, disableOutsidePointerEvents, disableFocusScope, onEscapeKeyDown, onPointerDownOutside, onFocusOutside, onInteractOutside, children, enableRemoveScroll, freezeContentsWhenHidden, setIsFullyHidden, lazyMount, forceUnmount, forceMount, context, open, alwaysDisable, ...contentProps } = props;\n\tvar { disableDismissable } = context;\n\tvar keepChildrenMounted = context.keepChildrenMounted || forceMount;\n\tvar handleExitComplete = React.useCallback(function() {\n\t\tsetIsFullyHidden === null || setIsFullyHidden === void 0 || setIsFullyHidden(true);\n\t}, [setIsFullyHidden]);\n\tvar contents = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_animate_presence.ResetPresence, {\n\t\tdisable: context.breakpointActive,\n\t\tchildren\n\t});\n\tReact.useCallback(function() {\n\t\tcontext.onOpenChange(false, \"press\");\n\t}, [context]);\n\tif (!context.breakpointActive) {}\n\treturn /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_animate.Animate, {\n\t\ttype: \"presence\",\n\t\tpresent: Boolean(open),\n\t\tkeepChildrenMounted: Boolean(keepChildrenMounted),\n\t\tonExitComplete: handleExitComplete,\n\t\tlazyMount,\n\t\tpassThrough: context.breakpointActive,\n\t\tchildren: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_popper.PopperContent, {\n\t\t\tscope,\n\t\t\t\"data-state\": getState(open),\n\t\t\tid: context.contentId,\n\t\t\tref: forwardedRef,\n\t\t\tpassThrough: context.breakpointActive,\n\t\t\t...contentProps,\n\t\t\tchildren: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(PortalAdaptSafe, {\n\t\t\t\tcontext,\n\t\t\t\tchildren: contents\n\t\t\t})\n\t\t}, context.contentId)\n\t});\n});\nvar PopoverClose = (0, import_core.createRefComponent)(function PopoverClose2(props, forwardedRef) {\n\tvar { scope, className, ...rest } = props;\n\tvar context = usePopoverContext(scope);\n\treturn /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_stacks.YStack, {\n\t\t...rest,\n\t\tref: forwardedRef,\n\t\tclassName: `is_PopoverClose ${className || \"\"}`.trim(),\n\t\tonPress: (0, import_helpers.composeEventHandlers)(props.onPress, function() {\n\t\t\tvar _context_onOpenChange;\n\t\t\treturn context === null || context === void 0 ? void 0 : (_context_onOpenChange = context.onOpenChange) === null || _context_onOpenChange === void 0 ? void 0 : _context_onOpenChange.call(context, false, \"press\");\n\t\t})\n\t});\n});\nvar PopoverArrow = (0, import_core.createStyledHOC)(import_popper.PopperArrowFrame, function PopoverArrow2(props, forwardedRef) {\n\tvar { scope, className, ...rest } = props;\n\tvar context = usePopoverContext(scope);\n\tif ((0, import_adapt.useAdaptIsActive)(context.adaptScope)) return null;\n\treturn /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_popper.PopperArrow, {\n\t\tscope,\n\t\tclassName: `is_PopoverArrow ${className || \"\"}`.trim(),\n\t\t...rest,\n\t\tref: forwardedRef\n\t});\n});\nvar PopoverScrollView = (0, import_core.createRefComponent)(function(param, ref) {\n\tvar { scope, ...props } = param;\n\tvar context = usePopoverContext(scope);\n\treturn /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_scroll_view.ScrollView, {\n\t\tref,\n\t\tpointerEvents: context.breakpointActive ? \"none\" : void 0,\n\t\tscrollEnabled: !context.breakpointActive,\n\t\tpassThrough: context.breakpointActive,\n\t\t...props\n\t});\n});\nvar DEFAULT_SCOPE = \"\";\nvar Popover = (0, import_helpers.withStaticProperties)((0, import_core.createRefComponent)(function Popover2(param, ref) {\n\tvar { scope = DEFAULT_SCOPE, ...props } = param;\n\tvar id = React.useId();\n\tvar adaptScope = `PopoverAdapt${scope}`;\n\tvar { open: openProp, defaultOpen, onOpenChange } = props;\n\tvar viaRef = React.useRef(void 0);\n\tvar [open, setOpen] = (0, import_use_controllable_state.useControllableState)({\n\t\tprop: openProp,\n\t\tdefaultProp: defaultOpen || false,\n\t\tonChange: function(val) {\n\t\t\tonOpenChange === null || onOpenChange === void 0 || onOpenChange(val, viaRef.current);\n\t\t}\n\t});\n\tvar handleOpenChange = (0, import_core.useEvent)(function(val, via) {\n\t\tviaRef.current = via;\n\t\tsetOpen(val);\n\t});\n\tReact.useEffect(function() {\n\t\tif (!open) return;\n\t\topenPopovers.add(setOpen);\n\t\treturn function() {\n\t\t\topenPopovers.delete(setOpen);\n\t\t};\n\t}, [open, setOpen]);\n\treturn /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_adapt.AdaptParent, {\n\t\tscope: adaptScope,\n\t\topen,\n\t\tonOpenChange: setOpen,\n\t\tchildren: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(PopoverInner, {\n\t\t\tadaptScope,\n\t\t\tref,\n\t\t\tid,\n\t\t\tscope,\n\t\t\topen,\n\t\t\tsetOpen,\n\t\t\thandleOpenChange,\n\t\t\t...props\n\t\t})\n\t});\n}), {\n\tAnchor: PopoverAnchor,\n\tArrow: PopoverArrow,\n\tTrigger: PopoverTrigger,\n\tContent: PopoverContent,\n\tClose: PopoverClose,\n\tAdapt: import_adapt.Adapt,\n\tScrollView: PopoverScrollView,\n\tFocusScope: import_focus_scope.FocusScopeController\n});\nvar PopoverInner = (0, import_core.createRefComponent)(function PopoverInner2(props, forwardedRef) {\n\tvar { children, open: _openProp, defaultOpen: _defaultOpen, onOpenChange: _onOpenChange, scope = DEFAULT_SCOPE, keepChildrenMounted: keepChildrenMountedProp, hoverable, disableFocus, disableDismissable, zIndex, id, adaptScope, open, setOpen, handleOpenChange, ...restProps } = props;\n\tvar triggerRef = React.useRef(null);\n\tvar [hasCustomAnchor, setHasCustomAnchor] = React.useState(false);\n\tvar [keepChildrenMounted] = (0, import_use_controllable_state.useControllableState)({\n\t\tprop: keepChildrenMountedProp,\n\t\tdefaultProp: false,\n\t\ttransition: keepChildrenMountedProp === \"lazy\"\n\t});\n\tvar isAdapted = (0, import_adapt.useAdaptIsActive)(adaptScope);\n\tvar floatingContext = (0, import_useFloatingContext.useFloatingContext)({\n\t\topen,\n\t\tsetOpen: handleOpenChange,\n\t\tdisable: isAdapted,\n\t\thoverable,\n\t\tdisableFocus\n\t});\n\tvar [anchorTo, setAnchorToRaw] = React.useState();\n\tvar setAnchorTo = (0, import_core.useCreateShallowSetState)(setAnchorToRaw);\n\tReact.useImperativeHandle(forwardedRef, function() {\n\t\treturn {\n\t\t\tanchorTo: setAnchorTo,\n\t\t\ttoggle: function() {\n\t\t\t\treturn setOpen(function(prev) {\n\t\t\t\t\treturn !prev;\n\t\t\t\t});\n\t\t\t},\n\t\t\topen: function() {\n\t\t\t\treturn setOpen(true);\n\t\t\t},\n\t\t\tclose: function() {\n\t\t\t\treturn setOpen(false);\n\t\t\t},\n\t\t\tsetOpen\n\t\t};\n\t});\n\tvar contentId = React.useId();\n\tvar onOpenToggle = (0, import_core.useEvent)(function() {\n\t\tif (open && isAdapted) return;\n\t\tsetOpen(!open);\n\t});\n\tvar onCustomAnchorAdd = React.useCallback(function() {\n\t\treturn setHasCustomAnchor(true);\n\t}, []);\n\tvar onCustomAnchorRemove = React.useCallback(function() {\n\t\treturn setHasCustomAnchor(false);\n\t}, []);\n\tvar contents = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_popper.Popper, {\n\t\topen,\n\t\tpassThrough: isAdapted,\n\t\tscope,\n\t\tstayInFrame: true,\n\t\t...restProps,\n\t\tchildren: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(PopoverContextProvider, {\n\t\t\tscope,\n\t\t\topen,\n\t\t\tonOpenChange: handleOpenChange,\n\t\t\tonOpenToggle,\n\t\t\ttriggerRef,\n\t\t\tid,\n\t\t\tcontentId,\n\t\t\thasCustomAnchor,\n\t\t\tonCustomAnchorAdd,\n\t\t\tonCustomAnchorRemove,\n\t\t\tanchorTo,\n\t\t\tadaptScope,\n\t\t\tbreakpointActive: isAdapted,\n\t\t\tkeepChildrenMounted,\n\t\t\tdisableDismissable,\n\t\t\thoverable,\n\t\t\tchildren\n\t\t})\n\t});\n\tvar result = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_jsx_runtime.Fragment, { children: import_constants.isWeb ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_floating.FloatingOverrideContext.Provider, {\n\t\tvalue: floatingContext,\n\t\tchildren: contents\n\t}) : contents });\n\tif (zIndex !== void 0) return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(PopoverZIndexContext.Provider, {\n\t\tvalue: zIndex,\n\t\tchildren: result\n\t});\n\treturn result;\n});\nfunction getState(open) {\n\treturn open ? \"open\" : \"closed\";\n}\n//# sourceMappingURL=Popover.js.map\n"],"mappings":";;;AACA,IAAI,WAAW,OAAO;AACtB,IAAI,YAAY,OAAO;AACvB,IAAI,mBAAmB,OAAO;AAC9B,IAAI,oBAAoB,OAAO;AAC/B,IAAI,eAAe,OAAO;AAC1B,IAAI,eAAe,OAAO,UAAU;AACpC,IAAI,YAAY,QAAQ,QAAQ;CAC/B,KAAK,IAAI,QAAQ,KAAK,UAAU,QAAQ,MAAM;EAC7C,KAAK,IAAI;EACT,YAAY;CACb,CAAC;AACF;AACA,IAAI,eAAe,IAAI,MAAM,QAAQ,SAAS;CAC7C,IAAI,QAAQ,OAAO,SAAS,YAAY,OAAO,SAAS,YAAY;EACnE,KAAK,IAAI,OAAO,kBAAkB,IAAI,GAAG,IAAI,CAAC,aAAa,KAAK,IAAI,GAAG,KAAK,QAAQ,QAAQ,UAAU,IAAI,KAAK;GAC9G,WAAW,KAA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CACf,IAAI,WAAW,KAAK,GAAG,OAAuB,iBAAC,GAAG,mBAAmB,IAAG,CAAE,qBAAqB,UAAU;EACxG,OAAO;EACP,UAAU;CACX,CAAC;CACD,OAAO;AACR,CAAC;AACD,SAAS,SAAS,MAAM;CACvB,OAAO,OAAO,SAAS;AACxB"}
1
+ {"version":3,"file":"Popover.native.js","names":[],"sources":["cjs/Popover.native.js"],"sourcesContent":["\"use strict\";\nvar __create = Object.create;\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __getProtoOf = Object.getPrototypeOf;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n\tfor (var name in all) __defProp(target, name, {\n\t\tget: all[name],\n\t\tenumerable: true\n\t});\n};\nvar __copyProps = (to, from, except, desc) => {\n\tif (from && typeof from === \"object\" || typeof from === \"function\") {\n\t\tfor (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {\n\t\t\tget: () => from[key],\n\t\t\tenumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable\n\t\t});\n\t}\n\treturn to;\n};\nvar __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(\n\t// If the importer is in node compatibility mode or this is not an ESM\n\t// file that has been converted to a CommonJS file using a Babel-\n\t// compatible transform (i.e. \"__esModule\" has not been set), then set\n\t// \"default\" to the CommonJS \"module.exports\" for node compatibility.\n\tisNodeMode || !mod || !mod.__esModule ? __defProp(target, \"default\", {\n\t\tvalue: mod,\n\t\tenumerable: true\n\t}) : target,\n\tmod\n));\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar Popover_exports = {};\n__export(Popover_exports, {\n\tPopover: () => Popover,\n\tPopoverAnchor: () => PopoverAnchor,\n\tPopoverArrow: () => PopoverArrow,\n\tPopoverClose: () => PopoverClose,\n\tPopoverContent: () => PopoverContent,\n\tPopoverContext: () => PopoverContext,\n\tPopoverContextProvider: () => PopoverContextProvider,\n\tPopoverTrigger: () => PopoverTrigger,\n\tPopoverTriggerContext: () => PopoverTriggerContext,\n\tPopoverZIndexContext: () => PopoverZIndexContext,\n\tcloseLastOpenedPopover: () => closeLastOpenedPopover,\n\tcloseOpenPopovers: () => closeOpenPopovers,\n\thasOpenPopovers: () => hasOpenPopovers,\n\tusePopoverContext: () => usePopoverContext,\n\tusePopoverOpen: () => usePopoverOpen,\n\tusePopoverTriggerContext: () => usePopoverTriggerContext,\n\tusePopoverTriggerSetup: () => usePopoverTriggerSetup\n});\nmodule.exports = __toCommonJS(Popover_exports);\nvar import_jsx_runtime = require(\"react/jsx-runtime\");\nrequire(\"@tamagui/polyfill-dev\");\nvar import_adapt = require(\"@tamagui/adapt\");\nvar import_animate = require(\"@tamagui/animate\");\nvar import_animate_presence = require(\"@tamagui/animate-presence\");\nvar import_compose_refs = require(\"@tamagui/compose-refs\");\nvar import_constants = require(\"@tamagui/constants\");\nvar import_core = require(\"@tamagui/core\");\nvar import_dismissable = require(\"@tamagui/dismissable\");\nvar import_floating = require(\"@tamagui/floating\");\nvar import_focus_scope = require(\"@tamagui/focus-scope\");\nvar import_helpers = require(\"@tamagui/helpers\");\nvar import_popper = require(\"@tamagui/popper\");\nvar import_portal = require(\"@tamagui/portal\");\nrequire(\"@tamagui/remove-scroll\");\nvar import_scroll_view = require(\"@tamagui/scroll-view\");\nvar import_stacks = require(\"@tamagui/stacks\");\nvar import_use_controllable_state = require(\"@tamagui/use-controllable-state\");\nvar React = __toESM(require(\"react\"), 1);\nvar import_useFloatingContext = require(\"./useFloatingContext\");\nvar needsRepropagation = (0, import_portal.needsPortalRepropagation)();\nvar openPopovers = /* @__PURE__ */ new Set();\nvar hasOpenPopovers = function() {\n\treturn openPopovers.size > 0;\n};\nvar closeOpenPopovers = function() {\n\tif (openPopovers.size === 0) return false;\n\topenPopovers.forEach(function(setOpen) {\n\t\treturn setOpen(false);\n\t});\n\treturn true;\n};\nvar closeLastOpenedPopover = function() {\n\tif (openPopovers.size === 0) return false;\n\tvar last = Array.from(openPopovers).pop();\n\tif (last) {\n\t\tlast(false);\n\t\treturn true;\n\t}\n\treturn false;\n};\nvar PopoverContext = (0, import_core.createStyledContext)(\n\t// since we always provide this we can avoid setting here\n\t{},\n\t\"Popover__\"\n);\nvar PopoverZIndexContext = /* @__PURE__ */ React.createContext(void 0);\nvar PopoverTriggerContext = (0, import_core.createStyledContext)({}, \"PopoverTrigger__\");\nvar usePopoverContext = PopoverContext.useStyledContext;\nvar usePopoverTriggerContext = PopoverTriggerContext.useStyledContext;\nfunction usePopoverOpen(scope) {\n\treturn usePopoverContext(scope).open;\n}\nfunction usePopoverTriggerSetup(open) {\n\tvar triggerStateSettersRef = React.useRef(/* @__PURE__ */ new Map());\n\tvar activeTriggerIdRef = React.useRef(null);\n\tvar setActiveTrigger = (0, import_core.useEvent)(function(id) {\n\t\tvar prevId = activeTriggerIdRef.current;\n\t\tif (prevId === id) return;\n\t\tif (prevId) {\n\t\t\tvar _triggerStateSettersRef_current_get;\n\t\t\t(_triggerStateSettersRef_current_get = triggerStateSettersRef.current.get(prevId)) === null || _triggerStateSettersRef_current_get === void 0 || _triggerStateSettersRef_current_get(false);\n\t\t}\n\t\tactiveTriggerIdRef.current = id;\n\t\tif (id && open) {\n\t\t\tvar _triggerStateSettersRef_current_get1;\n\t\t\t(_triggerStateSettersRef_current_get1 = triggerStateSettersRef.current.get(id)) === null || _triggerStateSettersRef_current_get1 === void 0 || _triggerStateSettersRef_current_get1(true);\n\t\t}\n\t});\n\tvar registerTrigger = (0, import_core.useEvent)(function(id, setOpenState) {\n\t\ttriggerStateSettersRef.current.set(id, setOpenState);\n\t\tsetOpenState(activeTriggerIdRef.current === id && open);\n\t});\n\tvar unregisterTrigger = (0, import_core.useEvent)(function(id) {\n\t\ttriggerStateSettersRef.current.delete(id);\n\t\tif (activeTriggerIdRef.current === id) activeTriggerIdRef.current = null;\n\t});\n\tReact.useEffect(function() {\n\t\tif (!open) {\n\t\t\tsetActiveTrigger(null);\n\t\t\treturn;\n\t\t}\n\t\tvar activeId = activeTriggerIdRef.current;\n\t\tif (activeId) {\n\t\t\tvar _triggerStateSettersRef_current_get;\n\t\t\t(_triggerStateSettersRef_current_get = triggerStateSettersRef.current.get(activeId)) === null || _triggerStateSettersRef_current_get === void 0 || _triggerStateSettersRef_current_get(true);\n\t\t}\n\t}, [open, setActiveTrigger]);\n\treturn {\n\t\tsetActiveTrigger,\n\t\tregisterTrigger,\n\t\tunregisterTrigger\n\t};\n}\nvar PopoverContextProvider = /* @__PURE__ */ React.memo(function(param) {\n\tvar { scope, children, open, onOpenChange, onOpenToggle, triggerRef, id = \"\", contentId, hasCustomAnchor = false, onCustomAnchorAdd = voidFn, onCustomAnchorRemove = voidFn, anchorTo, adaptScope, breakpointActive, keepChildrenMounted, disableDismissable, hoverable, closeReasonRef } = param;\n\tvar [branches] = React.useState(function() {\n\t\treturn /* @__PURE__ */ new Set();\n\t});\n\tvar { setActiveTrigger, registerTrigger, unregisterTrigger } = usePopoverTriggerSetup(open);\n\treturn /* @__PURE__ */ (0, import_jsx_runtime.jsx)(PopoverContext.Provider, {\n\t\tscope,\n\t\tpopoverScope: scope,\n\t\tadaptScope,\n\t\tid,\n\t\tcontentId,\n\t\ttriggerRef,\n\t\topen,\n\t\tonOpenChange,\n\t\tonOpenToggle,\n\t\thasCustomAnchor,\n\t\tonCustomAnchorAdd,\n\t\tonCustomAnchorRemove,\n\t\tanchorTo,\n\t\tbranches,\n\t\tbreakpointActive,\n\t\tkeepChildrenMounted,\n\t\tdisableDismissable,\n\t\thoverable,\n\t\tcloseReasonRef,\n\t\tchildren: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(PopoverTriggerContext.Provider, {\n\t\t\tscope,\n\t\t\ttriggerRef,\n\t\t\thasCustomAnchor,\n\t\t\tanchorTo,\n\t\t\tbranches,\n\t\t\tonOpenToggle,\n\t\t\tsetActiveTrigger,\n\t\t\tregisterTrigger,\n\t\t\tunregisterTrigger,\n\t\t\tchildren\n\t\t})\n\t});\n});\nvar voidFn = function() {};\nvar PopoverAnchor = /* @__PURE__ */ React.memo((0, import_core.createRefComponent)(function PopoverAnchor2(props, forwardedRef) {\n\tvar { scope, ...rest } = props;\n\tvar { onCustomAnchorAdd, onCustomAnchorRemove } = usePopoverContext(scope) || {};\n\tReact.useEffect(function() {\n\t\tonCustomAnchorAdd();\n\t\treturn function() {\n\t\t\treturn onCustomAnchorRemove();\n\t\t};\n\t}, [onCustomAnchorAdd, onCustomAnchorRemove]);\n\treturn /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_popper.PopperAnchor, {\n\t\tscope,\n\t\t...rest,\n\t\tref: forwardedRef\n\t});\n}));\nvar PopoverTrigger = /* @__PURE__ */ React.memo((0, import_core.createRefComponent)(function PopoverTrigger2(props, forwardedRef) {\n\tvar { scope, disablePressTrigger, ...rest } = props;\n\tvar triggerContext = usePopoverTriggerContext(scope);\n\tvar popperContext = (0, import_popper.usePopperContextSlow)(scope);\n\tvar triggerId = React.useId();\n\tvar [open, setOpen] = React.useState(false);\n\tvar anchorTo = triggerContext.anchorTo;\n\tvar triggerElRef = React.useRef(null);\n\tvar composedTriggerRef = (0, import_compose_refs.useComposedRefs)(forwardedRef, triggerElRef);\n\tvar { registerTrigger, unregisterTrigger } = triggerContext;\n\tReact.useEffect(function() {\n\t\tregisterTrigger(triggerId, setOpen);\n\t\treturn function() {\n\t\t\tunregisterTrigger(triggerId);\n\t\t};\n\t}, [\n\t\tregisterTrigger,\n\t\tunregisterTrigger,\n\t\ttriggerId\n\t]);\n\tif (!rest.children) return null;\n\tvar activateSelf = function() {\n\t\ttriggerContext.setActiveTrigger(triggerId);\n\t\tvar el = triggerElRef.current;\n\t\tif (el) triggerContext.triggerRef.current = el;\n\t};\n\tvar trigger = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_core.View, {\n\t\t\"aria-expanded\": open,\n\t\t\"data-state\": getState(open),\n\t\t...rest,\n\t\tref: composedTriggerRef,\n\t\tonPress: (0, import_helpers.composeEventHandlers)(rest.onPress, function() {\n\t\t\tif (disablePressTrigger) return;\n\t\t\ttriggerContext.setActiveTrigger(open ? null : triggerId);\n\t\t\ttriggerContext.onOpenToggle();\n\t\t}),\n\t\tonMouseEnter: (0, import_helpers.composeEventHandlers)(rest.onMouseEnter, activateSelf),\n\t\tonPressIn: (0, import_helpers.composeEventHandlers)(rest.onPressIn, activateSelf),\n\t\tonFocus: (0, import_helpers.composeEventHandlers)(rest.onFocus, function(event) {\n\t\t\tvar _popperContext_getReferenceProps_onFocus, _popperContext_getReferenceProps, _popperContext_getReferenceProps_call;\n\t\t\tactivateSelf();\n\t\t\t(_popperContext_getReferenceProps = popperContext.getReferenceProps) === null || _popperContext_getReferenceProps === void 0 || (_popperContext_getReferenceProps_onFocus = (_popperContext_getReferenceProps_call = _popperContext_getReferenceProps.call(popperContext, { ref: triggerElRef })).onFocus) == null || _popperContext_getReferenceProps_onFocus.call(_popperContext_getReferenceProps_call, event);\n\t\t}),\n\t\tonBlur: (0, import_helpers.composeEventHandlers)(rest.onBlur, function(event) {\n\t\t\tvar _popperContext_getReferenceProps_onBlur, _popperContext_getReferenceProps, _popperContext_getReferenceProps_call;\n\t\t\t(_popperContext_getReferenceProps = popperContext.getReferenceProps) === null || _popperContext_getReferenceProps === void 0 || (_popperContext_getReferenceProps_onBlur = (_popperContext_getReferenceProps_call = _popperContext_getReferenceProps.call(popperContext, { ref: triggerElRef })).onBlur) == null || _popperContext_getReferenceProps_onBlur.call(_popperContext_getReferenceProps_call, event);\n\t\t})\n\t});\n\tvar virtualRef = React.useMemo(function() {\n\t\tif (!anchorTo) return null;\n\t\treturn { current: {\n\t\t\tgetBoundingClientRect: function() {\n\t\t\t\treturn import_constants.isWeb ? DOMRect.fromRect(anchorTo) : anchorTo;\n\t\t\t},\n\t\t\t...!import_constants.isWeb && {\n\t\t\t\tmeasure: function(c) {\n\t\t\t\t\treturn c(anchorTo === null || anchorTo === void 0 ? void 0 : anchorTo.x, anchorTo === null || anchorTo === void 0 ? void 0 : anchorTo.y, anchorTo === null || anchorTo === void 0 ? void 0 : anchorTo.width, anchorTo === null || anchorTo === void 0 ? void 0 : anchorTo.height);\n\t\t\t\t},\n\t\t\t\tmeasureInWindow: function(c) {\n\t\t\t\t\treturn c(anchorTo === null || anchorTo === void 0 ? void 0 : anchorTo.x, anchorTo === null || anchorTo === void 0 ? void 0 : anchorTo.y, anchorTo === null || anchorTo === void 0 ? void 0 : anchorTo.width, anchorTo === null || anchorTo === void 0 ? void 0 : anchorTo.height);\n\t\t\t\t}\n\t\t\t}\n\t\t} };\n\t}, [\n\t\ttriggerContext.anchorTo,\n\t\tanchorTo === null || anchorTo === void 0 ? void 0 : anchorTo.x,\n\t\tanchorTo === null || anchorTo === void 0 ? void 0 : anchorTo.y,\n\t\tanchorTo === null || anchorTo === void 0 ? void 0 : anchorTo.height,\n\t\tanchorTo === null || anchorTo === void 0 ? void 0 : anchorTo.width\n\t]);\n\tvar wrappedTrigger = import_constants.isWeb ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_dismissable.DismissableBranch, {\n\t\tbranches: triggerContext.branches,\n\t\tchildren: trigger\n\t}) : trigger;\n\treturn triggerContext.hasCustomAnchor ? wrappedTrigger : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_popper.PopperAnchor, {\n\t\t...virtualRef && { virtualRef },\n\t\tscope,\n\t\tasChild: true,\n\t\tchildren: wrappedTrigger\n\t});\n}));\nvar PopoverContent = (0, import_core.createStyledHOC)(import_popper.PopperContentFrame, function PopoverContent2(props, forwardedRef) {\n\tvar { trapFocus, enableRemoveScroll = false, zIndex: zIndexProp, scope, forceMount, ...contentImplProps } = props;\n\tvar context = usePopoverContext(scope);\n\tvar adaptContext = (0, import_adapt.useAdaptContext)(context.adaptScope);\n\tvar zIndexFromContext = React.useContext(PopoverZIndexContext);\n\tvar zIndex = zIndexProp !== null && zIndexProp !== void 0 ? zIndexProp : zIndexFromContext;\n\tvar open = usePopoverOpen(scope);\n\tvar contentRef = React.useRef(null);\n\tvar composedRefs = (0, import_compose_refs.useComposedRefs)(forwardedRef, contentRef);\n\tvar isRightClickOutsideRef = React.useRef(false);\n\tvar [isFullyHidden, setIsFullyHidden] = React.useState(!open);\n\t(0, import_constants.useIsomorphicLayoutEffect)(function() {\n\t\tif (open && isFullyHidden) setIsFullyHidden(false);\n\t}, [open, isFullyHidden]);\n\tif (!forceMount && !context.keepChildrenMounted) {\n\t\tif (context.breakpointActive) {\n\t\t\tif (!open && adaptContext.targetFullyHidden) return null;\n\t\t} else if (isFullyHidden && !open) return null;\n\t}\n\tvar _contentImplProps_pointerEvents;\n\treturn /* @__PURE__ */ (0, import_jsx_runtime.jsx)(PopoverPortal, {\n\t\tpassThrough: context.breakpointActive,\n\t\tcontext,\n\t\topen,\n\t\tvisuallyActive: open || !isFullyHidden,\n\t\tzIndex,\n\t\tchildren: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_core.View, {\n\t\t\tpassThrough: context.breakpointActive,\n\t\t\tpointerEvents: open ? (_contentImplProps_pointerEvents = contentImplProps.pointerEvents) !== null && _contentImplProps_pointerEvents !== void 0 ? _contentImplProps_pointerEvents : \"auto\" : \"none\",\n\t\t\tchildren: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(PopoverContentImpl, {\n\t\t\t\t...contentImplProps,\n\t\t\t\tcontext,\n\t\t\t\topen,\n\t\t\t\tforceMount,\n\t\t\t\tenableRemoveScroll,\n\t\t\t\tref: composedRefs,\n\t\t\t\tsetIsFullyHidden,\n\t\t\t\tscope,\n\t\t\t\ttrapFocus: trapFocus !== null && trapFocus !== void 0 ? trapFocus : open,\n\t\t\t\tdisableOutsidePointerEvents: true,\n\t\t\t\tonCloseAutoFocus: props.onCloseAutoFocus === false ? void 0 : (0, import_helpers.composeEventHandlers)(props.onCloseAutoFocus, function(event) {\n\t\t\t\t\tvar _context_triggerRef_current;\n\t\t\t\t\tif (event.isCanceled) return;\n\t\t\t\t\tevent.cancel();\n\t\t\t\t\tif (!isRightClickOutsideRef.current) (_context_triggerRef_current = context.triggerRef.current) === null || _context_triggerRef_current === void 0 || _context_triggerRef_current.focus();\n\t\t\t\t}),\n\t\t\t\tonPointerDownOutside: (0, import_helpers.composeEventHandlers)(props.onPointerDownOutside, function(event) {\n\t\t\t\t\tvar originalEvent = event.event;\n\t\t\t\t\tif (!originalEvent) return;\n\t\t\t\t\tvar ctrlLeftClick = originalEvent.button === 0 && originalEvent.ctrlKey === true;\n\t\t\t\t\tisRightClickOutsideRef.current = originalEvent.button === 2 || ctrlLeftClick;\n\t\t\t\t}, { checkDefaultPrevented: false }),\n\t\t\t\tonFocusOutside: (0, import_helpers.composeEventHandlers)(props.onFocusOutside, function(event) {\n\t\t\t\t\tif (trapFocus !== null && trapFocus !== void 0 ? trapFocus : open) event.cancel();\n\t\t\t\t}, { checkDefaultPrevented: false })\n\t\t\t})\n\t\t})\n\t});\n}, { staticConfig: { inlineProps: /* @__PURE__ */ new Set([\n\t...import_popper.PopperContentFrame.staticConfig.inlineProps || [],\n\t\"zIndex\",\n\t\"opacity\",\n\t\"y\"\n]) } });\nvar useParentContexts = function(scope) {\n\tvar context = usePopoverContext(scope);\n\tvar triggerContext = usePopoverTriggerContext(scope);\n\treturn {\n\t\tpopperContext: (0, import_popper.usePopperContext)(scope),\n\t\tadaptContext: (0, import_adapt.useAdaptContext)(context.adaptScope),\n\t\tcontext,\n\t\ttriggerContext\n\t};\n};\nfunction RepropagateParentContexts(param) {\n\tvar { adaptContext, children, context, triggerContext, popperContext } = param;\n\treturn /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_popper.PopperProvider, {\n\t\tscope: context.popoverScope,\n\t\t...popperContext,\n\t\tchildren: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(PopoverContext.Provider, {\n\t\t\tscope: context.popoverScope,\n\t\t\t...context,\n\t\t\tchildren: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(PopoverTriggerContext.Provider, {\n\t\t\t\tscope: context.popoverScope,\n\t\t\t\t...triggerContext,\n\t\t\t\tchildren: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_adapt.ProvideAdaptContext, {\n\t\t\t\t\t...adaptContext,\n\t\t\t\t\tchildren\n\t\t\t\t})\n\t\t\t})\n\t\t})\n\t});\n}\nvar PortalAdaptSafe = function(param) {\n\t\"use no memo\";\n\tvar { children, context } = param;\n\tif (needsRepropagation) {\n\t\tvar parentContexts = useParentContexts(context.popoverScope);\n\t\treturn /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_adapt.AdaptPortalContents, {\n\t\t\tscope: context.adaptScope,\n\t\t\tchildren: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(RepropagateParentContexts, {\n\t\t\t\t...parentContexts,\n\t\t\t\tchildren\n\t\t\t})\n\t\t});\n\t}\n\treturn /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_adapt.AdaptPortalContents, {\n\t\tscope: context.adaptScope,\n\t\tchildren\n\t});\n};\nfunction PopoverPortal(param) {\n\t\"use no memo\";\n\tvar { context, open, visuallyActive, zIndex, passThrough, children, onPress } = param;\n\tvar content = children;\n\tif (needsRepropagation) {\n\t\tvar parentContexts = useParentContexts(context.popoverScope);\n\t\tcontent = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(RepropagateParentContexts, {\n\t\t\t...parentContexts,\n\t\t\tchildren: content\n\t\t});\n\t}\n\treturn /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_portal.Portal, {\n\t\tpassThrough,\n\t\tstackZIndex: true,\n\t\tzIndex,\n\t\thidden: !visuallyActive,\n\t\tchildren: [!!open && !context.breakpointActive && !context.hoverable && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_stacks.YStack, {\n\t\t\tposition: \"absolute\",\n\t\t\tinset: 0,\n\t\t\tonPress: (0, import_helpers.composeEventHandlers)(onPress, context.onOpenToggle)\n\t\t}), content]\n\t});\n}\nvar PopoverContentImpl = (0, import_core.createRefComponent)(function PopoverContentImpl2(props, forwardedRef) {\n\tvar { trapFocus, scope, onOpenAutoFocus, onCloseAutoFocus, disableOutsidePointerEvents, disableFocusScope, onEscapeKeyDown, onPointerDownOutside, onFocusOutside, onInteractOutside, children, enableRemoveScroll, freezeContentsWhenHidden, setIsFullyHidden, lazyMount, forceUnmount, forceMount, context, open, alwaysDisable, ...contentProps } = props;\n\tvar { disableDismissable } = context;\n\tvar keepChildrenMounted = context.keepChildrenMounted || forceMount;\n\tvar handleExitComplete = React.useCallback(function() {\n\t\tsetIsFullyHidden === null || setIsFullyHidden === void 0 || setIsFullyHidden(true);\n\t}, [setIsFullyHidden]);\n\tvar contents = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_animate_presence.ResetPresence, {\n\t\tdisable: context.breakpointActive,\n\t\tchildren\n\t});\n\tReact.useCallback(function(details) {\n\t\tif (context.closeReasonRef) context.closeReasonRef.current = details.reason === \"escape-key\" ? \"escape-key\" : \"dismiss\";\n\t\tcontext.onOpenChange(false, \"press\");\n\t}, [context]);\n\tif (!context.breakpointActive) {}\n\treturn /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_animate.Animate, {\n\t\ttype: \"presence\",\n\t\tpresent: Boolean(open),\n\t\tkeepChildrenMounted: Boolean(keepChildrenMounted),\n\t\tonExitComplete: handleExitComplete,\n\t\tlazyMount,\n\t\tpassThrough: context.breakpointActive,\n\t\tchildren: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_popper.PopperContent, {\n\t\t\tscope,\n\t\t\t\"data-state\": getState(open),\n\t\t\tid: context.contentId,\n\t\t\tref: forwardedRef,\n\t\t\tpassThrough: context.breakpointActive,\n\t\t\t...contentProps,\n\t\t\tchildren: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(PortalAdaptSafe, {\n\t\t\t\tcontext,\n\t\t\t\tchildren: contents\n\t\t\t})\n\t\t}, context.contentId)\n\t});\n});\nvar PopoverClose = (0, import_core.createRefComponent)(function PopoverClose2(props, forwardedRef) {\n\tvar { scope, className, ...rest } = props;\n\tvar context = usePopoverContext(scope);\n\treturn /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_stacks.YStack, {\n\t\t...rest,\n\t\tref: forwardedRef,\n\t\tclassName: `is_PopoverClose ${className || \"\"}`.trim(),\n\t\tonPress: (0, import_helpers.composeEventHandlers)(props.onPress, function() {\n\t\t\tvar _context_onOpenChange;\n\t\t\treturn context === null || context === void 0 ? void 0 : (_context_onOpenChange = context.onOpenChange) === null || _context_onOpenChange === void 0 ? void 0 : _context_onOpenChange.call(context, false, \"press\");\n\t\t})\n\t});\n});\nvar PopoverArrow = (0, import_core.createStyledHOC)(import_popper.PopperArrowFrame, function PopoverArrow2(props, forwardedRef) {\n\tvar { scope, className, ...rest } = props;\n\tvar context = usePopoverContext(scope);\n\tif ((0, import_adapt.useAdaptIsActive)(context.adaptScope)) return null;\n\treturn /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_popper.PopperArrow, {\n\t\tscope,\n\t\tclassName: `is_PopoverArrow ${className || \"\"}`.trim(),\n\t\t...rest,\n\t\tref: forwardedRef\n\t});\n});\nvar PopoverScrollView = (0, import_core.createRefComponent)(function(param, ref) {\n\tvar { scope, ...props } = param;\n\tvar context = usePopoverContext(scope);\n\treturn /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_scroll_view.ScrollView, {\n\t\tref,\n\t\tpointerEvents: context.breakpointActive ? \"none\" : void 0,\n\t\tscrollEnabled: !context.breakpointActive,\n\t\tpassThrough: context.breakpointActive,\n\t\t...props\n\t});\n});\nvar DEFAULT_SCOPE = \"\";\nvar Popover = (0, import_helpers.withStaticProperties)((0, import_core.createRefComponent)(function Popover2(param, ref) {\n\tvar { scope = DEFAULT_SCOPE, ...props } = param;\n\tvar id = React.useId();\n\tvar adaptScope = `PopoverAdapt${scope}`;\n\tvar { open: openProp, defaultOpen, onOpenChange } = props;\n\tvar viaRef = React.useRef(void 0);\n\tvar closeReasonRef = React.useRef(void 0);\n\tvar [open, setOpen] = (0, import_use_controllable_state.useControllableState)({\n\t\tprop: openProp,\n\t\tdefaultProp: defaultOpen || false,\n\t\tonChange: function(val) {\n\t\t\tonOpenChange === null || onOpenChange === void 0 || onOpenChange(val, viaRef.current);\n\t\t}\n\t});\n\tvar handleOpenChange = (0, import_core.useEvent)(function(val, via) {\n\t\tviaRef.current = via;\n\t\tsetOpen(val);\n\t});\n\tReact.useEffect(function() {\n\t\tif (!open) return;\n\t\topenPopovers.add(setOpen);\n\t\treturn function() {\n\t\t\topenPopovers.delete(setOpen);\n\t\t};\n\t}, [open, setOpen]);\n\treturn /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_adapt.AdaptParent, {\n\t\tscope: adaptScope,\n\t\tadaptChildren: props.children,\n\t\topen,\n\t\tonOpenChange: setOpen,\n\t\tchildren: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(PopoverInner, {\n\t\t\tadaptScope,\n\t\t\tref,\n\t\t\tid,\n\t\t\tscope,\n\t\t\topen,\n\t\t\tsetOpen,\n\t\t\thandleOpenChange,\n\t\t\tcloseReasonRef,\n\t\t\t...props\n\t\t})\n\t});\n}), {\n\tAnchor: PopoverAnchor,\n\tArrow: PopoverArrow,\n\tTrigger: PopoverTrigger,\n\tContent: PopoverContent,\n\tClose: PopoverClose,\n\tAdapt: import_adapt.Adapt,\n\tScrollView: PopoverScrollView,\n\tFocusScope: import_focus_scope.FocusScopeController\n});\nvar PopoverInner = (0, import_core.createRefComponent)(function PopoverInner2(props, forwardedRef) {\n\tvar { children, open: _openProp, defaultOpen: _defaultOpen, onOpenChange: _onOpenChange, scope = DEFAULT_SCOPE, keepChildrenMounted: keepChildrenMountedProp, hoverable, disableFocus = !hoverable, disableDismissable, zIndex, id, adaptScope, open, setOpen, handleOpenChange, closeReasonRef, ...restProps } = props;\n\tvar triggerRef = React.useRef(null);\n\tvar [hasCustomAnchor, setHasCustomAnchor] = React.useState(false);\n\tvar [keepChildrenMounted] = (0, import_use_controllable_state.useControllableState)({\n\t\tprop: keepChildrenMountedProp,\n\t\tdefaultProp: false,\n\t\ttransition: keepChildrenMountedProp === \"lazy\"\n\t});\n\tvar isAdapted = (0, import_adapt.useAdaptIsActive)(adaptScope);\n\tvar floatingContext = (0, import_useFloatingContext.useFloatingContext)({\n\t\topen,\n\t\tsetOpen: handleOpenChange,\n\t\tcloseReasonRef,\n\t\tdisable: isAdapted,\n\t\thoverable,\n\t\tdisableFocus\n\t});\n\tvar [anchorTo, setAnchorToRaw] = React.useState();\n\tvar setAnchorTo = (0, import_core.useCreateShallowSetState)(setAnchorToRaw);\n\tReact.useImperativeHandle(forwardedRef, function() {\n\t\treturn {\n\t\t\tanchorTo: setAnchorTo,\n\t\t\ttoggle: function() {\n\t\t\t\treturn setOpen(function(prev) {\n\t\t\t\t\treturn !prev;\n\t\t\t\t});\n\t\t\t},\n\t\t\topen: function() {\n\t\t\t\treturn setOpen(true);\n\t\t\t},\n\t\t\tclose: function() {\n\t\t\t\treturn setOpen(false);\n\t\t\t},\n\t\t\tsetOpen\n\t\t};\n\t});\n\tvar contentId = React.useId();\n\tvar onOpenToggle = (0, import_core.useEvent)(function() {\n\t\tif (open && isAdapted) return;\n\t\tcloseReasonRef.current = open ? \"reference-press\" : void 0;\n\t\tsetOpen(!open);\n\t});\n\tvar onCustomAnchorAdd = React.useCallback(function() {\n\t\treturn setHasCustomAnchor(true);\n\t}, []);\n\tvar onCustomAnchorRemove = React.useCallback(function() {\n\t\treturn setHasCustomAnchor(false);\n\t}, []);\n\tvar contents = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_popper.Popper, {\n\t\topen,\n\t\tpassThrough: isAdapted,\n\t\tscope,\n\t\tstayInFrame: true,\n\t\t...restProps,\n\t\tchildren: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(PopoverContextProvider, {\n\t\t\tscope,\n\t\t\topen,\n\t\t\tonOpenChange: handleOpenChange,\n\t\t\tonOpenToggle,\n\t\t\ttriggerRef,\n\t\t\tid,\n\t\t\tcontentId,\n\t\t\thasCustomAnchor,\n\t\t\tonCustomAnchorAdd,\n\t\t\tonCustomAnchorRemove,\n\t\t\tanchorTo,\n\t\t\tadaptScope,\n\t\t\tbreakpointActive: isAdapted,\n\t\t\tkeepChildrenMounted,\n\t\t\tdisableDismissable,\n\t\t\thoverable,\n\t\t\tcloseReasonRef,\n\t\t\tchildren\n\t\t})\n\t});\n\tvar result = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_jsx_runtime.Fragment, { children: import_constants.isWeb ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_floating.FloatingOverrideContext.Provider, {\n\t\tvalue: floatingContext,\n\t\tchildren: contents\n\t}) : contents });\n\tif (zIndex !== void 0) return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(PopoverZIndexContext.Provider, {\n\t\tvalue: zIndex,\n\t\tchildren: result\n\t});\n\treturn result;\n});\nfunction getState(open) {\n\treturn open ? \"open\" : \"closed\";\n}\n//# sourceMappingURL=Popover.js.map\n"],"mappings":";;;AACA,IAAI,WAAW,OAAO;AACtB,IAAI,YAAY,OAAO;AACvB,IAAI,mBAAmB,OAAO;AAC9B,IAAI,oBAAoB,OAAO;AAC/B,IAAI,eAAe,OAAO;AAC1B,IAAI,eAAe,OAAO,UAAU;AACpC,IAAI,YAAY,QAAQ,QAAQ;CAC/B,KAAK,IAAI,QAAQ,KAAK,UAAU,QAAQ,MAAM;EAC7C,KAAK,IAAI;EACT,YAAY;CACb,CAAC;AACF;AACA,IAAI,eAAe,IAAI,MAAM,QAAQ,SAAS;CAC7C,IAAI,QAAQ,OAAO,SAAS,YAAY,OAAO,SAAS,YAAY;EACnE,KAAK,IAAI,OAAO,kBAAkB,IAAI,GAAG,IAAI,CAAC,aAAa,KAAK,IAAI,GAAG,KAAK,QAAQ,QAAQ,UAAU,IAAI,KAAK;GAC9G,WAAW,KAAK;GA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AG,YAAY,SAAQ,CAAE,WAAW;EACvD,IAAI,QAAQ,WAAW;EACvB,eAAe,UAAU,OAAO,oBAAoB,KAAK;EACzD,QAAQ,CAAC,IAAI;CACd,CAAC;CACD,IAAI,oBAAoB,MAAM,YAAY,WAAW;EACpD,OAAO,mBAAmB,IAAI;CAC/B,GAAG,CAAC,CAAC;CACL,IAAI,uBAAuB,MAAM,YAAY,WAAW;EACvD,OAAO,mBAAmB,KAAK;CAChC,GAAG,CAAC,CAAC;CACL,IAAI,WAA2B,iBAAC,GAAG,mBAAmB,IAAG,CAAE,cAAc,QAAQ;EAChF;EACA,aAAa;EACb;EACA,aAAa;EACb,GAAG;EACH,UAA0B,iBAAC,GAAG,mBAAmB,IAAG,CAAE,wBAAwB;GAC7E;GACA;GACA,cAAc;GACd;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA,kBAAkB;GAClB;GACA;GACA;GACA;GACA;EACD,CAAC;CACF,CAAC;CACD,IAAI,SAAyB,iBAAC,GAAG,mBAAmB,IAAG,CAAE,mBAAmB,UAAU,EAAE,UAAU,iBAAiB,QAAwB,iBAAC,GAAG,mBAAmB,IAAG,CAAE,gBAAgB,wBAAwB,UAAU;EACxN,OAAO;EACP,UAAU;CACX,CAAC,IAAI,SAAS,CAAC;CACf,IAAI,WAAW,KAAK,GAAG,OAAuB,iBAAC,GAAG,mBAAmB,IAAG,CAAE,qBAAqB,UAAU;EACxG,OAAO;EACP,UAAU;CACX,CAAC;CACD,OAAO;AACR,CAAC;AACD,SAAS,SAAS,MAAM;CACvB,OAAO,OAAO,SAAS;AACxB"}
@@ -29,7 +29,7 @@ __export(useFloatingContext_exports, { useFloatingContext: () => useFloatingCont
29
29
  module.exports = __toCommonJS(useFloatingContext_exports);
30
30
  var import_react = __toESM(require("react"), 1);
31
31
  var import_floating = require("@tamagui/floating");
32
- const useFloatingContext = ({ open, setOpen, disable, disableFocus, hoverable, role: roleProp = "dialog", focus: focusProp, groupId, delay: delayProp, restMs: restMsProp }) => {
32
+ const useFloatingContext = ({ open, setOpen, disable, disableFocus, hoverable, role: roleProp = "dialog", focus: focusProp, groupId, delay: delayProp, restMs: restMsProp, closeReasonRef }) => {
33
33
  "use no memo";
34
34
  const openRef = import_react.default.useRef(open);
35
35
  openRef.current = open;
@@ -52,8 +52,19 @@ const useFloatingContext = ({ open, setOpen, disable, disableFocus, hoverable, r
52
52
  const events = import_react.default.useMemo(() => (0, import_floating.createFloatingEvents)(), []);
53
53
  const triggerElements = import_react.default.useMemo(() => new import_floating.PopupTriggerMap(), []);
54
54
  import_react.default.useEffect(() => {
55
- events.emit("openchange", { open });
56
- }, [open, events]);
55
+ const reason = closeReasonRef?.current;
56
+ if (closeReasonRef) {
57
+ closeReasonRef.current = void 0;
58
+ }
59
+ events.emit("openchange", {
60
+ open,
61
+ reason: open ? void 0 : reason
62
+ });
63
+ }, [
64
+ open,
65
+ events,
66
+ closeReasonRef
67
+ ]);
57
68
  return import_react.default.useCallback((props) => {
58
69
  const onTriggerRef = import_react.default.useRef(false);
59
70
  const restTimerRef = import_react.default.useRef(void 0);
@@ -67,7 +78,7 @@ const useFloatingContext = ({ open, setOpen, disable, disableFocus, hoverable, r
67
78
  clearTimeout(graceRef.current);
68
79
  };
69
80
  }, []);
70
- const onOpenChange = (val, event) => {
81
+ const onOpenChange = (val, event, reason) => {
71
82
  if (val && event?.type === "mouseenter") {
72
83
  return;
73
84
  }
@@ -76,6 +87,7 @@ const useFloatingContext = ({ open, setOpen, disable, disableFocus, hoverable, r
76
87
  return;
77
88
  }
78
89
  const type = event?.type === "mousemove" || event?.type === "mouseenter" || event?.type === "mouseleave" ? "hover" : "press";
90
+ if (closeReasonRef) closeReasonRef.current = reason;
79
91
  setOpen(val, type);
80
92
  };
81
93
  const floating = (0, import_floating.useFloatingRaw)({
@@ -212,5 +224,5 @@ const useFloatingContext = ({ open, setOpen, disable, disableFocus, hoverable, r
212
224
  }, 40);
213
225
  } : void 0
214
226
  };
215
- }, [setOpen]);
227
+ }, [setOpen, closeReasonRef]);
216
228
  };