@krosoft/react 0.0.73 → 0.0.75

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.
@@ -0,0 +1,23 @@
1
+ import type { LucideIcon } from "lucide-react";
2
+ import * as React from "react";
3
+ declare const colorClasses: {
4
+ readonly blue: "from-blue-500 to-cyan-500";
5
+ readonly green: "from-green-500 to-emerald-500";
6
+ readonly orange: "from-orange-500 to-yellow-500";
7
+ readonly red: "from-red-500 to-pink-500";
8
+ readonly purple: "from-purple-500 to-indigo-500";
9
+ };
10
+ export type MetricCardColor = keyof typeof colorClasses;
11
+ export interface MetricCardProps {
12
+ title: string;
13
+ value: string | number;
14
+ unit?: string;
15
+ icon: LucideIcon;
16
+ trend?: "up" | "down" | "stable";
17
+ trendValue?: string;
18
+ color?: MetricCardColor;
19
+ children?: React.ReactNode;
20
+ }
21
+ export declare const MetricCard: ({ title, value, unit, icon: Icon, trend, trendValue, color, children }: MetricCardProps) => import("react/jsx-runtime").JSX.Element;
22
+ export {};
23
+ //# sourceMappingURL=MetricCard.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MetricCard.d.ts","sourceRoot":"","sources":["../../../../src/components/core/cards/MetricCard.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC/C,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,QAAA,MAAM,YAAY;;;;;;CAMR,CAAC;AAEX,MAAM,MAAM,eAAe,GAAG,MAAM,OAAO,YAAY,CAAC;AAExD,MAAM,WAAW,eAAe;IAC9B,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,GAAG,MAAM,CAAC;IACvB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,UAAU,CAAC;IACjB,KAAK,CAAC,EAAE,IAAI,GAAG,MAAM,GAAG,QAAQ,CAAC;IACjC,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,KAAK,CAAC,EAAE,eAAe,CAAC;IACxB,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B;AAcD,eAAO,MAAM,UAAU,GAAI,wEAAiF,eAAe,4CA6B1H,CAAC"}
@@ -1,4 +1,6 @@
1
1
  export { KpiCard } from "./KpiCard";
2
2
  export type { KpiCardProps } from "./KpiCard";
3
3
  export { KpiCards } from "./KpiCards";
4
+ export { MetricCard } from "./MetricCard";
5
+ export type { MetricCardProps, MetricCardColor } from "./MetricCard";
4
6
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/core/cards/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,YAAY,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAC9C,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/core/cards/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,YAAY,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAC9C,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,YAAY,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC"}
@@ -1,5 +1,6 @@
1
- import { K as p, a as s } from "../../../KpiCards-Bjsd4bSz.js";
1
+ import { K as s, a as d, M as i } from "../../../MetricCard-H--Bf1Ib.js";
2
2
  export {
3
- p as KpiCard,
4
- s as KpiCards
3
+ s as KpiCard,
4
+ d as KpiCards,
5
+ i as MetricCard
5
6
  };
@@ -1,15 +1,17 @@
1
- import { K as o, a as e } from "../../KpiCards-Bjsd4bSz.js";
2
- import { S as p } from "../../SearchInput-Bu4wb0gI.js";
3
- import { E as S, L as m } from "../../LoadingState-C0uS6aGT.js";
4
- import { S as x, T as d } from "../../Topbar-CFALRIJn.js";
5
- import { T } from "../../ThemeSelector-DMgBLEYm.js";
1
+ import { K as e, a as o, M as t } from "../../MetricCard-H--Bf1Ib.js";
2
+ import { D as p, S } from "../../DateRangePicker-BAn4LMHi.js";
3
+ import { E as m, L as d } from "../../LoadingState-C0uS6aGT.js";
4
+ import { S as x, T as c } from "../../Topbar-CFALRIJn.js";
5
+ import { T as n } from "../../ThemeSelector-DQmkKmzE.js";
6
6
  export {
7
- S as ErrorState,
8
- o as KpiCard,
9
- e as KpiCards,
10
- m as LoadingState,
11
- p as SearchInput,
7
+ p as DateRangePicker,
8
+ m as ErrorState,
9
+ e as KpiCard,
10
+ o as KpiCards,
11
+ d as LoadingState,
12
+ t as MetricCard,
13
+ S as SearchInput,
12
14
  x as Sidebar,
13
- T as ThemeSelector,
14
- d as Topbar
15
+ n as ThemeSelector,
16
+ c as Topbar
15
17
  };
