ono-react-element 0.0.17 → 0.0.19
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/es/{AutoSliderList-eb1CVc8b.js → AutoSliderList-tkaOmfnx.js} +1 -1
- package/dist/es/{Button-BsWI818a.js → Button-QIC7QPK9.js} +1 -1
- package/dist/es/{Modal-BsI-8rap.js → Modal-D2289ZPX.js} +1 -1
- package/dist/es/{Switch-BBHMaxoZ.js → Switch-C61q7rR5.js} +1 -1
- package/dist/es/{TemplateDialog-PQxjmAJa.js → TemplateDialog-CAimG5cv.js} +1 -1
- package/dist/es/{VirtualList-CdhqyHFQ.js → VirtualList-BAiIymCF.js} +1 -1
- package/dist/es/{Waterfall-CY3QkL5m.js → Waterfall-C7SWCxJ1.js} +1 -1
- package/dist/es/common.ts-BbDnZ7vC.js +1 -0
- package/dist/es/index.js +1 -1
- package/dist/style/AutoSliderList.css +1 -1
- package/dist/style/AvatarCrop.css +1 -1
- package/dist/style/Button.css +1 -1
- package/dist/style/Card3D.css +1 -1
- package/dist/style/Checkbox.css +1 -1
- package/dist/style/Input.css +1 -1
- package/dist/style/MenuButton.css +1 -1
- package/dist/style/Message.css +1 -1
- package/dist/style/Modal.css +1 -1
- package/dist/style/Pagination.css +1 -1
- package/dist/style/Radio.css +1 -1
- package/dist/style/ScrollableTabs.css +1 -1
- package/dist/style/Select.css +1 -1
- package/dist/style/SvgImg.css +1 -1
- package/dist/style/Switch.css +1 -1
- package/dist/style/TemplateDialog.css +1 -1
- package/dist/style/Toast.css +1 -1
- package/dist/style/Tooltip.css +1 -1
- package/dist/style/Waterfall.css +1 -1
- package/dist/style/index.css +1 -1
- package/dist/types/index.d.ts +2 -2
- package/dist/types/utils/common.d.ts +4 -0
- package/dist/umd/index.umd.cjs +1 -1
- package/dist/umd/index.umd.cjs.br +0 -0
- package/dist/umd/index.umd.cjs.gz +0 -0
- package/package.json +1 -1
- package/dist/es/common.ts-vX9A6Rye.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as t}from "./dependencies-CbQbPZZ-.js";import{u as e}from "./useGetElementSize.tsx-Dtshth0Y.js";import{p as i}from "./common.ts-
|
|
1
|
+
import{j as t}from "./dependencies-CbQbPZZ-.js";import{u as e}from "./useGetElementSize.tsx-Dtshth0Y.js";import{p as i}from "./common.ts-BbDnZ7vC.js";import{useState as o,useRef as r,useMemo as n,useEffect as s,cloneElement as l}from "react";var a=((t2)=>(t2.Horizontal="Horizontal",t2.Vertical="Vertical",t2))(a||{});const c=({list:c2,style:d,disable:f,children:m,sliderBox:u,className:p,sliderStyle:h,duration:x=300,sliderClassName:w,currentIndex:y=0,direction:j=a.Horizontal,sliderTransitionTimingFunction:z="ease-in-out"})=>{const [g,H]=o(false),[T,$]=o(0),[v,A]=o({t:0,l:0}),[C,N]=o({w:0,h:0}),b=r(null),B=r(null),S=n(()=>["width","height","transform"].map((t2)=>`${t2}${x/1e3}s ${z}`).join(","),[j,x,z]),k=n(()=>({width:C.w,height:C.h,transition:g ? S:"initial",transform:`translate(${v.l}px,${v.t}px)`}),[C,v]),{w:D,h:E}=e();return s(()=>{$(y);},[y]),s(()=>{(()=>{if("number"!=typeof T)return;if(!b.current||!B.current)return;const t2=Array.from(b.current.children).slice(1);t2.forEach((t3)=>{t3.style.position="relative",t3.style.cursor=f ? "not-allowed":"pointer",t3.style.zIndex="1";});const e2=window.getComputedStyle(b.current),o2={t:"Horizontal"===j ? i(e2.paddingTop):t2[T].offsetTop,l:"Horizontal"===j ? t2[T].offsetLeft:i(e2.paddingLeft)};A(o2),N({w:t2[T].offsetWidth,h:t2[T].offsetHeight}),setTimeout(()=>H(true),x);})();},[T,D,E,f]),t.jsxs("ul",{ref:b,className:["ono-auto-slider-list-container",p,f ? "ono-auto-slider-list-is-disable":""].filter(Boolean).join(" "),style:{flexDirection:"Horizontal"===j ? "row":"column",...d},children:[t.jsx("li",{ref:B,className:["ono-auto-slider-list-slider",w].filter(Boolean).join(" "),style:{...h,...k},children:u}),c2.map((t2,e2)=>l(m({item:t2,index:e2,isActive:e2===T}),{onClick:(i2)=>{if(f)return;const o2=m({item:t2,index:e2,isActive:e2===T}).props.onClick;o2&&o2(i2),$(e2);}}))]});};export{c as A,a as D};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as n}from "./dependencies-CbQbPZZ-.js";import{t as o}from "./common.ts-
|
|
1
|
+
import{j as n}from "./dependencies-CbQbPZZ-.js";import{t as o}from "./common.ts-BbDnZ7vC.js";import{forwardRef as t,useState as e,useRef as i,useEffect as r}from "react";const s=t(({onClick:t2,children:s2,disabled:c,loading:a,plain:l,shape:d="default",htmlType:u="button",type:p="primary",throttleDuration:m,className:f,style:h,icon:g},b)=>{const [j,y]=e(false),x=i(null),C=i(null),v=t2 ? o(t2,m ? "number"==typeof m ? m:500:0):void 0;return r(()=>{(()=>{if(!C.current)return;const n2=C.current;a ?(y(true),n2.classList.add("ono-loading-start")):(setTimeout(()=>{y(false);},300),n2.classList.remove("ono-loading-start"),n2.classList.add("ono-loading-end"));})();},[a,C]),r(()=>{(()=>{if(!x.current)return;const n2=x.current,o2=n2.getBoundingClientRect();n2.style.setProperty("--btn-height",o2.height+"px");})();},[x]),r(()=>{b&&x&&("function"==typeof b ? b(x.current):b.current=x.current);},[b,x]),n.jsxs("button",{ref:x,className:[`ono-btn-${p}`,a||j ? "ono-is-loading":"",a||g ? "ono-is-icon":"",c ? "ono-btn-is-disabled":"","round"===d ? "ono-is-round":"circle"===d ? "ono-is-circle":"",l ? "ono-is-plain":"",f ?? ""].filter(Boolean).join(" "),type:u,disabled:("function"==typeof c ? c():c)||!!a,style:h,onClick:v,children:[(()=>{const o2=n.jsx("span",{ref:C,className:"ono-btn-icon",children:n.jsx("span",{children:"object"==typeof a ? a.icon:n.jsx("svg",{viewBox:"0 0 1024 1024",focusable:"false","data-icon":"loading",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",children:n.jsx("path",{d:"M988 548c-19.9 0-36-16.1-36-36 0-59.4-11.6-117-34.6-171.3a440.45 440.45 0 00-94.3-139.9 437.71 437.71 0 00-139.9-94.3C629 83.6 571.4 72 512 72c-19.9 0-36-16.1-36-36s16.1-36 36-36c69.1 0 136.2 13.5 199.3 40.3C772.3 66 827 103 874 150c47 47 83.9 101.8 109.7 162.7 26.7 63.1 40.2 130.2 40.2 199.3.1 19.9-16 36-35.9 36z"})})})});return a||j ? o2:g ? n.jsx("span",{children:g}):n.jsx(n.Fragment,{});})(),s2]});});export{s as B};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as o}from "./dependencies-CbQbPZZ-.js";import{a as e}from "./colorUtils.ts-DYuRvCXZ.js";import{useState as n,useRef as l,useEffect as a}from "react";import{p as t}from "./PortalRenderer-CDAzQJgm.js";import{B as r}from "./Button-
|
|
1
|
+
import{j as o}from "./dependencies-CbQbPZZ-.js";import{a as e}from "./colorUtils.ts-DYuRvCXZ.js";import{useState as n,useRef as l,useEffect as a}from "react";import{p as t}from "./PortalRenderer-CDAzQJgm.js";import{B as r}from "./Button-QIC7QPK9.js";const s=({title:t2="This is a modal title",icon:s2,content:i2="This is a modal content",okText:c="confirm",cancelText:d="cancel",confirmDisabled:m,cancelDisabled:h,position:x,onConfirm:b,onCancel:f,mask:u=true,maskClosable:p=false,width:j,btnClr:C,footer:v=({OkBtn:e2,CancelBtn:n2})=>o.jsxs(o.Fragment,{children:[o.jsx(n2,{}),o.jsx(e2,{})]}),modalBody:y,destroy:B})=>{const [g,w]=n(false),k=l(null),N=l(null),P=[{label:"themeColor",value:C||""},{label:"themeHoverColor",value:C&&e(C,"light",10)||""},{label:"themeActiveColor",value:C&&e(C,"dark",20)||""},{label:"themeDisabledClr",value:C&&e(C,"light",20)||""}],T=()=>{if(x){if(!N.current)return;N.current.classList.remove("ono-modal-enter"),N.current.classList.add("ono-modal-leave"),setTimeout(()=>{B();},300);}else B();};return a(()=>(k.current&&(u ? k.current.showModal():k.current.show()),()=>{k.current&&k.current.close();}),[k.current,u]),a(()=>{(()=>{if(!N.current)return;const o2=N.current.style;j&&o2.setProperty("--width",j+"px"),x&&(o2.setProperty("--left",(x.x/window.innerWidth*100).toFixed(2)+"%"),o2.setProperty("--top",(x.y/window.innerHeight*100).toFixed(2)+"%")),C&&P.forEach((e2)=>o2.setProperty(`--${e2.label}`,e2.value));})();},[N]),o.jsx("dialog",{ref:k,className:"ono-modal",onClick:()=>p&&T(),children:y ? y(T):o.jsxs("div",{ref:N,className:["ono-modal-box",x ? "ono-modal-enter":""].join(" "),onClick:(o2)=>o2.stopPropagation(),children:[o.jsxs("div",{className:"ono-modal-box-body",children:[s2 ?? o.jsx("div",{className:"ono-modal-box-body-icon",children:o.jsx("svg",{color:"#faad14",viewBox:"64 64 896 896",focusable:"false","data-icon":"exclamation-circle",width:"22px",height:"22px",fill:"currentColor","aria-hidden":"true",style:{marginInlineEnd:"12px"},children:o.jsx("path",{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm-32 232c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v272c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V296zm32 440a48.01 48.01 0 010-96 48.01 48.01 0 010 96z"})})}),o.jsxs("div",{className:"ono-modal-box-body-contentBar",children:[o.jsx("h1",{className:"ono-modal-box-body-contentBar-title",children:t2}),o.jsx("p",{className:"ono-modal-box-body-contentBar-content",children:i2})]})]}),v&&o.jsx("div",{className:"ono-modal-box-footer",children:v({OkBtn:()=>o.jsx(r,{className:"ono-modal-box-footer-confirmBtn",loading:g,disabled:m,onClick:async()=>{w(true);try{const o2=b==null ? void 0:b();o2 instanceof Promise&&await o2;}finally{w(false),T();}},children:c ?? "Confirm"}),CancelBtn:()=>o.jsx(r,{className:"ono-modal-box-footer-cancelBtn",disabled:h||g,onClick:()=>{f==null ? void 0:f(),T();},children:d ?? "Cancel"}),handleClose:()=>T()})})]})});},i=(o2)=>t(s,o2,"ono-modal");export{i as M};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as e}from "./dependencies-CbQbPZZ-.js";import{p as n}from "./common.ts-
|
|
1
|
+
import{j as e}from "./dependencies-CbQbPZZ-.js";import{p as n}from "./common.ts-BbDnZ7vC.js";import{useRef as r,useEffect as c}from "react";const t=({id:t2,text:i,style:s,color:l,checked:o,onChange:a,name:d="",className:h,disabled:u=false})=>{const m=r(null),f=r(null),v=r(null),p=r(null),j=r(null),x=r(null),w=[{value:"string"==typeof l ? l:l==null ? void 0:l.active,name:"checkedClr"},{value:"string"==typeof l ? void 0:l==null ? void 0:l.inactive,name:"uncheckedClr"}];return c(()=>{(()=>{if(!f.current||!m.current)return;let e2=60,r2=32;if(h||s){const c2=getComputedStyle(f.current);e2=n(c2.width),r2=n(c2.height);}[...w,{value:e2,name:"w"},{value:r2,name:"h"}].forEach(({value:e3,name:n2})=>{e3&&((e4,n3,r3)=>{const c2="number"==typeof e4;r3.style.setProperty(`--${n3}`,c2 ? `${e4}px`:e4);})(e3,n2,m.current);}),requestAnimationFrame(()=>{p.current&&(p.current.style.transition="transform 0.3s");});})();},[f,m,p,h,s,l,i,j,x]),c(()=>{v.current&&(v.current.checked=o);},[v,o]),e.jsxs("div",{ref:m,className:["ono-switch",u ? "ono-switch-is-disabled":""].filter(Boolean).join(" "),children:[e.jsx("input",{id:t2,name:d,role:"switch",ref:v,type:"checkbox",checked:o,onChange:(e2)=>{u||(a==null ? void 0:a(e2.currentTarget.checked,e2));}}),e.jsx("div",{ref:f,className:["ono-switch-box",h||""].filter(Boolean).join(" "),style:s,onClick:()=>{var _a;return(_a=v.current)==null ? void 0:_a.click();},children:e.jsxs("div",{ref:p,className:"ono-switch-children-bar",children:[(i==null ? void 0:i.active)&&e.jsx("div",{ref:j,className:"ono-switch-children",children:i==null ? void 0:i.active}),e.jsx("div",{className:"ono-switch-slider"}),(i==null ? void 0:i.inactive)&&e.jsx("div",{ref:x,className:"ono-switch-children",children:i==null ? void 0:i.inactive})]})})]});};export{t as S};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as e}from "./dependencies-CbQbPZZ-.js";import{g as t}from "./common.ts-
|
|
1
|
+
import{j as e}from "./dependencies-CbQbPZZ-.js";import{g as t}from "./common.ts-BbDnZ7vC.js";import{useState as o,useRef as n,useEffect as r,useCallback as s}from "react";const i=({children:i2,animation:a,className:l,duration:c=300,style:d,maskColor:m="rgba(0,0,0,0.5)",disableContextMenu:p,maskClickClose:u=true,dialogClose:y})=>{const [f,k]=o(false),g=n(null),x=()=>{if(g.current)if(k(true),a){const e2=g.current;e2.classList.remove(`ono-${a.type}-enter`),e2.classList.add(`ono-${a.type}-leave`),setTimeout(y,c);}else y();};r(()=>{(()=>{if(!a||!g.current)return;const e2=g.current.parentElement.style,o2=g.current.style;switch(e2.setProperty("--duration",c/1e3+"s"),a.type){case "zoom":{const{x:e3,y:n2}=t(a.element),r2=(e3/window.innerWidth*100).toFixed(2)+"%",s2=(n2/window.innerHeight*100).toFixed(2)+"%";o2.setProperty("--left",r2),o2.setProperty("--top",s2);break;}case "fade":{const e3="left-center"===a.direction ? "--left":"--top";o2.setProperty(e3,a.startPosition);break;}}})();},[g,a]);const C=s(()=>{if(!a)return "";const e2=`ono-${a.type}-enter`,t2=`ono-${a.type}-leave`;return f ? t2:e2;},[a,f]);return e.jsx("div",{className:` ono-dialog-mask ono-dialog-mask-${f ? "leave":"enter"}`,style:{background:m},onClick:()=>u&&x(),onContextMenu:(e2)=>p&&e2.preventDefault(),children:e.jsx("div",{ref:g,className:` ono-dialog ${l||""}${C()}`,style:d,onClick:(e2)=>e2.stopPropagation(),children:"function"==typeof i2 ? i2(x):i2})});};export{i as T};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as e}from "./dependencies-CbQbPZZ-.js";import{u as t}from "./useEventListener.tsx-BBGVcI5T.js";import{t as r}from "./common.ts-
|
|
1
|
+
import{j as e}from "./dependencies-CbQbPZZ-.js";import{u as t}from "./useEventListener.tsx-BBGVcI5T.js";import{t as r}from "./common.ts-BbDnZ7vC.js";import{memo as i,useState as n,useMemo as l,useRef as a,useEffect as s}from "react";const d=i(({containerClassName:i2,dataSource:d2,containerStyle:c2={},onEndCallback:o,refreshSpeed:h=50,wrapperClassName:u,wrapperStyle:p={},estimatedSize:f=35,updateDataSourceScroll2Top:v,direction:g="vertical"})=>{const [m,x]=n({viewSize:0,startIndex:0,listSize:0,renderCount:0,prevLen:0}),[S,z]=n([]),w="number"==typeof f ? f:f(),I=l(()=>Math.min(d2.length,m.startIndex+m.renderCount),[d2,m]),y=l(()=>{var _a;return m.startIndex>0 ?(_a=S[m.startIndex-1])==null ? void 0:_a.end:0;},[m.startIndex,S]),j=l(()=>d2.slice(m.startIndex,I).map(({id:t2,data:r2})=>e.jsx("li",{"data-virtual-id":t2,style:"vertical"===g ?{width:"100%"}:{height:"100%"},children:r2},t2)),[I,d2,m.startIndex,g]),C=l(()=>({display:"flex",listStyle:"none",flexDirection:"vertical"===g ? "column":"row",height:"vertical"===g ? m.listSize-y+"px":"100%",width:"vertical"===g ? "auto":m.listSize-y+"px",transform:"vertical"===g ? `translate3d(0,${y}px,0)`:`translate3d(${y}px,0,0)`}),[m.listSize,y,g]),L=a(null),N=a(null),b=(e2)=>x((t2)=>({...t2,...e2})),E=r(()=>{const{scrollTop:e2,clientHeight:t2,scrollHeight:r2,scrollLeft:i3,clientWidth:n2,scrollWidth:l2}=L.current,a2="vertical"===g ? r2-t2-e2:l2-n2-i3;b({startIndex:A(S,"vertical"===g ? e2:i3)}),("vertical"===g ? e2===w/2:i3===w/2)&&b({startIndex:0}),a2<=20&&o&&o();},h),A=(e2,t2)=>{let r2=0,i3=e2.length-1,n2=-1;for(;r2<=i3;){const l2=r2+Math.floor((i3-r2)/2),a2=e2[l2].end;if(a2===t2)return l2+1;a2<t2 ? r2=l2+1:((-1===n2||n2>l2)&&(n2=l2),i3=l2-1);}return n2;};return t("scroll",E,{target:L.current,deps:[S,g]}),s(()=>{(()=>{if(!L.current)return;const e2=("vertical"===g ? L.current.offsetHeight:L.current.offsetWidth)||0;b({viewSize:e2,renderCount:Math.ceil(e2/w)+1});})();},[L,g]),s(()=>{d2.length&&N&&(()=>{var _a;const e2=[],t2=d2.length-m.prevLen,r2=t2>0 ? S.length:0,i3=r2>0 ? S[r2-1].end:0;for(let r3=0;r3<(t2>0 ? t2:d2.length);r3++){const n2=d2[(t2>0 ? m.prevLen:0)+r3];e2.push({index:n2.id,size:w,start:i3 ? i3+r3*w:n2.id*w,end:i3 ? i3+(r3+1)*w:(n2.id+1)*w,dSize:0});}z((r3)=>[...t2>0 ? r3:[],...e2]),b({prevLen:d2.length}),v&&((_a=L.current)==null ? void 0:_a.scrollTo(0,0));})();},[N,d2,v]),s(()=>{(()=>{if(!N.current||0===S.length)return;const e2=Array.from(N.current.childNodes);if(!e2.length)return;e2.forEach((e3)=>{const t3=e3.getBoundingClientRect(),r3=+e3.getAttribute("data-virtual-id"),i4=S[r3],n2=i4.size-("vertical"===g ? t3.height:t3.width);n2&&(i4.size="vertical"===g ? t3.height:t3.width,i4.end=i4.end-n2,i4.dSize=n2);});const t2=+e2[0].getAttribute("data-virtual-id"),r2=S.length;let i3=S[t2].dSize;S[t2].dSize=0;for(let e3=t2+1;e3<r2;e3++){const t3=S[e3];t3.start=S[e3-1].end,t3.end=t3.end-i3,t3.dSize&&(i3+=t3.dSize,t3.dSize=0);}b({listSize:S[r2-1].end});})();},[N,S,m.startIndex,g]),e.jsx("div",{ref:L,className:i2,style:{width:"100%",height:"100%",overflow:"auto",...c2},children:e.jsx("ul",{ref:N,className:u,style:{...C,...p},children:j})});}),c=(e2,t2)=>e2.map((e3,r2)=>({id:r2,data:t2(e3,r2)}));export{d as E,c};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as e}from "./dependencies-CbQbPZZ-.js";import{u as t}from "./useEventListener.tsx-BBGVcI5T.js";import{t as a}from "./common.ts-
|
|
1
|
+
import{j as e}from "./dependencies-CbQbPZZ-.js";import{u as t}from "./useEventListener.tsx-BBGVcI5T.js";import{t as a}from "./common.ts-BbDnZ7vC.js";import{useState as i,useRef as n,useCallback as o,useEffect as r}from "react";const s=({options:s2,pageSize:l,children:d,request:m,reloadData:c,className:g,style:p,updateData:h,loading:u=true,bottomThreshold:f=50})=>{const [x,y]=i({page:1,reloadData:c,loading:false,isFinish:false,gap:"number"==typeof s2 ? 0:s2.gap,imageWidth:"number"==typeof s2 ? s2:0,columns:"number"==typeof s2 ? 0:s2.columns,imageList:[]}),[w,W]=i([]),[j,b]=i([]),v=n(null),L=n(null),D=n(null),N=(e2)=>y((t2)=>({...t2,...e2})),E=async(e2,t2)=>{const a2=c&&x.reloadData!==c;if(x.isFinish)return;N({loading:true});const i2=await m(e2,t2);F(i2),N({isFinish:!i2.length,imageList:a2 ? [...i2]:[...x.imageList,...i2],page:e2+1,loading:false});},F=(e2)=>y((t2)=>{const a2=c&&x.reloadData!==c,i2=a2 ? []:[...j],n2=a2 ? Array(t2.columns).fill(0):[..."[]"!==JSON.stringify(w)? w:Array(t2.columns).fill(0)];return e2.forEach((e3)=>{const a3=((e4)=>{let t3=0,a4=0;return t3=e4.indexOf(Math.min(...e4)),a4=e4[t3],{index:t3,height:a4};})(n2),o2=Math.floor(e3.height*t2.imageWidth/e3.width);i2.push({x:a3.index%t2.columns!==0 ? a3.index*t2.imageWidth+t2.gap*a3.index:a3.index*t2.imageWidth,y:a3.height}),n2[a3.index]+=o2+t2.gap,W(n2);}),b(i2),t2;}),M=o(()=>{if(!D.current)return;const e2=D.current.clientWidth;let t2=0,a2=x.page;if(c&&x.reloadData!==c&&(y({page:1,reloadData:c,loading:false,isFinish:false,gap:"number"==typeof s2 ? 0:s2.gap,imageWidth:"number"==typeof s2 ? s2:0,columns:"number"==typeof s2 ? 0:s2.columns,imageList:[]}),W([]),b([]),a2=1),"number"==typeof s2){const a3=Math.floor(e2/x.imageWidth);t2=a3-1;const i2=t2 ?(e2-a3*x.imageWidth)/t2:0;N({columns:a3,gap:i2});}else{t2=x.columns-1;const a3=(e2-t2*x.gap)/x.columns;N({imageWidth:a3});}E(a2,l);},[x,c]),T=()=>{v.current&&clearTimeout(v.current),v.current=setTimeout(M,50);},z=a(()=>{const{scrollTop:e2,clientHeight:t2,scrollHeight:a2}=L.current;a2-t2-e2>f||!x.loading&&E(x.page,l);},50);return t("scroll",z,{target:L.current,deps:[x.loading,x.page]}),r(()=>(M(),window.addEventListener("resize",T),()=>{window.removeEventListener("resize",T);}),[D,c]),r(()=>{h&&E(x.page,l);},[h,x.loading,x.page,L.current]),e.jsxs("div",{className:"ono-waterfall-container",children:[e.jsx("div",{ref:L,className:[g,"ono-waterfall-content"].join(" ").trim(),style:p,children:e.jsx("div",{ref:D,className:"ono-waterfall-wrapper",style:{height:Math.max(...w)-x.gap+"px"},children:x.imageList.map((t2,a2)=>e.jsx("div",{className:"ono-waterfall-item",style:{width:`${x.imageWidth}px`,transform:`translate(${j[a2].x}px,${j[a2].y}px)`},children:d(t2,a2)},t2.id))})}),x.loading&&("function"==typeof u ? u():u&&"boolean"==typeof u ? e.jsx("div",{className:"ono-waterfall-loading",children:"loading..."}):u)]});};export{s as W};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const t=(t2,e2,n2=t2.length)=>(e2<0&&(e2=Math.max(0,e2+t2.length)),n2<0&&(n2=t2.length+n2),e2>n2&&([e2,n2]=[n2,e2]),e2>=t2.length ? t2:(e2=Math.max(0,Math.min(e2,t2.length)),(n2=Math.max(0,Math.min(n2,t2.length)))-e2>3 ? t2.substring(0,e2)+"..."+t2.substring(n2):t2)),e=(t2)=>/^\d+$/.test(t2),n=/^(?=.*\d)(?=.*[a-z])(?=.*[A-Z])(?=.*[!@#$%^&*()_+])[\da-zA-Z]{8,}$/,o=(t2)=>t2<=11 ? Math.random().toString(36).substring(2,2+t2).padEnd(t2,"0"):o(11)+o(t2-11),r=({el:t2,str:e2="hello world",speed:n2=100,isExtendStr:o2=true,onDone:r2})=>{let s2=0,a2=null;t2.textContent&&o2&&(s2=t2.textContent.length,e2=t2.textContent+e2);const i2=()=>{clearTimeout(a2);const o3=e2.substring(0,s2+1);t2.textContent=o3,s2++,s2!==e2.length ? a2=setTimeout(i2,n2):r2&&r2();};i2();},s=()=>/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent),a=async(t2,e2)=>{const n2=(t3,e3)=>{const n3=window.URL.createObjectURL(t3),o2=document.createElement("a");o2.href=n3,o2.download=encodeURIComponent(e3),document.body.appendChild(o2),o2.click(),document.body.removeChild(o2),window.URL.revokeObjectURL(n3);};try{if("string"==typeof t2){const o2=await fetch(t2);if(!o2.ok)throw new Error(`Network response was not ok:${o2.statusText}`);n2(await o2.blob(),e2);}else n2(t2,e2);}catch(t3){console.error("文件下载失败:",t3 instanceof Error ? t3.message:String(t3));}},i=(t2,e2)=>{t2.toString().startsWith("2")? e2.onSuccess&&e2.onSuccess():(t2.toString().startsWith("4")||t2.toString().startsWith("5"))&&e2.onFail&&e2.onFail();},l=(t2)=>{const e2=t2.getBoundingClientRect();return{x:e2.left+e2.width/2,y:e2.top+e2.height/2};},c=(t2,e2,n2)=>{const o2=new IntersectionObserver(e2,n2);t2 instanceof HTMLElement ? o2.observe(t2):t2.forEach((t3)=>o2.observe(t3));},u=(t2)=>{const e2=Math.floor(t2/3600),n2=Math.floor(t2%3600/60),o2=Math.floor(t2%60),r2=(t3)=>t3.toString().padStart(2,"0");return(e2>0 ? `${r2(e2)}:${r2(n2)}:${r2(o2)}`:`${r2(n2)}:${r2(o2)}`)+(t2<10 ? ".00":t2<100 ? ".0":"");},d=(t2)=>{if(t2.length<2)return t2;const e2=t2[0],n2=t2.slice(1).filter((t3)=>t3<=e2),o2=t2.slice(1).filter((t3)=>t3>e2);return [...d(n2),e2,...d(o2)];},h=(t2,e2)=>{const n2=["B","KB","MB","GB","TB"],o2=1024;let r2=n2.indexOf((e2==null ? void 0:e2.unit)?? "B");if(-1===r2)throw new Error("Invalid unit");if(!(e2==null ? void 0:e2.unit))for(;t2/Math.pow(o2,r2)>=o2;)r2++;return `${(t2/Math.pow(o2,r2)).toFixed((e2==null ? void 0:e2.decimalPlaces)?? 0)}${n2[r2]}`;},g=(t2,e2)=>`${Math.floor(t2/f(t2,e2))}:${Math.floor(e2/f(t2,e2))}`,f=(t2,e2)=>{for(;0!==e2;){const n2=e2;e2=t2%e2,t2=n2;}return t2;},m=(t2,e2,n2)=>{t2.muted=true,t2.play();const o2=new AudioContext(),r2="running"===o2.state;o2.close(),r2 ?(t2.muted=false,e2==null ? void 0:e2()):n2==null ? void 0:n2();},p=(t2)=>new URLSearchParams(window.location.search).get(t2),w=(t2)=>{let e2;const n2=new Proxy(t2,{construct:(t3,n3)=>(e2||(e2=Reflect.construct(t3,n3)),e2)});return n2.prototype.construct=n2,n2;},b=(t2)=>"string"!=typeof t2||0===t2.length ? "":t2.charAt(0).toUpperCase()+t2.slice(1),y=(t2)=>{if("object"!=typeof t2||null===t2)return t2;const e2=Array.isArray(t2)? []:{};for(const n2 in t2)Object.prototype.hasOwnProperty.call(t2,n2)&&(e2[n2]=y(t2[n2]));return e2;},S=(t2)=>new Promise((e2)=>{const n2=new Image();n2.src="string"==typeof t2 ? t2:URL.createObjectURL(t2),n2.onload=()=>e2({width:n2.width,height:n2.height});}),x=(t2,e2)=>{let n2=0;const o2=(r2)=>{n2||(n2=r2),r2-n2>=e2 ? t2():requestAnimationFrame(o2);};requestAnimationFrame(o2);},M=(t2,e2,n2)=>{const o2=t2[e2];t2[e2]=function(t3){o2&&"function"==typeof o2&&o2.call(this,t3),n2.call(this,t3);};},C=(t2)=>{if("number"!=typeof t2||isNaN(t2))throw new Error("请输入有效的数字");const e2=t2.toString().split(".");return e2[0]=e2[0].replace(/\B(?=(\d{3})+(?!\d))/g,","),e2.join(".");},O=(t2)=>parseFloat(t2.replace(/[^0-9.]/g,"")),T=(t2,e2,n2,o2)=>Math.sqrt((t2-n2)**2+(e2-o2)**2),E=(t2)=>navigator.clipboard.writeText(t2),A=(t2)=>Math.ceil((t2.getTime()-new Date(t2.getFullYear(),0,1).getTime())/864e5),I=(t2,e2,n2)=>0.2126*t2+0.7152*e2+0.0722*n2,P=(t2)=>{const e2={};return t2.replace(/([^?=&]+)=([^&]+)/g,(t3,n2,o2)=>e2[n2]=o2),e2;},$=(t2,...e2)=>Object.fromEntries(Object.entries(t2).filter(([t3])=>e2.includes(t3))),v=(t2)=>{if(!t2)return "";const e2=t2.lastIndexOf(".");return-1===e2 ? v(t2.substring(t2.lastIndexOf("/")+1)):t2.substring(0,e2);},F=(t2)=>{if(!t2)return "";const e2=t2.lastIndexOf(".");return t2.substring(e2+1);},R=(t2,e2)=>{let n2=null;return(...o2)=>{n2&&clearTimeout(n2),n2=setTimeout(()=>{t2(...o2),n2=null;},e2);};};function k(t2,e2,n2={}){let o2,r2=null,s2=null,a2=0;const i2=false!==n2.leading,l2=false!==n2.trailing;function c2(){s2&&(t2.apply(o2,s2),s2=null);}function u2(){const t3=Date.now();t3-a2>=e2 ?(l2&&s2&&c2(),r2=null):r2=setTimeout(u2,e2-(t3-a2));}const d2=function(...t3){const n3=Date.now();s2=t3,o2=this,n3-a2>=e2 ? r2||(a2=n3,i2 ? c2():l2&&(r2=setTimeout(u2,e2))):!r2&&l2&&(r2=setTimeout(u2,e2-(n3-a2)));};return d2.cancel=function(){r2&&(clearTimeout(r2),r2=null),a2=0,s2=null;},d2;}const B={addCommasToNumber:C,addEventWithOriginHandler:M,calculateAspectRatio:g,checkDeviceIsMobile:s,checkStatusCode:i,copy2Clipboard:E,createIntersectionObserver:c,dayOfYear:A,deepCopy:y,downloadFile:a,formatFileSize:h,formatSecondes:u,getElementCenterPosition:l,getFileName:v,getFileSuffix:F,getImageSIze:S,getPointDistance:T,getURLSearchParams:p,grayColor:I,mediaAutoplayPolicies:m,parseQuery:P,passwordStrength:n,pick:$,printStr:r,pureNumber:O,quickSort:d,rafTimeout:x,randomString:o,safeCapitalizeWord:b,singleton:w,throttle:k,debounce:R,ellipsisString:t,isPureNumber:e};export{P as A,n as B,$ as C,r as D,d as E,x as F,o as G,b as H,w as I,C as a,M as b,g as c,s as d,i as e,B as f,l as g,E as h,c as i,A as j,R as k,y as l,a as m,t as n,h as o,O as p,u as q,v as r,F as s,k as t,S as u,T as v,p as w,I as x,e as y,m as z};
|
package/dist/es/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{u}from "./useClickOutSide.tsx-CMvd2uTW.js";import{u as u2}from "./useCountdown.tsx-Btzj-keH.js";import{u as u3}from "./useEventListener.tsx-BBGVcI5T.js";import{u as u4}from "./useGetElementSize.tsx-Dtshth0Y.js";import{u as u5}from "./useKeyPress.tsx-Db44HXXz.js";import{u as u6}from "./useMouseClick.tsx-C7uAH4n4.js";import{u as u7}from "./useTheme.tsx-C5b7BRYz.js";import{u as u8}from "./useThemePro.tsx-DQuSI8J7.js";import{a,c}from "./colorUtils.ts-DYuRvCXZ.js";import{a as a2,b,c as c2,d,e,f,h,i,j,k,l,m,n,o,g,
|
|
1
|
+
import{u}from "./useClickOutSide.tsx-CMvd2uTW.js";import{u as u2}from "./useCountdown.tsx-Btzj-keH.js";import{u as u3}from "./useEventListener.tsx-BBGVcI5T.js";import{u as u4}from "./useGetElementSize.tsx-Dtshth0Y.js";import{u as u5}from "./useKeyPress.tsx-Db44HXXz.js";import{u as u6}from "./useMouseClick.tsx-C7uAH4n4.js";import{u as u7}from "./useTheme.tsx-C5b7BRYz.js";import{u as u8}from "./useThemePro.tsx-DQuSI8J7.js";import{a,c}from "./colorUtils.ts-DYuRvCXZ.js";import{a as a2,b,c as c2,d,e,f,h,i,j,k,l,m,n,o,q,g,r,s,u as u9,v,w,x,y,z,A,B,C,D,p,E,F,G,H,I,t}from "./common.ts-BbDnZ7vC.js";import{b as b2,a as a3,c as c3,d as d2,f as f2,e as e2,u as u10,g as g2,h as h2}from "./fileFormatConversion.ts-tUlewYon.js";import{c as c4,f as f3,l as l2,s as s2}from "./formatTimeUtils.ts-CkdWJ_Sl.js";import{c as c5}from "./event-CtX9rswE.js";import{A as A2,D as D2}from "./AutoSliderList-tkaOmfnx.js";import{A as A3}from "./AvatarCrop-DrA-SARP.js";import{A as A4,L}from "./List-UAKCMuGC.js";import{B as B2}from "./Button-QIC7QPK9.js";import{C as C2}from "./Card3D-DMvCSUhe.js";import{C as C3}from "./Checkbox-daBabj14.js";import{E as E2,c as c6}from "./VirtualList-BAiIymCF.js";import{i as i2}from "./InjunctiveBox-DUNoNHCO.js";import{M}from "./MenuButton-DHkU5Bq7.js";import{m as m2}from "./Message-BGDILiLc.js";import{M as M2}from "./Modal-D2289ZPX.js";import{O,a as a4}from "./Input-DLOeg2pz.js";import{O as O2}from "./Select-B11NvK-I.js";import{P}from "./Pagination-m71H2tfS.js";import{p as p2}from "./PortalRenderer-CDAzQJgm.js";import{R,a as a5}from "./Radio-D_GKVoOC.js";import{S}from "./ScrollableTabs--449B73p.js";import{S as S2}from "./SvgImg-CZwq2D7J.js";import{S as S3}from "./Switch-C61q7rR5.js";import{T}from "./TemplateDialog-CAimG5cv.js";import{t as t2}from "./Toast-CQEsbqUJ.js";import{T as T2}from "./Tooltip-CgttMIcX.js";import{W}from "./Waterfall-C7SWCxJ1.js";export{A2 as AutoSliderList,A3 as AvatarCrop,A4 as AwaitList,B2 as Button,C2 as Card3D,C3 as Checkbox,D2 as Direction,E2 as EstimatedVirtualList,L as List,M as MenuButton,M2 as Modal,O as OnoInput,O2 as OnoSelect,a4 as OnoTextarea,P as Pagination,R as Radio,a5 as RadioGroup,S as ScrollableTabs,S2 as SvgImg,S3 as Switch,T as TemplateDialog,T2 as Tooltip,W as Waterfall,a2 as addCommasToNumber,b as addEventWithOriginHandler,a as adjustingColors,b2 as base64ToBlob,a3 as base64ToFile,c3 as blobToBase64,d2 as blobToFile,c2 as calculateAspectRatio,d as checkDeviceIsMobile,e as checkStatusCode,c as colorUtils,f as common,c4 as convertSecondToOtherTime,h as copy2Clipboard,c6 as createDataSource,c5 as createEventEmitter,i as createIntersectionObserver,j as dayOfYear,k as debounce,l as deepCopy,m as downloadFile,n as ellipsisString,f2 as fileToBase64,e2 as fileToBlob,o as formatFileSize,q as formatSecondes,f3 as formatTime,g as getElementCenterPosition,r as getFileName,s as getFileSuffix,u9 as getImageSIze,v as getPointDistance,w as getURLSearchParams,x as grayColor,i2 as injunctiveBox,y as isPureNumber,l2 as localFormat,z as mediaAutoplayPolicies,m2 as message,A as parseQuery,B as passwordStrength,C as pick,p2 as portalRenderer,D as printStr,p as pureNumber,E as quickSort,F as rafTimeout,G as randomString,H as safeCapitalizeWord,s2 as second2Day,I as singleton,t as throttle,t2 as toast,u10 as urlToBase64,g2 as urlToBlob,h2 as urlToFile,u as useClickOutSide,u2 as useCountdown,u3 as useEventListener,u4 as useGetElementSize,u5 as useKeyPress,u6 as useMouseClick,u7 as useTheme,u8 as useThemePro};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.ono-auto-slider-list-container{align-items:center;display:flex;list-style:none;position:relative;width:fit-content}.ono-auto-slider-list-container .ono-auto-slider-list-slider{background:#ccc;left:0;position:absolute;top:0;transform-origin:top left;z-index:0}.ono-auto-slider-list-is-disable{cursor:not-allowed}
|
|
1
|
+
.ono-auto-slider-list-container{align-items:center;display:flex;list-style:none;position:relative;width:fit-content}.ono-auto-slider-list-container .ono-auto-slider-list-slider{background:#ccc;left:0;position:absolute;top:0;transform-origin:top left;z-index:0}.ono-auto-slider-list-is-disable{cursor:not-allowed}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.ono-avatar-canvas{aspect-ratio:1;overflow:hidden;position:relative}.ono-avatar-canvas .ono-avatar-mask{align-items:center;display:flex;height:100%;justify-content:center;left:0;pointer-events:none;position:absolute;top:0;width:100%}
|
|
1
|
+
.ono-avatar-canvas{aspect-ratio:1;overflow:hidden;position:relative}.ono-avatar-canvas .ono-avatar-mask{align-items:center;display:flex;height:100%;justify-content:center;left:0;pointer-events:none;position:absolute;top:0;width:100%}
|
package/dist/style/Button.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.ono-btn-danger,.ono-btn-default,.ono-btn-info,.ono-btn-primary,.ono-btn-success,.ono-btn-warning{--btn-width:0;--btn-height:0;--delay
|
|
1
|
+
.ono-btn-danger,.ono-btn-default,.ono-btn-info,.ono-btn-primary,.ono-btn-success,.ono-btn-warning{--btn-width:0;--btn-height:0;--delay:.3s;align-items:center;border:none;border-radius:4px;color:#fff;display:flex;font-size:16px;gap:0;justify-content:center;outline:none;padding:2px 15px;transition:gap .3s ease-in-out;-webkit-user-select:none;user-select:none;white-space:nowrap;width:fit-content}.ono-btn-danger:hover,.ono-btn-default:hover,.ono-btn-info:hover,.ono-btn-primary:hover,.ono-btn-success:hover,.ono-btn-warning:hover{opacity:.9}.ono-btn-danger:focus,.ono-btn-default:focus,.ono-btn-info:focus,.ono-btn-primary:focus,.ono-btn-success:focus,.ono-btn-warning:focus{outline:none}.ono-btn-danger:active,.ono-btn-default:active,.ono-btn-info:active,.ono-btn-primary:active,.ono-btn-success:active,.ono-btn-warning:active{opacity:1}.ono-btn-default{background-color:transparent;border:1px solid #333;color:#333}.ono-btn-primary{background-color:#409eff}.ono-btn-success{background-color:#67c23a}.ono-btn-warning{background-color:#e6a23c}.ono-btn-danger{background-color:#f56c6c}.ono-btn-info{background-color:#909399}.ono-is-plain.ono-btn-primary{background-color:#ecf5ff;border:1px solid #a0cfff;color:#409eff}.ono-is-plain.ono-btn-primary:hover{background-color:#409eff;border-color:#409eff;color:#fff}.ono-is-plain.ono-btn-success{background-color:#f0f9eb;border:1px solid #b3e19d;color:#67c23a}.ono-is-plain.ono-btn-success:hover{background-color:#67c23a;border-color:#67c23a;color:#fff}.ono-is-plain.ono-btn-warning{background-color:#fdf6ec;border:1px solid #f3d19e;color:#e6a23c}.ono-is-plain.ono-btn-warning:hover{background-color:#e6a23c;border-color:#e6a23c;color:#fff}.ono-is-plain.ono-btn-danger{background-color:#fef0f0;border:1px solid #fab6b6;color:#f56c6c}.ono-is-plain.ono-btn-danger:hover{background-color:#f56c6c;border-color:#f56c6c;color:#fff}.ono-is-plain.ono-btn-info{background-color:#f4f4f5;border:1px solid #c8c9cc;color:#909399}.ono-is-plain.ono-btn-info:hover{background-color:#909399;border-color:#909399;color:#fff}.ono-is-loading{opacity:.7}.ono-is-loading .ono-btn-icon{display:grid;grid-template-columns:0fr}.ono-is-round{border-radius:calc(var(--btn-height)/2)}.ono-is-icon{gap:8px}.ono-is-circle{border-radius:50%}.ono-btn-is-disabled{cursor:not-allowed!important;opacity:.5}.ono-btn-icon span{overflow:hidden}.ono-loading-start{animation:ono-loading 1s linear infinite,ono-button-start var(--delay) ease-in-out forwards}.ono-loading-end{animation:ono-loading 1s linear infinite,ono-button-end var(--delay) ease-in-out forwards}@keyframes ono-button-start{0%{grid-template-columns:0fr}to{grid-template-columns:1fr}}@keyframes ono-button-end{0%{grid-template-columns:1fr}to{grid-template-columns:0fr}}
|
package/dist/style/Card3D.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.ono-card{overflow:hidden;transition:all .3s linear,width 0s,height 0s}.ono-card:hover{box-shadow:var(--sd)}
|
|
1
|
+
.ono-card{overflow:hidden;transition:all .3s linear,width 0s,height 0s}.ono-card:hover{box-shadow:var(--sd)}
|
package/dist/style/Checkbox.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.ono-checkbox-border,.ono-checkbox-line{--border-color:#333;-webkit-appearance:none;-moz-appearance:none;appearance:none;background:transparent;border:1px solid var(--border-color);height:20px;outline:none;position:relative;transition:background .1s,border .1s;width:20px}.ono-checkbox-border:checked,.ono-checkbox-line:checked{background:var(--checkedColor)}.ono-checkbox-border:checked:after,.ono-checkbox-line:checked:after{border:calc(var(--w)/8) solid #fff;border-right:none;border-top:none;content:"";height:calc(var(--w)/8*3);left:50%;position:absolute;top:50%;transform:translate(-50%,calc(-50% - var(--w)/24*3)) rotate(-45deg);width:calc(var(--w)/3*2)}.ono-checkbox-border:indeterminate,.ono-checkbox-line:indeterminate{background:var(--indeterminateColor)}.ono-checkbox-border:indeterminate:after,.ono-checkbox-line:indeterminate:after{background:#fff;border-radius:calc(var(--w)/10);content:"";height:calc(var(--w)/7);left:50%;position:absolute;top:50%;transform:translate(-50%,-50%);width:calc(var(--w)/5*3.5)}.ono-checkbox-border:indeterminate:after{background:transparent;border:calc(var(--w)/8) solid #fff;content:"";height:100%;width:100%}
|
|
1
|
+
.ono-checkbox-border,.ono-checkbox-line{--border-color:#333;-webkit-appearance:none;-moz-appearance:none;appearance:none;background:transparent;border:1px solid var(--border-color);height:20px;outline:none;position:relative;transition:background .1s,border .1s;width:20px}.ono-checkbox-border:checked,.ono-checkbox-line:checked{background:var(--checkedColor)}.ono-checkbox-border:checked:after,.ono-checkbox-line:checked:after{border:calc(var(--w)/8) solid #fff;border-right:none;border-top:none;content:"";height:calc(var(--w)/8*3);left:50%;position:absolute;top:50%;transform:translate(-50%,calc(-50% - var(--w)/24*3)) rotate(-45deg);width:calc(var(--w)/3*2)}.ono-checkbox-border:indeterminate,.ono-checkbox-line:indeterminate{background:var(--indeterminateColor)}.ono-checkbox-border:indeterminate:after,.ono-checkbox-line:indeterminate:after{background:#fff;border-radius:calc(var(--w)/10);content:"";height:calc(var(--w)/7);left:50%;position:absolute;top:50%;transform:translate(-50%,-50%);width:calc(var(--w)/5*3.5)}.ono-checkbox-border:indeterminate:after{background:transparent;border:calc(var(--w)/8) solid #fff;content:"";height:100%;width:100%}
|
package/dist/style/Input.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.ono-input,.ono-textarea .ono-textarea-wrapper{align-items:center;border-radius:6px;color:#333;display:flex;font-size:16px;line-height:24px;overflow:hidden}.ono-input input[type=password],.ono-textarea .ono-textarea-wrapper input[type=password]{background-color:transparent;border:none;font-family:inherit;font-size:inherit;margin:0;outline:none;padding:0}.ono-input input[type=password]::-ms-clear,.ono-input input[type=password]::-ms-reveal,.ono-textarea .ono-textarea-wrapper input[type=password]::-ms-clear,.ono-textarea .ono-textarea-wrapper input[type=password]::-ms-reveal{display:none}.ono-input input[type=password]::-webkit-inner-spin-button,.ono-input input[type=password]::-webkit-outer-spin-button,.ono-textarea .ono-textarea-wrapper input[type=password]::-webkit-inner-spin-button,.ono-textarea .ono-textarea-wrapper input[type=password]::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}.ono-input .ono-prepend,.ono-textarea .ono-textarea-wrapper .ono-prepend{background:#d9d9d9;border:1px solid #999;border-radius:6px 0 0 6px;border-right:none;color:inherit;flex-shrink:0;font-size:inherit;line-height:inherit;padding:4px 12px}.ono-input .ono-input-wrapper,.ono-textarea .ono-textarea-wrapper .ono-input-wrapper{align-items:center;background:#f5f5f5;color:inherit;cursor:text;display:flex;font-size:inherit;gap:4px;line-height:inherit;outline:none;padding:4px 12px;width:100%}.ono-input .ono-input-wrapper .ono-append,.ono-textarea .ono-textarea-wrapper .ono-input-wrapper .ono-append{align-items:center;color:inherit;display:flex;flex-shrink:0;font-size:inherit;justify-content:center;line-height:inherit}.ono-input .ono-input-wrapper .ono-input-inner,.ono-textarea .ono-textarea-wrapper .ono-input-wrapper .ono-input-inner{background:transparent;border:none;color:inherit;cursor:inherit;flex:1;font-size:inherit;line-height:inherit;outline:none}.ono-input .ono-input-wrapper .ono-suffix,.ono-textarea .ono-textarea-wrapper .ono-input-wrapper .ono-suffix{align-items:center;color:inherit;display:flex;flex-shrink:0;font-size:inherit;gap:8px;justify-content:center;line-height:inherit}.ono-input .ono-input-wrapper .ono-suffix .ono-clear-icon,.ono-textarea .ono-textarea-wrapper .ono-input-wrapper .ono-suffix .ono-clear-icon{cursor:pointer;height:12px;width:12px}.ono-input .ono-input-wrapper .ono-suffix .ono-clear-icon .ono-input-icon,.ono-textarea .ono-textarea-wrapper .ono-input-wrapper .ono-suffix .ono-clear-icon .ono-input-icon{color:#999;height:100%;transition:color .3s;width:100%}.ono-input .ono-input-wrapper .ono-suffix .ono-clear-icon .ono-input-icon:hover,.ono-textarea .ono-textarea-wrapper .ono-input-wrapper .ono-suffix .ono-clear-icon .ono-input-icon:hover{color:#666}.ono-input .ono-input-wrapper .ono-suffix .ono-eye-icon,.ono-textarea .ono-textarea-wrapper .ono-input-wrapper .ono-suffix .ono-eye-icon{cursor:pointer;height:16px;width:16px}.ono-input .ono-input-wrapper .ono-suffix .ono-eye-icon .icon,.ono-textarea .ono-textarea-wrapper .ono-input-wrapper .ono-suffix .ono-eye-icon .icon{color:#999;height:100%;transition:color .3s;width:100%}.ono-input .ono-input-wrapper .ono-suffix .ono-eye-icon .icon:hover,.ono-textarea .ono-textarea-wrapper .ono-input-wrapper .ono-suffix .ono-eye-icon .icon:hover{color:#333}.ono-input .ono-input-wrapper .ono-suffix .ono-count,.ono-textarea .ono-textarea-wrapper .ono-input-wrapper .ono-suffix .ono-count{color:#999;font-size:inherit;line-height:inherit}.ono-input .ono-append,.ono-textarea .ono-textarea-wrapper .ono-append{background:#d9d9d9;border:1px solid #999;border-left:none;border-radius:0 6px 6px 0;color:inherit;flex-shrink:0;font-size:inherit;line-height:inherit;padding:4px 12px}.ono-textarea{display:flex;flex-direction:column;gap:4px;width:100%}.ono-textarea .ono-textarea-wrapper{background:#f5f5f5;border:1px solid #999;display:initial;flex-shrink:0;min-height:100%;outline:none;padding:0;width:100%}.ono-textarea .ono-textarea-wrapper .ono-textarea-inner{background:none;border:none;border-radius:inherit;color:inherit;display:initial;font-size:inherit;height:100%;line-height:inherit;outline:none;overflow:initial;padding:4px 12px;width:100%}.ono-textarea .ono-count-bar{color:#999;font-size:16px;line-height:24px;text-align:right;width:100%}.ono-input-border .ono-input-wrapper{border:1px solid #999;border-radius:inherit}.ono-input-border:has(.ono-prepend) .ono-input-wrapper{border-bottom-left-radius:0;border-top-left-radius:0}.ono-input-border:has(.ono-append) .ono-input-wrapper{border-bottom-right-radius:0;border-top-right-radius:0}.ono-scrollbar{scrollbar-width:none}.ono-scrollbar::-webkit-scrollbar{width:0}.ono-input-is-focus{border:var(--ono-input-border)!important;box-shadow:var(--ono-input-box-shadow)}.ono-input-is-disabled{background:#d9d9d9;color:#999;cursor:not-allowed;user-select:none}.ono-input-is-disabled .ono-input-wrapper,.ono-input-is-disabled .ono-textarea-wrapper{pointer-events:none}
|
|
1
|
+
.ono-input,.ono-textarea .ono-textarea-wrapper{align-items:center;border-radius:6px;color:#333;display:flex;font-size:16px;line-height:24px;overflow:hidden}.ono-input input[type=password],.ono-textarea .ono-textarea-wrapper input[type=password]{background-color:transparent;border:none;font-family:inherit;font-size:inherit;margin:0;outline:none;padding:0}.ono-input input[type=password]::-ms-clear,.ono-input input[type=password]::-ms-reveal,.ono-textarea .ono-textarea-wrapper input[type=password]::-ms-clear,.ono-textarea .ono-textarea-wrapper input[type=password]::-ms-reveal{display:none}.ono-input input[type=password]::-webkit-inner-spin-button,.ono-input input[type=password]::-webkit-outer-spin-button,.ono-textarea .ono-textarea-wrapper input[type=password]::-webkit-inner-spin-button,.ono-textarea .ono-textarea-wrapper input[type=password]::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}.ono-input .ono-prepend,.ono-textarea .ono-textarea-wrapper .ono-prepend{background:#d9d9d9;border:1px solid #999;border-radius:6px 0 0 6px;border-right:none;color:inherit;flex-shrink:0;font-size:inherit;line-height:inherit;padding:4px 12px}.ono-input .ono-input-wrapper,.ono-textarea .ono-textarea-wrapper .ono-input-wrapper{align-items:center;background:#f5f5f5;color:inherit;cursor:text;display:flex;font-size:inherit;gap:4px;line-height:inherit;outline:none;padding:4px 12px;width:100%}.ono-input .ono-input-wrapper .ono-append,.ono-textarea .ono-textarea-wrapper .ono-input-wrapper .ono-append{align-items:center;color:inherit;display:flex;flex-shrink:0;font-size:inherit;justify-content:center;line-height:inherit}.ono-input .ono-input-wrapper .ono-input-inner,.ono-textarea .ono-textarea-wrapper .ono-input-wrapper .ono-input-inner{background:transparent;border:none;color:inherit;cursor:inherit;flex:1;font-size:inherit;line-height:inherit;outline:none}.ono-input .ono-input-wrapper .ono-suffix,.ono-textarea .ono-textarea-wrapper .ono-input-wrapper .ono-suffix{align-items:center;color:inherit;display:flex;flex-shrink:0;font-size:inherit;gap:8px;justify-content:center;line-height:inherit}.ono-input .ono-input-wrapper .ono-suffix .ono-clear-icon,.ono-textarea .ono-textarea-wrapper .ono-input-wrapper .ono-suffix .ono-clear-icon{cursor:pointer;height:12px;width:12px}.ono-input .ono-input-wrapper .ono-suffix .ono-clear-icon .ono-input-icon,.ono-textarea .ono-textarea-wrapper .ono-input-wrapper .ono-suffix .ono-clear-icon .ono-input-icon{color:#999;height:100%;transition:color .3s;width:100%}.ono-input .ono-input-wrapper .ono-suffix .ono-clear-icon .ono-input-icon:hover,.ono-textarea .ono-textarea-wrapper .ono-input-wrapper .ono-suffix .ono-clear-icon .ono-input-icon:hover{color:#666}.ono-input .ono-input-wrapper .ono-suffix .ono-eye-icon,.ono-textarea .ono-textarea-wrapper .ono-input-wrapper .ono-suffix .ono-eye-icon{cursor:pointer;height:16px;width:16px}.ono-input .ono-input-wrapper .ono-suffix .ono-eye-icon .icon,.ono-textarea .ono-textarea-wrapper .ono-input-wrapper .ono-suffix .ono-eye-icon .icon{color:#999;height:100%;transition:color .3s;width:100%}.ono-input .ono-input-wrapper .ono-suffix .ono-eye-icon .icon:hover,.ono-textarea .ono-textarea-wrapper .ono-input-wrapper .ono-suffix .ono-eye-icon .icon:hover{color:#333}.ono-input .ono-input-wrapper .ono-suffix .ono-count,.ono-textarea .ono-textarea-wrapper .ono-input-wrapper .ono-suffix .ono-count{color:#999;font-size:inherit;line-height:inherit}.ono-input .ono-append,.ono-textarea .ono-textarea-wrapper .ono-append{background:#d9d9d9;border:1px solid #999;border-left:none;border-radius:0 6px 6px 0;color:inherit;flex-shrink:0;font-size:inherit;line-height:inherit;padding:4px 12px}.ono-textarea{display:flex;flex-direction:column;gap:4px;width:100%}.ono-textarea .ono-textarea-wrapper{background:#f5f5f5;border:1px solid #999;display:initial;flex-shrink:0;min-height:100%;outline:none;padding:0;width:100%}.ono-textarea .ono-textarea-wrapper .ono-textarea-inner{background:none;border:none;border-radius:inherit;color:inherit;display:initial;font-size:inherit;height:100%;line-height:inherit;outline:none;overflow:initial;padding:4px 12px;width:100%}.ono-textarea .ono-count-bar{color:#999;font-size:16px;line-height:24px;text-align:right;width:100%}.ono-input-border .ono-input-wrapper{border:1px solid #999;border-radius:inherit}.ono-input-border:has(.ono-prepend) .ono-input-wrapper{border-bottom-left-radius:0;border-top-left-radius:0}.ono-input-border:has(.ono-append) .ono-input-wrapper{border-bottom-right-radius:0;border-top-right-radius:0}.ono-scrollbar{scrollbar-width:none}.ono-scrollbar::-webkit-scrollbar{width:0}.ono-input-is-focus{border:var(--ono-input-border)!important;box-shadow:var(--ono-input-box-shadow)}.ono-input-is-disabled{background:#d9d9d9;color:#999;cursor:not-allowed;-webkit-user-select:none;user-select:none}.ono-input-is-disabled .ono-input-wrapper,.ono-input-is-disabled .ono-textarea-wrapper{pointer-events:none}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.ono-menu-button{align-items:center;border:none;cursor:pointer;display:flex;flex-direction:column;justify-content:center;margin:0;outline:none;overflow:hidden;padding:0;position:relative;z-index:10}.ono-menu-button span{position:absolute}
|
|
1
|
+
.ono-menu-button{align-items:center;border:none;cursor:pointer;display:flex;flex-direction:column;justify-content:center;margin:0;outline:none;overflow:hidden;padding:0;position:relative;z-index:10}.ono-menu-button span{position:absolute}
|
package/dist/style/Message.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.ono-message{align-items:center;background:#fff;border-radius:6px;box-shadow:0 4px 8px
|
|
1
|
+
.ono-message{align-items:center;background:#fff;border-radius:6px;box-shadow:0 4px 8px #0003;color:#333;display:flex;font-size:16px;gap:8px;left:50%;line-height:24px;padding:8px;position:fixed;top:0;transform-origin:top left}.ono-message .ono-type-icon{height:20px;width:20px}.ono-info-icon{height:18px;width:18px}.ono-message-enter{animation:ono-message-enter var(--speed) ease-in-out forwards}.ono-message-leave{animation:ono-message-leave var(--speed) ease-in-out forwards;pointer-events:none}.ono-message-success.ono-message-color{background:#f6ffed;border:1px solid #d9f7be;color:#52c41a}.ono-message-warning.ono-message-color{background:#fffbe6;border:1px solid #fff1b8;color:#faad14}.ono-message-error.ono-message-color{background:#fff1f0;border:1px solid #ffccc7;color:#ff4d4f}.ono-message-info.ono-message-color{background:#f5f5f5;border:1px solid #f0f0f0;color:#8c8c8c}.ono-clear-icon{color:#999;height:16px;width:16px}.ono-loading{animation:ono-loading 1s linear infinite}@keyframes ono-message-enter{0%{opacity:0}to{opacity:1}}@keyframes ono-message-leave{0%{opacity:1}to{opacity:0}}
|
package/dist/style/Modal.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.ono-modal{--width:416px;--color:#333;--themeColor:#5644b8;--themeHoverColor:#8676de;--themeActiveColor:#352494;--themeDisabledClr:#9587e7;background:transparent}.ono-modal-box{--top:0;--left:0;background:#fff;border-radius:6px;color:var(--color);display:flex;flex-direction:column;gap:12px;left:50%;padding:24px;position:fixed;top:50%;transform:translate(-50%,-50%);width:var(--width)}.ono-modal-box-body{display:flex}.ono-modal-box-body-contentBar{align-items:start;display:flex;flex-direction:column;gap:8px;justify-content:start}.ono-modal-box-body-contentBar-title{font-weight:600;line-height:24px}.ono-modal-box-body-contentBar-content{font-size:14px;line-height:22px}.ono-modal-box-footer{align-items:center;display:flex;gap:16px;justify-content:start;margin-left:auto}.ono-modal-box-footer .ono-modal-box-footer-cancelBtn,.ono-modal-box-footer .ono-modal-box-footer-confirmBtn{border-radius:6px;padding:4px 16px;transition:all .2s ease-in-out}.ono-modal-box-footer-cancelBtn{background:#fff;border:1px solid #ccc;color:#333}.ono-modal-box-footer-cancelBtn:hover{border:1px solid var(--themeHoverColor);color:var(--themeHoverColor)}.ono-modal-box-footer-cancelBtn:active{border:1px solid var(--themeActiveColor);color:var(--themeActiveColor)}.ono-modal-box-footer-cancelBtn:disabled{border:1px solid #ccc;color:#ccc;cursor:no-drop}.ono-modal-box-footer-confirmBtn{background:var(--themeColor);border:none;color:#f5f5f5;gap:8px}.ono-modal-box-footer-confirmBtn-loading{animation:ono-loading 1s linear infinite;height:16px;width:16px}.ono-modal-box-footer-confirmBtn:hover{background:var(--themeHoverColor)}.ono-modal-box-footer-confirmBtn:active{background:var(--themeActiveColor)}.ono-modal-box-footer-confirmBtn:disabled{background:var(--themeDisabledClr);cursor:no-drop}.ono-modal::backdrop{backdrop-filter:blur(5px);
|
|
1
|
+
.ono-modal{--width:416px;--color:#333;--themeColor:#5644b8;--themeHoverColor:#8676de;--themeActiveColor:#352494;--themeDisabledClr:#9587e7;background:transparent}.ono-modal-box{--top:0;--left:0;background:#fff;border-radius:6px;color:var(--color);display:flex;flex-direction:column;gap:12px;left:50%;padding:24px;position:fixed;top:50%;transform:translate(-50%,-50%);width:var(--width)}.ono-modal-box-body{display:flex}.ono-modal-box-body-contentBar{align-items:start;display:flex;flex-direction:column;gap:8px;justify-content:start}.ono-modal-box-body-contentBar-title{font-weight:600;line-height:24px}.ono-modal-box-body-contentBar-content{font-size:14px;line-height:22px}.ono-modal-box-footer{align-items:center;display:flex;gap:16px;justify-content:start;margin-left:auto}.ono-modal-box-footer .ono-modal-box-footer-cancelBtn,.ono-modal-box-footer .ono-modal-box-footer-confirmBtn{border-radius:6px;padding:4px 16px;transition:all .2s ease-in-out}.ono-modal-box-footer-cancelBtn{background:#fff;border:1px solid #ccc;color:#333}.ono-modal-box-footer-cancelBtn:hover{border:1px solid var(--themeHoverColor);color:var(--themeHoverColor)}.ono-modal-box-footer-cancelBtn:active{border:1px solid var(--themeActiveColor);color:var(--themeActiveColor)}.ono-modal-box-footer-cancelBtn:disabled{border:1px solid #ccc;color:#ccc;cursor:no-drop}.ono-modal-box-footer-confirmBtn{background:var(--themeColor);border:none;color:#f5f5f5;gap:8px}.ono-modal-box-footer-confirmBtn-loading{animation:ono-loading 1s linear infinite;height:16px;width:16px}.ono-modal-box-footer-confirmBtn:hover{background:var(--themeHoverColor)}.ono-modal-box-footer-confirmBtn:active{background:var(--themeActiveColor)}.ono-modal-box-footer-confirmBtn:disabled{background:var(--themeDisabledClr);cursor:no-drop}.ono-modal::backdrop{-webkit-backdrop-filter:blur(5px);backdrop-filter:blur(5px);background:#00000080}.ono-modal-enter{animation:ono-modal-enter .3s forwards}.ono-modal-leave{animation:ono-modal-leave .3s forwards}@keyframes ono-modal-enter{0%{left:var(--left);opacity:0;top:var(--top);transform:translate(-50%,-50%) scale(0)}to{left:50%;opacity:1;top:50%;transform:translate(-50%,-50%) scale(1)}}@keyframes ono-modal-leave{0%{left:50%;opacity:1;top:50%;transform:translate(-50%,-50%) scale(1)}to{left:var(--left);opacity:0;top:var(--top);transform:translate(-50%,-50%) scale(0)}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.ono-pagination{align-items:center;display:flex;gap:16px;justify-content:center}.ono-pagination-base,.ono-pagination-btn{cursor:pointer;list-style:none;user-select:none}.ono-pagination-btn{align-items:center;aspect-ratio:2/1;background:#ccc;display:flex;justify-content:center;padding:0 10px;width:fit-content}.ono-pagination-btn-active{background:#07c;color:#fff}
|
|
1
|
+
.ono-pagination{align-items:center;display:flex;gap:16px;justify-content:center}.ono-pagination-base,.ono-pagination-btn{cursor:pointer;list-style:none;-webkit-user-select:none;user-select:none}.ono-pagination-btn{align-items:center;aspect-ratio:2/1;background:#ccc;display:flex;justify-content:center;padding:0 10px;width:fit-content}.ono-pagination-btn-active{background:#07c;color:#fff}
|
package/dist/style/Radio.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.ono-radio-group{align-items:flex-start;display:flex;gap:4px;justify-content:flex-start;width:fit-content}.ono-radio-box{align-items:center;display:flex;gap:var(--gap);justify-content:center;width:fit-content}.ono-radio-box .ono-radio{background:var(--unCheckedColor);border:1px solid #424242;border-radius:50%;flex-shrink:0;height:var(--w);position:relative;width:var(--w)}.ono-radio-box .ono-radio input[type=radio]{height:0;opacity:0;width:0}.ono-radio-box .ono-radio:has(input[type=radio]:checked){background:var(--checkedColor)}.ono-radio-box .ono-radio:has(input[type=radio]:checked):after{background-color:#fff;border-radius:50%;content:"";height:50%;left:50%;position:absolute;top:50%;transform:translate(-50%,-50%);width:50%}
|
|
1
|
+
.ono-radio-group{align-items:flex-start;display:flex;gap:4px;justify-content:flex-start;width:fit-content}.ono-radio-box{align-items:center;display:flex;gap:var(--gap);justify-content:center;width:fit-content}.ono-radio-box .ono-radio{background:var(--unCheckedColor);border:1px solid #424242;border-radius:50%;flex-shrink:0;height:var(--w);position:relative;width:var(--w)}.ono-radio-box .ono-radio input[type=radio]{height:0;opacity:0;width:0}.ono-radio-box .ono-radio:has(input[type=radio]:checked){background:var(--checkedColor)}.ono-radio-box .ono-radio:has(input[type=radio]:checked):after{background-color:#fff;border-radius:50%;content:"";height:50%;left:50%;position:absolute;top:50%;transform:translate(-50%,-50%);width:50%}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.ono-scrollable-tabs{align-items:stretch;box-sizing:border-box;display:flex;flex-shrink:0;justify-content:flex-start;list-style:none;overflow-x:auto;scroll-behavior:smooth;scrollbar-width:none;width:100%}.ono-scrollable-tabs .ono-scrollable-tab{cursor:pointer;list-style:none}.ono-scrollable-tabs::-webkit-scrollbar{display:none}
|
|
1
|
+
.ono-scrollable-tabs{align-items:stretch;box-sizing:border-box;display:flex;flex-shrink:0;justify-content:flex-start;list-style:none;overflow-x:auto;scroll-behavior:smooth;scrollbar-width:none;width:100%}.ono-scrollable-tabs .ono-scrollable-tab{cursor:pointer;list-style:none}.ono-scrollable-tabs::-webkit-scrollbar{display:none}
|
package/dist/style/Select.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.ono-select{width:100%}.ono-select .ono-select-arrow-down-icon{color:#666;height:12px;transition:transform .2s linear;width:12px}.ono-select .ono-select-arrow-down-active{transform:rotate(180deg)}.ono-option-container{--tooltip-bg:#fff;box-shadow:0 4px 10px
|
|
1
|
+
.ono-select{width:100%}.ono-select .ono-select-arrow-down-icon{color:#666;height:12px;transition:transform .2s linear;width:12px}.ono-select .ono-select-arrow-down-active{transform:rotate(180deg)}.ono-option-container{--tooltip-bg:#fff;box-shadow:0 4px 10px #0000001a;padding:8px;z-index:9999}.ono-option-container .ono-option-item{background:transparent;border:none;display:block;margin:0;outline:none;padding:0;width:100%}.ono-option-container .ono-option-item .ono-option-item-content,.ono-option-container .ono-option-item .ono-option-item-content-no-data{border-radius:4px;color:#333;font-weight:500;overflow:hidden;padding:4px;text-align:start;text-overflow:ellipsis;white-space:nowrap;width:100%}.ono-option-container .ono-option-item .ono-option-item-content-selected{background:#e2e1f8;color:#5644b8;font-weight:600}.ono-option-container .ono-option-item .ono-option-item-content-active{background:#f0f0f0}.ono-option-container .ono-option-item .ono-option-item-content-disabled{color:#ccc;cursor:not-allowed}.ono-option-container .ono-option-item .ono-option-item-content-disabled:hover{background:transparent}.ono-option-container .ono-option-item .ono-option-item-content-no-data{color:#999}.ono-option-container .ono-option-item .ono-option-item-content-no-data:hover{background:transparent}.ono-select-readonly{cursor:pointer!important}
|
package/dist/style/SvgImg.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.ono-svg-img{--w:24px;--h:24px;--clr:#fff;height:var(--h);overflow:hidden;width:var(--w)}.ono-svg-img img{filter:drop-shadow(var(--clr) var(--w) 0);height:100%;position:relative;transform:
|
|
1
|
+
.ono-svg-img{--w:24px;--h:24px;--clr:#fff;height:var(--h);overflow:hidden;width:var(--w)}.ono-svg-img img{filter:drop-shadow(var(--clr) var(--w) 0);height:100%;position:relative;transform:translate(calc(var(--w)*-1));width:100%}
|
package/dist/style/Switch.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.ono-switch{--checkedClr:#342a7c;--uncheckedClr:rgba(0,0,0,.2)}.ono-switch input[type=checkbox]{height:0;margin:0;opacity:0;position:absolute;width:0}.ono-switch input[type=checkbox]:checked+.ono-switch-box{background-color:var(--checkedClr)}.ono-switch input[type=checkbox]:checked+.ono-switch-box:before{transform:translate(calc(var(--w) - var(--h)))}.ono-switch input[type=checkbox]:checked+.ono-switch-box>.ono-switch-children-bar{transform:translate(calc(var(--h)/8))}.ono-switch.ono-switch-is-disabled .ono-switch-box{cursor:not-allowed;opacity:.6}.ono-switch .ono-switch-box{background-color:var(--uncheckedClr);border-radius:calc(var(--h)/2);cursor:pointer;display:flex;flex-shrink:0;height:var(--h);overflow:hidden;position:relative;width:var(--w)}.ono-switch .ono-switch-box:before{aspect-ratio:1;background:#fff;border-radius:50%;content:"";display:block;left:calc(var(--h)/8);position:absolute;top:calc(var(--h)/8);transition:transform .3s;width:calc(var(--h)*3/4)}.ono-switch .ono-switch-children-bar{display:flex;position:absolute;top:calc(var(--h)/8);transform:translate(calc((var(--w) - var(--h)*9/8)*-1))}.ono-switch .ono-switch-children-bar .ono-switch-children{align-items:center;display:flex;height:calc(var(--h)/4*3);justify-content:center;min-width:fit-content;text-wrap:nowrap;width:calc(var(--w) - var(--h))}.ono-switch .ono-switch-children-bar .ono-switch-slider{aspect-ratio:1;width:calc(var(--h)*3/4)}
|
|
1
|
+
.ono-switch{--checkedClr:#342a7c;--uncheckedClr:rgba(0,0,0,.2)}.ono-switch input[type=checkbox]{height:0;margin:0;opacity:0;position:absolute;width:0}.ono-switch input[type=checkbox]:checked+.ono-switch-box{background-color:var(--checkedClr)}.ono-switch input[type=checkbox]:checked+.ono-switch-box:before{transform:translate(calc(var(--w) - var(--h)))}.ono-switch input[type=checkbox]:checked+.ono-switch-box>.ono-switch-children-bar{transform:translate(calc(var(--h)/8))}.ono-switch.ono-switch-is-disabled .ono-switch-box{cursor:not-allowed;opacity:.6}.ono-switch .ono-switch-box{background-color:var(--uncheckedClr);border-radius:calc(var(--h)/2);cursor:pointer;display:flex;flex-shrink:0;height:var(--h);overflow:hidden;position:relative;width:var(--w)}.ono-switch .ono-switch-box:before{aspect-ratio:1;background:#fff;border-radius:50%;content:"";display:block;left:calc(var(--h)/8);position:absolute;top:calc(var(--h)/8);transition:transform .3s;width:calc(var(--h)*3/4)}.ono-switch .ono-switch-children-bar{display:flex;position:absolute;top:calc(var(--h)/8);transform:translate(calc((var(--w) - var(--h)*9/8)*-1))}.ono-switch .ono-switch-children-bar .ono-switch-children{align-items:center;display:flex;height:calc(var(--h)/4*3);justify-content:center;min-width:fit-content;text-wrap:nowrap;width:calc(var(--w) - var(--h))}.ono-switch .ono-switch-children-bar .ono-switch-slider{aspect-ratio:1;width:calc(var(--h)*3/4)}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.ono-dialog-mask{height:100vh;left:0;position:fixed;top:0;width:100vw;z-index:9999}.ono-dialog-mask .ono-dialog{box-shadow:0 0 10px
|
|
1
|
+
.ono-dialog-mask{height:100vh;left:0;position:fixed;top:0;width:100vw;z-index:9999}.ono-dialog-mask .ono-dialog{box-shadow:0 0 10px #0000004d;left:50%;position:absolute;top:50%;transform:translate(-50%,-50%)}.ono-dialog-mask-enter{animation:mask-enter var(--duration) forwards}.ono-dialog-mask-leave{animation:mask-leave var(--duration) forwards}.ono-zoom-enter{animation:zoom-enter var(--duration) forwards}.ono-zoom-leave{animation:zoom-leave var(--duration) forwards}.ono-fade-enter{animation:fade-enter var(--duration) forwards}.ono-fade-leave{animation:fade-leave var(--duration) forwards}@keyframes mask-enter{0%{opacity:0}to{opacity:1}}@keyframes mask-leave{0%{opacity:1}to{opacity:0}}@keyframes zoom-enter{0%{left:var(--left);opacity:0;top:var(--top);transform:translate(-50%,-50%) scale(0)}to{left:50%;opacity:1;top:50%;transform:translate(-50%,-50%) scale(1)}}@keyframes zoom-leave{0%{left:50%;opacity:1;top:50%;transform:translate(-50%,-50%) scale(1)}to{left:var(--left);opacity:0;top:var(--top);transform:translate(-50%,-50%) scale(0)}}@keyframes fade-enter{0%{opacity:0;top:var(--top);transform:translate(-50%,-100%)}to{opacity:1;top:50%;transform:translate(-50%,-50%)}}@keyframes fade-leave{0%{opacity:1;top:50%;transform:translate(-50%,-50%)}to{opacity:0;top:var(--top);transform:translate(-50%,-100%)}}
|
package/dist/style/Toast.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
._container_974ly_1{align-items:center;display:flex;flex-direction:column;gap:20px;height:100vh;left:0;padding:20px;pointer-events:none;position:fixed;top:0;width:100vw}._base_974ly_15,._promise_974ly_15{--speed
|
|
1
|
+
._container_974ly_1{align-items:center;display:flex;flex-direction:column;gap:20px;height:100vh;left:0;padding:20px;pointer-events:none;position:fixed;top:0;width:100vw}._base_974ly_15,._promise_974ly_15{--speed:.2s;align-items:center;background-color:#fff;border-radius:6px;box-shadow:0 4px 8px #0000001a;display:flex;gap:8px;height:fit-content;justify-content:center;padding:8px 10px;pointer-events:auto;transform:translateY(0) scale(1);-webkit-user-select:none;user-select:none;width:fit-content}._enter_974ly_32{animation:_enter_974ly_32 var(--speed) forwards}._leave_974ly_36{animation:_leave_974ly_36 var(--speed) forwards}._promise_974ly_15 ._icon_974ly_40{animation:_ono-loading_974ly_1 1s linear infinite}@keyframes _enter_974ly_32{0%{opacity:0;transform:translateY(-80%) scale(.6)}60%{opacity:1;transform:translateY(0) scale(1.1)}to{opacity:1;transform:translateY(0) scale(1)}}@keyframes _leave_974ly_36{0%{opacity:1;transform:translateY(0) scale(1)}to{opacity:0;transform:translateY(-80%) scale(.6)}}
|
package/dist/style/Tooltip.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.ono-tooltip-popper{background:var(--tooltip-bg,#333);border-radius:4px;color:#fff;font-size:13px;font-weight:700;padding:4px 8px}.ono-tooltip-popper .ono-tooltip-popper-arrow,.ono-tooltip-popper .ono-tooltip-popper-arrow:before{background:inherit;height:8px;position:absolute;width:8px}.ono-tooltip-popper .ono-tooltip-popper-arrow{visibility:hidden}.ono-tooltip-popper .ono-tooltip-popper-arrow:before{content:"";transform:rotate(45deg);visibility:visible}.ono-tooltip-popper[data-popper-placement^=top]>.ono-tooltip-popper-arrow{bottom:-4px}.ono-tooltip-popper[data-popper-placement^=bottom]>.ono-tooltip-popper-arrow{top:-4px}.ono-tooltip-popper[data-popper-placement^=left]>.ono-tooltip-popper-arrow{right:-4px}.ono-tooltip-popper[data-popper-placement^=right]>.ono-tooltip-popper-arrow{left:-4px}
|
|
1
|
+
.ono-tooltip-popper{background:var(--tooltip-bg,#333);border-radius:4px;color:#fff;font-size:13px;font-weight:700;padding:4px 8px}.ono-tooltip-popper .ono-tooltip-popper-arrow,.ono-tooltip-popper .ono-tooltip-popper-arrow:before{background:inherit;height:8px;position:absolute;width:8px}.ono-tooltip-popper .ono-tooltip-popper-arrow{visibility:hidden}.ono-tooltip-popper .ono-tooltip-popper-arrow:before{content:"";transform:rotate(45deg);visibility:visible}.ono-tooltip-popper[data-popper-placement^=top]>.ono-tooltip-popper-arrow{bottom:-4px}.ono-tooltip-popper[data-popper-placement^=bottom]>.ono-tooltip-popper-arrow{top:-4px}.ono-tooltip-popper[data-popper-placement^=left]>.ono-tooltip-popper-arrow{right:-4px}.ono-tooltip-popper[data-popper-placement^=right]>.ono-tooltip-popper-arrow{left:-4px}
|
package/dist/style/Waterfall.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.ono-waterfall-container{height:100%;width:100%}.ono-waterfall-content{height:100%;overflow-y:scroll;width:100%}.ono-waterfall-wrapper{position:relative;width:100%}.ono-waterfall-item{left:0;position:absolute;top:0;transform-origin:top left;transition:transform .3s ease-in-out}.ono-waterfall-loading{align-items:center;background
|
|
1
|
+
.ono-waterfall-container{height:100%;width:100%}.ono-waterfall-content{height:100%;overflow-y:scroll;width:100%}.ono-waterfall-wrapper{position:relative;width:100%}.ono-waterfall-item{left:0;position:absolute;top:0;transform-origin:top left;transition:transform .3s ease-in-out}.ono-waterfall-loading{align-items:center;background:#00000080;bottom:0;color:#fff;display:flex;height:100%;justify-content:center;left:0;position:absolute;width:100%;z-index:10}
|
package/dist/style/index.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
:root{--bg-color:pink}@keyframes ono-loading{0%{transform:rotate(
|
|
1
|
+
:root{--bg-color:pink}@keyframes ono-loading{0%{transform:rotate(0)}to{transform:rotate(1turn)}}
|
package/dist/types/index.d.ts
CHANGED
|
@@ -9,8 +9,8 @@ import { default as useMouseClick } from './hooks/useMouseClick';
|
|
|
9
9
|
import { default as useTheme, ThemeType } from './hooks/useTheme';
|
|
10
10
|
import { default as useThemePro } from './hooks/useThemePro';
|
|
11
11
|
import { default as colorUtils, adjustingColors } from './utils/colorUtils';
|
|
12
|
-
import { default as common, addCommasToNumber, addEventWithOriginHandler, calculateAspectRatio, checkDeviceIsMobile, checkStatusCode, copy2Clipboard, createIntersectionObserver, dayOfYear, debounce, deepCopy, downloadFile, formatFileSize, formatSecondes, getElementCenterPosition, getFileName, getFileSuffix, getImageSIze, getPointDistance, getURLSearchParams, grayColor, mediaAutoplayPolicies, parseQuery, passwordStrength, pick, printStr, pureNumber, quickSort, rafTimeout, randomString, safeCapitalizeWord, singleton, throttle } from './utils/common';
|
|
12
|
+
import { default as common, addCommasToNumber, addEventWithOriginHandler, calculateAspectRatio, checkDeviceIsMobile, checkStatusCode, copy2Clipboard, createIntersectionObserver, dayOfYear, debounce, deepCopy, downloadFile, ellipsisString, formatFileSize, formatSecondes, getElementCenterPosition, getFileName, getFileSuffix, getImageSIze, getPointDistance, getURLSearchParams, grayColor, isPureNumber, mediaAutoplayPolicies, parseQuery, passwordStrength, pick, printStr, pureNumber, quickSort, rafTimeout, randomString, safeCapitalizeWord, singleton, throttle } from './utils/common';
|
|
13
13
|
import { base64ToBlob, base64ToFile, blobToBase64, blobToFile, fileToBase64, fileToBlob, urlToBase64, urlToBlob, urlToFile } from './utils/fileFormatConversion';
|
|
14
14
|
import { convertSecondToOtherTime, formatTime, localFormat, second2Day } from './utils/formatTimeUtils';
|
|
15
|
-
export { addCommasToNumber, addEventWithOriginHandler, adjustingColors, AutoSliderList, AvatarCrop, AwaitList, base64ToBlob, base64ToFile, blobToBase64, blobToFile, Button, calculateAspectRatio, Card3D, Checkbox, checkDeviceIsMobile, checkStatusCode, colorUtils, common, convertSecondToOtherTime, copy2Clipboard, createDataSource, createEventEmitter, createIntersectionObserver, dayOfYear, debounce, deepCopy, Direction, downloadFile, EstimatedVirtualList, fileToBase64, fileToBlob, formatFileSize, formatSecondes, formatTime, getElementCenterPosition, getFileName, getFileSuffix, getImageSIze, getPointDistance, getURLSearchParams, grayColor, injunctiveBox, List, localFormat, mediaAutoplayPolicies, MenuButton, message, Modal, OnoInput, OnoSelect, OnoTextarea, Pagination, parseQuery, passwordStrength, pick, portalRenderer, printStr, pureNumber, quickSort, Radio, RadioGroup, rafTimeout, randomString, safeCapitalizeWord, ScrollableTabs, second2Day, singleton, SvgImg, Switch, TemplateDialog, throttle, toast, Tooltip, urlToBase64, urlToBlob, urlToFile, useClickOutSide, useCountdown, useEventListener, useGetElementSize, useKeyPress, useMouseClick, useTheme, useThemePro, Waterfall };
|
|
15
|
+
export { addCommasToNumber, addEventWithOriginHandler, adjustingColors, AutoSliderList, AvatarCrop, AwaitList, base64ToBlob, base64ToFile, blobToBase64, blobToFile, Button, calculateAspectRatio, Card3D, Checkbox, checkDeviceIsMobile, checkStatusCode, colorUtils, common, convertSecondToOtherTime, copy2Clipboard, createDataSource, createEventEmitter, createIntersectionObserver, dayOfYear, debounce, deepCopy, Direction, downloadFile, ellipsisString, EstimatedVirtualList, fileToBase64, fileToBlob, formatFileSize, formatSecondes, formatTime, getElementCenterPosition, getFileName, getFileSuffix, getImageSIze, getPointDistance, getURLSearchParams, grayColor, injunctiveBox, isPureNumber, List, localFormat, mediaAutoplayPolicies, MenuButton, message, Modal, OnoInput, OnoSelect, OnoTextarea, Pagination, parseQuery, passwordStrength, pick, portalRenderer, printStr, pureNumber, quickSort, Radio, RadioGroup, rafTimeout, randomString, safeCapitalizeWord, ScrollableTabs, second2Day, singleton, SvgImg, Switch, TemplateDialog, throttle, toast, Tooltip, urlToBase64, urlToBlob, urlToFile, useClickOutSide, useCountdown, useEventListener, useGetElementSize, useKeyPress, useMouseClick, useTheme, useThemePro, Waterfall };
|
|
16
16
|
export type { ImageItem, ThemeType };
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
export declare const ellipsisString: (s: string, start: number, end?: number) => string;
|
|
2
|
+
export declare const isPureNumber: (s: string) => boolean;
|
|
1
3
|
export declare const passwordStrength: RegExp;
|
|
2
4
|
export declare const randomString: (len: number) => string;
|
|
3
5
|
/**
|
|
@@ -130,5 +132,7 @@ declare const _default: {
|
|
|
130
132
|
singleton: <T extends new (...args: any[]) => any>(className: T) => T;
|
|
131
133
|
throttle: typeof throttle;
|
|
132
134
|
debounce: <T extends (...args: any[]) => any>(func: T, delay: number) => ((...args: Parameters<T>) => void);
|
|
135
|
+
ellipsisString: (s: string, start: number, end?: number) => string;
|
|
136
|
+
isPureNumber: (s: string) => boolean;
|
|
133
137
|
};
|
|
134
138
|
export default _default;
|