@photoroom/ui 0.1.523 → 0.1.525
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/components/unsorted/NumberSelectField/NumberSelectField.d.ts.map +1 -1
- package/components/website/CardsBlock/CardsBlock.d.ts +3 -1
- package/components/website/CardsBlock/CardsBlock.d.ts.map +1 -1
- package/components/website/Pr100HeroBlock/Pr100HeroBlock.d.ts.map +1 -1
- package/components/website/SmallSectionTitle/SmallSectionTitle.d.ts +2 -2
- package/components/website/SmallSectionTitle/SmallSectionTitle.d.ts.map +1 -1
- package/index.css +1 -1
- package/index.mjs +102 -88
- package/package.json +1 -1
package/index.mjs
CHANGED
|
@@ -52621,110 +52621,122 @@ var n9 = {
|
|
|
52621
52621
|
}, e))
|
|
52622
52622
|
});
|
|
52623
52623
|
}, 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(_),
|
|
52624
|
+
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
52625
|
if (e === "") return !1;
|
|
52626
52626
|
let t = Number(e);
|
|
52627
52627
|
return !isNaN(t) && (a === void 0 || t >= a) && (o === void 0 || t <= o);
|
|
52628
|
-
}, [a, o]),
|
|
52629
|
-
|
|
52630
|
-
}, []),
|
|
52628
|
+
}, [a, o]), E = B(() => {
|
|
52629
|
+
w.current &&= (clearInterval(w.current), null);
|
|
52630
|
+
}, []), D = B((e) => {
|
|
52631
52631
|
v((t) => {
|
|
52632
52632
|
let n = (() => {
|
|
52633
52633
|
let n = (e > 0 ? Math.floor : Math.ceil)(Number(t) + e);
|
|
52634
|
-
return
|
|
52634
|
+
return T(n) ? n.toString() : (E(), t);
|
|
52635
52635
|
})();
|
|
52636
|
-
return
|
|
52636
|
+
return T(n) && r(Number(n)), n;
|
|
52637
52637
|
});
|
|
52638
52638
|
}, [
|
|
52639
|
-
|
|
52640
|
-
|
|
52639
|
+
E,
|
|
52640
|
+
T,
|
|
52641
52641
|
r
|
|
52642
|
-
]),
|
|
52643
|
-
m.current || (m.current = !0,
|
|
52644
|
-
|
|
52642
|
+
]), O = B((e) => {
|
|
52643
|
+
m.current || (m.current = !0, D(e), E(), w.current = window.setInterval(() => {
|
|
52644
|
+
D(e);
|
|
52645
52645
|
}, h_e));
|
|
52646
|
-
}, [
|
|
52647
|
-
|
|
52648
|
-
|
|
52646
|
+
}, [E, D]), k = B((e) => {
|
|
52647
|
+
E(), w.current = window.setTimeout(() => {
|
|
52648
|
+
O(e);
|
|
52649
52649
|
}, g_e);
|
|
52650
|
-
}, [
|
|
52651
|
-
r(e), v(e.toString());
|
|
52652
|
-
}, [r]),
|
|
52650
|
+
}, [E, O]), A = B((e) => {
|
|
52651
|
+
b.current = !1, r(e), v(e.toString());
|
|
52652
|
+
}, [r]), j = B(() => {
|
|
52653
|
+
let t = b.current;
|
|
52654
|
+
if (b.current = !1, t && T(_)) {
|
|
52655
|
+
x.current = Number(_), r(x.current);
|
|
52656
|
+
return;
|
|
52657
|
+
}
|
|
52658
|
+
T(_) && x.current === Number(_) || v(e.toString());
|
|
52659
|
+
}, [
|
|
52660
|
+
T,
|
|
52661
|
+
_,
|
|
52662
|
+
r,
|
|
52663
|
+
e
|
|
52664
|
+
]), M = B((e) => {
|
|
52653
52665
|
let t = e.shiftKey && s === 1 ? 10 : s;
|
|
52654
52666
|
switch (e.key) {
|
|
52655
52667
|
case "ArrowUp":
|
|
52656
52668
|
if (e.preventDefault(), l) {
|
|
52657
|
-
|
|
52669
|
+
C((e) => e === null || e - 1 < 0 ? l.length - 1 : e - 1);
|
|
52658
52670
|
return;
|
|
52659
52671
|
}
|
|
52660
|
-
|
|
52672
|
+
O(t);
|
|
52661
52673
|
break;
|
|
52662
52674
|
case "ArrowDown":
|
|
52663
52675
|
if (e.preventDefault(), l) {
|
|
52664
|
-
|
|
52676
|
+
C((e) => e === null || e + 1 >= l.length ? 0 : e + 1);
|
|
52665
52677
|
return;
|
|
52666
52678
|
}
|
|
52667
|
-
|
|
52679
|
+
O(-t);
|
|
52668
52680
|
break;
|
|
52669
|
-
case "Enter":
|
|
52670
|
-
|
|
52671
|
-
|
|
52681
|
+
case "Enter": {
|
|
52682
|
+
e.preventDefault();
|
|
52683
|
+
let t = S === null ? void 0 : l[S];
|
|
52684
|
+
if (t === void 0) {
|
|
52685
|
+
j();
|
|
52686
|
+
return;
|
|
52687
|
+
}
|
|
52688
|
+
A(t), C(null);
|
|
52672
52689
|
break;
|
|
52690
|
+
}
|
|
52673
52691
|
case "Escape":
|
|
52674
|
-
e.preventDefault(),
|
|
52692
|
+
e.preventDefault(), C(null), E();
|
|
52675
52693
|
break;
|
|
52676
52694
|
default:
|
|
52677
|
-
|
|
52695
|
+
C(null);
|
|
52678
52696
|
break;
|
|
52679
52697
|
}
|
|
52680
52698
|
}, [
|
|
52681
|
-
|
|
52699
|
+
E,
|
|
52700
|
+
j,
|
|
52682
52701
|
l,
|
|
52702
|
+
A,
|
|
52703
|
+
S,
|
|
52683
52704
|
O,
|
|
52684
|
-
b,
|
|
52685
|
-
E,
|
|
52686
52705
|
s
|
|
52687
|
-
]),
|
|
52706
|
+
]), N = B((e) => {
|
|
52688
52707
|
switch (e.key) {
|
|
52689
52708
|
case "ArrowUp":
|
|
52690
52709
|
case "ArrowDown":
|
|
52691
|
-
e.preventDefault(), m.current = !1,
|
|
52710
|
+
e.preventDefault(), m.current = !1, E();
|
|
52692
52711
|
break;
|
|
52693
52712
|
}
|
|
52694
|
-
}, [
|
|
52695
|
-
|
|
52696
|
-
|
|
52697
|
-
|
|
52698
|
-
|
|
52699
|
-
|
|
52700
|
-
|
|
52701
|
-
|
|
52702
|
-
_ !== t && v(t);
|
|
52703
|
-
}, [
|
|
52704
|
-
_,
|
|
52705
|
-
l,
|
|
52706
|
-
e
|
|
52707
|
-
]), ee = Ae(() => C(Number(_) + s), [
|
|
52708
|
-
C,
|
|
52713
|
+
}, [E]), ee = B((e) => {
|
|
52714
|
+
b.current = !0, v(e.target.value);
|
|
52715
|
+
}, []), P = B(() => {
|
|
52716
|
+
b.current = !1, x.current = null, l && C(l.indexOf(e) ?? 0), h.current?.select();
|
|
52717
|
+
}, [l, e]), F = B(() => {
|
|
52718
|
+
l && C(null), j();
|
|
52719
|
+
}, [j, l]), te = Ae(() => T(Number(_) + s), [
|
|
52720
|
+
T,
|
|
52709
52721
|
_,
|
|
52710
52722
|
s
|
|
52711
|
-
]),
|
|
52712
|
-
|
|
52723
|
+
]), I = Ae(() => T(Number(_) - s), [
|
|
52724
|
+
T,
|
|
52713
52725
|
_,
|
|
52714
52726
|
s
|
|
52715
52727
|
]);
|
|
52716
52728
|
return we(() => () => {
|
|
52717
|
-
|
|
52718
|
-
}, [
|
|
52719
|
-
if (
|
|
52729
|
+
E();
|
|
52730
|
+
}, [E]), we(() => {
|
|
52731
|
+
if (S === null) {
|
|
52720
52732
|
g.current?.close();
|
|
52721
52733
|
return;
|
|
52722
52734
|
}
|
|
52723
52735
|
g.current?.open();
|
|
52724
|
-
}, [
|
|
52736
|
+
}, [S]), we(() => {
|
|
52725
52737
|
y.current = _;
|
|
52726
52738
|
}, [_]), we(() => {
|
|
52727
|
-
e !== Number(y.current) && v(e.toString());
|
|
52739
|
+
x.current = null, document.activeElement !== h.current && e !== Number(y.current) && v(e.toString());
|
|
52728
52740
|
}, [e]), /* @__PURE__ */ n("div", {
|
|
52729
52741
|
className: U("relative inline-block", u),
|
|
52730
52742
|
children: [/* @__PURE__ */ n("span", {
|
|
@@ -52732,25 +52744,25 @@ var n9 = {
|
|
|
52732
52744
|
children: [
|
|
52733
52745
|
/* @__PURE__ */ t(r9, {
|
|
52734
52746
|
size: d,
|
|
52735
|
-
disabled: !
|
|
52747
|
+
disabled: !I,
|
|
52736
52748
|
"aria-label": "-",
|
|
52737
52749
|
onClick: () => {
|
|
52738
|
-
|
|
52750
|
+
D(-s);
|
|
52739
52751
|
},
|
|
52740
52752
|
onMouseDown: () => {
|
|
52741
|
-
|
|
52753
|
+
k(-s);
|
|
52742
52754
|
},
|
|
52743
52755
|
onTouchStart: () => {
|
|
52744
|
-
|
|
52756
|
+
k(-s);
|
|
52745
52757
|
},
|
|
52746
52758
|
onMouseUp: () => {
|
|
52747
|
-
m.current = !1,
|
|
52759
|
+
m.current = !1, E();
|
|
52748
52760
|
},
|
|
52749
52761
|
onTouchEnd: () => {
|
|
52750
|
-
m.current = !1,
|
|
52762
|
+
m.current = !1, E();
|
|
52751
52763
|
},
|
|
52752
52764
|
onMouseLeave: () => {
|
|
52753
|
-
il.isMobile || (m.current = !1,
|
|
52765
|
+
il.isMobile || (m.current = !1, E());
|
|
52754
52766
|
},
|
|
52755
52767
|
onContextMenu: (e) => e.preventDefault(),
|
|
52756
52768
|
children: /* @__PURE__ */ t(ie, { className: "text-content-primary h-4 w-4" })
|
|
@@ -52762,33 +52774,33 @@ var n9 = {
|
|
|
52762
52774
|
type: "number",
|
|
52763
52775
|
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
52776
|
value: _,
|
|
52765
|
-
onFocus:
|
|
52766
|
-
onChange:
|
|
52767
|
-
onBlur:
|
|
52768
|
-
onKeyDown:
|
|
52769
|
-
onKeyUp:
|
|
52777
|
+
onFocus: P,
|
|
52778
|
+
onChange: ee,
|
|
52779
|
+
onBlur: F,
|
|
52780
|
+
onKeyDown: M,
|
|
52781
|
+
onKeyUp: N
|
|
52770
52782
|
}),
|
|
52771
52783
|
/* @__PURE__ */ t(r9, {
|
|
52772
52784
|
size: d,
|
|
52773
|
-
disabled: !
|
|
52785
|
+
disabled: !te,
|
|
52774
52786
|
"aria-label": "+",
|
|
52775
52787
|
onClick: () => {
|
|
52776
|
-
|
|
52788
|
+
D(s);
|
|
52777
52789
|
},
|
|
52778
52790
|
onMouseDown: () => {
|
|
52779
|
-
|
|
52791
|
+
k(s);
|
|
52780
52792
|
},
|
|
52781
52793
|
onTouchStart: () => {
|
|
52782
|
-
|
|
52794
|
+
k(s);
|
|
52783
52795
|
},
|
|
52784
52796
|
onMouseUp: () => {
|
|
52785
|
-
m.current = !1,
|
|
52797
|
+
m.current = !1, E();
|
|
52786
52798
|
},
|
|
52787
52799
|
onTouchEnd: () => {
|
|
52788
|
-
m.current = !1,
|
|
52800
|
+
m.current = !1, E();
|
|
52789
52801
|
},
|
|
52790
52802
|
onMouseLeave: () => {
|
|
52791
|
-
il.isMobile || (m.current = !1,
|
|
52803
|
+
il.isMobile || (m.current = !1, E());
|
|
52792
52804
|
},
|
|
52793
52805
|
onContextMenu: (e) => e.preventDefault(),
|
|
52794
52806
|
children: /* @__PURE__ */ t(i, { className: "text-content-primary h-4 w-4" })
|
|
@@ -52800,9 +52812,9 @@ var n9 = {
|
|
|
52800
52812
|
preventAutoFocus: !0,
|
|
52801
52813
|
children: /* @__PURE__ */ t(m_e, {
|
|
52802
52814
|
values: l,
|
|
52803
|
-
selectedIndex:
|
|
52815
|
+
selectedIndex: S,
|
|
52804
52816
|
onSelect: (e) => {
|
|
52805
|
-
|
|
52817
|
+
A(e), C(null);
|
|
52806
52818
|
}
|
|
52807
52819
|
})
|
|
52808
52820
|
})]
|
|
@@ -53395,28 +53407,29 @@ var M_e = ({ title: e, summary: r, snapshot: i, className: a, ...o }) => /* @__P
|
|
|
53395
53407
|
})]
|
|
53396
53408
|
})]
|
|
53397
53409
|
});
|
|
53398
|
-
}, P_e = ({ titleBlock: e, children: r, columns: i = 3, showMoreLabel: a,
|
|
53399
|
-
let [
|
|
53400
|
-
let e =
|
|
53401
|
-
Ie(() =>
|
|
53410
|
+
}, P_e = ({ titleBlock: e, children: r, columns: i = 3, showMoreLabel: a, background: o = "surface-default", ...s }) => {
|
|
53411
|
+
let [c, l] = Me(!1), u = V(null), d = fe.toArray(r), f = i * 2, p = !c && !!a && d.length > f, m = () => {
|
|
53412
|
+
let e = u.current;
|
|
53413
|
+
Ie(() => l(!0)), e?.querySelector("a, button")?.focus();
|
|
53402
53414
|
};
|
|
53403
|
-
return /* @__PURE__ */ n(
|
|
53415
|
+
return /* @__PURE__ */ n(u9, {
|
|
53416
|
+
variant: o,
|
|
53404
53417
|
className: H("pt-e700 pb-e1000 gap-i600 flex flex-col", "px-4 sm:px-6 md:px-8 xl:px-10"),
|
|
53405
|
-
...
|
|
53418
|
+
...s,
|
|
53406
53419
|
children: [e, /* @__PURE__ */ n("div", {
|
|
53407
53420
|
className: "mx-auto flex w-full flex-col gap-10 xl:max-w-[1200px]",
|
|
53408
53421
|
children: [/* @__PURE__ */ t("div", {
|
|
53409
53422
|
className: H("grid grid-cols-1 gap-y-6", "sm:grid-cols-2 sm:gap-x-6 sm:gap-y-8", "lg:grid-cols-3", { "xl:grid-cols-4": i === 4 }),
|
|
53410
|
-
children:
|
|
53411
|
-
ref:
|
|
53412
|
-
className: H("flex", { hidden:
|
|
53423
|
+
children: d.map((e, n) => /* @__PURE__ */ t("div", {
|
|
53424
|
+
ref: p && n === f ? u : void 0,
|
|
53425
|
+
className: H("flex", { hidden: p && n >= f }),
|
|
53413
53426
|
children: e
|
|
53414
53427
|
}, n))
|
|
53415
|
-
}),
|
|
53428
|
+
}), p && /* @__PURE__ */ t("div", { children: /* @__PURE__ */ t(Vu, {
|
|
53416
53429
|
as: "button",
|
|
53417
53430
|
type: "button",
|
|
53418
53431
|
variant: "accent",
|
|
53419
|
-
onClick:
|
|
53432
|
+
onClick: m,
|
|
53420
53433
|
children: a
|
|
53421
53434
|
}) })]
|
|
53422
53435
|
})]
|
|
@@ -55456,11 +55469,12 @@ var rye = Object.assign(R9, {
|
|
|
55456
55469
|
})
|
|
55457
55470
|
]
|
|
55458
55471
|
});
|
|
55459
|
-
}, dye = ({ title: e, overline: r, placement: i = "default" }) => /* @__PURE__ */ n("div", {
|
|
55460
|
-
className:
|
|
55472
|
+
}, dye = ({ title: e, overline: r, placement: i = "default", className: a, ...o }) => /* @__PURE__ */ n("div", {
|
|
55473
|
+
className: U("mx-auto flex w-full max-w-[1200px] flex-col gap-1", {
|
|
55461
55474
|
"items-center text-center": i === "default",
|
|
55462
55475
|
"items-start text-start": i === "side"
|
|
55463
|
-
}),
|
|
55476
|
+
}, a),
|
|
55477
|
+
...o,
|
|
55464
55478
|
children: [!!r && /* @__PURE__ */ t("div", {
|
|
55465
55479
|
className: "component-700 text-content-accent max-w-[600px]",
|
|
55466
55480
|
children: r
|