@krosoft/react 0.0.304 → 0.0.305

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-BAIbW9Ge.js";
11
+ import { t as S } from "./MultiSelect-0iYNlt_e.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";
@@ -12,9 +12,9 @@ var _ = (t, n) => t === void 0 ? null : t ? /* @__PURE__ */ d("img", {
12
12
  src: t,
13
13
  alt: "",
14
14
  loading: "lazy",
15
- className: e("h-7 w-10 shrink-0 rounded object-cover", n)
15
+ className: e("h-9 w-12 shrink-0 rounded object-cover", n)
16
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),
17
+ className: e("flex h-9 w-12 shrink-0 items-center justify-center rounded bg-muted text-[9px] text-muted-foreground", n),
18
18
  children: "—"
19
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
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) => {
@@ -4,7 +4,7 @@ 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 { n as g } from "./MultiSelect-BAIbW9Ge.js";
7
+ import { n as g } from "./MultiSelect-0iYNlt_e.js";
8
8
  import * as _ from "react";
9
9
  import { useEffect as v, useMemo as y, useRef as b, useState as x } from "react";
10
10
  import { jsx as S, jsxs as C } from "react/jsx-runtime";
@@ -185,10 +185,10 @@ var M = ({ date: n, onDateChange: a, placeholder: o }) => {
185
185
  "aria-expanded": z,
186
186
  disabled: N,
187
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", {
189
- className: "flex items-center truncate",
188
+ children: [/* @__PURE__ */ C("div", {
189
+ className: "flex min-w-0 items-center truncate",
190
190
  children: [
191
- g(G?.imageUrl, "mr-2"),
191
+ g(G?.imageUrl, "mr-2 h-6 w-8"),
192
192
  G?.color && /* @__PURE__ */ S("span", {
193
193
  className: "mr-2 size-2.5 shrink-0 rounded-full",
194
194
  style: { backgroundColor: G.color }
@@ -254,9 +254,8 @@ var M = ({ date: n, onDateChange: a, placeholder: o }) => {
254
254
  onSelect: () => {
255
255
  X(t.value);
256
256
  },
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",
257
+ 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",
258
258
  children: [
259
- /* @__PURE__ */ S(T, { className: e("size-4 shrink-0", r === t.value ? "opacity-100" : "opacity-0") }),
260
259
  g(t.imageUrl),
261
260
  t.color && /* @__PURE__ */ S("span", {
262
261
  className: "size-2.5 shrink-0 rounded-full",
@@ -274,7 +273,8 @@ var M = ({ date: n, onDateChange: a, placeholder: o }) => {
274
273
  t.description,
275
274
  ")"
276
275
  ]
277
- })
276
+ }),
277
+ /* @__PURE__ */ S(T, { className: e("ml-auto size-4 shrink-0", r === t.value ? "opacity-100" : "opacity-0") })
278
278
  ]
279
279
  }, t.value)),
280
280
  J && /* @__PURE__ */ C(A.Item, {
@@ -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-BSl4lTGR.js";
3
+ import { n as d, r as f, t as p } from "../../../dialogs-BwObbaoM.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-BAIbW9Ge.js";
7
- import { i as p, n as m, r as h, t as g } from "../../../SearchInput-BZKtBGfH.js";
6
+ import { t as f } from "../../../MultiSelect-0iYNlt_e.js";
7
+ import { i as p, n as m, r as h, t as g } from "../../../SearchInput-sg_-w8UW.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-p_iFnXCI.js";
1
+ import { t as e } from "../../../GenericForm-DBLeKiPm.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-BSl4lTGR.js";
6
+ import { n as E, r as D, t as O } from "../../dialogs-BwObbaoM.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-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";
10
+ import { t as M } from "../../MultiSelect-0iYNlt_e.js";
11
+ import { t as N } from "../../GenericForm-DBLeKiPm.js";
12
+ import { i as P, n as F, r as I, t as L } from "../../SearchInput-sg_-w8UW.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-e0dg-VvS.js";
16
+ import { t as K } from "../../inputs-Cxz5kfwF.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";
@@ -1 +1 @@
1
- {"version":3,"file":"SingleSelect.d.ts","sourceRoot":"","sources":["../../../../src/components/core/inputs/SingleSelect.tsx"],"names":[],"mappings":"AACA,OAAO,KAA4B,MAAM,OAAO,CAAC;AAKjD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAGxD,MAAM,WAAW,kBAAmB,SAAQ,YAAY;IACtD,oIAAoI;IACpI,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,yGAAyG;IACzG,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,wIAAwI;IACxI,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAC1B;AAED;;;;;GAKG;AACH,UAAU,iBAAkB,SAAQ,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,QAAQ,CAAC,EAAE,UAAU,GAAG,UAAU,GAAG,UAAU,GAAG,OAAO,CAAC;IACtH,OAAO,CAAC,EAAE,kBAAkB,EAAE,CAAC;IAC/B,KAAK,EAAE,MAAM,GAAG,SAAS,CAAC;IAC1B,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,gIAAgI;IAChI,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,8GAA8G;IAC9G,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACnC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,WAAW,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,MAAM,CAAC;IACzC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;OAGG;IACH,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB;;;;OAIG;IACH,OAAO,CAAC,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AAO,CAAC;IACnB;;;OAGG;IACH,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB;;;;OAIG;IACH,OAAO,CAAC,EAAE,OAAO,GAAG,QAAQ,CAAC;IAC7B,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,eAAO,MAAM,YAAY,GAAI,4KAgB1B,iBAAiB,KAAG,KAAK,CAAC,YAqL5B,CAAC"}
@@ -1,5 +1,5 @@
1
1
  import { t as e } from "../../../ImageInput-B6NH8JDS.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";
2
+ import { t } from "../../../MultiSelect-0iYNlt_e.js";
3
+ import { i as n, n as r, r as i, t as a } from "../../../SearchInput-sg_-w8UW.js";
4
+ import { t as o } from "../../../inputs-Cxz5kfwF.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 };
@@ -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-BSl4lTGR.js";
11
+ import { n as Ar, r as jr, t as Mr } from "../dialogs-BwObbaoM.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-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";
15
+ import { t as Ir } from "../MultiSelect-0iYNlt_e.js";
16
+ import { t as Lr } from "../GenericForm-DBLeKiPm.js";
17
+ import { i as Rr, n as zr, r as Br, t as Vr } from "../SearchInput-sg_-w8UW.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-e0dg-VvS.js";
20
+ import { t as Xr } from "../inputs-Cxz5kfwF.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-p_iFnXCI.js";
7
+ import { t as _ } from "./GenericForm-DBLeKiPm.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-BAIbW9Ge.js";
4
- import "./SearchInput-BZKtBGfH.js";
3
+ import "./MultiSelect-0iYNlt_e.js";
4
+ import "./SearchInput-sg_-w8UW.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.304",
3
+ "version": "0.0.305",
4
4
  "description": "Krosoft shared React package",
5
5
  "type": "module",
6
6
  "scripts": {