{"version":3,"file":"PopoverContainer.mjs","sources":["../../../src/components/PopoverContainer/PopoverContainer.tsx"],"sourcesContent":["import clsx from 'clsx';\nimport React from 'react';\nimport type { ReactNode } from 'react';\n\nimport styles from './PopoverContainer.module.css';\n\nexport type PopoverContainerProps = {\n  /**\n   * CSS class names that can be appended to the component.\n   */\n  className?: string;\n  /**\n   * Child node(s) that can be nested inside component.\n   */\n  children: ReactNode;\n  /**\n   * CSS properties defined for the HTML element. Includes the component's CSS Custom Properties:\n   *\n   * - `--popover-container__bg`\n   */\n  style?: PopoverContainerCSSProperties;\n};\n\nexport interface PopoverContainerCSSProperties extends React.CSSProperties {\n  /**\n   * Custom property to customize the background color of this component (e.g., background color)\n   */\n  '--popover-container__bg'?: string;\n}\n\n/**\n * ## Usage\n *\n * Show a standardized wrapper for content shown by popover components, like `Popover`, `Menu`, and\n * `Select`. Define the container's appearance separate from the items within.\n *\n * | Type/Use | Description | Example |\n * |----------|-------------|---------|\n * | Render target | Passed as `as` to a HeadlessUI panel, so the panel itself renders as the container. | `Menu.Items`, `Select` options, `Combobox` options, `AppHeader` navigation. |\n * | Direct wrapper | Rendered directly around the content of another component's panel. | `Popover.Content`. |\n *\n * Adjacent children with `role=\"group\"` are separated by a divider automatically, so grouped menu\n * content does not need its own separators.\n *\n * ## Interaction\n *\n * On render, this will use a subtle animation to highlight and draw the user's attention. The\n * animation is skipped for anyone who has asked for reduced motion.\n *\n * The container suppresses its own focus outline. Focus treatment belongs to the items inside it,\n * such as `PopoverListItem`.\n *\n * ## Content & Accessibility\n *\n * ### Do's\n *\n * * Use `PopoverContainer` when creating any component that contains brief content similar in size to a Menu popover, or Select field popover. This could be ancillary content on a page where the trigger (e.g., a button) makes it clear what will be revealed.\n *\n * ### Don'ts\n *\n * * Avoid using `PopoverContainer` for large amounts of content. Consider `Modal` instead.\n * * Avoid using `PopoverContainer` for on-page experiences that do not have a trigger to reveal the content. Consider `Card` (with `elevation`) instead.\n *\n * ## Resources\n *\n * * https://headlessui.com/react/popover#popover\n */\nexport const PopoverContainer = React.forwardRef<\n  HTMLDivElement,\n  PopoverContainerProps\n>(({ className, children, ...other }, ref) => {\n  const componentClassName = clsx(styles['popover-container'], className);\n\n  return (\n    <div className={componentClassName} {...other} ref={ref}>\n      {children}\n    </div>\n  );\n});\n\nPopoverContainer.displayName = 'PopoverContainer';\n"],"names":["React"],"mappings":";;;;AA8BA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAoCG;MACU,gBAAgB,GAAGA,cAAK,CAAC,UAAU,CAG9C,CAAC,EAAE,SAAS,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,KAAI;IAC3C,MAAM,kBAAkB,GAAG,IAAI,CAAC,MAAM,CAAC,mBAAmB,CAAC,EAAE,SAAS,CAAC;AAEvE,IAAA,QACEA,cAAA,CAAA,aAAA,CAAA,KAAA,EAAA,EAAK,SAAS,EAAE,kBAAkB,EAAA,GAAM,KAAK,EAAE,GAAG,EAAE,GAAG,EAAA,EACpD,QAAQ,CACL;AAEV,CAAC;AAED,gBAAgB,CAAC,WAAW,GAAG,kBAAkB;;"}