{"version":3,"file":"BlogDate.CNHpg3mA.mjs","names":[],"sources":["https:/framerusercontent.com/modules/Q5wPNsisXytia1uNuGjY/fqpG6D6Ral4nu03LuU2b/BlogDate.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import{addPropertyControls,ControlType}from\"framer\";/**\n * 날짜를 한국어로 표기한다. (\"2023년 9월 11일\")\n *\n * 사이트 기본 로케일이 en-US 라 Framer 의 toDateString 변환은 영문으로 나온다.\n * 전역 로케일을 바꾸는 대신 여기서 ko-KR 로 포맷해, CMS 에는 날짜 필드 하나만 두면 되게 한다.\n *\n * @framerIntrinsicWidth 160\n * @framerIntrinsicHeight 24\n * @framerSupportedLayoutWidth any\n * @framerSupportedLayoutHeight auto\n */export default function BlogDate(props){const{date,fontSize,lineHeight,letterSpacing,color,weight,style}=props;const text=format(date);return /*#__PURE__*/_jsx(\"div\",{style:{fontFamily:`\"Pretendard Variable\", Pretendard, -apple-system, sans-serif`,fontSize,fontWeight:weight,fontVariationSettings:`\"wght\" ${weight}`,lineHeight:`${lineHeight}px`,letterSpacing,color,whiteSpace:\"nowrap\",...style},children:text});}/** 값이 비어 있으면 편집 화면에서 알아볼 수 있게 안내 문구를 보여준다 */function format(value){if(!value)return\"날짜 없음\";const d=new Date(value);if(Number.isNaN(d.getTime()))return\"날짜 없음\";// CMS 날짜는 UTC 기준으로 저장되므로 UTC 로 읽어 하루 밀림을 막는다\nreturn`${d.getUTCFullYear()}년 ${d.getUTCMonth()+1}월 ${d.getUTCDate()}일`;}BlogDate.defaultProps={fontSize:14,lineHeight:24,letterSpacing:\"-0.4px\",color:\"#a4abb2\",weight:500};addPropertyControls(BlogDate,{date:{type:ControlType.Date,title:\"Date\"},fontSize:{type:ControlType.Number,title:\"Size\",defaultValue:14,min:10,max:40},lineHeight:{type:ControlType.Number,title:\"Line\",defaultValue:24,min:10,max:60},letterSpacing:{type:ControlType.String,title:\"Spacing\",defaultValue:\"-0.4px\"},weight:{type:ControlType.Number,title:\"Weight\",defaultValue:500,min:100,max:900,step:50},color:{type:ControlType.Color,title:\"Color\",defaultValue:\"#a4abb2\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"BlogDate\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\",\"framerIntrinsicHeight\":\"24\",\"framerIntrinsicWidth\":\"160\",\"framerSupportedLayoutWidth\":\"any\",\"framerSupportedLayoutHeight\":\"auto\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./BlogDate.map"],"mappings":"4JAUG,SAAwB,EAAS,EAAM,CAAC,GAAK,CAAC,OAAK,WAAS,aAAW,gBAAc,QAAM,SAAO,SAAO,EAAY,EAAK,EAAO,CAAI,EAAE,OAAoB,EAAK,MAAM,CAAC,MAAM,CAAC,WAAW,+DAA+D,WAAS,WAAW,EAAO,sBAAsB,UAAU,IAAS,WAAW,GAAG,EAAW,IAAI,gBAAc,QAAM,WAAW,SAAS,GAAG,CAAK,EAAE,SAAS,CAAI,CAAC,CAAE,CAA8C,SAAS,EAAO,EAAM,CAAC,GAAG,CAAC,EAAM,MAAM,QAAQ,IAAM,EAAE,IAAI,KAAK,CAAK,EACjhB,OADshB,OAAO,MAAM,EAAE,QAAQ,CAAC,EAAQ,QAChjB,GAAG,EAAE,eAAe,EAAE,IAAI,EAAE,YAAY,EAAE,EAAE,IAAI,EAAE,WAAW,EAAE,EAAG,iBAX9B,IAAoD,EAWrB,EAAS,aAAa,CAAC,SAAS,GAAG,WAAW,GAAG,cAAc,SAAS,MAAM,UAAU,OAAO,GAAG,EAAE,EAAoB,EAAS,CAAC,KAAK,CAAC,KAAK,EAAY,KAAK,MAAM,MAAM,EAAE,SAAS,CAAC,KAAK,EAAY,OAAO,MAAM,OAAO,aAAa,GAAG,IAAI,GAAG,IAAI,EAAE,EAAE,WAAW,CAAC,KAAK,EAAY,OAAO,MAAM,OAAO,aAAa,GAAG,IAAI,GAAG,IAAI,EAAE,EAAE,cAAc,CAAC,KAAK,EAAY,OAAO,MAAM,UAAU,aAAa,QAAQ,EAAE,OAAO,CAAC,KAAK,EAAY,OAAO,MAAM,SAAS,aAAa,IAAI,IAAI,IAAI,IAAI,IAAI,KAAK,EAAE,EAAE,MAAM,CAAC,KAAK,EAAY,MAAM,MAAM,QAAQ,aAAa,SAAS,CAAC,CAAC"}