@krosoft/react 0.0.373 → 0.0.375

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.
Files changed (67) hide show
  1. package/dist/{AppActions-DwzK-4t7.js → AppActions-DeTaseV8.js} +1 -1
  2. package/dist/{AppMarkdown-ZT7xBtTk.js → AppMarkdown-C0ehlRtp.js} +1 -1
  3. package/dist/{AppSubTitle-Bf9rFryk.js → AppSubTitle-OueYEE4L.js} +2 -2
  4. package/dist/{AppTitle-CQgw2Ody.js → AppTitle-J-S0HNmz.js} +1 -1
  5. package/dist/{ErrorAlert-BYy61fcZ.js → ErrorAlert-CjapT2rI.js} +1 -1
  6. package/dist/{GenericForm-C-vJXpaF.js → GenericForm-Ze6ukTAA.js} +5 -5
  7. package/dist/{ImageInput-BDTQi0U9.js → ImageInput-BnPaGgnU.js} +1 -1
  8. package/dist/{MultiSelect-60rgAOBX.js → MultiSelect-BnidY_Ma.js} +2 -2
  9. package/dist/SearchInput-BIA1rBub.js +36 -0
  10. package/dist/{SearchInput-CqU6crOu.js → SingleSelect-CbIP1XXV.js} +107 -134
  11. package/dist/{behavior-DRGttGb4.js → behavior-BUdJHPMQ.js} +1 -1
  12. package/dist/{cards-Bwm6Scwc.js → cards-olakli0j.js} +1 -1
  13. package/dist/changelog-1_YeDWEy.js +208 -0
  14. package/dist/{charts-hsygNEkd.js → charts-674ZKA0q.js} +1 -1
  15. package/dist/components/core/cards/index.js +1 -1
  16. package/dist/components/core/changelog/AppChangelog.d.ts +3 -1
  17. package/dist/components/core/changelog/AppChangelog.d.ts.map +1 -1
  18. package/dist/components/core/changelog/AppChangelogEntry.d.ts +3 -1
  19. package/dist/components/core/changelog/AppChangelogEntry.d.ts.map +1 -1
  20. package/dist/components/core/changelog/AppChangelogTagFilter.d.ts +12 -0
  21. package/dist/components/core/changelog/AppChangelogTagFilter.d.ts.map +1 -0
  22. package/dist/components/core/changelog/index.js +1 -1
  23. package/dist/components/core/charts/index.js +1 -1
  24. package/dist/components/core/dialogs/index.js +2 -2
  25. package/dist/components/core/filters/index.js +20 -19
  26. package/dist/components/core/forms/index.js +1 -1
  27. package/dist/components/core/index.js +21 -20
  28. package/dist/components/core/inputs/index.js +6 -5
  29. package/dist/components/core/language/index.js +1 -1
  30. package/dist/components/core/layouts/index.js +7 -7
  31. package/dist/components/core/markdown/index.js +1 -1
  32. package/dist/components/core/navbar/index.js +1 -1
  33. package/dist/components/core/states/index.js +2 -2
  34. package/dist/components/core/table/index.js +2 -2
  35. package/dist/components/core/tabs/index.js +4 -4
  36. package/dist/components/core/theme/index.js +1 -1
  37. package/dist/components/index.js +21 -20
  38. package/dist/components/ui/index.js +1 -1
  39. package/dist/{dialogs-0PwhK6c1.js → dialogs-CZs-1NsV.js} +4 -4
  40. package/dist/helpers/changelog.helper.d.ts +14 -0
  41. package/dist/helpers/changelog.helper.d.ts.map +1 -1
  42. package/dist/helpers/index.js +61 -15
  43. package/dist/hooks/behavior/index.js +1 -1
  44. package/dist/hooks/index.js +4 -4
  45. package/dist/hooks/ui/index.js +3 -3
  46. package/dist/i18n/index.js +1 -1
  47. package/dist/i18n/krosoftLocales.d.ts +6 -0
  48. package/dist/i18n/krosoftLocales.d.ts.map +1 -1
  49. package/dist/{i18n-CytpX2hK.js → i18n-w2FziHQf.js} +8 -2
  50. package/dist/{inputs-D-ZCdo5D.js → inputs-DidSjfrq.js} +1 -1
  51. package/dist/{language-Du46nzYN.js → language-BdqnKech.js} +2 -2
  52. package/dist/{navbar-j2_a1yrA.js → navbar-BvxHHN-8.js} +3 -3
  53. package/dist/pwa/index.js +1 -1
  54. package/dist/seasonal/index.js +1 -1
  55. package/dist/{sheet-AgDmjyf2.js → sheet-CGz2TZ_Z.js} +1 -1
  56. package/dist/{states-BVEFGM99.js → states-Bz4MEmfX.js} +1 -1
  57. package/dist/{theme-CVY1Dh3F.js → theme-DRs7tId5.js} +2 -2
  58. package/dist/types/ChangelogItem.d.ts +8 -0
  59. package/dist/types/ChangelogItem.d.ts.map +1 -0
  60. package/dist/types/index.d.ts +1 -0
  61. package/dist/types/index.d.ts.map +1 -1
  62. package/dist/{useDocumentTitle-DYRVJ5wt.js → useDocumentTitle-BJ5nJtLS.js} +1 -1
  63. package/dist/{useLanguage-CJM24_Ab.js → useLanguage-BvcHTj-R.js} +1 -1
  64. package/dist/{useTheme-C5PI6ifZ.js → useTheme-D90lnVPl.js} +1 -1
  65. package/package.json +1 -1
  66. package/dist/changelog-DA5nb3BI.js +0 -126
  67. package/dist/changelog.helper-BjCKlB0M.js +0 -31
