@photoroom/ui 0.1.106 → 0.1.107

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
@@ -46707,53 +46707,53 @@ var z3 = l(({ icon: e, className: t, ...n }, r) => /* @__PURE__ */ T("button", {
46707
46707
  z3.displayName = "ImageWidgetButton";
46708
46708
  //#endregion
46709
46709
  //#region src/components/input/ImageWidget/ImageWidget.tsx
46710
- var B3 = .5, V3 = 2, Rue = 80, zue = 80, H3 = l(({ src: e, alt: t, width: n = zue, height: r = Rue, flexibleWidth: i = !1, fill: a = !1, isLoading: o = !1, buttonIcon: s, onButtonClick: c, buttonLabel: l, className: u, imgClassName: d }, f) => {
46711
- let [m, h] = C(null), g = p((e) => {
46710
+ var B3 = .5, V3 = 2, Rue = 80, zue = 80, H3 = l(({ src: e, alt: t, width: n = zue, height: r = Rue, flexibleWidth: i = !1, fill: a = !1, isLoading: o = !1, selected: s = !1, disabled: c = !1, buttonIcon: l, onButtonClick: u, buttonLabel: d, className: f, imgClassName: m }, h) => {
46711
+ let [g, _] = C(null), v = p((e) => {
46712
46712
  let t = e.currentTarget;
46713
- t.naturalWidth && t.naturalHeight && h(t.naturalWidth / t.naturalHeight);
46714
- }, []), { width: _, height: v, isClamped: y } = b(() => i && m !== null ? {
46715
- width: Math.round(r * Math.min(V3, Math.max(B3, m))),
46713
+ t.naturalWidth && t.naturalHeight && _(t.naturalWidth / t.naturalHeight);
46714
+ }, []), { width: y, height: x, isClamped: S } = b(() => i && g !== null ? {
46715
+ width: Math.round(r * Math.min(V3, Math.max(B3, g))),
46716
46716
  height: r,
46717
- isClamped: m < B3 || m > V3
46717
+ isClamped: g < B3 || g > V3
46718
46718
  } : {
46719
46719
  width: n,
46720
46720
  height: r,
46721
46721
  isClamped: !1
46722
46722
  }, [
46723
46723
  i,
46724
- m,
46724
+ g,
46725
46725
  r,
46726
46726
  n
46727
- ]), x = !o && s && c;
46727
+ ]), w = !o && l && u;
46728
46728
  return /* @__PURE__ */ E("div", {
46729
- ref: f,
46730
- className: H("group", a ? "absolute inset-0" : "relative shrink-0", u),
46729
+ ref: h,
46730
+ className: H("group", a ? "absolute inset-0" : "relative shrink-0", f),
46731
46731
  style: a ? void 0 : {
46732
- width: _,
46733
- height: v
46732
+ width: y,
46733
+ height: x
46734
46734
  },
46735
46735
  children: [/* @__PURE__ */ E("div", {
46736
- className: V("rounded-400 bg-surface-default relative h-full w-full overflow-hidden", "after:rounded-400 after:pointer-events-none after:absolute after:inset-0 after:shadow-[inset_0_0_0_1px_var(--color-misc-border)] after:content-['']"),
46736
+ className: V("rounded-400 bg-surface-default relative h-full w-full overflow-hidden", "after:rounded-400 after:pointer-events-none after:absolute after:inset-0 after:content-['']", s ? "after:shadow-[inset_0_0_0_2px_var(--color-content-accent)]" : "after:shadow-[inset_0_0_0_1px_var(--color-misc-border)]"),
46737
46737
  children: [o ? /* @__PURE__ */ T("div", {
46738
46738
  className: "flex h-full w-full items-center justify-center",
46739
46739
  children: /* @__PURE__ */ T(pG, { className: "size-6" })
46740
46740
  }) : /* @__PURE__ */ T("img", {
46741
46741
  src: e,
46742
46742
  alt: t,
46743
- className: H("h-full w-full", y ? "object-contain" : "object-cover", d),
46744
- onLoad: i ? g : void 0
46745
- }), /* @__PURE__ */ T("div", { className: "rounded-400 interaction-transition group-hover:bg-misc-visual-hover group-active:bg-misc-visual-down absolute inset-0 transition-colors" })]
46746
- }), x && /* @__PURE__ */ T("div", {
46743
+ className: H("h-full w-full", S ? "object-contain" : "object-cover", m),
46744
+ onLoad: i ? v : void 0
46745
+ }), !c && /* @__PURE__ */ T("div", { className: "rounded-400 interaction-transition group-hover:bg-misc-visual-hover group-active:bg-misc-visual-down absolute inset-0 transition-colors" })]
46746
+ }), w && /* @__PURE__ */ T("div", {
46747
46747
  className: "absolute top-1 right-1 opacity-0 transition-opacity group-focus-within:opacity-100 group-hover:opacity-100 focus-within:opacity-100",
46748
46748
  children: /* @__PURE__ */ T(oo, {
46749
- content: l,
46749
+ content: d,
46750
46750
  side: "top",
46751
46751
  children: /* @__PURE__ */ T(z3, {
46752
- icon: s,
46752
+ icon: l,
46753
46753
  onClick: (e) => {
46754
- e.stopPropagation(), c();
46754
+ e.stopPropagation(), u();
46755
46755
  },
46756
- "aria-label": l
46756
+ "aria-label": d
46757
46757
  })
46758
46758
  })
46759
46759
  })]
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@photoroom/ui",
3
- "version": "0.1.106",
3
+ "version": "0.1.107",
4
4
  "private": false,
5
5
  "description": "Photoroom design system components",
6
6
  "sideEffects": [