@agentpaid/paid-nextjs-client 0.1.1 → 0.3.0-test.1
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.
- package/README.md +57 -0
- package/dist/api/api/handlePaidInvoicePdf.ts +79 -0
- package/dist/api/api/handlePaidInvoices.ts +77 -0
- package/dist/api/api/handlePaidPayments.ts +77 -0
- package/dist/api/handlePaidInvoicePdf.d.ts +6 -0
- package/dist/api/handlePaidInvoicePdf.d.ts.map +1 -0
- package/dist/api/handlePaidInvoicePdf.js +60 -0
- package/dist/api/handlePaidInvoicePdf.js.map +1 -0
- package/dist/api/handlePaidInvoices.d.ts +6 -0
- package/dist/api/handlePaidInvoices.d.ts.map +1 -0
- package/dist/api/handlePaidInvoices.js +56 -0
- package/dist/api/handlePaidInvoices.js.map +1 -0
- package/dist/api/handlePaidPayments.d.ts +6 -0
- package/dist/api/handlePaidPayments.d.ts.map +1 -0
- package/dist/api/handlePaidPayments.js +56 -0
- package/dist/api/handlePaidPayments.js.map +1 -0
- package/dist/components/PaidActivityLog.d.ts +27 -1
- package/dist/components/PaidActivityLog.d.ts.map +1 -1
- package/dist/components/PaidActivityLog.js +28 -6
- package/dist/components/PaidActivityLog.js.map +1 -1
- package/dist/components/PaidContainer.d.ts +45 -0
- package/dist/components/PaidContainer.d.ts.map +1 -0
- package/dist/components/PaidContainer.js +29 -0
- package/dist/components/PaidContainer.js.map +1 -0
- package/dist/components/PaidInvoiceTable.d.ts +35 -0
- package/dist/components/PaidInvoiceTable.d.ts.map +1 -0
- package/dist/components/PaidInvoiceTable.js +138 -0
- package/dist/components/PaidInvoiceTable.js.map +1 -0
- package/dist/components/PaidPaymentsTable.d.ts +35 -0
- package/dist/components/PaidPaymentsTable.d.ts.map +1 -0
- package/dist/components/PaidPaymentsTable.js +99 -0
- package/dist/components/PaidPaymentsTable.js.map +1 -0
- package/dist/components/components/PaidActivityLog.js +73 -20
- package/dist/components/components/PaidContainer.js +113 -0
- package/dist/components/components/PaidInvoiceTable.js +321 -0
- package/dist/components/components/PaidPaymentsTable.js +216 -0
- package/dist/hooks/useCache.d.ts +12 -0
- package/dist/hooks/useCache.d.ts.map +1 -0
- package/dist/hooks/useCache.js +43 -0
- package/dist/hooks/useCache.js.map +1 -0
- package/dist/index.d.ts +7 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +7 -1
- package/dist/index.js.map +1 -1
- package/dist/styles/activity-log-table.css +29 -27
- package/dist/styles/paid-container.css +139 -0
- package/dist/styles/paid-invoice-table.css +344 -0
- package/dist/styles/paid-payments-table.css +238 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/utils/cache.d.ts +30 -0
- package/dist/utils/cache.d.ts.map +1 -0
- package/dist/utils/cache.js +101 -0
- package/dist/utils/cache.js.map +1 -0
- package/package.json +9 -3
@@ -0,0 +1,43 @@
|
|
1
|
+
import { useCallback } from 'react';
|
2
|
+
import { dataCache, getCacheKey } from '../utils/cache';
|
3
|
+
export const useCache = () => {
|
4
|
+
// Clear all cache
|
5
|
+
const clearAllCache = useCallback(() => {
|
6
|
+
dataCache.clear();
|
7
|
+
}, []);
|
8
|
+
// Clear cache for specific account
|
9
|
+
const clearAccountCache = useCallback((accountId) => {
|
10
|
+
dataCache.delete(getCacheKey.invoices(accountId));
|
11
|
+
dataCache.delete(getCacheKey.payments(accountId));
|
12
|
+
dataCache.delete(getCacheKey.usage(accountId));
|
13
|
+
}, []);
|
14
|
+
// Clear PDF cache for specific invoice
|
15
|
+
const clearInvoicePdfCache = useCallback((invoiceId) => {
|
16
|
+
dataCache.delete(getCacheKey.invoicePdf(invoiceId));
|
17
|
+
}, []);
|
18
|
+
// Force refresh data for account (clears cache and triggers refetch)
|
19
|
+
const refreshAccountData = useCallback((accountId) => {
|
20
|
+
clearAccountCache(accountId);
|
21
|
+
// Trigger a custom event that components can listen to for refetching
|
22
|
+
window.dispatchEvent(new CustomEvent('cache-refresh', {
|
23
|
+
detail: { accountId, type: 'account' }
|
24
|
+
}));
|
25
|
+
}, [clearAccountCache]);
|
26
|
+
// Get cache statistics
|
27
|
+
const getCacheStats = useCallback(() => {
|
28
|
+
return dataCache.getStats();
|
29
|
+
}, []);
|
30
|
+
// Check if data is cached
|
31
|
+
const isCached = useCallback((key) => {
|
32
|
+
return dataCache.has(key);
|
33
|
+
}, []);
|
34
|
+
return {
|
35
|
+
clearAllCache,
|
36
|
+
clearAccountCache,
|
37
|
+
clearInvoicePdfCache,
|
38
|
+
refreshAccountData,
|
39
|
+
getCacheStats,
|
40
|
+
isCached,
|
41
|
+
};
|
42
|
+
};
|
43
|
+
//# sourceMappingURL=useCache.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"useCache.js","sourceRoot":"","sources":["../../src/hooks/useCache.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AACpC,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAExD,MAAM,CAAC,MAAM,QAAQ,GAAG,GAAG,EAAE;IAC3B,kBAAkB;IAClB,MAAM,aAAa,GAAG,WAAW,CAAC,GAAG,EAAE;QACrC,SAAS,CAAC,KAAK,EAAE,CAAC;IACpB,CAAC,EAAE,EAAE,CAAC,CAAC;IAEP,mCAAmC;IACnC,MAAM,iBAAiB,GAAG,WAAW,CAAC,CAAC,SAAiB,EAAE,EAAE;QAC1D,SAAS,CAAC,MAAM,CAAC,WAAW,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC,CAAC;QAClD,SAAS,CAAC,MAAM,CAAC,WAAW,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC,CAAC;QAClD,SAAS,CAAC,MAAM,CAAC,WAAW,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC,CAAC;IACjD,CAAC,EAAE,EAAE,CAAC,CAAC;IAEP,uCAAuC;IACvC,MAAM,oBAAoB,GAAG,WAAW,CAAC,CAAC,SAAiB,EAAE,EAAE;QAC7D,SAAS,CAAC,MAAM,CAAC,WAAW,CAAC,UAAU,CAAC,SAAS,CAAC,CAAC,CAAC;IACtD,CAAC,EAAE,EAAE,CAAC,CAAC;IAEP,qEAAqE;IACrE,MAAM,kBAAkB,GAAG,WAAW,CAAC,CAAC,SAAiB,EAAE,EAAE;QAC3D,iBAAiB,CAAC,SAAS,CAAC,CAAC;QAC7B,sEAAsE;QACtE,MAAM,CAAC,aAAa,CAAC,IAAI,WAAW,CAAC,eAAe,EAAE;YACpD,MAAM,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,SAAS,EAAE;SACvC,CAAC,CAAC,CAAC;IACN,CAAC,EAAE,CAAC,iBAAiB,CAAC,CAAC,CAAC;IAExB,uBAAuB;IACvB,MAAM,aAAa,GAAG,WAAW,CAAC,GAAG,EAAE;QACrC,OAAO,SAAS,CAAC,QAAQ,EAAE,CAAC;IAC9B,CAAC,EAAE,EAAE,CAAC,CAAC;IAEP,0BAA0B;IAC1B,MAAM,QAAQ,GAAG,WAAW,CAAC,CAAC,GAAW,EAAE,EAAE;QAC3C,OAAO,SAAS,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;IAC5B,CAAC,EAAE,EAAE,CAAC,CAAC;IAEP,OAAO;QACL,aAAa;QACb,iBAAiB;QACjB,oBAAoB;QACpB,kBAAkB;QAClB,aAAa;QACb,QAAQ;KACT,CAAC;AACJ,CAAC,CAAC"}
|
package/dist/index.d.ts
CHANGED
@@ -1,3 +1,9 @@
|
|
1
1
|
export { PaidActivityLog } from './components/PaidActivityLog';
|
2
|
+
export { PaidContainer, useIsInContainer } from './components/PaidContainer';
|
3
|
+
export { PaidInvoiceTable } from './components/PaidInvoiceTable';
|
4
|
+
export { PaidPaymentsTable } from './components/PaidPaymentsTable';
|
2
5
|
export { Table, TableBody, TableCell, TableHead, TableHeader, TableRow } from './components/ui/table';
|
3
|
-
export { handlePaidUsage } from './api/handlePaidUsage';
|
6
|
+
export { handlePaidUsage } from './api/handlePaidUsage';
|
7
|
+
export { handlePaidInvoices } from './api/handlePaidInvoices';
|
8
|
+
export { handlePaidInvoicePdf } from './api/handlePaidInvoicePdf';
|
9
|
+
export { handlePaidPayments } from './api/handlePaidPayments';
|
package/dist/index.d.ts.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAC/D,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACtG,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC"}
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAC/D,OAAO,EAAE,aAAa,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAC7E,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AACjE,OAAO,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAC;AACnE,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACtG,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAC9D,OAAO,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAC;AAClE,OAAO,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC"}
|
package/dist/index.js
CHANGED
@@ -1,3 +1,9 @@
|
|
1
1
|
export { PaidActivityLog } from './components/PaidActivityLog';
|
2
|
+
export { PaidContainer, useIsInContainer } from './components/PaidContainer';
|
3
|
+
export { PaidInvoiceTable } from './components/PaidInvoiceTable';
|
4
|
+
export { PaidPaymentsTable } from './components/PaidPaymentsTable';
|
2
5
|
export { Table, TableBody, TableCell, TableHead, TableHeader, TableRow } from './components/ui/table';
|
3
|
-
export { handlePaidUsage } from './api/handlePaidUsage';
|
6
|
+
export { handlePaidUsage } from './api/handlePaidUsage';
|
7
|
+
export { handlePaidInvoices } from './api/handlePaidInvoices';
|
8
|
+
export { handlePaidInvoicePdf } from './api/handlePaidInvoicePdf';
|
9
|
+
export { handlePaidPayments } from './api/handlePaidPayments';
|
package/dist/index.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAC/D,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACtG,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC"}
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAC/D,OAAO,EAAE,aAAa,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAC7E,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AACjE,OAAO,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAC;AACnE,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACtG,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAC9D,OAAO,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAC;AAClE,OAAO,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC"}
|
@@ -4,20 +4,20 @@
|
|
4
4
|
.paid-activity-log-container {
|
5
5
|
position: relative;
|
6
6
|
min-width: 0;
|
7
|
-
font-family: 'Roboto'
|
7
|
+
font-family: var(--paid-font-family, 'Roboto');
|
8
8
|
width: 100%;
|
9
9
|
box-sizing: border-box;
|
10
10
|
}
|
11
11
|
|
12
12
|
.paid-activity-log-table-wrapper {
|
13
13
|
position: relative;
|
14
|
-
background: #fff;
|
15
|
-
border: 1px solid #e5e7eb;
|
14
|
+
background: var(--paid-wrapper-bg, #fff);
|
15
|
+
border: var(--paid-wrapper-border, 1px solid #e5e7eb);
|
16
16
|
border-radius: 12px;
|
17
17
|
box-shadow: 0 2px 16px 0 rgba(16, 24, 40, 0.08);
|
18
18
|
overflow-x: auto;
|
19
19
|
transition: box-shadow 0.2s;
|
20
|
-
font-family: 'Roboto'
|
20
|
+
font-family: var(--paid-font-family, 'Roboto');
|
21
21
|
width: 100%;
|
22
22
|
min-width: 0;
|
23
23
|
}
|
@@ -31,27 +31,27 @@
|
|
31
31
|
justify-content: space-between;
|
32
32
|
align-items: center;
|
33
33
|
padding: 18px 24px;
|
34
|
-
background: #fff;
|
35
|
-
border-bottom: 1px solid #e5e7eb;
|
34
|
+
background: var(--paid-header-bg, #fff);
|
35
|
+
border-bottom: var(--paid-header-border-bottom, 1px solid #e5e7eb);
|
36
36
|
border-radius: 12px 12px 0 0;
|
37
|
-
font-family: 'Roboto'
|
37
|
+
font-family: var(--paid-font-family, 'Roboto');
|
38
38
|
}
|
39
39
|
.paid-activity-log-title {
|
40
|
-
font-size: 1.1rem;
|
41
|
-
font-weight: 600;
|
42
|
-
color: #1d2939;
|
43
|
-
font-family: 'Roboto'
|
40
|
+
font-size: var(--paid-title-font-size, 1.1rem);
|
41
|
+
font-weight: var(--paid-title-font-weight, 600);
|
42
|
+
color: var(--paid-title-color, #1d2939);
|
43
|
+
font-family: var(--paid-font-family, 'Roboto');
|
44
44
|
}
|
45
45
|
.paid-activity-log-toggle-btn {
|
46
|
-
font-size: 0.95rem;
|
47
|
-
font-weight: 500;
|
48
|
-
color: #2563eb;
|
46
|
+
font-size: var(--paid-toggle-font-size, 0.95rem);
|
47
|
+
font-weight: var(--paid-toggle-font-weight, 500);
|
48
|
+
color: var(--paid-toggle-color, #2563eb);
|
49
49
|
background: none;
|
50
50
|
border: none;
|
51
51
|
cursor: pointer;
|
52
52
|
text-decoration: none;
|
53
53
|
padding: 0;
|
54
|
-
font-family: 'Roboto'
|
54
|
+
font-family: var(--paid-font-family, 'Roboto');
|
55
55
|
}
|
56
56
|
|
57
57
|
/* Table styles */
|
@@ -62,8 +62,8 @@
|
|
62
62
|
word-break: break-word;
|
63
63
|
border-collapse: separate;
|
64
64
|
border-spacing: 0;
|
65
|
-
background: #fff;
|
66
|
-
font-family: 'Roboto'
|
65
|
+
background: var(--paid-table-bg, #fff);
|
66
|
+
font-family: var(--paid-font-family, 'Roboto');
|
67
67
|
}
|
68
68
|
.paid-activity-log-table th,
|
69
69
|
.paid-activity-log-table td {
|
@@ -73,25 +73,27 @@
|
|
73
73
|
word-break: break-word;
|
74
74
|
}
|
75
75
|
.paid-activity-log-table th {
|
76
|
-
font-size: 1rem;
|
77
|
-
font-weight: 500;
|
78
|
-
color: #667085;
|
76
|
+
font-size: var(--paid-th-font-size, 1rem);
|
77
|
+
font-weight: var(--paid-th-font-weight, 500);
|
78
|
+
color: var(--paid-th-color, #667085);
|
79
79
|
text-align: left;
|
80
80
|
padding: 18px 24px;
|
81
|
-
background: #f9fafb;
|
82
|
-
border-bottom: 1px solid #e5e7eb;
|
81
|
+
background: var(--paid-th-bg, #f9fafb);
|
82
|
+
border-bottom: var(--paid-th-border-bottom, 1px solid #e5e7eb);
|
83
83
|
}
|
84
84
|
.paid-activity-log-table td {
|
85
|
-
font-size: 0.97rem;
|
86
|
-
|
85
|
+
font-size: var(--paid-td-font-size, 0.97rem);
|
86
|
+
font-weight: var(--paid-td-font-weight, normal);
|
87
|
+
color: var(--paid-td-color, #1d2939);
|
88
|
+
background: var(--paid-td-bg, transparent);
|
87
89
|
padding: 16px 24px;
|
88
|
-
border-bottom: 1px solid #f1f1f1;
|
90
|
+
border-bottom: var(--paid-td-border-bottom, 1px solid #f1f1f1);
|
89
91
|
}
|
90
92
|
.paid-activity-log-table tr:last-child td {
|
91
93
|
border-bottom: none;
|
92
94
|
}
|
93
95
|
.paid-activity-log-table tr:hover td {
|
94
|
-
background: #f3f4f6;
|
96
|
+
background: var(--paid-row-hover-bg, #f3f4f6);
|
95
97
|
}
|
96
98
|
.paid-activity-log-table th,
|
97
99
|
.paid-activity-log-table td {
|
@@ -101,7 +103,7 @@
|
|
101
103
|
/* Empty state */
|
102
104
|
.paid-activity-log-empty {
|
103
105
|
text-align: center;
|
104
|
-
color: #98a2b3;
|
106
|
+
color: var(--paid-empty-color, #98a2b3);
|
105
107
|
padding: 40px 0;
|
106
108
|
font-size: 1rem;
|
107
109
|
}
|
@@ -0,0 +1,139 @@
|
|
1
|
+
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;600;700&display=swap');
|
2
|
+
|
3
|
+
/* Container styles */
|
4
|
+
.paid-container {
|
5
|
+
position: relative;
|
6
|
+
min-width: 0;
|
7
|
+
font-family: var(--paid-font-family, 'Roboto');
|
8
|
+
width: 100%;
|
9
|
+
box-sizing: border-box;
|
10
|
+
}
|
11
|
+
|
12
|
+
.paid-container-wrapper {
|
13
|
+
position: relative;
|
14
|
+
background: #f8f9fa;
|
15
|
+
border: 1px solid #e9ecef;
|
16
|
+
border-radius: 8px;
|
17
|
+
overflow: hidden;
|
18
|
+
transition: box-shadow 0.2s;
|
19
|
+
font-family: var(--paid-font-family, 'Roboto');
|
20
|
+
width: 100%;
|
21
|
+
min-width: 0;
|
22
|
+
}
|
23
|
+
|
24
|
+
/* Header styles */
|
25
|
+
.paid-container-header {
|
26
|
+
display: flex;
|
27
|
+
flex-direction: column;
|
28
|
+
padding: 24px 24px 0 24px;
|
29
|
+
font-family: var(--paid-font-family, 'Roboto');
|
30
|
+
gap: 20px;
|
31
|
+
}
|
32
|
+
|
33
|
+
.paid-container-header-content {
|
34
|
+
flex: 1;
|
35
|
+
min-width: 0;
|
36
|
+
}
|
37
|
+
|
38
|
+
.paid-container-title {
|
39
|
+
font-size: var(--paid-title-font-size, 1.5rem);
|
40
|
+
font-weight: var(--paid-title-font-weight, 600);
|
41
|
+
color: var(--paid-title-color, #1d2939);
|
42
|
+
font-family: var(--paid-font-family, 'Roboto');
|
43
|
+
margin: 0 0 8px 0;
|
44
|
+
line-height: 1.3;
|
45
|
+
}
|
46
|
+
|
47
|
+
.paid-container-description {
|
48
|
+
font-size: var(--paid-description-font-size, 0.95rem);
|
49
|
+
color: var(--paid-description-color, #667085);
|
50
|
+
font-family: var(--paid-font-family, 'Roboto');
|
51
|
+
margin: 0;
|
52
|
+
line-height: 1.4;
|
53
|
+
}
|
54
|
+
|
55
|
+
/* Tabs styles */
|
56
|
+
.paid-container-tabs {
|
57
|
+
display: flex;
|
58
|
+
gap: 4px;
|
59
|
+
background: #FAFAFB;
|
60
|
+
border-radius: 12px;
|
61
|
+
min-height: 48px;
|
62
|
+
position: relative;
|
63
|
+
padding: 4px;
|
64
|
+
}
|
65
|
+
|
66
|
+
.paid-container-tab {
|
67
|
+
font-size: var(--paid-toggle-font-size, 1rem);
|
68
|
+
font-weight: 500;
|
69
|
+
color: #6B7280;
|
70
|
+
background: none;
|
71
|
+
border: none;
|
72
|
+
border-radius: 12px;
|
73
|
+
cursor: pointer;
|
74
|
+
text-decoration: none;
|
75
|
+
padding: 0;
|
76
|
+
font-family: var(--paid-font-family, 'Roboto');
|
77
|
+
transition: all 0.2s ease;
|
78
|
+
white-space: nowrap;
|
79
|
+
min-height: 40px;
|
80
|
+
min-width: 0;
|
81
|
+
flex: 1;
|
82
|
+
display: flex;
|
83
|
+
align-items: center;
|
84
|
+
justify-content: center;
|
85
|
+
text-align: center;
|
86
|
+
position: relative;
|
87
|
+
z-index: 2;
|
88
|
+
}
|
89
|
+
|
90
|
+
.paid-container-tab:hover {
|
91
|
+
background: white;
|
92
|
+
box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
|
93
|
+
}
|
94
|
+
|
95
|
+
.paid-container-tab.active {
|
96
|
+
color: #1d2939;
|
97
|
+
font-weight: 600;
|
98
|
+
background: white;
|
99
|
+
box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
|
100
|
+
}
|
101
|
+
|
102
|
+
.paid-container-tab:focus {
|
103
|
+
outline: none;
|
104
|
+
box-shadow: 0 0 0 2px #2563eb;
|
105
|
+
}
|
106
|
+
|
107
|
+
/* Content styles */
|
108
|
+
.paid-container-content {
|
109
|
+
min-height: 50px;
|
110
|
+
font-family: var(--paid-font-family, 'Roboto');
|
111
|
+
}
|
112
|
+
|
113
|
+
/* Responsive design */
|
114
|
+
@media (max-width: 768px) {
|
115
|
+
.paid-container-header {
|
116
|
+
flex-direction: column;
|
117
|
+
align-items: stretch;
|
118
|
+
gap: 16px;
|
119
|
+
}
|
120
|
+
|
121
|
+
.paid-container-tabs {
|
122
|
+
overflow-x: auto;
|
123
|
+
-webkit-overflow-scrolling: touch;
|
124
|
+
scrollbar-width: none;
|
125
|
+
-ms-overflow-style: none;
|
126
|
+
}
|
127
|
+
|
128
|
+
.paid-container-tabs::-webkit-scrollbar {
|
129
|
+
display: none;
|
130
|
+
}
|
131
|
+
|
132
|
+
.paid-container-title {
|
133
|
+
font-size: var(--paid-title-font-size, 1.25rem);
|
134
|
+
}
|
135
|
+
|
136
|
+
.paid-container-description {
|
137
|
+
font-size: var(--paid-description-font-size, 0.875rem);
|
138
|
+
}
|
139
|
+
}
|
@@ -0,0 +1,344 @@
|
|
1
|
+
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap');
|
2
|
+
|
3
|
+
/* Container styles */
|
4
|
+
.paid-invoice-container {
|
5
|
+
position: relative;
|
6
|
+
min-width: 0;
|
7
|
+
font-family: var(--paid-font-family, 'Roboto');
|
8
|
+
width: 100%;
|
9
|
+
box-sizing: border-box;
|
10
|
+
}
|
11
|
+
|
12
|
+
.paid-invoice-table-wrapper {
|
13
|
+
position: relative;
|
14
|
+
background: var(--paid-wrapper-bg, #fff);
|
15
|
+
border: var(--paid-wrapper-border, 1px solid #e5e7eb);
|
16
|
+
border-radius: 12px;
|
17
|
+
box-shadow: 0 2px 16px 0 rgba(16, 24, 40, 0.08);
|
18
|
+
overflow-x: auto;
|
19
|
+
transition: box-shadow 0.2s;
|
20
|
+
font-family: var(--paid-font-family, 'Roboto');
|
21
|
+
width: 100%;
|
22
|
+
min-width: 0;
|
23
|
+
}
|
24
|
+
.paid-invoice-table-wrapper:active {
|
25
|
+
box-shadow: 0 4px 24px 0 rgba(16, 24, 40, 0.16);
|
26
|
+
}
|
27
|
+
|
28
|
+
/* Header styles */
|
29
|
+
.paid-invoice-header {
|
30
|
+
display: flex;
|
31
|
+
justify-content: space-between;
|
32
|
+
align-items: center;
|
33
|
+
padding: 18px 24px;
|
34
|
+
background: var(--paid-header-bg, #fff);
|
35
|
+
border-bottom: var(--paid-header-border-bottom, 1px solid #e5e7eb);
|
36
|
+
border-radius: 12px 12px 0 0;
|
37
|
+
font-family: var(--paid-font-family, 'Roboto');
|
38
|
+
}
|
39
|
+
.paid-invoice-title {
|
40
|
+
font-size: var(--paid-title-font-size, 1.1rem);
|
41
|
+
font-weight: var(--paid-title-font-weight, 600);
|
42
|
+
color: var(--paid-title-color, #1d2939);
|
43
|
+
font-family: var(--paid-font-family, 'Roboto');
|
44
|
+
}
|
45
|
+
|
46
|
+
/* Table styles */
|
47
|
+
.paid-invoice-table {
|
48
|
+
width: 100%;
|
49
|
+
min-width: 0;
|
50
|
+
table-layout: auto;
|
51
|
+
word-break: break-word;
|
52
|
+
border-collapse: separate;
|
53
|
+
border-spacing: 0;
|
54
|
+
background: var(--paid-table-bg, #fff);
|
55
|
+
font-family: var(--paid-font-family, 'Roboto');
|
56
|
+
}
|
57
|
+
.paid-invoice-table th,
|
58
|
+
.paid-invoice-table td {
|
59
|
+
padding: 8px 8px;
|
60
|
+
font-size: 0.95rem;
|
61
|
+
white-space: normal;
|
62
|
+
word-break: break-word;
|
63
|
+
}
|
64
|
+
.paid-invoice-table th {
|
65
|
+
font-size: var(--paid-th-font-size, 1rem);
|
66
|
+
font-weight: var(--paid-th-font-weight, 500);
|
67
|
+
color: var(--paid-th-color, #667085);
|
68
|
+
text-align: left;
|
69
|
+
padding: 18px 24px;
|
70
|
+
background: var(--paid-th-bg, #f9fafb);
|
71
|
+
border-bottom: var(--paid-th-border-bottom, 1px solid #e5e7eb);
|
72
|
+
}
|
73
|
+
.paid-invoice-table td {
|
74
|
+
font-size: var(--paid-td-font-size, 0.97rem);
|
75
|
+
font-weight: var(--paid-td-font-weight, normal);
|
76
|
+
color: var(--paid-td-color, #1d2939);
|
77
|
+
background: var(--paid-td-bg, transparent);
|
78
|
+
padding: 16px 24px;
|
79
|
+
border-bottom: var(--paid-td-border-bottom, 1px solid #f1f1f1);
|
80
|
+
}
|
81
|
+
.paid-invoice-table tr:last-child td {
|
82
|
+
border-bottom: none;
|
83
|
+
}
|
84
|
+
.paid-invoice-table tr:hover td {
|
85
|
+
background: var(--paid-row-hover-bg, #f3f4f6);
|
86
|
+
}
|
87
|
+
.paid-invoice-table th,
|
88
|
+
.paid-invoice-table td {
|
89
|
+
white-space: nowrap;
|
90
|
+
}
|
91
|
+
|
92
|
+
/* Status badges */
|
93
|
+
.paid-invoice-status {
|
94
|
+
display: inline-block;
|
95
|
+
padding: 4px 8px;
|
96
|
+
border-radius: 6px;
|
97
|
+
font-size: 0.75rem;
|
98
|
+
font-weight: 500;
|
99
|
+
text-transform: uppercase;
|
100
|
+
letter-spacing: 0.025em;
|
101
|
+
}
|
102
|
+
|
103
|
+
.paid-invoice-status-paid {
|
104
|
+
background-color: #dcfce7;
|
105
|
+
color: #166534;
|
106
|
+
}
|
107
|
+
|
108
|
+
.paid-invoice-status-pending {
|
109
|
+
background-color: #fef3c7;
|
110
|
+
color: #92400e;
|
111
|
+
}
|
112
|
+
|
113
|
+
.paid-invoice-status-unpaid {
|
114
|
+
background-color: #fee2e2;
|
115
|
+
color: #991b1b;
|
116
|
+
}
|
117
|
+
|
118
|
+
/* Action button */
|
119
|
+
.paid-invoice-action-btn {
|
120
|
+
background: none;
|
121
|
+
border: none;
|
122
|
+
cursor: pointer;
|
123
|
+
padding: 4px;
|
124
|
+
border-radius: 4px;
|
125
|
+
color: #6b7280;
|
126
|
+
transition: all 0.2s;
|
127
|
+
}
|
128
|
+
|
129
|
+
.paid-invoice-action-btn:hover {
|
130
|
+
background-color: #f3f4f6;
|
131
|
+
color: #374151;
|
132
|
+
}
|
133
|
+
|
134
|
+
.paid-invoice-action-btn:disabled {
|
135
|
+
opacity: 0.6;
|
136
|
+
cursor: not-allowed;
|
137
|
+
}
|
138
|
+
|
139
|
+
/* Empty state */
|
140
|
+
.paid-invoice-empty {
|
141
|
+
text-align: center;
|
142
|
+
color: var(--paid-empty-color, #98a2b3);
|
143
|
+
padding: 40px 0;
|
144
|
+
font-size: 1rem;
|
145
|
+
}
|
146
|
+
|
147
|
+
/* Loading and error states */
|
148
|
+
.paid-invoice-loading,
|
149
|
+
.paid-invoice-error {
|
150
|
+
padding: 40px 24px;
|
151
|
+
text-align: center;
|
152
|
+
color: var(--paid-empty-color, #98a2b3);
|
153
|
+
font-size: 0.875rem;
|
154
|
+
}
|
155
|
+
|
156
|
+
.paid-invoice-error {
|
157
|
+
color: #dc2626;
|
158
|
+
}
|
159
|
+
|
160
|
+
/* Responsive design */
|
161
|
+
@media (max-width: 768px) {
|
162
|
+
.paid-invoice-table th,
|
163
|
+
.paid-invoice-table td {
|
164
|
+
padding: 12px 16px;
|
165
|
+
font-size: 0.8rem;
|
166
|
+
}
|
167
|
+
|
168
|
+
.paid-invoice-table {
|
169
|
+
min-width: 600px;
|
170
|
+
}
|
171
|
+
}
|
172
|
+
|
173
|
+
.paid-invoice-modal-overlay {
|
174
|
+
position: fixed;
|
175
|
+
top: 0;
|
176
|
+
left: 0;
|
177
|
+
right: 0;
|
178
|
+
bottom: 0;
|
179
|
+
background-color: rgba(17, 24, 39, 0.7);
|
180
|
+
backdrop-filter: blur(4px);
|
181
|
+
display: flex;
|
182
|
+
align-items: center;
|
183
|
+
justify-content: center;
|
184
|
+
z-index: 1000;
|
185
|
+
animation: fadeIn 0.2s ease-out;
|
186
|
+
}
|
187
|
+
|
188
|
+
.paid-invoice-modal-content {
|
189
|
+
background: white;
|
190
|
+
border-radius: 16px;
|
191
|
+
width: 95vw;
|
192
|
+
height: 95vh;
|
193
|
+
max-width: 1400px;
|
194
|
+
max-height: 900px;
|
195
|
+
display: flex;
|
196
|
+
flex-direction: column;
|
197
|
+
overflow: hidden;
|
198
|
+
box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
|
199
|
+
animation: slideIn 0.3s ease-out;
|
200
|
+
border: 1px solid rgba(255, 255, 255, 0.1);
|
201
|
+
}
|
202
|
+
|
203
|
+
.paid-invoice-modal-header {
|
204
|
+
display: flex;
|
205
|
+
justify-content: space-between;
|
206
|
+
align-items: center;
|
207
|
+
padding: 20px 24px;
|
208
|
+
border-bottom: 1px solid #e5e7eb;
|
209
|
+
background: #ffffff;
|
210
|
+
}
|
211
|
+
|
212
|
+
.paid-invoice-modal-header h3 {
|
213
|
+
margin: 0;
|
214
|
+
font-size: 20px;
|
215
|
+
font-weight: 600;
|
216
|
+
color: #111827;
|
217
|
+
display: flex;
|
218
|
+
align-items: center;
|
219
|
+
gap: 8px;
|
220
|
+
}
|
221
|
+
|
222
|
+
.paid-invoice-modal-header h3::before {
|
223
|
+
content: '';
|
224
|
+
display: inline-block;
|
225
|
+
width: 4px;
|
226
|
+
height: 20px;
|
227
|
+
background: #3b82f6;
|
228
|
+
border-radius: 2px;
|
229
|
+
}
|
230
|
+
|
231
|
+
.paid-invoice-modal-actions {
|
232
|
+
display: flex;
|
233
|
+
gap: 12px;
|
234
|
+
}
|
235
|
+
|
236
|
+
.paid-invoice-modal-btn {
|
237
|
+
display: flex;
|
238
|
+
align-items: center;
|
239
|
+
justify-content: center;
|
240
|
+
width: 36px;
|
241
|
+
height: 36px;
|
242
|
+
border: none;
|
243
|
+
border-radius: 8px;
|
244
|
+
cursor: pointer;
|
245
|
+
transition: all 0.2s ease;
|
246
|
+
position: relative;
|
247
|
+
}
|
248
|
+
|
249
|
+
.paid-invoice-modal-btn::after {
|
250
|
+
content: attr(title);
|
251
|
+
position: absolute;
|
252
|
+
bottom: -24px;
|
253
|
+
left: 50%;
|
254
|
+
transform: translateX(-50%);
|
255
|
+
background: #1f2937;
|
256
|
+
color: white;
|
257
|
+
padding: 4px 8px;
|
258
|
+
border-radius: 4px;
|
259
|
+
font-size: 12px;
|
260
|
+
white-space: nowrap;
|
261
|
+
opacity: 0;
|
262
|
+
transition: opacity 0.2s ease;
|
263
|
+
pointer-events: none;
|
264
|
+
}
|
265
|
+
|
266
|
+
.paid-invoice-modal-btn:hover::after {
|
267
|
+
opacity: 1;
|
268
|
+
}
|
269
|
+
|
270
|
+
.paid-invoice-modal-btn-download {
|
271
|
+
background: #3b82f6;
|
272
|
+
color: white;
|
273
|
+
}
|
274
|
+
|
275
|
+
.paid-invoice-modal-btn-download:hover {
|
276
|
+
background: #2563eb;
|
277
|
+
transform: translateY(-1px);
|
278
|
+
}
|
279
|
+
|
280
|
+
.paid-invoice-modal-btn-close {
|
281
|
+
background: #f3f4f6;
|
282
|
+
color: #6b7280;
|
283
|
+
}
|
284
|
+
|
285
|
+
.paid-invoice-modal-btn-close:hover {
|
286
|
+
background: #e5e7eb;
|
287
|
+
color: #374151;
|
288
|
+
transform: translateY(-1px);
|
289
|
+
}
|
290
|
+
|
291
|
+
.paid-invoice-modal-body {
|
292
|
+
flex: 1;
|
293
|
+
display: flex;
|
294
|
+
align-items: center;
|
295
|
+
justify-content: center;
|
296
|
+
background: #f9fafb;
|
297
|
+
position: relative;
|
298
|
+
}
|
299
|
+
|
300
|
+
.paid-invoice-modal-body iframe {
|
301
|
+
width: 100%;
|
302
|
+
height: 100%;
|
303
|
+
border: none;
|
304
|
+
background: white;
|
305
|
+
}
|
306
|
+
|
307
|
+
.paid-invoice-modal-loading {
|
308
|
+
display: flex;
|
309
|
+
align-items: center;
|
310
|
+
justify-content: center;
|
311
|
+
font-size: 16px;
|
312
|
+
color: #6b7280;
|
313
|
+
gap: 8px;
|
314
|
+
}
|
315
|
+
|
316
|
+
.paid-invoice-modal-loading::after {
|
317
|
+
content: '';
|
318
|
+
width: 20px;
|
319
|
+
height: 20px;
|
320
|
+
border: 2px solid #e5e7eb;
|
321
|
+
border-top-color: #3b82f6;
|
322
|
+
border-radius: 50%;
|
323
|
+
animation: spin 1s linear infinite;
|
324
|
+
}
|
325
|
+
|
326
|
+
@keyframes fadeIn {
|
327
|
+
from { opacity: 0; }
|
328
|
+
to { opacity: 1; }
|
329
|
+
}
|
330
|
+
|
331
|
+
@keyframes slideIn {
|
332
|
+
from {
|
333
|
+
opacity: 0;
|
334
|
+
transform: translateY(20px);
|
335
|
+
}
|
336
|
+
to {
|
337
|
+
opacity: 1;
|
338
|
+
transform: translateY(0);
|
339
|
+
}
|
340
|
+
}
|
341
|
+
|
342
|
+
@keyframes spin {
|
343
|
+
to { transform: rotate(360deg); }
|
344
|
+
}
|