{"version":3,"file":"Center.cjs","sources":["../../../src/components/Center/Center.tsx"],"sourcesContent":["import {\n  Box,\n  BoxProps,\n  polymorphicFactory,\n  PolymorphicFactory,\n  StylesApiProps,\n  useProps,\n  useStyles,\n} from '../../core';\nimport { CenterRootStyle } from './Center.css';\n\nexport type CenterStylesNames = 'root';\n\nexport interface CenterProps extends BoxProps, StylesApiProps<CenterFactory> {\n  /** Content that should be centered vertically and horizontally */\n  children?: React.ReactNode;\n\n  /** Determines whether `inline-flex` should be used instead of `flex`, `false` by default */\n  inline?: boolean;\n}\n\nexport type CenterFactory = PolymorphicFactory<{\n  props: CenterProps;\n  defaultRef: HTMLDivElement;\n  defaultComponent: 'div';\n  stylesNames: CenterStylesNames;\n}>;\n\nconst defaultProps: Partial<CenterProps> = {};\n\nexport const Center = polymorphicFactory<CenterFactory>((_props, ref) => {\n  const props = useProps('Center', defaultProps, _props);\n  const { classNames, className, style, styles, unstyled, vars, inline, mod, ...others } = props;\n\n  const getStyles = useStyles<CenterFactory>({\n    name: 'Center',\n    props,\n    classes: {\n      root: CenterRootStyle,\n    },\n    className,\n    style,\n    classNames,\n    styles,\n    unstyled,\n    vars,\n  });\n\n  return <Box ref={ref} mod={[{ inline }, mod]} {...getStyles('root')} {...others} />;\n});\n\nCenter.displayName = '@raikou/core/Center';\n"],"names":["polymorphicFactory","useProps","useStyles","CenterRootStyle","jsx","Box"],"mappings":";;;;;;;;;;;;;AA4BA,MAAM,eAAqC,EAAC;AAErC,MAAM,MAAS,GAAAA,qCAAA,CAAkC,CAAC,MAAA,EAAQ,GAAQ,KAAA;AACvE,EAAA,MAAM,KAAQ,GAAAC,iBAAA,CAAS,QAAU,EAAA,YAAA,EAAc,MAAM,CAAA;AACrD,EAAM,MAAA,EAAE,UAAY,EAAA,SAAA,EAAW,KAAO,EAAA,MAAA,EAAQ,QAAU,EAAA,IAAA,EAAM,MAAQ,EAAA,GAAA,EAAK,GAAG,MAAA,EAAW,GAAA,KAAA;AAEzF,EAAA,MAAM,YAAYC,mBAAyB,CAAA;AAAA,IACzC,IAAM,EAAA,QAAA;AAAA,IACN,KAAA;AAAA,IACA,OAAS,EAAA;AAAA,MACP,IAAM,EAAAC;AAAA,KACR;AAAA,IACA,SAAA;AAAA,IACA,KAAA;AAAA,IACA,UAAA;AAAA,IACA,MAAA;AAAA,IACA,QAAA;AAAA,IACA;AAAA,GACD,CAAA;AAED,EAAA,uBAAQC,cAAA,CAAAC,OAAA,EAAA,EAAI,GAAU,EAAA,GAAA,EAAK,CAAC,EAAE,MAAA,EAAU,EAAA,GAAG,GAAI,GAAG,SAAA,CAAU,MAAM,CAAA,EAAI,GAAG,MAAQ,EAAA,CAAA;AACnF,CAAC;AAED,MAAA,CAAO,WAAc,GAAA,qBAAA;;;;"}