{"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';\nimport Header from '../Header';\n\ntype SectionProps = PropsWithChildren<\n  CommonProps & {\n    as?: 'div' | 'fieldset' | 'section';\n    withHorizontalPadding?: boolean;\n  }\n> &\n  Pick<HTMLAttributes<HTMLDivElement>, 'id' | 'role' | 'aria-labelledby'>;\n\n/**\n *\n * Neptune Web: https://storybook.wise.design/?path=/docs/content-section--docs\n *\n * Use `Section.Header` for the section's title and optional action.\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\n// eslint-disable-next-line functional/immutable-data\nconst SectionNamespace = Object.assign(Section, { Header });\n\nexport default SectionNamespace;\n"],"names":["Section","as","Element","children","className","withHorizontalPadding","role","undefined","restProps","_jsx","clsx","SectionNamespace","Object","assign","Header"],"mappings":";;;;AAoBA,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,CAAC;AAED;AACA,MAAMQ,gBAAgB,GAAGC,MAAM,CAACC,MAAM,CAACb,OAAO,EAAE;AAAEc,EAAAA;AAAM,CAAE;;"}