@photoroom/ui 0.1.466 → 0.1.468

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.
@@ -28,10 +28,17 @@ export type ValidationBannerProps = Readonly<{
28
28
  inputValue?: string;
29
29
  onInputChange?: (value: string) => void;
30
30
  inputPlaceholder?: string;
31
+ /** Focus the input as soon as it mounts — e.g. when revealed by a toggle. */
32
+ inputAutoFocus?: boolean;
33
+ /**
34
+ * Render the input value in a muted tone, to signal it is a prefilled
35
+ * suggestion (e.g. an AI-generated prompt) the user can overwrite.
36
+ */
37
+ inputMuted?: boolean;
31
38
  "data-testid"?: string;
32
39
  }> & React.RefAttributes<HTMLButtonElement>;
33
40
  export declare const ValidationBanner: {
34
- ({ title, description, loading, disabled, onClick, onClose, preview, previewLabel, icon, variant, secondaryTitle, onSecondaryClick, secondaryVariant, secondaryDisabled, secondaryPlacement, inputValue, onInputChange, inputPlaceholder, "data-testid": dataTestId, ref, }: ValidationBannerProps): React.JSX.Element;
41
+ ({ title, description, loading, disabled, onClick, onClose, preview, previewLabel, icon, variant, secondaryTitle, onSecondaryClick, secondaryVariant, secondaryDisabled, secondaryPlacement, inputValue, onInputChange, inputPlaceholder, inputAutoFocus, inputMuted, "data-testid": dataTestId, ref, }: ValidationBannerProps): React.JSX.Element;
35
42
  displayName: string;
36
43
  };
37
44
  //# sourceMappingURL=ValidationBanner.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ValidationBanner.d.ts","sourceRoot":"","sources":["../../../../src/components/action/ValidationBanner/ValidationBanner.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,EAAU,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAEvD,MAAM,MAAM,qBAAqB,GAAG,QAAQ,CAAC;IAC3C,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC9B,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,OAAO,CAAC,EAAE,KAAK,CAAC,iBAAiB,CAAC;IAClC,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,OAAO,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,IAAI,CAAC,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;IAC3B,OAAO,CAAC,EAAE,WAAW,CAAC,SAAS,CAAC,CAAC;IACjC;;;OAGG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,gBAAgB,CAAC,EAAE,KAAK,CAAC,iBAAiB,CAAC;IAC3C,gBAAgB,CAAC,EAAE,WAAW,CAAC,SAAS,CAAC,CAAC;IAC1C,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,oEAAoE;IACpE,kBAAkB,CAAC,EAAE,OAAO,GAAG,OAAO,CAAC;IACvC;;;OAGG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACxC,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB,CAAC,GACA,KAAK,CAAC,aAAa,CAAC,iBAAiB,CAAC,CAAC;AAEzC,eAAO,MAAM,gBAAgB;iRAqB1B,qBAAqB;;CAgFvB,CAAC"}
