@photoroom/ui 0.1.772 → 0.1.774

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
@@ -54619,13 +54619,23 @@ function F8(e, t) {
54619
54619
  T8(F8, "makeContentId");
54620
54620
  //#endregion
54621
54621
  //#region src/components/navigation/TabNavigation/TabNavigationItem.tsx
54622
- var I8 = ({ value: e, children: t, className: n, ref: r, ...i }) => /* @__PURE__ */ L(M8, {
54623
- ref: r,
54624
- value: e,
54625
- className: W("relative flex shrink-0 items-center", "px-2 py-3", "outline-hidden", "component-semi-strong-500", "text-content-secondary hover:text-content-primary", "data-[state=active]:text-content-primary", "interaction-transition transition-colors", "focus-visible:ring-misc-focus-indicator focus-visible:misc-border-size-focus-ring", "after:pointer-events-none after:absolute after:inset-x-2 after:bottom-0 after:h-0.5", "after:bg-content-primary after:opacity-0", "after:transition-opacity after:duration-200", "data-[state=active]:after:opacity-100", n),
54626
- ...i,
54627
- children: t
54628
- });
54622
+ var I8 = ({ value: e, children: t, badge: n, className: r, ref: i, ...a }) => {
54623
+ let [o, s] = Pe(!1);
54624
+ return /* @__PURE__ */ R(M8, {
54625
+ ref: i,
54626
+ value: e,
54627
+ "data-pointer-focused": o || void 0,
54628
+ onPointerDown: () => s(!0),
54629
+ onBlur: () => s(!1),
54630
+ className: W("relative -mx-2 flex h-10 shrink-0 items-center gap-1 px-2", "outline-hidden", "component-semi-strong-500", "text-content-secondary hover:text-content-primary", "data-[state=active]:text-content-primary", "interaction-transition transition-colors", "before:rounded-400 before:pointer-events-none before:absolute before:inset-x-0 before:inset-y-1 before:ring-inset", "focus-visible:not-data-pointer-focused:before:ring-misc-focus-indicator", "focus-visible:not-data-pointer-focused:before:misc-border-size-focus-ring", "after:pointer-events-none after:absolute after:inset-x-2 after:bottom-0 after:h-0.5", "after:bg-content-primary after:opacity-0", "after:transition-opacity after:duration-200", "data-[state=active]:after:opacity-100", r),
54631
+ ...a,
54632
+ children: [t, n && /* @__PURE__ */ L(VF, {
54633
+ size: "small",
54634
+ variant: "moon-grape",
54635
+ children: n
54636
+ })]
54637
+ });
54638
+ };
54629
54639
  I8.displayName = "TabNavigationItem";
54630
54640
  //#endregion
54631
54641
  //#region src/components/navigation/TabNavigation/TabNavigation.tsx
@@ -54637,7 +54647,7 @@ var L8 = ({ className: e, ref: t, ...n }) => /* @__PURE__ */ L(A8, {
54637
54647
  L8.displayName = "TabNavigation";
54638
54648
  var R8 = ({ className: e, ref: t, ...n }) => /* @__PURE__ */ L(j8, {
54639
54649
  ref: t,
54640
- className: W("flex w-full items-stretch gap-2", e),
54650
+ className: W("flex w-full items-stretch gap-6", e),
54641
54651
  ...n
54642
54652
  });
54643
54653
  R8.displayName = "TabNavigation.List";
@@ -59211,35 +59221,34 @@ var wTe = ({ titleBlock: e, children: t, className: n, ...r }) => /* @__PURE__ *
59211
59221
  className: "size-6 text-white"
59212
59222
  })
59213
59223
  });
59214
- }, O7 = {}, k7 = ({ variant: e, className: t, cssBackgroundColor: n, children: r, isHiddenSessionKey: i, closeLabel: a, closeButtonVariant: o = "secondary-on-dark", forceShow: s, ...c }) => {
59215
- let [l, u] = Pe(() => i ? O7[i] ?? !0 : !1), d = !s && l;
59224
+ }, O7 = {}, k7 = ({ variant: e, className: t, children: n, isHiddenSessionKey: r, closeLabel: i, closeButtonVariant: a = "secondary-on-dark", forceShow: o, ...s }) => {
59225
+ let [c, l] = Pe(() => r ? O7[r] ?? !0 : !1), u = !o && c;
59216
59226
  De(() => {
59217
- if (!i) return;
59227
+ if (!r) return;
59218
59228
  let e;
59219
59229
  try {
59220
- let t = sessionStorage.getItem(i);
59230
+ let t = sessionStorage.getItem(r);
59221
59231
  e = t ? !!JSON.parse(t) : !1;
59222
59232
  } catch {
59223
59233
  e = !1;
59224
59234
  }
59225
- O7[i] = e, u(e);
59226
- }, [i]);
59227
- let f = V(() => {
59228
- s || (u(!0), i && (sessionStorage.setItem(i, JSON.stringify(!0)), O7[i] = !0));
59229
- }, [i, s]);
59230
- return d ? null : /* @__PURE__ */ R("div", {
59231
- className: U("relative text-white", "ps-4 pe-16 sm:ps-6 md:ps-8 lg:px-16", !n && e === "black" && "bg-black", !n && e === "neutral" && "bg-neutral-800", t),
59232
- style: n ? { backgroundColor: n } : void 0,
59233
- ...c,
59235
+ O7[r] = e, l(e);
59236
+ }, [r]);
59237
+ let d = V(() => {
59238
+ o || (l(!0), r && (sessionStorage.setItem(r, JSON.stringify(!0)), O7[r] = !0));
59239
+ }, [r, o]);
59240
+ return u ? null : /* @__PURE__ */ R("div", {
59241
+ className: U("relative text-white", "ps-4 pe-16 sm:ps-6 md:ps-8 lg:px-16", e === "dark" ? "bg-neutral-900" : "bg-neutral-800", t),
59242
+ ...s,
59234
59243
  children: [/* @__PURE__ */ L("div", {
59235
- className: "mx-auto flex min-h-[64px] max-w-[1200px] items-center md:justify-center",
59236
- children: r
59244
+ className: U("mx-auto flex max-w-[1200px] items-center lg:justify-center", e === "dark" ? "min-h-14" : "min-h-16"),
59245
+ children: n
59237
59246
  }), /* @__PURE__ */ L(sd, {
59238
- "aria-label": a || "Close",
59239
- className: "absolute end-5 top-5",
59240
- variant: o,
59247
+ "aria-label": i || "Close",
59248
+ className: U("absolute end-5", e === "dark" ? "top-4" : "top-5"),
59249
+ variant: a,
59241
59250
  size: "small",
59242
- onClick: f
59251
+ onClick: d
59243
59252
  })]
59244
59253
  });
59245
59254
  }, kTe = ({ title: e, backgroundColor: t, bgImageDesktop: n, bgImageMobile: r, className: i, ...a }) => /* @__PURE__ */ R("div", {
@@ -60619,41 +60628,35 @@ var TEe = Object.assign(J7, {
60619
60628
  }, e.id))
60620
60629
  ]
60621
60630
  });
