@yamada-ui/popover 1.3.5-next-20241022143327 → 1.4.0-dev-20241027000856

Sign up to get free protection for your applications and to get access to all the features.
Files changed (50) hide show
  1. package/dist/{chunk-RXYUC4JZ.mjs → chunk-7HM7C5EL.mjs} +2 -2
  2. package/dist/{chunk-IESY3Y4P.mjs → chunk-ILSO62AM.mjs} +2 -2
  3. package/dist/{chunk-KBEWDJLR.mjs → chunk-JTIVIKPS.mjs} +23 -5
  4. package/dist/chunk-JTIVIKPS.mjs.map +1 -0
  5. package/dist/{chunk-S3KWEQPS.mjs → chunk-QVEEOMV4.mjs} +4 -3
  6. package/dist/chunk-QVEEOMV4.mjs.map +1 -0
  7. package/dist/{chunk-7UFHYE2W.mjs → chunk-RPAOBMYJ.mjs} +3 -3
  8. package/dist/{chunk-YSYN7XPR.mjs → chunk-TKYA7E3C.mjs} +2 -2
  9. package/dist/{chunk-QQSUS4YW.mjs → chunk-VVVFWCB4.mjs} +4 -3
  10. package/dist/chunk-VVVFWCB4.mjs.map +1 -0
  11. package/dist/{chunk-J22VBFAF.mjs → chunk-Y5OMCSRM.mjs} +5 -3
  12. package/dist/chunk-Y5OMCSRM.mjs.map +1 -0
  13. package/dist/index.js +28 -6
  14. package/dist/index.js.map +1 -1
  15. package/dist/index.mjs +8 -8
  16. package/dist/popover-anchor.js +21 -3
  17. package/dist/popover-anchor.js.map +1 -1
  18. package/dist/popover-anchor.mjs +2 -2
  19. package/dist/popover-body.js +23 -4
  20. package/dist/popover-body.js.map +1 -1
  21. package/dist/popover-body.mjs +2 -2
  22. package/dist/popover-close-button.js +24 -4
  23. package/dist/popover-close-button.js.map +1 -1
  24. package/dist/popover-close-button.mjs +2 -2
  25. package/dist/popover-content.js +24 -4
  26. package/dist/popover-content.js.map +1 -1
  27. package/dist/popover-content.mjs +3 -3
  28. package/dist/popover-footer.js +21 -3
  29. package/dist/popover-footer.js.map +1 -1
  30. package/dist/popover-footer.mjs +2 -2
  31. package/dist/popover-header.js +23 -4
  32. package/dist/popover-header.js.map +1 -1
  33. package/dist/popover-header.mjs +2 -2
  34. package/dist/popover-trigger.js +21 -3
  35. package/dist/popover-trigger.js.map +1 -1
  36. package/dist/popover-trigger.mjs +2 -2
  37. package/dist/popover.d.mts +3 -0
  38. package/dist/popover.d.ts +3 -0
  39. package/dist/popover.js +21 -3
  40. package/dist/popover.js.map +1 -1
  41. package/dist/popover.mjs +1 -1
  42. package/package.json +10 -10
  43. package/dist/chunk-J22VBFAF.mjs.map +0 -1
  44. package/dist/chunk-KBEWDJLR.mjs.map +0 -1
  45. package/dist/chunk-QQSUS4YW.mjs.map +0 -1
  46. package/dist/chunk-S3KWEQPS.mjs.map +0 -1
  47. /package/dist/{chunk-RXYUC4JZ.mjs.map → chunk-7HM7C5EL.mjs.map} +0 -0
  48. /package/dist/{chunk-IESY3Y4P.mjs.map → chunk-ILSO62AM.mjs.map} +0 -0
  49. /package/dist/{chunk-7UFHYE2W.mjs.map → chunk-RPAOBMYJ.mjs.map} +0 -0
  50. /package/dist/{chunk-YSYN7XPR.mjs.map → chunk-TKYA7E3C.mjs.map} +0 -0
