@krosoft/react 0.0.329 → 0.0.331

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 (52) hide show
  1. package/dist/{AppActions-CJiYlj_g.js → AppActions-CqK8g-ry.js} +2 -2
  2. package/dist/{AppSubTitle-Fqo3lk2A.js → AppSubTitle-ByOiQg8S.js} +2 -2
  3. package/dist/{AppTitle-CK5tYl7t.js → AppTitle-I4yLJGmv.js} +1 -1
  4. package/dist/{ErrorAlert-B9xG4dAD.js → ErrorAlert-NmwmpbVN.js} +1 -1
  5. package/dist/{GenericForm-BOoNPBx5.js → GenericForm-DI6udL1l.js} +6 -6
  6. package/dist/{ImageInput-BESvVwnK.js → ImageInput-DTNsRZaT.js} +2 -2
  7. package/dist/{MultiSelect-DQX1rk-t.js → MultiSelect-C7d047Y9.js} +3 -3
  8. package/dist/{SearchInput-BFh0o1RM.js → SearchInput-7uYKK54l.js} +4 -4
  9. package/dist/{behavior-B1Zn_N2M.js → behavior-BcXL-ZOv.js} +1 -1
  10. package/dist/{cards-OMWaiu9p.js → cards-cB4kYZpQ.js} +2 -2
  11. package/dist/{charts-NxoXrN5w.js → charts-CHWqB53l.js} +1 -1
  12. package/dist/components/core/cards/index.js +1 -1
  13. package/dist/components/core/charts/index.js +1 -1
  14. package/dist/components/core/dialogs/index.js +3 -3
  15. package/dist/components/core/filters/ConditionFilter.d.ts +46 -0
  16. package/dist/components/core/filters/ConditionFilter.d.ts.map +1 -0
  17. package/dist/components/core/filters/index.d.ts +1 -0
  18. package/dist/components/core/filters/index.d.ts.map +1 -1
  19. package/dist/components/core/filters/index.js +273 -124
  20. package/dist/components/core/forms/index.js +1 -1
  21. package/dist/components/core/index.js +24 -24
  22. package/dist/components/core/inputs/index.js +4 -4
  23. package/dist/components/core/language/index.js +1 -1
  24. package/dist/components/core/layouts/index.js +8 -8
  25. package/dist/components/core/navbar/index.js +1 -1
  26. package/dist/components/core/states/index.js +2 -2
  27. package/dist/components/core/table/index.js +2 -2
  28. package/dist/components/core/tabs/index.js +5 -5
  29. package/dist/components/core/theme/index.js +1 -1
  30. package/dist/components/index.js +24 -24
  31. package/dist/components/ui/index.js +2 -2
  32. package/dist/{dialogs-BVf-OP_h.js → dialogs-CeB4q0UB.js} +5 -5
  33. package/dist/hooks/behavior/index.js +1 -1
  34. package/dist/hooks/index.js +5 -5
  35. package/dist/hooks/ui/index.js +4 -4
  36. package/dist/i18n/index.js +1 -1
  37. package/dist/i18n/krosoftLocales.d.ts +18 -0
  38. package/dist/i18n/krosoftLocales.d.ts.map +1 -1
  39. package/dist/{i18n-BuQgyJAA.js → i18n-CmJWr9V5.js} +20 -2
  40. package/dist/{inputs-BpZ4hAO1.js → inputs-BiMbj0lF.js} +4 -4
  41. package/dist/{language-CK1Toh4q.js → language-NFREv4sJ.js} +2 -2
  42. package/dist/{navbar-uE-TcuY6.js → navbar-CFV6_0Q8.js} +3 -3
  43. package/dist/pwa/index.js +1 -1
  44. package/dist/{sheet-BtfL6yxE.js → sheet-0N3ZYjHb.js} +1 -1
  45. package/dist/{states-lmDbJIGj.js → states-B45Wppt5.js} +2 -2
  46. package/dist/{theme-nG-VcChv.js → theme-BH6YyXQP.js} +2 -2
  47. package/dist/{ui-yvfaMQwo.js → ui-CB_byKCw.js} +1 -1
  48. package/dist/{ui-pTlOByAk.js → ui-DOXKkmS3.js} +3 -3
  49. package/dist/{useDocumentTitle-Dwdvj0Cq.js → useDocumentTitle-C50DpJU1.js} +1 -1
  50. package/dist/{useLanguage-COBm8fDW.js → useLanguage-B__JHFZi.js} +1 -1
  51. package/dist/{useTheme-DnfZqWof.js → useTheme-C8wQV332.js} +1 -1
  52. package/package.json +2 -2
