@petnow/ui 1.6.8 → 1.6.10

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/dist/index.es.js CHANGED
@@ -14186,21 +14186,23 @@ function yy(n, r) {
14186
14186
  return Fc(n).getFullYear();
14187
14187
  }
14188
14188
  const My = ({ label: n, placeholder: r, value: e, onChange: t, helperText: o }) => {
14189
- const a = (/* @__PURE__ */ new Date()).getFullYear(), i = Array.from({ length: a - 1989 }, (u, d) => 1990 + d), s = ["1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12"], l = xs(({ value: u, onClick: d }, h) => /* @__PURE__ */ R.jsx(
14190
- "button",
14191
- {
14192
- "aria-label": "inputButton",
14193
- type: "button",
14194
- id: n,
14195
- className: "h-[60px] w-full rounded-xl bg-[#F8F8F9] p-4 text-left text-xl placeholder:text-[#C5C8CD] focus:outline-none disabled:opacity-50",
14196
- onClick: d,
14197
- ref: h,
14198
- children: u || /* @__PURE__ */ R.jsx("p", { className: "text-[#C5C8CD]", children: r })
14199
- }
14200
- ));
14189
+ const a = (/* @__PURE__ */ new Date()).getFullYear(), i = Array.from({ length: a - 1989 }, (u, d) => 1990 + d), s = ["1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12"], l = xs(
14190
+ ({ value: u, onClick: d }, h) => /* @__PURE__ */ R.jsx(
14191
+ "button",
14192
+ {
14193
+ "aria-label": "inputButton",
14194
+ type: "button",
14195
+ id: n,
14196
+ className: "h-[60px] w-full rounded-xl bg-[#F8F8F9] p-4 text-left text-xl placeholder:text-[#C5C8CD] focus:outline-none disabled:opacity-50",
14197
+ onClick: d,
14198
+ ref: h,
14199
+ children: u || /* @__PURE__ */ R.jsx("p", { className: "text-[#C5C8CD]", children: r })
14200
+ }
14201
+ )
14202
+ );
14201
14203
  l.displayName = "CustomInput";
14202
14204
  function c(u) {
14203
- var d = u.substring(0, 4), h = u.substring(5, 7), f = u.substring(8, 10);
14205
+ const d = u.substring(0, 4), h = u.substring(5, 7), f = u.substring(8, 10);
14204
14206
  return new Date(Number(d), Number(h) - 1, Number(f));
14205
14207
  }
14206
14208
  return /* @__PURE__ */ R.jsxs("div", { className: "flex flex-col text-deepGray", children: [
@@ -14316,12 +14318,15 @@ const Ty = ({ label: n, placeholder: r, value: e, options: t, onChange: o, disab
14316
14318
  const [l, c] = se("");
14317
14319
  let u;
14318
14320
  const d = (p) => {
14319
- u && clearTimeout(u), o(""), u = setTimeout(async () => {
14321
+ u && clearTimeout(u), u = setTimeout(async () => {
14320
14322
  c(p.target.value);
14321
14323
  }, 200);
14322
14324
  }, h = (p) => {
14323
- o(""), c(p.target.value);
14324
- }, f = l === "" ? t.slice(0, 4) : t.filter((p) => p.name.replace(/ /g, "").includes(l.replace(/ /g, ""))).slice(0, 4);
14325
+ c(p.target.value);
14326
+ }, f = l === "" ? t.slice(0, 4) : t.filter((p) => {
14327
+ var m;
14328
+ return (m = p.name) == null ? void 0 : m.replace(/ /g, "").includes(l.replace(/ /g, ""));
14329
+ }).slice(0, 4);
14325
14330
  return /* @__PURE__ */ R.jsxs("div", { children: [
14326
14331
  /* @__PURE__ */ R.jsx("div", { className: "relative flex flex-col text-deepGray", children: /* @__PURE__ */ R.jsxs(
14327
14332
  mh,
@@ -14339,6 +14344,9 @@ const Ty = ({ label: n, placeholder: r, value: e, options: t, onChange: o, disab
14339
14344
  className: "mt-4 flex w-full items-center justify-between rounded-xl bg-[#F8F8F8] p-4 text-xl placeholder:text-[#C5C8CD] focus:outline-none disabled:opacity-50",
14340
14345
  value: e,
14341
14346
  onChange: s ? h : d,
14347
+ onKeyDown: (p) => {
14348
+ p.key === "Backspace" && o({ name: void 0, value: void 0 });
14349
+ },
14342
14350
  placeholder: r,
14343
14351
  autoComplete: "off"
14344
14352
  }