ono-react-element 0.0.15 → 0.0.16

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/es/index.js CHANGED
@@ -17,6 +17,7 @@ import { B as B2 } from "./Button-C89izu2m.js";
17
17
  import { C as C2 } from "./Card3D-DMvCSUhe.js";
18
18
  import { C as C3 } from "./Checkbox-daBabj14.js";
19
19
  import { E as E2, c as c5 } from "./VirtualList-w16-kBkT.js";
20
+ import { i as i2 } from "./InjunctiveBox-DUNoNHCO.js";
20
21
  import { M } from "./MenuButton-DHkU5Bq7.js";
21
22
  import { m as m2 } from "./Message-BGDILiLc.js";
22
23
  import { M as M2 } from "./Modal-BIFxRjSt.js";
@@ -85,6 +86,7 @@ export {
85
86
  s as getPointDistance,
86
87
  t as getURLSearchParams,
87
88
  u9 as grayColor,
89
+ i2 as injunctiveBox,
88
90
  l2 as localFormat,
89
91
  v as mediaAutoplayPolicies,
90
92
  m2 as message,
@@ -1,4 +1,4 @@
1
- import { AutoSliderList, AvatarCrop, AwaitList, Button, Card3D, Checkbox, createDataSource, Direction, EstimatedVirtualList, List, MenuButton, message, Modal, OnoInput, OnoSelect, OnoTextarea, Pagination, portalRenderer, Radio, RadioGroup, SvgImg, Switch, TemplateDialog, toast, Tooltip, Waterfall, ImageItem } from './components';
1
+ import { AutoSliderList, AvatarCrop, AwaitList, Button, Card3D, Checkbox, createDataSource, Direction, EstimatedVirtualList, injunctiveBox, List, MenuButton, message, Modal, OnoInput, OnoSelect, OnoTextarea, Pagination, portalRenderer, Radio, RadioGroup, SvgImg, Switch, TemplateDialog, toast, Tooltip, Waterfall, ImageItem } from './components';
2
2
  import { default as useClickOutSide } from './hooks/useClickOutSide';
3
3
  import { default as useCountdown } from './hooks/useCountdown';
4
4
  import { default as useEventListener } from './hooks/useEventListener';
@@ -11,5 +11,5 @@ import { default as colorUtils, adjustingColors } from './utils/colorUtils';
11
11
  import { default as common, addCommasToNumber, addEventWithOriginHandler, calculateAspectRatio, checkDeviceIsMobile, checkStatusCode, copy2Clipboard, createIntersectionObserver, dayOfYear, deepCopy, downloadFile, formatFileSize, formatSecondes, getElementCenterPosition, getFileName, getFileSuffix, getImageSIze, getPointDistance, getURLSearchParams, grayColor, mediaAutoplayPolicies, parseQuery, passwordStrength, pick, printStr, pureNumber, quickSort, rafTimeout, randomString, safeCapitalizeWord, singleton } from './utils/common';
12
12
  import { base64ToBlob, base64ToFile, blobToBase64, blobToFile, fileToBase64, fileToBlob, urlToBase64, urlToBlob, urlToFile } from './utils/fileFormatConversion';
13
13
  import { convertSecondToOtherTime, formatTime, localFormat, second2Day } from './utils/formatTimeUtils';
14
- export { addCommasToNumber, addEventWithOriginHandler, adjustingColors, AutoSliderList, AvatarCrop, AwaitList, base64ToBlob, base64ToFile, blobToBase64, blobToFile, Button, calculateAspectRatio, Card3D, Checkbox, checkDeviceIsMobile, checkStatusCode, colorUtils, common, convertSecondToOtherTime, copy2Clipboard, createDataSource, createIntersectionObserver, dayOfYear, deepCopy, Direction, downloadFile, EstimatedVirtualList, fileToBase64, fileToBlob, formatFileSize, formatSecondes, formatTime, getElementCenterPosition, getFileName, getFileSuffix, getImageSIze, getPointDistance, getURLSearchParams, grayColor, List, localFormat, mediaAutoplayPolicies, MenuButton, message, Modal, OnoInput, OnoSelect, OnoTextarea, Pagination, parseQuery, passwordStrength, pick, portalRenderer, printStr, pureNumber, quickSort, Radio, RadioGroup, rafTimeout, randomString, safeCapitalizeWord, second2Day, singleton, SvgImg, Switch, TemplateDialog, toast, Tooltip, urlToBase64, urlToBlob, urlToFile, useClickOutSide, useCountdown, useEventListener, useGetElementSize, useKeyPress, useMouseClick, useTheme, useThemePro, Waterfall };
14
+ export { addCommasToNumber, addEventWithOriginHandler, adjustingColors, AutoSliderList, AvatarCrop, AwaitList, base64ToBlob, base64ToFile, blobToBase64, blobToFile, Button, calculateAspectRatio, Card3D, Checkbox, checkDeviceIsMobile, checkStatusCode, colorUtils, common, convertSecondToOtherTime, copy2Clipboard, createDataSource, createIntersectionObserver, dayOfYear, deepCopy, Direction, downloadFile, EstimatedVirtualList, fileToBase64, fileToBlob, formatFileSize, formatSecondes, formatTime, getElementCenterPosition, getFileName, getFileSuffix, getImageSIze, getPointDistance, getURLSearchParams, grayColor, injunctiveBox, List, localFormat, mediaAutoplayPolicies, MenuButton, message, Modal, OnoInput, OnoSelect, OnoTextarea, Pagination, parseQuery, passwordStrength, pick, portalRenderer, printStr, pureNumber, quickSort, Radio, RadioGroup, rafTimeout, randomString, safeCapitalizeWord, second2Day, singleton, SvgImg, Switch, TemplateDialog, toast, Tooltip, urlToBase64, urlToBlob, urlToFile, useClickOutSide, useCountdown, useEventListener, useGetElementSize, useKeyPress, useMouseClick, useTheme, useThemePro, Waterfall };
15
15
  export type { ImageItem, ThemeType };
@@ -1255,7 +1255,7 @@
1255
1255
  var t2 = e3.type;
1256
1256
  return (e3 = e3.nodeName) && "input" === e3.toLowerCase() && ("checkbox" === t2 || "radio" === t2);
1257
1257
  }
1258
- function pt(e3) {
1258
+ function pt2(e3) {
1259
1259
  e3._valueTracker || (e3._valueTracker = (function(e4) {
1260
1260
  var t2 = ft2(e4) ? "checked" : "value", n2 = Object.getOwnPropertyDescriptor(e4.constructor.prototype, t2), r3 = "" + e4[t2];
1261
1261
  if (!e4.hasOwnProperty(t2) && void 0 !== n2 && "function" == typeof n2.get && "function" == typeof n2.set) {
@@ -1274,7 +1274,7 @@
1274
1274
  }
1275
1275
  })(e3));
1276
1276
  }
1277
- function ht(e3) {
1277
+ function ht2(e3) {
1278
1278
  if (!e3) return false;
1279
1279
  var t2 = e3._valueTracker;
1280
1280
  if (!t2) return true;
@@ -1398,7 +1398,7 @@
1398
1398
  bt(r3, a3.value, a3.defaultValue, a3.defaultValue, a3.checked, a3.defaultChecked, a3.type, a3.name);
1399
1399
  }
1400
1400
  }
1401
- for (t2 = 0; t2 < n2.length; t2++) (r3 = n2[t2]).form === e3.form && ht(r3);
1401
+ for (t2 = 0; t2 < n2.length; t2++) (r3 = n2[t2]).form === e3.form && ht2(r3);
1402
1402
  }
1403
1403
  break e;
1404
1404
  case "textarea":
@@ -1556,7 +1556,7 @@
1556
1556
  Ac(e3, 0);
1557
1557
  }
1558
1558
  function jn(e3) {
1559
- if (ht(Ve2(e3))) return e3;
1559
+ if (ht2(Ve2(e3))) return e3;
1560
1560
  }
1561
1561
  function Un(e3, t2) {
1562
1562
  if ("change" === e3) return t2;
@@ -1860,13 +1860,13 @@
1860
1860
  jc("toggle", t2);
1861
1861
  break;
1862
1862
  case "input":
1863
- jc("invalid", t2), vt(t2, r3.value, r3.defaultValue, r3.checked, r3.defaultChecked, r3.type, r3.name, true), pt(t2);
1863
+ jc("invalid", t2), vt(t2, r3.value, r3.defaultValue, r3.checked, r3.defaultChecked, r3.type, r3.name, true), pt2(t2);
1864
1864
  break;
1865
1865
  case "select":
1866
1866
  jc("invalid", t2);
1867
1867
  break;
1868
1868
  case "textarea":
1869
- jc("invalid", t2), xt(t2, r3.value, r3.defaultValue, r3.children), pt(t2);
1869
+ jc("invalid", t2), xt(t2, r3.value, r3.defaultValue, r3.children), pt2(t2);
1870
1870
  }
1871
1871
  "string" != typeof (n2 = r3.children) && "number" != typeof n2 && "bigint" != typeof n2 || t2.textContent === "" + n2 || true === r3.suppressHydrationWarning || Zc(t2.textContent, n2) ? (null != r3.popover && (jc("beforetoggle", t2), jc("toggle", t2)), null != r3.onScroll && jc("scroll", t2), null != r3.onScrollEnd && jc("scrollend", t2), null != r3.onClick && (t2.onclick = Jc), t2 = true) : t2 = false, t2 || da(e3);
1872
1872
  }
@@ -6091,7 +6091,7 @@
6091
6091
  ed(e3, t2, a3, d3, n2, null);
6092
6092
  }
6093
6093
  }
6094
- return vt(e3, r3, s3, u3, c3, i3, l3, false), void pt(e3);
6094
+ return vt(e3, r3, s3, u3, c3, i3, l3, false), void pt2(e3);
6095
6095
  case "select":
6096
6096
  for (l3 in jc("invalid", e3), a3 = i3 = r3 = null, n2) if (n2.hasOwnProperty(l3) && null != (s3 = n2[l3])) switch (l3) {
6097
6097
  case "value":
@@ -6123,7 +6123,7 @@
6123
6123
  default:
6124
6124
  ed(e3, t2, i3, s3, n2, null);
6125
6125
  }
6126
- return xt(e3, a3, l3, r3), void pt(e3);
6126
+ return xt(e3, a3, l3, r3), void pt2(e3);
6127
6127
  case "option":
6128
6128
  for (u3 in n2) n2.hasOwnProperty(u3) && null != (a3 = n2[u3]) && ("selected" === u3 ? e3.selected = a3 && "function" != typeof a3 && "symbol" != typeof a3 : ed(e3, t2, u3, a3, n2, null));
6129
6129
  return;
@@ -7193,7 +7193,7 @@
7193
7193
  t2 = Fv;
7194
7194
  }
7195
7195
  }
7196
- n2 = { context: t2, ancestorInfo: n2 = ht(null, n2 = n2.toLowerCase()) }, E2(Zc, e3), T2(Zc, n2, e3);
7196
+ n2 = { context: t2, ancestorInfo: n2 = ht2(null, n2 = n2.toLowerCase()) }, E2(Zc, e3), T2(Zc, n2, e3);
7197
7197
  }
7198
7198
  function _2(e3) {
7199
7199
  E2(Zc, e3), E2(Jc, e3), E2(ed, e3);
@@ -7204,7 +7204,7 @@
7204
7204
  function N2(e3) {
7205
7205
  null !== e3.memoizedState && T2(td, e3, e3);
7206
7206
  var t2 = P2(Zc.current), n2 = e3.type, r3 = Zs(t2.context, n2);
7207
- t2 !== (r3 = { context: r3, ancestorInfo: n2 = ht(t2.ancestorInfo, n2) }) && (T2(Jc, e3, e3), T2(Zc, r3, e3));
7207
+ t2 !== (r3 = { context: r3, ancestorInfo: n2 = ht2(t2.ancestorInfo, n2) }) && (T2(Jc, e3, e3), T2(Zc, r3, e3));
7208
7208
  }
7209
7209
  function L2(e3) {
7210
7210
  Jc.current === e3 && (E2(Zc, e3), E2(Jc, e3)), td.current === e3 && (E2(td, e3), bk._currentValue = yk);
@@ -8057,11 +8057,11 @@
8057
8057
  return "";
8058
8058
  }
8059
8059
  }
