{"version":3,"file":"Container.mjs","sources":["../../src/Container/Container.tsx"],"sourcesContent":["import { clsx } from 'clsx';\nimport type { ComponentPropsWithRef, ElementType, PropsWithChildren } from 'react';\n\nimport { CommonProps } from '../common';\n\ntype ContainerOwnProps<T extends ElementType> = CommonProps & {\n  /** Controls the maximum width: `fluid` (100%), `standard` (1160px), `narrow` (840px), `compact` (600px). @default 'standard' */\n  size?: 'fluid' | 'standard' | 'narrow' | 'compact';\n  as?: T;\n};\n\nexport type ContainerProps<T extends ElementType = 'div'> = PropsWithChildren<\n  ContainerOwnProps<T>\n> &\n  Omit<ComponentPropsWithRef<T>, keyof ContainerOwnProps<T> | 'children'>;\n\n/**\n * Centers page content within a responsive max-width boundary, with automatic horizontal padding that adapts to the viewport size.\n *\n * **Design guidance**: <a href=\"https://docs.wise.design/foundations/grid\" target=\"_blank\">wise.design/foundations/grid</a>\n */\nconst Container = <T extends ElementType = 'div'>({\n  size = 'standard',\n  as,\n  className,\n  children,\n  ...otherProps\n}: ContainerProps<T>) => {\n  const Element = as ?? 'div';\n  return (\n    <Element {...otherProps} className={clsx('wds-container', `wds-container--${size}`, className)}>\n      {children}\n    </Element>\n  );\n};\n\nexport default Container;\n"],"names":["Container","size","as","className","children","otherProps","Element","_jsx","clsx"],"mappings":";;;AAqBA,MAAMA,SAAS,GAAGA,CAAgC;AAChDC,EAAAA,IAAI,GAAG,UAAU;EACjBC,EAAE;EACFC,SAAS;EACTC,QAAQ;EACR,GAAGC;AAAU,CACK,KAAI;AACtB,EAAA,MAAMC,OAAO,GAAGJ,EAAE,IAAI,KAAK;EAC3B,oBACEK,GAAA,CAACD,OAAO,EAAA;AAAA,IAAA,GAAKD,UAAU;IAAEF,SAAS,EAAEK,IAAI,CAAC,eAAe,EAAE,kBAAkBP,IAAI,CAAA,CAAE,EAAEE,SAAS,CAAE;AAAAC,IAAAA,QAAA,EAC5FA;AAAQ,GACF,CAAC;AAEd;;"}