UNPKG

@radix-ui/themes

Version:

[![Radix Themes Logo](https://radix-ui.com/social/themes.png)](https://radix-ui.com/themes)

3 lines (2 loc) 2.17 kB
"use strict";var n=Object.defineProperty;var i=Object.getOwnPropertyDescriptor;var c=Object.getOwnPropertyNames;var f=Object.prototype.hasOwnProperty;var m=(e,s)=>{for(var r in s)n(e,r,{get:s[r],enumerable:!0})},y=(e,s,r,o)=>{if(s&&typeof s=="object"||typeof s=="function")for(let t of c(s))!f.call(e,t)&&t!==r&&n(e,t,{get:()=>s[t],enumerable:!(o=i(s,t))||o.enumerable});return e};var d=e=>y(n({},"__esModule",{value:!0}),e);var G={};m(G,{gridPropDefs:()=>a});module.exports=d(G);var p=require("../props/as-child.prop.js"),l=require("../props/gap.props.js");const g=["div","span"],P=["none","inline-grid","grid"],V=["1","2","3","4","5","6","7","8","9"],w=["1","2","3","4","5","6","7","8","9"],b=["row","column","dense","row-dense","column-dense"],v=["start","center","end","baseline","stretch"],D=["start","center","end","between"],j=["start","center","end","baseline","between","around","evenly","stretch"],N=["start","center","end","baseline","stretch"],a={as:{type:"enum",values:g,default:"div"},...p.asChildPropDef,display:{type:"enum",className:"rt-r-display",values:P,responsive:!0},areas:{type:"string",className:"rt-r-gta",customProperties:["--grid-template-areas"],responsive:!0},columns:{type:"enum | string",className:"rt-r-gtc",customProperties:["--grid-template-columns"],values:V,parseValue:u,responsive:!0},rows:{type:"enum | string",className:"rt-r-gtr",customProperties:["--grid-template-rows"],values:w,parseValue:u,responsive:!0},flow:{type:"enum",className:"rt-r-gaf",values:b,responsive:!0},align:{type:"enum",className:"rt-r-ai",values:v,responsive:!0},justify:{type:"enum",className:"rt-r-jc",values:D,parseValue:h,responsive:!0},alignContent:{type:"enum",className:"rt-r-ac",values:j,parseValue:C,responsive:!0},justifyItems:{type:"enum",className:"rt-r-ji",values:N,responsive:!0},...l.gapPropDefs};function u(e){return a.columns.values.includes(e)?e:e?.match(/^\d+$/)?`repeat(${e}, minmax(0, 1fr))`:e}function h(e){return e==="between"?"space-between":e}function C(e){switch(e){case"between":return"space-between";case"around":return"space-around";case"evenly":return"space-evenly";default:return e}} //# sourceMappingURL=grid.props.js.map