8060
- function pt(e3, t2, n2) {
8060
+ function pt2(e3, t2, n2) {
8061
8061
  for (var r3 = t2, a3 = null, o3 = 0; r3; ) r3 === e3 && (o3 = 0), a3 = { fiber: r3, children: null !== a3 ? [a3] : [], serverProps: r3 === t2 ? n2 : r3 === e3 ? null : void 0, serverTail: [], distanceFromLeaf: o3 }, o3++, r3 = r3.return;
8062
8062
  return null !== a3 ? ft2(a3).replaceAll(/^[+-]/gm, ">") : "";
8063
8063
  }
8064
- function ht(e3, t2) {
8064
+ function ht2(e3, t2) {
8065
8065
  var n2 = Tc({}, e3 || hf), r3 = { tag: t2 };
8066
8066
  return -1 !== df.indexOf(t2) && (n2.aTagInScope = null, n2.buttonTagInScope = null, n2.nobrTagInScope = null), -1 !== ff.indexOf(t2) && (n2.pTagInButtonScope = null), -1 !== cf.indexOf(t2) && "address" !== t2 && "div" !== t2 && "p" !== t2 && (n2.listItemTagAutoclosing = null, n2.dlItemTagAutoclosing = null), n2.current = r3, "form" === t2 && (n2.formTag = r3), "a" === t2 && (n2.aTagInScope = r3), "button" === t2 && (n2.buttonTagInScope = r3), "nobr" === t2 && (n2.nobrTagInScope = r3), "p" === t2 && (n2.pTagInButtonScope = r3), "li" === t2 && (n2.listItemTagAutoclosing = r3), "dd" !== t2 && "dt" !== t2 || (n2.dlItemTagAutoclosing = r3), "#document" === t2 || "html" === t2 ? n2.containerTagInScope = null : n2.containerTagInScope || (n2.containerTagInScope = r3), null !== e3 || "#document" !== t2 && "html" !== t2 && "body" !== t2 ? true === n2.implicitRootScope && (n2.implicitRootScope = false) : n2.implicitRootScope = true, n2;
8067
8067
  }
@@ -8196,7 +8196,7 @@
8196
8196
  var r3 = t2.tag;
8197
8197
  if (t2 = String(!!n2) + "|" + e3 + "|" + r3, mf[t2]) return false;
8198
8198
  mf[t2] = true;
8199
- var a3 = (t2 = Gd) ? gt(t2.return, r3) : null, o3 = null !== t2 && null !== a3 ? pt(a3, t2, null) : "", l3 = "<" + e3 + ">";
8199
+ var a3 = (t2 = Gd) ? gt(t2.return, r3) : null, o3 = null !== t2 && null !== a3 ? pt2(a3, t2, null) : "", l3 = "<" + e3 + ">";
8200
8200
  return n2 ? (n2 = "", "table" === r3 && "tr" === e3 && (n2 += " Add a <tbody>, <thead> or <tfoot> to your code to match the DOM tree generated by the browser."), console.error("In HTML, %s cannot be a child of <%s>.%s\nThis will cause a hydration error.%s", l3, r3, n2, o3)) : console.error("In HTML, %s cannot be a descendant of <%s>.\nThis will cause a hydration error.%s", l3, r3, o3), t2 && (e3 = t2.return, null === a3 || null === e3 || a3 === e3 && e3._debugOwner === t2._debugOwner || De2(a3, function() {
8201
8201
  console.error("<%s> cannot contain a nested %s.\nSee this log for the ancestor stack trace.", r3, l3);
8202
8202
  })), false;
@@ -8206,7 +8206,7 @@
8206
8206
  if (mf[n2 = "#text|" + t2]) return false;
8207
8207
  mf[n2] = true;
8208
8208
  var r3 = (n2 = Gd) ? gt(n2, t2) : null;
8209
- return n2 = null !== n2 && null !== r3 ? pt(r3, n2, 6 !== n2.tag ? { children: null } : null) : "", /\S/.test(e3) ? console.error("In HTML, text nodes cannot be a child of <%s>.\nThis will cause a hydration error.%s", t2, n2) : console.error("In HTML, whitespace text nodes cannot be a child of <%s>. Make sure you don't have any extra whitespace between tags on each line of your source code.\nThis will cause a hydration error.%s", t2, n2), false;
8209
+ return n2 = null !== n2 && null !== r3 ? pt2(r3, n2, 6 !== n2.tag ? { children: null } : null) : "", /\S/.test(e3) ? console.error("In HTML, text nodes cannot be a child of <%s>.\nThis will cause a hydration error.%s", t2, n2) : console.error("In HTML, whitespace text nodes cannot be a child of <%s>. Make sure you don't have any extra whitespace between tags on each line of your source code.\nThis will cause a hydration error.%s", t2, n2), false;
8210
8210
  }
8211
8211
  function vt(e3, t2) {
8212
8212
  if (t2) {
@@ -15710,7 +15710,7 @@
15710
15710
  f2 && ue && (ue.remove(), ue = null);
15711
15711
  }), d.jsx("div", { className: e2, style: n2, onClick: r2, onDoubleClick: a2, onContextMenu: o2, onMouseDown: l2, onMouseUp: i2, onMouseEnter: s2, onMouseLeave: u2, onMouseMove: c2, children: "function" == typeof t2 ? t2((e3) => {
15712
15712
  ue && (ue.remove(), ue = null, e3 && e3());
15713
- }) : t2 })), de = () => d.jsx("svg", { className: "ono-input-icon", viewBox: "64 64 896 896", focusable: "false", "data-icon": "close-circle", fill: "currentColor", "aria-hidden": "true", children: d.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" }) }), fe = ({ open: e2 }) => d.jsx("svg", { viewBox: "64 64 896 896", focusable: "false", "data-icon": e2 ? "eye" : "eye-invisible", fill: "currentColor", "aria-hidden": "true", className: "ono-input-icon", children: e2 ? d.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" }) : d.jsxs(d.Fragment, { children: [d.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" }), d.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" })] }) }), pe = ({ id: e2, name: n2, max: r2, min: a2, maxLength: o2, minLength: l2, type: i2 = "text", className: s2, defaultValue: u2, placeholder: c2, readonly: f2, autocomplete: p2 = "off", autofocus: h2, form: m2, disabled: g2, clearable: y2, showPassword: b2, prepend: v2, append: k2, prefix: w2, suffix: S2, showCount: x2, border: C2 = "1px solid #5644b8", boxShadow: E2 = "0 0 0 2px #7969d11a", value: T2 = "", onChange: P2, onFocus: z2, onBlur: _2, onClear: R2 }) => {
15713
+ }) : t2 })), de = (e2) => (fe(e2.isSingle || false).render(d.jsx(ce, { ...e2 })), ue), fe = (e2) => (e2 && ue && se || (ue = document.createElement("div"), document.body.appendChild(ue), se = ie.createRoot(ue)), se), pe = () => d.jsx("svg", { className: "ono-input-icon", viewBox: "64 64 896 896", focusable: "false", "data-icon": "close-circle", fill: "currentColor", "aria-hidden": "true", children: d.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" }) }), he = ({ open: e2 }) => d.jsx("svg", { viewBox: "64 64 896 896", focusable: "false", "data-icon": e2 ? "eye" : "eye-invisible", fill: "currentColor", "aria-hidden": "true", className: "ono-input-icon", children: e2 ? d.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" }) : d.jsxs(d.Fragment, { children: [d.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" }), d.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" })] }) }), me = ({ id: e2, name: n2, max: r2, min: a2, maxLength: o2, minLength: l2, type: i2 = "text", className: s2, defaultValue: u2, placeholder: c2, readonly: f2, autocomplete: p2 = "off", autofocus: h2, form: m2, disabled: g2, clearable: y2, showPassword: b2, prepend: v2, append: k2, prefix: w2, suffix: S2, showCount: x2, border: C2 = "1px solid #5644b8", boxShadow: E2 = "0 0 0 2px #7969d11a", value: T2 = "", onChange: P2, onFocus: z2, onBlur: _2, onClear: R2 }) => {
15714
15714
  const [N2, L2] = t.useState(T2), [D2, O2] = t.useState(false), [M2, F2] = t.useState(false), I2 = t.useRef(null), A2 = y2 && !g2 && N2, j2 = b2 && !g2;
15715
15715
  return t.useEffect(() => {
15716
15716
  I2.current && (I2.current.style.setProperty("--ono-input-border", C2), I2.current.style.setProperty("--ono-input-box-shadow", E2));
@@ -15726,24 +15726,24 @@
15726
15726
  P2 == null ? void 0 : P2(e3), L2(e3.target.value);
15727
15727
  } }), (S2 || A2 || j2 || x2) && d.jsxs("span", { className: "ono-suffix", children: [S2, A2 && d.jsx("button", { className: "ono-clear-icon", onClick: () => {
15728
15728
  R2 == null ? void 0 : R2(), L2("");
15729
- }, children: d.jsx(de, {}) }), j2 && d.jsx("button", { className: "ono-eye-icon", onClick: () => F2(!M2), children: d.jsx(fe, { open: M2 }) }), x2 && o2 && d.jsxs("p", { className: "ono-count", children: [N2.length, "/", o2] })] })] }), k2 && d.jsx("div", { className: "ono-append", children: k2 })] });
15730
- }, he = (e2) => e2.toString().toLocaleLowerCase(), me = (e2, t2, n2) => {
15729
+ }, children: d.jsx(pe, {}) }), j2 && d.jsx("button", { className: "ono-eye-icon", onClick: () => F2(!M2), children: d.jsx(he, { open: M2 }) }), x2 && o2 && d.jsxs("p", { className: "ono-count", children: [N2.length, "/", o2] })] })] }), k2 && d.jsx("div", { className: "ono-append", children: k2 })] });
15730
+ }, ge = (e2) => e2.toString().toLocaleLowerCase(), ye = (e2, t2, n2) => {
15731
15731
  const r2 = (r3) => Q(r3, (r4) => ((e3, n3, r5) => {
15732
15732
  e3.forEach((e4) => {
15733
15733
  if (e4.includes("+") && e4.length > 1) {
15734
15734
  const r6 = e4.split("+"), a2 = n3.ctrlKey && r6.includes("ctrl"), o2 = n3.shiftKey && r6.includes("shift"), l2 = n3.altKey && r6.includes("alt"), i2 = n3.metaKey && r6.includes("meta"), s2 = (n3.ctrlKey || n3.metaKey) && r6.includes("commandorcontrol");
15735
15735
  2 === r6.length ? (a2 || o2 || l2 || i2 || s2) && n3.key.toLocaleLowerCase() === r6[r6.length - 1] && t2(n3, e4) : 3 === r6.length && (a2 && o2 || a2 && l2 || a2 && i2 || a2 && s2 || o2 && l2 || o2 && i2 || o2 && s2 || l2 && i2 || l2 && s2 || i2 && s2) && n3.key.toLocaleLowerCase() === r6[r6.length - 1] && t2(n3, e4);
15736
- } else if (e4.includes(he(n3.key))) {
15737
- if (r5) e4 === he(n3.key) && t2(n3, e4);
15736
+ } else if (e4.includes(ge(n3.key))) {
15737
+ if (r5) e4 === ge(n3.key) && t2(n3, e4);
15738
15738
  else if (!(n3.ctrlKey || n3.metaKey || n3.shiftKey || n3.altKey)) return t2(n3, e4);
15739
15739
  }
15740
15740
  });
15741
- })(e2 instanceof Array ? e2.map((e3) => he(e3)) : [he(e2)], r4, (n2 == null ? void 0 : n2.exactMatch) || false), { deps: [n2 == null ? void 0 : n2.target, ...(n2 == null ? void 0 : n2.deps) || []] });
15741
+ })(e2 instanceof Array ? e2.map((e3) => ge(e3)) : [ge(e2)], r4, (n2 == null ? void 0 : n2.exactMatch) || false), { deps: [n2 == null ? void 0 : n2.target, ...(n2 == null ? void 0 : n2.deps) || []] });
15742
15742
  (n2 == null ? void 0 : n2.events) instanceof Array ? n2.events.forEach((e3) => r2(e3)) : r2((n2 == null ? void 0 : n2.events) || "keydown");
