@krosoft/react 0.0.22 → 0.0.23

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.
@@ -1,5 +1,5 @@
1
1
  import { jsxs as K, jsx as L } from "react/jsx-runtime";
2
- import { C as ee, f as te, g as ne, c as re } from "./toast-CUZ-UU-l.js";
2
+ import { C as ee, f as te, g as ne, c as re } from "./toast-CysfMIUk.js";
3
3
  import { c as I } from "./index-gWiv5-6R.js";
4
4
  import B, { createContext as ae, useContext as se, useMemo as U, useRef as A, useCallback as z, useState as oe, useEffect as ce } from "react";
5
5
  const ie = (e) => e === void 0 ? "" : new Intl.NumberFormat("fr-FR").format(e), ue = (e, t, r, f) => {
@@ -0,0 +1,45 @@
1
+ import { jsxs as u, jsx as t } from "react/jsx-runtime";
2
+ import { I as h, X as p } from "./toast-CysfMIUk.js";
3
+ import { c as f } from "./index-gWiv5-6R.js";
4
+ import { c as d } from "./createLucideIcon-BxMj32TH.js";
5
+ /**
6
+ * @license lucide-react v1.7.0 - ISC
7
+ *
8
+ * This source code is licensed under the ISC license.
9
+ * See the LICENSE file in the root directory of this source tree.
10
+ */
11
+ const y = [
12
+ ["path", { d: "m21 21-4.34-4.34", key: "14j7rj" }],
13
+ ["circle", { cx: "11", cy: "11", r: "8", key: "4ej97u" }]
14
+ ], x = d("search", y), k = ({
15
+ searchQuery: o,
16
+ search: n,
17
+ placeholder: l = "Rechercher...",
18
+ onSearch: r,
19
+ onSubmit: a,
20
+ onClear: c,
21
+ className: i
22
+ }) => {
23
+ const s = o || n || "", m = () => {
24
+ r(""), c && c();
25
+ };
26
+ return /* @__PURE__ */ u("div", { className: f("relative h-fit w-full md:w-64", i), children: [
27
+ /* @__PURE__ */ t(x, { className: "absolute left-3 top-1/2 transform -translate-y-1/2 text-muted-foreground w-4 h-4" }),
28
+ /* @__PURE__ */ t(
29
+ h,
30
+ {
31
+ placeholder: l,
32
+ value: s,
33
+ onChange: (e) => r(e.target.value),
34
+ className: "pl-8",
35
+ onKeyDown: (e) => {
36
+ e.key === "Enter" && a && (e.preventDefault(), a());
37
+ }
38
+ }
39
+ ),
40
+ s && /* @__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(p, { className: "size-4" }) })
41
+ ] });
42
+ };
43
+ export {
44
+ k as S
45
+ };
@@ -1,5 +1,5 @@
1
1
  import { jsx as o } from "react/jsx-runtime";
2
- import { o as n } from "./toast-CUZ-UU-l.js";
2
+ import { o as n } from "./toast-CysfMIUk.js";
3
3
  import { c as a } from "./index-gWiv5-6R.js";
4
4
  const s = n(
5
5
  "inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",
@@ -1,4 +1,4 @@
1
- import { K as p, a as s } from "../../../KpiCards-DhstZUeY.js";
1
+ import { K as p, a as s } from "../../../KpiCards-CZBzcNpV.js";
2
2
  export {
3
3
  p as KpiCard,
4
4
  s as KpiCards
@@ -1,3 +1,4 @@
1
1
  export * from "./cards";
2
+ export * from "./inputs";
2
3
  export * from "./states";
3
4
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/core/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/core/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC"}
@@ -1,8 +1,10 @@
1
- import { K as o, a as t } from "../../KpiCards-DhstZUeY.js";
2
- import { E as e, L as p } from "../../LoadingState-Br3lWjL2.js";
1
+ import { K as o, a as t } from "../../KpiCards-CZBzcNpV.js";
2
+ import { S as p } from "../../SearchInput-CVB8yapU.js";
3
+ import { E as S, L as d } from "../../LoadingState-Br3lWjL2.js";
3
4
  export {
4
- e as ErrorState,
5
+ S as ErrorState,
5
6
  o as KpiCard,
6
7
  t as KpiCards,
7
- p as LoadingState
8
+ d as LoadingState,
9
+ p as SearchInput
8
10
  };
@@ -0,0 +1,12 @@
1
+ interface SearchInputProps {
2
+ searchQuery?: string;
3
+ search?: string;
4
+ placeholder?: string;
5
+ onSearch: (value: string) => void;
6
+ onSubmit?: () => void;
7
+ onClear?: () => void;
8
+ className?: string;
9
+ }
10
+ export declare const SearchInput: ({ searchQuery, search, placeholder, onSearch, onSubmit, onClear, className, }: SearchInputProps) => React.JSX.Element;
11
+ export {};
12
+ //# sourceMappingURL=SearchInput.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SearchInput.d.ts","sourceRoot":"","sources":["../../../../src/components/core/inputs/SearchInput.tsx"],"names":[],"mappings":"AAKA,UAAU,gBAAgB;IACxB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;IACtB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,eAAO,MAAM,WAAW,GAAI,+EAQzB,gBAAgB,KAAG,KAAK,CAAC,GAAG,CAAC,OA+B/B,CAAC"}
@@ -0,0 +1,2 @@
1
+ export { SearchInput } from "./SearchInput";
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +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"}
@@ -0,0 +1,4 @@
1
+ import { S as e } from "../../../SearchInput-CVB8yapU.js";
2
+ export {
3
+ e as SearchInput
4
+ };
@@ -1,30 +1,33 @@
1
- import { K as t, a as r } from "../KpiCards-DhstZUeY.js";
2
- import { E as e, L as i } from "../LoadingState-Br3lWjL2.js";
3
- import { A as n, a as C, b as T, B as p, C as l, c, d as f, e as m, f as A, g as b, T as g, h as x, i as B, j as D, k as K, l as V, m as u, n as E } from "../toast-CUZ-UU-l.js";
4
- import { B as S, b as h } from "../badge-CS99D5mG.js";
1
+ import { K as t, a as r } from "../KpiCards-CZBzcNpV.js";
2
+ import { S as e } from "../SearchInput-CVB8yapU.js";
3
+ import { E as d, L as n } from "../LoadingState-Br3lWjL2.js";
4
+ import { A as C, a as T, b as l, B as c, C as f, c as m, d as x, e as A, f as b, g, I as u, T as B, h as S, i as D, j as I, k as K, l as V, m as h, n as E } from "../toast-CysfMIUk.js";
5
+ import { B as j, b as k } from "../badge-GmlbyLzK.js";
5
6
  export {
6
- n as Alert,
7
- C as AlertDescription,
8
- T as AlertTitle,
9
- S as Badge,
10
- p as Button,
11
- l as Card,
12
- c as CardContent,
13
- f as CardDescription,
14
- m as CardFooter,
15
- A as CardHeader,
16
- b as CardTitle,
17
- e as ErrorState,
7
+ C as Alert,
8
+ T as AlertDescription,
9
+ l as AlertTitle,
10
+ j as Badge,
11
+ c as Button,
12
+ f as Card,
13
+ m as CardContent,
14
+ x as CardDescription,
15
+ A as CardFooter,
16
+ b as CardHeader,
17
+ g as CardTitle,
18
+ d as ErrorState,
19
+ u as Input,
18
20
  t as KpiCard,
19
21
  r as KpiCards,
20
- i as LoadingState,
21
- g as Toast,
22
- x as ToastAction,
23
- B as ToastClose,
24
- D as ToastDescription,
22
+ n as LoadingState,
23
+ e as SearchInput,
24
+ B as Toast,
25
+ S as ToastAction,
26
+ D as ToastClose,
27
+ I as ToastDescription,
25
28
  K as ToastProvider,
26
29
  V as ToastTitle,
27
- u as ToastViewport,
28
- h as badgeVariants,
30
+ h as ToastViewport,
31
+ k as badgeVariants,
29
32
  E as buttonVariants
30
33
  };
@@ -4,6 +4,7 @@ export type { ButtonProps } from "./button";
4
4
  export { Card, CardHeader, CardFooter, CardTitle, CardDescription, CardContent } from "./card";
5
5
  export { Badge, badgeVariants } from "./badge";
6
6
  export type { BadgeProps } from "./badge";
7
+ export { Input } from "./input";
7
8
  export { Toast, ToastProvider, ToastViewport, ToastTitle, ToastDescription, ToastClose, ToastAction } from "./toast";
8
9
  export type { ToastProps, ToastActionElement } from "./toast";
9
10
  //# 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,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"}
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"}
@@ -1,5 +1,5 @@
1
- import { A as t, a as o, b as r, B as e, C as i, c as d, d as n, e as T, f as C, g as l, T as p, h as c, i as A, j as b, k as B, l as f, m as g, n as m } from "../../toast-CUZ-UU-l.js";
2
- import { B as V, b as u } from "../../badge-CS99D5mG.js";
1
+ import { A as t, a as o, b as r, B as e, C as i, c as n, d, e as T, f as C, g as l, I as p, T as c, h as A, i as b, j as B, k as f, l as g, m, n as u } from "../../toast-CysfMIUk.js";
2
+ import { B as V, b as x } from "../../badge-GmlbyLzK.js";
3
3
  export {
4
4
  t as Alert,
5
5
  o as AlertDescription,
@@ -7,18 +7,19 @@ export {
7
7
  V as Badge,
8
8
  e as Button,
9
9
  i as Card,
10
- d as CardContent,
11
- n as CardDescription,
10
+ n as CardContent,
11
+ d as CardDescription,
12
12
  T as CardFooter,
13
13
  C as CardHeader,
14
14
  l as CardTitle,
15
- p as Toast,
16
- c as ToastAction,
17
- A as ToastClose,
18
- b as ToastDescription,
19
- B as ToastProvider,
20
- f as ToastTitle,
21
- g as ToastViewport,
22
- u as badgeVariants,
23
- m as buttonVariants
15
+ p as Input,
16
+ c as Toast,
17
+ A as ToastAction,
18
+ b as ToastClose,
19
+ B as ToastDescription,
20
+ f as ToastProvider,
21
+ g as ToastTitle,
22
+ m as ToastViewport,
23
+ x as badgeVariants,
24
+ u as buttonVariants
24
25
  };
@@ -0,0 +1,4 @@
1
+ import * as React from "react";
2
+ declare const Input: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "ref"> & React.RefAttributes<HTMLInputElement>>;
3
+ export { Input };
4
+ //# sourceMappingURL=input.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"input.d.ts","sourceRoot":"","sources":["../../../src/components/ui/input.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,QAAA,MAAM,KAAK,8KAYT,CAAC;AAGH,OAAO,EAAE,KAAK,EAAE,CAAC"}