@@ -1,6 +1,6 @@
1
1
  import { t as e } from "./tailwind.helper-CJaRYBmL.js";
2
- import { t } from "./i18n-BuQgyJAA.js";
3
- import { Bt as n, Ft as r, Gt as i, Nt as a, jt as o } from "./ui-yvfaMQwo.js";
2
+ import { t } from "./i18n-CmJWr9V5.js";
3
+ import { Bt as n, Ft as r, Gt as i, Nt as a, jt as o } from "./ui-CB_byKCw.js";
4
4
  import { c as s } from "./tooltip-_geGvbS7.js";
5
5
  import { t as c } from "./useMobile-pTQ8lWvt.js";
6
6
  import { jsx as l, jsxs as u } from "react/jsx-runtime";
@@ -1,5 +1,5 @@
1
- import { t as e } from "./i18n-BuQgyJAA.js";
2
- import { t } from "./AppActions-CJiYlj_g.js";
1
+ import { t as e } from "./i18n-CmJWr9V5.js";
2
+ import { t } from "./AppActions-CqK8g-ry.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-BuQgyJAA.js";
2
+ import { t } from "./i18n-CmJWr9V5.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-BuQgyJAA.js";
1
+ import { t as e } from "./i18n-CmJWr9V5.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-Dq3AIrue.js";
3
- import { t as i } from "./i18n-BuQgyJAA.js";
4
- import { Ct as a, Dt as o, Et as s, Ot as c, St as l, Tt as u, bn as d, p as f } from "./ui-yvfaMQwo.js";
3
+ import { t as i } from "./i18n-CmJWr9V5.js";
4
+ import { Ct as a, Dt as o, Et as s, Ot as c, St as l, Tt as u, bn as d, p as f } from "./ui-CB_byKCw.js";
5
5
  import { c as p } from "./tooltip-_geGvbS7.js";
6
- import { g as m } from "./sheet-BtfL6yxE.js";
6
+ import { g as m } from "./sheet-0N3ZYjHb.js";
7
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
- import { t as b } from "./ImageInput-BESvVwnK.js";
10
- import { t as x } from "./AppSubTitle-Fqo3lk2A.js";
11
- import { t as S } from "./MultiSelect-DQX1rk-t.js";
9
+ import { t as b } from "./ImageInput-DTNsRZaT.js";
10
+ import { t as x } from "./AppSubTitle-ByOiQg8S.js";
11
+ import { t as S } from "./MultiSelect-C7d047Y9.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,6 +1,6 @@
1
1
  import { t as e } from "./tailwind.helper-CJaRYBmL.js";
2
- import { t } from "./i18n-BuQgyJAA.js";
3
- import "./ui-yvfaMQwo.js";
2
+ import { t } from "./i18n-CmJWr9V5.js";
3
+ import "./ui-CB_byKCw.js";
4
4
  import { c as n } from "./tooltip-_geGvbS7.js";
5
5
  import { t as r } from "./useNotifications-CyhTruIG.js";
6
6
  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-BuQgyJAA.js";
3
- import { Pn as n, bn as r } from "./ui-yvfaMQwo.js";
2
+ import { t } from "./i18n-CmJWr9V5.js";
3
+ import { Pn as n, bn as r } from "./ui-CB_byKCw.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-BtfL6yxE.js";
5
+ import { h as s, m as c, p as l } from "./sheet-0N3ZYjHb.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";
@@ -1,10 +1,10 @@
1
1
  import { t as e } from "./tailwind.helper-CJaRYBmL.js";
2
- import { r as t, t as n } from "./i18n-BuQgyJAA.js";
3
- import { En as r } from "./ui-yvfaMQwo.js";
2
+ import { r as t, t as n } from "./i18n-CmJWr9V5.js";
3
+ import { En as r } from "./ui-CB_byKCw.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-BtfL6yxE.js";
5
+ import { g as s, h as c, m as l, p as u } from "./sheet-0N3ZYjHb.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, r as _ } from "./MultiSelect-DQX1rk-t.js";
7
+ import { n as g, r as _ } from "./MultiSelect-C7d047Y9.js";
8
8
  import * as v from "react";
