{
  "version": 3,
  "sources": ["ssg:https://framerusercontent.com/modules/1Y9FUN7UNTPRzUMSTqDJ/vOyyTiAbHVHcDG3Lr8SK/KeywordPills.js"],
  "sourcesContent": ["import{jsx as _jsx,jsxs as _jsxs,Fragment as _Fragment}from\"react/jsx-runtime\";import*as React from\"react\";import{addPropertyControls,ControlType}from\"framer\";export default function KeywordPills(props){const{text=\"\",keywordsString=\"\",onClick,onRemove,pillStyle,containerStyle,borderColor=\"#A1A1A1\",backgroundColor=\"#E7E7E7\",textColor=\"#363636\",fontSize=16,maxHeight=120,...otherProps}=props;const inputString=text||keywordsString;if(!inputString||typeof inputString!==\"string\")return null;const keywords=inputString.split(\",\").map(keyword=>keyword.trim()).filter(keyword=>keyword.length>0);// Expander mechanism\nconst[expanded,setExpanded]=React.useState(false);const containerRef=React.useRef(null);const[isOverflowing,setIsOverflowing]=React.useState(false);React.useEffect(()=>{if(containerRef.current){setIsOverflowing(containerRef.current.scrollHeight>maxHeight);}},[inputString,maxHeight,fontSize,pillStyle,containerStyle]);React.useEffect(()=>{setExpanded(false);},[inputString]);return /*#__PURE__*/_jsxs(\"div\",{style:{width:\"100%\",height:\"100%\",position:\"relative\",fontFamily:\"Roboto\",fontSize,...otherProps.style},children:[/*#__PURE__*/_jsx(\"div\",{ref:containerRef,style:{...defaultContainerStyle,...containerStyle,maxHeight:expanded?\"none\":maxHeight,overflow:expanded?\"visible\":\"hidden\",transition:\"max-height 0.3s cubic-bezier(.4,0,.2,1)\",position:\"relative\",paddingBottom:!expanded&&isOverflowing?48:0},children:keywords.map((keyword,index)=>/*#__PURE__*/_jsxs(\"div\",{style:{...outlinedPillStyle,fontSize,borderColor,backgroundColor,color:textColor,...pillStyle},onClick:()=>onClick&&onClick(keyword),children:[keyword,onRemove&&/*#__PURE__*/_jsx(\"button\",{style:removeButtonStyle,onClick:e=>{e.stopPropagation();onRemove(keyword,index);},children:\"\\xd7\"})]},index))}),!expanded&&isOverflowing&&/*#__PURE__*/_jsxs(_Fragment,{children:[/*#__PURE__*/_jsx(\"div\",{style:{position:\"absolute\",left:0,right:0,bottom:0,height:80,pointerEvents:\"none\",background:\"linear-gradient(to bottom, rgba(255,255,255,0) 0%, rgba(255,255,255,1) 100%)\"}}),/*#__PURE__*/_jsx(\"button\",{onClick:()=>setExpanded(true),style:{position:\"absolute\",left:\"50%\",bottom:0,transform:\"translateX(-50%)\",background:\"#fff\",border:\"1px solid #ddd\",borderRadius:48,padding:\"6px 16px\",fontSize:18,fontWeight:500,cursor:\"pointer\",zIndex:2,boxShadow:\"0 2px 8px rgba(0,0,0,0.04)\"},children:\"Show more\"})]})]});}// --- Default styles ---\nconst defaultContainerStyle={display:\"flex\",flexWrap:\"wrap\",gap:\"2px\",overflow:\"hidden\"};const outlinedPillStyle={display:\"inline-flex\",alignItems:\"center\",padding:\"4px 12px\",borderRadius:\"48px\",border:\"1px solid\",fontFamily:\"Roboto\",fontWeight:\"500\",cursor:\"pointer\",marginRight:\"5px\",marginBottom:\"3px\"};const removeButtonStyle={marginLeft:\"px\",fontSize:\"12px\",color:\"#2563eb\",cursor:\"pointer\",border:\"none\",background:\"none\",padding:0};// --- Framer Property Controls ---\naddPropertyControls(KeywordPills,{text:{type:ControlType.String,defaultValue:\"React,Next.js,Framer\",title:\"Keywords Text\",description:\"Comma-separated list of keywords\"},borderColor:{type:ControlType.Color,defaultValue:\"#A1A1A1\",title:\"Border Color\"},backgroundColor:{type:ControlType.Color,defaultValue:\"#E7E7E7\",title:\"Background Color\"},textColor:{type:ControlType.Color,defaultValue:\"#363636\",title:\"Text Color\"},fontSize:{type:ControlType.Number,defaultValue:16,min:8,max:64,unit:\"px\",title:\"Font Size\"},maxHeight:{type:ControlType.Number,defaultValue:120,min:40,max:500,unit:\"px\",title:\"Max Height\",description:\"Collapsed max height in pixels before expanding\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"KeywordPills\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\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AAuB,MAAM,gBAAgB,YAAY,kCAAkC,EAAE,YAAY,CAAC,KAAKA,EAAY,MAAM,aAAa,UAAU,MAAM,cAAc,EAAE,gBAAgB,CAAC,KAAKA,EAAY,MAAM,aAAa,UAAU,MAAM,kBAAkB,EAAE,UAAU,CAAC,KAAKA,EAAY,MAAM,aAAa,UAAU,MAAM,YAAY,EAAE,SAAS,CAAC,KAAKA,EAAY,OAAO,aAAa,GAAG,IAAI,EAAE,IAAI,GAAG,KAAK,KAAK,MAAM,WAAW,EAAE,UAAU,CAAC,KAAKA,EAAY,OAAO,aAAa,IAAI,IAAI,GAAG,IAAI,IAAI,KAAK,KAAK,MAAM,aAAa,YAAY,iDAAiD,CAAC,CAAC",
  "names": ["KeywordPills", "props", "text", "keywordsString", "onClick", "onRemove", "pillStyle", "containerStyle", "borderColor", "backgroundColor", "textColor", "fontSize", "maxHeight", "otherProps", "inputString", "keywords", "keyword", "expanded", "setExpanded", "ye", "containerRef", "pe", "isOverflowing", "setIsOverflowing", "ue", "u", "p", "defaultContainerStyle", "index", "outlinedPillStyle", "removeButtonStyle", "e", "l", "addPropertyControls", "ControlType"]
}