@@ -0,0 +1,10 @@
1
+ import type { DateRange } from "react-day-picker";
2
+ interface DateRangePickerProps {
3
+ value?: DateRange;
4
+ onChange: (range?: DateRange) => void;
5
+ placeholder?: string;
6
+ className?: string;
7
+ }
8
+ export declare const DateRangePicker: ({ value, onChange, placeholder, className }: DateRangePickerProps) => import("react/jsx-runtime").JSX.Element;
9
+ export {};
10
+ //# sourceMappingURL=DateRangePicker.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DateRangePicker.d.ts","sourceRoot":"","sources":["../../../../src/components/core/inputs/DateRangePicker.tsx"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAElD,UAAU,oBAAoB;IAC5B,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,QAAQ,EAAE,CAAC,KAAK,CAAC,EAAE,SAAS,KAAK,IAAI,CAAC;IACtC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,eAAO,MAAM,eAAe,GAAI,6CAA0E,oBAAoB,4CAwF7H,CAAC"}
@@ -1,2 +1,4 @@
1
1
  export { SearchInput } from "./SearchInput";
2
+ export { DateRangePicker } from "./DateRangePicker";
3
+ export type { DateRange } from "react-day-picker";
2
4
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/core/inputs/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/core/inputs/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,YAAY,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC"}
@@ -1,4 +1,5 @@
1
- import { S as e } from "../../../SearchInput-Bu4wb0gI.js";
1
+ import { D as r, S as t } from "../../../DateRangePicker-BAn4LMHi.js";
2
2
  export {
3
- e as SearchInput
3
+ r as DateRangePicker,
4
+ t as SearchInput
4
5
  };
@@ -1,4 +1,4 @@
1
- import { T as r } from "../../../ThemeSelector-DMgBLEYm.js";
1
+ import { T as r } from "../../../ThemeSelector-DQmkKmzE.js";
2
2
  export {
3
3
  r as ThemeSelector
4
4
  };
@@ -1,48 +1,51 @@
1
- import { K as t, a as r } from "../KpiCards-Bjsd4bSz.js";
2
- import { S as o } from "../SearchInput-Bu4wb0gI.js";
3
- import { E as p, L as l } from "../LoadingState-C0uS6aGT.js";
4
- import { S as c, T as d } from "../Topbar-CFALRIJn.js";
5
- import { T as n } from "../ThemeSelector-DMgBLEYm.js";
6
- import { A as C, a as f, b, C as x, c as g, d as u, e as A, f as B, g as I, I as V, T as h, h as D, i as K, j as L, k as E, l as j, m as k } from "../toast-BypnW71k.js";
7
- import { B as w, b as F } from "../index-BQOmHRsD.js";
8
- import { B as H, b as P } from "../badge-C4pCH7IL.js";
9
- import { S as y, a as z, b as J, c as M, d as N, e as O, f as Q, g as R } from "../select-CdiR6cO0.js";
1
+ import { K as t, a as r, M as s } from "../MetricCard-H--Bf1Ib.js";
2
+ import { D as i, S as l } from "../DateRangePicker-BAn4LMHi.js";
3
+ import { E as c, L as d } from "../LoadingState-C0uS6aGT.js";
4
+ import { S, T } from "../Topbar-CFALRIJn.js";
5
+ import { T as m } from "../ThemeSelector-DQmkKmzE.js";
6
+ import { A as b, a as x, b as g, C as u, c as A, d as D, e as B, f as I, g as V, h, I as K, T as L, i as k, j as E, k as M, l as P, m as j, n as v } from "../calendar-cHag6u-j.js";
7
+ import { B as F, b as G } from "../index-BQOmHRsD.js";
8
+ import { B as R, b as q } from "../badge-C4pCH7IL.js";
9
+ import { S as z, a as J, b as N, c as O, d as Q, e as U, f as W, g as X } from "../select-Dv9bdUCB.js";
10
10
  export {
11
- C as Alert,
12
- f as AlertDescription,
13
- b as AlertTitle,
14
- H as Badge,
15
- w as Button,
16
- x as Card,
17
- g as CardContent,
18
- u as CardDescription,
19
- A as CardFooter,
20
- B as CardHeader,
21
- I as CardTitle,
22
- p as ErrorState,
23
- V as Input,
11
+ b as Alert,
12
+ x as AlertDescription,
13
+ g as AlertTitle,
14
+ R as Badge,
15
+ F as Button,
16
+ u as Calendar,
17
+ A as Card,
18
+ D as CardContent,
19
+ B as CardDescription,
20
+ I as CardFooter,
21
+ V as CardHeader,
22
+ h as CardTitle,
23
+ i as DateRangePicker,
24
+ c as ErrorState,
25
+ K as Input,
24
26
  t as KpiCard,
25
27
  r as KpiCards,
26
- l as LoadingState,
27
- o as SearchInput,
28
- y as Select,
29
- z as SelectContent,
30
- J as SelectGroup,
31
- M as SelectItem,
32
- N as SelectLabel,
33
- O as SelectSeparator,
34
- Q as SelectTrigger,
35
- R as SelectValue,
36
- c as Sidebar,
37
- n as ThemeSelector,
38
- h as Toast,
39
- D as ToastAction,
40
- K as ToastClose,
41
- L as ToastDescription,
42
- E as ToastProvider,
28
+ d as LoadingState,
29
+ s as MetricCard,
30
+ l as SearchInput,
31
+ z as Select,
32
+ J as SelectContent,
33
+ N as SelectGroup,
34
+ O as SelectItem,
35
+ Q as SelectLabel,
36
+ U as SelectSeparator,
37
+ W as SelectTrigger,
38
+ X as SelectValue,
39
+ S as Sidebar,
40
+ m as ThemeSelector,
41
+ L as Toast,
42
+ k as ToastAction,
43
+ E as ToastClose,
44
+ M as ToastDescription,
45
+ P as ToastProvider,
43
46
  j as ToastTitle,
44
- k as ToastViewport,
45
- d as Topbar,
46
- P as badgeVariants,
47
- F as buttonVariants
47
+ v as ToastViewport,
48
+ T as Topbar,
49
+ q as badgeVariants,
50
+ G as buttonVariants
48
51
  };
