@musetax/compass-widget 0.1.218

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,187 @@
1
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
+ import { useState } from "react";
3
+ const tabData = {
4
+ scheduleC: {
5
+ deductions: [
6
+ {
7
+ title: "Business Meals & Entertainment",
8
+ subtitle: "Client meals and business entertainment expenses (50% deductible)",
9
+ source: "Based on 23 transactions from restaurants and venues",
10
+ amount: "$600.00",
11
+ extra: "$1,200 total spent",
12
+ },
13
+ {
14
+ title: "Home Office Expenses",
15
+ subtitle: "Portion of home expenses used exclusively for business",
16
+ source: "Based on utilities, rent, and office supply purchases",
17
+ amount: "$3,600.00",
18
+ extra: "25% business use",
19
+ },
20
+ {
21
+ title: "Professional Development",
22
+ subtitle: "Courses, conferences, and training directly related to business",
23
+ source: "Based on 8 transactions from educational platforms",
24
+ amount: "$950.00",
25
+ extra: "$950 total spent",
26
+ },
27
+ {
28
+ title: "Business Software & Tools",
29
+ subtitle: "Software subscriptions and digital tools for business operations",
30
+ source: "Based on 12 recurring subscription payments",
31
+ amount: "$1,200.00",
32
+ extra: "$1,200 total spent",
33
+ },
34
+ ],
35
+ total: "$6,350",
36
+ label: "Total Potential Deductions (Schedule C)",
37
+ savings: "Estimated Tax Savings: $1,587 – $2,222",
38
+ },
39
+ scheduleA: {
40
+ deductions: [
41
+ {
42
+ title: "Medical Expenses",
43
+ subtitle: "Out-of-pocket costs exceeding 7.5% of AGI",
44
+ source: "Based on 12 pharmacy and clinic payments",
45
+ amount: "$1,200.00",
46
+ extra: "Total eligible: $1,200",
47
+ },
48
+ {
49
+ title: "Mortgage Interest",
50
+ subtitle: "Interest paid on primary home loan",
51
+ source: "Based on mortgage lender statements",
52
+ amount: "$4,300.00",
53
+ extra: "Total interest paid",
54
+ },
55
+ ],
56
+ total: "$5,500",
57
+ label: "Total Potential Deductions (Schedule A)",
58
+ savings: "Estimated Tax Savings: $1,100 – $1,800",
59
+ },
60
+ scheduleE: {
61
+ deductions: [
62
+ {
63
+ title: "Rental Property Maintenance",
64
+ subtitle: "Repairs, cleaning, and supplies for rental property",
65
+ source: "Based on 15 home improvement store transactions",
66
+ amount: "$2,400.00",
67
+ extra: "$2,400 total spent",
68
+ },
69
+ ],
70
+ total: "$2,400",
71
+ label: "Total Potential Deductions (Schedule E)",
72
+ savings: "Estimated Tax Savings: $600 – $1,000",
73
+ },
74
+ };
75
+ const PotentialDeductions = () => {
76
+ const [activeTab, setActiveTab] = useState("scheduleC");
77
+ const { deductions, total, label, savings } = tabData[activeTab];
78
+ const [isOpen, setIsOpen] = useState(false);
79
+ return (_jsxs(_Fragment, { children: [_jsx("div", Object.assign({ style: {
80
+ position: "fixed",
81
+ bottom: "20px",
82
+ right: "20px",
83
+ width: "60px",
84
+ height: "60px",
85
+ backgroundColor: "#007bff",
86
+ borderRadius: "50%",
87
+ display: "flex",
88
+ justifyContent: "center",
89
+ alignItems: "center",
90
+ cursor: "pointer",
91
+ zIndex: 9999,
92
+ color: "#fff",
93
+ fontSize: "28px",
94
+ boxShadow: "0 4px 5px rgba(0, 0, 0, 0.3)",
95
+ }, onClick: () => setIsOpen(!isOpen), title: "Open Auth Widget" }, { children: "\uD83D\uDCAC" })), isOpen && (_jsx("div", Object.assign({ style: {
96
+ position: "fixed",
97
+ bottom: "90px",
98
+ right: "20px",
99
+ width: "68rem",
100
+ maxHeight: "70vh",
101
+ zIndex: 9998,
102
+ padding: "0",
103
+ overflowY: "auto",
104
+ } }, { children: _jsxs("div", Object.assign({ style: {
105
+ maxWidth: 1200,
106
+ margin: "auto",
107
+ border: "1px solid #ccc",
108
+ borderRadius: 16,
109
+ overflow: "hidden",
110
+ } }, { children: [_jsxs("div", Object.assign({ style: {
111
+ backgroundColor: "#F1F7FB",
112
+ padding: "16px 24px",
113
+ display: "flex",
114
+ justifyContent: "space-between",
115
+ alignItems: "center",
116
+ borderBottom: "1px solid #BFDBFE",
117
+ } }, { children: [_jsx("h2", Object.assign({ style: {
118
+ fontSize: 20,
119
+ fontWeight: 500,
120
+ color: "#042567",
121
+ margin: 0,
122
+ } }, { children: "Potential Deductions Analysis" })), _jsxs("span", Object.assign({ style: {
123
+ fontSize: 14,
124
+ color: "#6B7280",
125
+ display: "flex",
126
+ alignItems: "center",
127
+ gap: 4,
128
+ } }, { children: [_jsx("span", { style: {
129
+ width: 8,
130
+ height: 8,
131
+ borderRadius: "50%",
132
+ backgroundColor: "#687DF7",
133
+ display: "inline-block",
134
+ } }), "Analysis complete"] }))] })), _jsxs("div", Object.assign({ style: { padding: 24 } }, { children: [_jsx("div", Object.assign({ style: { marginBottom: 24, display: "flex", gap: 8 } }, { children: ["scheduleC", "scheduleA", "scheduleE"].map((tab) => (_jsxs("button", Object.assign({ onClick: () => setActiveTab(tab), className: `tab-button ${activeTab === tab ? "active" : ""}`, style: {
135
+ border: "1px solid #5387F1",
136
+ padding: "12px 16px",
137
+ fontSize: 14,
138
+ fontWeight: 500,
139
+ borderRadius: 8,
140
+ backgroundColor: activeTab === tab ? "#5387F1" : "white",
141
+ color: activeTab === tab ? "white" : "#5387F1",
142
+ cursor: "pointer",
143
+ } }, { children: [tab === "scheduleC" && "Schedule C (Business)", tab === "scheduleA" && "Schedule A (Itemized)", tab === "scheduleE" && "Schedule E (Rental)"] }), tab))) })), deductions.map((d, index) => (_jsx("div", Object.assign({ style: {
144
+ border: "1px solid rgba(30, 64, 175, 0.1)",
145
+ borderRadius: 16,
146
+ padding: 16,
147
+ margin: "12px 0",
148
+ transition: "background-color 0.2s",
149
+ } }, { children: _jsxs("div", Object.assign({ style: {
150
+ display: "flex",
151
+ justifyContent: "space-between",
152
+ alignItems: "flex-start",
153
+ } }, { children: [_jsxs("div", { children: [_jsx("div", Object.assign({ style: {
154
+ fontSize: 18,
155
+ fontWeight: 500,
156
+ color: "#042567",
157
+ } }, { children: d.title })), _jsx("div", Object.assign({ style: { fontSize: 14, color: "#526282" } }, { children: d.subtitle })), _jsxs("div", Object.assign({ style: {
158
+ marginTop: 8,
159
+ fontSize: 12,
160
+ color: "#5A83F3",
161
+ display: "flex",
162
+ alignItems: "center",
163
+ gap: 4,
164
+ } }, { children: [_jsx("svg", Object.assign({ xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", viewBox: "0 0 20 20", fill: "none" }, { children: _jsx("path", { d: "M11.6667 1.66663V4.99996C11.6667 5.44199 11.8423 5.86591 12.1549 6.17847C12.4674 6.49103 12.8913 6.66663 13.3334 6.66663H16.6667M12.5 1.66663H5.00004C4.55801 1.66663 4.13409 1.84222 3.82153 2.15478C3.50897 2.46734 3.33337 2.89127 3.33337 3.33329V16.6666C3.33337 17.1087 3.50897 17.5326 3.82153 17.8451C4.13409 18.1577 4.55801 18.3333 5.00004 18.3333H15C15.4421 18.3333 15.866 18.1577 16.1786 17.8451C16.4911 17.5326 16.6667 17.1087 16.6667 16.6666V5.83329L12.5 1.66663Z", stroke: "#042567", "stroke-width": "1.4", "stroke-linecap": "round", "stroke-linejoin": "round" }) })), " ", _jsx("span", { children: d.source })] }))] }), _jsxs("div", Object.assign({ style: { textAlign: "right" } }, { children: [_jsx("div", Object.assign({ style: {
165
+ fontSize: 18,
166
+ fontWeight: 500,
167
+ color: "#5A83F3",
168
+ marginBottom: 4,
169
+ } }, { children: d.amount })), _jsx("div", Object.assign({ style: { fontSize: 14, color: "#526282" } }, { children: d.extra }))] }))] })) }), index))), _jsxs("div", Object.assign({ style: {
170
+ backgroundColor: "#5387F1",
171
+ padding: "20px 24px",
172
+ borderRadius: 16,
173
+ color: "white",
174
+ textAlign: "center",
175
+ marginTop: 24,
176
+ } }, { children: [_jsx("h3", Object.assign({ style: { fontSize: 26, margin: "0 0 10px", fontWeight: 600 } }, { children: total })), _jsx("p", Object.assign({ style: { fontSize: 16, fontWeight: 500, margin: 4 } }, { children: label })), _jsx("p", Object.assign({ style: { fontSize: 14, margin: 0 } }, { children: savings })), _jsx("button", Object.assign({ style: {
177
+ marginTop: 16,
178
+ padding: "8px 16px",
179
+ borderRadius: 8,
180
+ backgroundColor: "white",
181
+ color: "#5387F1",
182
+ border: "none",
183
+ fontWeight: 500,
184
+ cursor: "pointer",
185
+ } }, { children: "Get Insights" }))] }))] }))] })) })))] }));
186
+ };
187
+ export default PotentialDeductions;
@@ -0,0 +1,3 @@
1
+ type ToastType = "success" | "error";
2
+ declare const showToast: (type: ToastType, message: string) => void;
3
+ export default showToast;
@@ -0,0 +1,42 @@
1
+ // toast.ts
2
+ let toastRoot = null;
3
+ const showToast = (type, message) => {
4
+ if (!toastRoot) {
5
+ toastRoot = document.createElement("div");
6
+ toastRoot.id = "custom-toast-root";
7
+ toastRoot.style.position = "fixed";
8
+ toastRoot.style.top = "20px";
9
+ toastRoot.style.right = "20px";
10
+ toastRoot.style.zIndex = "9999";
11
+ document.body.appendChild(toastRoot);
12
+ }
13
+ const toast = document.createElement("div");
14
+ toast.className = "custom-toast";
15
+ toast.style.marginBottom = "10px";
16
+ toast.style.padding = "12px 20px";
17
+ toast.style.borderRadius = "6px";
18
+ toast.style.minWidth = "250px";
19
+ toast.style.boxShadow = "0 2px 6px rgba(0,0,0,0.15)";
20
+ toast.style.fontWeight = "bold";
21
+ toast.style.transition = "all 0.3s ease";
22
+ toast.style.opacity = "1";
23
+ if (type === "success") {
24
+ toast.style.backgroundColor = "#d1e7dd";
25
+ toast.style.color = "#0f5132";
26
+ toast.style.borderLeft = "6px solid #198754";
27
+ }
28
+ else if (type === "error") {
29
+ toast.style.backgroundColor = "#f8d7da";
30
+ toast.style.color = "#842029";
31
+ toast.style.borderLeft = "6px solid #dc3545";
32
+ }
33
+ toast.innerText = message;
34
+ toastRoot.appendChild(toast);
35
+ setTimeout(() => {
36
+ toast.style.opacity = "0";
37
+ setTimeout(() => {
38
+ toast.remove();
39
+ }, 300);
40
+ }, 3000);
41
+ };
42
+ export default showToast;
package/dist/api.d.ts ADDED
@@ -0,0 +1,2 @@
1
+ declare const api: import("axios").AxiosInstance;
2
+ export default api;
package/dist/api.js ADDED
@@ -0,0 +1,18 @@
1
+ // api.ts
2
+ import axios from "axios";
3
+ const API_BASE_URL = "https://dev-categorization.musetax.com/v2/api";
4
+ // Create Axios instance
5
+ const api = axios.create({
6
+ baseURL: API_BASE_URL,
7
+ headers: {
8
+ Accept: "application/json",
9
+ "Content-Type": "application/json",
10
+ },
11
+ });
12
+ // Response interceptor for error logging / centralized handling
13
+ api.interceptors.response.use((response) => response, (error) => {
14
+ var _a;
15
+ console.error("API error:", ((_a = error === null || error === void 0 ? void 0 : error.response) === null || _a === void 0 ? void 0 : _a.data) || error.message);
16
+ return Promise.reject(error);
17
+ });
18
+ export default api;
@@ -0,0 +1 @@
1
+ export { default as ClientAuthForm } from './ClientAuthForm';
package/dist/index.js ADDED
@@ -0,0 +1,18 @@
1
+ export { default as ClientAuthForm } from './ClientAuthForm';
2
+ // import React from "react";
3
+ // import ReactDOM from "react-dom/client";
4
+ // import "./index.css";
5
+ // import reportWebVitals from "./reportWebVitals";
6
+ // import App from "./App";
7
+ // const root = ReactDOM.createRoot(
8
+ // document.getElementById("root") as HTMLElement
9
+ // );
10
+ // root.render(
11
+ // <React.StrictMode>
12
+ // <App />
13
+ // </React.StrictMode>
14
+ // );
15
+ // // If you want to start measuring performance in your app, pass a function
16
+ // // to log results (for example: reportWebVitals(console.log))
17
+ // // or send to an analytics endpoint. Learn more: https://bit.ly/CRA-vitals
18
+ // reportWebVitals();
@@ -0,0 +1,3 @@
1
+ import { ReportHandler } from 'web-vitals';
2
+ declare const reportWebVitals: (onPerfEntry?: ReportHandler) => void;
3
+ export default reportWebVitals;
@@ -0,0 +1,12 @@
1
+ const reportWebVitals = (onPerfEntry) => {
2
+ if (onPerfEntry && onPerfEntry instanceof Function) {
3
+ import('web-vitals').then(({ getCLS, getFID, getFCP, getLCP, getTTFB }) => {
4
+ getCLS(onPerfEntry);
5
+ getFID(onPerfEntry);
6
+ getFCP(onPerfEntry);
7
+ getLCP(onPerfEntry);
8
+ getTTFB(onPerfEntry);
9
+ });
10
+ }
11
+ };
12
+ export default reportWebVitals;
@@ -0,0 +1 @@
1
+ import '@testing-library/jest-dom';
@@ -0,0 +1,5 @@
1
+ // jest-dom adds custom jest matchers for asserting on DOM nodes.
2
+ // allows you to do things like:
3
+ // expect(element).toHaveTextContent(/react/i)
4
+ // learn more: https://github.com/testing-library/jest-dom
5
+ import '@testing-library/jest-dom';
@@ -0,0 +1,2 @@
1
+ declare const TaxDashboardPage: () => import("react/jsx-runtime").JSX.Element;
2
+ export default TaxDashboardPage;
@@ -0,0 +1,261 @@
1
+ "use client";
2
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
3
+ import { useState } from "react";
4
+ const insights = [
5
+ {
6
+ insight: "You haven’t made a quarterly tax payment",
7
+ triggered: "No estimated tax payments and income",
8
+ category: "Deduction Opportunity",
9
+ },
10
+ {
11
+ insight: "You’re paying for a co-working space",
12
+ triggered: "Recurring transactions to co-working…",
13
+ category: "Deduction Opportunity",
14
+ },
15
+ {
16
+ insight: "You could reduce your tax bill by contributing to retirement",
17
+ triggered: "Net income > $20,000 and no retirement…",
18
+ category: "Retirement Savings",
19
+ },
20
+ {
21
+ insight: "Home office deductions may apply...",
22
+ triggered: "Consistent internet/utilities and no…",
23
+ category: "Deduction Opportunity",
24
+ },
25
+ {
26
+ insight: "Recurring vehicle-related expenses detected",
27
+ triggered: "Gas, tolls, and auto expenses without…",
28
+ category: "Deduction Opportunity",
29
+ },
30
+ {
31
+ insight: "Meal and entertainment expenses detected",
32
+ triggered: "Restaurant and event charges flagged…",
33
+ category: "Deduction Opportunity",
34
+ },
35
+ {
36
+ insight: "You may be eligible for the QBI deduction",
37
+ triggered: "Net income between $20,000–$170,000…",
38
+ category: "Deduction Opportunity",
39
+ },
40
+ {
41
+ insight: "You missed an energy-efficient home credit",
42
+ triggered: "Home energy expenses detected",
43
+ category: "Deduction Opportunity",
44
+ },
45
+ {
46
+ insight: "Possible missed educational expense deduction",
47
+ triggered: "Tuition and education expenses flagged",
48
+ category: "Deduction Opportunity",
49
+ },
50
+ {
51
+ insight: "Charitable donations identified",
52
+ triggered: "Multiple 501(c)(3) org donations",
53
+ category: "Deduction Opportunity",
54
+ },
55
+ ];
56
+ const TaxDashboardPage = () => {
57
+ const [currentPage, setCurrentPage] = useState(1);
58
+ const pageSize = 4;
59
+ const totalPages = Math.ceil(insights.length / pageSize);
60
+ const getCategoryStyle = (category) => {
61
+ return category === "Retirement Savings"
62
+ ? {
63
+ display: "inline-block",
64
+ padding: "4px 12px",
65
+ borderRadius: "999px",
66
+ fontSize: 13,
67
+ background: "#dcbd6726",
68
+ color: "#c1a24d",
69
+ whiteSpace: "nowrap",
70
+ border: "1px solid #c1a24d33",
71
+ }
72
+ : {
73
+ display: "inline-block",
74
+ padding: "4px 12px",
75
+ borderRadius: "999px",
76
+ whiteSpace: "nowrap",
77
+ fontSize: 13,
78
+ background: "#67dc791f",
79
+ color: "#4ec760",
80
+ border: "1px solid #4ec7601a",
81
+ };
82
+ };
83
+ const baseBtnStyle = (active = false) => ({
84
+ padding: "4px 10px",
85
+ minWidth: "30px",
86
+ borderRadius: "6px",
87
+ border: "1px solid #e6e7ea",
88
+ background: active ? "#4e88f0" : "white",
89
+ color: active ? "white" : "#526282",
90
+ fontSize: "14px",
91
+ fontWeight: active ? "bold" : "normal",
92
+ cursor: "pointer",
93
+ });
94
+ const currentData = insights.slice((currentPage - 1) * pageSize, currentPage * pageSize);
95
+ const [isOpen, setIsOpen] = useState(false);
96
+ return (_jsxs(_Fragment, { children: [_jsx("div", Object.assign({ style: {
97
+ position: "fixed",
98
+ bottom: "20px",
99
+ right: "20px",
100
+ width: "60px",
101
+ height: "60px",
102
+ backgroundColor: "#007bff",
103
+ borderRadius: "50%",
104
+ display: "flex",
105
+ justifyContent: "center",
106
+ alignItems: "center",
107
+ cursor: "pointer",
108
+ zIndex: 9999,
109
+ color: "#fff",
110
+ fontSize: "28px",
111
+ boxShadow: "0 4px 5px rgba(0, 0, 0, 0.3)",
112
+ }, onClick: () => setIsOpen(!isOpen), title: "Open Auth Widget" }, { children: "\uD83D\uDCAC" })), isOpen && (_jsx("div", Object.assign({ style: {
113
+ position: "fixed",
114
+ bottom: "90px",
115
+ right: "20px",
116
+ width: "68rem",
117
+ maxHeight: "70vh",
118
+ zIndex: 9998,
119
+ padding: "0",
120
+ overflowY: "auto",
121
+ } }, { children: _jsxs("div", Object.assign({ style: {
122
+ maxWidth: 1200,
123
+ margin: "auto",
124
+ border: "1px solid #ccc",
125
+ borderRadius: 16,
126
+ overflow: "hidden",
127
+ } }, { children: [_jsx("div", Object.assign({ style: {
128
+ background: "#f1f7fb",
129
+ padding: "16px 28px",
130
+ fontSize: 20,
131
+ fontWeight: "bold",
132
+ } }, { children: "Tax Insights Dashboard" })), _jsxs("div", Object.assign({ style: { padding: "10px 24px" } }, { children: [_jsx("p", Object.assign({ style: { marginBottom: 22, fontSize: 16, color: "#526282" } }, { children: "Analyses previous tax returns to identify missed deduction opportunities" })), _jsxs("div", Object.assign({ style: {
133
+ display: "flex",
134
+ flexWrap: "wrap",
135
+ gap: 16,
136
+ marginBottom: 32,
137
+ } }, { children: [[1, 2].map((_, idx) => (_jsxs("div", Object.assign({ style: {
138
+ backgroundColor: "#F1F7FB",
139
+ padding: 16,
140
+ borderRadius: 12,
141
+ flex: "1 1 calc(33% - 10.6px)",
142
+ boxSizing: "border-box",
143
+ minWidth: 280,
144
+ } }, { children: [_jsx("span", Object.assign({ style: {
145
+ fontSize: 14,
146
+ background: "white",
147
+ color: "#4A6CF7",
148
+ border: "1px solid #4A6CF71A",
149
+ padding: "4px 16px",
150
+ borderRadius: 9999,
151
+ display: "inline-block",
152
+ marginBottom: 8,
153
+ } }, { children: "Deduction Opportunity" })), _jsx("h3", Object.assign({ style: {
154
+ fontSize: 18,
155
+ color: "#042567",
156
+ fontWeight: 500,
157
+ marginTop: 8,
158
+ lineHeight: "22px",
159
+ } }, { children: "You\u2019ve spent $2,400 on travel \u2014 track and deduct this to lower your tax bill." })), _jsx("p", Object.assign({ style: { fontSize: 14, color: "#526282", marginTop: 8 } }, { children: "Triggered by: Travel-related transactions > $2,000 this year" })), _jsxs("div", Object.assign({ style: { display: "flex", gap: 8, marginTop: 16 } }, { children: [_jsx("button", Object.assign({ style: {
160
+ backgroundColor: "#5387F1",
161
+ color: "white",
162
+ border: "1px solid #5387F1",
163
+ fontSize: 14,
164
+ fontWeight: 500,
165
+ padding: "6px 12px",
166
+ borderRadius: 8,
167
+ cursor: "pointer",
168
+ } }, { children: "View Details" })), _jsx("button", Object.assign({ style: {
169
+ backgroundColor: "white",
170
+ color: "#5387F1",
171
+ border: "1px solid #5387F1",
172
+ fontSize: 14,
173
+ fontWeight: 500,
174
+ padding: "6px 12px",
175
+ borderRadius: 8,
176
+ cursor: "pointer",
177
+ } }, { children: "Mark Reviewed" }))] }))] }), idx))), _jsxs("div", Object.assign({ style: {
178
+ backgroundColor: "#F1F7FB",
179
+ padding: 16,
180
+ borderRadius: 12,
181
+ flex: "1 1 calc(33% - 10.6px)",
182
+ boxSizing: "border-box",
183
+ minWidth: 280,
184
+ } }, { children: [_jsx("span", Object.assign({ style: {
185
+ fontSize: 14,
186
+ background: "white",
187
+ color: "#CC5555",
188
+ border: "1px solid #CC555529",
189
+ padding: "4px 16px",
190
+ borderRadius: 9999,
191
+ display: "inline-block",
192
+ marginBottom: 8,
193
+ } }, { children: "Profitability & Cash Flow" })), _jsx("h3", Object.assign({ style: {
194
+ fontSize: 18,
195
+ color: "#042567",
196
+ fontWeight: 500,
197
+ marginTop: 8,
198
+ lineHeight: "22px",
199
+ } }, { children: "Home office deduction is 28% of total expenses \u2014 consider documentation." })), _jsx("p", Object.assign({ style: { fontSize: 14, color: "#526282", marginTop: 8 } }, { children: "Triggered by: Flame office > ot expenses" })), _jsxs("div", Object.assign({ style: { display: "flex", gap: 8, marginTop: 16 } }, { children: [_jsx("button", Object.assign({ style: {
200
+ backgroundColor: "#5387F1",
201
+ color: "white",
202
+ border: "1px solid #5387F1",
203
+ fontSize: 14,
204
+ fontWeight: 500,
205
+ padding: "6px 12px",
206
+ borderRadius: 8,
207
+ cursor: "pointer",
208
+ } }, { children: "View Details" })), _jsx("button", Object.assign({ style: {
209
+ backgroundColor: "white",
210
+ color: "#5387F1",
211
+ border: "1px solid #5387F1",
212
+ fontSize: 14,
213
+ fontWeight: 500,
214
+ padding: "6px 12px",
215
+ borderRadius: 8,
216
+ cursor: "pointer",
217
+ } }, { children: "Mark Reviewed" }))] }))] }))] })), _jsx("h3", Object.assign({ style: { marginBottom: 5 } }, { children: "Tax Insights" })), _jsx("p", Object.assign({ style: {
218
+ color: "#526282",
219
+ fontSize: 14,
220
+ marginBottom: 20,
221
+ marginTop: 0,
222
+ } }, { children: "See below for the insights that we found for you." })), _jsx("div", Object.assign({ style: {
223
+ overflowX: "auto",
224
+ border: "1px solid #e4eef4",
225
+ borderRadius: 12,
226
+ } }, { children: _jsxs("table", Object.assign({ style: {
227
+ width: "100%",
228
+ borderCollapse: "collapse",
229
+ fontSize: 14,
230
+ } }, { children: [_jsx("thead", { children: _jsxs("tr", Object.assign({ style: { background: "#f1f7fb" } }, { children: [_jsx("th", Object.assign({ style: {
231
+ padding: "12px 16px",
232
+ textAlign: "left",
233
+ whiteSpace: "nowrap",
234
+ } }, { children: "Insight" })), _jsx("th", Object.assign({ style: {
235
+ padding: "12px 16px",
236
+ textAlign: "left",
237
+ whiteSpace: "nowrap",
238
+ } }, { children: "Triggered By" })), _jsx("th", Object.assign({ style: {
239
+ padding: "12px 16px",
240
+ textAlign: "left",
241
+ whiteSpace: "nowrap",
242
+ } }, { children: "Category" })), _jsx("th", Object.assign({ style: {
243
+ padding: "12px 16px",
244
+ textAlign: "left",
245
+ whiteSpace: "nowrap",
246
+ } }, { children: "Actions" }))] })) }), _jsx("tbody", { children: currentData.map((row, idx) => (_jsxs("tr", Object.assign({ style: { borderBottom: "1px solid #e4eef4" } }, { children: [_jsx("td", Object.assign({ style: { padding: "12px 16px", color: "#526282" } }, { children: row.insight })), _jsx("td", Object.assign({ style: { padding: "12px 16px", color: "#526282" } }, { children: row.triggered })), _jsx("td", Object.assign({ style: { padding: "12px 16px" } }, { children: _jsx("span", Object.assign({ style: getCategoryStyle(row.category) }, { children: row.category })) })), _jsx("td", Object.assign({ style: {
247
+ padding: "12px 16px",
248
+ color: "#4E88F0",
249
+ cursor: "pointer",
250
+ } }, { children: _jsxs("span", Object.assign({ style: {
251
+ display: "flex",
252
+ alignItems: "center",
253
+ gap: "4px",
254
+ } }, { children: [_jsx("span", Object.assign({ style: { lineHeight: "0px" } }, { children: _jsxs("svg", Object.assign({ xmlns: "http://www.w3.org/2000/svg", width: "20", height: "20", viewBox: "0 0 20 20", fill: "none" }, { children: [_jsx("path", { d: "M0.833313 10C0.833313 10 4.16665 3.33337 9.99998 3.33337C15.8333 3.33337 19.1666 10 19.1666 10C19.1666 10 15.8333 16.6667 9.99998 16.6667C4.16665 16.6667 0.833313 10 0.833313 10Z", stroke: "url(#paint0_linear_6260_498)", "stroke-width": "1.5", "stroke-linecap": "round", "stroke-linejoin": "round" }), _jsx("path", { d: "M10 12.5C11.3807 12.5 12.5 11.3807 12.5 10C12.5 8.61929 11.3807 7.5 10 7.5C8.61929 7.5 7.5 8.61929 7.5 10C7.5 11.3807 8.61929 12.5 10 12.5Z", stroke: "url(#paint1_linear_6260_498)", "stroke-linecap": "round", "stroke-linejoin": "round" }), _jsxs("defs", { children: [_jsxs("linearGradient", Object.assign({ id: "paint0_linear_6260_498", x1: "9.99998", y1: "16.6667", x2: "9.99998", y2: "3.33337", gradientUnits: "userSpaceOnUse" }, { children: [_jsx("stop", { "stop-color": "#4F87F0" }), _jsx("stop", { offset: "1", "stop-color": "#7B73FB" })] })), _jsxs("linearGradient", Object.assign({ id: "paint1_linear_6260_498", x1: "10", y1: "12.5", x2: "10", y2: "7.5", gradientUnits: "userSpaceOnUse" }, { children: [_jsx("stop", { "stop-color": "#4F87F0" }), _jsx("stop", { offset: "1", "stop-color": "#7B73FB" })] }))] })] })) })), " ", "View"] })) }))] }), idx))) })] })) })), _jsxs("div", Object.assign({ style: {
255
+ marginTop: 16,
256
+ display: "flex",
257
+ justifyContent: "flex-end",
258
+ gap: 6,
259
+ } }, { children: [currentPage > 1 && (_jsx("button", Object.assign({ style: baseBtnStyle(), onClick: () => setCurrentPage(currentPage - 1) }, { children: "<" }))), Array.from({ length: totalPages }).map((_, i) => (_jsx("button", Object.assign({ style: baseBtnStyle(currentPage === i + 1), onClick: () => setCurrentPage(i + 1) }, { children: i + 1 }), i))), currentPage < totalPages && (_jsx("button", Object.assign({ style: baseBtnStyle(), onClick: () => setCurrentPage(currentPage + 1) }, { children: ">" })))] }))] }))] })) })))] }));
260
+ };
261
+ export default TaxDashboardPage;
package/package.json ADDED
@@ -0,0 +1,57 @@
1
+ {
2
+ "name": "@musetax/compass-widget",
3
+ "version": "0.1.218",
4
+ "dependencies": {
5
+ "@testing-library/dom": "^10.4.0",
6
+ "@testing-library/jest-dom": "^6.6.3",
7
+ "@testing-library/react": "^16.3.0",
8
+ "@testing-library/user-event": "^13.5.0",
9
+ "@types/jest": "^27.5.2",
10
+ "@types/node": "^16.18.126",
11
+ "@types/react": "^19.1.8",
12
+ "@types/react-dom": "^19.1.6",
13
+ "axios": "^1.10.0",
14
+ "framer-motion": "^12.19.1",
15
+ "lucide-react": "^0.523.0",
16
+ "react": "^19.1.0",
17
+ "react-dom": "^19.1.0",
18
+ "react-icons": "^5.5.0",
19
+ "react-scripts": "5.0.1",
20
+ "typescript": "^4.9.5",
21
+ "web-vitals": "^2.1.4"
22
+ },
23
+ "main": "dist/index.js",
24
+ "types": "dist/index.d.ts",
25
+ "files": [
26
+ "dist"
27
+ ],
28
+ "scripts": {
29
+ "start": "react-scripts start",
30
+ "build": "tsc",
31
+ "test": "react-scripts test",
32
+ "eject": "react-scripts eject"
33
+ },
34
+ "eslintConfig": {
35
+ "extends": [
36
+ "react-app",
37
+ "react-app/jest"
38
+ ]
39
+ },
40
+ "browserslist": {
41
+ "production": [
42
+ ">0.2%",
43
+ "not dead",
44
+ "not op_mini all"
45
+ ],
46
+ "development": [
47
+ "last 1 chrome version",
48
+ "last 1 firefox version",
49
+ "last 1 safari version"
50
+ ]
51
+ },
52
+ "devDependencies": {
53
+ "autoprefixer": "^10.4.21",
54
+ "postcss": "^8.5.6",
55
+ "tailwindcss": "^4.1.10"
56
+ }
57
+ }