9
9
  import { useEffect as y, useMemo as b, useRef as x, useState as S } from "react";
10
10
  import { jsx as C, jsxs as w } from "react/jsx-runtime";
@@ -1,4 +1,4 @@
1
- import { t as e } from "./i18n-BuQgyJAA.js";
1
+ import { t as e } from "./i18n-CmJWr9V5.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,7 +1,7 @@
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-Dq3AIrue.js";
3
- import { t as a } from "./i18n-BuQgyJAA.js";
4
- import "./ui-yvfaMQwo.js";
3
+ import { t as a } from "./i18n-CmJWr9V5.js";
4
+ import "./ui-CB_byKCw.js";
5
5
  import { t as o } from "./skeleton-D6Ga4BLw.js";
6
6
  import "react";
7
7
  import { Fragment as s, jsx as c, jsxs as l } from "react/jsx-runtime";
@@ -1,6 +1,6 @@
1
1
  import { t as e } from "./tailwind.helper-CJaRYBmL.js";
2
2
  import { a as t, c as n, d as r, f as i, l as a, n as o, o as s, r as c, s as l, t as u } from "./chart-Dq3AIrue.js";
3
- import { t as d } from "./i18n-BuQgyJAA.js";
3
+ import { t as d } from "./i18n-CmJWr9V5.js";
4
4
  import { t as f } from "./skeleton-D6Ga4BLw.js";
5
5
  import { t as p } from "./useMobile-pTQ8lWvt.js";
6
6
  import * as m from "react";
@@ -1,2 +1,2 @@
1
- import { a as e, i as t, n, o as r, r as i, t as a } from "../../../cards-OMWaiu9p.js";
1
+ import { a as e, i as t, n, o as r, r as i, t as a } from "../../../cards-cB4kYZpQ.js";
2
2
  export { r as DashboardCard, e as KpiCard, t as KpiCards, i as MetricCard, n as SkeletonCard, a as SkeletonCards };
@@ -1,2 +1,2 @@
1
- import { a as e, c as t, i as n, n as r, o as i, r as a, s as o, t as s } from "../../../charts-NxoXrN5w.js";
1
+ import { a as e, c as t, i as n, n as r, o as i, r as a, s as o, t as s } from "../../../charts-CHWqB53l.js";
2
2
  export { t as BarChartHorizontal, o as BarChartVertical, e as CHART_COLORS, n as ChartCard, a as CircularGauge, r as LineChart, s as PieChart, i as getChartColor };
