{"ast":null,"code":"import * as React from 'react';\nimport classNames from 'classnames';\nimport { Slot } from './slot';\nimport { flexPropDefs } from './flex.props';\nimport { extractMarginProps, withMarginProps, extractLayoutProps, withLayoutProps, withBreakpoints } from '../helpers';\nconst Flex = 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 = flexPropDefs.display.default,\n    direction = flexPropDefs.direction.default,\n    align = flexPropDefs.align.default,\n    justify = flexPropDefs.justify.default,\n    wrap = flexPropDefs.wrap.default,\n    gap = flexPropDefs.gap.default,\n    ...flexProps\n  } = layoutRest;\n  const Comp = asChild ? Slot : 'div';\n  return React.createElement(Comp, {\n    ...flexProps,\n    ref: forwardedRef,\n    className: classNames('rt-Flex', className, withBreakpoints(display, 'rt-r-display'), withBreakpoints(direction, 'rt-r-fd'), withBreakpoints(align, 'rt-r-ai'), withBreakpoints(justify, 'rt-r-jc', {\n      between: 'space-between'\n    }), withBreakpoints(wrap, 'rt-r-fw'), withBreakpoints(gap, 'rt-r-gap'), withLayoutProps(layoutProps), withMarginProps(marginProps))\n  });\n});\nFlex.displayName = 'Flex';\nexport { Flex };","map":{"version":3,"names":["React","classNames","Slot","flexPropDefs","extractMarginProps","withMarginProps","extractLayoutProps","withLayoutProps","withBreakpoints","Flex","forwardRef","props","forwardedRef","rest","marginRest","marginProps","layoutRest","layoutProps","className","asChild","display","default","direction","align","justify","wrap","gap","flexProps","Comp","createElement","ref","between","displayName"],"sources":["../../../src/components/flex.tsx"],"sourcesContent":[null],"mappings":"AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,OAAOC,UAAU,MAAM,YAAY;AACnC,SAASC,IAAI,QAAQ,QAAQ;AAC7B,SAASC,YAAY,QAAQ,cAAc;AAC3C,SACEC,kBAAkB,EAClBC,eAAe,EACfC,kBAAkB,EAClBC,eA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