@@ -1,7 +1,7 @@
1
1
  "use client"
2
2
  import {
3
3
  usePopover
4
- } from "./chunk-KBEWDJLR.mjs";
4
+ } from "./chunk-JTIVIKPS.mjs";
5
5
 
6
6
  // src/popover-anchor.tsx
7
7
  import { Children, cloneElement } from "react";
@@ -16,4 +16,4 @@ PopoverAnchor.__ui__ = "PopoverAnchor";
16
16
  export {
17
17
  PopoverAnchor
18
18
  };
19
- //# sourceMappingURL=chunk-RXYUC4JZ.mjs.map
19
+ //# sourceMappingURL=chunk-7HM7C5EL.mjs.map
@@ -1,7 +1,7 @@
1
1
  "use client"
2
2
  import {
3
3
  usePopover
4
- } from "./chunk-KBEWDJLR.mjs";
4
+ } from "./chunk-JTIVIKPS.mjs";
5
5
 
6
6
  // src/popover-trigger.tsx
7
7
  import { Children, cloneElement } from "react";
@@ -16,4 +16,4 @@ PopoverTrigger.__ui__ = "PopoverTrigger";
16
16
  export {
17
17
  PopoverTrigger
18
18
  };
19
- //# sourceMappingURL=chunk-IESY3Y4P.mjs.map
19
+ //# sourceMappingURL=chunk-ILSO62AM.mjs.map
@@ -18,7 +18,7 @@ import {
18
18
  mergeRefs,
19
19
  runIfFunc
20
20
  } from "@yamada-ui/utils";
21
- import { useCallback, useEffect, useRef } from "react";
21
+ import { useCallback, useEffect, useId, useRef } from "react";
22
22
  import { jsx } from "react/jsx-runtime";
