@photoroom/ui 0.1.524 → 0.1.526

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 +1 @@
1
- {"version":3,"file":"NumberSelectField.d.ts","sourceRoot":"","sources":["../../../../src/components/unsorted/NumberSelectField/NumberSelectField.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,EAAqD,MAAM,OAAO,CAAC;AAS1F,yFAAyF;AACzF,MAAM,MAAM,qBAAqB,GAAG,SAAS,GAAG,SAAS,CAAC;AAE1D,KAAK,sBAAsB,GAAG,IAAI,CAAC,cAAc,CAAC,OAAO,CAAC,EAAE,UAAU,GAAG,KAAK,GAAG,KAAK,GAAG,MAAM,CAAC,GAAG;IACjG,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC,IAAI,CAAC,EAAE,qBAAqB,CAAC;CAC9B,CAAC;AAKF,eAAO,MAAM,iBAAiB,GAAI,kFAW/B,sBAAsB,gCAwXxB,CAAC"}
1
+ {"version":3,"file":"NumberSelectField.d.ts","sourceRoot":"","sources":["../../../../src/components/unsorted/NumberSelectField/NumberSelectField.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,EAAqD,MAAM,OAAO,CAAC;AAS1F,yFAAyF;AACzF,MAAM,MAAM,qBAAqB,GAAG,SAAS,GAAG,SAAS,CAAC;AAE1D,KAAK,sBAAsB,GAAG,IAAI,CAAC,cAAc,CAAC,OAAO,CAAC,EAAE,UAAU,GAAG,KAAK,GAAG,KAAK,GAAG,MAAM,CAAC,GAAG;IACjG,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC,IAAI,CAAC,EAAE,qBAAqB,CAAC;CAC9B,CAAC;AAKF,eAAO,MAAM,iBAAiB,GAAI,kFAW/B,sBAAsB,gCA0ZxB,CAAC"}
package/index.mjs CHANGED
@@ -2910,7 +2910,7 @@ var fee = 50, pee = async (e, t, n) => {
2910
2910
  overflows: w
2911
2911
  }], !w.every((e) => e <= 0)) {
2912
2912
  let e = (i.flip?.index || 0) + 1, t = S[e];
2913
- if (t && (!(u === "alignment" && _ !== Da(t)) || T.every((e) => Da(e.placement) !== _ || e.overflows[0] > 0))) return {
2913
+ if (t && (u !== "alignment" || _ === Da(t) || T.every((e) => Da(e.placement) !== _ || e.overflows[0] > 0))) return {
2914
2914
  data: {
2915
2915
  index: e,
2916
2916
  overflows: T
@@ -7338,7 +7338,6 @@ function rd(e) {
7338
7338
  let t = e();
7339
7339
  return Object.defineProperty(this, "value", { value: t }), t;
7340
7340
  }
7341
- throw Error("cached value already set");
7342
7341
  } };
7343
7342
  }
7344
7343
  function id(e) {
@@ -7400,7 +7399,7 @@ function hd(e) {
7400
7399
  let t = e.constructor;
7401
7400
  if (t === void 0 || typeof t != "function") return !0;
7402
7401
  let n = t.prototype;
7403
- return !(pd(n) === !1 || Object.prototype.hasOwnProperty.call(n, "isPrototypeOf") === !1);
7402
+ return pd(n) !== !1 && Object.prototype.hasOwnProperty.call(n, "isPrototypeOf") !== !1;
7404
7403
  }
7405
7404
  function gd(e) {
7406
7405
  return hd(e) ? { ...e } : Array.isArray(e) ? [...e] : e instanceof Map ? new Map(e) : e instanceof Set ? new Set(e) : e;
@@ -9235,14 +9234,14 @@ function Bp(e, t) {
9235
9234
  if (n.ref = null, o) {
9236
9235
  r(o);
9237
9236
  let n = e.seen.get(o), s = n.schema;
9238
- if (s.$ref && (e.target === "draft-07" || e.target === "draft-04" || e.target === "openapi-3.0") ? (i.allOf = i.allOf ?? [], i.allOf.push(s)) : Object.assign(i, s), Object.assign(i, a), t._zod.parent === o) for (let e in i) e === "$ref" || e === "allOf" || e in a || delete i[e];
9239
- if (s.$ref && n.def) for (let e in i) e === "$ref" || e === "allOf" || e in n.def && JSON.stringify(i[e]) === JSON.stringify(n.def[e]) && delete i[e];
9237
+ if (s.$ref && (e.target === "draft-07" || e.target === "draft-04" || e.target === "openapi-3.0") ? (i.allOf = i.allOf ?? [], i.allOf.push(s)) : Object.assign(i, s), Object.assign(i, a), t._zod.parent === o) for (let e in i) e !== "$ref" && e !== "allOf" && (e in a || delete i[e]);
9238
+ if (s.$ref && n.def) for (let e in i) e !== "$ref" && e !== "allOf" && e in n.def && JSON.stringify(i[e]) === JSON.stringify(n.def[e]) && delete i[e];
9240
9239
  }
9241
9240
  let s = t._zod.parent;
9242
9241
  if (s && s !== o) {
9243
9242
  r(s);
9244
9243
  let t = e.seen.get(s);
9245
- if (t?.schema.$ref && (i.$ref = t.schema.$ref, t.def)) for (let e in i) e === "$ref" || e === "allOf" || e in t.def && JSON.stringify(i[e]) === JSON.stringify(t.def[e]) && delete i[e];
9244
+ if (t?.schema.$ref && (i.$ref = t.schema.$ref, t.def)) for (let e in i) e !== "$ref" && e !== "allOf" && e in t.def && JSON.stringify(i[e]) === JSON.stringify(t.def[e]) && delete i[e];
9246
9245
  }
9247
9246
  e.override({
9248
9247
  zodSchema: t,
@@ -10078,7 +10077,7 @@ function J(e, t) {
10078
10077
  s = n.ops.pop(), n.trys.pop();
10079
10078
  continue;
10080
10079
  default:
10081
- if ((a = n.trys, !(a = a.length > 0 && a[a.length - 1])) && (s[0] === 6 || s[0] === 2)) {
10080
+ if (a = n.trys, !(a = a.length > 0 && a[a.length - 1]) && (s[0] === 6 || s[0] === 2)) {
10082
10081
  n = 0;
10083
10082
  continue;
10084
10083
  }
@@ -13245,7 +13244,7 @@ var ay = new (function() {
13245
13244
  }
13246
13245
  });
13247
13246
  }, e.prototype.handleNetworkRequestEvent = function(e, t, n, r, i, a, o) {
13248
- if (!(a === void 0 || o === void 0)) {
13247
+ if (a !== void 0 && o !== void 0) {
13249
13248
  var s, c = "GET";
13250
13249
  if (ny(t) ? (s = t.url, c = t.method) : s = (t?.toString)?.call(t), s) try {
13251
13250
  var l = new URL(s);
@@ -14279,15 +14278,15 @@ var Hy = function(e, t) {
14279
14278
  }, Jy = function(e) {
14280
14279
  return Hy(e, "pageUrlEnrichment");
14281
14280
  }, Yy = function(e) {
14282
- return typeof e == "boolean" ? e : typeof e == "object" && (e.networkTracking === !0 || typeof e.networkTracking == "object");
14281
+ return typeof e == "boolean" ? e : !(typeof e != "object" || e.networkTracking !== !0 && typeof e.networkTracking != "object");
14283
14282
  }, Xy = function(e) {
14284
- return typeof e == "boolean" ? e : typeof e == "object" && (e.elementInteractions === !0 || typeof e.elementInteractions == "object");
14283
+ return typeof e == "boolean" ? e : !(typeof e != "object" || e.elementInteractions !== !0 && typeof e.elementInteractions != "object");
14285
14284
  }, Zy = function(e) {
14286
14285
  return typeof e == "boolean" ? e : typeof e == "object" && e.webVitals === !0;
14287
14286
  }, Qy = function(e) {
14288
- return typeof e == "boolean" ? e : typeof e == "object" && (e.frustrationInteractions === !0 || typeof e.frustrationInteractions == "object");
14287
+ return typeof e == "boolean" ? e : !(typeof e != "object" || e.frustrationInteractions !== !0 && typeof e.frustrationInteractions != "object");
14289
14288
  }, $y = function(e) {
14290
- return typeof e == "object" && (e.performanceTracking === !0 || typeof e.performanceTracking == "object");
14289
+ return !(typeof e != "object" || e.performanceTracking !== !0 && typeof e.performanceTracking != "object");
14291
14290
  }, eb = function(e) {
14292
14291
  if (typeof e.autocapture == "object") {
14293
14292
  var t = e.autocapture.performanceTracking;
@@ -14512,7 +14511,6 @@ var yb = function(e) {
14512
14511
  } catch {
14513
14512
  return [2, this.buildResponse({ code: u.status })];
14514
14513
  }
14515
- return [2];
14516
14514
  }
14517
14515
  });
14518
14516
  });
@@ -14822,7 +14820,7 @@ var Qb = function(e) {
14822
14820
  default: return new U_(Y(Y({}, t), { expirationDays: t.expiration }), n);
14823
14821
  }
14824
14822
  }, tx = function(e) {
14825
- return e === void 0 && (e = {}), e.remoteConfig?.fetchRemoteConfig === !0 || !(e.remoteConfig?.fetchRemoteConfig === !1 || e.fetchRemoteConfig === !1);
14823
+ return e === void 0 && (e = {}), e.remoteConfig?.fetchRemoteConfig === !0 || e.remoteConfig?.fetchRemoteConfig !== !1 && e.fetchRemoteConfig !== !1;
14826
14824
  }, nx = function(e) {
14827
14825
  var t = typeof e == "object" ? e.type : e, n = typeof e == "object" ? e.headers : void 0, r = typeof e == "object" ? e.enableKeepalive : void 0, i = typeof e == "object" ? e.referrerPolicy : void 0;
14828
14826
  return t === "xhr" ? new vb(n) : t === "beacon" ? new bb() : new yb(n, r, i);
@@ -18183,10 +18181,10 @@ UT();
18183
18181
  //#region ../shared/lib/ampli/index.ts
18184
18182
  var WT = { production: "0cc38251f8841c0d84d11fd20b400b07" }, GT = {
18185
18183
  plan: {
18186
- version: "443",
18184
+ version: "448",
18187
18185
  branch: "main",
18188
18186
  source: "web",
18189
- versionId: "e0399898-ac2c-483d-b20b-0337dc96f201"
18187
+ versionId: "d026ba2e-093b-438e-b5ab-06abcdc9c575"
18190
18188
  },
18191
18189
  ingestionMetadata: {
18192
18190
  sourceName: "browser-typescript-ampli",
@@ -23128,7 +23126,7 @@ var oO = Object.defineProperty, sO = (e, t) => oO(e, "name", {
23128
23126
  u.current || e.currentTarget?.click();
23129
23127
  }),
23130
23128
  onKeyDown: G(e.onKeyDown, (e) => {
23131
- r || e.target !== e.currentTarget || c.searchRef.current !== "" && e.key === " " || cO.includes(e.key) && (e.currentTarget.click(), e.preventDefault());
23129
+ r || e.target !== e.currentTarget || (c.searchRef.current === "" || e.key !== " ") && cO.includes(e.key) && (e.currentTarget.click(), e.preventDefault());
23132
23130
  })
23133
23131
  });
23134
23132
  }, "MenuItem")), WO = /* @__PURE__ */ R.forwardRef(/* @__PURE__ */ sO(function(e, n) {
@@ -23306,7 +23304,7 @@ var oO = Object.defineProperty, sO = (e, t) => oO(e, "name", {
23306
23304
  }
23307
23305
  })),
23308
23306
  onKeyDown: G(e.onKeyDown, (t) => {
23309
- e.disabled || t.target !== t.currentTarget || o.searchRef.current !== "" && t.key === " " || fO[i.dir].includes(t.key) && (r.onOpenChange(!0), r.content?.focus(), t.preventDefault());
23307
+ e.disabled || t.target !== t.currentTarget || (o.searchRef.current === "" || t.key !== " ") && fO[i.dir].includes(t.key) && (r.onOpenChange(!0), r.content?.focus(), t.preventDefault());
23310
23308
  })
23311
23309
  })
23312
23310
  });
@@ -24681,7 +24679,7 @@ var RN = class extends YM {
24681
24679
  if (this.isStopped) return;
24682
24680
  this.isStopped = !0;
24683
24681
  let { state: e } = this;
24684
- e === "idle" || e === "finished" || (this.updateMotionValue ? this.updateMotionValue() : this.commitStyles(), this.isPseudoElement || this.cancel());
24682
+ e !== "idle" && e !== "finished" && (this.updateMotionValue ? this.updateMotionValue() : this.commitStyles(), this.isPseudoElement || this.cancel());
24685
24683
  }
24686
24684
  commitStyles() {
24687
24685
  let e = this.options?.element;
@@ -26611,7 +26609,7 @@ function QL(e, t, n, r, i, a) {
26611
26609
  i ? (e.opacity = iM(0, n.opacity ?? 1, eR(r)), e.opacityExit = iM(t.opacity ?? 1, 0, tR(r))) : a && (e.opacity = iM(t.opacity ?? 1, n.opacity ?? 1, r));
26612
26610
  for (let i = 0; i < YL; i++) {
26613
26611
  let a = oF[i], o = $L(t, a), s = $L(n, a);
26614
- o === void 0 && s === void 0 || (o ||= 0, s ||= 0, o === 0 || s === 0 || ZL(o) === ZL(s) ? (e[a] = Math.max(iM(XL(o), XL(s), r), 0), (Mj.test(s) || Mj.test(o)) && (e[a] += "%")) : e[a] = s);
26612
+ (o !== void 0 || s !== void 0) && (o ||= 0, s ||= 0, o === 0 || s === 0 || ZL(o) === ZL(s) ? (e[a] = Math.max(iM(XL(o), XL(s), r), 0), (Mj.test(s) || Mj.test(o)) && (e[a] += "%")) : e[a] = s);
26615
26613
  }
26616
26614
  (t.rotate || n.rotate) && (e.rotate = iM(t.rotate || 0, n.rotate || 0, r));
26617
26615
  }
@@ -27565,7 +27563,7 @@ try {
27565
27563
  } catch {}
27566
27564
  function vz(e, t, n) {
27567
27565
  let r = {};
27568
- for (let i in e) i === "values" && typeof e.values == "object" || AP(e[i]) || (gz(i) || n === !0 && fz(i) || !t && !fz(i) || e.draggable && i.startsWith("onDrag")) && (r[i] = e[i]);
27566
+ for (let i in e) (i !== "values" || typeof e.values != "object") && (AP(e[i]) || (gz(i) || n === !0 && fz(i) || !t && !fz(i) || e.draggable && i.startsWith("onDrag")) && (r[i] = e[i]));
27569
27567
  return r;
27570
27568
  }
27571
27569
  //#endregion
@@ -28024,7 +28022,7 @@ var oB = /*#__PURE__*/ new Set(["auto", "scroll"]), sB = class {
28024
28022
  x: r.x - t.x,
28025
28023
  y: r.y - t.y
28026
28024
  };
28027
- i.x === 0 && i.y === 0 || (n ? this.lastMoveEventInfo && (this.lastMoveEventInfo.point.x += i.x, this.lastMoveEventInfo.point.y += i.y) : this.history.length > 0 && (this.history[0].x -= i.x, this.history[0].y -= i.y), this.scrollPositions.set(e, r), rj.update(this.updatePoint, !0));
28025
+ (i.x !== 0 || i.y !== 0) && (n ? this.lastMoveEventInfo && (this.lastMoveEventInfo.point.x += i.x, this.lastMoveEventInfo.point.y += i.y) : this.history.length > 0 && (this.history[0].x -= i.x, this.history[0].y -= i.y), this.scrollPositions.set(e, r), rj.update(this.updatePoint, !0));
28028
28026
  }
28029
28027
  updateHandlers(e) {
28030
28028
  this.handlers = e;
@@ -38428,7 +38426,7 @@ function cue(e, t, n) {
38428
38426
  [1, -1].forEach(function(e) {
38429
38427
  [1, -1].forEach(function(n) {
38430
38428
  var a = [e * i[0], n * i[1]];
38431
- t[0] === a[0] && t[1] === a[1] || r.push([t, a]);
38429
+ (t[0] !== a[0] || t[1] !== a[1]) && r.push([t, a]);
38432
38430
  });
38433
38431
  });
38434
38432
  } else if (e[0]) {
@@ -39957,7 +39955,7 @@ function Oue(e, t, n, r, i) {
39957
39955
  })), !1)), g = Math.min.apply(Math, Q([h], Z(o.map(function(e) {
39958
39956
  return e.rect[d.end];
39959
39957
  })), !1)), _ = (s + g) / 2;
