@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,
|
|
46982
|
-
let
|
|
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 &&
|
|
46985
|
-
|
|
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-[
|
|
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 ||
|
|
46990
|
+
n || p.current?.focus();
|
|
46991
46991
|
},
|
|
46992
|
-
children: [
|
|
46993
|
-
|
|
46994
|
-
|
|
46995
|
-
|
|
46996
|
-
|
|
46997
|
-
|
|
46998
|
-
|
|
46999
|
-
|
|
47000
|
-
|
|
47001
|
-
|
|
47002
|
-
|
|
47003
|
-
|
|
47004
|
-
|
|
47005
|
-
|
|
47006
|
-
|
|
47007
|
-
|
|
47008
|
-
|
|
47009
|
-
|
|
47010
|
-
|
|
47011
|
-
|
|
47012
|
-
|
|
47013
|
-
|
|
47014
|
-
|
|
47015
|
-
|
|
47016
|
-
|
|
47017
|
-
|
|
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";
|