{"version":3,"file":"Pattern.xf0ixNRz.mjs","names":["__esmMin","c","init_jsx_runtime","init_framer_D6uXRwWs","addPropertyControls","ControlType","Pattern","props","bg","type","color","thickness","spacing","bottom","side","at","from","invert","toothHeight","toothWidth","style","init_Pattern","p"],"sources":["https:/framerusercontent.com/modules/EMJu8oPkDmoTJObKmKQz/uHJj6AwlYcrqFfRoDMhk/Pattern.js"],"sourcesContent":["// Repeating decorative patterns behind a layer: grid lines (tub panel), pegboard dots (shop wall) and a\n// zig-zag torn edge (menu ticket). Code only because Framer fills can't tile a pattern at a fixed size;\n// everything is set from the properties panel. Place it as an absolute layer filling its parent.\nimport{jsx as _jsx}from\"react/jsx-runtime\";import{addPropertyControls,ControlType}from\"framer\";/**\n * @framerSupportedLayoutWidth any-prefer-fixed\n * @framerSupportedLayoutHeight any-prefer-fixed\n */export default function Pattern(props){const{type=\"grid\",color=\"rgba(255,255,255,0.13)\",spacing=72,thickness=2,toothWidth=10,toothHeight=14,side=\"right\",invert=false,style}=props;let bg={};if(type===\"grid\"){bg={backgroundImage:`linear-gradient(${color} ${thickness}px, transparent ${thickness}px), linear-gradient(90deg, ${color} ${thickness}px, transparent ${thickness}px)`,backgroundSize:`${spacing}px ${spacing}px`};}else if(type===\"dots\"){bg={backgroundImage:`radial-gradient(circle, ${color} 0, ${color} ${thickness}px, transparent ${thickness+.6}px)`,backgroundSize:`${spacing}px ${spacing}px`};}else{// teeth point away from the given side, like a page torn off a pad\nconst bottom=side===\"bottom\";const at=bottom?\"50% 100%\":side===\"right\"?\"100% 50%\":\"0% 50%\";const from=bottom?-45:side===\"right\"?225:45;bg={// invert draws the gaps between the teeth instead (the torn side of the strip that came off)\nbackgroundImage:invert?`conic-gradient(from ${from}deg at ${at}, transparent 90deg, ${color} 0deg)`:`conic-gradient(from ${from}deg at ${at}, ${color} 90deg, transparent 0deg)`,backgroundSize:bottom?`${toothHeight}px ${toothWidth}px`:`${toothWidth}px ${toothHeight}px`,backgroundRepeat:bottom?\"repeat-x\":\"repeat-y\",backgroundPosition:bottom?\"left bottom\":side===\"right\"?\"right top\":\"left top\"};}return /*#__PURE__*/_jsx(\"div\",{\"aria-hidden\":\"true\",style:{...style,position:\"relative\",width:\"100%\",height:\"100%\",pointerEvents:\"none\",...bg}});}addPropertyControls(Pattern,{type:{type:ControlType.Enum,title:\"Pattern\",options:[\"grid\",\"dots\",\"zigzag\"],optionTitles:[\"Grid lines\",\"Dots\",\"Zig-zag edge\"],defaultValue:\"grid\",displaySegmentedControl:true},color:{type:ControlType.Color,title:\"Colour\",defaultValue:\"rgba(255,255,255,0.13)\"},spacing:{type:ControlType.Number,title:\"Spacing\",defaultValue:72,min:4,max:200,unit:\"px\",hidden:p=>p.type===\"zigzag\"},thickness:{type:ControlType.Number,title:\"Thickness\",description:\"Line width, or dot radius.\",defaultValue:2,min:.5,max:20,step:.1,unit:\"px\",hidden:p=>p.type===\"zigzag\"},toothWidth:{type:ControlType.Number,title:\"Tooth width\",defaultValue:10,min:2,max:60,unit:\"px\",hidden:p=>p.type!==\"zigzag\"},toothHeight:{type:ControlType.Number,title:\"Tooth height\",defaultValue:14,min:2,max:60,unit:\"px\",hidden:p=>p.type!==\"zigzag\"},invert:{type:ControlType.Boolean,title:\"Invert\",description:\"Draw the gaps between the teeth.\",defaultValue:false,hidden:p=>p.type!==\"zigzag\"},side:{type:ControlType.Enum,title:\"Side\",options:[\"left\",\"right\",\"bottom\"],defaultValue:\"right\",displaySegmentedControl:true,hidden:p=>p.type!==\"zigzag\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"Pattern\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutWidth\":\"any-prefer-fixed\",\"framerContractVersion\":\"1\",\"framerSupportedLayoutHeight\":\"any-prefer-fixed\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Pattern.map"],"mappings":"A,4JAMG,SAAwBM,EAAQ,EAAM,CAAC,GAAK,CAAC,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