@acrool/react-picker 0.0.3-alpha.3 → 0.0.3

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.
@@ -1,5 +1,5 @@
1
1
  import * as Dn from "react";
2
- import Mn, { createContext as Vt, useContext as U, useLayoutEffect as ta, useEffect as ut, useRef as nt, useInsertionEffect as Zs, useCallback as mt, useMemo as Et, forwardRef as Ee, Fragment as Js, createElement as ea, useId as kn, Component as na, Children as ia, isValidElement as sa, useState as Nt } from "react";
2
+ import Mn, { createContext as Vt, useContext as U, useLayoutEffect as ta, useEffect as ut, useRef as nt, useInsertionEffect as Zs, useCallback as mt, useMemo as Et, forwardRef as Ee, Fragment as Js, createElement as ea, useId as kn, Component as na, Children as ia, isValidElement as sa, useState as Jt } from "react";
3
3
  import ra from "react-dom";
4
4
  var Ot = /* @__PURE__ */ ((t) => (t.Escape = "Escape", t.Enter = "Enter", t.Tab = "Tab", t.ArrowUp = "ArrowUp", t.ArrowDown = "ArrowDown", t))(Ot || {});
5
5
  const ce = [
@@ -65,7 +65,7 @@ const wt = {
65
65
  isInputFocus: !1,
66
66
  onChange: () => wt.warning("No onChange method detected, did you embed your app with Acrool/PickerPortal?")
67
67
  }), ah = Ln.Consumer, lh = () => U(Ln);