23
23
  var popoverProperties = [
24
24
  ...popperProperties,
@@ -64,6 +64,9 @@ var Popover = (props) => {
64
64
  trigger = "click",
65
65
  ...rest
66
66
  } = omitThemeProps(mergedProps);
67
+ const id = useId();
68
+ const labelledbyId = useId();
69
+ const describedbyId = useId();
67
70
  const { isOpen, onClose, onOpen, onToggle } = useDisclosure(mergedProps);
68
71
  const anchorRef = useRef(null);
69
72
  const triggerRef = useRef(null);
@@ -76,11 +79,11 @@ var Popover = (props) => {
76
79
  const closeTimeout = useRef(void 0);
77
80
  const isHoveringRef = useRef(false);
78
81
  const hasBeenOpened = useRef(false);
79
- if (isOpen) hasBeenOpened.current = true;
80
82
  const { forceUpdate, referenceRef, transformOrigin, getPopperProps } = usePopper({
81
83
  ...rest,
82
84
  enabled: isOpen
83
85
  });
86
+ if (isOpen) hasBeenOpened.current = true;
84
87
  useEffect(() => {
85
88
  return () => {
86
89
  if (openTimeout.current) clearTimeout(openTimeout.current);
@@ -110,6 +113,11 @@ var Popover = (props) => {
110
113
  const getPopoverProps = useCallback(
111
114
  (props2 = {}, ref = null) => {
112
115
  const popoverProps = {
116
+ id,
117
+ "aria-describedby": describedbyId,
118
+ "aria-hidden": !isOpen,
119
+ "aria-labelledby": labelledbyId,
120
+ role: "dialog",
113
121
  ...props2,
114
122
  ref: mergeRefs(popoverRef, ref),
115
123
  style: {
@@ -151,7 +159,10 @@ var Popover = (props) => {
151
159
  shouldRenderChildren,
152
160
  transformOrigin,
153
161
  trigger,
154
- relatedRef
162
+ relatedRef,
163
+ id,
164
+ labelledbyId,
165
+ describedbyId
155
166
  ]
156
167
  );
157
168
  const maybeReferenceRef = useCallback(
@@ -163,6 +174,9 @@ var Popover = (props) => {
163
174
  const getTriggerProps = useCallback(
164
175
  (props2 = {}, ref = null) => {
165
176
  const triggerProps = {
177
+ "aria-controls": isOpen ? id : void 0,
178
+ "aria-expanded": isOpen,
179
+ role: "button",
166
180
  ...props2,
167
181
  ref: mergeRefs(triggerRef, ref, maybeReferenceRef)
168
182
  };
@@ -223,7 +237,8 @@ var Popover = (props) => {
223
237
  onOpen,
224
238
  onToggle,
225
239
  openDelay,
226
- trigger
240
+ trigger,
241
+ id
227
242
  ]
228
243
  );
229
244
  const getAnchorProps = useCallback(
@@ -239,11 +254,14 @@ var Popover = (props) => {
239
254
  PopoverProvider,
240
255
  {
241
256
  value: {
257
+ id,
242
258
  animation,
243
259
  closeOnButton,
260
+ describedbyId,
244
261
  duration,
245
262
  forceUpdate,
246
263
  isOpen,
264
+ labelledbyId,
247
265
  styles,
248
266
  getAnchorProps,
249
267
  getPopoverProps,
@@ -268,4 +286,4 @@ export {
268
286
  usePopover,
269
287
  Popover
270
288
  };
271
- //# sourceMappingURL=chunk-KBEWDJLR.mjs.map
289
+ //# sourceMappingURL=chunk-JTIVIKPS.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/popover.tsx"],"sourcesContent":["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, useId, 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 id: string\n describedbyId: string\n forceUpdate: () => undefined | void\n labelledbyId: string\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 const id = useId()\n const labelledbyId = useId()\n const describedbyId = useId()\n const { isOpen, onClose, onOpen, onToggle } = useDisclosure(mergedProps)\n const anchorRef = useRef<HTMLElement>(null)\n const triggerRef = useRef<HTMLElement>(null)\n const popoverRef = useRef<HTMLElement>(null)\n const { present, onAnimationComplete } = useAnimationObserver({\n ref: popoverRef,\n isOpen,\n })\n const openTimeout = useRef<number | undefined>(undefined)\n const closeTimeout = useRef<number | undefined>(undefined)\n const isHoveringRef = useRef(false)\n const hasBeenOpened = useRef(false)\n const { forceUpdate, referenceRef, transformOrigin, getPopperProps } =\n usePopper({\n ...rest,\n enabled: isOpen,\n })\n\n if (isOpen) hasBeenOpened.current = true\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 id,\n \"aria-describedby\": describedbyId,\n \"aria-hidden\": !isOpen,\n \"aria-labelledby\": labelledbyId,\n role: \"dialog\",\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 id,\n labelledbyId,\n describedbyId,\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 \"aria-controls\": isOpen ? id : undefined,\n \"aria-expanded\": isOpen,\n role: \"button\",\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 id,\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 id,\n animation,\n closeOnButton,\n describedbyId,\n duration,\n forceUpdate,\n isOpen,\n labelledbyId,\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"],"mappings":";;;AAgBA,SAAS,gBAAgB,8BAA8B;AACvD,SAAS,4BAA4B;AACrC,SAAS,eAAe,yBAAyB;AACjD;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP,SAAS,kBAAkB,iBAAiB;AAC5C;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP,SAAS,aAAa,WAAW,OAAO,cAAc;AAualD;AAnaG,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;AA4IA,IAAM,CAAC,iBAAiB,UAAU,IAAI,cAA8B;AAAA,EAClE,MAAM;AAAA,EACN,cAAc;AAChB,CAAC;AASM,IAAM,UAA4B,CAAC,UAAU;AAClD,QAAM,CAAC,QAAQ,WAAW,IAAI,uBAAuB,WAAW,KAAK;AACrE,QAAM;AAAA,IACJ,YAAY;AAAA,IACZ,YAAY;AAAA,IACZ;AAAA,IACA,a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A;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,MACF;AAAA,MAEC,oBAAU,UAAU;AAAA,QACnB;AAAA,QACA;AAAA,QACA;AAAA,MACF,CAAC;AAAA;AAAA,EACH;AAEJ;AAEA,QAAQ,cAAc;AACtB,QAAQ,SAAS;","names":["props"]}
@@ -1,7 +1,7 @@
1
1
  "use client"
2
2
  import {
3
3
  usePopover
4
- } from "./chunk-KBEWDJLR.mjs";
4
+ } from "./chunk-JTIVIKPS.mjs";
5
5
 
6
6
  // src/popover-header.tsx
7
7
  import { forwardRef, ui } from "@yamada-ui/core";
@@ -9,7 +9,7 @@ import { cx } from "@yamada-ui/utils";
9
9
  import { jsx } from "react/jsx-runtime";
10
10
  var PopoverHeader = forwardRef(
11
11
  ({ className, ...rest }, ref) => {
12
- const { styles } = usePopover();
12
+ const { labelledbyId, styles } = usePopover();
13
13
  const css = {
14
14
  alignItems: "center",
15
15
  display: "flex",
@@ -19,6 +19,7 @@ var PopoverHeader = forwardRef(
19
19
  return /* @__PURE__ */ jsx(
20
20
  ui.header,
21
21
  {
22
+ id: labelledbyId,
22
23
  ref,
23
24
  className: cx("ui-popover__header", className),
24
25
  __css: css,
@@ -33,4 +34,4 @@ PopoverHeader.__ui__ = "PopoverHeader";
33
34
  export {
34
35
  PopoverHeader
35
36
  };
36
- //# sourceMappingURL=chunk-S3KWEQPS.mjs.map
37
+ //# sourceMappingURL=chunk-QVEEOMV4.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/popover-header.tsx"],"sourcesContent":["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 { labelledbyId, 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 id={labelledbyId}\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"],"mappings":";;;;;;AACA,SAAS,YAAY,UAAU;AAC/B,SAAS,UAAU;AAiBb;AAZC,IAAM,gBAAgB;AAAA,EAC3B,CAAC,EAAE,WAAW,GAAG,KAAK,GAAG,QAAQ;AAC/B,UAAM,EAAE,cAAc,OAAO,IAAI,WAAW;AAE5C,UAAM,MAAmB;AAAA,MACvB,YAAY;AAAA,MACZ,SAAS;AAAA,MACT,gBAAgB;AAAA,MAChB,GAAG,OAAO;AAAA,IACZ;AAEA,WACE;AAAA,MAAC,GAAG;AAAA,MAAH;AAAA,QACC,IAAI;AAAA,QACJ;AAAA,QACA,WAAW,GAAG,sBAAsB,SAAS;AAAA,QAC7C,OAAO;AAAA,QACN,GAAG;AAAA;AAAA,IACN;AAAA,EAEJ;AACF;AAEA,cAAc,cAAc;AAC5B,cAAc,SAAS;","names":[]}
@@ -1,10 +1,10 @@
1
1
  "use client"
2
2
  import {
3
3
  PopoverCloseButton
4
- } from "./chunk-J22VBFAF.mjs";
4
+ } from "./chunk-Y5OMCSRM.mjs";
5
5
  import {
6
6
  usePopover
7
- } from "./chunk-KBEWDJLR.mjs";
7
+ } from "./chunk-JTIVIKPS.mjs";
8
8
 
9
9
  // src/popover-content.tsx
10
10
  import { ui } from "@yamada-ui/core";
@@ -142,4 +142,4 @@ PopoverContent.__ui__ = "PopoverContent";
142
142
  export {
143
143
  PopoverContent
144
144
  };
145
- //# sourceMappingURL=chunk-7UFHYE2W.mjs.map
145
+ //# sourceMappingURL=chunk-RPAOBMYJ.mjs.map
@@ -1,7 +1,7 @@
1
1
  "use client"
2
2
  import {
3
3
  usePopover
4
- } from "./chunk-KBEWDJLR.mjs";
4
+ } from "./chunk-JTIVIKPS.mjs";
5
5
 
6
6
  // src/popover-footer.tsx
7
7
  import { forwardRef, ui } from "@yamada-ui/core";
@@ -33,4 +33,4 @@ PopoverFooter.__ui__ = "PopoverFooter";
33
33
  export {
34
34
  PopoverFooter
35
35
  };
36
- //# sourceMappingURL=chunk-YSYN7XPR.mjs.map
36
+ //# sourceMappingURL=chunk-TKYA7E3C.mjs.map
@@ -1,7 +1,7 @@
1
1
  "use client"
2
2
  import {
3
3
  usePopover
4
- } from "./chunk-KBEWDJLR.mjs";
4
+ } from "./chunk-JTIVIKPS.mjs";
5
5
 
6
6
  // src/popover-body.tsx
7
7
  import { forwardRef, ui } from "@yamada-ui/core";
@@ -9,7 +9,7 @@ import { cx } from "@yamada-ui/utils";
9
9
  import { jsx } from "react/jsx-runtime";
10
10
  var PopoverBody = forwardRef(
11
11
  ({ className, ...rest }, ref) => {
12
- const { styles } = usePopover();
12
+ const { describedbyId, styles } = usePopover();
13
13
  const css = {
14
14
  alignItems: "flex-start",
15
15
  display: "flex",
@@ -19,6 +19,7 @@ var PopoverBody = forwardRef(
19
19
  return /* @__PURE__ */ jsx(
20
20
  ui.div,
21
21
  {
22
+ id: describedbyId,
22
23
  ref,
23
24
  className: cx("ui-popover__body", className),
24
25
  __css: css,
@@ -33,4 +34,4 @@ PopoverBody.__ui__ = "PopoverBody";
33
34
  export {
34
35
  PopoverBody
35
36
  };
36
- //# sourceMappingURL=chunk-QQSUS4YW.mjs.map
37
+ //# sourceMappingURL=chunk-VVVFWCB4.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/popover-body.tsx"],"sourcesContent":["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 { describedbyId, 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 id={describedbyId}\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"],"mappings":";;;;;;AACA,SAAS,YAAY,UAAU;AAC/B,SAAS,UAAU;AAiBb;AAZC,IAAM,cAAc;AAAA,EACzB,CAAC,EAAE,WAAW,GAAG,KAAK,GAAG,QAAQ;AAC/B,UAAM,EAAE,eAAe,OAAO,IAAI,WAAW;AAE7C,UAAM,MAAmB;AAAA,MACvB,YAAY;AAAA,MACZ,SAAS;AAAA,MACT,eAAe;AAAA,MACf,GAAG,OAAO;AAAA,IACZ;AAEA,WACE;AAAA,MAAC,GAAG;AAAA,MAAH;AAAA,QACC,IAAI;AAAA,QACJ;AAAA,QACA,WAAW,GAAG,oBAAoB,SAAS;AAAA,QAC3C,OAAO;AAAA,QACN,GAAG;AAAA;AAAA,IACN;AAAA,EAEJ;AACF;AAEA,YAAY,cAAc;AAC1B,YAAY,SAAS;","names":[]}
@@ -1,7 +1,7 @@
1
1
  "use client"
2
2
  import {
3
3
  usePopover
4
- } from "./chunk-KBEWDJLR.mjs";
4
+ } from "./chunk-JTIVIKPS.mjs";
5
5
 
6
6
  // src/popover-close-button.tsx
7
7
  import { CloseButton } from "@yamada-ui/close-button";
@@ -10,7 +10,7 @@ import { cx, handlerAll } from "@yamada-ui/utils";
10
10
  import { jsx } from "react/jsx-runtime";
11
11
  var PopoverCloseButton = forwardRef(
12
12
  ({ onClick, ...rest }, ref) => {
13
- const { styles, onClose } = usePopover();
13
+ const { id, styles, onClose } = usePopover();
14
14
  const css = {
15
15
  position: "absolute",
16
16
  ...styles.closeButton
@@ -21,6 +21,8 @@ var PopoverCloseButton = forwardRef(
21
21
  ref,
22
22
  className: cx("ui-popover__close-button"),
23
23
  size: "sm",
24
+ "aria-controls": id,
25
+ "aria-label": "Close popover",
24
26
  onClick: handlerAll(onClick, (ev) => {
25
27
  ev.stopPropagation();
26
28
  onClose == null ? void 0 : onClose();
@@ -37,4 +39,4 @@ PopoverCloseButton.__ui__ = "PopoverCloseButton";
37
39
  export {
38
40
  PopoverCloseButton
39
41
  };
40
- //# sourceMappingURL=chunk-J22VBFAF.mjs.map
42
+ //# sourceMappingURL=chunk-Y5OMCSRM.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/popover-close-button.tsx"],"sourcesContent":["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 { id, 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 aria-controls={id}\n aria-label=\"Close popover\"\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"],"mappings":";;;;;;AAEA,SAAS,mBAAmB;AAC5B,SAAS,kBAAkB;AAC3B,SAAS,IAAI,kBAAkB;AAezB;AAVC,IAAM,qBAAqB;AAAA,EAChC,CAAC,EAAE,SAAS,GAAG,KAAK,GAAG,QAAQ;AAC7B,UAAM,EAAE,IAAI,QAAQ,QAAQ,IAAI,WAAW;AAE3C,UAAM,MAAmB;AAAA,MACvB,UAAU;AAAA,MACV,GAAG,OAAO;AAAA,IACZ;AAEA,WACE;AAAA,MAAC;AAAA;AAAA,QACC;AAAA,QACA,WAAW,GAAG,0BAA0B;AAAA,QACxC,MAAK;AAAA,QACL,iBAAe;AAAA,QACf,cAAW;AAAA,QACX,SAAS,WAAW,SAAS,CAAC,OAAO;AACnC,aAAG,gBAAgB;AACnB;AAAA,QACF,CAAC;AAAA,QACD,OAAO;AAAA,QACN,GAAG;AAAA;AAAA,IACN;AAAA,EAEJ;AACF;AAEA,mBAAmB,cAAc;AACjC,mBAAmB,SAAS;","names":[]}
package/dist/index.js CHANGED
@@ -86,6 +86,9 @@ var Popover = (props) => {
86
86
  trigger = "click",
87
87
  ...rest
88
88
  } = (0, import_core.omitThemeProps)(mergedProps);
89
+ const id = (0, import_react.useId)();
90
+ const labelledbyId = (0, import_react.useId)();
91
+ const describedbyId = (0, import_react.useId)();
89
92
  const { isOpen, onClose, onOpen, onToggle } = (0, import_use_disclosure.useDisclosure)(mergedProps);
90
93
  const anchorRef = (0, import_react.useRef)(null);
91
94
  const triggerRef = (0, import_react.useRef)(null);
@@ -98,11 +101,11 @@ var Popover = (props) => {
98
101
  const closeTimeout = (0, import_react.useRef)(void 0);
99
102
  const isHoveringRef = (0, import_react.useRef)(false);
100
103
  const hasBeenOpened = (0, import_react.useRef)(false);
101
- if (isOpen) hasBeenOpened.current = true;
102
104
  const { forceUpdate, referenceRef, transformOrigin, getPopperProps } = (0, import_use_popper.usePopper)({
103
105
  ...rest,
104
106
  enabled: isOpen
105
107
  });
108
+ if (isOpen) hasBeenOpened.current = true;
106
109
  (0, import_react.useEffect)(() => {
107
110
  return () => {
108
111
  if (openTimeout.current) clearTimeout(openTimeout.current);
@@ -132,6 +135,11 @@ var Popover = (props) => {
132
135
  const getPopoverProps = (0, import_react.useCallback)(
133
136
  (props2 = {}, ref = null) => {
134
137
  const popoverProps = {
138
+ id,
139
+ "aria-describedby": describedbyId,
140
+ "aria-hidden": !isOpen,
141
+ "aria-labelledby": labelledbyId,
142
+ role: "dialog",
135
143
  ...props2,
136
144
  ref: (0, import_utils.mergeRefs)(popoverRef, ref),
137
145
  style: {
@@ -173,7 +181,10 @@ var Popover = (props) => {
173
181
  shouldRenderChildren,
174
182
  transformOrigin,
175
183
  trigger,
176
- relatedRef
184
+ relatedRef,
185
+ id,
186
+ labelledbyId,
187
+ describedbyId
177
188
  ]
178
189
  );
179
190
  const maybeReferenceRef = (0, import_react.useCallback)(
@@ -185,6 +196,9 @@ var Popover = (props) => {
185
196
  const getTriggerProps = (0, import_react.useCallback)(
186
197
  (props2 = {}, ref = null) => {
187
198
  const triggerProps = {
199
+ "aria-controls": isOpen ? id : void 0,
200
+ "aria-expanded": isOpen,
201
+ role: "button",
188
202
  ...props2,
189
203
  ref: (0, import_utils.mergeRefs)(triggerRef, ref, maybeReferenceRef)
190
204
  };
@@ -245,7 +259,8 @@ var Popover = (props) => {
245
259
  onOpen,
246
260
  onToggle,
247
261
  openDelay,
248
- trigger
262
+ trigger,
263
+ id
249
264
  ]
250
265
  );
251
266
  const getAnchorProps = (0, import_react.useCallback)(
@@ -261,11 +276,14 @@ var Popover = (props) => {
261
276
  PopoverProvider,
262
277
  {
263
278
  value: {
279
+ id,
264
280
  animation,
265
281
  closeOnButton,
282
+ describedbyId,
266
283
  duration,
267
284
  forceUpdate,
268
285
  isOpen,
286
+ labelledbyId,
269
287
  styles,
270
288
  getAnchorProps,
271
289
  getPopoverProps,
@@ -301,7 +319,7 @@ var import_utils2 = require("@yamada-ui/utils");
301
319
  var import_jsx_runtime2 = require("react/jsx-runtime");
302
320
  var PopoverBody = (0, import_core2.forwardRef)(
303
321
  ({ className, ...rest }, ref) => {
304
- const { styles } = usePopover();
322
+ const { describedbyId, styles } = usePopover();
305
323
  const css = {
306
324
  alignItems: "flex-start",
307
325
  display: "flex",
@@ -311,6 +329,7 @@ var PopoverBody = (0, import_core2.forwardRef)(
311
329
  return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
312
330
  import_core2.ui.div,
313
331
  {
332
+ id: describedbyId,
314
333
  ref,
315
334
  className: (0, import_utils2.cx)("ui-popover__body", className),
316
335
  __css: css,
@@ -329,7 +348,7 @@ var import_utils3 = require("@yamada-ui/utils");
329
348
  var import_jsx_runtime3 = require("react/jsx-runtime");
330
349
  var PopoverCloseButton = (0, import_core3.forwardRef)(
331
350
  ({ onClick, ...rest }, ref) => {
332
- const { styles, onClose } = usePopover();
351
+ const { id, styles, onClose } = usePopover();
333
352
  const css = {
334
353
  position: "absolute",
335
354
  ...styles.closeButton
@@ -340,6 +359,8 @@ var PopoverCloseButton = (0, import_core3.forwardRef)(
340
359
  ref,
341
360
  className: (0, import_utils3.cx)("ui-popover__close-button"),
342
361
  size: "sm",
362
+ "aria-controls": id,
363
+ "aria-label": "Close popover",
343
364
  onClick: (0, import_utils3.handlerAll)(onClick, (ev) => {
344
365
  ev.stopPropagation();
345
366
  onClose == null ? void 0 : onClose();
@@ -519,7 +540,7 @@ var import_utils6 = require("@yamada-ui/utils");
519
540
  var import_jsx_runtime6 = require("react/jsx-runtime");
520
541
  var PopoverHeader = (0, import_core6.forwardRef)(
521
542
  ({ className, ...rest }, ref) => {
522
- const { styles } = usePopover();
543
+ const { labelledbyId, styles } = usePopover();
523
544
  const css = {
524
545
  alignItems: "center",
525
546
  display: "flex",
@@ -529,6 +550,7 @@ var PopoverHeader = (0, import_core6.forwardRef)(
529
550
  return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
530
551
  import_core6.ui.header,
531
552
  {
553
+ id: labelledbyId,
532
554
  ref,
533
555
  className: (0, import_utils6.cx)("ui-popover__header", className),
534
556
  __css: css,
package/dist/index.js.map CHANGED
@@ -1 +1 @@
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__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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;;;AC7BvB,IAAAC,eAA+B;AAC/B,IAAAC,gBAAmB;AAiBb,IAAAC,sBAAA;AAZC,IAAM,oBAAgB;AAAA,EAC3B,CAAC,EAAE,WAAW,GAAG,KAAK,GAAG,QAAQ;AAC/B,UAAM,EAAE,OAAO,IAAI,WAAW;AAE9B,UAAM,MAAmB;AAAA,MACvB,YAAY;AAAA,MACZ,SAAS;AAAA,MACT,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;;;AC5BvB,IAAAC,gBAAuC;AAGhC,IAAM,iBAA4C,CAAC,EAAE,SAAS,MAAM;AACzE,QAAM,QAAQ,uBAAS,KAAK,QAAQ;AAGpC,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"]}
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, useId, 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 id: string\n describedbyId: string\n forceUpdate: () => undefined | void\n labelledbyId: string\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 const id = useId()\n const labelledbyId = useId()\n const describedbyId = useId()\n const { isOpen, onClose, onOpen, onToggle } = useDisclosure(mergedProps)\n const anchorRef = useRef<HTMLElement>(null)\n const triggerRef = useRef<HTMLElement>(null)\n const popoverRef = useRef<HTMLElement>(null)\n const { present, onAnimationComplete } = useAnimationObserver({\n ref: popoverRef,\n isOpen,\n })\n const openTimeout = useRef<number | undefined>(undefined)\n const closeTimeout = useRef<number | undefined>(undefined)\n const isHoveringRef = useRef(false)\n const hasBeenOpened = useRef(false)\n const { forceUpdate, referenceRef, transformOrigin, getPopperProps } =\n usePopper({\n ...rest,\n enabled: isOpen,\n })\n\n if (isOpen) hasBeenOpened.current = true\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 id,\n \"aria-describedby\": describedbyId,\n \"aria-hidden\": !isOpen,\n \"aria-labelledby\": labelledbyId,\n role: \"dialog\",\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 id,\n labelledbyId,\n describedbyId,\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 \"aria-controls\": isOpen ? id : undefined,\n \"aria-expanded\": isOpen,\n role: \"button\",\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 id,\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 id,\n animation,\n closeOnButton,\n describedbyId,\n duration,\n forceUpdate,\n isOpen,\n labelledbyId,\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 { describedbyId, 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 id={describedbyId}\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 { id, 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 aria-controls={id}\n aria-label=\"Close popover\"\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 { labelledbyId, 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 id={labelledbyId}\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,mBAAsD;AAualD;AAnaG,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;AA4IA,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;AAAA,IACA,eAAe;AAAA,IACf,YAAY;AAAA,IACZ;AAAA,IACA,eAAe;AAAA,IACf,UAAU;AAAA,IACV,GAAG;AAAA,EACL,QAAI,4BAAe,WAAW;AAC9B,QAAM,SAAK,oBAAM;AACjB,QAAM,mBAAe,oBAAM;AAC3B,QAAM,oBAAgB,oBAAM;AAC5B,QAAM,EAA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AAAA,IACN;AAAA,EAEJ;AACF;AAEA,cAAc,cAAc;AAC5B,cAAc,SAAS;;;AC7BvB,IAAAC,gBAAuC;AAGhC,IAAM,iBAA4C,CAAC,EAAE,SAAS,MAAM;AACzE,QAAM,QAAQ,uBAAS,KAAK,QAAQ;AAGpC,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"]}