60622
- }, Y7 = "is-promo-banner-hidden", jEe = ({ contextLabel: e, closeAriaLabel: t, cssBackgroundColor: n, thumbnail: r, cta: i, linkAs: a = "a", description: o, forceShow: s, ...c }) => /* @__PURE__ */ L(k7, {
60623
- variant: "black",
60624
- cssBackgroundColor: n,
60631
+ }, Y7 = "is-promo-banner-hidden", jEe = ({ contextLabel: e, closeAriaLabel: t, cta: n, linkAs: r = "a", description: i, forceShow: a, ...o }) => /* @__PURE__ */ L(k7, {
60632
+ variant: "dark",
60625
60633
  isHiddenSessionKey: Y7,
60626
60634
  closeLabel: t,
60627
60635
  closeButtonVariant: "borderless-on-dark",
60628
- forceShow: s,
60629
- ...c,
60636
+ forceShow: a,
60637
+ ...o,
60630
60638
  children: /* @__PURE__ */ R("div", {
60631
- className: "flex flex-wrap items-center gap-x-4 gap-y-2 py-4",
60632
- children: [e && /* @__PURE__ */ L("div", {
60633
- className: "component-semi-strong-500 shrink-0",
60634
- children: e
60635
- }), /* @__PURE__ */ R("div", {
60636
- className: "flex flex-wrap items-center gap-x-4 gap-y-2",
60637
- children: [/* @__PURE__ */ R("div", {
60638
- className: "flex items-center gap-2",
60639
- children: [r && /* @__PURE__ */ L("div", {
60640
- className: "relative size-8 shrink-0 overflow-hidden rounded",
60641
- children: r
60642
- }), /* @__PURE__ */ L("span", {
60643
- className: "component-light-500 [&_a]:underline [&>p]:inline",
60644
- children: o
60645
- })]
60646
- }), i && /* @__PURE__ */ L(td, {
60647
- as: a,
60648
- href: i.href,
60639
+ className: "flex flex-col items-start gap-3 py-4 lg:flex-row lg:items-center lg:gap-4 lg:py-3",
60640
+ children: [
60641
+ e && /* @__PURE__ */ R("div", {
60642
+ className: "component-semi-strong-500 flex shrink-0 items-center gap-2.5",
60643
+ children: [/* @__PURE__ */ L("span", { className: "from-brand-blue to-brand-purple size-2.5 shrink-0 rounded-full bg-linear-to-r" }), e]
60644
+ }),
60645
+ /* @__PURE__ */ L("span", {
60646
+ className: "component-light-500 [&_a]:underline [&>p]:inline",
60647
+ children: i
60648
+ }),
60649
+ n && /* @__PURE__ */ L(td, {
60650
+ as: r,
60651
+ href: n.href,
60649
60652
  variant: "secondary-on-dark",
60650
60653
  size: "medium",
60651
60654
  density: "compact",
60652
60655
  className: "shrink-0",
60653
- ...i.extraAttrs,
60654
- children: i.label
60655
- })]
60656
- })]
60656
+ ...n.extraAttrs,
60657
+ children: n.label
60658
+ })
60659
+ ]
60657
60660
  })
60658
60661
  }), MEe = ({ title: e, visualElement: t, largeVisualAsset: n, widget: r, widgetLabel: i, background: a = "neutral-50", bgColor: o, ...s }) => /* @__PURE__ */ L(h7, {
60659
60662
  as: "div",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@photoroom/ui",
3
- "version": "0.1.772",
3
+ "version": "0.1.774",
4
4
  "private": false,
5
5
  "description": "Photoroom design system components",
6
6
  "sideEffects": [