1
+ {"version":3,"file":"ValidationBanner.d.ts","sourceRoot":"","sources":["../../../../src/components/action/ValidationBanner/ValidationBanner.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,EAAU,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAEvD,MAAM,MAAM,qBAAqB,GAAG,QAAQ,CAAC;IAC3C,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC9B,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,OAAO,CAAC,EAAE,KAAK,CAAC,iBAAiB,CAAC;IAClC,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,OAAO,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,IAAI,CAAC,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;IAC3B,OAAO,CAAC,EAAE,WAAW,CAAC,SAAS,CAAC,CAAC;IACjC;;;OAGG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,gBAAgB,CAAC,EAAE,KAAK,CAAC,iBAAiB,CAAC;IAC3C,gBAAgB,CAAC,EAAE,WAAW,CAAC,SAAS,CAAC,CAAC;IAC1C,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,oEAAoE;IACpE,kBAAkB,CAAC,EAAE,OAAO,GAAG,OAAO,CAAC;IACvC;;;OAGG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACxC,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,6EAA6E;IAC7E,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB;;;OAGG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB,CAAC,GACA,KAAK,CAAC,aAAa,CAAC,iBAAiB,CAAC,CAAC;AAEzC,eAAO,MAAM,gBAAgB;6SAuB1B,qBAAqB;;CAkFvB,CAAC"}
package/index.mjs CHANGED
@@ -21397,20 +21397,20 @@ var Jw = ({ label: e, helper: r, className: i, invalid: a, trailingElement: o, a
21397
21397
  Jw.displayName = "TextArea";
21398
21398
  //#endregion
21399
21399
  //#region src/components/action/ValidationBanner/ValidationBanner.tsx
21400
- var Yw = ({ title: e, description: r, loading: i, disabled: a, onClick: o, onClose: s, preview: c, previewLabel: l, icon: u, variant: d = "primary", secondaryTitle: f, onSecondaryClick: p, secondaryVariant: m = "secondary", secondaryDisabled: h, secondaryPlacement: g = "below", inputValue: v, onInputChange: y, inputPlaceholder: b, "data-testid": x, ref: S }) => {
21401
- let C = v !== void 0, w = /* @__PURE__ */ t(zr, {
21400
+ var Yw = ({ title: e, description: r, loading: i, disabled: a, onClick: o, onClose: s, preview: c, previewLabel: l, icon: u, variant: d = "primary", secondaryTitle: f, onSecondaryClick: p, secondaryVariant: m = "secondary", secondaryDisabled: h, secondaryPlacement: g = "below", inputValue: v, onInputChange: y, inputPlaceholder: b, inputAutoFocus: x, inputMuted: S, "data-testid": C, ref: w }) => {
21401
+ let T = v !== void 0, E = /* @__PURE__ */ t(zr, {
21402
21402
  variant: d,
21403
21403
  density: "regular",
21404
21404
  size: "medium",
21405
21405
  className: "w-full",
21406
- ref: S,
21406
+ ref: w,
21407
21407
  onClick: o,
21408
21408
  disabled: a,
21409
21409
  loading: i,
21410
21410
  icon: u,
21411
- "data-testid": x,
21411
+ "data-testid": C,
21412
21412
  children: e
21413
- }), T = f ? /* @__PURE__ */ t(zr, {
21413
+ }), D = f ? /* @__PURE__ */ t(zr, {
21414
21414
  variant: m,
21415
21415
  density: "regular",
21416
21416
  size: "medium",
@@ -21436,13 +21436,15 @@ var Yw = ({ title: e, description: r, loading: i, disabled: a, onClick: o, onClo
21436
21436
  children: l
21437
21437
  }), c]
21438
21438
  }),
21439
- C && /* @__PURE__ */ t("div", {
21439
+ T && /* @__PURE__ */ t("div", {
21440
21440
  className: "w-full",
21441
21441
  children: /* @__PURE__ */ t(Jw, {
21442
21442
  value: v,
21443
21443
  onChange: (e) => y?.(e.target.value),
21444
21444
  placeholder: b,
21445
21445
  "aria-label": b,
21446
+ autoFocus: x,
21447
+ className: U(S && "text-content-secondary"),
21446
21448
  autosized: !0,
21447
21449
  minRows: 5,
21448
21450
  maxRows: void 0
@@ -21451,9 +21453,9 @@ var Yw = ({ title: e, description: r, loading: i, disabled: a, onClick: o, onClo
21451
21453
  /* @__PURE__ */ n("div", {
21452
21454
  className: "flex w-full flex-col gap-2",
21453
21455
  children: [
21454
- g === "above" && T,
21455
- w,
21456
- g === "below" && T
21456
+ g === "above" && D,
21457
+ E,
21458
+ g === "below" && D
21457
21459
  ]
21458
21460
  }),
21459
21461
  r && /* @__PURE__ */ t("div", {
@@ -34830,7 +34832,7 @@ var RJ = {
34830
34832
  return e instanceof lY ? e : new lY(e);
34831
34833
  };
34832
34834
  //#endregion
34833
- //#region ../../node_modules/.pnpm/react-colorful@5.7.0_react-dom@19.2.7_react@19.2.7__react@19.2.7/node_modules/react-colorful/dist/index.mjs
34835
+ //#region ../../node_modules/.pnpm/react-colorful@5.8.0_react-dom@19.2.7_react@19.2.7__react@19.2.7/node_modules/react-colorful/dist/index.mjs
34834
34836
  function dY() {
34835
34837
  return (dY = Object.assign || function(e) {
34836
34838
  for (var t = 1; t < arguments.length; t++) {
@@ -35120,14 +35122,17 @@ function IY(e, t, n, r) {
35120
35122
  }
35121
35123
  var LY, RY = typeof window < "u" ? Oe : Ce, zY = function() {
35122
35124
  return LY || (typeof __webpack_nonce__ < "u" ? __webpack_nonce__ : void 0);
35123
- }, BY = /* @__PURE__ */ new Map(), VY = function(e) {
35125
+ }, BY = /* @__PURE__ */ new WeakMap(), VY = function(e) {
35124
35126
  RY(function() {
35125
- var t = e.current ? e.current.ownerDocument : document;
35126
- if (t !== void 0 && !BY.has(t)) {
35127
- var n = t.createElement("style");
35128
- n.innerHTML = ".react-colorful{position:relative;display:flex;flex-direction:column;width:200px;height:200px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:default}.react-colorful__saturation{position:relative;flex-grow:1;border-color:transparent;border-bottom:12px solid #000;border-radius:8px 8px 0 0;background-image:linear-gradient(0deg,#000,transparent),linear-gradient(90deg,#fff,hsla(0,0%,100%,0))}.react-colorful__alpha-gradient,.react-colorful__pointer-fill{content:\"\";position:absolute;left:0;top:0;right:0;bottom:0;pointer-events:none;border-radius:inherit}.react-colorful__alpha-gradient,.react-colorful__saturation{box-shadow:inset 0 0 0 1px rgba(0,0,0,.05)}.react-colorful__alpha,.react-colorful__hue{position:relative;height:24px}.react-colorful__hue{background:linear-gradient(90deg,red 0,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red)}.react-colorful__last-control{border-radius:0 0 8px 8px}.react-colorful__interactive{position:absolute;left:0;top:0;right:0;bottom:0;border-radius:inherit;outline:none;touch-action:none}.react-colorful__pointer{position:absolute;z-index:1;box-sizing:border-box;width:28px;height:28px;transform:translate(-50%,-50%);background-color:#fff;border:2px solid #fff;border-radius:50%;box-shadow:0 2px 4px rgba(0,0,0,.2)}.react-colorful__interactive:focus .react-colorful__pointer{transform:translate(-50%,-50%) scale(1.1)}.react-colorful__alpha,.react-colorful__alpha-pointer{background-color:#fff;background-image:url('data:image/svg+xml;charset=utf-8,<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" fill-opacity=\".05\"><path d=\"M8 0h8v8H8zM0 8h8v8H0z\"/></svg>')}.react-colorful__saturation-pointer{z-index:3}.react-colorful__hue-pointer{z-index:2}", BY.set(t, n);
35129
- var r = zY();
35130
- r && n.setAttribute("nonce", r), t.head.appendChild(n);
35127
+ var t = e.current;
35128
+ if (typeof document < "u" && t) {
35129
+ var n = t.getRootNode ? t.getRootNode() : t.ownerDocument, r = n && ("head" in n || "host" in n) ? n : t.ownerDocument;
35130
+ if (!BY.has(r)) {
35131
+ var i = "head" in r ? r.head : r, a = (i.ownerDocument || document).createElement("style");
35132
+ a.innerHTML = ".react-colorful{position:relative;display:flex;flex-direction:column;width:200px;height:200px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:default}.react-colorful__saturation{position:relative;flex-grow:1;border-color:transparent;border-bottom:12px solid #000;border-radius:8px 8px 0 0;background-image:linear-gradient(0deg,#000,transparent),linear-gradient(90deg,#fff,hsla(0,0%,100%,0))}.react-colorful__alpha-gradient,.react-colorful__pointer-fill{content:\"\";position:absolute;left:0;top:0;right:0;bottom:0;pointer-events:none;border-radius:inherit}.react-colorful__alpha-gradient,.react-colorful__saturation{box-shadow:inset 0 0 0 1px rgba(0,0,0,.05)}.react-colorful__alpha,.react-colorful__hue{position:relative;height:24px}.react-colorful__hue{background:linear-gradient(90deg,red 0,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red)}.react-colorful__last-control{border-radius:0 0 8px 8px}.react-colorful__interactive{position:absolute;left:0;top:0;right:0;bottom:0;border-radius:inherit;outline:none;touch-action:none}.react-colorful__pointer{position:absolute;z-index:1;box-sizing:border-box;width:28px;height:28px;transform:translate(-50%,-50%);background-color:#fff;border:2px solid #fff;border-radius:50%;box-shadow:0 2px 4px rgba(0,0,0,.2)}.react-colorful__interactive:focus .react-colorful__pointer{transform:translate(-50%,-50%) scale(1.1)}.react-colorful__alpha,.react-colorful__alpha-pointer{background-color:#fff;background-image:url('data:image/svg+xml;charset=utf-8,<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" fill-opacity=\".05\"><path d=\"M8 0h8v8H8zM0 8h8v8H0z\"/></svg>')}.react-colorful__saturation-pointer{z-index:3}.react-colorful__hue-pointer{z-index:2}";
35133
+ var o = zY();
35134
+ o && a.setAttribute("nonce", o), BY.set(r, a), i.appendChild(a);
35135
+ }
35131
35136
  }
35132
35137
  }, []);
35133
35138
  }, HY = function(e) {
@@ -54588,7 +54593,7 @@ var Wxe = ({ rank: e, category: r }) => /* @__PURE__ */ n("div", {
54588
54593
  className: "absolute inset-0",
54589
54594
  children: [o, /* @__PURE__ */ t("div", { className: "bg-black-alpha-7 absolute inset-0" })]
54590
54595
  }), /* @__PURE__ */ n("div", {
54591
- className: "relative mx-auto flex w-full max-w-300 flex-col gap-8 lg:flex-row lg:items-center lg:gap-6",
54596
+ className: "relative z-10 mx-auto flex w-full max-w-300 flex-col gap-8 lg:flex-row lg:items-center lg:gap-6",
54592
54597
  children: [/* @__PURE__ */ t("div", {
54593
54598
  className: "flex flex-col gap-8 lg:flex-1 lg:justify-center",
54594
54599
  children: /* @__PURE__ */ n("div", {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@photoroom/ui",
3
- "version": "0.1.466",
3
+ "version": "0.1.468",
4
4
  "private": false,
5
5
  "description": "Photoroom design system components",
6
6
  "sideEffects": [
@@ -64,7 +64,7 @@
64
64
  "fuse.js": "7.5.0",
65
65
  "lodash-es": "4.18.1",
66
66
  "motion": "12.42.0",
67
- "react-colorful": "5.7.0",
67
+ "react-colorful": "5.8.0",
68
68
  "react-device-detect": "2.2.3",
69
69
  "react-intersection-observer": "10.1.0",
70
70
  "react-moveable": "0.56.0",