@photoroom/ui 0.1.248 → 0.1.249

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
@@ -46978,44 +46978,52 @@ var pfe = typeof window < "u" ? y : h, mfe = function(e) {
46978
46978
  U4.displayName = "TextAreaAutosize";
46979
46979
  //#endregion
46980
46980
  //#region src/components/input/CanvasInput/CanvasInput.tsx
46981
- var W4 = ({ value: e, buttonLabel: t, disabled: n = !1, loading: r = !1, autoFocus: i = !1, placeholder: a, className: o, onChange: s, onSubmit: c, onKeyDown: l, onFocus: u, ...d }) => {
46982
- let f = S(null);
46981
+ var W4 = ({ value: e, buttonLabel: t, disabled: n = !1, loading: r = !1, autoFocus: i = !1, placeholder: a, className: o, trailingAction: s, onChange: c, onSubmit: l, onKeyDown: u, onFocus: d, ...f }) => {
46982
+ let p = S(null);
46983
46983
  return hfe(() => {
46984
- i && f.current && setTimeout(() => {
46985
- f.current?.focus();
46984
+ i && p.current && setTimeout(() => {
46985
+ p.current?.focus();
46986
46986
  }, 0);
46987
46987
  }), /* @__PURE__ */ D("div", {
46988
- className: V("rounded-area-500 bg-surface-high box-border flex w-[320px] items-center gap-2 py-2 ps-3 pe-2", "border-misc-border-box border transition duration-200", "hover:border-neutral-400", "focus-within:border-content-accent focus-within:ring-misc-focus-indicator-subdued focus-within:misc-border-size-focus-ring", n && "cursor-not-allowed opacity-30"),
46988
+ className: V("rounded-area-500 bg-surface-high box-border flex w-[440px] items-center gap-2 py-2 ps-3 pe-2", "border-misc-border-box border transition duration-200", "hover:border-neutral-400", "focus-within:border-content-accent focus-within:ring-misc-focus-indicator-subdued focus-within:misc-border-size-focus-ring", n && "cursor-not-allowed opacity-30"),
46989
46989
  onClick: () => {
46990
- n || f.current?.focus();
46990
+ n || p.current?.focus();
46991
46991
  },
46992
- children: [/* @__PURE__ */ E(U4, {
46993
- ref: f,
46994
- value: e,
46995
- disabled: n,
46996
- placeholder: a,
46997
- onChange: s,
46998
- onKeyDown: l,
46999
- onFocus: u,
47000
- className: V("flex-1 resize-none bg-transparent p-0", "text-content-primary placeholder:text-content-tertiary text-sm", "caret-content-secondary", "overflow-y-auto", o),
47001
- style: {
47002
- border: "none",
47003
- outline: "none",
47004
- boxShadow: "none"
47005
- },
47006
- minRows: 1,
47007
- maxRows: 3,
47008
- ...d
47009
- }), /* @__PURE__ */ E(Dr, {
47010
- onClick: c,
47011
- disabled: n || !e.trim(),
47012
- loading: r,
47013
- className: "h-10 w-10 shrink-0 self-end",
47014
- icon: N,
47015
- density: "compact",
47016
- variant: "accent",
47017
- "aria-label": t
47018
- })]
46992
+ children: [
46993
+ /* @__PURE__ */ E(U4, {
46994
+ ref: p,
46995
+ value: e,
46996
+ disabled: n,
46997
+ placeholder: a,
46998
+ onChange: c,
46999
+ onKeyDown: u,
47000
+ onFocus: d,
47001
+ className: V("flex-1 resize-none bg-transparent p-0", "text-content-primary placeholder:text-content-tertiary text-sm", "caret-content-secondary", "overflow-y-auto", o),
47002
+ style: {
47003
+ border: "none",
47004
+ outline: "none",
47005
+ boxShadow: "none"
47006
+ },
47007
+ minRows: 1,
47008
+ maxRows: 3,
47009
+ ...f
47010
+ }),
47011
+ s && /* @__PURE__ */ E("div", {
47012
+ className: "flex h-10 shrink-0 items-center self-end",
47013
+ onClick: (e) => e.stopPropagation(),
47014
+ children: s
47015
+ }),
47016
+ /* @__PURE__ */ E(Dr, {
47017
+ onClick: l,
47018
+ disabled: n || !e.trim(),
47019
+ loading: r,
47020
+ className: "h-10 w-10 shrink-0 self-end",
47021
+ icon: N,
47022
+ density: "compact",
47023
+ variant: "accent",
47024
+ "aria-label": t
47025
+ })
47026
+ ]
47019
47027
  });
47020
47028
  };
47021
47029
  W4.displayName = "CanvasInput";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@photoroom/ui",
3
- "version": "0.1.248",
3
+ "version": "0.1.249",
4
4
  "private": false,
5
5
  "description": "Photoroom design system components",
6
6
  "sideEffects": [