ono-react-element 0.0.27 → 0.0.29

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.
Files changed (91) hide show
  1. package/dist/es/AutoSliderList-CVDZG5cu.js +1 -0
  2. package/dist/es/Button-P2AG5fc6.js +1 -0
  3. package/dist/es/Carousel-DOesUSmW.js +1 -0
  4. package/dist/es/Checkbox-DJYMF9I4.js +1 -0
  5. package/dist/es/{ContextMenu-BW91eI6D.js → ContextMenu-DlhlsQrA.js} +1 -1
  6. package/dist/es/FileDropZone-BSLGVa4n.js +1 -0
  7. package/dist/es/Input-Hy30rZ_v.js +1 -0
  8. package/dist/es/Message-COQA0S8d.js +1 -0
  9. package/dist/es/Modal-CJrgmTMc.js +1 -0
  10. package/dist/es/Radio-CEooiIll.js +1 -0
  11. package/dist/es/ScrollableTabs-okdQWyZ9.js +1 -0
  12. package/dist/es/Select-bhQ7DjXD.js +1 -0
  13. package/dist/es/SvgImg-D_jzo9p9.js +1 -0
  14. package/dist/es/Switch-DZ-GXwol.js +1 -0
  15. package/dist/es/TemplateDialog-iy7z7joV.js +1 -0
  16. package/dist/es/Toast-CZw9LQzq.js +1 -0
  17. package/dist/es/Tooltip-DvUB7xZH.js +1 -0
  18. package/dist/es/Waterfall-B9EXJfxK.js +1 -0
  19. package/dist/es/chainClassNames.ts-B9vmfsc1.js +1 -0
  20. package/dist/es/convertSecondToOtherTime.ts-BJegkJhl.js +1 -0
  21. package/dist/es/convertTimestamp.ts-DOHA1Ix6.js +1 -0
  22. package/dist/es/dateFormat.ts-DXskLY1N.js +1 -0
  23. package/dist/es/distinguishPlatform.ts-D2huTxC3.js +1 -0
  24. package/dist/es/formatTime.ts-DNtDsT9L.js +1 -0
  25. package/dist/es/index.js +1 -1
  26. package/dist/es/localFormat.ts-vxgGt_Za.js +1 -0
  27. package/dist/es/monthFormat.ts-B_s3ZbNy.js +1 -0
  28. package/dist/es/padZero.ts-BTMKlRWN.js +1 -0
  29. package/dist/es/printStr.ts-Nd8JNyzN.js +1 -0
  30. package/dist/es/second2Day.ts-DHntMxxp.js +1 -0
  31. package/dist/es/yearFormat.ts-DxbWP43R.js +1 -0
  32. package/dist/index.css +1 -1
  33. package/dist/style/Carousel.css +1 -0
  34. package/dist/types/components/Carousel/Carousel.d.ts +2 -0
  35. package/dist/types/components/Carousel/index.d.ts +1 -0
  36. package/dist/types/components/Carousel/types.d.ts +17 -0
  37. package/dist/types/components/index.d.ts +1 -0
  38. package/dist/types/hooks/useClickOutSide.d.ts +2 -2
  39. package/dist/types/hooks/useCountdown.d.ts +1 -2
  40. package/dist/types/hooks/useEventListener.d.ts +2 -2
  41. package/dist/types/hooks/useGetElementSize.d.ts +1 -2
  42. package/dist/types/hooks/useKeyPress.d.ts +2 -2
  43. package/dist/types/hooks/useMouseClick.d.ts +1 -2
  44. package/dist/types/hooks/useQuery.d.ts +1 -2
  45. package/dist/types/hooks/useTheme.d.ts +2 -2
  46. package/dist/types/hooks/useThemePro.d.ts +2 -2
  47. package/dist/types/index.d.ts +24 -18
  48. package/dist/types/utils/common/chainClassNames.d.ts +1 -0
  49. package/dist/types/utils/common/padZero.d.ts +1 -0
  50. package/dist/types/utils/platform/distinguishPlatform.d.ts +6 -0
  51. package/dist/types/utils/platform/distinguishPlatformDelay.d.ts +4 -0
  52. package/dist/types/utils/time/convertSecondToOtherTime.d.ts +1 -0
  53. package/dist/types/utils/time/convertTimestamp.d.ts +1 -0
  54. package/dist/types/utils/time/dateFormat.d.ts +2 -0
  55. package/dist/types/utils/time/formatTime.d.ts +1 -0
  56. package/dist/types/utils/time/localFormat.d.ts +2 -0
  57. package/dist/types/utils/time/monthFormat.d.ts +2 -0
  58. package/dist/types/utils/time/second2Day.d.ts +1 -0
  59. package/dist/types/utils/time/yearFormat.d.ts +2 -0
  60. package/dist/umd/index.css +1 -1
  61. package/dist/umd/index.css.br +0 -0
  62. package/dist/umd/index.css.gz +0 -0
  63. package/dist/umd/index.umd.cjs +1 -1
  64. package/dist/umd/index.umd.cjs.br +0 -0
  65. package/dist/umd/index.umd.cjs.gz +0 -0
  66. package/package.json +1 -1
  67. package/dist/es/AutoSliderList-CedBSQM5.js +0 -1
  68. package/dist/es/Button-CWrnOZH2.js +0 -1
  69. package/dist/es/Checkbox-jOOMkqbP.js +0 -1
  70. package/dist/es/FileDropZone-Czdv3XF4.js +0 -1
  71. package/dist/es/Input-UCScuMXP.js +0 -1
  72. package/dist/es/Message-C-4NUqae.js +0 -1
  73. package/dist/es/Modal-C58i1Qbd.js +0 -1
  74. package/dist/es/Radio-m9BOKzf5.js +0 -1
  75. package/dist/es/ScrollableTabs-DgcrSjsb.js +0 -1
  76. package/dist/es/Select-D5zgLQ8n.js +0 -1
  77. package/dist/es/SvgImg-HkuwJQ4_.js +0 -1
  78. package/dist/es/Switch-BEPzl8aC.js +0 -1
  79. package/dist/es/TemplateDialog-B3LqEwG2.js +0 -1
  80. package/dist/es/Toast-CERLQ4i7.js +0 -1
  81. package/dist/es/Tooltip-DDUtx7BP.js +0 -1
  82. package/dist/es/Waterfall-DNvOPDGJ.js +0 -1
  83. package/dist/es/formatTimeUtils.ts-ng_eAUID.js +0 -1
  84. package/dist/es/platformUtils.ts-BkXvuNq4.js +0 -1
  85. package/dist/es/printStr.ts-DMJqar33.js +0 -1
  86. package/dist/types/utils/formatTimeUtils.d.ts +0 -6
  87. package/dist/types/utils/platformUtils.d.ts +0 -13
  88. /package/dist/types/utils/{common → color}/grayColor.d.ts +0 -0
  89. /package/dist/types/utils/{common → file}/formatFileSize.d.ts +0 -0
  90. /package/dist/types/utils/{common → time}/dayOfYear.d.ts +0 -0
  91. /package/dist/types/utils/{common → time}/formatSecond.d.ts +0 -0
