{"version":3,"file":"Table_test.CSJmQaRB.mjs","names":["React.useState","React.Fragment","__esmMin","z","x","j","_e","p","init_npm_react_18_3_1","ce","init_framer_BWFVvmND","addPropertyControls","ControlType","MarkdownTable","ReactMarkdown","setReactMarkdown","remarkGfm","setRemarkGfm","module","props","containerStyle","tableWrapperStyle","outerBorder","cornerRadius","tableStyle","cellBaseStyle","createCellStyle","_textStyle_font","textStyle","isHeader","headerText","isFirstColumn","firstColumnText","cellText","headerBackgroundColor","firstColumnBackgroundColor","cellBackgroundColor","isLastColumn","innerBorder","rowIndex","colIndex","index","children","child","cellIndex","i","array","text","markdown","init_Table_test","init_jsx_runtime"],"sources":["https:/framerusercontent.com/modules/5UPpLsIptml8Pf2ste2Q/CGv6Dz5yIXHe6rOvd3YV/Table_test.js"],"sourcesContent":["import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import*as React from\"react\";import{addPropertyControls,ControlType}from\"framer\";/**\n * @framerSupportedLayoutWidth any\n * @framerDisableUnlink\n * @framerSupportedLayoutHeight any\n */export function MarkdownTable(props){const[ReactMarkdown,setReactMarkdown]=React.useState(null);const[remarkGfm,setRemarkGfm]=React.useState(null);React.useEffect(()=>{import(\"react-markdown\").then(module=>setReactMarkdown(()=>module.default));import(\"remark-gfm\").then(module=>setRemarkGfm(()=>module.default));},[]);const{markdown,width,height,headerText,cellText,firstColumnText,headerBackgroundColor,firstColumnBackgroundColor,cellBackgroundColor,innerBorder,outerBorder,cornerRadius}=props;const containerStyle={width:width,height:height,overflow:\"auto\"};const tableWrapperStyle={border:`${outerBorder.width}px ${outerBorder.style} ${outerBorder.color}`,borderRadius:`${cornerRadius}px`,overflow:\"hidden\"};const tableStyle={width:\"100%\",borderCollapse:\"separate\",borderSpacing:0,borderRadius:`${cornerRadius}px`};const cellBaseStyle={padding:\"8px\",position:\"relative\"};const createCellStyle=(isHeader,isFirstColumn,isLastColumn,rowIndex,colIndex)=>{var _textStyle_font_style,_textStyle_font;const textStyle=isHeader?headerText:isFirstColumn?firstColumnText:cellText;return{...cellBaseStyle,backgroundColor:isHeader?headerBackgroundColor:isFirstColumn?firstColumnBackgroundColor:cellBackgroundColor,fontFamily:textStyle.framerFont.fontFamily||\"Inter\",fontWeight:textStyle.framerFont.fontWeight||400,fontStyle:((_textStyle_font=textStyle.font)===null||_textStyle_font===void 0?void 0:(_textStyle_font_style=_textStyle_font.style)===null||_textStyle_font_style===void 0?void 0:_textStyle_font_style.includes(\"Italic\"))?\"italic\":\"normal\",fontSize:`${textStyle.size}px`,color:textStyle.color,letterSpacing:`${textStyle.letterSpacing}px`,lineHeight:textStyle.lineHeight,textAlign:textStyle.align,borderRight:!isLastColumn?`${innerBorder.width}px ${innerBorder.style} ${innerBorder.color}`:\"none\",borderBottom:`${innerBorder.width}px ${innerBorder.style} ${innerBorder.color}`,...rowIndex===0&&{borderTop:\"none\"},...colIndex===0&&{borderLeft:\"none\"}};};const MarkdownComponents={table:({children})=>/*#__PURE__*/_jsx(\"div\",{style:tableWrapperStyle,children:/*#__PURE__*/_jsx(\"table\",{style:tableStyle,children:children})}),thead:({children})=>/*#__PURE__*/_jsx(\"thead\",{children:children}),tbody:({children})=>/*#__PURE__*/_jsx(\"tbody\",{children:children}),tr:({children,index})=>/*#__PURE__*/_jsx(\"tr\",{\"data-row-index\":index,children:React.Children.map(children,(child,cellIndex)=>/*#__PURE__*/React.cloneElement(child,{isFirstColumn:cellIndex===0,isLastColumn:cellIndex===children.length-1,rowIndex:index,colIndex:cellIndex}))}),th:({children,isFirstColumn,isLastColumn,rowIndex,colIndex})=>/*#__PURE__*/_jsx(\"th\",{style:createCellStyle(true,isFirstColumn,isLastColumn,rowIndex,colIndex),children:React.Children.map(children,child=>typeof child===\"string\"?child.split(\"<br>\").map((text,i,array)=>i===array.length-1?text:/*#__PURE__*/_jsxs(React.Fragment,{children:[text,/*#__PURE__*/_jsx(\"br\",{})]},i)):child)}),td:({children,isFirstColumn,isLastColumn,rowIndex,colIndex})=>/*#__PURE__*/_jsx(\"td\",{style:createCellStyle(false,isFirstColumn,isLastColumn,rowIndex,colIndex),children:React.Children.map(children,child=>typeof child===\"string\"?child.split(\"<br>\").map((text,i,array)=>i===array.length-1?text:/*#__PURE__*/_jsxs(React.Fragment,{children:[text,/*#__PURE__*/_jsx(\"br\",{})]},i)):child)})};if(!ReactMarkdown||!remarkGfm){// Return a loading state or placeholder\nreturn /*#__PURE__*/_jsx(\"div\",{children:\"Loading...\"});}return /*#__PURE__*/_jsxs(\"div\",{style:containerStyle,children:[/*#__PURE__*/_jsx(ReactMarkdown,{components:MarkdownComponents,remarkPlugins:[remarkGfm],children:markdown}),/*#__PURE__*/_jsx(\"style\",{children:`\n                table tr:last-child td {\n                    border-bottom: none !important;\n                }\n                table tr td:first-child, table tr th:first-child {\n                    border-left: none !important;\n                }\n                table tr:first-child th {\n                    border-top: none !important;\n                }\n                table tr td:last-child, table tr th:last-child {\n                    border-right: none !important;\n                }\n            `})]});}MarkdownTable.defaultProps={markdown:\"| Header 1 | Header 2 | Header 3 |\\n|----------|----------|----------|\\n| Row 1 Col 1 | Row 1 Col 2 | Row 1 Col 3 |\\n| Row 2 Col 1 | Row 2 Col 2 | Row 2 Col 3 |\",width:\"100%\",height:\"auto\",headerBackgroundColor:\"#f0f0f0\",firstColumnBackgroundColor:\"#f9f9f9\",cellBackgroundColor:\"#ffffff\",cornerRadius:4,innerBorder:{color:\"#dddddd\",width:1,style:\"solid\"},outerBorder:{color:\"#bbbbbb\",width:2,style:\"solid\"}};addPropertyControls(MarkdownTable,{markdown:{type:ControlType.String,title:\"Markdown\",displayTextArea:true},width:{type:ControlType.FusedNumber,title:\"Width\",defaultValue:300,toggleKey:\"widthType\",toggleTitles:[\"Fixed\",\"Flexible\"],valueKeys:[\"width\"],valueLabels:[\"W\"],min:0},height:{type:ControlType.FusedNumber,title:\"Height\",defaultValue:200,toggleKey:\"heightType\",toggleTitles:[\"Fixed\",\"Flexible\"],valueKeys:[\"height\"],valueLabels:[\"H\"],min:0},headerText:{type:ControlType.Object,title:\"Header Text\",controls:{framerFont:{type:ControlType.Font,title:\"Font\",defaultValue:{family:\"Inter\",weight:400}},color:{type:ControlType.Color,defaultValue:\"#000000\"},size:{type:ControlType.Number,defaultValue:16,min:0,max:200,unit:\"px\"},letterSpacing:{type:ControlType.Number,defaultValue:0,min:-20,max:100,unit:\"px\",step:.1,displayStepper:true},lineHeight:{type:ControlType.Number,defaultValue:1.2,min:0,max:3,step:.1,displayStepper:true},align:{type:ControlType.SegmentedEnum,options:[\"left\",\"center\",\"right\"],defaultValue:\"left\"}}},cellText:{type:ControlType.Object,title:\"Cell Text\",controls:{framerFont:{type:ControlType.Font,title:\"Font\",defaultValue:{family:\"Inter\",weight:400}},color:{type:ControlType.Color,defaultValue:\"#000000\"},size:{type:ControlType.Number,defaultValue:14,min:0,max:200,unit:\"px\"},letterSpacing:{type:ControlType.Number,defaultValue:0,min:-20,max:100,unit:\"px\",step:.1,displayStepper:true},lineHeight:{type:ControlType.Number,defaultValue:1.2,min:0,max:3,step:.1,displayStepper:true},align:{type:ControlType.SegmentedEnum,options:[\"left\",\"center\",\"right\"],defaultValue:\"left\"}}},firstColumnText:{type:ControlType.Object,title:\"First Column Text\",controls:{framerFont:{type:ControlType.Font,title:\"Font\",defaultValue:{family:\"Inter\",weight:400}},color:{type:ControlType.Color,defaultValue:\"#000000\"},size:{type:ControlType.Number,defaultValue:14,min:0,max:200,unit:\"px\"},letterSpacing:{type:ControlType.Number,defaultValue:0,min:-20,max:100,unit:\"px\",step:.1,displayStepper:true},lineHeight:{type:ControlType.Number,defaultValue:1.2,min:0,max:3,step:.1,displayStepper:true},align:{type:ControlType.SegmentedEnum,options:[\"left\",\"center\",\"right\"],defaultValue:\"left\"}}},headerBackgroundColor:{type:ControlType.Color,title:\"Header Color\",defaultValue:\"#f0f0f0\"},firstColumnBackgroundColor:{type:ControlType.Color,title:\"First Column Color\",defaultValue:\"#f9f9f9\"},cellBackgroundColor:{type:ControlType.Color,title:\"Cell Color\",defaultValue:\"#ffffff\"},innerBorder:{type:ControlType.Object,title:\"Inner Border\",controls:{color:{type:ControlType.Color,title:\"Color\",defaultValue:\"#dddddd\"},width:{type:ControlType.Number,title:\"Width\",defaultValue:1,min:0,max:10,step:1,unit:\"px\"},style:{type:ControlType.Enum,title:\"Style\",defaultValue:\"solid\",options:[\"solid\",\"dashed\",\"dotted\",\"double\"],optionTitles:[\"Solid\",\"Dashed\",\"Dotted\",\"Double\"]}}},outerBorder:{type:ControlType.Object,title:\"Outer Border\",controls:{color:{type:ControlType.Color,title:\"Color\",defaultValue:\"#bbbbbb\"},width:{type:ControlType.Number,title:\"Width\",defaultValue:2,min:0,max:10,step:1,unit:\"px\"},style:{type:ControlType.Enum,title:\"Style\",defaultValue:\"solid\",options:[\"solid\",\"dashed\",\"dotted\",\"double\"],optionTitles:[\"Solid\",\"Dashed\",\"Dotted\",\"Double\"]}}},cornerRadius:{type:ControlType.Number,title:\"Corner Radius\",defaultValue:4,min:0,max:20,step:1}});\nexport const __FramerMetadata__ = {\"exports\":{\"MarkdownTable\":{\"type\":\"reactComponent\",\"name\":\"MarkdownTable\",\"slots\":[],\"annotations\":{\"framerDisableUnlink\":\"* @framerSupportedLayoutHeight any\",\"framerSupportedLayoutWidth\":\"any\",\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Table_test.map"],"mappings":"A,mMAIG,SAAgBa,EAAc,EAAM,CAAC,GAAK,CAACC,EAAcC,GAAkBf,EAAe,IAAI,EAAO,CAACgB,EAAUC,GAAcjB,EAAe,IAAI,EAAES,MAAoB,CAAC,OAAO,0CAAiB,CAAC,KAAK,GAAQM,MAAqBG,EAAO,OAAO,CAAC,EAAE,OAAO,sCAAa,CAAC,KAAK,GAAQD,MAAiBC,EAAO,OAAO,CAAC,CAAE,EAAE,CAAC,CAAC,EAAE,GAAK,CAAC,WAAS,QAAM,SAAO,aAAW,WAAS,kBAAgB,wBAAsB,6BAA2B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