@konstructio/ui 0.1.2-alpha.23 → 0.1.2-alpha.25

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,42 +1,48 @@
1
- import { jsx as t, jsxs as p } from "react/jsx-runtime";
2
- import { forwardRef as n } from "react";
3
- import { DropdownProvider as c } from "./contexts/dropdown.provider.js";
4
- import { Wrapper as x } from "./components/Wrapper.js";
5
- const N = n(
1
+ import { jsx as s, jsxs as w } from "react/jsx-runtime";
2
+ import { forwardRef as h } from "react";
3
+ import { cn as o } from "../../utils/index.js";
4
+ import { DropdownProvider as v } from "./contexts/dropdown.provider.js";
5
+ import { Wrapper as N } from "./components/Wrapper.js";
6
+ const W = h(
6
7
  ({
7
- onChange: r,
8
- onBlur: l,
9
- value: a,
10
- error: s,
11
- helperText: e,
12
- name: o,
13
- highlightSearch: i,
14
- ...d
15
- }, m) => /* @__PURE__ */ t(
16
- c,
8
+ error: t,
9
+ errorClassName: i,
10
+ helperText: r,
11
+ helperTextClassName: m,
12
+ highlightSearch: a,
13
+ mainWrapperClassName: p,
14
+ name: l,
15
+ value: d,
16
+ options: n,
17
+ onChange: c,
18
+ onBlur: e,
19
+ ...f
20
+ }, x) => /* @__PURE__ */ s(
21
+ v,
17
22
  {
18
- highlightSearch: i,
19
- name: o,
20
- value: a,
21
- onBlur: l,
22
- onChange: r,
23
- children: /* @__PURE__ */ p("div", { className: "relative w-full", children: [
24
- /* @__PURE__ */ t(
25
- x,
23
+ highlightSearch: a,
24
+ name: l,
25
+ value: d,
26
+ options: n,
27
+ onBlur: e,
28
+ onChange: c,
29
+ children: /* @__PURE__ */ w("div", { className: o("relative w-full", p), children: [
30
+ /* @__PURE__ */ s(
31
+ N,
26
32
  {
27
- name: o,
28
- error: s,
29
- ref: m,
30
- onBlur: l,
31
- ...d
33
+ error: t,
34
+ name: l,
35
+ ref: x,
36
+ onBlur: e,
37
+ ...f
32
38
  }
33
39
  ),
34
- s ? /* @__PURE__ */ t("span", { className: "text-xs text-red-700", children: s }) : null,
35
- !s && e ? /* @__PURE__ */ t("span", { className: "text-xs text-slate-600", children: e }) : null
40
+ t ? /* @__PURE__ */ s("span", { className: o("text-xs text-red-700", i), children: t }) : null,
41
+ !t && r ? /* @__PURE__ */ s("span", { className: o("text-xs text-slate-600", m), children: r }) : null
36
42
  ] })
37
43
  }
38
44
  )
39
45
  );
40
46
  export {
41
- N as Dropdown
47
+ W as Dropdown
42
48
  };
@@ -1,83 +1,137 @@
1
- import { jsx as l, jsxs as w, Fragment as N } from "react/jsx-runtime";
2
- import { forwardRef as y, useRef as j, useImperativeHandle as C } from "react";
3
- import { cn as t } from "../../../../utils/index.js";
4
- import { useNavigationUlList as O } from "../../hooks/useNavigationList.js";
5
- import { ListItem as i } from "../ListItem/ListItem.js";
6
- import { listVariants as D } from "./List.variants.js";
7
- import { S as E } from "../../../../index-BtQfgaSF.js";
8
- import { useDropdownContext as F } from "../../contexts/dropdown.hook.js";
9
- const I = y(
1
+ import { jsxs as H, jsx as o } from "react/jsx-runtime";
2
+ import { S as V } from "../../../../index-BtQfgaSF.js";
3
+ import { d as Z } from "../../../../debounce-BFejQm9P.js";
4
+ import { forwardRef as B, useRef as w, useState as G, useImperativeHandle as J, useMemo as K, useEffect as M } from "react";
5
+ import { Loading as Q } from "../../../Loading/Loading.js";
6
+ import { cn as a } from "../../../../utils/index.js";
7
+ import { useNavigationUlList as R } from "../../hooks/useNavigationList.js";
8
+ import { ListItem as v } from "../ListItem/ListItem.js";
9
+ import { listVariants as W } from "./List.variants.js";
10
+ import { DEFAULT_LIST_SIZE as X } from "../../constants/pagination.js";
11
+ import { useDropdownContext as Y } from "../../contexts/dropdown.hook.js";
12
+ const ue = B(
10
13
  ({
11
- additionalOptions: p,
12
- className: u,
13
- inputRef: r,
14
- isLoading: d,
15
- itemClassName: s,
16
- name: g,
17
- options: c,
18
- searchable: m = !1,
19
- listItemSecondRowClassName: a,
20
- wrapperInputRef: b,
21
- wrapperRef: h
22
- }, v) => {
23
- const o = j(null), { isOpen: L, searchTerm: x } = F();
24
- C(v, () => o.current, [o]), O({
25
- ulRef: o,
26
- wrapperRef: h,
27
- wrapperInputRef: b,
28
- inputRef: r,
29
- searchable: m
14
+ additionalOptions: k,
15
+ className: C,
16
+ inputRef: i,
17
+ isLoading: F,
18
+ itemClassName: l,
19
+ name: N,
20
+ searchable: b = !1,
21
+ listItemSecondRowClassName: c,
22
+ wrapperInputRef: I,
23
+ isInfiniteScrollEnabled: u,
24
+ onFetchMoreOptions: f
25
+ }, O) => {
26
+ const s = w(null), m = w(null), [p, L] = G(!1), {
27
+ isOpen: T,
28
+ searchTerm: g,
29
+ canFilter: j,
30
+ canContinueFetching: n,
31
+ page: E,
32
+ options: x,
33
+ isTyping: y,
34
+ setOptions: P,
35
+ setPage: S,
36
+ setCanContinueFetching: D
37
+ } = Y();
38
+ J(O, () => s.current, [s]);
39
+ const d = b && j ? x.filter((e) => {
40
+ const t = g.toLowerCase();
41
+ return (typeof e.label == "string" ? e.label.toLowerCase() : "").includes(t);
42
+ }) : x;
43
+ R({
44
+ ulRef: s,
45
+ wrapperInputRef: I,
46
+ searchable: b,
47
+ filteredOptions: d
30
48
  });
31
- const f = m ? c.filter((e) => {
32
- const n = x.toLowerCase();
33
- return (typeof e.label == "string" ? e.label.toLowerCase() : "").includes(n);
34
- }) : c, k = f.length === 0;
35
- return /* @__PURE__ */ l(
49
+ const U = d.filter(
50
+ (e, t, r) => t === r.findIndex((h) => h.value === e.value)
51
+ ), _ = d.length === 0, q = K(
52
+ () => Z(async (e) => {
53
+ const [t] = e;
54
+ if (t.isIntersecting && !p && f && n)
55
+ try {
56
+ L(!0);
57
+ const r = E + 1, { data: h, hasMore: z } = await f({
58
+ page: r,
59
+ pageSize: X,
60
+ termOfSearch: g
61
+ });
62
+ S(r), D(z), P((A) => [...A, ...h]);
63
+ } catch {
64
+ console.error("Error fetching more options");
65
+ } finally {
66
+ L(!1);
67
+ }
68
+ }, 100),
69
+ [p, f, g]
70
+ );
71
+ return M(() => {
72
+ if (u && n && m.current && !y) {
73
+ const e = new IntersectionObserver(q, {
74
+ threshold: 0.1
75
+ });
76
+ return e.observe(m.current), () => e.disconnect();
77
+ }
78
+ }, [u, n, p, y]), /* @__PURE__ */ H(
36
79
  "ul",
37
80
  {
38
- ref: o,
39
- title: g,
81
+ ref: s,
82
+ title: N,
40
83
  role: "listbox",
41
- className: t(D({ className: u })),
42
- "data-state": L ? "open" : "closed",
43
- children: d ? /* @__PURE__ */ l(
44
- i,
45
- {
46
- className: t("select-none", s),
47
- isClickable: !1,
48
- inputRef: r,
49
- value: "Loading...",
50
- label: "Loading...",
51
- listItemSecondRowClassName: a
52
- }
53
- ) : k ? /* @__PURE__ */ l(
54
- i,
55
- {
56
- className: t("select-none", s),
57
- isClickable: !1,
58
- inputRef: r,
59
- value: "No options",
60
- label: "No options",
61
- listItemSecondRowClassName: a
62
- }
63
- ) : /* @__PURE__ */ w(N, { children: [
64
- f.map((e) => /* @__PURE__ */ l(
65
- i,
84
+ className: a(W({ className: C })),
85
+ "data-state": T ? "open" : "closed",
86
+ children: [
87
+ F ? /* @__PURE__ */ o(
88
+ v,
89
+ {
90
+ className: a("select-none", l),
91
+ isClickable: !1,
92
+ inputRef: i,
93
+ value: "Loading...",
94
+ label: "Loading...",
95
+ listItemSecondRowClassName: c
96
+ }
97
+ ) : _ ? /* @__PURE__ */ o(
98
+ v,
66
99
  {
67
- className: t("select-none", s),
100
+ className: a("select-none", l),
101
+ isClickable: !1,
102
+ inputRef: i,
103
+ value: "No options",
104
+ label: "No options",
105
+ listItemSecondRowClassName: c
106
+ }
107
+ ) : U.map((e) => /* @__PURE__ */ o(
108
+ v,
109
+ {
110
+ className: a("select-none", l),
68
111
  isClickable: !0,
69
- inputRef: r,
70
- listItemSecondRowClassName: a,
112
+ inputRef: i,
113
+ listItemSecondRowClassName: c,
71
114
  ...e
72
115
  },
73
116
  e.value
74
117
  )),
75
- p?.map((e, n) => /* @__PURE__ */ l("li", { role: "option", "data-action": "true", children: /* @__PURE__ */ l(E, { className: "flex p-2 w-full h-full gap-1 items-center text-sm [&>svg]:w-3.5 [&>svg]:h-3.5 [&>svg]:shrink-0 cursor-pointer select-none hover:bg-gray-50 hover:dark:bg-slate-700 focus:outline-0", children: e }) }, n))
76
- ] })
118
+ u && n && /* @__PURE__ */ o(
119
+ "li",
120
+ {
121
+ ref: m,
122
+ role: "option",
123
+ "data-action": "true",
124
+ className: "flex items-center justify-center py-3",
125
+ onClick: (e) => e.stopPropagation(),
126
+ children: /* @__PURE__ */ o(Q, { className: "w-4 h-4 text-aurora-500 select-none" })
127
+ }
128
+ ),
129
+ k?.map((e, t) => /* @__PURE__ */ o("li", { role: "option", "data-action": "true", children: /* @__PURE__ */ o(V, { className: "flex p-2 w-full h-full gap-1 items-center text-sm [&>svg]:w-3.5 [&>svg]:h-3.5 [&>svg]:shrink-0 cursor-pointer select-none hover:bg-gray-50 hover:dark:bg-slate-700 focus:outline-0", children: e }) }, t))
130
+ ]
77
131
  }
78
132
  );
79
133
  }
80
134
  );
81
135
  export {
82
- I as List
136
+ ue as List
83
137
  };
@@ -1,89 +1,93 @@
1
- import { jsx as l, jsxs as d } from "react/jsx-runtime";
2
- import { useRef as w, useCallback as o } from "react";
3
- import { Typography as C } from "../../../Typography/Typography.js";
4
- import { cn as i } from "../../../../utils/index.js";
5
- import { listItemVariants as L } from "./ListItem.variants.js";
6
- import { useDropdownContext as I } from "../../contexts/dropdown.hook.js";
7
- const K = ({
8
- isClickable: p,
9
- className: h,
10
- inputRef: b,
11
- listItemSecondRowClassName: x,
1
+ import { jsxs as g, jsx as l } from "react/jsx-runtime";
2
+ import { useRef as y, useCallback as m } from "react";
3
+ import { Typography as w } from "../../../Typography/Typography.js";
4
+ import { cn as f } from "../../../../utils/index.js";
5
+ import { listItemVariants as C } from "./ListItem.variants.js";
6
+ import { useDropdownContext as L } from "../../contexts/dropdown.hook.js";
7
+ function I(r, n) {
8
+ const o = n.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), c = new RegExp(`(${o})`, "gi");
9
+ return r.split(c).map((t, a) => t.toLowerCase() === n.toLowerCase() ? /* @__PURE__ */ l(
10
+ "mark",
11
+ {
12
+ className: "bg-transparent font-semibold text-slate-800 dark:text-slate-50",
13
+ children: t
14
+ },
15
+ a
16
+ ) : /* @__PURE__ */ l("span", { children: t }, a));
17
+ }
18
+ const $ = ({
19
+ isClickable: r,
20
+ className: n,
21
+ inputRef: o,
22
+ listItemSecondRowClassName: c,
12
23
  ...t
13
24
  }) => {
14
- const { searchTerm: a, highlightSearchEnabled: c, setValue: m, toggleOpen: f } = I(), g = w(null), n = o(
25
+ const { searchTerm: a, highlightSearchEnabled: d, setValue: h, toggleOpen: u } = L(), p = y(null), i = m(
15
26
  (e) => {
16
- m(e.value, b), f(!1);
27
+ h(e.value, o), u(!1);
17
28
  },
18
- [m, f]
19
- ), u = o(
20
- (e, r) => {
21
- e.key === "Enter" && (e.stopPropagation(), n(r));
29
+ [h, u]
30
+ ), x = m(
31
+ (e, s) => {
32
+ e.key === "Enter" && (e.stopPropagation(), i(s));
22
33
  },
23
- [n]
24
- ), k = o(
25
- (e, r) => {
34
+ [i]
35
+ ), b = m(
36
+ (e, s) => {
26
37
  if (typeof e != "string")
27
38
  return e;
28
- const y = c && a.length > 0 ? e.split(new RegExp(`(${a})`, "gi")).map((s) => s.toLowerCase() === a.toLowerCase() ? /* @__PURE__ */ l(
29
- "mark",
30
- {
31
- className: "bg-transparent font-semibold text-slate-800 dark:text-slate-50",
32
- children: s
33
- },
34
- s
35
- ) : s) : [e];
36
- return /* @__PURE__ */ d(
37
- C,
39
+ const k = d && a.length > 0 ? I(e, a) : [e];
40
+ return /* @__PURE__ */ g(
41
+ w,
38
42
  {
39
43
  variant: "body2",
40
44
  className: "text-zinc-700 dark:text-slate-50 font-medium",
41
45
  children: [
42
- y,
43
- r ? /* @__PURE__ */ l(
46
+ k,
47
+ s ? /* @__PURE__ */ l(
44
48
  "span",
45
49
  {
46
- className: i(
50
+ className: f(
47
51
  "block font-normal text-sm text-slate-800 dark:text-slate-50",
48
- x
52
+ c
49
53
  ),
50
- children: r
54
+ children: s
51
55
  }
52
56
  ) : null
53
57
  ]
54
58
  }
55
59
  );
56
60
  },
57
- [c, a]
61
+ [d, a]
58
62
  );
59
- return /* @__PURE__ */ d(
63
+ return /* @__PURE__ */ g(
60
64
  "li",
61
65
  {
62
- ref: g,
66
+ ref: p,
63
67
  role: "option",
64
68
  "data-action": "false",
65
- className: i(L({ className: h })),
69
+ className: f(C({ className: n })),
66
70
  tabIndex: 0,
67
71
  onClick: (e) => {
68
- p && (n(t), e.stopPropagation());
72
+ r && (i(t), e.stopPropagation());
69
73
  },
70
- onKeyDown: (e) => u(e, t),
74
+ onKeyDown: (e) => x(e, t),
71
75
  children: [
72
76
  t.leftIcon ? /* @__PURE__ */ l(
73
77
  "span",
74
78
  {
75
- className: i("w-4 h-4 flex justify-center", {
79
+ className: f("w-4 h-4 flex justify-center", {
76
80
  "items-center": !t.subLabel,
77
81
  "items-baseline -translate-y-2": !!t.subLabel
78
82
  }),
79
83
  children: t.leftIcon
80
84
  }
81
85
  ) : null,
82
- k(t.label, t.subLabel)
86
+ b(t.label, t.subLabel)
83
87
  ]
84
88
  }
85
89
  );
86
90
  };
87
91
  export {
88
- K as ListItem
92
+ $ as ListItem
89
93
  };
@@ -1,162 +1,160 @@
1
- import { jsxs as h, jsx as a } from "react/jsx-runtime";
2
- import { forwardRef as X, useId as Y, useRef as T, useImperativeHandle as Z, useMemo as B, useEffect as L } from "react";
3
- import { Loading as ee } from "../../Loading/Loading.js";
4
- import { Typography as te } from "../../Typography/Typography.js";
5
- import { cn as c } from "../../../utils/index.js";
6
- import { labelVariants as ae, inputVariants as re, dropdownVariants as ne } from "../Dropdown.variants.js";
7
- import { useDropdown as oe } from "../hooks/useDropdown.js";
8
- import { List as le } from "./List/List.js";
1
+ import { jsxs as m, jsx as t } from "react/jsx-runtime";
2
+ import { forwardRef as Y, useId as Z, useRef as C, useMemo as ee, useImperativeHandle as te, useEffect as ae } from "react";
3
+ import { Loading as re } from "../../Loading/Loading.js";
4
+ import { Typography as ne } from "../../Typography/Typography.js";
5
+ import { cn as s } from "../../../utils/index.js";
6
+ import { labelVariants as oe, inputVariants as se, dropdownVariants as le } from "../Dropdown.variants.js";
7
+ import { useDropdown as ce } from "../hooks/useDropdown.js";
8
+ import { List as ie } from "./List/List.js";
9
9
  import { c as V } from "../../../createLucideIcon-D4r5Phnh.js";
10
- import { useDropdownContext as se } from "../contexts/dropdown.hook.js";
11
- const ce = [["path", { d: "m18 15-6-6-6 6", key: "153udz" }]], ie = V("chevron-up", ce);
12
- const ue = [
10
+ import { useDropdownContext as pe } from "../contexts/dropdown.hook.js";
11
+ const ue = [["path", { d: "m18 15-6-6-6 6", key: "153udz" }]], de = V("chevron-up", ue);
12
+ const fe = [
13
13
  ["path", { d: "m21 21-4.34-4.34", key: "14j7rj" }],
14
14
  ["circle", { cx: "11", cy: "11", r: "8", key: "4ej97u" }]
15
- ], fe = V("search", ue), ge = X(
15
+ ], me = V("search", fe), ze = Y(
16
16
  ({
17
- additionalOptions: _,
18
- className: $,
19
- defaultValue: v,
20
- disabled: r = !1,
21
- error: m,
22
- iconClassName: D,
23
- inputClassName: F,
24
- isLoading: z,
25
- isRequired: w,
26
- label: N,
27
- labelClassName: M,
28
- listClassName: A,
29
- listItemClassName: H,
30
- listItemSecondRowClassName: P,
31
- name: i,
32
- options: o,
33
- placeholder: k,
34
- searchable: C = !1,
35
- onSearchChange: U,
36
- showSearchIcon: g,
37
- theme: W,
38
- wrapperClassName: q,
39
- onBlur: j,
17
+ additionalOptions: R,
18
+ className: _,
19
+ defaultValue: x,
20
+ disabled: a = !1,
21
+ error: u,
22
+ iconClassName: F,
23
+ inputClassName: O,
24
+ isLoading: y,
25
+ isRequired: h,
26
+ label: v,
27
+ labelClassName: T,
28
+ listClassName: $,
29
+ listItemClassName: D,
30
+ listItemSecondRowClassName: E,
31
+ name: d,
32
+ placeholder: N,
33
+ searchable: g = !1,
34
+ showSearchIcon: w,
35
+ theme: M,
36
+ wrapperClassName: W,
37
+ isInfiniteScrollEnabled: H = !1,
38
+ onFetchMoreOptions: P,
39
+ onBlur: U,
40
+ onSearchChange: q,
40
41
  ...I
41
- }, G) => {
42
- const b = Y(), t = T(null), E = T(null), { wrapperRef: u, wrapperInputRef: O, handleOpen: y } = oe({
43
- ulRef: E,
44
- inputRef: t,
45
- disabled: r
46
- }), { isOpen: p, searchTerm: J, value: l, toggleOpen: K, setValue: x, setSearchTerm: R } = se(), f = i ? `${b}-${i}` : b;
47
- Z(G, () => t.current, [t]);
48
- const n = B(() => o.find(({ value: e }) => e === l), [o, l]);
49
- L(() => {
50
- t.current && (t.current.value = l && n?.value || "");
51
- }, [n, l]), L(() => {
52
- if (v && !l) {
53
- const e = o && o.find((s) => s.value === v);
54
- e && x(e.value);
42
+ }, A) => {
43
+ const z = Z(), l = C(null), L = C(null), B = C(0), {
44
+ isOpen: f,
45
+ searchTerm: G,
46
+ value: o,
47
+ options: n,
48
+ setValue: c,
49
+ setSearchTerm: J,
50
+ setCanFilter: K
51
+ } = pe(), e = ee(() => n.find(({ value: r }) => r === o), [n, o]), { wrapperRef: Q, wrapperInputRef: j, handleOpen: k } = ce({
52
+ ulRef: L,
53
+ inputRef: l,
54
+ disabled: a,
55
+ internalValue: e,
56
+ onBlur: U
57
+ }), i = d ? `${z}-${d}` : z;
58
+ te(A, () => l.current, [l]), ae(() => {
59
+ if (x && !o) {
60
+ const r = n && n.find((p) => p.value === x);
61
+ r && c(r.value);
55
62
  }
56
- }, [v, o, x, l]), L(() => {
57
- const e = new AbortController();
58
- return u.current?.addEventListener("focusout", (s) => {
59
- const d = s.relatedTarget;
60
- (!d || !u.current?.contains(d)) && (t.current?.value || j?.());
61
- }), () => {
62
- e.abort();
63
- };
64
- }, [K, u, R, j, l]);
65
- const Q = (e) => {
66
- const s = e.target.value;
67
- U?.(s), x(""), R(s || "");
68
- const d = o.find(
69
- (S) => S.value.toLocaleLowerCase() === s.toLocaleLowerCase()
63
+ }, [x, n, c, o]);
64
+ const S = (r) => {
65
+ const p = r.target.value;
66
+ K(!0), c(""), J(p ?? ""), q?.(p);
67
+ const b = n.find(
68
+ (X) => X.value.toLocaleLowerCase() === p.toLocaleLowerCase()
70
69
  );
71
- d && x(d.value);
70
+ c(b ? b.value : e?.value ?? "");
72
71
  };
73
- return /* @__PURE__ */ h(
72
+ return /* @__PURE__ */ m(
74
73
  "div",
75
74
  {
76
- ref: u,
77
- className: c("flex flex-col w-full relative", q),
78
- "data-theme": W,
75
+ ref: Q,
76
+ className: s("flex flex-col w-full relative", W),
77
+ "data-theme": M,
79
78
  children: [
80
- N ? /* @__PURE__ */ h(
79
+ v ? /* @__PURE__ */ m(
81
80
  "label",
82
81
  {
83
- id: f,
84
- className: c(ae({ className: M })),
85
- htmlFor: f,
86
- onClick: () => !r && y(),
82
+ id: i,
83
+ className: s(oe({ className: T })),
84
+ htmlFor: i,
85
+ onClick: () => !a && k(),
87
86
  children: [
88
- N,
89
- w && /* @__PURE__ */ a("span", { className: "text-red-600 ml-1", children: "*" })
87
+ v,
88
+ h && /* @__PURE__ */ t("span", { className: "text-red-600 ml-1", children: "*" })
90
89
  ]
91
90
  }
92
91
  ) : null,
93
- /* @__PURE__ */ h(
92
+ /* @__PURE__ */ m(
94
93
  "div",
95
94
  {
96
- ref: O,
97
- id: f,
98
- className: c(
99
- ne({ className: $, hasError: !!m, disabled: r })
95
+ ref: j,
96
+ id: i,
97
+ className: s(
98
+ le({ className: _, hasError: !!u, disabled: a })
100
99
  ),
101
100
  role: "combobox",
102
- onClick: () => !r && y(),
103
- "aria-expanded": p,
104
- tabIndex: 0,
105
- "aria-labelledby": f,
101
+ onClick: () => !a && k(),
102
+ "aria-expanded": f,
103
+ tabIndex: B.current,
104
+ "aria-labelledby": i,
106
105
  children: [
107
- /* @__PURE__ */ h("div", { className: "flex gap-2.5 items-center flex-1", children: [
108
- n?.leftIcon && !g && /* @__PURE__ */ a("span", { className: "w-4 h-4 flex justify-center items-center dark:text-slate-50", children: n.leftIcon }),
109
- g && /* @__PURE__ */ a(fe, { className: "w-4 h-4 text-zinc-500 select-none dark:text-slate-300 dark:group-focus-within:text-slate-50 transition-colors duration-300" }),
110
- C ? /* @__PURE__ */ a(
106
+ /* @__PURE__ */ m("div", { className: "flex gap-2.5 items-center flex-1", children: [
107
+ e?.leftIcon && !w && /* @__PURE__ */ t("span", { className: "w-4 h-4 flex justify-center items-center dark:text-slate-50", children: e.leftIcon }),
108
+ w && /* @__PURE__ */ t(me, { className: "w-4 h-4 text-zinc-500 select-none dark:text-slate-300 dark:group-focus-within:text-slate-50 transition-colors duration-300" }),
109
+ g ? /* @__PURE__ */ t(
111
110
  "input",
112
111
  {
113
- ref: t,
114
112
  type: "text",
115
- value: p ? J : n?.label || "",
116
- name: i,
117
- onChange: Q,
118
- placeholder: k,
119
- className: c(re({ className: F }), {
120
- "text-red-700 placeholder:text-red-700": !!m
113
+ value: f ? G : e?.label ?? o ?? "",
114
+ onChange: S,
115
+ placeholder: N,
116
+ className: s(se({ className: O }), {
117
+ "text-red-700 placeholder:text-red-700": !!u
121
118
  }),
122
- onClick: (e) => {
123
- e.stopPropagation(), r || y();
119
+ onClick: (r) => {
120
+ r.stopPropagation(), a || k();
124
121
  },
125
- "aria-label": N || k,
126
- "aria-labelledby": f,
127
- required: w,
122
+ "aria-label": v || N,
123
+ "aria-labelledby": i,
124
+ required: h,
128
125
  autoComplete: "off",
129
126
  autoCapitalize: "words",
130
- disabled: r,
127
+ disabled: a,
128
+ tabIndex: -1,
131
129
  ...I
132
130
  }
133
- ) : /* @__PURE__ */ a(
134
- te,
131
+ ) : /* @__PURE__ */ t(
132
+ ne,
135
133
  {
136
134
  variant: "body2",
137
- className: c(
135
+ className: s(
138
136
  "flex-1 text-zinc-400 text-sm dark:text-slate-400",
139
137
  {
140
- "text-red-700": !!m,
141
- "select-none": !n,
142
- "text-slate-800 dark:text-slate-50": n,
143
- "text-slate-400/50 dark:text-slate-50/50": r
138
+ "text-red-700": !!u,
139
+ "select-none": !e,
140
+ "text-slate-800 dark:text-slate-50": e,
141
+ "text-slate-400/50 dark:text-slate-50/50": a
144
142
  }
145
143
  ),
146
- children: n?.label || k
144
+ children: e?.label || N
147
145
  }
148
146
  )
149
147
  ] }),
150
- z ? /* @__PURE__ */ a(ee, { className: "w-4 h-4 text-zinc-500 select-none" }) : !g && /* @__PURE__ */ a(
151
- ie,
148
+ y ? /* @__PURE__ */ t(re, { className: "w-4 h-4 text-zinc-500 select-none" }) : !w && /* @__PURE__ */ t(
149
+ de,
152
150
  {
153
- "data-state": p ? "open" : "closed",
154
- className: c(
151
+ "data-state": f ? "open" : "closed",
152
+ className: s(
155
153
  "w-4 h-4 text-zinc-500 transition-all duration-100 data-[state=open]:rotate-0 data-[state=closed]:rotate-180 select-none dark:group-focus-within:text-slate-50",
156
- D,
154
+ F,
157
155
  {
158
- "text-red-700": !!m,
159
- "text-slate-400/50 dark:group-focus-within:text-zinc-500": r
156
+ "text-red-700": !!u,
157
+ "text-slate-400/50 dark:group-focus-within:text-zinc-500": a
160
158
  }
161
159
  )
162
160
  }
@@ -164,34 +162,36 @@ const ue = [
164
162
  ]
165
163
  }
166
164
  ),
167
- !C && /* @__PURE__ */ a(
165
+ /* @__PURE__ */ t(
168
166
  "input",
169
167
  {
170
- ref: t,
168
+ ref: l,
171
169
  type: "text",
172
- name: i,
170
+ name: d,
173
171
  className: "hidden",
174
172
  "aria-hidden": "true",
175
- required: w,
173
+ required: h,
176
174
  inert: !0,
175
+ defaultValue: e?.value ?? o ?? void 0,
177
176
  ...I
178
177
  }
179
178
  ),
180
- p && /* @__PURE__ */ a(
181
- le,
179
+ f && /* @__PURE__ */ t(
180
+ ie,
182
181
  {
183
- ref: E,
184
- additionalOptions: _,
185
- className: A,
186
- itemClassName: H,
187
- name: i,
188
- wrapperRef: u,
189
- wrapperInputRef: O,
190
- inputRef: t,
191
- options: o,
192
- isLoading: !!z,
193
- searchable: C,
194
- listItemSecondRowClassName: P
182
+ ref: L,
183
+ additionalOptions: R,
184
+ className: $,
185
+ itemClassName: D,
186
+ name: d,
187
+ wrapperInputRef: j,
188
+ inputRef: l,
189
+ options: n,
190
+ isLoading: !!y,
191
+ searchable: g,
192
+ listItemSecondRowClassName: E,
193
+ isInfiniteScrollEnabled: H,
194
+ onFetchMoreOptions: P
195
195
  }
196
196
  )
197
197
  ]
@@ -200,5 +200,5 @@ const ue = [
200
200
  }
201
201
  );
202
202
  export {
203
- ge as Wrapper
203
+ ze as Wrapper
204
204
  };
@@ -0,0 +1,4 @@
1
+ import { DEFAULT_LIST_SIZE as E } from "./pagination.js";
2
+ export {
3
+ E as DEFAULT_LIST_SIZE
4
+ };
@@ -0,0 +1,4 @@
1
+ const o = 10;
2
+ export {
3
+ o as DEFAULT_LIST_SIZE
4
+ };
@@ -4,6 +4,23 @@ const t = e({
4
4
  isOpen: !1,
5
5
  searchTerm: "",
6
6
  value: void 0,
7
+ canFilter: !0,
8
+ canContinueFetching: !0,
9
+ page: 1,
10
+ options: [],
11
+ isTyping: !1,
12
+ setOptions() {
13
+ throw new Error("setOptions function must be overridden");
14
+ },
15
+ setPage() {
16
+ throw new Error("setPage function must be overridden");
17
+ },
18
+ setCanContinueFetching() {
19
+ throw new Error("setCanContinueFetching function must be overridden");
20
+ },
21
+ setCanFilter() {
22
+ throw new Error("setCanFilter function must be overridden");
23
+ },
7
24
  setSearchTerm() {
8
25
  throw new Error("setSearchTerm function must be overridden");
9
26
  },
@@ -1,30 +1,58 @@
1
- import { jsx as f } from "react/jsx-runtime";
2
- import { useRef as p, useState as d, useCallback as v } from "react";
3
- import { DropdownContext as S } from "./dropdown.context.js";
4
- import { useToggle as b } from "../../../hooks/useToggle.js";
5
- const D = ({ children: s, value: n, name: e, highlightSearch: c = !1, onChange: r, onBlur: t }) => {
6
- const l = p(c), [h, i] = b(!1), [m, g] = d(""), u = v(
7
- (o, a) => {
8
- a?.current && (a.current.value = o), r?.({ target: { value: o, name: e ?? "" } }), t?.();
1
+ import { jsx as G } from "react/jsx-runtime";
2
+ import { useState as e, useRef as f, useCallback as p, useEffect as T } from "react";
3
+ import { DropdownContext as L } from "./dropdown.context.js";
4
+ import { useToggle as N } from "../../../hooks/useToggle.js";
5
+ const c = 1, O = 300, U = ({
6
+ children: d,
7
+ value: C,
8
+ name: i,
9
+ highlightSearch: E = !1,
10
+ options: n,
11
+ onChange: a,
12
+ onBlur: u
13
+ }) => {
14
+ const [v, l] = e(n), F = f(E), [P, g] = N(!1), [D, I] = e(""), [S, b] = e(!0), [x, o] = e(!0), [A, s] = e(c), [_, h] = e(!1), t = f(void 0), w = p(
15
+ (r, m) => {
16
+ m?.current && (m.current.value = r), t.current && clearTimeout(t.current), h(!0), o(!0), s(c), a?.({ target: { value: r, name: i ?? "" } }), u?.(), t.current = setTimeout(() => {
17
+ h(!1);
18
+ }, O);
9
19
  },
10
- [r, e, t]
20
+ [a, i, u]
21
+ ), y = p(
22
+ (r) => {
23
+ g(r), o(!0), s(c);
24
+ },
25
+ [g]
11
26
  );
12
- return /* @__PURE__ */ f(
13
- S.Provider,
27
+ return T(() => {
28
+ l(n);
29
+ }, [n.length]), T(() => () => {
30
+ t.current && clearTimeout(t.current);
31
+ }, []), /* @__PURE__ */ G(
32
+ L.Provider,
14
33
  {
15
34
  value: {
16
- highlightSearchEnabled: l.current,
17
- isOpen: h,
18
- searchTerm: m,
19
- value: n,
20
- setSearchTerm: g,
21
- setValue: u,
22
- toggleOpen: i
35
+ highlightSearchEnabled: F.current,
36
+ isOpen: P,
37
+ searchTerm: D,
38
+ value: C,
39
+ canFilter: S,
40
+ canContinueFetching: x,
41
+ page: A,
42
+ options: v,
43
+ isTyping: _,
44
+ setOptions: l,
45
+ setPage: s,
46
+ setCanContinueFetching: o,
47
+ setCanFilter: b,
48
+ setSearchTerm: I,
49
+ setValue: w,
50
+ toggleOpen: y
23
51
  },
24
- children: s
52
+ children: d
25
53
  }
26
54
  );
27
55
  };
28
56
  export {
29
- D as DropdownProvider
57
+ U as DropdownProvider
30
58
  };
@@ -1,20 +1,22 @@
1
- import { useRef as c, useEffect as u, useCallback as g } from "react";
2
- import { useDropdownContext as m } from "../contexts/dropdown.hook.js";
3
- const b = ({
4
- ulRef: i,
5
- inputRef: l,
6
- disabled: d
1
+ import { useRef as m, useEffect as l, useCallback as b } from "react";
2
+ import { useDropdownContext as L } from "../contexts/dropdown.hook.js";
3
+ const y = ({
4
+ ulRef: f,
5
+ inputRef: t,
6
+ disabled: w,
7
+ internalValue: i,
8
+ onBlur: g
7
9
  }) => {
8
- const o = c(null), t = c(null), { toggleOpen: n } = m();
9
- u(() => {
10
- const e = new AbortController(), s = (a) => {
11
- a.key === "Escape" && n(!1);
12
- }, r = (a) => {
13
- o.current?.contains(a.target) || n(!1);
10
+ const r = m(null), a = m(null), { value: c, setSearchTerm: v, setCanFilter: u, toggleOpen: n } = L();
11
+ l(() => {
12
+ const e = new AbortController(), o = (d) => {
13
+ d.key === "Escape" && n(!1);
14
+ }, s = (d) => {
15
+ r.current?.contains(d.target) || n(!1);
14
16
  };
15
- return document.addEventListener("keydown", s, {
17
+ return document.addEventListener("keydown", o, {
16
18
  signal: e.signal
17
- }), document.addEventListener("mousedown", r, {
19
+ }), document.addEventListener("mousedown", s, {
18
20
  signal: e.signal
19
21
  }), document.addEventListener(
20
22
  "visibilitychange",
@@ -24,39 +26,78 @@ const b = ({
24
26
  {
25
27
  signal: e.signal
26
28
  }
27
- ), t.current?.addEventListener(
28
- "focus",
29
+ ), a.current?.addEventListener(
30
+ "focusin",
29
31
  () => {
30
- d || n(!0);
32
+ w || n(!0);
31
33
  },
32
34
  { signal: e.signal }
33
35
  ), () => {
34
36
  e.abort();
35
37
  };
36
- }, [n, o]), u(() => {
38
+ }, [n, r]), l(() => {
37
39
  const e = new AbortController();
38
- return t.current?.addEventListener(
40
+ return a.current?.addEventListener(
39
41
  "keydown",
40
- (s) => {
41
- if (s.key === "ArrowDown") {
42
- const r = i.current?.querySelector("li");
43
- r && r.focus();
42
+ (o) => {
43
+ if (o.key === "ArrowDown") {
44
+ const s = f.current?.querySelector("li");
45
+ s && s.focus();
44
46
  }
45
47
  },
46
48
  { signal: e.signal }
47
49
  ), () => {
48
50
  e.abort();
49
51
  };
50
- }, [t, i]);
51
- const f = g(() => {
52
- n(!0), requestAnimationFrame(() => l?.current?.focus());
53
- }, [l, n]);
52
+ }, [a, f]), l(() => {
53
+ const e = new AbortController();
54
+ return t?.current?.addEventListener(
55
+ "focusin",
56
+ () => {
57
+ v(i?.value ?? ""), u(!1);
58
+ },
59
+ { signal: e.signal }
60
+ ), t?.current?.addEventListener(
61
+ "focusout",
62
+ () => {
63
+ u(!0);
64
+ },
65
+ { signal: e.signal }
66
+ ), a.current?.addEventListener(
67
+ "focus",
68
+ () => {
69
+ u(!1);
70
+ },
71
+ { signal: e.signal }
72
+ ), r.current?.addEventListener(
73
+ "focusout",
74
+ (o) => {
75
+ r.current?.contains(o.relatedTarget) || n(!1);
76
+ },
77
+ { signal: e.signal }
78
+ ), () => {
79
+ e.abort();
80
+ };
81
+ }, [c]), l(() => {
82
+ t?.current && (t.current.value = c && i?.value || "");
83
+ }, [i, c]), l(() => {
84
+ const e = new AbortController();
85
+ return r.current?.addEventListener("focusout", (o) => {
86
+ const s = o.relatedTarget;
87
+ (!s || !r.current?.contains(s)) && (t?.current?.value || g?.());
88
+ }), () => {
89
+ e.abort();
90
+ };
91
+ }, [n, r, v, g, c]);
92
+ const E = b(() => {
93
+ n(!0), requestAnimationFrame(() => t?.current?.focus());
94
+ }, [t, n]);
54
95
  return {
55
- wrapperRef: o,
56
- wrapperInputRef: t,
57
- handleOpen: f
96
+ wrapperRef: r,
97
+ wrapperInputRef: a,
98
+ handleOpen: E
58
99
  };
59
100
  };
60
101
  export {
61
- b as useDropdown
102
+ y as useDropdown
62
103
  };
@@ -1,62 +1,50 @@
1
- import { useRef as g, useEffect as i } from "react";
2
- import { useDropdownContext as d } from "../contexts/dropdown.hook.js";
3
- const w = ({
4
- inputRef: s,
5
- searchable: l,
6
- ulRef: t,
7
- wrapperInputRef: u,
8
- wrapperRef: a
1
+ import { useRef as g, useEffect as a } from "react";
2
+ import { useDropdownContext as k } from "../contexts/dropdown.hook.js";
3
+ const A = ({
4
+ searchable: o,
5
+ ulRef: n,
6
+ wrapperInputRef: e,
7
+ filteredOptions: f
9
8
  }) => {
10
- const r = g(0), { isOpen: f } = d();
11
- i(() => {
12
- const c = t.current?.querySelectorAll("li") ?? [], e = Array.from(c).filter(
13
- (n) => n.getAttribute("data-action") !== "true"
14
- ), o = new AbortController(), m = () => {
15
- r.current < e.length - 1 ? (r.current = r.current + 1, e[r.current].focus()) : (r.current = 0, e[0].focus());
16
- }, b = () => {
17
- r.current > 0 ? (r.current = r.current - 1, e[r.current].focus()) : (r.current = 0, s?.current && l ? s.current.focus() : u.current?.focus());
9
+ const r = g(0), { isOpen: s } = k();
10
+ a(() => {
11
+ const m = n.current?.querySelectorAll("li") ?? [], t = Array.from(m).filter(
12
+ (c) => c.getAttribute("data-action") !== "true"
13
+ ), u = new AbortController(), i = () => {
14
+ r.current < t.length - 1 ? (r.current = r.current + 1, t[r.current].focus()) : (r.current = 0, t[0].focus());
15
+ }, l = () => {
16
+ r.current > 0 ? (r.current = r.current - 1, t[r.current].focus()) : (r.current = 0, e?.current && o ? e.current.querySelector("input")?.focus() : e.current?.focus());
18
17
  };
19
- return t.current?.addEventListener(
18
+ return n.current?.addEventListener(
20
19
  "keydown",
21
- (n) => {
22
- switch (n.preventDefault(), n.key) {
20
+ (c) => {
21
+ switch (c.preventDefault(), c.key) {
23
22
  case "ArrowDown": {
24
- m();
23
+ i();
25
24
  break;
26
25
  }
27
26
  case "Tab": {
28
- n.shiftKey ? b() : m();
27
+ c.shiftKey ? l() : i();
29
28
  break;
30
29
  }
31
30
  case "ArrowUp": {
32
- r.current === 0 ? u.current?.focus() : b();
31
+ r.current === 0 ? e.current?.focus() : l();
33
32
  break;
34
33
  }
35
34
  case "Enter": {
36
- e[r.current]?.click();
35
+ t[r.current]?.click();
37
36
  break;
38
37
  }
39
38
  }
40
39
  },
41
- { signal: o.signal }
40
+ { signal: u.signal }
42
41
  ), () => {
43
- o.abort();
42
+ u.abort();
44
43
  };
45
- }, [t, r, u, s, l]), i(() => {
46
- const c = new AbortController();
47
- return a.current?.addEventListener(
48
- "mouseenter",
49
- () => {
50
- (t.current?.querySelectorAll("li") ?? []).forEach((o) => o.blur());
51
- },
52
- { signal: c.signal }
53
- ), () => {
54
- c.abort();
55
- };
56
- }, [t, a]), i(() => {
57
- f || (r.current = 0);
58
- }, [f]);
44
+ }, [n, r, e, o, f.length]), a(() => {
45
+ s || (r.current = 0);
46
+ }, [s]);
59
47
  };
60
48
  export {
61
- w as useNavigationUlList
49
+ A as useNavigationUlList
62
50
  };
package/dist/index.d.ts CHANGED
@@ -231,16 +231,32 @@ declare type DropdownProps = VariantProps<typeof dropdownVariants> & Omit<InputH
231
231
  listClassName?: string;
232
232
  listItemClassName?: string;
233
233
  listItemSecondRowClassName?: string;
234
+ mainWrapperClassName?: string;
234
235
  options: Option_3[];
235
236
  searchable?: boolean;
236
237
  showSearchIcon?: boolean;
237
238
  theme?: Theme;
238
239
  value?: string;
239
240
  wrapperClassName?: string;
241
+ errorClassName?: string;
242
+ helperTextClassName?: string;
240
243
  onBlur?: VoidFunction;
241
244
  onChange?: OnChangeFn;
242
245
  onSearchChange?: (searchTerm: string) => void;
243
- };
246
+ } & ({
247
+ isInfiniteScrollEnabled: true;
248
+ onFetchMoreOptions: (params: {
249
+ page: number;
250
+ pageSize: number;
251
+ termOfSearch?: string;
252
+ }) => Promise<{
253
+ data: Option_3[];
254
+ hasMore: boolean;
255
+ }>;
256
+ } | {
257
+ isInfiniteScrollEnabled?: false | undefined;
258
+ onFetchMoreOptions?: never;
259
+ });
244
260
 
245
261
  declare const dropdownVariants: (props?: ({
246
262
  hasError?: boolean | null | undefined;
@@ -451,7 +467,7 @@ declare type Option_2 = {
451
467
  };
452
468
 
453
469
  declare type Option_3 = {
454
- label: string | ReactNode;
470
+ label: string;
455
471
  subLabel?: string | ReactNode;
456
472
  leftIcon?: ReactNode | string;
457
473
  value: string;
package/dist/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@konstructio/ui",
3
3
  "description": "A set of reusable and customizable React components built for konstruct.io",
4
4
  "private": false,
5
- "version": "0.1.2-alpha.22",
5
+ "version": "0.1.2-alpha.24",
6
6
  "type": "module",
7
7
  "license": "MIT",
8
8
  "main": "dist/index.js",
@@ -72,7 +72,7 @@
72
72
  "cmdk": "^1.1.1",
73
73
  "countries-and-timezones": "^3.8.0",
74
74
  "js-cookie": "^3.0.5",
75
- "lucide-react": "^0.553.0",
75
+ "lucide-react": "^0.554.0",
76
76
  "react-chartjs-2": "^5.3.1",
77
77
  "react-day-picker": "^9.11.1",
78
78
  "react-feather": "^2.0.10",
@@ -115,39 +115,39 @@
115
115
  "devDependencies": {
116
116
  "@faker-js/faker": "^10.1.0",
117
117
  "@rollup/plugin-alias": "^6.0.0",
118
- "@storybook/addon-docs": "^10.0.6",
119
- "@storybook/addon-links": "^10.0.6",
120
- "@storybook/react-vite": "^10.0.6",
118
+ "@storybook/addon-docs": "^10.0.8",
119
+ "@storybook/addon-links": "^10.0.8",
120
+ "@storybook/react-vite": "^10.0.8",
121
121
  "@tailwindcss/vite": "^4.1.17",
122
- "@tanstack/react-query": "^5.90.7",
122
+ "@tanstack/react-query": "^5.90.10",
123
123
  "@testing-library/jest-dom": "^6.9.1",
124
124
  "@testing-library/react": "^16.3.0",
125
125
  "@testing-library/user-event": "^14.6.1",
126
126
  "@types/jest-axe": "^3.5.9",
127
127
  "@types/js-cookie": "^3.0.6",
128
128
  "@types/lodash": "^4.17.20",
129
- "@types/react": "^19.2.2",
130
- "@types/react-dom": "^19.2.2",
131
- "@typescript-eslint/eslint-plugin": "^8.46.4",
132
- "@typescript-eslint/parser": "^8.46.4",
133
- "@vitejs/plugin-react": "^5.1.0",
129
+ "@types/react": "^19.2.6",
130
+ "@types/react-dom": "^19.2.3",
131
+ "@typescript-eslint/eslint-plugin": "^8.47.0",
132
+ "@typescript-eslint/parser": "^8.47.0",
133
+ "@vitejs/plugin-react": "^5.1.1",
134
134
  "@vitest/coverage-v8": "^3.2.4",
135
- "autoprefixer": "^10.4.21",
135
+ "autoprefixer": "^10.4.22",
136
136
  "eslint": "^9.39.1",
137
137
  "eslint-plugin-react": "^7.37.5",
138
138
  "eslint-plugin-react-hooks": "^6.1.1",
139
139
  "eslint-plugin-react-refresh": "^0.4.23",
140
140
  "eslint-plugin-storybook": "^9.1.13",
141
141
  "eslint-plugin-vitest": "^0.5.4",
142
- "glob": "^11.0.3",
142
+ "glob": "^12.0.0",
143
143
  "husky": "^9.1.7",
144
144
  "jest-axe": "^10.0.0",
145
- "jsdom": "^27.1.0",
145
+ "jsdom": "^27.2.0",
146
146
  "lodash": "^4.17.21",
147
147
  "postcss": "^8.5.6",
148
148
  "prettier": "^3.6.2",
149
149
  "rimraf": "^6.1.0",
150
- "storybook": "^10.0.6",
150
+ "storybook": "^10.0.8",
151
151
  "tailwindcss": "^4.1.17",
152
152
  "ts-node": "^10.9.2",
153
153
  "typescript": "^5.9.3",
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@konstructio/ui",
3
3
  "description": "A set of reusable and customizable React components built for konstruct.io",
4
4
  "private": false,
5
- "version": "0.1.2-alpha.23",
5
+ "version": "0.1.2-alpha.25",
6
6
  "type": "module",
7
7
  "license": "MIT",
8
8
  "main": "dist/index.js",
@@ -72,7 +72,7 @@
72
72
  "cmdk": "^1.1.1",
73
73
  "countries-and-timezones": "^3.8.0",
74
74
  "js-cookie": "^3.0.5",
75
- "lucide-react": "^0.553.0",
75
+ "lucide-react": "^0.554.0",
76
76
  "react-chartjs-2": "^5.3.1",
77
77
  "react-day-picker": "^9.11.1",
78
78
  "react-feather": "^2.0.10",
@@ -115,39 +115,39 @@
115
115
  "devDependencies": {
116
116
  "@faker-js/faker": "^10.1.0",
117
117
  "@rollup/plugin-alias": "^6.0.0",
118
- "@storybook/addon-docs": "^10.0.6",
119
- "@storybook/addon-links": "^10.0.6",
120
- "@storybook/react-vite": "^10.0.6",
118
+ "@storybook/addon-docs": "^10.0.8",
119
+ "@storybook/addon-links": "^10.0.8",
120
+ "@storybook/react-vite": "^10.0.8",
121
121
  "@tailwindcss/vite": "^4.1.17",
122
- "@tanstack/react-query": "^5.90.7",
122
+ "@tanstack/react-query": "^5.90.10",
123
123
  "@testing-library/jest-dom": "^6.9.1",
124
124
  "@testing-library/react": "^16.3.0",
125
125
  "@testing-library/user-event": "^14.6.1",
126
126
  "@types/jest-axe": "^3.5.9",
127
127
  "@types/js-cookie": "^3.0.6",
128
128
  "@types/lodash": "^4.17.20",
129
- "@types/react": "^19.2.2",
130
- "@types/react-dom": "^19.2.2",
131
- "@typescript-eslint/eslint-plugin": "^8.46.4",
132
- "@typescript-eslint/parser": "^8.46.4",
133
- "@vitejs/plugin-react": "^5.1.0",
129
+ "@types/react": "^19.2.6",
130
+ "@types/react-dom": "^19.2.3",
131
+ "@typescript-eslint/eslint-plugin": "^8.47.0",
132
+ "@typescript-eslint/parser": "^8.47.0",
133
+ "@vitejs/plugin-react": "^5.1.1",
134
134
  "@vitest/coverage-v8": "^3.2.4",
135
- "autoprefixer": "^10.4.21",
135
+ "autoprefixer": "^10.4.22",
136
136
  "eslint": "^9.39.1",
137
137
  "eslint-plugin-react": "^7.37.5",
138
138
  "eslint-plugin-react-hooks": "^6.1.1",
139
139
  "eslint-plugin-react-refresh": "^0.4.23",
140
140
  "eslint-plugin-storybook": "^9.1.13",
141
141
  "eslint-plugin-vitest": "^0.5.4",
142
- "glob": "^11.0.3",
142
+ "glob": "^12.0.0",
143
143
  "husky": "^9.1.7",
144
144
  "jest-axe": "^10.0.0",
145
- "jsdom": "^27.1.0",
145
+ "jsdom": "^27.2.0",
146
146
  "lodash": "^4.17.21",
147
147
  "postcss": "^8.5.6",
148
148
  "prettier": "^3.6.2",
149
149
  "rimraf": "^6.1.0",
150
- "storybook": "^10.0.6",
150
+ "storybook": "^10.0.8",
151
151
  "tailwindcss": "^4.1.17",
152
152
  "ts-node": "^10.9.2",
153
153
  "typescript": "^5.9.3",