@krosoft/react 0.0.124 → 0.0.125

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 (62) hide show
  1. package/dist/{AppActions-po4LjUcM.js → AppActions-BbAnhStS.js} +22 -18
  2. package/dist/{AppSubTitle-CWrsJYFJ.js → AppSubTitle-lg3d5NWc.js} +1 -1
  3. package/dist/{AppTitle-CDxWr_0y.js → AppTitle-uboDuil4.js} +1 -1
  4. package/dist/{AppVerticalTabs-CdqoObXx.js → AppVerticalTabs-CBijkDF_.js} +33 -49
  5. package/dist/ConfirmationDialog-Co5yl0yA.js +184 -0
  6. package/dist/{DataTable-CrJoeR_0.js → DataTable-DSIgTHZS.js} +174 -218
  7. package/dist/ErrorAlert-DH1onuyt.js +17 -0
  8. package/dist/GenericForm-QoeireeW.js +339 -0
  9. package/dist/ImageInput-DLTYJMwr.js +65 -0
  10. package/dist/KpiCardsLayout-C3LmSeL1.js +22 -0
  11. package/dist/{LoadingState-PhGi7HXH.js → LoadingState-BN0YaPSs.js} +3 -3
  12. package/dist/{MetricCard-C-ewNR_i.js → MetricCard-CPw-fiNS.js} +6 -6
  13. package/dist/{MultiSelect-BoisW4Kn.js → MultiSelect-CX051kfk.js} +32 -27
  14. package/dist/SearchInput-D6LmcOjp.js +249 -0
  15. package/dist/SkeletonCards-BIEnyOuZ.js +62 -0
  16. package/dist/{TableFilter-CLjQU36k.js → TableFilter-Wh_Womy4.js} +114 -123
  17. package/dist/{ThemeSelector--w3R6Ff3.js → ThemeSelector-Qv8QBlYq.js} +2 -2
  18. package/dist/{Topbar-DFu_OdSs.js → Topbar-DVww-tU8.js} +49 -59
  19. package/dist/{alert-B34E_4uH.js → alert-B78CiTYe.js} +2 -2
  20. package/dist/components/core/cards/index.js +2 -2
  21. package/dist/components/core/dialogs/index.js +2 -2
  22. package/dist/components/core/filters/index.js +1 -1
  23. package/dist/components/core/forms/index.js +1 -1
  24. package/dist/components/core/index.js +19 -19
  25. package/dist/components/core/inputs/index.js +3 -3
  26. package/dist/components/core/layouts/index.js +4 -4
  27. package/dist/components/core/navbar/index.js +1 -1
  28. package/dist/components/core/states/index.js +2 -2
  29. package/dist/components/core/table/index.js +1 -1
  30. package/dist/components/core/tabs/index.js +1 -1
  31. package/dist/components/core/theme/index.js +1 -1
  32. package/dist/components/index.js +270 -270
  33. package/dist/components/ui/index.js +213 -213
  34. package/dist/helpers/index.js +1 -1
  35. package/dist/hooks/behavior/index.js +1 -1
  36. package/dist/hooks/index.js +1 -1
  37. package/dist/select-MWzbMBAS.js +106 -0
  38. package/dist/tailwind.helper-B6yFEsav.js +8 -0
  39. package/dist/toaster-DTC8Duvh.js +75 -0
  40. package/dist/toggle-group-CSdAiS44.js +1694 -0
  41. package/dist/tooltip-BWyFpIxo.js +56 -0
  42. package/dist/useConfirmDeleteDialog-CiBQmRxg.js +65 -0
  43. package/package.json +2 -2
  44. package/dist/ConfirmationDialog-CkMyyh_3.js +0 -221
  45. package/dist/ErrorAlert-C6BbHHRZ.js +0 -33
  46. package/dist/GenericForm-CmwqEXiQ.js +0 -11410
  47. package/dist/ImageInput-C8HcxE8t.js +0 -82
  48. package/dist/KpiCardsLayout-CETMpB7A.js +0 -15
  49. package/dist/SearchInput-DJ_F3emq.js +0 -586
  50. package/dist/SkeletonCards-C5lXTSrB.js +0 -57
  51. package/dist/badge-CfWlt79h.js +0 -26
  52. package/dist/createLucideIcon-MP_wDWjs.js +0 -116
  53. package/dist/ellipsis-vertical-kB5yFb-i.js +0 -15
  54. package/dist/grip-vertical-DGywJXzS.js +0 -18
  55. package/dist/index-Be16PP7H.js +0 -34
  56. package/dist/loader-circle-CKy7u7JW.js +0 -11
  57. package/dist/select-DlQvLtI3.js +0 -1763
  58. package/dist/tailwind.helper-gWiv5-6R.js +0 -2278
  59. package/dist/toaster-CKoOjjKr.js +0 -134
  60. package/dist/toggle-group-wIgXZYDq.js +0 -29086
  61. package/dist/tooltip-YhBPXbcJ.js +0 -2477
  62. package/dist/useConfirmDeleteDialog-BOb3XFpz.js +0 -75