@@ -0,0 +1,9 @@
1
+ import * as React from "react";
2
+ import { DayPicker } from "react-day-picker";
3
+ export type CalendarProps = React.ComponentProps<typeof DayPicker>;
4
+ declare function Calendar({ className, classNames, showOutsideDays, ...props }: CalendarProps): import("react/jsx-runtime").JSX.Element;
5
+ declare namespace Calendar {
6
+ var displayName: string;
7
+ }
8
+ export { Calendar };
9
+ //# sourceMappingURL=calendar.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"calendar.d.ts","sourceRoot":"","sources":["../../../src/components/ui/calendar.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAE7C,MAAM,MAAM,aAAa,GAAG,KAAK,CAAC,cAAc,CAAC,OAAO,SAAS,CAAC,CAAC;AAEnE,iBAAS,QAAQ,CAAC,EAAE,SAAS,EAAE,UAAU,EAAE,eAAsB,EAAE,GAAG,KAAK,EAAE,EAAE,aAAa,2CA4C3F;kBA5CQ,QAAQ;;;AA+CjB,OAAO,EAAE,QAAQ,EAAE,CAAC"}
@@ -8,4 +8,6 @@ export { Input } from "./input";
8
8
  export { Toast, ToastProvider, ToastViewport, ToastTitle, ToastDescription, ToastClose, ToastAction } from "./toast";
9
9
  export type { ToastProps, ToastActionElement } from "./toast";
10
10
  export { Select, SelectGroup, SelectValue, SelectTrigger, SelectContent, SelectLabel, SelectItem, SelectSeparator } from "./select";
