@pop-ui/core 0.0.33 → 0.0.35

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,10 +1,10 @@
1
- (function(n,l){typeof exports=="object"&&typeof module<"u"?l(exports,require("react/jsx-runtime"),require("@mantine/core"),require("react"),require("@pop-ui/foundation"),require("@mantine/notifications"),require("dayjs/locale/ko"),require("@mantine/dates"),require("@mantine/dropzone")):typeof define=="function"&&define.amd?define(["exports","react/jsx-runtime","@mantine/core","react","@pop-ui/foundation","@mantine/notifications","dayjs/locale/ko","@mantine/dates","@mantine/dropzone"],l):(n=typeof globalThis<"u"?globalThis:n||self,l(n.Core={},n.jsxRuntime,n.MantineCore,n.React,n.foundation,n.notifications,null,n.dates,n.dropzone))})(this,function(n,l,i,T,e,k,pe,f,V){"use strict";const Z={primary:e.TextColorButtonTextPrimaryDefault,primaryLine:e.TextColorButtonTextPrimarylineDefault,basic:e.TextColorButtonTextBasicDefault,danger:e.TextColorButtonTextPrimaryDefault,setting:e.TextColorButtonTextPrimaryDefault,warning:e.TextColorButtonTextPrimaryDefault},G={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"}}},K={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 Q(t,_){const o=G[t];return{root:{...K[_],...o.default,"&:hover:not(:disabled)":o.hover,"&:active:not(:disabled)":o.active,"&:focus:not(:disabled)":o.focus,"&:disabled":o.disabled}}}function X({children:t,size:_="md",variant:o="primary",isLoading:r=!1,disabled:a=!1,...c}){const s=T.useMemo(()=>Q(o,_),[o,_]),m=Z[o],d=T.useMemo(()=>{switch(_){case"lg":return 18;case"sm":return 14;case"md":default:return 16}},[_]);return l.jsx(i.Button,{type:"button",styles:s,disabled:a||r,...c,children:r?l.jsx(i.Loader,{color:m,size:d}):t})}const N={"Checkbox--Small":"styles-module__Checkbox--Small___VZGlw","Checkbox--Medium":"styles-module__Checkbox--Medium___Vwpa3","Checkbox--Large":"styles-module__Checkbox--Large___ybTGE"},R=({size:t="md",..._})=>{let o=N["Checkbox--Medium"],r=24;return t==="sm"?(o=N["Checkbox--Small"],r=18):t==="lg"&&(o=N["Checkbox--Large"],r=32),l.jsx(i.Checkbox,{className:o,styles:{inner:{width:r,height:r}},..._})},W={"DatePicker--Small":"styles-module__DatePicker--Small___m8asv","DatePicker--Medium":"styles-module__DatePicker--Medium___Po2-B","DatePicker--Large":"styles-module__DatePicker--Large___oQ6EM"},ee=({size:t="md",type:_="default",withTime:o,...r})=>{let a=W["DatePicker--Medium"],c=18;return t==="sm"?(a=W["DatePicker--Small"],c=14):t==="lg"&&(a=W["DatePicker--Large"],c=24),o?l.jsx(f.DateTimePicker,{className:a,size:t,locale:"ko",firstDayOfWeek:0,monthLabelFormat:"YYYY년 MM월",valueFormat:"YYYY-MM-DD | a hh:mm",rightSection:l.jsx(e.IconCalendar,{size:c}),...r}):l.jsx(f.DatePickerInput,{className:a,type:_,size:t,locale:"ko",firstDayOfWeek:0,monthLabelFormat:"YYYY년 MM월",valueFormat:"YYYY-MM-DD",rightSection:l.jsx(e.IconCalendar,{size:c}),...r})},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"},oe=({label:t,labelPosition:_="top",size:o="md",required:r,tooltip:a,tooltipPosition:c="top",errorMsg:s,description:m,...d})=>{const[p,g]=T.useState(!1);let h=S["Dropdown__Label--Medium"],x=S["Dropdown--Medium"],u=S["Dropdown__Tooltip--Medium"],y=18;return o==="sm"?(h=S["Dropdown__Label--Small"],x=S["Dropdown--Small"],u=S["Dropdown__Tooltip--Small"],y=14):o==="lg"&&(h=S["Dropdown__Label--Large"],x=S["Dropdown--Large"],u=S["Dropdown__Tooltip--Large"],y=24),l.jsxs("div",{className:_==="top"?S["Dropdown--TopLabel"]:S["Dropdown--LeftLabel"],children:[l.jsxs("div",{children:[t&&l.jsx(i.Input.Label,{required:r,className:h,children:t}),a&&l.jsx(i.Tooltip,{label:a,position:c,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(i.Select,{...d,size:o,error:s,className:x,rightSection:p?l.jsx(e.IconChevronUp,{size:y}):l.jsx(e.IconChevronDown,{size:y}),onDropdownOpen:()=>g(!0),onDropdownClose:()=>g(!1),styles:{option:{"&[data-selected]":{"&, &:hover":{backgroundColor:"#e7e7e7",color:"#000000"}}}}}),m&&l.jsx(i.Input.Description,{className:S.Dropdown__Description,children:m}),s&&l.jsx(i.Input.Error,{className:S.Dropdown__ErrorMsg,children:s})]})]})},M={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"},le=({width:t,height:_,defaultMsg:o="이미지 업로드",file:r,onDrop:a,showClearButton:c,onClear:s,...m})=>{const[d,p]=T.useState(r),g=T.useCallback(()=>{p(void 0),s&&s()},[s]);return l.jsxs("div",{className:M.ImageUploader__Wrapper,children:[c&&d?l.jsx("div",{className:M.ImageUploader__FileClearButton,onClick:g,children:l.jsx(e.IconCloseCircle,{size:24})}):null,l.jsx(V.Dropzone,{...m,maxFiles:1,className:M.ImageUploader,accept:V.IMAGE_MIME_TYPE,onDrop:h=>{p(h[0]),a&&a(h)},style:{width:t,height:_},children:l.jsx(l.Fragment,{children:d?l.jsx("img",{className:M.ImageUploader__Preview,src:typeof d=="string"?d:URL.createObjectURL(d),alt:`파일명: ${typeof d=="string"?d:d.name}`,title:`파일명: ${typeof d=="string"?d:d.name}`}):l.jsxs("div",{children:[l.jsx(e.IconPhoto,{size:48}),l.jsx("span",{children:o})]})})})]})},te=({size:t="md",width:_,withCloseButton:o=!1,...r})=>{let a=768;return t==="xs"?a=360:t==="sm"?a=544:t==="lg"?a=1e3:t==="xl"&&(a=1200),l.jsx(i.Modal,{size:_||a,withCloseButton:o,...r})},F={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:t,rowsPerPage:_,totalLength:o,paginationSize:r,onPageChange:a,...c})=>{const[s,m]=T.useState(t),d=_||50,p=o||1,g=r||5;T.useEffect(()=>{m(t)},[t]);const h=()=>{a&&a(s-(s%g+1)),m(u=>u-(u%g+1))},x=()=>{a&&a(s+g-s%g),m(u=>u+g-u%g)};return l.jsxs("div",{...c,className:F.Pagination,children:[s>=g?l.jsx("button",{className:F.Pagination__Arrow,onClick:h,children:l.jsx(e.IconChevronLeft,{size:20})}):null,new Array(g).fill(0).map((u,y)=>{const b=Math.floor(s/g)*g+y+1;if(!(b>Math.ceil(p/d)))return l.jsx("button",{className:s===b-1?F["Pagination__PageIndex--Active"]:F.Pagination__PageIndex,onClick:()=>{m(b-1),a&&a(b-1)},children:b},`pagination_${y}`)}),Math.floor(s/g)*g+g<Math.ceil(p/d)?l.jsx("button",{className:F.Pagination__Arrow,onClick:x,children:l.jsx(e.IconChevronRight,{size:20})}):null]})},E={"Radio--Small":"styles-module__Radio--Small___izWI2","Radio--Medium":"styles-module__Radio--Medium___dwZfV","Radio--Large":"styles-module__Radio--Large___1gLra"},ae=({size:t="md",..._})=>{let o=E["Radio--Medium"];return t==="sm"?o=E["Radio--Small"]:t==="lg"&&(o=E["Radio--Large"]),l.jsx(i.Radio,{className:o,size:t,..._})},C={"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"},_e=({label:t,labelPosition:_="top",size:o="md",required:r,tooltip:a,tooltipPosition:c="top",errorMsg:s,description:m,onChange:d,onClear:p,...g})=>{const[h,x]=T.useState(0);let u=C["SearchBar__Label--Medium"],y=C["SearchBar--Medium"],b=C["SearchBar__Tooltip--Medium"];o==="sm"?(u=C["SearchBar__Label--Small"],y=C["SearchBar--Small"],b=C["SearchBar__Tooltip--Small"]):o==="lg"&&(u=C["SearchBar__Label--Large"],y=C["SearchBar--Large"],b=C["SearchBar__Tooltip--Large"]);const I=T.useCallback(D=>{d&&(x(D?.length),d(D))},[d]);return l.jsxs("div",{className:_==="top"?C["SearchBar--TopLabel"]:C["SearchBar--LeftLabel"],children:[l.jsxs("div",{children:[t&&l.jsx(i.Input.Label,{required:r,className:u,children:t}),a&&l.jsx(i.Tooltip,{label:a,position:c,children:l.jsx("div",{className:b,children:l.jsx(e.IconInfoCircle,{size:o==="sm"?14:o==="lg"?20:16})})})]}),l.jsxs("div",{children:[l.jsx("div",{className:C.SearchBar__Wrapper,children:l.jsx(i.Autocomplete,{...g,size:o,error:s,className:y,onChange:I,leftSection:l.jsx(e.IconSearch,{size:o==="sm"?16:o==="lg"?24:20}),rightSection:p&&h>0?l.jsx("div",{className:C.SearchBar__ClearButton,onClick:p,children:l.jsx(e.IconClose,{size:o==="sm"?16:o==="lg"?24:20})}):void 0})}),m&&l.jsx(i.Input.Description,{className:C.SearchBar__Description,children:m}),s&&l.jsx(i.Input.Error,{className:C.SearchBar__ErrorMsg,children:s})]})]})},U={"SegmentButton--Small":"styles-module__SegmentButton--Small___o0Y3t","SegmentButton--Medium":"styles-module__SegmentButton--Medium___EgCJm","SegmentButton--Large":"styles-module__SegmentButton--Large___Ym86C"},se=({size:t="md",radius:_=6,...o})=>{let r=U["SegmentButton--Medium"];return t==="sm"?r=U["SegmentButton--Small"]:t==="lg"&&(r=U["SegmentButton--Large"]),l.jsx(i.SegmentedControl,{className:r,size:t,radius:_,styles:{control:{borderWidth:"0 !important"}},...o})},j={Tab__TitleList:"styles-module__Tab__TitleList___urHWH",Tab__BorderBottom:"styles-module__Tab__BorderBottom___eMTpl"},ie=({tabList:t=[],containerPaddingTop:_,...o})=>l.jsxs(i.Tabs,{...o,children:[l.jsx(i.Tabs.List,{className:j.Tab__TitleList,children:t?.map((r,a)=>l.jsxs(i.Tabs.Tab,{value:r.value,leftSection:r.icon,children:[r.title,l.jsx("div",{className:j.Tab__BorderBottom})]},`tab_${a}`))}),t?.map((r,a)=>l.jsx(i.Tabs.Panel,{value:r.value,pt:_,children:r.body},`tab_panel_${a}`))]}),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"},de=t=>{const{label:_,labelPosition:o="top",size:r="md",required:a,tooltip:c,tooltipPosition:s="top",errorMsg:m,description:d,textarea:p=!1,maxTextCount:g,onChange:h,onClear:x,...u}=t,y="minRows"in t?t.minRows:void 0,[b,I]=T.useState(0);let D=B["TextField__Label--Medium"],O=B["TextField--Medium"],A=B["TextField__Tooltip--Medium"];r==="sm"?(D=B["TextField__Label--Small"],O=B["TextField--Small"],A=B["TextField__Tooltip--Small"]):r==="lg"&&(D=B["TextField__Label--Large"],O=B["TextField--Large"],A=B["TextField__Tooltip--Large"]);const J=T.useCallback(v=>{if(g){if(v.currentTarget?.value?.length>g)return;I(v.currentTarget?.value?.length),h&&h(v)}h&&(I(v.currentTarget?.value?.length),h(v))},[g,h]);return l.jsxs("div",{className:o==="top"?B["TextField--TopLabel"]:B["TextField--LeftLabel"],children:[l.jsxs("div",{children:[_&&l.jsx(i.Input.Label,{required:a,className:D,children:_}),c&&l.jsx(i.Tooltip,{label:c,position:s,children:l.jsx("div",{className:A,children:l.jsx(e.IconInfoCircle,{size:r==="sm"?14:r==="lg"?20:16})})})]}),l.jsxs("div",{children:[l.jsxs("div",{className:B.TextField__Wrapper,children:[p?l.jsx(i.Textarea,{className:B["TextField--Textarea"],size:r,minRows:y,error:m,onChange:J,disabled:u?.disabled,...u}):l.jsx(i.Input,{className:O,error:m,onChange:J,rightSection:x&&b>0?l.jsx("div",{className:B.TextField__ClearButton,onClick:x,children:l.jsx(e.IconClose,{size:r==="sm"?16:r==="lg"?24:20})}):void 0,...u}),g&&g>0&&l.jsx("span",{className:B.TextField__TextCounter,children:`${b}/${g}`})]}),d&&l.jsx(i.Input.Description,{className:B.TextField__Description,children:d}),m&&l.jsx(i.Input.Error,{className:B.TextField__ErrorMsg,children:m})]})]})},Y={"TimePicker--Small":"styles-module__TimePicker--Small___nHQa1","TimePicker--Medium":"styles-module__TimePicker--Medium___E9-rF","TimePicker--Large":"styles-module__TimePicker--Large___I0M7V"},ne=({size:t="md",..._})=>{const o=T.useRef(null);let r=Y["TimePicker--Medium"],a=18;return t==="sm"?(r=Y["TimePicker--Small"],a=14):t==="lg"&&(r=Y["TimePicker--Large"],a=24),l.jsx(f.TimeInput,{ref:o,className:r,size:t,..._,rightSection:l.jsx(i.ActionIcon,{onClick:()=>{o&&o?.current?.showPicker()},children:l.jsx(e.IconClock,{size:a})})})},L={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"},w=t=>{const _=typeof t=="string"?{message:t}:t,{message:o,id:r,icon:a,autoClose:c}=_;k.notifications.show({id:r,message:l.jsx("div",{className:L.Toast__Message,children:o}),icon:a,autoClose:c,classNames:{root:L.Toast,body:L.Toast__Body,icon:L.Toast__Icon},withCloseButton:!1,withBorder:!1})};w.update=(t,_)=>{const o=typeof _=="string"?{message:_}:_,{message:r,icon:a,autoClose:c}=o;k.notifications.update({id:t,message:l.jsx("div",{className:L.Toast__Message,children:r}),icon:a,autoClose:c,classNames:{root:L.Toast,body:L.Toast__Body,icon:L.Toast__Icon},withCloseButton:!1,withBorder:!1})},w.hide=t=>{k.notifications.hide(t)},w.clean=()=>{k.notifications.clean()};const H={"Toggle--Small":"styles-module__Toggle--Small___sOjUd","Toggle--Medium":"styles-module__Toggle--Medium___yIb8v","Toggle--Large":"styles-module__Toggle--Large___ZOJj1"},ce=({size:t="md",labelPosition:_="right",disabled:o,onChange:r,...a})=>{const[c,s]=T.useState(a?.checked||!1);let m=H["Toggle--Medium"],d=50;t==="sm"?(m=H["Toggle--Small"],d=38):t==="lg"&&(m=H["Toggle--Large"],d=67);const p=T.useCallback(g=>{r&&r(g),s(g?.target?.checked)},[r]);return l.jsx(i.Switch,{className:m,size:t,labelPosition:_,disabled:o,onChange:p,styles:()=>({track:{backgroundColor:!o&&c?"#0fd3d8 !important":void 0,borderColor:!o&&c?"#0fd3d8 !important":void 0,width:d}}),...a})},$={Tooltip__Body:"styles-module__Tooltip__Body___i1OTG",Tooltip__Title:"styles-module__Tooltip__Title___E0LoV",Tooltip__Content:"styles-module__Tooltip__Content___lU5gr"},ge=({title:t,content:_,maw:o=280,multiline:r=!0,...a})=>l.jsx(i.Tooltip,{...a,maw:o,multiline:r,label:l.jsxs("div",{className:$.Tooltip__Body,children:[t&&l.jsx("span",{className:$.Tooltip__Title,children:t}),l.jsx("span",{className:$.Tooltip__Content,children:_})]})}),q=(t="light")=>{const _=[];return Object.entries(e.colors).forEach(([o,r])=>{Object.entries(r).forEach(([a,c])=>{const s=e.getCSSVariableName(o,a);_.push(`${s}: ${c};`)})}),_.join(`
2
- `)},me=(t="light")=>{const _=document.getElementById("pop-ui-theme-vars");_&&_.remove();const o=document.createElement("style");o.id="pop-ui-theme-vars",o.textContent=`
1
+ (function(g,t){typeof exports=="object"&&typeof module<"u"?t(exports,require("react/jsx-runtime"),require("@mantine/core"),require("react"),require("@pop-ui/foundation"),require("@mantine/notifications"),require("@mantine/dates"),require("dayjs"),require("dayjs/locale/ko"),require("@mantine/dropzone")):typeof define=="function"&&define.amd?define(["exports","react/jsx-runtime","@mantine/core","react","@pop-ui/foundation","@mantine/notifications","@mantine/dates","dayjs","dayjs/locale/ko","@mantine/dropzone"],t):(g=typeof globalThis<"u"?globalThis:g||self,t(g.Core={},g.jsxRuntime,g.MantineCore,g.React,g.foundation,g.notifications,g.dates,g.dayjs,null,g.dropzone))})(this,function(g,t,m,T,o,w,E,L,Pe,J){"use strict";const X={primary:o.TextColorButtonTextPrimaryDefault,primaryLine:o.TextColorButtonTextPrimarylineDefault,basic:o.TextColorButtonTextBasicDefault,danger:o.TextColorButtonTextPrimaryDefault,setting:o.TextColorButtonTextPrimaryDefault,warning:o.TextColorButtonTextPrimaryDefault},R={primary:{default:{backgroundColor:o.BgColorButtonBgPrimaryDefault,color:o.TextColorButtonTextPrimaryDefault,border:"none"},hover:{backgroundColor:o.BgColorButtonBgPrimaryHover,color:o.TextColorButtonTextPrimaryHover},active:{backgroundColor:o.BgColorButtonBgPrimaryPressed,color:o.TextColorButtonTextPrimaryPressed},focus:{backgroundColor:o.BgColorButtonBgPrimaryFocused,color:o.TextColorButtonTextPrimaryFocused},disabled:{backgroundColor:o.BgColorButtonBgPrimaryDisabled,color:o.TextColorButtonTextPrimaryDisabled,cursor:"not-allowed"}},primaryLine:{default:{backgroundColor:o.BgColorButtonBgPrimarylineDefault,color:o.TextColorButtonTextPrimarylineDefault,border:`1px solid ${o.BorderColorButtonBorderPrimarylineDefault}`},hover:{backgroundColor:o.BgColorButtonBgPrimarylineHover,color:o.TextColorButtonTextPrimarylineHover,borderColor:o.BorderColorButtonBorderPrimarylineHover},active:{backgroundColor:o.BgColorButtonBgPrimarylinePressed,color:o.TextColorButtonTextPrimarylinePressed,borderColor:o.BorderColorButtonBorderPrimarylinePressed},focus:{backgroundColor:o.BgColorButtonBgPrimarylineFocused,color:o.TextColorButtonTextPrimarylineFocused,borderColor:o.BorderColorButtonBorderPrimarylineFocused},disabled:{backgroundColor:o.BgColorButtonBgPrimarylineDisabled,color:o.TextColorButtonTextPrimarylineDisabled,cursor:"not-allowed"}},basic:{default:{backgroundColor:o.BgColorButtonBgBasicDefault,color:o.TextColorButtonTextBasicDefault,border:`1px solid ${o.BorderColorButtonBorderBasicDefault}`},hover:{backgroundColor:o.BgColorButtonBgBasicHover,color:o.TextColorButtonTextBasicHover,borderColor:o.BorderColorButtonBorderBasicHover},active:{backgroundColor:o.BgColorButtonBgBasicPreseed,color:o.TextColorButtonTextBasicPressed,borderColor:o.BorderColorButtonBorderBasicPressed},focus:{backgroundColor:o.BgColorButtonBgBasicFocused,color:o.TextColorButtonTextBasicFocused,borderColor:o.BorderColorButtonBorderBasicFocused},disabled:{backgroundColor:o.BgColorButtonBgBasicDisabled,color:o.TextColorButtonTextBasicDisabled,cursor:"not-allowed"}},danger:{default:{backgroundColor:o.BgColorButtonBgWarningDefault,color:o.TextColorButtonTextWarningDefault,border:"none"},hover:{backgroundColor:o.BgColorButtonBgWarningHover,color:o.TextColorButtonTextWarningHover},active:{backgroundColor:o.BgColorButtonBgWarningPressed,color:o.TextColorButtonTextWarningPressed},focus:{backgroundColor:o.BgColorButtonBgWarningFocused,color:o.TextColorButtonTextWarningFocused},disabled:{backgroundColor:o.BgColorButtonBgWarningDisabled,color:o.TextColorButtonTextWarningDisabled,cursor:"not-allowed"}},setting:{default:{backgroundColor:o.BgColorButtonBgSettingDefault,color:o.TextColorButtonTextSettingDefault,border:"none"},hover:{backgroundColor:o.BgColorButtonBgSettingHover,color:o.TextColorButtonTextSettingHover},active:{backgroundColor:o.BgColorButtonBgSettingPressed,color:o.TextColorButtonTextSettingPressed},focus:{backgroundColor:o.BgColorButtonBgSettingFocused,color:o.TextColorButtonTextSettingFocused},disabled:{backgroundColor:o.BgColorButtonBgSettingDisabled,color:o.TextColorButtonTextSettingDisabled,cursor:"not-allowed"}},warning:{default:{backgroundColor:o.BgColorButtonBgWarningDefault,color:o.TextColorButtonTextWarningDefault,border:"none"},hover:{backgroundColor:o.BgColorButtonBgWarningHover,color:o.TextColorButtonTextWarningHover},active:{backgroundColor:o.BgColorButtonBgWarningPressed,color:o.TextColorButtonTextWarningPressed},focus:{backgroundColor:o.BgColorButtonBgWarningFocused,color:o.TextColorButtonTextWarningFocused},disabled:{backgroundColor:o.BgColorButtonBgWarningDisabled,color:o.TextColorButtonTextWarningDisabled,cursor:"not-allowed"}}},ee={lg:{height:"50px",padding:"0 20px",fontSize:"18px",fontWeight:700,borderRadius:"6px",lineHeight:"130%",fontFamily:"Pretendard"},md:{height:"40px",padding:"0 16px",fontSize:"16px",fontWeight:600,borderRadius:"6px",lineHeight:"130%",fontFamily:"Pretendard"},sm:{height:"30px",padding:"0 12px",fontSize:"14px",fontWeight:600,borderRadius:"4px",lineHeight:"130%",fontFamily:"Pretendard"}};function oe(r,l){const e=R[r];return{root:{...ee[l],...e.default,"&:hover:not(:disabled)":e.hover,"&:active:not(:disabled)":e.active,"&:focus:not(:disabled)":e.focus,"&:disabled":e.disabled}}}function re({children:r,size:l="md",variant:e="primary",isLoading:a=!1,disabled:_=!1,...n}){const s=T.useMemo(()=>oe(e,l),[e,l]),i=X[e],d=T.useMemo(()=>{switch(l){case"lg":return 18;case"sm":return 14;case"md":default:return 16}},[l]);return t.jsx(m.Button,{type:"button",styles:s,disabled:_||a,...n,children:a?t.jsx(m.Loader,{color:i,size:d}):r})}const U={"Checkbox--Small":"styles-module__Checkbox--Small___VZGlw","Checkbox--Medium":"styles-module__Checkbox--Medium___Vwpa3","Checkbox--Large":"styles-module__Checkbox--Large___ybTGE"},te=({size:r="md",...l})=>{let e=U["Checkbox--Medium"],a=24;return r==="sm"?(e=U["Checkbox--Small"],a=18):r==="lg"&&(e=U["Checkbox--Large"],a=32),t.jsx(m.Checkbox,{className:e,styles:{inner:{width:a,height:a}},...l})},f={datePickerWrapper:"styles-module__datePickerWrapper___8Bdcn",dayWrapper:"styles-module__dayWrapper___3teuV",todayIndicator:"styles-module__todayIndicator___Zl0e4",withoutTodayIndicator:"styles-module__withoutTodayIndicator___l6Vxh",day:"styles-module__day___DaYHh",calendarHeader:"styles-module__calendarHeader___9j1oi",calendarHeaderLevel:"styles-module__calendarHeaderLevel___wHs50",calendarHeaderControl:"styles-module__calendarHeaderControl___k317W",month:"styles-module__month___doF-A"},le=({excludedDays:r=[],excludedDates:l=[]})=>{const e=[],a=[];for(const s of l)typeof s=="string"?e.push(s):a.push(s);const _=e.map(s=>L(s)).filter(s=>s.isValid()).map(s=>s.format("YYYY-MM-DD")),n=a.map(([s,i])=>[L(s),L(i)]).filter(([s,i])=>s.isValid()&&i.isValid());return s=>{const i=L(s);if(!i.isValid())return!1;if(Array.isArray(r)&&r.includes(i.day())||_.includes(i.format("YYYY-MM-DD")))return!0;for(const[d,u]of n)if((i.isSame(d,"day")||i.isAfter(d,"day"))&&(i.isSame(u,"day")||i.isBefore(u,"day")))return!0;return!1}},ae=(r,l,e,a)=>{const _=L(r),n=L(l);for(const s of e)if(Array.isArray(s)){const i=L(s[0]),d=L(s[1]);if(!i.isValid()||!d.isValid())continue;if(!(n.isBefore(i,"day")||_.isAfter(d,"day")))return!0}for(const s of e)if(typeof s=="string"){const i=L(s);if(!i.isValid())continue;if((i.isSame(_,"day")||i.isAfter(_,"day"))&&(i.isSame(n,"day")||i.isBefore(n,"day")))return!0}if(a.length>0){let s=_;for(;s.isBefore(n,"day")||s.isSame(n,"day");){if(a.includes(s.day()))return!0;s=s.add(1,"day")}}return!1},N=(r="default")=>{switch(r){case"range":return[null,null];case"multiple":return[];default:return null}},Z=(r="default",l)=>l==null?N(r):r==="range"?Array.isArray(l)?l:N("range"):r==="multiple"?Array.isArray(l)?l:N("multiple"):Array.isArray(l)?l[0]??null:l,se=({type:r,externalValue:l,internalValue:e})=>l!==void 0?Z(r,l):e!==void 0?Z(r,e):N(r),_e=({excludedDates:r=[],excludedDays:l=[],type:e="default",value:a,onChange:_,showTodayIndicator:n=!1,...s})=>{const[i,d]=T.useState(()=>a??N(e)),u=T.useMemo(()=>le({excludedDays:l,excludedDates:r}),[l,r]),c=b=>{_&&_(b)},B=b=>{if(e==="range"&&Array.isArray(b)){const[P,M]=b;if(P&&M&&ae(P,M,r,l)){const v=[null,null];d(v),c(v);return}}d(b),c(b)},D=se({type:e,externalValue:a,internalValue:i}),p=T.useCallback(b=>{const P=L(b),M=P.date(),v=P.isSame(L(),"day"),A=v&&u(b),I=v&&n;return t.jsxs("div",{className:f.dayWrapper,children:[t.jsx("span",{children:M}),I&&t.jsx("span",{className:f.todayIndicator,"data-disabled":A||void 0,children:"오늘"})]})},[u,n]),{classNames:y,...S}=s;return t.jsx(E.DatePicker,{className:n?void 0:f.withoutTodayIndicator,classNames:{levelsGroup:f.datePickerWrapper,calendarHeader:f.calendarHeader,calendarHeaderLevel:f.calendarHeaderLevel,calendarHeaderControl:f.calendarHeaderControl,month:f.month,day:f.day,monthCell:f.monthCell,...typeof y=="object"&&y?y:{}},locale:"ko",firstDayOfWeek:0,monthLabelFormat:"YYYY년 M월",maxLevel:"month",type:e,value:D,size:"lg",onChange:B,...S,excludeDate:u,renderDay:p,weekendDays:[0],previousIcon:t.jsx(o.IconChevronLeft,{}),nextIcon:t.jsx(o.IconChevronRight,{})})},V={"DatePicker--Small":"styles-module__DatePicker--Small___m8asv","DatePicker--Medium":"styles-module__DatePicker--Medium___Po2-B","DatePicker--Large":"styles-module__DatePicker--Large___oQ6EM"},ie=({size:r="md",type:l="default",withTime:e,...a})=>{let _=V["DatePicker--Medium"],n=18;return r==="sm"?(_=V["DatePicker--Small"],n=14):r==="lg"&&(_=V["DatePicker--Large"],n=24),e?t.jsx(E.DateTimePicker,{className:_,size:r,locale:"ko",firstDayOfWeek:0,monthLabelFormat:"YYYY년 MM월",valueFormat:"YYYY-MM-DD | a hh:mm",rightSection:t.jsx(o.IconCalendar,{size:n}),...a}):t.jsx(E.DatePickerInput,{className:_,type:l,size:r,locale:"ko",firstDayOfWeek:0,monthLabelFormat:"YYYY년 MM월",valueFormat:"YYYY-MM-DD",rightSection:t.jsx(o.IconCalendar,{size:n}),...a})},x={"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"},ne=({label:r,labelPosition:l="top",size:e="md",required:a,tooltip:_,tooltipPosition:n="top",errorMsg:s,description:i,...d})=>{const[u,c]=T.useState(!1);let B=x["Dropdown__Label--Medium"],D=x["Dropdown--Medium"],p=x["Dropdown__Tooltip--Medium"],y=18;return e==="sm"?(B=x["Dropdown__Label--Small"],D=x["Dropdown--Small"],p=x["Dropdown__Tooltip--Small"],y=14):e==="lg"&&(B=x["Dropdown__Label--Large"],D=x["Dropdown--Large"],p=x["Dropdown__Tooltip--Large"],y=24),t.jsxs("div",{className:l==="top"?x["Dropdown--TopLabel"]:x["Dropdown--LeftLabel"],children:[t.jsxs("div",{children:[r&&t.jsx(m.Input.Label,{required:a,className:B,children:r}),_&&t.jsx(m.Tooltip,{label:_,position:n,children:t.jsx("div",{className:p,children:t.jsx(o.IconInfoCircle,{size:e==="sm"?14:e==="lg"?20:16})})})]}),t.jsxs("div",{children:[t.jsx(m.Select,{...d,size:e,error:s,className:D,rightSection:u?t.jsx(o.IconChevronUp,{size:y}):t.jsx(o.IconChevronDown,{size:y}),onDropdownOpen:()=>c(!0),onDropdownClose:()=>c(!1),styles:{option:{"&[data-selected]":{"&, &:hover":{backgroundColor:"#e7e7e7",color:"#000000"}}}}}),i&&t.jsx(m.Input.Description,{className:x.Dropdown__Description,children:i}),s&&t.jsx(m.Input.Error,{className:x.Dropdown__ErrorMsg,children:s})]})]})},H={ImageUploader:"styles-module__ImageUploader___pO3AP",ImageUploader__Preview:"styles-module__ImageUploader__Preview___DI5K4",ImageUploader__Wrapper:"styles-module__ImageUploader__Wrapper___SpAGM",ImageUploader__FileClearButton:"styles-module__ImageUploader__FileClearButton___w1HyS"},de=({width:r,height:l,defaultMsg:e="이미지 업로드",file:a,onDrop:_,showClearButton:n,onClear:s,...i})=>{const[d,u]=T.useState(a),c=T.useCallback(()=>{u(void 0),s&&s()},[s]);return t.jsxs("div",{className:H.ImageUploader__Wrapper,children:[n&&d?t.jsx("div",{className:H.ImageUploader__FileClearButton,onClick:c,children:t.jsx(o.IconCloseCircle,{size:24})}):null,t.jsx(J.Dropzone,{...i,maxFiles:1,className:H.ImageUploader,accept:J.IMAGE_MIME_TYPE,onDrop:B=>{u(B[0]),_&&_(B)},style:{width:r,height:l},children:t.jsx(t.Fragment,{children:d?t.jsx("img",{className:H.ImageUploader__Preview,src:typeof d=="string"?d:URL.createObjectURL(d),alt:`파일명: ${typeof d=="string"?d:d.name}`,title:`파일명: ${typeof d=="string"?d:d.name}`}):t.jsxs("div",{children:[t.jsx(o.IconPhoto,{size:48}),t.jsx("span",{children:e})]})})})]})},ce=({size:r="md",width:l,withCloseButton:e=!1,...a})=>{let _=768;return r==="xs"?_=360:r==="sm"?_=544:r==="lg"?_=1e3:r==="xl"&&(_=1200),t.jsx(m.Modal,{size:l||_,withCloseButton:e,...a})},W={Pagination:"style-module__Pagination___xcR-Q",Pagination__PageIndex:"style-module__Pagination__PageIndex___50SZJ","Pagination__PageIndex--Active":"style-module__Pagination__PageIndex--Active___mSIwS",Pagination__Arrow:"style-module__Pagination__Arrow___74vp3"},ge=({currentPageIdx:r,rowsPerPage:l,totalLength:e,paginationSize:a,onPageChange:_,...n})=>{const[s,i]=T.useState(r),d=l||50,u=e||1,c=a||5;T.useEffect(()=>{i(r)},[r]);const B=()=>{_&&_(s-(s%c+1)),i(p=>p-(p%c+1))},D=()=>{_&&_(s+c-s%c),i(p=>p+c-p%c)};return t.jsxs("div",{...n,className:W.Pagination,children:[s>=c?t.jsx("button",{className:W.Pagination__Arrow,onClick:B,children:t.jsx(o.IconChevronLeft,{size:20})}):null,new Array(c).fill(0).map((p,y)=>{const S=Math.floor(s/c)*c+y+1;if(!(S>Math.ceil(u/d)))return t.jsx("button",{className:s===S-1?W["Pagination__PageIndex--Active"]:W.Pagination__PageIndex,onClick:()=>{i(S-1),_&&_(S-1)},children:S},`pagination_${y}`)}),Math.floor(s/c)*c+c<Math.ceil(u/d)?t.jsx("button",{className:W.Pagination__Arrow,onClick:D,children:t.jsx(o.IconChevronRight,{size:20})}):null]})},$={"Radio--Small":"styles-module__Radio--Small___izWI2","Radio--Medium":"styles-module__Radio--Medium___dwZfV","Radio--Large":"styles-module__Radio--Large___1gLra"},me=({size:r="md",...l})=>{let e=$["Radio--Medium"];return r==="sm"?e=$["Radio--Small"]:r==="lg"&&(e=$["Radio--Large"]),t.jsx(m.Radio,{className:e,size:r,...l})},C={"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"},ue=({label:r,labelPosition:l="top",size:e="md",required:a,tooltip:_,tooltipPosition:n="top",errorMsg:s,description:i,onChange:d,onClear:u,...c})=>{const[B,D]=T.useState(0);let p=C["SearchBar__Label--Medium"],y=C["SearchBar--Medium"],S=C["SearchBar__Tooltip--Medium"];e==="sm"?(p=C["SearchBar__Label--Small"],y=C["SearchBar--Small"],S=C["SearchBar__Tooltip--Small"]):e==="lg"&&(p=C["SearchBar__Label--Large"],y=C["SearchBar--Large"],S=C["SearchBar__Tooltip--Large"]);const b=T.useCallback(P=>{d&&(D(P?.length),d(P))},[d]);return t.jsxs("div",{className:l==="top"?C["SearchBar--TopLabel"]:C["SearchBar--LeftLabel"],children:[t.jsxs("div",{children:[r&&t.jsx(m.Input.Label,{required:a,className:p,children:r}),_&&t.jsx(m.Tooltip,{label:_,position:n,children:t.jsx("div",{className:S,children:t.jsx(o.IconInfoCircle,{size:e==="sm"?14:e==="lg"?20:16})})})]}),t.jsxs("div",{children:[t.jsx("div",{className:C.SearchBar__Wrapper,children:t.jsx(m.Autocomplete,{...c,size:e,error:s,className:y,onChange:b,leftSection:t.jsx(o.IconSearch,{size:e==="sm"?16:e==="lg"?24:20}),rightSection:u&&B>0?t.jsx("div",{className:C.SearchBar__ClearButton,onClick:u,children:t.jsx(o.IconClose,{size:e==="sm"?16:e==="lg"?24:20})}):void 0})}),i&&t.jsx(m.Input.Description,{className:C.SearchBar__Description,children:i}),s&&t.jsx(m.Input.Error,{className:C.SearchBar__ErrorMsg,children:s})]})]})},O={"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:l=6,...e})=>{let a=O["SegmentButton--Medium"];return r==="sm"?a=O["SegmentButton--Small"]:r==="lg"&&(a=O["SegmentButton--Large"]),t.jsx(m.SegmentedControl,{className:a,size:r,radius:l,styles:{control:{borderWidth:"0 !important"}},...e})},G={Tab__TitleList:"styles-module__Tab__TitleList___urHWH",Tab__BorderBottom:"styles-module__Tab__BorderBottom___eMTpl"},pe=({tabList:r=[],containerPaddingTop:l,...e})=>t.jsxs(m.Tabs,{...e,children:[t.jsx(m.Tabs.List,{className:G.Tab__TitleList,children:r?.map((a,_)=>t.jsxs(m.Tabs.Tab,{value:a.value,leftSection:a.icon,children:[a.title,t.jsx("div",{className:G.Tab__BorderBottom})]},`tab_${_}`))}),r?.map((a,_)=>t.jsx(m.Tabs.Panel,{value:a.value,pt:l,children:a.body},`tab_panel_${_}`))]}),h={"TextField--LeftLabel":"styles-module__TextField--LeftLabel___hiNn3","TextField--TopLabel":"styles-module__TextField--TopLabel___V2otc","TextField__Label--Small":"styles-module__TextField__Label--Small___NkKKA","TextField__Label--Medium":"styles-module__TextField__Label--Medium___IoJd-","TextField__Label--Large":"styles-module__TextField__Label--Large___GMy74","TextField__Tooltip--Small":"styles-module__TextField__Tooltip--Small___GmQHE","TextField__Tooltip--Medium":"styles-module__TextField__Tooltip--Medium___5P3nA","TextField__Tooltip--Large":"styles-module__TextField__Tooltip--Large___YSCfu",TextField__Wrapper:"styles-module__TextField__Wrapper___u6p5Z",TextField__TextCounter:"styles-module__TextField__TextCounter___u1jM5","TextField--Textarea":"styles-module__TextField--Textarea___C2DL5","TextField--Small":"styles-module__TextField--Small___iuH4t","TextField--Medium":"styles-module__TextField--Medium___snYod","TextField--Large":"styles-module__TextField--Large___JoSYk",TextField__Description:"styles-module__TextField__Description___J-kXP",TextField__ErrorMsg:"styles-module__TextField__ErrorMsg___fa6f6",TextField__ClearButton:"styles-module__TextField__ClearButton___bB5Ew"},Be=r=>{const{label:l,labelPosition:e="top",size:a="md",required:_,tooltip:n,tooltipPosition:s="top",errorMsg:i,description:d,textarea:u=!1,maxTextCount:c,onChange:B,onClear:D,...p}=r,y="minRows"in r?r.minRows:void 0,[S,b]=T.useState(0);let P=h["TextField__Label--Medium"],M=h["TextField--Medium"],v=h["TextField__Tooltip--Medium"];a==="sm"?(P=h["TextField__Label--Small"],M=h["TextField--Small"],v=h["TextField__Tooltip--Small"]):a==="lg"&&(P=h["TextField__Label--Large"],M=h["TextField--Large"],v=h["TextField__Tooltip--Large"]);const A=T.useCallback(I=>{if(c){if(I.currentTarget?.value?.length>c)return;b(I.currentTarget?.value?.length),B&&B(I)}B&&(b(I.currentTarget?.value?.length),B(I))},[c,B]);return t.jsxs("div",{className:e==="top"?h["TextField--TopLabel"]:h["TextField--LeftLabel"],children:[t.jsxs("div",{children:[l&&t.jsx(m.Input.Label,{required:_,className:P,children:l}),n&&t.jsx(m.Tooltip,{label:n,position:s,children:t.jsx("div",{className:v,children:t.jsx(o.IconInfoCircle,{size:a==="sm"?14:a==="lg"?20:16})})})]}),t.jsxs("div",{children:[t.jsxs("div",{className:h.TextField__Wrapper,children:[u?t.jsx(m.Textarea,{className:h["TextField--Textarea"],size:a,minRows:y,error:i,onChange:A,disabled:p?.disabled,...p}):t.jsx(m.Input,{className:M,error:i,onChange:A,rightSection:D&&S>0?t.jsx("div",{className:h.TextField__ClearButton,onClick:D,children:t.jsx(o.IconClose,{size:a==="sm"?16:a==="lg"?24:20})}):void 0,...p}),c&&c>0&&t.jsx("span",{className:h.TextField__TextCounter,children:`${S}/${c}`})]}),d&&t.jsx(m.Input.Description,{className:h.TextField__Description,children:d}),i&&t.jsx(m.Input.Error,{className:h.TextField__ErrorMsg,children:i})]})]})},q={"TimePicker--Small":"styles-module__TimePicker--Small___nHQa1","TimePicker--Medium":"styles-module__TimePicker--Medium___E9-rF","TimePicker--Large":"styles-module__TimePicker--Large___I0M7V"},he=({size:r="md",...l})=>{const e=T.useRef(null);let a=q["TimePicker--Medium"],_=18;return r==="sm"?(a=q["TimePicker--Small"],_=14):r==="lg"&&(a=q["TimePicker--Large"],_=24),t.jsx(E.TimeInput,{ref:e,className:a,size:r,...l,rightSection:t.jsx(m.ActionIcon,{onClick:()=>{e&&e?.current?.showPicker()},children:t.jsx(o.IconClock,{size:_})})})},F={Toast:"styles-module__Toast___ZqZzU",Toast__Icon:"styles-module__Toast__Icon___PWXSy",Toast__Body:"styles-module__Toast__Body___wezPs",Toast__Message:"styles-module__Toast__Message___NFsgm"},Y=r=>{const l=typeof r=="string"?{message:r}:r,{message:e,id:a,icon:_,autoClose:n}=l;w.notifications.show({id:a,message:t.jsx("div",{className:F.Toast__Message,children:e}),icon:_,autoClose:n,classNames:{root:F.Toast,body:F.Toast__Body,icon:F.Toast__Icon},withCloseButton:!1,withBorder:!1})};Y.update=(r,l)=>{const e=typeof l=="string"?{message:l}:l,{message:a,icon:_,autoClose:n}=e;w.notifications.update({id:r,message:t.jsx("div",{className:F.Toast__Message,children:a}),icon:_,autoClose:n,classNames:{root:F.Toast,body:F.Toast__Body,icon:F.Toast__Icon},withCloseButton:!1,withBorder:!1})},Y.hide=r=>{w.notifications.hide(r)},Y.clean=()=>{w.notifications.clean()};const z={"Toggle--Small":"styles-module__Toggle--Small___sOjUd","Toggle--Medium":"styles-module__Toggle--Medium___yIb8v","Toggle--Large":"styles-module__Toggle--Large___ZOJj1"},ye=({size:r="md",labelPosition:l="right",disabled:e,onChange:a,..._})=>{const[n,s]=T.useState(_?.checked||!1);let i=z["Toggle--Medium"],d=50;r==="sm"?(i=z["Toggle--Small"],d=38):r==="lg"&&(i=z["Toggle--Large"],d=67);const u=T.useCallback(c=>{a&&a(c),s(c?.target?.checked)},[a]);return t.jsx(m.Switch,{className:i,size:r,labelPosition:l,disabled:e,onChange:u,styles:()=>({track:{backgroundColor:!e&&n?"#0fd3d8 !important":void 0,borderColor:!e&&n?"#0fd3d8 !important":void 0,width:d}}),..._})},j={Tooltip__Body:"styles-module__Tooltip__Body___i1OTG",Tooltip__Title:"styles-module__Tooltip__Title___E0LoV",Tooltip__Content:"styles-module__Tooltip__Content___lU5gr"},Ce=({title:r,content:l,maw:e=280,multiline:a=!0,..._})=>t.jsx(m.Tooltip,{..._,maw:e,multiline:a,label:t.jsxs("div",{className:j.Tooltip__Body,children:[r&&t.jsx("span",{className:j.Tooltip__Title,children:r}),t.jsx("span",{className:j.Tooltip__Content,children:l})]})}),K=(r="light")=>{const l=[];return Object.entries(o.colors).forEach(([e,a])=>{Object.entries(a).forEach(([_,n])=>{const s=o.getCSSVariableName(e,_);l.push(`${s}: ${n};`)})}),l.join(`
2
+ `)},Se=(r="light")=>{const l=document.getElementById("pop-ui-theme-vars");l&&l.remove();const e=document.createElement("style");e.id="pop-ui-theme-vars",e.textContent=`
3
3
  :root {
4
- ${q("light")}
4
+ ${K("light")}
5
5
  }
6
6
 
7
7
  [data-theme="dark"] {
8
- ${q("dark")}
8
+ ${K("dark")}
9
9
  }
10
- `,document.head.appendChild(o)},P=t=>{const _=e.colors[t],o=Object.keys(_).sort((a,c)=>Number(a)-Number(c));return[e.getCSSVariableRef(t,o[0]||o[o.length-1]),e.getCSSVariableRef(t,o[1]||o[o.length-1]),e.getCSSVariableRef(t,o[2]||o[o.length-1]),e.getCSSVariableRef(t,o[3]||o[o.length-1]),e.getCSSVariableRef(t,o[4]||o[o.length-1]),e.getCSSVariableRef(t,o[5]||o[o.length-1]),e.getCSSVariableRef(t,o[6]||o[o.length-1]),e.getCSSVariableRef(t,o[7]||o[o.length-1]),e.getCSSVariableRef(t,o[8]||o[o.length-1]),e.getCSSVariableRef(t,o[9]||o[o.length-1])]},Te=i.createTheme({colors:{gray:P("gray"),aqua:P("aqua"),red:P("red"),orange:P("orange"),yellow:P("yellow"),green:P("green"),blue:P("blue"),purple:P("purple"),grape:P("grape")},primaryColor:"aqua",primaryShade:5,fontFamily:'Pretendard, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif'}),z=T.createContext(void 0),ue=({children:t,defaultTheme:_="light",notificationPosition:o="bottom-center",notificationLimit:r=5,notificationAutoClose:a,notificationZIndex:c})=>{const[s,m]=T.useState(_);T.useEffect(()=>{me(s),document.documentElement.setAttribute("data-theme",s)},[s]);const d=()=>{m(p=>p==="light"?"dark":"light")};return l.jsx(z.Provider,{value:{theme:s,setTheme:m,toggleTheme:d},children:l.jsxs(i.MantineProvider,{theme:Te,children:[l.jsx(k.Notifications,{position:o,limit:r,autoClose:a,zIndex:c}),t]})})},Be=()=>{const t=T.useContext(z);if(!t)throw new Error("useTheme must be used within ThemeProvider");return t};n.Button=X,n.Checkbox=R,n.DatePicker=ee,n.Dropdown=oe,n.ImageUploader=le,n.Modal=te,n.Pagination=re,n.PopUiProvider=ue,n.Radio=ae,n.SearchBar=_e,n.SegmentButton=se,n.Tab=ie,n.TextField=de,n.TimePicker=ne,n.Toggle=ce,n.Tooltip=ge,n.toast=w,n.useTheme=Be,Object.defineProperty(n,Symbol.toStringTag,{value:"Module"})});
10
+ `,document.head.appendChild(e)},k=r=>{const l=o.colors[r],e=Object.keys(l).sort((_,n)=>Number(_)-Number(n));return[o.getCSSVariableRef(r,e[0]||e[e.length-1]),o.getCSSVariableRef(r,e[1]||e[e.length-1]),o.getCSSVariableRef(r,e[2]||e[e.length-1]),o.getCSSVariableRef(r,e[3]||e[e.length-1]),o.getCSSVariableRef(r,e[4]||e[e.length-1]),o.getCSSVariableRef(r,e[5]||e[e.length-1]),o.getCSSVariableRef(r,e[6]||e[e.length-1]),o.getCSSVariableRef(r,e[7]||e[e.length-1]),o.getCSSVariableRef(r,e[8]||e[e.length-1]),o.getCSSVariableRef(r,e[9]||e[e.length-1])]},be=m.createTheme({colors:{gray:k("gray"),aqua:k("aqua"),red:k("red"),orange:k("orange"),yellow:k("yellow"),green:k("green"),blue:k("blue"),purple:k("purple"),grape:k("grape")},primaryColor:"aqua",primaryShade:5,fontFamily:'Pretendard, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif'}),Q=T.createContext(void 0),xe=({children:r,defaultTheme:l="light",notificationPosition:e="bottom-center",notificationLimit:a=5,notificationAutoClose:_,notificationZIndex:n})=>{const[s,i]=T.useState(l);T.useEffect(()=>{Se(s),document.documentElement.setAttribute("data-theme",s)},[s]);const d=()=>{i(u=>u==="light"?"dark":"light")};return t.jsx(Q.Provider,{value:{theme:s,setTheme:i,toggleTheme:d},children:t.jsxs(m.MantineProvider,{theme:be,children:[t.jsx(w.Notifications,{position:e,limit:a,autoClose:_,zIndex:n}),r]})})},De=()=>{const r=T.useContext(Q);if(!r)throw new Error("useTheme must be used within ThemeProvider");return r};g.Button=re,g.CalendarDatePicker=_e,g.Checkbox=te,g.DatePicker=ie,g.Dropdown=ne,g.ImageUploader=de,g.Modal=ce,g.Pagination=ge,g.PopUiProvider=xe,g.Radio=me,g.SearchBar=ue,g.SegmentButton=Te,g.Tab=pe,g.TextField=Be,g.TimePicker=he,g.Toggle=ye,g.Tooltip=Ce,g.toast=Y,g.useTheme=De,Object.defineProperty(g,Symbol.toStringTag,{value:"Module"})});
@@ -2,6 +2,8 @@ import { AutocompleteProps } from '@mantine/core';
2
2
  import { ButtonProps } from '@mantine/core';
3
3
  import { CheckboxProps } from '@mantine/core';
4
4
  import { DatePickerInputProps } from '@mantine/dates';
5
+ import { DatePickerProps } from '@mantine/dates';
6
+ import { DateValue } from '@mantine/dates';
5
7
  import { default as default_2 } from 'react';
6
8
  import { DropzoneProps } from '@mantine/dropzone';
7
9
  import { FileWithPath } from '@mantine/dropzone';
@@ -22,6 +24,16 @@ import { TooltipProps } from '@mantine/core';
22
24
 
23
25
  export declare function Button({ children, size, variant, isLoading, disabled, ...props }: IButtonProps): JSX.Element;
24
26
 
27
+ /**
28
+ * CalendarDatePicker
29
+ *
30
+ * Mantine DatePicker 기반의 인라인 캘린더 컴포넌트
31
+ * 특정 날짜/요일 제외 기능 및 제외된 날짜 포함 선택 시 선택 취소 지원
32
+ *
33
+ * @see README.md for detailed documentation
34
+ */
35
+ export declare const CalendarDatePicker: ({ excludedDates, excludedDays, type, value, onChange, showTodayIndicator, ...props }: ICalendarDatePickerProps) => JSX.Element;
36
+
25
37
  export declare const Checkbox: ({ size, ...props }: ICheckboxProps) => JSX.Element;
26
38
 
27
39
  export declare const DatePicker: ({ size, type, withTime, ...props }: IDatePickerProps) => JSX.Element;
@@ -35,6 +47,39 @@ declare interface IButtonProps extends Omit<ButtonProps, 'variant' | 'styles'> {
35
47
  isLoading?: boolean;
36
48
  }
37
49
 
50
+ /**
51
+ * CalendarDatePickerProps
52
+ * - 기본 Mantine DatePickerProps에서 excludeDate를 제거하고,
53
+ * 커스터마이즈한 excludedDates/excludedDays 옵션을 받는다.
54
+ *
55
+ * excludedDays: [0,1,2,...,6] (0=일요일, 5=금요일 등)
56
+ * excludedDates: ['2025-12-01', ['2025-12-24','2025-12-26'], ...] (각 요소는 [start, end] 문자열, YYYY-MM-DD 권장)
57
+ */
58
+ declare interface ICalendarDatePickerProps extends Omit<DatePickerProps, 'excludeDate' | 'onChange'> {
59
+ type?: 'default' | 'multiple' | 'range';
60
+ showTodayIndicator?: boolean;
61
+ /**
62
+ * onChange callback
63
+ * - Receives DateValue which can be Date, Date[], or [Date, Date] depending on the type prop
64
+ */
65
+ onChange?: (value: DateValue) => void;
66
+ /**
67
+ * 제외할 날짜 배열
68
+ * - 단일 날짜: 'YYYY-MM-DD' 형식의 문자열
69
+ * - 날짜 범위: [시작일, 종료일] 형식의 튜플
70
+ *
71
+ * @example
72
+ * excludedDates={[
73
+ * '2025-11-24', // 단일 날짜
74
+ * '2025-11-25', // 단일 날짜
75
+ * ['2025-12-24', '2025-12-26'], // 범위 (크리스마스 연휴)
76
+ * ['2025-12-28', '2026-01-03'], // 범위 (연말연시)
77
+ * ]}
78
+ */
79
+ excludedDates?: (string | [string, string])[];
80
+ excludedDays?: TDayOfWeek[];
81
+ }
82
+
38
83
  declare interface ICheckboxProps extends CheckboxProps {
39
84
  size?: 'sm' | 'md' | 'lg';
40
85
  }
@@ -184,6 +229,8 @@ declare type TButtonSize = "sm" | "md" | "lg";
184
229
 
185
230
  declare type TButtonVariant = "primary" | "primaryLine" | "basic" | "danger" | "setting" | "warning";
186
231
 
232
+ declare type TDayOfWeek = 0 | 1 | 2 | 3 | 4 | 5 | 6;
233
+
187
234
  export declare const TextField: (allProps: TTextFieldProps) => JSX.Element;
188
235
 
189
236
  export declare const TimePicker: ({ size, ...props }: ITimePickerProps) => JSX.Element;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@pop-ui/core",
3
3
  "type": "module",
4
- "version": "0.0.33",
4
+ "version": "0.0.35",
5
5
  "main": "./dist/core.umd.cjs",
6
6
  "module": "./dist/core.js",
7
7
  "types": "./dist/types/index.d.ts",
@@ -49,7 +49,7 @@
49
49
  "@mantine/dropzone": "^8.3.6",
50
50
  "@mantine/hooks": "^8.3.6",
51
51
  "@mantine/notifications": "^8.3.6",
52
- "@pop-ui/foundation": "0.0.29",
52
+ "@pop-ui/foundation": "0.0.30",
53
53
  "dayjs": "^1.11.18"
54
54
  },
55
55
  "peerDependencies": {
@@ -97,5 +97,5 @@
97
97
  "typescript": "^5.9.3",
98
98
  "vite": "^7.1.12"
99
99
  },
100
- "gitHead": "147a3b1bca67e364fe424abba7ddc6c542e3da20"
100
+ "gitHead": "c5b73bdb7bac8ca777a3bc924431daff674e9d74"
101
101
  }