@@ -1,5 +1,5 @@
1
1
  import { t as e } from "./tailwind.helper-CJaRYBmL.js";
2
- import { t } from "./i18n-CytpX2hK.js";
2
+ import { t } from "./i18n-w2FziHQf.js";
3
3
  import { Nt as n, Rt as r, Ut as i, jt as a, kt as o } from "./ui-Fxy95kSJ.js";
4
4
  import { c as s } from "./tooltip-_geGvbS7.js";
5
5
  import { t as c } from "./useMobile-pTQ8lWvt.js";
@@ -1,6 +1,6 @@
1
1
  import { t as e } from "./tailwind.helper-CJaRYBmL.js";
2
2
  import { t } from "./markdown.helper-YJE2H5KQ.js";
3
- import { t as n } from "./i18n-CytpX2hK.js";
3
+ import { t as n } from "./i18n-w2FziHQf.js";
4
4
  import { t as r } from "./useNotifications-CyhTruIG.js";
5
5
  import { useEffect as i } from "react";
6
6
  import { jsx as a, jsxs as o } from "react/jsx-runtime";
@@ -1,5 +1,5 @@
1
- import { t as e } from "./i18n-CytpX2hK.js";
2
- import { t } from "./AppActions-DwzK-4t7.js";
1
+ import { t as e } from "./i18n-w2FziHQf.js";
2
+ import { t } from "./AppActions-DeTaseV8.js";
3
3
  import { jsx as n, jsxs as r } from "react/jsx-runtime";
4
4
  //#region src/components/core/layouts/AppSubTitle.tsx
