@pop-ui/core 0.0.37 → 0.0.40
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/core.css +1 -1
- package/dist/core.js +1625 -624
- package/dist/core.umd.cjs +323 -5
- package/dist/types/index.d.ts +178 -0
- package/package.json +3 -3
package/dist/core.umd.cjs
CHANGED
|
@@ -1,10 +1,328 @@
|
|
|
1
|
-
(function(g,t){typeof exports=="object"&&typeof module<"u"?t(exports,require("react/jsx-runtime"),require("@mantine/core"),require("react"),require("@pop-ui/foundation"),require("@mantine/notifications"),require("@mantine/dates"),require("dayjs"),require("dayjs/locale/ko"),require("@mantine/dropzone")):typeof define=="function"&&define.amd?define(["exports","react/jsx-runtime","@mantine/core","react","@pop-ui/foundation","@mantine/notifications","@mantine/dates","dayjs","dayjs/locale/ko","@mantine/dropzone"],t):(g=typeof globalThis<"u"?globalThis:g||self,t(g.Core={},g.jsxRuntime,g.MantineCore,g.React,g.foundation,g.notifications,g.dates,g.dayjs,null,g.dropzone))})(this,function(g,t,m,T,o,I,N,D,fe,j){"use strict";const X={primary:o.TextColorButtonTextPrimaryDefault,primaryLine:o.TextColorButtonTextPrimarylineDefault,basic:o.TextColorButtonTextBasicDefault,danger:o.TextColorButtonTextPrimaryDefault,setting:o.TextColorButtonTextPrimaryDefault,warning:o.TextColorButtonTextPrimaryDefault},R={primary:{default:{backgroundColor:o.BgColorButtonBgPrimaryDefault,color:o.TextColorButtonTextPrimaryDefault,border:"none"},hover:{backgroundColor:o.BgColorButtonBgPrimaryHover,color:o.TextColorButtonTextPrimaryHover},active:{backgroundColor:o.BgColorButtonBgPrimaryPressed,color:o.TextColorButtonTextPrimaryPressed},focus:{backgroundColor:o.BgColorButtonBgPrimaryFocused,color:o.TextColorButtonTextPrimaryFocused},disabled:{backgroundColor:o.BgColorButtonBgPrimaryDisabled,color:o.TextColorButtonTextPrimaryDisabled,cursor:"not-allowed"}},primaryLine:{default:{backgroundColor:o.BgColorButtonBgPrimarylineDefault,color:o.TextColorButtonTextPrimarylineDefault,border:`1px solid ${o.BorderColorButtonBorderPrimarylineDefault}`},hover:{backgroundColor:o.BgColorButtonBgPrimarylineHover,color:o.TextColorButtonTextPrimarylineHover,borderColor:o.BorderColorButtonBorderPrimarylineHover},active:{backgroundColor:o.BgColorButtonBgPrimarylinePressed,color:o.TextColorButtonTextPrimarylinePressed,borderColor:o.BorderColorButtonBorderPrimarylinePressed},focus:{backgroundColor:o.BgColorButtonBgPrimarylineFocused,color:o.TextColorButtonTextPrimarylineFocused,borderColor:o.BorderColorButtonBorderPrimarylineFocused},disabled:{backgroundColor:o.BgColorButtonBgPrimarylineDisabled,color:o.TextColorButtonTextPrimarylineDisabled,cursor:"not-allowed"}},basic:{default:{backgroundColor:o.BgColorButtonBgBasicDefault,color:o.TextColorButtonTextBasicDefault,border:`1px solid ${o.BorderColorButtonBorderBasicDefault}`},hover:{backgroundColor:o.BgColorButtonBgBasicHover,color:o.TextColorButtonTextBasicHover,borderColor:o.BorderColorButtonBorderBasicHover},active:{backgroundColor:o.BgColorButtonBgBasicPreseed,color:o.TextColorButtonTextBasicPressed,borderColor:o.BorderColorButtonBorderBasicPressed},focus:{backgroundColor:o.BgColorButtonBgBasicFocused,color:o.TextColorButtonTextBasicFocused,borderColor:o.BorderColorButtonBorderBasicFocused},disabled:{backgroundColor:o.BgColorButtonBgBasicDisabled,color:o.TextColorButtonTextBasicDisabled,cursor:"not-allowed"}},danger:{default:{backgroundColor:o.BgColorButtonBgWarningDefault,color:o.TextColorButtonTextWarningDefault,border:"none"},hover:{backgroundColor:o.BgColorButtonBgWarningHover,color:o.TextColorButtonTextWarningHover},active:{backgroundColor:o.BgColorButtonBgWarningPressed,color:o.TextColorButtonTextWarningPressed},focus:{backgroundColor:o.BgColorButtonBgWarningFocused,color:o.TextColorButtonTextWarningFocused},disabled:{backgroundColor:o.BgColorButtonBgWarningDisabled,color:o.TextColorButtonTextWarningDisabled,cursor:"not-allowed"}},setting:{default:{backgroundColor:o.BgColorButtonBgSettingDefault,color:o.TextColorButtonTextSettingDefault,border:"none"},hover:{backgroundColor:o.BgColorButtonBgSettingHover,color:o.TextColorButtonTextSettingHover},active:{backgroundColor:o.BgColorButtonBgSettingPressed,color:o.TextColorButtonTextSettingPressed},focus:{backgroundColor:o.BgColorButtonBgSettingFocused,color:o.TextColorButtonTextSettingFocused},disabled:{backgroundColor:o.BgColorButtonBgSettingDisabled,color:o.TextColorButtonTextSettingDisabled,cursor:"not-allowed"}},warning:{default:{backgroundColor:o.BgColorButtonBgWarningDefault,color:o.TextColorButtonTextWarningDefault,border:"none"},hover:{backgroundColor:o.BgColorButtonBgWarningHover,color:o.TextColorButtonTextWarningHover},active:{backgroundColor:o.BgColorButtonBgWarningPressed,color:o.TextColorButtonTextWarningPressed},focus:{backgroundColor:o.BgColorButtonBgWarningFocused,color:o.TextColorButtonTextWarningFocused},disabled:{backgroundColor:o.BgColorButtonBgWarningDisabled,color:o.TextColorButtonTextWarningDisabled,cursor:"not-allowed"}}},ee={lg:{height:"50px",padding:"0 20px",fontSize:"18px",fontWeight:700,borderRadius:"6px",lineHeight:"130%",fontFamily:"Pretendard"},md:{height:"40px",padding:"0 16px",fontSize:"16px",fontWeight:600,borderRadius:"6px",lineHeight:"130%",fontFamily:"Pretendard"},sm:{height:"30px",padding:"0 12px",fontSize:"14px",fontWeight:600,borderRadius:"4px",lineHeight:"130%",fontFamily:"Pretendard"}};function oe(r,l){const e=R[r];return{root:{...ee[l],...e.default,"&:hover:not(:disabled)":e.hover,"&:active:not(:disabled)":e.active,"&:focus:not(:disabled)":e.focus,"&:disabled":e.disabled}}}function re({children:r,size:l="md",variant:e="primary",isLoading:a=!1,disabled:s=!1,...n}){const _=T.useMemo(()=>oe(e,l),[e,l]),i=X[e],d=T.useMemo(()=>{switch(l){case"lg":return 18;case"sm":return 14;case"md":default:return 16}},[l]);return t.jsx(m.Button,{type:"button",styles:_,disabled:s||a,...n,children:a?t.jsx(m.Loader,{color:i,size:d}):r})}const Y={"Checkbox--Small":"styles-module__Checkbox--Small___VZGlw","Checkbox--Medium":"styles-module__Checkbox--Medium___Vwpa3","Checkbox--Large":"styles-module__Checkbox--Large___ybTGE"},te=({size:r="md",...l})=>{let e=Y["Checkbox--Medium"],a=24;return r==="sm"?(e=Y["Checkbox--Small"],a=18):r==="lg"&&(e=Y["Checkbox--Large"],a=32),t.jsx(m.Checkbox,{className:e,styles:{inner:{width:a,height:a}},...l})},f={datePickerWrapper:"styles-module__datePickerWrapper___8Bdcn",todayIndicator:"styles-module__todayIndicator___Zl0e4",day:"styles-module__day___DaYHh",calendarHeader:"styles-module__calendarHeader___9j1oi",calendarHeaderLevel:"styles-module__calendarHeaderLevel___wHs50",calendarHeaderControl:"styles-module__calendarHeaderControl___k317W",month:"styles-module__month___doF-A",monthRow:"styles-module__monthRow___ksziO",weekday:"styles-module__weekday___PVnxV"},le=({excludedDays:r=[],excludedDates:l=[]})=>{const e=[],a=[];for(const _ of l)typeof _=="string"?e.push(_):a.push(_);const s=e.map(_=>D(_)).filter(_=>_.isValid()).map(_=>_.format("YYYY-MM-DD")),n=a.map(([_,i])=>[D(_),D(i)]).filter(([_,i])=>_.isValid()&&i.isValid());return _=>{const i=D(_);if(!i.isValid())return!1;if(Array.isArray(r)&&r.includes(i.day())||s.includes(i.format("YYYY-MM-DD")))return!0;for(const[d,u]of n)if((i.isSame(d,"day")||i.isAfter(d,"day"))&&(i.isSame(u,"day")||i.isBefore(u,"day")))return!0;return!1}},ae=(r,l,e,a)=>{const s=D(r),n=D(l);for(const _ of e)if(Array.isArray(_)){const i=D(_[0]),d=D(_[1]);if(!i.isValid()||!d.isValid())continue;if(!(n.isBefore(i,"day")||s.isAfter(d,"day")))return!0}for(const _ of e)if(typeof _=="string"){const i=D(_);if(!i.isValid())continue;if((i.isSame(s,"day")||i.isAfter(s,"day"))&&(i.isSame(n,"day")||i.isBefore(n,"day")))return!0}if(a.length>0){let _=s;for(;_.isBefore(n,"day")||_.isSame(n,"day");){if(a.includes(_.day()))return!0;_=_.add(1,"day")}}return!1},M=(r="default")=>{switch(r){case"range":return[null,null];case"multiple":return[];default:return null}},J=(r="default",l)=>l==null?M(r):r==="range"?Array.isArray(l)?l:M("range"):r==="multiple"?Array.isArray(l)?l:M("multiple"):Array.isArray(l)?l[0]??null:l,se=({type:r,externalValue:l,internalValue:e})=>l!==void 0?J(r,l):e!==void 0?J(r,e):M(r),_e=(r,l)=>{const e=(a,s)=>{const n=Object.keys(a).reduce((_,i)=>{const d=i,u=a[d],c=s[d],p=[u,c].filter(Boolean).join(" ");return p&&(_[d]=p),_},{});return Object.keys(s).forEach(_=>{const i=_,d=s[i];!(i in a)&&d&&(n[i]=d)}),n};return typeof l=="function"?(a,s,n)=>e(r,l(a,s,n)):typeof l=="object"&&l!==null&&!Array.isArray(l)?e(r,l):r},ie={levelsGroup:f.datePickerWrapper,calendarHeader:f.calendarHeader,calendarHeaderLevel:f.calendarHeaderLevel,calendarHeaderControl:f.calendarHeaderControl,month:f.month,day:f.day,monthRow:f.monthRow,weekday:f.weekday},ne=({excludedDates:r=[],excludedDays:l=[],type:e="default",value:a,onChange:s,highlightToday:n=!1,..._})=>{const[i,d]=T.useState(()=>a??M(e)),u=T.useMemo(()=>le({excludedDays:l,excludedDates:r}),[l,r]),c=x=>{if(e==="range"&&Array.isArray(x)&&x.length===2){const[L,v]=x;if(L&&v&&ae(L,v,r,l)){const F=M("range");d(F),s?.(F);return}}d(x),s?.(x)},p=se({type:e,externalValue:a,internalValue:i}),P=T.useCallback(x=>{const L=D(x).date(),F=D(x).isSame(D(),"day")&&n;return t.jsxs(t.Fragment,{children:[L,F&&t.jsx("span",{className:f.todayIndicator,children:"오늘"})]})},[n]),{classNames:B,...C}=_,S=_e(ie,B);return t.jsx(N.DatePicker,{locale:"ko",firstDayOfWeek:0,monthLabelFormat:"YYYY년 M월",maxLevel:"month",type:e,previousIcon:t.jsx(o.IconChevronLeft,{}),nextIcon:t.jsx(o.IconChevronRight,{}),...C,size:"lg",onChange:c,weekendDays:[0],highlightToday:n,classNames:S,value:p,excludeDate:u,renderDay:P})},U={"DatePicker--Small":"styles-module__DatePicker--Small___m8asv","DatePicker--Medium":"styles-module__DatePicker--Medium___Po2-B","DatePicker--Large":"styles-module__DatePicker--Large___oQ6EM"},de=({size:r="md",type:l="default",withTime:e,...a})=>{let s=U["DatePicker--Medium"],n=18;return r==="sm"?(s=U["DatePicker--Small"],n=14):r==="lg"&&(s=U["DatePicker--Large"],n=24),e?t.jsx(N.DateTimePicker,{className:s,size:r,locale:"ko",firstDayOfWeek:0,monthLabelFormat:"YYYY년 MM월",valueFormat:"YYYY-MM-DD | a hh:mm",rightSection:t.jsx(o.IconCalendar,{size:n}),...a}):t.jsx(N.DatePickerInput,{className:s,type:l,size:r,locale:"ko",firstDayOfWeek:0,monthLabelFormat:"YYYY년 MM월",valueFormat:"YYYY-MM-DD",rightSection:t.jsx(o.IconCalendar,{size:n}),...a})},b={"Dropdown--LeftLabel":"styles-module__Dropdown--LeftLabel___SFObq","Dropdown--TopLabel":"styles-module__Dropdown--TopLabel___-lPhr","Dropdown__Label--Small":"styles-module__Dropdown__Label--Small___xbzOR","Dropdown__Label--Medium":"styles-module__Dropdown__Label--Medium___YtJ2-","Dropdown__Label--Large":"styles-module__Dropdown__Label--Large___sCiJv","Dropdown__Tooltip--Small":"styles-module__Dropdown__Tooltip--Small___rkmaO","Dropdown__Tooltip--Medium":"styles-module__Dropdown__Tooltip--Medium___JTfzy","Dropdown__Tooltip--Large":"styles-module__Dropdown__Tooltip--Large___W-sUq","Dropdown--Small":"styles-module__Dropdown--Small___dRIK7","Dropdown--Medium":"styles-module__Dropdown--Medium___-HZoU","Dropdown--Large":"styles-module__Dropdown--Large___BvV3M",Dropdown__Description:"styles-module__Dropdown__Description___OQ8bF",Dropdown__ErrorMsg:"styles-module__Dropdown__ErrorMsg___xTP0Y"},ce=({label:r,labelPosition:l="top",size:e="md",required:a,tooltip:s,tooltipPosition:n="top",errorMsg:_,description:i,...d})=>{const[u,c]=T.useState(!1);let p=b["Dropdown__Label--Medium"],P=b["Dropdown--Medium"],B=b["Dropdown__Tooltip--Medium"],C=18;return e==="sm"?(p=b["Dropdown__Label--Small"],P=b["Dropdown--Small"],B=b["Dropdown__Tooltip--Small"],C=14):e==="lg"&&(p=b["Dropdown__Label--Large"],P=b["Dropdown--Large"],B=b["Dropdown__Tooltip--Large"],C=24),t.jsxs("div",{className:l==="top"?b["Dropdown--TopLabel"]:b["Dropdown--LeftLabel"],children:[t.jsxs("div",{children:[r&&t.jsx(m.Input.Label,{required:a,className:p,children:r}),s&&t.jsx(m.Tooltip,{label:s,position:n,children:t.jsx("div",{className:B,children:t.jsx(o.IconInfoCircle,{size:e==="sm"?14:e==="lg"?20:16})})})]}),t.jsxs("div",{children:[t.jsx(m.Select,{...d,size:e,error:_,className:P,rightSection:u?t.jsx(o.IconChevronUp,{size:C}):t.jsx(o.IconChevronDown,{size:C}),onDropdownOpen:()=>c(!0),onDropdownClose:()=>c(!1),styles:{option:{"&[data-selected]":{"&, &:hover":{backgroundColor:"#e7e7e7",color:"#000000"}}}}}),i&&t.jsx(m.Input.Description,{className:b.Dropdown__Description,children:i}),_&&t.jsx(m.Input.Error,{className:b.Dropdown__ErrorMsg,children:_})]})]})},H={ImageUploader:"styles-module__ImageUploader___pO3AP",ImageUploader__Preview:"styles-module__ImageUploader__Preview___DI5K4",ImageUploader__Wrapper:"styles-module__ImageUploader__Wrapper___SpAGM",ImageUploader__FileClearButton:"styles-module__ImageUploader__FileClearButton___w1HyS"},ge=({width:r,height:l,defaultMsg:e="이미지 업로드",file:a,onDrop:s,showClearButton:n,onClear:_,...i})=>{const[d,u]=T.useState(a),c=T.useCallback(()=>{u(void 0),_&&_()},[_]);return t.jsxs("div",{className:H.ImageUploader__Wrapper,children:[n&&d?t.jsx("div",{className:H.ImageUploader__FileClearButton,onClick:c,children:t.jsx(o.IconCloseCircle,{size:24})}):null,t.jsx(j.Dropzone,{...i,maxFiles:1,className:H.ImageUploader,accept:j.IMAGE_MIME_TYPE,onDrop:p=>{u(p[0]),s&&s(p)},style:{width:r,height:l},children:t.jsx(t.Fragment,{children:d?t.jsx("img",{className:H.ImageUploader__Preview,src:typeof d=="string"?d:URL.createObjectURL(d),alt:`파일명: ${typeof d=="string"?d:d.name}`,title:`파일명: ${typeof d=="string"?d:d.name}`}):t.jsxs("div",{children:[t.jsx(o.IconPhoto,{size:48}),t.jsx("span",{children:e})]})})})]})},me=({size:r="md",width:l,withCloseButton:e=!1,...a})=>{let s=768;return r==="xs"?s=360:r==="sm"?s=544:r==="lg"?s=1e3:r==="xl"&&(s=1200),t.jsx(m.Modal,{size:l||s,withCloseButton:e,...a})},W={Pagination:"style-module__Pagination___xcR-Q",Pagination__PageIndex:"style-module__Pagination__PageIndex___50SZJ","Pagination__PageIndex--Active":"style-module__Pagination__PageIndex--Active___mSIwS",Pagination__Arrow:"style-module__Pagination__Arrow___74vp3"},ue=({currentPageIdx:r,rowsPerPage:l,totalLength:e,paginationSize:a,onPageChange:s,...n})=>{const[_,i]=T.useState(r),d=l||50,u=e||1,c=a||5;T.useEffect(()=>{i(r)},[r]);const p=()=>{s&&s(_-(_%c+1)),i(B=>B-(B%c+1))},P=()=>{s&&s(_+c-_%c),i(B=>B+c-B%c)};return t.jsxs("div",{...n,className:W.Pagination,children:[_>=c?t.jsx("button",{className:W.Pagination__Arrow,onClick:p,children:t.jsx(o.IconChevronLeft,{size:20})}):null,new Array(c).fill(0).map((B,C)=>{const S=Math.floor(_/c)*c+C+1;if(!(S>Math.ceil(u/d)))return t.jsx("button",{className:_===S-1?W["Pagination__PageIndex--Active"]:W.Pagination__PageIndex,onClick:()=>{i(S-1),s&&s(S-1)},children:S},`pagination_${C}`)}),Math.floor(_/c)*c+c<Math.ceil(u/d)?t.jsx("button",{className:W.Pagination__Arrow,onClick:P,children:t.jsx(o.IconChevronRight,{size:20})}):null]})},V={"Radio--Small":"styles-module__Radio--Small___izWI2","Radio--Medium":"styles-module__Radio--Medium___dwZfV","Radio--Large":"styles-module__Radio--Large___1gLra"},Te=({size:r="md",...l})=>{let e=V["Radio--Medium"];return r==="sm"?e=V["Radio--Small"]:r==="lg"&&(e=V["Radio--Large"]),t.jsx(m.Radio,{className:e,size:r,...l})},y={"SearchBar--LeftLabel":"styles-module__SearchBar--LeftLabel___CeYTM","SearchBar--TopLabel":"styles-module__SearchBar--TopLabel___spN3I","SearchBar__Label--Small":"styles-module__SearchBar__Label--Small___zS1L2","SearchBar__Label--Medium":"styles-module__SearchBar__Label--Medium___Fk0Ao","SearchBar__Label--Large":"styles-module__SearchBar__Label--Large___xTOYL","SearchBar__Tooltip--Small":"styles-module__SearchBar__Tooltip--Small___YhmEr","SearchBar__Tooltip--Medium":"styles-module__SearchBar__Tooltip--Medium___4JhOv","SearchBar__Tooltip--Large":"styles-module__SearchBar__Tooltip--Large___IEoPv",SearchBar__Wrapper:"styles-module__SearchBar__Wrapper___oq49s","SearchBar--Small":"styles-module__SearchBar--Small___SY9CN","SearchBar--Medium":"styles-module__SearchBar--Medium___vLP08","SearchBar--Large":"styles-module__SearchBar--Large___JHfHP",SearchBar__Description:"styles-module__SearchBar__Description___vucS-",SearchBar__ErrorMsg:"styles-module__SearchBar__ErrorMsg___TOeoy",SearchBar__ClearButton:"styles-module__SearchBar__ClearButton___S-y4P"},pe=({label:r,labelPosition:l="top",size:e="md",required:a,tooltip:s,tooltipPosition:n="top",errorMsg:_,description:i,onChange:d,onClear:u,...c})=>{const[p,P]=T.useState(0);let B=y["SearchBar__Label--Medium"],C=y["SearchBar--Medium"],S=y["SearchBar__Tooltip--Medium"];e==="sm"?(B=y["SearchBar__Label--Small"],C=y["SearchBar--Small"],S=y["SearchBar__Tooltip--Small"]):e==="lg"&&(B=y["SearchBar__Label--Large"],C=y["SearchBar--Large"],S=y["SearchBar__Tooltip--Large"]);const x=T.useCallback(L=>{d&&(P(L?.length),d(L))},[d]);return t.jsxs("div",{className:l==="top"?y["SearchBar--TopLabel"]:y["SearchBar--LeftLabel"],children:[t.jsxs("div",{children:[r&&t.jsx(m.Input.Label,{required:a,className:B,children:r}),s&&t.jsx(m.Tooltip,{label:s,position:n,children:t.jsx("div",{className:S,children:t.jsx(o.IconInfoCircle,{size:e==="sm"?14:e==="lg"?20:16})})})]}),t.jsxs("div",{children:[t.jsx("div",{className:y.SearchBar__Wrapper,children:t.jsx(m.Autocomplete,{...c,size:e,error:_,className:C,onChange:x,leftSection:t.jsx(o.IconSearch,{size:e==="sm"?16:e==="lg"?24:20}),rightSection:u&&p>0?t.jsx("div",{className:y.SearchBar__ClearButton,onClick:u,children:t.jsx(o.IconClose,{size:e==="sm"?16:e==="lg"?24:20})}):void 0})}),i&&t.jsx(m.Input.Description,{className:y.SearchBar__Description,children:i}),_&&t.jsx(m.Input.Error,{className:y.SearchBar__ErrorMsg,children:_})]})]})},O={"SegmentButton--Small":"styles-module__SegmentButton--Small___o0Y3t","SegmentButton--Medium":"styles-module__SegmentButton--Medium___EgCJm","SegmentButton--Large":"styles-module__SegmentButton--Large___Ym86C"},Be=({size:r="md",radius:l=6,...e})=>{let a=O["SegmentButton--Medium"];return r==="sm"?a=O["SegmentButton--Small"]:r==="lg"&&(a=O["SegmentButton--Large"]),t.jsx(m.SegmentedControl,{className:a,size:r,radius:l,styles:{control:{borderWidth:"0 !important"}},...e})},Z={Tab__TitleList:"styles-module__Tab__TitleList___urHWH",Tab__BorderBottom:"styles-module__Tab__BorderBottom___eMTpl"},he=({tabList:r=[],containerPaddingTop:l,...e})=>t.jsxs(m.Tabs,{...e,children:[t.jsx(m.Tabs.List,{className:Z.Tab__TitleList,children:r?.map((a,s)=>t.jsxs(m.Tabs.Tab,{value:a.value,leftSection:a.icon,children:[a.title,t.jsx("div",{className:Z.Tab__BorderBottom})]},`tab_${s}`))}),r?.map((a,s)=>t.jsx(m.Tabs.Panel,{value:a.value,pt:l,children:a.body},`tab_panel_${s}`))]}),h={"TextField--LeftLabel":"styles-module__TextField--LeftLabel___hiNn3","TextField--TopLabel":"styles-module__TextField--TopLabel___V2otc","TextField__Label--Small":"styles-module__TextField__Label--Small___NkKKA","TextField__Label--Medium":"styles-module__TextField__Label--Medium___IoJd-","TextField__Label--Large":"styles-module__TextField__Label--Large___GMy74","TextField__Tooltip--Small":"styles-module__TextField__Tooltip--Small___GmQHE","TextField__Tooltip--Medium":"styles-module__TextField__Tooltip--Medium___5P3nA","TextField__Tooltip--Large":"styles-module__TextField__Tooltip--Large___YSCfu",TextField__Wrapper:"styles-module__TextField__Wrapper___u6p5Z",TextField__TextCounter:"styles-module__TextField__TextCounter___u1jM5","TextField--Textarea":"styles-module__TextField--Textarea___C2DL5","TextField--Small":"styles-module__TextField--Small___iuH4t","TextField--Medium":"styles-module__TextField--Medium___snYod","TextField--Large":"styles-module__TextField--Large___JoSYk",TextField__Description:"styles-module__TextField__Description___J-kXP",TextField__ErrorMsg:"styles-module__TextField__ErrorMsg___fa6f6",TextField__ClearButton:"styles-module__TextField__ClearButton___bB5Ew"},ye=r=>{const{label:l,labelPosition:e="top",size:a="md",required:s,tooltip:n,tooltipPosition:_="top",errorMsg:i,description:d,textarea:u=!1,maxTextCount:c,onChange:p,onClear:P,...B}=r,C="minRows"in r?r.minRows:void 0,[S,x]=T.useState(0);let L=h["TextField__Label--Medium"],v=h["TextField--Medium"],F=h["TextField__Tooltip--Medium"];a==="sm"?(L=h["TextField__Label--Small"],v=h["TextField--Small"],F=h["TextField__Tooltip--Small"]):a==="lg"&&(L=h["TextField__Label--Large"],v=h["TextField--Large"],F=h["TextField__Tooltip--Large"]);const Q=T.useCallback(E=>{if(c){if(E.currentTarget?.value?.length>c)return;x(E.currentTarget?.value?.length),p&&p(E)}p&&(x(E.currentTarget?.value?.length),p(E))},[c,p]);return t.jsxs("div",{className:e==="top"?h["TextField--TopLabel"]:h["TextField--LeftLabel"],children:[t.jsxs("div",{children:[l&&t.jsx(m.Input.Label,{required:s,className:L,children:l}),n&&t.jsx(m.Tooltip,{label:n,position:_,children:t.jsx("div",{className:F,children:t.jsx(o.IconInfoCircle,{size:a==="sm"?14:a==="lg"?20:16})})})]}),t.jsxs("div",{children:[t.jsxs("div",{className:h.TextField__Wrapper,children:[u?t.jsx(m.Textarea,{className:h["TextField--Textarea"],size:a,minRows:C,error:i,onChange:Q,disabled:B?.disabled,...B}):t.jsx(m.Input,{className:v,error:i,onChange:Q,rightSection:P&&S>0?t.jsx("div",{className:h.TextField__ClearButton,onClick:P,children:t.jsx(o.IconClose,{size:a==="sm"?16:a==="lg"?24:20})}):void 0,...B}),c&&c>0&&t.jsx("span",{className:h.TextField__TextCounter,children:`${S}/${c}`})]}),d&&t.jsx(m.Input.Description,{className:h.TextField__Description,children:d}),i&&t.jsx(m.Input.Error,{className:h.TextField__ErrorMsg,children:i})]})]})},$={"TimePicker--Small":"styles-module__TimePicker--Small___nHQa1","TimePicker--Medium":"styles-module__TimePicker--Medium___E9-rF","TimePicker--Large":"styles-module__TimePicker--Large___I0M7V"},Ce=({size:r="md",...l})=>{const e=T.useRef(null);let a=$["TimePicker--Medium"],s=18;return r==="sm"?(a=$["TimePicker--Small"],s=14):r==="lg"&&(a=$["TimePicker--Large"],s=24),t.jsx(N.TimeInput,{ref:e,className:a,size:r,...l,rightSection:t.jsx(m.ActionIcon,{onClick:()=>{e&&e?.current?.showPicker()},children:t.jsx(o.IconClock,{size:s})})})},w={Toast:"styles-module__Toast___ZqZzU",Toast__Icon:"styles-module__Toast__Icon___PWXSy",Toast__Body:"styles-module__Toast__Body___wezPs",Toast__Message:"styles-module__Toast__Message___NFsgm"},A=r=>{const l=typeof r=="string"?{message:r}:r,{message:e,id:a,icon:s,autoClose:n}=l;I.notifications.show({id:a,message:t.jsx("div",{className:w.Toast__Message,children:e}),icon:s,autoClose:n,classNames:{root:w.Toast,body:w.Toast__Body,icon:w.Toast__Icon},withCloseButton:!1,withBorder:!1})};A.update=(r,l)=>{const e=typeof l=="string"?{message:l}:l,{message:a,icon:s,autoClose:n}=e;I.notifications.update({id:r,message:t.jsx("div",{className:w.Toast__Message,children:a}),icon:s,autoClose:n,classNames:{root:w.Toast,body:w.Toast__Body,icon:w.Toast__Icon},withCloseButton:!1,withBorder:!1})},A.hide=r=>{I.notifications.hide(r)},A.clean=()=>{I.notifications.clean()};const z={"Toggle--Small":"styles-module__Toggle--Small___sOjUd","Toggle--Medium":"styles-module__Toggle--Medium___yIb8v","Toggle--Large":"styles-module__Toggle--Large___ZOJj1"},Se=({size:r="md",labelPosition:l="right",disabled:e,onChange:a,...s})=>{const[n,_]=T.useState(s?.checked||!1);let i=z["Toggle--Medium"],d=50;r==="sm"?(i=z["Toggle--Small"],d=38):r==="lg"&&(i=z["Toggle--Large"],d=67);const u=T.useCallback(c=>{a&&a(c),_(c?.target?.checked)},[a]);return t.jsx(m.Switch,{className:i,size:r,labelPosition:l,disabled:e,onChange:u,styles:()=>({track:{backgroundColor:!e&&n?"#0fd3d8 !important":void 0,borderColor:!e&&n?"#0fd3d8 !important":void 0,width:d}}),...s})},q={Tooltip__Body:"styles-module__Tooltip__Body___i1OTG",Tooltip__Title:"styles-module__Tooltip__Title___E0LoV",Tooltip__Content:"styles-module__Tooltip__Content___lU5gr"},be=({title:r,content:l,maw:e=280,multiline:a=!0,...s})=>t.jsx(m.Tooltip,{...s,maw:e,multiline:a,label:t.jsxs("div",{className:q.Tooltip__Body,children:[r&&t.jsx("span",{className:q.Tooltip__Title,children:r}),t.jsx("span",{className:q.Tooltip__Content,children:l})]})}),G=(r="light")=>{const l=[];return Object.entries(o.colors).forEach(([e,a])=>{Object.entries(a).forEach(([s,n])=>{const _=o.getCSSVariableName(e,s);l.push(`${_}: ${n};`)})}),l.join(`
|
|
2
|
-
|
|
1
|
+
(function(f,a){typeof exports=="object"&&typeof module<"u"?a(exports,require("react/jsx-runtime"),require("@mantine/core"),require("react"),require("@pop-ui/foundation"),require("@mantine/notifications"),require("@mantine/dates"),require("dayjs"),require("dayjs/locale/ko"),require("@mantine/dropzone")):typeof define=="function"&&define.amd?define(["exports","react/jsx-runtime","@mantine/core","react","@pop-ui/foundation","@mantine/notifications","@mantine/dates","dayjs","dayjs/locale/ko","@mantine/dropzone"],a):(f=typeof globalThis<"u"?globalThis:f||self,a(f.Core={},f.jsxRuntime,f.MantineCore,f.React,f.foundation,f.notifications,f.dates,f.dayjs,null,f.dropzone))})(this,function(f,a,x,m,i,O,z,v,ot,R){"use strict";const me={primary:i.TextColorButtonTextPrimaryDefault,primaryLine:i.TextColorButtonTextPrimarylineDefault,basic:i.TextColorButtonTextBasicDefault,danger:i.TextColorButtonTextPrimaryDefault,setting:i.TextColorButtonTextPrimaryDefault,warning:i.TextColorButtonTextPrimaryDefault},ge={primary:{default:{backgroundColor:i.BgColorButtonBgPrimaryDefault,color:i.TextColorButtonTextPrimaryDefault,border:"none"},hover:{backgroundColor:i.BgColorButtonBgPrimaryHover,color:i.TextColorButtonTextPrimaryHover},active:{backgroundColor:i.BgColorButtonBgPrimaryPressed,color:i.TextColorButtonTextPrimaryPressed},focus:{backgroundColor:i.BgColorButtonBgPrimaryFocused,color:i.TextColorButtonTextPrimaryFocused},disabled:{backgroundColor:i.BgColorButtonBgPrimaryDisabled,color:i.TextColorButtonTextPrimaryDisabled,cursor:"not-allowed"}},primaryLine:{default:{backgroundColor:i.BgColorButtonBgPrimarylineDefault,color:i.TextColorButtonTextPrimarylineDefault,border:`1px solid ${i.BorderColorButtonBorderPrimarylineDefault}`},hover:{backgroundColor:i.BgColorButtonBgPrimarylineHover,color:i.TextColorButtonTextPrimarylineHover,borderColor:i.BorderColorButtonBorderPrimarylineHover},active:{backgroundColor:i.BgColorButtonBgPrimarylinePressed,color:i.TextColorButtonTextPrimarylinePressed,borderColor:i.BorderColorButtonBorderPrimarylinePressed},focus:{backgroundColor:i.BgColorButtonBgPrimarylineFocused,color:i.TextColorButtonTextPrimarylineFocused,borderColor:i.BorderColorButtonBorderPrimarylineFocused},disabled:{backgroundColor:i.BgColorButtonBgPrimarylineDisabled,color:i.TextColorButtonTextPrimarylineDisabled,cursor:"not-allowed"}},basic:{default:{backgroundColor:i.BgColorButtonBgBasicDefault,color:i.TextColorButtonTextBasicDefault,border:`1px solid ${i.BorderColorButtonBorderBasicDefault}`},hover:{backgroundColor:i.BgColorButtonBgBasicHover,color:i.TextColorButtonTextBasicHover,borderColor:i.BorderColorButtonBorderBasicHover},active:{backgroundColor:i.BgColorButtonBgBasicPreseed,color:i.TextColorButtonTextBasicPressed,borderColor:i.BorderColorButtonBorderBasicPressed},focus:{backgroundColor:i.BgColorButtonBgBasicFocused,color:i.TextColorButtonTextBasicFocused,borderColor:i.BorderColorButtonBorderBasicFocused},disabled:{backgroundColor:i.BgColorButtonBgBasicDisabled,color:i.TextColorButtonTextBasicDisabled,cursor:"not-allowed"}},danger:{default:{backgroundColor:i.BgColorButtonBgWarningDefault,color:i.TextColorButtonTextWarningDefault,border:"none"},hover:{backgroundColor:i.BgColorButtonBgWarningHover,color:i.TextColorButtonTextWarningHover},active:{backgroundColor:i.BgColorButtonBgWarningPressed,color:i.TextColorButtonTextWarningPressed},focus:{backgroundColor:i.BgColorButtonBgWarningFocused,color:i.TextColorButtonTextWarningFocused},disabled:{backgroundColor:i.BgColorButtonBgWarningDisabled,color:i.TextColorButtonTextWarningDisabled,cursor:"not-allowed"}},setting:{default:{backgroundColor:i.BgColorButtonBgSettingDefault,color:i.TextColorButtonTextSettingDefault,border:"none"},hover:{backgroundColor:i.BgColorButtonBgSettingHover,color:i.TextColorButtonTextSettingHover},active:{backgroundColor:i.BgColorButtonBgSettingPressed,color:i.TextColorButtonTextSettingPressed},focus:{backgroundColor:i.BgColorButtonBgSettingFocused,color:i.TextColorButtonTextSettingFocused},disabled:{backgroundColor:i.BgColorButtonBgSettingDisabled,color:i.TextColorButtonTextSettingDisabled,cursor:"not-allowed"}},warning:{default:{backgroundColor:i.BgColorButtonBgWarningDefault,color:i.TextColorButtonTextWarningDefault,border:"none"},hover:{backgroundColor:i.BgColorButtonBgWarningHover,color:i.TextColorButtonTextWarningHover},active:{backgroundColor:i.BgColorButtonBgWarningPressed,color:i.TextColorButtonTextWarningPressed},focus:{backgroundColor:i.BgColorButtonBgWarningFocused,color:i.TextColorButtonTextWarningFocused},disabled:{backgroundColor:i.BgColorButtonBgWarningDisabled,color:i.TextColorButtonTextWarningDisabled,cursor:"not-allowed"}}},he={lg:{height:"50px",padding:"0 20px",fontSize:"18px",fontWeight:700,borderRadius:"6px",lineHeight:"130%",fontFamily:"Pretendard"},md:{height:"40px",padding:"0 16px",fontSize:"16px",fontWeight:600,borderRadius:"6px",lineHeight:"130%",fontFamily:"Pretendard"},sm:{height:"30px",padding:"0 12px",fontSize:"14px",fontWeight:600,borderRadius:"4px",lineHeight:"130%",fontFamily:"Pretendard"}};function fe(t,s){const r=ge[t];return{root:{...he[s],...r.default,"&:hover:not(:disabled)":r.hover,"&:active:not(:disabled)":r.active,"&:focus:not(:disabled)":r.focus,"&:disabled":r.disabled}}}function ee({children:t,size:s="md",variant:r="primary",isLoading:e=!1,disabled:o=!1,...l}){const n=m.useMemo(()=>fe(r,s),[r,s]),c=me[r],d=m.useMemo(()=>{switch(s){case"lg":return 18;case"sm":return 14;case"md":default:return 16}},[s]);return a.jsx(x.Button,{type:"button",styles:n,disabled:o||e,...l,children:e?a.jsx(x.Loader,{color:c,size:d}):t})}const U={"Checkbox--Small":"styles-module__Checkbox--Small___VZGlw","Checkbox--Medium":"styles-module__Checkbox--Medium___Vwpa3","Checkbox--Large":"styles-module__Checkbox--Large___ybTGE"},Ce=({size:t="md",...s})=>{let r=U["Checkbox--Medium"],e=24;return t==="sm"?(r=U["Checkbox--Small"],e=18):t==="lg"&&(r=U["Checkbox--Large"],e=32),a.jsx(x.Checkbox,{className:r,styles:{inner:{width:e,height:e}},...s})},P={datePickerWrapper:"styles-module__datePickerWrapper___8Bdcn",todayIndicator:"styles-module__todayIndicator___Zl0e4",day:"styles-module__day___DaYHh",calendarHeader:"styles-module__calendarHeader___9j1oi",calendarHeaderLevel:"styles-module__calendarHeaderLevel___wHs50",calendarHeaderControl:"styles-module__calendarHeaderControl___k317W",month:"styles-module__month___doF-A",monthRow:"styles-module__monthRow___ksziO",weekday:"styles-module__weekday___PVnxV"},xe=({excludedDays:t=[],excludedDates:s=[]})=>{const r=[],e=[];for(const n of s)typeof n=="string"?r.push(n):e.push(n);const o=r.map(n=>v(n)).filter(n=>n.isValid()).map(n=>n.format("YYYY-MM-DD")),l=e.map(([n,c])=>[v(n),v(c)]).filter(([n,c])=>n.isValid()&&c.isValid());return n=>{const c=v(n);if(!c.isValid())return!1;if(Array.isArray(t)&&t.includes(c.day())||o.includes(c.format("YYYY-MM-DD")))return!0;for(const[d,h]of l)if((c.isSame(d,"day")||c.isAfter(d,"day"))&&(c.isSame(h,"day")||c.isBefore(h,"day")))return!0;return!1}},ye=(t,s,r,e)=>{const o=v(t),l=v(s);for(const n of r)if(Array.isArray(n)){const c=v(n[0]),d=v(n[1]);if(!c.isValid()||!d.isValid())continue;if(!(l.isBefore(c,"day")||o.isAfter(d,"day")))return!0}for(const n of r)if(typeof n=="string"){const c=v(n);if(!c.isValid())continue;if((c.isSame(o,"day")||c.isAfter(o,"day"))&&(c.isSame(l,"day")||c.isBefore(l,"day")))return!0}if(e.length>0){let n=o;for(;n.isBefore(l,"day")||n.isSame(l,"day");){if(e.includes(n.day()))return!0;n=n.add(1,"day")}}return!1},A=(t="default")=>{switch(t){case"range":return[null,null];case"multiple":return[];default:return null}},te=(t="default",s)=>s==null?A(t):t==="range"?Array.isArray(s)?s:A("range"):t==="multiple"?Array.isArray(s)?s:A("multiple"):Array.isArray(s)?s[0]??null:s,Te=({type:t,externalValue:s,internalValue:r})=>s!==void 0?te(t,s):r!==void 0?te(t,r):A(t),Be=(t,s)=>{const r=(e,o)=>{const l=Object.keys(e).reduce((n,c)=>{const d=c,h=e[d],u=o[d],_=[h,u].filter(Boolean).join(" ");return _&&(n[d]=_),n},{});return Object.keys(o).forEach(n=>{const c=n,d=o[c];!(c in e)&&d&&(l[c]=d)}),l};return typeof s=="function"?(e,o,l)=>r(t,s(e,o,l)):typeof s=="object"&&s!==null&&!Array.isArray(s)?r(t,s):t},be={levelsGroup:P.datePickerWrapper,calendarHeader:P.calendarHeader,calendarHeaderLevel:P.calendarHeaderLevel,calendarHeaderControl:P.calendarHeaderControl,month:P.month,day:P.day,monthRow:P.monthRow,weekday:P.weekday},ke=({excludedDates:t=[],excludedDays:s=[],type:r="default",value:e,onChange:o,highlightToday:l=!1,...n})=>{const[c,d]=m.useState(()=>e??A(r)),h=m.useMemo(()=>xe({excludedDays:s,excludedDates:t}),[s,t]),u=T=>{if(r==="range"&&Array.isArray(T)&&T.length===2){const[B,S]=T;if(B&&S&&ye(B,S,t,s)){const L=A("range");d(L),o?.(L);return}}d(T),o?.(T)},_=Te({type:r,externalValue:e,internalValue:c}),g=m.useCallback(T=>{const B=v(T).date(),L=v(T).isSame(v(),"day")&&l;return a.jsxs(a.Fragment,{children:[B,L&&a.jsx("span",{className:P.todayIndicator,children:"오늘"})]})},[l]),{classNames:p,...C}=n,y=Be(be,p);return a.jsx(z.DatePicker,{locale:"ko",firstDayOfWeek:0,monthLabelFormat:"YYYY년 M월",maxLevel:"month",type:r,previousIcon:a.jsx(i.IconChevronLeft,{}),nextIcon:a.jsx(i.IconChevronRight,{}),...C,size:"lg",onChange:u,weekendDays:[0],highlightToday:l,classNames:y,value:_,excludeDate:h,renderDay:g})},Z={"DatePicker--Small":"styles-module__DatePicker--Small___m8asv","DatePicker--Medium":"styles-module__DatePicker--Medium___Po2-B","DatePicker--Large":"styles-module__DatePicker--Large___oQ6EM"},Me=({size:t="md",type:s="default",withTime:r,...e})=>{let o=Z["DatePicker--Medium"],l=18;return t==="sm"?(o=Z["DatePicker--Small"],l=14):t==="lg"&&(o=Z["DatePicker--Large"],l=24),r?a.jsx(z.DateTimePicker,{className:o,size:t,locale:"ko",firstDayOfWeek:0,monthLabelFormat:"YYYY년 MM월",valueFormat:"YYYY-MM-DD | a hh:mm",rightSection:a.jsx(i.IconCalendar,{size:l}),...e}):a.jsx(z.DatePickerInput,{className:o,type:s,size:t,locale:"ko",firstDayOfWeek:0,monthLabelFormat:"YYYY년 MM월",valueFormat:"YYYY-MM-DD",rightSection:a.jsx(i.IconCalendar,{size:l}),...e})},w={"Dropdown--LeftLabel":"styles-module__Dropdown--LeftLabel___SFObq","Dropdown--TopLabel":"styles-module__Dropdown--TopLabel___-lPhr","Dropdown__Label--Small":"styles-module__Dropdown__Label--Small___xbzOR","Dropdown__Label--Medium":"styles-module__Dropdown__Label--Medium___YtJ2-","Dropdown__Label--Large":"styles-module__Dropdown__Label--Large___sCiJv","Dropdown__Tooltip--Small":"styles-module__Dropdown__Tooltip--Small___rkmaO","Dropdown__Tooltip--Medium":"styles-module__Dropdown__Tooltip--Medium___JTfzy","Dropdown__Tooltip--Large":"styles-module__Dropdown__Tooltip--Large___W-sUq","Dropdown--Small":"styles-module__Dropdown--Small___dRIK7","Dropdown--Medium":"styles-module__Dropdown--Medium___-HZoU","Dropdown--Large":"styles-module__Dropdown--Large___BvV3M",Dropdown__Description:"styles-module__Dropdown__Description___OQ8bF",Dropdown__ErrorMsg:"styles-module__Dropdown__ErrorMsg___xTP0Y"},Se=({label:t,labelPosition:s="top",size:r="md",required:e,tooltip:o,tooltipPosition:l="top",errorMsg:n,description:c,...d})=>{const[h,u]=m.useState(!1);let _=w["Dropdown__Label--Medium"],g=w["Dropdown--Medium"],p=w["Dropdown__Tooltip--Medium"],C=18;return r==="sm"?(_=w["Dropdown__Label--Small"],g=w["Dropdown--Small"],p=w["Dropdown__Tooltip--Small"],C=14):r==="lg"&&(_=w["Dropdown__Label--Large"],g=w["Dropdown--Large"],p=w["Dropdown__Tooltip--Large"],C=24),a.jsxs("div",{className:s==="top"?w["Dropdown--TopLabel"]:w["Dropdown--LeftLabel"],children:[a.jsxs("div",{children:[t&&a.jsx(x.Input.Label,{required:e,className:_,children:t}),o&&a.jsx(x.Tooltip,{label:o,position:l,children:a.jsx("div",{className:p,children:a.jsx(i.IconInfoCircle,{size:r==="sm"?14:r==="lg"?20:16})})})]}),a.jsxs("div",{children:[a.jsx(x.Select,{...d,size:r,error:n,className:g,rightSection:h?a.jsx(i.IconChevronUp,{size:C}):a.jsx(i.IconChevronDown,{size:C}),onDropdownOpen:()=>u(!0),onDropdownClose:()=>u(!1),styles:{option:{"&[data-selected]":{"&, &:hover":{backgroundColor:"#e7e7e7",color:"#000000"}}}}}),c&&a.jsx(x.Input.Description,{className:w.Dropdown__Description,children:c}),n&&a.jsx(x.Input.Error,{className:w.Dropdown__ErrorMsg,children:n})]})]})},H={ImageUploader:"styles-module__ImageUploader___pO3AP",ImageUploader__Preview:"styles-module__ImageUploader__Preview___DI5K4",ImageUploader__Wrapper:"styles-module__ImageUploader__Wrapper___SpAGM",ImageUploader__FileClearButton:"styles-module__ImageUploader__FileClearButton___w1HyS"},we=({width:t,height:s,defaultMsg:r="이미지 업로드",file:e,onDrop:o,showClearButton:l,onClear:n,...c})=>{const[d,h]=m.useState(e),u=m.useCallback(()=>{h(void 0),n&&n()},[n]);return a.jsxs("div",{className:H.ImageUploader__Wrapper,children:[l&&d?a.jsx("div",{className:H.ImageUploader__FileClearButton,onClick:u,children:a.jsx(i.IconCloseCircle,{size:24})}):null,a.jsx(R.Dropzone,{...c,maxFiles:1,className:H.ImageUploader,accept:R.IMAGE_MIME_TYPE,onDrop:_=>{h(_[0]),o&&o(_)},style:{width:t,height:s},children:a.jsx(a.Fragment,{children:d?a.jsx("img",{className:H.ImageUploader__Preview,src:typeof d=="string"?d:URL.createObjectURL(d),alt:`파일명: ${typeof d=="string"?d:d.name}`,title:`파일명: ${typeof d=="string"?d:d.name}`}):a.jsxs("div",{children:[a.jsx(i.IconPhoto,{size:48}),a.jsx("span",{children:r})]})})})]})},ve=({size:t="md",width:s,withCloseButton:r=!1,...e})=>{let o=768;return t==="xs"?o=360:t==="sm"?o=544:t==="lg"?o=1e3:t==="xl"&&(o=1200),a.jsx(x.Modal,{size:s||o,withCloseButton:r,...e})},$={Pagination:"style-module__Pagination___xcR-Q",Pagination__PageIndex:"style-module__Pagination__PageIndex___50SZJ","Pagination__PageIndex--Active":"style-module__Pagination__PageIndex--Active___mSIwS",Pagination__Arrow:"style-module__Pagination__Arrow___74vp3"},Ie=({currentPageIdx:t,rowsPerPage:s,totalLength:r,paginationSize:e,onPageChange:o,...l})=>{const[n,c]=m.useState(t),d=s||50,h=r||1,u=e||5;m.useEffect(()=>{c(t)},[t]);const _=()=>{o&&o(n-(n%u+1)),c(p=>p-(p%u+1))},g=()=>{o&&o(n+u-n%u),c(p=>p+u-p%u)};return a.jsxs("div",{...l,className:$.Pagination,children:[n>=u?a.jsx("button",{className:$.Pagination__Arrow,onClick:_,children:a.jsx(i.IconChevronLeft,{size:20})}):null,new Array(u).fill(0).map((p,C)=>{const y=Math.floor(n/u)*u+C+1;if(!(y>Math.ceil(h/d)))return a.jsx("button",{className:n===y-1?$["Pagination__PageIndex--Active"]:$.Pagination__PageIndex,onClick:()=>{c(y-1),o&&o(y-1)},children:y},`pagination_${C}`)}),Math.floor(n/u)*u+u<Math.ceil(h/d)?a.jsx("button",{className:$.Pagination__Arrow,onClick:g,children:a.jsx(i.IconChevronRight,{size:20})}):null]})},Y={"Radio--Small":"styles-module__Radio--Small___izWI2","Radio--Medium":"styles-module__Radio--Medium___dwZfV","Radio--Large":"styles-module__Radio--Large___1gLra"},Le=({size:t="md",...s})=>{let r=Y["Radio--Medium"];return t==="sm"?r=Y["Radio--Small"]:t==="lg"&&(r=Y["Radio--Large"]),a.jsx(x.Radio,{className:r,size:t,...s})},k={"SearchBar--LeftLabel":"styles-module__SearchBar--LeftLabel___CeYTM","SearchBar--TopLabel":"styles-module__SearchBar--TopLabel___spN3I","SearchBar__Label--Small":"styles-module__SearchBar__Label--Small___zS1L2","SearchBar__Label--Medium":"styles-module__SearchBar__Label--Medium___Fk0Ao","SearchBar__Label--Large":"styles-module__SearchBar__Label--Large___xTOYL","SearchBar__Tooltip--Small":"styles-module__SearchBar__Tooltip--Small___YhmEr","SearchBar__Tooltip--Medium":"styles-module__SearchBar__Tooltip--Medium___4JhOv","SearchBar__Tooltip--Large":"styles-module__SearchBar__Tooltip--Large___IEoPv",SearchBar__Wrapper:"styles-module__SearchBar__Wrapper___oq49s","SearchBar--Small":"styles-module__SearchBar--Small___SY9CN","SearchBar--Medium":"styles-module__SearchBar--Medium___vLP08","SearchBar--Large":"styles-module__SearchBar--Large___JHfHP",SearchBar__Description:"styles-module__SearchBar__Description___vucS-",SearchBar__ErrorMsg:"styles-module__SearchBar__ErrorMsg___TOeoy",SearchBar__ClearButton:"styles-module__SearchBar__ClearButton___S-y4P"},Pe=({label:t,labelPosition:s="top",size:r="md",required:e,tooltip:o,tooltipPosition:l="top",errorMsg:n,description:c,onChange:d,onClear:h,...u})=>{const[_,g]=m.useState(0);let p=k["SearchBar__Label--Medium"],C=k["SearchBar--Medium"],y=k["SearchBar__Tooltip--Medium"];r==="sm"?(p=k["SearchBar__Label--Small"],C=k["SearchBar--Small"],y=k["SearchBar__Tooltip--Small"]):r==="lg"&&(p=k["SearchBar__Label--Large"],C=k["SearchBar--Large"],y=k["SearchBar__Tooltip--Large"]);const T=m.useCallback(B=>{d&&(g(B?.length),d(B))},[d]);return a.jsxs("div",{className:s==="top"?k["SearchBar--TopLabel"]:k["SearchBar--LeftLabel"],children:[a.jsxs("div",{children:[t&&a.jsx(x.Input.Label,{required:e,className:p,children:t}),o&&a.jsx(x.Tooltip,{label:o,position:l,children:a.jsx("div",{className:y,children:a.jsx(i.IconInfoCircle,{size:r==="sm"?14:r==="lg"?20:16})})})]}),a.jsxs("div",{children:[a.jsx("div",{className:k.SearchBar__Wrapper,children:a.jsx(x.Autocomplete,{...u,size:r,error:n,className:C,onChange:T,leftSection:a.jsx(i.IconSearch,{size:r==="sm"?16:r==="lg"?24:20}),rightSection:h&&_>0?a.jsx("div",{className:k.SearchBar__ClearButton,onClick:h,children:a.jsx(i.IconClose,{size:r==="sm"?16:r==="lg"?24:20})}):void 0})}),c&&a.jsx(x.Input.Description,{className:k.SearchBar__Description,children:c}),n&&a.jsx(x.Input.Error,{className:k.SearchBar__ErrorMsg,children:n})]})]})},V={"SegmentButton--Small":"styles-module__SegmentButton--Small___o0Y3t","SegmentButton--Medium":"styles-module__SegmentButton--Medium___EgCJm","SegmentButton--Large":"styles-module__SegmentButton--Large___Ym86C"},De=({size:t="md",radius:s=6,...r})=>{let e=V["SegmentButton--Medium"];return t==="sm"?e=V["SegmentButton--Small"]:t==="lg"&&(e=V["SegmentButton--Large"]),a.jsx(x.SegmentedControl,{className:e,size:t,radius:s,styles:{control:{borderWidth:"0 !important"}},...r})},re={Tab__TitleList:"styles-module__Tab__TitleList___urHWH",Tab__BorderBottom:"styles-module__Tab__BorderBottom___eMTpl"},Fe=({tabList:t=[],containerPaddingTop:s,...r})=>a.jsxs(x.Tabs,{...r,children:[a.jsx(x.Tabs.List,{className:re.Tab__TitleList,children:t?.map((e,o)=>a.jsxs(x.Tabs.Tab,{value:e.value,leftSection:e.icon,children:[e.title,a.jsx("div",{className:re.Tab__BorderBottom})]},`tab_${o}`))}),t?.map((e,o)=>a.jsx(x.Tabs.Panel,{value:e.value,pt:s,children:e.body},`tab_panel_${o}`))]}),b={"TextField--LeftLabel":"styles-module__TextField--LeftLabel___hiNn3","TextField--TopLabel":"styles-module__TextField--TopLabel___V2otc","TextField__Label--Small":"styles-module__TextField__Label--Small___NkKKA","TextField__Label--Medium":"styles-module__TextField__Label--Medium___IoJd-","TextField__Label--Large":"styles-module__TextField__Label--Large___GMy74","TextField__Tooltip--Small":"styles-module__TextField__Tooltip--Small___GmQHE","TextField__Tooltip--Medium":"styles-module__TextField__Tooltip--Medium___5P3nA","TextField__Tooltip--Large":"styles-module__TextField__Tooltip--Large___YSCfu",TextField__Wrapper:"styles-module__TextField__Wrapper___u6p5Z",TextField__TextCounter:"styles-module__TextField__TextCounter___u1jM5","TextField--Textarea":"styles-module__TextField--Textarea___C2DL5","TextField--Small":"styles-module__TextField--Small___iuH4t","TextField--Medium":"styles-module__TextField--Medium___snYod","TextField--Large":"styles-module__TextField--Large___JoSYk",TextField__Description:"styles-module__TextField__Description___J-kXP",TextField__ErrorMsg:"styles-module__TextField__ErrorMsg___fa6f6",TextField__ClearButton:"styles-module__TextField__ClearButton___bB5Ew"},Ee=t=>{const{label:s,labelPosition:r="top",size:e="md",required:o,tooltip:l,tooltipPosition:n="top",errorMsg:c,description:d,textarea:h=!1,maxTextCount:u,onChange:_,onClear:g,...p}=t,C="minRows"in t?t.minRows:void 0,[y,T]=m.useState(0);let B=b["TextField__Label--Medium"],S=b["TextField--Medium"],L=b["TextField__Tooltip--Medium"];e==="sm"?(B=b["TextField__Label--Small"],S=b["TextField--Small"],L=b["TextField__Tooltip--Small"]):e==="lg"&&(B=b["TextField__Label--Large"],S=b["TextField--Large"],L=b["TextField__Tooltip--Large"]);const W=m.useCallback(E=>{if(u){if(E.currentTarget?.value?.length>u)return;T(E.currentTarget?.value?.length),_&&_(E)}_&&(T(E.currentTarget?.value?.length),_(E))},[u,_]);return a.jsxs("div",{className:r==="top"?b["TextField--TopLabel"]:b["TextField--LeftLabel"],children:[a.jsxs("div",{children:[s&&a.jsx(x.Input.Label,{required:o,className:B,children:s}),l&&a.jsx(x.Tooltip,{label:l,position:n,children:a.jsx("div",{className:L,children:a.jsx(i.IconInfoCircle,{size:e==="sm"?14:e==="lg"?20:16})})})]}),a.jsxs("div",{children:[a.jsxs("div",{className:b.TextField__Wrapper,children:[h?a.jsx(x.Textarea,{className:b["TextField--Textarea"],size:e,minRows:C,error:c,onChange:W,disabled:p?.disabled,...p}):a.jsx(x.Input,{className:S,error:c,onChange:W,rightSection:g&&y>0?a.jsx("div",{className:b.TextField__ClearButton,onClick:g,children:a.jsx(i.IconClose,{size:e==="sm"?16:e==="lg"?24:20})}):void 0,...p}),u&&u>0&&a.jsx("span",{className:b.TextField__TextCounter,children:`${y}/${u}`})]}),d&&a.jsx(x.Input.Description,{className:b.TextField__Description,children:d}),c&&a.jsx(x.Input.Error,{className:b.TextField__ErrorMsg,children:c})]})]})},j={"TimePicker--Small":"styles-module__TimePicker--Small___nHQa1","TimePicker--Medium":"styles-module__TimePicker--Medium___E9-rF","TimePicker--Large":"styles-module__TimePicker--Large___I0M7V"},Ae=({size:t="md",...s})=>{const r=m.useRef(null);let e=j["TimePicker--Medium"],o=18;return t==="sm"?(e=j["TimePicker--Small"],o=14):t==="lg"&&(e=j["TimePicker--Large"],o=24),a.jsx(z.TimeInput,{ref:r,className:e,size:t,...s,rightSection:a.jsx(x.ActionIcon,{onClick:()=>{r&&r?.current?.showPicker()},children:a.jsx(i.IconClock,{size:o})})})},F={Toast:"styles-module__Toast___ZqZzU",Toast__Icon:"styles-module__Toast__Icon___PWXSy",Toast__Body:"styles-module__Toast__Body___wezPs",Toast__Message:"styles-module__Toast__Message___NFsgm"},N=t=>{const s=typeof t=="string"?{message:t}:t,{message:r,id:e,icon:o,autoClose:l}=s;O.notifications.show({id:e,message:a.jsx("div",{className:F.Toast__Message,children:r}),icon:o,autoClose:l,classNames:{root:F.Toast,body:F.Toast__Body,icon:F.Toast__Icon},withCloseButton:!1,withBorder:!1})};N.update=(t,s)=>{const r=typeof s=="string"?{message:s}:s,{message:e,icon:o,autoClose:l}=r;O.notifications.update({id:t,message:a.jsx("div",{className:F.Toast__Message,children:e}),icon:o,autoClose:l,classNames:{root:F.Toast,body:F.Toast__Body,icon:F.Toast__Icon},withCloseButton:!1,withBorder:!1})},N.hide=t=>{O.notifications.hide(t)},N.clean=()=>{O.notifications.clean()};const G={"Toggle--Small":"styles-module__Toggle--Small___sOjUd","Toggle--Medium":"styles-module__Toggle--Medium___yIb8v","Toggle--Large":"styles-module__Toggle--Large___ZOJj1"},Ne=({size:t="md",labelPosition:s="right",disabled:r,onChange:e,...o})=>{const[l,n]=m.useState(o?.checked||!1);let c=G["Toggle--Medium"],d=50;t==="sm"?(c=G["Toggle--Small"],d=38):t==="lg"&&(c=G["Toggle--Large"],d=67);const h=m.useCallback(u=>{e&&e(u),n(u?.target?.checked)},[e]);return a.jsx(x.Switch,{className:c,size:t,labelPosition:s,disabled:r,onChange:h,styles:()=>({track:{backgroundColor:!r&&l?"#0fd3d8 !important":void 0,borderColor:!r&&l?"#0fd3d8 !important":void 0,width:d}}),...o})},q={Tooltip__Body:"styles-module__Tooltip__Body___i1OTG",Tooltip__Title:"styles-module__Tooltip__Title___E0LoV",Tooltip__Content:"styles-module__Tooltip__Content___lU5gr"},Oe=({title:t,content:s,maw:r=280,multiline:e=!0,...o})=>a.jsx(x.Tooltip,{...o,maw:r,multiline:e,label:a.jsxs("div",{className:q.Tooltip__Body,children:[t&&a.jsx("span",{className:q.Tooltip__Title,children:t}),a.jsx("span",{className:q.Tooltip__Content,children:s})]})}),$e=t=>{const{name:s,icon:r}=t;return`
|
|
2
|
+
<div class="pin-marker">
|
|
3
|
+
${r?`<img src="${r}" alt="${s}" width="40" height="40" />`:`
|
|
4
|
+
<svg width="36" height="36" viewBox="0 0 36 36" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
5
|
+
<g>
|
|
6
|
+
<path d="M18.7686 1.26235C11.6407 0.936128 5.75293 6.62941 5.75293 13.6913C5.75293 22.565 11.76 30.0415 15.1594 33.4869C16.8117 35.1766 19.5261 35.1761 21.1779 33.4854C24.318 30.2845 29.8102 23.653 30.5636 15.5539L30.5637 15.5531C31.2237 8.38935 26.1199 1.59187 18.7686 1.26235ZM18.7686 1.26235L18.7229 2.26131L18.7676 1.2623C18.768 1.26232 18.7683 1.26234 18.7686 1.26235Z" fill="#FF6C6C" stroke="white" stroke-width="2" stroke-miterlimit="10"/>
|
|
7
|
+
<path d="M18.4084 18.2387C20.8523 18.2387 22.8334 16.2575 22.8334 13.8137C22.8334 11.3698 20.8523 9.38867 18.4084 9.38867C15.9645 9.38867 13.9834 11.3698 13.9834 13.8137C13.9834 16.2575 15.9645 18.2387 18.4084 18.2387Z" fill="white"/>
|
|
8
|
+
</g>
|
|
9
|
+
</svg>
|
|
10
|
+
`}
|
|
11
|
+
<div class="pin-marker-name">${s}</div>
|
|
12
|
+
</div>
|
|
13
|
+
`},ze=t=>{const{discountRate:s,price:r,originalPrice:e,category:o,active:l,title:n}=t;return`
|
|
14
|
+
<div class="popdeal-marker" active="${!!l}">
|
|
15
|
+
<div class="popdeal-marker-section">
|
|
16
|
+
<div class="popdeal-marker-section-header">
|
|
17
|
+
<span class="popdeal-marker-title">${n}</span>
|
|
18
|
+
${o?`<span class="popdeal-marker-category">${o}</span>`:""}
|
|
19
|
+
</div>
|
|
20
|
+
<div class="popdeal-marker-section-price">
|
|
21
|
+
${e?`<span class="popdeal-marker-original_price">${e.toLocaleString()}원</span>`:""}
|
|
22
|
+
${s?`<span class="popdeal-marker-discount_rate">${s}%</span>`:""}
|
|
23
|
+
<span class="popdeal-marker-discounted_price">${r.toLocaleString()}원</span>
|
|
24
|
+
</div>
|
|
25
|
+
</div>
|
|
26
|
+
</div>
|
|
27
|
+
`},He=t=>{const{title:s,icon:r}=t;return`
|
|
28
|
+
<div class="pi-marker">
|
|
29
|
+
${r?`<img class="pi-marker-icon" src="${r}" alt="" width="32px" height="32px" />`:""}
|
|
30
|
+
<span class="pi-marker-text">${s}</span>
|
|
31
|
+
</div>
|
|
32
|
+
`},We=t=>{const{title:s,icon:r,address:e}=t;return`
|
|
33
|
+
<div class="pi-expanded-marker">
|
|
34
|
+
${r?`<img class="pi-expanded-marker-icon" src="${r}" alt="" width="32px" height="32px" />`:""}
|
|
35
|
+
<div class="pi-expanded-marker-content">
|
|
36
|
+
<div class="pi-expanded-marker-title">${s}</div>
|
|
37
|
+
${e?`<div class="pi-expanded-marker-address">${e}</div>`:""}
|
|
38
|
+
</div>
|
|
39
|
+
</div>
|
|
40
|
+
`},Ue=t=>`
|
|
41
|
+
<div class="cluster-marker">
|
|
42
|
+
<span class="cluster-marker-text">${t.count}</span>
|
|
43
|
+
</div>
|
|
44
|
+
`,J=t=>{switch(t.type){case"pin":return $e(t);case"popdeal":return ze(t);case"pi":return He(t);case"pi-expanded":return We(t);case"cluster":return Ue(t);default:return""}},oe=`
|
|
45
|
+
/* Common marker styles */
|
|
46
|
+
[class$="marker"] {
|
|
47
|
+
user-select: none;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
/* Pin Marker */
|
|
51
|
+
.pin-marker {
|
|
52
|
+
position: relative;
|
|
53
|
+
z-index: 10;
|
|
54
|
+
transform: translate(-50%, -100%);
|
|
55
|
+
display: flex;
|
|
56
|
+
flex-direction: column;
|
|
57
|
+
align-items: center;
|
|
58
|
+
justify-content: center;
|
|
59
|
+
gap: 8px;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
.pin-marker-name {
|
|
63
|
+
min-width: max-content;
|
|
64
|
+
color: #1A1A1A;
|
|
65
|
+
text-align: center;
|
|
66
|
+
font-weight: 700;
|
|
67
|
+
font-size: 14px;
|
|
68
|
+
line-height: 1.4;
|
|
69
|
+
text-shadow:
|
|
70
|
+
-2px -2px 0 white,
|
|
71
|
+
2px -2px 0 white,
|
|
72
|
+
-2px 2px 0 white,
|
|
73
|
+
2px 2px 0 white;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
/* Popdeal Marker */
|
|
77
|
+
.popdeal-marker {
|
|
78
|
+
transform: translate(-50%, -100%);
|
|
79
|
+
padding: 10px 16px;
|
|
80
|
+
width: fit-content;
|
|
81
|
+
max-width: 210px;
|
|
82
|
+
position: relative;
|
|
83
|
+
display: flex;
|
|
84
|
+
flex-direction: column;
|
|
85
|
+
justify-content: center;
|
|
86
|
+
align-items: center;
|
|
87
|
+
gap: 4px;
|
|
88
|
+
transition: border-color 0.2s ease-in-out;
|
|
89
|
+
word-break: keep-all;
|
|
90
|
+
background: white;
|
|
91
|
+
box-shadow: 0px 4px 12px rgba(0, 0, 0, 0.12);
|
|
92
|
+
border-radius: 12px;
|
|
93
|
+
color: #3D3D3D;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
.popdeal-marker:hover {
|
|
97
|
+
z-index: 10;
|
|
98
|
+
filter: drop-shadow(0px 4px 12px rgba(0, 0, 0, 0.12));
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
.popdeal-marker::after {
|
|
102
|
+
content: "";
|
|
103
|
+
display: block;
|
|
104
|
+
width: 12px;
|
|
105
|
+
height: 12px;
|
|
106
|
+
position: absolute;
|
|
107
|
+
bottom: -7px;
|
|
108
|
+
left: 50%;
|
|
109
|
+
right: 50%;
|
|
110
|
+
background: white;
|
|
111
|
+
transform: translate(-50%) rotate(45deg);
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
.popdeal-marker[active="true"] {
|
|
115
|
+
z-index: 10;
|
|
116
|
+
border: 2px solid #00C4C4;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
.popdeal-marker[active="true"]::after {
|
|
120
|
+
border-right: 2px solid #00C4C4;
|
|
121
|
+
border-bottom: 2px solid #00C4C4;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
.popdeal-marker[active="false"] {
|
|
125
|
+
border: 1px solid #F5F5F5;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
.popdeal-marker[active="false"]::after {
|
|
129
|
+
border-right: 1px solid #F5F5F5;
|
|
130
|
+
border-bottom: 1px solid #F5F5F5;
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
.popdeal-marker-section {
|
|
134
|
+
display: flex;
|
|
135
|
+
flex-direction: column;
|
|
136
|
+
justify-content: center;
|
|
137
|
+
align-items: center;
|
|
138
|
+
gap: 0;
|
|
139
|
+
flex-wrap: nowrap;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
.popdeal-marker-section-header {
|
|
143
|
+
display: flex;
|
|
144
|
+
justify-content: center;
|
|
145
|
+
align-items: center;
|
|
146
|
+
gap: 4px;
|
|
147
|
+
flex-wrap: nowrap;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
.popdeal-marker-section-price {
|
|
151
|
+
display: flex;
|
|
152
|
+
justify-content: center;
|
|
153
|
+
align-items: center;
|
|
154
|
+
gap: 0 4px;
|
|
155
|
+
flex-wrap: wrap;
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
.popdeal-marker-title {
|
|
159
|
+
font-weight: 700;
|
|
160
|
+
font-size: 14px;
|
|
161
|
+
text-align: center;
|
|
162
|
+
width: 100%;
|
|
163
|
+
display: -webkit-box;
|
|
164
|
+
-webkit-line-clamp: 2;
|
|
165
|
+
-webkit-box-orient: vertical;
|
|
166
|
+
overflow: hidden;
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
.popdeal-marker-discount_rate {
|
|
170
|
+
color: #00C4C4;
|
|
171
|
+
font-weight: 600;
|
|
172
|
+
font-size: 14px;
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
.popdeal-marker-discounted_price {
|
|
176
|
+
color: #3D3D3D;
|
|
177
|
+
font-weight: 600;
|
|
178
|
+
font-size: 14px;
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
.popdeal-marker-original_price {
|
|
182
|
+
width: 100%;
|
|
183
|
+
color: #B3B3B3;
|
|
184
|
+
text-align: center;
|
|
185
|
+
font-size: 14px;
|
|
186
|
+
text-decoration: line-through;
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
.popdeal-marker-category {
|
|
190
|
+
color: #6E6E6E;
|
|
191
|
+
font-weight: 600;
|
|
192
|
+
font-size: 12px;
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
.popdeal-marker-category::before {
|
|
196
|
+
content: "|";
|
|
197
|
+
color: #B3B3B3;
|
|
198
|
+
margin-right: 4px;
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
/* PI Marker */
|
|
202
|
+
.pi-marker {
|
|
203
|
+
transform: translate(-50%, -50%);
|
|
204
|
+
z-index: 10;
|
|
205
|
+
position: relative;
|
|
206
|
+
display: flex;
|
|
207
|
+
flex-direction: column;
|
|
208
|
+
align-items: center;
|
|
209
|
+
justify-content: center;
|
|
210
|
+
gap: 4px;
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
.pi-marker-icon {
|
|
214
|
+
width: 32px;
|
|
215
|
+
height: 32px;
|
|
216
|
+
object-fit: cover;
|
|
217
|
+
border-radius: 50%;
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
.pi-marker-text {
|
|
221
|
+
position: absolute;
|
|
222
|
+
top: calc(100% + 5px);
|
|
223
|
+
left: 50%;
|
|
224
|
+
transform: translateX(-50%);
|
|
225
|
+
min-width: max-content;
|
|
226
|
+
padding: 4px 8px;
|
|
227
|
+
background: white;
|
|
228
|
+
font-size: 12px;
|
|
229
|
+
border-radius: 99px;
|
|
230
|
+
color: #3D3D3D;
|
|
231
|
+
box-shadow: 0 0.432px 0.864px 0 rgba(0, 0, 0, 0.28);
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
/* PI Expanded Marker */
|
|
235
|
+
.pi-expanded-marker {
|
|
236
|
+
transform: translate(-50%, -50%);
|
|
237
|
+
z-index: 100;
|
|
238
|
+
position: relative;
|
|
239
|
+
display: flex;
|
|
240
|
+
flex-direction: column;
|
|
241
|
+
align-items: center;
|
|
242
|
+
justify-content: center;
|
|
243
|
+
gap: 4px;
|
|
244
|
+
filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.12));
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
.pi-expanded-marker-icon {
|
|
248
|
+
width: 32px;
|
|
249
|
+
height: 32px;
|
|
250
|
+
object-fit: cover;
|
|
251
|
+
border-radius: 50%;
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
.pi-expanded-marker-content {
|
|
255
|
+
position: absolute;
|
|
256
|
+
bottom: calc(100% + 10px);
|
|
257
|
+
left: 50%;
|
|
258
|
+
transform: translateX(-50%);
|
|
259
|
+
width: max-content;
|
|
260
|
+
max-width: 200px;
|
|
261
|
+
padding: 16px;
|
|
262
|
+
word-break: keep-all;
|
|
263
|
+
display: flex;
|
|
264
|
+
flex-direction: column;
|
|
265
|
+
align-items: center;
|
|
266
|
+
justify-content: center;
|
|
267
|
+
background: white;
|
|
268
|
+
border-radius: 8px;
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
.pi-expanded-marker-title {
|
|
272
|
+
font-weight: 600;
|
|
273
|
+
font-size: 14px;
|
|
274
|
+
text-align: center;
|
|
275
|
+
color: #1A1A1A;
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
.pi-expanded-marker-address {
|
|
279
|
+
font-size: 14px;
|
|
280
|
+
color: #6E6E6E;
|
|
281
|
+
width: 100%;
|
|
282
|
+
text-align: center;
|
|
283
|
+
}
|
|
284
|
+
|
|
285
|
+
/* Cluster Marker */
|
|
286
|
+
.cluster-marker {
|
|
287
|
+
width: fit-content;
|
|
288
|
+
min-width: 52px;
|
|
289
|
+
height: 36px;
|
|
290
|
+
padding: 13px;
|
|
291
|
+
position: relative;
|
|
292
|
+
display: flex;
|
|
293
|
+
align-items: center;
|
|
294
|
+
justify-content: center;
|
|
295
|
+
border-radius: 12px;
|
|
296
|
+
background: #00C4C4;
|
|
297
|
+
box-shadow: 0px 4px 12px rgba(0, 0, 0, 0.12);
|
|
298
|
+
transform: translate(-50%, -50%);
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
.cluster-marker-text {
|
|
302
|
+
font-weight: 700;
|
|
303
|
+
font-size: 15px;
|
|
304
|
+
color: white;
|
|
305
|
+
}
|
|
306
|
+
|
|
307
|
+
.cluster-marker::after {
|
|
308
|
+
content: "";
|
|
309
|
+
display: block;
|
|
310
|
+
width: 12px;
|
|
311
|
+
height: 12px;
|
|
312
|
+
position: absolute;
|
|
313
|
+
bottom: -2px;
|
|
314
|
+
left: 50%;
|
|
315
|
+
right: 50%;
|
|
316
|
+
background: #00C4C4;
|
|
317
|
+
transform: translate(-50%) rotate(45deg);
|
|
318
|
+
}
|
|
319
|
+
`,se=m.createContext(null),ne="naver-map-script",Ze=(t,s)=>new Promise((r,e)=>{if(typeof window<"u"&&window.naver?.maps){r();return}const o=document.getElementById(ne);if(o){o.addEventListener("load",()=>r()),o.addEventListener("error",()=>e(new Error("Failed to load Naver Map script")));return}const l=document.createElement("script");l.id=ne,l.src=`https://oapi.map.naver.com/openapi/v3/maps.js?ncpKeyId=${t}&language=${s}`,l.async=!0,l.onload=()=>{r()},l.onerror=()=>{e(new Error("Failed to load Naver Map script"))},document.head.appendChild(l)}),le=({clientId:t,language:s="ko",children:r})=>{const[e,o]=m.useState(null),[l,n]=m.useState({}),[c,d]=m.useState(null);m.useEffect(()=>{typeof window>"u"||Ze(t,s).then(()=>{window.naver&&o(window.naver)}).catch(u=>{console.error("Naver Map script loading failed:",u),d(u)})},[t,s]);const h=m.useCallback((u,_)=>{const g=e||(typeof window<"u"?window.naver:null);if(!g||(!e&&window.naver&&o(window.naver),!u.current))return null;const p=u.current;if(!p.isConnected)return null;try{const C={center:new g.maps.LatLng(37.5665,126.978),zoom:11,maxZoom:20,minZoom:11,mapTypeControl:!1,scaleControl:!1,logoControl:!1,mapDataControl:!1,zoomControl:!1,..._},y=new g.maps.Map(p,C);return n(T=>{const B=p.getAttribute("id")||"default";return{...T,[B]:y}}),y}catch(C){return console.error("Map creation error:",C),null}},[e]);return c&&console.error("NaverMapProvider error:",c),a.jsx(se.Provider,{value:{naver:e,createMap:h,maps:l},children:r})},K=()=>{const t=m.useContext(se);if(!t)throw new Error("useNaverMap must be used within NaverMapProvider");return t};function ae(t){const s=function(e){this.DEFAULT_OPTIONS={map:null,markers:[],disableClickZoom:!0,minClusterSize:2,maxZoom:13,gridSize:100,icons:[],indexGenerator:[10,100,200,500,1e3],averageCenter:!1,stylingFunction:function(){}},this._clusters=[],this._mapRelations=null,this._markerRelations=[],this.setOptions(t.maps.Util.extend({},this.DEFAULT_OPTIONS,e),!0),this.setMap(e.map||null)};t.maps.Util.ClassExtend(s,t.maps.OverlayView,{onAdd:function(){const e=this.getMap();this._mapRelations=t.maps.Event.addListener(e,"idle",t.maps.Util.bind(this._onIdle,this)),this.getMarkers().length>0&&(this._createClusters(),this._updateClusters())},draw:t.maps.Util.noop,onRemove:function(){t.maps.Event.removeListener(this._mapRelation),this._clearClusters(),this._geoTree=null,this._mapRelation=null},setOptions:function(e){const o=this;if(typeof e=="string"){const l=e,n=arguments[1];o.set(l,n)}else{const l=arguments[1];t.maps.Util.forEach(e,function(n,c){c!=="map"&&o.set(c,n)}),e.map&&!l&&o.setMap(e.map)}},getOptions:function(e){const o=this,l={};return e!==void 0?o.get(e):(t.maps.Util.forEach(o.DEFAULT_OPTIONS,function(n,c){l[c]=o.get(c)}),l)},getMinClusterSize:function(){return this.getOptions("minClusterSize")},setMinClusterSize:function(e){this.setOptions("minClusterSize",e)},getMaxZoom:function(){return this.getOptions("maxZoom")},setMaxZoom:function(e){this.setOptions("maxZoom",e)},getGridSize:function(){return this.getOptions("gridSize")},setGridSize:function(e){this.setOptions("gridSize",e)},getIndexGenerator:function(){return this.getOptions("indexGenerator")},setIndexGenerator:function(e){this.setOptions("indexGenerator",e)},getMarkers:function(){return this.getOptions("markers")},setMarkers:function(e){this.setOptions("markers",e)},getIcons:function(){return this.getOptions("icons")},setIcons:function(e){this.setOptions("icons",e)},getStylingFunction:function(){return this.getOptions("stylingFunction")},setStylingFunction:function(e){this.setOptions("stylingFunction",e)},getDisableClickZoom:function(){return this.getOptions("disableClickZoom")},setDisableClickZoom:function(e){this.setOptions("disableClickZoom",e)},getAverageCenter:function(){return this.getOptions("averageCenter")},setAverageCenter:function(e){this.setOptions("averageCenter",e)},changed:function(e,o){if(this.getMap())switch(e){case"marker":case"minClusterSize":case"gridSize":case"averageCenter":this._redraw();break;case"indexGenerator":case"icons":this._clusters.forEach(function(n){n.updateIcon()});break;case"maxZoom":this._clusters.forEach(function(n){n.getCount()>1&&n.checkByZoomAndMinClusterSize()});break;case"stylingFunction":this._clusters.forEach(function(n){n.updateCount()});break;case"disableClickZoom":let l="enableClickZoom";o&&(l="disableClickZoom"),this._clusters.forEach(function(n){n[l]()});break}},_createClusters:function(){const e=this.getMap();if(!e)return;const o=e.getBounds(),l=this.getMarkers();for(let n=0,c=l.length;n<c;n++){const d=l[n],h=d.getPosition();if(!o.hasLatLng(h))continue;this._getClosestCluster(h).addMarker(d),this._markerRelations.push(t.maps.Event.addListener(d,"dragend",t.maps.Util.bind(this._onDragEnd,this)))}},_updateClusters:function(){const e=this._clusters;for(let o=0,l=e.length;o<l;o++)e[o].updateCluster()},_clearClusters:function(){const e=this._clusters;for(let o=0,l=e.length;o<l;o++)e[o].destroy();t.maps.Event.removeListener(this._markerRelations),this._markerRelations=[],this._clusters=[]},_redraw:function(){this._clearClusters(),this._createClusters(),this._updateClusters()},_getClosestCluster:function(e){const o=this.getProjection(),l=this._clusters;let n=null,c=1/0;for(let d=0,h=l.length;d<h;d++){const u=l[d],_=u.getCenter();if(u.isInBounds(e)){const g=o.getDistance(_,e);g<c&&(c=g,n=u)}}return n||(n=new r(this),this._clusters.push(n)),n},_onIdle:function(){this._redraw()},_onDragEnd:function(){this._redraw()}});const r=function(e){this._clusterCenter=null,this._clusterBounds=null,this._clusterMarker=null,this._relation=null,this._clusterMember=[],this._markerClusters=e};return r.prototype={constructor:r,addMarker:function(e){if(!this._isMember(e)){if(!this._clusterCenter){const o=e.getPosition();this._clusterCenter=o,this._clusterBounds=this._calcBounds(o)}this._clusterMember.push(e)}},destroy:function(){t.maps.Event.removeListener(this._relation);const e=this._clusterMember;for(let o=0,l=e.length;o<l;o++)e[o].setMap(null);this._clusterMarker.setMap(null),this._clusterMarker=null,this._clusterCenter=null,this._clusterBounds=null,this._relation=null,this._clusterMember=[]},getCenter:function(){return this._clusterCenter},getBounds:function(){return this._clusterBounds},getCount:function(){return this._clusterMember.length},getClusterMember:function(){return this._clusterMember},isInBounds:function(e){return this._clusterBounds&&this._clusterBounds.hasLatLng(e)},enableClickZoom:function(){if(this._relation)return;const e=this._markerClusters.getMap();this._relation=t.maps.Event.addListener(this._clusterMarker,"click",t.maps.Util.bind(function(o){e.morph(o.coord,e.getZoom()+1)},this))},disableClickZoom:function(){this._relation&&(t.maps.Event.removeListener(this._relation),this._relation=null)},updateCluster:function(){if(!this._clusterMarker){let e;this._markerClusters.getAverageCenter()?e=this._calcAverageCenter(this._clusterMember):e=this._clusterCenter,this._clusterMarker=new t.maps.Marker({position:e,map:this._markerClusters.getMap()}),this._markerClusters.getDisableClickZoom()||this.enableClickZoom()}this.updateIcon(),this.updateCount(),this.checkByZoomAndMinClusterSize()},checkByZoomAndMinClusterSize:function(){const e=this._markerClusters,o=e.getMinClusterSize(),l=e.getMaxZoom(),n=e.getMap().getZoom();this.getCount()<o?this._showMember():(this._hideMember(),l<=n&&this._showMember())},updateCount:function(){const e=this._markerClusters.getStylingFunction();e&&e(this._clusterMarker,this.getCount())},updateIcon:function(){const e=this.getCount();let o=this._getIndex(e);const l=this._markerClusters.getIcons();o=Math.max(o,0),o=Math.min(o,l.length-1),this._clusterMarker.setIcon(l[o])},_showMember:function(){const e=this._markerClusters.getMap(),o=this._clusterMarker,l=this._clusterMember;for(let n=0,c=l.length;n<c;n++)l[n].setMap(e);o&&o.setMap(null)},_hideMember:function(){const e=this._markerClusters.getMap(),o=this._clusterMarker,l=this._clusterMember;for(let n=0,c=l.length;n<c;n++)l[n].setMap(null);o&&!o.getMap()&&o.setMap(e)},_calcBounds:function(e){const o=this._markerClusters.getMap(),l=new t.maps.LatLngBounds(e.clone(),e.clone()),n=o.getBounds(),c=o.getProjection(),d=c.fromCoordToOffset(n.getNE()),h=c.fromCoordToOffset(n.getSW()),u=c.fromCoordToOffset(l.getNE()),_=c.fromCoordToOffset(l.getSW()),g=this._markerClusters.getGridSize()/2;u.add(g,-g),_.add(-g,g);const p=Math.min(d.x,u.x),C=Math.max(d.y,u.y),y=Math.max(h.x,_.x),T=Math.min(h.y,_.y),B=c.fromOffsetToCoord(new t.maps.Point(p,C)),S=c.fromOffsetToCoord(new t.maps.Point(y,T));return new t.maps.LatLngBounds(S,B)},_getIndex:function(e){const o=this._markerClusters.getIndexGenerator();if(t.maps.Util.isFunction(o))return o(e);if(t.maps.Util.isArray(o)){let l=0;for(let n=0,c=o.length;n<c;n++){const d=o[n];if(e<d)break;l++}return l}return 0},_isMember:function(e){return this._clusterMember.indexOf(e)!==-1},_calcAverageCenter:function(e){const o=e.length,l=[0,0];for(let n=0;n<o;n++)l[0]+=e[n].position.x,l[1]+=e[n].position.y;return l[0]/=o,l[1]/=o,new t.maps.Point(l[0],l[1])}},s}const ie=t=>{const{naver:s}=K(),[r,e]=m.useState([]),o=m.useRef(new Map),l=m.useRef(null),n=m.useCallback(_=>{if(!t||!s)return null;const g=J(_),p=new s.maps.Marker({..._,position:new s.maps.LatLng(_.position.latitude,_.position.longitude),map:t,icon:{content:g}});return _.onClick&&s.maps.Event.addListener(p,"click",()=>{_.onClick(_.id)}),e(C=>[...C,p]),o.current.set(_.id,{marker:p,data:_}),p},[t,s]),c=m.useCallback((_,g)=>{const p=o.current.get(_);if(!p||!s)return;const{marker:C,data:y}=p,T={...y,...g},B=C.getElement();if(B){const S=B.querySelector(".popdeal-marker");S&&"active"in g&&S.setAttribute("active",String(!!g.active))}o.current.set(_,{marker:C,data:T})},[s]),d=m.useCallback(()=>{r.forEach(_=>{_&&_.setMap(null)}),e([]),o.current.clear(),l.current&&(l.current.setMap(null),l.current=null)},[r]),h=m.useCallback(_=>{!t||!s||t.panTo(new s.maps.LatLng(_.latitude,_.longitude))},[t,s]),u=m.useCallback(_=>{if(!t||!s||_.length===0)return;const g=new s.maps.LatLngBounds(new s.maps.LatLng(_[0].latitude,_[0].longitude),new s.maps.LatLng(_[0].latitude,_[0].longitude));_.forEach(p=>{g.extend(new s.maps.LatLng(p.latitude,p.longitude))}),t.fitBounds(g)},[t,s]);return m.useEffect(()=>{if(!s||!t||r.length===0)return;const _=ae(s),p={content:J({type:"cluster",count:0}),size:new s.maps.Size(96,96),anchor:new s.maps.Point(20,20)},C=new _({minClusterSize:2,maxZoom:17,map:t,markers:r,disableClickZoom:!1,gridSize:120,icons:[p],indexGenerator:[10,100,200,500,1e3],averageCenter:!1,stylingFunction:(y,T)=>{if(y&&typeof y.getElement=="function"){const B=y.getElement().querySelector(".cluster-marker-text");B&&(B.textContent=String(T))}}});return l.current=C,()=>{C.setMap(null)}},[s,t,r]),{addMarker:n,updateMarker:c,clearMarkers:d,panTo:h,fitBounds:u}},Q=({options:t,onLoad:s})=>{const r=m.useRef(null),e=m.useRef(null),{createMap:o}=K(),[l,n]=m.useState(null),c=ie(l),{width:d="100%",height:h="100%",...u}=t||{},_=m.useMemo(()=>u,[JSON.stringify(u)]);return m.useEffect(()=>{if(typeof document>"u"||document.getElementById("pop-ui-map-marker-styles"))return;const p=document.createElement("style");return p.id="pop-ui-map-marker-styles",p.textContent=oe,document.head.appendChild(p),e.current=p,()=>{}},[]),m.useEffect(()=>{let g=null,p=null;if(l&&(l.destroy(),n(null)),r.current&&r.current.isConnected){const C=()=>r.current&&r.current.isConnected&&(g=o(r,_),g)?(n(g),!0):!1;if(!C()){let y=0;const T=50;p=setInterval(()=>{y++,(C()||y>=T)&&p&&(clearInterval(p),p=null)},100)}return()=>{p&&clearInterval(p),g&&(g.destroy(),g=null)}}return()=>{p&&clearInterval(p),g&&(g.destroy(),g=null)}},[o,_]),m.useEffect(()=>{l&&s&&s({map:l,...c})},[l,s,c]),a.jsx("div",{ref:r,style:{width:typeof d=="number"?`${d}px`:d,height:typeof h=="number"?`${h}px`:h}})};Q.displayName="Map";const Ye="위치 정보를 불러오는 데 실패했어요.",Ve="위치 서비스 권한과 네트워크 상태를 확인해주세요.",je=({isActive:t=!1,errorMessage:s=Ye,errorDescription:r=Ve})=>{const[e,o]=m.useState(!1),[l,n]=m.useState(!1),[c,d]=m.useState(null),h=m.useRef(!1);return m.useEffect(()=>{if(t&&typeof navigator<"u"&&"geolocation"in navigator){if(h.current)return;h.current=!0,requestAnimationFrame(()=>{o(!0)});const u={enableHighAccuracy:!0,timeout:1e4,maximumAge:0};navigator.geolocation.getCurrentPosition(_=>{d({latitude:_.coords.latitude,longitude:_.coords.longitude}),o(!1),n(!1),h.current=!1},_=>{d(null),console.error("Geolocation error:",_),N({message:`${s} ${r}`}),o(!1),n(!0),h.current=!1},u)}},[t,s,r]),{position:c,isLoading:e,isError:l}},ce=(t="light")=>{const s=[];return Object.entries(i.colors).forEach(([r,e])=>{Object.entries(e).forEach(([o,l])=>{const n=i.getCSSVariableName(r,o);s.push(`${n}: ${l};`)})}),s.join(`
|
|
320
|
+
`)},Ge=(t="light")=>{const s=document.getElementById("pop-ui-theme-vars");s&&s.remove();const r=document.createElement("style");r.id="pop-ui-theme-vars",r.textContent=`
|
|
3
321
|
:root {
|
|
4
|
-
${
|
|
322
|
+
${ce("light")}
|
|
5
323
|
}
|
|
6
324
|
|
|
7
325
|
[data-theme="dark"] {
|
|
8
|
-
${
|
|
326
|
+
${ce("dark")}
|
|
9
327
|
}
|
|
10
|
-
`,document.head.appendChild(
|
|
328
|
+
`,document.head.appendChild(r)},D=t=>{const s=i.colors[t],r=Object.keys(s).sort((o,l)=>Number(o)-Number(l));return[i.getCSSVariableRef(t,r[0]||r[r.length-1]),i.getCSSVariableRef(t,r[1]||r[r.length-1]),i.getCSSVariableRef(t,r[2]||r[r.length-1]),i.getCSSVariableRef(t,r[3]||r[r.length-1]),i.getCSSVariableRef(t,r[4]||r[r.length-1]),i.getCSSVariableRef(t,r[5]||r[r.length-1]),i.getCSSVariableRef(t,r[6]||r[r.length-1]),i.getCSSVariableRef(t,r[7]||r[r.length-1]),i.getCSSVariableRef(t,r[8]||r[r.length-1]),i.getCSSVariableRef(t,r[9]||r[r.length-1])]},qe=x.createTheme({colors:{gray:D("gray"),aqua:D("aqua"),red:D("red"),orange:D("orange"),yellow:D("yellow"),green:D("green"),blue:D("blue"),purple:D("purple"),grape:D("grape")},primaryColor:"aqua",primaryShade:5,fontFamily:'Pretendard, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif'}),de=m.createContext(void 0),_e=m.createContext({}),Je=({children:t,defaultTheme:s="light",naverClientId:r,notificationPosition:e="bottom-center",notificationLimit:o=5,notificationAutoClose:l,notificationZIndex:n})=>{const[c,d]=m.useState(s);m.useEffect(()=>{Ge(c),document.documentElement.setAttribute("data-theme",c)},[c]);const h=()=>{d(u=>u==="light"?"dark":"light")};return a.jsx(de.Provider,{value:{theme:c,setTheme:d,toggleTheme:h},children:a.jsx(_e.Provider,{value:{naverClientId:r},children:a.jsxs(x.MantineProvider,{theme:qe,children:[a.jsx(O.Notifications,{position:e,limit:o,autoClose:l,zIndex:n}),t]})})})},Ke=()=>{const t=m.useContext(de);if(!t)throw new Error("useTheme must be used within ThemeProvider");return t},Qe=()=>m.useContext(_e),I={MapInfo:"styles-module__MapInfo___scB-5",MapInfo__NoClientId:"styles-module__MapInfo__NoClientId___YBM4o",MapInfo__Preview:"styles-module__MapInfo__Preview___FJbQN",MapInfo__ExpandButton:"styles-module__MapInfo__ExpandButton___8KySg",MapInfo__AddressBar:"styles-module__MapInfo__AddressBar___mKkK6",MapInfo__AddressContent:"styles-module__MapInfo__AddressContent___XG1Uz",MapInfo__Address:"styles-module__MapInfo__Address___iXO6N",MapInfo__DirectionLink:"styles-module__MapInfo__DirectionLink___eGnf-",MapInfo__DirectionButton:"styles-module__MapInfo__DirectionButton___gTWpj"},Xe=60,Re=({location:t,marker:s,direction:r,toast:e,naverClientId:o,onExpandRequest:l,onClick:n,height:c=200})=>{const d=Qe(),h=o||d.naverClientId,{title:u,address:_,latitude:g,longitude:p}=t,C=r?.label??"길찾기",y=e?.addressCopied??"주소 복사 완료",[T,B]=m.useState(null),S=c-Xe,L=m.useCallback(M=>{M&&M.map&&B(M)},[]),W=m.useCallback(()=>{l?.()},[l]),E=m.useCallback((M,X,tt)=>{if(M&&M.map&&g&&p)try{M.addMarker(X),tt?.()}catch(rt){console.error("Error creating map marker:",rt)}},[g,p]),ue=m.useCallback((M,X)=>{M&&M.map&&g&&p&&(M.clearMarkers(),E(M,{id:`location-marker-${u}`,type:X,position:{latitude:g,longitude:p},title:u,icon:s?.imageUrl,address:_},()=>{M.panTo({latitude:g,longitude:p})}))},[g,p,u,s?.imageUrl,_,E]);m.useEffect(()=>{g&&p&&T&&ue(T,"pi")},[T,g,p,ue]),m.useEffect(()=>()=>{B(null)},[]);const pe=m.useCallback(()=>{typeof navigator<"u"&&navigator.clipboard&&(navigator.clipboard.writeText(_),N(y))},[_,y]),et=m.useMemo(()=>r?.url?r.url:`https://map.naver.com/p/search/${encodeURIComponent(u)}`,[r?.url,u]);return h?a.jsxs("div",{className:I.MapInfo,style:{height:c},onClick:n,children:[a.jsx(le,{clientId:h,children:a.jsxs("div",{className:I.MapInfo__Preview,onClick:W,children:[a.jsx(Q,{onLoad:L,options:{width:"100%",height:`${S}px`,center:{lat:g,lng:p},zoom:15,minZoom:15,maxZoom:15,draggable:!1,keyboardShortcuts:!1,mapTypeControl:!1,scaleControl:!1,logoControl:!1,mapDataControl:!1,zoomControl:!1}}),l&&a.jsx("div",{className:I.MapInfo__ExpandButton,children:a.jsx(i.IconMap,{color:i.ColorGray800,size:18})})]})}),a.jsxs("div",{className:I.MapInfo__AddressBar,children:[a.jsxs("div",{className:I.MapInfo__AddressContent,children:[a.jsx(i.IconMapMarker,{color:i.ColorAqua500,size:24,filled:!0}),a.jsx("span",{className:I.MapInfo__Address,onClick:pe,role:"button",tabIndex:0,onKeyDown:M=>M.key==="Enter"&&pe(),children:_})]}),a.jsx("a",{className:I.MapInfo__DirectionLink,href:et,target:"_blank",rel:"noreferrer",children:a.jsx(ee,{variant:"basic",size:"sm",className:I.MapInfo__DirectionButton,children:C})})]})]}):a.jsx("div",{className:I.MapInfo,style:{height:c},children:a.jsx("div",{className:I.MapInfo__NoClientId,children:"naverClientId가 필요합니다. PopUIProvider 또는 props로 전달해주세요."})})};f.Button=ee,f.CalendarDatePicker=ke,f.Checkbox=Ce,f.DatePicker=Me,f.Dropdown=Se,f.ImageUploader=we,f.Map=Q,f.MapInfo=Re,f.Modal=ve,f.NaverMapProvider=le,f.Pagination=Ie,f.PopUiProvider=Je,f.Radio=Le,f.SearchBar=Pe,f.SegmentButton=De,f.Tab=Fe,f.TextField=Ee,f.TimePicker=Ae,f.Toggle=Ne,f.Tooltip=Oe,f.getMarkerHTML=J,f.makeMarkerClustering=ae,f.markerStyles=oe,f.toast=N,f.useLocation=je,f.useMap=ie,f.useNaverMap=K,f.useTheme=Ke,Object.defineProperty(f,Symbol.toStringTag,{value:"Module"})});
|