@@ -0,0 +1 @@
1
+ import{j as w}from "./dependencies-B7YNjh_z.js";import{u as F}from "./useGetElementSize.tsx-DML7z5Xp.js";import{c as H}from "./chainClassNames.ts-B9vmfsc1.js";import{p as g}from "./pureNumber.ts-LjeTI9RC.js";import{useState as a,useRef as T,useMemo as $,useEffect as v,cloneElement as M}from "react";var A=((r)=>(r.Horizontal="Horizontal",r.Vertical="Vertical",r))(A||{});const K=({list:r,style:C,disable:s,children:u,sliderBox:N,className:b,sliderStyle:z,duration:c=300,sliderClassName:E,currentIndex:p=0,direction:n=A.Horizontal,sliderTransitionTimingFunction:h="ease-in-out"})=>{const [S,j]=a(!1),[t,x]=a(0),[d,k]=a({t:0,l:0}),[f,D]=a({w:0,h:0}),l=T(null),y=T(null),I=$(()=>["width","height","translate"].map((e)=>`${e}${c/1e3}s ${h}`).join(","),[n,c,h]),L=$(()=>({width:f.w,height:f.h,transition:S ? I:"initial",translate:`${d.l}px ${d.t}px`}),[f,d]),{w:V,h:B}=F();return v(()=>{x(p);},[p]),v(()=>{(()=>{if(typeof t!="number"||!l.current||!y.current)return;const e=Array.from(l.current.children).slice(1);e.forEach((o)=>{o.style.position="relative",o.style.cursor=s ? "not-allowed":"pointer",o.style.zIndex="1";});const i=window.getComputedStyle(l.current),m={t:n==="Horizontal" ? g(i.paddingTop):e[t].offsetTop,l:n==="Horizontal" ? e[t].offsetLeft:g(i.paddingLeft)};k(m),D({w:e[t].offsetWidth,h:e[t].offsetHeight}),setTimeout(()=>j(!0),c);})();},[t,V,B,s]),w.jsxs("ul",{ref:l,className:H("ono-auto-slider-list-container",b,s ? "ono-auto-slider-list-is-disable":""),style:{flexDirection:n==="Horizontal" ? "row":"column",...C},children:[w.jsx("li",{ref:y,className:H("ono-auto-slider-list-slider",E),style:{...z,...L},children:N}),r.map((e,i)=>M(u({item:e,index:i,isActive:i===t}),{onClick:(m)=>{if(s)return;const o=u({item:e,index:i,isActive:i===t}).props.onClick;o&&o(m),x(i);}}))]});};export{K as A,A as D};
@@ -0,0 +1 @@
1
+ import{j as o}from "./dependencies-B7YNjh_z.js";import{c as N}from "./chainClassNames.ts-B9vmfsc1.js";import{t as w}from "./throttle.ts-D_EqcNzV.js";import{forwardRef as B,useState as L,useRef as h,useEffect as l}from "react";const D=B(({onClick:d,children:m,disabled:r,loading:n,plain:g,shape:u="default",htmlType:y="button",type:x="primary",throttleDuration:c,className:b,style:C,icon:a},s)=>{const [f,p]=L(!1),t=h(null),i=h(null),j=d ? w(d,c ? typeof c=="number" ? c:500:0):void 0;return l(()=>{(()=>{if(!i.current)return;const e=i.current;n ?(p(!0),e.classList.add("ono-loading-start")):(setTimeout(()=>{p(!1);},300),e.classList.remove("ono-loading-start"),e.classList.add("ono-loading-end"));})();},[n,i]),l(()=>{(()=>{if(!t.current)return;const e=t.current,v=e.getBoundingClientRect();e.style.setProperty("--btn-height",v.height+"px");})();},[t]),l(()=>{s&&t&&(typeof s=="function" ? s(t.current):s.current=t.current);},[s,t]),o.jsxs("button",{ref:t,className:N(`ono-btn-${x}`,n||f ? "ono-is-loading":"",n||a ? "ono-is-icon":"",r ? "ono-btn-is-disabled":"",u==="round" ? "ono-is-round":u==="circle" ? "ono-is-circle":"",g ? "ono-is-plain":"",b ?? ""),type:y,disabled:(typeof r=="function" ? r():r)||!!n,style:C,onClick:j,children:[(()=>{const e=o.jsx("span",{ref:i,className:"ono-btn-icon",children:o.jsx("span",{children:typeof n=="object" ? n.icon:o.jsx("svg",{viewBox:"0 0 1024 1024",focusable:"false","data-icon":"loading",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",children:o.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 n||f ? e:a ? o.jsx("span",{children:a}):o.jsx(o.Fragment,{});})(),m]});});export{D as B};
@@ -0,0 +1 @@
1
+ import{j as i}from "./dependencies-B7YNjh_z.js";import{c as H}from "./chainClassNames.ts-B9vmfsc1.js";import{useState as c,useRef as k,useEffect as j}from "react";const O=({style:Y,current:l,children:o,className:D,prevButton:x,nextButton:y,dots:E=!0,speed:p=300,afterChange:N,duration:z=2e3,autoPlay:d=!1,isShowArrow:L=!0,waitForAnimate:R=!0,direction:n="horizontal"})=>{const [s,T]=c(typeof l=="number" ? l+1:1),[B,v]=c(typeof l=="number" ? l:0),[u,F]=c(),[q,G]=c([]),[S,C]=c(!1),[A,M]=c(!1),[P,h]=c(!1),f=k(null),r=k(null),$=k(null),g=(t)=>{r.current.style.transform=n==="horizontal" ? `translateX(-${((u==null ? void 0:u.width)||0)*(t+1)}px)`:`translateY(-${((u==null ? void 0:u.height)||0)*(t+1)}px)`;},w=(t)=>{const e=t-s;if(e===0||R&&S)return;C(!0),h(!1);const a=e<0 ? "prev":"next",m=a==="prev" ? 1:o.length;s===m ?(T(a==="prev" ? o.length:1),v(a==="prev" ? o.length-1:0),g(t-1),setTimeout(()=>{var b;(b=r.current)==null||b.classList.remove("ono-carousel-slider"),g(a==="prev" ? o.length-1:0),setTimeout(()=>{var X;(X=r.current)==null||X.classList.add("ono-carousel-slider"),C(!1),h(!0);},20);},p)):(v(t-1),T(t),g(t-1),setTimeout(()=>{C(!1),h(!0);},p));};return j(()=>{(()=>{if(!o||!f.current)return;f.current.style.setProperty("--speed",`${p}ms`);const t=f.current.getBoundingClientRect();F(t);const e=[...o];var a;e.push(o[0]),e.unshift(o[o.length-1]),G(e.map((m,b)=>i.jsx("div",{style:{width:t.width,height:t.height,flexShrink:0},children:m},b))),a=t,r.current&&(r.current.style.transform=n==="horizontal" ? `translateX(-${a.width*s}px)`:`translateY(-${a.height*s}px)`,r.current.style.flexDirection=n==="horizontal" ? "row":"column",h(d),setTimeout(()=>{var m;return(m=r.current)==null ? void 0:m.classList.add("ono-carousel-slider");},p));})();},[f,r,n,d]),j(()=>{N==null||N(B);},[B]),j(()=>{(()=>{if(A||!d||!P)return clearTimeout($.current),void($.current=null);$.current=setTimeout(()=>w(s+1),z);})();},[d,P,S,s,A]),j(()=>{typeof l=="number"&&(h(!1),w(l+1),setTimeout(()=>h(d),z-p));},[r,l]),i.jsxs("div",{ref:f,className:H("ono-carousel-container",D),style:Y,onMouseEnter:()=>M(!0),onMouseLeave:()=>M(!1),children:[i.jsx("div",{ref:r,className:"ono-carousel-wrapper",children:q}),L&&i.jsx("button",{className:n==="horizontal" ? "ono-carousel-left":"ono-carousel-top",onClick:()=>w(s-1),children:x ? typeof x=="function" ? x():x:n==="horizontal" ? "left":"top"}),L&&i.jsx("button",{className:n==="horizontal" ? "ono-carousel-right":"ono-carousel-bottom",onClick:()=>w(s+1),children:y ? typeof y=="function" ? y():y:n==="horizontal" ? "right":"bottom"}),E&&i.jsx("div",{className:"ono-carousel-indicators",children:o.map((t,e)=>i.jsx("button",{className:"ono-carousel-indicator",onClick:()=>{g(e),v(e),T(e+1);}},e))})]});};export{O as C};
@@ -0,0 +1 @@
1
+ import{j as b}from "./dependencies-B7YNjh_z.js";import{c as x}from "./chainClassNames.ts-B9vmfsc1.js";import{useState as g,useRef as v,useEffect as w}from "react";const E=({id:d,style:n,checked:c,onChange:h,className:a,indeterminate:t=!1,checkedColor:l="#0077cc",indeterminateStyle:p="line",indeterminateColor:y="#0077cc"})=>{const [s,f]=g(""),e=v(null),C=[{value:l,name:"checkedColor"},{value:y,name:"indeterminateColor"}];return w(()=>{(()=>{if(!e.current)return;const r=getComputedStyle(e.current);s||f(r.borderColor),e.current.style.height=r.width,[{value:r.width,name:"w"},{value:c||t ? l:s,name:"border-color"},...C].forEach(({value:i,name:k})=>{i&&((o,u,m)=>{typeof o=="string" ? m.style.setProperty(`--${u}`,o):m.style.setProperty(`--${u}`,`${o}px`);})(i,k,e.current);});})(),e.current&&(e.current.indeterminate=t);},[e,a,n,t]),b.jsx("input",{id:d,type:"checkbox",ref:e,checked:c,onChange:h,className:x(a,p==="line" ? "ono-checkbox-line":"ono-checkbox-border"),style:n});};export{E as C};
@@ -1 +1 @@
1
- import{j as v}from "./dependencies-B7YNjh_z.js";import{useRef as k,useLayoutEffect as w}from "react";import{u as D}from "./useEventListener.tsx-C8V9Qip6.js";import{p as g}from "./PortalRenderer-izu9LyVc.js";const N=({className:e,content:o,style:i,onClick:r,onDoubleClick:m,onContextMenu:x,onMouseDown:y,onMouseUp:f,onMouseEnter:d,onMouseLeave:h,onMouseMove:C,destroy:l,position:n})=>{const t=k(null);return D("click",l),w(()=>{if(t.current){const{width:s,height:a}=t.current.getBoundingClientRect(),{innerWidth:p,innerHeight:M}=window;let c=n.x,u=n.y;c+s>p&&(c=Math.max(0,p-s)),u+a>M&&(u=Math.max(0,M-a)),t.current.style.left=`${c}px`,t.current.style.top=`${u}px`;}},[n]),v.jsx("div",{ref:t,className:e,style:{...i,position:"fixed",left:n.x,top:n.y},onClick:r,onDoubleClick:m,onContextMenu:x,onMouseDown:y,onMouseUp:f,onMouseEnter:d,onMouseLeave:h,onMouseMove:C,children:typeof o=="function" ? o((s)=>{l(),s&&s();}):o});},R=({e,style:o,content:i,className:r})=>{e.preventDefault(),g(N,{className:r,content:i,position:{x:e.clientX,y:e.clientY},style:{zIndex:9999,...o}},"content-menu-root");};export{R as c};
1
+ import{j as v}from "./dependencies-B7YNjh_z.js";import{u as k}from "./useEventListener.tsx-C8V9Qip6.js";import{useRef as w,useLayoutEffect as D}from "react";import{p as g}from "./PortalRenderer-izu9LyVc.js";const N=({className:e,content:o,style:i,onClick:r,onDoubleClick:m,onContextMenu:x,onMouseDown:y,onMouseUp:f,onMouseEnter:d,onMouseLeave:h,onMouseMove:C,destroy:l,position:n})=>{const t=w(null);return k("click",l),D(()=>{if(t.current){const{width:s,height:a}=t.current.getBoundingClientRect(),{innerWidth:p,innerHeight:M}=window;let c=n.x,u=n.y;c+s>p&&(c=Math.max(0,p-s)),u+a>M&&(u=Math.max(0,M-a)),t.current.style.left=`${c}px`,t.current.style.top=`${u}px`;}},[n]),v.jsx("div",{ref:t,className:e,style:{...i,position:"fixed",left:n.x,top:n.y},onClick:r,onDoubleClick:m,onContextMenu:x,onMouseDown:y,onMouseUp:f,onMouseEnter:d,onMouseLeave:h,onMouseMove:C,children:typeof o=="function" ? o((s)=>{l(),s&&s();}):o});},R=({e,style:o,content:i,className:r})=>{e.preventDefault(),g(N,{className:r,content:i,position:{x:e.clientX,y:e.clientY},style:{zIndex:9999,...o}},"content-menu-root");};export{R as c};
@@ -0,0 +1 @@
1
+ import{j as g}from "./dependencies-B7YNjh_z.js";import{c as b}from "./chainClassNames.ts-B9vmfsc1.js";import{useState as A,useRef as G,useMemo as N}from "react";const L=({isBox:s=!1,multiple:y=!1,children:l,allowFileType:D="image",style:C={},className:E="",isCanClick:T=!0,getFileListData:w,onFileTypeError:c,readingAnimationOptions:n})=>{const [a,F]=A(!1),v=G(null);let f=0,p=[],m=[],o=[],S=[];const j=N(()=>D==="all" ? ["image","video","audio","document","directory"]:D,[D]),x=(e)=>{const r=[];o.forEach((t)=>r.push({name:t.name,fileType:"directory",file:"",isFile:!1,fileSize:0,children:[],parent:""}));for(let t=0;t<r.length;t++)for(let i=0;i<e.length;i++)e[i].parent===r[t].name&&e[i].name!==".DS_Store"&&r[t].children.push(e[i]);r.length===0&&r.push(...e),w(r),p=[],f=0,m=[],o=[],S=[],F(!1);},u=(e,r="")=>{if(e.isDirectory){if(!j.includes("directory"))return c&&c();const t=e.createReader(),i=(O)=>O.readEntries((k)=>{let z=0;k.forEach((d)=>{z++,d.isDirectory&&u(d);}),m.push(...k),S.includes(e.name)||(o.push(e),S.push(e.name)),z>=100 ? i(O):m.forEach((d)=>u(d,e.name));});i(t);}else e.file((t)=>{if(!j.includes(t.type.split("/")[0])&&t.name!==".DS_Store")return c&&c();p.push({name:t.name,fileType:t.type,file:t,isFile:!0,fileSize:t.size,children:[],parent:r});const i=f>=o.length&&o.length===0 ? f:m.length;p.length===i&&x(p);});};return g.jsxs(g.Fragment,{children:[g.jsx("input",{ref:v,type:"file",style:{display:"none"},multiple:y,value:"",onChange:(e)=>{const r=[...e.target.files],t=[];F(!0),r.forEach((i)=>t.push({name:i.name,fileType:i.type,file:i,isFile:!0,fileSize:i.size,children:[],parent:""})),x(t);}}),g.jsx("div",{className:b("ono-file-process-container",s ? "ono-file-process-container-box":"",typeof E=="string" ? E:E(a)),style:{justifyContent:s&&!l ? "center":"initial",cursor:s&&T ? a ? "not-allowed":"pointer":"",...C instanceof Function ? C(a):C},onClick:()=>{if(s&&T){if(a&&(n!=null&&n.readingCannotOperattion))return;v.current.click();}},onDragEnter:(e)=>e.preventDefault(),onDragOver:(e)=>e.preventDefault(),onDrop:(e)=>{if(e.preventDefault(),!a||!(n!=null&&n.readingCannotOperattion))if(f=y ? e.dataTransfer.items.length:1,F(!0),y)for(const r of e.dataTransfer.items)u(r.webkitGetAsEntry());else u(e.dataTransfer.items[0].webkitGetAsEntry());},children:s ? l ? a&&(n!=null&&n.readingCannotOperattion)?(n==null ? void 0:n.animations)||"正在读取文件...":l:a&&(n!=null&&n.readingCannotOperattion)?(n==null ? void 0:n.animations)||"正在读取文件...":"请将要上传的文件拖拽到此处":l})]});};export{L as F};
@@ -0,0 +1 @@
1
+ import{j as n}from "./dependencies-B7YNjh_z.js";import{c as q}from "./chainClassNames.ts-B9vmfsc1.js";import{forwardRef as I,useState as f,useRef as T,useEffect as P}from "react";import{u as J}from "./useKeyPress.tsx-hgs6v_Jt.js";const X=()=>n.jsx("svg",{className:"ono-input-icon",viewBox:"64 64 896 896",focusable:"false","data-icon":"close-circle",fill:"currentColor","aria-hidden":"true",children:n.jsx("path",{d:"M512 64c247.4 0 448 200.6 448 448S759.4 960 512 960 64 759.4 64 512 264.6 64 512 64zm127.98 274.82h-.04l-.08.06L512 466.75 384.14 338.88c-.04-.05-.06-.06-.08-.06a.12.12 0 00-.07 0c-.03 0-.05.01-.09.05l-45.02 45.02a.2.2 0 00-.05.09.12.12 0 000 .07v.02a.27.27 0 00.06.06L466.75 512 338.88 639.86c-.05.04-.06.06-.06.08a.12.12 0 000 .07c0 .03.01.05.05.09l45.02 45.02a.2.2 0 00.09.05.12.12 0 00.07 0c.02 0 .04-.01.08-.05L512 557.25l127.86 127.87c.04.04.06.05.08.05a.12.12 0 00.07 0c.03 0 .05-.01.09-.05l45.02-45.02a.2.2 0 00.05-.09.12.12 0 000-.07v-.02a.27.27 0 00-.05-.06L557.25 512l127.87-127.86c.04-.04.05-.06.05-.08a.12.12 0 000-.07c0-.03-.01-.05-.05-.09l-45.02-45.02a.2.2 0 00-.09-.05.12.12 0 00-.07 0z"})}),Z=({open:x})=>n.jsx("svg",{viewBox:"64 64 896 896",focusable:"false","data-icon":x ? "eye":"eye-invisible",fill:"currentColor","aria-hidden":"true",className:"ono-input-icon",children:x ? n.jsx("path",{d:"M942.2 486.2C847.4 286.5 704.1 186 512 186c-192.2 0-335.4 100.5-430.2 300.3a60.3 60.3 0 000 51.5C176.6 737.5 319.9 838 512 838c192.2 0 335.4-100.5 430.2-300.3 7.7-16.2 7.7-35 0-51.5zM512 766c-161.3 0-279.4-81.8-362.7-254C232.6 339.8 350.7 258 512 258c161.3 0 279.4 81.8 362.7 254C791.5 684.2 673.4 766 512 766zm-4-430c-97.2 0-176 78.8-176 176s78.8 176 176 176 176-78.8 176-176-78.8-176-176-176zm0 288c-61.9 0-112-50.1-112-112s50.1-112 112-112 112 50.1 112 112-50.1 112-112 112z"}):n.jsxs(n.Fragment,{children:[n.jsx("path",{d:"M942.2 486.2Q889.47 375.11 816.7 305l-50.88 50.88C807.31 395.53 843.45 447.4 874.7 512 791.5 684.2 673.4 766 512 766q-72.67 0-133.87-22.38L323 798.75Q408 838 512 838q288.3 0 430.2-300.3a60.29 60.29 0 000-51.5zm-63.57-320.64L836 122.88a8 8 0 00-11.32 0L715.31 232.2Q624.86 186 512 186q-288.3 0-430.2 300.3a60.3 60.3 0 000 51.5q56.69 119.4 136.5 191.41L112.48 835a8 8 0 000 11.31L155.17 889a8 8 0 0011.31 0l712.15-712.12a8 8 0 000-11.32zM149.3 512C232.6 339.8 350.7 258 512 258c54.54 0 104.13 9.36 149.12 28.39l-70.3 70.3a176 176 0 00-238.13 238.13l-83.42 83.42C223.1 637.49 183.3 582.28 149.3 512zm246.7 0a112.11 112.11 0 01146.2-106.69L401.31 546.2A112 112 0 01396 512z"}),n.jsx("path",{d:"M508 624c-3.46 0-6.87-.16-10.25-.47l-52.82 52.82a176.09 176.09 0 00227.42-227.42l-52.82 52.82c.31 3.38.47 6.79.47 10.25a111.94 111.94 0 01-112 112z"})]})}),te=I(({id:x,name:D,max:F,min:j,maxLength:L,minLength:M,type:Q="text",className:Y,defaultValue:B,placeholder:E,readonly:V,autocomplete:W="off",autofocus:R,form:y,disabled:g,clearable:k,showPassword:K,prepend:p,append:i,prefix:b,suffix:v,showCount:O,border:$="1px solid #5644b8",boxShadow:m="0 0 0 2px #7969d11a",value:h="",onChange:d,onFocus:z,onBlur:w,onClear:u,onKeyUp:A,onKeyDown:N},U)=>{const [t,C]=f(h),[H,o]=f(!1),[e,s]=f(!1),l=T(null),c=k&&!g&&t,a=K&&!g;return P(()=>{l.current&&(l.current.style.setProperty("--ono-input-border",$),l.current.style.setProperty("--ono-input-box-shadow",m));},[l]),P(()=>{C(h);},[h]),n.jsxs("div",{className:q("ono-input","ono-input-border",g ? "ono-input-is-disabled":""),children:[p&&n.jsx("div",{className:"ono-prepend",children:p}),n.jsxs("div",{ref:l,className:q("ono-input-wrapper",H ? "ono-input-is-focus":"",Y),onMouseDown:(r)=>{r.target.tagName!=="INPUT"&&r.preventDefault();},children:[b&&n.jsx("span",{className:"ono-prefix",children:b}),n.jsx("input",{id:x,ref:U,max:F,min:j,name:D,maxLength:L,minLength:M,defaultValue:B,className:"ono-input-inner",type:K ? e ? "text":"password":Q,placeholder:E,readOnly:V,autoComplete:W,autoFocus:R,form:y,disabled:g,onFocus:(r)=>{z==null||z(r),o(!0);},onBlur:(r)=>{w==null||w(r),o(!1);},value:t,onChange:(r)=>{d==null||d(r),C(r.target.value);},onKeyUp:A,onKeyDown:N}),(v||c||a||O)&&n.jsxs("span",{className:"ono-suffix",children:[v,c&&n.jsx("button",{className:"ono-clear-icon",onClick:()=>{u==null||u(),C("");},children:n.jsx(X,{})}),a&&n.jsx("button",{className:"ono-eye-icon",onClick:()=>s(!e),children:n.jsx(Z,{open:e})}),O&&L&&n.jsxs("p",{className:"ono-count",children:[t.length,"/",L]})]})]}),i&&n.jsx("div",{className:"ono-append",children:i})]});}),ae=I(({id:x,name:D,rows:F,maxLength:j,minLength:L,className:M,placeholder:Q,readonly:Y,resize:B=!0,autocomplete:E="off",autofocus:V,form:W,disabled:R,autoSize:y,showCount:g,border:k="1px solid #5644b8",boxShadow:K="0 0 0 2px #7969d11a",value:p="",onChange:i,onFocus:b,onBlur:v,onKeyUp:O,onKeyDown:$},m)=>{const [h,d]=f(p),[z,w]=f(!1),[u,A]=f([p]),[N,U]=f(0),t=T(null),C=(o)=>{const e=u.slice(0,N+1);e.push(o),A(e),U(e.length-1);};return [{key:"CommandOrControl+z",handler:(o)=>{document.activeElement===t.current&&(o.preventDefault(),(()=>{if(N>0&&t.current){const e=N-1,s=u[e];if(t.current.value=s,d(s),U(e),i){const l={target:t.current};i(l);}}})());},deps:[u]},{key:"CommandOrControl+d",handler:(o)=>{if(t.current&&document.activeElement===t.current){o.preventDefault();const e=((s)=>{const{value:l,selectionStart:c,selectionEnd:a}=s,r=l.substring(0,c)+l.substring(a);return s.value=r,s.setSelectionRange(c,c),r;})(t.current);if(d(e),C(e),i){const s={target:t.current};i(s);}}},deps:[u]}].forEach(({key:o,handler:e,deps:s})=>J(o,e,{target:t.current,deps:s})),P(()=>{d(p);},[p]),P(()=>{(()=>{if(!t.current)return;const o=t.current;((e,s,l,c,a)=>{const r=e.parentNode;e.style.resize=s ? "none":l ? "vertical":"none",r.style.setProperty("--ono-input-border",c),r.style.setProperty("--ono-input-box-shadow",a),r.style.setProperty("--ono-input-height","auto");})(o,y||!1,B,k,K),y&&((e,s)=>{const{minRows:l=2,maxRows:c}=typeof s=="object" ? s:{},a=document.createElement("div");a.style.position="absolute",a.style.visibility="hidden",a.style.whiteSpace="pre-wrap",a.style.wordWrap="break-word",a.style.width=`${e.clientWidth}px`,a.style.font=getComputedStyle(e).font,a.style.padding=getComputedStyle(e).padding,a.style.border=getComputedStyle(e).border,a.style.boxSizing="border-box",document.body.appendChild(a);const r=34*l;let S=r;if(e.value){a.textContent=e.value;const G=a.offsetHeight;S=Math.max(r,G),c&&S>34*c ?(S=34*c,e.style.overflowY="auto"):e.style.overflowY="hidden";}else e.style.overflowY="hidden";e.style.height=`${S}px`,e.style.resize=s ? "none":"vertical",document.body.removeChild(a),Math.floor(S/34);})(o,y);})();},[t,y,h]),P(()=>{m&&t.current&&(m instanceof Function ? m(t.current):m.current=t.current);},[m,t]),n.jsxs("div",{className:q("ono-textarea",R ? "ono-input-is-disabled":""),children:[n.jsx("div",{className:q("ono-textarea-wrapper",z ? k==="none" ? "":"ono-input-is-focus":"",M),onClick:()=>{var o;return(o=t.current)==null ? void 0:o.focus();},children:n.jsx("textarea",{ref:t,className:"ono-textarea-inner",id:x,rows:F,name:D,maxLength:j,minLength:L,placeholder:Q,readOnly:Y,autoComplete:E,autoFocus:V,form:W,disabled:R,onFocus:(o)=>{b==null||b(o),w(!0);},onBlur:(o)=>{v==null||v(o),w(!1);},value:h,onChange:(o)=>{d(o.target.value),C(o.target.value),i==null||i(o);},onKeyUp:O,onKeyDown:$})}),g&&j&&n.jsx("p",{className:"ono-count-bar",onClick:(o)=>o.stopPropagation(),children:h.length+"/"+j})]});});export{te as O,ae as a};
@@ -0,0 +1 @@
1
+ import{j as o}from "./dependencies-B7YNjh_z.js";import{c as D}from "./chainClassNames.ts-B9vmfsc1.js";import{useState as j,useRef as O,useMemo as Q,useCallback as U,useEffect as M}from "react";import{p as W}from "./PortalRenderer-izu9LyVc.js";let I=1;const c=[],m=(e,a,r)=>(c.length===0&&(I=1),X(a.instancesKey||"",e,{id:`${r}-${I++}`,key:a.instancesKey||"",reactNode:e,props:a,offsetOptions:{topOffset:0,height:0,bottomOffset:0}}),c),S=(e)=>{const a=c.findIndex((r)=>r.id===e);return a<=0 ? 0:c[a-1].offsetOptions.bottomOffset;},X=(e,a,r)=>{const p=(t)=>W(a,{zIndex:999+I-1,...t.props,id:t.id},t.id,"ono-message-root");if(!e){const t=p(r);c.push({...r,props:{...r.props,id:r.id,destroy:t},destroy:t});}let y=!1;const k=c.map((t)=>{if(t.key===e){y=!0;const f={...t.props,...r.props};return{...t,props:f};}{const f=p(t);return{...t,props:{...t.props,id:t.id,destroy:f},destroy:f};}});if(Object.assign(c,k),!y){const t=p(r);c.push({...r,props:{...r.props,id:r.id,destroy:t},destroy:t});}},Y={info:{light:"#1677ff",dark:"#1677ff"},success:{light:"#52c41a",dark:"#49aa19"},error:{light:"#ff4d4f",dark:"#a61d24"},warning:{light:"#faad14",dark:"#d89614"},loading:{light:"#9254de",dark:"#f5f5f5"}},C=(e,a)=>Y[e][a],K=(e)=>{switch(e){case "success":return o.jsx("svg",{className:"ono-type-icon",viewBox:"0 0 1024 1024",focusable:"false","data-icon":"check-circle",fill:C(e,"light"),"aria-hidden":"true",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 64zm193.5 301.7l-210.6 292a31.8 31.8 0 01-51.7 0L318.5 484.9c-3.8-5.3 0-12.7 6.5-12.7h46.9c10.2 0 19.9 4.9 25.9 13.3l71.2 98.8 157.2-218c6-8.3 15.6-13.3 25.9-13.3H699c6.5 0 10.3 7.4 6.5 12.7z"})});case "error":return o.jsx("svg",{className:"ono-type-icon",viewBox:"0 0 1024 1024",focusable:"false","data-icon":"close-circle",fill:C(e,"light"),"aria-hidden":"true",children:o.jsx("path",{d:"M512 64c247.4 0 448 200.6 448 448S759.4 960 512 960 64 759.4 64 512 264.6 64 512 64zm127.98 274.82h-.04l-.08.06L512 466.75 384.14 338.88c-.04-.05-.06-.06-.08-.06a.12.12 0 00-.07 0c-.03 0-.05.01-.09.05l-45.02 45.02a.2.2 0 00-.05.09.12.12 0 000 .07v.02a.27.27 0 00.06.06L466.75 512 338.88 639.86c-.05.04-.06.06-.06.08a.12.12 0 000 .07c0 .03.01.05.05.09l45.02 45.02a.2.2 0 00.09.05.12.12 0 00.07 0c.02 0 .04-.01.08-.05L512 557.25l127.86 127.87c.04.04.06.05.08.05a.12.12 0 00.07 0c.03 0 .05-.01.09-.05l45.02-45.02a.2.2 0 00.05-.09.12.12 0 000-.07v-.02a.27.27 0 00-.05-.06L557.25 512l127.87-127.86c.04-.04.05-.06.05-.08a.12.12 0 000-.07c0-.03-.01-.05-.05-.09l-45.02-45.02a.2.2 0 00-.09-.05.12.12 0 00-.07 0z"})});case "loading":return o.jsx("svg",{className:D("ono-info-icon","ono-loading"),viewBox:"0 0 1024 1024",focusable:"false","data-icon":"loading",fill:C(e,"light"),"aria-hidden":"true",children:o.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"})});default:return o.jsx("svg",{className:"ono-info-icon",viewBox:"64 64 896 896",focusable:"false","data-icon":"exclamation-circle",fill:C(e,"light"),"aria-hidden":"true",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"})});}},T=({handleDestroy:e})=>o.jsx("button",{onClick:e,children:o.jsx("svg",{className:"ono-clear-icon",viewBox:"64 64 896 896",focusable:"false","data-icon":"close-circle",fill:"currentColor","aria-hidden":"true",children:o.jsx("path",{d:"M512 64c247.4 0 448 200.6 448 448S759.4 960 512 960 64 759.4 64 512 264.6 64 512 64zm127.98 274.82h-.04l-.08.06L512 466.75 384.14 338.88c-.04-.05-.06-.06-.08-.06a.12.12 0 00-.07 0c-.03 0-.05.01-.09.05l-45.02 45.02a.2.2 0 00-.05.09.12.12 0 000 .07v.02a.27.27 0 00.06.06L466.75 512 338.88 639.86c-.05.04-.06.06-.06.08a.12.12 0 000 .07c0 .03.01.05.05.09l45.02 45.02a.2.2 0 00.09.05.12.12 0 00.07 0c.02 0 .04-.01.08-.05L512 557.25l127.86 127.87c.04.04.06.05.08.05a.12.12 0 00.07 0c.03 0 .05-.01.09-.05l45.02-45.02a.2.2 0 00.05-.09.12.12 0 000-.07v-.02a.27.27 0 00-.05-.06L557.25 512l127.87-127.86c.04-.04.05-.06.05-.08a.12.12 0 000-.07c0-.03-.01-.05-.05-.09l-45.02-45.02a.2.2 0 00-.09-.05.12.12 0 00-.07 0z"})})}),g=({id:e,instancesKey:a,duration:r=3e3,speed:p=300,offset:y=20,message:k,type:t,plain:f=!0,showClose:F=!1,zIndex:E,onClose:P=()=>{},destroy:R})=>{const [,q]=j(!1),[z,A]=j(0),[x,H]=j(((n)=>{const i=c.findIndex((l)=>l.id===n);return i<=0 ? 0:c[i-1].offsetOptions.topOffset;})(e)),[s,V]=j({duration:r,speed:p,message:k,type:t,showClose:F,onClose:P}),v=O(null),w=O(null),d=O(null),N=x+z,G=Q(()=>({translate:`-50%${x}px`,transition:`translate ${p}ms ease-in-out`,zIndex:E}),[x,p]),L=()=>{d.current&&(d.current.classList.remove("ono-message-enter"),d.current.classList.add("ono-message-leave"),d.current.style.translate=`-50%${S(e)-z}px`,((n)=>{const i=c.findIndex((l)=>l.id===n);i!==-1&&c.splice(i,1);})(e),setTimeout(()=>R(s.onClose),p));},b=(n,i,l)=>{n!=="loading"&&(v.current=setTimeout(L,i-l));},$=()=>{const n=S(e);q((i)=>(i&&H(n+y),!0)),requestAnimationFrame($);},B=U(()=>{if(s.type==="loading"){if(w.current)return;w.current=setTimeout(()=>{var l;w.current=null;const n=(i=a||"")?(l=c.find((u)=>u.key===i))==null ? void 0:l.props:null;var i;n&&(((u)=>{V((J)=>({...J,...u}));})({...n}),b(s.type,n.duration||s.duration,n.speed||s.speed),B());},100);}},[s]);return M(()=>{b(s.type,s.duration,s.speed),$(),B();},[s.type,s.duration,s.speed]),M(()=>{(()=>{if(!d.current)return;const{height:n}=d.current.getBoundingClientRect();d.current.style.setProperty("--speed",`${s.speed}ms`),A(n);})();},[d]),M(()=>{((n,i)=>{const l=c.findIndex((u)=>u.id===n);l<0||(c[l].offsetOptions=i);})(e,{topOffset:x,height:z,bottomOffset:N});},[N]),o.jsx("div",{ref:d,className:D("ono-message",`ono-message-${s.type}`,"ono-message-enter",f ? "":"ono-message-color"),style:G,onMouseEnter:()=>{v.current&&(clearTimeout(v.current),v.current=null);},onMouseLeave:()=>b(s.type,s.duration,s.speed),children:typeof s.message=="function" ? s.message(K(s.type),s.showClose&&o.jsx(T,{handleDestroy:L})):o.jsxs(o.Fragment,{children:[K(s.type),o.jsx("div",{children:s.message}),s.showClose&&o.jsx(T,{handleDestroy:L})]})});},h=(e)=>{if(typeof e=="string")return{message:e};{const a={...e,instancesKey:e.key};return delete a.key,{...a};}},t0={info:(e)=>{m(g,{...h(e),type:"info"},"ono-message");},success:(e)=>{m(g,{...h(e),type:"success"},"ono-message");},warning:(e)=>{m(g,{...h(e),type:"warning"},"ono-message");},error:(e)=>{m(g,{...h(e),type:"error"},"ono-message");},loading:(e)=>{m(g,{...h(e),type:"loading"},"ono-message");}};export{t0 as m};
@@ -0,0 +1 @@
1
+ import{j as o}from "./dependencies-B7YNjh_z.js";import{a as h}from "./adjustingColors.ts-CpC0GUUO.js";import{c as D}from "./chainClassNames.ts-B9vmfsc1.js";import{useState as E,useRef as y,useEffect as j}from "react";import{p as F}from "./PortalRenderer-izu9LyVc.js";import{B as w}from "./Button-P2AG5fc6.js";const M=({title:c="This is a modal title",icon:k,content:B="This is a modal content",okText:N="confirm",cancelText:v="cancel",confirmDisabled:g,cancelDisabled:P,startPosition:t,onConfirm:d,onCancel:m,mask:x=!0,maskClosable:T=!1,width:f,btnClr:a,footer:u=({OkBtn:s,CancelBtn:i})=>o.jsxs(o.Fragment,{children:[o.jsx(i,{}),o.jsx(s,{})]}),modalBody:b,destroy:p})=>{const [s,i]=E(!1),l=y(null),n=y(null),z=[{label:"themeColor",value:a||""},{label:"themeHoverColor",value:a&&h(a,"light",10)||""},{label:"themeActiveColor",value:a&&h(a,"dark",20)||""},{label:"themeDisabledClr",value:a&&h(a,"light",20)||""}],r=()=>{if(t){if(!n.current)return;n.current.classList.remove("ono-modal-enter"),n.current.classList.add("ono-modal-leave"),setTimeout(()=>{p();},300);}else p();};return j(()=>(l.current&&(x ? l.current.showModal():l.current.show()),()=>{l.current&&l.current.close();}),[l.current,x]),j(()=>{(()=>{if(!n.current)return;const e=n.current.style;f&&e.setProperty("--width",f+"px"),t&&(e.setProperty("--left",(t.x/window.innerWidth*100).toFixed(2)+"%"),e.setProperty("--top",(t.y/window.innerHeight*100).toFixed(2)+"%")),a&&z.forEach((C)=>e.setProperty(`--${C.label}`,C.value));})();},[n]),o.jsx("dialog",{ref:l,className:"ono-modal",onClick:()=>T&&r(),children:b ? b(r):o.jsxs("div",{ref:n,className:D("ono-modal-box",t ? "ono-modal-enter":""),onClick:(e)=>e.stopPropagation(),children:[o.jsxs("div",{className:"ono-modal-box-body",children:[k ?? 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:c}),o.jsx("p",{className:"ono-modal-box-body-contentBar-content",children:B})]})]}),u&&o.jsx("div",{className:"ono-modal-box-footer",children:u({OkBtn:()=>o.jsx(w,{className:"ono-modal-box-footer-confirmBtn",loading:s,disabled:g,onClick:async()=>{i(!0);try{const e=d==null ? void 0:d();e instanceof Promise&&await e;}finally{i(!1),r();}},children:N ?? "Confirm"}),CancelBtn:()=>o.jsx(w,{className:"ono-modal-box-footer-cancelBtn",disabled:P||s,onClick:()=>{m==null||m(),r();},children:v ?? "Cancel"}),handleClose:()=>r()})})]})});},R=(c)=>F(M,c,"ono-modal");export{R as M};
@@ -0,0 +1 @@
1
+ import{j as o}from "./dependencies-B7YNjh_z.js";import{c as g}from "./chainClassNames.ts-B9vmfsc1.js";import{useState as E,useRef as y,useEffect as P}from "react";const R=({name:h,value:a,style:m,checked:l,onChange:C,children:r,className:p,radioW:f=16,radioGap:k=4,checkedColor:s="#532ce1",unCheckedColor:t="transparent",disabled:d=!1})=>{const [e,n]=E(""),b=y(null),i=y(null),c=y(null),j=[{value:f,name:"w"},{value:k,name:"gap"},{value:s,name:"checkedColor"},{value:t,name:"unCheckedColor"}];return P(()=>{(()=>{if(!c.current||!i.current)return;j.forEach(({value:x,name:N})=>{x&&((v,w,G)=>{const W=typeof v=="number";G.style.setProperty(`--${w}`,W ? `${v}px`:v);})(x,N,i.current);});const u=getComputedStyle(c.current);e||n(u.borderColor),c.current.style.borderColor=l ? s:e;})();},[i,c,l,e]),o.jsxs("div",{ref:i,className:g("ono-radio-box",p),style:m,children:[o.jsx("div",{ref:c,className:"ono-radio",onClick:()=>{var u;return(u=b.current)==null ? void 0:u.click();},children:o.jsx("input",{type:"radio",name:h,ref:b,value:a+"",checked:l,disabled:d,id:a+""+r,onChange:C})}),r&&o.jsx("label",{htmlFor:a+""+r||"",children:r})]});},F=({name:h,style:a,options:m,onChange:l,className:C,radioW:r=16,radioGap:p=4,labelPosition:f="right",checkedColor:k="#532ce1",unCheckedColor:s="transparent",value:t})=>o.jsx("div",{className:g("ono-radio-group",C),style:a,children:m.map(({label:d,value:e,disabled:n})=>o.jsx(R,{name:h,value:e,radioW:r,radioGap:p,style:{flexDirection:f==="left" ? "row-reverse":"row"},checkedColor:k,unCheckedColor:s,onChange:()=>l(e),checked:t+""==e+"",disabled:typeof n=="function" ? n(t):n||!1,children:d},d))});export{R,F as a};
@@ -0,0 +1 @@
1
+ import{j as g}from "./dependencies-B7YNjh_z.js";import{c as y}from "./chainClassNames.ts-B9vmfsc1.js";import{forwardRef as k,useState as C,useRef as x,useEffect as h}from "react";const N=({children:s,disabled:i,className:m,style:n,onClick:c})=>g.jsx("li",{className:y("ono-scrollable-tab",m),style:n,onClick:(o)=>!i&&(c==null ? void 0:c(o)),children:s}),L=k(({activeIndex:s,children:i,className:m,style:n,position:c="center",onChange:o},a)=>{const [l,p]=C(0),r=x(null);return h(()=>{const e=r.current;if(!e||l<0)return;const u=e.offsetWidth,t=Array.from(e.children);if(l>=t.length)return;const d=parseInt(((n==null ? void 0:n.gap)||getComputedStyle(e).gap||"0").toString(),10)||0;let f=0;switch(t.slice(0,l+1).forEach((b)=>f+=b.offsetWidth+d),c){case "start":e.scrollLeft=f-t[l].offsetWidth-d;break;case "end":e.scrollLeft=f-u;break;default:f-=t[l].offsetWidth/2+(s!==t.length-1 ? d:0),e.scrollLeft=f-u/2;}},[r,i,s,c]),h(()=>{p(s||0);},[s]),h(()=>{a&&(typeof a=="function" ? a(r.current):a.current=r.current);},[a]),g.jsx("ul",{ref:r,className:y("ono-scrollable-tabs",m),style:n,onClick:(e)=>{r.current&&Array.from(r.current.children).some((u,t)=>{if(u.contains(e.target))return p(t),o==null||o(t),!0;});},children:i(N)});});export{L as S};
@@ -0,0 +1 @@
1
+ import{j as n}from "./dependencies-B7YNjh_z.js";import{c as b}from "./chainClassNames.ts-B9vmfsc1.js";import{useState as r,useEffect as M}from "react";import{T as F}from "./Tooltip-DvUB7xZH.js";import{O as T}from "./Input-Hy30rZ_v.js";import{L as z}from "./List-DXRmDwDo.js";const D=({label:e,value:t,disabled:i,onChange:c,selectValue:d,optionRender:h,currentValue:m,onChangeCursor:u})=>n.jsx("button",{role:"option","aria-label":e,disabled:i,className:"ono-option-item",onClick:()=>c==null ? void 0:c(t),onMouseEnter:()=>!i&&(u==null ? void 0:u(e)),children:h ? h({label:e,value:t,disabled:i},d===e):n.jsx("div",{className:b("ono-option-item-content",m===e&&d!==e ? "ono-option-item-content-active":"",d===e ? "ono-option-item-content-selected":"",i ? "ono-option-item-content-disabled":""),children:e})}),K=({options:e,defaultValue:t,placeholder:i,inputBorder:c,isShowArrow:d,disabled:h,clearable:m,selectClassName:u,optionsClassName:O,notFoundContent:w,optionRender:y,onClear:g,onChange:s,filterOption:a})=>{const [f,N]=r(""),[E,C]=r(""),[p,j]=r(""),[L,S]=r(!1),[V,R]=r(!1),[A,x]=r(""),k=(o)=>{const l=e.find((v)=>v.value===o);N(l ? l.label:"");},B=(o)=>{s==null||s(o),x(o),k(o);};return M(()=>{t&&k(t);},[t]),M(()=>{var o;if(e.length>0){if(t){const l=e.find((v)=>v.value===t);l&&C(l.label);}else e:for(let l=0;l<e.length;l++)if(((o=e[l])==null ? void 0:o.disabled)!==!0){C(e[0].label);break e;}}},[e,t]),n.jsx(F,{sameWidth:!0,trigger:"click",placement:"bottom",isShowArrow:d,className:b("ono-option-container",O),onOpenChange:(o)=>{R(o),a&&p&&!o&&j("");},content:n.jsx(z,{list:a ? typeof a=="function" ? a(p,e):e.filter((o)=>o.label.toLocaleLowerCase().includes(p.toLocaleLowerCase())):e,fallback:n.jsx("div",{className:"ono-option-item",children:n.jsx("div",{className:"ono-option-item-content-no-data",onClick:(o)=>o.stopPropagation(),children:w ?? "No Data"})}),children:(o)=>n.jsx(D,{...o,onChange:B,selectValue:f.toString(),currentValue:E.toString(),optionRender:y,onChangeCursor:C},o.value)}),children:n.jsx("div",{className:"ono-select",onMouseEnter:()=>S(!0),onMouseLeave:()=>S(!1),children:n.jsx(T,{className:b(a ? "":"ono-select-readonly",u),border:c,disabled:h,placeholder:a&&A ? f.toString()||"":i,readonly:!a,value:a&&V ? p:f.toString(),clearable:L&&m,suffix:L&&m&&f||m&&p&&a ? n.jsx(n.Fragment,{}):n.jsx(P,{isVisible:V}),onClear:()=>{g==null||g(),s==null||s(""),x(""),N(""),j("");},onChange:(o)=>j(o.target.value)})})});},P=({isVisible:e})=>n.jsx("svg",{className:b("ono-select-arrow-down-icon",e ? "ono-select-arrow-down-active":""),viewBox:"64 64 896 896",focusable:"false","data-icon":"down",fill:"currentColor","aria-hidden":"true",children:n.jsx("path",{d:"M884 256h-75c-5.1 0-9.9 2.5-12.9 6.6L512 654.2 227.9 262.6c-3-4.1-7.8-6.6-12.9-6.6h-75c-6.5 0-10.3 7.4-6.5 12.7l352.6 486.1c12.8 17.6 39 17.6 51.7 0l352.6-486.1c3.9-5.3.1-12.7-6.4-12.7z"})});export{K as O};
@@ -0,0 +1 @@
1
+ import{j as o}from "./dependencies-B7YNjh_z.js";import{c as p}from "./chainClassNames.ts-B9vmfsc1.js";import{useRef as v,useEffect as y}from "react";const j=({w:c,h:m,src:n,clr:l,className:i,onClick:u})=>{const r=v(null),f=[{value:c,name:"w"},{value:m,name:"h"},{value:l,name:"clr"}];return y(()=>{r.current&&f.forEach((s)=>{var e,a,t;s.value&&(e=s.value,a=s.name,t=r.current,typeof e=="string" ? t.style.setProperty(`--${a}`,e):t.style.setProperty(`--${a}`,`${e}px`));});},[r,l]),o.jsx("div",{ref:r,className:p("ono-svg-img",i),onClick:u,children:o.jsx("img",{src:n,alt:""})});};export{j as S};
@@ -0,0 +1 @@
1
+ import{j as c}from "./dependencies-B7YNjh_z.js";import{c as y}from "./chainClassNames.ts-B9vmfsc1.js";import{p as j}from "./pureNumber.ts-LjeTI9RC.js";import{useRef as n,useEffect as k}from "react";const R=({id:g,text:e,style:h,color:t,checked:u,onChange:d,name:N="",className:m,disabled:v=!1})=>{const o=n(null),i=n(null),s=n(null),l=n(null),p=n(null),x=n(null),b=[{value:typeof t=="string" ? t:t==null ? void 0:t.active,name:"checkedClr"},{value:typeof t=="string"||t==null ? void 0:t.inactive,name:"uncheckedClr"}];return k(()=>{(()=>{if(!i.current||!o.current)return;let r=60,w=32;if(m||h){const a=getComputedStyle(i.current);r=j(a.width),w=j(a.height);}[...b,{value:r,name:"w"},{value:w,name:"h"}].forEach(({value:a,name:C})=>{a&&((f,E,S)=>{const $=typeof f=="number";S.style.setProperty(`--${E}`,$ ? `${f}px`:f);})(a,C,o.current);}),requestAnimationFrame(()=>{l.current&&(l.current.style.transition="translate 0.3s");});})();},[i,o,l,m,h,t,e,p,x]),k(()=>{s.current&&(s.current.checked=u);},[s,u]),c.jsxs("div",{ref:o,className:y("ono-switch",v ? "ono-switch-is-disabled":""),children:[c.jsx("input",{id:g,name:N,role:"switch",ref:s,type:"checkbox",checked:u,onChange:(r)=>{v||(d==null||d(r.currentTarget.checked,r));}}),c.jsx("div",{ref:i,className:y("ono-switch-box",m),style:h,onClick:()=>{var r;return(r=s.current)==null ? void 0:r.click();},children:c.jsxs("div",{ref:l,className:"ono-switch-children-bar",children:[(e==null ? void 0:e.active)&&c.jsx("div",{ref:p,className:"ono-switch-children",children:e==null ? void 0:e.active}),c.jsx("div",{className:"ono-switch-slider"}),(e==null ? void 0:e.inactive)&&c.jsx("div",{ref:x,className:"ono-switch-children",children:e==null ? void 0:e.inactive})]})})]});};export{R as S};
@@ -0,0 +1 @@
1
+ import{j as u}from "./dependencies-B7YNjh_z.js";import{c as v}from "./chainClassNames.ts-B9vmfsc1.js";import{g as b}from "./getElementCenterPosition.ts-CpWYej6j.js";import{useState as P,useRef as w,useEffect as $,useCallback as j}from "react";const M=({children:s,animation:e,className:d,duration:i=300,style:m,maskColor:p="rgba(0,0,0,0.5)",disableContextMenu:f,maskClickClose:y=!0,dialogClose:c})=>{const [r,k]=P(!1),o=w(null),l=()=>{if(o.current)if(k(!0),e){const t=o.current;t.classList.remove(`ono-${e.type}-enter`),t.classList.add(`ono-${e.type}-leave`),setTimeout(c,i);}else c();};$(()=>{(()=>{if(!e||!o.current)return;const t=o.current.parentElement.style,n=o.current.style;switch(t.setProperty("--duration",i/1e3+"s"),e.type){case "zoom":{const{x:a,y:C}=b(e.element),x=(a/window.innerWidth*100).toFixed(2)+"%",h=(C/window.innerHeight*100).toFixed(2)+"%";n.setProperty("--left",x),n.setProperty("--top",h);break;}case "fade":{const a=e.direction==="left-center" ? "--left":"--top";n.setProperty(a,e.startPosition);break;}}})();},[o,e]);const g=j(()=>{if(!e)return "";const t=`ono-${e.type}-enter`,n=`ono-${e.type}-leave`;return r ? n:t;},[e,r]);return u.jsx("div",{className:"ono-dialog-mask ono-dialog-mask-"+(r ? "leave":"enter"),style:{background:p},onClick:()=>y&&l(),onContextMenu:(t)=>f&&t.preventDefault(),children:u.jsx("div",{ref:o,className:v("ono-dialog",d,g()),style:m,onClick:(t)=>t.stopPropagation(),children:typeof s=="function" ? s(l):s})});};export{M as T};
@@ -0,0 +1 @@
1
+ import{j as r}from "./dependencies-B7YNjh_z.js";import{c as u}from "./chainClassNames.ts-B9vmfsc1.js";import{useEffect as f,useRef as _}from "react";import{i as v}from "./InjunctiveBox-vLlRm8LB.js";const L="_enter_974ly_32";let t=[];const w={success:{light:"#52c41a",dark:"#49aa19"},error:{light:"#ff4d4f",dark:"#a61d24"},warning:{light:"#faad14",dark:"#d89614"},promise:{light:"",dark:""}},y=(e,i)=>w[e][i],j=(e)=>{switch(e){case "success":return r.jsx("svg",{viewBox:"0 0 1024 1024",focusable:"false","data-icon":"check-circle",width:"24px",height:"24px",fill:y(e,"light"),"aria-hidden":"true",children:r.jsx("path",{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm193.5 301.7l-210.6 292a31.8 31.8 0 01-51.7 0L318.5 484.9c-3.8-5.3 0-12.7 6.5-12.7h46.9c10.2 0 19.9 4.9 25.9 13.3l71.2 98.8 157.2-218c6-8.3 15.6-13.3 25.9-13.3H699c6.5 0 10.3 7.4 6.5 12.7z"})});case "error":return r.jsx("svg",{viewBox:"0 0 1024 1024",focusable:"false","data-icon":"close-circle",width:"24px",height:"24px",fill:y(e,"light"),"aria-hidden":"true",children:r.jsx("path",{d:"M512 64c247.4 0 448 200.6 448 448S759.4 960 512 960 64 759.4 64 512 264.6 64 512 64zm127.98 274.82h-.04l-.08.06L512 466.75 384.14 338.88c-.04-.05-.06-.06-.08-.06a.12.12 0 00-.07 0c-.03 0-.05.01-.09.05l-45.02 45.02a.2.2 0 00-.05.09.12.12 0 000 .07v.02a.27.27 0 00.06.06L466.75 512 338.88 639.86c-.05.04-.06.06-.06.08a.12.12 0 000 .07c0 .03.01.05.05.09l45.02 45.02a.2.2 0 00.09.05.12.12 0 00.07 0c.02 0 .04-.01.08-.05L512 557.25l127.86 127.87c.04.04.06.05.08.05a.12.12 0 00.07 0c.03 0 .05-.01.09-.05l45.02-45.02a.2.2 0 00.05-.09.12.12 0 000-.07v-.02a.27.27 0 00-.05-.06L557.25 512l127.87-127.86c.04-.04.05-.06.05-.08a.12.12 0 000-.07c0-.03-.01-.05-.05-.09l-45.02-45.02a.2.2 0 00-.09-.05.12.12 0 00-.07 0z"})});case "warning":return r.jsx("svg",{viewBox:"0 0 1024 1024",focusable:"false","data-icon":"exclamation-circle",width:"24px",height:"24px",fill:y(e,"light"),"aria-hidden":"true",children:r.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"})});}},z=({type:e,speed:i=200,message:c,duration:m=2e3,className:d,style:h,isUseEnterAnimation:g=!0,promiseOptions:s,toastList:p,handleDestroy:o})=>{const a=_(null);return f(()=>{a.current&&(a.current.style.setProperty("--speed",i/1e3+"s"),g&&a.current.classList.add(L),e!=="promise"&&setTimeout(()=>{var n,x;(n=a.current)==null||n.classList.remove(L),(x=a.current)==null||x.classList.add("_leave_974ly_36");},m-i));},[a]),f(()=>{e==="promise" ?(typeof c=="function" ? c():c).then((n)=>setTimeout(()=>{o(),l({type:"success",message:typeof(s==null ? void 0:s.success)=="function" ? s.success(n):(s==null ? void 0:s.success)||"",isUseEnterAnimation:!1,toastList:p});},i)).catch((n)=>setTimeout(()=>{o(),l({type:"error",message:typeof(s==null ? void 0:s.error)=="function" ? s.error(n):(s==null ? void 0:s.error)||"",isUseEnterAnimation:!1,toastList:p});},i)):setTimeout(()=>o(()=>p=[]),m);},[e]),r.jsxs("div",{ref:a,className:u(e==="promise" ? "_promise_974ly_15":"_base_974ly_15",d),style:h,onClick:()=>{},children:[r.jsx("div",{className:"_icon_974ly_40",children:j(e)}),r.jsx("p",{children:typeof c=="string" ? c:s&&s.loading})]});},l=({type:e,speed:i=200,message:c,duration:m=2e3,zIndex:d=9999,className:h,style:g,isUseEnterAnimation:s=!0,promiseOptions:p,toastList:o})=>v({className:"_container_974ly_1",isSingle:!0,style:{zIndex:d},content:(a)=>(f(()=>{},[o]),r.jsx(z,{className:h,style:g,type:e,message:c,speed:i,duration:m,isUseEnterAnimation:s,promiseOptions:p,handleDestroy:a,toastList:o}))}),U={success:(e)=>{t.push({type:"success",message:e}),l(typeof e=="string" ?{type:"success",message:e,toastList:t}:{type:"success",...e,toastList:t});},error:(e)=>{t.push({type:"error",message:e}),l(typeof e=="string" ?{type:"error",message:e,toastList:t}:{type:"error",...e,toastList:t});},warning:(e)=>{t.push({type:"warning",message:e}),l(typeof e=="string" ?{type:"warning",message:e,toastList:t}:{type:"warning",...e,toastList:t});},promise:(e,i)=>{t.push({type:"promise",message:e}),l({type:"promise",message:e,promiseOptions:i,toastList:t});}};export{U as t};
@@ -0,0 +1 @@
1
+ import{j as o}from "./dependencies-B7YNjh_z.js";import{u as b}from "./useClickOutSide.tsx-C6XuLZzd.js";import{c as k}from "./chainClassNames.ts-B9vmfsc1.js";import{createPopper as W}from "@popperjs/core";import{useState as A,useRef as d,useEffect as h}from "react";let u=null,p=null;const E=({children:c,content:a,onOpenChange:l,trigger:n="hover",placement:f="top",popperOptions:m={},className:w,style:x,isShowArrow:v=!0,sameWidth:y,autoAdjustOverflow:g=!0})=>{const [s,j]=A(!1),i=d(null),e=d(null),r=(t)=>{l==null||l(t),j(t);};return b(e,()=>{n!=="click"&&n!=="contextmenu"||r(!1);},{event:["click","contextmenu"],deps:[n,l]}),h(()=>{(()=>{if(!e.current)return;const t=Array.from(e.current.children);if(t.length>1)throw new Error("Tooltip only support one child");e.current.style.width=t[0].getBoundingClientRect().width+"px";})();},[e,c]),h(()=>{e.current&&(n==="hover" ?(e.current.onmouseenter=()=>r(!0),e.current.onmouseleave=()=>r(!1)):n==="click" ? e.current.onclick=()=>r(!s):n==="focus" ?(e.current.onfocus=()=>r(!0),e.current.onblur=()=>r(!1)):e.current.oncontextmenu=()=>r(!s)),s&&e.current&&i.current ? p=W(e.current,i.current,{placement:f,modifiers:[{name:"offset",options:{offset:[0,6]}},y ?{name:"sameWidth",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn({state:t}){t.styles.popper.width=`${t.rects.reference.width}px`;},effect({state:t}){t.elements.popper.style.width=`${t.elements.reference.offsetWidth}px`;}}:{},g ?{name:"flip",enabled:!0}:{}],...m}):p&&(p.destroy(),p=null,u&&u.remove(),u=null);},[s,e,i]),o.jsxs(o.Fragment,{children:[s&&o.jsxs("div",{ref:i,style:x,className:k("ono-tooltip-popper",w),"data-popper-placement":m.placement||f,children:[o.jsx("div",{children:a instanceof Function ? a():a}),v&&o.jsx("div",{className:"ono-tooltip-popper-arrow","data-popper-arrow":!0})]}),o.jsx("div",{ref:e,children:c instanceof Function ? c():c})]});};export{E as T};
@@ -0,0 +1 @@
1
+ import{j as l}from "./dependencies-B7YNjh_z.js";import{u as J}from "./useEventListener.tsx-C8V9Qip6.js";import{c as R}from "./chainClassNames.ts-B9vmfsc1.js";import{t as B}from "./throttle.ts-D_EqcNzV.js";import{useState as v,useRef as L,useCallback as G,useEffect as z}from "react";import{L as I}from "./List-DXRmDwDo.js";const Y=({options:t,pageSize:h,children:$,request:A,reloadData:o,className:S,style:H,updateData:j,loading:m=!0,bottomThreshold:O=50})=>{const [a,p]=v({page:1,reloadData:o,loading:!1,isFinish:!1,gap:typeof t=="number" ? 0:t.gap,imageWidth:typeof t=="number" ? t:0,columns:typeof t=="number" ? 0:t.columns,imageList:[]}),[f,D]=v([]),[y,N]=v([]),x=L(null),g=L(null),d=L(null),u=(i)=>p((e)=>({...e,...i})),w=async(i,e)=>{const r=o&&a.reloadData!==o;if(a.isFinish)return;u({loading:!0});const n=await A(i,e);k(n),u({isFinish:!n.length,imageList:r ? [...n]:[...a.imageList,...n],page:i+1,loading:!1});},k=(i)=>p((e)=>{const r=o&&a.reloadData!==o,n=r ? []:[...y],c=r ? Array(e.columns).fill(0):[...JSON.stringify(f)!=="[]" ? f:Array(e.columns).fill(0)];return i.forEach((M)=>{const s=((W)=>{let b=0,T=0;return b=W.indexOf(Math.min(...W)),T=W[b],{index:b,height:T};})(c),C=Math.floor(M.height*e.imageWidth/M.width);n.push({x:s.index%e.columns!==0 ? s.index*e.imageWidth+e.gap*s.index:s.index*e.imageWidth,y:s.height}),c[s.index]+=C+e.gap,D(c);}),N(n),e;}),E=G(()=>{if(!d.current)return;const i=d.current.clientWidth;let e=0,r=a.page;if(o&&a.reloadData!==o&&(p({page:1,reloadData:o,loading:!1,isFinish:!1,gap:typeof t=="number" ? 0:t.gap,imageWidth:typeof t=="number" ? t:0,columns:typeof t=="number" ? 0:t.columns,imageList:[]}),D([]),N([]),r=1),typeof t=="number"){const n=Math.floor(i/a.imageWidth);e=n-1;const c=e ?(i-n*a.imageWidth)/e:0;u({columns:n,gap:c});}else{e=a.columns-1;const n=(i-e*a.gap)/a.columns;u({imageWidth:n});}w(r,h);},[a,o]),F=()=>{x.current&&clearTimeout(x.current),x.current=setTimeout(E,50);},q=B(()=>{const{scrollTop:i,clientHeight:e,scrollHeight:r}=g.current;r-e-i>O||!a.loading&&w(a.page,h);},50);return J("scroll",q,{target:g.current,deps:[a.loading,a.page]}),z(()=>(E(),window.addEventListener("resize",F),()=>{window.removeEventListener("resize",F);}),[d,o]),z(()=>{j&&w(a.page,h);},[j,a.loading,a.page,g.current]),l.jsxs("div",{className:"ono-waterfall-container",children:[l.jsx("div",{ref:g,className:R(S,"ono-waterfall-content"),style:H,children:l.jsx("div",{ref:d,className:"ono-waterfall-wrapper",style:{height:Math.max(...f)-a.gap+"px"},children:l.jsx(I,{list:a.imageList,children:(i,e)=>l.jsx("div",{className:"ono-waterfall-item",style:{width:`${a.imageWidth}px`,translate:`${y[e].x}px ${y[e].y}px`},children:$(i,e)},i.id)})})}),a.loading&&(typeof m=="function" ? m():m&&typeof m=="boolean" ? l.jsx("div",{className:"ono-waterfall-loading",children:"loading..."}):m)]});};export{Y as W};
@@ -0,0 +1 @@
1
+ const e=(...o)=>o.filter(Boolean).join(" ");export{e as c};
@@ -0,0 +1 @@
1
+ const n=(o,e)=>{const r={year:31536e3,month:2592e3,day:86400,hour:3600,minute:60,second:1};if(!r[e])throw new Error('Invalid type. Please use "day","hour","minute",or "second".');return Math.floor(o/r[e]);};export{n as c};
@@ -0,0 +1 @@
1
+ const n=(t)=>t.toString().length>13 ? new Date(Number(t.toString().substring(0,13))):t.toString().length===13 ? new Date(t):t.toString().length<13&&t.toString().length>10 ? new Date(Number((t.toString()+"000").substring(0,13))):t.toString().length===10 ? new Date(1e3*t):new Date(Number((t.toString()+"000000000000").substring(0,13)));export{n as c};
@@ -0,0 +1 @@
1
+ const b=(r,u)=>{let t;return u==="en" ? t=r==="01"||r==="21"||r==="31" ? Number(r)+"st":r==="02"||r==="22" ? Number(r)+"nd":r==="03"||r==="23" ? Number(r)+"rd":Number(r)+"th":r==="01" ? t="一日":r==="02" ? t="二日":r==="03" ? t="三日":r==="04" ? t="四日":r==="05" ? t="五日":r==="06" ? t="六日":r==="07" ? t="七日":r==="08" ? t="八日":r==="09" ? t="九日":r==="10" ? t="十日":r==="11" ? t="十一日":r==="12" ? t="十二日":r==="13" ? t="十三日":r==="14" ? t="十四日":r==="15" ? t="十五日":r==="16" ? t="十六日":r==="17" ? t="十七日":r==="18" ? t="十八日":r==="19" ? t="十九日":r==="20" ? t="二十日":r==="21" ? t="二十一日":r==="22" ? t="二十二日":r==="23" ? t="二十三日":r==="24" ? t="二十四日":r==="25" ? t="二十五日":r==="26" ? t="二十六日":r==="27" ? t="二十七日":r==="28" ? t="二十八日":r==="29" ? t="二十九日":r==="30" ? t="三十日":r==="31"&&(t="三十一日"),t ?? r;};export{b as d};
@@ -0,0 +1 @@
1
+ const r=({onAndroid:d,onIOS:i,onUnknown:n})=>{const o=navigator.userAgent;return/android/i.test(o)?(d(),"Android"):/iPad|iPhone|iPod/.test(o)?(i(),"iOS"):(n==null||n(),"Unknown");};export{r as d};
@@ -0,0 +1 @@
1
+ import{p as e}from "./padZero.ts-BTMKlRWN.js";import{c as u}from "./convertTimestamp.ts-DOHA1Ix6.js";const g=(p,r="YY-MM-DD hh:mm:ss")=>{const o=["YY","MM","DD","hh","mm","ss"],s=[],t=u(p);s.push(t.getFullYear().toString()),s.push(e(t.getMonth()+1)),s.push(e(t.getDate())),s.push(e(t.getHours())),s.push(e(t.getMinutes())),s.push(e(t.getSeconds()));for(let h in s)r=r.replace(o[h],s[h]);return r;};export{g as f};
package/dist/es/index.js CHANGED
@@ -1 +1 @@
1
- import{u as e}from "./useClickOutSide.tsx-C6XuLZzd.js";import{u as a}from "./useCountdown.tsx-DWqs6wNp.js";import{u as m}from "./useEventListener.tsx-C8V9Qip6.js";import{u as f}from "./useGetElementSize.tsx-DML7z5Xp.js";import{u as i}from "./useKeyPress.tsx-hgs6v_Jt.js";import{u as n}from "./useMouseClick.tsx-BmzbuM6X.js";import{u as c}from "./useQuery.tsx-FzGWYq50.js";import{u as d}from "./useTheme.tsx-C-GCpzAS.js";import{u as b}from "./useThemePro.tsx-BIU8EPPB.js";import{a as C,c as S}from "./async2syncUtils.ts-DkF1iSK4.js";import{b as y,g as O}from "./browserUtils.ts-DSM1TN_g.js";import{a as A}from "./adjustColor.ts-Bcmtt429.js";import{a as D}from "./adjustingColors.ts-CpC0GUUO.js";import{f as I}from "./formatColor.ts-BpkK5FYe.js";import{g as E}from "./getColorType.ts-B-_g2UQs.js";import{g as L}from "./getContrastColor.ts-5KaKa1G7.js";import{h as R}from "./hex2hsl.ts-BLU_9tQG.js";import{h as U}from "./hex2hsv.ts-CNUNM2bM.js";import{h as W}from "./hex2rgb.ts-BQpml6Tb.js";import{h as j}from "./hex3To6.ts-BNOY-YJ2.js";import{h as G}from "./hsl2hex.ts-D9xS0UDg.js";import{h as H}from "./hsl2rgb.ts-B6-BIsnP.js";import{h as Y}from "./hsv2hex.ts-BNkK519v.js";import{h as J}from "./hsv2rgb.ts-Bvoa3lA1.js";import{i as _}from "./isValidColor.ts-CpkuoTf9.js";import{r as oo}from "./randomColor.ts-Cf-bUfCt.js";import{r as eo}from "./rgb2hex.ts-Dkw9FDV4.js";import{r as ao}from "./rgb2hsl.ts-BPiSggZg.js";import{r as mo}from "./rgb2hsv.ts-CxNRFDKF.js";import{r as fo}from "./rgb2rgba.ts-Dx8-1nZt.js";import{a as io}from "./addCommasToNumber.ts-Bc5ZX_HW.js";import{a as no}from "./addEventWithOriginHandler.ts-CBP4faL-.js";import{c as co}from "./calculateAspectRatio.ts-DLTMZ6rT.js";import{c as ho}from "./checkDeviceIsMobile.ts-D_9fa1Z1.js";import{c as To}from "./checkStatusCode.ts-CeS5vbbx.js";import{c as So}from "./copy2Clipboard.ts-D-Ux5BRc.js";import{d as yo}from "./dayOfYear.ts-DdscYtyU.js";import{d as Po}from "./debounce.ts-DtQl9QX-.js";import{d as Bo}from "./deepCopy.ts-DZSM2TJ5.js";import{e as Fo}from "./ellipsisString.ts-CEHck07f.js";import{f as wo}from "./formatFileSize.ts-DmkABYUs.js";import{f as ko}from "./formatSecond.ts-CI2ihnKf.js";import{g as Mo}from "./gcd.ts-BCWGat6T.js";import{g as No}from "./getAllTheNumbers.ts-DaNxVd8a.js";import{g as zo}from "./getElementCenterPosition.ts-CpWYej6j.js";import{g as Vo}from "./getImageSIze.ts-BKCUZEmG.js";import{g as qo}from "./getPointDistance.ts-oQIzWYT7.js";import{g as Qo}from "./getURLSearchParams.ts-CdkTE_NB.js";import{g as Ko}from "./grayColor.ts-bqVfONY0.js";import{i as Zo}from "./isPureNumber.ts-UvzCfFTt.js";import{m as Xo}from "./mediaAutoplayPolicies.ts-h8T8o7DV.js";import{p as $o}from "./parseQuery.ts-rxlqkZEE.js";import{p as rr}from "./passwordStrength.ts-BSVicol-.js";import{p as tr}from "./pick.ts-CVf1DuK1.js";import{p as sr}from "./printStr.ts-DMJqar33.js";import{p as pr}from "./pureNumber.ts-LjeTI9RC.js";import{q as xr}from "./quickSort.ts-CTYjJtIg.js";import{r as lr}from "./rafTimeout.ts-atBwwlgC.js";import{r as ur}from "./randomString.ts-DpWnx0Kc.js";import{r as gr}from "./removeTag.ts-K8ovHu9Z.js";import{s as hr}from "./safeCapitalizeWord.ts-CBBsQk5s.js";import{s as Tr}from "./singleton.ts-BxAjTJl8.js";import{t as Sr}from "./throttle.ts-D_EqcNzV.js";import{b as yr}from "./base64ToBlob.ts-TfYiqeZD.js";import{b as Pr}from "./base64ToFile.ts-DMMwTaBr.js";import{b as Br}from "./blobToBase64.ts-CPZTWtAM.js";import{b as Fr}from "./blobToFile.ts-BXmUv6W-.js";import{d as wr}from "./downloadFile.ts-1nf2IAw4.js";import{f as kr}from "./fileToBase64.ts-Dx4eMf1P.js";import{f as Mr}from "./fileToBlob.ts-t5-IVXI8.js";import{g as Nr}from "./getFileName.ts-BeGee0uD.js";import{g as zr}from "./getFileSuffix.ts-BNoXbi6l.js";import{u as Vr}from "./urlToBase64.ts-t7glJoIV.js";import{u as qr}from "./urlToBlob.ts-DDhIhkMn.js";import{u as Qr}from "./urlToFile.ts-Dp1k4tJm.js";import{c as Kr,f as Yr,l as Zr,s as Jr}from "./formatTimeUtils.ts-ng_eAUID.js";import{c as _r,e as $r,i as oe}from "./intersectionObserverUtils.ts-BdWvnE4X.js";import{d as ee,a as te,p as ae}from "./platformUtils.ts-BkXvuNq4.js";import{c as me}from "./event-B2tGdMqN.js";import{A as fe,D as xe}from "./AutoSliderList-CedBSQM5.js";import{A as le}from "./AvatarCrop-CSkrjAcy.js";import{A as ue,L as ce}from "./List-DXRmDwDo.js";import{B as de}from "./Button-CWrnOZH2.js";import{C as be}from "./Card3D-DrfpLxw2.js";import{C as Ce}from "./Checkbox-jOOMkqbP.js";import{c as ve}from "./ContextMenu-BW91eI6D.js";import{E as Oe,c as Pe}from "./VirtualList-CoQKjvuB.js";import{F as Be}from "./FileDropZone-Czdv3XF4.js";import{M as Fe}from "./MenuButton-M93IpBnN.js";import{m as we}from "./Message-C-4NUqae.js";import{M as ke}from "./Modal-C58i1Qbd.js";import{O as Me,a as Re}from "./Input-UCScuMXP.js";import{O as Ue}from "./Select-D5zgLQ8n.js";import{P as We}from "./Pagination-L17GYQVO.js";import{p as je}from "./PortalRenderer-izu9LyVc.js";import{R as Ge,a as Qe}from "./Radio-m9BOKzf5.js";import{S as Ke}from "./ScrollableTabs-DgcrSjsb.js";import{S as Ze}from "./SvgImg-HkuwJQ4_.js";import{S as Xe}from "./Switch-BEPzl8aC.js";import{T as $e}from "./TemplateDialog-B3LqEwG2.js";import{t as rt}from "./Toast-CERLQ4i7.js";import{T as tt}from "./Tooltip-DDUtx7BP.js";import{W as st}from "./Waterfall-DNvOPDGJ.js";export{fe as AutoSliderList,le as AvatarCrop,ue as AwaitList,de as Button,be as Card3D,Ce as Checkbox,xe as Direction,Oe as EstimatedVirtualList,Be as FileDropZone,ce as List,Fe as MenuButton,ke as Modal,Me as OnoInput,Ue as OnoSelect,Re as OnoTextarea,We as Pagination,Ge as Radio,Qe as RadioGroup,Ke as ScrollableTabs,Ze as SvgImg,Xe as Switch,$e as TemplateDialog,tt as Tooltip,st as Waterfall,io as addCommasToNumber,no as addEventWithOriginHandler,A as adjustColor,D as adjustingColors,C as async2syncUtils,yr as base64ToBlob,Pr as base64ToFile,Br as blobToBase64,Fr as blobToFile,y as browserUtils,co as calculateAspectRatio,ho as checkDeviceIsMobile,To as checkStatusCode,S as clearAsyncContagion,ve as contextMenu,Kr as convertSecondToOtherTime,So as copy2Clipboard,Pe as createDataSource,me as createEventEmitter,_r as createIntersectionObserver,yo as dayOfYear,Po as debounce,Bo as deepCopy,ee as distinguishPlatform,te as distinguishPlatformDelay,wr as downloadFile,$r as elementIsInViewport,Fo as ellipsisString,kr as fileToBase64,Mr as fileToBlob,I as formatColor,wo as formatFileSize,ko as formatSecond,Yr as formatTime,Mo as gcd,No as getAllTheNumbers,O as getBrowserInfo,E as getColorType,L as getContrastColor,zo as getElementCenterPosition,Nr as getFileName,zr as getFileSuffix,Vo as getImageSIze,qo as getPointDistance,Qo as getURLSearchParams,Ko as grayColor,R as hex2hsl,U as hex2hsv,W as hex2rgb,j as hex3To6,G as hsl2hex,H as hsl2rgb,Y as hsv2hex,J as hsv2rgb,oe as intersectionObserverUtils,Zo as isPureNumber,_ as isValidColor,Zr as localFormat,Xo as mediaAutoplayPolicies,we as message,$o as parseQuery,rr as passwordStrength,tr as pick,ae as platformUtils,je as portalRenderer,sr as printStr,pr as pureNumber,xr as quickSort,lr as rafTimeout,oo as randomColor,ur as randomString,gr as removeTag,eo as rgb2hex,ao as rgb2hsl,mo as rgb2hsv,fo as rgb2rgba,hr as safeCapitalizeWord,Jr as second2Day,Tr as singleton,Sr as throttle,rt as toast,Vr as urlToBase64,qr as urlToBlob,Qr as urlToFile,e as useClickOutSide,a as useCountdown,m as useEventListener,f as useGetElementSize,i as useKeyPress,n as useMouseClick,c as useQuery,d as useTheme,b as useThemePro};
1
+ import{u as x}from "./useClickOutSide.tsx-C6XuLZzd.js";import{u as l}from "./useCountdown.tsx-DWqs6wNp.js";import{u}from "./useEventListener.tsx-C8V9Qip6.js";import{u as g}from "./useGetElementSize.tsx-DML7z5Xp.js";import{u as h}from "./useKeyPress.tsx-hgs6v_Jt.js";import{u as C}from "./useMouseClick.tsx-BmzbuM6X.js";import{u as S}from "./useQuery.tsx-FzGWYq50.js";import{u as y}from "./useTheme.tsx-C-GCpzAS.js";import{u as A}from "./useThemePro.tsx-BIU8EPPB.js";import{a as P,c as w}from "./async2syncUtils.ts-DkF1iSK4.js";import{b as D,g as F}from "./browserUtils.ts-DSM1TN_g.js";import{a as E}from "./adjustColor.ts-Bcmtt429.js";import{a as M}from "./adjustingColors.ts-CpC0GUUO.js";import{f as R}from "./formatColor.ts-BpkK5FYe.js";import{g as z}from "./getColorType.ts-B-_g2UQs.js";import{g as V}from "./getContrastColor.ts-5KaKa1G7.js";import{g as q}from "./grayColor.ts-bqVfONY0.js";import{h as Q}from "./hex2hsl.ts-BLU_9tQG.js";import{h as H}from "./hex2hsv.ts-CNUNM2bM.js";import{h as Y}from "./hex2rgb.ts-BQpml6Tb.js";import{h as X}from "./hex3To6.ts-BNOY-YJ2.js";import{h as $}from "./hsl2hex.ts-D9xS0UDg.js";import{h as ro}from "./hsl2rgb.ts-B6-BIsnP.js";import{h as to}from "./hsv2hex.ts-BNkK519v.js";import{h as so}from "./hsv2rgb.ts-Bvoa3lA1.js";import{i as po}from "./isValidColor.ts-CpkuoTf9.js";import{r as xo}from "./randomColor.ts-Cf-bUfCt.js";import{r as lo}from "./rgb2hex.ts-Dkw9FDV4.js";import{r as uo}from "./rgb2hsl.ts-BPiSggZg.js";import{r as go}from "./rgb2hsv.ts-CxNRFDKF.js";import{r as bo}from "./rgb2rgba.ts-Dx8-1nZt.js";import{a as To}from "./addCommasToNumber.ts-Bc5ZX_HW.js";import{a as vo}from "./addEventWithOriginHandler.ts-CBP4faL-.js";import{c as Oo}from "./calculateAspectRatio.ts-DLTMZ6rT.js";import{c as Io}from "./chainClassNames.ts-B9vmfsc1.js";import{c as wo}from "./checkDeviceIsMobile.ts-D_9fa1Z1.js";import{c as Do}from "./checkStatusCode.ts-CeS5vbbx.js";import{c as ko}from "./copy2Clipboard.ts-D-Ux5BRc.js";import{d as Lo}from "./debounce.ts-DtQl9QX-.js";import{d as No}from "./deepCopy.ts-DZSM2TJ5.js";import{e as Uo}from "./ellipsisString.ts-CEHck07f.js";import{g as Wo}from "./gcd.ts-BCWGat6T.js";import{g as jo}from "./getAllTheNumbers.ts-DaNxVd8a.js";import{g as Go}from "./getElementCenterPosition.ts-CpWYej6j.js";import{g as Zo}from "./getImageSIze.ts-BKCUZEmG.js";import{g as Ko}from "./getPointDistance.ts-oQIzWYT7.js";import{g as Jo}from "./getURLSearchParams.ts-CdkTE_NB.js";import{i as _o}from "./isPureNumber.ts-UvzCfFTt.js";import{m as or}from "./mediaAutoplayPolicies.ts-h8T8o7DV.js";import{p as er}from "./padZero.ts-BTMKlRWN.js";import{p as ar}from "./parseQuery.ts-rxlqkZEE.js";import{p as mr}from "./passwordStrength.ts-BSVicol-.js";import{p as fr}from "./pick.ts-CVf1DuK1.js";import{p as ir}from "./printStr.ts-Nd8JNyzN.js";import{p as nr}from "./pureNumber.ts-LjeTI9RC.js";import{q as cr}from "./quickSort.ts-CTYjJtIg.js";import{r as dr}from "./rafTimeout.ts-atBwwlgC.js";import{r as br}from "./randomString.ts-DpWnx0Kc.js";import{r as Tr}from "./removeTag.ts-K8ovHu9Z.js";import{s as vr}from "./safeCapitalizeWord.ts-CBBsQk5s.js";import{s as Or}from "./singleton.ts-BxAjTJl8.js";import{t as Ir}from "./throttle.ts-D_EqcNzV.js";import{b as wr}from "./base64ToBlob.ts-TfYiqeZD.js";import{b as Dr}from "./base64ToFile.ts-DMMwTaBr.js";import{b as kr}from "./blobToBase64.ts-CPZTWtAM.js";import{b as Lr}from "./blobToFile.ts-BXmUv6W-.js";import{d as Nr}from "./downloadFile.ts-1nf2IAw4.js";import{f as Ur}from "./fileToBase64.ts-Dx4eMf1P.js";import{f as Wr}from "./fileToBlob.ts-t5-IVXI8.js";import{f as jr}from "./formatFileSize.ts-DmkABYUs.js";import{g as Gr}from "./getFileName.ts-BeGee0uD.js";import{g as Zr}from "./getFileSuffix.ts-BNoXbi6l.js";import{u as Kr}from "./urlToBase64.ts-t7glJoIV.js";import{u as Jr}from "./urlToBlob.ts-DDhIhkMn.js";import{u as _r}from "./urlToFile.ts-Dp1k4tJm.js";import{c as oe,e as re,i as ee}from "./intersectionObserverUtils.ts-BdWvnE4X.js";import{d as a}from "./distinguishPlatform.ts-D2huTxC3.js";import{c as ae}from "./convertSecondToOtherTime.ts-BJegkJhl.js";import{d as me}from "./dayOfYear.ts-DdscYtyU.js";import{f as fe}from "./formatSecond.ts-CI2ihnKf.js";import{f as ie}from "./formatTime.ts-DNtDsT9L.js";import{l as ne}from "./localFormat.ts-vxgGt_Za.js";import{s as ce}from "./second2Day.ts-DHntMxxp.js";import{c as de}from "./event-B2tGdMqN.js";import{A as be,D as Ce}from "./AutoSliderList-CVDZG5cu.js";import{A as Se}from "./AvatarCrop-CSkrjAcy.js";import{A as ye,L as Oe}from "./List-DXRmDwDo.js";import{B as Ie}from "./Button-P2AG5fc6.js";import{C as we}from "./Card3D-DrfpLxw2.js";import{C as De}from "./Carousel-DOesUSmW.js";import{C as ke}from "./Checkbox-DJYMF9I4.js";import{c as Le}from "./ContextMenu-DlhlsQrA.js";import{E as Ne,c as Re}from "./VirtualList-CoQKjvuB.js";import{F as ze}from "./FileDropZone-BSLGVa4n.js";import{M as Ve}from "./MenuButton-M93IpBnN.js";import{m as qe}from "./Message-COQA0S8d.js";import{M as Qe}from "./Modal-CJrgmTMc.js";import{O as He,a as Ke}from "./Input-Hy30rZ_v.js";import{O as Je}from "./Select-bhQ7DjXD.js";import{P as _e}from "./Pagination-L17GYQVO.js";import{p as ot}from "./PortalRenderer-izu9LyVc.js";import{R as et,a as tt}from "./Radio-CEooiIll.js";import{S as st}from "./ScrollableTabs-okdQWyZ9.js";import{S as pt}from "./SvgImg-D_jzo9p9.js";import{S as xt}from "./Switch-DZ-GXwol.js";import{T as lt}from "./TemplateDialog-iy7z7joV.js";import{t as ut}from "./Toast-CZw9LQzq.js";import{T as gt}from "./Tooltip-DvUB7xZH.js";import{W as ht}from "./Waterfall-B9EXJfxK.js";const m=({onAndroid:o,onIOS:r,onUnknown:e,timeout:t=500})=>()=>{setTimeout(()=>a({onAndroid:o,onIOS:r,onUnknown:e}),t);};export{be as AutoSliderList,Se as AvatarCrop,ye as AwaitList,Ie as Button,we as Card3D,De as Carousel,ke as Checkbox,Ce as Direction,Ne as EstimatedVirtualList,ze as FileDropZone,Oe as List,Ve as MenuButton,Qe as Modal,He as OnoInput,Je as OnoSelect,Ke as OnoTextarea,_e as Pagination,et as Radio,tt as RadioGroup,st as ScrollableTabs,pt as SvgImg,xt as Switch,lt as TemplateDialog,gt as Tooltip,ht as Waterfall,To as addCommasToNumber,vo as addEventWithOriginHandler,E as adjustColor,M as adjustingColors,P as async2syncUtils,wr as base64ToBlob,Dr as base64ToFile,kr as blobToBase64,Lr as blobToFile,D as browserUtils,Oo as calculateAspectRatio,Io as chainClassNames,wo as checkDeviceIsMobile,Do as checkStatusCode,w as clearAsyncContagion,Le as contextMenu,ae as convertSecondToOtherTime,ko as copy2Clipboard,Re as createDataSource,de as createEventEmitter,oe as createIntersectionObserver,me as dayOfYear,Lo as debounce,No as deepCopy,a as distinguishPlatform,m as distinguishPlatformDelay,Nr as downloadFile,re as elementIsInViewport,Uo as ellipsisString,Ur as fileToBase64,Wr as fileToBlob,R as formatColor,jr as formatFileSize,fe as formatSecond,ie as formatTime,Wo as gcd,jo as getAllTheNumbers,F as getBrowserInfo,z as getColorType,V as getContrastColor,Go as getElementCenterPosition,Gr as getFileName,Zr as getFileSuffix,Zo as getImageSIze,Ko as getPointDistance,Jo as getURLSearchParams,q as grayColor,Q as hex2hsl,H as hex2hsv,Y as hex2rgb,X as hex3To6,$ as hsl2hex,ro as hsl2rgb,to as hsv2hex,so as hsv2rgb,ee as intersectionObserverUtils,_o as isPureNumber,po as isValidColor,ne as localFormat,or as mediaAutoplayPolicies,qe as message,er as padZero,ar as parseQuery,mr as passwordStrength,fr as pick,ot as portalRenderer,ir as printStr,nr as pureNumber,cr as quickSort,dr as rafTimeout,xo as randomColor,br as randomString,Tr as removeTag,lo as rgb2hex,uo as rgb2hsl,go as rgb2hsv,bo as rgb2rgba,vr as safeCapitalizeWord,ce as second2Day,Or as singleton,Ir as throttle,ut as toast,Kr as urlToBase64,Jr as urlToBlob,_r as urlToFile,x as useClickOutSide,l as useCountdown,u as useEventListener,g as useGetElementSize,h as useKeyPress,C as useMouseClick,S as useQuery,y as useTheme,A as useThemePro};
@@ -0,0 +1 @@
1
+ import{p as o}from "./padZero.ts-BTMKlRWN.js";import{c as u}from "./convertTimestamp.ts-DOHA1Ix6.js";import{d as n}from "./dateFormat.ts-DXskLY1N.js";import{m as i}from "./monthFormat.ts-B_s3ZbNy.js";import{y as a}from "./yearFormat.ts-DxbWP43R.js";const D=(h,r="YY-MM-DD hh:mm:ss",e="cn")=>{const p=["YY","MM","DD","hh","mm","ss"],t=[],s=u(h);t.push(a(s.getFullYear().toString(),e)),t.push(i(o(s.getMonth()+1),e)),t.push(n(o(s.getDate()),e)),t.push(o(s.getHours())),t.push(o(s.getMinutes())),t.push(o(s.getSeconds()));for(let m in t)r=r.replace(p[m],t[m]);return r;};export{D as l};
@@ -0,0 +1 @@
1
+ const a=(e,n)=>({en:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sept","Oct","Nov","Dec"],cn:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"]})[n][Number(e)-1];export{a as m};
@@ -0,0 +1 @@
1
+ const s=(p)=>p<10 ? `0${p}`:`${p}`;export{s as p};
@@ -0,0 +1 @@
1
+ const i=({el:t,str:e="hello world",speed:x=100,isExtendStr:l=!0,onDone:o})=>{let n=0,s=null;t.textContent&&l&&(n=t.textContent.length,e=t.textContent+e);const r=()=>{clearTimeout(s);const c=e.substring(0,n+1);t.textContent=c,n++,n!==e.length ? s=setTimeout(r,x):o==null||o();};r();};export{i as p};
@@ -0,0 +1 @@
1
+ import{p}from "./padZero.ts-BTMKlRWN.js";const l=(r,t)=>{const s=["DD","hh","mm","ss"],o=[];o.push(Math.floor(r/86400)),o.push(p(Math.floor(r%86400/3600))),o.push(p(Math.floor(r%3600/60))),o.push(p(r%60));for(let h=0;h<s.length;h++)t=t.replace(s[h],o[h].toString());return t;};export{l as s};
@@ -0,0 +1 @@
1
+ const r=(n,e)=>{const t={en:["0","1","2","3","4","5","6","7","8","9"],cn:["零","一","二","三","四","五","六","七","八","九"]};return n.split("").map((o)=>t[e][Number(o)]).join("");};export{r as y};
package/dist/index.css CHANGED
@@ -1 +1 @@
1
- :root{--bg-color:pink}@keyframes ono-loading{0%{rotate:0deg}to{rotate:1turn}}.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}.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%}.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}}.ono-card{overflow:hidden;transition:all .3s linear,width 0s,height 0s}.ono-card:hover{box-shadow:var(--sd)}.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;rotate:-45deg;top:50%;translate:-50% calc(-50% - var(--w)/24*3);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%;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%}.ono-file-process-container{align-items:center;display:flex;flex-direction:column;height:100%;overflow-x:hidden;overflow-y:auto;width:100%}.ono-file-process-container.ono-file-process-container-box{background:transparent;border:1px dashed #000;border-radius:10px}.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}.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}.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}}.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%;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;scale:0;top:var(--top)}to{left:50%;opacity:1;scale:1;top:50%}}@keyframes ono-modal-leave{0%{left:50%;opacity:1;scale:1;top:50%}to{left:var(--left);opacity:0;scale:0;top:var(--top)}}.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}.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%;translate:-50% -50%;width:50%}.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}.ono-tooltip-popper{background:var(--tooltip-bg,#333);border:1px solid var(--tooltip-border-color,#666);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-color:inherit;border-left:1px solid var(--tooltip-border-color,#666);border-top:1px solid var(--tooltip-border-color,#666);height:8px;position:absolute;width:8px}.ono-tooltip-popper .ono-tooltip-popper-arrow{visibility:hidden}.ono-tooltip-popper .ono-tooltip-popper-arrow:before{content:"";rotate:45deg;visibility:visible}.ono-tooltip-popper[data-popper-placement^=top]>.ono-tooltip-popper-arrow{bottom:-5.5px}.ono-tooltip-popper[data-popper-placement^=bottom]>.ono-tooltip-popper-arrow{top:-5.5px}.ono-tooltip-popper[data-popper-placement^=left]>.ono-tooltip-popper-arrow{right:-5.5px}.ono-tooltip-popper[data-popper-placement^=right]>.ono-tooltip-popper-arrow{left:-5.5px}.ono-select{width:100%}.ono-select .ono-select-arrow-down-icon{color:#666;height:12px;transition:rotate .2s linear;width:12px}.ono-select .ono-select-arrow-down-active{rotate:180deg}.ono-option-container{--tooltip-bg:#fff;--tooltip-border-color:#999;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}.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;translate:calc(var(--w)*-1);width:100%}.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{translate:calc(var(--w) - var(--h)) 0}.ono-switch input[type=checkbox]:checked+.ono-switch-box>.ono-switch-children-bar{translate:calc(var(--h)/8) 0}.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:translate .3s;width:calc(var(--h)*3/4)}.ono-switch .ono-switch-children-bar{display:flex;position:absolute;top:calc(var(--h)/8);translate:calc((var(--w) - var(--h)*9/8)*-1) 0}.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)}.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%;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;scale:0;top:var(--top)}to{left:50%;opacity:1;scale:1;top:50%}}@keyframes zoom-leave{0%{left:50%;opacity:1;scale:1;top:50%}to{left:var(--left);opacity:0;scale:0;top:var(--top)}}@keyframes fade-enter{0%{opacity:0;top:var(--top);translate:-50% -100%}to{opacity:1;top:50%;translate:-50% -50%}}@keyframes fade-leave{0%{opacity:1;top:50%;translate:-50% -50%}to{opacity:0;top:var(--top);translate:-50% -100%}}._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)}}.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:translate .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}
1
+ :root{--bg-color:pink}@keyframes ono-loading{0%{rotate:0deg}to{rotate:1turn}}.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}.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%}.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}}.ono-card{overflow:hidden;transition:all .3s linear,width 0s,height 0s}.ono-card:hover{box-shadow:var(--sd)}.ono-carousel button{background:none;border:none;cursor:pointer;margin:0;outline:none;padding:0}.ono-carousel-container{height:100%;overflow:hidden;position:relative;width:100%}.ono-carousel-wrapper{align-items:center;display:flex;justify-content:center;left:0;position:absolute;top:0;transform-origin:top left}.ono-carousel-top{left:50%;position:absolute;top:0;transform:translate(-50%)}.ono-carousel-left{left:0}.ono-carousel-left,.ono-carousel-right{position:absolute;top:50%;transform:translateY(-50%)}.ono-carousel-right{right:0}.ono-carousel-bottom{bottom:0;left:50%;position:absolute;transform:translate(-50%)}.ono-carousel-indicators{align-items:center;bottom:8px;display:flex;gap:8px;justify-content:center;left:0;position:absolute;width:100%}.ono-carousel-indicator{background:#ccc;border-radius:50%;height:8px;width:8px}.ono-carousel-slider{transition:transform var(--speed) ease-in-out}.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;rotate:-45deg;top:50%;translate:-50% calc(-50% - var(--w)/24*3);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%;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%}.ono-file-process-container{align-items:center;display:flex;flex-direction:column;height:100%;overflow-x:hidden;overflow-y:auto;width:100%}.ono-file-process-container.ono-file-process-container-box{background:transparent;border:1px dashed #000;border-radius:10px}.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}.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}.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}}.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%;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;scale:0;top:var(--top)}to{left:50%;opacity:1;scale:1;top:50%}}@keyframes ono-modal-leave{0%{left:50%;opacity:1;scale:1;top:50%}to{left:var(--left);opacity:0;scale:0;top:var(--top)}}.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}.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%;translate:-50% -50%;width:50%}.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}.ono-tooltip-popper{background:var(--tooltip-bg,#333);border:1px solid var(--tooltip-border-color,#666);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-color:inherit;border-left:1px solid var(--tooltip-border-color,#666);border-top:1px solid var(--tooltip-border-color,#666);height:8px;position:absolute;width:8px}.ono-tooltip-popper .ono-tooltip-popper-arrow{visibility:hidden}.ono-tooltip-popper .ono-tooltip-popper-arrow:before{content:"";rotate:45deg;visibility:visible}.ono-tooltip-popper[data-popper-placement^=top]>.ono-tooltip-popper-arrow{bottom:-5.5px}.ono-tooltip-popper[data-popper-placement^=bottom]>.ono-tooltip-popper-arrow{top:-5.5px}.ono-tooltip-popper[data-popper-placement^=left]>.ono-tooltip-popper-arrow{right:-5.5px}.ono-tooltip-popper[data-popper-placement^=right]>.ono-tooltip-popper-arrow{left:-5.5px}.ono-select{width:100%}.ono-select .ono-select-arrow-down-icon{color:#666;height:12px;transition:rotate .2s linear;width:12px}.ono-select .ono-select-arrow-down-active{rotate:180deg}.ono-option-container{--tooltip-bg:#fff;--tooltip-border-color:#999;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}.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;translate:calc(var(--w)*-1);width:100%}.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{translate:calc(var(--w) - var(--h)) 0}.ono-switch input[type=checkbox]:checked+.ono-switch-box>.ono-switch-children-bar{translate:calc(var(--h)/8) 0}.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:translate .3s;width:calc(var(--h)*3/4)}.ono-switch .ono-switch-children-bar{display:flex;position:absolute;top:calc(var(--h)/8);translate:calc((var(--w) - var(--h)*9/8)*-1) 0}.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)}.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%;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;scale:0;top:var(--top)}to{left:50%;opacity:1;scale:1;top:50%}}@keyframes zoom-leave{0%{left:50%;opacity:1;scale:1;top:50%}to{left:var(--left);opacity:0;scale:0;top:var(--top)}}@keyframes fade-enter{0%{opacity:0;top:var(--top);translate:-50% -100%}to{opacity:1;top:50%;translate:-50% -50%}}@keyframes fade-leave{0%{opacity:1;top:50%;translate:-50% -50%}to{opacity:0;top:var(--top);translate:-50% -100%}}._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)}}.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:translate .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}
@@ -0,0 +1 @@
1
+ .ono-carousel button{background:none;border:none;cursor:pointer;margin:0;outline:none;padding:0}.ono-carousel-container{height:100%;overflow:hidden;position:relative;width:100%}.ono-carousel-wrapper{align-items:center;display:flex;justify-content:center;left:0;position:absolute;top:0;transform-origin:top left}.ono-carousel-top{left:50%;position:absolute;top:0;transform:translate(-50%)}.ono-carousel-left{left:0}.ono-carousel-left,.ono-carousel-right{position:absolute;top:50%;transform:translateY(-50%)}.ono-carousel-right{right:0}.ono-carousel-bottom{bottom:0;left:50%;position:absolute;transform:translate(-50%)}.ono-carousel-indicators{align-items:center;bottom:8px;display:flex;gap:8px;justify-content:center;left:0;position:absolute;width:100%}.ono-carousel-indicator{background:#ccc;border-radius:50%;height:8px;width:8px}.ono-carousel-slider{transition:transform var(--speed) ease-in-out}
@@ -0,0 +1,2 @@
1
+ import { CarouselProps } from './types';
2
+ export declare const Carousel: ({ style, current, children, className, prevButton, nextButton, dots, speed, afterChange, duration, autoPlay, isShowArrow, waitForAnimate, direction }: CarouselProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1 @@
1
+ export { Carousel } from './Carousel';
@@ -0,0 +1,17 @@
1
+ import { CSSProperties, ReactElement, ReactNode } from 'react';
2
+ export interface CarouselProps {
3
+ current?: number;
4
+ speed?: number;
5
+ dots?: boolean;
6
+ duration?: number;
7
+ autoPlay?: boolean;
8
+ className?: string;
9
+ style?: CSSProperties;
10
+ children: ReactElement[];
11
+ waitForAnimate?: boolean;
12
+ direction?: 'vertical' | 'horizontal';
13
+ isShowArrow?: boolean;
14
+ prevButton?: ReactNode | (() => ReactNode);
15
+ nextButton?: ReactNode | (() => ReactNode);
16
+ afterChange?: (current: number) => void;
17
+ }
@@ -2,6 +2,7 @@ export * from './AutoSliderList';
2
2
  export * from './AvatarCrop';
3
3
  export * from './Button';
4
4
  export * from './Card3D';
5
+ export * from './Carousel';
5
6
  export * from './Checkbox';
6
7
  export * from './ContextMenu';
7
8
  export * from './FileDropZone';
@@ -5,5 +5,5 @@ type OutsideOptions = {
5
5
  event?: ClickEventTypes | ClickEventTypes[];
6
6
  deps?: DependencyList;
7
7
  };
8
- declare const _default: (outsideElement: OutsideElementTypes, handler: (e: MouseEvent) => void, options?: OutsideOptions) => (() => void) | undefined;
9
- export default _default;
8
+ export declare const useClickOutSide: (outsideElement: OutsideElementTypes, handler: (e: MouseEvent) => void, options?: OutsideOptions) => (() => void) | undefined;
9
+ export {};
@@ -1,2 +1 @@
1
- declare const _default: (initialTime?: number, onFinish?: () => void) => readonly [number, () => void, () => void];
2
- export default _default;
1
+ export declare const useCountdown: (initialTime?: number, onFinish?: () => void) => readonly [number, () => void, () => void];
@@ -4,5 +4,5 @@ type EventListenerOptions = {
4
4
  target?: EventTarget;
5
5
  deps?: DependencyList;
6
6
  };
7
- declare const _default: (event: string | string[], handler: (e: Event) => void, options?: EventListenerOptions) => (() => void) | undefined;
8
- export default _default;
7
+ export declare const useEventListener: (event: string | string[], handler: (e: Event) => void, options?: EventListenerOptions) => (() => void) | undefined;
8
+ export {};
@@ -1,6 +1,5 @@
1
1
  import { RefObject } from 'react';
2
- declare const _default: (target?: HTMLElement | RefObject<HTMLElement | null> | (() => HTMLElement | RefObject<HTMLElement | null>) | null) => {
2
+ export declare const useGetElementSize: (target?: HTMLElement | RefObject<HTMLElement | null> | (() => HTMLElement | RefObject<HTMLElement | null>) | null) => {
3
3
  w: number;
4
4
  h: number;
5
5
  };
6
- export default _default;
@@ -8,5 +8,5 @@ type Options = {
8
8
  exactMatch?: boolean;
9
9
  };
10
10
  type FunctionKey = 'Ctrl' | 'Shift' | 'Alt' | 'Meta' | 'CommandOrControl';
11
- declare const _default: (keyFilter: KeyType | KeyType[], eventHandler: (event: KeyboardEvent, key: KeyType) => void, options?: Options) => void;
12
- export default _default;
11
+ export declare const useKeyPress: (keyFilter: KeyType | KeyType[], eventHandler: (event: KeyboardEvent, key: KeyType) => void, options?: Options) => void;
12
+ export {};
@@ -1,4 +1,4 @@
1
- declare const _default: () => {
1
+ export declare const useMouseClick: () => {
2
2
  clientX: number;
3
3
  clientY: number;
4
4
  screenX: number;
@@ -6,4 +6,3 @@ declare const _default: () => {
6
6
  pageX: number;
7
7
  pageY: number;
8
8
  };
9
- export default _default;
@@ -1,4 +1,3 @@
1
- declare const _default: () => {
1
+ export declare const useQuery: () => {
2
2
  [key: string]: string;
3
3
  };
4
- export default _default;
@@ -4,5 +4,5 @@ type useThemeProps = {
4
4
  onDark: () => void;
5
5
  onLight: () => void;
6
6
  };
7
- declare const _default: ({ theme, onDark, onLight }: useThemeProps) => void;
8
- export default _default;
7
+ export declare const useTheme: ({ theme, onDark, onLight }: useThemeProps) => void;
8
+ export {};
@@ -3,9 +3,9 @@ interface useThemeProps {
3
3
  initTheme?: ThemeType;
4
4
  themeRules?: (isDark: boolean) => void;
5
5
  }
6
- declare const _default: (options?: useThemeProps) => readonly [ThemeType, ({ targetTheme, element, onChange }: {
6
+ export declare const useThemePro: (options?: useThemeProps) => readonly [ThemeType, ({ targetTheme, element, onChange }: {
7
7
  targetTheme: ThemeType;
8
8
  element?: HTMLElement;
9
9
  onChange?: () => void;
10
10
  }) => void];
11
- export default _default;
11
+ export {};