{"ast":null,"code":"import * as React from 'react';\nimport classNames from 'classnames';\nimport { Slot } from './slot';\nimport { boxPropDefs } from './box.props';\nimport { extractMarginProps, withMarginProps, extractLayoutProps, withLayoutProps, withBreakpoints } from '../helpers';\nconst Box = React.forwardRef((props, forwardedRef) => {\n  const {\n    rest: marginRest,\n    ...marginProps\n  } = extractMarginProps(props);\n  const {\n    rest: layoutRest,\n    ...layoutProps\n  } = extractLayoutProps(marginRest);\n  const {\n    className,\n    asChild,\n    display = boxPropDefs.display.default,\n    ...boxProps\n  } = layoutRest;\n  const Comp = asChild ? Slot : 'div';\n  return React.createElement(Comp, {\n    ...boxProps,\n    ref: forwardedRef,\n    className: classNames('rt-Box', className, withBreakpoints(display, 'rt-r-display'), withLayoutProps(layoutProps), withMarginProps(marginProps))\n  });\n});\nBox.displayName = 'Box';\nexport { Box };","map":{"version":3,"names":["React","classNames","Slot","boxPropDefs","extractMarginProps","withMarginProps","extractLayoutProps","withLayoutProps","withBreakpoints","Box","forwardRef","props","forwardedRef","rest","marginRest","marginProps","layoutRest","layoutProps","className","asChild","display","default","boxProps","Comp","createElement","ref","displayName"],"sources":["../../../src/components/box.tsx"],"sourcesContent":[null],"mappings":"AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,OAAOC,UAAU,MAAM,YAAY;AACnC,SAASC,IAAI,QAAQ,QAAQ;AAC7B,SAASC,WAAW,QAAQ,aAAa;AACzC,SACEC,kBAAkB,EAClBC,eAAe,EACfC,kBAAkB,EAClBC,eAAe,EACfC,eAAe,QACV,YAAY;AAanB,MAAMC,GAAG,GAAGT,KAAK,CAACU,UAAU,CAAuB,CAACC,KAAK,EAAEC,YAAY,KAAI;EACzE,MAAM;IAAEC,IAAI,EAAEC,UAAU;IAAE,GAAGC;EAAW,CAAE,GAAGX,kBAAkB,CAACO,KAAK,CAAC;EACtE,MAAM;IAAEE,IAAI,EAAEG,UAAU;IAAE,GAAGC;EAAW,CAAE,GAAGX,kBAAkB,CAACQ,UAAU,CAAC;EAC3E,MAAM;IAAEI,SAAS;IAAEC,OAAO;IAAEC,OAAO,GAAGjB,WAAW,CAACiB,OAAO,CAACC,OAAO;IAAE,GAAGC;EAAQ,CAAE,GAAGN,UAAU;EAC7F,MAAMO,IAAI,GAAGJ,OAAO,GAAGjB,IAAI,GAAG,KAAK;EACnC,OACEF,KAAA,CAAAwB,aAAA,CAACD,IAAI;IAAA,GACCD,QAAQ;IACZG,GAAG,EAAEb,YAAY;IACjBM,SAAS,EAAEjB,UAAU,CACnB,QAAQ,EACRiB,SAAS,EACTV,eAAe,CAACY,OAAO,EAAE,cAAc,CAAC,EACxCb,eAAe,CAACU,WAAW,CAAC,EAC5BZ,eAAe,CAACU,WAAW,CAAC;EAC7B,EACD;AAEN,CAAC,CAAC;AACFN,GAAG,CAACiB,WAAW,GAAG,KAAK;AAEvB,SAASjB,GAAG"},"metadata":{},"sourceType":"module","externalDependencies":[]}