{"version":3,"file":"Section.mjs","sources":["../../src/section/Section.tsx"],"sourcesContent":["import { clsx } from 'clsx';\nimport { HTMLAttributes, PropsWithChildren } from 'react';\n\nimport { CommonProps } from '../common';\n\ntype SectionProps = PropsWithChildren<\n  CommonProps & {\n    as?: 'div' | 'fieldset' | 'section';\n    withHorizontalPadding?: boolean;\n  }\n> &\n  Pick<HTMLAttributes<HTMLDivElement>, 'role' | 'aria-labelledby'>;\n\n/**\n *\n * Neptune Web: https://transferwise.github.io/neptune-web/components/content/Section\n *\n */\nconst Section = ({\n  as: Element = 'div',\n  children,\n  className,\n  withHorizontalPadding = false,\n  role = undefined,\n  ...restProps\n}: SectionProps) => {\n  return (\n    <Element\n      className={clsx('np-section', className, {\n        'np-section--with-horizontal-padding': withHorizontalPadding,\n      })}\n      role={role}\n      {...restProps}\n    >\n      {children}\n    </Element>\n  );\n};\n\nexport default Section;\n"],"names":["Section","as","Element","children","className","withHorizontalPadding","role","undefined","restProps","_jsx","clsx"],"mappings":";;;AAkBA,MAAMA,OAAO,GAAGA,CAAC;EACfC,EAAE,EAAEC,OAAO,GAAG,KAAK;EACnBC,QAAQ;EACRC,SAAS;AACTC,EAAAA,qBAAqB,GAAG,KAAK;AAC7BC,EAAAA,IAAI,GAAGC,SAAS;EAChB,GAAGC;AAAS,CACC,KAAI;EACjB,oBACEC,GAAA,CAACP,OAAO,EAAA;AACNE,IAAAA,SAAS,EAAEM,IAAI,CAAC,YAAY,EAAEN,SAAS,EAAE;AACvC,MAAA,qCAAqC,EAAEC;KACxC,CAAE;AACHC,IAAAA,IAAI,EAAEA,IAAK;AAAA,IAAA,GACPE,SAAS;AAAAL,IAAAA,QAAA,EAEZA;AAAQ,GACF,CAAC;AAEd;;;;"}