@pop-ui/core 0.0.25 → 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(a,i){typeof exports=="object"&&typeof module<"u"?i(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"],i):(a=typeof globalThis<"u"?globalThis:a||self,i(a.Core={},a.MantineCore,a.jsxRuntime,a.React,a.foundation,null,a.dates,a.dropzone))})(this,function(a,i,t,p,e,ce,w,z){"use strict";const j={primary:e.TextColorButtonTextPrimaryDefault,primaryLine:e.TextColorButtonTextPrimarylineDefault,basic:e.TextColorButtonTextBasicDefault,danger:e.TextColorButtonTextPrimaryDefault,setting:e.TextColorButtonTextPrimaryDefault,warning:e.TextColorButtonTextPrimaryDefault},q={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"}}},Z={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 U(o,r){const l=q[o];return{root:{...Z[r],...l.default,"&:hover:not(:disabled)":l.hover,"&:active:not(:disabled)":l.active,"&:focus:not(:disabled)":l.focus,"&:disabled":l.disabled}}}function V({children:o,size:r="md",variant:l="primary",isLoading:_=!1,disabled:s=!1,...n}){const d=p.useMemo(()=>U(l,r),[l,r]),m=j[l],c=p.useMemo(()=>{switch(r){case"lg":return 18;case"sm":return 14;case"md":default:return 16}},[r]);return t.jsx(i.Button,{type:"button",styles:d,disabled:s||_,...n,children:_?t.jsx(i.Loader,{color:m,size:c}):o})}const b={left_label_textfield:"styles-module__left_label_textfield___PO5VM",top_label_textfield:"styles-module__top_label_textfield___qdd3L",sm_label:"styles-module__sm_label___GHuO5",md_label:"styles-module__md_label___tSA7q",lg_label:"styles-module__lg_label___2dLzT",sm_tooltip:"styles-module__sm_tooltip___TMegW",md_tooltip:"styles-module__md_tooltip___rNo2j",lg_tooltip:"styles-module__lg_tooltip___MrP5P",textfield_wrapper:"styles-module__textfield_wrapper___Vyo43",text_counter:"styles-module__text_counter___Ro-h4",textarea:"styles-module__textarea___gYl17",sm_textfield:"styles-module__sm_textfield___Bd8Ei",md_textfield:"styles-module__md_textfield___hd1CY",lg_textfield:"styles-module__lg_textfield___3nvf7",input_description:"styles-module__input_description___rT1V7",input_error_msg:"styles-module__input_error_msg___YKVZp",clear_button:"styles-module__clear_button___Z7xgY"},Q=o=>{const{label:r,labelPosition:l="top",size:_="md",required:s,tooltip:n,tooltipPosition:d="top",errorMsg:m,description:c,textarea:y=!1,maxTextCount:u,onChange:x,onClear:g,...C}=o,h="minRows"in o?o.minRows:void 0,[$,T]=p.useState(0);let k=b.md_label,v=b.md_textfield,O=b.md_tooltip;_==="sm"?(k=b.sm_label,v=b.sm_textfield,O=b.sm_tooltip):_==="lg"&&(k=b.lg_label,v=b.lg_textfield,O=b.lg_tooltip);const A=p.useCallback(N=>{if(u){if(N.currentTarget?.value?.length>u)return;T(N.currentTarget?.value?.length),x&&x(N)}x&&(T(N.currentTarget?.value?.length),x(N))},[u,x]);return t.jsxs("div",{className:l==="top"?b.top_label_textfield:b.left_label_textfield,children:[t.jsxs("div",{children:[r&&t.jsx(i.Input.Label,{required:s,className:k,children:r}),n&&t.jsx(i.Tooltip,{label:n,position:d,children:t.jsx("div",{className:O,children:t.jsx(e.IconInfoCircle,{size:_==="sm"?14:_==="lg"?20:16})})})]}),t.jsxs("div",{children:[t.jsxs("div",{className:b.textfield_wrapper,children:[y?t.jsx(i.Textarea,{className:b.textarea,size:_,minRows:h,error:m,onChange:A,disabled:C?.disabled,...C}):t.jsx(i.Input,{className:v,error:m,onChange:A,rightSection:g&&$>0?t.jsx("div",{className:b.clear_button,onClick:g,children:t.jsx(e.IconClose,{size:_==="sm"?16:_==="lg"?24:20})}):void 0,...C}),u&&u>0&&t.jsx("span",{className:b.text_counter,children:`${$}/${u}`})]}),c&&t.jsx(i.Input.Description,{className:b.input_description,children:c}),m&&t.jsx(i.Input.Error,{className:b.input_error_msg,children:m})]})]})},f={left_label_textfield:"styles-module__left_label_textfield___KNg39",top_label_textfield:"styles-module__top_label_textfield___plWi-",sm_label:"styles-module__sm_label___cDDwr",md_label:"styles-module__md_label___CQRay",lg_label:"styles-module__lg_label___m3Xxi",sm_tooltip:"styles-module__sm_tooltip___w6lav",md_tooltip:"styles-module__md_tooltip___B4cfX",lg_tooltip:"styles-module__lg_tooltip___9-Nxt",textfield_wrapper:"styles-module__textfield_wrapper___yQZ5S",sm_textfield:"styles-module__sm_textfield___gxtsR",md_textfield:"styles-module__md_textfield___8ucoR",lg_textfield:"styles-module__lg_textfield___ZHlU2",input_description:"styles-module__input_description___zk91j",input_error_msg:"styles-module__input_error_msg___aeTfS",clear_button:"styles-module__clear_button___XFHzC"},X=({label:o,labelPosition:r="top",size:l="md",required:_,tooltip:s,tooltipPosition:n="top",errorMsg:d,description:m,onChange:c,onClear:y,...u})=>{const[x,g]=p.useState(0);let C=f.md_label,h=f.md_textfield,$=f.md_tooltip;l==="sm"?(C=f.sm_label,h=f.sm_textfield,$=f.sm_tooltip):l==="lg"&&(C=f.lg_label,h=f.lg_textfield,$=f.lg_tooltip);const T=p.useCallback(k=>{c&&(g(k?.length),c(k))},[c]);return t.jsxs("div",{className:r==="top"?f.top_label_textfield:f.left_label_textfield,children:[t.jsxs("div",{children:[o&&t.jsx(i.Input.Label,{required:_,className:C,children:o}),s&&t.jsx(i.Tooltip,{label:s,position:n,children:t.jsx("div",{className:$,children:t.jsx(e.IconInfoCircle,{size:l==="sm"?14:l==="lg"?20:16})})})]}),t.jsxs("div",{children:[t.jsx("div",{className:f.textfield_wrapper,children:t.jsx(i.Autocomplete,{...u,size:l,error:d,className:h,onChange:T,leftSection:t.jsx(e.IconSearch,{size:l==="sm"?16:l==="lg"?24:20}),rightSection:y&&x>0?t.jsx("div",{className:f.clear_button,onClick:y,children:t.jsx(e.IconClose,{size:l==="sm"?16:l==="lg"?24:20})}):void 0})}),m&&t.jsx(i.Input.Description,{className:f.input_description,children:m}),d&&t.jsx(i.Input.Error,{className:f.input_error_msg,children:d})]})]})},B={left_label_textfield:"styles-module__left_label_textfield___UhCQL",top_label_textfield:"styles-module__top_label_textfield___JPXoC",sm_label:"styles-module__sm_label___B0s7a",md_label:"styles-module__md_label___JcIkl",lg_label:"styles-module__lg_label___-NGe2",sm_tooltip:"styles-module__sm_tooltip___8vbL2",md_tooltip:"styles-module__md_tooltip___7vlZ9",lg_tooltip:"styles-module__lg_tooltip___QYczb",sm_textfield:"styles-module__sm_textfield___kNlMo",md_textfield:"styles-module__md_textfield___-sLZE",lg_textfield:"styles-module__lg_textfield___xVbCh",input_description:"styles-module__input_description___pTq1F",input_error_msg:"styles-module__input_error_msg___zAIoT"},J=({label:o,labelPosition:r="top",size:l="md",required:_,tooltip:s,tooltipPosition:n="top",errorMsg:d,description:m,...c})=>{const[y,u]=p.useState(!1);let x=B.md_label,g=B.md_textfield,C=B.md_tooltip,h=18;return l==="sm"?(x=B.sm_label,g=B.sm_textfield,C=B.sm_tooltip,h=14):l==="lg"&&(x=B.lg_label,g=B.lg_textfield,C=B.lg_tooltip,h=24),t.jsxs("div",{className:r==="top"?B.top_label_textfield:B.left_label_textfield,children:[t.jsxs("div",{children:[o&&t.jsx(i.Input.Label,{required:_,className:x,children:o}),s&&t.jsx(i.Tooltip,{label:s,position:n,children:t.jsx("div",{className:C,children:t.jsx(e.IconInfoCircle,{size:l==="sm"?14:l==="lg"?20:16})})})]}),t.jsxs("div",{children:[t.jsx(i.Select,{...c,size:l,error:d,className:g,rightSection:y?t.jsx(e.IconChevronUp,{size:h}):t.jsx(e.IconChevronDown,{size:h}),onDropdownOpen:()=>u(!0),onDropdownClose:()=>u(!1),styles:()=>({option:{"&[data-selected]":{"&, &:hover":{backgroundColor:"#e7e7e7",color:"#000000"}}}})}),m&&t.jsx(i.Input.Description,{className:B.input_description,children:m}),d&&t.jsx(i.Input.Error,{className:B.input_error_msg,children:d})]})]})},I={sm_checkbox:"styles-module__sm_checkbox___0JMac",md_checkbox:"styles-module__md_checkbox___aP9T1",lg_checkbox:"styles-module__lg_checkbox___CmiVr"},K=({size:o="md",...r})=>{let l=I.md_checkbox,_=24;return o==="sm"?(l=I.sm_checkbox,_=18):o==="lg"&&(l=I.lg_checkbox,_=32),t.jsx(i.Checkbox,{className:l,styles:{inner:{width:_,height:_}},...r})},W={sm_radio:"styles-module__sm_radio___jQtvO",md_radio:"styles-module__md_radio___h-OD5",lg_radio:"styles-module__lg_radio___XdzaN"},G=({size:o="md",...r})=>{let l=W.md_radio;return o==="sm"?l=W.sm_radio:o==="lg"&&(l=W.lg_radio),t.jsx(i.Radio,{className:l,size:o,...r})},F={sm_toggle:"styles-module__sm_toggle___Mabl5",md_toggle:"styles-module__md_toggle___6mSJO",lg_toggle:"styles-module__lg_toggle___Dv7k7"},R=({size:o="md",labelPosition:r="right",disabled:l,onChange:_,...s})=>{const[n,d]=p.useState(s?.checked||!1);let m=F.md_toggle,c=50;o==="sm"?(m=F.sm_toggle,c=38):o==="lg"&&(m=F.lg_toggle,c=67);const y=p.useCallback(u=>{_&&_(u),d(u?.target?.checked)},[_]);return t.jsx(i.Switch,{className:m,size:o,labelPosition:r,disabled:l,onChange:y,styles:()=>({track:{backgroundColor:!l&&n?"#0fd3d8 !important":void 0,borderColor:!l&&n?"#0fd3d8 !important":void 0,width:c}}),...s})},M={sm_textfield:"styles-module__sm_textfield___EtBYr",md_textfield:"styles-module__md_textfield___Lzjxb",lg_textfield:"styles-module__lg_textfield___Zc8R8"},ee=({size:o="md",type:r="default",withTime:l,..._})=>{let s=M.md_textfield,n=18;return o==="sm"?(s=M.sm_textfield,n=14):o==="lg"&&(s=M.lg_textfield,n=24),l?t.jsx(w.DateTimePicker,{className:s,size:o,locale:"ko",firstDayOfWeek:0,monthLabelFormat:"YYYY년 MM월",valueFormat:"YYYY-MM-DD | a hh:mm",rightSection:t.jsx(e.IconCalendar,{size:n}),..._}):t.jsx(w.DatePickerInput,{className:s,type:r,size:o,locale:"ko",firstDayOfWeek:0,monthLabelFormat:"YYYY년 MM월",valueFormat:"YYYY-MM-DD",rightSection:t.jsx(e.IconCalendar,{size:n}),..._})},Y={sm_textfield:"styles-module__sm_textfield___sNGu-",md_textfield:"styles-module__md_textfield___0bonT",lg_textfield:"styles-module__lg_textfield___v-WEc"},te=({size:o="md",...r})=>{const l=p.useRef(null);let _=Y.md_textfield,s=18;return o==="sm"?(_=Y.sm_textfield,s=14):o==="lg"&&(_=Y.lg_textfield,s=24),t.jsx(w.TimeInput,{ref:l,className:_,size:o,...r,rightSection:t.jsx(i.ActionIcon,{onClick:()=>{l&&l?.current?.showPicker()},children:t.jsx(e.IconClock,{size:s})})})},S={pagination:"style-module__pagination___kYC1n",page_index:"style-module__page_index___OZss8",page_index_active:"style-module__page_index_active___vi0-E",arrow:"style-module__arrow___pSNRc"},le=({currentPageIdx:o,rowsPerPage:r,totalLength:l,paginationSize:_,onPageChange:s,...n})=>{const[d,m]=p.useState(o),[c,y]=p.useState(50),[u,x]=p.useState(1),[g,C]=p.useState(5);p.useMemo(()=>{m(o),y(r||50),x(l||1),C(_||5)},[o,r,l,_]);const h=()=>{s&&s(d-(d%g+1)),m(T=>T-(T%g+1))},$=()=>{s&&s(d+g-d%g),m(T=>T+g-T%g)};return t.jsxs("div",{...n,className:S.pagination,children:[d>=g?t.jsx("button",{className:S.arrow,onClick:h,children:t.jsx(e.IconChevronLeft,{size:20})}):null,new Array(g).fill(0).map((T,k)=>{const v=Math.floor(d/g)*g+k+1;if(!(v>Math.ceil(u/c)))return t.jsx("button",{className:d===v-1?S.page_index_active:S.page_index,onClick:()=>{m(v-1),s&&s(v-1)},children:v},`pagination_${k}`)}),Math.floor(d/g)*g+g<Math.ceil(u/c)?t.jsx("button",{className:S.arrow,onClick:$,children:t.jsx(e.IconChevronRight,{size:20})}):null]})},E={tab_title_list:"styles-module__tab_title_list___b6YAl",border_bottom:"styles-module__border_bottom___mZKE9"},oe=({tabList:o=[],containerPaddingTop:r,...l})=>t.jsxs(i.Tabs,{...l,children:[t.jsx(i.Tabs.List,{className:E.tab_title_list,children:o?.map((_,s)=>t.jsxs(i.Tabs.Tab,{value:_.value,leftSection:_.icon,children:[_.title,t.jsx("div",{className:E.border_bottom})]},`tab_${s}`))}),o?.map((_,s)=>t.jsx(i.Tabs.Panel,{value:_.value,pt:r,children:_.body},`tab_panel_${s}`))]}),H={sm_segment_button:"styles-module__sm_segment_button___-neWq",md_segment_button:"styles-module__md_segment_button___1xzQt",lg_segment_button:"styles-module__lg_segment_button___7OhhZ"},_e=({size:o="md",radius:r=6,...l})=>{let _=H.md_segment_button;return o==="sm"?_=H.sm_segment_button:o==="lg"&&(_=H.lg_segment_button),t.jsx(i.SegmentedControl,{className:_,size:o,radius:r,styles:{control:{borderWidth:"0 !important"}},...l})},P={light_success:"styles-module__light_success___696tv",light_error:"styles-module__light_error___KqP2q",fill_success:"styles-module__fill_success___P2asv",fill_error:"styles-module__fill_error___e1KYC"},se=({visible:o=!1,type:r="success",variant:l="light",top:_=48,right:s=48,...n})=>{let d=P.light_success;return l==="fill"?r==="success"?d=P.fill_success:r==="error"&&(d=P.fill_error):r==="success"?d=P.light_success:r==="error"&&(d=P.light_error),o?t.jsx(i.Alert,{className:d,icon:r==="success"?t.jsx(e.IconCheckCircle,{size:20}):t.jsx(e.IconWarningCircle,{size:20}),styles:{title:{marginBottom:n?.children?void 0:0}},pos:"fixed",top:_,right:s,...n}):null},L={tooltip_body:"styles-module__tooltip_body___3s5ij",tooltip_title:"styles-module__tooltip_title___glF9X",tooltip_content:"styles-module__tooltip_content___o94IZ"},re=({title:o,content:r,maw:l=280,multiline:_=!0,...s})=>t.jsx(i.Tooltip,{...s,maw:l,multiline:_,label:t.jsxs("div",{className:L.tooltip_body,children:[o&&t.jsx("span",{className:L.tooltip_title,children:o}),t.jsx("span",{className:L.tooltip_content,children:r})]})}),ie=({size:o="md",width:r,withCloseButton:l=!1,..._})=>{let s=768;return o==="xs"?s=360:o==="sm"?s=544:o==="lg"?s=1e3:o==="xl"&&(s=1200),t.jsx(i.Modal,{size:r||s,withCloseButton:l,..._})},D={image_uploader:"styles-module__image_uploader___yzVim",preview:"styles-module__preview___nA1QH",image_uploader_wrapper:"styles-module__image_uploader_wrapper___0EZ7A",file_clear_button:"styles-module__file_clear_button___kEABJ"},de=({width:o,height:r,defaultMsg:l="이미지 업로드",file:_,onDrop:s,showClearButton:n,onClear:d,...m})=>{const[c,y]=p.useState(_),u=p.useCallback(()=>{y(void 0),d&&d()},[d]);return t.jsxs("div",{className:D.image_uploader_wrapper,children:[n&&c?t.jsx("div",{className:D.file_clear_button,onClick:u,children:t.jsx(e.IconCloseCircle,{size:24})}):null,t.jsx(z.Dropzone,{...m,maxFiles:1,className:D.image_uploader,accept:z.IMAGE_MIME_TYPE,onDrop:x=>{y(x[0]),s&&s(x)},style:{width:o,height:r},children:t.jsx(t.Fragment,{children:c?t.jsx("img",{className:D.preview,src:typeof c=="string"?c:URL.createObjectURL(c),alt:`파일명: ${typeof c=="string"?c:c.name}`,title:`파일명: ${typeof c=="string"?c:c.name}`}):t.jsxs("div",{children:[t.jsx(e.IconPhoto,{size:48}),t.jsx("span",{children:l})]})})})]})};Object.defineProperty(a,"PopUiProvider",{enumerable:!0,get:()=>i.MantineProvider}),a.Alert=se,a.Button=V,a.Checkbox=K,a.DatePicker=ee,a.Dropdown=J,a.ImageUploader=de,a.Modal=ie,a.Pagination=le,a.Radio=G,a.SearchBar=X,a.SegmentButton=_e,a.Tab=oe,a.TextField=Q,a.TimePicker=te,a.Toggle=R,a.Tooltip=re,Object.defineProperty(a,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,16 +1,15 @@
1
- import { AlertProps as AlertProps_2 } from '@mantine/core';
2
1
  import { AutocompleteProps } from '@mantine/core';
3
2
  import { ButtonProps } from '@mantine/core';
4
- import { CheckboxProps as CheckboxProps_2 } from '@mantine/core';
3
+ import { CheckboxProps } from '@mantine/core';
5
4
  import { DatePickerInputProps } from '@mantine/dates';
6
5
  import { DropzoneProps } from '@mantine/dropzone';
7
6
  import { FileWithPath } from '@mantine/dropzone';
8
7
  import { HTMLAttributes } from 'react';
9
8
  import { InputProps } from '@mantine/core';
10
9
  import { JSX } from 'react/jsx-runtime';
11
- import { ModalProps as ModalProps_2 } from '@mantine/core';
10
+ import { ModalProps } from '@mantine/core';
12
11
  import { MantineProvider as PopUiProvider } from '@mantine/core';
13
- import { RadioProps as RadioProps_2 } from '@mantine/core';
12
+ import { RadioProps } from '@mantine/core';
14
13
  import { ReactNode } from 'react';
15
14
  import { SegmentedControlProps } from '@mantine/core';
16
15
  import { SelectProps } from '@mantine/core';
@@ -18,32 +17,34 @@ import { SwitchProps } from '@mantine/core';
18
17
  import { TabsProps } from '@mantine/core';
19
18
  import { TextareaProps } from '@mantine/core';
20
19
  import { TimeInputProps } from '@mantine/dates';
21
- import { TooltipProps as TooltipProps_2 } from '@mantine/core';
20
+ import { TooltipProps } from '@mantine/core';
22
21
 
23
- export declare const Alert: ({ visible, type, variant, top, right, ...props }: AlertProps) => JSX.Element | null;
22
+ export declare function Button({ children, size, variant, isLoading, disabled, ...props }: IButtonProps): JSX.Element;
24
23
 
25
- declare interface AlertProps extends AlertProps_2 {
26
- visible: boolean;
27
- type?: "success" | "error";
28
- variant?: "fill" | "light";
29
- title?: string;
30
- }
24
+ export declare const Checkbox: ({ size, ...props }: ICheckboxProps) => JSX.Element;
31
25
 
32
- export declare function Button({ children, size, variant, isLoading, disabled, ...props }: IButtonProps): JSX.Element;
26
+ export declare const DatePicker: ({ size, type, withTime, ...props }: IDatePickerProps) => JSX.Element;
27
+
28
+ export declare const Dropdown: ({ label, labelPosition, size, required, tooltip, tooltipPosition, errorMsg, description, ...props }: IDropdownProps) => JSX.Element;
33
29
 
34
- export declare const Checkbox: ({ size, ...props }: CheckboxProps) => JSX.Element;
30
+ declare interface IButtonProps extends Omit<ButtonProps, 'variant' | 'styles'> {
31
+ onClick?: () => void;
32
+ size?: TButtonSize;
33
+ variant?: TButtonVariant;
34
+ isLoading?: boolean;
35
+ }
35
36
 
36
- declare interface CheckboxProps extends CheckboxProps_2 {
37
- size?: "sm" | "md" | "lg";
37
+ declare interface ICheckboxProps extends CheckboxProps {
38
+ size?: 'sm' | 'md' | 'lg';
38
39
  }
39
40
 
40
- declare interface CommonTextFieldProps {
41
+ declare interface ICommonTextFieldProps {
41
42
  label?: string;
42
- labelPosition?: "top" | "left";
43
- size?: "sm" | "md" | "lg";
43
+ labelPosition?: 'top' | 'left';
44
+ size?: 'sm' | 'md' | 'lg';
44
45
  required?: boolean;
45
46
  tooltip?: string;
46
- tooltipPosition?: "top" | "bottom" | "left" | "right";
47
+ tooltipPosition?: 'top' | 'bottom' | 'left' | 'right';
47
48
  description?: string;
48
49
  errorMsg?: string;
49
50
  maxTextCount?: number;
@@ -51,26 +52,23 @@ declare interface CommonTextFieldProps {
51
52
  onClear?: () => void;
52
53
  }
53
54
 
54
- export declare const DatePicker: ({ size, type, withTime, ...props }: DatePickerProps) => JSX.Element;
55
-
56
- declare interface DatePickerProps extends DatePickerInputProps {
57
- size?: "sm" | "md" | "lg";
58
- type?: "default" | "multiple" | "range";
55
+ declare interface IDatePickerProps extends DatePickerInputProps {
56
+ size?: 'sm' | 'md' | 'lg';
57
+ type?: 'default' | 'multiple' | 'range';
59
58
  withTime?: boolean;
60
59
  }
61
60
 
62
- export declare const Dropdown: ({ label, labelPosition, size, required, tooltip, tooltipPosition, errorMsg, description, ...props }: SearchBarProps_2) => JSX.Element;
63
-
64
- declare interface IButtonProps extends Omit<ButtonProps, 'variant' | 'styles'> {
65
- onClick?: () => void;
66
- size?: TButtonSize;
67
- variant?: TButtonVariant;
68
- isLoading?: boolean;
61
+ declare interface IDropdownProps extends SelectProps {
62
+ label?: string;
63
+ labelPosition?: 'top' | 'left';
64
+ size?: 'sm' | 'md' | 'lg';
65
+ tooltip?: string;
66
+ tooltipPosition?: 'top' | 'bottom' | 'left' | 'right';
67
+ description?: string;
68
+ errorMsg?: string;
69
69
  }
70
70
 
71
- export declare const ImageUploader: ({ width, height, defaultMsg, file, onDrop, showClearButton, onClear, ...props }: ImageUploaderProps) => JSX.Element;
72
-
73
- declare interface ImageUploaderProps extends DropzoneProps {
71
+ declare interface IImageUploaderProps extends DropzoneProps {
74
72
  width?: number;
75
73
  height?: number;
76
74
  defaultMsg?: ReactNode;
@@ -79,16 +77,14 @@ declare interface ImageUploaderProps extends DropzoneProps {
79
77
  onClear?: () => void;
80
78
  }
81
79
 
82
- export declare const Modal: ({ size, width, withCloseButton, ...props }: ModalProps) => JSX.Element;
80
+ export declare const ImageUploader: ({ width, height, defaultMsg, file, onDrop, showClearButton, onClear, ...props }: IImageUploaderProps) => JSX.Element;
83
81
 
84
- declare interface ModalProps extends ModalProps_2 {
85
- size?: "xs" | "sm" | "md" | "lg" | "xl";
82
+ declare interface IModalProps extends ModalProps {
83
+ size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl';
86
84
  width?: number;
87
85
  }
88
86
 
89
- export declare const Pagination: ({ currentPageIdx, rowsPerPage, totalLength, paginationSize, onPageChange, ...props }: PaginationProps) => JSX.Element;
90
-
91
- declare interface PaginationProps extends HTMLAttributes<HTMLDivElement> {
87
+ declare interface IPaginationProps extends HTMLAttributes<HTMLDivElement> {
92
88
  currentPageIdx: number;
93
89
  rowsPerPage?: number;
94
90
  totalLength?: number;
@@ -96,90 +92,108 @@ declare interface PaginationProps extends HTMLAttributes<HTMLDivElement> {
96
92
  onPageChange?: (e: number) => void;
97
93
  }
98
94
 
99
- export { PopUiProvider }
100
-
101
- export declare const Radio: ({ size, ...props }: RadioProps) => JSX.Element;
102
-
103
- declare interface RadioProps extends RadioProps_2 {
104
- size?: "sm" | "md" | "lg";
95
+ declare interface IRadioProps extends RadioProps {
96
+ size?: 'sm' | 'md' | 'lg';
105
97
  }
106
98
 
107
- export declare const SearchBar: ({ label, labelPosition, size, required, tooltip, tooltipPosition, errorMsg, description, onChange, onClear, ...props }: SearchBarProps) => JSX.Element;
108
-
109
- declare interface SearchBarProps extends AutocompleteProps {
99
+ declare interface ISearchBarProps extends AutocompleteProps {
110
100
  label?: string;
111
- labelPosition?: "top" | "left";
112
- size?: "sm" | "md" | "lg";
101
+ labelPosition?: 'top' | 'left';
102
+ size?: 'sm' | 'md' | 'lg';
113
103
  tooltip?: string;
114
- tooltipPosition?: "top" | "bottom" | "left" | "right";
104
+ tooltipPosition?: 'top' | 'bottom' | 'left' | 'right';
115
105
  description?: string;
116
106
  errorMsg?: string;
117
107
  onChange?: (event: any) => void;
118
108
  onClear?: () => void;
119
109
  }
120
110
 
121
- declare interface SearchBarProps_2 extends SelectProps {
122
- label?: string;
123
- labelPosition?: "top" | "left";
124
- size?: "sm" | "md" | "lg";
125
- tooltip?: string;
126
- tooltipPosition?: "top" | "bottom" | "left" | "right";
127
- description?: string;
128
- errorMsg?: string;
129
- }
130
-
131
- export declare const SegmentButton: ({ size, radius, ...props }: SegmentButtonProps) => JSX.Element;
132
-
133
- declare interface SegmentButtonProps extends SegmentedControlProps {
134
- size?: "sm" | "md" | "lg";
135
- radius?: number | "xs" | "sm" | "md" | "lg" | "xl";
111
+ declare interface ISegmentButtonProps extends SegmentedControlProps {
112
+ size?: 'sm' | 'md' | 'lg';
113
+ radius?: number | 'xs' | 'sm' | 'md' | 'lg' | 'xl';
136
114
  }
137
115
 
138
- export declare const Tab: ({ tabList, containerPaddingTop, ...props }: TabProps) => JSX.Element;
139
-
140
- declare interface TabProps extends TabsProps {
116
+ declare interface ITabProps extends TabsProps {
141
117
  tabList: {
142
118
  title: string;
143
119
  value: string;
144
120
  body: ReactNode;
145
121
  icon?: ReactNode;
146
122
  }[];
147
- containerPaddingTop?: "xs" | "sm" | "md" | "lg" | "xl";
123
+ containerPaddingTop?: 'xs' | 'sm' | 'md' | 'lg' | 'xl';
148
124
  }
149
125
 
150
- declare type TButtonSize = "sm" | "md" | "lg";
151
-
152
- declare type TButtonVariant = "primary" | "primaryLine" | "basic" | "danger" | "setting" | "warning";
153
-
154
- export declare const TextField: (allProps: TextFieldProps) => JSX.Element;
155
-
156
- declare type TextFieldProps = CommonTextFieldProps & (({
157
- textarea?: false;
158
- } & Omit<InputProps, keyof CommonTextFieldProps | 'vars'>) | ({
159
- textarea: true;
160
- minRows?: number;
161
- } & Omit<TextareaProps, keyof CommonTextFieldProps | 'vars'>));
162
-
163
- export declare const TimePicker: ({ size, ...props }: TimePickerProps) => JSX.Element;
164
-
165
- declare interface TimePickerProps extends TimeInputProps {
166
- size?: "sm" | "md" | "lg";
126
+ declare interface ITimePickerProps extends TimeInputProps {
127
+ size?: 'sm' | 'md' | 'lg';
167
128
  }
168
129
 
169
- export declare const Toggle: ({ size, labelPosition, disabled, onChange, ...props }: ToggleProps) => JSX.Element;
130
+ declare interface IToastOptions {
131
+ message: string;
132
+ icon?: ReactNode;
133
+ autoClose?: number | false;
134
+ }
170
135
 
171
- declare interface ToggleProps extends SwitchProps {
172
- size?: "sm" | "md" | "lg";
173
- labelPosition: "left" | "right";
136
+ declare interface IToggleProps extends SwitchProps {
137
+ size?: 'sm' | 'md' | 'lg';
138
+ labelPosition: 'left' | 'right';
174
139
  disabled?: boolean;
175
140
  onChange?: (event: any) => void;
176
141
  }
177
142
 
178
- export declare const Tooltip: ({ title, content, maw, multiline, ...props }: TooltipProps) => JSX.Element;
179
-
180
- declare interface TooltipProps extends TooltipProps_2 {
143
+ declare interface ITooltipProps extends TooltipProps {
181
144
  title?: string;
182
145
  content: string;
183
146
  }
184
147
 
148
+ export declare const Modal: ({ size, width, withCloseButton, ...props }: IModalProps) => JSX.Element;
149
+
150
+ export declare const Pagination: ({ currentPageIdx, rowsPerPage, totalLength, paginationSize, onPageChange, ...props }: IPaginationProps) => JSX.Element;
151
+
152
+ export { PopUiProvider }
153
+
154
+ export declare const Radio: ({ size, ...props }: IRadioProps) => JSX.Element;
155
+
156
+ export declare const SearchBar: ({ label, labelPosition, size, required, tooltip, tooltipPosition, errorMsg, description, onChange, onClear, ...props }: ISearchBarProps) => JSX.Element;
157
+
158
+ export declare const SegmentButton: ({ size, radius, ...props }: ISegmentButtonProps) => JSX.Element;
159
+
160
+ export declare const Tab: ({ tabList, containerPaddingTop, ...props }: ITabProps) => JSX.Element;
161
+
162
+ declare type TButtonSize = "sm" | "md" | "lg";
163
+
164
+ declare type TButtonVariant = "primary" | "primaryLine" | "basic" | "danger" | "setting" | "warning";
165
+
166
+ export declare const TextField: (allProps: TTextFieldProps) => JSX.Element;
167
+
168
+ export declare const TimePicker: ({ size, ...props }: ITimePickerProps) => JSX.Element;
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
+
186
+ export declare const Toggle: ({ size, labelPosition, disabled, onChange, ...props }: IToggleProps) => JSX.Element;
187
+
188
+ export declare const Tooltip: ({ title, content, maw, multiline, ...props }: ITooltipProps) => JSX.Element;
189
+
190
+ declare type TTextFieldProps = ICommonTextFieldProps & (({
191
+ textarea?: false;
192
+ } & Omit<InputProps, keyof ICommonTextFieldProps | 'vars'>) | ({
193
+ textarea: true;
194
+ minRows?: number;
195
+ } & Omit<TextareaProps, keyof ICommonTextFieldProps | 'vars'>));
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.25",
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",
@@ -39,7 +39,8 @@
39
39
  "dev": "vite",
40
40
  "build": "vite build",
41
41
  "typecheck": "tsc",
42
- "lint": "eslint src --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
42
+ "lint": "eslint src --max-warnings 0",
43
+ "lint:fix": "eslint src --fix",
43
44
  "preview": "vite preview"
44
45
  },
45
46
  "dependencies": {
@@ -47,7 +48,8 @@
47
48
  "@mantine/dates": "^8.3.6",
48
49
  "@mantine/dropzone": "^8.3.6",
49
50
  "@mantine/hooks": "^8.3.6",
50
- "@pop-ui/foundation": "0.0.25",
51
+ "@mantine/notifications": "^8.3.6",
52
+ "@pop-ui/foundation": "0.0.26",
51
53
  "dayjs": "^1.11.18"
52
54
  },
53
55
  "peerDependencies": {
@@ -62,7 +64,6 @@
62
64
  "@mantine/form": "^8.3.6",
63
65
  "@mantine/hooks": "^8.3.6",
64
66
  "@mantine/modals": "^8.3.6",
65
- "@mantine/notifications": "^8.3.6",
66
67
  "@mantine/nprogress": "^8.3.6",
67
68
  "@mantine/prism": "^6.0.22",
68
69
  "@mantine/spotlight": "^8.3.6",
@@ -96,5 +97,5 @@
96
97
  "typescript": "^5.9.3",
97
98
  "vite": "^7.1.12"
98
99
  },
99
- "gitHead": "a3eaa57a2f759a3cd4b37f5c1ca7274c9b3f02ca"
100
+ "gitHead": "3d18c062d9b98af9679701d7b3cdc99e336b31e5"
100
101
  }