@yamada-ui/popover 1.3.4-next-20241005220055 → 1.3.4-next-20241008193728

Sign up to get free protection for your applications and to get access to all the features.
Files changed (51) hide show
  1. package/dist/{chunk-FAPYWOWO.mjs → chunk-7UFHYE2W.mjs} +24 -24
  2. package/dist/chunk-7UFHYE2W.mjs.map +1 -0
  3. package/dist/{chunk-4XXWFN6L.mjs → chunk-IESY3Y4P.mjs} +2 -2
  4. package/dist/{chunk-4XXWFN6L.mjs.map → chunk-IESY3Y4P.mjs.map} +1 -1
  5. package/dist/{chunk-P4MJ5IU7.mjs → chunk-J22VBFAF.mjs} +4 -4
  6. package/dist/{chunk-P4MJ5IU7.mjs.map → chunk-J22VBFAF.mjs.map} +1 -1
  7. package/dist/{chunk-6THCC2BT.mjs → chunk-KBEWDJLR.mjs} +42 -42
  8. package/dist/chunk-KBEWDJLR.mjs.map +1 -0
  9. package/dist/{chunk-ITQ2KUJZ.mjs → chunk-QQSUS4YW.mjs} +4 -4
  10. package/dist/chunk-QQSUS4YW.mjs.map +1 -0
  11. package/dist/{chunk-FIADAGVP.mjs → chunk-RXYUC4JZ.mjs} +2 -2
  12. package/dist/{chunk-FIADAGVP.mjs.map → chunk-RXYUC4JZ.mjs.map} +1 -1
  13. package/dist/{chunk-2EUPTTRC.mjs → chunk-S3KWEQPS.mjs} +4 -4
  14. package/dist/{chunk-2EUPTTRC.mjs.map → chunk-S3KWEQPS.mjs.map} +1 -1
  15. package/dist/{chunk-GXJI2MI3.mjs → chunk-YSYN7XPR.mjs} +4 -4
  16. package/dist/{chunk-GXJI2MI3.mjs.map → chunk-YSYN7XPR.mjs.map} +1 -1
  17. package/dist/index.d.mts +3 -3
  18. package/dist/index.d.ts +3 -3
  19. package/dist/index.js +136 -136
  20. package/dist/index.js.map +1 -1
  21. package/dist/index.mjs +8 -8
  22. package/dist/popover-anchor.js +37 -37
  23. package/dist/popover-anchor.js.map +1 -1
  24. package/dist/popover-anchor.mjs +2 -2
  25. package/dist/popover-body.js +38 -38
  26. package/dist/popover-body.js.map +1 -1
  27. package/dist/popover-body.mjs +2 -2
  28. package/dist/popover-close-button.js +39 -39
  29. package/dist/popover-close-button.js.map +1 -1
  30. package/dist/popover-close-button.mjs +2 -2
  31. package/dist/popover-content.js +60 -60
  32. package/dist/popover-content.js.map +1 -1
  33. package/dist/popover-content.mjs +3 -3
  34. package/dist/popover-footer.js +38 -38
  35. package/dist/popover-footer.js.map +1 -1
  36. package/dist/popover-footer.mjs +2 -2
  37. package/dist/popover-header.js +38 -38
  38. package/dist/popover-header.js.map +1 -1
  39. package/dist/popover-header.mjs +2 -2
  40. package/dist/popover-trigger.js +37 -37
  41. package/dist/popover-trigger.js.map +1 -1
  42. package/dist/popover-trigger.mjs +2 -2
  43. package/dist/popover.d.mts +62 -62
  44. package/dist/popover.d.ts +62 -62
  45. package/dist/popover.js +37 -37
  46. package/dist/popover.js.map +1 -1
  47. package/dist/popover.mjs +1 -1
  48. package/package.json +10 -10
  49. package/dist/chunk-6THCC2BT.mjs.map +0 -1
  50. package/dist/chunk-FAPYWOWO.mjs.map +0 -1
  51. package/dist/chunk-ITQ2KUJZ.mjs.map +0 -1
package/dist/index.js CHANGED
@@ -63,43 +63,43 @@ var popoverProperties = [
63
63
  "duration"
64
64
  ];
65
65
  var [PopoverProvider, usePopover] = (0, import_utils.createContext)({
66
- strict: false,
67
- name: "PopoverContext"
66
+ name: "PopoverContext",
67
+ errorMessage: `usePopoverContext returned is 'undefined'. Seems you forgot to wrap the components in "<Popover />"`
68
68
  });
