@photoroom/ui 0.1.221 → 0.1.223

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/index.mjs CHANGED
@@ -54774,26 +54774,53 @@ var e_e = ({ title: e, date: t, className: n }) => /* @__PURE__ */ D("div", {
54774
54774
  ]
54775
54775
  })
54776
54776
  })
54777
- }), o_e = ({ title: e, children: t, className: r, ...i }) => {
54778
- let a = n.toArray(t);
54777
+ }), o_e = ({ title: e, tabs: t, className: r, ...i }) => {
54778
+ let [a, o] = C(0), s = Math.min(a, Math.max(0, t.length - 1));
54779
54779
  return /* @__PURE__ */ E("section", {
54780
54780
  className: H("pt-e700 pb-e1000 w-full px-4 sm:px-6 md:px-8 xl:px-10", r),
54781
54781
  ...i,
54782
54782
  children: /* @__PURE__ */ D("div", {
54783
54783
  className: "mx-auto flex w-full max-w-[1200px] flex-col items-center",
54784
- children: [!!e && /* @__PURE__ */ E("div", {
54785
- className: "pb-i600 w-full",
54786
- children: e
54787
- }), /* @__PURE__ */ D("div", {
54788
- className: "flex w-full flex-col gap-6",
54789
- children: [/* @__PURE__ */ E("div", {
54790
- className: "grid grid-cols-1 gap-6 sm:grid-cols-2 lg:grid-cols-[minmax(0,1fr)_minmax(0,400px)]",
54791
- children: a.slice(0, 2)
54792
- }), a.length > 2 && /* @__PURE__ */ E("div", {
54793
- className: "grid grid-cols-1 gap-6 sm:grid-cols-2 lg:grid-cols-[minmax(0,400px)_minmax(0,1fr)]",
54794
- children: a.slice(2, 4)
54795
- })]
54796
- })]
54784
+ children: [
54785
+ !!e && /* @__PURE__ */ E("div", {
54786
+ className: H("w-full", t.length > 1 ? "pb-i500" : "pb-i600"),
54787
+ children: e
54788
+ }),
54789
+ t.length > 1 && /* @__PURE__ */ E("div", {
54790
+ className: "pb-i400 flex w-full justify-center",
54791
+ children: /* @__PURE__ */ E(C5, {
54792
+ className: "w-full max-w-[600px]",
54793
+ value: String(s),
54794
+ onValueChange: (e) => {
54795
+ e && o(Number(e));
54796
+ },
54797
+ children: t.map((e, t) => /* @__PURE__ */ E(C5.Item, {
54798
+ value: String(t),
54799
+ className: "px-4 py-1 text-center text-balance",
54800
+ children: e.label
54801
+ }, t))
54802
+ })
54803
+ }),
54804
+ /* @__PURE__ */ E("div", {
54805
+ className: "grid w-full grid-cols-1 grid-rows-1",
54806
+ children: t.map((e, t) => {
54807
+ let r = t === s, i = n.toArray(e.cards);
54808
+ return /* @__PURE__ */ D("div", {
54809
+ "aria-hidden": !r,
54810
+ inert: !r,
54811
+ style: { transform: `translateX(${(t - s) * 1}rem)` },
54812
+ className: H("col-start-1 row-start-1 flex flex-col gap-6", "transition-[opacity,transform] duration-200 ease-out motion-reduce:transition-none", r ? "opacity-100" : "opacity-0"),
54813
+ children: [/* @__PURE__ */ E("div", {
54814
+ className: "grid grid-cols-1 gap-6 sm:grid-cols-2 lg:grid-cols-[minmax(0,1fr)_minmax(0,400px)]",
54815
+ children: i.slice(0, 2)
54816
+ }), i.length > 2 && /* @__PURE__ */ E("div", {
54817
+ className: "grid grid-cols-1 gap-6 sm:grid-cols-2 lg:grid-cols-[minmax(0,400px)_minmax(0,1fr)]",
54818
+ children: i.slice(2, 4)
54819
+ })]
54820
+ }, t);
54821
+ })
54822
+ })
54823
+ ]
54797
54824
  })
54798
54825
  });
54799
54826
  }, s_e = ({ preview: e, title: t, subtitle: n, cta: r, className: i, ...a }) => /* @__PURE__ */ D("div", {
@@ -55738,7 +55765,7 @@ var y9 = {}, b9 = ({ variant: e, className: t, cssBackgroundColor: n, children:
55738
55765
  className: H("py-e400 px-4 sm:px-6 md:px-8 xl:px-10", r),
55739
55766
  ...i,
55740
55767
  children: /* @__PURE__ */ D("div", {
55741
- className: "bg-sand-50 rounded-500 mx-auto flex w-full max-w-[1200px] flex-col gap-6 overflow-hidden p-3 lg:flex-row lg:items-stretch",
55768
+ className: "bg-sand-50 rounded-500 mx-auto flex w-full max-w-[1200px] flex-col-reverse gap-6 overflow-hidden p-3 lg:flex-row lg:items-stretch",
55742
55769
  children: [/* @__PURE__ */ D("div", {
55743
55770
  className: "flex w-full flex-col items-start gap-4 p-3 lg:w-[320px] lg:shrink-0 lg:justify-between",
55744
55771
  children: [/* @__PURE__ */ E("div", {
@@ -55748,7 +55775,10 @@ var y9 = {}, b9 = ({ variant: e, className: t, cssBackgroundColor: n, children:
55748
55775
  }), /* @__PURE__ */ E("div", {
55749
55776
  className: V("grid w-full flex-1 grid-cols-3 gap-3 sm:grid-cols-6 md:gap-[10px]", "lg:grid-cols-4 lg:gap-3 xl:grid-cols-6"),
55750
55777
  children: n.map((e, t) => /* @__PURE__ */ E("div", {
55751
- className: "bg-surface-default rounded-300 flex aspect-3/2 items-center justify-center overflow-hidden p-1",
55778
+ className: V("bg-surface-default rounded-300 aspect-3/2 items-center justify-center overflow-hidden p-1", {
55779
+ flex: t < 6,
55780
+ "hidden sm:flex": t >= 6
55781
+ }),
55752
55782
  children: /* @__PURE__ */ E("div", {
55753
55783
  className: "relative aspect-video max-w-[100px] min-w-px flex-1",
55754
55784
  children: e
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@photoroom/ui",
3
- "version": "0.1.221",
3
+ "version": "0.1.223",
4
4
  "private": false,
5
5
  "description": "Photoroom design system components",
6
6
  "sideEffects": [