39960
- s === g || _ === (m + h) / 2 || o.forEach(function(t) {
39958
+ s !== g && _ !== (m + h) / 2 && o.forEach(function(t) {
39961
39959
  var o = t.rect, s = t.className, d = [n[0], n[1]];
39962
39960
  if (o[u.end] < f) d[c] += o[u.end] - f;
39963
39961
  else if (p < o[u.start]) d[c] += o[u.start] - f - r;
@@ -47842,7 +47840,7 @@ var bpe = /* @__PURE__ */ M6((r) => {
47842
47840
  e.currentTarget === document.activeElement && l.onItemLeave?.();
47843
47841
  }),
47844
47842
  onKeyDown: G(s.onKeyDown, (e) => {
47845
- a || e.target !== e.currentTarget || l.searchRef?.current !== "" && e.key === " " || (mpe.includes(e.key) && v(), e.key === " " && e.preventDefault());
47843
+ a || e.target !== e.currentTarget || (l.searchRef?.current === "" || e.key !== " ") && (mpe.includes(e.key) && v(), e.key === " " && e.preventDefault());
47846
47844
  })
47847
47845
  })
47848
47846
  })
@@ -51772,7 +51770,7 @@ function Xge(e = {}) {
51772
51770
  }
51773
51771
  function Zge() {
51774
51772
  let e, t = 0, n = (n) => {
51775
- e = j7(n.target), !(e === document.documentElement && e === document.body) && (t = n.changedTouches[0].pageY);
51773
+ e = j7(n.target), (e !== document.documentElement || e !== document.body) && (t = n.changedTouches[0].pageY);
51776
51774
  }, r = (n) => {
51777
51775
  if (!e || e === document.documentElement || e === document.body) {
51778
51776
  n.preventDefault();
@@ -52621,110 +52619,122 @@ var n9 = {
52621
52619
  }, e))
52622
52620
  });
