@balikjs/mobile 0.1.22 → 0.1.23

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,34 +1,34 @@
1
1
  import { createComponent as s, mergeProps as g, memo as b, insert as h, effect as v, className as C, template as y, delegateEvents as I } from "solid-js/web";
2
- import { splitProps as P, mergeProps as z, createSignal as $, on as k, onCleanup as w } from "solid-js";
3
- import { X as N, Search as S } from "lucide-solid";
4
- import { Input as _ } from "../Input/Input.js";
2
+ import { splitProps as P, mergeProps as z, createSignal as $, createEffect as k, on as w, onCleanup as N } from "solid-js";
3
+ import { X as S, Search as _ } from "lucide-solid";
4
+ import { Input as x } from "../Input/Input.js";
5
5
  import { bem as a } from "../utils/bem.js";
6
6
  import { cn as o } from "../utils/cn.js";
7
7
  import i from "./SearchInput.module.css.js";
8
- var x = /* @__PURE__ */ y('<button type=button aria-label="Clear search">');
8
+ var E = /* @__PURE__ */ y('<button type=button aria-label="Clear search">');
9
9
  const K = {
10
10
  variant: "outline",
11
11
  size: "md",
12
12
  disabled: !1,
13
13
  debounce: 300
14
14
  };
15
- function O(c) {
15
+ function U(c) {
16
16
  const [e, m] = P(z(K, c), ["variant", "size", "class", "inputClassName", "onKeywordChange", "debounce", "disabled", "placeholder", "onInput"]), [u, l] = $("");
17
17
  let n;
18
- k(u, (t) => {
18
+ k(w(u, (t) => {
19
19
  const r = setTimeout(() => {
20
20
  var p;
21
21
  (p = e.onKeywordChange) == null || p.call(e, t);
22
22
  }, e.debounce);
23
- w(() => clearTimeout(r));
24
- });
23
+ N(() => clearTimeout(r));
24
+ }));
25
25
  const d = (t) => {
26
26
  var r;
27
27
  l(t.target.value), (r = e.onInput) == null || r.call(e, t);
28
28
  }, f = () => {
29
29
  l(""), n && (n.value = "", n.focus());
30
30
  };
31
- return s(_, g({
31
+ return s(x, g({
32
32
  ref(t) {
33
33
  var r = n;
34
34
  typeof r == "function" ? r(t) : n = t;
@@ -55,7 +55,7 @@ function O(c) {
55
55
  },
56
56
  onInput: d,
57
57
  get prefix() {
58
- return s(S, {
58
+ return s(_, {
59
59
  "aria-hidden": "true",
60
60
  get class() {
61
61
  return o(a(), i.icon);
@@ -64,13 +64,13 @@ function O(c) {
64
64
  },
65
65
  get suffix() {
66
66
  return b(() => !!(u() && !e.disabled))() ? (() => {
67
- var t = x();
68
- return t.$$click = f, h(t, s(N, {})), v(() => C(t, o(a(), i.clear))), t;
67
+ var t = E();
68
+ return t.$$click = f, h(t, s(S, {})), v(() => C(t, o(a(), i.clear))), t;
69
69
  })() : null;
70
70
  }
71
71
  }, m));
72
72
  }
73
73
  I(["click"]);
74
74
  export {
75
- O as SearchInput
75
+ U as SearchInput
76
76
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@balikjs/mobile",
3
- "version": "0.1.22",
3
+ "version": "0.1.23",
4
4
  "description": "A mobile-first UI component library built on top of Ark UI for Solid.js",
5
5
  "type": "module",
6
6
  "license": "MIT",