{"version":3,"file":"Time_Date.0IlIPEMT.mjs","names":["React.useState"],"sources":["https:/framerusercontent.com/modules/1XP7JDPEkxcGmgCwYln6/Tbz3twPCLlWCcmfVzRrA/Time_Date.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import*as React from\"react\";import{addPropertyControls,ControlType}from\"framer\";import{localeOptions,containerStyles,fontStack}from\"https://framer.com/m/framer/default-utils.js@^0.45.0\";/**\n * TIME\n *\n * @framerIntrinsicWidth 140\n * @framerIntrinsicHeight 20\n *\n * @framerSupportedLayoutWidth any\n * @framerSupportedLayoutHeight any\n */export function Time(props){const{outputType,fontFamily,fontSize,fontWeight,localeType,customLocale,timeFormat,showYear,showWeekday,showHours,showMinutes,showSeconds,monthFormat,color,font,alignment}=props;const[time,setTime]=React.useState(new Date);React.useEffect(()=>{if(outputType===\"time\"){const timer=setInterval(()=>{setTime(new Date);},1e3);return()=>clearInterval(timer);}},[outputType]);const locale=localeType===\"custom\"?[customLocale]:[];const formatOptions={hour:showHours?\"numeric\":undefined,minute:showMinutes?\"numeric\":undefined,second:showSeconds?\"numeric\":undefined,hour12:timeFormat===\"12h\"};const text=new Intl.DateTimeFormat(locale,formatOptions).format(time);return /*#__PURE__*/_jsx(\"div\",{style:{...containerStyles,color,fontFamily:fontStack,fontWeight:500,fontVariantNumeric:\"tabular-nums\",...font},children:/*#__PURE__*/_jsx(\"span\",{style:{width:\"100%\"},children:text})});}Time.defaultProps={height:20,width:140,outputType:\"time\",localeType:\"auto\",customLocale:\"en-US\",color:\"#999\",timeFormat:\"24h\",showYear:true,showWeekday:true,showHours:true,showMinutes:true,showSeconds:true,monthFormat:\"long\",alignment:\"center\"};Time.displayName=\"Time & Date\";addPropertyControls(Time,{outputType:{title:\"Type\",type:ControlType.Enum,displaySegmentedControl:true,options:[\"date\",\"time\"],optionTitles:[\"Date\",\"Time\"],defaultValue:Time.defaultProps.outputType},showWeekday:{title:\"Weekday\",type:ControlType.Boolean,enabledTitle:\"Show\",disabledTitle:\"Hide\",defaultValue:Time.defaultProps.showWeekday,hidden:props=>props.outputType!==\"date\"},monthFormat:{title:\"Month\",type:ControlType.Enum,options:[\"short\",\"long\",\"numeric\"],optionTitles:[\"Short\",\"Long\",\"Numeric\"],defaultValue:Time.defaultProps.monthFormat,hidden:props=>props.outputType!==\"date\"},showYear:{title:\"Year\",type:ControlType.Boolean,enabledTitle:\"Show\",disabledTitle:\"Hide\",defaultValue:Time.defaultProps.showYear,hidden:props=>props.outputType!==\"date\"},timeFormat:{title:\"Format\",type:ControlType.Enum,options:[\"12h\",\"24h\"],optionTitles:[\"12h\",\"24h\"],displaySegmentedControl:true,defaultValue:Time.defaultProps.timeFormat,hidden:props=>props.outputType!==\"time\"},showHours:{title:\"Hours\",type:ControlType.Boolean,enabledTitle:\"Show\",disabledTitle:\"Hide\",defaultValue:Time.defaultProps.showHours,hidden:props=>props.outputType!==\"time\"},showMinutes:{title:\"Minutes\",type:ControlType.Boolean,enabledTitle:\"Show\",disabledTitle:\"Hide\",defaultValue:Time.defaultProps.showMinutes,hidden:props=>props.outputType!==\"time\"},showSeconds:{title:\"Seconds\",type:ControlType.Boolean,enabledTitle:\"Show\",disabledTitle:\"Hide\",defaultValue:Time.defaultProps.showSeconds,hidden:props=>props.outputType!==\"time\"},localeType:{title:\"Locale\",type:ControlType.Enum,displaySegmentedControl:true,options:[\"custom\",\"auto\"],optionTitles:[\"Custom\",\"Auto\"],defaultValue:Time.defaultProps.localeType},customLocale:{title:\" \",type:ControlType.Enum,options:Object.keys(localeOptions).sort(),optionTitles:Object.keys(localeOptions).sort().map(key=>localeOptions[key]),hidden:props=>props.localeType!==\"custom\",defaultValue:\"en\"},font:{type:ControlType.Font,controls:\"extended\"},color:{type:ControlType.Color,defaultValue:Time.defaultProps.color}});\nexport const __FramerMetadata__ = {\"exports\":{\"Time\":{\"type\":\"reactComponent\",\"name\":\"Time\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutHeight\":\"any\",\"framerSupportedLayoutW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