52623
52621
  }, h_e = 120, g_e = 200, __e = ({ value: e, onChange: r, min: a = -Infinity, max: o = Infinity, step: s = 1, disabled: c, options: l, className: u, size: d = "default", ...f }) => {
52624
- let p = d === "compact", m = V(!1), h = V(null), g = V(null), [_, v] = Me(e.toString()), y = V(_), [b, x] = Me(null), S = V(null), C = B((e) => {
52622
+ let p = d === "compact", m = V(!1), h = V(null), g = V(null), [_, v] = Me(e.toString()), y = V(_), b = V(!1), x = V(null), [S, C] = Me(null), w = V(null), T = B((e) => {
52625
52623
  if (e === "") return !1;
52626
52624
  let t = Number(e);
52627
52625
  return !isNaN(t) && (a === void 0 || t >= a) && (o === void 0 || t <= o);
52628
- }, [a, o]), w = B(() => {
52629
- S.current &&= (clearInterval(S.current), null);
52630
- }, []), T = B((e) => {
52626
+ }, [a, o]), E = B(() => {
52627
+ w.current &&= (clearInterval(w.current), null);
52628
+ }, []), D = B((e) => {
52631
52629
  v((t) => {
52632
52630
  let n = (() => {
52633
52631
  let n = (e > 0 ? Math.floor : Math.ceil)(Number(t) + e);
52634
- return C(n) ? n.toString() : (w(), t);
52632
+ return T(n) ? n.toString() : (E(), t);
52635
52633
  })();
52636
- return C(n) && r(Number(n)), n;
52634
+ return T(n) && r(Number(n)), n;
52637
52635
  });
52638
52636
  }, [
52639
- w,
52640
- C,
52637
+ E,
52638
+ T,
52641
52639
  r
52642
- ]), E = B((e) => {
52643
- m.current || (m.current = !0, T(e), w(), S.current = window.setInterval(() => {
52644
- T(e);
52640
+ ]), O = B((e) => {
52641
+ m.current || (m.current = !0, D(e), E(), w.current = window.setInterval(() => {
52642
+ D(e);
52645
52643
  }, h_e));
52646
- }, [w, T]), D = B((e) => {
52647
- w(), S.current = window.setTimeout(() => {
52648
- E(e);
52644
+ }, [E, D]), k = B((e) => {
52645
+ E(), w.current = window.setTimeout(() => {
52646
+ O(e);
52649
52647
  }, g_e);
52650
- }, [w, E]), O = B((e) => {
52651
- r(e), v(e.toString());
52652
- }, [r]), k = B((e) => {
52648
+ }, [E, O]), A = B((e) => {
52649
+ b.current = !1, r(e), v(e.toString());
52650
+ }, [r]), j = B(() => {
52651
+ let t = b.current;
52652
+ if (b.current = !1, t && T(_)) {
52653
+ x.current = Number(_), r(x.current);
52654
+ return;
52655
+ }
52656
+ T(_) && x.current === Number(_) || v(e.toString());
52657
+ }, [
52658
+ T,
52659
+ _,
52660
+ r,
52661
+ e
52662
+ ]), M = B((e) => {
52653
52663
  let t = e.shiftKey && s === 1 ? 10 : s;
52654
52664
  switch (e.key) {
52655
52665
  case "ArrowUp":
52656
52666
  if (e.preventDefault(), l) {
52657
- x((e) => e === null || e - 1 < 0 ? l.length - 1 : e - 1);
52667
+ C((e) => e === null || e - 1 < 0 ? l.length - 1 : e - 1);
52658
52668
  return;
52659
52669
  }
52660
- E(t);
52670
+ O(t);
52661
52671
  break;
52662
52672
  case "ArrowDown":
52663
52673
  if (e.preventDefault(), l) {
52664
- x((e) => e === null || e + 1 >= l.length ? 0 : e + 1);
52674
+ C((e) => e === null || e + 1 >= l.length ? 0 : e + 1);
52665
52675
  return;
52666
52676
  }
52667
- E(-t);
52677
+ O(-t);
52668
52678
  break;
52669
- case "Enter":
52670
- if (e.preventDefault(), b === null) return;
52671
- O(l[b]), x(null);
52679
+ case "Enter": {
52680
+ e.preventDefault();
52681
+ let t = S === null ? void 0 : l[S];
52682
+ if (t === void 0) {
52683
+ j();
52684
+ return;
52685
+ }
52686
+ A(t), C(null);
52672
52687
  break;
52688
+ }
52673
52689
  case "Escape":
52674
- e.preventDefault(), x(null), w();
52690
+ e.preventDefault(), C(null), E();
52675
52691
  break;
52676
52692
  default:
52677
- x(null);
52693
+ C(null);
52678
52694
  break;
52679
52695
  }
52680
52696
  }, [
52681
- w,
52697
+ E,
52698
+ j,
52682
52699
  l,
52700
+ A,
52701
+ S,
52683
52702
  O,
52684
- b,
52685
- E,
52686
52703
  s
52687
- ]), A = B((e) => {
52704
+ ]), N = B((e) => {
52688
52705
  switch (e.key) {
52689
52706
  case "ArrowUp":
52690
52707
  case "ArrowDown":
52691
- e.preventDefault(), m.current = !1, w();
52708
+ e.preventDefault(), m.current = !1, E();
52692
52709
  break;
52693
52710
  }
52694
- }, [w]), j = B((e) => {
52695
- let t = e.target.value;
52696
- v(t), C(t) && r(Number(t));
52697
- }, [C, r]), M = B(() => {
52698
- l && x(l.indexOf(e) ?? 0), h.current?.select();
52699
- }, [l, e]), N = B(() => {
52700
- l && x(null);
52701
- let t = e.toString();
52702
- _ !== t && v(t);
52703
- }, [
52704
- _,
52705
- l,
52706
- e
52707
- ]), ee = Ae(() => C(Number(_) + s), [
52708
- C,
52711
+ }, [E]), ee = B((e) => {
52712
+ b.current = !0, v(e.target.value);
52713
+ }, []), P = B(() => {
52714
+ b.current = !1, x.current = null, l && C(l.indexOf(e) ?? 0), h.current?.select();
52715
+ }, [l, e]), F = B(() => {
52716
+ l && C(null), j();
52717
+ }, [j, l]), te = Ae(() => T(Number(_) + s), [
52718
+ T,
52709
52719
  _,
52710
52720
  s
52711
- ]), P = Ae(() => C(Number(_) - s), [
52712
- C,
52721
+ ]), I = Ae(() => T(Number(_) - s), [
52722
+ T,
52713
52723
  _,
52714
52724
  s
52715
52725
  ]);
52716
52726
  return we(() => () => {
52717
- w();
52718
- }, [w]), we(() => {
52719
- if (b === null) {
52727
+ E();
52728
+ }, [E]), we(() => {
52729
+ if (S === null) {
52720
52730
  g.current?.close();
52721
52731
  return;
52722
52732
  }
52723
52733
  g.current?.open();
52724
- }, [b]), we(() => {
52734
+ }, [S]), we(() => {
52725
52735
  y.current = _;
52726
52736
  }, [_]), we(() => {
52727
- e !== Number(y.current) && v(e.toString());
52737
+ x.current = null, document.activeElement !== h.current && e !== Number(y.current) && v(e.toString());
52728
52738
  }, [e]), /* @__PURE__ */ n("div", {
52729
52739
  className: U("relative inline-block", u),
52730
52740
  children: [/* @__PURE__ */ n("span", {
@@ -52732,25 +52742,25 @@ var n9 = {
52732
52742
  children: [
52733
52743
  /* @__PURE__ */ t(r9, {
52734
52744
  size: d,
52735
- disabled: !P,
52745
+ disabled: !I,
52736
52746
  "aria-label": "-",
52737
52747
  onClick: () => {
52738
- T(-s);
52748
+ D(-s);
52739
52749
  },
52740
52750
  onMouseDown: () => {
52741
- D(-s);
52751
+ k(-s);
52742
52752
  },
52743
52753
  onTouchStart: () => {
52744
- D(-s);
52754
+ k(-s);
52745
52755
  },
52746
52756
  onMouseUp: () => {
52747
- m.current = !1, w();
52757
+ m.current = !1, E();
52748
52758
  },
52749
52759
  onTouchEnd: () => {
52750
- m.current = !1, w();
52760
+ m.current = !1, E();
52751
52761
  },
52752
52762
  onMouseLeave: () => {
52753
- il.isMobile || (m.current = !1, w());
52763
+ il.isMobile || (m.current = !1, E());
52754
52764
  },
52755
52765
  onContextMenu: (e) => e.preventDefault(),
52756
52766
  children: /* @__PURE__ */ t(ie, { className: "text-content-primary h-4 w-4" })
@@ -52762,33 +52772,33 @@ var n9 = {
52762
52772
  type: "number",
52763
52773
  className: H(p ? "size-h-400" : "size-h-500", "component-500 border-misc-border bg-surface-high text-content-primary w-10 border-0 border-y p-0 text-center focus:ring-0", "focus-visible:border-content-accent focus-visible:border focus-visible:outline-hidden", "focus-visible:ring-misc-focus-indicator focus-visible:misc-border-size-focus-ring focus-visible:rounded-150", "focus-visible:relative focus-visible:z-10", "group-hover:not-focus-visible:border-misc-border-hover", "group-focus-visible:not-focus-visible:border-misc-border-hover", "group-disabled:opacity-30"),
52764
52774
  value: _,
52765
- onFocus: M,
52766
- onChange: j,
52767
- onBlur: N,
52768
- onKeyDown: k,
52769
- onKeyUp: A
52775
+ onFocus: P,
52776
+ onChange: ee,
52777
+ onBlur: F,
52778
+ onKeyDown: M,
52779
+ onKeyUp: N
52770
52780
  }),
52771
52781
  /* @__PURE__ */ t(r9, {
52772
52782
  size: d,
52773
- disabled: !ee,
52783
+ disabled: !te,
52774
52784
  "aria-label": "+",
52775
52785
  onClick: () => {
52776
- T(s);
52786
+ D(s);
52777
52787
  },
52778
52788
  onMouseDown: () => {
52779
- D(s);
52789
+ k(s);
52780
52790
  },
52781
52791
  onTouchStart: () => {
52782
- D(s);
52792
+ k(s);
52783
52793
  },
52784
52794
  onMouseUp: () => {
52785
- m.current = !1, w();
52795
+ m.current = !1, E();
52786
52796
  },
52787
52797
  onTouchEnd: () => {
52788
- m.current = !1, w();
52798
+ m.current = !1, E();
52789
52799
  },
52790
52800
  onMouseLeave: () => {
52791
- il.isMobile || (m.current = !1, w());
52801
+ il.isMobile || (m.current = !1, E());
52792
52802
  },
52793
52803
  onContextMenu: (e) => e.preventDefault(),
52794
52804
  children: /* @__PURE__ */ t(i, { className: "text-content-primary h-4 w-4" })
@@ -52800,9 +52810,9 @@ var n9 = {
52800
52810
  preventAutoFocus: !0,
52801
52811
  children: /* @__PURE__ */ t(m_e, {
52802
52812
  values: l,
52803
- selectedIndex: b,
52813
+ selectedIndex: S,
52804
52814
  onSelect: (e) => {
52805
- O(e), x(null);
52815
+ A(e), C(null);
52806
52816
  }
52807
52817
  })
52808
52818
  })]
@@ -56390,7 +56400,7 @@ var xye = ({ titleBlock: e, selectedIndex: r, background: i = "neutral-50-bottom
56390
56400
  }
56391
56401
  function i(e, t) {
56392
56402
  e.onreadystatechange = function() {
56393
- this.readyState != "complete" && this.readyState != "loaded" || (this.onreadystatechange = null, t(null, e));
56403
+ (this.readyState == "complete" || this.readyState == "loaded") && (this.onreadystatechange = null, t(null, e));
56394
56404
  };
56395
56405
  }
56396
56406
  })), Iye = /* @__PURE__ */ rn(((e, t) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@photoroom/ui",
3
- "version": "0.1.524",
3
+ "version": "0.1.526",
4
4
  "private": false,
5
5
  "description": "Photoroom design system components",
6
6
  "sideEffects": [
@@ -37,7 +37,7 @@
37
37
  "dependencies": {
38
38
  "@img-comparison-slider/react": "8.0.2",
39
39
  "@lottiefiles/react-lottie-player": "3.6.0",
40
- "@photoroom/icons": "0.1.35",
40
+ "@photoroom/icons": "0.1.36",
41
41
  "@radix-ui/react-accordion": "1.2.20",
42
42
  "@radix-ui/react-avatar": "1.2.6",
43
43
  "@radix-ui/react-checkbox": "1.3.11",