@@ -1,57 +0,0 @@
1
- import { jsxs as s, jsx as e } from "react/jsx-runtime";
2
- import { formatNumber as h } from "@krosoft/core/helpers";
3
- import { useTranslation as C } from "react-i18next";
4
- import { c as i } from "./tailwind.helper-gWiv5-6R.js";
5
- import { I as m, M as o, N as f, J as n } from "./toggle-group-wIgXZYDq.js";
6
- import "./alert-B34E_4uH.js";
7
- import "./tooltip-YhBPXbcJ.js";
8
- import "./select-DlQvLtI3.js";
9
- import "next-themes";
10
- import "react";
11
- const g = ({
12
- titleKey: a,
13
- value: r,
14
- valueClassName: d,
15
- icon: c,
16
- iconClassName: t,
17
- description: p,
18
- descriptionClassName: u,
19
- onClick: l
20
- }) => {
21
- const { t: N } = C();
22
- return /* @__PURE__ */ s(m, { className: i(l !== void 0 ? "hover:border-primary cursor-pointer" : ""), onClick: l, children: [
23
- /* @__PURE__ */ s(o, { className: "flex flex-row items-center justify-between space-y-0 pb-2", children: [
24
- /* @__PURE__ */ e(f, { className: "text-sm font-medium", children: N(a) }),
25
- /* @__PURE__ */ e(c, { className: i("size-6 text-muted-foreground", t) })
26
- ] }),
27
- /* @__PURE__ */ s(n, { children: [
28
- /* @__PURE__ */ e("div", { className: i("text-2xl font-bold", d), children: h(r) }),
29
- /* @__PURE__ */ e("p", { className: i("text-xs text-muted-foreground", u), children: p })
30
- ] })
31
- ] });
32
- }, A = ({ stats: a }) => /* @__PURE__ */ e("div", { className: "grid gap-6 md:grid-cols-2 lg:grid-cols-4", children: a.map((r) => /* @__PURE__ */ e(
33
- g,
34
- {
35
- titleKey: r.titleKey,
36
- value: r.value,
37
- valueClassName: r.valueClassName,
38
- icon: r.icon,
39
- iconClassName: r.iconClassName,
40
- description: r.description,
41
- descriptionClassName: r.descriptionClassName,
42
- onClick: r.onClick
43
- },
44
- r.titleKey
45
- )) }), v = () => /* @__PURE__ */ s(m, { className: "animate-pulse", children: [
46
- /* @__PURE__ */ e(o, { children: /* @__PURE__ */ e("div", { className: "h-6 bg-muted rounded w-1/4" }) }),
47
- /* @__PURE__ */ e(n, { children: /* @__PURE__ */ s("div", { className: "space-y-2", children: [
48
- /* @__PURE__ */ e("div", { className: "h-4 bg-muted rounded" }),
49
- /* @__PURE__ */ e("div", { className: "h-4 bg-muted rounded w-3/4" })
50
- ] }) })
51
- ] }), H = ({ count: a = 1 }) => /* @__PURE__ */ e("div", { className: "grid gap-6", style: { gridTemplateColumns: `repeat(${a}, minmax(0, 1fr))` }, children: Array.from({ length: a }).map((r, d) => /* @__PURE__ */ e(v, {}, d)) });
52
- export {
53
- g as K,
54
- v as S,
55
- A as a,
56
- H as b
57
- };
@@ -1,26 +0,0 @@
1
- import { jsx as o } from "react/jsx-runtime";
2
- import { c as n } from "./index-Be16PP7H.js";
3
- import { c as a } from "./tailwind.helper-gWiv5-6R.js";
4
- const s = n(
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",
6
- {
7
- variants: {
8
- variant: {
9
- default: "border-transparent bg-primary text-primary-foreground hover:bg-primary/80",
10
- secondary: "border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",
11
- destructive: "border-transparent bg-destructive text-destructive-foreground hover:bg-destructive/80",
12
- outline: "text-foreground"
13
- }
14
- },
15
- defaultVariants: {
16
- variant: "default"
17
- }
18
- }
19
- );
20
- function u({ className: r, variant: e, ...t }) {
21
- return /* @__PURE__ */ o("div", { className: a(s({ variant: e }), r), ...t });
22
- }
23
- export {
24
- u as B,
25
- s as b
26
- };
@@ -1,116 +0,0 @@
1
- import { useContext as b, createContext as L, forwardRef as C, createElement as i } from "react";
2
- /**
3
- * @license lucide-react v1.17.0 - ISC
4
- *
5
- * This source code is licensed under the ISC license.
6
- * See the LICENSE file in the root directory of this source tree.
7
- */
8
- const h = (...e) => e.filter((t, o, r) => !!t && t.trim() !== "" && r.indexOf(t) === o).join(" ").trim();
9
- /**
10
- * @license lucide-react v1.17.0 - ISC
11
- *
12
- * This source code is licensed under the ISC license.
13
- * See the LICENSE file in the root directory of this source tree.
14
- */
15
- const W = (e) => e.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
16
- /**
17
- * @license lucide-react v1.17.0 - ISC
18
- *
19
- * This source code is licensed under the ISC license.
20
- * See the LICENSE file in the root directory of this source tree.
21
- */
22
- const S = (e) => e.replace(
23
- /^([A-Z])|[\s-_]+(\w)/g,
24
- (t, o, r) => r ? r.toUpperCase() : o.toLowerCase()
25
- );
26
- /**
27
- * @license lucide-react v1.17.0 - ISC
28
- *
29
- * This source code is licensed under the ISC license.
30
- * See the LICENSE file in the root directory of this source tree.
31
- */
32
- const d = (e) => {
33
- const t = S(e);
34
- return t.charAt(0).toUpperCase() + t.slice(1);
35
- };
36
- /**
37
- * @license lucide-react v1.17.0 - ISC
38
- *
39
- * This source code is licensed under the ISC license.
40
- * See the LICENSE file in the root directory of this source tree.
41
- */
42
- var c = {
43
- xmlns: "http://www.w3.org/2000/svg",
44
- width: 24,
45
- height: 24,
46
- viewBox: "0 0 24 24",
47
- fill: "none",
48
- stroke: "currentColor",
49
- strokeWidth: 2,
50
- strokeLinecap: "round",
51
- strokeLinejoin: "round"
52
- };
53
- /**
54
- * @license lucide-react v1.17.0 - ISC
55
- *
56
- * This source code is licensed under the ISC license.
57
- * See the LICENSE file in the root directory of this source tree.
58
- */
59
- const v = (e) => {
60
- for (const t in e)
61
- if (t.startsWith("aria-") || t === "role" || t === "title")
62
- return !0;
63
- return !1;
64
- }, y = L({}), $ = () => b(y), j = C(
65
- ({ color: e, size: t, strokeWidth: o, absoluteStrokeWidth: r, className: a = "", children: s, iconNode: p, ...l }, m) => {
66
- const {
67
- size: n = 24,
68
- strokeWidth: u = 2,
69
- absoluteStrokeWidth: x = !1,
70
- color: w = "currentColor",
71
- className: f = ""
72
- } = $() ?? {}, k = r ?? x ? Number(o ?? u) * 24 / Number(t ?? n) : o ?? u;
73
- return i(
74
- "svg",
75
- {
76
- ref: m,
77
- ...c,
78
- width: t ?? n ?? c.width,
79
- height: t ?? n ?? c.height,
80
- stroke: e ?? w,
81
- strokeWidth: k,
82
- className: h("lucide", f, a),
83
- ...!s && !v(l) && { "aria-hidden": "true" },
84
- ...l
85
- },
86
- [
87
- ...p.map(([g, A]) => i(g, A)),
88
- ...Array.isArray(s) ? s : [s]
89
- ]
90
- );
91
- }
92
- );
93
- /**
94
- * @license lucide-react v1.17.0 - ISC
95
- *
96
- * This source code is licensed under the ISC license.
97
- * See the LICENSE file in the root directory of this source tree.
98
- */
99
- const I = (e, t) => {
100
- const o = C(
101
- ({ className: r, ...a }, s) => i(j, {
102
- ref: s,
103
- iconNode: t,
104
- className: h(
105
- `lucide-${W(d(e))}`,
106
- `lucide-${e}`,
107
- r
108
- ),
109
- ...a
110
- })
111
- );
112
- return o.displayName = d(e), o;
113
- };
114
- export {
115
- I as c
116
- };
@@ -1,15 +0,0 @@
1
- import { c } from "./createLucideIcon-MP_wDWjs.js";
2
- /**
3
- * @license lucide-react v1.17.0 - ISC
4
- *
5
- * This source code is licensed under the ISC license.
6
- * See the LICENSE file in the root directory of this source tree.
7
- */
8
- const e = [
9
- ["circle", { cx: "12", cy: "12", r: "1", key: "41hilf" }],
10
- ["circle", { cx: "12", cy: "5", r: "1", key: "gxeob9" }],
11
- ["circle", { cx: "12", cy: "19", r: "1", key: "lyex9k" }]
12
- ], r = c("ellipsis-vertical", e);
13
- export {
14
- r as E
15
- };
@@ -1,18 +0,0 @@
1
- import { c } from "./createLucideIcon-MP_wDWjs.js";
2
- /**
3
- * @license lucide-react v1.17.0 - ISC
4
- *
5
- * This source code is licensed under the ISC license.
6
- * See the LICENSE file in the root directory of this source tree.
7
- */
8
- const e = [
9
- ["circle", { cx: "9", cy: "12", r: "1", key: "1vctgf" }],
10
- ["circle", { cx: "9", cy: "5", r: "1", key: "hp0tcf" }],
11
- ["circle", { cx: "9", cy: "19", r: "1", key: "fkjjf6" }],
12
- ["circle", { cx: "15", cy: "12", r: "1", key: "1tmaij" }],
13
- ["circle", { cx: "15", cy: "5", r: "1", key: "19l28e" }],
14
- ["circle", { cx: "15", cy: "19", r: "1", key: "f4zoj3" }]
15
- ], i = c("grip-vertical", e);
16
- export {
17
- i as G
18
- };
@@ -1,34 +0,0 @@
1
- import { a as O } from "./tailwind.helper-gWiv5-6R.js";
2
- const m = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, y = O, j = (e, l) => (n) => {
3
- var u;
4
- if ((l == null ? void 0 : l.variants) == null) return y(e, n == null ? void 0 : n.class, n == null ? void 0 : n.className);
5
- const { variants: r, defaultVariants: d } = l, V = Object.keys(r).map((t) => {
6
- const a = n == null ? void 0 : n[t], s = d == null ? void 0 : d[t];
7
- if (a === null) return null;
8
- const i = m(a) || m(s);
9
- return r[t][i];
10
- }), v = n && Object.entries(n).reduce((t, a) => {
11
- let [s, i] = a;
12
- return i === void 0 || (t[s] = i), t;
13
- }, {}), N = l == null || (u = l.compoundVariants) === null || u === void 0 ? void 0 : u.reduce((t, a) => {
14
- let { class: s, className: i, ...f } = a;
15
- return Object.entries(f).every((C) => {
16
- let [c, o] = C;
17
- return Array.isArray(o) ? o.includes({
18
- ...d,
19
- ...v
20
- }[c]) : {
21
- ...d,
22
- ...v
23
- }[c] === o;
24
- }) ? [
25
- ...t,
26
- s,
27
- i
28
- ] : t;
29
- }, []);
30
- return y(e, V, N, n == null ? void 0 : n.class, n == null ? void 0 : n.className);
31
- };
32
- export {
33
- j as c
34
- };
@@ -1,11 +0,0 @@
1
- import { c } from "./createLucideIcon-MP_wDWjs.js";
2
- /**
3
- * @license lucide-react v1.17.0 - ISC
4
- *
5
- * This source code is licensed under the ISC license.
6
- * See the LICENSE file in the root directory of this source tree.
7
- */
8
- const e = [["path", { d: "M21 12a9 9 0 1 1-6.219-8.56", key: "13zald" }]], a = c("loader-circle", e);
9
- export {
10
- a as L
11
- };