@inntechcorp/it-design 2.1.2 → 2.1.3
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/index.cjs.js +2 -2
- package/dist/index.esm.js +2 -2
- package/package.json +1 -1
package/dist/index.cjs.js
CHANGED
|
@@ -4904,7 +4904,7 @@ function pu(e,t){if(fu(e))for(let o=0;o<e.length&&!1!==t(e[o],o,e);o++);else e&&
|
|
|
4904
4904
|
|
|
4905
4905
|
}
|
|
4906
4906
|
|
|
4907
|
-
`,dm=t.forwardRef((({id:o=sa(),resultFileName:p=null,action:b="",filePath:n="",binaryName:M="file",showDeleteIcon:r=!1,showPreviewIcon:c=!1,buttonsPosition:z="default",padding:i=10,fluid:a=!0,fileWidth:O="100%",fileHeight:s="auto",maxFileWidth:A="none",maxFileHeight:d="none",containerWidth:l="100%",containerHeight:u="auto",previewFileWidth:f="100%",previewFileHeight:q="100%",previewFilePadding:h="0",requestMethod:W="put",maxFileSize:g=1024,disabled:m=!1,extraFormData:R={},extraQueryString:v={},extraHeader:L={},fileTypes:y=[exports.FileTypes.JPG,exports.FileTypes.PNG,exports.FileTypes.SVG,exports.FileTypes.PDF],removeAction:N="",removeExtraFormData:x={},removeExtraQueryString:B={},removeExtraHeader:w={},onUpdate:S,onUploadSuccess:X,onUploadFailed:k,onRemoveFileSuccess:T,onRemoveFileFailed:E},_)=>{const C=t.useRef(null),{addNotification:P}=Wd.useNotifications(),{showModal:D}=_a.useModal(),{fetch:j,cancel:I}=Jr(),{t:F}=De(),[$,U]=t.useState(!1),[V,H]=t.useState(!1),[Y,G]=t.useState(".svg, .png, .jpg"),[K,Q]=t.useState(!1),[J,Z]=t.useState(!1),[ee,te]=t.useState(!1),[oe,pe]=t.useState(null),[be,ne]=t.useState(null),[Me,re]=t.useState(""),[ce,ze]=t.useState(!1),[ie,ae]=t.useState(!1),[Oe,se]=t.useState(null),[Ae,de]=t.useState(!1),[le,ue]=t.useState(null);t.useEffect((()=>()=>{I()}),[]),t.useEffect((()=>{H(m)}),[m]),t.useEffect((()=>{ne(n?n.split("?")[0]:"")}),[n]),t.useEffect((()=>{null!==be&&(void 0!==be?he():U(!1))}),[be]),t.useEffect((()=>{let e=[];y.map((t=>{e.push(Cd(t))})),G(e.join(", "))}),[y]);const fe=(e,t)=>{P({title:e,description:t,placement:"topRight",autoHide:!0,delay:5e3,type:"error"})},qe=(e,t=!0,o=!0)=>{S&&S(e,t,o)};t.useImperativeHandle(_,(()=>({setFocus(){te(!0)},reset(e=!1,t=!1){We(),ne(null),re(""),qe("",e,t)},setValue(e,t=!0,o=!0){ne(e),qe(e,t,o)},getValue:()=>be||"",setError(e){re(e)},forceUpdate(){qe(be||"")},clear(){ne("")}})));const he=async()=>{let e=!1;be&&(e=await Ed(be),pe(e),e?qe(be):qe("",!0,!0),$||U(!0)),""!==be||$||U(!0),""===be&&$&&qe("",!0,!0)},We=()=>{ue(null),se(null),de(!1),pe(null)},ge=async()=>{H(!0),D({content:e.jsx("div",{children:F("uploader.areYouSureToDeleteThisFile")}),title:F("uploader.removeFile"),okButtonText:F("uploader.yes"),cancelButtonText:F("uploader.no"),okButtonProps:{variant:"statable",state:"reject"},closeOnClickOutside:!1,showCloseButton:!1,onOk:()=>(N?j({action:N,params:x,queries:B,headers:w,onFetched:e=>{e.data.success?(We(),qe("",!0,!0),T&&T(e.data.data)):E&&E()},onError:()=>{E&&E()}}):(We(),qe("",!0,!0),T&&T()),H(!1),!0),onCancel:()=>(H(!1),!0)})},me=e=>{e.preventDefault(),ie||Z(!0)},Re=e=>{e.preventDefault(),ie||Z(!1)},ve=e=>{e.preventDefault(),ie||(Z(!1),e.dataTransfer&&0!==e.dataTransfer.files.length?Ne(e.dataTransfer.files[0]):console.log(F("uploader.browserDoesntSupportDND")))},Le=e=>{Z(!1);const t=e.target.files[0];Ne(t)},ye=async({path:e,errorMessage:t,errorCode:o})=>{await Pd(1e3),se(null),ae(!1),await Pd(1500),de(!1),e?X&&X(e):t&&k&&k(t,o||0)},Ne=e=>{if(e&&(e=>!!y.includes(e.type)||(fe(F("uploader.error"),F("uploader.fileFormatError",{fileFormat:Y})),!1))(e)&&(e=>!(e.size>1024*g&&(fe(F("uploader.error"),F("uploader.fileSizeError",{fileSize:_d(1024*g)})),1)))(e)){if(p){const t=Cd(e.type);e=new File([e],p+t,{type:t,lastModified:e.lastModified})}(async e=>{if(!e)return;let t=new FormData;t.append(M,e),p&&t.append("name",p),Object.keys(R).forEach((e=>{t.append(e,R[e])})),j({action:b,requestMethod:W,params:t,queries:v,headers:L,onFetched:e=>{e.data.success?(ue({message:F("uploader.fileUploadSuccess"),status:"success"}),de(!0),ne(e.data.data.url),ye({path:e.data.data.url})):(ue({message:F("uploader.fileUploadFailed"),status:"error"}),qe("",!0,!0),ye({errorMessage:F("uploader.fileUploadFailed")}))},onError:(e,t)=>{ue({message:F("uploader.fileUploadFailed"),status:"error"}),qe("",!0,!0),ye({errorMessage:e,errorCode:t})},onProgress:e=>{se({estimated:e.estimated?(Math.round(100*e.estimated)/100).toFixed(2):"0",progress:e.progress?Math.round(100*e.progress):0,bytes:e.bytes?_d(e.bytes):"",total:e.total?_d(e.total):""})}})})(e),ae(!0)}},xe=()=>{H(!0),D({content:e.jsx(rm,{className:"itd-upload-preview-content",$width:f,$height:q,$padding:h,children:e.jsx(Ul,{src:be||""})}),showOkButton:!1,showCancelButton:!1,contentPadding:"0px",width:"max-content",onCancel:()=>(H(!1),!0)})},Be=()=>{if(r&&be&&!ie&&oe)return e.jsx("span",{className:"delete-icon",children:e.jsx(Aa,{variant:"solid",size:"small",type:"button",circle:!0,onClick:ge,disabled:V,icon:e.jsx(Al,{width:16,height:16}),className:"itd-upload-delete-button"})})},we=()=>{if(c&&be&&!ie&&oe)return e.jsx("span",{className:"preview-icon",children:e.jsx(Aa,{variant:"solid",size:"small",type:"button",circle:!0,onClick:xe,disabled:V,icon:e.jsx(dl,{width:16,height:16}),className:"itd-upload-preview-button"})})},Se=e.jsx("svg",{width:"20px",height:"20px",viewBox:"0 0 20 20",version:"1.1",xmlns:"http://www.w3.org/2000/svg",children:e.jsx("g",{id:"Error",stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd",children:e.jsxs("g",{id:"ErrorGroup",fillRule:"nonzero",children:[e.jsx("circle",{id:"ErrorBackground",fill:"#F8285A",cx:"10",cy:"10",r:"10"}),e.jsx("path",{d:"M10.0355339,8.6213203 L12.863961,5.79289322 C13.2544853,5.40236893 13.8876503,5.40236893 14.2781746,5.79289322 C14.6686989,6.18341751 14.6686989,6.81658249 14.2781746,7.20710678 L11.4497475,10.0355339 \n L14.2781746,12.863961 C14.6686989,13.2544853 14.6686989,13.8876503 14.2781746,14.2781746 C13.8876503,14.6686989 13.2544853,14.6686989 12.863961,14.2781746 L10.0355339,11.4497475 L7.20710678,14.2781746\n C6.81658249,14.6686989 6.18341751,14.6686989 5.79289322,14.2781746 C5.40236893,13.8876503 5.40236893,13.2544853 5.79289322,12.863961 L8.6213203,10.0355339 L5.79289322,7.20710678 C5.40236893,6.81658249\n 5.40236893,6.18341751 5.79289322,5.79289322 C6.18341751,5.40236893 6.81658249,5.40236893 7.20710678,5.79289322 L10.0355339,8.6213203 Z",id:"ErrorIcon",fill:"#FFFFFF"})]})})}),Xe=()=>{if(""===Me||ie)return;let t={className:"itd-upload-failed itd-failed-status",onPointerOver:()=>ze(!0),onPointerOut:()=>ze(!1)};return e.jsxs(sm,{...t,children:[ce?e.jsx(Am,{className:"itd-upload-error-tooltip itd-error-tooltip",children:Me}):null,Se]})},ke=()=>{if($)return null===oe?e.jsx(il,{width:24,height:24}):!1===oe?e.jsx(ll,{width:40,height:40}):e.jsx(Ul,{src:be||"",width:tl(O),height:tl(s)})},Te=()=>{let t=(K||J)&&!ie&&!V;return e.jsx(zm,{onPointerOver:()=>{!J&&Q(!0)},onPointerOut:()=>{!J&&Q(!1)},onDragOver:me,onDragLeave:Re,onDrop:ve,$isHover:t,className:"itd-upload-overlay",children:e.jsxs(cm,{$isHover:t,className:"itd-upload-overlay-content",children:[e.jsx("span",{className:"itd-upload-header",children:F("uploader.header")}),e.jsx("span",{className:"itd-upload-hint",children:F("uploader.hint")})]})})};return e.jsxs(pm,{className:"itd-upload",$fluid:a,children:[e.jsx("input",{type:"file",id:o,accept:Y,onChange:Le,onFocus:()=>te(!0),onBlur:()=>te(!1),onClick:()=>{C.current?.blur()},disabled:ie||V,ref:C}),e.jsx(nm,{htmlFor:o,$showFocus:ee,className:"itd-upload-label",children:e.jsxs(bm,{$showBorder:(J||K)&&!ie,$padding:i,$disabled:m,$hasError:""!==Me&&!ie,$fileWidth:O,$fileHeight:s,$maxFileWidth:A,$maxFileHeight:d,$containerWidth:l,$containerHeight:u,className:"itd-upload-content",children:[ke(),e.jsxs(im,{className:"itd-upload-status",$isActive:ie,$complete:"success"===le?.status,$error:"error"===le?.status,children:[e.jsx(am,{className:"itd-upload-status-box",$progress:Oe?Oe.progress:0,$complete:"success"===le?.status,$error:"error"===le?.status}),e.jsx("span",{className:"itd-upload-status-message",children:F(Ae||le?String(le?.message):"uploader.fileUploading")}),Oe?e.jsx("span",{className:"itd-upload-status-info",children:F("uploader.info",{total:Oe.total,estimated:Oe.estimated})}):e.jsx("span",{className:"itd-upload-status-calculating",children:F("uploader.calculating")})]}),Te(),e.jsxs(Mm,{$position:""===Me?z:"default",children:[e.jsxs(VR,{vertical:!0,gap:"small",className:"itd-upload-icons",children:[Be(),we()]}),Xe()]})]})})]})})),lm=Di(r.NavLink)`
|
|
4907
|
+
`,dm=t.forwardRef((({id:o="itd-upload-"+sa(),resultFileName:p=null,action:b="",filePath:n="",binaryName:M="file",showDeleteIcon:r=!1,showPreviewIcon:c=!1,buttonsPosition:z="default",padding:i=10,fluid:a=!0,fileWidth:O="100%",fileHeight:s="auto",maxFileWidth:A="none",maxFileHeight:d="none",containerWidth:l="100%",containerHeight:u="auto",previewFileWidth:f="100%",previewFileHeight:q="100%",previewFilePadding:h="0",requestMethod:W="put",maxFileSize:g=1024,disabled:m=!1,extraFormData:R={},extraQueryString:v={},extraHeader:L={},fileTypes:y=[exports.FileTypes.JPG,exports.FileTypes.PNG,exports.FileTypes.SVG,exports.FileTypes.PDF],removeAction:N="",removeExtraFormData:x={},removeExtraQueryString:B={},removeExtraHeader:w={},onUpdate:S,onUploadSuccess:X,onUploadFailed:k,onRemoveFileSuccess:T,onRemoveFileFailed:E},_)=>{const C=t.useRef(null),{addNotification:P}=Wd.useNotifications(),{showModal:D}=_a.useModal(),{fetch:j,cancel:I}=Jr(),{t:F}=De(),[$,U]=t.useState(!1),[V,H]=t.useState(!1),[Y,G]=t.useState(".svg, .png, .jpg"),[K,Q]=t.useState(!1),[J,Z]=t.useState(!1),[ee,te]=t.useState(!1),[oe,pe]=t.useState(null),[be,ne]=t.useState(null),[Me,re]=t.useState(""),[ce,ze]=t.useState(!1),[ie,ae]=t.useState(!1),[Oe,se]=t.useState(null),[Ae,de]=t.useState(!1),[le,ue]=t.useState(null);t.useEffect((()=>()=>{I()}),[]),t.useEffect((()=>{H(m)}),[m]),t.useEffect((()=>{ne(n?n.split("?")[0]:"")}),[n]),t.useEffect((()=>{null!==be&&(void 0!==be?he():U(!1))}),[be]),t.useEffect((()=>{let e=[];y.map((t=>{e.push(Cd(t))})),G(e.join(", "))}),[y]);const fe=(e,t)=>{P({title:e,description:t,placement:"topRight",autoHide:!0,delay:5e3,type:"error"})},qe=(e,t=!0,o=!0)=>{S&&S(e,t,o)};t.useImperativeHandle(_,(()=>({setFocus(){te(!0)},reset(e=!1,t=!1){We(),ne(null),re(""),qe("",e,t)},setValue(e,t=!0,o=!0){ne(e),qe(e,t,o)},getValue:()=>be||"",setError(e){re(e)},forceUpdate(){qe(be||"")},clear(){ne("")}})));const he=async()=>{let e=!1;be&&(e=await Ed(be),pe(e),e?qe(be):qe("",!0,!0),$||U(!0)),""!==be||$||U(!0),""===be&&$&&qe("",!0,!0)},We=()=>{ue(null),se(null),de(!1),pe(null)},ge=async()=>{H(!0),D({content:e.jsx("div",{children:F("uploader.areYouSureToDeleteThisFile")}),title:F("uploader.removeFile"),okButtonText:F("uploader.yes"),cancelButtonText:F("uploader.no"),okButtonProps:{variant:"statable",state:"reject"},closeOnClickOutside:!1,showCloseButton:!1,onOk:()=>(N?j({action:N,params:x,queries:B,headers:w,onFetched:e=>{e.data.success?(We(),qe("",!0,!0),T&&T(e.data.data)):E&&E()},onError:()=>{E&&E()}}):(We(),qe("",!0,!0),T&&T()),H(!1),!0),onCancel:()=>(H(!1),!0)})},me=e=>{e.preventDefault(),ie||Z(!0)},Re=e=>{e.preventDefault(),ie||Z(!1)},ve=e=>{e.preventDefault(),ie||(Z(!1),e.dataTransfer&&0!==e.dataTransfer.files.length?Ne(e.dataTransfer.files[0]):console.log(F("uploader.browserDoesntSupportDND")))},Le=e=>{Z(!1);const t=e.target.files[0];Ne(t)},ye=async({path:e,errorMessage:t,errorCode:o})=>{await Pd(1e3),se(null),ae(!1),await Pd(1500),de(!1),e?X&&X(e):t&&k&&k(t,o||0)},Ne=e=>{if(e&&(e=>!!y.includes(e.type)||(fe(F("uploader.error"),F("uploader.fileFormatError",{fileFormat:Y})),!1))(e)&&(e=>!(e.size>1024*g&&(fe(F("uploader.error"),F("uploader.fileSizeError",{fileSize:_d(1024*g)})),1)))(e)){if(p){const t=Cd(e.type);e=new File([e],p+t,{type:t,lastModified:e.lastModified})}(async e=>{if(!e)return;let t=new FormData;t.append(M,e),p&&t.append("name",p),Object.keys(R).forEach((e=>{t.append(e,R[e])})),j({action:b,requestMethod:W,params:t,queries:v,headers:L,onFetched:e=>{e.data.success?(ue({message:F("uploader.fileUploadSuccess"),status:"success"}),de(!0),ne(e.data.data.url),ye({path:e.data.data.url})):(ue({message:F("uploader.fileUploadFailed"),status:"error"}),qe("",!0,!0),ye({errorMessage:F("uploader.fileUploadFailed")}))},onError:(e,t)=>{ue({message:F("uploader.fileUploadFailed"),status:"error"}),qe("",!0,!0),ye({errorMessage:e,errorCode:t})},onProgress:e=>{se({estimated:e.estimated?(Math.round(100*e.estimated)/100).toFixed(2):"0",progress:e.progress?Math.round(100*e.progress):0,bytes:e.bytes?_d(e.bytes):"",total:e.total?_d(e.total):""})}})})(e),ae(!0)}},xe=()=>{H(!0),D({content:e.jsx(rm,{className:"itd-upload-preview-content",$width:f,$height:q,$padding:h,children:e.jsx(Ul,{src:be||""})}),showOkButton:!1,showCancelButton:!1,contentPadding:"0px",width:"max-content",onCancel:()=>(H(!1),!0)})},Be=()=>{if(r&&be&&!ie&&oe)return e.jsx("span",{className:"delete-icon",children:e.jsx(Aa,{variant:"solid",size:"small",type:"button",circle:!0,onClick:ge,disabled:V,icon:e.jsx(Al,{width:16,height:16}),className:"itd-upload-delete-button"})})},we=()=>{if(c&&be&&!ie&&oe)return e.jsx("span",{className:"preview-icon",children:e.jsx(Aa,{variant:"solid",size:"small",type:"button",circle:!0,onClick:xe,disabled:V,icon:e.jsx(dl,{width:16,height:16}),className:"itd-upload-preview-button"})})},Se=e.jsx("svg",{width:"20px",height:"20px",viewBox:"0 0 20 20",version:"1.1",xmlns:"http://www.w3.org/2000/svg",children:e.jsx("g",{id:"Error",stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd",children:e.jsxs("g",{id:"ErrorGroup",fillRule:"nonzero",children:[e.jsx("circle",{id:"ErrorBackground",fill:"#F8285A",cx:"10",cy:"10",r:"10"}),e.jsx("path",{d:"M10.0355339,8.6213203 L12.863961,5.79289322 C13.2544853,5.40236893 13.8876503,5.40236893 14.2781746,5.79289322 C14.6686989,6.18341751 14.6686989,6.81658249 14.2781746,7.20710678 L11.4497475,10.0355339 \n L14.2781746,12.863961 C14.6686989,13.2544853 14.6686989,13.8876503 14.2781746,14.2781746 C13.8876503,14.6686989 13.2544853,14.6686989 12.863961,14.2781746 L10.0355339,11.4497475 L7.20710678,14.2781746\n C6.81658249,14.6686989 6.18341751,14.6686989 5.79289322,14.2781746 C5.40236893,13.8876503 5.40236893,13.2544853 5.79289322,12.863961 L8.6213203,10.0355339 L5.79289322,7.20710678 C5.40236893,6.81658249\n 5.40236893,6.18341751 5.79289322,5.79289322 C6.18341751,5.40236893 6.81658249,5.40236893 7.20710678,5.79289322 L10.0355339,8.6213203 Z",id:"ErrorIcon",fill:"#FFFFFF"})]})})}),Xe=()=>{if(""===Me||ie)return;let t={className:"itd-upload-failed itd-failed-status",onPointerOver:()=>ze(!0),onPointerOut:()=>ze(!1)};return e.jsxs(sm,{...t,children:[ce?e.jsx(Am,{className:"itd-upload-error-tooltip itd-error-tooltip",children:Me}):null,Se]})},ke=()=>{if($)return null===oe?e.jsx(il,{width:24,height:24}):!1===oe?e.jsx(ll,{width:40,height:40}):e.jsx(Ul,{src:be||"",width:tl(O),height:tl(s)})},Te=()=>{let t=(K||J)&&!ie&&!V;return e.jsx(zm,{onPointerOver:()=>{!J&&Q(!0)},onPointerOut:()=>{!J&&Q(!1)},onDragOver:me,onDragLeave:Re,onDrop:ve,$isHover:t,className:"itd-upload-overlay",children:e.jsxs(cm,{$isHover:t,className:"itd-upload-overlay-content",children:[e.jsx("span",{className:"itd-upload-header",children:F("uploader.header")}),e.jsx("span",{className:"itd-upload-hint",children:F("uploader.hint")})]})})};return e.jsxs(pm,{className:"itd-upload",$fluid:a,children:[e.jsx("input",{type:"file",id:o,accept:Y,onChange:Le,onFocus:()=>te(!0),onBlur:()=>te(!1),onClick:()=>{C.current?.blur()},disabled:ie||V,ref:C}),e.jsx(nm,{htmlFor:o,$showFocus:ee,className:"itd-upload-label",children:e.jsxs(bm,{$showBorder:(J||K)&&!ie,$padding:i,$disabled:m,$hasError:""!==Me&&!ie,$fileWidth:O,$fileHeight:s,$maxFileWidth:A,$maxFileHeight:d,$containerWidth:l,$containerHeight:u,className:"itd-upload-content",children:[ke(),e.jsxs(im,{className:"itd-upload-status",$isActive:ie,$complete:"success"===le?.status,$error:"error"===le?.status,children:[e.jsx(am,{className:"itd-upload-status-box",$progress:Oe?Oe.progress:0,$complete:"success"===le?.status,$error:"error"===le?.status}),e.jsx("span",{className:"itd-upload-status-message",children:F(Ae||le?String(le?.message):"uploader.fileUploading")}),Oe?e.jsx("span",{className:"itd-upload-status-info",children:F("uploader.info",{total:Oe.total,estimated:Oe.estimated})}):e.jsx("span",{className:"itd-upload-status-calculating",children:F("uploader.calculating")})]}),Te(),e.jsxs(Mm,{$position:""===Me?z:"default",children:[e.jsxs(VR,{vertical:!0,gap:"small",className:"itd-upload-icons",children:[Be(),we()]}),Xe()]})]})})]})})),lm=Di(r.NavLink)`
|
|
4908
4908
|
|
|
4909
4909
|
text-decoration: none;
|
|
4910
4910
|
|
|
@@ -5082,7 +5082,7 @@ function pu(e,t){if(fu(e))for(let o=0;o<e.length&&!1!==t(e[o],o,e);o++);else e&&
|
|
|
5082
5082
|
pointer-events: none;
|
|
5083
5083
|
/* z-index: 1; */
|
|
5084
5084
|
|
|
5085
|
-
`;function Em({id:o="",name:p="",value:b="",type:n="default",buttonProps:M={},checked:r=!1,hasError:c=!1,children:z=null,icon:i=null,image:a=null,component:O=null,onChange:s=()=>{}}){const
|
|
5085
|
+
`;function Em({id:o="itd-radio-button-"+sa(),name:p="",value:b="",type:n="default",buttonProps:M={},checked:r=!1,hasError:c=!1,children:z=null,icon:i=null,image:a=null,component:O=null,onChange:s=()=>{}}){const A=()=>{console.log("handleOnChange",b),s&&s(b)};return e.jsxs(km,{className:(()=>{let e="itd-radio";return r&&(e+=" itd-radio-selected"),c&&(e+=" itd-radio-error"),e})(),children:[e.jsx("input",{type:"radio",onChange:A,id:o,name:p,value:b,checked:r,"aria-checked":r}),e.jsxs(wm,{className:(()=>{let e="itd-radio-label";return r&&(e+=" itd-radio-label-selected"),c&&(e+=" itd-radio-label-error"),e})(),htmlFor:o,children:[null!==O?e.jsx("div",{className:"itd-radio-custom-button",children:(()=>{const e={checked:r,value:b,icon:i,children:z};return"childProps"in O?.props&&(e.childProps={...O?.props?.childProps||{},checked:r,value:b,icon:i,children:z}),t.cloneElement(O,e)})()}):"default"===n?e.jsxs(Xm,{className:"itd-radio-default-button",children:[e.jsxs(Bm,{className:"itd-radio-content",children:[i?e.jsx(xm,{className:"itd-icon itd-pre-icon "+i}):a?e.jsx(Ul,{className:"itd-image",src:a,height:"20",brokenHeight:"20"}):null,e.jsx("span",{children:z})]}),r?e.jsx(Nm,{className:"itd-icon itd-check-icon it-web-check"}):null]}):"primary"===n?e.jsx(Aa,{className:"itd-radio-primary-button",...M,selected:r,onClick:A,children:e.jsx("span",{children:z})}):e.jsx("span",{children:z}),c?e.jsx(Tm,{className:"itd-error-border"}):null]})]})}const _m=Di.div`
|
|
5086
5086
|
display : grid;
|
|
5087
5087
|
grid-auto-flow : ${e=>e.$onlyFlow?e.$direction:"column"===e.$direction?"row":"column"};
|
|
5088
5088
|
grid-template-columns : ${e=>"row"===e.$direction||e.$onlyFlow?"auto":`repeat(${e.$length}, 1fr)`};
|
package/dist/index.esm.js
CHANGED
|
@@ -4904,7 +4904,7 @@ function Of(e,t){if(yf(e))for(let o=0;o<e.length&&!1!==t(e[o],o,e);o++);else e&&
|
|
|
4904
4904
|
|
|
4905
4905
|
}
|
|
4906
4906
|
|
|
4907
|
-
`,mR=u((({id:t=Ha(),resultFileName:p=null,action:b="",filePath:n="",binaryName:M="file",showDeleteIcon:i=!1,showPreviewIcon:a=!1,buttonsPosition:O="default",padding:s=10,fluid:A=!0,fileWidth:d="100%",fileHeight:l="auto",maxFileWidth:u="none",maxFileHeight:f="none",containerWidth:h="100%",containerHeight:W="auto",previewFileWidth:g="100%",previewFileHeight:m="100%",previewFilePadding:R="0",requestMethod:v="put",maxFileSize:L=1024,disabled:y=!1,extraFormData:N={},extraQueryString:B={},extraHeader:w={},fileTypes:x=[Ot.JPG,Ot.PNG,Ot.SVG,Ot.PDF],removeAction:X="",removeExtraFormData:k={},removeExtraQueryString:S={},removeExtraHeader:T={},onUpdate:E,onUploadSuccess:_,onUploadFailed:C,onRemoveFileSuccess:P,onRemoveFileFailed:D},I)=>{const F=c(null),{addNotification:j}=tl.useNotifications(),{showModal:$}=uO.useModal(),{fetch:U,cancel:V}=Bc(),{t:H}=it(),[Y,G]=r(!1),[K,Q]=r(!1),[J,Z]=r(".svg, .png, .jpg"),[ee,te]=r(!1),[oe,pe]=r(!1),[be,ne]=r(!1),[Me,re]=r(null),[ce,ze]=r(null),[ie,ae]=r(""),[Oe,se]=r(!1),[Ae,de]=r(!1),[le,ue]=r(null),[fe,qe]=r(!1),[he,We]=r(null);z((()=>()=>{V()}),[]),z((()=>{Q(y)}),[y]),z((()=>{ze(n?n.split("?")[0]:"")}),[n]),z((()=>{null!==ce&&(void 0!==ce?Re():G(!1))}),[ce]),z((()=>{let e=[];x.map((t=>{e.push(Sl(t))})),Z(e.join(", "))}),[x]);const ge=(e,t)=>{j({title:e,description:t,placement:"topRight",autoHide:!0,delay:5e3,type:"error"})},me=(e,t=!0,o=!0)=>{E&&E(e,t,o)};q(I,(()=>({setFocus(){ne(!0)},reset(e=!1,t=!1){ve(),ze(null),ae(""),me("",e,t)},setValue(e,t=!0,o=!0){ze(e),me(e,t,o)},getValue:()=>ce||"",setError(e){ae(e)},forceUpdate(){me(ce||"")},clear(){ze("")}})));const Re=async()=>{let e=!1;ce&&(e=await xl(ce),re(e),e?me(ce):me("",!0,!0),Y||G(!0)),""!==ce||Y||G(!0),""===ce&&Y&&me("",!0,!0)},ve=()=>{We(null),ue(null),qe(!1),re(null)},Le=async()=>{Q(!0),$({content:e("div",{children:H("uploader.areYouSureToDeleteThisFile")}),title:H("uploader.removeFile"),okButtonText:H("uploader.yes"),cancelButtonText:H("uploader.no"),okButtonProps:{variant:"statable",state:"reject"},closeOnClickOutside:!1,showCloseButton:!1,onOk:()=>(X?U({action:X,params:k,queries:S,headers:T,onFetched:e=>{e.data.success?(ve(),me("",!0,!0),P&&P(e.data.data)):D&&D()},onError:()=>{D&&D()}}):(ve(),me("",!0,!0),P&&P()),Q(!1),!0),onCancel:()=>(Q(!1),!0)})},ye=e=>{e.preventDefault(),Ae||pe(!0)},Ne=e=>{e.preventDefault(),Ae||pe(!1)},Be=e=>{e.preventDefault(),Ae||(pe(!1),e.dataTransfer&&0!==e.dataTransfer.files.length?Xe(e.dataTransfer.files[0]):console.log(H("uploader.browserDoesntSupportDND")))},we=e=>{pe(!1);const t=e.target.files[0];Xe(t)},xe=async({path:e,errorMessage:t,errorCode:o})=>{await Tl(1e3),ue(null),de(!1),await Tl(1500),qe(!1),e?_&&_(e):t&&C&&C(t,o||0)},Xe=e=>{if(e&&(e=>!!x.includes(e.type)||(ge(H("uploader.error"),H("uploader.fileFormatError",{fileFormat:J})),!1))(e)&&(e=>!(e.size>1024*L&&(ge(H("uploader.error"),H("uploader.fileSizeError",{fileSize:kl(1024*L)})),1)))(e)){if(p){const t=Sl(e.type);e=new File([e],p+t,{type:t,lastModified:e.lastModified})}(async e=>{if(!e)return;let t=new FormData;t.append(M,e),p&&t.append("name",p),Object.keys(N).forEach((e=>{t.append(e,N[e])})),U({action:b,requestMethod:v,params:t,queries:B,headers:w,onFetched:e=>{e.data.success?(We({message:H("uploader.fileUploadSuccess"),status:"success"}),qe(!0),ze(e.data.data.url),xe({path:e.data.data.url})):(We({message:H("uploader.fileUploadFailed"),status:"error"}),me("",!0,!0),xe({errorMessage:H("uploader.fileUploadFailed")}))},onError:(e,t)=>{We({message:H("uploader.fileUploadFailed"),status:"error"}),me("",!0,!0),xe({errorMessage:e,errorCode:t})},onProgress:e=>{ue({estimated:e.estimated?(Math.round(100*e.estimated)/100).toFixed(2):"0",progress:e.progress?Math.round(100*e.progress):0,bytes:e.bytes?kl(e.bytes):"",total:e.total?kl(e.total):""})}})})(e),de(!0)}},ke=()=>{Q(!0),$({content:e(dR,{className:"itd-upload-preview-content",$width:g,$height:m,$padding:R,children:e(Zu,{src:ce||""})}),showOkButton:!1,showCancelButton:!1,contentPadding:"0px",width:"max-content",onCancel:()=>(Q(!1),!0)})},Se=()=>{if(i&&ce&&!Ae&&Me)return e("span",{className:"delete-icon",children:e(Ya,{variant:"solid",size:"small",type:"button",circle:!0,onClick:Le,disabled:K,icon:e(Wu,{width:16,height:16}),className:"itd-upload-delete-button"})})},Te=()=>{if(a&&ce&&!Ae&&Me)return e("span",{className:"preview-icon",children:e(Ya,{variant:"solid",size:"small",type:"button",circle:!0,onClick:ke,disabled:K,icon:e(gu,{width:16,height:16}),className:"itd-upload-preview-button"})})},Ee=e("svg",{width:"20px",height:"20px",viewBox:"0 0 20 20",version:"1.1",xmlns:"http://www.w3.org/2000/svg",children:e("g",{id:"Error",stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd",children:o("g",{id:"ErrorGroup",fillRule:"nonzero",children:[e("circle",{id:"ErrorBackground",fill:"#F8285A",cx:"10",cy:"10",r:"10"}),e("path",{d:"M10.0355339,8.6213203 L12.863961,5.79289322 C13.2544853,5.40236893 13.8876503,5.40236893 14.2781746,5.79289322 C14.6686989,6.18341751 14.6686989,6.81658249 14.2781746,7.20710678 L11.4497475,10.0355339 \n L14.2781746,12.863961 C14.6686989,13.2544853 14.6686989,13.8876503 14.2781746,14.2781746 C13.8876503,14.6686989 13.2544853,14.6686989 12.863961,14.2781746 L10.0355339,11.4497475 L7.20710678,14.2781746\n C6.81658249,14.6686989 6.18341751,14.6686989 5.79289322,14.2781746 C5.40236893,13.8876503 5.40236893,13.2544853 5.79289322,12.863961 L8.6213203,10.0355339 L5.79289322,7.20710678 C5.40236893,6.81658249\n 5.40236893,6.18341751 5.79289322,5.79289322 C6.18341751,5.40236893 6.81658249,5.40236893 7.20710678,5.79289322 L10.0355339,8.6213203 Z",id:"ErrorIcon",fill:"#FFFFFF"})]})})}),_e=()=>{if(""===ie||Ae)return;return o(WR,{...{className:"itd-upload-failed itd-failed-status",onPointerOver:()=>se(!0),onPointerOut:()=>se(!1)},children:[Oe?e(gR,{className:"itd-upload-error-tooltip itd-error-tooltip",children:ie}):null,Ee]})},Ce=()=>{if(Y)return null===Me?e(uu,{width:24,height:24}):!1===Me?e(Ru,{width:40,height:40}):e(Zu,{src:ce||"",width:pu(d),height:pu(l)})},Pe=()=>{let t=(ee||oe)&&!Ae&&!K;return e(uR,{onPointerOver:()=>{!oe&&te(!0)},onPointerOut:()=>{!oe&&te(!1)},onDragOver:ye,onDragLeave:Ne,onDrop:Be,$isHover:t,className:"itd-upload-overlay",children:o(lR,{$isHover:t,className:"itd-upload-overlay-content",children:[e("span",{className:"itd-upload-header",children:H("uploader.header")}),e("span",{className:"itd-upload-hint",children:H("uploader.hint")})]})})};return o(aR,{className:"itd-upload",$fluid:A,children:[e("input",{type:"file",id:t,accept:J,onChange:we,onFocus:()=>ne(!0),onBlur:()=>ne(!1),onClick:()=>{F.current?.blur()},disabled:Ae||K,ref:F}),e(sR,{htmlFor:t,$showFocus:be,className:"itd-upload-label",children:o(OR,{$showBorder:(oe||ee)&&!Ae,$padding:s,$disabled:y,$hasError:""!==ie&&!Ae,$fileWidth:d,$fileHeight:l,$maxFileWidth:u,$maxFileHeight:f,$containerWidth:h,$containerHeight:W,className:"itd-upload-content",children:[Ce(),o(fR,{className:"itd-upload-status",$isActive:Ae,$complete:"success"===he?.status,$error:"error"===he?.status,children:[e(qR,{className:"itd-upload-status-box",$progress:le?le.progress:0,$complete:"success"===he?.status,$error:"error"===he?.status}),e("span",{className:"itd-upload-status-message",children:H(fe||he?String(he?.message):"uploader.fileUploading")}),e("span",le?{className:"itd-upload-status-info",children:H("uploader.info",{total:le.total,estimated:le.estimated})}:{className:"itd-upload-status-calculating",children:H("uploader.calculating")})]}),Pe(),o(AR,{$position:""===ie?O:"default",children:[o(bL,{vertical:!0,gap:"small",className:"itd-upload-icons",children:[Se(),Te()]}),_e()]})]})})]})})),RR=ha(X)`
|
|
4907
|
+
`,mR=u((({id:t="itd-upload-"+Ha(),resultFileName:p=null,action:b="",filePath:n="",binaryName:M="file",showDeleteIcon:i=!1,showPreviewIcon:a=!1,buttonsPosition:O="default",padding:s=10,fluid:A=!0,fileWidth:d="100%",fileHeight:l="auto",maxFileWidth:u="none",maxFileHeight:f="none",containerWidth:h="100%",containerHeight:W="auto",previewFileWidth:g="100%",previewFileHeight:m="100%",previewFilePadding:R="0",requestMethod:v="put",maxFileSize:L=1024,disabled:y=!1,extraFormData:N={},extraQueryString:B={},extraHeader:w={},fileTypes:x=[Ot.JPG,Ot.PNG,Ot.SVG,Ot.PDF],removeAction:X="",removeExtraFormData:k={},removeExtraQueryString:S={},removeExtraHeader:T={},onUpdate:E,onUploadSuccess:_,onUploadFailed:C,onRemoveFileSuccess:P,onRemoveFileFailed:D},I)=>{const F=c(null),{addNotification:j}=tl.useNotifications(),{showModal:$}=uO.useModal(),{fetch:U,cancel:V}=Bc(),{t:H}=it(),[Y,G]=r(!1),[K,Q]=r(!1),[J,Z]=r(".svg, .png, .jpg"),[ee,te]=r(!1),[oe,pe]=r(!1),[be,ne]=r(!1),[Me,re]=r(null),[ce,ze]=r(null),[ie,ae]=r(""),[Oe,se]=r(!1),[Ae,de]=r(!1),[le,ue]=r(null),[fe,qe]=r(!1),[he,We]=r(null);z((()=>()=>{V()}),[]),z((()=>{Q(y)}),[y]),z((()=>{ze(n?n.split("?")[0]:"")}),[n]),z((()=>{null!==ce&&(void 0!==ce?Re():G(!1))}),[ce]),z((()=>{let e=[];x.map((t=>{e.push(Sl(t))})),Z(e.join(", "))}),[x]);const ge=(e,t)=>{j({title:e,description:t,placement:"topRight",autoHide:!0,delay:5e3,type:"error"})},me=(e,t=!0,o=!0)=>{E&&E(e,t,o)};q(I,(()=>({setFocus(){ne(!0)},reset(e=!1,t=!1){ve(),ze(null),ae(""),me("",e,t)},setValue(e,t=!0,o=!0){ze(e),me(e,t,o)},getValue:()=>ce||"",setError(e){ae(e)},forceUpdate(){me(ce||"")},clear(){ze("")}})));const Re=async()=>{let e=!1;ce&&(e=await xl(ce),re(e),e?me(ce):me("",!0,!0),Y||G(!0)),""!==ce||Y||G(!0),""===ce&&Y&&me("",!0,!0)},ve=()=>{We(null),ue(null),qe(!1),re(null)},Le=async()=>{Q(!0),$({content:e("div",{children:H("uploader.areYouSureToDeleteThisFile")}),title:H("uploader.removeFile"),okButtonText:H("uploader.yes"),cancelButtonText:H("uploader.no"),okButtonProps:{variant:"statable",state:"reject"},closeOnClickOutside:!1,showCloseButton:!1,onOk:()=>(X?U({action:X,params:k,queries:S,headers:T,onFetched:e=>{e.data.success?(ve(),me("",!0,!0),P&&P(e.data.data)):D&&D()},onError:()=>{D&&D()}}):(ve(),me("",!0,!0),P&&P()),Q(!1),!0),onCancel:()=>(Q(!1),!0)})},ye=e=>{e.preventDefault(),Ae||pe(!0)},Ne=e=>{e.preventDefault(),Ae||pe(!1)},Be=e=>{e.preventDefault(),Ae||(pe(!1),e.dataTransfer&&0!==e.dataTransfer.files.length?Xe(e.dataTransfer.files[0]):console.log(H("uploader.browserDoesntSupportDND")))},we=e=>{pe(!1);const t=e.target.files[0];Xe(t)},xe=async({path:e,errorMessage:t,errorCode:o})=>{await Tl(1e3),ue(null),de(!1),await Tl(1500),qe(!1),e?_&&_(e):t&&C&&C(t,o||0)},Xe=e=>{if(e&&(e=>!!x.includes(e.type)||(ge(H("uploader.error"),H("uploader.fileFormatError",{fileFormat:J})),!1))(e)&&(e=>!(e.size>1024*L&&(ge(H("uploader.error"),H("uploader.fileSizeError",{fileSize:kl(1024*L)})),1)))(e)){if(p){const t=Sl(e.type);e=new File([e],p+t,{type:t,lastModified:e.lastModified})}(async e=>{if(!e)return;let t=new FormData;t.append(M,e),p&&t.append("name",p),Object.keys(N).forEach((e=>{t.append(e,N[e])})),U({action:b,requestMethod:v,params:t,queries:B,headers:w,onFetched:e=>{e.data.success?(We({message:H("uploader.fileUploadSuccess"),status:"success"}),qe(!0),ze(e.data.data.url),xe({path:e.data.data.url})):(We({message:H("uploader.fileUploadFailed"),status:"error"}),me("",!0,!0),xe({errorMessage:H("uploader.fileUploadFailed")}))},onError:(e,t)=>{We({message:H("uploader.fileUploadFailed"),status:"error"}),me("",!0,!0),xe({errorMessage:e,errorCode:t})},onProgress:e=>{ue({estimated:e.estimated?(Math.round(100*e.estimated)/100).toFixed(2):"0",progress:e.progress?Math.round(100*e.progress):0,bytes:e.bytes?kl(e.bytes):"",total:e.total?kl(e.total):""})}})})(e),de(!0)}},ke=()=>{Q(!0),$({content:e(dR,{className:"itd-upload-preview-content",$width:g,$height:m,$padding:R,children:e(Zu,{src:ce||""})}),showOkButton:!1,showCancelButton:!1,contentPadding:"0px",width:"max-content",onCancel:()=>(Q(!1),!0)})},Se=()=>{if(i&&ce&&!Ae&&Me)return e("span",{className:"delete-icon",children:e(Ya,{variant:"solid",size:"small",type:"button",circle:!0,onClick:Le,disabled:K,icon:e(Wu,{width:16,height:16}),className:"itd-upload-delete-button"})})},Te=()=>{if(a&&ce&&!Ae&&Me)return e("span",{className:"preview-icon",children:e(Ya,{variant:"solid",size:"small",type:"button",circle:!0,onClick:ke,disabled:K,icon:e(gu,{width:16,height:16}),className:"itd-upload-preview-button"})})},Ee=e("svg",{width:"20px",height:"20px",viewBox:"0 0 20 20",version:"1.1",xmlns:"http://www.w3.org/2000/svg",children:e("g",{id:"Error",stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd",children:o("g",{id:"ErrorGroup",fillRule:"nonzero",children:[e("circle",{id:"ErrorBackground",fill:"#F8285A",cx:"10",cy:"10",r:"10"}),e("path",{d:"M10.0355339,8.6213203 L12.863961,5.79289322 C13.2544853,5.40236893 13.8876503,5.40236893 14.2781746,5.79289322 C14.6686989,6.18341751 14.6686989,6.81658249 14.2781746,7.20710678 L11.4497475,10.0355339 \n L14.2781746,12.863961 C14.6686989,13.2544853 14.6686989,13.8876503 14.2781746,14.2781746 C13.8876503,14.6686989 13.2544853,14.6686989 12.863961,14.2781746 L10.0355339,11.4497475 L7.20710678,14.2781746\n C6.81658249,14.6686989 6.18341751,14.6686989 5.79289322,14.2781746 C5.40236893,13.8876503 5.40236893,13.2544853 5.79289322,12.863961 L8.6213203,10.0355339 L5.79289322,7.20710678 C5.40236893,6.81658249\n 5.40236893,6.18341751 5.79289322,5.79289322 C6.18341751,5.40236893 6.81658249,5.40236893 7.20710678,5.79289322 L10.0355339,8.6213203 Z",id:"ErrorIcon",fill:"#FFFFFF"})]})})}),_e=()=>{if(""===ie||Ae)return;return o(WR,{...{className:"itd-upload-failed itd-failed-status",onPointerOver:()=>se(!0),onPointerOut:()=>se(!1)},children:[Oe?e(gR,{className:"itd-upload-error-tooltip itd-error-tooltip",children:ie}):null,Ee]})},Ce=()=>{if(Y)return null===Me?e(uu,{width:24,height:24}):!1===Me?e(Ru,{width:40,height:40}):e(Zu,{src:ce||"",width:pu(d),height:pu(l)})},Pe=()=>{let t=(ee||oe)&&!Ae&&!K;return e(uR,{onPointerOver:()=>{!oe&&te(!0)},onPointerOut:()=>{!oe&&te(!1)},onDragOver:ye,onDragLeave:Ne,onDrop:Be,$isHover:t,className:"itd-upload-overlay",children:o(lR,{$isHover:t,className:"itd-upload-overlay-content",children:[e("span",{className:"itd-upload-header",children:H("uploader.header")}),e("span",{className:"itd-upload-hint",children:H("uploader.hint")})]})})};return o(aR,{className:"itd-upload",$fluid:A,children:[e("input",{type:"file",id:t,accept:J,onChange:we,onFocus:()=>ne(!0),onBlur:()=>ne(!1),onClick:()=>{F.current?.blur()},disabled:Ae||K,ref:F}),e(sR,{htmlFor:t,$showFocus:be,className:"itd-upload-label",children:o(OR,{$showBorder:(oe||ee)&&!Ae,$padding:s,$disabled:y,$hasError:""!==ie&&!Ae,$fileWidth:d,$fileHeight:l,$maxFileWidth:u,$maxFileHeight:f,$containerWidth:h,$containerHeight:W,className:"itd-upload-content",children:[Ce(),o(fR,{className:"itd-upload-status",$isActive:Ae,$complete:"success"===he?.status,$error:"error"===he?.status,children:[e(qR,{className:"itd-upload-status-box",$progress:le?le.progress:0,$complete:"success"===he?.status,$error:"error"===he?.status}),e("span",{className:"itd-upload-status-message",children:H(fe||he?String(he?.message):"uploader.fileUploading")}),e("span",le?{className:"itd-upload-status-info",children:H("uploader.info",{total:le.total,estimated:le.estimated})}:{className:"itd-upload-status-calculating",children:H("uploader.calculating")})]}),Pe(),o(AR,{$position:""===ie?O:"default",children:[o(bL,{vertical:!0,gap:"small",className:"itd-upload-icons",children:[Se(),Te()]}),_e()]})]})})]})})),RR=ha(X)`
|
|
4908
4908
|
|
|
4909
4909
|
text-decoration: none;
|
|
4910
4910
|
|
|
@@ -5082,7 +5082,7 @@ function Of(e,t){if(yf(e))for(let o=0;o<e.length&&!1!==t(e[o],o,e);o++);else e&&
|
|
|
5082
5082
|
pointer-events: none;
|
|
5083
5083
|
/* z-index: 1; */
|
|
5084
5084
|
|
|
5085
|
-
`;function $R({id:t="",name:p="",value:b="",type:n="default",buttonProps:M={},checked:
|
|
5085
|
+
`;function $R({id:t="itd-radio-button-"+Ha(),name:p="",value:b="",type:n="default",buttonProps:M={},checked:r=!1,hasError:c=!1,children:z=null,icon:i=null,image:a=null,component:O=null,onChange:s=()=>{}}){const A=()=>{console.log("handleOnChange",b),s&&s(b)};return o(FR,{className:(()=>{let e="itd-radio";return r&&(e+=" itd-radio-selected"),c&&(e+=" itd-radio-error"),e})(),children:[e("input",{type:"radio",onChange:A,id:t,name:p,value:b,checked:r,"aria-checked":r}),o(PR,{className:(()=>{let e="itd-radio-label";return r&&(e+=" itd-radio-label-selected"),c&&(e+=" itd-radio-label-error"),e})(),htmlFor:t,children:[null!==O?e("div",{className:"itd-radio-custom-button",children:(()=>{const e={checked:r,value:b,icon:i,children:z};return"childProps"in O?.props&&(e.childProps={...O?.props?.childProps||{},checked:r,value:b,icon:i,children:z}),d(O,e)})()}):"default"===n?o(IR,{className:"itd-radio-default-button",children:[o(CR,{className:"itd-radio-content",children:[i?e(_R,{className:"itd-icon itd-pre-icon "+i}):a?e(Zu,{className:"itd-image",src:a,height:"20",brokenHeight:"20"}):null,e("span",{children:z})]}),r?e(ER,{className:"itd-icon itd-check-icon it-web-check"}):null]}):"primary"===n?e(Ya,{className:"itd-radio-primary-button",...M,selected:r,onClick:A,children:e("span",{children:z})}):e("span",{children:z}),c?e(jR,{className:"itd-error-border"}):null]})]})}const UR=ha.div`
|
|
5086
5086
|
display : grid;
|
|
5087
5087
|
grid-auto-flow : ${e=>e.$onlyFlow?e.$direction:"column"===e.$direction?"row":"column"};
|
|
5088
5088
|
grid-template-columns : ${e=>"row"===e.$direction||e.$onlyFlow?"auto":`repeat(${e.$length}, 1fr)`};
|