@krosoft/react 0.0.74 → 0.0.76

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 (84) hide show
  1. package/dist/Combination-CzdDhqdB.js +564 -0
  2. package/dist/DataTable-CjFA9p4V.js +2216 -0
  3. package/dist/{DateRangePicker-BAn4LMHi.js → DateRangePicker-rrXXEYz8.js} +19 -16
  4. package/dist/LoadingState-CqRLmkxn.js +29 -0
  5. package/dist/MetricCard-88djqC4o.js +66 -0
  6. package/dist/{ThemeSelector-DQmkKmzE.js → ThemeSelector-sTd9T2OD.js} +8 -8
  7. package/dist/{Topbar-CFALRIJn.js → Topbar-BqC05zWP.js} +27 -26
  8. package/dist/{badge-C4pCH7IL.js → badge-kADcbb2Y.js} +1 -1
  9. package/dist/{calendar-cHag6u-j.js → calendar-BMReToKR.js} +771 -802
  10. package/dist/card-7XPLAra3.js +23 -0
  11. package/dist/checkbox-BI6Lm_p-.js +358 -0
  12. package/dist/chevron-down-ki5-dwtL.js +11 -0
  13. package/dist/components/core/cards/MetricCard.d.ts +23 -0
  14. package/dist/components/core/cards/MetricCard.d.ts.map +1 -0
  15. package/dist/components/core/cards/index.d.ts +2 -0
  16. package/dist/components/core/cards/index.d.ts.map +1 -1
  17. package/dist/components/core/cards/index.js +4 -3
  18. package/dist/components/core/index.d.ts +1 -0
  19. package/dist/components/core/index.d.ts.map +1 -1
  20. package/dist/components/core/index.js +26 -14
  21. package/dist/components/core/inputs/index.js +1 -1
  22. package/dist/components/core/navbar/index.js +1 -1
  23. package/dist/components/core/states/CardSkeleton.d.ts +3 -0
  24. package/dist/components/core/states/CardSkeleton.d.ts.map +1 -0
  25. package/dist/components/core/states/CardsSkeleton.d.ts +7 -0
  26. package/dist/components/core/states/CardsSkeleton.d.ts.map +1 -0
  27. package/dist/components/core/states/index.d.ts +2 -0
  28. package/dist/components/core/states/index.d.ts.map +1 -1
  29. package/dist/components/core/states/index.js +5 -3
  30. package/dist/components/core/table/DataTable.d.ts +5 -0
  31. package/dist/components/core/table/DataTable.d.ts.map +1 -0
  32. package/dist/components/core/table/TableActions.d.ts +8 -0
  33. package/dist/components/core/table/TableActions.d.ts.map +1 -0
  34. package/dist/components/core/table/TableBody.d.ts +21 -0
  35. package/dist/components/core/table/TableBody.d.ts.map +1 -0
  36. package/dist/components/core/table/TableBulkActions.d.ts +9 -0
  37. package/dist/components/core/table/TableBulkActions.d.ts.map +1 -0
  38. package/dist/components/core/table/TableHeader.d.ts +23 -0
  39. package/dist/components/core/table/TableHeader.d.ts.map +1 -0
  40. package/dist/components/core/table/TablePagination.d.ts +14 -0
  41. package/dist/components/core/table/TablePagination.d.ts.map +1 -0
  42. package/dist/components/core/table/TableSettings.d.ts +9 -0
  43. package/dist/components/core/table/TableSettings.d.ts.map +1 -0
  44. package/dist/components/core/table/index.d.ts +10 -0
  45. package/dist/components/core/table/index.d.ts.map +1 -0
  46. package/dist/components/core/table/index.js +11 -0
  47. package/dist/components/core/theme/index.js +1 -1
  48. package/dist/components/index.js +62 -47
  49. package/dist/components/ui/checkbox.d.ts +5 -0
  50. package/dist/components/ui/checkbox.d.ts.map +1 -0
  51. package/dist/components/ui/dropdown-menu.d.ts +28 -0
  52. package/dist/components/ui/dropdown-menu.d.ts.map +1 -0
  53. package/dist/components/ui/index.d.ts +1 -0
  54. package/dist/components/ui/index.d.ts.map +1 -1
  55. package/dist/components/ui/index.js +33 -30
  56. package/dist/components/ui/select.d.ts +1 -1
  57. package/dist/components/ui/select.d.ts.map +1 -1
  58. package/dist/constants/datatable.d.ts +3 -0
  59. package/dist/constants/datatable.d.ts.map +1 -0
  60. package/dist/{index-BQOmHRsD.js → floating-ui.react-dom-BPCyLQfI.js} +315 -323
  61. package/dist/hooks/ui/useDataTable.d.ts +4 -0
  62. package/dist/hooks/ui/useDataTable.d.ts.map +1 -0
  63. package/dist/loader-circle-BhJXKs31.js +11 -0
  64. package/dist/select-B-hcmC3K.js +1468 -0
  65. package/dist/{tooltip-Dep8OR3c.js → tooltip-gI1Mp9DG.js} +1 -1
  66. package/dist/types/BulkAction.d.ts +8 -0
  67. package/dist/types/BulkAction.d.ts.map +1 -0
  68. package/dist/types/ColumnDef.d.ts +11 -0
  69. package/dist/types/ColumnDef.d.ts.map +1 -0
  70. package/dist/types/DataTableProps.d.ts +19 -0
  71. package/dist/types/DataTableProps.d.ts.map +1 -0
  72. package/dist/types/RowAction.d.ts +8 -0
  73. package/dist/types/RowAction.d.ts.map +1 -0
  74. package/dist/types/UseDataTableProps.d.ts +13 -0
  75. package/dist/types/UseDataTableProps.d.ts.map +1 -0
  76. package/dist/types/UseDataTableResult.d.ts +34 -0
  77. package/dist/types/UseDataTableResult.d.ts.map +1 -0
  78. package/dist/types/index.d.ts +7 -0
  79. package/dist/types/index.d.ts.map +1 -0
  80. package/dist/types/index.js +1 -0
  81. package/package.json +3 -1
  82. package/dist/KpiCards-Bp6EAsf7.js +0 -40
  83. package/dist/LoadingState-C0uS6aGT.js +0 -19
  84. package/dist/select-Dv9bdUCB.js +0 -2023