5
5
  function i({ titleKey: i, actions: a, className: o }) {
@@ -1,5 +1,5 @@
1
1
  import { t as e } from "./tailwind.helper-CJaRYBmL.js";
2
- import { t } from "./i18n-CytpX2hK.js";
2
+ import { t } from "./i18n-w2FziHQf.js";
3
3
  import { jsx as n, jsxs as r } from "react/jsx-runtime";
4
4
  //#region src/components/core/layouts/AppTitle.tsx
5
5
  function i({ titleKey: i, descriptionKey: a, isSubTitle: o, inline: s }) {
@@ -1,4 +1,4 @@
1
- import { t as e } from "./i18n-CytpX2hK.js";
1
+ import { t as e } from "./i18n-w2FziHQf.js";
2
2
  import { n as t, t as n } from "./alert-REQGK9bR.js";
3
3
  import "react";
4
4
  import { jsx as r, jsxs as i } from "react/jsx-runtime";
@@ -1,14 +1,14 @@
1
1
  import { t as e } from "./tailwind.helper-CJaRYBmL.js";
2
2
  import { c as t, d as n, s as r } from "./chart-wW-fwL3s.js";
3
- import { t as i } from "./i18n-CytpX2hK.js";
3
+ import { t as i } from "./i18n-w2FziHQf.js";
4
4
  import { Dt as a, Et as o, St as s, Tt as c, p as l, vn as u, wt as d, xt as f } from "./ui-Fxy95kSJ.js";
5
5
  import { c as p } from "./tooltip-_geGvbS7.js";
6
- import { g as m } from "./sheet-AgDmjyf2.js";
6
+ import { g as m } from "./sheet-CGz2TZ_Z.js";
7
7
  import { i as h, l as g, n as _, t as ee, u as v } from "./select-KWMg2_7Z.js";
8
8
  import { n as y } from "./useToast-UeDRLovh.js";
9
- import { t as b } from "./ImageInput-BDTQi0U9.js";
10
- import { t as x } from "./AppSubTitle-Bf9rFryk.js";
11
- import { t as S } from "./MultiSelect-60rgAOBX.js";
9
+ import { t as b } from "./ImageInput-BnPaGgnU.js";
10
+ import { t as x } from "./AppSubTitle-OueYEE4L.js";
11
+ import { t as S } from "./MultiSelect-BnidY_Ma.js";
12
12
  import { useEffect as C, useRef as w, useState as T } from "react";
13
13
  import { jsx as E, jsxs as D } from "react/jsx-runtime";
14
14
  import { useForm as O } from "react-hook-form";
@@ -1,5 +1,5 @@
1
1
  import { t as e } from "./tailwind.helper-CJaRYBmL.js";
2
- import { t } from "./i18n-CytpX2hK.js";
2
+ import { t } from "./i18n-w2FziHQf.js";
3
3
  import { c as n } from "./tooltip-_geGvbS7.js";
4
4
  import { t as r } from "./useNotifications-CyhTruIG.js";
5
5
  import { forwardRef as i, useRef as a, useState as o } from "react";
@@ -1,8 +1,8 @@
1
1
  import { t as e } from "./tailwind.helper-CJaRYBmL.js";
2
- import { t } from "./i18n-CytpX2hK.js";
2
+ import { t } from "./i18n-w2FziHQf.js";
3
3
  import { Mn as n, vn as r } from "./ui-Fxy95kSJ.js";
4
4
  import { a as i, o as a, s as o } from "./tooltip-_geGvbS7.js";
5
- import { h as s, m as c, p as l } from "./sheet-AgDmjyf2.js";
5
+ import { h as s, m as c, p as l } from "./sheet-CGz2TZ_Z.js";
6
6
  import { useCallback as u, useLayoutEffect as d, useMemo as f, useRef as p, useState as m } from "react";
7
7
  import { Fragment as h, jsx as g, jsxs as _ } from "react/jsx-runtime";
8
8
  import { ChevronDownIcon as v, SearchIcon as y, XIcon as b } from "lucide-react";
@@ -0,0 +1,36 @@
1
+ import { t as e } from "./tailwind.helper-CJaRYBmL.js";
2
+ import { t } from "./i18n-w2FziHQf.js";
3
+ import { g as n } from "./sheet-CGz2TZ_Z.js";
4
+ import { jsx as r, jsxs as i } from "react/jsx-runtime";
5
+ import { SearchIcon as a, XIcon as o } from "lucide-react";
6
+ //#region src/components/core/inputs/SearchInput.tsx
7
+ var s = ({ searchQuery: s, search: c, placeholder: l, onSearch: u, onSubmit: d, onClear: f, className: p }) => {
8
+ let { t: m } = t(), h = s ?? c ?? "";
9
+ return /* @__PURE__ */ i("div", {
10
+ className: e("relative h-fit w-full md:w-64", p),
11
+ children: [
12
+ /* @__PURE__ */ r(a, { className: "absolute left-3 top-1/2 transform -translate-y-1/2 text-muted-foreground w-4 h-4" }),
13
+ /* @__PURE__ */ r(n, {
14
+ placeholder: l ?? m("search.placeholder"),
15
+ value: h,
16
+ onChange: (e) => {
17
+ u(e.target.value);
18
+ },
19
+ className: "pl-8",
20
+ onKeyDown: (e) => {
21
+ e.key === "Enter" && d !== void 0 && (e.preventDefault(), d());
22
+ }
23
+ }),
24
+ h === "" ? null : /* @__PURE__ */ r("button", {
25
+ onClick: () => {
26
+ u(""), f !== void 0 && f();
27
+ },
28
+ className: "absolute right-3 top-1/2 -translate-y-1/2 text-gray-500 hover:text-gray-700",
29
+ type: "button",
30
+ children: /* @__PURE__ */ r(o, { className: "size-4" })
31
+ })
32
+ ]
33
+ });
34
+ };
35
+ //#endregion
36
+ export { s as t };
@@ -1,20 +1,20 @@
1
1
  import { t as e } from "./tailwind.helper-CJaRYBmL.js";
2
- import { r as t, t as n } from "./i18n-CytpX2hK.js";
2
+ import { r as t, t as n } from "./i18n-w2FziHQf.js";
3
3
  import { wn as r } from "./ui-Fxy95kSJ.js";
4
4
  import { c as i, o as a, s as o } from "./tooltip-_geGvbS7.js";
5
- import { g as s, h as c, m as l, p as u } from "./sheet-AgDmjyf2.js";
6
- import { i as d, l as f, n as p, t as m, u as h } from "./select-KWMg2_7Z.js";
7
- import { n as g, r as _ } from "./MultiSelect-60rgAOBX.js";
8
- import * as v from "react";
9
- import { useEffect as y, useMemo as b, useRef as x, useState as S } from "react";
10
- import { jsx as C, jsxs as w } from "react/jsx-runtime";
11
- import { CalendarIcon as T, CheckIcon as E, ChevronDownIcon as ee, PlusIcon as D, SearchIcon as O, XIcon as k } from "lucide-react";
12
- import { Command as A } from "cmdk";
13
- import { format as j } from "date-fns";
5
+ import { h as s, m as c, p as l } from "./sheet-CGz2TZ_Z.js";
6
+ import { i as u, l as d, n as f, t as p, u as m } from "./select-KWMg2_7Z.js";
7
+ import { n as h, r as g } from "./MultiSelect-BnidY_Ma.js";
8
+ import * as _ from "react";
9
+ import { useEffect as v, useMemo as y, useRef as b, useState as x } from "react";
10
+ import { jsx as S, jsxs as C } from "react/jsx-runtime";
11
+ import { CalendarIcon as w, CheckIcon as T, ChevronDownIcon as ee, PlusIcon as te, SearchIcon as E, XIcon as D } from "lucide-react";
12
+ import { Command as O } from "cmdk";
13
+ import { format as k } from "date-fns";
14
14
  //#region src/components/core/inputs/DatePicker.tsx
15
- var M = ({ date: n, onDateChange: a, placeholder: o }) => {
16
- let s = t(), [c, l] = S(!1), u = x(null);
17
- return y(() => {
15
+ var A = ({ date: n, onDateChange: a, placeholder: o }) => {
16
+ let s = t(), [c, l] = x(!1), u = b(null);
17
+ return v(() => {
18
18
  if (!c) return;
19
19
  let e = (e) => {
20
20
  u.current !== null && !u.current.contains(e.target) && l(!1);
@@ -22,20 +22,20 @@ var M = ({ date: n, onDateChange: a, placeholder: o }) => {
22
22
  return document.addEventListener("mousedown", e), () => {
23
23
  document.removeEventListener("mousedown", e);
24
24
  };
25
- }, [c]), /* @__PURE__ */ w("div", {
25
+ }, [c]), /* @__PURE__ */ C("div", {
26
26
  ref: u,
27
27
  className: "relative w-full",
28
- children: [/* @__PURE__ */ w(i, {
28
+ children: [/* @__PURE__ */ C(i, {
29
29
  variant: "outline",
30
30
  type: "button",
31
31
  onClick: () => {
32
32
  l((e) => !e);
33
33
  },
34
34
  className: e("w-full justify-start text-left font-normal focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2", c && "ring-2 ring-ring ring-offset-2", n === void 0 && "text-muted-foreground"),
35
- children: [/* @__PURE__ */ C(T, { className: "mr-2 size-4 shrink-0" }), n === void 0 ? /* @__PURE__ */ C("span", { children: o }) : j(n, "dd/MM/yyyy", { locale: s })]
36
- }), c ? /* @__PURE__ */ C("div", {
35
+ children: [/* @__PURE__ */ S(w, { className: "mr-2 size-4 shrink-0" }), n === void 0 ? /* @__PURE__ */ S("span", { children: o }) : k(n, "dd/MM/yyyy", { locale: s })]
36
+ }), c ? /* @__PURE__ */ S("div", {
37
37
  className: "absolute left-0 top-[calc(100%+4px)] z-[100] rounded-surface border bg-popover text-popover-foreground shadow-md animate-in fade-in-0 zoom-in-95 slide-in-from-top-2",
38
- children: /* @__PURE__ */ C(r, {
38
+ children: /* @__PURE__ */ S(r, {
39
39
  mode: "single",
40
40
  locale: s,
41
41
  defaultMonth: n,
@@ -46,28 +46,28 @@ var M = ({ date: n, onDateChange: a, placeholder: o }) => {
46
46
  })
47
47
  }) : null]
48
48
  });
49
- }, N = (e) => e ? {
49
+ }, j = (e) => e ? {
50
50
  from: e.from,
51
51
  to: e.to
52
- } : void 0, P = ({ value: a, onChange: o, placeholder: s, className: d }) => {
53
- let { t: f } = n(), p = t(), [m, h] = v.useState(!1), [g, _] = v.useState(N(a));
54
- return v.useEffect(() => {
55
- m && _(N(a));
56
- }, [m, a]), /* @__PURE__ */ C("div", {
52
+ } : void 0, M = ({ value: a, onChange: o, placeholder: u, className: d }) => {
53
+ let { t: f } = n(), p = t(), [m, h] = _.useState(!1), [g, v] = _.useState(j(a));
54
+ return _.useEffect(() => {
55
+ m && v(j(a));
56
+ }, [m, a]), /* @__PURE__ */ S("div", {
57
57
  className: e("grid gap-2", d),
58
- children: /* @__PURE__ */ w(u, {
58
+ children: /* @__PURE__ */ C(l, {
59
59
  open: m,
60
60
  onOpenChange: h,
61
- children: [/* @__PURE__ */ C(c, {
61
+ children: [/* @__PURE__ */ S(s, {
62
62
  asChild: !0,
63
- children: /* @__PURE__ */ w(i, {
63
+ children: /* @__PURE__ */ C(i, {
64
64
  id: "date",
65
65
  variant: "outline",
66
66
  className: e("w-[300px] justify-start text-left font-normal", !a?.from && "text-muted-foreground"),
67
67
  children: [
68
- /* @__PURE__ */ C(T, { className: "mr-2 size-4" }),
69
- ((e) => e?.from ? !e.to || e.from.getTime() === e.to.getTime() ? j(e.from, "dd MMM yyyy", { locale: p }) : `${j(e.from, "dd MMM yyyy", { locale: p })} - ${j(e.to, "dd MMM yyyy", { locale: p })}` : s ?? f("date.pickPeriod"))(a),
70
- a?.from && /* @__PURE__ */ C(i, {
68
+ /* @__PURE__ */ S(w, { className: "mr-2 size-4" }),
69
+ ((e) => e?.from ? !e.to || e.from.getTime() === e.to.getTime() ? k(e.from, "dd MMM yyyy", { locale: p }) : `${k(e.from, "dd MMM yyyy", { locale: p })} - ${k(e.to, "dd MMM yyyy", { locale: p })}` : u ?? f("date.pickPeriod"))(a),
70
+ a?.from && /* @__PURE__ */ S(i, {
71
71
  type: "button",
72
72
  variant: "ghost",
73
73
  size: "icon",
@@ -76,43 +76,43 @@ var M = ({ date: n, onDateChange: a, placeholder: o }) => {
76
76
  onClick: (e) => {
77
77
  e.stopPropagation(), o(void 0), h(!1);
78
78
  },
79
- children: /* @__PURE__ */ C(k, { className: "size-4" })
79
+ children: /* @__PURE__ */ S(D, { className: "size-4" })
80
80
  })
81
81
  ]
82
82
  })
83
- }), /* @__PURE__ */ w(l, {
83
+ }), /* @__PURE__ */ C(c, {
84
84
  className: "w-auto p-0",
85
85
  align: "start",
86
86
  side: "bottom",
87
87
  sideOffset: 4,
88
- children: [/* @__PURE__ */ C(r, {
88
+ children: [/* @__PURE__ */ S(r, {
89
89
  mode: "range",
90
90
  resetOnSelect: !0,
91
91
  defaultMonth: g?.from,
92
92
  selected: g,
93
- onSelect: _,
93
+ onSelect: v,
94
94
  numberOfMonths: 2,
95
95
  locale: p,
96
96
  className: "pointer-events-auto p-3"
97
- }), /* @__PURE__ */ w("div", {
97
+ }), /* @__PURE__ */ C("div", {
98
98
  className: "flex items-center justify-between border-t border-border px-3 py-2",
99
- children: [/* @__PURE__ */ C(i, {
99
+ children: [/* @__PURE__ */ S(i, {
100
100
  variant: "ghost",
101
101
  size: "sm",
102
102
  onClick: () => {
103
- _(void 0);
103
+ v(void 0);
104
104
  },
105
105
  children: f("actions.clear")
106
- }), /* @__PURE__ */ w("div", {
106
+ }), /* @__PURE__ */ C("div", {
107
107
  className: "flex gap-2",
108
- children: [/* @__PURE__ */ C(i, {
108
+ children: [/* @__PURE__ */ S(i, {
109
109
  variant: "ghost",
110
110
  size: "sm",
111
111
  onClick: () => {
112
- _(N(a)), h(!1);
112
+ v(j(a)), h(!1);
113
113
  },
114
114
  children: f("actions.cancel")
115
- }), /* @__PURE__ */ C(i, {
115
+ }), /* @__PURE__ */ S(i, {
116
116
  size: "sm",
117
117
  onClick: () => {
118
118
  o(g), h(!1);
@@ -124,40 +124,40 @@ var M = ({ date: n, onDateChange: a, placeholder: o }) => {
124
124
  })]
125
125
  })
126
126
  });
127
- }, F = ({ options: t = [], value: r, onChange: i, onClear: s, searchable: v = !1, onCreate: y, placeholder: x, searchPlaceholder: T, emptyLabel: j, createLabel: M, disabled: N = !1, modal: P = !0, variant: F = "input", className: I, ...L }) => {
128
- let { t: R } = n(), [z, B] = S(!1), [V, H] = S(""), U = F === "filter" ? a : void 0, W = r !== void 0 && r !== "", G = b(() => W ? t.find((e) => e.value === r) : void 0, [
129
- W,
127
+ }, N = ({ options: t = [], value: r, onChange: i, onClear: _, searchable: v = !1, onCreate: b, placeholder: w, searchPlaceholder: k, emptyLabel: A, createLabel: j, disabled: M = !1, modal: N = !0, variant: P = "input", className: F, ...I }) => {
128
+ let { t: L } = n(), [R, z] = x(!1), [B, V] = x(""), H = P === "filter" ? a : void 0, U = r !== void 0 && r !== "", W = y(() => U ? t.find((e) => e.value === r) : void 0, [
129
+ U,
130
130
  t,
131
131
  r
132
- ]), te = W ? G?.label ?? r : void 0, K = V.trim(), q = b(() => {
132
+ ]), G = U ? W?.label ?? r : void 0, K = B.trim(), q = y(() => {
133
133
  if (K === "") return t;
134
134
  let e = K.toLowerCase();
135
135
  return t.filter((t) => `${t.label} ${t.description ?? ""}`.toLowerCase().includes(e));
136
- }, [t, K]), { listRef: ne, virtualized: J, startIndex: re, endIndex: ie, padTop: Y, padBottom: X, onScroll: ae, resetScroll: Z } = _(z, q.length, t.some((e) => e.imageUrl !== void 0)), oe = J ? q.slice(re, ie) : q;
137
- if (!v) return /* @__PURE__ */ w(m, {
136
+ }, [t, K]), { listRef: ne, virtualized: J, startIndex: re, endIndex: ie, padTop: Y, padBottom: X, onScroll: ae, resetScroll: Z } = g(R, q.length, t.some((e) => e.imageUrl !== void 0)), oe = J ? q.slice(re, ie) : q;
137
+ if (!v) return /* @__PURE__ */ C(p, {
138
138
  value: r ?? "",
139
139
  onValueChange: i,
140
- disabled: N,
141
- children: [/* @__PURE__ */ C(f, {
142
- ...L,
143
- className: e(!W && "text-muted-foreground", U, I),
144
- onClear: s !== void 0 && W && !N ? (e) => {
145
- e.preventDefault(), e.stopPropagation(), s();
140
+ disabled: M,
141
+ children: [/* @__PURE__ */ S(d, {
142
+ ...I,
143
+ className: e(!U && "text-muted-foreground", H, F),
144
+ onClear: _ !== void 0 && U && !M ? (e) => {
145
+ e.preventDefault(), e.stopPropagation(), _();
146
146
  } : void 0,
147
- children: /* @__PURE__ */ C(h, { placeholder: x ?? R("select.placeholder") })
148
- }), /* @__PURE__ */ C(p, { children: t.map((e) => /* @__PURE__ */ C(d, {
147
+ children: /* @__PURE__ */ S(m, { placeholder: w ?? L("select.placeholder") })
148
+ }), /* @__PURE__ */ S(f, { children: t.map((e) => /* @__PURE__ */ S(u, {
149
149
  value: e.value,
150
150
  disabled: e.disabled,
151
- children: /* @__PURE__ */ w("span", {
151
+ children: /* @__PURE__ */ C("span", {
152
152
  className: "flex items-center",
153
153
  children: [
154
- g(e.imageUrl, "mr-2"),
155
- e.color !== void 0 && /* @__PURE__ */ C("span", {
154
+ h(e.imageUrl, "mr-2"),
155
+ e.color !== void 0 && /* @__PURE__ */ S("span", {
156
156
  className: "mr-2 size-2.5 shrink-0 rounded-full",
157
157
  style: { backgroundColor: e.color }
158
158
  }),
159
159
  e.label,
160
- e.description !== void 0 && /* @__PURE__ */ w("span", {
160
+ e.description !== void 0 && /* @__PURE__ */ C("span", {
161
161
  className: "ml-1 text-muted-foreground",
162
162
  children: [
163
163
  "(",
@@ -169,97 +169,97 @@ var M = ({ date: n, onDateChange: a, placeholder: o }) => {
169
169
  })
170
170
  }, e.value)) })]
171
171
  });
172
- let Q = y !== void 0 && K !== "" && !t.some((e) => e.label.toLowerCase() === K.toLowerCase()), $ = (e) => {
173
- B(e), e ? Z() : H("");
172
+ let Q = b !== void 0 && K !== "" && !t.some((e) => e.label.toLowerCase() === K.toLowerCase()), $ = (e) => {
173
+ z(e), e ? Z() : V("");
174
174
  }, se = (e) => {
175
- H(e), Z();
175
+ V(e), Z();
176
176
  }, ce = (e) => {
177
177
  i(e), $(!1);
178
178
  }, le = () => {
179
- y?.(K), $(!1);
179
+ b?.(K), $(!1);
180
180
  };
181
- return /* @__PURE__ */ w(u, {
182
- open: z,
181
+ return /* @__PURE__ */ C(l, {
182
+ open: R,
183
183
  onOpenChange: $,
184
- modal: P,
185
- children: [/* @__PURE__ */ C(c, {
184
+ modal: N,
185
+ children: [/* @__PURE__ */ S(s, {
186
186
  asChild: !0,
187
- children: /* @__PURE__ */ w("button", {
188
- ...L,
187
+ children: /* @__PURE__ */ C("button", {
188
+ ...I,
189
189
  type: "button",
190
190
  role: "combobox",
191
- "aria-expanded": z,
192
- disabled: N,
193
- className: e(o, "w-full", U, "data-[state=open]:ring-2 data-[state=open]:ring-ring data-[state=open]:ring-offset-2", !W && "text-muted-foreground", I),
194
- children: [/* @__PURE__ */ w("div", {
191
+ "aria-expanded": R,
192
+ disabled: M,
193
+ className: e(o, "w-full", H, "data-[state=open]:ring-2 data-[state=open]:ring-ring data-[state=open]:ring-offset-2", !U && "text-muted-foreground", F),
194
+ children: [/* @__PURE__ */ C("div", {
195
195
  className: "flex min-w-0 items-center truncate",
196
196
  children: [
197
- g(G?.imageUrl, "mr-2 h-6 w-8"),
198
- G?.color && /* @__PURE__ */ C("span", {
197
+ h(W?.imageUrl, "mr-2 h-6 w-8"),
198
+ W?.color && /* @__PURE__ */ S("span", {
199
199
  className: "mr-2 size-2.5 shrink-0 rounded-full",
200
- style: { backgroundColor: G.color }
200
+ style: { backgroundColor: W.color }
201
201
  }),
202
- /* @__PURE__ */ C("span", {
202
+ /* @__PURE__ */ S("span", {
203
203
  className: "truncate",
204
- children: te ?? x ?? R("select.placeholder")
204
+ children: G ?? w ?? L("select.placeholder")
205
205
  }),
206
- G?.description !== void 0 && /* @__PURE__ */ w("span", {
206
+ W?.description !== void 0 && /* @__PURE__ */ C("span", {
207
207
  className: "ml-1 truncate text-muted-foreground",
208
208
  children: [
209
209
  "(",
210
- G.description,
210
+ W.description,
211
211
  ")"
212
212
  ]
213
213
  })
214
214
  ]
215
- }), /* @__PURE__ */ w("div", {
215
+ }), /* @__PURE__ */ C("div", {
216
216
  className: "flex items-center gap-1",
217
- children: [s && W && !N && /* @__PURE__ */ C("span", {
217
+ children: [_ && U && !M && /* @__PURE__ */ S("span", {
218
218
  role: "button",
219
219
  tabIndex: -1,
220
220
  onClick: (e) => {
221
221
  e.stopPropagation();
222
222
  },
223
223
  onPointerDown: (e) => {
224
- e.preventDefault(), e.stopPropagation(), s();
224
+ e.preventDefault(), e.stopPropagation(), _();
225
225
  },
226
226
  className: "text-muted-foreground hover:text-foreground",
227
- children: /* @__PURE__ */ C(k, { className: "size-4" })
228
- }), /* @__PURE__ */ C(ee, { className: e("size-4 shrink-0 opacity-50 transition-transform", z && "rotate-180") })]
227
+ children: /* @__PURE__ */ S(D, { className: "size-4" })
228
+ }), /* @__PURE__ */ S(ee, { className: e("size-4 shrink-0 opacity-50 transition-transform", R && "rotate-180") })]
229
229
  })]
230
230
  })
231
- }), /* @__PURE__ */ C(l, {
231
+ }), /* @__PURE__ */ S(c, {
232
232
  className: "w-[var(--radix-popover-trigger-width)] p-0",
233
233
  align: "start",
234
- children: /* @__PURE__ */ w(A, {
234
+ children: /* @__PURE__ */ C(O, {
235
235
  shouldFilter: !1,
236
236
  className: "flex flex-col",
237
- children: [/* @__PURE__ */ C("div", {
237
+ children: [/* @__PURE__ */ S("div", {
238
238
  className: "border-b border-border p-2",
239
- children: /* @__PURE__ */ w("div", {
239
+ children: /* @__PURE__ */ C("div", {
240
240
  className: "relative",
241
- children: [/* @__PURE__ */ C(O, { className: "absolute left-2 top-1/2 h-3.5 w-3.5 -translate-y-1/2 text-muted-foreground" }), /* @__PURE__ */ C(A.Input, {
242
- value: V,
241
+ children: [/* @__PURE__ */ S(E, { className: "absolute left-2 top-1/2 h-3.5 w-3.5 -translate-y-1/2 text-muted-foreground" }), /* @__PURE__ */ S(O.Input, {
242
+ value: B,
243
243
  onValueChange: se,
244
- placeholder: T ?? R("search.placeholder"),
244
+ placeholder: k ?? L("search.placeholder"),
245
245
  className: "w-full rounded-control bg-muted/50 py-1.5 pl-7 pr-2 text-sm text-foreground placeholder:text-muted-foreground outline-none focus:ring-1 focus:ring-ring",
246
246
  autoFocus: !0
247
247
  })]
248
248
  })
249
- }), /* @__PURE__ */ w(A.List, {
249
+ }), /* @__PURE__ */ C(O.List, {
250
250
  ref: ne,
251
251
  onScroll: ae,
252
252
  className: e("flex flex-col max-h-56 overflow-y-auto overflow-x-hidden p-1.5 scrollbar-thin scrollbar-thumb-rounded scrollbar-thumb-muted-foreground/20 scrollbar-track-transparent [&::-webkit-scrollbar]:w-1.5 [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-thumb]:bg-muted-foreground/20 [&::-webkit-scrollbar-track]:bg-transparent", !J && "gap-0.5"),
253
253
  children: [
254
- q.length === 0 && !Q && /* @__PURE__ */ C("div", {
254
+ q.length === 0 && !Q && /* @__PURE__ */ S("div", {
255
255
  className: "px-2 py-3 text-center text-xs text-muted-foreground",
256
- children: j ?? R("states.noResult")
256
+ children: A ?? L("states.noResult")
257
257
  }),
258
- Y > 0 && /* @__PURE__ */ C("div", {
258
+ Y > 0 && /* @__PURE__ */ S("div", {
259
259
  "aria-hidden": !0,
260
260
  style: { height: Y }
261
261
  }),
262
- oe.map((t) => /* @__PURE__ */ w(A.Item, {
262
+ oe.map((t) => /* @__PURE__ */ C(O.Item, {
263
263
  value: t.value,
264
264
  keywords: [t.label, t.description ?? ""],
265
265
  disabled: t.disabled,
@@ -268,17 +268,17 @@ var M = ({ date: n, onDateChange: a, placeholder: o }) => {
268
268
  },
269
269
  className: "flex min-w-0 items-center gap-2 rounded-md px-2 py-2 text-sm cursor-pointer transition-colors data-[selected=true]:bg-muted data-[disabled=true]:cursor-not-allowed data-[disabled=true]:opacity-50",
270
270
  children: [
271
- g(t.imageUrl),
272
- t.color && /* @__PURE__ */ C("span", {
271
+ h(t.imageUrl),
272
+ t.color && /* @__PURE__ */ S("span", {
273
273
  className: "size-2.5 shrink-0 rounded-full",
274
274
  style: { backgroundColor: t.color }
275
275
  }),
276
- /* @__PURE__ */ C("span", {
276
+ /* @__PURE__ */ S("span", {
277
277
  className: "min-w-0 flex-1 truncate",
278
278
  title: t.label,
279
279
  children: t.label
280
280
  }),
281
- t.description !== void 0 && /* @__PURE__ */ w("span", {
281
+ t.description !== void 0 && /* @__PURE__ */ C("span", {
282
282
  className: "shrink-0 truncate text-muted-foreground",
283
283
  children: [
284
284
  "(",
@@ -286,21 +286,21 @@ var M = ({ date: n, onDateChange: a, placeholder: o }) => {
286
286
  ")"
287
287
  ]
288
288
  }),
289
- /* @__PURE__ */ C(E, { className: e("ml-auto size-4 shrink-0", r === t.value ? "opacity-100" : "opacity-0") })
289
+ /* @__PURE__ */ S(T, { className: e("ml-auto size-4 shrink-0", r === t.value ? "opacity-100" : "opacity-0") })
290
290
  ]
291
291
  }, t.value)),
292
- X > 0 && /* @__PURE__ */ C("div", {
292
+ X > 0 && /* @__PURE__ */ S("div", {
293
293
  "aria-hidden": !0,
294
294
  style: { height: X }
295
295
  }),
296
- Q && /* @__PURE__ */ w(A.Item, {
296
+ Q && /* @__PURE__ */ C(O.Item, {
297
297
  forceMount: !0,
298
298
  value: "__create__",
299
299
  onSelect: le,
300
300
  className: "flex min-w-0 items-center gap-2.5 rounded-md px-2 py-2 text-sm cursor-pointer transition-colors data-[selected=true]:bg-muted",
301
- children: [/* @__PURE__ */ C(D, { className: "size-4 shrink-0" }), /* @__PURE__ */ C("span", {
301
+ children: [/* @__PURE__ */ S(te, { className: "size-4 shrink-0" }), /* @__PURE__ */ S("span", {
302
302
  className: "truncate",
303
- children: M ? M(K) : R("select.create", { search: K })
303
+ children: j ? j(K) : L("select.create", { search: K })
304
304
  })]
305
305
  })
306
306
  ]
@@ -308,33 +308,6 @@ var M = ({ date: n, onDateChange: a, placeholder: o }) => {
308
308
  })
309
309
  })]
310
310
  });
311
- }, I = ({ searchQuery: t, search: r, placeholder: i, onSearch: a, onSubmit: o, onClear: c, className: l }) => {
312
- let { t: u } = n(), d = t ?? r ?? "";
313
- return /* @__PURE__ */ w("div", {
314
- className: e("relative h-fit w-full md:w-64", l),
315
- children: [
316
- /* @__PURE__ */ C(O, { className: "absolute left-3 top-1/2 transform -translate-y-1/2 text-muted-foreground w-4 h-4" }),
317
- /* @__PURE__ */ C(s, {
318
- placeholder: i ?? u("search.placeholder"),
319
- value: d,
320
- onChange: (e) => {
321
- a(e.target.value);
322
- },
323
- className: "pl-8",
324
- onKeyDown: (e) => {
325
- e.key === "Enter" && o !== void 0 && (e.preventDefault(), o());
326
- }
327
- }),
328
- d === "" ? null : /* @__PURE__ */ C("button", {
329
- onClick: () => {
330
- a(""), c !== void 0 && c();
331
- },
332
- className: "absolute right-3 top-1/2 -translate-y-1/2 text-gray-500 hover:text-gray-700",
333
- type: "button",
334
- children: /* @__PURE__ */ C(k, { className: "size-4" })
335
- })
336
- ]
337
- });
338
311
  };
339
312
  //#endregion
340
- export { M as i, F as n, P as r, I as t };
313
+ export { M as n, A as r, N as t };
@@ -1,4 +1,4 @@
1
- import { t as e } from "./i18n-CytpX2hK.js";
1
+ import { t as e } from "./i18n-w2FziHQf.js";
2
2
  import { n as t } from "./datatable-COQcYUrk.js";
3
3
  import "./constants/index.js";
4
4
  import { n, t as r } from "./sidebar.context-BahtU6hE.js";
@@ -1,6 +1,6 @@
1
1
  import { t as e } from "./tailwind.helper-CJaRYBmL.js";
2
2
  import { c as t, d as n, f as r, s as i } from "./chart-wW-fwL3s.js";
3
- import { t as a } from "./i18n-CytpX2hK.js";
3
+ import { t as a } from "./i18n-w2FziHQf.js";
4
4
  import { t as o } from "./skeleton-D6Ga4BLw.js";
5
5
  import "react";
6
6
  import { Fragment as s, jsx as c, jsxs as l } from "react/jsx-runtime";