{"version":3,"file":"CardSection.cjs","sources":["../../../../src/components/Card/CardSection/CardSection.tsx"],"sourcesContent":["import {\n  Box,\n  BoxProps,\n  CompoundStylesApiProps,\n  polymorphicFactory,\n  PolymorphicFactory,\n  useProps,\n} from '../../../core';\nimport { useCardContext } from '../Card.context';\n\nexport type CardSectionStylesNames = 'section';\n\nexport interface CardSectionProps extends BoxProps, CompoundStylesApiProps<CardSectionFactory> {\n  /** Determines whether the section should have a border, `false` by default */\n  withBorder?: boolean;\n\n  /** Determines whether the section should inherit padding from the parent `Card`, `false` by default */\n  inheritPadding?: boolean;\n}\n\nexport type CardSectionFactory = PolymorphicFactory<{\n  props: CardSectionProps;\n  defaultRef: HTMLDivElement;\n  defaultComponent: 'div';\n  stylesNames: CardSectionStylesNames;\n  compound: true;\n}>;\n\nconst defaultProps: Partial<CardSectionProps> = {};\n\nexport const CardSection = polymorphicFactory<CardSectionFactory>((_props, ref) => {\n  const props = useProps('CardSection', defaultProps, _props);\n  const { classNames, className, style, styles, vars, withBorder, inheritPadding, mod, ...others } =\n    props;\n  const ctx = useCardContext();\n\n  return (\n    <Box\n      ref={ref}\n      mod={[{ 'with-border': withBorder, 'inherit-padding': inheritPadding }, mod]}\n      {...ctx.getStyles('section', { className, style, styles, classNames })}\n      {...others}\n    />\n  );\n});\n\nCardSection.displayName = '@raikou/core/CardSection';\n"],"names":["polymorphicFactory","useProps","useCardContext","jsx","Box"],"mappings":";;;;;;;;;;;;;AA4BA,MAAM,eAA0C,EAAC;AAE1C,MAAM,WAAc,GAAAA,qCAAA,CAAuC,CAAC,MAAA,EAAQ,GAAQ,KAAA;AACjF,EAAA,MAAM,KAAQ,GAAAC,iBAAA,CAAS,aAAe,EAAA,YAAA,EAAc,MAAM,CAAA;AAC1D,EAAM,MAAA,EAAE,UAAY,EAAA,SAAA,EAAW,KAAO,EAAA,MAAA,EAAQ,IAAM,EAAA,UAAA,EAAY,cAAgB,EAAA,GAAA,EAAK,GAAG,MAAA,EACtF,GAAA,KAAA;AACF,EAAA,MAAM,MAAMC,2BAAe,EAAA;AAE3B,EACE,uBAAAC,cAAA;AAAA,IAACC,OAAA;AAAA,IAAA;AAAA,MACC,GAAA;AAAA,MACA,GAAA,EAAK,CAAC,EAAE,aAAA,EAAe,YAAY,iBAAmB,EAAA,cAAA,IAAkB,GAAG,CAAA;AAAA,MAC1E,GAAG,IAAI,SAAU,CAAA,SAAA,EAAW,EAAE,SAAW,EAAA,KAAA,EAAO,MAAQ,EAAA,UAAA,EAAY,CAAA;AAAA,MACpE,GAAG;AAAA;AAAA,GACN;AAEJ,CAAC;AAED,WAAA,CAAY,WAAc,GAAA,0BAAA;;;;"}