{"version":3,"sources":["../src/grid.tsx"],"sourcesContent":["import {\n  chakra,\n  forwardRef,\n  SystemProps,\n  HTMLChakraProps,\n} from \"@chakra-ui/system\"\n\nexport interface GridOptions {\n  /**\n   * Shorthand prop for `gridTemplateColumns`\n   * @type SystemProps[\"gridTemplateColumns\"]\n   */\n  templateColumns?: SystemProps[\"gridTemplateColumns\"]\n  /**\n   * Shorthand prop for `gridGap`\n   * @type SystemProps[\"gridGap\"]\n   */\n  gap?: SystemProps[\"gridGap\"]\n  /**\n   * Shorthand prop for `gridRowGap`\n   * @type SystemProps[\"gridRowGap\"]\n   */\n  rowGap?: SystemProps[\"gridRowGap\"]\n  /**\n   * Shorthand prop for `gridColumnGap`\n   * @type SystemProps[\"gridColumnGap\"]\n   */\n  columnGap?: SystemProps[\"gridColumnGap\"]\n  /**\n   * Shorthand prop for `gridAutoFlow`\n   * @type SystemProps[\"gridAutoFlow\"]\n   */\n  autoFlow?: SystemProps[\"gridAutoFlow\"]\n  /**\n   * Shorthand prop for `gridAutoRows`\n   * @type SystemProps[\"gridAutoRows\"]\n   */\n  autoRows?: SystemProps[\"gridAutoRows\"]\n  /**\n   * Shorthand prop for `gridAutoColumns`\n   * @type SystemProps[\"gridAutoColumns\"]\n   */\n  autoColumns?: SystemProps[\"gridAutoColumns\"]\n  /**\n   * Shorthand prop for `gridTemplateRows`\n   * @type SystemProps[\"gridTemplateRows\"]\n   */\n  templateRows?: SystemProps[\"gridTemplateRows\"]\n  /**\n   * Shorthand prop for `gridTemplateAreas`\n   * @type SystemProps[\"gridTemplateAreas\"]\n   */\n  templateAreas?: SystemProps[\"gridTemplateAreas\"]\n  /**\n   * Shorthand prop for `gridColumn`\n   * @type SystemProps[\"gridColumn\"]\n   */\n  column?: SystemProps[\"gridColumn\"]\n  /**\n   * Shorthand prop for `gridRow`\n   * @type SystemProps[\"gridRow\"]\n   */\n  row?: SystemProps[\"gridRow\"]\n}\n\nexport interface GridProps\n  extends Omit<HTMLChakraProps<\"div\">, keyof GridOptions>,\n    GridOptions {}\n\n/**\n * React component used to create grid layouts.\n *\n * It renders a `div` with `display: grid` and\n * comes with helpful style shorthand.\n *\n * @see Docs https://chakra-ui.com/grid\n */\nexport const Grid = forwardRef<GridProps, \"div\">(function Grid(props, ref) {\n  const {\n    templateAreas,\n    gap,\n    rowGap,\n    columnGap,\n    column,\n    row,\n    autoFlow,\n    autoRows,\n    templateRows,\n    autoColumns,\n    templateColumns,\n    ...rest\n  } = props\n\n  const styles = {\n    display: \"grid\",\n    gridTemplateAreas: templateAreas,\n    gridGap: gap,\n    gridRowGap: rowGap,\n    gridColumnGap: columnGap,\n    gridAutoColumns: autoColumns,\n    gridColumn: column,\n    gridRow: row,\n    gridAutoFlow: autoFlow,\n    gridAutoRows: autoRows,\n    gridTemplateRows: templateRows,\n    gridTemplateColumns: templateColumns,\n  }\n\n  return <chakra.div ref={ref} __css={styles} {...rest} />\n})\n\nGrid.displayName = \"Grid\"\n"],"mappings":";;;AAAA;AAAA,EACE;AAAA,EACA;AAAA,OAGK;AAuGE;AA/BF,IAAM,OAAO,WAA6B,SAASA,MAAK,OAAO,KAAK;AACzE,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,GAAG;AAAA,EACL,IAAI;AAEJ,QAAM,SAAS;AAAA,IACb,SAAS;AAAA,IACT,mBAAmB;AAAA,IACnB,SAAS;AAAA,IACT,YAAY;AAAA,IACZ,eAAe;AAAA,IACf,iBAAiB;AAAA,IACjB,YAAY;AAAA,IACZ,SAAS;AAAA,IACT,cAAc;AAAA,IACd,cAAc;AAAA,IACd,kBAAkB;AAAA,IAClB,qBAAqB;AAAA,EACvB;AAEA,SAAO,oBAAC,OAAO,KAAP,EAAW,KAAU,OAAO,QAAS,GAAG,MAAM;AACxD,CAAC;AAED,KAAK,cAAc;","names":["Grid"]}