68
- var pn = { exports: {} }, Yt = {};
68
+ var pn = { exports: {} }, Ht = {};
69
69
  /**
70
70
  * @license React
71
71
  * react-jsx-runtime.production.min.js
@@ -78,7 +78,7 @@ var pn = { exports: {} }, Yt = {};
78
78
  var Vi;
79
79
  function fa() {
80
80
  if (Vi)
81
- return Yt;
81
+ return Ht;
82
82
  Vi = 1;
83
83
  var t = Mn, e = Symbol.for("react.element"), n = Symbol.for("react.fragment"), i = Object.prototype.hasOwnProperty, s = t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, o = { key: !0, ref: !0, __self: !0, __source: !0 };
84
84
  function r(a, l, c) {
@@ -91,9 +91,9 @@ function fa() {
91
91
  f[u] === void 0 && (f[u] = l[u]);
92
92
  return { $$typeof: e, type: a, key: d, ref: p, props: f, _owner: s.current };
93
93
  }
94
- return Yt.Fragment = n, Yt.jsx = r, Yt.jsxs = r, Yt;
94
+ return Ht.Fragment = n, Ht.jsx = r, Ht.jsxs = r, Ht;
95
95
  }
96
- var Xt = {};
96
+ var Yt = {};
97
97
  /**
98
98
  * @license React
99
99
  * react-jsx-runtime.development.js
@@ -147,7 +147,7 @@ function ha() {
147
147
  var D = m.displayName || m.name || "";
148
148
  return D !== "" ? T + "(" + D + ")" : T;
149
149
  }
150
- function Gt(h) {
150
+ function Kt(h) {
151
151
  return h.displayName || "Context";
152
152
  }
153
153
  function Z(h) {
@@ -175,10 +175,10 @@ function ha() {
175
175
  switch (h.$$typeof) {
176
176
  case a:
177
177
  var m = h;
178
- return Gt(m) + ".Consumer";
178
+ return Kt(m) + ".Consumer";
179
179
  case r:
180
180
  var T = h;
181
- return Gt(T._context) + ".Provider";
181
+ return Kt(T._context) + ".Provider";
182
182
  case l:
183
183
  return dt(h, h.render, "ForwardRef");
184
184
  case f:
@@ -383,7 +383,7 @@ function ha() {
383
383
  }
384
384
  return "";
385
385
  }
386
- var zt = Object.prototype.hasOwnProperty, gi = {}, yi = x.ReactDebugCurrentFrame;
386
+ var Gt = Object.prototype.hasOwnProperty, gi = {}, yi = x.ReactDebugCurrentFrame;
387
387
  function Pe(h) {
388
388
  if (h) {
389
389
  var m = h._owner, T = ve(h.type, h._source, m ? m.type : null);
@@ -393,7 +393,7 @@ function ha() {
393
393
  }
394
394
  function ko(h, m, T, A, D) {
395
395
  {
396
- var k = Function.call.bind(zt);
396
+ var k = Function.call.bind(Gt);
397
397
  for (var V in h)
398
398
  if (k(h, V)) {
399
399
  var R = void 0;
@@ -434,7 +434,7 @@ function ha() {
434
434
  if (jo(h))
435
435
  return y("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", Oo(h)), vi(h);
436
436
  }
437
- var Ht = x.ReactCurrentOwner, Fo = {
437
+ var zt = x.ReactCurrentOwner, Fo = {
438
438
  key: !0,
439
439
  ref: !0,
440
440
  __self: !0,
@@ -442,7 +442,7 @@ function ha() {
442
442
  }, xi, Ti, Ye;
443
443
  Ye = {};
444
444
  function _o(h) {
445
- if (zt.call(h, "ref")) {
445
+ if (Gt.call(h, "ref")) {
446
446
  var m = Object.getOwnPropertyDescriptor(h, "ref").get;
447
447
  if (m && m.isReactWarning)
448
448
  return !1;
@@ -450,7 +450,7 @@ function ha() {
450
450
  return h.ref !== void 0;
451
451
  }
452
452
  function Bo(h) {
453
- if (zt.call(h, "key")) {
453
+ if (Gt.call(h, "key")) {
454
454
  var m = Object.getOwnPropertyDescriptor(h, "key").get;
455
455
  if (m && m.isReactWarning)
456
456
  return !1;
@@ -458,9 +458,9 @@ function ha() {
458
458
  return h.key !== void 0;
459
459
  }
460
460
  function Io(h, m) {
461
- if (typeof h.ref == "string" && Ht.current && m && Ht.current.stateNode !== m) {
462
- var T = Z(Ht.current.type);
463
- Ye[T] || (y('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref', Z(Ht.current.type), h.ref), Ye[T] = !0);
461
+ if (typeof h.ref == "string" && zt.current && m && zt.current.stateNode !== m) {
462
+ var T = Z(zt.current.type);
463
+ Ye[T] || (y('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref', Z(zt.current.type), h.ref), Ye[T] = !0);
464
464
  }
465
465
  }
466
466
  function No(h, m) {
@@ -519,7 +519,7 @@ function ha() {
519
519
  var k, V = {}, R = null, z = null;
520
520
  T !== void 0 && (Pi(T), R = "" + T), Bo(m) && (Pi(m.key), R = "" + m.key), _o(m) && (z = m.ref, Io(m, D));
521
521
  for (k in m)
522
- zt.call(m, k) && !Fo.hasOwnProperty(k) && (V[k] = m[k]);
522
+ Gt.call(m, k) && !Fo.hasOwnProperty(k) && (V[k] = m[k]);
523
523
  if (h && h.defaultProps) {
524
524
  var _ = h.defaultProps;
525
525
  for (k in _)
@@ -529,7 +529,7 @@ function ha() {
529
529
  var I = typeof h == "function" ? h.displayName || h.name || "Unknown" : h;
530
530
  R && No(V, I), z && Uo(V, I);
531
531
  }
532
- return Wo(h, R, z, D, A, Ht.current, V);
532
+ return Wo(h, R, z, D, A, zt.current, V);
533
533
  }
534
534
  }
535
535
  var Xe = x.ReactCurrentOwner, bi = x.ReactDebugCurrentFrame;
@@ -678,7 +678,7 @@ Check the top-level render call using <` + T + ">.");
678
678
  else
679
679
  Ai(Q, h);
680
680
  }
681
- if (zt.call(m, "key")) {
681
+ if (Gt.call(m, "key")) {
682
682
  var Tt = Z(h), Y = Object.keys(m).filter(function(Qo) {
683
683
  return Qo !== "key";
684
684
  }), Je = Y.length > 0 ? "{key: someKey, " + Y.join(": ..., ") + ": ...}" : "{key: someKey}";
@@ -702,8 +702,8 @@ React keys must be passed directly to JSX without using spread:
702
702
  return Ei(h, m, T, !1);
703
703
  }
704
704
  var qo = Xo, Zo = Yo;
705
- Xt.Fragment = i, Xt.jsx = qo, Xt.jsxs = Zo;
706
- }()), Xt;
705
+ Yt.Fragment = i, Yt.jsx = qo, Yt.jsxs = Zo;
706
+ }()), Yt;
707
707
  }
708
708
  process.env.NODE_ENV === "production" ? pn.exports = fa() : pn.exports = ha();
709
709
  var O = pn.exports, da = Object.defineProperty, pa = (t, e, n) => e in t ? da(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n, mn = (t, e, n) => (pa(t, typeof e != "symbol" ? e + "" : e, n), n);
@@ -938,21 +938,21 @@ const Li = {
938
938
  pan: ["onPan", "onPanStart", "onPanSessionStart", "onPanEnd"],
939
939
  inView: ["whileInView", "onViewportEnter", "onViewportLeave"],
940
940
  layout: ["layout", "layoutId"]
941
- }, Ut = {};
941
+ }, Nt = {};
942
942
  for (const t in Li)
943
- Ut[t] = {
943
+ Nt[t] = {
944
944
  isEnabled: (e) => Li[t].some((n) => !!e[n])
945
945
  };
946
946
  function Ca(t) {
947
947
  for (const e in t)
948
- Ut[e] = {
949
- ...Ut[e],
948
+ Nt[e] = {
949
+ ...Nt[e],
950
950
  ...t[e]
951
951
  };
952
952
  }
953
953
  const In = Vt({}), Aa = Symbol.for("motionComponentSymbol"), W = (t) => t;
954
- let $t = W, ft = W;
955
- process.env.NODE_ENV !== "production" && ($t = (t, e) => {
954
+ let Wt = W, ft = W;
955
+ process.env.NODE_ENV !== "production" && (Wt = (t, e) => {
956
956
  !t && typeof console < "u" && console.warn(e);
957
957
  }, ft = (t, e) => {
958
958
  if (!t)
@@ -985,11 +985,11 @@ function Va(t, e) {
985
985
  const n = U(er).strict;
986
986
  if (process.env.NODE_ENV !== "production" && e && n) {
987
987
  const i = "You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.";
988
- t.ignoreStrict ? $t(!1, i) : ft(!1, i);
988
+ t.ignoreStrict ? Wt(!1, i) : ft(!1, i);
989
989
  }
990
990
  }
991
991
  function Da(t) {
992
- const { drag: e, layout: n } = Ut;
992
+ const { drag: e, layout: n } = Nt;
993
993
  if (!e && !n)
994
994
  return {};
995
995
  const i = { ...e, ...n };
@@ -1087,15 +1087,15 @@ const he = [
1087
1087
  function ar(t, { layout: e, layoutId: n }) {
1088
1088
  return Pt.has(t) || t.startsWith("origin") || (e || n !== void 0) && (!!Ve[t] || t === "opacity");
1089
1089
  }
1090
- const K = (t) => !!(t && t.getVelocity), lr = (t, e) => e && typeof t == "number" ? e.transform(t) : t, yt = (t, e, n) => n > e ? e : n < t ? t : n, Kt = {
1090
+ const K = (t) => !!(t && t.getVelocity), lr = (t, e) => e && typeof t == "number" ? e.transform(t) : t, yt = (t, e, n) => n > e ? e : n < t ? t : n, $t = {
1091
1091
  test: (t) => typeof t == "number",
1092
1092
  parse: parseFloat,
1093
1093
  transform: (t) => t
1094
1094
  }, Qt = {
1095
- ...Kt,
1095
+ ...$t,
1096
1096
  transform: (t) => yt(0, 1, t)
1097
1097
  }, Te = {
1098
- ...Kt,
1098
+ ...$t,
1099
1099
  default: 1
1100
1100
  }, te = (t) => Math.round(t * 1e5) / 1e5, Un = /-?(?:\d+(?:\.\d+)?|\.\d+)/gu, Oa = /(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu, ja = /^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu;
1101
1101
  function de(t) {
@@ -1113,7 +1113,7 @@ const pe = (t) => ({
1113
1113
  parse: (t) => st.parse(t) / 100,
1114
1114
  transform: (t) => st.transform(t * 100)
1115
1115
  }, ji = {
1116
- ...Kt,
1116
+ ...$t,
1117
1117
  transform: Math.round
1118
1118
  }, Wn = {
1119
1119
  // Border props
@@ -1883,7 +1883,7 @@ const jl = /* @__PURE__ */ new Set([
1883
1883
  "y",
1884
1884
  "translateX",
1885
1885
  "translateY"
1886
- ]), Wi = (t) => t === Kt || t === S, $i = (t, e) => parseFloat(t.split(", ")[e]), Ki = (t, e) => (n, { transform: i }) => {
1886
+ ]), Wi = (t) => t === $t || t === S, $i = (t, e) => parseFloat(t.split(", ")[e]), Ki = (t, e) => (n, { transform: i }) => {
1887
1887
  if (i === "none" || !i)
1888
1888
  return 0;
1889
1889
  const s = i.match(/^matrix3d\((.+)\)$/u);
@@ -1901,7 +1901,7 @@ function Bl(t) {
1901
1901
  i !== void 0 && (e.push([n, i.get()]), i.set(n.startsWith("scale") ? 1 : 0));
1902
1902
  }), e;
