forstok-ui-lib 6.19.2 → 6.19.4
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.mjs
CHANGED
|
@@ -876,6 +876,7 @@ import*as e from"react";import t,{useState as n,useEffect as r,forwardRef as i,u
|
|
|
876
876
|
}
|
|
877
877
|
`}
|
|
878
878
|
`,Yt=C.article`
|
|
879
|
+
line-height: normal;
|
|
879
880
|
> label,
|
|
880
881
|
> aside {
|
|
881
882
|
${z}
|
|
@@ -3927,7 +3928,7 @@ import*as e from"react";import t,{useState as n,useEffect as r,forwardRef as i,u
|
|
|
3927
3928
|
width: 14px;
|
|
3928
3929
|
${Am}
|
|
3929
3930
|
}
|
|
3930
|
-
`,Lm=e=>{var{children:t,mode:n}=e,r=w(e,["children","mode"]);const{id:i,width:a}=r;return"image"===n?S.jsxs(S.Fragment,{children:[t,S.jsx(Bm,Object.assign({},"data-idx"in r&&{"data-idx":r["data-idx"]},r["data-detail"]&&{"data-detail":r["data-detail"]},r))]}):S.jsxs(Fm,{$width:a,children:[S.jsxs(Dm,{htmlFor:i,children:[S.jsx(Em,{}),S.jsx(km,{children:t})]}),S.jsx(Bm,Object.assign({},"data-idx"in r&&{"data-idx":r["data-idx"]},r["data-detail"]&&{"data-detail":r["data-detail"]},r))]})},Pm=e=>{var{children:t,id:r,name:i,evChange:a,evCreateMessage:o}=e,
|
|
3931
|
+
`,Lm=e=>{var{children:t,mode:n}=e,r=w(e,["children","mode"]);const{id:i,width:a}=r;return"image"===n?S.jsxs(S.Fragment,{children:[t,S.jsx(Bm,Object.assign({},"data-idx"in r&&{"data-idx":r["data-idx"]},r["data-detail"]&&{"data-detail":r["data-detail"]},r))]}):S.jsxs(Fm,{$width:a,children:[S.jsxs(Dm,{htmlFor:i,children:[S.jsx(Em,{}),S.jsx(km,{children:t})]}),S.jsx(Bm,Object.assign({},"data-idx"in r&&{"data-idx":r["data-idx"]},r["data-detail"]&&{"data-detail":r["data-detail"]},r))]})},Pm=e=>{var{children:t,id:r,name:i,evChange:a,evCreateMessage:o,label:s}=e,l=w(e,["children","id","name","evChange","evCreateMessage","label"]);const{accept:c}=l,[d,u]=n(!1),p=e=>{e.preventDefault(),e.stopPropagation(),"dragenter"===e.type||"dragover"===e.type?u(!0):"dragleave"===e.type&&u(!1)};return S.jsxs(Im,{onDragEnter:p,className:d?"drag-active":"",children:[S.jsx(Bm,Object.assign({id:r,name:i,onChange:e=>{e.preventDefault();const t=e.target;t.files&&t.files[0]&&a&&a(t.files)}},l)),S.jsx(jm,{id:"label-file-dragdrop-upload",htmlFor:r,children:S.jsx(Mm,{children:t?S.jsxs(Om,{children:[S.jsx(Tm,{}),S.jsx("span",{children:t})]}):S.jsxs(Nm,{children:[null!=s?s:"Drag & Drop file here to upload, or ",S.jsx("span",{children:"browse"}),"."]})})}),d&&S.jsx(Sm,{onDragEnter:p,onDragLeave:p,onDragOver:p,onDrop:e=>{if(e.preventDefault(),e.stopPropagation(),u(!1),e.dataTransfer.files[0]){const t=c?c.split(",").map((e=>e.trim().replace(".",""))):null;for(let n=0;n<e.dataTransfer.files.length;n++){const r=e.dataTransfer.files[n].name.split(".").pop();if((null==t?void 0:t.length)&&r&&!t.includes(r)){const e=Ie("failed","File type is not allowed. Please check again");return o&&o(e),!1}}a&&a(e.dataTransfer.files)}}})]})},Ym=C.textarea`
|
|
3931
3932
|
${({$isError:e})=>{if(e)return x`
|
|
3932
3933
|
border:1px solid var(--err-clr-ln);
|
|
3933
3934
|
`}}
|