@pop-ui/core 0.0.26 → 0.0.27

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.umd.cjs CHANGED
@@ -1 +1 @@
1
- (function(n,s){typeof exports=="object"&&typeof module<"u"?s(exports,require("@mantine/core"),require("react/jsx-runtime"),require("react"),require("@pop-ui/foundation"),require("dayjs/locale/ko"),require("@mantine/dates"),require("@mantine/dropzone")):typeof define=="function"&&define.amd?define(["exports","@mantine/core","react/jsx-runtime","react","@pop-ui/foundation","dayjs/locale/ko","@mantine/dates","@mantine/dropzone"],s):(n=typeof globalThis<"u"?globalThis:n||self,s(n.Core={},n.MantineCore,n.jsxRuntime,n.React,n.foundation,null,n.dates,n.dropzone))})(this,function(n,s,l,C,e,de,v,Y){"use strict";const z={primary:e.TextColorButtonTextPrimaryDefault,primaryLine:e.TextColorButtonTextPrimarylineDefault,basic:e.TextColorButtonTextBasicDefault,danger:e.TextColorButtonTextPrimaryDefault,setting:e.TextColorButtonTextPrimaryDefault,warning:e.TextColorButtonTextPrimaryDefault},j={primary:{default:{backgroundColor:e.BgColorButtonBgPrimaryDefault,color:e.TextColorButtonTextPrimaryDefault,border:"none"},hover:{backgroundColor:e.BgColorButtonBgPrimaryHover,color:e.TextColorButtonTextPrimaryHover},active:{backgroundColor:e.BgColorButtonBgPrimaryPressed,color:e.TextColorButtonTextPrimaryPressed},focus:{backgroundColor:e.BgColorButtonBgPrimaryFocused,color:e.TextColorButtonTextPrimaryFocused},disabled:{backgroundColor:e.BgColorButtonBgPrimaryDisabled,color:e.TextColorButtonTextPrimaryDisabled,cursor:"not-allowed"}},primaryLine:{default:{backgroundColor:e.BgColorButtonBgPrimarylineDefault,color:e.TextColorButtonTextPrimarylineDefault,border:`1px solid ${e.BorderColorButtonBorderPrimarylineDefault}`},hover:{backgroundColor:e.BgColorButtonBgPrimarylineHover,color:e.TextColorButtonTextPrimarylineHover,borderColor:e.BorderColorButtonBorderPrimarylineHover},active:{backgroundColor:e.BgColorButtonBgPrimarylinePressed,color:e.TextColorButtonTextPrimarylinePressed,borderColor:e.BorderColorButtonBorderPrimarylinePressed},focus:{backgroundColor:e.BgColorButtonBgPrimarylineFocused,color:e.TextColorButtonTextPrimarylineFocused,borderColor:e.BorderColorButtonBorderPrimarylineFocused},disabled:{backgroundColor:e.BgColorButtonBgPrimarylineDisabled,color:e.TextColorButtonTextPrimarylineDisabled,cursor:"not-allowed"}},basic:{default:{backgroundColor:e.BgColorButtonBgBasicDefault,color:e.TextColorButtonTextBasicDefault,border:`1px solid ${e.BorderColorButtonBorderBasicDefault}`},hover:{backgroundColor:e.BgColorButtonBgBasicHover,color:e.TextColorButtonTextBasicHover,borderColor:e.BorderColorButtonBorderBasicHover},active:{backgroundColor:e.BgColorButtonBgBasicPreseed,color:e.TextColorButtonTextBasicPressed,borderColor:e.BorderColorButtonBorderBasicPressed},focus:{backgroundColor:e.BgColorButtonBgBasicFocused,color:e.TextColorButtonTextBasicFocused,borderColor:e.BorderColorButtonBorderBasicFocused},disabled:{backgroundColor:e.BgColorButtonBgBasicDisabled,color:e.TextColorButtonTextBasicDisabled,cursor:"not-allowed"}},danger:{default:{backgroundColor:e.BgColorButtonBgWarningDefault,color:e.TextColorButtonTextWarningDefault,border:"none"},hover:{backgroundColor:e.BgColorButtonBgWarningHover,color:e.TextColorButtonTextWarningHover},active:{backgroundColor:e.BgColorButtonBgWarningPressed,color:e.TextColorButtonTextWarningPressed},focus:{backgroundColor:e.BgColorButtonBgWarningFocused,color:e.TextColorButtonTextWarningFocused},disabled:{backgroundColor:e.BgColorButtonBgWarningDisabled,color:e.TextColorButtonTextWarningDisabled,cursor:"not-allowed"}},setting:{default:{backgroundColor:e.BgColorButtonBgSettingDefault,color:e.TextColorButtonTextSettingDefault,border:"none"},hover:{backgroundColor:e.BgColorButtonBgSettingHover,color:e.TextColorButtonTextSettingHover},active:{backgroundColor:e.BgColorButtonBgSettingPressed,color:e.TextColorButtonTextSettingPressed},focus:{backgroundColor:e.BgColorButtonBgSettingFocused,color:e.TextColorButtonTextSettingFocused},disabled:{backgroundColor:e.BgColorButtonBgSettingDisabled,color:e.TextColorButtonTextSettingDisabled,cursor:"not-allowed"}},warning:{default:{backgroundColor:e.BgColorButtonBgWarningDefault,color:e.TextColorButtonTextWarningDefault,border:"none"},hover:{backgroundColor:e.BgColorButtonBgWarningHover,color:e.TextColorButtonTextWarningHover},active:{backgroundColor:e.BgColorButtonBgWarningPressed,color:e.TextColorButtonTextWarningPressed},focus:{backgroundColor:e.BgColorButtonBgWarningFocused,color:e.TextColorButtonTextWarningFocused},disabled:{backgroundColor:e.BgColorButtonBgWarningDisabled,color:e.TextColorButtonTextWarningDisabled,cursor:"not-allowed"}}},q={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 J(r,a){const o=j[r];return{root:{...q[a],...o.default,"&:hover:not(:disabled)":o.hover,"&:active:not(:disabled)":o.active,"&:focus:not(:disabled)":o.focus,"&:disabled":o.disabled}}}function Z({children:r,size:a="md",variant:o="primary",isLoading:t=!1,disabled:_=!1,...g}){const i=C.useMemo(()=>J(o,a),[o,a]),m=z[o],c=C.useMemo(()=>{switch(a){case"lg":return 18;case"sm":return 14;case"md":default:return 16}},[a]);return l.jsx(s.Button,{type:"button",styles:i,disabled:_||t,...g,children:t?l.jsx(s.Loader,{color:m,size:c}):r})}const T={"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"},V=r=>{const{label:a,labelPosition:o="top",size:t="md",required:_,tooltip:g,tooltipPosition:i="top",errorMsg:m,description:c,textarea:h=!1,maxTextCount:d,onChange:B,onClear:b,...u}=r,x="minRows"in r?r.minRows:void 0,[y,M]=C.useState(0);let L=T["TextField__Label--Medium"],U=T["TextField--Medium"],H=T["TextField__Tooltip--Medium"];t==="sm"?(L=T["TextField__Label--Small"],U=T["TextField--Small"],H=T["TextField__Tooltip--Small"]):t==="lg"&&(L=T["TextField__Label--Large"],U=T["TextField--Large"],H=T["TextField__Tooltip--Large"]);const O=C.useCallback(F=>{if(d){if(F.currentTarget?.value?.length>d)return;M(F.currentTarget?.value?.length),B&&B(F)}B&&(M(F.currentTarget?.value?.length),B(F))},[d,B]);return l.jsxs("div",{className:o==="top"?T["TextField--TopLabel"]:T["TextField--LeftLabel"],children:[l.jsxs("div",{children:[a&&l.jsx(s.Input.Label,{required:_,className:L,children:a}),g&&l.jsx(s.Tooltip,{label:g,position:i,children:l.jsx("div",{className:H,children:l.jsx(e.IconInfoCircle,{size:t==="sm"?14:t==="lg"?20:16})})})]}),l.jsxs("div",{children:[l.jsxs("div",{className:T.TextField__Wrapper,children:[h?l.jsx(s.Textarea,{className:T["TextField--Textarea"],size:t,minRows:x,error:m,onChange:O,disabled:u?.disabled,...u}):l.jsx(s.Input,{className:U,error:m,onChange:O,rightSection:b&&y>0?l.jsx("div",{className:T.TextField__ClearButton,onClick:b,children:l.jsx(e.IconClose,{size:t==="sm"?16:t==="lg"?24:20})}):void 0,...u}),d&&d>0&&l.jsx("span",{className:T.TextField__TextCounter,children:`${y}/${d}`})]}),c&&l.jsx(s.Input.Description,{className:T.TextField__Description,children:c}),m&&l.jsx(s.Input.Error,{className:T.TextField__ErrorMsg,children:m})]})]})},p={"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"},G=({label:r,labelPosition:a="top",size:o="md",required:t,tooltip:_,tooltipPosition:g="top",errorMsg:i,description:m,onChange:c,onClear:h,...d})=>{const[B,b]=C.useState(0);let u=p["SearchBar__Label--Medium"],x=p["SearchBar--Medium"],y=p["SearchBar__Tooltip--Medium"];o==="sm"?(u=p["SearchBar__Label--Small"],x=p["SearchBar--Small"],y=p["SearchBar__Tooltip--Small"]):o==="lg"&&(u=p["SearchBar__Label--Large"],x=p["SearchBar--Large"],y=p["SearchBar__Tooltip--Large"]);const M=C.useCallback(L=>{c&&(b(L?.length),c(L))},[c]);return l.jsxs("div",{className:a==="top"?p["SearchBar--TopLabel"]:p["SearchBar--LeftLabel"],children:[l.jsxs("div",{children:[r&&l.jsx(s.Input.Label,{required:t,className:u,children:r}),_&&l.jsx(s.Tooltip,{label:_,position:g,children:l.jsx("div",{className:y,children:l.jsx(e.IconInfoCircle,{size:o==="sm"?14:o==="lg"?20:16})})})]}),l.jsxs("div",{children:[l.jsx("div",{className:p.SearchBar__Wrapper,children:l.jsx(s.Autocomplete,{...d,size:o,error:i,className:x,onChange:M,leftSection:l.jsx(e.IconSearch,{size:o==="sm"?16:o==="lg"?24:20}),rightSection:h&&B>0?l.jsx("div",{className:p.SearchBar__ClearButton,onClick:h,children:l.jsx(e.IconClose,{size:o==="sm"?16:o==="lg"?24:20})}):void 0})}),m&&l.jsx(s.Input.Description,{className:p.SearchBar__Description,children:m}),i&&l.jsx(s.Input.Error,{className:p.SearchBar__ErrorMsg,children:i})]})]})},S={"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"},Q=({label:r,labelPosition:a="top",size:o="md",required:t,tooltip:_,tooltipPosition:g="top",errorMsg:i,description:m,...c})=>{const[h,d]=C.useState(!1);let B=S["Dropdown__Label--Medium"],b=S["Dropdown--Medium"],u=S["Dropdown__Tooltip--Medium"],x=18;return o==="sm"?(B=S["Dropdown__Label--Small"],b=S["Dropdown--Small"],u=S["Dropdown__Tooltip--Small"],x=14):o==="lg"&&(B=S["Dropdown__Label--Large"],b=S["Dropdown--Large"],u=S["Dropdown__Tooltip--Large"],x=24),l.jsxs("div",{className:a==="top"?S["Dropdown--TopLabel"]:S["Dropdown--LeftLabel"],children:[l.jsxs("div",{children:[r&&l.jsx(s.Input.Label,{required:t,className:B,children:r}),_&&l.jsx(s.Tooltip,{label:_,position:g,children:l.jsx("div",{className:u,children:l.jsx(e.IconInfoCircle,{size:o==="sm"?14:o==="lg"?20:16})})})]}),l.jsxs("div",{children:[l.jsx(s.Select,{...c,size:o,error:i,className:b,rightSection:h?l.jsx(e.IconChevronUp,{size:x}):l.jsx(e.IconChevronDown,{size:x}),onDropdownOpen:()=>d(!0),onDropdownClose:()=>d(!1),styles:{option:{"&[data-selected]":{"&, &:hover":{backgroundColor:"#e7e7e7",color:"#000000"}}}}}),m&&l.jsx(s.Input.Description,{className:S.Dropdown__Description,children:m}),i&&l.jsx(s.Input.Error,{className:S.Dropdown__ErrorMsg,children:i})]})]})},w={"Checkbox--Small":"styles-module__Checkbox--Small___VZGlw","Checkbox--Medium":"styles-module__Checkbox--Medium___Vwpa3","Checkbox--Large":"styles-module__Checkbox--Large___ybTGE"},K=({size:r="md",...a})=>{let o=w["Checkbox--Medium"],t=24;return r==="sm"?(o=w["Checkbox--Small"],t=18):r==="lg"&&(o=w["Checkbox--Large"],t=32),l.jsx(s.Checkbox,{className:o,styles:{inner:{width:t,height:t}},...a})},I={"Radio--Small":"styles-module__Radio--Small___izWI2","Radio--Medium":"styles-module__Radio--Medium___dwZfV","Radio--Large":"styles-module__Radio--Large___1gLra"},X=({size:r="md",...a})=>{let o=I["Radio--Medium"];return r==="sm"?o=I["Radio--Small"]:r==="lg"&&(o=I["Radio--Large"]),l.jsx(s.Radio,{className:o,size:r,...a})},f={"Toggle--Small":"styles-module__Toggle--Small___sOjUd","Toggle--Medium":"styles-module__Toggle--Medium___yIb8v","Toggle--Large":"styles-module__Toggle--Large___ZOJj1"},R=({size:r="md",labelPosition:a="right",disabled:o,onChange:t,..._})=>{const[g,i]=C.useState(_?.checked||!1);let m=f["Toggle--Medium"],c=50;r==="sm"?(m=f["Toggle--Small"],c=38):r==="lg"&&(m=f["Toggle--Large"],c=67);const h=C.useCallback(d=>{t&&t(d),i(d?.target?.checked)},[t]);return l.jsx(s.Switch,{className:m,size:r,labelPosition:a,disabled:o,onChange:h,styles:()=>({track:{backgroundColor:!o&&g?"#0fd3d8 !important":void 0,borderColor:!o&&g?"#0fd3d8 !important":void 0,width:c}}),..._})},N={"DatePicker--Small":"styles-module__DatePicker--Small___m8asv","DatePicker--Medium":"styles-module__DatePicker--Medium___Po2-B","DatePicker--Large":"styles-module__DatePicker--Large___oQ6EM"},ee=({size:r="md",type:a="default",withTime:o,...t})=>{let _=N["DatePicker--Medium"],g=18;return r==="sm"?(_=N["DatePicker--Small"],g=14):r==="lg"&&(_=N["DatePicker--Large"],g=24),o?l.jsx(v.DateTimePicker,{className:_,size:r,locale:"ko",firstDayOfWeek:0,monthLabelFormat:"YYYY년 MM월",valueFormat:"YYYY-MM-DD | a hh:mm",rightSection:l.jsx(e.IconCalendar,{size:g}),...t}):l.jsx(v.DatePickerInput,{className:_,type:a,size:r,locale:"ko",firstDayOfWeek:0,monthLabelFormat:"YYYY년 MM월",valueFormat:"YYYY-MM-DD",rightSection:l.jsx(e.IconCalendar,{size:g}),...t})},W={"TimePicker--Small":"styles-module__TimePicker--Small___nHQa1","TimePicker--Medium":"styles-module__TimePicker--Medium___E9-rF","TimePicker--Large":"styles-module__TimePicker--Large___I0M7V"},le=({size:r="md",...a})=>{const o=C.useRef(null);let t=W["TimePicker--Medium"],_=18;return r==="sm"?(t=W["TimePicker--Small"],_=14):r==="lg"&&(t=W["TimePicker--Large"],_=24),l.jsx(v.TimeInput,{ref:o,className:t,size:r,...a,rightSection:l.jsx(s.ActionIcon,{onClick:()=>{o&&o?.current?.showPicker()},children:l.jsx(e.IconClock,{size:_})})})},D={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"},oe=({currentPageIdx:r,rowsPerPage:a,totalLength:o,paginationSize:t,onPageChange:_,...g})=>{const[i,m]=C.useState(r),c=a||50,h=o||1,d=t||5;C.useEffect(()=>{m(r)},[r]);const B=()=>{_&&_(i-(i%d+1)),m(u=>u-(u%d+1))},b=()=>{_&&_(i+d-i%d),m(u=>u+d-u%d)};return l.jsxs("div",{...g,className:D.Pagination,children:[i>=d?l.jsx("button",{className:D.Pagination__Arrow,onClick:B,children:l.jsx(e.IconChevronLeft,{size:20})}):null,new Array(d).fill(0).map((u,x)=>{const y=Math.floor(i/d)*d+x+1;if(!(y>Math.ceil(h/c)))return l.jsx("button",{className:i===y-1?D["Pagination__PageIndex--Active"]:D.Pagination__PageIndex,onClick:()=>{m(y-1),_&&_(y-1)},children:y},`pagination_${x}`)}),Math.floor(i/d)*d+d<Math.ceil(h/c)?l.jsx("button",{className:D.Pagination__Arrow,onClick:b,children:l.jsx(e.IconChevronRight,{size:20})}):null]})},$={Tab__TitleList:"styles-module__Tab__TitleList___urHWH",Tab__BorderBottom:"styles-module__Tab__BorderBottom___eMTpl"},re=({tabList:r=[],containerPaddingTop:a,...o})=>l.jsxs(s.Tabs,{...o,children:[l.jsx(s.Tabs.List,{className:$.Tab__TitleList,children:r?.map((t,_)=>l.jsxs(s.Tabs.Tab,{value:t.value,leftSection:t.icon,children:[t.title,l.jsx("div",{className:$.Tab__BorderBottom})]},`tab_${_}`))}),r?.map((t,_)=>l.jsx(s.Tabs.Panel,{value:t.value,pt:a,children:t.body},`tab_panel_${_}`))]}),E={"SegmentButton--Small":"styles-module__SegmentButton--Small___o0Y3t","SegmentButton--Medium":"styles-module__SegmentButton--Medium___EgCJm","SegmentButton--Large":"styles-module__SegmentButton--Large___Ym86C"},te=({size:r="md",radius:a=6,...o})=>{let t=E["SegmentButton--Medium"];return r==="sm"?t=E["SegmentButton--Small"]:r==="lg"&&(t=E["SegmentButton--Large"]),l.jsx(s.SegmentedControl,{className:t,size:r,radius:a,styles:{control:{borderWidth:"0 !important"}},...o})},P={"Alert--LightSuccess":"styles-module__Alert--LightSuccess___902eZ","Alert--LightError":"styles-module__Alert--LightError___dZyI0","Alert--FillSuccess":"styles-module__Alert--FillSuccess___HMMWU","Alert--FillError":"styles-module__Alert--FillError___A5LPQ"},_e=({visible:r=!1,type:a="success",variant:o="light",top:t=48,right:_=48,...g})=>{let i=P["Alert--LightSuccess"];return o==="fill"?a==="success"?i=P["Alert--FillSuccess"]:a==="error"&&(i=P["Alert--FillError"]):a==="success"?i=P["Alert--LightSuccess"]:a==="error"&&(i=P["Alert--LightError"]),r?l.jsx(s.Alert,{className:i,icon:a==="success"?l.jsx(e.IconCheckCircle,{size:20}):l.jsx(e.IconWarningCircle,{size:20}),styles:{title:{marginBottom:g?.children?void 0:0}},pos:"fixed",top:t,right:_,...g}):null},A={Tooltip__Body:"styles-module__Tooltip__Body___i1OTG",Tooltip__Title:"styles-module__Tooltip__Title___E0LoV",Tooltip__Content:"styles-module__Tooltip__Content___lU5gr"},ae=({title:r,content:a,maw:o=280,multiline:t=!0,..._})=>l.jsx(s.Tooltip,{..._,maw:o,multiline:t,label:l.jsxs("div",{className:A.Tooltip__Body,children:[r&&l.jsx("span",{className:A.Tooltip__Title,children:r}),l.jsx("span",{className:A.Tooltip__Content,children:a})]})}),se=({size:r="md",width:a,withCloseButton:o=!1,...t})=>{let _=768;return r==="xs"?_=360:r==="sm"?_=544:r==="lg"?_=1e3:r==="xl"&&(_=1200),l.jsx(s.Modal,{size:a||_,withCloseButton:o,...t})},k={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"},ie=({width:r,height:a,defaultMsg:o="이미지 업로드",file:t,onDrop:_,showClearButton:g,onClear:i,...m})=>{const[c,h]=C.useState(t),d=C.useCallback(()=>{h(void 0),i&&i()},[i]);return l.jsxs("div",{className:k.ImageUploader__Wrapper,children:[g&&c?l.jsx("div",{className:k.ImageUploader__FileClearButton,onClick:d,children:l.jsx(e.IconCloseCircle,{size:24})}):null,l.jsx(Y.Dropzone,{...m,maxFiles:1,className:k.ImageUploader,accept:Y.IMAGE_MIME_TYPE,onDrop:B=>{h(B[0]),_&&_(B)},style:{width:r,height:a},children:l.jsx(l.Fragment,{children:c?l.jsx("img",{className:k.ImageUploader__Preview,src:typeof c=="string"?c:URL.createObjectURL(c),alt:`파일명: ${typeof c=="string"?c:c.name}`,title:`파일명: ${typeof c=="string"?c:c.name}`}):l.jsxs("div",{children:[l.jsx(e.IconPhoto,{size:48}),l.jsx("span",{children:o})]})})})]})};Object.defineProperty(n,"PopUiProvider",{enumerable:!0,get:()=>s.MantineProvider}),n.Alert=_e,n.Button=Z,n.Checkbox=K,n.DatePicker=ee,n.Dropdown=Q,n.ImageUploader=ie,n.Modal=se,n.Pagination=oe,n.Radio=X,n.SearchBar=G,n.SegmentButton=te,n.Tab=re,n.TextField=V,n.TimePicker=le,n.Toggle=R,n.Tooltip=ae,Object.defineProperty(n,Symbol.toStringTag,{value:"Module"})});
1
+ (function(d,s){typeof exports=="object"&&typeof module<"u"?s(exports,require("@mantine/core"),require("react/jsx-runtime"),require("react"),require("@pop-ui/foundation"),require("dayjs/locale/ko"),require("@mantine/dates"),require("@mantine/notifications"),require("@mantine/dropzone")):typeof define=="function"&&define.amd?define(["exports","@mantine/core","react/jsx-runtime","react","@pop-ui/foundation","dayjs/locale/ko","@mantine/dates","@mantine/notifications","@mantine/dropzone"],s):(d=typeof globalThis<"u"?globalThis:d||self,s(d.Core={},d.MantineCore,d.jsxRuntime,d.React,d.foundation,null,d.dates,d.notifications,d.dropzone))})(this,function(d,s,o,C,e,ne,w,z,$){"use strict";const q={primary:e.TextColorButtonTextPrimaryDefault,primaryLine:e.TextColorButtonTextPrimarylineDefault,basic:e.TextColorButtonTextBasicDefault,danger:e.TextColorButtonTextPrimaryDefault,setting:e.TextColorButtonTextPrimaryDefault,warning:e.TextColorButtonTextPrimaryDefault},j={primary:{default:{backgroundColor:e.BgColorButtonBgPrimaryDefault,color:e.TextColorButtonTextPrimaryDefault,border:"none"},hover:{backgroundColor:e.BgColorButtonBgPrimaryHover,color:e.TextColorButtonTextPrimaryHover},active:{backgroundColor:e.BgColorButtonBgPrimaryPressed,color:e.TextColorButtonTextPrimaryPressed},focus:{backgroundColor:e.BgColorButtonBgPrimaryFocused,color:e.TextColorButtonTextPrimaryFocused},disabled:{backgroundColor:e.BgColorButtonBgPrimaryDisabled,color:e.TextColorButtonTextPrimaryDisabled,cursor:"not-allowed"}},primaryLine:{default:{backgroundColor:e.BgColorButtonBgPrimarylineDefault,color:e.TextColorButtonTextPrimarylineDefault,border:`1px solid ${e.BorderColorButtonBorderPrimarylineDefault}`},hover:{backgroundColor:e.BgColorButtonBgPrimarylineHover,color:e.TextColorButtonTextPrimarylineHover,borderColor:e.BorderColorButtonBorderPrimarylineHover},active:{backgroundColor:e.BgColorButtonBgPrimarylinePressed,color:e.TextColorButtonTextPrimarylinePressed,borderColor:e.BorderColorButtonBorderPrimarylinePressed},focus:{backgroundColor:e.BgColorButtonBgPrimarylineFocused,color:e.TextColorButtonTextPrimarylineFocused,borderColor:e.BorderColorButtonBorderPrimarylineFocused},disabled:{backgroundColor:e.BgColorButtonBgPrimarylineDisabled,color:e.TextColorButtonTextPrimarylineDisabled,cursor:"not-allowed"}},basic:{default:{backgroundColor:e.BgColorButtonBgBasicDefault,color:e.TextColorButtonTextBasicDefault,border:`1px solid ${e.BorderColorButtonBorderBasicDefault}`},hover:{backgroundColor:e.BgColorButtonBgBasicHover,color:e.TextColorButtonTextBasicHover,borderColor:e.BorderColorButtonBorderBasicHover},active:{backgroundColor:e.BgColorButtonBgBasicPreseed,color:e.TextColorButtonTextBasicPressed,borderColor:e.BorderColorButtonBorderBasicPressed},focus:{backgroundColor:e.BgColorButtonBgBasicFocused,color:e.TextColorButtonTextBasicFocused,borderColor:e.BorderColorButtonBorderBasicFocused},disabled:{backgroundColor:e.BgColorButtonBgBasicDisabled,color:e.TextColorButtonTextBasicDisabled,cursor:"not-allowed"}},danger:{default:{backgroundColor:e.BgColorButtonBgWarningDefault,color:e.TextColorButtonTextWarningDefault,border:"none"},hover:{backgroundColor:e.BgColorButtonBgWarningHover,color:e.TextColorButtonTextWarningHover},active:{backgroundColor:e.BgColorButtonBgWarningPressed,color:e.TextColorButtonTextWarningPressed},focus:{backgroundColor:e.BgColorButtonBgWarningFocused,color:e.TextColorButtonTextWarningFocused},disabled:{backgroundColor:e.BgColorButtonBgWarningDisabled,color:e.TextColorButtonTextWarningDisabled,cursor:"not-allowed"}},setting:{default:{backgroundColor:e.BgColorButtonBgSettingDefault,color:e.TextColorButtonTextSettingDefault,border:"none"},hover:{backgroundColor:e.BgColorButtonBgSettingHover,color:e.TextColorButtonTextSettingHover},active:{backgroundColor:e.BgColorButtonBgSettingPressed,color:e.TextColorButtonTextSettingPressed},focus:{backgroundColor:e.BgColorButtonBgSettingFocused,color:e.TextColorButtonTextSettingFocused},disabled:{backgroundColor:e.BgColorButtonBgSettingDisabled,color:e.TextColorButtonTextSettingDisabled,cursor:"not-allowed"}},warning:{default:{backgroundColor:e.BgColorButtonBgWarningDefault,color:e.TextColorButtonTextWarningDefault,border:"none"},hover:{backgroundColor:e.BgColorButtonBgWarningHover,color:e.TextColorButtonTextWarningHover},active:{backgroundColor:e.BgColorButtonBgWarningPressed,color:e.TextColorButtonTextWarningPressed},focus:{backgroundColor:e.BgColorButtonBgWarningFocused,color:e.TextColorButtonTextWarningFocused},disabled:{backgroundColor:e.BgColorButtonBgWarningDisabled,color:e.TextColorButtonTextWarningDisabled,cursor:"not-allowed"}}},J={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 Z(r,a){const l=j[r];return{root:{...J[a],...l.default,"&:hover:not(:disabled)":l.hover,"&:active:not(:disabled)":l.active,"&:focus:not(:disabled)":l.focus,"&:disabled":l.disabled}}}function V({children:r,size:a="md",variant:l="primary",isLoading:t=!1,disabled:_=!1,...m}){const c=C.useMemo(()=>Z(l,a),[l,a]),g=q[l],n=C.useMemo(()=>{switch(a){case"lg":return 18;case"sm":return 14;case"md":default:return 16}},[a]);return o.jsx(s.Button,{type:"button",styles:c,disabled:_||t,...m,children:t?o.jsx(s.Loader,{color:g,size:n}):r})}const 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"},G=r=>{const{label:a,labelPosition:l="top",size:t="md",required:_,tooltip:m,tooltipPosition:c="top",errorMsg:g,description:n,textarea:y=!1,maxTextCount:i,onChange:u,onClear:b,...T}=r,S="minRows"in r?r.minRows:void 0,[x,M]=C.useState(0);let L=B["TextField__Label--Medium"],Y=B["TextField--Medium"],H=B["TextField__Tooltip--Medium"];t==="sm"?(L=B["TextField__Label--Small"],Y=B["TextField--Small"],H=B["TextField__Tooltip--Small"]):t==="lg"&&(L=B["TextField__Label--Large"],Y=B["TextField--Large"],H=B["TextField__Tooltip--Large"]);const A=C.useCallback(P=>{if(i){if(P.currentTarget?.value?.length>i)return;M(P.currentTarget?.value?.length),u&&u(P)}u&&(M(P.currentTarget?.value?.length),u(P))},[i,u]);return o.jsxs("div",{className:l==="top"?B["TextField--TopLabel"]:B["TextField--LeftLabel"],children:[o.jsxs("div",{children:[a&&o.jsx(s.Input.Label,{required:_,className:L,children:a}),m&&o.jsx(s.Tooltip,{label:m,position:c,children:o.jsx("div",{className:H,children:o.jsx(e.IconInfoCircle,{size:t==="sm"?14:t==="lg"?20:16})})})]}),o.jsxs("div",{children:[o.jsxs("div",{className:B.TextField__Wrapper,children:[y?o.jsx(s.Textarea,{className:B["TextField--Textarea"],size:t,minRows:S,error:g,onChange:A,disabled:T?.disabled,...T}):o.jsx(s.Input,{className:Y,error:g,onChange:A,rightSection:b&&x>0?o.jsx("div",{className:B.TextField__ClearButton,onClick:b,children:o.jsx(e.IconClose,{size:t==="sm"?16:t==="lg"?24:20})}):void 0,...T}),i&&i>0&&o.jsx("span",{className:B.TextField__TextCounter,children:`${x}/${i}`})]}),n&&o.jsx(s.Input.Description,{className:B.TextField__Description,children:n}),g&&o.jsx(s.Input.Error,{className:B.TextField__ErrorMsg,children:g})]})]})},p={"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"},Q=({label:r,labelPosition:a="top",size:l="md",required:t,tooltip:_,tooltipPosition:m="top",errorMsg:c,description:g,onChange:n,onClear:y,...i})=>{const[u,b]=C.useState(0);let T=p["SearchBar__Label--Medium"],S=p["SearchBar--Medium"],x=p["SearchBar__Tooltip--Medium"];l==="sm"?(T=p["SearchBar__Label--Small"],S=p["SearchBar--Small"],x=p["SearchBar__Tooltip--Small"]):l==="lg"&&(T=p["SearchBar__Label--Large"],S=p["SearchBar--Large"],x=p["SearchBar__Tooltip--Large"]);const M=C.useCallback(L=>{n&&(b(L?.length),n(L))},[n]);return o.jsxs("div",{className:a==="top"?p["SearchBar--TopLabel"]:p["SearchBar--LeftLabel"],children:[o.jsxs("div",{children:[r&&o.jsx(s.Input.Label,{required:t,className:T,children:r}),_&&o.jsx(s.Tooltip,{label:_,position:m,children:o.jsx("div",{className:x,children:o.jsx(e.IconInfoCircle,{size:l==="sm"?14:l==="lg"?20:16})})})]}),o.jsxs("div",{children:[o.jsx("div",{className:p.SearchBar__Wrapper,children:o.jsx(s.Autocomplete,{...i,size:l,error:c,className:S,onChange:M,leftSection:o.jsx(e.IconSearch,{size:l==="sm"?16:l==="lg"?24:20}),rightSection:y&&u>0?o.jsx("div",{className:p.SearchBar__ClearButton,onClick:y,children:o.jsx(e.IconClose,{size:l==="sm"?16:l==="lg"?24:20})}):void 0})}),g&&o.jsx(s.Input.Description,{className:p.SearchBar__Description,children:g}),c&&o.jsx(s.Input.Error,{className:p.SearchBar__ErrorMsg,children:c})]})]})},h={"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"},K=({label:r,labelPosition:a="top",size:l="md",required:t,tooltip:_,tooltipPosition:m="top",errorMsg:c,description:g,...n})=>{const[y,i]=C.useState(!1);let u=h["Dropdown__Label--Medium"],b=h["Dropdown--Medium"],T=h["Dropdown__Tooltip--Medium"],S=18;return l==="sm"?(u=h["Dropdown__Label--Small"],b=h["Dropdown--Small"],T=h["Dropdown__Tooltip--Small"],S=14):l==="lg"&&(u=h["Dropdown__Label--Large"],b=h["Dropdown--Large"],T=h["Dropdown__Tooltip--Large"],S=24),o.jsxs("div",{className:a==="top"?h["Dropdown--TopLabel"]:h["Dropdown--LeftLabel"],children:[o.jsxs("div",{children:[r&&o.jsx(s.Input.Label,{required:t,className:u,children:r}),_&&o.jsx(s.Tooltip,{label:_,position:m,children:o.jsx("div",{className:T,children:o.jsx(e.IconInfoCircle,{size:l==="sm"?14:l==="lg"?20:16})})})]}),o.jsxs("div",{children:[o.jsx(s.Select,{...n,size:l,error:c,className:b,rightSection:y?o.jsx(e.IconChevronUp,{size:S}):o.jsx(e.IconChevronDown,{size:S}),onDropdownOpen:()=>i(!0),onDropdownClose:()=>i(!1),styles:{option:{"&[data-selected]":{"&, &:hover":{backgroundColor:"#e7e7e7",color:"#000000"}}}}}),g&&o.jsx(s.Input.Description,{className:h.Dropdown__Description,children:g}),c&&o.jsx(s.Input.Error,{className:h.Dropdown__ErrorMsg,children:c})]})]})},v={"Checkbox--Small":"styles-module__Checkbox--Small___VZGlw","Checkbox--Medium":"styles-module__Checkbox--Medium___Vwpa3","Checkbox--Large":"styles-module__Checkbox--Large___ybTGE"},X=({size:r="md",...a})=>{let l=v["Checkbox--Medium"],t=24;return r==="sm"?(l=v["Checkbox--Small"],t=18):r==="lg"&&(l=v["Checkbox--Large"],t=32),o.jsx(s.Checkbox,{className:l,styles:{inner:{width:t,height:t}},...a})},I={"Radio--Small":"styles-module__Radio--Small___izWI2","Radio--Medium":"styles-module__Radio--Medium___dwZfV","Radio--Large":"styles-module__Radio--Large___1gLra"},R=({size:r="md",...a})=>{let l=I["Radio--Medium"];return r==="sm"?l=I["Radio--Small"]:r==="lg"&&(l=I["Radio--Large"]),o.jsx(s.Radio,{className:l,size:r,...a})},f={"Toggle--Small":"styles-module__Toggle--Small___sOjUd","Toggle--Medium":"styles-module__Toggle--Medium___yIb8v","Toggle--Large":"styles-module__Toggle--Large___ZOJj1"},ee=({size:r="md",labelPosition:a="right",disabled:l,onChange:t,..._})=>{const[m,c]=C.useState(_?.checked||!1);let g=f["Toggle--Medium"],n=50;r==="sm"?(g=f["Toggle--Small"],n=38):r==="lg"&&(g=f["Toggle--Large"],n=67);const y=C.useCallback(i=>{t&&t(i),c(i?.target?.checked)},[t]);return o.jsx(s.Switch,{className:g,size:r,labelPosition:a,disabled:l,onChange:y,styles:()=>({track:{backgroundColor:!l&&m?"#0fd3d8 !important":void 0,borderColor:!l&&m?"#0fd3d8 !important":void 0,width:n}}),..._})},N={"DatePicker--Small":"styles-module__DatePicker--Small___m8asv","DatePicker--Medium":"styles-module__DatePicker--Medium___Po2-B","DatePicker--Large":"styles-module__DatePicker--Large___oQ6EM"},oe=({size:r="md",type:a="default",withTime:l,...t})=>{let _=N["DatePicker--Medium"],m=18;return r==="sm"?(_=N["DatePicker--Small"],m=14):r==="lg"&&(_=N["DatePicker--Large"],m=24),l?o.jsx(w.DateTimePicker,{className:_,size:r,locale:"ko",firstDayOfWeek:0,monthLabelFormat:"YYYY년 MM월",valueFormat:"YYYY-MM-DD | a hh:mm",rightSection:o.jsx(e.IconCalendar,{size:m}),...t}):o.jsx(w.DatePickerInput,{className:_,type:a,size:r,locale:"ko",firstDayOfWeek:0,monthLabelFormat:"YYYY년 MM월",valueFormat:"YYYY-MM-DD",rightSection:o.jsx(e.IconCalendar,{size:m}),...t})},W={"TimePicker--Small":"styles-module__TimePicker--Small___nHQa1","TimePicker--Medium":"styles-module__TimePicker--Medium___E9-rF","TimePicker--Large":"styles-module__TimePicker--Large___I0M7V"},le=({size:r="md",...a})=>{const l=C.useRef(null);let t=W["TimePicker--Medium"],_=18;return r==="sm"?(t=W["TimePicker--Small"],_=14):r==="lg"&&(t=W["TimePicker--Large"],_=24),o.jsx(w.TimeInput,{ref:l,className:t,size:r,...a,rightSection:o.jsx(s.ActionIcon,{onClick:()=>{l&&l?.current?.showPicker()},children:o.jsx(e.IconClock,{size:_})})})},D={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"},re=({currentPageIdx:r,rowsPerPage:a,totalLength:l,paginationSize:t,onPageChange:_,...m})=>{const[c,g]=C.useState(r),n=a||50,y=l||1,i=t||5;C.useEffect(()=>{g(r)},[r]);const u=()=>{_&&_(c-(c%i+1)),g(T=>T-(T%i+1))},b=()=>{_&&_(c+i-c%i),g(T=>T+i-T%i)};return o.jsxs("div",{...m,className:D.Pagination,children:[c>=i?o.jsx("button",{className:D.Pagination__Arrow,onClick:u,children:o.jsx(e.IconChevronLeft,{size:20})}):null,new Array(i).fill(0).map((T,S)=>{const x=Math.floor(c/i)*i+S+1;if(!(x>Math.ceil(y/n)))return o.jsx("button",{className:c===x-1?D["Pagination__PageIndex--Active"]:D.Pagination__PageIndex,onClick:()=>{g(x-1),_&&_(x-1)},children:x},`pagination_${S}`)}),Math.floor(c/i)*i+i<Math.ceil(y/n)?o.jsx("button",{className:D.Pagination__Arrow,onClick:b,children:o.jsx(e.IconChevronRight,{size:20})}):null]})},O={Tab__TitleList:"styles-module__Tab__TitleList___urHWH",Tab__BorderBottom:"styles-module__Tab__BorderBottom___eMTpl"},te=({tabList:r=[],containerPaddingTop:a,...l})=>o.jsxs(s.Tabs,{...l,children:[o.jsx(s.Tabs.List,{className:O.Tab__TitleList,children:r?.map((t,_)=>o.jsxs(s.Tabs.Tab,{value:t.value,leftSection:t.icon,children:[t.title,o.jsx("div",{className:O.Tab__BorderBottom})]},`tab_${_}`))}),r?.map((t,_)=>o.jsx(s.Tabs.Panel,{value:t.value,pt:a,children:t.body},`tab_panel_${_}`))]}),E={"SegmentButton--Small":"styles-module__SegmentButton--Small___o0Y3t","SegmentButton--Medium":"styles-module__SegmentButton--Medium___EgCJm","SegmentButton--Large":"styles-module__SegmentButton--Large___Ym86C"},_e=({size:r="md",radius:a=6,...l})=>{let t=E["SegmentButton--Medium"];return r==="sm"?t=E["SegmentButton--Small"]:r==="lg"&&(t=E["SegmentButton--Large"]),o.jsx(s.SegmentedControl,{className:t,size:r,radius:a,styles:{control:{borderWidth:"0 !important"}},...l})},k={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"},ae=r=>{const a=typeof r=="string"?{message:r}:r,{message:l,icon:t,autoClose:_=3e3}=a;z.notifications.show({message:o.jsx("div",{className:k.Toast__Message,children:l}),icon:t,autoClose:_,position:"bottom-center",classNames:{root:k.Toast,body:k.Toast__Body,icon:k.Toast__Icon},withCloseButton:!1,withBorder:!1})},U={Tooltip__Body:"styles-module__Tooltip__Body___i1OTG",Tooltip__Title:"styles-module__Tooltip__Title___E0LoV",Tooltip__Content:"styles-module__Tooltip__Content___lU5gr"},se=({title:r,content:a,maw:l=280,multiline:t=!0,..._})=>o.jsx(s.Tooltip,{..._,maw:l,multiline:t,label:o.jsxs("div",{className:U.Tooltip__Body,children:[r&&o.jsx("span",{className:U.Tooltip__Title,children:r}),o.jsx("span",{className:U.Tooltip__Content,children:a})]})}),ie=({size:r="md",width:a,withCloseButton:l=!1,...t})=>{let _=768;return r==="xs"?_=360:r==="sm"?_=544:r==="lg"?_=1e3:r==="xl"&&(_=1200),o.jsx(s.Modal,{size:a||_,withCloseButton:l,...t})},F={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"},de=({width:r,height:a,defaultMsg:l="이미지 업로드",file:t,onDrop:_,showClearButton:m,onClear:c,...g})=>{const[n,y]=C.useState(t),i=C.useCallback(()=>{y(void 0),c&&c()},[c]);return o.jsxs("div",{className:F.ImageUploader__Wrapper,children:[m&&n?o.jsx("div",{className:F.ImageUploader__FileClearButton,onClick:i,children:o.jsx(e.IconCloseCircle,{size:24})}):null,o.jsx($.Dropzone,{...g,maxFiles:1,className:F.ImageUploader,accept:$.IMAGE_MIME_TYPE,onDrop:u=>{y(u[0]),_&&_(u)},style:{width:r,height:a},children:o.jsx(o.Fragment,{children:n?o.jsx("img",{className:F.ImageUploader__Preview,src:typeof n=="string"?n:URL.createObjectURL(n),alt:`파일명: ${typeof n=="string"?n:n.name}`,title:`파일명: ${typeof n=="string"?n:n.name}`}):o.jsxs("div",{children:[o.jsx(e.IconPhoto,{size:48}),o.jsx("span",{children:l})]})})})]})};Object.defineProperty(d,"PopUiProvider",{enumerable:!0,get:()=>s.MantineProvider}),d.Button=V,d.Checkbox=X,d.DatePicker=oe,d.Dropdown=K,d.ImageUploader=de,d.Modal=ie,d.Pagination=re,d.Radio=R,d.SearchBar=Q,d.SegmentButton=_e,d.Tab=te,d.TextField=G,d.TimePicker=le,d.Toggle=ee,d.Tooltip=se,d.toast=ae,Object.defineProperty(d,Symbol.toStringTag,{value:"Module"})});
@@ -1,4 +1,3 @@
1
- import { AlertProps } from '@mantine/core';
2
1
  import { AutocompleteProps } from '@mantine/core';
3
2
  import { ButtonProps } from '@mantine/core';
4
3
  import { CheckboxProps } from '@mantine/core';
@@ -20,8 +19,6 @@ import { TextareaProps } from '@mantine/core';
20
19
  import { TimeInputProps } from '@mantine/dates';
21
20
  import { TooltipProps } from '@mantine/core';
22
21
 
23
- export declare const Alert: ({ visible, type, variant, top, right, ...props }: IAlertProps) => JSX.Element | null;
24
-
25
22
  export declare function Button({ children, size, variant, isLoading, disabled, ...props }: IButtonProps): JSX.Element;
26
23
 
27
24
  export declare const Checkbox: ({ size, ...props }: ICheckboxProps) => JSX.Element;
@@ -30,13 +27,6 @@ export declare const DatePicker: ({ size, type, withTime, ...props }: IDatePicke
30
27
 
31
28
  export declare const Dropdown: ({ label, labelPosition, size, required, tooltip, tooltipPosition, errorMsg, description, ...props }: IDropdownProps) => JSX.Element;
32
29
 
33
- declare interface IAlertProps extends AlertProps {
34
- visible: boolean;
35
- type?: 'success' | 'error';
36
- variant?: 'fill' | 'light';
37
- title?: string;
38
- }
39
-
40
30
  declare interface IButtonProps extends Omit<ButtonProps, 'variant' | 'styles'> {
41
31
  onClick?: () => void;
42
32
  size?: TButtonSize;
@@ -137,6 +127,12 @@ declare interface ITimePickerProps extends TimeInputProps {
137
127
  size?: 'sm' | 'md' | 'lg';
138
128
  }
139
129
 
130
+ declare interface IToastOptions {
131
+ message: string;
132
+ icon?: ReactNode;
133
+ autoClose?: number | false;
134
+ }
135
+
140
136
  declare interface IToggleProps extends SwitchProps {
141
137
  size?: 'sm' | 'md' | 'lg';
142
138
  labelPosition: 'left' | 'right';
@@ -171,6 +167,22 @@ export declare const TextField: (allProps: TTextFieldProps) => JSX.Element;
171
167
 
172
168
  export declare const TimePicker: ({ size, ...props }: ITimePickerProps) => JSX.Element;
173
169
 
170
+ /**
171
+ * 토스트 알림을 표시합니다
172
+ * @param input - 문자열 메시지 또는 옵션 객체
173
+ * @example
174
+ * // 간단한 사용
175
+ * toast('작업이 완료되었습니다');
176
+ *
177
+ * // 옵션과 함께 사용
178
+ * toast({
179
+ * message: '작업이 완료되었습니다',
180
+ * icon: <IconCheck />,
181
+ * autoClose: 5000,
182
+ * });
183
+ */
184
+ export declare const toast: (input: TToastInput) => void;
185
+
174
186
  export declare const Toggle: ({ size, labelPosition, disabled, onChange, ...props }: IToggleProps) => JSX.Element;
175
187
 
176
188
  export declare const Tooltip: ({ title, content, maw, multiline, ...props }: ITooltipProps) => JSX.Element;
@@ -182,4 +194,6 @@ declare type TTextFieldProps = ICommonTextFieldProps & (({
182
194
  minRows?: number;
183
195
  } & Omit<TextareaProps, keyof ICommonTextFieldProps | 'vars'>));
184
196
 
197
+ declare type TToastInput = string | IToastOptions;
198
+
185
199
  export { }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@pop-ui/core",
3
3
  "type": "module",
4
- "version": "0.0.26",
4
+ "version": "0.0.27",
5
5
  "main": "./dist/core.umd.cjs",
6
6
  "module": "./dist/core.js",
7
7
  "types": "./dist/types/index.d.ts",
@@ -48,6 +48,7 @@
48
48
  "@mantine/dates": "^8.3.6",
49
49
  "@mantine/dropzone": "^8.3.6",
50
50
  "@mantine/hooks": "^8.3.6",
51
+ "@mantine/notifications": "^8.3.6",
51
52
  "@pop-ui/foundation": "0.0.26",
52
53
  "dayjs": "^1.11.18"
53
54
  },
@@ -63,7 +64,6 @@
63
64
  "@mantine/form": "^8.3.6",
64
65
  "@mantine/hooks": "^8.3.6",
65
66
  "@mantine/modals": "^8.3.6",
66
- "@mantine/notifications": "^8.3.6",
67
67
  "@mantine/nprogress": "^8.3.6",
68
68
  "@mantine/prism": "^6.0.22",
69
69
  "@mantine/spotlight": "^8.3.6",
@@ -97,5 +97,5 @@
97
97
  "typescript": "^5.9.3",
98
98
  "vite": "^7.1.12"
99
99
  },
100
- "gitHead": "fb2eb189b07dfddfd28532ad83b486ee3a214b40"
100
+ "gitHead": "3d18c062d9b98af9679701d7b3cdc99e336b31e5"
101
101
  }