{"version":3,"file":"Glass.cjs","names":[],"sources":["../../../src/components/Glass/Glass.tsx"],"sourcesContent":["/*\nCopyright 2023 New Vector Ltd.\n\nSPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial\nPlease see LICENSE files in the repository root for full details.\n*/\n\nimport React, {\n  type ComponentPropsWithoutRef,\n  type ReactNode,\n  forwardRef,\n  Children,\n} from \"react\";\nimport classNames from \"classnames\";\n\nimport styles from \"./Glass.module.css\";\n\ninterface Props extends ComponentPropsWithoutRef<\"div\"> {\n  /**\n   * The child component.\n   */\n  children: ReactNode;\n  /**\n   * The CSS class.\n   */\n  className?: string;\n}\n\n/**\n * Adds a border of glass around a child component.\n */\nexport const Glass = forwardRef<HTMLDivElement, Props>(\n  ({ children, className, ...rest }, ref) => (\n    <div ref={ref} className={classNames(className, styles.glass)} {...rest}>\n      {Children.only(children)}\n    </div>\n  ),\n);\n\nGlass.displayName = \"Glass\";\n"],"mappings":";;;;;;;;;;;AA+BA,IAAa,SAAA,GAAA,MAAA,aACV,EAAE,UAAU,WAAW,GAAG,QAAQ,QACjC,iBAAA,GAAA,kBAAA,KAAC,OAAD;CAAU;CAAK,YAAA,GAAA,WAAA,SAAsB,WAAW,qBAAA,QAAO,MAAM;CAAE,GAAI;WAChE,MAAA,SAAS,KAAK,SAAS;CACpB,CAAA,CAET;AAED,MAAM,cAAc"}