1903
1903
  }
1904
- const Wt = {
1904
+ const Ut = {
1905
1905
  // Dimensions
1906
1906
  width: ({ x: t }, { paddingLeft: e = "0", paddingRight: n = "0" }) => t.max - t.min - parseFloat(e) - parseFloat(n),
1907
1907
  height: ({ y: t }, { paddingTop: e = "0", paddingBottom: n = "0" }) => t.max - t.min - parseFloat(e) - parseFloat(n),
@@ -1913,12 +1913,12 @@ const Wt = {
1913
1913
  x: Ki(4, 13),
1914
1914
  y: Ki(5, 14)
1915
1915
  };
1916
- Wt.translateX = Wt.x;
1917
- Wt.translateY = Wt.y;
1916
+ Ut.translateX = Ut.x;
1917
+ Ut.translateY = Ut.y;
1918
1918
  const Dr = (t) => (e) => e.test(t), Il = {
1919
1919
  test: (t) => t === "auto",
1920
1920
  parse: (t) => t
1921
- }, Mr = [Kt, S, st, pt, Ba, _a, Il], Gi = (t) => Mr.find(Dr(t)), Rt = /* @__PURE__ */ new Set();
1921
+ }, Mr = [$t, S, st, pt, Ba, _a, Il], Gi = (t) => Mr.find(Dr(t)), Rt = /* @__PURE__ */ new Set();
1922
1922
  let vn = !1, Pn = !1;
1923
1923
  function kr() {
1924
1924
  if (Pn) {
@@ -1999,7 +1999,7 @@ const Qn = (t, e) => (n) => !!(de(n) && ja.test(n) && n.startsWith(t) || e && !F
1999
1999
  alpha: a !== void 0 ? parseFloat(a) : 1
2000
2000
  };
2001
2001
  }, Ul = (t) => yt(0, 255, t), nn = {
2002
- ...Kt,
2002
+ ...$t,
2003
2003
  transform: (t) => Math.round(Ul(t))
2004
2004
  }, At = {
2005
2005
  test: Qn("rgb", "red"),
@@ -2156,7 +2156,7 @@ class Nr extends Jn {
2156
2156
  const { element: e, unresolvedKeyframes: n, name: i } = this;
2157
2157
  if (!e.current)
2158
2158
  return;
2159
- i === "height" && (this.suspendedScrollY = window.pageYOffset), this.measuredOrigin = Wt[i](e.measureViewportBox(), window.getComputedStyle(e.current)), n[0] = this.measuredOrigin;
2159
+ i === "height" && (this.suspendedScrollY = window.pageYOffset), this.measuredOrigin = Ut[i](e.measureViewportBox(), window.getComputedStyle(e.current)), n[0] = this.measuredOrigin;
2160
2160
  const s = n[n.length - 1];
2161
2161
  s !== void 0 && e.getValue(i, s).jump(s, !1);
2162
2162
  }
@@ -2168,7 +2168,7 @@ class Nr extends Jn {
2168
2168
  const o = n.getValue(i);
2169
2169
  o && o.jump(this.measuredOrigin, !1);
2170
2170
  const r = s.length - 1, a = s[r];
2171
- s[r] = Wt[i](n.measureViewportBox(), window.getComputedStyle(n.current)), a !== null && this.finalKeyframe === void 0 && (this.finalKeyframe = a), !((e = this.removedTransforms) === null || e === void 0) && e.length && this.removedTransforms.forEach(([l, c]) => {
2171
+ s[r] = Ut[i](n.measureViewportBox(), window.getComputedStyle(n.current)), a !== null && this.finalKeyframe === void 0 && (this.finalKeyframe = a), !((e = this.removedTransforms) === null || e === void 0) && e.length && this.removedTransforms.forEach(([l, c]) => {
2172
2172
  n.getValue(l).set(c);
2173
2173
  }), this.resolveNoneKeyframes();
2174
2174
  }
@@ -2195,7 +2195,7 @@ function nc(t, e, n, i) {
2195
2195
  if (e === "display" || e === "visibility")
2196
2196
  return !0;
2197
2197
  const o = t[t.length - 1], r = Hi(s, e), a = Hi(o, e);
2198
- return $t(r === a, `You are trying to animate ${e} from "${s}" to "${o}". ${s} is not an animatable value - to enable this animation set ${s} to a value animatable to ${o} via the \`style\` property.`), !r || !a ? !1 : ec(t) || n === "spring" && i;
2198
+ return Wt(r === a, `You are trying to animate ${e} from "${s}" to "${o}". ${s} is not an animatable value - to enable this animation set ${s} to a value animatable to ${o} via the \`style\` property.`), !r || !a ? !1 : ec(t) || n === "spring" && i;
2199
2199
  }
2200
2200
  class Wr {
2201
2201
  constructor({ autoplay: e = !0, delay: n = 0, type: i = "keyframes", repeat: s = 0, repeatDelay: o = 0, repeatType: r = "loop", ...a }) {
@@ -2266,7 +2266,7 @@ function Kr(t, e, n) {
2266
2266
  const sn = 1e-3, sc = 0.01, Yi = 10, rc = 0.05, oc = 1;
2267
2267
  function ac({ duration: t = 800, bounce: e = 0.25, velocity: n = 0, mass: i = 1 }) {
2268
2268
  let s, o;
2269
- $t(t <= lt(Yi), "Spring duration must be 10 seconds or less");
2269
+ Wt(t <= lt(Yi), "Spring duration must be 10 seconds or less");
2270
2270
  let r = 1 - e;
2271
2271
  r = yt(rc, oc, r), t = yt(sc, Yi, ct(t)), r < 1 ? (s = (c) => {
2272
2272
  const u = c * r, f = u * t, d = u - n, p = bn(c, r), g = Math.exp(-f);
@@ -2466,7 +2466,7 @@ const on = (t, e, n) => {
2466
2466
  }, wc = [xn, At, Ft], Sc = (t) => wc.find((e) => e.test(t));
2467
2467
  function Qi(t) {
2468
2468
  const e = Sc(t);
2469
- if ($t(!!e, `'${t}' is not an animatable color. Use the equivalent color code instead.`), !e)
2469
+ if (Wt(!!e, `'${t}' is not an animatable color. Use the equivalent color code instead.`), !e)
2470
2470
  return !1;
2471
2471
  let n = e.parse(t);
2472
2472
  return e === Ft && (n = bc(n)), n;
@@ -2516,7 +2516,7 @@ function Ec(t, e) {
2516
2516
  }
2517
2517
  const Vc = (t, e) => {
2518
2518
  const n = vt.createTransformer(e), i = oe(t), s = oe(e);
2519
- return i.indexes.var.length === s.indexes.var.length && i.indexes.color.length === s.indexes.color.length && i.indexes.number.length >= s.indexes.number.length ? wn.has(t) && !s.values.length || wn.has(e) && !i.values.length ? Cc(t, e) : at(Jr(Ec(i, s), s.values), n) : ($t(!0, `Complex values '${t}' and '${e}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`), Me(t, e));
2519
+ return i.indexes.var.length === s.indexes.var.length && i.indexes.color.length === s.indexes.color.length && i.indexes.number.length >= s.indexes.number.length ? wn.has(t) && !s.values.length || wn.has(e) && !i.values.length ? Cc(t, e) : at(Jr(Ec(i, s), s.values), n) : (Wt(!0, `Complex values '${t}' and '${e}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`), Me(t, e));
2520
2520
  };
2521
2521
  function Qr(t, e, n) {
2522
2522
  return typeof t == "number" && typeof e == "number" && typeof n == "number" ? j(t, e, n) : ii(t)(t, e);
@@ -2735,23 +2735,23 @@ const to = (t) => Array.isArray(t) && typeof t[0] == "number";
2735
2735
  function eo(t) {
2736
2736
  return !!(!t || typeof t == "string" && t in ri || to(t) || Array.isArray(t) && t.every(eo));
2737
2737
  }
2738
- const Zt = ([t, e, n, i]) => `cubic-bezier(${t}, ${e}, ${n}, ${i})`, ri = {
2738
+ const qt = ([t, e, n, i]) => `cubic-bezier(${t}, ${e}, ${n}, ${i})`, ri = {
2739
2739
  linear: "linear",
2740
2740
  ease: "ease",
2741
2741
  easeIn: "ease-in",
2742
2742
  easeOut: "ease-out",
2743
2743
  easeInOut: "ease-in-out",
2744
- circIn: Zt([0, 0.65, 0.55, 1]),
2745
- circOut: Zt([0.55, 0, 1, 0.45]),
2746
- backIn: Zt([0.31, 0.01, 0.66, -0.59]),
2747
- backOut: Zt([0.33, 1.53, 0.69, 0.99])
2744
+ circIn: qt([0, 0.65, 0.55, 1]),
2745
+ circOut: qt([0.55, 0, 1, 0.45]),
2746
+ backIn: qt([0.31, 0.01, 0.66, -0.59]),
2747
+ backOut: qt([0.33, 1.53, 0.69, 0.99])
2748
2748
  };
2749
2749
  function Nc(t) {
2750
2750
  return no(t) || ri.easeOut;
2751
2751
  }
2752
2752
  function no(t) {
2753
2753
  if (t)
2754
- return to(t) ? Zt(t) : Array.isArray(t) ? t.map(Nc) : ri[t];
2754
+ return to(t) ? qt(t) : Array.isArray(t) ? t.map(Nc) : ri[t];
2755
2755
  }
2756
2756
  function Uc(t, e, n, { delay: i = 0, duration: s = 300, repeat: o = 0, repeatType: r = "loop", ease: a, times: l } = {}) {
2757
2757
  const c = { [e]: n };
@@ -3435,8 +3435,8 @@ function au(t) {
3435
3435
  const H = Array.isArray(v) ? v : [v];
3436
3436
  let dt = H.reduce(s(x), {});
3437
3437
  w === !1 && (dt = {});
3438
- const { prevResolvedValues: Gt = {} } = y, Z = {
3439
- ...Gt,
3438
+ const { prevResolvedValues: Kt = {} } = y, Z = {
3439
+ ...Kt,
3440
3440
  ...dt
3441
3441
  }, it = (F) => {
3442
3442
  E = !0, d.has(F) && (G = !0, d.delete(F)), y.needsAnimating[F] = !0;
@@ -3444,7 +3444,7 @@ function au(t) {
3444
3444
  J && (J.liveStyle = !1);
3445
3445
  };
3446
3446
  for (const F in Z) {
3447
- const J = dt[F], Dt = Gt[F];
3447
+ const J = dt[F], Dt = Kt[F];
3448
3448
  if (p.hasOwnProperty(F))
3449
3449
  continue;
3450
3450
  let Mt = !1;
@@ -4123,7 +4123,7 @@ const Ae = {
4123
4123
  function ws(t, e) {
4124
4124
  return e.max === e.min ? 0 : t / (e.max - e.min) * 100;
4125
4125
  }
4126
- const qt = {
4126
+ const Xt = {
4127
4127
  correct: (t, e) => {
4128
4128
  if (!e.target)
4129
4129
  return t;
@@ -4192,7 +4192,7 @@ function go(t) {
4192
4192
  }
4193
4193
  const Nu = {
4194
4194
  borderRadius: {
4195
- ...qt,
4195
+ ...Xt,
4196
4196
  applyTo: [
4197
4197
  "borderTopLeftRadius",
4198
4198
  "borderTopRightRadius",
@@ -4200,10 +4200,10 @@ const Nu = {
4200
4200
  "borderBottomRightRadius"
4201
4201
  ]
4202
4202
  },
4203
- borderTopLeftRadius: qt,
4204
- borderTopRightRadius: qt,
4205
- borderBottomLeftRadius: qt,
4206
- borderBottomRightRadius: qt,
4203
+ borderTopLeftRadius: Xt,
4204
+ borderTopRightRadius: Xt,
4205
+ borderBottomLeftRadius: Xt,
4206
+ borderBottomRightRadius: Xt,
4207
4207
  boxShadow: Bu
4208
4208
  }, yo = ["TopLeft", "TopRight", "BottomLeft", "BottomRight"], Uu = yo.length, Ss = (t) => typeof t == "string" ? parseFloat(t) : t, Cs = (t) => typeof t == "number" || S.test(t);
4209
4209
  function Wu(t, e, n, i, s, o) {
@@ -4376,7 +4376,7 @@ const Ct = {
4376
4376
  totalNodes: 0,
4377
4377
  resolvedTargetDeltas: 0,
4378
4378
  recalculatedProjection: 0
4379
- }, Jt = typeof window < "u" && window.MotionDebug !== void 0, un = ["", "X", "Y", "Z"], nf = { visibility: "hidden" }, _s = 1e3;
4379
+ }, Zt = typeof window < "u" && window.MotionDebug !== void 0, un = ["", "X", "Y", "Z"], nf = { visibility: "hidden" }, _s = 1e3;
4380
4380
  let sf = 0;
4381
4381
  function fn(t, e, n, i) {
4382
4382
  const { latestValues: s } = e;
@@ -4394,7 +4394,7 @@ function bo({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
4394
4394
  this.id = sf++, this.animationId = 0, this.children = /* @__PURE__ */ new Set(), this.options = {}, this.isTreeAnimating = !1, this.isAnimationBlocked = !1, this.isLayoutDirty = !1, this.isProjectionDirty = !1, this.isSharedProjectionDirty = !1, this.isTransformDirty = !1, this.updateManuallyBlocked = !1, this.updateBlockedByResize = !1, this.isUpdating = !1, this.isSVG = !1, this.needsReset = !1, this.shouldResetTransform = !1, this.hasCheckedOptimisedAppear = !1, this.treeScale = { x: 1, y: 1 }, this.eventHandlers = /* @__PURE__ */ new Map(), this.hasTreeAnimated = !1, this.updateScheduled = !1, this.scheduleUpdate = () => this.update(), this.projectionUpdateScheduled = !1, this.checkUpdateFailed = () => {
4395
4395
  this.isUpdating && (this.isUpdating = !1, this.clearAllSnapshots());
4396
4396
  }, this.updateProjection = () => {
4397
- this.projectionUpdateScheduled = !1, Jt && (Ct.totalNodes = Ct.resolvedTargetDeltas = Ct.recalculatedProjection = 0), this.nodes.forEach(af), this.nodes.forEach(hf), this.nodes.forEach(df), this.nodes.forEach(lf), Jt && window.MotionDebug.record(Ct);
4397
+ this.projectionUpdateScheduled = !1, Zt && (Ct.totalNodes = Ct.resolvedTargetDeltas = Ct.recalculatedProjection = 0), this.nodes.forEach(af), this.nodes.forEach(hf), this.nodes.forEach(df), this.nodes.forEach(lf), Zt && window.MotionDebug.record(Ct);
4398
4398
  }, this.resolvedRelativeTargetAt = 0, this.hasProjected = !1, this.isVisible = !0, this.animationProgress = 0, this.sharedNodes = /* @__PURE__ */ new Map(), this.latestValues = r, this.root = a ? a.root || a : this, this.path = a ? [...a.path, a] : [], this.parent = a, this.depth = a ? a.depth + 1 : 0;
4399
4399
  for (let l = 0; l < this.path.length; l++)
4400
4400
  this.path[l].shouldResetTransform = !0;
@@ -4641,7 +4641,7 @@ function bo({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
4641
4641
  const p = this.getClosestProjectingParent();
4642
4642
  p && !!p.resumingFrom == !!this.resumingFrom && !p.options.layoutScroll && p.target && this.animationProgress !== 1 ? (this.relativeParent = p, this.forceRelativeParentToResolveTarget(), this.relativeTarget = B(), this.relativeTargetOrigin = B(), ne(this.relativeTargetOrigin, this.target, p.target), tt(this.relativeTarget, this.relativeTargetOrigin)) : this.relativeParent = this.relativeTarget = void 0;
4643
4643
  }
4644
- Jt && Ct.resolvedTargetDeltas++;
4644
+ Zt && Ct.resolvedTargetDeltas++;
4645
4645
  }
4646
4646
  }
4647
4647
  }
@@ -4669,7 +4669,7 @@ function bo({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
4669
4669
  this.prevProjectionDelta && (this.createProjectionDeltas(), this.scheduleRender());
4670
4670
  return;
4671
4671
  }
4672
- !this.projectionDelta || !this.prevProjectionDelta ? this.createProjectionDeltas() : (Es(this.prevProjectionDelta.x, this.projectionDelta.x), Es(this.prevProjectionDelta.y, this.projectionDelta.y)), ee(this.projectionDelta, this.layoutCorrected, g, this.latestValues), (this.treeScale.x !== d || this.treeScale.y !== p || !Fs(this.projectionDelta.x, this.prevProjectionDelta.x) || !Fs(this.projectionDelta.y, this.prevProjectionDelta.y)) && (this.hasProjected = !0, this.scheduleRender(), this.notifyListeners("projectionUpdate", g)), Jt && Ct.recalculatedProjection++;
4672
+ !this.projectionDelta || !this.prevProjectionDelta ? this.createProjectionDeltas() : (Es(this.prevProjectionDelta.x, this.projectionDelta.x), Es(this.prevProjectionDelta.y, this.projectionDelta.y)), ee(this.projectionDelta, this.layoutCorrected, g, this.latestValues), (this.treeScale.x !== d || this.treeScale.y !== p || !Fs(this.projectionDelta.x, this.prevProjectionDelta.x) || !Fs(this.projectionDelta.y, this.prevProjectionDelta.y)) && (this.hasProjected = !0, this.scheduleRender(), this.notifyListeners("projectionUpdate", g)), Zt && Ct.recalculatedProjection++;
4673
4673
  }
4674
4674
  hide() {
4675
4675
  this.isVisible = !1;
@@ -4879,7 +4879,7 @@ function of(t) {
4879
4879
  t.options.transition = void 0;
4880
4880
  }
4881
4881
  function af(t) {
4882
- Jt && Ct.totalNodes++, t.parent && (t.isProjecting() || (t.isProjectionDirty = t.parent.isProjectionDirty), t.isSharedProjectionDirty || (t.isSharedProjectionDirty = !!(t.isProjectionDirty || t.parent.isProjectionDirty || t.parent.isSharedProjectionDirty)), t.isTransformDirty || (t.isTransformDirty = t.parent.isTransformDirty));
4882
+ Zt && Ct.totalNodes++, t.parent && (t.isProjecting() || (t.isProjectionDirty = t.parent.isProjectionDirty), t.isSharedProjectionDirty || (t.isSharedProjectionDirty = !!(t.isProjectionDirty || t.parent.isProjectionDirty || t.parent.isSharedProjectionDirty)), t.isTransformDirty || (t.isTransformDirty = t.parent.isTransformDirty));
4883
4883
  }
4884
4884
  function lf(t) {
4885
4885
  t.isProjectionDirty = t.isSharedProjectionDirty = t.isTransformDirty = !1;
@@ -5064,8 +5064,8 @@ class Ef {
5064
5064
  }
5065
5065
  updateFeatures() {
5066
5066
  let e = "animation";
5067
- for (e in Ut) {
5068
- const n = Ut[e];
5067
+ for (e in Nt) {
5068
+ const n = Nt[e];
5069
5069
  if (!n)
5070
5070
  continue;
5071
5071
  const { isEnabled: i, Feature: s } = n;
@@ -5389,7 +5389,7 @@ function Hs(t) {
5389
5389
  }
5390
5390
  const Nf = ({ children: t, exitBeforeEnter: e, custom: n, initial: i = !0, onExitComplete: s, presenceAffectsLayout: o = !0, mode: r = "sync" }) => {
5391
5391
  ft(!e, "Replace exitBeforeEnter with mode='wait'");
5392
- const a = Et(() => Hs(t), [t]), l = a.map(we), c = nt(!0), u = nt(a), f = qn(() => /* @__PURE__ */ new Map()), [d, p] = Nt(a), [g, P] = Nt(a);
5392
+ const a = Et(() => Hs(t), [t]), l = a.map(we), c = nt(!0), u = nt(a), f = qn(() => /* @__PURE__ */ new Map()), [d, p] = Jt(a), [g, P] = Jt(a);
5393
5393
  tr(() => {
5394
5394
  c.current = !1, u.current = a;
5395
5395
  for (let y = 0; y < g.length; y++) {
@@ -5525,23 +5525,19 @@ const Xs = ({
5525
5525
  children: t,
5526
5526
  anchorRef: e
5527
5527
  }, n) => {
5528
- const i = nt(null), [s, o] = Nt({ display: "none" });
5528
+ const i = nt(null);
5529
5529
  return ut(() => {
5530
- const r = (a) => {
5531
- var l;
5530
+ const s = (o) => {
5531
+ var r;
5532
5532
  if (e.current && i.current) {
5533
- const u = (((l = a == null ? void 0 : a[0]) == null ? void 0 : l.contentRect) ?? i.current.getBoundingClientRect()).height, f = e.current.getBoundingClientRect(), d = f.height, p = f.bottom, g = f.left, P = window.pageYOffset || document.documentElement.scrollTop, b = window.pageXOffset || document.documentElement.scrollLeft, x = window.innerHeight || document.documentElement.clientHeight, y = 15, v = p + u + y >= x ? "top" : "bottom";
5534
- o({
5535
- top: v === "bottom" ? `${p + P}px` : `${p + P - (u + d)}px`,
5536
- left: `${g + b}px`,
5537
- transformOrigin: v === "bottom" ? "top" : "bottom"
5538
- });
5533
+ const l = (((r = o == null ? void 0 : o[0]) == null ? void 0 : r.contentRect) ?? i.current.getBoundingClientRect()).height, c = e.current.getBoundingClientRect(), u = c.height, f = c.bottom, d = c.left, p = window.pageYOffset || document.documentElement.scrollTop, g = window.pageXOffset || document.documentElement.scrollLeft, P = window.innerHeight || document.documentElement.clientHeight, b = 15, x = f + l + b >= P ? "top" : "bottom";
5534
+ i.current.style.display = "block", i.current.style.top = x === "bottom" ? `${f + p}px` : `${f + p - (l + u)}px`, i.current.style.left = `${d + g}px`, i.current.style.transformOrigin = x === "bottom" ? "top" : "bottom";
5539
5535
  }
5540
5536
  };
5541
5537
  if (e.current && i.current) {
5542
- const a = new ResizeObserver(r);
5543
- return a.observe(i.current), window.addEventListener("scroll", r), window.addEventListener("resize", r), () => {
5544
- a.disconnect(), window.removeEventListener("scroll", r), window.removeEventListener("resize", r);
5538
+ const o = new ResizeObserver(s);
5539
+ return o.observe(i.current), window.addEventListener("scroll", s), window.addEventListener("resize", s), () => {
5540
+ o.disconnect(), window.removeEventListener("scroll", s), window.removeEventListener("resize", s);
5545
5541
  };
5546
5542
  }
5547
5543
  }, [e, i]), /* @__PURE__ */ O.jsx(
@@ -5549,7 +5545,7 @@ const Xs = ({
5549
5545
  {
5550
5546
  ref: Qf(n, i),
5551
5547
  transition: { type: "spring", duration: 0.2 },
5552
- style: s,
5548
+ style: { display: "none" },
5553
5549
  className: eh.motionAnimationWrapper,
5554
5550
  variants: nh.variants,
5555
5551
  initial: "initial",
@@ -5562,7 +5558,7 @@ const Xs = ({
5562
5558
  function fh(t, e) {
5563
5559
  const n = Ee(t);
5564
5560
  return Ee((s, o) => {
5565
- const [r, a] = Nt(!1), [l, c] = Nt(!1), [u, f] = Nt(), d = nt(null), p = nt(null), g = nt(u);
5561
+ const [r, a] = Jt(!1), [l, c] = Jt(!1), [u, f] = Jt(), d = nt(null), p = nt(null), g = nt(u);
5566
5562
  ut(() => {
5567
5563
  f(s.value);
5568
5564
  }, [JSON.stringify(s.value)]), ut(() => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@acrool/react-picker",
3
- "version": "0.0.3-alpha.3",
3
+ "version": "0.0.3",
4
4
  "description": "This is a react method to quickly combine buttons with Picker",
5
5
  "keywords": [
6
6
  "acrool",