@pop-ui/core 0.0.36 → 0.0.39
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 +1615 -609
- package/dist/core.umd.cjs +323 -5
- package/dist/types/index.d.ts +154 -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",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,u,i,O,H,v,tt,R){"use strict";const ue={primary:i.TextColorButtonTextPrimaryDefault,primaryLine:i.TextColorButtonTextPrimarylineDefault,basic:i.TextColorButtonTextBasicDefault,danger:i.TextColorButtonTextPrimaryDefault,setting:i.TextColorButtonTextPrimaryDefault,warning:i.TextColorButtonTextPrimaryDefault},pe={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"}}},me={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 ge(t,n){const r=pe[t];return{root:{...me[n],...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:n="md",variant:r="primary",isLoading:e=!1,disabled:o=!1,...l}){const s=u.useMemo(()=>ge(r,n),[r,n]),c=ue[r],d=u.useMemo(()=>{switch(n){case"lg":return 18;case"sm":return 14;case"md":default:return 16}},[n]);return a.jsx(x.Button,{type:"button",styles:s,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"},he=({size:t="md",...n})=>{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}},...n})},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"},fe=({excludedDays:t=[],excludedDates:n=[]})=>{const r=[],e=[];for(const s of n)typeof s=="string"?r.push(s):e.push(s);const o=r.map(s=>v(s)).filter(s=>s.isValid()).map(s=>s.format("YYYY-MM-DD")),l=e.map(([s,c])=>[v(s),v(c)]).filter(([s,c])=>s.isValid()&&c.isValid());return s=>{const c=v(s);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,g]of l)if((c.isSame(d,"day")||c.isAfter(d,"day"))&&(c.isSame(g,"day")||c.isBefore(g,"day")))return!0;return!1}},Ce=(t,n,r,e)=>{const o=v(t),l=v(n);for(const s of r)if(Array.isArray(s)){const c=v(s[0]),d=v(s[1]);if(!c.isValid()||!d.isValid())continue;if(!(l.isBefore(c,"day")||o.isAfter(d,"day")))return!0}for(const s of r)if(typeof s=="string"){const c=v(s);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 s=o;for(;s.isBefore(l,"day")||s.isSame(l,"day");){if(e.includes(s.day()))return!0;s=s.add(1,"day")}}return!1},A=(t="default")=>{switch(t){case"range":return[null,null];case"multiple":return[];default:return null}},te=(t="default",n)=>n==null?A(t):t==="range"?Array.isArray(n)?n:A("range"):t==="multiple"?Array.isArray(n)?n:A("multiple"):Array.isArray(n)?n[0]??null:n,xe=({type:t,externalValue:n,internalValue:r})=>n!==void 0?te(t,n):r!==void 0?te(t,r):A(t),ye=(t,n)=>{const r=(e,o)=>{const l=Object.keys(e).reduce((s,c)=>{const d=c,g=e[d],p=o[d],_=[g,p].filter(Boolean).join(" ");return _&&(s[d]=_),s},{});return Object.keys(o).forEach(s=>{const c=s,d=o[c];!(c in e)&&d&&(l[c]=d)}),l};return typeof n=="function"?(e,o,l)=>r(t,n(e,o,l)):typeof n=="object"&&n!==null&&!Array.isArray(n)?r(t,n):t},Te={levelsGroup:P.datePickerWrapper,calendarHeader:P.calendarHeader,calendarHeaderLevel:P.calendarHeaderLevel,calendarHeaderControl:P.calendarHeaderControl,month:P.month,day:P.day,monthRow:P.monthRow,weekday:P.weekday},Be=({excludedDates:t=[],excludedDays:n=[],type:r="default",value:e,onChange:o,highlightToday:l=!1,...s})=>{const[c,d]=u.useState(()=>e??A(r)),g=u.useMemo(()=>fe({excludedDays:n,excludedDates:t}),[n,t]),p=T=>{if(r==="range"&&Array.isArray(T)&&T.length===2){const[B,S]=T;if(B&&S&&Ce(B,S,t,n)){const I=A("range");d(I),o?.(I);return}}d(T),o?.(T)},_=xe({type:r,externalValue:e,internalValue:c}),h=u.useCallback(T=>{const B=v(T).date(),I=v(T).isSame(v(),"day")&&l;return a.jsxs(a.Fragment,{children:[B,I&&a.jsx("span",{className:P.todayIndicator,children:"오늘"})]})},[l]),{classNames:m,...C}=s,y=ye(Te,m);return a.jsx(H.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:p,weekendDays:[0],highlightToday:l,classNames:y,value:_,excludeDate:g,renderDay:h})},Z={"DatePicker--Small":"styles-module__DatePicker--Small___m8asv","DatePicker--Medium":"styles-module__DatePicker--Medium___Po2-B","DatePicker--Large":"styles-module__DatePicker--Large___oQ6EM"},ke=({size:t="md",type:n="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(H.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(H.DatePickerInput,{className:o,type:n,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"},be=({label:t,labelPosition:n="top",size:r="md",required:e,tooltip:o,tooltipPosition:l="top",errorMsg:s,description:c,...d})=>{const[g,p]=u.useState(!1);let _=w["Dropdown__Label--Medium"],h=w["Dropdown--Medium"],m=w["Dropdown__Tooltip--Medium"],C=18;return r==="sm"?(_=w["Dropdown__Label--Small"],h=w["Dropdown--Small"],m=w["Dropdown__Tooltip--Small"],C=14):r==="lg"&&(_=w["Dropdown__Label--Large"],h=w["Dropdown--Large"],m=w["Dropdown__Tooltip--Large"],C=24),a.jsxs("div",{className:n==="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:m,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:s,className:h,rightSection:g?a.jsx(i.IconChevronUp,{size:C}):a.jsx(i.IconChevronDown,{size:C}),onDropdownOpen:()=>p(!0),onDropdownClose:()=>p(!1),styles:{option:{"&[data-selected]":{"&, &:hover":{backgroundColor:"#e7e7e7",color:"#000000"}}}}}),c&&a.jsx(x.Input.Description,{className:w.Dropdown__Description,children:c}),s&&a.jsx(x.Input.Error,{className:w.Dropdown__ErrorMsg,children:s})]})]})},W={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"},Me=({width:t,height:n,defaultMsg:r="이미지 업로드",file:e,onDrop:o,showClearButton:l,onClear:s,...c})=>{const[d,g]=u.useState(e),p=u.useCallback(()=>{g(void 0),s&&s()},[s]);return a.jsxs("div",{className:W.ImageUploader__Wrapper,children:[l&&d?a.jsx("div",{className:W.ImageUploader__FileClearButton,onClick:p,children:a.jsx(i.IconCloseCircle,{size:24})}):null,a.jsx(R.Dropzone,{...c,maxFiles:1,className:W.ImageUploader,accept:R.IMAGE_MIME_TYPE,onDrop:_=>{g(_[0]),o&&o(_)},style:{width:t,height:n},children:a.jsx(a.Fragment,{children:d?a.jsx("img",{className:W.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})]})})})]})},Se=({size:t="md",width:n,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:n||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"},we=({currentPageIdx:t,rowsPerPage:n,totalLength:r,paginationSize:e,onPageChange:o,...l})=>{const[s,c]=u.useState(t),d=n||50,g=r||1,p=e||5;u.useEffect(()=>{c(t)},[t]);const _=()=>{o&&o(s-(s%p+1)),c(m=>m-(m%p+1))},h=()=>{o&&o(s+p-s%p),c(m=>m+p-m%p)};return a.jsxs("div",{...l,className:$.Pagination,children:[s>=p?a.jsx("button",{className:$.Pagination__Arrow,onClick:_,children:a.jsx(i.IconChevronLeft,{size:20})}):null,new Array(p).fill(0).map((m,C)=>{const y=Math.floor(s/p)*p+C+1;if(!(y>Math.ceil(g/d)))return a.jsx("button",{className:s===y-1?$["Pagination__PageIndex--Active"]:$.Pagination__PageIndex,onClick:()=>{c(y-1),o&&o(y-1)},children:y},`pagination_${C}`)}),Math.floor(s/p)*p+p<Math.ceil(g/d)?a.jsx("button",{className:$.Pagination__Arrow,onClick:h,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"},ve=({size:t="md",...n})=>{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,...n})},b={"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"},Ie=({label:t,labelPosition:n="top",size:r="md",required:e,tooltip:o,tooltipPosition:l="top",errorMsg:s,description:c,onChange:d,onClear:g,...p})=>{const[_,h]=u.useState(0);let m=b["SearchBar__Label--Medium"],C=b["SearchBar--Medium"],y=b["SearchBar__Tooltip--Medium"];r==="sm"?(m=b["SearchBar__Label--Small"],C=b["SearchBar--Small"],y=b["SearchBar__Tooltip--Small"]):r==="lg"&&(m=b["SearchBar__Label--Large"],C=b["SearchBar--Large"],y=b["SearchBar__Tooltip--Large"]);const T=u.useCallback(B=>{d&&(h(B?.length),d(B))},[d]);return a.jsxs("div",{className:n==="top"?b["SearchBar--TopLabel"]:b["SearchBar--LeftLabel"],children:[a.jsxs("div",{children:[t&&a.jsx(x.Input.Label,{required:e,className:m,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:b.SearchBar__Wrapper,children:a.jsx(x.Autocomplete,{...p,size:r,error:s,className:C,onChange:T,leftSection:a.jsx(i.IconSearch,{size:r==="sm"?16:r==="lg"?24:20}),rightSection:g&&_>0?a.jsx("div",{className:b.SearchBar__ClearButton,onClick:g,children:a.jsx(i.IconClose,{size:r==="sm"?16:r==="lg"?24:20})}):void 0})}),c&&a.jsx(x.Input.Description,{className:b.SearchBar__Description,children:c}),s&&a.jsx(x.Input.Error,{className:b.SearchBar__ErrorMsg,children:s})]})]})},V={"SegmentButton--Small":"styles-module__SegmentButton--Small___o0Y3t","SegmentButton--Medium":"styles-module__SegmentButton--Medium___EgCJm","SegmentButton--Large":"styles-module__SegmentButton--Large___Ym86C"},Le=({size:t="md",radius:n=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:n,styles:{control:{borderWidth:"0 !important"}},...r})},re={Tab__TitleList:"styles-module__Tab__TitleList___urHWH",Tab__BorderBottom:"styles-module__Tab__BorderBottom___eMTpl"},Pe=({tabList:t=[],containerPaddingTop:n,...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:n,children:e.body},`tab_panel_${o}`))]}),k={"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"},De=t=>{const{label:n,labelPosition:r="top",size:e="md",required:o,tooltip:l,tooltipPosition:s="top",errorMsg:c,description:d,textarea:g=!1,maxTextCount:p,onChange:_,onClear:h,...m}=t,C="minRows"in t?t.minRows:void 0,[y,T]=u.useState(0);let B=k["TextField__Label--Medium"],S=k["TextField--Medium"],I=k["TextField__Tooltip--Medium"];e==="sm"?(B=k["TextField__Label--Small"],S=k["TextField--Small"],I=k["TextField__Tooltip--Small"]):e==="lg"&&(B=k["TextField__Label--Large"],S=k["TextField--Large"],I=k["TextField__Tooltip--Large"]);const z=u.useCallback(E=>{if(p){if(E.currentTarget?.value?.length>p)return;T(E.currentTarget?.value?.length),_&&_(E)}_&&(T(E.currentTarget?.value?.length),_(E))},[p,_]);return a.jsxs("div",{className:r==="top"?k["TextField--TopLabel"]:k["TextField--LeftLabel"],children:[a.jsxs("div",{children:[n&&a.jsx(x.Input.Label,{required:o,className:B,children:n}),l&&a.jsx(x.Tooltip,{label:l,position:s,children:a.jsx("div",{className:I,children:a.jsx(i.IconInfoCircle,{size:e==="sm"?14:e==="lg"?20:16})})})]}),a.jsxs("div",{children:[a.jsxs("div",{className:k.TextField__Wrapper,children:[g?a.jsx(x.Textarea,{className:k["TextField--Textarea"],size:e,minRows:C,error:c,onChange:z,disabled:m?.disabled,...m}):a.jsx(x.Input,{className:S,error:c,onChange:z,rightSection:h&&y>0?a.jsx("div",{className:k.TextField__ClearButton,onClick:h,children:a.jsx(i.IconClose,{size:e==="sm"?16:e==="lg"?24:20})}):void 0,...m}),p&&p>0&&a.jsx("span",{className:k.TextField__TextCounter,children:`${y}/${p}`})]}),d&&a.jsx(x.Input.Description,{className:k.TextField__Description,children:d}),c&&a.jsx(x.Input.Error,{className:k.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"},Fe=({size:t="md",...n})=>{const r=u.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(H.TimeInput,{ref:r,className:e,size:t,...n,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 n=typeof t=="string"?{message:t}:t,{message:r,id:e,icon:o,autoClose:l}=n;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,n)=>{const r=typeof n=="string"?{message:n}:n,{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"},Ee=({size:t="md",labelPosition:n="right",disabled:r,onChange:e,...o})=>{const[l,s]=u.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 g=u.useCallback(p=>{e&&e(p),s(p?.target?.checked)},[e]);return a.jsx(x.Switch,{className:c,size:t,labelPosition:n,disabled:r,onChange:g,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"},Ae=({title:t,content:n,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:n})]})}),Ne=t=>{const{name:n,icon:r}=t;return`
|
|
2
|
+
<div class="pin-marker">
|
|
3
|
+
${r?`<img src="${r}" alt="${n}" 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">${n}</div>
|
|
12
|
+
</div>
|
|
13
|
+
`},Oe=t=>{const{discountRate:n,price:r,originalPrice:e,category:o,active:l,title:s}=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">${s}</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
|
+
${n?`<span class="popdeal-marker-discount_rate">${n}%</span>`:""}
|
|
23
|
+
<span class="popdeal-marker-discounted_price">${r.toLocaleString()}원</span>
|
|
24
|
+
</div>
|
|
25
|
+
</div>
|
|
26
|
+
</div>
|
|
27
|
+
`},$e=t=>{const{title:n,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">${n}</span>
|
|
31
|
+
</div>
|
|
32
|
+
`},ze=t=>{const{title:n,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">${n}</div>
|
|
37
|
+
${e?`<div class="pi-expanded-marker-address">${e}</div>`:""}
|
|
38
|
+
</div>
|
|
39
|
+
</div>
|
|
40
|
+
`},He=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 Ne(t);case"popdeal":return Oe(t);case"pi":return $e(t);case"pi-expanded":return ze(t);case"cluster":return He(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=u.createContext(null),ne="naver-map-script",We=(t,n)=>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=${n}`,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:n="ko",children:r})=>{const[e,o]=u.useState(null),[l,s]=u.useState({}),[c,d]=u.useState(null);u.useEffect(()=>{typeof window>"u"||We(t,n).then(()=>{window.naver&&o(window.naver)}).catch(p=>{console.error("Naver Map script loading failed:",p),d(p)})},[t,n]);const g=u.useCallback((p,_)=>{const h=e||(typeof window<"u"?window.naver:null);if(!h||(!e&&window.naver&&o(window.naver),!p.current))return null;const m=p.current;if(!m.isConnected)return null;try{const C={center:new h.maps.LatLng(37.5665,126.978),zoom:11,maxZoom:20,minZoom:11,mapTypeControl:!1,scaleControl:!1,logoControl:!1,mapDataControl:!1,zoomControl:!1,..._},y=new h.maps.Map(m,C);return s(T=>{const B=m.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:g,maps:l},children:r})},K=()=>{const t=u.useContext(se);if(!t)throw new Error("useNaverMap must be used within NaverMapProvider");return t};function ae(t){const n=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(n,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,s=arguments[1];o.set(l,s)}else{const l=arguments[1];t.maps.Util.forEach(e,function(s,c){c!=="map"&&o.set(c,s)}),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(s,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(s){s.updateIcon()});break;case"maxZoom":this._clusters.forEach(function(s){s.getCount()>1&&s.checkByZoomAndMinClusterSize()});break;case"stylingFunction":this._clusters.forEach(function(s){s.updateCount()});break;case"disableClickZoom":let l="enableClickZoom";o&&(l="disableClickZoom"),this._clusters.forEach(function(s){s[l]()});break}},_createClusters:function(){const e=this.getMap();if(!e)return;const o=e.getBounds(),l=this.getMarkers();for(let s=0,c=l.length;s<c;s++){const d=l[s],g=d.getPosition();if(!o.hasLatLng(g))continue;this._getClosestCluster(g).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 s=null,c=1/0;for(let d=0,g=l.length;d<g;d++){const p=l[d],_=p.getCenter();if(p.isInBounds(e)){const h=o.getDistance(_,e);h<c&&(c=h,s=p)}}return s||(s=new r(this),this._clusters.push(s)),s},_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(),s=e.getMap().getZoom();this.getCount()<o?this._showMember():(this._hideMember(),l<=s&&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 s=0,c=l.length;s<c;s++)l[s].setMap(e);o&&o.setMap(null)},_hideMember:function(){const e=this._markerClusters.getMap(),o=this._clusterMarker,l=this._clusterMember;for(let s=0,c=l.length;s<c;s++)l[s].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()),s=o.getBounds(),c=o.getProjection(),d=c.fromCoordToOffset(s.getNE()),g=c.fromCoordToOffset(s.getSW()),p=c.fromCoordToOffset(l.getNE()),_=c.fromCoordToOffset(l.getSW()),h=this._markerClusters.getGridSize()/2;p.add(h,-h),_.add(-h,h);const m=Math.min(d.x,p.x),C=Math.max(d.y,p.y),y=Math.max(g.x,_.x),T=Math.min(g.y,_.y),B=c.fromOffsetToCoord(new t.maps.Point(m,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 s=0,c=o.length;s<c;s++){const d=o[s];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 s=0;s<o;s++)l[0]+=e[s].position.x,l[1]+=e[s].position.y;return l[0]/=o,l[1]/=o,new t.maps.Point(l[0],l[1])}},n}const ie=t=>{const{naver:n}=K(),[r,e]=u.useState([]),o=u.useRef(new Map),l=u.useRef(null),s=u.useCallback(_=>{if(!t||!n)return null;const h=J(_),m=new n.maps.Marker({..._,position:new n.maps.LatLng(_.position.latitude,_.position.longitude),map:t,icon:{content:h}});return _.onClick&&n.maps.Event.addListener(m,"click",()=>{_.onClick(_.id)}),e(C=>[...C,m]),o.current.set(_.id,{marker:m,data:_}),m},[t,n]),c=u.useCallback((_,h)=>{const m=o.current.get(_);if(!m||!n)return;const{marker:C,data:y}=m,T={...y,...h},B=C.getElement();if(B){const S=B.querySelector(".popdeal-marker");S&&"active"in h&&S.setAttribute("active",String(!!h.active))}o.current.set(_,{marker:C,data:T})},[n]),d=u.useCallback(()=>{r.forEach(_=>{_&&_.setMap(null)}),e([]),o.current.clear(),l.current&&(l.current.setMap(null),l.current=null)},[r]),g=u.useCallback(_=>{!t||!n||t.panTo(new n.maps.LatLng(_.latitude,_.longitude))},[t,n]),p=u.useCallback(_=>{if(!t||!n||_.length===0)return;const h=new n.maps.LatLngBounds(new n.maps.LatLng(_[0].latitude,_[0].longitude),new n.maps.LatLng(_[0].latitude,_[0].longitude));_.forEach(m=>{h.extend(new n.maps.LatLng(m.latitude,m.longitude))}),t.fitBounds(h)},[t,n]);return u.useEffect(()=>{if(!n||!t||r.length===0)return;const _=ae(n),m={content:J({type:"cluster",count:0}),size:new n.maps.Size(96,96),anchor:new n.maps.Point(20,20)},C=new _({minClusterSize:2,maxZoom:17,map:t,markers:r,disableClickZoom:!1,gridSize:120,icons:[m],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)}},[n,t,r]),{addMarker:s,updateMarker:c,clearMarkers:d,panTo:g,fitBounds:p}},Q=({options:t,onLoad:n})=>{const r=u.useRef(null),e=u.useRef(null),{createMap:o}=K(),[l,s]=u.useState(null),c=ie(l),{width:d="100%",height:g="100%",...p}=t||{},_=u.useMemo(()=>p,[JSON.stringify(p)]);return u.useEffect(()=>{if(typeof document>"u"||document.getElementById("pop-ui-map-marker-styles"))return;const m=document.createElement("style");return m.id="pop-ui-map-marker-styles",m.textContent=oe,document.head.appendChild(m),e.current=m,()=>{}},[]),u.useEffect(()=>{let h=null,m=null;if(l&&(l.destroy(),s(null)),r.current&&r.current.isConnected){const C=()=>r.current&&r.current.isConnected&&(h=o(r,_),h)?(s(h),!0):!1;if(!C()){let y=0;const T=50;m=setInterval(()=>{y++,(C()||y>=T)&&m&&(clearInterval(m),m=null)},100)}return()=>{m&&clearInterval(m),h&&(h.destroy(),h=null)}}return()=>{m&&clearInterval(m),h&&(h.destroy(),h=null)}},[o,_]),u.useEffect(()=>{l&&n&&n({map:l,...c})},[l,n,c]),a.jsx("div",{ref:r,style:{width:typeof d=="number"?`${d}px`:d,height:typeof g=="number"?`${g}px`:g}})};Q.displayName="Map";const Ue="위치 정보를 불러오는 데 실패했어요.",Ze="위치 서비스 권한과 네트워크 상태를 확인해주세요.",Ye=({isActive:t=!1,errorMessage:n=Ue,errorDescription:r=Ze})=>{const[e,o]=u.useState(!1),[l,s]=u.useState(!1),[c,d]=u.useState(null),g=u.useRef(!1);return u.useEffect(()=>{if(t&&typeof navigator<"u"&&"geolocation"in navigator){if(g.current)return;g.current=!0,requestAnimationFrame(()=>{o(!0)});const p={enableHighAccuracy:!0,timeout:1e4,maximumAge:0};navigator.geolocation.getCurrentPosition(_=>{d({latitude:_.coords.latitude,longitude:_.coords.longitude}),o(!1),s(!1),g.current=!1},_=>{d(null),console.error("Geolocation error:",_),N({message:`${n} ${r}`}),o(!1),s(!0),g.current=!1},p)}},[t,n,r]),{position:c,isLoading:e,isError:l}},ce=(t="light")=>{const n=[];return Object.entries(i.colors).forEach(([r,e])=>{Object.entries(e).forEach(([o,l])=>{const s=i.getCSSVariableName(r,o);n.push(`${s}: ${l};`)})}),n.join(`
|
|
320
|
+
`)},Ve=(t="light")=>{const n=document.getElementById("pop-ui-theme-vars");n&&n.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 n=i.colors[t],r=Object.keys(n).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])]},je=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=u.createContext(void 0),_e=u.createContext({}),Ge=({children:t,defaultTheme:n="light",naverClientId:r,notificationPosition:e="bottom-center",notificationLimit:o=5,notificationAutoClose:l,notificationZIndex:s})=>{const[c,d]=u.useState(n);u.useEffect(()=>{Ve(c),document.documentElement.setAttribute("data-theme",c)},[c]);const g=()=>{d(p=>p==="light"?"dark":"light")};return a.jsx(de.Provider,{value:{theme:c,setTheme:d,toggleTheme:g},children:a.jsx(_e.Provider,{value:{naverClientId:r},children:a.jsxs(x.MantineProvider,{theme:je,children:[a.jsx(O.Notifications,{position:e,limit:o,autoClose:l,zIndex:s}),t]})})})},qe=()=>{const t=u.useContext(de);if(!t)throw new Error("useTheme must be used within ThemeProvider");return t},Je=()=>u.useContext(_e),L={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"},Ke=60,Qe=({onClickMap:t,address:n,markerImageUrl:r,shopTitle:e,directionUrl:o,latitude:l,longitude:s,naverClientId:c,onExpandRequest:d,height:g=200,directionLabel:p="길찾기",addressCopiedMessage:_="주소 복사 완료"})=>{const h=Je(),m=c||h.naverClientId,[C,y]=u.useState(null),T=g-Ke,B=u.useCallback(M=>{M&&M.map&&y(M)},[]),S=u.useCallback(()=>{d?.()},[d]),I=u.useCallback((M,X,Re)=>{if(M&&M.map&&l&&s)try{M.addMarker(X),Re?.()}catch(et){console.error("Error creating map marker:",et)}},[l,s]),z=u.useCallback((M,X)=>{M&&M.map&&l&&s&&(M.clearMarkers(),I(M,{id:`shop-marker-${e}`,type:X,position:{latitude:l,longitude:s},title:e,icon:r??void 0,address:n??void 0},()=>{M.panTo({latitude:l,longitude:s})}))},[l,s,e,r,n,I]);u.useEffect(()=>{l&&s&&C&&z(C,"pi")},[C,l,s,z]),u.useEffect(()=>()=>{y(null)},[]);const E=u.useCallback(()=>{typeof navigator<"u"&&navigator.clipboard&&(navigator.clipboard.writeText(n),N(_))},[n,_]),Xe=u.useMemo(()=>o||`https://map.naver.com/p/search/${encodeURIComponent(e)}`,[o,e]);return m?a.jsxs("div",{className:L.MapInfo,style:{height:g},onClick:t,children:[a.jsx(le,{clientId:m,children:a.jsxs("div",{className:L.MapInfo__Preview,onClick:S,children:[a.jsx(Q,{onLoad:B,options:{width:"100%",height:`${T}px`,center:{lat:l,lng:s},zoom:15,minZoom:15,maxZoom:15,draggable:!1,keyboardShortcuts:!1,mapTypeControl:!1,scaleControl:!1,logoControl:!1,mapDataControl:!1,zoomControl:!1}}),d&&a.jsx("div",{className:L.MapInfo__ExpandButton,children:a.jsx(i.IconMap,{color:i.ColorGray800,size:18})})]})}),a.jsxs("div",{className:L.MapInfo__AddressBar,children:[a.jsxs("div",{className:L.MapInfo__AddressContent,children:[a.jsx(i.IconMapMarker,{color:i.ColorAqua500,size:24,filled:!0}),a.jsx("span",{className:L.MapInfo__Address,onClick:E,role:"button",tabIndex:0,onKeyDown:M=>M.key==="Enter"&&E(),children:n})]}),a.jsx("a",{className:L.MapInfo__DirectionLink,href:Xe,target:"_blank",rel:"noreferrer",children:a.jsx(ee,{variant:"basic",size:"sm",className:L.MapInfo__DirectionButton,children:p})})]})]}):a.jsx("div",{className:L.MapInfo,style:{height:g},children:a.jsx("div",{className:L.MapInfo__NoClientId,children:"naverClientId가 필요합니다. PopUIProvider 또는 props로 전달해주세요."})})};f.Button=ee,f.CalendarDatePicker=Be,f.Checkbox=he,f.DatePicker=ke,f.Dropdown=be,f.ImageUploader=Me,f.Map=Q,f.MapInfo=Qe,f.Modal=Se,f.NaverMapProvider=le,f.Pagination=we,f.PopUiProvider=Ge,f.Radio=ve,f.SearchBar=Ie,f.SegmentButton=Le,f.Tab=Pe,f.TextField=De,f.TimePicker=Fe,f.Toggle=Ee,f.Tooltip=Ae,f.getMarkerHTML=J,f.makeMarkerClustering=ae,f.markerStyles=oe,f.toast=N,f.useLocation=Ye,f.useMap=ie,f.useNaverMap=K,f.useTheme=qe,Object.defineProperty(f,Symbol.toStringTag,{value:"Module"})});
|