@lax-wp/design-system 0.3.61 → 0.3.62
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,9 +1,11 @@
|
|
|
1
|
+
import { DebounceInput } from "react-debounce-input";
|
|
1
2
|
import type { LabelType } from "../../data-display/label/Label";
|
|
3
|
+
import type { ComponentProps } from "react";
|
|
2
4
|
/**
|
|
3
5
|
* Props for the DebounceInputField component
|
|
4
6
|
* Drop-in replacement matching the lax-web-portal API
|
|
5
7
|
*/
|
|
6
|
-
export type DebounceInputFieldProps =
|
|
8
|
+
export type DebounceInputFieldProps = ComponentProps<typeof DebounceInput> & {
|
|
7
9
|
/** Current value of the input */
|
|
8
10
|
value: string;
|
|
9
11
|
/** Callback function called when the input value changes (debounced) */
|
package/dist/index.es.js
CHANGED
|
@@ -18522,66 +18522,69 @@ const FC = ({
|
|
|
18522
18522
|
className: u,
|
|
18523
18523
|
isDarkMode: d,
|
|
18524
18524
|
...h
|
|
18525
|
-
}) =>
|
|
18526
|
-
|
|
18527
|
-
|
|
18528
|
-
|
|
18529
|
-
|
|
18530
|
-
|
|
18531
|
-
|
|
18532
|
-
|
|
18533
|
-
|
|
18534
|
-
|
|
18535
|
-
|
|
18536
|
-
|
|
18537
|
-
|
|
18538
|
-
|
|
18539
|
-
|
|
18540
|
-
|
|
18541
|
-
|
|
18542
|
-
{
|
|
18543
|
-
|
|
18544
|
-
|
|
18545
|
-
|
|
18546
|
-
|
|
18547
|
-
|
|
18548
|
-
|
|
18549
|
-
|
|
18550
|
-
|
|
18551
|
-
|
|
18552
|
-
|
|
18553
|
-
|
|
18554
|
-
|
|
18555
|
-
|
|
18556
|
-
|
|
18557
|
-
|
|
18558
|
-
|
|
18559
|
-
|
|
18560
|
-
|
|
18561
|
-
|
|
18562
|
-
|
|
18563
|
-
|
|
18564
|
-
|
|
18565
|
-
|
|
18566
|
-
|
|
18567
|
-
{
|
|
18568
|
-
|
|
18569
|
-
|
|
18570
|
-
|
|
18571
|
-
|
|
18572
|
-
|
|
18573
|
-
|
|
18574
|
-
|
|
18575
|
-
|
|
18576
|
-
|
|
18577
|
-
|
|
18578
|
-
|
|
18579
|
-
|
|
18580
|
-
|
|
18581
|
-
|
|
18582
|
-
|
|
18583
|
-
|
|
18584
|
-
|
|
18525
|
+
}) => {
|
|
18526
|
+
const { inputRef: m, ...p } = h;
|
|
18527
|
+
return /* @__PURE__ */ f.jsxs("div", { className: Z("flex flex-col", u), children: [
|
|
18528
|
+
t && /* @__PURE__ */ f.jsxs(
|
|
18529
|
+
"label",
|
|
18530
|
+
{
|
|
18531
|
+
htmlFor: e,
|
|
18532
|
+
className: "block mb-1 text-xs font-medium leading-[18px] text-neutral-600 dark:text-black-300 font-inter capitalize",
|
|
18533
|
+
children: [
|
|
18534
|
+
/* @__PURE__ */ f.jsxs("div", { className: "inline-flex items-center gap-1", children: [
|
|
18535
|
+
t,
|
|
18536
|
+
i && /* @__PURE__ */ f.jsx(Kt, {})
|
|
18537
|
+
] }),
|
|
18538
|
+
/* @__PURE__ */ f.jsx(Jt, { labels: o })
|
|
18539
|
+
]
|
|
18540
|
+
}
|
|
18541
|
+
),
|
|
18542
|
+
/* @__PURE__ */ f.jsx("label", { className: "relative block h-8", children: /* @__PURE__ */ W0(
|
|
18543
|
+
sd.DebounceInput,
|
|
18544
|
+
{
|
|
18545
|
+
...p,
|
|
18546
|
+
debounceTimeout: c,
|
|
18547
|
+
id: e,
|
|
18548
|
+
key: e,
|
|
18549
|
+
required: i,
|
|
18550
|
+
className: Z(
|
|
18551
|
+
"border",
|
|
18552
|
+
r ? "!border-error-300" : "border-neutral-200 dark:border-black-600",
|
|
18553
|
+
l,
|
|
18554
|
+
s,
|
|
18555
|
+
"dark:bg-black-700 text-neutral-900 dark:text-neutral-100 text-[14px] rounded-md",
|
|
18556
|
+
"focus:outline-none focus:ring-2 focus:ring-primary-500 dark:focus:ring-primary-400",
|
|
18557
|
+
"focus:border-primary-500 dark:focus:border-primary-400",
|
|
18558
|
+
"block w-full h-8 px-3 py-1.5 font-inter font-medium",
|
|
18559
|
+
"disabled:opacity-70 disabled:!bg-neutral-50 dark:disabled:!bg-black-800"
|
|
18560
|
+
),
|
|
18561
|
+
onChange: (g) => {
|
|
18562
|
+
n(g.target.value);
|
|
18563
|
+
},
|
|
18564
|
+
autoComplete: "off"
|
|
18565
|
+
}
|
|
18566
|
+
) }),
|
|
18567
|
+
/* @__PURE__ */ f.jsx(Vt, { children: r && /* @__PURE__ */ f.jsx(
|
|
18568
|
+
kt.div,
|
|
18569
|
+
{
|
|
18570
|
+
initial: { opacity: 0, y: -5 },
|
|
18571
|
+
animate: { opacity: 1, y: 0 },
|
|
18572
|
+
exit: { opacity: 0, y: -5 },
|
|
18573
|
+
transition: { duration: 0.15 },
|
|
18574
|
+
children: /* @__PURE__ */ f.jsx(
|
|
18575
|
+
se,
|
|
18576
|
+
{
|
|
18577
|
+
className: "pt-1 text-error-500",
|
|
18578
|
+
appearance: "custom",
|
|
18579
|
+
size: "extra-small",
|
|
18580
|
+
variant: "medium",
|
|
18581
|
+
children: r
|
|
18582
|
+
}
|
|
18583
|
+
)
|
|
18584
|
+
}
|
|
18585
|
+
) })
|
|
18586
|
+
] });
|
|
18587
|
+
};
|
|
18585
18588
|
FC.displayName = "DebounceInputField";
|
|
18586
18589
|
const MC = Ue(
|
|
18587
18590
|
({
|