{"ast":null,"code":"import { withBreakpoints } from '../breakpoints';\nconst paddingValues = ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9'];\nconst paddingPropDefs = {\n  p: {\n    type: 'enum',\n    values: paddingValues,\n    default: undefined,\n    responsive: true\n  },\n  px: {\n    type: 'enum',\n    values: paddingValues,\n    default: undefined,\n    responsive: true\n  },\n  py: {\n    type: 'enum',\n    values: paddingValues,\n    default: undefined,\n    responsive: true\n  },\n  pt: {\n    type: 'enum',\n    values: paddingValues,\n    default: undefined,\n    responsive: true\n  },\n  pr: {\n    type: 'enum',\n    values: paddingValues,\n    default: undefined,\n    responsive: true\n  },\n  pb: {\n    type: 'enum',\n    values: paddingValues,\n    default: undefined,\n    responsive: true\n  },\n  pl: {\n    type: 'enum',\n    values: paddingValues,\n    default: undefined,\n    responsive: true\n  }\n};\nfunction extractPaddingProps(props) {\n  const {\n    p = layoutPropDefs.p.default,\n    px = layoutPropDefs.px.default,\n    py = layoutPropDefs.py.default,\n    pt = layoutPropDefs.pt.default,\n    pr = layoutPropDefs.pr.default,\n    pb = layoutPropDefs.pb.default,\n    pl = layoutPropDefs.pl.default,\n    ...rest\n  } = props;\n  return {\n    p,\n    px,\n    py,\n    pt,\n    pr,\n    pb,\n    pl,\n    rest\n  };\n}\nfunction withPaddingProps(props) {\n  return [withBreakpoints(props.p, 'rt-r-p'), withBreakpoints(props.px, 'rt-r-px'), withBreakpoints(props.py, 'rt-r-py'), withBreakpoints(props.pt, 'rt-r-pt'), withBreakpoints(props.pr, 'rt-r-pr'), withBreakpoints(props.pb, 'rt-r-pb'), withBreakpoints(props.pl, 'rt-r-pl')].filter(Boolean).join(' ');\n}\nconst positionValues = ['static', 'relative', 'absolute', 'fixed', 'sticky'];\nconst positionEdgeValues = ['auto', '0', '50%', '100%'];\n// prettier-ignore\nconst widthHeightValues = ['auto', 'min-content', 'max-content', '100%', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9'];\nconst flexShrinkValues = ['0', '1'];\nconst flexGrowValues = ['0', '1'];\nconst layoutPropDefs = {\n  ...paddingPropDefs,\n  position: {\n    type: 'enum',\n    values: positionValues,\n    default: undefined,\n    responsive: true\n  },\n  inset: {\n    type: 'enum',\n    values: positionEdgeValues,\n    default: undefined,\n    responsive: true\n  },\n  top: {\n    type: 'enum',\n    values: positionEdgeValues,\n    default: undefined,\n    responsive: true\n  },\n  right: {\n    type: 'enum',\n    values: positionEdgeValues,\n    default: undefined,\n    responsive: true\n  },\n  bottom: {\n    type: 'enum',\n    values: positionEdgeValues,\n    default: undefined,\n    responsive: true\n  },\n  left: {\n    type: 'enum',\n    values: positionEdgeValues,\n    default: undefined,\n    responsive: true\n  },\n  width: {\n    type: 'enum',\n    values: widthHeightValues,\n    default: undefined,\n    responsive: true\n  },\n  height: {\n    type: 'enum',\n    values: widthHeightValues,\n    default: undefined,\n    responsive: true\n  },\n  shrink: {\n    type: 'enum',\n    values: flexShrinkValues,\n    default: undefined,\n    responsive: true\n  },\n  grow: {\n    type: 'enum',\n    values: flexGrowValues,\n    default: undefined,\n    responsive: true\n  }\n};\nfunction extractLayoutProps(props) {\n  const {\n    rest: paddingRest,\n    ...paddingProps\n  } = extractPaddingProps(props);\n  const {\n    position = layoutPropDefs.position.default,\n    width = layoutPropDefs.width.default,\n    height = layoutPropDefs.height.default,\n    inset = layoutPropDefs.inset.default,\n    top = layoutPropDefs.top.default,\n    bottom = layoutPropDefs.bottom.default,\n    left = layoutPropDefs.left.default,\n    right = layoutPropDefs.right.default,\n    shrink = layoutPropDefs.shrink.default,\n    grow = layoutPropDefs.grow.default,\n    ...rest\n  } = paddingRest;\n  return {\n    ...paddingProps,\n    position,\n    width,\n    height,\n    inset,\n    top,\n    bottom,\n    left,\n    right,\n    shrink,\n    grow,\n    rest\n  };\n}\nfunction withLayoutProps(props) {\n  return [withPaddingProps(props), withBreakpoints(props.position, 'rt-r-position'), withBreakpoints(props.shrink, 'rt-r-fs'), withBreakpoints(props.grow, 'rt-r-fg'), withBreakpoints(props.width, 'rt-r-w'), withBreakpoints(props.height, 'rt-r-h'), withBreakpoints(props.inset, 'rt-r-inset'), withBreakpoints(props.top, 'rt-r-top'), withBreakpoints(props.bottom, 'rt-r-bottom'), withBreakpoints(props.left, 'rt-r-left'), withBreakpoints(props.right, 'rt-r-right')].filter(Boolean).join(' ');\n}\nexport { paddingPropDefs, extractPaddingProps, withPaddingProps, layoutPropDefs, extractLayoutProps, withLayoutProps };","map":{"version":3,"names":["withBreakpoints","paddingValues","paddingPropDefs","p","type","values","default","undefined","responsive","px","py","pt","pr","pb","pl","extractPaddingProps","props","layoutPropDefs","rest","withPaddingProps","filter","Boolean","join","positionValues","positionEdgeValues","widthHeightValues","flexShrinkValues","flexGrowValues","position","inset","top","right","bottom","left","width","height","shrink","grow","extractLayoutProps","paddingRest","paddingProps","withLayoutProps"],"sources":["../../../../src/helpers/props/layout.props.ts"],"sourcesContent":[null],"mappings":"AAAA,SAASA,eAAe,QAAQ,gBAAgB;AAIhD,MAAMC,aAAa,GAAG,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,CAAU;AAEjF,MAAMC,eAAe,GAAG;EACtBC,CAAC,EAAE;IAAEC,IAAI,EAAE,MAAM;IAAEC,MAAM,EAAEJ,aAAa;IAAEK,OAAO,EAAEC,SAAS;IAAEC,UAAU,EAAE;EAAI,CAAE;EAChFC,EAAE,EAAE;IAAEL,IAAI,EAAE,MAAM;IAAEC,MAAM,EAAEJ,aAAa;IAAEK,OAAO,EAAEC,SAAS;IAAEC,UAAU,EAAE;EAAI,CAAE;EACjFE,EAAE,EAAE;IAAEN,IAAI,EAAE,MAAM;IAAEC,MAAM,EAAEJ,aAAa;IAAEK,OAAO,EAAEC,SAAS;IAAEC,UAAU,EAAE;EAAI,CAAE;EACjFG,EAAE,EAAE;IAAEP,IAAI,EAAE,MAAM;IAAEC,MAAM,EAAEJ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