@pop-ui/core 0.0.23 → 0.0.25
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.js +414 -420
- package/dist/core.umd.cjs +1 -1
- package/package.json +3 -3
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,e,p,t,ye,N,j){"use strict";const z={primary:t.TextColorButtonTextPrimaryDefault,primaryLine:t.TextColorButtonTextPrimarylineDefault,basic:t.TextColorButtonTextBasicDefault,danger:t.TextColorButtonTextPrimaryDefault,setting:t.TextColorButtonTextPrimaryDefault,warning:t.TextColorButtonTextPrimaryDefault},U={primary:{default:{backgroundColor:t.BgColorButtonBgPrimaryDefault,color:t.TextColorButtonTextPrimaryDefault,border:"none"},hover:{backgroundColor:t.BgColorButtonBgPrimaryHover,color:t.TextColorButtonTextPrimaryHover},active:{backgroundColor:t.BgColorButtonBgPrimaryPressed,color:t.TextColorButtonTextPrimaryPressed},focus:{backgroundColor:t.BgColorButtonBgPrimaryFocused,color:t.TextColorButtonTextPrimaryFocused},disabled:{backgroundColor:t.BgColorButtonBgPrimaryDisabled,color:t.TextColorButtonTextPrimaryDisabled,cursor:"not-allowed"}},primaryLine:{default:{backgroundColor:t.BgColorButtonBgPrimarylineDefault,color:t.TextColorButtonTextPrimarylineDefault,border:`1px solid ${t.BorderColorButtonBorderPrimarylineDefault}`},hover:{backgroundColor:t.BgColorButtonBgPrimarylineHover,color:t.TextColorButtonTextPrimarylineHover,borderColor:t.BorderColorButtonBorderPrimarylineHover},active:{backgroundColor:t.BgColorButtonBgPrimarylinePressed,color:t.TextColorButtonTextPrimarylinePressed,borderColor:t.BorderColorButtonBorderPrimarylinePressed},focus:{backgroundColor:t.BgColorButtonBgPrimarylineFocused,color:t.TextColorButtonTextPrimarylineFocused,borderColor:t.BorderColorButtonBorderPrimarylineFocused},disabled:{backgroundColor:t.BgColorButtonBgPrimarylineDisabled,color:t.TextColorButtonTextPrimarylineDisabled,cursor:"not-allowed"}},basic:{default:{backgroundColor:t.BgColorButtonBgBasicDefault,color:t.TextColorButtonTextBasicDefault,border:`1px solid ${t.BorderColorButtonBorderBasicDefault}`},hover:{backgroundColor:t.BgColorButtonBgBasicHover,color:t.TextColorButtonTextBasicHover,borderColor:t.BorderColorButtonBorderBasicHover},active:{backgroundColor:t.BgColorButtonBgBasicPreseed,color:t.TextColorButtonTextBasicPressed,borderColor:t.BorderColorButtonBorderBasicPressed},focus:{backgroundColor:t.BgColorButtonBgBasicFocused,color:t.TextColorButtonTextBasicFocused,borderColor:t.BorderColorButtonBorderBasicFocused},disabled:{backgroundColor:t.BgColorButtonBgBasicDisabled,color:t.TextColorButtonTextBasicDisabled,cursor:"not-allowed"}},danger:{default:{backgroundColor:t.BgColorButtonBgWarningDefault,color:t.TextColorButtonTextWarningDefault,border:"none"},hover:{backgroundColor:t.BgColorButtonBgWarningHover,color:t.TextColorButtonTextWarningHover},active:{backgroundColor:t.BgColorButtonBgWarningPressed,color:t.TextColorButtonTextWarningPressed},focus:{backgroundColor:t.BgColorButtonBgWarningFocused,color:t.TextColorButtonTextWarningFocused},disabled:{backgroundColor:t.BgColorButtonBgWarningDisabled,color:t.TextColorButtonTextWarningDisabled,cursor:"not-allowed"}},setting:{default:{backgroundColor:t.BgColorButtonBgSettingDefault,color:t.TextColorButtonTextSettingDefault,border:"none"},hover:{backgroundColor:t.BgColorButtonBgSettingHover,color:t.TextColorButtonTextSettingHover},active:{backgroundColor:t.BgColorButtonBgSettingPressed,color:t.TextColorButtonTextSettingPressed},focus:{backgroundColor:t.BgColorButtonBgSettingFocused,color:t.TextColorButtonTextSettingFocused},disabled:{backgroundColor:t.BgColorButtonBgSettingDisabled,color:t.TextColorButtonTextSettingDisabled,cursor:"not-allowed"}},warning:{default:{backgroundColor:t.BgColorButtonBgWarningDefault,color:t.TextColorButtonTextWarningDefault,border:"none"},hover:{backgroundColor:t.BgColorButtonBgWarningHover,color:t.TextColorButtonTextWarningHover},active:{backgroundColor:t.BgColorButtonBgWarningPressed,color:t.TextColorButtonTextWarningPressed},focus:{backgroundColor:t.BgColorButtonBgWarningFocused,color:t.TextColorButtonTextWarningFocused},disabled:{backgroundColor:t.BgColorButtonBgWarningDisabled,color:t.TextColorButtonTextWarningDisabled,cursor:"not-allowed"}}},Q={lg:{height:"50px",padding:"0 20px",fontSize:"18px",fontWeight:700,borderRadius:"6px",lineHeight:"130%",fontFamily:"Pretendard"},md:{height:"40px",padding:"0 16px",fontSize:"16px",fontWeight:600,borderRadius:"6px",lineHeight:"130%",fontFamily:"Pretendard"},sm:{height:"30px",padding:"0 12px",fontSize:"14px",fontWeight:600,borderRadius:"4px",lineHeight:"130%",fontFamily:"Pretendard"}};function X(l,_){const o=U[l];return{root:{...Q[_],...o.default,"&:hover:not(:disabled)":o.hover,"&:active:not(:disabled)":o.active,"&:focus:not(:disabled)":o.focus,"&:disabled":o.disabled}}}function J({children:l,size:_="md",variant:o="primary",isLoading:s=!1,disabled:r=!1,...n}){const d=p.useMemo(()=>X(o,_),[o,_]),g=z[o],c=p.useMemo(()=>{switch(_){case"lg":return 18;case"sm":return 14;case"md":default:return 16}},[_]);return e.jsx(i.Button,{type:"button",styles:d,disabled:r||s,...n,children:s?e.jsx(i.Loader,{color:g,size:c}):l})}const M="data:image/svg+xml,%3csvg%20width='18'%20height='18'%20viewBox='0%200%2018%2018'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M10.0877%207.65632L7.97702%207.92086L7.90164%208.27125L8.31695%208.34664C8.58707%208.41155%208.64081%208.50857%208.58218%208.77869L7.90164%2011.9734C7.72365%2012.7991%207.99936%2013.1879%208.6464%2013.1879C9.14895%2013.1879%209.73107%2012.9562%209.99561%2012.6372L10.0766%2012.254C9.89301%2012.4159%209.62288%2012.4808%209.4449%2012.4808C9.19153%2012.4808%209.10009%2012.3028%209.16431%2011.9894L10.0877%207.65632ZM10.1513%205.73336C10.1513%205.97772%2010.0542%206.21206%209.88141%206.38485C9.70862%206.55764%209.47427%206.65471%209.22992%206.65471C8.98556%206.65471%208.75121%206.55764%208.57843%206.38485C8.40564%206.21206%208.30857%205.97772%208.30857%205.73336C8.30857%205.489%208.40564%205.25465%208.57843%205.08187C8.75121%204.90908%208.98556%204.81201%209.22992%204.81201C9.47427%204.81201%209.70862%204.90908%209.88141%205.08187C10.0542%205.25465%2010.1513%205.489%2010.1513%205.73336Z'%20fill='%2353B1FD'/%3e%3ccircle%20cx='9'%20cy='9'%20r='6.1875'%20stroke='%2353B1FD'%20stroke-width='1.125'/%3e%3c/svg%3e",O="data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3ccircle%20cx='12'%20cy='12'%20r='9'%20fill='%239B9B9B'/%3e%3cpath%20d='M9%209L15%2015'%20stroke='white'%20stroke-width='1.5'%20stroke-miterlimit='10'%20stroke-linecap='round'/%3e%3cpath%20d='M15%209L9%2015'%20stroke='white'%20stroke-width='1.5'%20stroke-miterlimit='10'%20stroke-linecap='round'/%3e%3c/svg%3e",x={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"},K=l=>{const{label:_,labelPosition:o="top",size:s="md",required:r,tooltip:n,tooltipPosition:d="top",errorMsg:g,description:c,textarea:B=!1,maxTextCount:u,onChange:h,onClear:m,...C}=l,y="minRows"in l?l.minRows:void 0,[T,w]=p.useState(0);let k=x.md_label,v=x.md_textfield,Z=x.md_tooltip;s==="sm"?(k=x.sm_label,v=x.sm_textfield,Z=x.sm_tooltip):s==="lg"&&(k=x.lg_label,v=x.lg_textfield,Z=x.lg_tooltip);const V=p.useCallback(P=>{if(u){if(P.currentTarget?.value?.length>u)return;w(P.currentTarget?.value?.length),h&&h(P)}h&&(w(P.currentTarget?.value?.length),h(P))},[u,h]);return e.jsxs("div",{className:o==="top"?x.top_label_textfield:x.left_label_textfield,children:[e.jsxs("div",{children:[_&&e.jsx(i.Input.Label,{required:r,className:k,children:_}),n&&e.jsx(i.Tooltip,{label:n,position:d,children:e.jsx("img",{className:Z,src:M,alt:"tooltip_icon"})})]}),e.jsxs("div",{children:[e.jsxs("div",{className:x.textfield_wrapper,children:[B?e.jsx(i.Textarea,{className:x.textarea,size:s,minRows:y,error:g,onChange:V,disabled:C?.disabled,...C}):e.jsx(i.Input,{className:v,error:g,onChange:V,rightSection:m&&T>0?e.jsx("div",{className:x.clear_button,onClick:m,children:e.jsx("img",{src:O})}):void 0,...C}),u&&u>0&&e.jsx("span",{className:x.text_counter,children:`${T}/${u}`})]}),c&&e.jsx(i.Input.Description,{className:x.input_description,children:c}),g&&e.jsx(i.Input.Error,{className:x.input_error_msg,children:g})]})]})},G="data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M10.1811%2017.3621C14.147%2017.3621%2017.3621%2014.147%2017.3621%2010.1811C17.3621%206.21507%2014.147%203%2010.1811%203C6.21507%203%203%206.21507%203%2010.1811C3%2014.147%206.21507%2017.3621%2010.1811%2017.3621Z'%20stroke='%23808080'%20stroke-width='1.5'%20stroke-miterlimit='10'/%3e%3cpath%20d='M15.2876%2015.2874L21.0002%2021'%20stroke='%23808080'%20stroke-width='1.5'%20stroke-miterlimit='10'%20stroke-linecap='round'/%3e%3c/svg%3e",b={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"},R=({label:l,labelPosition:_="top",size:o="md",required:s,tooltip:r,tooltipPosition:n="top",errorMsg:d,description:g,onChange:c,onClear:B,...u})=>{const[h,m]=p.useState(0);let C=b.md_label,y=b.md_textfield,T=b.md_tooltip;o==="sm"?(C=b.sm_label,y=b.sm_textfield,T=b.sm_tooltip):o==="lg"&&(C=b.lg_label,y=b.lg_textfield,T=b.lg_tooltip);const w=p.useCallback(k=>{c&&(m(k?.length),c(k))},[c]);return e.jsxs("div",{className:_==="top"?b.top_label_textfield:b.left_label_textfield,children:[e.jsxs("div",{children:[l&&e.jsx(i.Input.Label,{required:s,className:C,children:l}),r&&e.jsx(i.Tooltip,{label:r,position:n,children:e.jsx("img",{className:T,src:M,alt:"tooltip_icon"})})]}),e.jsxs("div",{children:[e.jsx("div",{className:b.textfield_wrapper,children:e.jsx(i.Autocomplete,{...u,size:o,error:d,className:y,onChange:w,leftSection:e.jsx("img",{src:G}),rightSection:B&&h>0?e.jsx("div",{className:b.clear_button,onClick:B,children:e.jsx("img",{src:O})}):void 0})}),g&&e.jsx(i.Input.Description,{className:b.input_description,children:g}),d&&e.jsx(i.Input.Error,{className:b.input_error_msg,children:d})]})]})},ee="data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M18%2015L12%209L6%2015'%20stroke='%23808080'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e",te="data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M18%209L12%2015L6%209'%20stroke='%23808080'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e",f={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"},le=({label:l,labelPosition:_="top",size:o="md",required:s,tooltip:r,tooltipPosition:n="top",errorMsg:d,description:g,...c})=>{const[B,u]=p.useState(!1);let h=f.md_label,m=f.md_textfield,C=f.md_tooltip,y=18;return o==="sm"?(h=f.sm_label,m=f.sm_textfield,C=f.sm_tooltip,y=14):o==="lg"&&(h=f.lg_label,m=f.lg_textfield,C=f.lg_tooltip,y=24),e.jsxs("div",{className:_==="top"?f.top_label_textfield:f.left_label_textfield,children:[e.jsxs("div",{children:[l&&e.jsx(i.Input.Label,{required:s,className:h,children:l}),r&&e.jsx(i.Tooltip,{label:r,position:n,children:e.jsx("img",{className:C,src:M,alt:"tooltip_icon"})})]}),e.jsxs("div",{children:[e.jsx(i.Select,{...c,size:o,error:d,className:m,rightSection:B?e.jsx("img",{width:y,src:ee}):e.jsx("img",{width:y,src:te}),onDropdownOpen:()=>u(!0),onDropdownClose:()=>u(!1),styles:()=>({option:{"&[data-selected]":{"&, &:hover":{backgroundColor:"#e7e7e7",color:"#000000"}}}})}),g&&e.jsx(i.Input.Description,{className:f.input_description,children:g}),d&&e.jsx(i.Input.Error,{className:f.input_error_msg,children:d})]})]})},L={sm_checkbox:"styles-module__sm_checkbox___0JMac",md_checkbox:"styles-module__md_checkbox___aP9T1",lg_checkbox:"styles-module__lg_checkbox___CmiVr"},oe=({size:l="md",..._})=>{let o=L.md_checkbox,s=24;return l==="sm"?(o=L.sm_checkbox,s=18):l==="lg"&&(o=L.lg_checkbox,s=32),e.jsx(i.Checkbox,{className:o,styles:{inner:{width:s,height:s}},..._})},F={sm_radio:"styles-module__sm_radio___jQtvO",md_radio:"styles-module__md_radio___h-OD5",lg_radio:"styles-module__lg_radio___XdzaN"},se=({size:l="md",..._})=>{let o=F.md_radio;return l==="sm"?o=F.sm_radio:l==="lg"&&(o=F.lg_radio),e.jsx(i.Radio,{className:o,size:l,..._})},W={sm_toggle:"styles-module__sm_toggle___Mabl5",md_toggle:"styles-module__md_toggle___6mSJO",lg_toggle:"styles-module__lg_toggle___Dv7k7"},re=({size:l="md",labelPosition:_="right",disabled:o,onChange:s,...r})=>{const[n,d]=p.useState(r?.checked||!1);let g=W.md_toggle,c=50;l==="sm"?(g=W.sm_toggle,c=38):l==="lg"&&(g=W.lg_toggle,c=67);const B=p.useCallback(u=>{s&&s(u),d(u?.target?.checked)},[s]);return e.jsx(i.Switch,{className:g,size:l,labelPosition:_,disabled:o,onChange:B,styles:()=>({track:{backgroundColor:!o&&n?"#0fd3d8 !important":void 0,borderColor:!o&&n?"#0fd3d8 !important":void 0,width:c}}),...r})},E="data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3crect%20x='3'%20y='5'%20width='18'%20height='16'%20rx='2'%20stroke='%23808080'%20stroke-width='1.5'/%3e%3cpath%20d='M7%203V5'%20stroke='%23808080'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M17%203V5'%20stroke='%23808080'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3crect%20x='3.7002'%20y='5.48511'%20width='16.8291'%20height='4.51416'%20fill='%23808080'/%3e%3c/svg%3e",Y={sm_textfield:"styles-module__sm_textfield___EtBYr",md_textfield:"styles-module__md_textfield___Lzjxb",lg_textfield:"styles-module__lg_textfield___Zc8R8"},_e=({size:l="md",type:_="default",withTime:o,...s})=>{let r=Y.md_textfield,n=18;return l==="sm"?(r=Y.sm_textfield,n=14):l==="lg"&&(r=Y.lg_textfield,n=24),o?e.jsx(N.DateTimePicker,{className:r,size:l,locale:"ko",firstDayOfWeek:0,monthLabelFormat:"YYYY년 MM월",valueFormat:"YYYY-MM-DD | a hh:mm",rightSection:e.jsx("img",{width:n,src:E}),...s}):e.jsx(N.DatePickerInput,{className:r,type:_,size:l,locale:"ko",firstDayOfWeek:0,monthLabelFormat:"YYYY년 MM월",valueFormat:"YYYY-MM-DD",rightSection:e.jsx("img",{width:n,src:E}),...s})},ie="data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M12%2021C16.9706%2021%2021%2016.9706%2021%2012C21%207.02944%2016.9706%203%2012%203C7.02944%203%203%207.02944%203%2012C3%2016.9706%207.02944%2021%2012%2021Z'%20stroke='%23808080'%20stroke-width='1.5'%20stroke-miterlimit='10'/%3e%3cpath%20d='M12.1201%2011.9998V7.0498'%20stroke='%23808080'%20stroke-width='1.5'%20stroke-miterlimit='10'%20stroke-linecap='round'/%3e%3cpath%20d='M16.1701%2012H12.1201'%20stroke='%23808080'%20stroke-width='1.5'%20stroke-miterlimit='10'%20stroke-linecap='round'/%3e%3c/svg%3e",H={sm_textfield:"styles-module__sm_textfield___sNGu-",md_textfield:"styles-module__md_textfield___0bonT",lg_textfield:"styles-module__lg_textfield___v-WEc"},de=({size:l="md",..._})=>{const o=p.useRef(null);let s=H.md_textfield,r=18;return l==="sm"?(s=H.sm_textfield,r=14):l==="lg"&&(s=H.lg_textfield,r=24),e.jsx(N.TimeInput,{ref:o,className:s,size:l,..._,rightSection:e.jsx(i.ActionIcon,{onClick:()=>{o&&o?.current?.showPicker()},children:e.jsx("img",{width:r,src:ie,alt:"clock_icon"})})})},ce="data:image/svg+xml,%3csvg%20width='8'%20height='14'%20viewBox='0%200%208%2014'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M7%201L1%207L7%2013'%20stroke='%23667085'/%3e%3c/svg%3e",ae="data:image/svg+xml,%3csvg%20width='8'%20height='14'%20viewBox='0%200%208%2014'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M1%201L7%207L1%2013'%20stroke='%23667085'/%3e%3c/svg%3e",$={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"},ne=({currentPageIdx:l,rowsPerPage:_,totalLength:o,paginationSize:s,onPageChange:r,...n})=>{const[d,g]=p.useState(l),[c,B]=p.useState(50),[u,h]=p.useState(1),[m,C]=p.useState(5);p.useMemo(()=>{g(l),B(_||50),h(o||1),C(s||5)},[l,_,o,s]);const y=()=>{r&&r(d-(d%m+1)),g(w=>w-(w%m+1))},T=()=>{r&&r(d+m-d%m),g(w=>w+m-w%m)};return e.jsxs("div",{...n,className:$.pagination,children:[d>=m?e.jsx("button",{className:$.arrow,onClick:y,children:e.jsx("img",{src:ce,alt:"prev"})}):null,new Array(m).fill(0).map((w,k)=>{const v=Math.floor(d/m)*m+k+1;if(!(v>Math.ceil(u/c)))return e.jsx("button",{className:d===v-1?$.page_index_active:$.page_index,onClick:()=>{g(v-1),r&&r(v-1)},children:v},`pagination_${k}`)}),Math.floor(d/m)*m+m<Math.ceil(u/c)?e.jsx("button",{className:$.arrow,onClick:T,children:e.jsx("img",{src:ae,alt:"next"})}):null]})},q={tab_title_list:"styles-module__tab_title_list___b6YAl",border_bottom:"styles-module__border_bottom___mZKE9"},ge=({tabList:l=[],containerPaddingTop:_,...o})=>e.jsxs(i.Tabs,{...o,children:[e.jsx(i.Tabs.List,{className:q.tab_title_list,children:l?.map((s,r)=>e.jsxs(i.Tabs.Tab,{value:s.value,leftSection:s.icon,children:[s.title,e.jsx("div",{className:q.border_bottom})]},`tab_${r}`))}),l?.map((s,r)=>e.jsx(i.Tabs.Panel,{value:s.value,pt:_,children:s.body},`tab_panel_${r}`))]}),I={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"},me=({size:l="md",radius:_=6,...o})=>{let s=I.md_segment_button;return l==="sm"?s=I.sm_segment_button:l==="lg"&&(s=I.lg_segment_button),e.jsx(i.SegmentedControl,{className:s,size:l,radius:_,styles:{control:{borderWidth:"0 !important"}},...o})},ue="data:image/svg+xml,%3csvg%20width='18'%20height='18'%20viewBox='0%200%2018%2018'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3ccircle%20cx='9'%20cy='9'%20r='9'%20fill='%2330CC37'/%3e%3cpath%20d='M3.9375%209L7.51103%2012.375L14.0625%205.625'%20stroke='white'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e",pe="data:image/svg+xml,%3csvg%20width='18'%20height='18'%20viewBox='0%200%2018%2018'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3ccircle%20cx='9.5625'%20cy='9.5625'%20r='6.1875'%20fill='white'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M9%200C4.03729%200%200%204.03729%200%209C0%2013.9627%204.03729%2018%209%2018C13.9627%2018%2018%2013.9627%2018%209C18%204.03729%2013.9627%200%209%200ZM9.00413%2011.9604C9.58966%2011.9604%2010.063%2012.4337%2010.063%2013.0192C10.063%2013.6047%209.58966%2014.078%209.00413%2014.078C8.4186%2014.078%207.94001%2013.6047%207.94001%2013.0192C7.94001%2012.4337%208.40907%2011.9604%208.99354%2011.9604H9.00413ZM8.99375%204.18659C9.43211%204.18659%209.78787%204.54235%209.78787%204.98071V9.65965C9.78787%2010.098%209.43211%2010.4538%208.99375%2010.4538C8.5554%2010.4538%208.19963%2010.098%208.19963%209.65965V4.98071C8.19963%204.54235%208.5554%204.18659%208.99375%204.18659Z'%20fill='%23FA5252'/%3e%3c/svg%3e",S={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"},xe=({visible:l=!1,type:_="success",variant:o="light",top:s=48,right:r=48,...n})=>{let d=S.light_success;return o==="fill"?_==="success"?d=S.fill_success:_==="error"&&(d=S.fill_error):_==="success"?d=S.light_success:_==="error"&&(d=S.light_error),l?e.jsx(i.Alert,{className:d,icon:e.jsx("img",{src:_==="success"?ue:pe,alt:"alert_icon"}),styles:{title:{marginBottom:n?.children?void 0:0}},pos:"fixed",top:s,right:r,...n}):null},A={tooltip_body:"styles-module__tooltip_body___3s5ij",tooltip_title:"styles-module__tooltip_title___glF9X",tooltip_content:"styles-module__tooltip_content___o94IZ"},he=({title:l,content:_,maw:o=280,multiline:s=!0,...r})=>e.jsx(i.Tooltip,{...r,maw:o,multiline:s,label:e.jsxs("div",{className:A.tooltip_body,children:[l&&e.jsx("span",{className:A.tooltip_title,children:l}),e.jsx("span",{className:A.tooltip_content,children:_})]})}),be=({size:l="md",width:_,withCloseButton:o=!1,...s})=>{let r=768;return l==="xs"?r=360:l==="sm"?r=544:l==="lg"?r=1e3:l==="xl"&&(r=1200),e.jsx(i.Modal,{size:_||r,withCloseButton:o,...s})},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"},fe="data:image/svg+xml,%3csvg%20width='48'%20height='48'%20viewBox='0%200%2048%2048'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3crect%20x='8'%20y='8'%20width='32'%20height='32'%20rx='4'%20stroke='%2307A3C6'%20stroke-width='2'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M20.4436%2016.8886C20.4436%2018.8532%2018.8527%2020.4441%2016.8881%2020.4441C14.9254%2020.4441%2013.3325%2018.8532%2013.3325%2016.8886C13.3325%2014.924%2014.9254%2013.333%2016.8881%2013.333C18.8508%2013.3349%2020.4417%2014.9259%2020.4436%2016.8886Z'%20stroke='%2307A3C6'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M8%2032.8893L12.8471%2029.254C14.2038%2028.2365%2016.0548%2028.1851%2017.4659%2029.1258L17.9594%2029.4548C19.4333%2030.4375%2021.378%2030.3336%2022.7389%2029.1995L28.7618%2024.1804C30.1486%2023.0248%2032.1375%2022.9412%2033.6164%2023.9764L40%2028.4449'%20stroke='%2307A3C6'%20stroke-width='2'/%3e%3c/svg%3e",Be="data:image/svg+xml,%3csvg%20width='18'%20height='18'%20viewBox='0%200%2018%2018'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3ccircle%20cx='9'%20cy='9'%20r='9'%20fill='%239B9B9B'/%3e%3cpath%20d='M6%206L12%2012'%20stroke='white'%20stroke-width='1.5'%20stroke-miterlimit='10'%20stroke-linecap='round'/%3e%3cpath%20d='M12%206L6%2012'%20stroke='white'%20stroke-width='1.5'%20stroke-miterlimit='10'%20stroke-linecap='round'/%3e%3c/svg%3e",Ce=({width:l,height:_,defaultMsg:o="이미지 업로드",file:s,onDrop:r,showClearButton:n,onClear:d,...g})=>{const[c,B]=p.useState(s),u=p.useCallback(()=>{B(void 0),d&&d()},[d]);return e.jsxs("div",{className:D.image_uploader_wrapper,children:[n&&c?e.jsx("div",{className:D.file_clear_button,onClick:u,children:e.jsx("img",{src:Be,alt:"clear_file_data"})}):null,e.jsx(j.Dropzone,{...g,maxFiles:1,className:D.image_uploader,accept:j.IMAGE_MIME_TYPE,onDrop:h=>{B(h[0]),r&&r(h)},style:{width:l,height:_},children:e.jsx(e.Fragment,{children:c?e.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}`}):e.jsxs("div",{children:[e.jsx("img",{src:fe,alt:"ic_image_colored"}),e.jsx("span",{children:o})]})})})]})};Object.defineProperty(a,"PopUiProvider",{enumerable:!0,get:()=>i.MantineProvider}),a.Alert=xe,a.Button=J,a.Checkbox=oe,a.DatePicker=_e,a.Dropdown=le,a.ImageUploader=Ce,a.Modal=be,a.Pagination=ne,a.Radio=se,a.SearchBar=R,a.SegmentButton=me,a.Tab=ge,a.TextField=K,a.TimePicker=de,a.Toggle=re,a.Tooltip=he,Object.defineProperty(a,Symbol.toStringTag,{value:"Module"})});
|
|
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"})});
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pop-ui/core",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.25",
|
|
5
5
|
"main": "./dist/core.umd.cjs",
|
|
6
6
|
"module": "./dist/core.js",
|
|
7
7
|
"types": "./dist/types/index.d.ts",
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
"@mantine/dates": "^8.3.6",
|
|
48
48
|
"@mantine/dropzone": "^8.3.6",
|
|
49
49
|
"@mantine/hooks": "^8.3.6",
|
|
50
|
-
"@pop-ui/foundation": "0.0.
|
|
50
|
+
"@pop-ui/foundation": "0.0.25",
|
|
51
51
|
"dayjs": "^1.11.18"
|
|
52
52
|
},
|
|
53
53
|
"peerDependencies": {
|
|
@@ -96,5 +96,5 @@
|
|
|
96
96
|
"typescript": "^5.9.3",
|
|
97
97
|
"vite": "^7.1.12"
|
|
98
98
|
},
|
|
99
|
-
"gitHead": "
|
|
99
|
+
"gitHead": "a3eaa57a2f759a3cd4b37f5c1ca7274c9b3f02ca"
|
|
100
100
|
}
|