@@ -1,4 +1,4 @@
1
- import { I as e } from "../../../ui-yvfaMQwo.js";
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-BtfL6yxE.js";
3
- import { n as d, r as f, t as p } from "../../../dialogs-BVf-OP_h.js";
1
+ import { I as e } from "../../../ui-CB_byKCw.js";
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-0N3ZYjHb.js";
3
+ import { n as d, r as f, t as p } from "../../../dialogs-CeB4q0UB.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 };
@@ -0,0 +1,46 @@
1
+ import React from "react";
2
+ import { type LucideIcon } from "lucide-react";
3
+ import { type SingleSelectOption } from "../inputs/SingleSelect";
4
+ /** Champ sur lequel porte la condition (ex. une propriété de sortie). `description` précise sa provenance. */
5
+ export type ConditionFilterField = SingleSelectOption;
6
+ export interface ConditionFilterOperator {
7
+ value: string;
8
+ /** Libellé court affiché dans le bouton et le résumé (ex. `≥`). */
9
+ label: string;
10
+ /** Libellé long en infobulle (ex. « supérieur ou égal »). */
11
+ title?: string;
12
+ /** `false` pour un opérateur sans valeur (ex. « non vide »). Défaut : `true`. */
13
+ requiresValue?: boolean;
14
+ /** La valeur doit être un nombre (ex. `>`, `≤`). */
15
+ numeric?: boolean;
16
+ }
17
+ export interface ConditionFilterValue {
18
+ field: string;
19
+ operator: string;
20
+ /** Vide pour un opérateur sans valeur. */
21
+ value: string;
22
+ }
23
+ export interface ConditionFilterProps {
24
+ fields: ConditionFilterField[];
25
+ operators: ConditionFilterOperator[];
26
+ /** Condition appliquée ; `undefined` = pas de filtre. */
27
+ value: ConditionFilterValue | undefined;
28
+ /** Appelé à l'application (bouton ou Entrée) et à l'effacement (`undefined`). */
29
+ onChange: (value: ConditionFilterValue | undefined) => void;
30
+ /** Libellé i18n de la pastille (ex. « Sortie »). */
31
+ labelKey?: string;
32
+ /** Icône facultative devant le libellé de la pastille. Aucune par défaut, comme les autres pastilles de filtre. */
33
+ icon?: LucideIcon;
34
+ disabled?: boolean;
35
+ className?: string;
36
+ }
37
+ /**
38
+ * Filtre « champ / opérateur / valeur » regroupé dans une seule pastille.
39
+ *
40
+ * La pastille résume la condition appliquée (`Sortie : FilesCount ≥ 2`) ; un clic ouvre un panneau
41
+ * où l'on choisit le champ, l'opérateur et la valeur. La condition n'est transmise qu'une fois
42
+ * complète et validée (bouton « Appliquer » ou Entrée) : pas de requête à chaque frappe ni de
43
+ * filtre à moitié saisi.
44
+ */
45
+ export declare function ConditionFilter({ fields, operators, value, onChange, labelKey, icon: Icon, disabled, className }: ConditionFilterProps): React.ReactElement;
46
+ //# sourceMappingURL=ConditionFilter.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ConditionFilter.d.ts","sourceRoot":"","sources":["../../../../src/components/core/filters/ConditionFilter.tsx"],"names":[],"mappings":"AACA,OAAO,KAAmB,MAAM,OAAO,CAAC;AAExC,OAAO,EAAmB,KAAK,UAAU,EAAS,MAAM,cAAc,CAAC;AAEvE,OAAO,EAAgB,KAAK,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAE/E,8GAA8G;AAC9G,MAAM,MAAM,oBAAoB,GAAG,kBAAkB,CAAC;AAEtD,MAAM,WAAW,uBAAuB;IACtC,KAAK,EAAE,MAAM,CAAC;IACd,mEAAmE;IACnE,KAAK,EAAE,MAAM,CAAC;IACd,6DAA6D;IAC7D,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,iFAAiF;IACjF,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,oDAAoD;IACpD,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,MAAM,WAAW,oBAAoB;IACnC,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;IACjB,0CAA0C;IAC1C,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,oBAAoB;IACnC,MAAM,EAAE,oBAAoB,EAAE,CAAC;IAC/B,SAAS,EAAE,uBAAuB,EAAE,CAAC;IACrC,yDAAyD;IACzD,KAAK,EAAE,oBAAoB,GAAG,SAAS,CAAC;IACxC,iFAAiF;IACjF,QAAQ,EAAE,CAAC,KAAK,EAAE,oBAAoB,GAAG,SAAS,KAAK,IAAI,CAAC;IAC5D,oDAAoD;IACpD,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,mHAAmH;IACnH,IAAI,CAAC,EAAE,UAAU,CAAC;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAUD;;;;;;;GAOG;AACH,wBAAgB,eAAe,CAAC,EAAE,MAAM,EAAE,SAAS,EAAE,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,QAAgB,EAAE,SAAS,EAAE,EAAE,oBAAoB,GAAG,KAAK,CAAC,YAAY,CAmKnK"}
@@ -6,4 +6,5 @@ export * from "./FilterPillsGroup";
6
6
  export * from "./FiltersContainer";
7
7
  export * from "./FiltersMobileDrawer";
8
8
  export * from "./TableFilter";
9
+ export * from "./ConditionFilter";
9
10
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/core/filters/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC;AAChC,cAAc,mBAAmB,CAAC;AAClC,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC;AAC9B,cAAc,oBAAoB,CAAC;AACnC,cAAc,oBAAoB,CAAC;AACnC,cAAc,uBAAuB,CAAC;AACtC,cAAc,eAAe,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/core/filters/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC;AAChC,cAAc,mBAAmB,CAAC;AAClC,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC;AAC9B,cAAc,oBAAoB,CAAC;AACnC,cAAc,oBAAoB,CAAC;AACnC,cAAc,uBAAuB,CAAC;AACtC,cAAc,eAAe,CAAC;AAC9B,cAAc,mBAAmB,CAAC"}