69
69
  var Popover = (props) => {
70
70
  const [styles, mergedProps] = (0, import_core.useComponentMultiStyle)("Popover", props);
71
71
  const {
72
- children,
73
- initialFocusRef,
74
- restoreFocus = true,
72
+ animation = "scale",
75
73
  autoFocus = true,
74
+ children,
75
+ closeDelay = 200,
76
76
  closeOnBlur = true,
77
- closeOnEsc = true,
78
77
  closeOnButton = true,
79
- trigger = "click",
80
- openDelay = 200,
81
- closeDelay = 200,
78
+ closeOnEsc = true,
79
+ duration,
80
+ initialFocusRef,
82
81
  isLazy,
83
82
  lazyBehavior = "unmount",
84
- animation = "scale",
85
- duration,
83
+ openDelay = 200,
86
84
  relatedRef,
85
+ restoreFocus = true,
86
+ trigger = "click",
87
87
  ...rest
88
88
  } = (0, import_core.omitThemeProps)(mergedProps);
89
- const { isOpen, onOpen, onClose, onToggle } = (0, import_use_disclosure.useDisclosure)(mergedProps);
89
+ const { isOpen, onClose, onOpen, onToggle } = (0, import_use_disclosure.useDisclosure)(mergedProps);
90
90
  const anchorRef = (0, import_react.useRef)(null);
91
91
  const triggerRef = (0, import_react.useRef)(null);
92
92
  const popoverRef = (0, import_react.useRef)(null);
93
93
  const { present, onAnimationComplete } = (0, import_use_animation.useAnimationObserver)({
94
- isOpen,
95
- ref: popoverRef
94
+ ref: popoverRef,
95
+ isOpen
96
96
  });
97
97
  const openTimeout = (0, import_react.useRef)(void 0);
98
98
  const closeTimeout = (0, import_react.useRef)(void 0);
99
99
  const isHoveringRef = (0, import_react.useRef)(false);
100
100
  const hasBeenOpened = (0, import_react.useRef)(false);
101
101
  if (isOpen) hasBeenOpened.current = true;
102
- const { referenceRef, getPopperProps, forceUpdate, transformOrigin } = (0, import_use_popper.usePopper)({
102
+ const { forceUpdate, referenceRef, transformOrigin, getPopperProps } = (0, import_use_popper.usePopper)({
103
103
  ...rest,
104
104
  enabled: isOpen
105
105
  });
@@ -110,39 +110,36 @@ var Popover = (props) => {
110
110
  };
111
111
  }, []);
112
112
  (0, import_use_focus.useFocusOnPointerDown)({
113
- enabled: isOpen,
114
- ref: triggerRef
113
+ ref: triggerRef,
114
+ enabled: isOpen
115
115
  });
116
116
  (0, import_use_focus.useFocusOnHide)(popoverRef, {
117
117
  focusRef: triggerRef,
118
- visible: isOpen,
119
- shouldFocus: restoreFocus && (trigger === "click" || trigger === "contextmenu")
118
+ shouldFocus: restoreFocus && (trigger === "click" || trigger === "contextmenu"),
119
+ visible: isOpen
120
120
  });
121
121
  (0, import_use_focus.useFocusOnShow)(popoverRef, {
122
122
  focusRef: initialFocusRef,
123
- visible: isOpen,
124
- shouldFocus: autoFocus && (trigger === "click" || trigger === "contextmenu")
123
+ shouldFocus: autoFocus && (trigger === "click" || trigger === "contextmenu"),
124
+ visible: isOpen
125
125
  });
126
126
  const shouldRenderChildren = (0, import_use_disclosure.useLazyDisclosure)({
127
- wasSelected: hasBeenOpened.current,
128
127
  enabled: isLazy,
128
+ isSelected: present,
129
129
  mode: lazyBehavior,
130
- isSelected: present
130
+ wasSelected: hasBeenOpened.current
131
131
  });
132
132
  const getPopoverProps = (0, import_react.useCallback)(
133
133
  (props2 = {}, ref = null) => {
134
134
  const popoverProps = {
135
135
  ...props2,
136
+ ref: (0, import_utils.mergeRefs)(popoverRef, ref),
136
137
  style: {
137
138
  ...props2.style,
138
139
  transformOrigin
139
140
  },
140
- ref: (0, import_utils.mergeRefs)(popoverRef, ref),
141
141
  children: shouldRenderChildren ? props2.children : null,
142
142
  tabIndex: -1,
143
- onKeyDown: (0, import_utils.handlerAll)(props2.onKeyDown, (ev) => {
144
- if (closeOnEsc && ev.key === "Escape") onClose();
145
- }),
146
143
  onBlur: (0, import_utils.handlerAll)(props2.onBlur, (ev) => {
147
144
  const relatedTarget = (0, import_utils.getEventRelatedTarget)(ev);
148
145
  const targetIsPopover = (0, import_utils.isContains)(popoverRef.current, relatedTarget);
@@ -150,6 +147,9 @@ var Popover = (props) => {
150
147
  const targetIsRelated = (relatedRef == null ? void 0 : relatedRef.current) ? (0, import_utils.isContains)(relatedRef.current, relatedTarget) : false;
151
148
  const isValidBlur = !targetIsPopover && !targetIsTrigger && !targetIsRelated;
152
149
  if (isOpen && closeOnBlur && isValidBlur) onClose();
150
+ }),
151
+ onKeyDown: (0, import_utils.handlerAll)(props2.onKeyDown, (ev) => {
152
+ if (closeOnEsc && ev.key === "Escape") onClose();
153
153
  })
154
154
  };
155
155
  if (trigger === "hover") {
@@ -261,23 +261,23 @@ var Popover = (props) => {
261
261
  PopoverProvider,
262
262
  {
263
263
  value: {
264
- isOpen,
265
- onClose,
264
+ animation,
266
265
  closeOnButton,
267
- onAnimationComplete,
266
+ duration,
268
267
  forceUpdate,
269
- getTriggerProps,
268
+ isOpen,
269
+ styles,
270
270
  getAnchorProps,
271
- getPopperProps,
272
271
  getPopoverProps,
273
- animation,
274
- duration,
275
- styles
272
+ getPopperProps,
273
+ getTriggerProps,
274
+ onAnimationComplete,
275
+ onClose
276
276
  },
277
277
  children: (0, import_utils.runIfFunc)(children, {
278
+ forceUpdate,
278
279
  isOpen,
279
- onClose,
280
- forceUpdate
280
+ onClose
281
281
  })
282
282
  }
283
283
  );
@@ -285,49 +285,66 @@ var Popover = (props) => {
285
285
  Popover.displayName = "Popover";
286
286
  Popover.__ui__ = "Popover";
287
287
 
288
- // src/popover-trigger.tsx
289
- var import_react2 = require("react");
290
- var PopoverTrigger = ({ children }) => {
291
- const child = import_react2.Children.only(children);
292
- const { getTriggerProps } = usePopover();
293
- return (0, import_react2.cloneElement)(child, getTriggerProps(child.props, child.ref));
294
- };
295
- PopoverTrigger.displayName = "PopoverTrigger";
296
- PopoverTrigger.__ui__ = "PopoverTrigger";
297
-
298
288
  // src/popover-anchor.tsx
299
- var import_react3 = require("react");
289
+ var import_react2 = require("react");
300
290
  var PopoverAnchor = ({ children }) => {
301
- const child = import_react3.Children.only(children);
291
+ const child = import_react2.Children.only(children);
302
292
  const { getAnchorProps } = usePopover();
303
- return (0, import_react3.cloneElement)(child, getAnchorProps(child.props, child.ref));
293
+ return (0, import_react2.cloneElement)(child, getAnchorProps(child.props, child.ref));
304
294
  };
305
295
  PopoverAnchor.displayName = "PopoverAnchor";
306
296
  PopoverAnchor.__ui__ = "PopoverAnchor";
307
297
 
308
- // src/popover-close-button.tsx
309
- var import_close_button = require("@yamada-ui/close-button");
298
+ // src/popover-body.tsx
310
299
  var import_core2 = require("@yamada-ui/core");
311
300
  var import_utils2 = require("@yamada-ui/utils");
312
301
  var import_jsx_runtime2 = require("react/jsx-runtime");
313
- var PopoverCloseButton = (0, import_core2.forwardRef)(
302
+ var PopoverBody = (0, import_core2.forwardRef)(
303
+ ({ className, ...rest }, ref) => {
304
+ const { styles } = usePopover();
305
+ const css = {
306
+ alignItems: "flex-start",
307
+ display: "flex",
308
+ flexDirection: "column",
309
+ ...styles.body
310
+ };
311
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
312
+ import_core2.ui.div,
313
+ {
314
+ ref,
315
+ className: (0, import_utils2.cx)("ui-popover__body", className),
316
+ __css: css,
317
+ ...rest
318
+ }
319
+ );
320
+ }
321
+ );
322
+ PopoverBody.displayName = "PopoverBody";
323
+ PopoverBody.__ui__ = "PopoverBody";
324
+
325
+ // src/popover-close-button.tsx
326
+ var import_close_button = require("@yamada-ui/close-button");
327
+ var import_core3 = require("@yamada-ui/core");
328
+ var import_utils3 = require("@yamada-ui/utils");
329
+ var import_jsx_runtime3 = require("react/jsx-runtime");
330
+ var PopoverCloseButton = (0, import_core3.forwardRef)(
314
331
  ({ onClick, ...rest }, ref) => {
315
332
  const { styles, onClose } = usePopover();
316
333
  const css = {
317
334
  position: "absolute",
318
335
  ...styles.closeButton
319
336
  };
320
- return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
337
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
321
338
  import_close_button.CloseButton,
322
339
  {
323
340
  ref,
324
- className: (0, import_utils2.cx)("ui-popover__close-button"),
325
- __css: css,
326
- onClick: (0, import_utils2.handlerAll)(onClick, (ev) => {
341
+ className: (0, import_utils3.cx)("ui-popover__close-button"),
342
+ size: "sm",
343
+ onClick: (0, import_utils3.handlerAll)(onClick, (ev) => {
327
344
  ev.stopPropagation();
328
345
  onClose == null ? void 0 : onClose();
329
346
  }),
330
- size: "sm",
347
+ __css: css,
331
348
  ...rest
332
349
  }
333
350
  );
@@ -337,17 +354,17 @@ PopoverCloseButton.displayName = "PopoverCloseButton";
337
354
  PopoverCloseButton.__ui__ = "PopoverCloseButton";
338
355
 
339
356
  // src/popover-content.tsx
340
- var import_core3 = require("@yamada-ui/core");
357
+ var import_core4 = require("@yamada-ui/core");
341
358
  var import_motion = require("@yamada-ui/motion");
342
359
  var import_transitions = require("@yamada-ui/transitions");
343
- var import_utils3 = require("@yamada-ui/utils");
344
- var import_react4 = require("react");
345
- var import_jsx_runtime3 = require("react/jsx-runtime");
360
+ var import_utils4 = require("@yamada-ui/utils");
361
+ var import_react3 = require("react");
362
+ var import_jsx_runtime4 = require("react/jsx-runtime");
346
363
  var getPopoverContentProps = (animation = "scale", duration) => {
347
364
  const custom = {
348
- reverse: true,
349
365
  duration,
350
366
  enter: { visibility: "visible" },
367
+ reverse: true,
351
368
  transitionEnd: { exit: { visibility: "hidden" } }
352
369
  };
353
370
  switch (animation) {
@@ -382,82 +399,82 @@ var PopoverContent = (0, import_motion.motionForwardRef)(
382
399
  ({
383
400
  as = "section",
384
401
  className,
385
- containerProps,
386
402
  children,
387
- w,
388
- width,
389
- minW,
390
- minWidth,
391
403
  maxW,
392
404
  maxWidth,
405
+ minW,
406
+ minWidth,
407
+ w,
408
+ width,
393
409
  z,
394
410
  zIndex,
411
+ containerProps,
395
412
  __css,
396
413
  ...rest
397
414
  }, ref) => {
398
415
  var _a, _b, _c, _d, _e;
399
416
  const {
400
- isOpen,
401
- closeOnButton,
402
- getPopperProps,
403
- getPopoverProps,
404
- onAnimationComplete,
405
417
  animation,
418
+ closeOnButton,
406
419
  duration,
407
- styles
420
+ isOpen,
421
+ styles,
422
+ getPopoverProps,
423
+ getPopperProps,
424
+ onAnimationComplete
408
425
  } = usePopover();
409
- const validChildren = (0, import_utils3.getValidChildren)(children);
410
- const [customPopoverCloseButton, ...cloneChildren] = (0, import_utils3.findChildren)(
426
+ const validChildren = (0, import_utils4.getValidChildren)(children);
427
+ const [customPopoverCloseButton, ...cloneChildren] = (0, import_utils4.findChildren)(
411
428
  validChildren,
412
429
  PopoverCloseButton
413
430
  );
414
- const Component = (0, import_react4.useMemo)(() => (0, import_motion.motion)(as), [as]);
431
+ const Component = (0, import_react3.useMemo)(() => (0, import_motion.motion)(as), [as]);
415
432
  const css = (_a = __css != null ? __css : styles.container) != null ? _a : {};
416
433
  const computedCSS = {
417
- position: "relative",
418
- w: "100%",
419
434
  display: "flex",
420
435
  flexDirection: "column",
421
436
  outline: 0,
437
+ position: "relative",
438
+ w: "100%",
422
439
  ...css
423
440
  };
424
441
  width != null ? width : width = w;
425
- width != null ? width : width = (_b = css == null ? void 0 : css.width) != null ? _b : css == null ? void 0 : css.w;
442
+ width != null ? width : width = (_b = css.width) != null ? _b : css.w;
426
443
  minWidth != null ? minWidth : minWidth = minW;
427
- minWidth != null ? minWidth : minWidth = (_c = css == null ? void 0 : css.minWidth) != null ? _c : css == null ? void 0 : css.minW;
444
+ minWidth != null ? minWidth : minWidth = (_c = css.minWidth) != null ? _c : css.minW;
428
445
  maxWidth != null ? maxWidth : maxWidth = maxW;
429
- maxWidth != null ? maxWidth : maxWidth = (_d = css == null ? void 0 : css.maxWidth) != null ? _d : css == null ? void 0 : css.maxW;
446
+ maxWidth != null ? maxWidth : maxWidth = (_d = css.maxWidth) != null ? _d : css.maxW;
430
447
  zIndex != null ? zIndex : zIndex = z;
431
- zIndex != null ? zIndex : zIndex = (_e = css == null ? void 0 : css.zIndex) != null ? _e : css == null ? void 0 : css.z;
432
- return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
433
- import_core3.ui.div,
448
+ zIndex != null ? zIndex : zIndex = (_e = css.zIndex) != null ? _e : css.z;
449
+ return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
450
+ import_core4.ui.div,
434
451
  {
435
452
  ...getPopperProps({
436
453
  style: { visibility: isOpen ? "visible" : "hidden" }
437
454
  }),
438
455
  className: "ui-popover",
456
+ maxWidth,
457
+ minWidth,
439
458
  outline: "none",
440
459
  width,
441
- minWidth,
442
- maxWidth,
443
460
  zIndex,
444
461
  ...containerProps,
445
- children: /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
462
+ children: /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
446
463
  Component,
447
464
  {
448
- className: (0, import_utils3.cx)("ui-popover__content", className),
465
+ className: (0, import_utils4.cx)("ui-popover__content", className),
449
466
  ...animation !== "none" ? getPopoverContentProps(animation, duration) : {},
450
467
  ...getPopoverProps(rest, ref),
451
- initial: "exit",
452
468
  animate: isOpen ? "enter" : "exit",
453
469
  exit: "exit",
454
- onAnimationComplete: (0, import_utils3.funcAll)(
470
+ initial: "exit",
471
+ onAnimationComplete: (0, import_utils4.funcAll)(
455
472
  onAnimationComplete,
456
473
  rest.onAnimationComplete
457
474
  ),
458
475
  __css: computedCSS,
459
476
  children: [
460
- customPopoverCloseButton != null ? customPopoverCloseButton : closeOnButton ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(PopoverCloseButton, {}) : null,
477
+ customPopoverCloseButton != null ? customPopoverCloseButton : closeOnButton ? /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(PopoverCloseButton, {}) : null,
461
478
  cloneChildren
462
479
  ]
463
480
  }
@@ -469,86 +486,69 @@ var PopoverContent = (0, import_motion.motionForwardRef)(
469
486
  PopoverContent.displayName = "PopoverContent";
470
487
  PopoverContent.__ui__ = "PopoverContent";
471
488
 
472
- // src/popover-header.tsx
473
- var import_core4 = require("@yamada-ui/core");
474
- var import_utils4 = require("@yamada-ui/utils");
475
- var import_jsx_runtime4 = require("react/jsx-runtime");
476
- var PopoverHeader = (0, import_core4.forwardRef)(
477
- ({ className, ...rest }, ref) => {
478
- const { styles } = usePopover();
479
- const css = {
480
- display: "flex",
481
- alignItems: "center",
482
- justifyContent: "flex-start",
483
- ...styles.header
484
- };
485
- return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
486
- import_core4.ui.header,
487
- {
488
- ref,
489
- className: (0, import_utils4.cx)("ui-popover__header", className),
490
- __css: css,
491
- ...rest
492
- }
493
- );
494
- }
495
- );
496
- PopoverHeader.displayName = "PopoverHeader";
497
- PopoverHeader.__ui__ = "PopoverHeader";
498
-
499
- // src/popover-body.tsx
489
+ // src/popover-footer.tsx
500
490
  var import_core5 = require("@yamada-ui/core");
501
491
  var import_utils5 = require("@yamada-ui/utils");
502
492
  var import_jsx_runtime5 = require("react/jsx-runtime");
503
- var PopoverBody = (0, import_core5.forwardRef)(
493
+ var PopoverFooter = (0, import_core5.forwardRef)(
504
494
  ({ className, ...rest }, ref) => {
505
495
  const { styles } = usePopover();
506
496
  const css = {
497
+ alignItems: "center",
507
498
  display: "flex",
508
- flexDirection: "column",
509
- alignItems: "flex-start",
510
- ...styles.body
499
+ justifyContent: "flex-start",
500
+ ...styles.footer
511
501
  };
512
502
  return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
513
- import_core5.ui.div,
503
+ import_core5.ui.footer,
514
504
  {
515
505
  ref,
516
- className: (0, import_utils5.cx)("ui-popover__body", className),
506
+ className: (0, import_utils5.cx)("ui-popover__footer", className),
517
507
  __css: css,
518
508
  ...rest
519
509
  }
520
510
  );
521
511
  }
522
512
  );
523
- PopoverBody.displayName = "PopoverBody";
524
- PopoverBody.__ui__ = "PopoverBody";
513
+ PopoverFooter.displayName = "PopoverFooter";
514
+ PopoverFooter.__ui__ = "PopoverFooter";
525
515
 
526
- // src/popover-footer.tsx
516
+ // src/popover-header.tsx
527
517
  var import_core6 = require("@yamada-ui/core");
528
518
  var import_utils6 = require("@yamada-ui/utils");
529
519
  var import_jsx_runtime6 = require("react/jsx-runtime");
530
- var PopoverFooter = (0, import_core6.forwardRef)(
520
+ var PopoverHeader = (0, import_core6.forwardRef)(
531
521
  ({ className, ...rest }, ref) => {
532
522
  const { styles } = usePopover();
533
523
  const css = {
534
- display: "flex",
535
524
  alignItems: "center",
525
+ display: "flex",
536
526
  justifyContent: "flex-start",
537
- ...styles.footer
527
+ ...styles.header
538
528
  };
539
529
  return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
540
- import_core6.ui.footer,
530
+ import_core6.ui.header,
541
531
  {
542
532
  ref,
543
- className: (0, import_utils6.cx)("ui-popover__footer", className),
533
+ className: (0, import_utils6.cx)("ui-popover__header", className),
544
534
  __css: css,
545
535
  ...rest
546
536
  }
547
537
  );
548
538
  }
549
539
  );
550
- PopoverFooter.displayName = "PopoverFooter";
551
- PopoverFooter.__ui__ = "PopoverFooter";
540
+ PopoverHeader.displayName = "PopoverHeader";
541
+ PopoverHeader.__ui__ = "PopoverHeader";
542
+
543
+ // src/popover-trigger.tsx
544
+ var import_react4 = require("react");
545
+ var PopoverTrigger = ({ children }) => {
546
+ const child = import_react4.Children.only(children);
547
+ const { getTriggerProps } = usePopover();
548
+ return (0, import_react4.cloneElement)(child, getTriggerProps(child.props, child.ref));
549
+ };
550
+ PopoverTrigger.displayName = "PopoverTrigger";
551
+ PopoverTrigger.__ui__ = "PopoverTrigger";
552
552
  // Annotate the CommonJS export names for ESM import in node:
553
553
  0 && (module.exports = {
554
554
  Popover,
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/index.ts","../src/popover.tsx","../src/popover-trigger.tsx","../src/popover-anchor.tsx","../src/popover-close-button.tsx","../src/popover-content.tsx","../src/popover-header.tsx","../src/popover-body.tsx","../src/popover-footer.tsx"],"sourcesContent":["export { Popover, popoverProperties } from \"./popover\"\nexport type { PopoverProps, ComboBoxProps } from \"./popover\"\nexport { PopoverTrigger } from \"./popover-trigger\"\nexport { PopoverAnchor } from \"./popover-anchor\"\nexport { PopoverCloseButton } from \"./popover-close-button\"\nexport type { PopoverCloseButtonProps } from \"./popover-close-button\"\nexport { PopoverContent } from \"./popover-content\"\nexport type { PopoverContentProps } from \"./popover-content\"\nexport { PopoverHeader } from \"./popover-header\"\nexport type { PopoverHeaderProps } from \"./popover-header\"\nexport { PopoverBody } from \"./popover-body\"\nexport type { PopoverBodyProps } from \"./popover-body\"\nexport { PopoverFooter } from \"./popover-footer\"\nexport type { PopoverFooterProps } from \"./popover-footer\"\n","import type {\n CSSUIObject,\n FC,\n HTMLUIPropsWithRef,\n PropGetter,\n ThemeProps,\n} from \"@yamada-ui/core\"\nimport { useComponentMultiStyle, omitThemeProps } from \"@yamada-ui/core\"\nimport type { MotionProps, MotionTransitionProps } from \"@yamada-ui/motion\"\nimport { useAnimationObserver } from \"@yamada-ui/use-animation\"\nimport type { LazyMode } from \"@yamada-ui/use-disclosure\"\nimport { useDisclosure, useLazyDisclosure } from \"@yamada-ui/use-disclosure\"\nimport {\n useFocusOnHide,\n useFocusOnShow,\n useFocusOnPointerDown,\n} from \"@yamada-ui/use-focus\"\nimport type { UsePopperProps } from \"@yamada-ui/use-popper\"\nimport { usePopper, popperProperties } from \"@yamada-ui/use-popper\"\nimport {\n createContext,\n getEventRelatedTarget,\n handlerAll,\n isContains,\n mergeRefs,\n runIfFunc,\n} from \"@yamada-ui/utils\"\nimport type {\n ComponentProps,\n PropsWithChildren,\n RefAttributes,\n RefObject,\n} from \"react\"\nimport { useCallback, useEffect, useRef } from \"react\"\n\nexport type PopoverProperty = (typeof popoverProperties)[number]\n\nexport const popoverProperties = [\n ...popperProperties,\n \"isOpen\",\n \"defaultIsOpen\",\n \"onOpen\",\n \"onClose\",\n \"initialFocusRef\",\n \"restoreFocus\",\n \"autoFocus\",\n \"closeOnBlur\",\n \"closeOnEsc\",\n \"closeOnButton\",\n \"trigger\",\n \"openDelay\",\n \"closeDelay\",\n \"isLazy\",\n \"lazyBehavior\",\n \"animation\",\n \"duration\",\n] as const\n\nexport interface ComboBoxProps\n extends Omit<\n PopoverOptions,\n | \"initialFocusRef\"\n | \"relatedRef\"\n | \"autoFocus\"\n | \"restoreFocus\"\n | \"closeOnButton\"\n | \"trigger\"\n >,\n Omit<UsePopperProps, \"enabled\"> {}\n\ninterface PopoverOptions {\n /**\n * If `true`, the popover will be opened.\n */\n isOpen?: boolean\n /**\n * If `true`, the popover will be initially opened.\n */\n defaultIsOpen?: boolean\n /**\n * Callback fired when the popover opens.\n */\n onOpen?: () => void\n /**\n * Callback fired when the popover closes.\n */\n onClose?: () => void\n /**\n * The `ref` of the element that should receive focus when the popover opens.\n */\n initialFocusRef?: RefObject<{ focus(): void }>\n /**\n * The `ref` of the element related to the popover.\n * This is used during the `onBlur` event.\n */\n relatedRef?: RefObject<HTMLElement>\n /**\n * If `true`, focus will be transferred to the first interactive element when the popover opens.\n *\n * @default true\n */\n autoFocus?: boolean\n /**\n * If `true`, focus will be returned to the element that triggers the popover when it closes.\n *\n * @default true\n */\n restoreFocus?: boolean\n /**\n * If `true`, the popover will close when you blur out it by clicking outside or tabbing out.\n *\n * @default true\n */\n closeOnBlur?: boolean\n /**\n * If `true`, the popover will close when you hit the `Esc` key.\n *\n * @default true\n */\n closeOnEsc?: boolean\n /**\n * If `true`, display the popover close button.\n *\n * @default true\n */\n closeOnButton?: boolean\n /**\n * The interaction that triggers the popover.\n *\n * - `hover`: means the popover will open when you hover with mouse or focus with keyboard on the popover trigger.\n * - `click`: means the popover will open on click or press `Enter` to `Space` on keyboard.\n *\n * @default 'click'\n */\n trigger?: \"click\" | \"hover\" | \"never\" | \"contextmenu\"\n /**\n * The number of delay time to open.\n *\n * @default 200\n */\n openDelay?: number\n /**\n * The number of delay time to close.\n *\n * @default 200\n */\n closeDelay?: number\n /**\n * If `true`, the PopoverContent rendering will be deferred until the popover is open.\n *\n * @default false\n */\n isLazy?: boolean\n /**\n * The lazy behavior of popover's content when not visible. Only works when `isLazy={true}`\n *\n * - `unmount`: The popover's content is always unmounted when not open.\n * - `keepMounted`: The popover's content initially unmounted, but stays mounted when popover is open.\n *\n * @default 'unmount'\n */\n lazyBehavior?: LazyMode\n /**\n * The animation of the popover.\n *\n * @default 'scale'\n */\n animation?: \"scale\" | \"top\" | \"right\" | \"left\" | \"bottom\" | \"none\"\n /**\n * The animation duration.\n */\n duration?: MotionTransitionProps[\"duration\"]\n}\n\nexport interface PopoverProps\n extends ThemeProps<\"Popover\">,\n Omit<UsePopperProps, \"enabled\">,\n PropsWithChildren<PopoverOptions> {}\n\ninterface PopoverContext\n extends Pick<\n PopoverOptions,\n \"isOpen\" | \"onClose\" | \"closeOnButton\" | \"animation\" | \"duration\"\n > {\n onAnimationComplete: () => void\n forceUpdate: () => void | undefined\n getTriggerProps: PropGetter\n getAnchorProps: PropGetter\n getPopperProps: PropGetter<ComponentProps<\"div\">>\n getPopoverProps: PropGetter<MotionProps<\"section\">, MotionProps<\"section\">>\n styles: { [key: string]: CSSUIObject }\n}\n\nconst [PopoverProvider, usePopover] = createContext<PopoverContext>({\n strict: false,\n name: \"PopoverContext\",\n})\n\nexport { usePopover }\n\n/**\n * `Popover` is a component that floats around an element to display information.\n *\n * @see Docs https://yamada-ui.com/components/overlay/popover\n */\nexport const Popover: FC<PopoverProps> = (props) => {\n const [styles, mergedProps] = useComponentMultiStyle(\"Popover\", props)\n const {\n children,\n initialFocusRef,\n restoreFocus = true,\n autoFocus = true,\n closeOnBlur = true,\n closeOnEsc = true,\n closeOnButton = true,\n trigger = \"click\",\n openDelay = 200,\n closeDelay = 200,\n isLazy,\n lazyBehavior = \"unmount\",\n animation = \"scale\",\n duration,\n relatedRef,\n ...rest\n } = omitThemeProps(mergedProps)\n\n const { isOpen, onOpen, onClose, onToggle } = useDisclosure(mergedProps)\n\n const anchorRef = useRef<HTMLElement>(null)\n const triggerRef = useRef<HTMLElement>(null)\n const popoverRef = useRef<HTMLElement>(null)\n\n const { present, onAnimationComplete } = useAnimationObserver({\n isOpen,\n ref: popoverRef,\n })\n\n const openTimeout = useRef<number | undefined>(undefined)\n const closeTimeout = useRef<number | undefined>(undefined)\n\n const isHoveringRef = useRef(false)\n\n const hasBeenOpened = useRef(false)\n\n if (isOpen) hasBeenOpened.current = true\n\n const { referenceRef, getPopperProps, forceUpdate, transformOrigin } =\n usePopper({\n ...rest,\n enabled: isOpen,\n })\n\n useEffect(() => {\n return () => {\n if (openTimeout.current) clearTimeout(openTimeout.current)\n\n if (closeTimeout.current) clearTimeout(closeTimeout.current)\n }\n }, [])\n\n useFocusOnPointerDown({\n enabled: isOpen,\n ref: triggerRef,\n })\n\n useFocusOnHide(popoverRef, {\n focusRef: triggerRef,\n visible: isOpen,\n shouldFocus:\n restoreFocus && (trigger === \"click\" || trigger === \"contextmenu\"),\n })\n\n useFocusOnShow(popoverRef, {\n focusRef: initialFocusRef,\n visible: isOpen,\n shouldFocus:\n autoFocus && (trigger === \"click\" || trigger === \"contextmenu\"),\n })\n\n const shouldRenderChildren = useLazyDisclosure({\n wasSelected: hasBeenOpened.current,\n enabled: isLazy,\n mode: lazyBehavior,\n isSelected: present,\n })\n\n const getPopoverProps: PropGetter<\n MotionProps<\"section\">,\n MotionProps<\"section\">\n > = useCallback(\n (props = {}, ref = null) => {\n const popoverProps: MotionProps & RefAttributes<any> = {\n ...props,\n style: {\n ...props.style,\n transformOrigin,\n },\n ref: mergeRefs(popoverRef, ref),\n children: shouldRenderChildren ? props.children : null,\n tabIndex: -1,\n onKeyDown: handlerAll(props.onKeyDown, (ev) => {\n if (closeOnEsc && ev.key === \"Escape\") onClose()\n }),\n onBlur: handlerAll(props.onBlur, (ev) => {\n const relatedTarget = getEventRelatedTarget(ev)\n const targetIsPopover = isContains(popoverRef.current, relatedTarget)\n const targetIsTrigger = isContains(triggerRef.current, relatedTarget)\n const targetIsRelated = relatedRef?.current\n ? isContains(relatedRef.current, relatedTarget)\n : false\n\n const isValidBlur =\n !targetIsPopover && !targetIsTrigger && !targetIsRelated\n\n if (isOpen && closeOnBlur && isValidBlur) onClose()\n }),\n }\n\n if (trigger === \"hover\") {\n popoverProps.onMouseEnter = handlerAll(props.onMouseEnter, () => {\n isHoveringRef.current = true\n })\n\n popoverProps.onMouseLeave = handlerAll(props.onMouseLeave, (ev) => {\n if (ev.nativeEvent.relatedTarget === null) return\n\n isHoveringRef.current = false\n\n if (closeOnBlur) setTimeout(onClose, closeDelay)\n })\n }\n\n return popoverProps\n },\n [\n closeDelay,\n closeOnBlur,\n closeOnEsc,\n isOpen,\n onClose,\n shouldRenderChildren,\n transformOrigin,\n trigger,\n relatedRef,\n ],\n )\n\n const maybeReferenceRef = useCallback(\n (node: Element) => {\n if (anchorRef.current == null) referenceRef(node)\n },\n [referenceRef],\n )\n\n const getTriggerProps: PropGetter = useCallback(\n (props = {}, ref = null) => {\n const triggerProps: HTMLUIPropsWithRef = {\n ...props,\n ref: mergeRefs(triggerRef, ref, maybeReferenceRef),\n }\n\n if (trigger === \"click\") {\n triggerProps.onClick = handlerAll(props.onClick, onToggle)\n triggerProps.onBlur = handlerAll(props.onBlur, (ev) => {\n const relatedTarget = getEventRelatedTarget(ev)\n const isValidBlur = !isContains(popoverRef.current, relatedTarget)\n\n if (isOpen && closeOnBlur && isValidBlur) onClose()\n })\n }\n\n if (trigger === \"contextmenu\") {\n triggerProps.onContextMenu = handlerAll(props.onContextMenu, (ev) => {\n ev.preventDefault()\n onOpen()\n })\n triggerProps.onBlur = handlerAll(props.onBlur, (ev) => {\n const relatedTarget = getEventRelatedTarget(ev)\n const isValidBlur = !isContains(popoverRef.current, relatedTarget)\n\n if (isOpen && closeOnBlur && isValidBlur) onClose()\n })\n }\n\n if (trigger === \"hover\") {\n triggerProps.onFocus = handlerAll(props.onFocus, () => {\n if (openTimeout.current === undefined) onOpen()\n })\n\n triggerProps.onBlur = handlerAll(props.onBlur, (ev) => {\n const relatedTarget = getEventRelatedTarget(ev)\n const isValidBlur = !isContains(popoverRef.current, relatedTarget)\n\n if (isOpen && closeOnBlur && isValidBlur) onClose()\n })\n\n triggerProps.onKeyDown = handlerAll(props.onKeyDown, (ev) => {\n if (ev.key === \"Escape\") onClose()\n })\n\n triggerProps.onMouseEnter = handlerAll(props.onMouseEnter, () => {\n isHoveringRef.current = true\n openTimeout.current = window.setTimeout(onOpen, openDelay)\n })\n\n triggerProps.onMouseLeave = handlerAll(props.onMouseLeave, () => {\n isHoveringRef.current = false\n\n if (openTimeout.current) {\n clearTimeout(openTimeout.current)\n openTimeout.current = undefined\n }\n\n closeTimeout.current = window.setTimeout(() => {\n if (!isHoveringRef.current) onClose()\n }, closeDelay)\n })\n }\n\n return triggerProps\n },\n [\n closeDelay,\n closeOnBlur,\n isOpen,\n maybeReferenceRef,\n onClose,\n onOpen,\n onToggle,\n openDelay,\n trigger,\n ],\n )\n\n const getAnchorProps: PropGetter = useCallback(\n (props = {}, ref = null) => {\n return {\n ...props,\n ref: mergeRefs(ref, anchorRef, referenceRef),\n }\n },\n [anchorRef, referenceRef],\n )\n\n return (\n <PopoverProvider\n value={{\n isOpen,\n onClose,\n closeOnButton,\n onAnimationComplete,\n forceUpdate,\n getTriggerProps,\n getAnchorProps,\n getPopperProps,\n getPopoverProps,\n animation,\n duration,\n styles,\n }}\n >\n {runIfFunc(children, {\n isOpen,\n onClose,\n forceUpdate,\n })}\n </PopoverProvider>\n )\n}\n\nPopover.displayName = \"Popover\"\nPopover.__ui__ = \"Popover\"\n","import type { FC } from \"@yamada-ui/core\"\nimport type { PropsWithChildren, ReactElement, RefObject } from \"react\"\nimport { Children, cloneElement } from \"react\"\nimport { usePopover } from \"./popover\"\n\nexport const PopoverTrigger: FC<PropsWithChildren<{}>> = ({ children }) => {\n const child = Children.only(children) as ReactElement & {\n ref: RefObject<any>\n }\n const { getTriggerProps } = usePopover()\n\n return cloneElement(child, getTriggerProps(child.props, child.ref))\n}\n\nPopoverTrigger.displayName = \"PopoverTrigger\"\nPopoverTrigger.__ui__ = \"PopoverTrigger\"\n","import type { FC } from \"@yamada-ui/core\"\nimport type { PropsWithChildren, ReactElement, RefObject } from \"react\"\nimport { Children, cloneElement } from \"react\"\nimport { usePopover } from \"./popover\"\n\nexport const PopoverAnchor: FC<PropsWithChildren<{}>> = ({ children }) => {\n const child = Children.only(children) as ReactElement & {\n ref: RefObject<any>\n }\n const { getAnchorProps } = usePopover()\n\n return cloneElement(child, getAnchorProps(child.props, child.ref))\n}\n\nPopoverAnchor.displayName = \"PopoverAnchor\"\nPopoverAnchor.__ui__ = \"PopoverAnchor\"\n","import type { CloseButtonProps } from \"@yamada-ui/close-button\"\nimport { CloseButton } from \"@yamada-ui/close-button\"\nimport type { CSSUIObject } from \"@yamada-ui/core\"\nimport { forwardRef } from \"@yamada-ui/core\"\nimport { cx, handlerAll } from \"@yamada-ui/utils\"\nimport { usePopover } from \"./popover\"\n\nexport interface PopoverCloseButtonProps extends CloseButtonProps {}\n\nexport const PopoverCloseButton = forwardRef<PopoverCloseButtonProps, \"button\">(\n ({ onClick, ...rest }, ref) => {\n const { styles, onClose } = usePopover()\n\n const css: CSSUIObject = {\n position: \"absolute\",\n ...styles.closeButton,\n }\n\n return (\n <CloseButton\n ref={ref}\n className={cx(\"ui-popover__close-button\")}\n __css={css}\n onClick={handlerAll(onClick, (ev) => {\n ev.stopPropagation()\n onClose?.()\n })}\n size=\"sm\"\n {...rest}\n />\n )\n },\n)\n\nPopoverCloseButton.displayName = \"PopoverCloseButton\"\nPopoverCloseButton.__ui__ = \"PopoverCloseButton\"\n","import type { CSSUIObject, CSSUIProps, HTMLUIProps } from \"@yamada-ui/core\"\nimport { ui } from \"@yamada-ui/core\"\nimport { motion, motionForwardRef } from \"@yamada-ui/motion\"\nimport type { MotionPropsWithoutChildren } from \"@yamada-ui/motion\"\nimport { scaleFadeProps, slideFadeProps } from \"@yamada-ui/transitions\"\nimport { cx, findChildren, funcAll, getValidChildren } from \"@yamada-ui/utils\"\nimport { useMemo } from \"react\"\nimport type { PropsWithChildren } from \"react\"\nimport { usePopover } from \"./popover\"\nimport type { PopoverProps } from \"./popover\"\nimport { PopoverCloseButton } from \"./popover-close-button\"\n\nexport interface PopoverContentProps\n extends MotionPropsWithoutChildren<\"section\">,\n PropsWithChildren {\n /**\n * The props of the container element.\n */\n containerProps?: Omit<HTMLUIProps, \"children\">\n}\n\nconst getPopoverContentProps = (\n animation: PopoverProps[\"animation\"] = \"scale\",\n duration?: PopoverProps[\"duration\"],\n) => {\n const custom = {\n reverse: true,\n duration,\n enter: { visibility: \"visible\" },\n transitionEnd: { exit: { visibility: \"hidden\" } },\n }\n\n switch (animation) {\n case \"scale\":\n return {\n ...scaleFadeProps,\n custom: { ...custom, scale: 0.95 },\n }\n case \"top\":\n return {\n ...slideFadeProps,\n custom: { ...custom, offsetX: 0, offsetY: -16 },\n }\n case \"right\":\n return {\n ...slideFadeProps,\n custom: { ...custom, offsetX: 16, offsetY: 0 },\n }\n case \"left\":\n return {\n ...slideFadeProps,\n custom: { ...custom, offsetX: -16, offsetY: 0 },\n }\n case \"bottom\":\n return {\n ...slideFadeProps,\n custom: { ...custom, offsetX: 0, offsetY: 16 },\n }\n }\n}\n\nexport const PopoverContent = motionForwardRef<PopoverContentProps, \"section\">(\n (\n {\n as = \"section\",\n className,\n containerProps,\n children,\n w,\n width,\n minW,\n minWidth,\n maxW,\n maxWidth,\n z,\n zIndex,\n __css,\n ...rest\n },\n ref,\n ) => {\n const {\n isOpen,\n closeOnButton,\n getPopperProps,\n getPopoverProps,\n onAnimationComplete,\n animation,\n duration,\n styles,\n } = usePopover()\n\n const validChildren = getValidChildren(children)\n const [customPopoverCloseButton, ...cloneChildren] = findChildren(\n validChildren,\n PopoverCloseButton,\n )\n\n const Component = useMemo(() => motion(as), [as])\n\n const css = __css ?? styles.container ?? {}\n\n const computedCSS: CSSUIObject = {\n position: \"relative\",\n w: \"100%\",\n display: \"flex\",\n flexDirection: \"column\",\n outline: 0,\n ...css,\n }\n\n width ??= w\n width ??= (css?.width ?? css?.w) as CSSUIProps[\"width\"]\n minWidth ??= minW\n minWidth ??= (css?.minWidth ?? css?.minW) as CSSUIProps[\"minWidth\"]\n maxWidth ??= maxW\n maxWidth ??= (css?.maxWidth ?? css?.maxW) as CSSUIProps[\"maxWidth\"]\n\n zIndex ??= z\n zIndex ??= (css?.zIndex ?? css?.z) as CSSUIProps[\"zIndex\"]\n\n return (\n <ui.div\n {...getPopperProps({\n style: { visibility: isOpen ? \"visible\" : \"hidden\" },\n })}\n className=\"ui-popover\"\n outline=\"none\"\n width={width}\n minWidth={minWidth}\n maxWidth={maxWidth}\n zIndex={zIndex}\n {...containerProps}\n >\n <Component\n className={cx(\"ui-popover__content\", className)}\n {...(animation !== \"none\"\n ? getPopoverContentProps(animation, duration)\n : {})}\n {...getPopoverProps(rest, ref)}\n initial=\"exit\"\n animate={isOpen ? \"enter\" : \"exit\"}\n exit=\"exit\"\n onAnimationComplete={funcAll(\n onAnimationComplete,\n rest.onAnimationComplete,\n )}\n __css={computedCSS}\n >\n {customPopoverCloseButton ??\n (closeOnButton ? <PopoverCloseButton /> : null)}\n\n {cloneChildren}\n </Component>\n </ui.div>\n )\n },\n)\n\nPopoverContent.displayName = \"PopoverContent\"\nPopoverContent.__ui__ = \"PopoverContent\"\n","import type { HTMLUIProps, CSSUIObject } from \"@yamada-ui/core\"\nimport { ui, forwardRef } from \"@yamada-ui/core\"\nimport { cx } from \"@yamada-ui/utils\"\nimport { usePopover } from \"./popover\"\n\nexport interface PopoverHeaderProps extends HTMLUIProps<\"header\"> {}\n\nexport const PopoverHeader = forwardRef<PopoverHeaderProps, \"header\">(\n ({ className, ...rest }, ref) => {\n const { styles } = usePopover()\n\n const css: CSSUIObject = {\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"flex-start\",\n ...styles.header,\n }\n\n return (\n <ui.header\n ref={ref}\n className={cx(\"ui-popover__header\", className)}\n __css={css}\n {...rest}\n />\n )\n },\n)\n\nPopoverHeader.displayName = \"PopoverHeader\"\nPopoverHeader.__ui__ = \"PopoverHeader\"\n","import type { HTMLUIProps, CSSUIObject } from \"@yamada-ui/core\"\nimport { ui, forwardRef } from \"@yamada-ui/core\"\nimport { cx } from \"@yamada-ui/utils\"\nimport { usePopover } from \"./popover\"\n\nexport interface PopoverBodyProps extends HTMLUIProps {}\n\nexport const PopoverBody = forwardRef<PopoverBodyProps, \"div\">(\n ({ className, ...rest }, ref) => {\n const { styles } = usePopover()\n\n const css: CSSUIObject = {\n display: \"flex\",\n flexDirection: \"column\",\n alignItems: \"flex-start\",\n ...styles.body,\n }\n\n return (\n <ui.div\n ref={ref}\n className={cx(\"ui-popover__body\", className)}\n __css={css}\n {...rest}\n />\n )\n },\n)\n\nPopoverBody.displayName = \"PopoverBody\"\nPopoverBody.__ui__ = \"PopoverBody\"\n","import type { HTMLUIProps, CSSUIObject } from \"@yamada-ui/core\"\nimport { ui, forwardRef } from \"@yamada-ui/core\"\nimport { cx } from \"@yamada-ui/utils\"\nimport { usePopover } from \"./popover\"\n\nexport interface PopoverFooterProps extends HTMLUIProps<\"footer\"> {}\n\nexport const PopoverFooter = forwardRef<PopoverFooterProps, \"footer\">(\n ({ className, ...rest }, ref) => {\n const { styles } = usePopover()\n\n const css: CSSUIObject = {\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"flex-start\",\n ...styles.footer,\n }\n\n return (\n <ui.footer\n ref={ref}\n className={cx(\"ui-popover__footer\", className)}\n __css={css}\n {...rest}\n />\n )\n },\n)\n\nPopoverFooter.displayName = \"PopoverFooter\"\nPopoverFooter.__ui__ = \"PopoverFooter\"\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACOA,kBAAuD;AAEvD,2BAAqC;AAErC,4BAAiD;AACjD,uBAIO;AAEP,wBAA4C;AAC5C,mBAOO;AAOP,mBAA+C;AA4Z3C;AAxZG,IAAM,oBAAoB;AAAA,EAC/B,GAAG;AAAA,EACH;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;AAyIA,IAAM,CAAC,iBAAiB,UAAU,QAAI,4BAA8B;AAAA,EAClE,QAAQ;AAAA,EACR,MAAM;AACR,CAAC;AASM,IAAM,UAA4B,CAAC,UAAU;AAClD,QAAM,CAAC,QAAQ,WAAW,QAAI,oCAAuB,WAAW,KAAK;AACrE,QAAM;AAAA,IACJ;AAAA,IACA;AA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AAS;AAAA,MACT,YAAY;AAAA,MACZ,gBAAgB;AAAA,MAChB,GAAG,OAAO;AAAA,IACZ;AAEA,WACE;AAAA,MAAC,gBAAG;AAAA,MAAH;AAAA,QACC;AAAA,QACA,eAAW,kBAAG,sBAAsB,SAAS;AAAA,QAC7C,OAAO;AAAA,QACN,GAAG;AAAA;AAAA,IACN;AAAA,EAEJ;AACF;AAEA,cAAc,cAAc;AAC5B,cAAc,SAAS;","names":["props","import_react","import_react","import_core","import_utils","import_jsx_runtime","import_core","import_utils","import_react","import_jsx_runtime","import_core","import_utils","import_jsx_runtime","import_core","import_utils","import_jsx_runtime","import_core","import_utils","import_jsx_runtime"]}
1
+ {"version":3,"sources":["../src/index.ts","../src/popover.tsx","../src/popover-anchor.tsx","../src/popover-body.tsx","../src/popover-close-button.tsx","../src/popover-content.tsx","../src/popover-footer.tsx","../src/popover-header.tsx","../src/popover-trigger.tsx"],"sourcesContent":["export { Popover, popoverProperties } from \"./popover\"\nexport type { ComboBoxProps, PopoverProps } from \"./popover\"\nexport { PopoverAnchor } from \"./popover-anchor\"\nexport { PopoverBody } from \"./popover-body\"\nexport type { PopoverBodyProps } from \"./popover-body\"\nexport { PopoverCloseButton } from \"./popover-close-button\"\nexport type { PopoverCloseButtonProps } from \"./popover-close-button\"\nexport { PopoverContent } from \"./popover-content\"\nexport type { PopoverContentProps } from \"./popover-content\"\nexport { PopoverFooter } from \"./popover-footer\"\nexport type { PopoverFooterProps } from \"./popover-footer\"\nexport { PopoverHeader } from \"./popover-header\"\nexport type { PopoverHeaderProps } from \"./popover-header\"\nexport { PopoverTrigger } from \"./popover-trigger\"\n","import type {\n CSSUIObject,\n FC,\n HTMLUIPropsWithRef,\n PropGetter,\n ThemeProps,\n} from \"@yamada-ui/core\"\nimport type { MotionProps, MotionTransitionProps } from \"@yamada-ui/motion\"\nimport type { LazyMode } from \"@yamada-ui/use-disclosure\"\nimport type { UsePopperProps } from \"@yamada-ui/use-popper\"\nimport type {\n ComponentProps,\n PropsWithChildren,\n RefAttributes,\n RefObject,\n} from \"react\"\nimport { omitThemeProps, useComponentMultiStyle } from \"@yamada-ui/core\"\nimport { useAnimationObserver } from \"@yamada-ui/use-animation\"\nimport { useDisclosure, useLazyDisclosure } from \"@yamada-ui/use-disclosure\"\nimport {\n useFocusOnHide,\n useFocusOnPointerDown,\n useFocusOnShow,\n} from \"@yamada-ui/use-focus\"\nimport { popperProperties, usePopper } from \"@yamada-ui/use-popper\"\nimport {\n createContext,\n getEventRelatedTarget,\n handlerAll,\n isContains,\n mergeRefs,\n runIfFunc,\n} from \"@yamada-ui/utils\"\nimport { useCallback, useEffect, useRef } from \"react\"\n\nexport type PopoverProperty = (typeof popoverProperties)[number]\n\nexport const popoverProperties = [\n ...popperProperties,\n \"isOpen\",\n \"defaultIsOpen\",\n \"onOpen\",\n \"onClose\",\n \"initialFocusRef\",\n \"restoreFocus\",\n \"autoFocus\",\n \"closeOnBlur\",\n \"closeOnEsc\",\n \"closeOnButton\",\n \"trigger\",\n \"openDelay\",\n \"closeDelay\",\n \"isLazy\",\n \"lazyBehavior\",\n \"animation\",\n \"duration\",\n] as const\n\nexport interface ComboBoxProps\n extends Omit<\n PopoverOptions,\n | \"autoFocus\"\n | \"closeOnButton\"\n | \"initialFocusRef\"\n | \"relatedRef\"\n | \"restoreFocus\"\n | \"trigger\"\n >,\n Omit<UsePopperProps, \"enabled\"> {}\n\ninterface PopoverOptions {\n /**\n * The animation of the popover.\n *\n * @default 'scale'\n */\n animation?: \"bottom\" | \"left\" | \"none\" | \"right\" | \"scale\" | \"top\"\n /**\n * If `true`, focus will be transferred to the first interactive element when the popover opens.\n *\n * @default true\n */\n autoFocus?: boolean\n /**\n * The number of delay time to close.\n *\n * @default 200\n */\n closeDelay?: number\n /**\n * If `true`, the popover will close when you blur out it by clicking outside or tabbing out.\n *\n * @default true\n */\n closeOnBlur?: boolean\n /**\n * If `true`, display the popover close button.\n *\n * @default true\n */\n closeOnButton?: boolean\n /**\n * If `true`, the popover will close when you hit the `Esc` key.\n *\n * @default true\n */\n closeOnEsc?: boolean\n /**\n * If `true`, the popover will be initially opened.\n */\n defaultIsOpen?: boolean\n /**\n * The animation duration.\n */\n duration?: MotionTransitionProps[\"duration\"]\n /**\n * The `ref` of the element that should receive focus when the popover opens.\n */\n initialFocusRef?: RefObject<{ focus(): void }>\n /**\n * If `true`, the PopoverContent rendering will be deferred until the popover is open.\n *\n * @default false\n */\n isLazy?: boolean\n /**\n * If `true`, the popover will be opened.\n */\n isOpen?: boolean\n /**\n * The lazy behavior of popover's content when not visible. Only works when `isLazy={true}`\n *\n * - `unmount`: The popover's content is always unmounted when not open.\n * - `keepMounted`: The popover's content initially unmounted, but stays mounted when popover is open.\n *\n * @default 'unmount'\n */\n lazyBehavior?: LazyMode\n /**\n * The number of delay time to open.\n *\n * @default 200\n */\n openDelay?: number\n /**\n * The `ref` of the element related to the popover.\n * This is used during the `onBlur` event.\n */\n relatedRef?: RefObject<HTMLElement>\n /**\n * If `true`, focus will be returned to the element that triggers the popover when it closes.\n *\n * @default true\n */\n restoreFocus?: boolean\n /**\n * The interaction that triggers the popover.\n *\n * - `hover`: means the popover will open when you hover with mouse or focus with keyboard on the popover trigger.\n * - `click`: means the popover will open on click or press `Enter` to `Space` on keyboard.\n *\n * @default 'click'\n */\n trigger?: \"click\" | \"contextmenu\" | \"hover\" | \"never\"\n /**\n * Callback fired when the popover closes.\n */\n onClose?: () => void\n /**\n * Callback fired when the popover opens.\n */\n onOpen?: () => void\n}\n\nexport interface PopoverProps\n extends ThemeProps<\"Popover\">,\n Omit<UsePopperProps, \"enabled\">,\n PropsWithChildren<PopoverOptions> {}\n\ninterface PopoverContext\n extends Pick<\n PopoverOptions,\n \"animation\" | \"closeOnButton\" | \"duration\" | \"isOpen\" | \"onClose\"\n > {\n forceUpdate: () => undefined | void\n styles: { [key: string]: CSSUIObject | undefined }\n getAnchorProps: PropGetter\n getPopoverProps: PropGetter<MotionProps<\"section\">, MotionProps<\"section\">>\n getPopperProps: PropGetter<ComponentProps<\"div\">>\n getTriggerProps: PropGetter\n onAnimationComplete: () => void\n}\n\nconst [PopoverProvider, usePopover] = createContext<PopoverContext>({\n name: \"PopoverContext\",\n errorMessage: `usePopoverContext returned is 'undefined'. Seems you forgot to wrap the components in \"<Popover />\"`,\n})\n\nexport { usePopover }\n\n/**\n * `Popover` is a component that floats around an element to display information.\n *\n * @see Docs https://yamada-ui.com/components/overlay/popover\n */\nexport const Popover: FC<PopoverProps> = (props) => {\n const [styles, mergedProps] = useComponentMultiStyle(\"Popover\", props)\n const {\n animation = \"scale\",\n autoFocus = true,\n children,\n closeDelay = 200,\n closeOnBlur = true,\n closeOnButton = true,\n closeOnEsc = true,\n duration,\n initialFocusRef,\n isLazy,\n lazyBehavior = \"unmount\",\n openDelay = 200,\n relatedRef,\n restoreFocus = true,\n trigger = \"click\",\n ...rest\n } = omitThemeProps(mergedProps)\n\n const { isOpen, onClose, onOpen, onToggle } = useDisclosure(mergedProps)\n\n const anchorRef = useRef<HTMLElement>(null)\n const triggerRef = useRef<HTMLElement>(null)\n const popoverRef = useRef<HTMLElement>(null)\n\n const { present, onAnimationComplete } = useAnimationObserver({\n ref: popoverRef,\n isOpen,\n })\n\n const openTimeout = useRef<number | undefined>(undefined)\n const closeTimeout = useRef<number | undefined>(undefined)\n\n const isHoveringRef = useRef(false)\n\n const hasBeenOpened = useRef(false)\n\n if (isOpen) hasBeenOpened.current = true\n\n const { forceUpdate, referenceRef, transformOrigin, getPopperProps } =\n usePopper({\n ...rest,\n enabled: isOpen,\n })\n\n useEffect(() => {\n return () => {\n if (openTimeout.current) clearTimeout(openTimeout.current)\n\n if (closeTimeout.current) clearTimeout(closeTimeout.current)\n }\n }, [])\n\n useFocusOnPointerDown({\n ref: triggerRef,\n enabled: isOpen,\n })\n\n useFocusOnHide(popoverRef, {\n focusRef: triggerRef,\n shouldFocus:\n restoreFocus && (trigger === \"click\" || trigger === \"contextmenu\"),\n visible: isOpen,\n })\n\n useFocusOnShow(popoverRef, {\n focusRef: initialFocusRef,\n shouldFocus:\n autoFocus && (trigger === \"click\" || trigger === \"contextmenu\"),\n visible: isOpen,\n })\n\n const shouldRenderChildren = useLazyDisclosure({\n enabled: isLazy,\n isSelected: present,\n mode: lazyBehavior,\n wasSelected: hasBeenOpened.current,\n })\n\n const getPopoverProps: PropGetter<\n MotionProps<\"section\">,\n MotionProps<\"section\">\n > = useCallback(\n (props = {}, ref = null) => {\n const popoverProps: MotionProps & RefAttributes<any> = {\n ...props,\n ref: mergeRefs(popoverRef, ref),\n style: {\n ...props.style,\n transformOrigin,\n },\n children: shouldRenderChildren ? props.children : null,\n tabIndex: -1,\n onBlur: handlerAll(props.onBlur, (ev) => {\n const relatedTarget = getEventRelatedTarget(ev)\n const targetIsPopover = isContains(popoverRef.current, relatedTarget)\n const targetIsTrigger = isContains(triggerRef.current, relatedTarget)\n const targetIsRelated = relatedRef?.current\n ? isContains(relatedRef.current, relatedTarget)\n : false\n\n const isValidBlur =\n !targetIsPopover && !targetIsTrigger && !targetIsRelated\n\n if (isOpen && closeOnBlur && isValidBlur) onClose()\n }),\n onKeyDown: handlerAll(props.onKeyDown, (ev) => {\n if (closeOnEsc && ev.key === \"Escape\") onClose()\n }),\n }\n\n if (trigger === \"hover\") {\n popoverProps.onMouseEnter = handlerAll(props.onMouseEnter, () => {\n isHoveringRef.current = true\n })\n\n popoverProps.onMouseLeave = handlerAll(props.onMouseLeave, (ev) => {\n if (ev.nativeEvent.relatedTarget === null) return\n\n isHoveringRef.current = false\n\n if (closeOnBlur) setTimeout(onClose, closeDelay)\n })\n }\n\n return popoverProps\n },\n [\n closeDelay,\n closeOnBlur,\n closeOnEsc,\n isOpen,\n onClose,\n shouldRenderChildren,\n transformOrigin,\n trigger,\n relatedRef,\n ],\n )\n\n const maybeReferenceRef = useCallback(\n (node: Element) => {\n if (anchorRef.current == null) referenceRef(node)\n },\n [referenceRef],\n )\n\n const getTriggerProps: PropGetter = useCallback(\n (props = {}, ref = null) => {\n const triggerProps: HTMLUIPropsWithRef = {\n ...props,\n ref: mergeRefs(triggerRef, ref, maybeReferenceRef),\n }\n\n if (trigger === \"click\") {\n triggerProps.onClick = handlerAll(props.onClick, onToggle)\n triggerProps.onBlur = handlerAll(props.onBlur, (ev) => {\n const relatedTarget = getEventRelatedTarget(ev)\n const isValidBlur = !isContains(popoverRef.current, relatedTarget)\n\n if (isOpen && closeOnBlur && isValidBlur) onClose()\n })\n }\n\n if (trigger === \"contextmenu\") {\n triggerProps.onContextMenu = handlerAll(props.onContextMenu, (ev) => {\n ev.preventDefault()\n onOpen()\n })\n triggerProps.onBlur = handlerAll(props.onBlur, (ev) => {\n const relatedTarget = getEventRelatedTarget(ev)\n const isValidBlur = !isContains(popoverRef.current, relatedTarget)\n\n if (isOpen && closeOnBlur && isValidBlur) onClose()\n })\n }\n\n if (trigger === \"hover\") {\n triggerProps.onFocus = handlerAll(props.onFocus, () => {\n if (openTimeout.current === undefined) onOpen()\n })\n\n triggerProps.onBlur = handlerAll(props.onBlur, (ev) => {\n const relatedTarget = getEventRelatedTarget(ev)\n const isValidBlur = !isContains(popoverRef.current, relatedTarget)\n\n if (isOpen && closeOnBlur && isValidBlur) onClose()\n })\n\n triggerProps.onKeyDown = handlerAll(props.onKeyDown, (ev) => {\n if (ev.key === \"Escape\") onClose()\n })\n\n triggerProps.onMouseEnter = handlerAll(props.onMouseEnter, () => {\n isHoveringRef.current = true\n openTimeout.current = window.setTimeout(onOpen, openDelay)\n })\n\n triggerProps.onMouseLeave = handlerAll(props.onMouseLeave, () => {\n isHoveringRef.current = false\n\n if (openTimeout.current) {\n clearTimeout(openTimeout.current)\n openTimeout.current = undefined\n }\n\n closeTimeout.current = window.setTimeout(() => {\n if (!isHoveringRef.current) onClose()\n }, closeDelay)\n })\n }\n\n return triggerProps\n },\n [\n closeDelay,\n closeOnBlur,\n isOpen,\n maybeReferenceRef,\n onClose,\n onOpen,\n onToggle,\n openDelay,\n trigger,\n ],\n )\n\n const getAnchorProps: PropGetter = useCallback(\n (props = {}, ref = null) => {\n return {\n ...props,\n ref: mergeRefs(ref, anchorRef, referenceRef),\n }\n },\n [anchorRef, referenceRef],\n )\n\n return (\n <PopoverProvider\n value={{\n animation,\n closeOnButton,\n duration,\n forceUpdate,\n isOpen,\n styles,\n getAnchorProps,\n getPopoverProps,\n getPopperProps,\n getTriggerProps,\n onAnimationComplete,\n onClose,\n }}\n >\n {runIfFunc(children, {\n forceUpdate,\n isOpen,\n onClose,\n })}\n </PopoverProvider>\n )\n}\n\nPopover.displayName = \"Popover\"\nPopover.__ui__ = \"Popover\"\n","import type { FC } from \"@yamada-ui/core\"\nimport type { PropsWithChildren, ReactElement, RefObject } from \"react\"\nimport { Children, cloneElement } from \"react\"\nimport { usePopover } from \"./popover\"\n\nexport const PopoverAnchor: FC<PropsWithChildren<{}>> = ({ children }) => {\n const child = Children.only(children) as {\n ref: RefObject<any>\n } & ReactElement\n const { getAnchorProps } = usePopover()\n\n return cloneElement(child, getAnchorProps(child.props, child.ref))\n}\n\nPopoverAnchor.displayName = \"PopoverAnchor\"\nPopoverAnchor.__ui__ = \"PopoverAnchor\"\n","import type { CSSUIObject, HTMLUIProps } from \"@yamada-ui/core\"\nimport { forwardRef, ui } from \"@yamada-ui/core\"\nimport { cx } from \"@yamada-ui/utils\"\nimport { usePopover } from \"./popover\"\n\nexport interface PopoverBodyProps extends HTMLUIProps {}\n\nexport const PopoverBody = forwardRef<PopoverBodyProps, \"div\">(\n ({ className, ...rest }, ref) => {\n const { styles } = usePopover()\n\n const css: CSSUIObject = {\n alignItems: \"flex-start\",\n display: \"flex\",\n flexDirection: \"column\",\n ...styles.body,\n }\n\n return (\n <ui.div\n ref={ref}\n className={cx(\"ui-popover__body\", className)}\n __css={css}\n {...rest}\n />\n )\n },\n)\n\nPopoverBody.displayName = \"PopoverBody\"\nPopoverBody.__ui__ = \"PopoverBody\"\n","import type { CloseButtonProps } from \"@yamada-ui/close-button\"\nimport type { CSSUIObject } from \"@yamada-ui/core\"\nimport { CloseButton } from \"@yamada-ui/close-button\"\nimport { forwardRef } from \"@yamada-ui/core\"\nimport { cx, handlerAll } from \"@yamada-ui/utils\"\nimport { usePopover } from \"./popover\"\n\nexport interface PopoverCloseButtonProps extends CloseButtonProps {}\n\nexport const PopoverCloseButton = forwardRef<PopoverCloseButtonProps, \"button\">(\n ({ onClick, ...rest }, ref) => {\n const { styles, onClose } = usePopover()\n\n const css: CSSUIObject = {\n position: \"absolute\",\n ...styles.closeButton,\n }\n\n return (\n <CloseButton\n ref={ref}\n className={cx(\"ui-popover__close-button\")}\n size=\"sm\"\n onClick={handlerAll(onClick, (ev) => {\n ev.stopPropagation()\n onClose?.()\n })}\n __css={css}\n {...rest}\n />\n )\n },\n)\n\nPopoverCloseButton.displayName = \"PopoverCloseButton\"\nPopoverCloseButton.__ui__ = \"PopoverCloseButton\"\n","import type { CSSUIObject, CSSUIProps, HTMLUIProps } from \"@yamada-ui/core\"\nimport type { MotionPropsWithoutChildren } from \"@yamada-ui/motion\"\nimport type { PropsWithChildren } from \"react\"\nimport type { PopoverProps } from \"./popover\"\nimport { ui } from \"@yamada-ui/core\"\nimport { motion, motionForwardRef } from \"@yamada-ui/motion\"\nimport { scaleFadeProps, slideFadeProps } from \"@yamada-ui/transitions\"\nimport { cx, findChildren, funcAll, getValidChildren } from \"@yamada-ui/utils\"\nimport { useMemo } from \"react\"\nimport { usePopover } from \"./popover\"\nimport { PopoverCloseButton } from \"./popover-close-button\"\n\nexport interface PopoverContentProps\n extends MotionPropsWithoutChildren<\"section\">,\n PropsWithChildren {\n /**\n * The props of the container element.\n */\n containerProps?: Omit<HTMLUIProps, \"children\">\n}\n\nconst getPopoverContentProps = (\n animation: PopoverProps[\"animation\"] = \"scale\",\n duration?: PopoverProps[\"duration\"],\n) => {\n const custom = {\n duration,\n enter: { visibility: \"visible\" },\n reverse: true,\n transitionEnd: { exit: { visibility: \"hidden\" } },\n }\n\n switch (animation) {\n case \"scale\":\n return {\n ...scaleFadeProps,\n custom: { ...custom, scale: 0.95 },\n }\n case \"top\":\n return {\n ...slideFadeProps,\n custom: { ...custom, offsetX: 0, offsetY: -16 },\n }\n case \"right\":\n return {\n ...slideFadeProps,\n custom: { ...custom, offsetX: 16, offsetY: 0 },\n }\n case \"left\":\n return {\n ...slideFadeProps,\n custom: { ...custom, offsetX: -16, offsetY: 0 },\n }\n case \"bottom\":\n return {\n ...slideFadeProps,\n custom: { ...custom, offsetX: 0, offsetY: 16 },\n }\n }\n}\n\nexport const PopoverContent = motionForwardRef<PopoverContentProps, \"section\">(\n (\n {\n as = \"section\",\n className,\n children,\n maxW,\n maxWidth,\n minW,\n minWidth,\n w,\n width,\n z,\n zIndex,\n containerProps,\n __css,\n ...rest\n },\n ref,\n ) => {\n const {\n animation,\n closeOnButton,\n duration,\n isOpen,\n styles,\n getPopoverProps,\n getPopperProps,\n onAnimationComplete,\n } = usePopover()\n\n const validChildren = getValidChildren(children)\n const [customPopoverCloseButton, ...cloneChildren] = findChildren(\n validChildren,\n PopoverCloseButton,\n )\n\n const Component = useMemo(() => motion(as), [as])\n\n const css = __css ?? styles.container ?? {}\n\n const computedCSS: CSSUIObject = {\n display: \"flex\",\n flexDirection: \"column\",\n outline: 0,\n position: \"relative\",\n w: \"100%\",\n ...css,\n }\n\n width ??= w\n width ??= (css.width ?? css.w) as CSSUIProps[\"width\"]\n minWidth ??= minW\n minWidth ??= (css.minWidth ?? css.minW) as CSSUIProps[\"minWidth\"]\n maxWidth ??= maxW\n maxWidth ??= (css.maxWidth ?? css.maxW) as CSSUIProps[\"maxWidth\"]\n\n zIndex ??= z\n zIndex ??= (css.zIndex ?? css.z) as CSSUIProps[\"zIndex\"]\n\n return (\n <ui.div\n {...getPopperProps({\n style: { visibility: isOpen ? \"visible\" : \"hidden\" },\n })}\n className=\"ui-popover\"\n maxWidth={maxWidth}\n minWidth={minWidth}\n outline=\"none\"\n width={width}\n zIndex={zIndex}\n {...containerProps}\n >\n <Component\n className={cx(\"ui-popover__content\", className)}\n {...(animation !== \"none\"\n ? getPopoverContentProps(animation, duration)\n : {})}\n {...getPopoverProps(rest, ref)}\n animate={isOpen ? \"enter\" : \"exit\"}\n exit=\"exit\"\n initial=\"exit\"\n onAnimationComplete={funcAll(\n onAnimationComplete,\n rest.onAnimationComplete,\n )}\n __css={computedCSS}\n >\n {customPopoverCloseButton ??\n (closeOnButton ? <PopoverCloseButton /> : null)}\n\n {cloneChildren}\n </Component>\n </ui.div>\n )\n },\n)\n\nPopoverContent.displayName = \"PopoverContent\"\nPopoverContent.__ui__ = \"PopoverContent\"\n","import type { CSSUIObject, HTMLUIProps } from \"@yamada-ui/core\"\nimport { forwardRef, ui } from \"@yamada-ui/core\"\nimport { cx } from \"@yamada-ui/utils\"\nimport { usePopover } from \"./popover\"\n\nexport interface PopoverFooterProps extends HTMLUIProps<\"footer\"> {}\n\nexport const PopoverFooter = forwardRef<PopoverFooterProps, \"footer\">(\n ({ className, ...rest }, ref) => {\n const { styles } = usePopover()\n\n const css: CSSUIObject = {\n alignItems: \"center\",\n display: \"flex\",\n justifyContent: \"flex-start\",\n ...styles.footer,\n }\n\n return (\n <ui.footer\n ref={ref}\n className={cx(\"ui-popover__footer\", className)}\n __css={css}\n {...rest}\n />\n )\n },\n)\n\nPopoverFooter.displayName = \"PopoverFooter\"\nPopoverFooter.__ui__ = \"PopoverFooter\"\n","import type { CSSUIObject, HTMLUIProps } from \"@yamada-ui/core\"\nimport { forwardRef, ui } from \"@yamada-ui/core\"\nimport { cx } from \"@yamada-ui/utils\"\nimport { usePopover } from \"./popover\"\n\nexport interface PopoverHeaderProps extends HTMLUIProps<\"header\"> {}\n\nexport const PopoverHeader = forwardRef<PopoverHeaderProps, \"header\">(\n ({ className, ...rest }, ref) => {\n const { styles } = usePopover()\n\n const css: CSSUIObject = {\n alignItems: \"center\",\n display: \"flex\",\n justifyContent: \"flex-start\",\n ...styles.header,\n }\n\n return (\n <ui.header\n ref={ref}\n className={cx(\"ui-popover__header\", className)}\n __css={css}\n {...rest}\n />\n )\n },\n)\n\nPopoverHeader.displayName = \"PopoverHeader\"\nPopoverHeader.__ui__ = \"PopoverHeader\"\n","import type { FC } from \"@yamada-ui/core\"\nimport type { PropsWithChildren, ReactElement, RefObject } from \"react\"\nimport { Children, cloneElement } from \"react\"\nimport { usePopover } from \"./popover\"\n\nexport const PopoverTrigger: FC<PropsWithChildren<{}>> = ({ children }) => {\n const child = Children.only(children) as {\n ref: RefObject<any>\n } & ReactElement\n const { getTriggerProps } = usePopover()\n\n return cloneElement(child, getTriggerProps(child.props, child.ref))\n}\n\nPopoverTrigger.displayName = \"PopoverTrigger\"\nPopoverTrigger.__ui__ = \"PopoverTrigger\"\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACgBA,kBAAuD;AACvD,2BAAqC;AACrC,4BAAiD;AACjD,uBAIO;AACP,wBAA4C;AAC5C,mBAOO;AACP,mBAA+C;AA4Z3C;AAxZG,IAAM,oBAAoB;AAAA,EAC/B,GAAG;AAAA,EACH;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;AAyIA,IAAM,CAAC,iBAAiB,UAAU,QAAI,4BAA8B;AAAA,EAClE,MAAM;AAAA,EACN,cAAc;AAChB,CAAC;AASM,IAAM,UAA4B,CAAC,UAAU;AAClD,QAAM,CAAC,QAAQ,WAAW,QAAI,oCAAuB,WAAW,KAAK;AACrE,QAAM;AAAA,IACJ,YAAY;AAAA,IACZ,YAAY;AAAA,IACZ;AAAA,IACA,aAAa;AAAA,IACb,cAAc;AAAA,IACd,gBAAgB;AAAA,IAChB,aAAa;AAAA,IACb;AAAA,IACA;AAAA,IACA;A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C,QAAM,EAAE,gBAAgB,IAAI,WAAW;AAEvC,aAAO,4BAAa,OAAO,gBAAgB,MAAM,OAAO,MAAM,GAAG,CAAC;AACpE;AAEA,eAAe,cAAc;AAC7B,eAAe,SAAS;","names":["props","import_react","import_core","import_utils","import_jsx_runtime","import_core","import_utils","import_jsx_runtime","import_core","import_utils","import_react","import_jsx_runtime","import_core","import_utils","import_jsx_runtime","import_core","import_utils","import_jsx_runtime","import_react"]}