@krosoft/react 0.0.303 → 0.0.304

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.
@@ -8,7 +8,7 @@ import { i as h, l as g, n as ee, t as _, u as v } from "./select-KWMg2_7Z.js";
8
8
  import { n as y } from "./useToast-UeDRLovh.js";
9
9
  import { t as b } from "./ImageInput-B6NH8JDS.js";
10
10
  import { t as x } from "./AppSubTitle-DJQjeSdC.js";
11
- import { t as S } from "./MultiSelect-DmdYovWw.js";
11
+ import { t as S } from "./MultiSelect-BAIbW9Ge.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";
@@ -7,94 +7,102 @@ import { useMemo as l, useState as u } from "react";
7
7
  import { jsx as d, jsxs as f } from "react/jsx-runtime";
8
8
  import { ChevronDownIcon as p, SearchIcon as m, XIcon as h } from "lucide-react";
9
9
  import { Command as g } from "cmdk";
10
- //#region src/components/core/inputs/MultiSelect.tsx
11
- var _ = ({ options: _, selected: v, onToggle: y, onClear: b, onSelectAll: x, variant: S = "input", placeholder: C, labelKey: w, searchable: T = !1, searchPlaceholder: E, disabled: D = !1, maxCount: O, className: k, ...A }) => {
12
- let { t: j } = t(), [M, N] = u(""), [P, F] = u(!1), I = S === "pill", L = S === "input" ? void 0 : i, R = l(() => M === "" ? _ : _.filter((e) => e.label.toLowerCase().includes(M.toLowerCase())), [_, M]), z = l(() => R.filter((e) => e.disabled !== !0).map((e) => e.value), [R]), B = l(() => v.filter((e) => _.find((t) => t.value === e)?.disabled === !0), [_, v]), V = l(() => z.length !== 0 && z.every((e) => v.includes(e)), [z, v]), H = l(() => v.map((e) => _.find((t) => t.value === e)?.label ?? e), [_, v]), U = O !== void 0 && O > 0 ? H.slice(0, O) : H, W = H.length - U.length, G = (e) => {
13
- F(e), e || N("");
14
- }, K = () => {
15
- B.length > 0 ? x === void 0 ? v.filter((e) => !B.includes(e)).forEach((e) => {
16
- y(e);
17
- }) : x(B) : b === void 0 ? x === void 0 ? v.forEach((e) => {
18
- y(e);
19
- }) : x([]) : b();
10
+ //#region src/components/core/inputs/select.helper.tsx
11
+ var _ = (t, n) => t === void 0 ? null : t ? /* @__PURE__ */ d("img", {
12
+ src: t,
13
+ alt: "",
14
+ loading: "lazy",
15
+ className: e("h-7 w-10 shrink-0 rounded object-cover", n)
16
+ }) : /* @__PURE__ */ d("span", {
17
+ className: e("flex h-7 w-10 shrink-0 items-center justify-center rounded bg-muted text-[9px] text-muted-foreground", n),
18
+ children: "—"
19
+ }), v = ({ options: v, selected: y, onToggle: b, onClear: x, onSelectAll: S, variant: C = "input", placeholder: w, labelKey: T, searchable: E = !1, searchPlaceholder: D, disabled: O = !1, maxCount: k, className: A, ...j }) => {
20
+ let { t: M } = t(), [N, P] = u(""), [F, I] = u(!1), L = C === "pill", R = C === "input" ? void 0 : i, z = l(() => N === "" ? v : v.filter((e) => e.label.toLowerCase().includes(N.toLowerCase())), [v, N]), B = l(() => z.filter((e) => e.disabled !== !0).map((e) => e.value), [z]), V = l(() => y.filter((e) => v.find((t) => t.value === e)?.disabled === !0), [v, y]), H = l(() => B.length !== 0 && B.every((e) => y.includes(e)), [B, y]), U = l(() => y.map((e) => v.find((t) => t.value === e)?.label ?? e), [v, y]), W = k !== void 0 && k > 0 ? U.slice(0, k) : U, G = U.length - W.length, K = (e) => {
21
+ I(e), e || P("");
20
22
  }, q = () => {
21
- if (V) x === void 0 ? b !== void 0 && v.every((e) => z.includes(e)) ? b() : z.forEach((e) => {
22
- y(e);
23
- }) : x(v.filter((e) => !z.includes(e)));
24
- else if (x !== void 0) {
25
- let e = [...v];
26
- z.forEach((t) => {
23
+ V.length > 0 ? S === void 0 ? y.filter((e) => !V.includes(e)).forEach((e) => {
24
+ b(e);
25
+ }) : S(V) : x === void 0 ? S === void 0 ? y.forEach((e) => {
26
+ b(e);
27
+ }) : S([]) : x();
28
+ }, J = () => {
29
+ if (H) S === void 0 ? x !== void 0 && y.every((e) => B.includes(e)) ? x() : B.forEach((e) => {
30
+ b(e);
31
+ }) : S(y.filter((e) => !B.includes(e)));
32
+ else if (S !== void 0) {
33
+ let e = [...y];
34
+ B.forEach((t) => {
27
35
  e.includes(t) || e.push(t);
28
- }), x(e);
29
- } else z.forEach((e) => {
30
- v.includes(e) || y(e);
36
+ }), S(e);
37
+ } else B.forEach((e) => {
38
+ y.includes(e) || b(e);
31
39
  });
32
- }, J = I ? /* @__PURE__ */ f("button", {
33
- ...A,
40
+ }, Y = L ? /* @__PURE__ */ f("button", {
41
+ ...j,
34
42
  type: "button",
35
- disabled: D,
36
- className: e(r, "inline-flex items-center justify-between gap-1.5 whitespace-nowrap transition-colors", v.length > 0 ? "border-primary bg-primary/10 text-primary font-medium" : "hover:bg-muted", L, k),
43
+ disabled: O,
44
+ className: e(r, "inline-flex items-center justify-between gap-1.5 whitespace-nowrap transition-colors", y.length > 0 ? "border-primary bg-primary/10 text-primary font-medium" : "hover:bg-muted", R, A),
37
45
  children: [/* @__PURE__ */ d("span", {
38
46
  className: "truncate",
39
- children: w === void 0 ? C ?? j("select.placeholder") : j(w)
47
+ children: T === void 0 ? w ?? M("select.placeholder") : M(T)
40
48
  }), /* @__PURE__ */ f("div", {
41
49
  className: "flex shrink-0 items-center gap-1.5",
42
- children: [v.length > 0 && /* @__PURE__ */ d("span", {
50
+ children: [y.length > 0 && /* @__PURE__ */ d("span", {
43
51
  className: "flex h-4 min-w-[16px] items-center justify-center rounded-full bg-primary px-1 text-[10px] font-bold text-primary-foreground",
44
- children: v.length
45
- }), /* @__PURE__ */ d(p, { className: e("size-3.5 opacity-60 transition-transform", P && "rotate-180") })]
52
+ children: y.length
53
+ }), /* @__PURE__ */ d(p, { className: e("size-3.5 opacity-60 transition-transform", F && "rotate-180") })]
46
54
  })]
47
55
  }) : /* @__PURE__ */ f("button", {
48
- ...A,
56
+ ...j,
49
57
  type: "button",
50
- disabled: D,
51
- className: e(a, "w-full", L, P && "ring-2 ring-ring ring-offset-2", v.length === 0 && "text-muted-foreground", k),
58
+ disabled: O,
59
+ className: e(a, "w-full", R, F && "ring-2 ring-ring ring-offset-2", y.length === 0 && "text-muted-foreground", A),
52
60
  children: [/* @__PURE__ */ d("span", {
53
61
  className: "truncate",
54
- children: v.length === 0 ? C ?? j("select.placeholder") : U.join(", ")
62
+ children: y.length === 0 ? w ?? M("select.placeholder") : W.join(", ")
55
63
  }), /* @__PURE__ */ f("div", {
56
64
  className: "flex shrink-0 items-center gap-1",
57
65
  children: [
58
- W > 0 && /* @__PURE__ */ f("span", {
66
+ G > 0 && /* @__PURE__ */ f("span", {
59
67
  className: "rounded-control bg-muted px-1.5 py-0.5 text-xs font-medium text-foreground",
60
- children: ["+", W]
68
+ children: ["+", G]
61
69
  }),
62
- v.length > 0 && !D && /* @__PURE__ */ d("span", {
70
+ y.length > 0 && !O && /* @__PURE__ */ d("span", {
63
71
  role: "button",
64
72
  tabIndex: -1,
65
73
  onClick: (e) => {
66
74
  e.stopPropagation();
67
75
  },
68
76
  onPointerDown: (e) => {
69
- e.preventDefault(), e.stopPropagation(), K();
77
+ e.preventDefault(), e.stopPropagation(), q();
70
78
  },
71
79
  className: "text-muted-foreground hover:text-foreground",
72
80
  children: /* @__PURE__ */ d(h, { className: "size-4" })
73
81
  }),
74
- /* @__PURE__ */ d(p, { className: e("size-4 opacity-50 shrink-0 transition-transform", P && "rotate-180") })
82
+ /* @__PURE__ */ d(p, { className: e("size-4 opacity-50 shrink-0 transition-transform", F && "rotate-180") })
75
83
  ]
76
84
  })]
77
85
  });
78
86
  return /* @__PURE__ */ f(c, {
79
- open: P,
80
- onOpenChange: G,
87
+ open: F,
88
+ onOpenChange: K,
81
89
  children: [/* @__PURE__ */ d(o, {
82
90
  asChild: !0,
83
- children: J
91
+ children: Y
84
92
  }), /* @__PURE__ */ f(s, {
85
- className: e("p-0", I ? "w-72 max-w-[var(--radix-popover-content-available-width)]" : "w-[var(--radix-popover-trigger-width)]"),
93
+ className: e("p-0", L ? "w-72 max-w-[var(--radix-popover-content-available-width)]" : "w-[var(--radix-popover-trigger-width)]"),
86
94
  align: "start",
87
95
  children: [/* @__PURE__ */ f(g, {
88
96
  shouldFilter: !1,
89
97
  className: "flex flex-col",
90
- children: [T ? /* @__PURE__ */ d("div", {
98
+ children: [E ? /* @__PURE__ */ d("div", {
91
99
  className: "border-b border-border p-2",
92
100
  children: /* @__PURE__ */ f("div", {
93
101
  className: "relative",
94
102
  children: [/* @__PURE__ */ d(m, { className: "absolute left-2 top-1/2 h-3.5 w-3.5 -translate-y-1/2 text-muted-foreground" }), /* @__PURE__ */ d(g.Input, {
95
- value: M,
96
- onValueChange: N,
97
- placeholder: E ?? j("search.placeholder"),
103
+ value: N,
104
+ onValueChange: P,
105
+ placeholder: D ?? M("search.placeholder"),
98
106
  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",
99
107
  autoFocus: !0
100
108
  })]
@@ -105,21 +113,22 @@ var _ = ({ options: _, selected: v, onToggle: y, onClear: b, onSelectAll: x, var
105
113
  className: "sr-only"
106
114
  }), /* @__PURE__ */ f(g.List, {
107
115
  className: "flex flex-col gap-0.5 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",
108
- children: [R.length === 0 && /* @__PURE__ */ d("p", {
116
+ children: [z.length === 0 && /* @__PURE__ */ d("p", {
109
117
  className: "px-2 py-3 text-center text-xs text-muted-foreground",
110
- children: j("states.noResult")
111
- }), R.map((e) => /* @__PURE__ */ f(g.Item, {
118
+ children: M("states.noResult")
119
+ }), z.map((e) => /* @__PURE__ */ f(g.Item, {
112
120
  value: e.value,
113
121
  disabled: e.disabled,
114
122
  onSelect: () => {
115
- y(e.value);
123
+ b(e.value);
116
124
  },
117
125
  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 data-[disabled=true]:cursor-not-allowed data-[disabled=true]:opacity-50",
118
126
  children: [
119
127
  /* @__PURE__ */ d("span", {
120
128
  className: "pointer-events-none shrink-0",
121
- children: /* @__PURE__ */ d(n, { checked: v.includes(e.value) })
129
+ children: /* @__PURE__ */ d(n, { checked: y.includes(e.value) })
122
130
  }),
131
+ _(e.imageUrl),
123
132
  e.color && /* @__PURE__ */ d("span", {
124
133
  className: "size-2.5 shrink-0 rounded-full",
125
134
  style: { backgroundColor: e.color }
@@ -132,17 +141,17 @@ var _ = ({ options: _, selected: v, onToggle: y, onClear: b, onSelectAll: x, var
132
141
  ]
133
142
  }, e.value))]
134
143
  })]
135
- }), z.length > 0 && /* @__PURE__ */ d("div", {
144
+ }), B.length > 0 && /* @__PURE__ */ d("div", {
136
145
  className: "border-t border-border p-1.5",
137
146
  children: /* @__PURE__ */ d("button", {
138
147
  type: "button",
139
- onClick: q,
148
+ onClick: J,
140
149
  className: "w-full rounded-md px-2 py-1.5 text-xs text-muted-foreground hover:text-foreground hover:bg-muted transition-colors text-center",
141
- children: j(V ? "filters.deselectAll" : "filters.selectAll")
150
+ children: M(H ? "filters.deselectAll" : "filters.selectAll")
142
151
  })
143
152
  })]
144
153
  })]
145
154
  });
146
155
  };
147
156
  //#endregion
148
- export { _ as t };
157
+ export { _ as n, v as t };
@@ -4,16 +4,17 @@ import { En as r } from "./ui-BdLutnCT.js";
4
4
  import { c as i, o as a, s as o } from "./tooltip-_geGvbS7.js";
5
5
  import { g as s, h as c, m as l, p as u } from "./sheet-C2vx5V6Q.js";
6
6
  import { i as d, l as f, n as p, t as m, u as h } from "./select-KWMg2_7Z.js";
7
- import * as g from "react";
8
- import { useEffect as _, useMemo as v, useRef as y, useState as b } from "react";
9
- import { jsx as x, jsxs as S } from "react/jsx-runtime";
10
- import { CalendarIcon as C, CheckIcon as w, ChevronDownIcon as T, PlusIcon as E, SearchIcon as D, XIcon as O } from "lucide-react";
11
- import { Command as k } from "cmdk";
12
- import { format as A } from "date-fns";
7
+ import { n as g } from "./MultiSelect-BAIbW9Ge.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 E, 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";
13
14
  //#region src/components/core/inputs/DatePicker.tsx
14
- var j = ({ date: n, onDateChange: a, placeholder: o }) => {
15
- let s = t(), [c, l] = b(!1), u = y(null);
16
- return _(() => {
15
+ var M = ({ date: n, onDateChange: a, placeholder: o }) => {
16
+ let s = t(), [c, l] = x(!1), u = b(null);
17
+ return v(() => {
17
18
  if (!c) return;
18
19
  let e = (e) => {
19
20
  u.current !== null && !u.current.contains(e.target) && l(!1);
@@ -21,20 +22,20 @@ var j = ({ date: n, onDateChange: a, placeholder: o }) => {
21
22
  return document.addEventListener("mousedown", e), () => {
22
23
  document.removeEventListener("mousedown", e);
23
24
  };
24
- }, [c]), /* @__PURE__ */ S("div", {
25
+ }, [c]), /* @__PURE__ */ C("div", {
25
26
  ref: u,
26
27
  className: "relative w-full",
27
- children: [/* @__PURE__ */ S(i, {
28
+ children: [/* @__PURE__ */ C(i, {
28
29
  variant: "outline",
29
30
  type: "button",
30
31
  onClick: () => {
31
32
  l((e) => !e);
32
33
  },
33
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"),
34
- children: [/* @__PURE__ */ x(C, { className: "mr-2 size-4 shrink-0" }), n === void 0 ? /* @__PURE__ */ x("span", { children: o }) : A(n, "dd/MM/yyyy", { locale: s })]
35
- }), c ? /* @__PURE__ */ x("div", {
35
+ children: [/* @__PURE__ */ S(w, { className: "mr-2 size-4 shrink-0" }), n === void 0 ? /* @__PURE__ */ S("span", { children: o }) : j(n, "dd/MM/yyyy", { locale: s })]
36
+ }), c ? /* @__PURE__ */ S("div", {
36
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",
37
- children: /* @__PURE__ */ x(r, {
38
+ children: /* @__PURE__ */ S(r, {
38
39
  mode: "single",
39
40
  locale: s,
40
41
  defaultMonth: n,
@@ -45,28 +46,28 @@ var j = ({ date: n, onDateChange: a, placeholder: o }) => {
45
46
  })
46
47
  }) : null]
47
48
  });
48
- }, M = (e) => e ? {
49
+ }, N = (e) => e ? {
49
50
  from: e.from,
50
51
  to: e.to
51
- } : void 0, N = ({ value: a, onChange: o, placeholder: s, className: d }) => {
52
- let { t: f } = n(), p = t(), [m, h] = g.useState(!1), [_, v] = g.useState(M(a));
53
- return g.useEffect(() => {
54
- m && v(M(a));
55
- }, [m, a]), /* @__PURE__ */ x("div", {
52
+ } : void 0, P = ({ value: a, onChange: o, placeholder: s, className: d }) => {
53
+ let { t: f } = n(), p = t(), [m, h] = _.useState(!1), [g, v] = _.useState(N(a));
54
+ return _.useEffect(() => {
55
+ m && v(N(a));
56
+ }, [m, a]), /* @__PURE__ */ S("div", {
56
57
  className: e("grid gap-2", d),
57
- children: /* @__PURE__ */ S(u, {
58
+ children: /* @__PURE__ */ C(u, {
58
59
  open: m,
59
60
  onOpenChange: h,
60
- children: [/* @__PURE__ */ x(c, {
61
+ children: [/* @__PURE__ */ S(c, {
61
62
  asChild: !0,
62
- children: /* @__PURE__ */ S(i, {
63
+ children: /* @__PURE__ */ C(i, {
63
64
  id: "date",
64
65
  variant: "outline",
65
66
  className: e("w-[300px] justify-start text-left font-normal", !a?.from && "text-muted-foreground"),
66
67
  children: [
67
- /* @__PURE__ */ x(C, { className: "mr-2 size-4" }),
68
- ((e) => e?.from ? !e.to || e.from.getTime() === e.to.getTime() ? A(e.from, "dd MMM yyyy", { locale: p }) : `${A(e.from, "dd MMM yyyy", { locale: p })} - ${A(e.to, "dd MMM yyyy", { locale: p })}` : s ?? f("date.pickPeriod"))(a),
69
- a?.from && /* @__PURE__ */ x(i, {
68
+ /* @__PURE__ */ S(w, { 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__ */ S(i, {
70
71
  type: "button",
71
72
  variant: "ghost",
72
73
  size: "icon",
@@ -75,46 +76,46 @@ var j = ({ date: n, onDateChange: a, placeholder: o }) => {
75
76
  onClick: (e) => {
76
77
  e.stopPropagation(), o(void 0), h(!1);
77
78
  },
78
- children: /* @__PURE__ */ x(O, { className: "size-4" })
79
+ children: /* @__PURE__ */ S(k, { className: "size-4" })
79
80
  })
80
81
  ]
81
82
  })
82
- }), /* @__PURE__ */ S(l, {
83
+ }), /* @__PURE__ */ C(l, {
83
84
  className: "w-auto p-0",
84
85
  align: "start",
85
86
  side: "bottom",
86
87
  sideOffset: 4,
87
- children: [/* @__PURE__ */ x(r, {
88
+ children: [/* @__PURE__ */ S(r, {
88
89
  mode: "range",
89
90
  resetOnSelect: !0,
90
- defaultMonth: _?.from,
91
- selected: _,
91
+ defaultMonth: g?.from,
92
+ selected: g,
92
93
  onSelect: v,
93
94
  numberOfMonths: 2,
94
95
  locale: p,
95
96
  className: "pointer-events-auto p-3"
96
- }), /* @__PURE__ */ S("div", {
97
+ }), /* @__PURE__ */ C("div", {
97
98
  className: "flex items-center justify-between border-t border-border px-3 py-2",
98
- children: [/* @__PURE__ */ x(i, {
99
+ children: [/* @__PURE__ */ S(i, {
99
100
  variant: "ghost",
100
101
  size: "sm",
101
102
  onClick: () => {
102
103
  v(void 0);
103
104
  },
104
105
  children: f("actions.clear")
105
- }), /* @__PURE__ */ S("div", {
106
+ }), /* @__PURE__ */ C("div", {
106
107
  className: "flex gap-2",
107
- children: [/* @__PURE__ */ x(i, {
108
+ children: [/* @__PURE__ */ S(i, {
108
109
  variant: "ghost",
109
110
  size: "sm",
110
111
  onClick: () => {
111
- v(M(a)), h(!1);
112
+ v(N(a)), h(!1);
112
113
  },
113
114
  children: f("actions.cancel")
114
- }), /* @__PURE__ */ x(i, {
115
+ }), /* @__PURE__ */ S(i, {
115
116
  size: "sm",
116
117
  onClick: () => {
117
- o(_), h(!1);
118
+ o(g), h(!1);
118
119
  },
119
120
  children: f("actions.apply")
120
121
  })]
@@ -123,35 +124,36 @@ var j = ({ date: n, onDateChange: a, placeholder: o }) => {
123
124
  })]
124
125
  })
125
126
  });
126
- }, P = ({ options: t = [], value: r, onChange: i, onClear: s, searchable: g = !1, onCreate: _, placeholder: y, searchPlaceholder: C, emptyLabel: A, createLabel: j, disabled: M = !1, modal: N = !0, variant: P = "input", className: F, ...I }) => {
127
- let { t: L } = n(), [R, z] = b(!1), [B, V] = b(""), H = P === "filter" ? a : void 0, U = r !== void 0 && r !== "", W = v(() => U ? t.find((e) => e.value === r) : void 0, [
128
- U,
127
+ }, F = ({ options: t = [], value: r, onChange: i, onClear: s, searchable: _ = !1, onCreate: v, placeholder: b, searchPlaceholder: w, emptyLabel: j, createLabel: M, disabled: N = !1, modal: P = !0, variant: F = "input", className: I, ...L }) => {
128
+ let { t: R } = n(), [z, B] = x(!1), [V, H] = x(""), U = F === "filter" ? a : void 0, W = r !== void 0 && r !== "", G = y(() => W ? t.find((e) => e.value === r) : void 0, [
129
+ W,
129
130
  t,
130
131
  r
131
- ]), G = U ? W?.label ?? r : void 0;
132
- if (!g) return /* @__PURE__ */ S(m, {
132
+ ]), K = W ? G?.label ?? r : void 0;
133
+ if (!_) return /* @__PURE__ */ C(m, {
133
134
  value: r ?? "",
134
135
  onValueChange: i,
135
- disabled: M,
136
- children: [/* @__PURE__ */ x(f, {
137
- ...I,
138
- className: e(!U && "text-muted-foreground", H, F),
139
- onClear: s !== void 0 && U && !M ? (e) => {
136
+ disabled: N,
137
+ children: [/* @__PURE__ */ S(f, {
138
+ ...L,
139
+ className: e(!W && "text-muted-foreground", U, I),
140
+ onClear: s !== void 0 && W && !N ? (e) => {
140
141
  e.preventDefault(), e.stopPropagation(), s();
141
142
  } : void 0,
142
- children: /* @__PURE__ */ x(h, { placeholder: y ?? L("select.placeholder") })
143
- }), /* @__PURE__ */ x(p, { children: t.map((e) => /* @__PURE__ */ x(d, {
143
+ children: /* @__PURE__ */ S(h, { placeholder: b ?? R("select.placeholder") })
144
+ }), /* @__PURE__ */ S(p, { children: t.map((e) => /* @__PURE__ */ S(d, {
144
145
  value: e.value,
145
146
  disabled: e.disabled,
146
- children: /* @__PURE__ */ S("span", {
147
+ children: /* @__PURE__ */ C("span", {
147
148
  className: "flex items-center",
148
149
  children: [
149
- e.color !== void 0 && /* @__PURE__ */ x("span", {
150
+ g(e.imageUrl, "mr-2"),
151
+ e.color !== void 0 && /* @__PURE__ */ S("span", {
150
152
  className: "mr-2 size-2.5 shrink-0 rounded-full",
151
153
  style: { backgroundColor: e.color }
152
154
  }),
153
155
  e.label,
154
- e.description !== void 0 && /* @__PURE__ */ S("span", {
156
+ e.description !== void 0 && /* @__PURE__ */ C("span", {
155
157
  className: "ml-1 text-muted-foreground",
156
158
  children: [
157
159
  "(",
@@ -163,49 +165,50 @@ var j = ({ date: n, onDateChange: a, placeholder: o }) => {
163
165
  })
164
166
  }, e.value)) })]
165
167
  });
166
- let K = B.trim(), q = _ !== void 0 && K !== "" && !t.some((e) => e.label.toLowerCase() === K.toLowerCase()), J = (e) => {
167
- z(e), e || V("");
168
- }, Y = (e) => {
169
- i(e), J(!1);
170
- }, X = () => {
171
- _?.(K), J(!1);
168
+ let q = V.trim(), J = v !== void 0 && q !== "" && !t.some((e) => e.label.toLowerCase() === q.toLowerCase()), Y = (e) => {
169
+ B(e), e || H("");
170
+ }, X = (e) => {
171
+ i(e), Y(!1);
172
+ }, Z = () => {
173
+ v?.(q), Y(!1);
172
174
  };
173
- return /* @__PURE__ */ S(u, {
174
- open: R,
175
- onOpenChange: J,
176
- modal: N,
177
- children: [/* @__PURE__ */ x(c, {
175
+ return /* @__PURE__ */ C(u, {
176
+ open: z,
177
+ onOpenChange: Y,
178
+ modal: P,
179
+ children: [/* @__PURE__ */ S(c, {
178
180
  asChild: !0,
179
- children: /* @__PURE__ */ S("button", {
180
- ...I,
181
+ children: /* @__PURE__ */ C("button", {
182
+ ...L,
181
183
  type: "button",
182
184
  role: "combobox",
183
- "aria-expanded": R,
184
- disabled: M,
185
- 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),
186
- children: [/* @__PURE__ */ S("span", {
185
+ "aria-expanded": z,
186
+ disabled: N,
187
+ 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),
188
+ children: [/* @__PURE__ */ C("span", {
187
189
  className: "flex items-center truncate",
188
190
  children: [
189
- W?.color && /* @__PURE__ */ x("span", {
191
+ g(G?.imageUrl, "mr-2"),
192
+ G?.color && /* @__PURE__ */ S("span", {
190
193
  className: "mr-2 size-2.5 shrink-0 rounded-full",
191
- style: { backgroundColor: W.color }
194
+ style: { backgroundColor: G.color }
192
195
  }),
193
- /* @__PURE__ */ x("span", {
196
+ /* @__PURE__ */ S("span", {
194
197
  className: "truncate",
195
- children: G ?? y ?? L("select.placeholder")
198
+ children: K ?? b ?? R("select.placeholder")
196
199
  }),
197
- W?.description !== void 0 && /* @__PURE__ */ S("span", {
200
+ G?.description !== void 0 && /* @__PURE__ */ C("span", {
198
201
  className: "ml-1 truncate text-muted-foreground",
199
202
  children: [
200
203
  "(",
201
- W.description,
204
+ G.description,
202
205
  ")"
203
206
  ]
204
207
  })
205
208
  ]
206
- }), /* @__PURE__ */ S("div", {
209
+ }), /* @__PURE__ */ C("div", {
207
210
  className: "flex items-center gap-1",
208
- children: [s && U && !M && /* @__PURE__ */ x("span", {
211
+ children: [s && W && !N && /* @__PURE__ */ S("span", {
209
212
  role: "button",
210
213
  tabIndex: -1,
211
214
  onClick: (e) => {
@@ -215,55 +218,56 @@ var j = ({ date: n, onDateChange: a, placeholder: o }) => {
215
218
  e.preventDefault(), e.stopPropagation(), s();
216
219
  },
217
220
  className: "text-muted-foreground hover:text-foreground",
218
- children: /* @__PURE__ */ x(O, { className: "size-4" })
219
- }), /* @__PURE__ */ x(T, { className: e("size-4 shrink-0 opacity-50 transition-transform", R && "rotate-180") })]
221
+ children: /* @__PURE__ */ S(k, { className: "size-4" })
222
+ }), /* @__PURE__ */ S(E, { className: e("size-4 shrink-0 opacity-50 transition-transform", z && "rotate-180") })]
220
223
  })]
221
224
  })
222
- }), /* @__PURE__ */ x(l, {
225
+ }), /* @__PURE__ */ S(l, {
223
226
  className: "w-[var(--radix-popover-trigger-width)] p-0",
224
227
  align: "start",
225
- children: /* @__PURE__ */ S(k, {
228
+ children: /* @__PURE__ */ C(A, {
226
229
  className: "flex flex-col",
227
230
  filter: (e, t, n) => +!!(n ?? []).join(" ").toLowerCase().includes(t.trim().toLowerCase()),
228
- children: [/* @__PURE__ */ x("div", {
231
+ children: [/* @__PURE__ */ S("div", {
229
232
  className: "border-b border-border p-2",
230
- children: /* @__PURE__ */ S("div", {
233
+ children: /* @__PURE__ */ C("div", {
231
234
  className: "relative",
232
- children: [/* @__PURE__ */ x(D, { className: "absolute left-2 top-1/2 h-3.5 w-3.5 -translate-y-1/2 text-muted-foreground" }), /* @__PURE__ */ x(k.Input, {
233
- value: B,
234
- onValueChange: V,
235
- placeholder: C ?? L("search.placeholder"),
235
+ children: [/* @__PURE__ */ S(O, { className: "absolute left-2 top-1/2 h-3.5 w-3.5 -translate-y-1/2 text-muted-foreground" }), /* @__PURE__ */ S(A.Input, {
236
+ value: V,
237
+ onValueChange: H,
238
+ placeholder: w ?? R("search.placeholder"),
236
239
  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",
237
240
  autoFocus: !0
238
241
  })]
239
242
  })
240
- }), /* @__PURE__ */ S(k.List, {
243
+ }), /* @__PURE__ */ C(A.List, {
241
244
  className: "flex flex-col gap-0.5 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",
242
245
  children: [
243
- !q && /* @__PURE__ */ x(k.Empty, {
246
+ !J && /* @__PURE__ */ S(A.Empty, {
244
247
  className: "px-2 py-3 text-center text-xs text-muted-foreground",
245
- children: A ?? L("states.noResult")
248
+ children: j ?? R("states.noResult")
246
249
  }),
247
- t.map((t) => /* @__PURE__ */ S(k.Item, {
250
+ t.map((t) => /* @__PURE__ */ C(A.Item, {
248
251
  value: t.value,
249
252
  keywords: [t.label, t.description ?? ""],
250
253
  disabled: t.disabled,
251
254
  onSelect: () => {
252
- Y(t.value);
255
+ X(t.value);
253
256
  },
254
257
  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 data-[disabled=true]:cursor-not-allowed data-[disabled=true]:opacity-50",
255
258
  children: [
256
- /* @__PURE__ */ x(w, { className: e("size-4 shrink-0", r === t.value ? "opacity-100" : "opacity-0") }),
257
- t.color && /* @__PURE__ */ x("span", {
259
+ /* @__PURE__ */ S(T, { className: e("size-4 shrink-0", r === t.value ? "opacity-100" : "opacity-0") }),
260
+ g(t.imageUrl),
261
+ t.color && /* @__PURE__ */ S("span", {
258
262
  className: "size-2.5 shrink-0 rounded-full",
259
263
  style: { backgroundColor: t.color }
260
264
  }),
261
- /* @__PURE__ */ x("span", {
265
+ /* @__PURE__ */ S("span", {
262
266
  className: "min-w-0 flex-1 truncate",
263
267
  title: t.label,
264
268
  children: t.label
265
269
  }),
266
- t.description !== void 0 && /* @__PURE__ */ S("span", {
270
+ t.description !== void 0 && /* @__PURE__ */ C("span", {
267
271
  className: "shrink-0 truncate text-muted-foreground",
268
272
  children: [
269
273
  "(",
@@ -273,14 +277,14 @@ var j = ({ date: n, onDateChange: a, placeholder: o }) => {
273
277
  })
274
278
  ]
275
279
  }, t.value)),
276
- q && /* @__PURE__ */ S(k.Item, {
280
+ J && /* @__PURE__ */ C(A.Item, {
277
281
  forceMount: !0,
278
282
  value: "__create__",
279
- onSelect: X,
283
+ onSelect: Z,
280
284
  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",
281
- children: [/* @__PURE__ */ x(E, { className: "size-4 shrink-0" }), /* @__PURE__ */ x("span", {
285
+ children: [/* @__PURE__ */ S(D, { className: "size-4 shrink-0" }), /* @__PURE__ */ S("span", {
282
286
  className: "truncate",
283
- children: j ? j(K) : L("select.create", { search: K })
287
+ children: M ? M(q) : R("select.create", { search: q })
284
288
  })]
285
289
  })
286
290
  ]
@@ -288,13 +292,13 @@ var j = ({ date: n, onDateChange: a, placeholder: o }) => {
288
292
  })
289
293
  })]
290
294
  });
291
- }, F = ({ searchQuery: t, search: r, placeholder: i, onSearch: a, onSubmit: o, onClear: c, className: l }) => {
295
+ }, I = ({ searchQuery: t, search: r, placeholder: i, onSearch: a, onSubmit: o, onClear: c, className: l }) => {
292
296
  let { t: u } = n(), d = t ?? r ?? "";
293
- return /* @__PURE__ */ S("div", {
297
+ return /* @__PURE__ */ C("div", {
294
298
  className: e("relative h-fit w-full md:w-64", l),
295
299
  children: [
296
- /* @__PURE__ */ x(D, { className: "absolute left-3 top-1/2 transform -translate-y-1/2 text-muted-foreground w-4 h-4" }),
297
- /* @__PURE__ */ x(s, {
300
+ /* @__PURE__ */ S(O, { className: "absolute left-3 top-1/2 transform -translate-y-1/2 text-muted-foreground w-4 h-4" }),
301
+ /* @__PURE__ */ S(s, {
298
302
  placeholder: i ?? u("search.placeholder"),
299
303
  value: d,
300
304
  onChange: (e) => {
@@ -305,16 +309,16 @@ var j = ({ date: n, onDateChange: a, placeholder: o }) => {
305
309
  e.key === "Enter" && o !== void 0 && (e.preventDefault(), o());
306
310
  }
307
311
  }),
308
- d === "" ? null : /* @__PURE__ */ x("button", {
312
+ d === "" ? null : /* @__PURE__ */ S("button", {
309
313
  onClick: () => {
310
314
  a(""), c !== void 0 && c();
311
315
  },
312
316
  className: "absolute right-3 top-1/2 -translate-y-1/2 text-gray-500 hover:text-gray-700",
313
317
  type: "button",
314
- children: /* @__PURE__ */ x(O, { className: "size-4" })
318
+ children: /* @__PURE__ */ S(k, { className: "size-4" })
315
319
  })
316
320
  ]
317
321
  });
318
322
  };
319
323
  //#endregion
320
- export { j as i, P as n, N as r, F as t };
324
+ export { M as i, F as n, P as r, I as t };
@@ -1,4 +1,4 @@
1
1
  import { I as e } from "../../../ui-BdLutnCT.js";
2
2
  import { A as t, D as n, E as r, F as i, M as a, N as o, O as s, P as c, j as l, k as u } from "../../../sheet-C2vx5V6Q.js";
3
- import { n as d, r as f, t as p } from "../../../dialogs-pgWKP4su.js";
3
+ import { n as d, r as f, t as p } from "../../../dialogs-BSl4lTGR.js";
4
4
  export { f as AppDialog, p as ConfirmationDialog, r as Dialog, n as DialogClose, s as DialogContent, u as DialogDescription, t as DialogFooter, l as DialogHeader, a as DialogOverlay, o as DialogPortal, c as DialogTitle, i as DialogTrigger, d as FormDialog, e as Progress };
@@ -3,8 +3,8 @@ import { t } from "../../../i18n-Iyf3fyzr.js";
3
3
  import { At as n, Pn as r } from "../../../ui-BdLutnCT.js";
4
4
  import { c as i } from "../../../tooltip-_geGvbS7.js";
5
5
  import { a, g as o, l as s, o as c, r as l, t as u, u as d } from "../../../sheet-C2vx5V6Q.js";
6
- import { t as f } from "../../../MultiSelect-DmdYovWw.js";
7
- import { i as p, n as m, r as h, t as g } from "../../../SearchInput-KWshEFFU.js";
6
+ import { t as f } from "../../../MultiSelect-BAIbW9Ge.js";
7
+ import { i as p, n as m, r as h, t as g } from "../../../SearchInput-BZKtBGfH.js";
8
8
  import { useEffect as _, useMemo as v, useState as y } from "react";
9
9
  import { jsx as b, jsxs as x } from "react/jsx-runtime";
10
10
  import { getLocale as S } from "@krosoft/core/helpers";
@@ -1,2 +1,2 @@
1
- import { t as e } from "../../../GenericForm-CwbtZNXB.js";
1
+ import { t as e } from "../../../GenericForm-p_iFnXCI.js";
2
2
  export { e as GenericForm };
@@ -3,17 +3,17 @@ import { I as o } from "../../ui-BdLutnCT.js";
3
3
  import { A as s, D as c, E as l, F as u, M as d, N as f, O as p, P as m, j as h, k as g } from "../../sheet-C2vx5V6Q.js";
4
4
  import { a as _, c as v, i as y, n as b, o as x, r as S, s as C, t as w } from "../../charts-BDlyl5wa.js";
5
5
  import { t as T } from "../../ErrorAlert-DrjpMJu6.js";
6
- import { n as E, r as D, t as O } from "../../dialogs-pgWKP4su.js";
6
+ import { n as E, r as D, t as O } from "../../dialogs-BSl4lTGR.js";
7
7
  import { t as k } from "../../ImageInput-B6NH8JDS.js";
8
8
  import { t as A } from "../../AppActions-CvT8dDnQ.js";
9
9
  import { t as j } from "../../AppSubTitle-DJQjeSdC.js";
10
- import { t as M } from "../../MultiSelect-DmdYovWw.js";
11
- import { t as N } from "../../GenericForm-CwbtZNXB.js";
12
- import { i as P, n as F, r as I, t as L } from "../../SearchInput-KWshEFFU.js";
10
+ import { t as M } from "../../MultiSelect-BAIbW9Ge.js";
11
+ import { t as N } from "../../GenericForm-p_iFnXCI.js";
12
+ import { i as P, n as F, r as I, t as L } from "../../SearchInput-BZKtBGfH.js";
13
13
  import { ActiveFilters as R, AdvancedFilters as z, FilterField as B, FilterPills as V, FilterPillsGroup as H, TableFilter as U } from "./filters/index.js";
14
14
  import "./forms/index.js";
15
15
  import { n as W, t as G } from "../../icons-n0m_1w7z.js";
16
- import { t as K } from "../../inputs-DrA-HJOt.js";
16
+ import { t as K } from "../../inputs-e0dg-VvS.js";
17
17
  import { t as q } from "../../language-DgO7XgOg.js";
18
18
  import { t as J } from "../../AppTitle-BShUHen9.js";
19
19
  import { n as Y, t as X } from "../../states-Bs9lIWQe.js";
@@ -3,6 +3,8 @@ import type { SelectOption } from "@krosoft/core/types";
3
3
  export interface MultiSelectOption extends SelectOption {
4
4
  /** Option visible mais non basculable : grisée, ignorée par le clic, la navigation clavier et les actions globales. */
5
5
  disabled?: boolean;
6
+ /** Vignette affichée avant le libellé dans la liste. Définie (URL) → image ; définie à `null`/`""` → placeholder gris ; absente → pas de vignette. */
7
+ imageUrl?: string | null;
6
8
  }
7
9
  /**
8
10
  * Les props non reconnues (et la `ref`) sont relayées au bouton du trigger : c'est ce qui permet à un
@@ -1 +1 @@
1
- {"version":3,"file":"MultiSelect.d.ts","sourceRoot":"","sources":["../../../../src/components/core/inputs/MultiSelect.tsx"],"names":[],"mappings":"AACA,OAAO,KAA4B,MAAM,OAAO,CAAC;AAKjD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAExD,MAAM,WAAW,iBAAkB,SAAQ,YAAY;IACrD,uHAAuH;IACvH,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED;;;;;GAKG;AACH,UAAU,gBAAgB,CAAC,CAAC,SAAS,MAAM,GAAG,MAAM,CAAE,SAAQ,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,QAAQ,CAAC,EAAE,UAAU,GAAG,UAAU,GAAG,UAAU,GAAG,UAAU,GAAG,OAAO,CAAC;IAC7J,OAAO,EAAE,iBAAiB,EAAE,CAAC;IAC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UAAU,GAAG,UAAU,GAAG,OAAO,CAAC;IAC7J,OAAO,EAAE,iBAAiB,EAAE,CAAC;IAC7B,QAAQ,EAAE,CAAC,EAAE,CAAC;IACd,QAAQ,EAAE,CAAC,GAAG,EAAE,CAAC,KAAK,IAAI,CAAC;IAC3B,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,WAAW,CAAC,EAAE,CAAC,MAAM,EAAE,CAAC,EAAE,KAAK,IAAI,CAAC;IACpC;;;;;OAKG;IACH,OAAO,CAAC,EAAE,OAAO,GAAG,QAAQ,GAAG,MAAM,CAAC;IACtC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,2DAA2D;IAC3D,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,iHAAiH;IACjH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,eAAO,MAAM,WAAW,GAAI,CAAC,SAAS,MAAM,GAAG,MAAM,EAAE,sKAepD,gBAAgB,CAAC,CAAC,CAAC,KAAG,KAAK,CAAC,YAoO9B,CAAC"}
@@ -5,6 +5,8 @@ export interface SingleSelectOption extends SelectOption {
5
5
  description?: string;
6
6
  /** Option visible mais non sélectionnable : grisée, ignorée par le clic et par la navigation clavier. */
7
7
  disabled?: boolean;
8
+ /** Vignette affichée avant le libellé. Définie (URL) → image ; définie à `null`/`""` → placeholder gris ; absente → pas de vignette. */
9
+ imageUrl?: string | null;
8
10
  }
9
11
  /**
10
12
  * Les props non reconnues (et la `ref`) sont relayées au bouton du trigger, dans les deux modes : c'est ce
@@ -1 +1 @@
1
- {"version":3,"file":"SingleSelect.d.ts","sourceRoot":"","sources":["../../../../src/components/core/inputs/SingleSelect.tsx"],"names":[],"mappings":"AACA,OAAO,KAA4B,MAAM,OAAO,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 -1,5 +1,5 @@
1
1
  import { t as e } from "../../../ImageInput-B6NH8JDS.js";
2
- import { t } from "../../../MultiSelect-DmdYovWw.js";
3
- import { i as n, n as r, r as i, t as a } from "../../../SearchInput-KWshEFFU.js";
4
- import { t as o } from "../../../inputs-DrA-HJOt.js";
2
+ import { t } from "../../../MultiSelect-BAIbW9Ge.js";
3
+ import { i as n, n as r, r as i, t as a } from "../../../SearchInput-BZKtBGfH.js";
4
+ import { t as o } from "../../../inputs-e0dg-VvS.js";
5
5
  export { n as DatePicker, i as DateRangePicker, e as ImageInput, t as MultiSelect, o as RatingInput, a as SearchInput, r as SingleSelect };
@@ -0,0 +1,7 @@
1
+ import React from "react";
2
+ /**
3
+ * Vignette d'une option de select (partagée par `SingleSelect` et `MultiSelect`).
4
+ * URL → image ; `null`/`""` → placeholder gris ; `undefined` → rien (option sans vignette).
5
+ */
6
+ export declare const renderOptionThumbnail: (imageUrl: string | null | undefined, className?: string) => React.ReactNode;
7
+ //# sourceMappingURL=select.helper.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"select.helper.d.ts","sourceRoot":"","sources":["../../../../src/components/core/inputs/select.helper.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B;;;GAGG;AACH,eAAO,MAAM,qBAAqB,GAAI,UAAU,MAAM,GAAG,IAAI,GAAG,SAAS,EAAE,YAAY,MAAM,KAAG,KAAK,CAAC,SASrG,CAAC"}
@@ -8,16 +8,16 @@ import { a as ur, c as dr, i as fr, l as pr, n as mr, o as hr, r as gr, s as _r,
8
8
  import { t as br } from "../skeleton-D6Ga4BLw.js";
9
9
  import { a as xr, c as Sr, i as Cr, n as wr, o as Tr, r as Er, s as Dr, t as Or } from "../charts-BDlyl5wa.js";
10
10
  import { t as kr } from "../ErrorAlert-DrjpMJu6.js";
11
- import { n as Ar, r as jr, t as Mr } from "../dialogs-pgWKP4su.js";
11
+ import { n as Ar, r as jr, t as Mr } from "../dialogs-BSl4lTGR.js";
12
12
  import { t as Nr } from "../ImageInput-B6NH8JDS.js";
13
13
  import { t as Pr } from "../AppActions-CvT8dDnQ.js";
14
14
  import { t as Fr } from "../AppSubTitle-DJQjeSdC.js";
15
- import { t as Ir } from "../MultiSelect-DmdYovWw.js";
16
- import { t as Lr } from "../GenericForm-CwbtZNXB.js";
17
- import { i as Rr, n as zr, r as Br, t as Vr } from "../SearchInput-KWshEFFU.js";
15
+ import { t as Ir } from "../MultiSelect-BAIbW9Ge.js";
16
+ import { t as Lr } from "../GenericForm-p_iFnXCI.js";
17
+ import { i as Rr, n as zr, r as Br, t as Vr } from "../SearchInput-BZKtBGfH.js";
18
18
  import { ActiveFilters as Hr, AdvancedFilters as Ur, FilterField as Wr, FilterPills as Gr, FilterPillsGroup as Kr, TableFilter as qr } from "./core/filters/index.js";
19
19
  import { n as Jr, t as Yr } from "../icons-n0m_1w7z.js";
20
- import { t as Xr } from "../inputs-DrA-HJOt.js";
20
+ import { t as Xr } from "../inputs-e0dg-VvS.js";
21
21
  import { t as Zr } from "../language-DgO7XgOg.js";
22
22
  import { t as Qr } from "../AppTitle-BShUHen9.js";
23
23
  import { n as $r, t as ei } from "../states-Bs9lIWQe.js";
@@ -4,7 +4,7 @@ import { Bn as n, Gn as r, Hn as i, I as a, Kn as o, Un as s, Wn as c, qn as l }
4
4
  import { c as u } from "./tooltip-_geGvbS7.js";
5
5
  import { E as d, O as f, P as p, j as m, k as h } from "./sheet-C2vx5V6Q.js";
6
6
  import { t as g } from "./ErrorAlert-DrjpMJu6.js";
7
- import { t as _ } from "./GenericForm-CwbtZNXB.js";
7
+ import { t as _ } from "./GenericForm-p_iFnXCI.js";
8
8
  import { useEffect as v, useId as y, useState as b } from "react";
9
9
  import { Fragment as x, jsx as S, jsxs as C } from "react/jsx-runtime";
10
10
  import { Pen as w, Save as T, X as E } from "lucide-react";
@@ -1,7 +1,7 @@
1
1
  import { t as e } from "./tailwind.helper-CJaRYBmL.js";
2
2
  import "./ImageInput-B6NH8JDS.js";
3
- import "./MultiSelect-DmdYovWw.js";
4
- import "./SearchInput-KWshEFFU.js";
3
+ import "./MultiSelect-BAIbW9Ge.js";
4
+ import "./SearchInput-BZKtBGfH.js";
5
5
  import { jsx as t } from "react/jsx-runtime";
6
6
  import { Heart as n, Star as r } from "lucide-react";
7
7
  //#region src/components/core/inputs/RatingInput.tsx
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@krosoft/react",
3
- "version": "0.0.303",
3
+ "version": "0.0.304",
4
4
  "description": "Krosoft shared React package",
5
5
  "type": "module",
6
6
  "scripts": {