11
+ export { Calendar } from "./calendar";
12
+ export type { CalendarProps } from "./calendar";
11
13
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/ui/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,UAAU,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAC9D,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAClD,YAAY,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAC5C,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,UAAU,EAAE,SAAS,EAAE,eAAe,EAAE,WAAW,EAAE,MAAM,QAAQ,CAAC;AAC/F,OAAO,EAAE,KAAK,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAC/C,YAAY,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAC1C,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EAAE,KAAK,EAAE,aAAa,EAAE,aAAa,EAAE,UAAU,EAAE,gBAAgB,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AACrH,YAAY,EAAE,UAAU,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAC9D,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,WAAW,EAAE,aAAa,EAAE,aAAa,EAAE,WAAW,EAAE,UAAU,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/ui/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,UAAU,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAC9D,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAClD,YAAY,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAC5C,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,UAAU,EAAE,SAAS,EAAE,eAAe,EAAE,WAAW,EAAE,MAAM,QAAQ,CAAC;AAC/F,OAAO,EAAE,KAAK,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAC/C,YAAY,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAC1C,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EAAE,KAAK,EAAE,aAAa,EAAE,aAAa,EAAE,UAAU,EAAE,gBAAgB,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AACrH,YAAY,EAAE,UAAU,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAC9D,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,WAAW,EAAE,aAAa,EAAE,aAAa,EAAE,WAAW,EAAE,UAAU,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AACpI,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,YAAY,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC"}
@@ -1,35 +1,36 @@
1
- import { A as t, a as s, b as r, C as o, c as l, d as i, e as c, f as n, g as d, I as T, T as p, h as C, i as S, j as b, k as f, l as g, m } from "../../toast-BypnW71k.js";
2
- import { B as A, b as x } from "../../index-BQOmHRsD.js";
3
- import { B as V, b as D } from "../../badge-C4pCH7IL.js";
4
- import { S as h, a as j, b as k, c as v, d as w, e as F, f as G, g as H } from "../../select-CdiR6cO0.js";
1
+ import { A as t, a as s, b as r, C as o, c as l, d as i, e as n, f as c, g as d, h as T, I as p, T as C, i as S, j as b, k as f, l as g, m, n as u } from "../../calendar-cHag6u-j.js";
2
+ import { B as x, b as B } from "../../index-BQOmHRsD.js";
3
+ import { B as D, b as I } from "../../badge-C4pCH7IL.js";
4
+ import { S as j, a as k, b as v, c as w, d as F, e as G, f as H, g as L } from "../../select-Dv9bdUCB.js";
5
5
  export {
6
6
  t as Alert,
7
7
  s as AlertDescription,
8
8
  r as AlertTitle,
9
- V as Badge,
10
- A as Button,
11
- o as Card,
12
- l as CardContent,
13
- i as CardDescription,
9
+ D as Badge,
10
+ x as Button,
11
+ o as Calendar,
12
+ l as Card,
13
+ i as CardContent,
14
+ n as CardDescription,
14
15
  c as CardFooter,
15
- n as CardHeader,
16
- d as CardTitle,
17
- T as Input,
18
- h as Select,
19
- j as SelectContent,
20
- k as SelectGroup,
21
- v as SelectItem,
22
- w as SelectLabel,
23
- F as SelectSeparator,
24
- G as SelectTrigger,
25
- H as SelectValue,
26
- p as Toast,
27
- C as ToastAction,
28
- S as ToastClose,
29
- b as ToastDescription,
30
- f as ToastProvider,
31
- g as ToastTitle,
32
- m as ToastViewport,
33
- D as badgeVariants,
34
- x as buttonVariants
16
+ d as CardHeader,
17
+ T as CardTitle,
18
+ p as Input,
19
+ j as Select,
20
+ k as SelectContent,
21
+ v as SelectGroup,
22
+ w as SelectItem,
23
+ F as SelectLabel,
24
+ G as SelectSeparator,
25
+ H as SelectTrigger,
26
+ L as SelectValue,
27
+ C as Toast,
28
+ S as ToastAction,
29
+ b as ToastClose,
30
+ f as ToastDescription,
31
+ g as ToastProvider,
32
+ m as ToastTitle,
33
+ u as ToastViewport,
34
+ I as badgeVariants,
35
+ B as buttonVariants
35
36
  };
@@ -2009,6 +2009,7 @@ const Zo = o.forwardRef(
2009
2009
  );
2010
2010
  Zo.displayName = Tn.displayName;