15743
- }, ge = ({ list: e2, children: t2, fallback: n2, insertBetweenDom: r2 }) => (() => {
15743
+ }, be = ({ list: e2, children: t2, fallback: n2, insertBetweenDom: r2 }) => (() => {
15744
15744
  const a2 = "function" == typeof e2 ? e2() : e2;
15745
15745
  return a2.length > 0 ? ((e3, t3) => t3 ? e3.reduce((n3, r3, a3) => (n3.push(r3), a3 < e3.length - 1 && n3.push(t3(a3)), n3), []) : e3)(((e3) => e3.map(t2).filter(Boolean))(a2), r2) : n2;
15746
- })(), ye = (e2, t2, n2, r2) => {
15746
+ })(), ve = (e2, t2, n2, r2) => {
15747
15747
  const { target: a2, root: o2 } = ((e3, t3) => {
15748
15748
  let n3 = null, r3 = null;
15749
15749
  return t3 && (n3 = document.getElementById(t3), n3 || (n3 = document.createElement("div"), n3.id = t3, document.body.appendChild(n3))), e3 ? (r3 = document.getElementById(e3), r3 || (r3 = document.createElement("div"), r3.id = e3, n3 ? n3.appendChild(r3) : document.body.appendChild(r3))) : (r3 = document.createElement("div"), n3 ? n3.appendChild(r3) : document.body.appendChild(r3)), { target: r3, root: n3 };
@@ -15758,18 +15758,18 @@
15758
15758
  }
15759
15759
  return l2;
15760
15760
  };
15761
- let be = 1;
15762
- const ve = [], ke = (e2, t2, n2) => (0 === ve.length && (be = 1), Se(t2.instancesKey || "", e2, { id: `${n2}-${be++}`, key: t2.instancesKey || "", reactNode: e2, props: t2, offsetOptions: { topOffset: 0, height: 0, bottomOffset: 0 } }), ve), we = (e2) => {
15763
- const t2 = ve.findIndex((t3) => t3.id === e2);
15764
- return t2 <= 0 ? 0 : ve[t2 - 1].offsetOptions.bottomOffset;
15765
- }, Se = (e2, t2, n2) => {
15766
- const r2 = (e3) => ye(t2, { zIndex: 999 + be - 1, ...e3.props, id: e3.id }, e3.id, "ono-message-root");
15761
+ let ke = 1;
15762
+ const we = [], Se = (e2, t2, n2) => (0 === we.length && (ke = 1), Ce(t2.instancesKey || "", e2, { id: `${n2}-${ke++}`, key: t2.instancesKey || "", reactNode: e2, props: t2, offsetOptions: { topOffset: 0, height: 0, bottomOffset: 0 } }), we), xe = (e2) => {
15763
+ const t2 = we.findIndex((t3) => t3.id === e2);
15764
+ return t2 <= 0 ? 0 : we[t2 - 1].offsetOptions.bottomOffset;
15765
+ }, Ce = (e2, t2, n2) => {
15766
+ const r2 = (e3) => ve(t2, { zIndex: 999 + ke - 1, ...e3.props, id: e3.id }, e3.id, "ono-message-root");
15767
15767
  if (!e2) {
15768
15768
  const e3 = r2(n2);
15769
- ve.push({ ...n2, props: { ...n2.props, id: n2.id, destroy: e3 }, destroy: e3 });
15769
+ we.push({ ...n2, props: { ...n2.props, id: n2.id, destroy: e3 }, destroy: e3 });
15770
15770
  }
15771
15771
  let a2 = false;
15772
- const o2 = ve.map((t3) => {
15772
+ const o2 = we.map((t3) => {
15773
15773
  if (t3.key === e2) {
15774
15774
  a2 = true;
15775
15775
  const e3 = { ...t3.props, ...n2.props };
@@ -15780,35 +15780,35 @@
15780
15780
  return { ...t3, props: { ...t3.props, id: t3.id, destroy: e3 }, destroy: e3 };
15781
15781
  }
15782
15782
  });
15783
- if (Object.assign(ve, o2), !a2) {
15783
+ if (Object.assign(we, o2), !a2) {
15784
15784
  const e3 = r2(n2);
15785
- ve.push({ ...n2, props: { ...n2.props, id: n2.id, destroy: e3 }, destroy: e3 });
15785
+ we.push({ ...n2, props: { ...n2.props, id: n2.id, destroy: e3 }, destroy: e3 });
15786
15786
  }
15787
- }, xe = { 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" } }, Ce = (e2, t2) => xe[e2][t2], Ee = (e2) => {
15787
+ }, Ee = { 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" } }, Te = (e2, t2) => Ee[e2][t2], Pe = (e2) => {
15788
15788
  switch (e2) {
15789
15789
  case "success":
15790
- return d.jsx("svg", { className: "ono-type-icon", viewBox: "0 0 1024 1024", focusable: "false", "data-icon": "check-circle", fill: Ce(e2, "light"), "aria-hidden": "true", children: d.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" }) });
15790
+ return d.jsx("svg", { className: "ono-type-icon", viewBox: "0 0 1024 1024", focusable: "false", "data-icon": "check-circle", fill: Te(e2, "light"), "aria-hidden": "true", children: d.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" }) });
15791
15791
  case "error":
15792
- return d.jsx("svg", { className: "ono-type-icon", viewBox: "0 0 1024 1024", focusable: "false", "data-icon": "close-circle", fill: Ce(e2, "light"), "aria-hidden": "true", children: d.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" }) });
15792
+ return d.jsx("svg", { className: "ono-type-icon", viewBox: "0 0 1024 1024", focusable: "false", "data-icon": "close-circle", fill: Te(e2, "light"), "aria-hidden": "true", children: d.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" }) });
15793
15793
  case "loading":
15794
- return d.jsx("svg", { className: ["ono-info-icon", "ono-loading"].join(" "), viewBox: "0 0 1024 1024", focusable: "false", "data-icon": "loading", fill: Ce(e2, "light"), "aria-hidden": "true", children: d.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" }) });
15794
+ return d.jsx("svg", { className: ["ono-info-icon", "ono-loading"].join(" "), viewBox: "0 0 1024 1024", focusable: "false", "data-icon": "loading", fill: Te(e2, "light"), "aria-hidden": "true", children: d.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" }) });
15795
15795
  default:
15796
- return d.jsx("svg", { className: "ono-info-icon", viewBox: "64 64 896 896", focusable: "false", "data-icon": "exclamation-circle", fill: Ce(e2, "light"), "aria-hidden": "true", children: d.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" }) });
15796
+ return d.jsx("svg", { className: "ono-info-icon", viewBox: "64 64 896 896", focusable: "false", "data-icon": "exclamation-circle", fill: Te(e2, "light"), "aria-hidden": "true", children: d.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" }) });
15797
15797
  }
15798
- }, Te = ({ handleDestroy: e2 }) => d.jsx("button", { onClick: e2, children: d.jsx("svg", { className: "ono-clear-icon", viewBox: "64 64 896 896", focusable: "false", "data-icon": "close-circle", fill: "currentColor", "aria-hidden": "true", children: d.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" }) }) }), Pe = ({ id: e2, instancesKey: n2, duration: r2 = 3e3, speed: a2 = 300, offset: o2 = 20, message: l2, type: i2, plain: s2 = true, showClose: u2 = false, zIndex: c2, onClose: f2 = () => {
15798
+ }, ze = ({ handleDestroy: e2 }) => d.jsx("button", { onClick: e2, children: d.jsx("svg", { className: "ono-clear-icon", viewBox: "64 64 896 896", focusable: "false", "data-icon": "close-circle", fill: "currentColor", "aria-hidden": "true", children: d.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" }) }) }), _e = ({ id: e2, instancesKey: n2, duration: r2 = 3e3, speed: a2 = 300, offset: o2 = 20, message: l2, type: i2, plain: s2 = true, showClose: u2 = false, zIndex: c2, onClose: f2 = () => {
15799
15799
  }, destroy: p2 }) => {
15800
15800
  const [, h2] = t.useState(false), [m2, g2] = t.useState(0), [y2, b2] = t.useState(((e3) => {
15801
- const t2 = ve.findIndex((t3) => t3.id === e3);
15802
- return t2 <= 0 ? 0 : ve[t2 - 1].offsetOptions.topOffset;
15801
+ const t2 = we.findIndex((t3) => t3.id === e3);
15802
+ return t2 <= 0 ? 0 : we[t2 - 1].offsetOptions.topOffset;
15803
15803
  })(e2)), [v2, k2] = t.useState({ duration: r2, speed: a2, message: l2, type: i2, showClose: u2, onClose: f2 }), w2 = t.useRef(null), S2 = t.useRef(null), x2 = t.useRef(null), C2 = y2 + m2, E2 = t.useMemo(() => ({ transform: `translate(-50%, ${y2}px)`, transition: `transform ${a2}ms ease-in-out`, zIndex: c2 }), [y2, a2]), T2 = () => {
15804
- x2.current && (x2.current.classList.remove("ono-message-enter"), x2.current.classList.add("ono-message-leave"), x2.current.style.transform = `translate(-50%, ${we(e2) - m2}px)`, ((e3) => {
15805
- const t2 = ve.findIndex((t3) => t3.id === e3);
15806
- -1 !== t2 && ve.splice(t2, 1);
15804
+ x2.current && (x2.current.classList.remove("ono-message-enter"), x2.current.classList.add("ono-message-leave"), x2.current.style.transform = `translate(-50%, ${xe(e2) - m2}px)`, ((e3) => {
15805
+ const t2 = we.findIndex((t3) => t3.id === e3);
15806
+ -1 !== t2 && we.splice(t2, 1);
15807
15807
  })(e2), setTimeout(() => p2(v2.onClose), a2));
15808
15808
  }, P2 = (e3, t2, n3) => {
15809
15809
  "loading" !== e3 && (w2.current = setTimeout(T2, t2 - n3));
15810
15810
  }, z2 = () => {
15811
- const t2 = we(e2);
15811
+ const t2 = xe(e2);
15812
15812
  h2((e3) => (e3 && b2(t2 + o2), true)), requestAnimationFrame(z2);
15813
15813
  }, _2 = t.useCallback(() => {
15814
15814
  if ("loading" === v2.type) {
@@ -15816,7 +15816,7 @@
15816
15816
  S2.current = setTimeout(() => {
15817
15817
  var _a;
15818
15818
  S2.current = null;
15819
- const e3 = (t2 = n2 || "") ? (_a = ve.find((e4) => e4.key === t2)) == null ? void 0 : _a.props : null;
15819
+ const e3 = (t2 = n2 || "") ? (_a = we.find((e4) => e4.key === t2)) == null ? void 0 : _a.props : null;
15820
15820
  var t2;
15821
15821
  e3 && (((e4) => {
15822
15822
  k2((t3) => ({ ...t3, ...e4 }));
@@ -15834,43 +15834,43 @@
15834
15834
  })();
15835
15835
  }, [x2]), t.useEffect(() => {
15836
15836
  ((e3, t2) => {
15837
- const n3 = ve.findIndex((t3) => t3.id === e3);
15838
- n3 < 0 || (ve[n3].offsetOptions = t2);
15837
+ const n3 = we.findIndex((t3) => t3.id === e3);
15838
+ n3 < 0 || (we[n3].offsetOptions = t2);
15839
15839
  })(e2, { topOffset: y2, height: m2, bottomOffset: C2 });
15840
15840
  }, [C2]), d.jsx("div", { ref: x2, className: ["ono-message", `ono-message-${v2.type}`, "ono-message-enter", s2 ? "" : "ono-message-color"].filter(Boolean).join(" "), style: E2, onMouseEnter: () => {
15841
15841
  w2.current && (clearTimeout(w2.current), w2.current = null);
15842
- }, onMouseLeave: () => P2(v2.type, v2.duration, v2.speed), children: "function" == typeof v2.message ? v2.message(Ee(v2.type), v2.showClose && d.jsx(Te, { handleDestroy: T2 })) : d.jsxs(d.Fragment, { children: [Ee(v2.type), d.jsx("div", { children: v2.message }), v2.showClose && d.jsx(Te, { handleDestroy: T2 })] }) });
15843
- }, ze = (e2) => {
15842
+ }, onMouseLeave: () => P2(v2.type, v2.duration, v2.speed), children: "function" == typeof v2.message ? v2.message(Pe(v2.type), v2.showClose && d.jsx(ze, { handleDestroy: T2 })) : d.jsxs(d.Fragment, { children: [Pe(v2.type), d.jsx("div", { children: v2.message }), v2.showClose && d.jsx(ze, { handleDestroy: T2 })] }) });
15843
+ }, Re = (e2) => {
15844
15844
  if ("string" == typeof e2) return { message: e2 };
15845
15845
  {
15846
15846
  const t2 = { ...e2, instancesKey: e2.key };
15847
15847
  return delete t2.key, { ...t2 };
15848
15848
  }
15849
- }, _e = { info: (e2) => {
15850
- ke(Pe, { ...ze(e2), type: "info" }, "ono-message");
15849
+ }, Ne = { info: (e2) => {
15850
+ Se(_e, { ...Re(e2), type: "info" }, "ono-message");
15851
15851
  }, success: (e2) => {
15852
- ke(Pe, { ...ze(e2), type: "success" }, "ono-message");
15852
+ Se(_e, { ...Re(e2), type: "success" }, "ono-message");
15853
15853
  }, warning: (e2) => {
15854
- ke(Pe, { ...ze(e2), type: "warning" }, "ono-message");
15854
+ Se(_e, { ...Re(e2), type: "warning" }, "ono-message");
15855
15855
  }, error: (e2) => {
15856
- ke(Pe, { ...ze(e2), type: "error" }, "ono-message");
15856
+ Se(_e, { ...Re(e2), type: "error" }, "ono-message");
15857
15857
  }, loading: (e2) => {
15858
- ke(Pe, { ...ze(e2), type: "loading" }, "ono-message");
15859
- } }, Re = /\d+/g, Ne = (e2) => {
15860
- const t2 = e2.match(Re), n2 = (e3) => Number(e3).toString(16).padStart(2, "0"), r2 = (e3) => e3.reduce((e4, t3) => e4 + n2(t3), "#"), a2 = (e3) => {
15858
+ Se(_e, { ...Re(e2), type: "loading" }, "ono-message");
15859
+ } }, Le = /\d+/g, De = (e2) => {
15860
+ const t2 = e2.match(Le), n2 = (e3) => Number(e3).toString(16).padStart(2, "0"), r2 = (e3) => e3.reduce((e4, t3) => e4 + n2(t3), "#"), a2 = (e3) => {
15861
15861
  const t3 = e3, a3 = 1 !== Number(e3[e3.length - 1]) ? Number(e3[e3.length - 1]) : 100;
15862
15862
  return t3.pop(), r2(t3) + n2(2.56 * a3);
15863
15863
  };
15864
15864
  return 3 === t2.length ? r2(t2) : 5 === t2.length ? a2([t2[0], t2[1], t2[2], 10 * Number(t2[t2.length - 1])]) : a2(t2);
15865
- }, Le = (e2) => {
15865
+ }, Oe = (e2) => {
15866
15866
  const t2 = e2.split("#")[1], n2 = (e3) => [parseInt(e3.slice(0, 2), 16), parseInt(e3.slice(2, 4), 16), parseInt(e3.slice(4, 6), 16)];
15867
15867
  if (8 === t2.length) {
15868
15868
  const e3 = parseInt(t2.slice(-2), 16) / 256, r2 = n2(t2.slice(0, -2));
15869
15869
  return r2.push(e3), "rgba(" + r2.join(", ") + ")";
15870
15870
  }
15871
15871
  return "rgb(" + n2(t2).join(", ") + ")";
15872
- }, De = (e2) => {
15873
- const t2 = e2.match(Re), n2 = Number(t2[0]) / 255, r2 = Number(t2[1]) / 255, a2 = Number(t2[2]) / 255, o2 = Math.min(n2, r2, a2), l2 = Math.max(n2, r2, a2);
15872
+ }, Me = (e2) => {
15873
+ const t2 = e2.match(Le), n2 = Number(t2[0]) / 255, r2 = Number(t2[1]) / 255, a2 = Number(t2[2]) / 255, o2 = Math.min(n2, r2, a2), l2 = Math.max(n2, r2, a2);
15874
15874
  let i2 = 0, s2 = 0, u2 = (l2 + o2) / 2;
15875
15875
  if (l2 === o2) i2 = s2 = 0;
15876
15876
  else {
@@ -15888,16 +15888,16 @@
15888
15888
  i2 /= 6;
15889
15889
  }
15890
15890
  return `hsl(${Math.round(360 * i2)}, ${Math.round(100 * s2)}%, ${Math.round(100 * u2)}%)`;
15891
- }, Oe = (e2) => {
15892
- const t2 = e2.match(Re), n2 = Number(t2[0]) / 360, r2 = Number(t2[1]) / 100, a2 = Number(t2[2]) / 100;
15891
+ }, Fe = (e2) => {
15892
+ const t2 = e2.match(Le), n2 = Number(t2[0]) / 360, r2 = Number(t2[1]) / 100, a2 = Number(t2[2]) / 100;
15893
15893
  let o2, l2, i2;
15894
15894
  function s2(e3, t3, n3) {
15895
15895
  return n3 < 0 && (n3 += 1), n3 > 1 && (n3 -= 1), n3 < 1 / 6 ? e3 + 6 * (t3 - e3) * n3 : n3 < 0.5 ? t3 : n3 < 2 / 3 ? e3 + (t3 - e3) * (2 / 3 - n3) * 6 : e3;
15896
15896
  }
15897
15897
  let u2 = a2 < 0.5 ? a2 * (1 + r2) : a2 + r2 - a2 * r2, c2 = 2 * a2 - u2;
15898
15898
  return o2 = s2(c2, u2, n2 + 1 / 3), l2 = s2(c2, u2, n2), i2 = s2(c2, u2, n2 - 1 / 3), `rgb(${Math.round(255 * o2)}, ${Math.round(255 * l2)}, ${Math.round(255 * i2)})`;
15899
- }, Me = (e2) => De(Le(e2)), Fe = (e2) => Ne(Oe(e2)), Ie = (e2) => {
15900
- const t2 = e2.match(Re);
15899
+ }, Ie = (e2) => Me(Oe(e2)), Ae = (e2) => De(Fe(e2)), je = (e2) => {
15900
+ const t2 = e2.match(Le);
15901
15901
  let n2 = Number(t2[0]) / 255, r2 = Number(t2[1]) / 255, a2 = Number(t2[2]) / 255;
15902
15902
  const o2 = Math.max(n2, r2, a2), l2 = Math.min(n2, r2, a2);
15903
15903
  let i2 = 0, s2 = 0, u2 = o2;
@@ -15917,8 +15917,8 @@
15917
15917
  i2 /= 6;
15918
15918
  }
15919
15919
  return `hsv(${360 * i2}, ${100 * s2}, ${100 * u2})`;
15920
- }, Ae = (e2) => {
15921
- const t2 = e2.match(Re);
15920
+ }, Ue = (e2) => {
15921
+ const t2 = e2.match(Le);
15922
15922
  let n2, r2, a2, o2, l2, i2, s2, u2, c2 = Number(t2[0]) / 360, d2 = Number(t2[1]) / 100, f2 = Number(t2[2]) / 100;
15923
15923
  if (c2 && 0 === d2) n2 = r2 = a2 = f2;
15924
15924
  else switch (c2 /= 60, o2 = Math.floor(c2), l2 = c2 - o2, i2 = f2 * (1 - d2), s2 = f2 * (1 - d2 * l2), u2 = f2 * (1 - d2 * (1 - l2)), o2) {
@@ -15941,16 +15941,16 @@
15941
15941
  n2 = f2, r2 = i2, a2 = s2;
15942
15942
  }
15943
15943
  return `rgb(${Math.round(255 * n2)}, ${Math.round(255 * r2)}, ${Math.round(255 * a2)})`;
15944
- }, je = (e2) => /^#([0-9A-Fa-f]{6}|[0-9A-Fa-f]{3})$/.test(e2) ? "hex" : /^rgb\((1?\d{1,3},\s*1?\d{1,3},\s*1?\d{1,3})\)$/.test(e2) ? "rgb" : "unknown", Ue = (e2, t2, n2) => {
15944
+ }, He = (e2) => /^#([0-9A-Fa-f]{6}|[0-9A-Fa-f]{3})$/.test(e2) ? "hex" : /^rgb\((1?\d{1,3},\s*1?\d{1,3},\s*1?\d{1,3})\)$/.test(e2) ? "rgb" : "unknown", Be = (e2, t2, n2) => {
15945
15945
  let r2 = [];
15946
- if (e2.includes("#")) r2 = Me(e2).match(Re);
15947
- else if (e2.includes("rgb")) r2 = De(e2).match(Re);
15946
+ if (e2.includes("#")) r2 = Ie(e2).match(Le);
15947
+ else if (e2.includes("rgb")) r2 = Me(e2).match(Le);
15948
15948
  else {
15949
15949
  if (!e2.includes("hsl")) throw new Error("颜色格式错误");
15950
- r2 = e2.match(Re);
15950
+ r2 = e2.match(Le);
15951
15951
  }
15952
- return Fe(`${r2[0]}, ${r2[1]}%, ${"light" === t2 ? Number(r2[2]) + n2 > 100 ? 100 : Number(r2[2]) + n2 : Number(r2[2]) - n2 < 0 ? 0 : Number(r2[2]) - n2}%`);
15953
- }, He = { randomColor: () => "#" + Math.random().toString(16).slice(2, 8).padEnd(6, "0"), rgb2hex: Ne, hex2rgb: Le, rgb2rgba: (e2, t2) => {
15952
+ return Ae(`${r2[0]}, ${r2[1]}%, ${"light" === t2 ? Number(r2[2]) + n2 > 100 ? 100 : Number(r2[2]) + n2 : Number(r2[2]) - n2 < 0 ? 0 : Number(r2[2]) - n2}%`);
15953
+ }, We = { randomColor: () => "#" + Math.random().toString(16).slice(2, 8).padEnd(6, "0"), rgb2hex: De, hex2rgb: Oe, rgb2rgba: (e2, t2) => {
15954
15954
  if (!t2) return e2;
15955
15955
  if (e2.includes("rgba")) {
15956
15956
  const n2 = e2.split(",");
@@ -15960,10 +15960,10 @@
15960
15960
  const n2 = e2.split(","), r2 = "rgba(" + n2[0].split("(")[1], a2 = n2[n2.length - 1].split(")")[0];
15961
15961
  return [r2, n2[1], a2, " " + t2 + ")"].join(",");
15962
15962
  }
15963
- }, rgb2hsl: De, hsl2rgb: Oe, hex2hsl: Me, hsl2hex: Fe, rgb2hsv: Ie, hsv2rgb: Ae, hex2hsv: (e2) => Ie(Le(e2)), hsv2hex: (e2) => Ne(Ae(e2)), formatColor: (e2, t2, n2 = "rgba") => {
15964
- const r2 = e2.match(Re);
15963
+ }, rgb2hsl: Me, hsl2rgb: Fe, hex2hsl: Ie, hsl2hex: Ae, rgb2hsv: je, hsv2rgb: Ue, hex2hsv: (e2) => je(Oe(e2)), hsv2hex: (e2) => De(Ue(e2)), formatColor: (e2, t2, n2 = "rgba") => {
15964
+ const r2 = e2.match(Le);
15965
15965
  let a2 = Number(r2[0]) / 255, o2 = Number(r2[1]) / 255, l2 = Number(r2[2]) / 255;
15966
- return "rgba" === n2 ? `rgba(${a2},${o2},${l2},${t2})` : "rgb" === n2 ? e2 : "hex" === n2 ? Ne(e2) : "hsl" === n2 ? De(`rgba(${a2},${o2},${l2},${t2})`) : `rgba(${a2},${o2},${l2},${t2})`;
15966
+ return "rgba" === n2 ? `rgba(${a2},${o2},${l2},${t2})` : "rgb" === n2 ? e2 : "hex" === n2 ? De(e2) : "hsl" === n2 ? Me(`rgba(${a2},${o2},${l2},${t2})`) : `rgba(${a2},${o2},${l2},${t2})`;
15967
15967
  }, getContrastColor: (e2) => {
15968
15968
  const t2 = (function(e3) {
15969
15969
  if (e3.startsWith("#")) return 4 === e3.length && (e3 = `#${e3.slice(1).repeat(2)}`), [parseInt(e3.substr(1, 2), 16), parseInt(e3.substr(3, 2), 16), parseInt(e3.substr(5, 2), 16)];
@@ -15976,7 +15976,7 @@
15976
15976
  return null === t2 ? null : (299 * (n2 = t2)[0] + 587 * n2[1] + 114 * n2[2]) / 1e3 > 128 ? "#000" : "#fff";
15977
15977
  var n2;
15978
15978
  }, adjustColor: (e2, t2, n2) => {
15979
- const r2 = je(e2);
15979
+ const r2 = He(e2);
15980
15980
  if ("hex" === r2) {
15981
15981
  const r3 = e2.replace("#", ""), a2 = parseInt(r3.slice(0, 2), 16), o2 = parseInt(r3.slice(2, 4), 16), l2 = parseInt(r3.slice(4, 6), 16);
15982
15982
  if ("lighten" === t2) {
@@ -15993,13 +15993,13 @@
15993
15993
  if ("darken" === t2) return `rgb(${Math.min(255, Math.max(0, a2 - a2 * n2 / 100))},${Math.min(255, Math.max(0, o2 - o2 * n2 / 100))},${Math.min(255, Math.max(0, l2 - l2 * n2 / 100))})`;
15994
15994
  }
15995
15995
  return e2;
15996
- }, isValidColor: (e2) => !(!/^#([0-9A-Fa-f]{6}|[0-9A-Fa-f]{3})$/.test(e2) && !/^rgb\((1?\d{1,3},\s*1?\d{1,3},\s*1?\d{1,3})\)$/.test(e2)), getColorType: je, hex3To6: (e2) => {
15996
+ }, isValidColor: (e2) => !(!/^#([0-9A-Fa-f]{6}|[0-9A-Fa-f]{3})$/.test(e2) && !/^rgb\((1?\d{1,3},\s*1?\d{1,3},\s*1?\d{1,3})\)$/.test(e2)), getColorType: He, hex3To6: (e2) => {
15997
15997
  const t2 = e2.replace("#", "").split("");
15998
15998
  return `#${t2[0] + t2[0] + t2[1] + t2[1] + t2[2] + t2[2]}`;
15999
- }, adjustingColors: Ue }, Be = ({ title: e2 = "This is a modal title", icon: n2, content: r2 = "This is a modal content", okText: a2 = "confirm", cancelText: o2 = "cancel", isLoading: l2, confirmDisabled: i2, cancelDisabled: s2, position: u2, onConfirm: c2 = () => {
15999
+ }, adjustingColors: Be }, $e = ({ title: e2 = "This is a modal title", icon: n2, content: r2 = "This is a modal content", okText: a2 = "confirm", cancelText: o2 = "cancel", isLoading: l2, confirmDisabled: i2, cancelDisabled: s2, position: u2, onConfirm: c2 = () => {
16000
16000
  }, onCancel: f2 = () => {
16001
16001
  }, mask: p2 = true, maskClosable: h2 = false, width: m2, btnClr: g2, footer: y2 = ({ OkBtn: e3, CancelBtn: t2 }) => d.jsxs(d.Fragment, { children: [d.jsx(t2, {}), d.jsx(e3, {})] }), modalBody: b2, destroy: v2 }) => {
16002
- const k2 = t.useRef(null), w2 = t.useRef(null), S2 = [{ label: "themeColor", value: g2 || "" }, { label: "themeHoverColor", value: g2 && Ue(g2, "light", 10) || "" }, { label: "themeActiveColor", value: g2 && Ue(g2, "dark", 20) || "" }, { label: "themeDisabledClr", value: g2 && Ue(g2, "light", 20) || "" }], x2 = () => {
16002
+ const k2 = t.useRef(null), w2 = t.useRef(null), S2 = [{ label: "themeColor", value: g2 || "" }, { label: "themeHoverColor", value: g2 && Be(g2, "light", 10) || "" }, { label: "themeActiveColor", value: g2 && Be(g2, "dark", 20) || "" }, { label: "themeDisabledClr", value: g2 && Be(g2, "light", 20) || "" }], x2 = () => {
16003
16003
  if (u2) {
16004
16004
  if (!w2.current) return;
16005
16005
  w2.current.classList.remove("ono-modal-enter"), w2.current.classList.add("ono-modal-leave"), setTimeout(() => {
@@ -16020,7 +16020,7 @@
16020
16020
  }, children: [l2 && d.jsx("svg", { className: "ono-modal-box-footer-confirmBtn-loading", viewBox: "0 0 1024 1024", focusable: "false", "data-icon": "loading", fill: "currentColor", "aria-hidden": "true", children: d.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" }) }), a2 ?? "Confirm"] }), CancelBtn: () => d.jsx("button", { className: "ono-modal-box-footer-cancelBtn", disabled: s2 || l2, onClick: () => {
16021
16021
  f2(), x2();
16022
16022
  }, children: o2 ?? "Cancel" }), handleClose: () => x2() }) })] }) });
16023
- }, We = ({ name: e2, value: n2, style: r2, checked: a2, onChange: o2, children: l2, className: i2, radioW: s2 = 16, radioGap: u2 = 4, checkedColor: c2 = "#532ce1", unCheckedColor: f2 = "transparent", disabled: p2 = false }) => {
16023
+ }, Ve = ({ name: e2, value: n2, style: r2, checked: a2, onChange: o2, children: l2, className: i2, radioW: s2 = 16, radioGap: u2 = 4, checkedColor: c2 = "#532ce1", unCheckedColor: f2 = "transparent", disabled: p2 = false }) => {
16024
16024
  const [h2, m2] = t.useState(""), g2 = t.useRef(null), y2 = t.useRef(null), b2 = t.useRef(null), v2 = [{ value: s2, name: "w" }, { value: u2, name: "gap" }, { value: c2, name: "checkedColor" }, { value: f2, name: "unCheckedColor" }];
16025
16025
  return t.useEffect(() => {
16026
16026
  (() => {
@@ -16038,7 +16038,7 @@
16038
16038
  var _a;
16039
16039
  return (_a = g2.current) == null ? void 0 : _a.click();
16040
16040
  }, children: d.jsx("input", { type: "radio", name: e2, ref: g2, value: n2 + "", checked: a2, disabled: p2, id: n2 + "" + l2, onChange: o2 }) }), l2 && d.jsx("label", { htmlFor: n2 + "" + l2 || "", children: l2 })] });
16041
- }, $e = (e2, t2, n2) => Q(((e3) => {
16041
+ }, qe = (e2, t2, n2) => Q(((e3) => {
16042
16042
  const t3 = "string" == typeof e3 ? [e3] : e3;
16043
16043
  if (new Set(t3).size !== t3.length) throw new Error("there are duplicates in the event type");
16044
16044
  return t3;
@@ -16049,12 +16049,12 @@
16049
16049
  r2 && !r2.contains(n3.target) && t2(n3);
16050
16050
  }
16051
16051
  }, { deps: [e2, ...(n2 == null ? void 0 : n2.deps) || []] });
16052
- let Ve = null, qe = null;
16053
- const Qe = ({ children: e2, content: n2, onOpenChange: a2, trigger: o2 = "hover", placement: l2 = "top", popperOptions: i2 = {}, className: s2, style: u2, isShowArrow: c2 = true, sameWidth: f2, autoAdjustOverflow: p2 = true }) => {
16052
+ let Qe = null, Ye = null;
16053
+ const Ke = ({ children: e2, content: n2, onOpenChange: a2, trigger: o2 = "hover", placement: l2 = "top", popperOptions: i2 = {}, className: s2, style: u2, isShowArrow: c2 = true, sameWidth: f2, autoAdjustOverflow: p2 = true }) => {
16054
16054
  const [h2, m2] = t.useState(false), g2 = t.useRef(null), y2 = t.useRef(null), b2 = (e3) => {
16055
16055
  a2 == null ? void 0 : a2(e3), m2(e3);
16056
16056
  };
16057
- return $e(y2, () => {
16057
+ return qe(y2, () => {
16058
16058
  "click" !== o2 && "contextmenu" !== o2 || b2(false);
16059
16059
  }, { event: ["click", "contextmenu"], deps: [o2, a2] }), t.useEffect(() => {
16060
16060
  (() => {
@@ -16064,51 +16064,48 @@
16064
16064
  y2.current.style.width = e3[0].getBoundingClientRect().width + "px";
16065
16065
  })();
16066
16066
  }, [y2, e2]), t.useEffect(() => {
16067
- y2.current && ("hover" === o2 ? (y2.current.onmouseenter = () => b2(true), y2.current.onmouseleave = () => b2(false)) : "click" === o2 ? y2.current.onclick = () => b2(!h2) : "focus" === o2 ? (y2.current.onfocus = () => b2(true), y2.current.onblur = () => b2(false)) : y2.current.oncontextmenu = () => b2(!h2)), h2 && y2.current && g2.current ? qe = r.createPopper(y2.current, g2.current, { placement: l2, modifiers: [{ name: "offset", options: { offset: [0, 6] } }, f2 ? { name: "sameWidth", enabled: true, phase: "beforeWrite", requires: ["computeStyles"], fn({ state: e3 }) {
16067
+ y2.current && ("hover" === o2 ? (y2.current.onmouseenter = () => b2(true), y2.current.onmouseleave = () => b2(false)) : "click" === o2 ? y2.current.onclick = () => b2(!h2) : "focus" === o2 ? (y2.current.onfocus = () => b2(true), y2.current.onblur = () => b2(false)) : y2.current.oncontextmenu = () => b2(!h2)), h2 && y2.current && g2.current ? Ye = r.createPopper(y2.current, g2.current, { placement: l2, modifiers: [{ name: "offset", options: { offset: [0, 6] } }, f2 ? { name: "sameWidth", enabled: true, phase: "beforeWrite", requires: ["computeStyles"], fn({ state: e3 }) {
16068
16068
  e3.styles.popper.width = `${e3.rects.reference.width}px`;
16069
16069
  }, effect({ state: e3 }) {
16070
16070
  e3.elements.popper.style.width = `${e3.elements.reference.offsetWidth}px`;
16071
- } } : {}, p2 ? { name: "flip", enabled: true } : {}], ...i2 }) : qe && (qe.destroy(), qe = null, Ve && Ve.remove(), Ve = null);
16071
+ } } : {}, p2 ? { name: "flip", enabled: true } : {}], ...i2 }) : Ye && (Ye.destroy(), Ye = null, Qe && Qe.remove(), Qe = null);
16072
16072
  }, [h2, y2, g2]), d.jsxs(d.Fragment, { children: [h2 && d.jsxs("div", { ref: g2, style: u2, className: ["ono-tooltip-popper", s2].join(" "), "data-popper-placement": i2.placement || l2, children: [d.jsx("div", { children: n2 instanceof Function ? n2() : n2 }), c2 && d.jsx("div", { className: "ono-tooltip-popper-arrow", "data-popper-arrow": true })] }), d.jsx("div", { ref: y2, children: e2 instanceof Function ? e2() : e2 })] });
16073
- }, Ye = ({ label: e2, value: t2, disabled: n2, onChange: r2, optionRender: a2, currentValue: o2 }) => d.jsx("button", { role: "option", "aria-label": e2, disabled: n2, className: "ono-option-item", onClick: () => r2 == null ? void 0 : r2(t2), children: a2 ? a2({ label: e2, value: t2, disabled: n2 }, o2 === e2) : d.jsx("div", { className: ["ono-option-item-content", o2 === e2 ? "ono-option-item-content-active" : "", n2 ? "ono-option-item-content-disabled" : ""].filter(Boolean).join(" "), children: e2 }) }), Ke = ({ isVisible: e2 }) => d.jsx("svg", { className: ["ono-select-arrow-down-icon", e2 ? "ono-select-arrow-down-active" : ""].filter(Boolean).join(" "), viewBox: "64 64 896 896", focusable: "false", "data-icon": "down", fill: "currentColor", "aria-hidden": "true", children: d.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" }) }), Xe = "_enter_974ly_32";
16074
- let Ge = [];
16075
- const Ze = { success: { light: "#52c41a", dark: "#49aa19" }, error: { light: "#ff4d4f", dark: "#a61d24" }, warning: { light: "#faad14", dark: "#d89614" }, promise: { light: "", dark: "" } }, Je = (e2, t2) => Ze[e2][t2], et = (e2) => {
16073
+ }, Xe = ({ label: e2, value: t2, disabled: n2, onChange: r2, optionRender: a2, currentValue: o2 }) => d.jsx("button", { role: "option", "aria-label": e2, disabled: n2, className: "ono-option-item", onClick: () => r2 == null ? void 0 : r2(t2), children: a2 ? a2({ label: e2, value: t2, disabled: n2 }, o2 === e2) : d.jsx("div", { className: ["ono-option-item-content", o2 === e2 ? "ono-option-item-content-active" : "", n2 ? "ono-option-item-content-disabled" : ""].filter(Boolean).join(" "), children: e2 }) }), Ge = ({ isVisible: e2 }) => d.jsx("svg", { className: ["ono-select-arrow-down-icon", e2 ? "ono-select-arrow-down-active" : ""].filter(Boolean).join(" "), viewBox: "64 64 896 896", focusable: "false", "data-icon": "down", fill: "currentColor", "aria-hidden": "true", children: d.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" }) }), Ze = "_enter_974ly_32";
16074
+ let Je = [];
16075
+ const et = { success: { light: "#52c41a", dark: "#49aa19" }, error: { light: "#ff4d4f", dark: "#a61d24" }, warning: { light: "#faad14", dark: "#d89614" }, promise: { light: "", dark: "" } }, tt = (e2, t2) => et[e2][t2], nt = (e2) => {
16076
16076
  switch (e2) {
16077
16077
  case "success":
16078
- return d.jsx("svg", { viewBox: "0 0 1024 1024", focusable: "false", "data-icon": "check-circle", width: "24px", height: "24px", fill: Je(e2, "light"), "aria-hidden": "true", children: d.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" }) });
16078
+ return d.jsx("svg", { viewBox: "0 0 1024 1024", focusable: "false", "data-icon": "check-circle", width: "24px", height: "24px", fill: tt(e2, "light"), "aria-hidden": "true", children: d.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" }) });
16079
16079
  case "error":
16080
- return d.jsx("svg", { viewBox: "0 0 1024 1024", focusable: "false", "data-icon": "close-circle", width: "24px", height: "24px", fill: Je(e2, "light"), "aria-hidden": "true", children: d.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" }) });
16080
+ return d.jsx("svg", { viewBox: "0 0 1024 1024", focusable: "false", "data-icon": "close-circle", width: "24px", height: "24px", fill: tt(e2, "light"), "aria-hidden": "true", children: d.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" }) });
16081
16081
  case "warning":
16082
- return d.jsx("svg", { viewBox: "0 0 1024 1024", focusable: "false", "data-icon": "exclamation-circle", width: "24px", height: "24px", fill: Je(e2, "light"), "aria-hidden": "true", children: d.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" }) });
16082
+ return d.jsx("svg", { viewBox: "0 0 1024 1024", focusable: "false", "data-icon": "exclamation-circle", width: "24px", height: "24px", fill: tt(e2, "light"), "aria-hidden": "true", children: d.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" }) });
16083
16083
  }
16084
- }, tt = ({ type: e2, speed: n2 = 200, message: r2, duration: a2 = 2e3, className: o2, style: l2, isUseEnterAnimation: i2 = true, promiseOptions: s2, toastList: u2, handleDestroy: c2 }) => {
16084
+ }, rt = ({ type: e2, speed: n2 = 200, message: r2, duration: a2 = 2e3, className: o2, style: l2, isUseEnterAnimation: i2 = true, promiseOptions: s2, toastList: u2, handleDestroy: c2 }) => {
16085
16085
  const f2 = t.useRef(null);
16086
16086
  return t.useEffect(() => {
16087
- f2.current && (f2.current.style.setProperty("--speed", n2 / 1e3 + "s"), i2 && f2.current.classList.add(Xe), "promise" !== e2 && setTimeout(() => {
16087
+ f2.current && (f2.current.style.setProperty("--speed", n2 / 1e3 + "s"), i2 && f2.current.classList.add(Ze), "promise" !== e2 && setTimeout(() => {
16088
16088
  var _a, _b;
16089
- (_a = f2.current) == null ? void 0 : _a.classList.remove(Xe), (_b = f2.current) == null ? void 0 : _b.classList.add("_leave_974ly_36");
16089
+ (_a = f2.current) == null ? void 0 : _a.classList.remove(Ze), (_b = f2.current) == null ? void 0 : _b.classList.add("_leave_974ly_36");
16090
16090
  }, a2 - n2));
16091
16091
  }, [f2]), t.useEffect(() => {
16092
16092
  "promise" === e2 ? ("function" == typeof r2 ? r2() : r2).then((e3) => setTimeout(() => {
16093
- c2(), nt({ type: "success", message: "function" == typeof (s2 == null ? void 0 : s2.success) ? s2.success(e3) : (s2 == null ? void 0 : s2.success) || "", isUseEnterAnimation: false, toastList: u2 });
16093
+ c2(), at({ type: "success", message: "function" == typeof (s2 == null ? void 0 : s2.success) ? s2.success(e3) : (s2 == null ? void 0 : s2.success) || "", isUseEnterAnimation: false, toastList: u2 });
16094
16094
  }, n2)).catch((e3) => setTimeout(() => {
16095
- c2(), nt({ type: "error", message: "function" == typeof (s2 == null ? void 0 : s2.error) ? s2.error(e3) : (s2 == null ? void 0 : s2.error) || "", isUseEnterAnimation: false, toastList: u2 });
16095
+ c2(), at({ type: "error", message: "function" == typeof (s2 == null ? void 0 : s2.error) ? s2.error(e3) : (s2 == null ? void 0 : s2.error) || "", isUseEnterAnimation: false, toastList: u2 });
16096
16096
  }, n2)) : setTimeout(() => c2(() => u2 = []), a2);
16097
16097
  }, [e2]), d.jsxs("div", { ref: f2, className: ["promise" === e2 ? "_promise_974ly_15" : "_base_974ly_15", o2].join(" "), style: l2, onClick: () => {
16098
- }, children: [d.jsx("div", { className: "_icon_974ly_40", children: et(e2) }), d.jsx("p", { children: "string" == typeof r2 ? r2 : s2 && s2.loading })] });
16099
- }, nt = ({ type: e2, speed: n2 = 200, message: r2, duration: a2 = 2e3, zIndex: o2 = 9999, className: l2, style: i2, isUseEnterAnimation: s2 = true, promiseOptions: u2, toastList: c2 }) => {
16100
- return (f2 = (p2 = { className: "_container_974ly_1", isSingle: true, style: { zIndex: o2 }, content: (o3) => (t.useEffect(() => {
16101
- }, [c2]), d.jsx(tt, { className: l2, style: i2, type: e2, message: r2, speed: n2, duration: a2, isUseEnterAnimation: s2, promiseOptions: u2, handleDestroy: o3, toastList: c2 })) }).isSingle || false, f2 && ue && se || (ue = document.createElement("div"), document.body.appendChild(ue), se = ie.createRoot(ue)), se).render(d.jsx(ce, { ...p2 })), ue;
16102
- var f2, p2;
16103
- }, rt = { success: (e2) => {
16104
- Ge.push({ type: "success", message: e2 }), nt("string" == typeof e2 ? { type: "success", message: e2, toastList: Ge } : { type: "success", ...e2, toastList: Ge });
16098
+ }, children: [d.jsx("div", { className: "_icon_974ly_40", children: nt(e2) }), d.jsx("p", { children: "string" == typeof r2 ? r2 : s2 && s2.loading })] });
16099
+ }, at = ({ type: e2, speed: n2 = 200, message: r2, duration: a2 = 2e3, zIndex: o2 = 9999, className: l2, style: i2, isUseEnterAnimation: s2 = true, promiseOptions: u2, toastList: c2 }) => de({ className: "_container_974ly_1", isSingle: true, style: { zIndex: o2 }, content: (o3) => (t.useEffect(() => {
16100
+ }, [c2]), d.jsx(rt, { className: l2, style: i2, type: e2, message: r2, speed: n2, duration: a2, isUseEnterAnimation: s2, promiseOptions: u2, handleDestroy: o3, toastList: c2 })) }), ot = { success: (e2) => {
16101
+ Je.push({ type: "success", message: e2 }), at("string" == typeof e2 ? { type: "success", message: e2, toastList: Je } : { type: "success", ...e2, toastList: Je });
16105
16102
  }, error: (e2) => {
16106
- Ge.push({ type: "error", message: e2 }), nt("string" == typeof e2 ? { type: "error", message: e2, toastList: Ge } : { type: "error", ...e2, toastList: Ge });
16103
+ Je.push({ type: "error", message: e2 }), at("string" == typeof e2 ? { type: "error", message: e2, toastList: Je } : { type: "error", ...e2, toastList: Je });
16107
16104
  }, warning: (e2) => {
16108
- Ge.push({ type: "warning", message: e2 }), nt("string" == typeof e2 ? { type: "warning", message: e2, toastList: Ge } : { type: "warning", ...e2, toastList: Ge });
16105
+ Je.push({ type: "warning", message: e2 }), at("string" == typeof e2 ? { type: "warning", message: e2, toastList: Je } : { type: "warning", ...e2, toastList: Je });
16109
16106
  }, promise: (e2, t2) => {
16110
- Ge.push({ type: "promise", message: e2 }), nt({ type: "promise", message: e2, promiseOptions: t2, toastList: Ge });
16111
- } }, at = t.memo(({ containerClassName: e2, dataSource: n2, containerStyle: r2 = {}, onEndCallback: a2, refreshSpeed: o2 = 50, wrapperClassName: l2, wrapperStyle: i2 = {}, estimatedSize: s2 = 35, updateDataSourceScroll2Top: u2, direction: c2 = "vertical" }) => {
16107
+ Je.push({ type: "promise", message: e2 }), at({ type: "promise", message: e2, promiseOptions: t2, toastList: Je });
16108
+ } }, lt = t.memo(({ containerClassName: e2, dataSource: n2, containerStyle: r2 = {}, onEndCallback: a2, refreshSpeed: o2 = 50, wrapperClassName: l2, wrapperStyle: i2 = {}, estimatedSize: s2 = 35, updateDataSourceScroll2Top: u2, direction: c2 = "vertical" }) => {
16112
16109
  const [f2, p2] = t.useState({ viewSize: 0, startIndex: 0, listSize: 0, renderCount: 0, prevLen: 0 }), [h2, m2] = t.useState([]), g2 = "number" == typeof s2 ? s2 : s2(), y2 = t.useMemo(() => Math.min(n2.length, f2.startIndex + f2.renderCount), [n2, f2]), b2 = t.useMemo(() => {
16113
16110
  var _a;
16114
16111
  return f2.startIndex > 0 ? (_a = h2[f2.startIndex - 1]) == null ? void 0 : _a.end : 0;
@@ -16166,14 +16163,14 @@
16166
16163
  })();
16167
16164
  }, [S2, h2, f2.startIndex, c2]), d.jsx("div", { ref: w2, className: e2, style: { width: "100%", height: "100%", overflow: "auto", ...r2 }, children: d.jsx("ul", { ref: S2, className: l2, style: { ...k2, ...i2 }, children: v2 }) });
16168
16165
  });
16169
- let ot = false;
16170
- const lt = ({ theme: e2, onDark: n2, onLight: r2 }) => {
16166
+ let it = false;
16167
+ const st = ({ theme: e2, onDark: n2, onLight: r2 }) => {
16171
16168
  const a2 = window.matchMedia("(prefers-color-scheme: dark)"), o2 = () => {
16172
16169
  a2.matches ? n2() : r2();
16173
16170
  };
16174
16171
  t.useEffect(() => {
16175
16172
  (() => {
16176
- switch (ot && (ot = false, a2.removeEventListener("change", o2)), e2) {
16173
+ switch (it && (it = false, a2.removeEventListener("change", o2)), e2) {
16177
16174
  case "light":
16178
16175
  r2();
16179
16176
  break;
@@ -16181,11 +16178,11 @@
16181
16178
  n2();
16182
16179
  break;
16183
16180
  default:
16184
- o2(), ot = true, a2.addEventListener("change", o2);
16181
+ o2(), it = true, a2.addEventListener("change", o2);
16185
16182
  }
16186
16183
  })();
16187
16184
  }, [e2]);
16188
- }, it = (e2) => {
16185
+ }, ut = (e2) => {
16189
16186
  const t2 = "ono-view-transition-clip-path-circle", { element: n2, duration: r2 = 300, themeRules: a2, onChangeTheme: o2 } = e2, l2 = (a2 == null ? void 0 : a2()) || document.documentElement.classList.contains("dark") ? "dark" : "light";
16190
16187
  if (!document.startViewTransition) return o2("dark" === l2 ? "light" : "dark");
16191
16188
  const i2 = document.startViewTransition(() => {
@@ -16200,14 +16197,14 @@
16200
16197
  document.head.querySelectorAll("style").forEach((t3) => t3.getAttribute("data-style-tag") === e3 && t3.remove());
16201
16198
  })(t2), r2 + 100);
16202
16199
  });
16203
- }, st = (e2) => new Promise((t2) => {
16200
+ }, ct = (e2) => new Promise((t2) => {
16204
16201
  const n2 = new FileReader();
16205
16202
  n2.readAsDataURL(e2), n2.onload = (e3) => {
16206
16203
  var _a;
16207
16204
  const n3 = (_a = e3.target) == null ? void 0 : _a.result, r2 = n3.split(",")[1];
16208
16205
  t2(r2);
16209
16206
  };
16210
- }), ut = (e2, t2 = "abc.jpg") => new File([e2], t2, { type: e2.type }), ct = async (e2) => await (await fetch(e2)).blob(), dt = (e2) => e2 < 10 ? `0${e2}` : `${e2}`, ft = (e2) => e2.toString().length > 13 ? new Date(Number(e2.toString().substring(0, 13))) : 13 === e2.toString().length ? new Date(e2) : e2.toString().length < 13 && e2.toString().length > 10 ? new Date(Number((e2.toString() + "000").substring(0, 13))) : 10 === e2.toString().length ? new Date(1e3 * e2) : new Date(Number((e2.toString() + "000000000000").substring(0, 13)));
16207
+ }), dt = (e2, t2 = "abc.jpg") => new File([e2], t2, { type: e2.type }), ft = async (e2) => await (await fetch(e2)).blob(), pt = (e2) => e2 < 10 ? `0${e2}` : `${e2}`, ht = (e2) => e2.toString().length > 13 ? new Date(Number(e2.toString().substring(0, 13))) : 13 === e2.toString().length ? new Date(e2) : e2.toString().length < 13 && e2.toString().length > 10 ? new Date(Number((e2.toString() + "000").substring(0, 13))) : 10 === e2.toString().length ? new Date(1e3 * e2) : new Date(Number((e2.toString() + "000000000000").substring(0, 13)));
16211
16208
  e.AutoSliderList = ({ list: e2, style: n2, disable: r2, children: a2, sliderBox: o2, className: l2, sliderStyle: i2, duration: s2 = 300, sliderClassName: u2, currentIndex: c2 = 0, direction: p2 = V.Horizontal, sliderTransitionTimingFunction: h2 = "ease-in-out" }) => {
16212
16209
  const [m2, g2] = t.useState(false), [y2, b2] = t.useState(0), [v2, k2] = t.useState({ t: 0, l: 0 }), [w2, S2] = t.useState({ w: 0, h: 0 }), x2 = t.useRef(null), C2 = t.useRef(null), E2 = t.useMemo(() => ["width", "height", "transform"].map((e3) => `${e3} ${s2 / 1e3}s ${h2}`).join(","), [p2, s2, h2]), T2 = t.useMemo(() => ({ width: w2.w, height: w2.h, transition: m2 ? E2 : "initial", transform: `translate(${v2.l}px, ${v2.t}px)` }), [w2, v2]), { w: P2, h: z2 } = f();
16213
16210
  return t.useEffect(() => {
@@ -16296,7 +16293,7 @@
16296
16293
  });
16297
16294
  })(), p2.current && (p2.current.indeterminate = l2);
16298
16295
  }, [p2, o2, n2, l2]), d.jsx("input", { id: e2, type: "checkbox", ref: p2, checked: r2, onChange: a2, className: [o2, "line" === s2 ? "ono-checkbox-line" : "ono-checkbox-border"].filter(Boolean).join(" "), style: n2 });
16299
- }, e.Direction = V, e.EstimatedVirtualList = at, e.List = ge, e.MenuButton = ({ active: e2, onchange: n2, w: r2 = "40px", duration: a2 = 400, clr: o2 = "#f5f5f5", bgc: l2 = "#342A7C" }) => {
16296
+ }, e.Direction = V, e.EstimatedVirtualList = lt, e.List = be, e.MenuButton = ({ active: e2, onchange: n2, w: r2 = "40px", duration: a2 = 400, clr: o2 = "#f5f5f5", bgc: l2 = "#342A7C" }) => {
16300
16297
  const [i2, s2] = t.useState(false), u2 = (e3, t2) => {
16301
16298
  let n3;
16302
16299
  const r3 = e3.split("");
@@ -16307,7 +16304,7 @@
16307
16304
  }, [e2]), d.jsx("button", { className: "ono-menu-button", style: { width: r2, height: r2, background: l2, borderRadius: u2(r2, 0.2) }, onClick: () => requestAnimationFrame(() => {
16308
16305
  n2 == null ? void 0 : n2(!i2), s2(!i2);
16309
16306
  }), children: f2.map((e3, t2) => d.jsx("span", { style: { ...e3 } }, t2)) });
16310
- }, e.Modal = (e2) => ye(Be, e2, "ono-modal"), e.OnoInput = pe, e.OnoSelect = ({ options: e2, defaultValue: n2, placeholder: r2, inputBorder: a2, isShowArrow: o2, disabled: l2, clearable: i2, selectClassName: s2, optionsClassName: u2, filterable: c2, notFoundContent: f2, optionRender: p2, onClear: h2, onChange: m2, filterMethod: g2 }) => {
16307
+ }, e.Modal = (e2) => ve($e, e2, "ono-modal"), e.OnoInput = me, e.OnoSelect = ({ options: e2, defaultValue: n2, placeholder: r2, inputBorder: a2, isShowArrow: o2, disabled: l2, clearable: i2, selectClassName: s2, optionsClassName: u2, filterable: c2, notFoundContent: f2, optionRender: p2, onClear: h2, onChange: m2, filterMethod: g2 }) => {
16311
16308
  const [y2, b2] = t.useState(""), [v2, k2] = t.useState(""), [w2, S2] = t.useState(false), [x2, C2] = t.useState(false), [E2, T2] = t.useState(""), P2 = (t2) => {
16312
16309
  const n3 = e2.find((e3) => e3.value === t2);
16313
16310
  b2(n3 ? n3.label : "");
@@ -16316,9 +16313,9 @@
16316
16313
  };
16317
16314
  return t.useEffect(() => {
16318
16315
  n2 && P2(n2);
16319
- }, [n2, e2]), d.jsx(Qe, { sameWidth: true, trigger: "click", placement: "bottom", isShowArrow: o2, className: ["ono-option-container", u2].filter(Boolean).join(" "), onOpenChange: (e3) => {
16316
+ }, [n2, e2]), d.jsx(Ke, { sameWidth: true, trigger: "click", placement: "bottom", isShowArrow: o2, className: ["ono-option-container", u2].filter(Boolean).join(" "), onOpenChange: (e3) => {
16320
16317
  C2(e3), c2 && v2 && !e3 && k2("");
16321
- }, content: d.jsx(ge, { list: c2 ? g2 && "function" == typeof g2 ? g2(v2, e2) : e2.filter((e3) => e3.label.toLocaleLowerCase().includes(v2.toLocaleLowerCase())) : e2, fallback: f2 ?? d.jsx("div", { className: "ono-option-item", children: d.jsx("div", { className: "ono-option-item-content-no-data", onClick: (e3) => e3.stopPropagation(), children: "No Data" }) }), children: (e3) => d.jsx(Ye, { ...e3, onChange: z2, currentValue: y2.toString(), optionRender: p2 }, e3.value) }), children: d.jsx("div", { className: "ono-select", onMouseEnter: () => S2(true), onMouseLeave: () => S2(false), children: d.jsx(pe, { className: [c2 ? "" : "ono-select-readonly", s2].filter(Boolean).join(" "), border: a2, disabled: l2, placeholder: c2 && E2 ? y2.toString() || "" : r2, readonly: !c2, value: c2 && x2 ? v2 : y2.toString(), clearable: w2 && i2, suffix: w2 && i2 && y2 || i2 && v2 && c2 ? d.jsx(d.Fragment, {}) : d.jsx(Ke, { isVisible: x2 }), onClear: () => {
16318
+ }, content: d.jsx(be, { list: c2 ? g2 && "function" == typeof g2 ? g2(v2, e2) : e2.filter((e3) => e3.label.toLocaleLowerCase().includes(v2.toLocaleLowerCase())) : e2, fallback: f2 ?? d.jsx("div", { className: "ono-option-item", children: d.jsx("div", { className: "ono-option-item-content-no-data", onClick: (e3) => e3.stopPropagation(), children: "No Data" }) }), children: (e3) => d.jsx(Xe, { ...e3, onChange: z2, currentValue: y2.toString(), optionRender: p2 }, e3.value) }), children: d.jsx("div", { className: "ono-select", onMouseEnter: () => S2(true), onMouseLeave: () => S2(false), children: d.jsx(me, { className: [c2 ? "" : "ono-select-readonly", s2].filter(Boolean).join(" "), border: a2, disabled: l2, placeholder: c2 && E2 ? y2.toString() || "" : r2, readonly: !c2, value: c2 && x2 ? v2 : y2.toString(), clearable: w2 && i2, suffix: w2 && i2 && y2 || i2 && v2 && c2 ? d.jsx(d.Fragment, {}) : d.jsx(Ge, { isVisible: x2 }), onClear: () => {
16322
16319
  h2 == null ? void 0 : h2(), m2 == null ? void 0 : m2(""), T2(""), b2(""), k2("");
16323
16320
  }, onChange: (e3) => k2(e3.target.value) }) }) });
16324
16321
  }, e.OnoTextarea = ({ id: e2, name: n2, rows: r2, maxLength: a2, minLength: o2, className: l2, placeholder: i2, readonly: s2, resize: u2 = true, autocomplete: c2 = "off", autofocus: f2, form: p2, disabled: h2, autoSize: m2, showCount: g2, border: y2 = "1px solid #5644b8", boxShadow: b2 = "0 0 0 2px #7969d11a", value: v2 = "", onChange: k2 }) => {
@@ -16348,7 +16345,7 @@
16348
16345
  }
16349
16346
  }
16350
16347
  }, deps: [E2] }];
16351
- return N2.forEach(({ key: e3, handler: t2, deps: n3 }) => me(e3, t2, { target: _2.current, deps: n3 })), t.useEffect(() => {
16348
+ return N2.forEach(({ key: e3, handler: t2, deps: n3 }) => ye(e3, t2, { target: _2.current, deps: n3 })), t.useEffect(() => {
16352
16349
  S2(v2);
16353
16350
  }, [v2]), t.useEffect(() => {
16354
16351
  (() => {
@@ -16388,7 +16385,7 @@
16388
16385
  })(), p2 && n2 === r2 ? null : d.jsx("li", { className: "ono-pagination-base", style: { cursor: n2 !== r2 ? "pointer" : "no-drop" }, onClick: () => {
16389
16386
  u2(n2 >= r2 ? r2 : n2 + 1);
16390
16387
  }, children: o2 ? "function" == typeof o2 ? o2(n2 !== r2) : o2 : d.jsx("div", { className: o2 ? "ono-pagination-base" : "ono-pagination-btn", children: "nextBtn" }) }), t2 && d.jsx("li", { className: t2 ? "ono-pagination-base" : "ono-pagination-btn", onClick: () => u2(r2), children: t2 })] });
16391
- }, e.Radio = We, e.RadioGroup = ({ name: e2, style: t2, options: n2, onChange: r2, className: a2, radioW: o2 = 16, radioGap: l2 = 4, labelPosition: i2 = "right", checkedColor: s2 = "#532ce1", unCheckedColor: u2 = "transparent", value: c2 }) => d.jsx("div", { className: ["ono-radio-group", a2].join(" "), style: t2, children: n2.map(({ label: t3, value: n3, disabled: a3 }) => d.jsx(We, { name: e2, value: n3, radioW: o2, radioGap: l2, style: { flexDirection: "left" === i2 ? "row-reverse" : "row" }, checkedColor: s2, unCheckedColor: u2, onChange: () => r2(n3), checked: c2 + "" == n3 + "", disabled: "function" == typeof a3 ? a3(c2) : a3 || false, children: t3 }, t3)) }), e.SvgImg = ({ w: e2, h: n2, src: r2, clr: a2, className: o2, onClick: l2 }) => {
16388
+ }, e.Radio = Ve, e.RadioGroup = ({ name: e2, style: t2, options: n2, onChange: r2, className: a2, radioW: o2 = 16, radioGap: l2 = 4, labelPosition: i2 = "right", checkedColor: s2 = "#532ce1", unCheckedColor: u2 = "transparent", value: c2 }) => d.jsx("div", { className: ["ono-radio-group", a2].join(" "), style: t2, children: n2.map(({ label: t3, value: n3, disabled: a3 }) => d.jsx(Ve, { name: e2, value: n3, radioW: o2, radioGap: l2, style: { flexDirection: "left" === i2 ? "row-reverse" : "row" }, checkedColor: s2, unCheckedColor: u2, onChange: () => r2(n3), checked: c2 + "" == n3 + "", disabled: "function" == typeof a3 ? a3(c2) : a3 || false, children: t3 }, t3)) }), e.SvgImg = ({ w: e2, h: n2, src: r2, clr: a2, className: o2, onClick: l2 }) => {
16392
16389
  const i2 = t.useRef(null), s2 = [{ value: e2, name: "w" }, { value: n2, name: "h" }, { value: a2, name: "clr" }];
16393
16390
  return t.useEffect(() => {
16394
16391
  i2.current && s2.forEach((e3) => {
@@ -16461,7 +16458,7 @@
16461
16458
  ${r2 || ""}
16462
16459
  ${m2()}
16463
16460
  `, style: o2, onClick: (e3) => e3.stopPropagation(), children: "function" == typeof e2 ? e2(h2) : e2 }) });
16464
- }, e.Tooltip = Qe, e.Waterfall = ({ options: e2, pageSize: n2, children: r2, request: a2, reloadData: o2, className: l2, style: i2, updateData: s2, loading: u2 = true, bottomThreshold: c2 = 50 }) => {
16461
+ }, e.Tooltip = Ke, e.Waterfall = ({ options: e2, pageSize: n2, children: r2, request: a2, reloadData: o2, className: l2, style: i2, updateData: s2, loading: u2 = true, bottomThreshold: c2 = 50 }) => {
16465
16462
  const [f2, p2] = t.useState({ page: 1, reloadData: o2, loading: false, isFinish: false, gap: "number" == typeof e2 ? 0 : e2.gap, imageWidth: "number" == typeof e2 ? e2 : 0, columns: "number" == typeof e2 ? 0 : e2.columns, imageList: [] }), [h2, m2] = t.useState([]), [g2, y2] = t.useState([]), b2 = t.useRef(null), v2 = t.useRef(null), k2 = t.useRef(null), w2 = (e3) => p2((t2) => ({ ...t2, ...e3 })), S2 = async (e3, t2) => {
16466
16463
  const n3 = o2 && f2.reloadData !== o2;
16467
16464
  if (f2.isFinish) return;
@@ -16509,7 +16506,7 @@
16509
16506
  }), [k2, o2]), t.useEffect(() => {
16510
16507
  s2 && S2(f2.page, n2);
16511
16508
  }, [s2, f2.loading, f2.page, v2.current]), d.jsxs("div", { className: "ono-waterfall-container", children: [d.jsx("div", { ref: v2, className: [l2, "ono-waterfall-content"].join(" ").trim(), style: i2, children: d.jsx("div", { ref: k2, className: "ono-waterfall-wrapper", style: { height: Math.max(...h2) - f2.gap + "px" }, children: f2.imageList.map((e3, t2) => d.jsx("div", { className: "ono-waterfall-item", style: { width: `${f2.imageWidth}px`, transform: `translate(${g2[t2].x}px,${g2[t2].y}px)` }, children: r2(e3, t2) }, e3.id)) }) }), f2.loading && ("function" == typeof u2 ? u2() : u2 && "boolean" == typeof u2 ? d.jsx("div", { className: "ono-waterfall-loading", children: "loading..." }) : u2)] });
16512
- }, e.addCommasToNumber = O, e.addEventWithOriginHandler = D, e.adjustingColors = Ue, e.base64ToBlob = (e2) => {
16509
+ }, e.addCommasToNumber = O, e.addEventWithOriginHandler = D, e.adjustingColors = Be, e.base64ToBlob = (e2) => {
16513
16510
  const t2 = e2.split(","), n2 = t2[0].match(/:(.*?);/)[1], r2 = atob(t2[1]);
16514
16511
  let a2 = r2.length;
16515
16512
  const o2 = new Uint8Array(a2);
@@ -16522,7 +16519,7 @@
16522
16519
  for (; o2--; ) i2[o2] = a2.charCodeAt(o2);
16523
16520
  const s2 = new Blob([i2], { type: r2 });
16524
16521
  return new File([s2], t2 + l2, { type: r2, lastModified: (/* @__PURE__ */ new Date()).getTime() });
16525
- }, e.blobToBase64 = st, e.blobToFile = ut, e.calculateAspectRatio = C, e.checkDeviceIsMobile = g, e.checkStatusCode = b, e.colorUtils = He, e.common = $, e.convertSecondToOtherTime = (e2, t2) => {
16522
+ }, e.blobToBase64 = ct, e.blobToFile = dt, e.calculateAspectRatio = C, e.checkDeviceIsMobile = g, e.checkStatusCode = b, e.colorUtils = We, e.common = $, e.convertSecondToOtherTime = (e2, t2) => {
16526
16523
  const n2 = { year: 31536e3, month: 2592e3, day: 86400, hour: 3600, minute: 60, second: 1 };
16527
16524
  if (!n2[t2]) throw new Error('Invalid type. Please use "day", "hour", "minute", or "second".');
16528
16525
  return Math.floor(e2 / n2[t2]);
@@ -16533,27 +16530,27 @@
16533
16530
  return t2((_a = e3.target) == null ? void 0 : _a.result);
16534
16531
  };
16535
16532
  }), e.fileToBlob = (e2) => e2.slice(0, e2.size, e2.type), e.formatFileSize = x, e.formatSecondes = w, e.formatTime = (e2, t2 = "YY-MM-DD hh:mm:ss") => {
16536
- const n2 = ["YY", "MM", "DD", "hh", "mm", "ss"], r2 = [], a2 = ft(e2);
16537
- r2.push(a2.getFullYear().toString()), r2.push(dt(a2.getMonth() + 1)), r2.push(dt(a2.getDate())), r2.push(dt(a2.getHours())), r2.push(dt(a2.getMinutes())), r2.push(dt(a2.getSeconds()));
16533
+ const n2 = ["YY", "MM", "DD", "hh", "mm", "ss"], r2 = [], a2 = ht(e2);
16534
+ r2.push(a2.getFullYear().toString()), r2.push(pt(a2.getMonth() + 1)), r2.push(pt(a2.getDate())), r2.push(pt(a2.getHours())), r2.push(pt(a2.getMinutes())), r2.push(pt(a2.getSeconds()));
16538
16535
  for (let e3 in r2) t2 = t2.replace(n2[e3], r2[e3]);
16539
16536
  return t2;
16540
- }, e.getElementCenterPosition = v, e.getFileName = B, e.getFileSuffix = W, e.getImageSIze = N, e.getPointDistance = F, e.getURLSearchParams = P, e.grayColor = j, e.localFormat = (e2, t2 = "YY-MM-DD hh:mm:ss", n2 = "cn") => {
16541
- const r2 = ["YY", "MM", "DD", "hh", "mm", "ss"], a2 = [], o2 = ft(e2);
16537
+ }, e.getElementCenterPosition = v, e.getFileName = B, e.getFileSuffix = W, e.getImageSIze = N, e.getPointDistance = F, e.getURLSearchParams = P, e.grayColor = j, e.injunctiveBox = de, e.localFormat = (e2, t2 = "YY-MM-DD hh:mm:ss", n2 = "cn") => {
16538
+ const r2 = ["YY", "MM", "DD", "hh", "mm", "ss"], a2 = [], o2 = ht(e2);
16542
16539
  a2.push(((e3, t3) => {
16543
16540
  const n3 = { en: ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"], cn: ["零", "一", "二", "三", "四", "五", "六", "七", "八", "九"] };
16544
16541
  return e3.split("").map((e4) => n3[t3][Number(e4)]).join("");
16545
- })(o2.getFullYear().toString(), n2)), a2.push(((e3, t3) => ({ en: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sept", "Oct", "Nov", "Dec"], cn: ["一月", "二月", "三月", "四月", "五月", "六月", "七月", "八月", "九月", "十月", "十一月", "十二月"] })[t3][Number(e3) - 1])(dt(o2.getMonth() + 1), n2)), a2.push(((e3, t3) => {
16542
+ })(o2.getFullYear().toString(), n2)), a2.push(((e3, t3) => ({ en: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sept", "Oct", "Nov", "Dec"], cn: ["一月", "二月", "三月", "四月", "五月", "六月", "七月", "八月", "九月", "十月", "十一月", "十二月"] })[t3][Number(e3) - 1])(pt(o2.getMonth() + 1), n2)), a2.push(((e3, t3) => {
16546
16543
  let n3;
16547
16544
  return "en" === t3 ? n3 = "01" === e3 || "21" === e3 || "31" === e3 ? Number(e3) + "st" : "02" === e3 || "22" === e3 ? Number(e3) + "nd" : "03" === e3 || "23" === e3 ? Number(e3) + "rd" : Number(e3) + "th" : "01" === e3 ? n3 = "一日" : "02" === e3 ? n3 = "二日" : "03" === e3 ? n3 = "三日" : "04" === e3 ? n3 = "四日" : "05" === e3 ? n3 = "五日" : "06" === e3 ? n3 = "六日" : "07" === e3 ? n3 = "七日" : "08" === e3 ? n3 = "八日" : "09" === e3 ? n3 = "九日" : "10" === e3 ? n3 = "十日" : "11" === e3 ? n3 = "十一日" : "12" === e3 ? n3 = "十二日" : "13" === e3 ? n3 = "十三日" : "14" === e3 ? n3 = "十四日" : "15" === e3 ? n3 = "十五日" : "16" === e3 ? n3 = "十六日" : "17" === e3 ? n3 = "十七日" : "18" === e3 ? n3 = "十八日" : "19" === e3 ? n3 = "十九日" : "20" === e3 ? n3 = "二十日" : "21" === e3 ? n3 = "二十一日" : "22" === e3 ? n3 = "二十二日" : "23" === e3 ? n3 = "二十三日" : "24" === e3 ? n3 = "二十四日" : "25" === e3 ? n3 = "二十五日" : "26" === e3 ? n3 = "二十六日" : "27" === e3 ? n3 = "二十七日" : "28" === e3 ? n3 = "二十八日" : "29" === e3 ? n3 = "二十九日" : "30" === e3 ? n3 = "三十日" : "31" === e3 && (n3 = "三十一日"), n3 ?? e3;
16548
- })(dt(o2.getDate()), n2)), a2.push(dt(o2.getHours())), a2.push(dt(o2.getMinutes())), a2.push(dt(o2.getSeconds()));
16545
+ })(pt(o2.getDate()), n2)), a2.push(pt(o2.getHours())), a2.push(pt(o2.getMinutes())), a2.push(pt(o2.getSeconds()));
16549
16546
  for (let e3 in a2) t2 = t2.replace(r2[e3], a2[e3]);
16550
16547
  return t2;
16551
- }, e.mediaAutoplayPolicies = T, e.message = _e, e.parseQuery = U, e.passwordStrength = p, e.pick = H, e.portalRenderer = ye, e.printStr = m, e.pureNumber = M, e.quickSort = S, e.rafTimeout = L, e.randomString = h, e.safeCapitalizeWord = _, e.second2Day = (e2, t2) => {
16548
+ }, e.mediaAutoplayPolicies = T, e.message = Ne, e.parseQuery = U, e.passwordStrength = p, e.pick = H, e.portalRenderer = ve, e.printStr = m, e.pureNumber = M, e.quickSort = S, e.rafTimeout = L, e.randomString = h, e.safeCapitalizeWord = _, e.second2Day = (e2, t2) => {
16552
16549
  const n2 = ["DD", "hh", "mm", "ss"], r2 = [];
16553
- r2.push(Math.floor(e2 / 86400)), r2.push(dt(Math.floor(e2 % 86400 / 3600))), r2.push(dt(Math.floor(e2 % 3600 / 60))), r2.push(dt(e2 % 60));
16550
+ r2.push(Math.floor(e2 / 86400)), r2.push(pt(Math.floor(e2 % 86400 / 3600))), r2.push(pt(Math.floor(e2 % 3600 / 60))), r2.push(pt(e2 % 60));
16554
16551
  for (let e3 = 0; e3 < n2.length; e3++) t2 = t2.replace(n2[e3], r2[e3].toString());
16555
16552
  return t2;
16556
- }, e.singleton = z, e.toast = rt, e.urlToBase64 = async (e2) => await st(await ct(e2)), e.urlToBlob = ct, e.urlToFile = async (e2) => ut(await ct(e2)), e.useClickOutSide = $e, e.useCountdown = (e2 = 60, n2) => {
16553
+ }, e.singleton = z, e.toast = ot, e.urlToBase64 = async (e2) => await ct(await ft(e2)), e.urlToBlob = ft, e.urlToFile = async (e2) => dt(await ft(e2)), e.useClickOutSide = qe, e.useCountdown = (e2 = 60, n2) => {
16557
16554
  const [r2, a2] = t.useState(e2), [o2, l2] = t.useState(false), i2 = t.useRef(null), s2 = t.useCallback(() => l2(true), []), u2 = t.useCallback(() => {
16558
16555
  l2(false), a2(e2), i2.current && (clearTimeout(i2.current), i2.current = null), n2 == null ? void 0 : n2();
16559
16556
  }, [e2, n2]);
@@ -16564,20 +16561,20 @@
16564
16561
  i2.current && (clearTimeout(i2.current), i2.current = null);
16565
16562
  };
16566
16563
  }, [o2, r2, u2]), [r2, s2, u2];
16567
- }, e.useEventListener = Q, e.useGetElementSize = f, e.useKeyPress = me, e.useMouseClick = () => {
16564
+ }, e.useEventListener = Q, e.useGetElementSize = f, e.useKeyPress = ye, e.useMouseClick = () => {
16568
16565
  const [e2, n2] = t.useState({ clientX: 0, clientY: 0, screenX: 0, screenY: 0, pageX: 0, pageY: 0 });
16569
16566
  return Q("click", (e3) => {
16570
16567
  const t2 = e3.clientX, r2 = e3.clientY, a2 = e3.screenX, o2 = e3.screenY, l2 = e3.pageX, i2 = e3.pageY;
16571
16568
  n2({ clientX: t2, clientY: r2, screenX: a2, screenY: o2, pageX: l2, pageY: i2 });
16572
16569
  }), e2;
16573
- }, e.useTheme = lt, e.useThemePro = (e2) => {
16570
+ }, e.useTheme = st, e.useThemePro = (e2) => {
16574
16571
  const { initTheme: n2 = "light", themeRules: r2 = (e3) => {
16575
16572
  e3 ? document.documentElement.classList.add("dark") : document.documentElement.classList.remove("dark");
16576
16573
  } } = e2 || Object.assign({}), [a2, o2] = t.useState(n2), l2 = t.useRef(null);
16577
- return lt({ theme: a2, onDark: () => {
16578
- l2.current ? it({ element: l2.current, onChangeTheme: () => r2(true) }) : r2(true);
16574
+ return st({ theme: a2, onDark: () => {
16575
+ l2.current ? ut({ element: l2.current, onChangeTheme: () => r2(true) }) : r2(true);
16579
16576
  }, onLight: () => {
16580
- l2.current ? it({ element: l2.current, onChangeTheme: () => r2(false) }) : r2(false);
16577
+ l2.current ? ut({ element: l2.current, onChangeTheme: () => r2(false) }) : r2(false);
16581
16578
  } }), [a2, ({ targetTheme: e3, element: t2, onChange: n3 }) => {
16582
16579
  l2.current = t2 || null, requestAnimationFrame(() => {
16583
16580
  n3 == null ? void 0 : n3(), o2(e3);
Binary file
Binary file
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "ono-react-element",
3
3
  "private": false,
4
- "version": "0.0.15",
4
+ "version": "0.0.16",
5
5
  "description": "Component library by React + Typescript",
6
6
  "type": "module",
7
7
  "main": "./dist/umd/index.umd.cjs",