@biznext-ui/react 0.6.3 → 0.6.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.es.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { jsx as E, Fragment as In, jsxs as de } from "react/jsx-runtime";
2
2
  import * as G from "react";
3
- import qe, { createContext as Ne, useContext as Y, useRef as K, useId as ki, useInsertionEffect as Xo, useCallback as q, useMemo as be, useEffect as Ae, Children as fn, isValidElement as dl, useLayoutEffect as Wo, useState as ie, forwardRef as Ln, Fragment as Dt, createElement as fl, Component as Zo, useReducer as hl } from "react";
3
+ import qe, { createContext as Ne, useContext as Y, useRef as q, useId as ki, useInsertionEffect as Xo, useCallback as K, useMemo as be, useEffect as Ae, Children as fn, isValidElement as dl, useLayoutEffect as Wo, useState as ee, forwardRef as Ln, Fragment as Dt, createElement as fl, Component as Zo, useReducer as hl } from "react";
4
4
  import pl, { createPortal as tt } from "react-dom";
5
5
  const Ho = Ne({}), ml = (e, t) => {
6
6
  switch (t.type) {
@@ -210,7 +210,7 @@ function Nl(e) {
210
210
  }
211
211
  const Yi = Ne({});
212
212
  function ji(e) {
213
- const t = K(null);
213
+ const t = q(null);
214
214
  return t.current === null && (t.current = e()), t.current;
215
215
  }
216
216
  const Xn = Ne(null), Ji = Ne({
@@ -237,7 +237,7 @@ class Ll extends G.Component {
237
237
  }
238
238
  }
239
239
  function Xl({ children: e, isPresent: t }) {
240
- const n = ki(), r = K(null), i = K({
240
+ const n = ki(), r = q(null), i = q({
241
241
  width: 0,
242
242
  height: 0,
243
243
  top: 0,
@@ -263,7 +263,7 @@ function Xl({ children: e, isPresent: t }) {
263
263
  }, [t]), E(Ll, { isPresent: t, childRef: r, sizeRef: i, children: G.cloneElement(e, { ref: r }) });
264
264
  }
265
265
  const Wl = ({ children: e, initial: t, isPresent: n, onExitComplete: r, custom: i, presenceAffectsLayout: s, mode: o }) => {
266
- const u = ji(Zl), a = ki(), l = q((d) => {
266
+ const u = ji(Zl), a = ki(), l = K((d) => {
267
267
  u.set(d, !0);
268
268
  for (const f of u.values())
269
269
  if (!f)
@@ -302,7 +302,7 @@ function Yo(e = !0) {
302
302
  Ae(() => {
303
303
  e && i(s);
304
304
  }, [e]);
305
- const o = q(() => e && r && r(s), [s, r, e]);
305
+ const o = K(() => e && r && r(s), [s, r, e]);
306
306
  return !n && r ? [!1, o] : [!0];
307
307
  }
308
308
  const en = (e) => e.key || "";
@@ -313,7 +313,7 @@ function Zr(e) {
313
313
  }), t;
314
314
  }
315
315
  const Ui = typeof window < "u", jo = Ui ? Wo : Ae, _i = ({ children: e, custom: t, initial: n = !0, onExitComplete: r, presenceAffectsLayout: i = !0, mode: s = "sync", propagate: o = !1 }) => {
316
- const [u, a] = Yo(o), l = be(() => Zr(e), [e]), c = o && !u ? [] : l.map(en), d = K(!0), f = K(l), h = ji(() => /* @__PURE__ */ new Map()), [g, m] = ie(l), [p, b] = ie(l);
316
+ const [u, a] = Yo(o), l = be(() => Zr(e), [e]), c = o && !u ? [] : l.map(en), d = q(!0), f = q(l), h = ji(() => /* @__PURE__ */ new Map()), [g, m] = ee(l), [p, b] = ee(l);
317
317
  jo(() => {
318
318
  d.current = !1, f.current = l;
319
319
  for (let C = 0; C < p.length; C++) {
@@ -437,7 +437,7 @@ function Jo(e, t) {
437
437
  o[tn[I]].cancel(b);
438
438
  }, state: i, steps: o };
439
439
  }
440
- const { schedule: W, cancel: Ye, state: te, steps: qn } = Jo(typeof requestAnimationFrame < "u" ? requestAnimationFrame : fe, !0), Uo = Ne({ strict: !1 }), Hr = {
440
+ const { schedule: W, cancel: Ye, state: ne, steps: qn } = Jo(typeof requestAnimationFrame < "u" ? requestAnimationFrame : fe, !0), Uo = Ne({ strict: !1 }), Hr = {
441
441
  animation: [
442
442
  "animate",
443
443
  "variants",
@@ -579,7 +579,7 @@ function lt(e) {
579
579
  return e && typeof e == "object" && Object.prototype.hasOwnProperty.call(e, "current");
580
580
  }
581
581
  function ql(e, t, n) {
582
- return q(
582
+ return K(
583
583
  (r) => {
584
584
  r && e.onMount && e.onMount(r), t && (r ? t.mount(r) : t.unmount()), n && (typeof n == "function" ? n(r) : lt(n) && (n.current = r));
585
585
  },
@@ -594,7 +594,7 @@ function ql(e, t, n) {
594
594
  const qi = (e) => e.replace(/([a-z])([A-Z])/gu, "$1-$2").toLowerCase(), ec = "framerAppearId", Qo = "data-" + qi(ec), { schedule: er } = Jo(queueMicrotask, !1), Ko = Ne({});
595
595
  function tc(e, t, n, r, i) {
596
596
  var s, o;
597
- const { visualElement: u } = Y(Zn), a = Y(Uo), l = Y(Xn), c = Y(Ji).reducedMotion, d = K(null);
597
+ const { visualElement: u } = Y(Zn), a = Y(Uo), l = Y(Xn), c = Y(Ji).reducedMotion, d = q(null);
598
598
  r = r || a.renderer, !d.current && r && (d.current = r(e, {
599
599
  visualState: t,
600
600
  parent: u,
@@ -605,11 +605,11 @@ function tc(e, t, n, r, i) {
605
605
  }));
606
606
  const f = d.current, h = Y(Ko);
607
607
  f && !f.projection && i && (f.type === "html" || f.type === "svg") && nc(d.current, n, i, h);
608
- const g = K(!1);
608
+ const g = q(!1);
609
609
  Xo(() => {
610
610
  f && g.current && f.update(n, l);
611
611
  });
612
- const m = n[Qo], p = K(!!m && !(!((s = window.MotionHandoffIsComplete) === null || s === void 0) && s.call(window, m)) && ((o = window.MotionHasOptimisedAnimation) === null || o === void 0 ? void 0 : o.call(window, m)));
612
+ const m = n[Qo], p = q(!!m && !(!((s = window.MotionHandoffIsComplete) === null || s === void 0) && s.call(window, m)) && ((o = window.MotionHasOptimisedAnimation) === null || o === void 0 ? void 0 : o.call(window, m)));
613
613
  return jo(() => {
614
614
  f && (g.current = !0, window.MotionIsMounted = !0, f.updateFeatures(), er.render(f.render), p.current && f.animationState && f.animationState.animateChanges());
615
615
  }), Ae(() => {
@@ -1433,7 +1433,7 @@ function Jc() {
1433
1433
  pn = void 0;
1434
1434
  }
1435
1435
  const De = {
1436
- now: () => (pn === void 0 && De.set(te.isProcessing || Hl.useManualTiming ? te.timestamp : performance.now()), pn),
1436
+ now: () => (pn === void 0 && De.set(ne.isProcessing || Hl.useManualTiming ? ne.timestamp : performance.now()), pn),
1437
1437
  set: (e) => {
1438
1438
  pn = e, queueMicrotask(Jc);
1439
1439
  }
@@ -2501,7 +2501,7 @@ const rf = (e) => {
2501
2501
  * If we're processing this frame we can use the
2502
2502
  * framelocked timestamp to keep things in sync.
2503
2503
  */
2504
- now: () => te.isProcessing ? te.timestamp : De.now()
2504
+ now: () => ne.isProcessing ? ne.timestamp : De.now()
2505
2505
  };
2506
2506
  }, sf = {
2507
2507
  decay: ds,
@@ -3192,7 +3192,7 @@ class qa {
3192
3192
  const d = si(this.lastMoveEventInfo, this.history), f = this.startEvent !== null, h = Df(d.offset, { x: 0, y: 0 }) >= 3;
3193
3193
  if (!f && !h)
3194
3194
  return;
3195
- const { point: g } = d, { timestamp: m } = te;
3195
+ const { point: g } = d, { timestamp: m } = ne;
3196
3196
  this.history.push({ ...g, timestamp: m });
3197
3197
  const { onStart: p, onMove: b } = this.handlers;
3198
3198
  f || (p && p(this.lastMoveEvent, d), this.startEvent = this.lastMoveEvent), b && b(this.lastMoveEvent, d);
@@ -3208,7 +3208,7 @@ class qa {
3208
3208
  }, !hr(t))
3209
3209
  return;
3210
3210
  this.dragSnapToOrigin = s, this.handlers = n, this.transformPagePoint = r, this.contextWindow = i || window;
3211
- const o = Ut(t), u = ri(o, this.transformPagePoint), { point: a } = u, { timestamp: l } = te;
3211
+ const o = Ut(t), u = ri(o, this.transformPagePoint), { point: a } = u, { timestamp: l } = ne;
3212
3212
  this.history = [{ ...a, timestamp: l }];
3213
3213
  const { onSessionStart: c } = n;
3214
3214
  c && c(t, si(u, this.history)), this.removeListeners = Jt(Bt(this.contextWindow, "pointermove", this.handlePointerMove), Bt(this.contextWindow, "pointerup", this.handlePointerUp), Bt(this.contextWindow, "pointercancel", this.handlePointerUp));
@@ -4105,7 +4105,7 @@ function pu({ attachResizeListener: e, defaultParent: t, measureScroll: n, check
4105
4105
  }
4106
4106
  this.isUpdating || this.nodes.forEach(Rh), this.isUpdating = !1, this.nodes.forEach(Gh), this.nodes.forEach(Eh), this.nodes.forEach(Vh), this.clearAllSnapshots();
4107
4107
  const u = De.now();
4108
- te.delta = We(0, 1e3 / 60, u - te.timestamp), te.timestamp = u, te.isProcessing = !0, qn.update.process(te), qn.preRender.process(te), qn.render.process(te), te.isProcessing = !1;
4108
+ ne.delta = We(0, 1e3 / 60, u - ne.timestamp), ne.timestamp = u, ne.isProcessing = !0, qn.update.process(ne), qn.preRender.process(ne), qn.render.process(ne), ne.isProcessing = !1;
4109
4109
  }
4110
4110
  didUpdate() {
4111
4111
  this.updateScheduled || (this.updateScheduled = !0, er.read(this.scheduleUpdate));
@@ -4230,7 +4230,7 @@ function pu({ attachResizeListener: e, defaultParent: t, measureScroll: n, check
4230
4230
  this.scroll = void 0, this.layout = void 0, this.snapshot = void 0, this.prevTransformTemplateValue = void 0, this.targetDelta = void 0, this.target = void 0, this.isLayoutDirty = !1;
4231
4231
  }
4232
4232
  forceRelativeParentToResolveTarget() {
4233
- this.relativeParent && this.relativeParent.resolvedRelativeTargetAt !== te.timestamp && this.relativeParent.resolveTargetDelta(!0);
4233
+ this.relativeParent && this.relativeParent.resolvedRelativeTargetAt !== ne.timestamp && this.relativeParent.resolveTargetDelta(!0);
4234
4234
  }
4235
4235
  resolveTargetDelta(o = !1) {
4236
4236
  var u;
@@ -4241,7 +4241,7 @@ function pu({ attachResizeListener: e, defaultParent: t, measureScroll: n, check
4241
4241
  return;
4242
4242
  const { layout: d, layoutId: f } = this.options;
4243
4243
  if (!(!this.layout || !(d || f))) {
4244
- if (this.resolvedRelativeTargetAt = te.timestamp, !this.targetDelta && !this.relativeTarget) {
4244
+ if (this.resolvedRelativeTargetAt = ne.timestamp, !this.targetDelta && !this.relativeTarget) {
4245
4245
  const h = this.getClosestProjectingParent();
4246
4246
  h && h.layout && this.animationProgress !== 1 ? (this.relativeParent = h, this.forceRelativeParentToResolveTarget(), this.relativeTarget = $(), this.relativeTargetOrigin = $(), Mt(this.relativeTargetOrigin, this.layout.layoutBox, h.layout.layoutBox), Ie(this.relativeTarget, this.relativeTargetOrigin)) : this.relativeParent = this.relativeTarget = void 0;
4247
4247
  }
@@ -4266,7 +4266,7 @@ function pu({ attachResizeListener: e, defaultParent: t, measureScroll: n, check
4266
4266
  var o;
4267
4267
  const u = this.getLead(), a = !!this.resumingFrom || this !== u;
4268
4268
  let l = !0;
4269
- if ((this.isProjectionDirty || !((o = this.parent) === null || o === void 0) && o.isProjectionDirty) && (l = !1), a && (this.isSharedProjectionDirty || this.isTransformDirty) && (l = !1), this.resolvedRelativeTargetAt === te.timestamp && (l = !1), l)
4269
+ if ((this.isProjectionDirty || !((o = this.parent) === null || o === void 0) && o.isProjectionDirty) && (l = !1), a && (this.isSharedProjectionDirty || this.isTransformDirty) && (l = !1), this.resolvedRelativeTargetAt === ne.timestamp && (l = !1), l)
4270
4270
  return;
4271
4271
  const { layout: c, layoutId: d } = this.options;
4272
4272
  if (this.isTreeAnimating = !!(this.parent && this.parent.isTreeAnimating || this.currentAnimation || this.pendingAnimation), this.isTreeAnimating || (this.targetDelta = this.relativeTarget = void 0), !this.layout || !(c || d))
@@ -5042,51 +5042,49 @@ const lp = (e, t) => tr(e) ? new up(t) : new ap(t, {
5042
5042
  }
5043
5043
  return { icon: t };
5044
5044
  }, fp = (e) => {
5045
- const { id: t, type: n, title: r, count: i = 1 } = e, { icon: s } = dp(n), o = 4e3, u = gl(), [a, l] = ie(!1), c = K(null), d = K(null), f = q(() => {
5045
+ const { id: t, type: n, title: r, count: i = 1 } = e, { icon: s } = dp(n), o = 4e3, u = gl(), [a, l] = ee(!1), [c, d] = ee(!1), f = q(null), h = K(() => {
5046
5046
  u.removeToast(t);
5047
- }, [t, u]), h = () => {
5048
- d.current && (clearTimeout(d.current), d.current = null), c.current && (clearInterval(c.current), c.current = null);
5047
+ }, [t, u]), g = () => {
5048
+ f.current && (clearTimeout(f.current), f.current = null);
5049
5049
  };
5050
- Ae(() => (d.current = setTimeout(() => {
5051
- c.current = setInterval(() => {
5052
- a || f();
5053
- }, 1e3);
5050
+ Ae(() => (f.current = setTimeout(() => {
5051
+ a ? d(!0) : h();
5054
5052
  }, o), () => {
5055
- h();
5056
- }), [a, f]);
5057
- const g = () => {
5053
+ g();
5054
+ }), [a, h]);
5055
+ const m = () => {
5058
5056
  l(!0);
5059
- }, m = () => {
5060
- l(!1);
5061
5057
  }, p = () => {
5062
- const b = Math.min(i - 1, 3);
5063
- return [...Array(b)].map((I, y) => {
5064
- const C = (y + 1) * 6, v = 1 - (y + 1) * 0.04, x = (y + 1) * 2;
5058
+ l(!1), c && h();
5059
+ }, b = () => {
5060
+ const I = Math.min(i - 1, 3);
5061
+ return [...Array(I)].map((y, C) => {
5062
+ const v = (C + 1) * 6, x = 1 - (C + 1) * 0.04, A = (C + 1) * 2;
5065
5063
  return /* @__PURE__ */ E(
5066
5064
  "div",
5067
5065
  {
5068
5066
  className: ge["toast-stack-layer"],
5069
5067
  style: {
5070
- transform: `translate(${x}px, ${C}px) scale(${v})`,
5071
- zIndex: -1 * (y + 1)
5068
+ transform: `translate(${A}px, ${v}px) scale(${x})`,
5069
+ zIndex: -1 * (C + 1)
5072
5070
  }
5073
5071
  },
5074
- y
5072
+ C
5075
5073
  );
5076
5074
  });
5077
5075
  };
5078
- return /* @__PURE__ */ de("div", { className: ge["toast-wrapper"], onMouseEnter: g, onMouseLeave: m, children: [
5079
- p(),
5076
+ return /* @__PURE__ */ de("div", { className: ge["toast-wrapper"], onMouseEnter: m, onMouseLeave: p, children: [
5077
+ b(),
5080
5078
  /* @__PURE__ */ E(Zt.div, { layout: !0, initial: { opacity: 0, y: 50, scale: 0.95 }, animate: { opacity: 1, y: 0, scale: 1 }, exit: { opacity: 0, y: 0, scale: 0.95 }, children: /* @__PURE__ */ de("div", { className: nt(ge.toast, ge[n]), children: [
5081
5079
  i > 1 && /* @__PURE__ */ E("span", { className: ge["toast-count"], children: i }),
5082
5080
  /* @__PURE__ */ E("div", { className: ge["toast-icon"], children: s }),
5083
5081
  /* @__PURE__ */ E("div", { className: ge["toast-content"], children: /* @__PURE__ */ E("p", { className: ge["toast-title"], children: r }) }),
5084
- /* @__PURE__ */ E("div", { className: ge["toast-close"], children: /* @__PURE__ */ E("button", { type: "button", className: ge["toast-close-btn"], onClick: f, children: /* @__PURE__ */ E("span", { className: ge["toast-close-btn-icon"], children: /* @__PURE__ */ E(Nl, {}) }) }) })
5082
+ /* @__PURE__ */ E("div", { className: ge["toast-close"], children: /* @__PURE__ */ E("button", { type: "button", className: ge["toast-close-btn"], onClick: h, children: /* @__PURE__ */ E("span", { className: ge["toast-close-btn-icon"], children: /* @__PURE__ */ E(Nl, {}) }) }) })
5085
5083
  ] }) })
5086
5084
  ] });
5087
5085
  };
5088
5086
  function hp(e) {
5089
- const { children: t } = e, [n, r] = ie(!1);
5087
+ const { children: t } = e, [n, r] = ee(!1);
5090
5088
  Ae(() => {
5091
5089
  r(!0);
5092
5090
  }, []);
@@ -5102,11 +5100,11 @@ const pp = ({ toasts: e, toastPosition: t = "top-center" }) => {
5102
5100
  const r = Array.from(n.values());
5103
5101
  return /* @__PURE__ */ E(hp, { children: /* @__PURE__ */ E("div", { className: nt(ge["toasts-container"], ge[t]), children: /* @__PURE__ */ E(_i, { initial: !1, children: r.map((i) => /* @__PURE__ */ E(fp, { id: i.id, type: i.type, title: i.title, count: i.count }, `${i.type}|${i.title}`)) }) }) });
5104
5102
  };
5105
- var ee = [];
5103
+ var te = [];
5106
5104
  for (var di = 0; di < 256; ++di)
5107
- ee.push((di + 256).toString(16).slice(1));
5105
+ te.push((di + 256).toString(16).slice(1));
5108
5106
  function mp(e, t = 0) {
5109
- return (ee[e[t + 0]] + ee[e[t + 1]] + ee[e[t + 2]] + ee[e[t + 3]] + "-" + ee[e[t + 4]] + ee[e[t + 5]] + "-" + ee[e[t + 6]] + ee[e[t + 7]] + "-" + ee[e[t + 8]] + ee[e[t + 9]] + "-" + ee[e[t + 10]] + ee[e[t + 11]] + ee[e[t + 12]] + ee[e[t + 13]] + ee[e[t + 14]] + ee[e[t + 15]]).toLowerCase();
5107
+ return (te[e[t + 0]] + te[e[t + 1]] + te[e[t + 2]] + te[e[t + 3]] + "-" + te[e[t + 4]] + te[e[t + 5]] + "-" + te[e[t + 6]] + te[e[t + 7]] + "-" + te[e[t + 8]] + te[e[t + 9]] + "-" + te[e[t + 10]] + te[e[t + 11]] + te[e[t + 12]] + te[e[t + 13]] + te[e[t + 14]] + te[e[t + 15]]).toLowerCase();
5110
5108
  }
5111
5109
  var sn, gp = new Uint8Array(16);
5112
5110
  function bp() {
@@ -5154,7 +5152,7 @@ const xp = "biznext-ui-wec4qWkj9NU-c", Ap = "biznext-ui-mcehjNn9Nl0-9", Sp = "bi
5154
5152
  success: Ep
5155
5153
  };
5156
5154
  function Vp(e) {
5157
- const { children: t } = e, [n, r] = ie(!1);
5155
+ const { children: t } = e, [n, r] = ee(!1);
5158
5156
  Ae(() => {
5159
5157
  r(!0);
5160
5158
  }, []);
@@ -5205,7 +5203,7 @@ const Pp = (e) => {
5205
5203
  s("error", y, C);
5206
5204
  }, removeToast: (y) => {
5207
5205
  i({ type: "DELETE_TOAST", payload: { id: y, title: "", type: "" } });
5208
- } }, [f, h] = ie({}), [g, m] = ie(!1), p = (y) => {
5206
+ } }, [f, h] = ee({}), [g, m] = ee(!1), p = (y) => {
5209
5207
  h(y), m(!0);
5210
5208
  }, b = () => {
5211
5209
  m(!1);
@@ -5245,7 +5243,7 @@ function Fp(e) {
5245
5243
  return rt({ attr: { viewBox: "0 0 352 512" }, child: [{ tag: "path", attr: { d: "M242.72 256l100.07-100.07c12.28-12.28 12.28-32.19 0-44.48l-22.24-22.24c-12.28-12.28-32.19-12.28-44.48 0L176 189.28 75.93 89.21c-12.28-12.28-32.19-12.28-44.48 0L9.21 111.45c-12.28 12.28-12.28 32.19 0 44.48L109.28 256 9.21 356.07c-12.28 12.28-12.28 32.19 0 44.48l22.24 22.24c12.28 12.28 32.2 12.28 44.48 0L176 322.72l100.07 100.07c12.28 12.28 32.2 12.28 44.48 0l22.24-22.24c12.28-12.28 12.28-32.19 0-44.48L242.72 256z" }, child: [] }] })(e);
5246
5244
  }
5247
5245
  function Mp(e) {
5248
- const { children: t } = e, [n, r] = ie(!1);
5246
+ const { children: t } = e, [n, r] = ee(!1);
5249
5247
  Ae(() => {
5250
5248
  r(!0);
5251
5249
  }, []);
@@ -5253,7 +5251,7 @@ function Mp(e) {
5253
5251
  return n && i ? tt(t, i) : tt(t, document.body);
5254
5252
  }
5255
5253
  const Vr = Ne({ onClose: () => console.warn("Biznext-UI-Modal: Close Function not Implemented!") }), _t = (e) => {
5256
- const { type: t, index: n, height: r, width: i, sx: s, isOpen: o, onClose: u, children: a } = e, l = 9999 + (n || 0), [c, d] = ie(!1), [f, h] = ie(!1);
5254
+ const { type: t, index: n, height: r, width: i, sx: s, isOpen: o, onClose: u, children: a } = e, l = 9999 + (n || 0), [c, d] = ee(!1), [f, h] = ee(!1);
5257
5255
  Ae(() => {
5258
5256
  d(!0);
5259
5257
  }, []);
@@ -5430,14 +5428,14 @@ function He(e, t) {
5430
5428
  }
5431
5429
  var Jp = ["defaultInputValue", "defaultMenuIsOpen", "defaultValue", "inputValue", "menuIsOpen", "onChange", "onInputChange", "onMenuClose", "onMenuOpen", "value"];
5432
5430
  function Up(e) {
5433
- var t = e.defaultInputValue, n = t === void 0 ? "" : t, r = e.defaultMenuIsOpen, i = r === void 0 ? !1 : r, s = e.defaultValue, o = s === void 0 ? null : s, u = e.inputValue, a = e.menuIsOpen, l = e.onChange, c = e.onInputChange, d = e.onMenuClose, f = e.onMenuOpen, h = e.value, g = He(e, Jp), m = ie(u !== void 0 ? u : n), p = Xe(m, 2), b = p[0], I = p[1], y = ie(a !== void 0 ? a : i), C = Xe(y, 2), v = C[0], x = C[1], A = ie(h !== void 0 ? h : o), S = Xe(A, 2), B = S[0], F = S[1], Z = q(function(X, ce) {
5431
+ var t = e.defaultInputValue, n = t === void 0 ? "" : t, r = e.defaultMenuIsOpen, i = r === void 0 ? !1 : r, s = e.defaultValue, o = s === void 0 ? null : s, u = e.inputValue, a = e.menuIsOpen, l = e.onChange, c = e.onInputChange, d = e.onMenuClose, f = e.onMenuOpen, h = e.value, g = He(e, Jp), m = ee(u !== void 0 ? u : n), p = Xe(m, 2), b = p[0], I = p[1], y = ee(a !== void 0 ? a : i), C = Xe(y, 2), v = C[0], x = C[1], A = ee(h !== void 0 ? h : o), S = Xe(A, 2), B = S[0], F = S[1], Z = K(function(X, ce) {
5434
5432
  typeof l == "function" && l(X, ce), F(X);
5435
- }, [l]), J = q(function(X, ce) {
5433
+ }, [l]), J = K(function(X, ce) {
5436
5434
  var ae;
5437
5435
  typeof c == "function" && (ae = c(X, ce)), I(ae !== void 0 ? ae : X);
5438
- }, [c]), pe = q(function() {
5436
+ }, [c]), pe = K(function() {
5439
5437
  typeof f == "function" && f(), x(!0);
5440
- }, [f]), le = q(function() {
5438
+ }, [f]), le = K(function() {
5441
5439
  typeof d == "function" && d(), x(!1);
5442
5440
  }, [d]), U = u !== void 0 ? u : b, k = a !== void 0 ? a : v, L = h !== void 0 ? h : B;
5443
5441
  return T(T({}, g), {}, {
@@ -5580,7 +5578,7 @@ var om = /* @__PURE__ */ function() {
5580
5578
  }, e;
5581
5579
  }(), re = "-ms-", Gn = "-moz-", M = "-webkit-", Au = "comm", Tr = "rule", wr = "decl", am = "@import", Su = "@keyframes", um = "@layer", lm = Math.abs, jn = String.fromCharCode, cm = Object.assign;
5582
5580
  function dm(e, t) {
5583
- return ne(e, 0) ^ 45 ? (((t << 2 ^ ne(e, 0)) << 2 ^ ne(e, 1)) << 2 ^ ne(e, 2)) << 2 ^ ne(e, 3) : 0;
5581
+ return ie(e, 0) ^ 45 ? (((t << 2 ^ ie(e, 0)) << 2 ^ ie(e, 1)) << 2 ^ ie(e, 2)) << 2 ^ ie(e, 3) : 0;
5584
5582
  }
5585
5583
  function Eu(e) {
5586
5584
  return e.trim();
@@ -5594,7 +5592,7 @@ function D(e, t, n) {
5594
5592
  function Li(e, t) {
5595
5593
  return e.indexOf(t);
5596
5594
  }
5597
- function ne(e, t) {
5595
+ function ie(e, t) {
5598
5596
  return e.charCodeAt(t) | 0;
5599
5597
  }
5600
5598
  function Ht(e, t, n) {
@@ -5623,13 +5621,13 @@ function pm() {
5623
5621
  return Q;
5624
5622
  }
5625
5623
  function mm() {
5626
- return Q = he > 0 ? ne(xt, --he) : 0, vt--, Q === 10 && (vt = 1, Jn--), Q;
5624
+ return Q = he > 0 ? ie(xt, --he) : 0, vt--, Q === 10 && (vt = 1, Jn--), Q;
5627
5625
  }
5628
5626
  function ve() {
5629
- return Q = he < Vu ? ne(xt, he++) : 0, vt++, Q === 10 && (vt = 1, Jn++), Q;
5627
+ return Q = he < Vu ? ie(xt, he++) : 0, vt++, Q === 10 && (vt = 1, Jn++), Q;
5630
5628
  }
5631
5629
  function Oe() {
5632
- return ne(xt, he);
5630
+ return ie(xt, he);
5633
5631
  }
5634
5632
  function gn() {
5635
5633
  return he;
@@ -5735,7 +5733,7 @@ function vn(e, t, n, r, i, s, o, u, a) {
5735
5733
  switch (g = I, I = ve()) {
5736
5734
  // (
5737
5735
  case 40:
5738
- if (g != 108 && ne(A, d - 1) == 58) {
5736
+ if (g != 108 && ie(A, d - 1) == 58) {
5739
5737
  Li(A += D(bn(I), "&", "&\f"), "&\f") != -1 && (b = -1);
5740
5738
  break;
5741
5739
  }
@@ -5792,7 +5790,7 @@ function vn(e, t, n, r, i, s, o, u, a) {
5792
5790
  if (c === 0)
5793
5791
  vn(A, t, x, x, C, s, d, u, v);
5794
5792
  else
5795
- switch (f === 99 && ne(A, 3) === 110 ? 100 : f) {
5793
+ switch (f === 99 && ie(A, 3) === 110 ? 100 : f) {
5796
5794
  // d l m s
5797
5795
  case 100:
5798
5796
  case 108:
@@ -6035,13 +6033,13 @@ function wu(e, t) {
6035
6033
  case 5789:
6036
6034
  case 5021:
6037
6035
  case 4765:
6038
- if (Ge(e) - 1 - t > 6) switch (ne(e, t + 1)) {
6036
+ if (Ge(e) - 1 - t > 6) switch (ie(e, t + 1)) {
6039
6037
  // (m)ax-content, (m)in-content
6040
6038
  case 109:
6041
- if (ne(e, t + 4) !== 45) break;
6039
+ if (ie(e, t + 4) !== 45) break;
6042
6040
  // (f)ill-available, (f)it-content
6043
6041
  case 102:
6044
- return D(e, /(.+:)(.+)-([^]+)/, "$1" + M + "$2-$3$1" + Gn + (ne(e, t + 3) == 108 ? "$3" : "$2-$3")) + e;
6042
+ return D(e, /(.+:)(.+)-([^]+)/, "$1" + M + "$2-$3$1" + Gn + (ie(e, t + 3) == 108 ? "$3" : "$2-$3")) + e;
6045
6043
  // (s)tretch
6046
6044
  case 115:
6047
6045
  return ~Li(e, "stretch") ? wu(D(e, "stretch", "fill-available"), t) + e : e;
@@ -6049,21 +6047,21 @@ function wu(e, t) {
6049
6047
  break;
6050
6048
  // position: sticky
6051
6049
  case 4949:
6052
- if (ne(e, t + 1) !== 115) break;
6050
+ if (ie(e, t + 1) !== 115) break;
6053
6051
  // display: (flex|inline-flex)
6054
6052
  case 6444:
6055
- switch (ne(e, Ge(e) - 3 - (~Li(e, "!important") && 10))) {
6053
+ switch (ie(e, Ge(e) - 3 - (~Li(e, "!important") && 10))) {
6056
6054
  // stic(k)y
6057
6055
  case 107:
6058
6056
  return D(e, ":", ":" + M) + e;
6059
6057
  // (inline-)?fl(e)x
6060
6058
  case 101:
6061
- return D(e, /(.+:)([^;!]+)(;|!.+)?/, "$1" + M + (ne(e, 14) === 45 ? "inline-" : "") + "box$3$1" + M + "$2$3$1" + re + "$2box$3") + e;
6059
+ return D(e, /(.+:)([^;!]+)(;|!.+)?/, "$1" + M + (ie(e, 14) === 45 ? "inline-" : "") + "box$3$1" + M + "$2$3$1" + re + "$2box$3") + e;
6062
6060
  }
6063
6061
  break;
6064
6062
  // writing-mode
6065
6063
  case 5936:
6066
- switch (ne(e, t + 11)) {
6064
+ switch (ie(e, t + 11)) {
6067
6065
  // vertical-l(r)
6068
6066
  case 114:
6069
6067
  return M + e + re + D(e, /[svh]\w+-[tblr]{2}/, "tb") + e;
@@ -7147,7 +7145,7 @@ var zu = function(t) {
7147
7145
  marginTop: u.menuGutter
7148
7146
  });
7149
7147
  }, ku = /* @__PURE__ */ Ne(null), Mg = function(t) {
7150
- var n = t.children, r = t.minMenuHeight, i = t.maxMenuHeight, s = t.menuPlacement, o = t.menuPosition, u = t.menuShouldScrollIntoView, a = t.theme, l = Y(ku) || {}, c = l.setPortalPlacement, d = K(null), f = ie(i), h = Xe(f, 2), g = h[0], m = h[1], p = ie(null), b = Xe(p, 2), I = b[0], y = b[1], C = a.spacing.controlHeight;
7148
+ var n = t.children, r = t.minMenuHeight, i = t.maxMenuHeight, s = t.menuPlacement, o = t.menuPosition, u = t.menuShouldScrollIntoView, a = t.theme, l = Y(ku) || {}, c = l.setPortalPlacement, d = q(null), f = ee(i), h = Xe(f, 2), g = h[0], m = h[1], p = ee(null), b = Xe(p, 2), I = b[0], y = b[1], C = a.spacing.controlHeight;
7151
7149
  return Hi(function() {
7152
7150
  var v = d.current;
7153
7151
  if (v) {
@@ -7232,11 +7230,11 @@ var zu = function(t) {
7232
7230
  zIndex: 1
7233
7231
  };
7234
7232
  }, kg = function(t) {
7235
- var n = t.appendTo, r = t.children, i = t.controlElement, s = t.innerProps, o = t.menuPlacement, u = t.menuPosition, a = K(null), l = K(null), c = ie(zu(o)), d = Xe(c, 2), f = d[0], h = d[1], g = be(function() {
7233
+ var n = t.appendTo, r = t.children, i = t.controlElement, s = t.innerProps, o = t.menuPlacement, u = t.menuPosition, a = q(null), l = q(null), c = ee(zu(o)), d = Xe(c, 2), f = d[0], h = d[1], g = be(function() {
7236
7234
  return {
7237
7235
  setPortalPlacement: h
7238
7236
  };
7239
- }, []), m = ie(null), p = Xe(m, 2), b = p[0], I = p[1], y = q(function() {
7237
+ }, []), m = ee(null), p = Xe(m, 2), b = p[0], I = p[1], y = K(function() {
7240
7238
  if (i) {
7241
7239
  var A = xg(i), S = u === "fixed" ? 0 : window.pageYOffset, B = A[f] + S;
7242
7240
  (B !== (b == null ? void 0 : b.offset) || A.left !== (b == null ? void 0 : b.rect.left) || A.width !== (b == null ? void 0 : b.rect.width)) && I({
@@ -7248,7 +7246,7 @@ var zu = function(t) {
7248
7246
  Hi(function() {
7249
7247
  y();
7250
7248
  }, [y]);
7251
- var C = q(function() {
7249
+ var C = K(function() {
7252
7250
  typeof l.current == "function" && (l.current(), l.current = null), i && a.current && (l.current = mg(i, a.current, y, {
7253
7251
  elementResize: "ResizeObserver" in window
7254
7252
  }));
@@ -7256,7 +7254,7 @@ var zu = function(t) {
7256
7254
  Hi(function() {
7257
7255
  C();
7258
7256
  }, [C]);
7259
- var v = q(function(A) {
7257
+ var v = K(function(A) {
7260
7258
  a.current = A, C();
7261
7259
  }, [C]);
7262
7260
  if (!n && u !== "fixed" || !b) return null;
@@ -8226,26 +8224,26 @@ var s0 = function(t) {
8226
8224
  t.cancelable && t.preventDefault(), t.stopPropagation();
8227
8225
  };
8228
8226
  function o0(e) {
8229
- var t = e.isEnabled, n = e.onBottomArrive, r = e.onBottomLeave, i = e.onTopArrive, s = e.onTopLeave, o = K(!1), u = K(!1), a = K(0), l = K(null), c = q(function(p, b) {
8227
+ var t = e.isEnabled, n = e.onBottomArrive, r = e.onBottomLeave, i = e.onTopArrive, s = e.onTopLeave, o = q(!1), u = q(!1), a = q(0), l = q(null), c = K(function(p, b) {
8230
8228
  if (l.current !== null) {
8231
8229
  var I = l.current, y = I.scrollTop, C = I.scrollHeight, v = I.clientHeight, x = l.current, A = b > 0, S = C - v - y, B = !1;
8232
8230
  S > b && o.current && (r && r(p), o.current = !1), A && u.current && (s && s(p), u.current = !1), A && b > S ? (n && !o.current && n(p), x.scrollTop = C, B = !0, o.current = !0) : !A && -b > y && (i && !u.current && i(p), x.scrollTop = 0, B = !0, u.current = !0), B && s0(p);
8233
8231
  }
8234
- }, [n, r, i, s]), d = q(function(p) {
8232
+ }, [n, r, i, s]), d = K(function(p) {
8235
8233
  c(p, p.deltaY);
8236
- }, [c]), f = q(function(p) {
8234
+ }, [c]), f = K(function(p) {
8237
8235
  a.current = p.changedTouches[0].clientY;
8238
- }, []), h = q(function(p) {
8236
+ }, []), h = K(function(p) {
8239
8237
  var b = a.current - p.changedTouches[0].clientY;
8240
8238
  c(p, b);
8241
- }, [c]), g = q(function(p) {
8239
+ }, [c]), g = K(function(p) {
8242
8240
  if (p) {
8243
8241
  var b = Eg ? {
8244
8242
  passive: !1
8245
8243
  } : !1;
8246
8244
  p.addEventListener("wheel", d, b), p.addEventListener("touchstart", f, b), p.addEventListener("touchmove", h, b);
8247
8245
  }
8248
- }, [h, f, d]), m = q(function(p) {
8246
+ }, [h, f, d]), m = K(function(p) {
8249
8247
  p && (p.removeEventListener("wheel", d, !1), p.removeEventListener("touchstart", f, !1), p.removeEventListener("touchmove", h, !1));
8250
8248
  }, [h, f, d]);
8251
8249
  return Ae(function() {
@@ -8284,7 +8282,7 @@ var Do = !!(typeof window < "u" && window.document && window.document.createElem
8284
8282
  passive: !1
8285
8283
  };
8286
8284
  function a0(e) {
8287
- var t = e.isEnabled, n = e.accountForScrollbars, r = n === void 0 ? !0 : n, i = K({}), s = K(null), o = q(function(a) {
8285
+ var t = e.isEnabled, n = e.accountForScrollbars, r = n === void 0 ? !0 : n, i = q({}), s = q(null), o = K(function(a) {
8288
8286
  if (Do) {
8289
8287
  var l = document.body, c = l && l.style;
8290
8288
  if (r && wo.forEach(function(g) {
@@ -8299,7 +8297,7 @@ function a0(e) {
8299
8297
  }
8300
8298
  l && Mo() && (l.addEventListener("touchmove", Go, ut), a && (a.addEventListener("touchstart", Fo, ut), a.addEventListener("touchmove", Bo, ut))), Vt += 1;
8301
8299
  }
8302
- }, [r]), u = q(function(a) {
8300
+ }, [r]), u = K(function(a) {
8303
8301
  if (Do) {
8304
8302
  var l = document.body, c = l && l.style;
8305
8303
  Vt = Math.max(Vt - 1, 0), r && Vt < 1 && wo.forEach(function(d) {
@@ -9598,7 +9596,7 @@ const Qt = (e) => {
9598
9596
  }, ll = Ln((e, t) => {
9599
9597
  const { controlType: n, focus: r, focusElement: i, sx: s, placeholder: o = "", isSearchable: u = !0, isClearable: a = !0, ...l } = e;
9600
9598
  let c = /* @__PURE__ */ E(In, {});
9601
- const d = K(null);
9599
+ const d = q(null);
9602
9600
  switch (Ae(() => {
9603
9601
  d.current && d.current.focus();
9604
9602
  }, [r]), Ae(() => {