analytica-frontend-lib 1.1.21 → 1.1.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.
@@ -0,0 +1,79 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+
20
+ // src/components/LoadingModal/loadingModal.tsx
21
+ var loadingModal_exports = {};
22
+ __export(loadingModal_exports, {
23
+ default: () => loadingModal_default
24
+ });
25
+ module.exports = __toCommonJS(loadingModal_exports);
26
+ var import_react = require("react");
27
+ var import_jsx_runtime = require("react/jsx-runtime");
28
+ var LoadingModal = (0, import_react.forwardRef)(
29
+ ({ open, title = "Titulo...", subtitle = "Subtitulo...", ...props }, ref) => {
30
+ if (!open) return null;
31
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
32
+ "div",
33
+ {
34
+ ref,
35
+ "aria-modal": "true",
36
+ "aria-labelledby": "loading-modal-title",
37
+ "aria-describedby": "loading-modal-subtitle",
38
+ className: "fixed inset-0 z-50 flex items-center justify-center bg-background/90 backdrop-blur-xs",
39
+ ...props,
40
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "w-full max-w-[364px] flex flex-col items-center justify-center gap-14", children: [
41
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "animate-spin", "aria-hidden": "true", children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
42
+ "svg",
43
+ {
44
+ width: "102",
45
+ height: "102",
46
+ viewBox: "0 0 102 102",
47
+ fill: "none",
48
+ xmlns: "http://www.w3.org/2000/svg",
49
+ "aria-hidden": "true",
50
+ focusable: false,
51
+ children: [
52
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
53
+ "path",
54
+ {
55
+ d: "M101.5 51C101.5 78.8904 78.8904 101.5 51 101.5C23.1096 101.5 0.5 78.8904 0.5 51C0.5 23.1096 23.1096 0.5 51 0.5C78.8904 0.5 101.5 23.1096 101.5 51ZM8.62286 51C8.62286 74.4043 27.5957 93.3771 51 93.3771C74.4043 93.3771 93.3771 74.4043 93.3771 51C93.3771 27.5957 74.4043 8.62286 51 8.62286C27.5957 8.62286 8.62286 27.5957 8.62286 51Z",
56
+ className: "fill-primary-100"
57
+ }
58
+ ),
59
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
60
+ "path",
61
+ {
62
+ d: "M97.4386 51C99.6816 51 101.517 52.8213 101.337 55.0571C100.754 62.2833 98.6212 69.3162 95.0643 75.6696C90.8444 83.207 84.7616 89.536 77.3975 94.0514C70.0333 98.5668 61.6339 101.118 53.0024 101.46C44.371 101.803 35.7959 99.9255 28.0971 96.0078C20.3982 92.0902 13.833 86.2631 9.02917 79.0838C4.22529 71.9045 1.34332 63.6129 0.658804 55.0017C-0.0257159 46.3906 1.51009 37.7479 5.1194 29.8997C8.16173 23.2845 12.5915 17.4202 18.0904 12.6959C19.7917 11.2341 22.3444 11.6457 23.6647 13.459C24.9851 15.2723 24.5702 17.7988 22.8916 19.2866C18.5048 23.1747 14.9608 27.9413 12.4992 33.2937C9.47048 39.8794 8.1817 47.132 8.75612 54.3581C9.33053 61.5841 11.7489 68.542 15.7801 74.5666C19.8113 80.5911 25.3205 85.4809 31.781 88.7684C38.2414 92.0559 45.4372 93.6312 52.6804 93.3438C59.9235 93.0564 66.9718 90.9158 73.1515 87.1267C79.3311 83.3375 84.4355 78.0266 87.9766 71.7015C90.8546 66.561 92.6217 60.8903 93.1827 55.0553C93.3973 52.8225 95.1955 51 97.4386 51Z",
63
+ className: "fill-primary-600"
64
+ }
65
+ )
66
+ ]
67
+ }
68
+ ) }),
69
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", { className: "flex flex-col gap-4 text-center", children: [
70
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { id: "loading-modal-title", className: "text-text-950 text-lg", children: title }),
71
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { id: "loading-modal-subtitle", className: "text-text-600 text-lg", children: subtitle })
72
+ ] })
73
+ ] })
74
+ }
75
+ );
76
+ }
77
+ );
78
+ var loadingModal_default = LoadingModal;
79
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/components/LoadingModal/loadingModal.tsx"],"sourcesContent":["import { forwardRef, HTMLAttributes } from 'react';\n\ninterface LoadingModalProps extends HTMLAttributes<HTMLDivElement> {\n open: boolean;\n title?: string;\n subtitle?: string;\n}\n\nconst LoadingModal = forwardRef<HTMLDivElement, LoadingModalProps>(\n ({ open, title = 'Titulo...', subtitle = 'Subtitulo...', ...props }, ref) => {\n if (!open) return null;\n\n return (\n <div\n ref={ref}\n aria-modal=\"true\"\n aria-labelledby=\"loading-modal-title\"\n aria-describedby=\"loading-modal-subtitle\"\n className=\"fixed inset-0 z-50 flex items-center justify-center bg-background/90 backdrop-blur-xs\"\n {...props}\n >\n <div className=\"w-full max-w-[364px] flex flex-col items-center justify-center gap-14\">\n <span className=\"animate-spin\" aria-hidden=\"true\">\n <svg\n width=\"102\"\n height=\"102\"\n viewBox=\"0 0 102 102\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n aria-hidden=\"true\"\n focusable={false}\n >\n <path\n d=\"M101.5 51C101.5 78.8904 78.8904 101.5 51 101.5C23.1096 101.5 0.5 78.8904 0.5 51C0.5 23.1096 23.1096 0.5 51 0.5C78.8904 0.5 101.5 23.1096 101.5 51ZM8.62286 51C8.62286 74.4043 27.5957 93.3771 51 93.3771C74.4043 93.3771 93.3771 74.4043 93.3771 51C93.3771 27.5957 74.4043 8.62286 51 8.62286C27.5957 8.62286 8.62286 27.5957 8.62286 51Z\"\n className=\"fill-primary-100\"\n />\n <path\n d=\"M97.4386 51C99.6816 51 101.517 52.8213 101.337 55.0571C100.754 62.2833 98.6212 69.3162 95.0643 75.6696C90.8444 83.207 84.7616 89.536 77.3975 94.0514C70.0333 98.5668 61.6339 101.118 53.0024 101.46C44.371 101.803 35.7959 99.9255 28.0971 96.0078C20.3982 92.0902 13.833 86.2631 9.02917 79.0838C4.22529 71.9045 1.34332 63.6129 0.658804 55.0017C-0.0257159 46.3906 1.51009 37.7479 5.1194 29.8997C8.16173 23.2845 12.5915 17.4202 18.0904 12.6959C19.7917 11.2341 22.3444 11.6457 23.6647 13.459C24.9851 15.2723 24.5702 17.7988 22.8916 19.2866C18.5048 23.1747 14.9608 27.9413 12.4992 33.2937C9.47048 39.8794 8.1817 47.132 8.75612 54.3581C9.33053 61.5841 11.7489 68.542 15.7801 74.5666C19.8113 80.5911 25.3205 85.4809 31.781 88.7684C38.2414 92.0559 45.4372 93.6312 52.6804 93.3438C59.9235 93.0564 66.9718 90.9158 73.1515 87.1267C79.3311 83.3375 84.4355 78.0266 87.9766 71.7015C90.8546 66.561 92.6217 60.8903 93.1827 55.0553C93.3973 52.8225 95.1955 51 97.4386 51Z\"\n className=\"fill-primary-600\"\n />\n </svg>\n </span>\n\n <span className=\"flex flex-col gap-4 text-center\">\n <p id=\"loading-modal-title\" className=\"text-text-950 text-lg\">\n {title}\n </p>\n\n <p id=\"loading-modal-subtitle\" className=\"text-text-600 text-lg\">\n {subtitle}\n </p>\n </span>\n </div>\n </div>\n );\n }\n);\n\nexport default LoadingModal;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAA2C;AAuB/B;AAfZ,IAAM,mBAAe;AAAA,EACnB,CAAC,EAAE,MAAM,QAAQ,aAAa,WAAW,gBAAgB,GAAG,MAAM,GAAG,QAAQ;AAC3E,QAAI,CAAC,KAAM,QAAO;AAElB,WACE;AAAA,MAAC;AAAA;AAAA,QACC;AAAA,QACA,cAAW;AAAA,QACX,mBAAgB;AAAA,QAChB,oBAAiB;AAAA,QACjB,WAAU;AAAA,QACT,GAAG;AAAA,QAEJ,uDAAC,SAAI,WAAU,yEACb;AAAA,sDAAC,UAAK,WAAU,gBAAe,eAAY,QACzC;AAAA,YAAC;AAAA;AAAA,cACC,OAAM;AAAA,cACN,QAAO;AAAA,cACP,SAAQ;AAAA,cACR,MAAK;AAAA,cACL,OAAM;AAAA,cACN,eAAY;AAAA,cACZ,WAAW;AAAA,cAEX;AAAA;AAAA,kBAAC;AAAA;AAAA,oBACC,GAAE;AAAA,oBACF,WAAU;AAAA;AAAA,gBACZ;AAAA,gBACA;AAAA,kBAAC;AAAA;AAAA,oBACC,GAAE;AAAA,oBACF,WAAU;AAAA;AAAA,gBACZ;AAAA;AAAA;AAAA,UACF,GACF;AAAA,UAEA,6CAAC,UAAK,WAAU,mCACd;AAAA,wDAAC,OAAE,IAAG,uBAAsB,WAAU,yBACnC,iBACH;AAAA,YAEA,4CAAC,OAAE,IAAG,0BAAyB,WAAU,yBACtC,oBACH;AAAA,aACF;AAAA,WACF;AAAA;AAAA,IACF;AAAA,EAEJ;AACF;AAEA,IAAO,uBAAQ;","names":[]}
@@ -0,0 +1,58 @@
1
+ // src/components/LoadingModal/loadingModal.tsx
2
+ import { forwardRef } from "react";
3
+ import { jsx, jsxs } from "react/jsx-runtime";
4
+ var LoadingModal = forwardRef(
5
+ ({ open, title = "Titulo...", subtitle = "Subtitulo...", ...props }, ref) => {
6
+ if (!open) return null;
7
+ return /* @__PURE__ */ jsx(
8
+ "div",
9
+ {
10
+ ref,
11
+ "aria-modal": "true",
12
+ "aria-labelledby": "loading-modal-title",
13
+ "aria-describedby": "loading-modal-subtitle",
14
+ className: "fixed inset-0 z-50 flex items-center justify-center bg-background/90 backdrop-blur-xs",
15
+ ...props,
16
+ children: /* @__PURE__ */ jsxs("div", { className: "w-full max-w-[364px] flex flex-col items-center justify-center gap-14", children: [
17
+ /* @__PURE__ */ jsx("span", { className: "animate-spin", "aria-hidden": "true", children: /* @__PURE__ */ jsxs(
18
+ "svg",
19
+ {
20
+ width: "102",
21
+ height: "102",
22
+ viewBox: "0 0 102 102",
23
+ fill: "none",
24
+ xmlns: "http://www.w3.org/2000/svg",
25
+ "aria-hidden": "true",
26
+ focusable: false,
27
+ children: [
28
+ /* @__PURE__ */ jsx(
29
+ "path",
30
+ {
31
+ d: "M101.5 51C101.5 78.8904 78.8904 101.5 51 101.5C23.1096 101.5 0.5 78.8904 0.5 51C0.5 23.1096 23.1096 0.5 51 0.5C78.8904 0.5 101.5 23.1096 101.5 51ZM8.62286 51C8.62286 74.4043 27.5957 93.3771 51 93.3771C74.4043 93.3771 93.3771 74.4043 93.3771 51C93.3771 27.5957 74.4043 8.62286 51 8.62286C27.5957 8.62286 8.62286 27.5957 8.62286 51Z",
32
+ className: "fill-primary-100"
33
+ }
34
+ ),
35
+ /* @__PURE__ */ jsx(
36
+ "path",
37
+ {
38
+ d: "M97.4386 51C99.6816 51 101.517 52.8213 101.337 55.0571C100.754 62.2833 98.6212 69.3162 95.0643 75.6696C90.8444 83.207 84.7616 89.536 77.3975 94.0514C70.0333 98.5668 61.6339 101.118 53.0024 101.46C44.371 101.803 35.7959 99.9255 28.0971 96.0078C20.3982 92.0902 13.833 86.2631 9.02917 79.0838C4.22529 71.9045 1.34332 63.6129 0.658804 55.0017C-0.0257159 46.3906 1.51009 37.7479 5.1194 29.8997C8.16173 23.2845 12.5915 17.4202 18.0904 12.6959C19.7917 11.2341 22.3444 11.6457 23.6647 13.459C24.9851 15.2723 24.5702 17.7988 22.8916 19.2866C18.5048 23.1747 14.9608 27.9413 12.4992 33.2937C9.47048 39.8794 8.1817 47.132 8.75612 54.3581C9.33053 61.5841 11.7489 68.542 15.7801 74.5666C19.8113 80.5911 25.3205 85.4809 31.781 88.7684C38.2414 92.0559 45.4372 93.6312 52.6804 93.3438C59.9235 93.0564 66.9718 90.9158 73.1515 87.1267C79.3311 83.3375 84.4355 78.0266 87.9766 71.7015C90.8546 66.561 92.6217 60.8903 93.1827 55.0553C93.3973 52.8225 95.1955 51 97.4386 51Z",
39
+ className: "fill-primary-600"
40
+ }
41
+ )
42
+ ]
43
+ }
44
+ ) }),
45
+ /* @__PURE__ */ jsxs("span", { className: "flex flex-col gap-4 text-center", children: [
46
+ /* @__PURE__ */ jsx("p", { id: "loading-modal-title", className: "text-text-950 text-lg", children: title }),
47
+ /* @__PURE__ */ jsx("p", { id: "loading-modal-subtitle", className: "text-text-600 text-lg", children: subtitle })
48
+ ] })
49
+ ] })
50
+ }
51
+ );
52
+ }
53
+ );
54
+ var loadingModal_default = LoadingModal;
55
+ export {
56
+ loadingModal_default as default
57
+ };
58
+ //# sourceMappingURL=index.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/components/LoadingModal/loadingModal.tsx"],"sourcesContent":["import { forwardRef, HTMLAttributes } from 'react';\n\ninterface LoadingModalProps extends HTMLAttributes<HTMLDivElement> {\n open: boolean;\n title?: string;\n subtitle?: string;\n}\n\nconst LoadingModal = forwardRef<HTMLDivElement, LoadingModalProps>(\n ({ open, title = 'Titulo...', subtitle = 'Subtitulo...', ...props }, ref) => {\n if (!open) return null;\n\n return (\n <div\n ref={ref}\n aria-modal=\"true\"\n aria-labelledby=\"loading-modal-title\"\n aria-describedby=\"loading-modal-subtitle\"\n className=\"fixed inset-0 z-50 flex items-center justify-center bg-background/90 backdrop-blur-xs\"\n {...props}\n >\n <div className=\"w-full max-w-[364px] flex flex-col items-center justify-center gap-14\">\n <span className=\"animate-spin\" aria-hidden=\"true\">\n <svg\n width=\"102\"\n height=\"102\"\n viewBox=\"0 0 102 102\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n aria-hidden=\"true\"\n focusable={false}\n >\n <path\n d=\"M101.5 51C101.5 78.8904 78.8904 101.5 51 101.5C23.1096 101.5 0.5 78.8904 0.5 51C0.5 23.1096 23.1096 0.5 51 0.5C78.8904 0.5 101.5 23.1096 101.5 51ZM8.62286 51C8.62286 74.4043 27.5957 93.3771 51 93.3771C74.4043 93.3771 93.3771 74.4043 93.3771 51C93.3771 27.5957 74.4043 8.62286 51 8.62286C27.5957 8.62286 8.62286 27.5957 8.62286 51Z\"\n className=\"fill-primary-100\"\n />\n <path\n d=\"M97.4386 51C99.6816 51 101.517 52.8213 101.337 55.0571C100.754 62.2833 98.6212 69.3162 95.0643 75.6696C90.8444 83.207 84.7616 89.536 77.3975 94.0514C70.0333 98.5668 61.6339 101.118 53.0024 101.46C44.371 101.803 35.7959 99.9255 28.0971 96.0078C20.3982 92.0902 13.833 86.2631 9.02917 79.0838C4.22529 71.9045 1.34332 63.6129 0.658804 55.0017C-0.0257159 46.3906 1.51009 37.7479 5.1194 29.8997C8.16173 23.2845 12.5915 17.4202 18.0904 12.6959C19.7917 11.2341 22.3444 11.6457 23.6647 13.459C24.9851 15.2723 24.5702 17.7988 22.8916 19.2866C18.5048 23.1747 14.9608 27.9413 12.4992 33.2937C9.47048 39.8794 8.1817 47.132 8.75612 54.3581C9.33053 61.5841 11.7489 68.542 15.7801 74.5666C19.8113 80.5911 25.3205 85.4809 31.781 88.7684C38.2414 92.0559 45.4372 93.6312 52.6804 93.3438C59.9235 93.0564 66.9718 90.9158 73.1515 87.1267C79.3311 83.3375 84.4355 78.0266 87.9766 71.7015C90.8546 66.561 92.6217 60.8903 93.1827 55.0553C93.3973 52.8225 95.1955 51 97.4386 51Z\"\n className=\"fill-primary-600\"\n />\n </svg>\n </span>\n\n <span className=\"flex flex-col gap-4 text-center\">\n <p id=\"loading-modal-title\" className=\"text-text-950 text-lg\">\n {title}\n </p>\n\n <p id=\"loading-modal-subtitle\" className=\"text-text-600 text-lg\">\n {subtitle}\n </p>\n </span>\n </div>\n </div>\n );\n }\n);\n\nexport default LoadingModal;\n"],"mappings":";AAAA,SAAS,kBAAkC;AAuB/B,SASE,KATF;AAfZ,IAAM,eAAe;AAAA,EACnB,CAAC,EAAE,MAAM,QAAQ,aAAa,WAAW,gBAAgB,GAAG,MAAM,GAAG,QAAQ;AAC3E,QAAI,CAAC,KAAM,QAAO;AAElB,WACE;AAAA,MAAC;AAAA;AAAA,QACC;AAAA,QACA,cAAW;AAAA,QACX,mBAAgB;AAAA,QAChB,oBAAiB;AAAA,QACjB,WAAU;AAAA,QACT,GAAG;AAAA,QAEJ,+BAAC,SAAI,WAAU,yEACb;AAAA,8BAAC,UAAK,WAAU,gBAAe,eAAY,QACzC;AAAA,YAAC;AAAA;AAAA,cACC,OAAM;AAAA,cACN,QAAO;AAAA,cACP,SAAQ;AAAA,cACR,MAAK;AAAA,cACL,OAAM;AAAA,cACN,eAAY;AAAA,cACZ,WAAW;AAAA,cAEX;AAAA;AAAA,kBAAC;AAAA;AAAA,oBACC,GAAE;AAAA,oBACF,WAAU;AAAA;AAAA,gBACZ;AAAA,gBACA;AAAA,kBAAC;AAAA;AAAA,oBACC,GAAE;AAAA,oBACF,WAAU;AAAA;AAAA,gBACZ;AAAA;AAAA;AAAA,UACF,GACF;AAAA,UAEA,qBAAC,UAAK,WAAU,mCACd;AAAA,gCAAC,OAAE,IAAG,uBAAsB,WAAU,yBACnC,iBACH;AAAA,YAEA,oBAAC,OAAE,IAAG,0BAAyB,WAAU,yBACtC,oBACH;AAAA,aACF;AAAA,WACF;AAAA;AAAA,IACF;AAAA,EAEJ;AACF;AAEA,IAAO,uBAAQ;","names":[]}
@@ -0,0 +1,104 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import { ReactNode } from 'react';
3
+
4
+ interface NotificationItem {
5
+ id: string;
6
+ title: string;
7
+ message: string;
8
+ time: string;
9
+ isRead: boolean;
10
+ entityType?: string;
11
+ entityId?: string;
12
+ createdAt: string | Date;
13
+ }
14
+ interface NotificationGroup {
15
+ label: string;
16
+ notifications: NotificationItem[];
17
+ }
18
+ interface NotificationCardProps {
19
+ /**
20
+ * The notification title
21
+ */
22
+ title?: string;
23
+ /**
24
+ * The notification message content
25
+ */
26
+ message?: string;
27
+ /**
28
+ * Time displayed (e.g., "Há 3h", "12 Fev")
29
+ */
30
+ time?: string;
31
+ /**
32
+ * Whether the notification has been read
33
+ */
34
+ isRead?: boolean;
35
+ /**
36
+ * Callback when user marks notification as read
37
+ */
38
+ onMarkAsRead?: () => void;
39
+ /**
40
+ * Callback when user deletes notification
41
+ */
42
+ onDelete?: () => void;
43
+ /**
44
+ * Optional callback for navigation action
45
+ */
46
+ onNavigate?: () => void;
47
+ /**
48
+ * Label for the action button (only shown if onNavigate is provided)
49
+ */
50
+ actionLabel?: string;
51
+ /**
52
+ * Array of notifications for list mode
53
+ */
54
+ notifications?: NotificationItem[];
55
+ /**
56
+ * Array of grouped notifications
57
+ */
58
+ groupedNotifications?: NotificationGroup[];
59
+ /**
60
+ * Loading state for list mode
61
+ */
62
+ loading?: boolean;
63
+ /**
64
+ * Error state for list mode
65
+ */
66
+ error?: string | null;
67
+ /**
68
+ * Callback for retry when error occurs
69
+ */
70
+ onRetry?: () => void;
71
+ /**
72
+ * Callback when user marks a notification as read in list mode
73
+ */
74
+ onMarkAsReadById?: (id: string) => void;
75
+ /**
76
+ * Callback when user deletes a notification in list mode
77
+ */
78
+ onDeleteById?: (id: string) => void;
79
+ /**
80
+ * Callback when user navigates from a notification in list mode
81
+ */
82
+ onNavigateById?: (entityType?: string, entityId?: string) => void;
83
+ /**
84
+ * Function to get action label for a notification
85
+ */
86
+ getActionLabel?: (entityType?: string) => string | undefined;
87
+ /**
88
+ * Custom empty state component
89
+ */
90
+ renderEmpty?: () => ReactNode;
91
+ /**
92
+ * Additional CSS classes
93
+ */
94
+ className?: string;
95
+ }
96
+ /**
97
+ * NotificationCard component - can display single notification or list of notifications
98
+ *
99
+ * @param props - The notification card properties
100
+ * @returns JSX element representing the notification card or list
101
+ */
102
+ declare const NotificationCard: (props: NotificationCardProps) => react_jsx_runtime.JSX.Element;
103
+
104
+ export { type NotificationCardProps, type NotificationGroup, type NotificationItem, NotificationCard as default };
@@ -0,0 +1,104 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import { ReactNode } from 'react';
3
+
4
+ interface NotificationItem {
5
+ id: string;
6
+ title: string;
7
+ message: string;
8
+ time: string;
9
+ isRead: boolean;
10
+ entityType?: string;
11
+ entityId?: string;
12
+ createdAt: string | Date;
13
+ }
14
+ interface NotificationGroup {
15
+ label: string;
16
+ notifications: NotificationItem[];
17
+ }
18
+ interface NotificationCardProps {
19
+ /**
20
+ * The notification title
21
+ */
22
+ title?: string;
23
+ /**
24
+ * The notification message content
25
+ */
26
+ message?: string;
27
+ /**
28
+ * Time displayed (e.g., "Há 3h", "12 Fev")
29
+ */
30
+ time?: string;
31
+ /**
32
+ * Whether the notification has been read
33
+ */
34
+ isRead?: boolean;
35
+ /**
36
+ * Callback when user marks notification as read
37
+ */
38
+ onMarkAsRead?: () => void;
39
+ /**
40
+ * Callback when user deletes notification
41
+ */
42
+ onDelete?: () => void;
43
+ /**
44
+ * Optional callback for navigation action
45
+ */
46
+ onNavigate?: () => void;
47
+ /**
48
+ * Label for the action button (only shown if onNavigate is provided)
49
+ */
50
+ actionLabel?: string;
51
+ /**
52
+ * Array of notifications for list mode
53
+ */
54
+ notifications?: NotificationItem[];
55
+ /**
56
+ * Array of grouped notifications
57
+ */
58
+ groupedNotifications?: NotificationGroup[];
59
+ /**
60
+ * Loading state for list mode
61
+ */
62
+ loading?: boolean;
63
+ /**
64
+ * Error state for list mode
65
+ */
66
+ error?: string | null;
67
+ /**
68
+ * Callback for retry when error occurs
69
+ */
70
+ onRetry?: () => void;
71
+ /**
72
+ * Callback when user marks a notification as read in list mode
73
+ */
74
+ onMarkAsReadById?: (id: string) => void;
75
+ /**
76
+ * Callback when user deletes a notification in list mode
77
+ */
78
+ onDeleteById?: (id: string) => void;
79
+ /**
80
+ * Callback when user navigates from a notification in list mode
81
+ */
82
+ onNavigateById?: (entityType?: string, entityId?: string) => void;
83
+ /**
84
+ * Function to get action label for a notification
85
+ */
86
+ getActionLabel?: (entityType?: string) => string | undefined;
87
+ /**
88
+ * Custom empty state component
89
+ */
90
+ renderEmpty?: () => ReactNode;
91
+ /**
92
+ * Additional CSS classes
93
+ */
94
+ className?: string;
95
+ }
96
+ /**
97
+ * NotificationCard component - can display single notification or list of notifications
98
+ *
99
+ * @param props - The notification card properties
100
+ * @returns JSX element representing the notification card or list
101
+ */
102
+ declare const NotificationCard: (props: NotificationCardProps) => react_jsx_runtime.JSX.Element;
103
+
104
+ export { type NotificationCardProps, type NotificationGroup, type NotificationItem, NotificationCard as default };