@photoroom/ui 0.1.221 → 0.1.222

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", {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@photoroom/ui",
3
- "version": "0.1.221",
3
+ "version": "0.1.222",
4
4
  "private": false,
5
5
  "description": "Photoroom design system components",
6
6
  "sideEffects": [