@photoroom/ui 0.1.395 → 0.1.397

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
@@ -50600,7 +50600,7 @@ var x5 = ({ variant: e = "default", label: r, isActive: i, activeIcon: a, icon:
50600
50600
  className: U("flex w-full flex-row items-center gap-3 py-[10px] pe-3", "group-focus-visible:ring-misc-focus-indicator group-focus-visible:misc-border-size-focus-ring group-disabled:opacity-30", "rounded-500 cursor-pointer outline-hidden transition duration-200", {
50601
50601
  "text-content-primary": !i && e === "default",
50602
50602
  "text-content-positive": !i && e === "positive",
50603
- "hover:bg-background-subdued-hover active:bg-background-subdued-down group-focus-visible:bg-background-subdued-hover bg-transparent": !i,
50603
+ "hover:bg-background-borderless-subdued-hover active:bg-background-borderless-subdued-down group-focus-visible:bg-background-borderless-subdued-hover bg-transparent": !i,
50604
50604
  "bg-background-subdued text-content-primary": i,
50605
50605
  "ps-[10px]": s,
50606
50606
  "ps-3": !s
@@ -50849,7 +50849,7 @@ A5.displayName = "ToolMenuButton";
50849
50849
  var j5 = ({ size: e = "default", label: r, showProBadge: i, icon: a, className: o, ref: s, ...c }) => /* @__PURE__ */ n("button", {
50850
50850
  ref: s,
50851
50851
  type: "button",
50852
- className: U("relative shrink-0", "flex flex-col items-center justify-center gap-0.5", "size-h-700 px-2", "rounded-500 outline-hidden", "whitespace-nowrap", "hover:bg-background-subdued-hover focus-visible:bg-background-subdued-hover active:bg-background-subdued-down", "focus-visible:ring-misc-focus-indicator focus-visible:misc-border-size-focus-ring", "transition-colors", {
50852
+ className: U("relative shrink-0", "flex flex-col items-center justify-center gap-0.5", "size-h-700 px-2", "rounded-500 outline-hidden", "whitespace-nowrap", "hover:bg-background-borderless-subdued-hover focus-visible:bg-background-borderless-subdued-hover active:bg-background-borderless-subdued-down", "focus-visible:ring-misc-focus-indicator focus-visible:misc-border-size-focus-ring", "transition-colors", {
50853
50853
  "aspect-square": e === "small",
50854
50854
  "min-w-[80px]": e === "default"
50855
50855
  }, o),
@@ -50968,39 +50968,23 @@ var $ve = G([
50968
50968
  "relative cursor-pointer select-none",
50969
50969
  "inline-flex flex-row items-center gap-2",
50970
50970
  "w-full px-4 py-3",
50971
- "rounded-500 border outline-hidden",
50971
+ "rounded-500 outline-hidden",
50972
50972
  "has-focus-visible:ring-misc-focus-indicator has-focus-visible:misc-border-size-focus-ring",
50973
50973
  "transition-all"
50974
50974
  ], {
50975
- variants: {
50976
- variant: {
50977
- filled: "bg-background-subdued border-transparent",
50978
- outlined: "border-hairline-emphasized bg-transparent"
50979
- },
50980
- selected: {
50981
- true: "border-content-primary",
50982
- false: ""
50983
- }
50984
- },
50985
- compoundVariants: [{
50986
- variant: "filled",
50987
- selected: !1,
50988
- class: "has-active:bg-background-subdued-down hover:bg-background-subdued-hover has-focus-visible:bg-background-subdued-hover"
50989
- }, {
50990
- variant: "outlined",
50991
- selected: !1,
50992
- class: "has-active:border-content-secondary hover:border-content-tertiary has-focus-visible:border-content-tertiary"
50993
- }],
50994
- defaultVariants: {
50995
- variant: "filled",
50996
- selected: !1
50997
- }
50998
- }), I5 = ({ label: e, icon: r, description: i, variant: a, selected: o, className: s, children: c, ...l }) => /* @__PURE__ */ n("label", {
50999
- ...l,
51000
- className: W($ve({
51001
- variant: a,
51002
- selected: o
51003
- }), s),
50975
+ variants: { selected: {
50976
+ true: "shadow-[inset_0_0_0_2px_var(--color-content-primary)]",
50977
+ false: [
50978
+ "shadow-[inset_0_0_0_1px_var(--color-misc-border)]",
50979
+ "hover:shadow-[inset_0_0_0_1px_var(--color-misc-border-hover)]",
50980
+ "has-focus-visible:shadow-[inset_0_0_0_1px_var(--color-misc-border-hover)]",
50981
+ "has-active:shadow-[inset_0_0_0_1px_var(--color-misc-border-down)]"
50982
+ ]
50983
+ } },
50984
+ defaultVariants: { selected: !1 }
50985
+ }), I5 = ({ label: e, icon: r, description: i, selected: a, className: o, children: s, ...c }) => /* @__PURE__ */ n("label", {
50986
+ ...c,
50987
+ className: W($ve({ selected: a }), o),
51004
50988
  children: [/* @__PURE__ */ n("span", {
51005
50989
  className: "flex grow flex-col text-start",
51006
50990
  children: [/* @__PURE__ */ n("span", {
@@ -51010,23 +50994,27 @@ var $ve = G([
51010
50994
  className: "component-400 text-content-secondary truncate",
51011
50995
  children: i
51012
50996
  })]
51013
- }), c]
50997
+ }), s]
51014
50998
  }), L5 = ({ label: e, icon: r, description: i, className: a, children: o, onToggleCb: s, ref: c, ...l }) => {
51015
- let { checkboxProps: u } = cz(), d = u(l), [f, p] = B.useState(!1), m = (e) => {
50999
+ let { groupValue: u, checkboxProps: d } = cz(), f = d(l), [p, m] = B.useState(!1), [h, g] = B.useState(f.defaultChecked === !0), _ = (f.checked ?? u?.includes(l.value) ?? h) === !0, v = (e) => {
51016
51000
  e.preventDefault();
51017
51001
  };
51018
51002
  return /* @__PURE__ */ n(I5, {
51019
51003
  label: e,
51020
51004
  icon: r,
51021
51005
  description: i,
51006
+ selected: _,
51022
51007
  className: W(a, "flex flex-wrap"),
51023
51008
  children: [/* @__PURE__ */ t("div", { children: /* @__PURE__ */ t(N4, {
51024
- ...d,
51009
+ ...f,
51010
+ onCheckedChange: (e) => {
51011
+ g(e === !0), f.onCheckedChange?.(e);
51012
+ },
51025
51013
  ref: c,
51026
51014
  "aria-label": e,
51027
51015
  className: "group inline-flex shrink-0 appearance-none outline-hidden",
51028
51016
  onClick: () => {
51029
- p(!f), s?.(f);
51017
+ m(!p), s?.(p);
51030
51018
  },
51031
51019
  children: /* @__PURE__ */ t(F4, {
51032
51020
  asChild: !0,
@@ -51034,9 +51022,9 @@ var $ve = G([
51034
51022
  children: /* @__PURE__ */ t(n3, { variant: "square" })
51035
51023
  })
51036
51024
  }) }), /* @__PURE__ */ t("div", {
51037
- className: U("basis-full", f ? "flex" : "hidden"),
51025
+ className: U("basis-full", p ? "flex" : "hidden"),
51038
51026
  onClick: (e) => {
51039
- m(e);
51027
+ v(e);
51040
51028
  },
51041
51029
  children: o
51042
51030
  })]
@@ -51046,14 +51034,18 @@ L5.displayName = "ListChoiceMultipleExpandTile";
51046
51034
  //#endregion
51047
51035
  //#region src/components/onboarding/ChoiceGroup/ChoiceMultiple/ListChoiceMultipleTile.tsx
51048
51036
  var R5 = ({ label: e, icon: n, description: r, className: i, ref: a, ...o }) => {
51049
- let { checkboxProps: s } = cz();
51037
+ let { groupValue: s, checkboxProps: c } = cz(), l = c(o), [u, d] = je(l.defaultChecked === !0);
51050
51038
  return /* @__PURE__ */ t(I5, {
51051
51039
  label: e,
51052
51040
  icon: n,
51053
51041
  description: r,
51042
+ selected: (l.checked ?? s?.includes(o.value) ?? u) === !0,
51054
51043
  className: i,
51055
51044
  children: /* @__PURE__ */ t(N4, {
51056
- ...s(o),
51045
+ ...l,
51046
+ onCheckedChange: (e) => {
51047
+ d(e === !0), l.onCheckedChange?.(e);
51048
+ },
51057
51049
  ref: a,
51058
51050
  "aria-label": e,
51059
51051
  className: "group inline-flex shrink-0 appearance-none outline-hidden",
@@ -51094,7 +51086,12 @@ var eye = G([
51094
51086
  ], {
51095
51087
  variants: { selected: {
51096
51088
  true: "shadow-[inset_0_0_0_2px_var(--color-content-primary)]",
51097
- false: ["shadow-[inset_0_0_0_0.5px_var(--color-misc-hairline-emphasized)]", "has-active:bg-background-borderless-subdued-down hover:bg-background-borderless-subdued-hover has-focus-visible:bg-background-borderless-subdued-hover"]
51089
+ false: [
51090
+ "shadow-[inset_0_0_0_1px_var(--color-misc-border)]",
51091
+ "hover:shadow-[inset_0_0_0_1px_var(--color-misc-border-hover)]",
51092
+ "has-focus-visible:shadow-[inset_0_0_0_1px_var(--color-misc-border-hover)]",
51093
+ "has-active:shadow-[inset_0_0_0_1px_var(--color-misc-border-down)]"
51094
+ ]
51098
51095
  } },
51099
51096
  defaultVariants: { selected: !1 }
51100
51097
  }), tye = ({ label: e, icon: r, selected: i, className: a, children: o, ...s }) => /* @__PURE__ */ n("label", {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@photoroom/ui",
3
- "version": "0.1.395",
3
+ "version": "0.1.397",
4
4
  "private": false,
5
5
  "description": "Photoroom design system components",
6
6
  "sideEffects": [
package/theme.css CHANGED
@@ -270,6 +270,13 @@
270
270
  --radius-450: 9px;
271
271
  --radius-500: 10px;
272
272
  --radius-600: 12px;
273
+ /*
274
+ * Concentric rounding — inner radius of a padded element inside a rounded
275
+ * container: reference radius minus the padding (name: <reference>-<padding>),
276
+ * so nested corners stay visually parallel.
277
+ * https://www.figma.com/design/cHgANa7dtzDDGXk7dKuAOQ/Prism?node-id=74340-16292
278
+ */
279
+ --radius-concentric-500-4px: calc(var(--radius-500) - 4px);
273
280
  --radius-area-500: 18px;
274
281
  --radius-area-600: 34px;
275
282
  --radius-full: 9999px;