@@ -0,0 +1,23 @@
1
+ import { jsx as d } from "react/jsx-runtime";
2
+ import * as s from "react";
3
+ import { c as o } from "./index-gWiv5-6R.js";
4
+ const t = s.forwardRef(({ className: a, ...e }, r) => /* @__PURE__ */ d("div", { ref: r, className: o("rounded-lg border bg-card text-card-foreground shadow-sm", a), ...e }));
5
+ t.displayName = "Card";
6
+ const c = s.forwardRef(({ className: a, ...e }, r) => /* @__PURE__ */ d("div", { ref: r, className: o("flex flex-col space-y-1.5 p-6", a), ...e }));
7
+ c.displayName = "CardHeader";
8
+ const i = s.forwardRef(({ className: a, ...e }, r) => /* @__PURE__ */ d("h3", { ref: r, className: o("text-2xl font-semibold leading-none tracking-tight", a), ...e }));
9
+ i.displayName = "CardTitle";
10
+ const m = s.forwardRef(({ className: a, ...e }, r) => /* @__PURE__ */ d("p", { ref: r, className: o("text-sm text-muted-foreground", a), ...e }));
11
+ m.displayName = "CardDescription";
12
+ const l = s.forwardRef(({ className: a, ...e }, r) => /* @__PURE__ */ d("div", { ref: r, className: o("p-6 pt-0", a), ...e }));
13
+ l.displayName = "CardContent";
14
+ const n = s.forwardRef(({ className: a, ...e }, r) => /* @__PURE__ */ d("div", { ref: r, className: o("flex items-center p-6 pt-0", a), ...e }));
15
+ n.displayName = "CardFooter";
16
+ export {
17
+ t as C,
18
+ l as a,
19
+ m as b,
20
+ n as c,
21
+ c as d,
22
+ i as e
23
+ };
@@ -0,0 +1,358 @@
1
+ import { c as T } from "./createLucideIcon-CRdjzt2A.js";
2
+ import { jsx as f, jsxs as H, Fragment as G } from "react/jsx-runtime";
3
+ import * as a from "react";
4
+ import { u as E, a as A, d as K, e as X, f as M, g as V, h as J } from "./floating-ui.react-dom-BPCyLQfI.js";
5
+ import { u as Q, C as Y } from "./Combination-CzdDhqdB.js";
6
+ import "react-dom";
7
+ import { c as O } from "./index-gWiv5-6R.js";
8
+ function Z(t, e) {
9
+ return a.useReducer((r, o) => e[r][o] ?? r, t);
10
+ }
11
+ var L = (t) => {
12
+ const { present: e, children: r } = t, o = ee(e), i = typeof r == "function" ? r({ present: o.isPresent }) : a.Children.only(r), n = E(o.ref, te(i));
13
+ return typeof r == "function" || o.isPresent ? a.cloneElement(i, { ref: n }) : null;
14
+ };
15
+ L.displayName = "Presence";
16
+ function ee(t) {
17
+ const [e, r] = a.useState(), o = a.useRef(null), i = a.useRef(t), n = a.useRef("none"), m = t ? "mounted" : "unmounted", [u, s] = Z(m, {
18
+ mounted: {
19
+ UNMOUNT: "unmounted",
20
+ ANIMATION_OUT: "unmountSuspended"
21
+ },
22
+ unmountSuspended: {
23
+ MOUNT: "mounted",
24
+ ANIMATION_END: "unmounted"
25
+ },
26
+ unmounted: {
27
+ MOUNT: "mounted"
28
+ }
29
+ });
30
+ return a.useEffect(() => {
31
+ const c = y(o.current);
32
+ n.current = u === "mounted" ? c : "none";
33
+ }, [u]), A(() => {
34
+ const c = o.current, p = i.current;
35
+ if (p !== t) {
36
+ const l = n.current, h = y(c);
37
+ t ? s("MOUNT") : h === "none" || (c == null ? void 0 : c.display) === "none" ? s("UNMOUNT") : s(p && l !== h ? "ANIMATION_OUT" : "UNMOUNT"), i.current = t;
38
+ }
39
+ }, [t, s]), A(() => {
40
+ if (e) {
41
+ let c;
42
+ const p = e.ownerDocument.defaultView ?? window, d = (h) => {
43
+ const k = y(o.current).includes(CSS.escape(h.animationName));
44
+ if (h.target === e && k && (s("ANIMATION_END"), !i.current)) {
45
+ const g = e.style.animationFillMode;
46
+ e.style.animationFillMode = "forwards", c = p.setTimeout(() => {
47
+ e.style.animationFillMode === "forwards" && (e.style.animationFillMode = g);
48
+ });
49
+ }
50
+ }, l = (h) => {
51
+ h.target === e && (n.current = y(o.current));
52
+ };
53
+ return e.addEventListener("animationstart", l), e.addEventListener("animationcancel", d), e.addEventListener("animationend", d), () => {
54
+ p.clearTimeout(c), e.removeEventListener("animationstart", l), e.removeEventListener("animationcancel", d), e.removeEventListener("animationend", d);
55
+ };
56
+ } else
57
+ s("ANIMATION_END");
58
+ }, [e, s]), {
59
+ isPresent: ["mounted", "unmountSuspended"].includes(u),
60
+ ref: a.useCallback((c) => {
61
+ o.current = c ? getComputedStyle(c) : null, r(c);
62
+ }, [])
63
+ };
64
+ }
65
+ function y(t) {
66
+ return (t == null ? void 0 : t.animationName) || "none";
67
+ }
68
+ function te(t) {
69
+ var o, i;
70
+ let e = (o = Object.getOwnPropertyDescriptor(t.props, "ref")) == null ? void 0 : o.get, r = e && "isReactWarning" in e && e.isReactWarning;
71
+ return r ? t.ref : (e = (i = Object.getOwnPropertyDescriptor(t, "ref")) == null ? void 0 : i.get, r = e && "isReactWarning" in e && e.isReactWarning, r ? t.props.ref : t.props.ref || t.ref);
72
+ }
73
+ var ne = [
74
+ "a",
75
+ "button",
76
+ "div",
77
+ "form",
78
+ "h2",
79
+ "h3",
80
+ "img",
81
+ "input",
82
+ "label",
83
+ "li",
84
+ "nav",
85
+ "ol",
86
+ "p",
87
+ "select",
88
+ "span",
89
+ "svg",
90
+ "ul"
91
+ ], P = ne.reduce((t, e) => {
92
+ const r = K(`Primitive.${e}`), o = a.forwardRef((i, n) => {
93
+ const { asChild: m, ...u } = i, s = m ? r : e;
94
+ return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */ f(s, { ...u, ref: n });
95
+ });
96
+ return o.displayName = `Primitive.${e}`, { ...t, [e]: o };
97
+ }, {}), x = "Checkbox", [re] = J(x), [oe, I] = re(x);
98
+ function ie(t) {
99
+ const {
100
+ __scopeCheckbox: e,
101
+ checked: r,
102
+ children: o,
103
+ defaultChecked: i,
104
+ disabled: n,
105
+ form: m,
106
+ name: u,
107
+ onCheckedChange: s,
108
+ required: c,
109
+ value: p = "on",
110
+ // @ts-expect-error
111
+ internal_do_not_use_render: d
112
+ } = t, [l, h] = X({
113
+ prop: r,
114
+ defaultProp: i ?? !1,
115
+ onChange: s,
116
+ caller: x
117
+ }), [v, k] = a.useState(null), [g, b] = a.useState(null), C = a.useRef(!1), w = v ? !!m || !!v.closest("form") : (
118
+ // We set this to true by default so that events bubble to forms without JS (SSR)
119
+ !0
120
+ ), R = {
121
+ checked: l,
122
+ disabled: n,
123
+ setChecked: h,
124
+ control: v,
125
+ setControl: k,
126
+ name: u,
127
+ form: m,
128
+ value: p,
129
+ hasConsumerStoppedPropagationRef: C,
130
+ required: c,
131
+ defaultChecked: N(i) ? !1 : i,
132
+ isFormControl: w,
133
+ bubbleInput: g,
134
+ setBubbleInput: b
135
+ };
136
+ return /* @__PURE__ */ f(
137
+ oe,
138
+ {
139
+ scope: e,
140
+ ...R,
141
+ children: ae(d) ? d(R) : o
142
+ }
143
+ );
144
+ }
145
+ var U = "CheckboxTrigger", D = a.forwardRef(
146
+ ({ __scopeCheckbox: t, onKeyDown: e, onClick: r, ...o }, i) => {
147
+ const {
148
+ control: n,
149
+ value: m,
150
+ disabled: u,
151
+ checked: s,
152
+ required: c,
153
+ setControl: p,
154
+ setChecked: d,
155
+ hasConsumerStoppedPropagationRef: l,
156
+ isFormControl: h,
157
+ bubbleInput: v
158
+ } = I(U, t), k = E(i, p), g = a.useRef(s);
159
+ return a.useEffect(() => {
160
+ const b = n == null ? void 0 : n.form;
161
+ if (b) {
162
+ const C = () => d(g.current);
163
+ return b.addEventListener("reset", C), () => b.removeEventListener("reset", C);
164
+ }
165
+ }, [n, d]), /* @__PURE__ */ f(
166
+ P.button,
167
+ {
168
+ type: "button",
169
+ role: "checkbox",
170
+ "aria-checked": N(s) ? "mixed" : s,
171
+ "aria-required": c,
172
+ "data-state": q(s),
173
+ "data-disabled": u ? "" : void 0,
174
+ disabled: u,
175
+ value: m,
176
+ ...o,
177
+ ref: k,
178
+ onKeyDown: M(e, (b) => {
179
+ b.key === "Enter" && b.preventDefault();
180
+ }),
181
+ onClick: M(r, (b) => {
182
+ d((C) => N(C) ? !0 : !C), v && h && (l.current = b.isPropagationStopped(), l.current || b.stopPropagation());
183
+ })
184
+ }
185
+ );
186
+ }
187
+ );
188
+ D.displayName = U;
189
+ var S = a.forwardRef(
190
+ (t, e) => {
191
+ const {
192
+ __scopeCheckbox: r,
193
+ name: o,
194
+ checked: i,
195
+ defaultChecked: n,
196
+ required: m,
197
+ disabled: u,
198
+ value: s,
199
+ onCheckedChange: c,
200
+ form: p,
201
+ ...d
202
+ } = t;
203
+ return /* @__PURE__ */ f(
204
+ ie,
205
+ {
206
+ __scopeCheckbox: r,
207
+ checked: i,
208
+ defaultChecked: n,
209
+ disabled: u,
210
+ required: m,
211
+ onCheckedChange: c,
212
+ name: o,
213
+ form: p,
214
+ value: s,
215
+ internal_do_not_use_render: ({ isFormControl: l }) => /* @__PURE__ */ H(G, { children: [
216
+ /* @__PURE__ */ f(
217
+ D,
218
+ {
219
+ ...d,
220
+ ref: e,
221
+ __scopeCheckbox: r
222
+ }
223
+ ),
224
+ l && /* @__PURE__ */ f(
225
+ j,
226
+ {
227
+ __scopeCheckbox: r
228
+ }
229
+ )
230
+ ] })
231
+ }
232
+ );
233
+ }
234
+ );
235
+ S.displayName = x;
236
+ var B = "CheckboxIndicator", F = a.forwardRef(
237
+ (t, e) => {
238
+ const { __scopeCheckbox: r, forceMount: o, ...i } = t, n = I(B, r);
239
+ return /* @__PURE__ */ f(
240
+ L,
241
+ {
242
+ present: o || N(n.checked) || n.checked === !0,
243
+ children: /* @__PURE__ */ f(
244
+ P.span,
245
+ {
246
+ "data-state": q(n.checked),
247
+ "data-disabled": n.disabled ? "" : void 0,
248
+ ...i,
249
+ ref: e,
250
+ style: { pointerEvents: "none", ...t.style }
251
+ }
252
+ )
253
+ }
254
+ );
255
+ }
256
+ );
257
+ F.displayName = B;
258
+ var W = "CheckboxBubbleInput", j = a.forwardRef(
259
+ ({ __scopeCheckbox: t, ...e }, r) => {
260
+ const {
261
+ control: o,
262
+ hasConsumerStoppedPropagationRef: i,
263
+ checked: n,
264
+ defaultChecked: m,
265
+ required: u,
266
+ disabled: s,
267
+ name: c,
268
+ value: p,
269
+ form: d,
270
+ bubbleInput: l,
271
+ setBubbleInput: h
272
+ } = I(W, t), v = E(r, h), k = Q(n), g = V(o);
273
+ a.useEffect(() => {
274
+ const C = l;
275
+ if (!C) return;
276
+ const w = window.HTMLInputElement.prototype, _ = Object.getOwnPropertyDescriptor(
277
+ w,
278
+ "checked"
279
+ ).set, z = !i.current;
280
+ if (k !== n && _) {
281
+ const $ = new Event("click", { bubbles: z });
282
+ C.indeterminate = N(n), _.call(C, N(n) ? !1 : n), C.dispatchEvent($);
283
+ }
284
+ }, [l, k, n, i]);
285
+ const b = a.useRef(N(n) ? !1 : n);
286
+ return /* @__PURE__ */ f(
287
+ P.input,
288
+ {
289
+ type: "checkbox",
290
+ "aria-hidden": !0,
291
+ defaultChecked: m ?? b.current,
292
+ required: u,
293
+ disabled: s,
294
+ name: c,
295
+ value: p,
296
+ form: d,
297
+ ...e,
298
+ tabIndex: -1,
299
+ ref: v,
300
+ style: {
301
+ ...e.style,
302
+ ...g,
303
+ position: "absolute",
304
+ pointerEvents: "none",
305
+ opacity: 0,
306
+ margin: 0,
307
+ // We transform because the input is absolutely positioned but we have
308
+ // rendered it **after** the button. This pulls it back to sit on top
309
+ // of the button.
310
+ transform: "translateX(-100%)"
311
+ }
312
+ }
313
+ );
314
+ }
315
+ );
316
+ j.displayName = W;
317
+ function ae(t) {
318
+ return typeof t == "function";
319
+ }
320
+ function N(t) {
321
+ return t === "indeterminate";
322
+ }
323
+ function q(t) {
324
+ return N(t) ? "indeterminate" : t ? "checked" : "unchecked";
325
+ }
326
+ /**
327
+ * @license lucide-react v1.16.0 - ISC
328
+ *
329
+ * This source code is licensed under the ISC license.
330
+ * See the LICENSE file in the root directory of this source tree.
331
+ */
332
+ const se = [["path", { d: "m15 18-6-6 6-6", key: "1wnfg3" }]], be = T("chevron-left", se);
333
+ /**
334
+ * @license lucide-react v1.16.0 - ISC
335
+ *
336
+ * This source code is licensed under the ISC license.
337
+ * See the LICENSE file in the root directory of this source tree.
338
+ */
339
+ const ce = [["path", { d: "m9 18 6-6-6-6", key: "mthhwq" }]], Ce = T("chevron-right", ce), de = a.forwardRef(
340
+ ({ className: t, ...e }, r) => /* @__PURE__ */ f(
341
+ S,
342
+ {
343
+ ref: r,
344
+ className: O(
345
+ "peer size-4 shrink-0 rounded-sm border border-primary ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground data-[state=indeterminate]:bg-primary data-[state=indeterminate]:text-primary-foreground",
346
+ t
347
+ ),
348
+ ...e,
349
+ children: /* @__PURE__ */ f(F, { className: O("flex items-center justify-center text-current"), children: e.checked === "indeterminate" ? /* @__PURE__ */ f("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 3, className: "size-3", children: /* @__PURE__ */ f("line", { x1: "5", y1: "12", x2: "19", y2: "12" }) }) : /* @__PURE__ */ f(Y, { className: "size-3" }) })
350
+ }
351
+ )
352
+ );
353
+ de.displayName = S.displayName;
354
+ export {
355
+ de as C,
356
+ be as a,
357
+ Ce as b
358
+ };
@@ -0,0 +1,11 @@
1
+ import { c as o } from "./createLucideIcon-CRdjzt2A.js";
2
+ /**
3
+ * @license lucide-react v1.16.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 n = [["path", { d: "m6 9 6 6 6-6", key: "qrunsl" }]], e = o("chevron-down", n);
9
+ export {
10
+ e as C
11
+ };
@@ -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-Bp6EAsf7.js";
1
+ import { K as s, a as d, M as i } from "../../../MetricCard-88djqC4o.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,6 +1,7 @@
1
1
  export * from "./cards";
2
2
  export * from "./inputs";
3
3
  export * from "./states";
4
+ export * from "./table";
4
5
  export * from "./navbar";
5
6
  export * from "./theme";
6
7
  //# 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;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,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;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC"}
@@ -1,16 +1,28 @@
1
- import { K as e, a as o } from "../../KpiCards-Bp6EAsf7.js";
2
- import { D as s, S as p } from "../../DateRangePicker-BAn4LMHi.js";
3
- import { E as m, L as f } from "../../LoadingState-C0uS6aGT.js";
4
- import { S as x, T as d } from "../../Topbar-CFALRIJn.js";
5
- import { T as c } from "../../ThemeSelector-DQmkKmzE.js";
1
+ import { K as r, a as s, M as t } from "../../MetricCard-88djqC4o.js";
2
+ import { D as T, S as l } from "../../DateRangePicker-rrXXEYz8.js";
3
+ import { C as i, a as d, E as n, L as p } from "../../LoadingState-CqRLmkxn.js";
4
+ import { D as c, T as m, a as f, b as x, c as C, d as D, e as g, u as k } from "../../DataTable-CjFA9p4V.js";
5
+ import { S as K, T as h } from "../../Topbar-BqC05zWP.js";
6
+ import { T as B } from "../../ThemeSelector-sTd9T2OD.js";
6
7
  export {
7
- s as DateRangePicker,
8
- m as ErrorState,
9
- e as KpiCard,
10
- o as KpiCards,
11
- f as LoadingState,
12
- p as SearchInput,
13
- x as Sidebar,
14
- c as ThemeSelector,
15
- d as Topbar
8
+ i as CardSkeleton,
9
+ d as CardsSkeleton,
10
+ c as DataTable,
11
+ T as DateRangePicker,
12
+ n as ErrorState,
13
+ r as KpiCard,
14
+ s as KpiCards,
15
+ p as LoadingState,
16
+ t as MetricCard,
17
+ l as SearchInput,
18
+ K as Sidebar,
19
+ m as TableActions,
20
+ f as TableBody,
21
+ x as TableBulkActions,
22
+ C as TableHeader,
23
+ D as TablePagination,
24
+ g as TableSettings,
25
+ B as ThemeSelector,
26
+ h as Topbar,
27
+ k as useDataTable
16
28
  };
@@ -1,4 +1,4 @@
1
- import { D as r, S as t } from "../../../DateRangePicker-BAn4LMHi.js";
1
+ import { D as r, S as t } from "../../../DateRangePicker-rrXXEYz8.js";
2
2
  export {
3
3
  r as DateRangePicker,
4
4
  t as SearchInput
@@ -1,4 +1,4 @@
1
- import { S as o, T as b } from "../../../Topbar-CFALRIJn.js";
1
+ import { S as o, T as b } from "../../../Topbar-BqC05zWP.js";
2
2
  export {
3
3
  o as Sidebar,
4
4
  b as Topbar
@@ -0,0 +1,3 @@
1
+ import * as React from "react";
2
+ export declare const CardSkeleton: () => React.JSX.Element;
3
+ //# sourceMappingURL=CardSkeleton.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CardSkeleton.d.ts","sourceRoot":"","sources":["../../../../src/components/core/states/CardSkeleton.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,eAAO,MAAM,YAAY,QAAO,KAAK,CAAC,GAAG,CAAC,OAczC,CAAC"}
@@ -0,0 +1,7 @@
1
+ import * as React from "react";
2
+ interface CardsSkeletonProps {
3
+ count?: number;
4
+ }
5
+ export declare const CardsSkeleton: ({ count }: CardsSkeletonProps) => React.JSX.Element;
6
+ export {};
7
+ //# sourceMappingURL=CardsSkeleton.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CardsSkeleton.d.ts","sourceRoot":"","sources":["../../../../src/components/core/states/CardsSkeleton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,UAAU,kBAAkB;IAC1B,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,eAAO,MAAM,aAAa,GAAI,WAAe,kBAAkB,KAAG,KAAK,CAAC,GAAG,CAAC,OAW3E,CAAC"}
@@ -1,3 +1,5 @@
1
+ export { CardSkeleton } from "./CardSkeleton";
2
+ export { CardsSkeleton } from "./CardsSkeleton";
1
3
  export { ErrorState } from "./ErrorState";
2
4
  export { LoadingState } from "./LoadingState";
3
5
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/core/states/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/core/states/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC"}
@@ -1,5 +1,7 @@
1
- import { E as t, L as o } from "../../../LoadingState-C0uS6aGT.js";
1
+ import { C as r, a as t, E as o, L as s } from "../../../LoadingState-CqRLmkxn.js";
2
2
  export {
3
- t as ErrorState,
4
- o as LoadingState
3
+ r as CardSkeleton,
4
+ t as CardsSkeleton,
5
+ o as ErrorState,
6
+ s as LoadingState
5
7
  };
@@ -0,0 +1,5 @@
1
+ import React from "react";
2
+ import { DataTableProps } from "@/types/DataTableProps";
3
+ export type { ColumnDef, BulkAction, DataTableProps, RowAction } from "../../../types";
4
+ export default function DataTable<T>({ data, columns, getRowId, onRowClick, actions, bulkActions, draggableColumns, resizableColumns, columnVisibility, isLoading, noDataMessage, defaultPageSize, pageSizeOptions, }: DataTableProps<T>): React.JSX.Element;
5
+ //# sourceMappingURL=DataTable.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DataTable.d.ts","sourceRoot":"","sources":["../../../../src/components/core/table/DataTable.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AASxD,YAAY,EAAE,SAAS,EAAE,UAAU,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAEvF,MAAM,CAAC,OAAO,UAAU,SAAS,CAAC,CAAC,EAAE,EACnC,IAAI,EACJ,OAAO,EACP,QAAQ,EACR,UAAU,EACV,OAAO,EACP,WAAW,EACX,gBAAuB,EACvB,gBAAuB,EACvB,gBAAuB,EACvB,SAAiB,EACjB,aAAgC,EAChC,eAAmC,EACnC,eAA2C,GAC5C,EAAE,cAAc,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,CAoGvC"}
@@ -0,0 +1,8 @@
1
+ import React from "react";
2
+ import { RowAction } from "@/types/RowAction";
3
+ export interface TableActionsProps<T> {
4
+ actions: RowAction<T>[];
5
+ row: T;
6
+ }
7
+ export declare function TableActions<T>({ actions, row }: TableActionsProps<T>): React.JSX.Element;
8
+ //# sourceMappingURL=TableActions.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TableActions.d.ts","sourceRoot":"","sources":["../../../../src/components/core/table/TableActions.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAE9C,MAAM,WAAW,iBAAiB,CAAC,CAAC;IAClC,OAAO,EAAE,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC;IACxB,GAAG,EAAE,CAAC,CAAC;CACR;AAED,wBAAgB,YAAY,CAAC,CAAC,EAAE,EAAE,OAAO,EAAE,GAAG,EAAE,EAAE,iBAAiB,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,CAoCzF"}
@@ -0,0 +1,21 @@
1
+ import React from "react";
2
+ import { RowAction } from "@/types/RowAction";
3
+ import { ColumnDef } from "@/types/ColumnDef";
4
+ export interface TableBodyProps<T> {
5
+ isLoading: boolean;
6
+ colSpanCount: number;
7
+ noDataMessage: string;
8
+ paginatedData: T[];
9
+ getRowId: (row: T) => string;
10
+ onRowClick?: (row: T) => void;
11
+ hasBulkActions: boolean;
12
+ selectedRows: string[];
13
+ toggleRowSelection: (id: string) => void;
14
+ visibleColumnsArray: ColumnDef<T>[];
15
+ columnWidths: Record<string, number>;
16
+ hasActions: boolean;
17
+ actions?: RowAction<T>[];
18
+ columns: ColumnDef<T>[];
19
+ }
20
+ export declare function TableBody<T>({ isLoading, colSpanCount, noDataMessage, paginatedData, getRowId, onRowClick, hasBulkActions, selectedRows, toggleRowSelection, visibleColumnsArray, columnWidths, hasActions, actions, columns, }: TableBodyProps<T>): React.JSX.Element;
21
+ //# sourceMappingURL=TableBody.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TableBody.d.ts","sourceRoot":"","sources":["../../../../src/components/core/table/TableBody.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAC9C,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAI9C,MAAM,WAAW,cAAc,CAAC,CAAC;IAC/B,SAAS,EAAE,OAAO,CAAC;IACnB,YAAY,EAAE,MAAM,CAAC;IACrB,aAAa,EAAE,MAAM,CAAC;IACtB,aAAa,EAAE,CAAC,EAAE,CAAC;IACnB,QAAQ,EAAE,CAAC,GAAG,EAAE,CAAC,KAAK,MAAM,CAAC;IAC7B,UAAU,CAAC,EAAE,CAAC,GAAG,EAAE,CAAC,KAAK,IAAI,CAAC;IAC9B,cAAc,EAAE,OAAO,CAAC;IACxB,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB,kBAAkB,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IACzC,mBAAmB,EAAE,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC;IACpC,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACrC,UAAU,EAAE,OAAO,CAAC;IACpB,OAAO,CAAC,EAAE,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC;IACzB,OAAO,EAAE,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC;CACzB;AAED,wBAAgB,SAAS,CAAC,CAAC,EAAE,EAC3B,SAAS,EACT,YAAY,EACZ,aAAa,EACb,aAAa,EACb,QAAQ,EACR,UAAU,EACV,cAAc,EACd,YAAY,EACZ,kBAAkB,EAClB,mBAAmB,EACnB,YAAY,EACZ,UAAU,EACV,OAAO,EACP,OAAO,GACR,EAAE,cAAc,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,CAyFvC"}
@@ -0,0 +1,9 @@
1
+ import React from "react";
2
+ import { BulkAction } from "@/types/BulkAction";
3
+ export interface TableBulkActionsProps {
4
+ selectedRows: string[];
5
+ setSelectedRows: React.Dispatch<React.SetStateAction<string[]>>;
6
+ bulkActions: BulkAction[];
7
+ }
8
+ export declare function TableBulkActions({ selectedRows, setSelectedRows, bulkActions }: TableBulkActionsProps): React.JSX.Element;
9
+ //# sourceMappingURL=TableBulkActions.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TableBulkActions.d.ts","sourceRoot":"","sources":["../../../../src/components/core/table/TableBulkActions.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAEhD,MAAM,WAAW,qBAAqB;IACpC,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB,eAAe,EAAE,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,cAAc,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC;IAChE,WAAW,EAAE,UAAU,EAAE,CAAC;CAC3B;AAED,wBAAgB,gBAAgB,CAAC,EAAE,YAAY,EAAE,eAAe,EAAE,WAAW,EAAE,EAAE,qBAAqB,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,CA2CzH"}
@@ -0,0 +1,23 @@
1
+ import React from "react";
2
+ import { ColumnDef } from "@/types/ColumnDef";
3
+ export interface TableHeaderProps<T> {
4
+ hasBulkActions: boolean;
5
+ selectedRows: string[];
6
+ totalItems: number;
7
+ toggleSelectAll: () => void;
8
+ visibleColumnsArray: ColumnDef<T>[];
9
+ draggableColumns: boolean;
10
+ resizableColumns: boolean;
11
+ columnWidths: Record<string, number>;
12
+ sortColumn: string | null;
13
+ sortDirection: "asc" | "desc";
14
+ handleSort: (columnKey: string) => void;
15
+ handleDragStart: (e: React.DragEvent, columnKey: string) => void;
16
+ handleDragOver: (e: React.DragEvent, columnKey: string) => void;
17
+ handleDrop: (e: React.DragEvent, targetColumnKey: string) => void;
18
+ handleMouseDown: (e: React.MouseEvent, columnKey: string) => void;
19
+ hasActions: boolean;
20
+ settingsNode?: React.ReactNode;
21
+ }
22
+ export declare function TableHeader<T>({ hasBulkActions, selectedRows, totalItems, toggleSelectAll, visibleColumnsArray, draggableColumns, resizableColumns, columnWidths, sortColumn, sortDirection, handleSort, handleDragStart, handleDragOver, handleDrop, handleMouseDown, hasActions, settingsNode, }: TableHeaderProps<T>): React.JSX.Element;
23
+ //# sourceMappingURL=TableHeader.d.ts.map