fone-design-system_v2 1.0.114 → 1.0.115

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.
@@ -70441,7 +70441,6 @@ const v2e = ({
70441
70441
  readOnly: v,
70442
70442
  onFocus: () => u(!0),
70443
70443
  onBlur: () => u(!1),
70444
- IconComponent: !v && (i || o || c) ? void 0 : () => null,
70445
70444
  sx: {
70446
70445
  width: i ? `calc(100% - ${d})` : "100%",
70447
70446
  margin: i ? "0 auto" : void 0,
@@ -830,7 +830,7 @@ ${Q.current.stack}
830
830
  `,Eve=({cell:e,isRowSelected:t})=>{const n=e.column.columnDef.showEditIcon!==!1,r=()=>{var o,i;return n?((i=(o=e==null?void 0:e.row)==null?void 0:o.original)==null?void 0:i.crud)==="C"?M.jsx(j2,{style:{width:16,height:16,color:"#B9C0C8"}}):t?M.jsx(SV,{style:{width:16,height:16}}):null:null};return M.jsx("div",{style:{display:"flex",width:"100%",height:"100%",alignItems:"center",justifyContent:"center"},children:r()})},Ive=({cell:e,onChange:t,setTableData:n,setRowSelection:r,isRowClicked:o,isRowSelected:i,radio:a=!1})=>{const s=o||i,c="0.6rem",u=`calc(var(--ds-input-height-base) - ${c})`,d=e.column.columnDef.onChange,f=e.column.columnDef.accept,A=e.column.columnDef.icon,g=async m=>{var C;const h=((C=m.target.files)==null?void 0:C[0])??null;let v;try{const w=d==null?void 0:d(m);v=w&&typeof w.then=="function"?await w:w}catch{return}try{m.target.value=""}catch{}n(w=>{const x=w.map((S,E)=>{if(E!==e.row.index)return S;if(typeof v=="function")try{const I={file:h,event:m,cell:e,columnId:e.column.id,rowIndex:e.row.index},O=v(S,I);if(O)return O}catch{}else{if(v&&typeof v=="object"&&!(v instanceof File))return{...S,...v};if(v!==void 0&&typeof v!="object")return{...S,[e.column.id]:v}}return h?{...S,[e.column.id]:h}:S});if(a){r({[e.row.id]:!0});const S=x.map((E,I)=>({...E,checked:I===e.row.index}));return t==null||t(S),S}return r(S=>({...S,[e.row.id]:!0})),t==null||t(x),x})};return M.jsx("span",{style:{display:"flex",height:"100%",width:"100%",alignItems:"center",lineHeight:"var( --ds-table-body-font-size)",justifyContent:"center"},children:s?M.jsxs(Ii,{variant:"outlined",size:"small",fullWidth:!0,sx:{position:"relative",width:`calc(100% - ${c})`,minWidth:0,minHeight:u,height:u,margin:"0 auto"},children:[A,M.jsx("input",{type:"file",style:{position:"absolute",inset:0,height:"100%",width:"100%",cursor:"pointer",opacity:0},onChange:g,"aria-label":"파일 업로드",accept:f})]}):A})},Ove=({cell:e,rowSelection:t,setRowSelection:n,setTableData:r,onChange:o,radio:i=!1})=>{if(n&&t){const a=!!t[e.row.id],s=()=>{if(i&&a)return;const c=!a;if(i){n({[e.row.id]:!0}),r(u=>{const d=u.map((f,A)=>{const m=!!(A.toString()===e.row.id);return(f==null?void 0:f.checked)===m?f:{...f,checked:m}});return o==null||o(d),d});return}n(u=>{const d={...u};return c?d[e.row.id]=!0:delete d[e.row.id],d}),r(u=>{const d=u.map((f,A)=>A.toString()===e.row.id?{...f,checked:c}:f);return o==null||o(d),d})};return M.jsx("span",{style:{display:"flex",height:"100%",width:"100%",alignItems:"center",justifyContent:"center"},children:M.jsx(Ma,{checked:a,onChange:s})})}return M.jsx("span",{style:{display:"flex",height:"100%",width:"100%",alignItems:"center",justifyContent:"center"},children:ux(e.column.columnDef.cell,e.getContext())})},Pve=({align:e,cell:t,isRowClicked:n,onChange:r,setTableData:o,setRowSelection:i,type:a,isRowSelected:s,radio:c=!1})=>{const u=B.useRef(null),d=t.getValue(),[f,A]=B.useState(d),g=B.useRef(null),m=t.column.columnDef.tags,h=typeof m=="function"?m(t.row.original):void 0,v=t.column.columnDef.maxLength,C=t.column.columnDef.numRange;B.useEffect(()=>{d!==f&&A(d)},[d]);const w=I=>{o(O=>{let T=O.map((N,P)=>P===t.row.index?{...N,[t.column.id]:I}:N);return c?(i({[t.row.id]:!0}),T=T.map((N,P)=>({...N,checked:P===t.row.index}))):i(N=>({...N,[t.row.id]:!0})),r==null||r(T),T})},x=I=>{g.current&&clearTimeout(g.current),g.current=setTimeout(()=>{w(I),g.current=null},300)};B.useEffect(()=>()=>{g.current&&clearTimeout(g.current)},[]);const S="0.6rem",E=`calc(var(--ds-input-height-base) - ${S})`;return M.jsxs("span",{style:{display:"flex",alignItems:"center",width:"100%",height:"100%",minHeight:"inherit",overflow:"hidden"},children:[h==null?void 0:h.map((I,O)=>I),M.jsx(uc,{ref:u,spellCheck:!1,sx:{width:n?`calc(100% - ${S})`:"100%",margin:n?"0 auto":void 0},inputSx:{backgroundColor:"#fff",...n?{height:E,"&.MuiInputBase-root":{height:E}}:void 0,"& .MuiOutlinedInput-input":{textAlign:e==="center"?"center":e==="right"||e==="end"?"right":"left"}},value:f??"",onChange:I=>{const O=I.target.value;if(!(v&&O.length>v)){if(a==="inputNum"){if(!/^\d*$/.test(O)||O.length>1&&O.startsWith("0"))return;if(C){if(O===""){i(c?{[t.row.id]:!0}:N=>({...N,[t.row.id]:!0})),o(N=>N.map((P,R)=>{if(R===t.row.index){const L={...P,[t.column.id]:O,crud:(P==null?void 0:P.crud)==="C"?P.crud:"U"};return c?{...L,checked:!0}:L}return c?{...P,checked:!1}:P}));return}const T=Number(O);if(T<C[0]||T>C[1])return}A(O),x(O);return}if(a==="inputEng"){if(!/^[a-zA-Z]*$/.test(O))return;A(O),x(O);return}A(O),x(O)}}})]})},Dve=({cell:e,onChange:t,setTableData:n,setRowSelection:r,isRowClicked:o,isRowSelected:i,radio:a=!1})=>{const s=o||i,c="0.6rem",u=`calc(var(--ds-input-height-base) - ${c})`,d=`calc(3rem - ${c})`,f=e.getValue(),A=e.column.columnDef.modalFn,g=e.column.columnDef.readOnly;return M.jsxs(ut.Box,{sx:{position:"relative",display:"flex",height:"100%",width:s?`calc(100% - ${c})`:"100%",margin:s?"0 auto":void 0,alignItems:"center",gap:s?"0.2rem":0,overflow:"hidden"},component:"span",children:[M.jsx(Tve,{spellCheck:!1,style:{display:"block",minHeight:s?u:"inherit",height:s?u:"inherit",overflow:"hidden",backgroundColor:s?void 0:"inherit",resize:"none",fontSize:"var(--ds-table-body-font-size)",width:"100%",borderRadius:"0.375rem",borderWidth:1,padding:"0 1rem",lineHeight:"var( --ds-table-body-font-size)",outline:"none"},$active:s,value:f||"",onChange:m=>{g||n(h=>{const v=h.map((C,w)=>w===e.row.index?{...C,[e.column.id]:m.target.value}:C);return t==null||t(v),v})},onKeyDown:m=>{m.key==="Enter"&&!m.shiftKey&&m.preventDefault()},readOnly:!0}),M.jsx(ut.Box,{component:"button",sx:{height:s?d:"0",width:s?d:"0",overflow:"hidden",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0,borderRadius:"0.375rem",borderWidth:1,borderColor:"#d1d5db",backgroundColor:"#ffffff",padding:0},onClick:()=>{if(A==null||A(e.row.original),a){r({[e.row.id]:!0}),n(m=>{const h=m.map((v,C)=>({...v,checked:C===e.row.index}));return t==null||t(h),h});return}r(m=>({...m,[e.row.id]:!0})),n(m=>{const h=m.map((v,C)=>C===e.row.index?{...v,checked:!0}:v);return t==null||t(h),h})},children:M.jsx(TV,{style:{fontSize:"1.6rem"}})})]})},Tve=wl.input`
831
831
  border-color: ${e=>e.$active?"#d1d5db":"transparent"};
832
832
  height: 100%;
833
- `,Mve=({dragHandleProps:e})=>M.jsx("div",{style:{display:"flex",width:"100%",height:"100%",alignItems:"center",justifyContent:"center"},children:M.jsx("div",{...e??{},"aria-label":"행 순서 변경",style:{display:"inline-flex",alignItems:"center",justifyContent:"center",cursor:"grab",touchAction:"none",color:"#94A3B8",opacity:.9},children:M.jsx(W2,{style:{width:16,height:16}})})});function Nve(e){let t="left",n="flex-start",r="0.7rem";return e==="center"?(t="center",n="center",r="0.2rem"):e==="end"&&(t="right",n="flex-end"),{textAlign:t,display:"flex",justifyContent:n,alignItems:"center",padding:"0.4rem",paddingLeft:r,fontSize:"var( --ds-table-body-font-size)",lineHeight:"var( --ds-table-body-font-size)"}}const Rve=({align:e,cell:t,onChange:n,setTableData:r,isRowSelected:o,isRowClicked:i,setRowSelection:a,radio:s=!1})=>{const[c,u]=B.useState(!1),d="0.6rem",f=`calc(var(--ds-input-height-base) - ${d})`,A=t.getValue(),g=t.column.columnDef.selectItems||[],m=t.column.columnDef.disabled,h=t.row.original,v=typeof m=="function"?m(h):m,C=typeof g=="function"?g(h):g;return M.jsx("span",{style:{display:"flex",alignItems:"center",width:"100%",height:"100%",minHeight:"inherit",overflow:"hidden"},children:M.jsx(Sm,{size:"small",fullWidth:!0,readOnly:v,onFocus:()=>u(!0),onBlur:()=>u(!1),IconComponent:!v&&(i||o||c)?void 0:()=>null,sx:{width:i?`calc(100% - ${d})`:"100%",margin:i?"0 auto":void 0,fontSize:"1.2rem",backgroundColor:"#fff",...i?{height:f}:void 0},menuItems:C,menuItemSx:Nve(c&&!v?"start":e),className:void 0,value:C.some(w=>w.value===A)?A:"",displayEmpty:!0,renderValue:w=>{var S;const x=C.find(E=>E.value===w);return x?x.label:(S=C[0])==null?void 0:S.label},onChange:w=>{const x=w.target.value;r(S=>{let E=S.map((I,O)=>O===t.row.index?{...I,[t.column.id]:x,checked:!0}:I);return s?(a({[t.row.id]:!0}),E=E.map((I,O)=>({...I,checked:O===t.row.index}))):a(I=>({...I,[t.row.id]:!0})),n==null||n(E),E})}})})},kve=({align:e,cell:t,isHover:n,isRowClicked:r})=>{var C;const o=t.row.original,i=t.getValue(),a=t.column.columnDef.type,s=t.column.columnDef.ellipsis,c=t.column.columnDef.selectItems,u=t.column.columnDef.tags,d=typeof u=="function"?u(t.row.original):void 0,f=typeof a=="function"?a(o):a,A=typeof c=="function"?c(o):c,g=f==="select"?(C=A==null?void 0:A.find(w=>w.value===i))==null?void 0:C.label:void 0,m=f==="date"||f==="datePicker"?(()=>{if(i==null||i==="")return"";const w=String(i),x=[Qt(w,"YYYYMMDD",!0),Qt(w,"YYYY-MM-DD",!0),Qt(w,"YYYY-MM-DD HH:mm:ss",!0),Qt(w)].find(S=>S.isValid());return x?x.format("YYYY-MM-DD"):w})():void 0,h=g??m??i,v=h==null?"":String(h);return M.jsxs("span",{style:{display:"flex",width:"100%",minWidth:0,alignItems:"center",overflow:"hidden",height:"100%"},children:[d,M.jsx("span",{style:{minHeight:"1.563rem",overflow:"hidden",textAlign:e==="center"?"center":e==="right"||e==="end"?"right":"start",marginLeft:"0.13rem",marginRight:"0.13rem",width:"100%",minWidth:0,padding:"0.5rem",fontSize:"var( --ds-table-body-font-size)",lineHeight:"var( --ds-table-body-font-size)",whiteSpace:s&&!r?"nowrap":"pre-wrap",textOverflow:s&&!r?"ellipsis":void 0,wordBreak:s&&!r?"normal":"break-word"},children:v})]})},Bve=e=>Array.isArray(e)?e:e?[e]:[],hS=b.forwardRef(function({rows:t,minRows:n=4,maxRows:r,resize:o="vertical",inputSx:i,fullWidth:a,...s},c){const u=o!=="none",d=o==="horizontal"||o==="both",f=u?t??n??4:t;return M.jsx(uc,{...s,ref:c,multiline:!0,rows:f,minRows:u||t?void 0:n,maxRows:u||t?void 0:r,fullWidth:d?!1:a??!0,inputSx:[{...u&&{display:"flex",position:"relative",overflow:"hidden",resize:o,...d&&{width:320,minWidth:240,maxWidth:"100%"}},"&.MuiInputBase-multiline":{height:"auto",alignItems:"stretch"},"& .MuiOutlinedInput-notchedOutline":{top:0,height:"100%"},"& .MuiInputBase-input.MuiInputBase-inputMultiline":{boxSizing:"border-box",width:"100%",minWidth:0,minHeight:0,lineHeight:1.6,padding:"1.2rem 1.25rem",margin:0,overflow:"auto",resize:"none",...u&&{height:"100% !important"}}},...Bve(i)]})});hS.displayName="TextArea";const $ve=({align:e,cell:t,isHover:n,isRowClicked:r,onChange:o,setTableData:i,setRowSelection:a,isRowSelected:s,radio:c=!1})=>{const u=B.useRef(null),[d,f]=B.useState(!1),A=t.getValue(),[g,m]=B.useState(A),h=B.useRef(null),v=t.column.columnDef.ellipsis,C=t.column.columnDef.tags,w=typeof C=="function"?C(t.row.original):void 0,x=t.column.columnDef.maxLength;B.useEffect(()=>{!d&&A!==g&&m(A)},[A]);const S=O=>{c&&(a==null||a({[t.row.id]:!0})),i(T=>{const N=T.map((P,R)=>R!==t.row.index?P:{...P,checked:!0,[t.column.id]:O});if(c){const P=N.map((R,F)=>({...R,checked:F===t.row.index}));return o==null||o(P),P}return o==null||o(N),N})},E=O=>{h.current&&clearTimeout(h.current),h.current=setTimeout(()=>{S(O),h.current=null},300)},I=()=>{f(!1),h.current&&(clearTimeout(h.current),S(String(g??"")),h.current=null)};return B.useEffect(()=>()=>{h.current&&clearTimeout(h.current)},[]),M.jsxs("span",{style:{position:"relative",display:"flex",minHeight:"inherit",width:"100%",alignItems:"center",overflow:"hidden",padding:"0.6rem"},children:[w==null?void 0:w.map((O,T)=>O),v&&!r?M.jsx("p",{style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",width:"100%",margin:0,padding:"0 1rem"},children:A}):M.jsx(hS,{ref:u,minRows:0,resize:"none",spellCheck:!1,sx:{width:"100%"},inputSx:{padding:"0","& .MuiInputBase-inputMultiline":{backgroundColor:"#fff",paddingTop:"0.8rem !important",paddingBottom:"0.8rem !important",lineHeight:"1.2 !important",textAlign:e==="center"?"center":e==="right"||e==="end"?"right":"left"}},className:void 0,value:g??"",onFocus:()=>f(!0),onBlur:I,onChange:O=>{const T=O.target.value;x&&T.length>x||(m(T),E(T))}})]})},Lve=({onCellClick:e,cell:t,idx:n,isHover:r,isRowClicked:o,selectedCellInfo:i,showSelectedCellBorder:a=!1,onChange:s,setTableData:c,setRowSelection:u,rowSelection:d,radio:f,reorderMode:A=!1,dragHandleProps:g})=>{const m=t.column.id,h=t.column.columnDef.width,v=t.column.columnDef.align,C=t.column.columnDef.editable,w=t.column.columnDef.type,x=t.row.original,S=t.row.getIsSelected(),E=typeof w=="function"?w(x):w,I=(i==null?void 0:i.rowIndex)===t.row.index&&(i==null?void 0:i.colIndex)===n,O=C&&E!=="text"&&E!=="checkbox"&&E!=="checkboxN"&&E!=="button"&&E!=="custom"&&!I,T=M.jsx(kve,{id:m,align:v,cell:t,isHover:r,isRowClicked:o});return M.jsx("div",{onClick:N=>{o&&typeof e=="function"&&(N.stopPropagation(),e(x,t.row.index,m,n))},style:{minHeight:"inherit",minWidth:"3.2rem",fontSize:"var( --ds-table-body-font-size)",...h?{width:h}:{flex:m==="no"?"0 1 50px":1},borderLeft:n===0?void 0:"1px solid var(--ds-table-body-border-bottom-color)",boxShadow:a&&m!=="select"&&m!=="edit"&&m!=="reorder"&&I?"inset 0 0 0 2px var(--ds-color-primary)":void 0},children:m==="edit"?M.jsx(Eve,{cell:t,isRowSelected:S}):m==="reorder"?M.jsx(Mve,{dragHandleProps:g}):m==="select"?M.jsx(Ove,{cell:t,rowSelection:d,setRowSelection:u,setTableData:c,onChange:s,radio:f}):O?T:C?E==="textarea"?M.jsx($ve,{id:m,align:v,cell:t,isHover:r,isRowClicked:I,isRowSelected:S,setTableData:c,setRowSelection:u,onChange:s,radio:f}):E==="input"||!E||E.includes("input")?M.jsx(Pve,{id:m,align:v,cell:t,isHover:r,isRowClicked:I,isRowSelected:S,setTableData:c,setRowSelection:u,type:E,onChange:s,radio:f}):E==="select"?M.jsx(Rve,{id:m,align:v,cell:t,isHover:r,setTableData:c,isRowClicked:I,isRowSelected:S,setRowSelection:u,onChange:s,radio:f}):E==="checkbox"?M.jsx(bve,{id:m,align:v,cell:t,isHover:r,setTableData:c,setRowSelection:u,onChange:s,radio:f}):E==="checkboxN"?M.jsx(yve,{cell:t}):E==="datePicker"?M.jsx(xve,{id:m,cell:t,setTableData:c,isRowSelected:S,setRowSelection:u,isRowClicked:I,onChange:s,radio:f}):E==="modal"?M.jsx(Dve,{align:v,cell:t,setTableData:c,isRowSelected:S,setRowSelection:u,isRowClicked:I,onChange:s,radio:f}):E==="text"?T:E==="button"?M.jsx(vve,{align:v,cell:t}):E==="custom"?M.jsx(Cve,{id:m,cell:t}):E==="file"?M.jsx(Ive,{cell:t,setTableData:c,setRowSelection:u,isRowClicked:I,isRowSelected:S,onChange:s,radio:f}):null:E==="date"?M.jsx(wve,{id:m,align:v,cell:t}):T})},y6=B.forwardRef(({row:e,onCellClick:t,selectedCellInfo:n,showSelectedCellBorder:r=!1,onChange:o,setTableData:i,setRowSelection:a,onRowClick:s,onRowDoubleClick:c,isScrollHighlighted:u=!1,isRowClicked:d=!1,rowSelection:f,isRowActive:A=!1,radio:g,reorderMode:m=!1,dragHandleProps:h,isDragging:v=!1},C)=>{const[w,x]=B.useState(!1),S=u||e.getIsSelected()||d||A||v,E=()=>{x(!1),s==null||s(e.original,e.index)};return M.jsx(Fve,{ref:C,$enableHover:!S,style:{display:"flex",width:"100%",height:"100%",minHeight:"inherit",backgroundColor:S?"#F0F7FD":void 0,boxShadow:v?"0 2px 10px rgba(15, 23, 42, 0.08)":void 0},onMouseEnter:()=>x(!0),onMouseLeave:()=>x(!1),onClick:E,onDoubleClick:()=>c==null?void 0:c(e.original,e.index),children:e.getVisibleCells().map((I,O)=>M.jsx(Lve,{cell:I,idx:O,isHover:w,selectedCellInfo:n,showSelectedCellBorder:r,onCellClick:t,onChange:o,setTableData:i,setRowSelection:a,isRowClicked:d,rowSelection:f,radio:g,reorderMode:m,dragHandleProps:h},I.id))})});y6.displayName="Row";const Fve=wl.div`
833
+ `,Mve=({dragHandleProps:e})=>M.jsx("div",{style:{display:"flex",width:"100%",height:"100%",alignItems:"center",justifyContent:"center"},children:M.jsx("div",{...e??{},"aria-label":"행 순서 변경",style:{display:"inline-flex",alignItems:"center",justifyContent:"center",cursor:"grab",touchAction:"none",color:"#94A3B8",opacity:.9},children:M.jsx(W2,{style:{width:16,height:16}})})});function Nve(e){let t="left",n="flex-start",r="0.7rem";return e==="center"?(t="center",n="center",r="0.2rem"):e==="end"&&(t="right",n="flex-end"),{textAlign:t,display:"flex",justifyContent:n,alignItems:"center",padding:"0.4rem",paddingLeft:r,fontSize:"var( --ds-table-body-font-size)",lineHeight:"var( --ds-table-body-font-size)"}}const Rve=({align:e,cell:t,onChange:n,setTableData:r,isRowSelected:o,isRowClicked:i,setRowSelection:a,radio:s=!1})=>{const[c,u]=B.useState(!1),d="0.6rem",f=`calc(var(--ds-input-height-base) - ${d})`,A=t.getValue(),g=t.column.columnDef.selectItems||[],m=t.column.columnDef.disabled,h=t.row.original,v=typeof m=="function"?m(h):m,C=typeof g=="function"?g(h):g;return M.jsx("span",{style:{display:"flex",alignItems:"center",width:"100%",height:"100%",minHeight:"inherit",overflow:"hidden"},children:M.jsx(Sm,{size:"small",fullWidth:!0,readOnly:v,onFocus:()=>u(!0),onBlur:()=>u(!1),sx:{width:i?`calc(100% - ${d})`:"100%",margin:i?"0 auto":void 0,fontSize:"1.2rem",backgroundColor:"#fff",...i?{height:f}:void 0},menuItems:C,menuItemSx:Nve(c&&!v?"start":e),className:void 0,value:C.some(w=>w.value===A)?A:"",displayEmpty:!0,renderValue:w=>{var S;const x=C.find(E=>E.value===w);return x?x.label:(S=C[0])==null?void 0:S.label},onChange:w=>{const x=w.target.value;r(S=>{let E=S.map((I,O)=>O===t.row.index?{...I,[t.column.id]:x,checked:!0}:I);return s?(a({[t.row.id]:!0}),E=E.map((I,O)=>({...I,checked:O===t.row.index}))):a(I=>({...I,[t.row.id]:!0})),n==null||n(E),E})}})})},kve=({align:e,cell:t,isHover:n,isRowClicked:r})=>{var C;const o=t.row.original,i=t.getValue(),a=t.column.columnDef.type,s=t.column.columnDef.ellipsis,c=t.column.columnDef.selectItems,u=t.column.columnDef.tags,d=typeof u=="function"?u(t.row.original):void 0,f=typeof a=="function"?a(o):a,A=typeof c=="function"?c(o):c,g=f==="select"?(C=A==null?void 0:A.find(w=>w.value===i))==null?void 0:C.label:void 0,m=f==="date"||f==="datePicker"?(()=>{if(i==null||i==="")return"";const w=String(i),x=[Qt(w,"YYYYMMDD",!0),Qt(w,"YYYY-MM-DD",!0),Qt(w,"YYYY-MM-DD HH:mm:ss",!0),Qt(w)].find(S=>S.isValid());return x?x.format("YYYY-MM-DD"):w})():void 0,h=g??m??i,v=h==null?"":String(h);return M.jsxs("span",{style:{display:"flex",width:"100%",minWidth:0,alignItems:"center",overflow:"hidden",height:"100%"},children:[d,M.jsx("span",{style:{minHeight:"1.563rem",overflow:"hidden",textAlign:e==="center"?"center":e==="right"||e==="end"?"right":"start",marginLeft:"0.13rem",marginRight:"0.13rem",width:"100%",minWidth:0,padding:"0.5rem",fontSize:"var( --ds-table-body-font-size)",lineHeight:"var( --ds-table-body-font-size)",whiteSpace:s&&!r?"nowrap":"pre-wrap",textOverflow:s&&!r?"ellipsis":void 0,wordBreak:s&&!r?"normal":"break-word"},children:v})]})},Bve=e=>Array.isArray(e)?e:e?[e]:[],hS=b.forwardRef(function({rows:t,minRows:n=4,maxRows:r,resize:o="vertical",inputSx:i,fullWidth:a,...s},c){const u=o!=="none",d=o==="horizontal"||o==="both",f=u?t??n??4:t;return M.jsx(uc,{...s,ref:c,multiline:!0,rows:f,minRows:u||t?void 0:n,maxRows:u||t?void 0:r,fullWidth:d?!1:a??!0,inputSx:[{...u&&{display:"flex",position:"relative",overflow:"hidden",resize:o,...d&&{width:320,minWidth:240,maxWidth:"100%"}},"&.MuiInputBase-multiline":{height:"auto",alignItems:"stretch"},"& .MuiOutlinedInput-notchedOutline":{top:0,height:"100%"},"& .MuiInputBase-input.MuiInputBase-inputMultiline":{boxSizing:"border-box",width:"100%",minWidth:0,minHeight:0,lineHeight:1.6,padding:"1.2rem 1.25rem",margin:0,overflow:"auto",resize:"none",...u&&{height:"100% !important"}}},...Bve(i)]})});hS.displayName="TextArea";const $ve=({align:e,cell:t,isHover:n,isRowClicked:r,onChange:o,setTableData:i,setRowSelection:a,isRowSelected:s,radio:c=!1})=>{const u=B.useRef(null),[d,f]=B.useState(!1),A=t.getValue(),[g,m]=B.useState(A),h=B.useRef(null),v=t.column.columnDef.ellipsis,C=t.column.columnDef.tags,w=typeof C=="function"?C(t.row.original):void 0,x=t.column.columnDef.maxLength;B.useEffect(()=>{!d&&A!==g&&m(A)},[A]);const S=O=>{c&&(a==null||a({[t.row.id]:!0})),i(T=>{const N=T.map((P,R)=>R!==t.row.index?P:{...P,checked:!0,[t.column.id]:O});if(c){const P=N.map((R,F)=>({...R,checked:F===t.row.index}));return o==null||o(P),P}return o==null||o(N),N})},E=O=>{h.current&&clearTimeout(h.current),h.current=setTimeout(()=>{S(O),h.current=null},300)},I=()=>{f(!1),h.current&&(clearTimeout(h.current),S(String(g??"")),h.current=null)};return B.useEffect(()=>()=>{h.current&&clearTimeout(h.current)},[]),M.jsxs("span",{style:{position:"relative",display:"flex",minHeight:"inherit",width:"100%",alignItems:"center",overflow:"hidden",padding:"0.6rem"},children:[w==null?void 0:w.map((O,T)=>O),v&&!r?M.jsx("p",{style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",width:"100%",margin:0,padding:"0 1rem"},children:A}):M.jsx(hS,{ref:u,minRows:0,resize:"none",spellCheck:!1,sx:{width:"100%"},inputSx:{padding:"0","& .MuiInputBase-inputMultiline":{backgroundColor:"#fff",paddingTop:"0.8rem !important",paddingBottom:"0.8rem !important",lineHeight:"1.2 !important",textAlign:e==="center"?"center":e==="right"||e==="end"?"right":"left"}},className:void 0,value:g??"",onFocus:()=>f(!0),onBlur:I,onChange:O=>{const T=O.target.value;x&&T.length>x||(m(T),E(T))}})]})},Lve=({onCellClick:e,cell:t,idx:n,isHover:r,isRowClicked:o,selectedCellInfo:i,showSelectedCellBorder:a=!1,onChange:s,setTableData:c,setRowSelection:u,rowSelection:d,radio:f,reorderMode:A=!1,dragHandleProps:g})=>{const m=t.column.id,h=t.column.columnDef.width,v=t.column.columnDef.align,C=t.column.columnDef.editable,w=t.column.columnDef.type,x=t.row.original,S=t.row.getIsSelected(),E=typeof w=="function"?w(x):w,I=(i==null?void 0:i.rowIndex)===t.row.index&&(i==null?void 0:i.colIndex)===n,O=C&&E!=="text"&&E!=="checkbox"&&E!=="checkboxN"&&E!=="button"&&E!=="custom"&&!I,T=M.jsx(kve,{id:m,align:v,cell:t,isHover:r,isRowClicked:o});return M.jsx("div",{onClick:N=>{o&&typeof e=="function"&&(N.stopPropagation(),e(x,t.row.index,m,n))},style:{minHeight:"inherit",minWidth:"3.2rem",fontSize:"var( --ds-table-body-font-size)",...h?{width:h}:{flex:m==="no"?"0 1 50px":1},borderLeft:n===0?void 0:"1px solid var(--ds-table-body-border-bottom-color)",boxShadow:a&&m!=="select"&&m!=="edit"&&m!=="reorder"&&I?"inset 0 0 0 2px var(--ds-color-primary)":void 0},children:m==="edit"?M.jsx(Eve,{cell:t,isRowSelected:S}):m==="reorder"?M.jsx(Mve,{dragHandleProps:g}):m==="select"?M.jsx(Ove,{cell:t,rowSelection:d,setRowSelection:u,setTableData:c,onChange:s,radio:f}):O?T:C?E==="textarea"?M.jsx($ve,{id:m,align:v,cell:t,isHover:r,isRowClicked:I,isRowSelected:S,setTableData:c,setRowSelection:u,onChange:s,radio:f}):E==="input"||!E||E.includes("input")?M.jsx(Pve,{id:m,align:v,cell:t,isHover:r,isRowClicked:I,isRowSelected:S,setTableData:c,setRowSelection:u,type:E,onChange:s,radio:f}):E==="select"?M.jsx(Rve,{id:m,align:v,cell:t,isHover:r,setTableData:c,isRowClicked:I,isRowSelected:S,setRowSelection:u,onChange:s,radio:f}):E==="checkbox"?M.jsx(bve,{id:m,align:v,cell:t,isHover:r,setTableData:c,setRowSelection:u,onChange:s,radio:f}):E==="checkboxN"?M.jsx(yve,{cell:t}):E==="datePicker"?M.jsx(xve,{id:m,cell:t,setTableData:c,isRowSelected:S,setRowSelection:u,isRowClicked:I,onChange:s,radio:f}):E==="modal"?M.jsx(Dve,{align:v,cell:t,setTableData:c,isRowSelected:S,setRowSelection:u,isRowClicked:I,onChange:s,radio:f}):E==="text"?T:E==="button"?M.jsx(vve,{align:v,cell:t}):E==="custom"?M.jsx(Cve,{id:m,cell:t}):E==="file"?M.jsx(Ive,{cell:t,setTableData:c,setRowSelection:u,isRowClicked:I,isRowSelected:S,onChange:s,radio:f}):null:E==="date"?M.jsx(wve,{id:m,align:v,cell:t}):T})},y6=B.forwardRef(({row:e,onCellClick:t,selectedCellInfo:n,showSelectedCellBorder:r=!1,onChange:o,setTableData:i,setRowSelection:a,onRowClick:s,onRowDoubleClick:c,isScrollHighlighted:u=!1,isRowClicked:d=!1,rowSelection:f,isRowActive:A=!1,radio:g,reorderMode:m=!1,dragHandleProps:h,isDragging:v=!1},C)=>{const[w,x]=B.useState(!1),S=u||e.getIsSelected()||d||A||v,E=()=>{x(!1),s==null||s(e.original,e.index)};return M.jsx(Fve,{ref:C,$enableHover:!S,style:{display:"flex",width:"100%",height:"100%",minHeight:"inherit",backgroundColor:S?"#F0F7FD":void 0,boxShadow:v?"0 2px 10px rgba(15, 23, 42, 0.08)":void 0},onMouseEnter:()=>x(!0),onMouseLeave:()=>x(!1),onClick:E,onDoubleClick:()=>c==null?void 0:c(e.original,e.index),children:e.getVisibleCells().map((I,O)=>M.jsx(Lve,{cell:I,idx:O,isHover:w,selectedCellInfo:n,showSelectedCellBorder:r,onCellClick:t,onChange:o,setTableData:i,setRowSelection:a,isRowClicked:d,rowSelection:f,radio:g,reorderMode:m,dragHandleProps:h},I.id))})});y6.displayName="Row";const Fve=wl.div`
834
834
  ${({$enableHover:e})=>e&&`
835
835
  &:hover {
836
836
  background-color: #EBEBEB;
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "type": "module",
3
3
  "license": "MIT",
4
4
  "name": "fone-design-system_v2",
5
- "version": "1.0.114",
5
+ "version": "1.0.115",
6
6
  "description": "FoneTech-Systems 전용 컴포넌트 라이브러리",
7
7
  "main": "./dist/index.js",
8
8
  "module": "./dist/fone-design-system.es.js",