@photoroom/ui 0.1.768 → 0.1.770

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.
@@ -1,7 +1,10 @@
1
1
  export type StandardDialogFooterProps = Readonly<{
2
2
  actions: React.ReactNode;
3
3
  detail?: React.ReactNode;
4
- /** Takes precedence over `detail`. */
4
+ /**
5
+ * Puts the actions at the start with the footnote below; takes precedence over `detail`.
6
+ * `null` keeps that layout with no footnote, like Figma's "Has footnote" with the text hidden.
7
+ */
5
8
  footnote?: React.ReactNode;
6
9
  className?: string;
7
10
  }>;
@@ -1 +1 @@
1
- {"version":3,"file":"StandardDialogFooter.d.ts","sourceRoot":"","sources":["../../../../src/components/dialog/StandardDialog/StandardDialogFooter.tsx"],"names":[],"mappings":"AAEA,MAAM,MAAM,yBAAyB,GAAG,QAAQ,CAAC;IAC/C,OAAO,EAAE,KAAK,CAAC,SAAS,CAAC;IACzB,MAAM,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACzB,sCAAsC;IACtC,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC,CAAC;AAEH,eAAO,MAAM,oBAAoB,8CAK9B,yBAAyB,gCAgB3B,CAAC"}
1
+ {"version":3,"file":"StandardDialogFooter.d.ts","sourceRoot":"","sources":["../../../../src/components/dialog/StandardDialog/StandardDialogFooter.tsx"],"names":[],"mappings":"AAEA,MAAM,MAAM,yBAAyB,GAAG,QAAQ,CAAC;IAC/C,OAAO,EAAE,KAAK,CAAC,SAAS,CAAC;IACzB,MAAM,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACzB;;;OAGG;IACH,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC,CAAC;AAEH,eAAO,MAAM,oBAAoB,8CAK9B,yBAAyB,gCAgB3B,CAAC"}
@@ -8,7 +8,7 @@ export type ColorPickerProps = Readonly<{
8
8
  /** Extra classes for the popover content -- e.g. raising z-index above a floating parent. */
9
9
  popoverClassName?: string;
10
10
  onChange: (newColor: string) => void;
11
- /** Fires when a drag or arrow-key change on the color area or hue slider ends. */
11
+ /** Fires when a drag or arrow-key change on the color area or hue slider ends, or a value is typed. */
12
12
  onChangeEnd?: () => void;
13
13
  onConfirm?: (newColor?: string) => void;
14
14
  onOpenChange?: (open: boolean) => void;
@@ -1 +1 @@
1
- {"version":3,"file":"ColorPicker.d.ts","sourceRoot":"","sources":["../../../../src/components/editor/ColorPicker/ColorPicker.tsx"],"names":[],"mappings":"AACA,OAAO,EAAW,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAKlE,YAAY,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAE/C,MAAM,MAAM,gBAAgB,GAAG,QAAQ,CACrC;IACE,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,6FAA6F;IAC7F,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,QAAQ,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAC;IACrC,kFAAkF;IAClF,WAAW,CAAC,EAAE,MAAM,IAAI,CAAC;IACzB,SAAS,CAAC,EAAE,CAAC,QAAQ,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;IACxC,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IACvC,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB,GAAG,IAAI,CAAC,YAAY,EAAE,MAAM,GAAG,OAAO,GAAG,YAAY,GAAG,aAAa,GAAG,kBAAkB,CAAC,CAC7F,CAAC;AAEF,eAAO,MAAM,WAAW,kLAgBrB,gBAAgB,gCA4BlB,CAAC"}
1
+ {"version":3,"file":"ColorPicker.d.ts","sourceRoot":"","sources":["../../../../src/components/editor/ColorPicker/ColorPicker.tsx"],"names":[],"mappings":"AACA,OAAO,EAAW,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAKlE,YAAY,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAE/C,MAAM,MAAM,gBAAgB,GAAG,QAAQ,CACrC;IACE,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,6FAA6F;IAC7F,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,QAAQ,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAC;IACrC,uGAAuG;IACvG,WAAW,CAAC,EAAE,MAAM,IAAI,CAAC;IACzB,SAAS,CAAC,EAAE,CAAC,QAAQ,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;IACxC,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IACvC,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB,GAAG,IAAI,CAAC,YAAY,EAAE,MAAM,GAAG,OAAO,GAAG,YAAY,GAAG,aAAa,GAAG,kBAAkB,CAAC,CAC7F,CAAC;AAEF,eAAO,MAAM,WAAW,kLAgBrB,gBAAgB,gCA4BlB,CAAC"}
@@ -1,7 +1,7 @@
1
1
  export type InlineColorPickerProps = Readonly<{
2
2
  color: string;
3
3
  onChange: (newColor: string) => void;
4
- /** Fires when a drag or arrow-key change on the color area or hue slider ends. */
4
+ /** Fires when a drag or arrow-key change on the color area or hue slider ends, or a value is typed. */
5
5
  onChangeEnd?: () => void;
6
6
  onConfirm?: (newColor?: string) => void;
7
7
  initialMode?: "hex" | "rgb" | "hsl";
@@ -1 +1 @@
1
- {"version":3,"file":"InlineColorPicker.d.ts","sourceRoot":"","sources":["../../../../../src/components/editor/ColorPicker/InlineColorPicker/InlineColorPicker.tsx"],"names":[],"mappings":"AAuBA,MAAM,MAAM,sBAAsB,GAAG,QAAQ,CAAC;IAC5C,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAC;IACrC,kFAAkF;IAClF,WAAW,CAAC,EAAE,MAAM,IAAI,CAAC;IACzB,SAAS,CAAC,EAAE,CAAC,QAAQ,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;IACxC,WAAW,CAAC,EAAE,KAAK,GAAG,KAAK,GAAG,KAAK,CAAC;IACpC,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC,CAAC;AAEH,eAAO,MAAM,iBAAiB,+GAU3B,sBAAsB,gCAuExB,CAAC"}
1
+ {"version":3,"file":"InlineColorPicker.d.ts","sourceRoot":"","sources":["../../../../../src/components/editor/ColorPicker/InlineColorPicker/InlineColorPicker.tsx"],"names":[],"mappings":"AAuBA,MAAM,MAAM,sBAAsB,GAAG,QAAQ,CAAC;IAC5C,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAC;IACrC,uGAAuG;IACvG,WAAW,CAAC,EAAE,MAAM,IAAI,CAAC;IACzB,SAAS,CAAC,EAAE,CAAC,QAAQ,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;IACxC,WAAW,CAAC,EAAE,KAAK,GAAG,KAAK,GAAG,KAAK,CAAC;IACpC,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC,CAAC;AAEH,eAAO,MAAM,iBAAiB,+GAU3B,sBAAsB,gCAwExB,CAAC"}
package/index.mjs CHANGED
@@ -36793,16 +36793,7 @@ var SJ = ({ "aria-label": e = "Close", ...t }) => /* @__PURE__ */ L(sJ, {
36793
36793
  Root: () => Hq,
36794
36794
  Title: () => iJ,
36795
36795
  Trigger: () => Wq
36796
- }), EJ = ({ actions: e, detail: t, footnote: n, className: r }) => n ? /* @__PURE__ */ R("div", {
36797
- className: W("flex w-full flex-col gap-3", r),
36798
- children: [/* @__PURE__ */ L("div", {
36799
- className: "flex items-center gap-2",
36800
- children: e
36801
- }), /* @__PURE__ */ L("div", {
36802
- className: "component-400 text-content-secondary",
36803
- children: n
36804
- })]
36805
- }) : /* @__PURE__ */ R("div", {
36796
+ }), EJ = ({ actions: e, detail: t, footnote: n, className: r }) => n === void 0 ? /* @__PURE__ */ R("div", {
36806
36797
  className: W("flex w-full items-center gap-2", r),
36807
36798
  children: [t && /* @__PURE__ */ L("div", {
36808
36799
  className: "component-500 text-content-tertiary",
@@ -36811,6 +36802,15 @@ var SJ = ({ "aria-label": e = "Close", ...t }) => /* @__PURE__ */ L(sJ, {
36811
36802
  className: "flex flex-1 items-center justify-end gap-2",
36812
36803
  children: e
36813
36804
  })]
36805
+ }) : /* @__PURE__ */ R("div", {
36806
+ className: W("flex w-full flex-col gap-3", r),
36807
+ children: [/* @__PURE__ */ L("div", {
36808
+ className: "flex items-center gap-2",
36809
+ children: e
36810
+ }), n && /* @__PURE__ */ L("div", {
36811
+ className: "component-400 text-content-secondary",
36812
+ children: n
36813
+ })]
36814
36814
  }), DJ = ({ open: e, defaultOpen: t, onOpenChange: n, trigger: r, title: i, subtitle: a, footer: o, hideCloseButton: s = !1, closeButtonLabel: c, onEscapeKeyDown: l, onPointerDownOutside: u, onOpenAutoFocus: d, onCloseAutoFocus: f, className: p, testId: m, children: h }) => /* @__PURE__ */ R(Hq, {
36815
36815
  open: e,
36816
36816
  defaultOpen: t,
@@ -38903,8 +38903,8 @@ var Qme = ({ color: e, onChange: t, label: n }) => {
38903
38903
  }
38904
38904
  ], gX = ({ color: e, onChange: t, onChangeEnd: n, onConfirm: r, initialMode: i = "hex", inputLabel: a, selectLabel: o, buttonLabel: s, className: c }) => {
38905
38905
  let [l, u] = Ne(i), d = V((e) => {
38906
- t(GY(e).toHex());
38907
- }, [t]), f = Me(() => GY(e).toHex(), [e]);
38906
+ t(GY(e).toHex()), n?.();
38907
+ }, [t, n]), f = Me(() => GY(e).toHex(), [e]);
38908
38908
  return /* @__PURE__ */ R("div", {
38909
38909
  className: W("misc-color-picker", "flex flex-col gap-3", c),
38910
38910
  children: [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@photoroom/ui",
3
- "version": "0.1.768",
3
+ "version": "0.1.770",
4
4
  "private": false,
5
5
  "description": "Photoroom design system components",
6
6
  "sideEffects": [