2011
2011
  export {
2012
+ Yt as R,
2012
2013
  ra as S,
2013
2014
  zo as a,
2014
2015
  oa as b,
@@ -2016,5 +2017,7 @@ export {
2016
2017
  Xo as d,
2017
2018
  Zo as e,
2018
2019
  jo as f,
2019
- aa as g
2020
+ aa as g,
2021
+ Lr as h,
2022
+ sr as u
2020
2023
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@krosoft/react",
3
- "version": "0.0.73",
3
+ "version": "0.0.75",
4
4
  "description": "Krosoft shared React package",
5
5
  "type": "module",
6
6
  "scripts": {
@@ -49,7 +49,9 @@
49
49
  "@radix-ui/react-tooltip": "^1.2.8",
50
50
  "class-variance-authority": "^0.7.1",
51
51
  "clsx": "^2.1.1",
52
+ "date-fns": "^4.2.1",
52
53
  "lucide-react": "^1.16.0",
54
+ "react-day-picker": "^10.0.1",
53
55
  "tailwind-merge": "^2.6.1"
54
56
  },
55
57
  "devDependencies": {
@@ -1,40 +0,0 @@
1
- import { jsxs as s, jsx as r } from "react/jsx-runtime";
2
- import { C as p, f, g as u, c as C } from "./toast-BypnW71k.js";
3
- import "./index-BQOmHRsD.js";
4
- import { c as a } from "./index-gWiv5-6R.js";
5
- import "./select-CdiR6cO0.js";
6
- import N from "react";
7
- import { formatNumber as x } from "@krosoft/core/helpers";
8
- import { useTranslation as g } from "react-i18next";
9
- const h = ({ titleKey: i, value: e, valueClassName: l, icon: m, iconClassName: c, description: t, descriptionClassName: n, onClick: o }) => {
10
- const { t: d } = g();
11
- return /* @__PURE__ */ s(p, { className: a(o ? "hover:border-primary cursor-pointer" : ""), onClick: o, children: [
12
- /* @__PURE__ */ s(f, { className: "flex flex-row items-center justify-between space-y-0 pb-2", children: [
13
- /* @__PURE__ */ r(u, { className: "text-sm font-medium", children: d(i) }),
14
- N.createElement(m, {
15
- className: a("size-6 text-muted-foreground", c)
16
- })
17
- ] }),
18
- /* @__PURE__ */ s(C, { children: [
19
- /* @__PURE__ */ r("div", { className: a("text-2xl font-bold", l), children: x(e) }),
20
- /* @__PURE__ */ r("p", { className: a("text-xs text-muted-foreground", n), children: t })
21
- ] })
22
- ] });
23
- }, k = ({ stats: i }) => /* @__PURE__ */ r("div", { className: "grid gap-6 md:grid-cols-2 lg:grid-cols-4", children: i.map((e) => /* @__PURE__ */ r(
24
- h,
25
- {
26
- titleKey: e.titleKey,
27
- value: e.value,
28
- valueClassName: e.valueClassName,
29
- icon: e.icon,
30
- iconClassName: e.iconClassName,
31
- description: e.description,
32
- descriptionClassName: e.descriptionClassName,
33
- onClick: e.onClick
34
- },
35
- e.titleKey
36
- )) });
37
- export {
38
- h as K,
39
- k as a
40
- };
@@ -1,47 +0,0 @@
1
- import { jsxs as u, jsx as t } from "react/jsx-runtime";
2
- import { I as p, X as h } from "./toast-BypnW71k.js";
3
- import "./index-BQOmHRsD.js";
4
- import { c as f } from "./index-gWiv5-6R.js";
5
- import "./select-CdiR6cO0.js";
6
- import { c as d } from "./createLucideIcon-CRdjzt2A.js";
7
- /**
8
- * @license lucide-react v1.16.0 - ISC
9
- *
10
- * This source code is licensed under the ISC license.
11
- * See the LICENSE file in the root directory of this source tree.
12
- */
13
- const y = [
14
- ["path", { d: "m21 21-4.34-4.34", key: "14j7rj" }],
15
- ["circle", { cx: "11", cy: "11", r: "8", key: "4ej97u" }]
16
- ], x = d("search", y), I = ({
17
- searchQuery: s,
18
- search: n,
19
- placeholder: l = "Rechercher...",
20
- onSearch: r,
21
- onSubmit: a,
22
- onClear: o,
23
- className: i
24
- }) => {
25
- const c = s || n || "", m = () => {
26
- r(""), o && o();
27
- };
28
- return /* @__PURE__ */ u("div", { className: f("relative h-fit w-full md:w-64", i), children: [
29
- /* @__PURE__ */ t(x, { className: "absolute left-3 top-1/2 transform -translate-y-1/2 text-muted-foreground w-4 h-4" }),
30
- /* @__PURE__ */ t(
31
- p,
32
- {
33
- placeholder: l,
34
- value: c,
35
- onChange: (e) => r(e.target.value),
36
- className: "pl-8",
37
- onKeyDown: (e) => {
38
- e.key === "Enter" && a && (e.preventDefault(), a());
39
- }
40
- }
41
- ),
42
- c && /* @__PURE__ */ t("button", { onClick: m, className: "absolute right-3 top-1/2 -translate-y-1/2 text-gray-500 hover:text-gray-700", type: "button", children: /* @__PURE__ */ t(h, { className: "size-4" }) })
43
- ] });
44
- };
45
- export {
46
- I as S
47
- };