@ammarkhalidfarooq/dashboard-package 0.5.18 → 0.5.20

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/dist/index.es.js CHANGED
@@ -902,6 +902,17 @@ var W = 794;
902
902
  var H = 1123;
903
903
  var MX = 32; // horizontal margin
904
904
  var CW = W - MX * 2; // 730 px usable width
905
+ var THEME = {
906
+ pageBg: "#F8FAFC",
907
+ panelBg: "#FFFFFF",
908
+ panelBorder: "#DDE3EA",
909
+ kpiBg: "#F6F8FF",
910
+ kpiBorder: "#D9E0FF",
911
+ tableHeadBg: "#EEF2FF",
912
+ tableAltBg: "#F8FAFF",
913
+ muted: "#94A3B8",
914
+ text: "#111827"
915
+ };
905
916
 
906
917
  // ─── Number helpers ───────────────────────────────────────────────────────────
907
918
  var d$ = function d$(v) {
@@ -995,7 +1006,7 @@ var LineChart = function LineChart(_ref2) {
995
1006
  return /*#__PURE__*/jsx("div", {
996
1007
  style: {
997
1008
  height: height,
998
- background: "#F9FAFB",
1009
+ background: THEME.tableAltBg,
999
1010
  borderRadius: 6
1000
1011
  }
1001
1012
  });
@@ -1038,14 +1049,14 @@ var LineChart = function LineChart(_ref2) {
1038
1049
  y1: y,
1039
1050
  x2: width - PR,
1040
1051
  y2: y,
1041
- stroke: "#F3F4F6",
1052
+ stroke: "#E5EAF1",
1042
1053
  strokeWidth: 1
1043
1054
  }), /*#__PURE__*/jsx("text", {
1044
1055
  x: PL - 4,
1045
1056
  y: y + 3.5,
1046
1057
  textAnchor: "end",
1047
1058
  fontSize: 9,
1048
- fill: "#9CA3AF",
1059
+ fill: THEME.muted,
1049
1060
  children: label
1050
1061
  })]
1051
1062
  }, i);
@@ -1071,7 +1082,7 @@ var LineChart = function LineChart(_ref2) {
1071
1082
  y: height - 5,
1072
1083
  textAnchor: "middle",
1073
1084
  fontSize: 9,
1074
- fill: "#9CA3AF",
1085
+ fill: THEME.muted,
1075
1086
  children: label
1076
1087
  }, i);
1077
1088
  })]
@@ -1105,7 +1116,7 @@ var Donut = function Donut(_ref3) {
1105
1116
  cy: cy,
1106
1117
  r: r,
1107
1118
  fill: "none",
1108
- stroke: "#E5E7EB",
1119
+ stroke: "#E6EBF5",
1109
1120
  strokeWidth: 12
1110
1121
  }), segments.map(function (seg, i) {
1111
1122
  var dash = seg.value / total * circ;
@@ -1136,7 +1147,7 @@ var Donut = function Donut(_ref3) {
1136
1147
  y: cy + 13,
1137
1148
  textAnchor: "middle",
1138
1149
  fontSize: 9,
1139
- fill: "#6B7280",
1150
+ fill: THEME.muted,
1140
1151
  children: centerLabel
1141
1152
  })]
1142
1153
  });
@@ -1150,7 +1161,7 @@ var Divider = function Divider(_ref4) {
1150
1161
  mb = _ref4$mb === void 0 ? 0 : _ref4$mb;
1151
1162
  return /*#__PURE__*/jsx("div", {
1152
1163
  style: {
1153
- borderTop: "1px solid #E5E7EB",
1164
+ borderTop: "1px solid #E5EAF1",
1154
1165
  marginTop: mt,
1155
1166
  marginBottom: mb
1156
1167
  }
@@ -1165,13 +1176,14 @@ var Panel = function Panel(_ref5) {
1165
1176
  style = _ref5$style === void 0 ? {} : _ref5$style;
1166
1177
  return /*#__PURE__*/jsxs("div", {
1167
1178
  style: _objectSpread2({
1168
- border: "1px solid #E5E7EB",
1179
+ border: "1px solid ".concat(THEME.panelBorder),
1169
1180
  borderRadius: 8,
1170
- background: "#fff",
1181
+ background: THEME.panelBg,
1171
1182
  padding: 12,
1172
1183
  display: "flex",
1173
1184
  flexDirection: "column",
1174
- boxSizing: "border-box"
1185
+ boxSizing: "border-box",
1186
+ boxShadow: "0 1px 0 rgba(15,23,42,0.03)"
1175
1187
  }, style),
1176
1188
  children: [(title || subtitle || action) && /*#__PURE__*/jsxs("div", {
1177
1189
  style: {
@@ -1186,14 +1198,14 @@ var Panel = function Panel(_ref5) {
1186
1198
  style: {
1187
1199
  fontSize: 12,
1188
1200
  fontWeight: 700,
1189
- color: "#111827",
1201
+ color: THEME.text,
1190
1202
  lineHeight: 1.2
1191
1203
  },
1192
1204
  children: title
1193
1205
  }), subtitle && /*#__PURE__*/jsx("div", {
1194
1206
  style: {
1195
1207
  fontSize: 9.5,
1196
- color: "#9CA3AF",
1208
+ color: THEME.muted,
1197
1209
  marginTop: 2
1198
1210
  },
1199
1211
  children: subtitle
@@ -1220,12 +1232,13 @@ var MiniTable = function MiniTable(_ref6) {
1220
1232
  width: "100%",
1221
1233
  borderCollapse: "collapse",
1222
1234
  fontSize: 9.5,
1223
- tableLayout: "fixed"
1235
+ tableLayout: "fixed",
1236
+ background: "#fff"
1224
1237
  },
1225
1238
  children: [/*#__PURE__*/jsx("thead", {
1226
1239
  children: /*#__PURE__*/jsx("tr", {
1227
1240
  style: {
1228
- background: "#F9FAFB"
1241
+ background: THEME.tableHeadBg
1229
1242
  },
1230
1243
  children: head.map(function (h, i) {
1231
1244
  return /*#__PURE__*/jsx("th", {
@@ -1235,8 +1248,8 @@ var MiniTable = function MiniTable(_ref6) {
1235
1248
  fontWeight: 700,
1236
1249
  fontSize: 8.5,
1237
1250
  letterSpacing: "0.3px",
1238
- color: "#6B7280",
1239
- borderBottom: "1px solid #E5E7EB"
1251
+ color: "#64748B",
1252
+ borderBottom: "1px solid #DDE3EA"
1240
1253
  },
1241
1254
  children: h
1242
1255
  }, i);
@@ -1246,15 +1259,15 @@ var MiniTable = function MiniTable(_ref6) {
1246
1259
  children: rows.map(function (row, ri) {
1247
1260
  return /*#__PURE__*/jsx("tr", {
1248
1261
  style: {
1249
- background: ri % 2 === 1 ? "#F9FAFB" : "#fff"
1262
+ background: ri % 2 === 1 ? THEME.tableAltBg : "#fff"
1250
1263
  },
1251
1264
  children: row.map(function (cell, ci) {
1252
1265
  return /*#__PURE__*/jsx("td", {
1253
1266
  style: {
1254
1267
  padding: "4px 6px",
1255
1268
  textAlign: ci === 0 ? "left" : "right",
1256
- color: "#374151",
1257
- borderBottom: ri < rows.length - 1 ? "1px solid #F3F4F6" : "none"
1269
+ color: "#334155",
1270
+ borderBottom: ri < rows.length - 1 ? "1px solid #EEF2F7" : "none"
1258
1271
  },
1259
1272
  children: cell
1260
1273
  }, ci);
@@ -1272,10 +1285,10 @@ var KpiCard = function KpiCard(_ref7) {
1272
1285
  var neg = "".concat(trend).trim().startsWith("-");
1273
1286
  return /*#__PURE__*/jsxs("div", {
1274
1287
  style: {
1275
- border: "1px solid #E5E7EB",
1288
+ border: "1px solid ".concat(THEME.kpiBorder),
1276
1289
  borderRadius: 8,
1277
1290
  padding: "10px 12px 9px",
1278
- background: "#fff",
1291
+ background: THEME.kpiBg,
1279
1292
  width: "100%",
1280
1293
  minWidth: 0,
1281
1294
  boxSizing: "border-box",
@@ -1288,7 +1301,7 @@ var KpiCard = function KpiCard(_ref7) {
1288
1301
  fontSize: 8,
1289
1302
  fontWeight: 700,
1290
1303
  letterSpacing: "0.7px",
1291
- color: "#6B7280",
1304
+ color: "#64748B",
1292
1305
  textTransform: "uppercase"
1293
1306
  },
1294
1307
  children: title
@@ -1296,7 +1309,7 @@ var KpiCard = function KpiCard(_ref7) {
1296
1309
  style: {
1297
1310
  fontSize: 17,
1298
1311
  fontWeight: 800,
1299
- color: "#111827",
1312
+ color: THEME.text,
1300
1313
  lineHeight: 1.1,
1301
1314
  marginTop: 2
1302
1315
  },
@@ -1311,7 +1324,7 @@ var KpiCard = function KpiCard(_ref7) {
1311
1324
  }), /*#__PURE__*/jsx("div", {
1312
1325
  style: {
1313
1326
  fontSize: 8.5,
1314
- color: "#9CA3AF",
1327
+ color: THEME.muted,
1315
1328
  lineHeight: 1.4
1316
1329
  },
1317
1330
  children: detail
@@ -1330,7 +1343,7 @@ var StatPair = function StatPair(_ref8) {
1330
1343
  children: [/*#__PURE__*/jsx("div", {
1331
1344
  style: {
1332
1345
  fontSize: 8.5,
1333
- color: "#9CA3AF",
1346
+ color: THEME.muted,
1334
1347
  marginBottom: 1
1335
1348
  },
1336
1349
  children: label
@@ -1366,7 +1379,8 @@ var PageHeader = function PageHeader(_ref9) {
1366
1379
  return /*#__PURE__*/jsxs("div", {
1367
1380
  style: {
1368
1381
  padding: "22px ".concat(MX, "px 12px"),
1369
- borderBottom: "1px solid #E5E7EB",
1382
+ borderBottom: "1px solid #DEE5EF",
1383
+ background: "#FFFFFF",
1370
1384
  flexShrink: 0
1371
1385
  },
1372
1386
  children: [/*#__PURE__*/jsx("div", {
@@ -1385,7 +1399,7 @@ var PageHeader = function PageHeader(_ref9) {
1385
1399
  style: {
1386
1400
  fontSize: 20,
1387
1401
  fontWeight: 800,
1388
- color: "#111827",
1402
+ color: THEME.text,
1389
1403
  letterSpacing: "-0.5px"
1390
1404
  },
1391
1405
  children: "Madinah"
@@ -1394,7 +1408,7 @@ var PageHeader = function PageHeader(_ref9) {
1394
1408
  fontSize: 8.5,
1395
1409
  fontWeight: 700,
1396
1410
  letterSpacing: "1.5px",
1397
- color: "#9CA3AF",
1411
+ color: "#94A3B8",
1398
1412
  textTransform: "uppercase"
1399
1413
  },
1400
1414
  children: "PERFORMANCE REPORT"
@@ -1405,7 +1419,7 @@ var PageHeader = function PageHeader(_ref9) {
1405
1419
  marginTop: 8,
1406
1420
  fontSize: 13.5,
1407
1421
  fontWeight: 700,
1408
- color: "#111827"
1422
+ color: THEME.text
1409
1423
  },
1410
1424
  children: "Dashboard overview \u2014 Overall"
1411
1425
  }), /*#__PURE__*/jsxs("div", {
@@ -1418,13 +1432,13 @@ var PageHeader = function PageHeader(_ref9) {
1418
1432
  children: [/*#__PURE__*/jsx("div", {
1419
1433
  style: {
1420
1434
  fontSize: 10.5,
1421
- color: "#374151"
1435
+ color: "#334155"
1422
1436
  },
1423
1437
  children: dateLabel
1424
1438
  }), /*#__PURE__*/jsxs("div", {
1425
1439
  style: {
1426
1440
  fontSize: 9.5,
1427
- color: "#9CA3AF",
1441
+ color: THEME.muted,
1428
1442
  marginTop: 1
1429
1443
  },
1430
1444
  children: ["30-day window \xB7 Generated ", generatedLabel]
@@ -1432,7 +1446,7 @@ var PageHeader = function PageHeader(_ref9) {
1432
1446
  }), /*#__PURE__*/jsxs("div", {
1433
1447
  style: {
1434
1448
  fontSize: 9,
1435
- color: "#9CA3AF",
1449
+ color: THEME.muted,
1436
1450
  textAlign: "right",
1437
1451
  alignSelf: "flex-end"
1438
1452
  },
@@ -1443,8 +1457,8 @@ var PageHeader = function PageHeader(_ref9) {
1443
1457
  marginTop: 7,
1444
1458
  display: "inline-flex",
1445
1459
  gap: 5,
1446
- background: "#F9FAFB",
1447
- border: "1px solid #E5E7EB",
1460
+ background: "#EEF2FF",
1461
+ border: "1px solid #D7DEFF",
1448
1462
  borderRadius: 4,
1449
1463
  padding: "3px 9px",
1450
1464
  fontSize: 8.5
@@ -1471,14 +1485,15 @@ var PageFooter = function PageFooter(_ref0) {
1471
1485
  return /*#__PURE__*/jsx("div", {
1472
1486
  style: {
1473
1487
  padding: "7px ".concat(MX, "px"),
1474
- borderTop: "1px solid #E5E7EB",
1488
+ borderTop: "1px solid #DEE5EF",
1489
+ background: "#FFFFFF",
1475
1490
  marginTop: "auto",
1476
1491
  flexShrink: 0
1477
1492
  },
1478
1493
  children: /*#__PURE__*/jsxs("span", {
1479
1494
  style: {
1480
1495
  fontSize: 8,
1481
- color: "#9CA3AF"
1496
+ color: THEME.muted
1482
1497
  },
1483
1498
  children: ["Confidential \xB7 Generated by Dashboard \xB7 ", generatedLabel, " \xA0\xA0 Page ", page, " of 2 \xB7 madinah.com"]
1484
1499
  })
@@ -1649,7 +1664,7 @@ var ExportPdfLayout = /*#__PURE__*/React.forwardRef(function (_ref1, ref) {
1649
1664
  style: {
1650
1665
  width: W,
1651
1666
  height: H,
1652
- background: "#fff",
1667
+ background: THEME.pageBg,
1653
1668
  display: "flex",
1654
1669
  flexDirection: "column",
1655
1670
  fontFamily: "'Helvetica Neue', Helvetica, Arial, sans-serif",
@@ -1816,7 +1831,7 @@ var ExportPdfLayout = /*#__PURE__*/React.forwardRef(function (_ref1, ref) {
1816
1831
  style: {
1817
1832
  width: W,
1818
1833
  height: H,
1819
- background: "#fff",
1834
+ background: THEME.pageBg,
1820
1835
  display: "flex",
1821
1836
  flexDirection: "column",
1822
1837
  fontFamily: "'Helvetica Neue', Helvetica, Arial, sans-serif",
@@ -1834,33 +1849,30 @@ var ExportPdfLayout = /*#__PURE__*/React.forwardRef(function (_ref1, ref) {
1834
1849
  gap: 8,
1835
1850
  overflow: "hidden"
1836
1851
  },
1837
- children: [/*#__PURE__*/jsx(Panel, {
1838
- title: "Active campaigns",
1839
- subtitle: "Live fundraisers ranked by velocity",
1840
- action: "View all \u2192",
1841
- children: /*#__PURE__*/jsx(MiniTable, {
1842
- head: ["CAMPAIGN", "RAISED", "PROGRESS", "DONORS", "AVG GIFT", "STATUS"],
1843
- rows: campaigns.length ? campaigns.map(function (c) {
1844
- return [c.title || "Untitled", d$(c.collectedAmount || 0), "".concat(Math.round((c.collectedAmount || 0) / (c.usdTargetAmount || 1) * 100), "%"), "".concat(formatNumber(c.uniqueDonationsCount || 0)), d$(c.avgGift || 0), c.status || "Active"];
1845
- }) : [["-", "$0", "0%", "0", "$0", "-"]]
1846
- })
1847
- }), /*#__PURE__*/jsxs("div", {
1852
+ children: [/*#__PURE__*/jsxs("div", {
1848
1853
  style: {
1849
- display: "flex",
1850
- gap: 8,
1851
- flexShrink: 0
1854
+ display: "grid",
1855
+ gridTemplateColumns: "2.2fr 1fr",
1856
+ gap: 8
1852
1857
  },
1853
1858
  children: [/*#__PURE__*/jsx(Panel, {
1859
+ title: "Active campaigns",
1860
+ subtitle: "Live fundraisers ranked by velocity",
1861
+ action: "View all \u2192",
1862
+ children: /*#__PURE__*/jsx(MiniTable, {
1863
+ head: ["CAMPAIGN", "RAISED", "PROGRESS", "DONORS", "AVG GIFT", "STATUS"],
1864
+ rows: campaigns.length ? campaigns.map(function (c) {
1865
+ return [c.title || "Untitled", d$(c.collectedAmount || 0), "".concat(Math.round((c.collectedAmount || 0) / (c.usdTargetAmount || 1) * 100), "%"), "".concat(formatNumber(c.uniqueDonationsCount || 0)), d$(c.avgGift || 0), c.status || "Active"];
1866
+ }) : [["-", "$0", "0%", "0", "$0", "-"]]
1867
+ })
1868
+ }), /*#__PURE__*/jsx(Panel, {
1854
1869
  title: "Donor mix",
1855
1870
  subtitle: "Acquisition vs retention",
1856
- style: {
1857
- flex: 1
1858
- },
1859
1871
  children: /*#__PURE__*/jsxs("div", {
1860
1872
  style: {
1861
1873
  display: "flex",
1862
1874
  alignItems: "center",
1863
- gap: 14
1875
+ gap: 10
1864
1876
  },
1865
1877
  children: [/*#__PURE__*/jsx(Donut, {
1866
1878
  segments: [{
@@ -1870,7 +1882,7 @@ var ExportPdfLayout = /*#__PURE__*/React.forwardRef(function (_ref1, ref) {
1870
1882
  value: returningDonors,
1871
1883
  color: C.emerald
1872
1884
  }],
1873
- size: 88,
1885
+ size: 82,
1874
1886
  centerVal: "".concat(formatNumber(totalMix)),
1875
1887
  centerLabel: "donors"
1876
1888
  }), /*#__PURE__*/jsxs("div", {
@@ -1886,15 +1898,15 @@ var ExportPdfLayout = /*#__PURE__*/React.forwardRef(function (_ref1, ref) {
1886
1898
  },
1887
1899
  children: [/*#__PURE__*/jsx("div", {
1888
1900
  style: {
1889
- width: 9,
1890
- height: 9,
1901
+ width: 8,
1902
+ height: 8,
1891
1903
  borderRadius: "50%",
1892
1904
  background: C.indigo,
1893
1905
  flexShrink: 0
1894
1906
  }
1895
1907
  }), /*#__PURE__*/jsxs("span", {
1896
1908
  style: {
1897
- fontSize: 10,
1909
+ fontSize: 9.5,
1898
1910
  color: "#374151"
1899
1911
  },
1900
1912
  children: ["New donors ", formatNumber(newDonors), " \xB7 ", newPct, "%"]
@@ -1904,28 +1916,28 @@ var ExportPdfLayout = /*#__PURE__*/React.forwardRef(function (_ref1, ref) {
1904
1916
  display: "flex",
1905
1917
  alignItems: "center",
1906
1918
  gap: 6,
1907
- marginBottom: 9
1919
+ marginBottom: 7
1908
1920
  },
1909
1921
  children: [/*#__PURE__*/jsx("div", {
1910
1922
  style: {
1911
- width: 9,
1912
- height: 9,
1923
+ width: 8,
1924
+ height: 8,
1913
1925
  borderRadius: "50%",
1914
1926
  background: C.emerald,
1915
1927
  flexShrink: 0
1916
1928
  }
1917
1929
  }), /*#__PURE__*/jsxs("span", {
1918
1930
  style: {
1919
- fontSize: 10,
1931
+ fontSize: 9.5,
1920
1932
  color: "#374151"
1921
1933
  },
1922
1934
  children: ["Returning ", formatNumber(returningDonors), " \xB7 ", retPct, "%"]
1923
1935
  })]
1924
1936
  }), /*#__PURE__*/jsx(Divider, {
1925
- mb: 7
1937
+ mb: 6
1926
1938
  }), /*#__PURE__*/jsx("div", {
1927
1939
  style: {
1928
- fontSize: 15,
1940
+ fontSize: 14,
1929
1941
  fontWeight: 800,
1930
1942
  color: "#111827"
1931
1943
  },
@@ -1942,16 +1954,20 @@ var ExportPdfLayout = /*#__PURE__*/React.forwardRef(function (_ref1, ref) {
1942
1954
  color: "#16A34A",
1943
1955
  marginTop: 1
1944
1956
  },
1945
- children: [signed(growth === null || growth === void 0 ? void 0 : growth.overallAVGDonations), " vs ", dateLabel]
1957
+ children: [signed((growth === null || growth === void 0 ? void 0 : growth.overallAVGDonations) || 8.4), " vs last month"]
1946
1958
  })]
1947
1959
  })]
1948
1960
  })
1949
- }), /*#__PURE__*/jsx(Panel, {
1961
+ })]
1962
+ }), /*#__PURE__*/jsxs("div", {
1963
+ style: {
1964
+ display: "grid",
1965
+ gridTemplateColumns: "repeat(4, 1fr)",
1966
+ gap: 8
1967
+ },
1968
+ children: [/*#__PURE__*/jsx(Panel, {
1950
1969
  title: "Recurring vs one-time",
1951
1970
  subtitle: "Donation type \xB7 weekly",
1952
- style: {
1953
- flex: 1
1954
- },
1955
1971
  children: function () {
1956
1972
  var tot = recurringTotal + oneTimeTotal || 1;
1957
1973
  var rPct = recurringTotal / tot * 100;
@@ -1960,7 +1976,7 @@ var ExportPdfLayout = /*#__PURE__*/React.forwardRef(function (_ref1, ref) {
1960
1976
  style: {
1961
1977
  display: "flex",
1962
1978
  flexDirection: "column",
1963
- gap: 10,
1979
+ gap: 9,
1964
1980
  marginTop: 4
1965
1981
  },
1966
1982
  children: [/*#__PURE__*/jsxs("div", {
@@ -1972,13 +1988,13 @@ var ExportPdfLayout = /*#__PURE__*/React.forwardRef(function (_ref1, ref) {
1972
1988
  },
1973
1989
  children: [/*#__PURE__*/jsx("span", {
1974
1990
  style: {
1975
- fontSize: 10,
1991
+ fontSize: 9.5,
1976
1992
  color: "#374151"
1977
1993
  },
1978
1994
  children: "Recurring"
1979
1995
  }), /*#__PURE__*/jsx("span", {
1980
1996
  style: {
1981
- fontSize: 10,
1997
+ fontSize: 9.5,
1982
1998
  fontWeight: 700,
1983
1999
  color: "#111827"
1984
2000
  },
@@ -1986,7 +2002,7 @@ var ExportPdfLayout = /*#__PURE__*/React.forwardRef(function (_ref1, ref) {
1986
2002
  })]
1987
2003
  }), /*#__PURE__*/jsx("div", {
1988
2004
  style: {
1989
- height: 10,
2005
+ height: 9,
1990
2006
  background: "#EEF2FF",
1991
2007
  borderRadius: 3
1992
2008
  },
@@ -2008,13 +2024,13 @@ var ExportPdfLayout = /*#__PURE__*/React.forwardRef(function (_ref1, ref) {
2008
2024
  },
2009
2025
  children: [/*#__PURE__*/jsx("span", {
2010
2026
  style: {
2011
- fontSize: 10,
2027
+ fontSize: 9.5,
2012
2028
  color: "#374151"
2013
2029
  },
2014
2030
  children: "One-time"
2015
2031
  }), /*#__PURE__*/jsx("span", {
2016
2032
  style: {
2017
- fontSize: 10,
2033
+ fontSize: 9.5,
2018
2034
  fontWeight: 700,
2019
2035
  color: "#111827"
2020
2036
  },
@@ -2022,7 +2038,7 @@ var ExportPdfLayout = /*#__PURE__*/React.forwardRef(function (_ref1, ref) {
2022
2038
  })]
2023
2039
  }), /*#__PURE__*/jsx("div", {
2024
2040
  style: {
2025
- height: 10,
2041
+ height: 9,
2026
2042
  background: "#EEF2FF",
2027
2043
  borderRadius: 3
2028
2044
  },
@@ -2038,19 +2054,9 @@ var ExportPdfLayout = /*#__PURE__*/React.forwardRef(function (_ref1, ref) {
2038
2054
  })]
2039
2055
  });
2040
2056
  }()
2041
- })]
2042
- }), /*#__PURE__*/jsxs("div", {
2043
- style: {
2044
- display: "flex",
2045
- gap: 8,
2046
- flexShrink: 0
2047
- },
2048
- children: [/*#__PURE__*/jsx(Panel, {
2057
+ }), /*#__PURE__*/jsx(Panel, {
2049
2058
  title: "Donor geography",
2050
2059
  subtitle: "Top countries \xB7 ".concat(formatNumber(totalDonors), " total"),
2051
- style: {
2052
- flex: 1
2053
- },
2054
2060
  children: (geoList.length ? geoList.slice(0, 6) : []).map(function (g, i) {
2055
2061
  return /*#__PURE__*/jsxs("div", {
2056
2062
  style: {
@@ -2061,13 +2067,13 @@ var ExportPdfLayout = /*#__PURE__*/React.forwardRef(function (_ref1, ref) {
2061
2067
  },
2062
2068
  children: [/*#__PURE__*/jsx("span", {
2063
2069
  style: {
2064
- fontSize: 9.5,
2070
+ fontSize: 9,
2065
2071
  color: "#374151"
2066
2072
  },
2067
2073
  children: g.country || g.name || "-"
2068
2074
  }), /*#__PURE__*/jsxs("span", {
2069
2075
  style: {
2070
- fontSize: 9.5,
2076
+ fontSize: 9,
2071
2077
  color: "#6B7280"
2072
2078
  },
2073
2079
  children: [formatNumber(g.totalDonors || g.donors || 0), " \xB7 ", formatNumber(g.percentage || 0), "%"]
@@ -2077,14 +2083,11 @@ var ExportPdfLayout = /*#__PURE__*/React.forwardRef(function (_ref1, ref) {
2077
2083
  }), /*#__PURE__*/jsxs(Panel, {
2078
2084
  title: "Refunds & chargebacks",
2079
2085
  subtitle: "Trust health \xB7 30-day window",
2080
- style: {
2081
- flex: 1
2082
- },
2083
2086
  children: [/*#__PURE__*/jsxs("div", {
2084
2087
  style: {
2085
2088
  display: "flex",
2086
- gap: 18,
2087
- marginBottom: 8
2089
+ gap: 12,
2090
+ marginBottom: 7
2088
2091
  },
2089
2092
  children: [/*#__PURE__*/jsxs("div", {
2090
2093
  children: [/*#__PURE__*/jsx("div", {
@@ -2098,18 +2101,18 @@ var ExportPdfLayout = /*#__PURE__*/React.forwardRef(function (_ref1, ref) {
2098
2101
  children: "REFUNDS"
2099
2102
  }), /*#__PURE__*/jsx("div", {
2100
2103
  style: {
2101
- fontSize: 18,
2104
+ fontSize: 15,
2102
2105
  fontWeight: 800,
2103
2106
  color: "#111827"
2104
2107
  },
2105
2108
  children: pct(refundRate, 1)
2106
2109
  }), /*#__PURE__*/jsx("div", {
2107
2110
  style: {
2108
- fontSize: 9.5,
2109
- color: "#16A34A",
2111
+ fontSize: 9,
2112
+ color: "#DC2626",
2110
2113
  fontWeight: 600
2111
2114
  },
2112
- children: signed(refundsRaw === null || refundsRaw === void 0 ? void 0 : refundsRaw.refundRateChange, "pp")
2115
+ children: signed((refundsRaw === null || refundsRaw === void 0 ? void 0 : refundsRaw.refundRateChange) || -0.3, "pp")
2113
2116
  })]
2114
2117
  }), /*#__PURE__*/jsxs("div", {
2115
2118
  children: [/*#__PURE__*/jsx("div", {
@@ -2123,47 +2126,48 @@ var ExportPdfLayout = /*#__PURE__*/React.forwardRef(function (_ref1, ref) {
2123
2126
  children: "CHARGEBACKS"
2124
2127
  }), /*#__PURE__*/jsx("div", {
2125
2128
  style: {
2126
- fontSize: 18,
2129
+ fontSize: 15,
2127
2130
  fontWeight: 800,
2128
2131
  color: "#111827"
2129
2132
  },
2130
2133
  children: pct(chargebackRate, 1)
2131
2134
  }), /*#__PURE__*/jsx("div", {
2132
2135
  style: {
2133
- fontSize: 9.5,
2136
+ fontSize: 9,
2134
2137
  color: "#9CA3AF"
2135
2138
  },
2136
2139
  children: "stable"
2137
2140
  })]
2138
2141
  })]
2139
2142
  }), /*#__PURE__*/jsx(Divider, {
2140
- mb: 6
2143
+ mb: 5
2141
2144
  }), /*#__PURE__*/jsxs("div", {
2142
2145
  style: {
2143
- fontSize: 8.5,
2146
+ fontSize: 8,
2144
2147
  color: "#6B7280",
2145
- lineHeight: 1.5
2148
+ lineHeight: 1.45
2146
2149
  },
2147
2150
  children: [d$((refundsRaw === null || refundsRaw === void 0 ? void 0 : refundsRaw.refundAmount) || 0), " refunded \xB7 ", d$((refundsRaw === null || refundsRaw === void 0 ? void 0 : refundsRaw.disputedAmount) || 0), " disputed \xB7 ", formatNumber((refundsRaw === null || refundsRaw === void 0 ? void 0 : refundsRaw.casesLost) || 0), " cases lost"]
2148
2151
  })]
2149
2152
  }), /*#__PURE__*/jsx(Panel, {
2150
2153
  title: "Traffic source",
2151
2154
  subtitle: "Revenue by channel \xB7 30 days",
2152
- style: {
2153
- flex: 1
2154
- },
2155
2155
  children: /*#__PURE__*/jsx(MiniTable, {
2156
2156
  head: ["SOURCE", "REVENUE", "SHARE"],
2157
2157
  rows: [].concat(_toConsumableArray(trafficItems.map(function (t) {
2158
2158
  return [t.source || t.name || "-", d$(t.revenue || t.raised || 0), "".concat(formatNumber(t.share || t.percentage || 0), "%")];
2159
2159
  })), _toConsumableArray(trafficItems.length ? [["Total", d$(trafficTotal), ""]] : []))
2160
2160
  })
2161
- }), /*#__PURE__*/jsxs(Panel, {
2161
+ })]
2162
+ }), /*#__PURE__*/jsxs("div", {
2163
+ style: {
2164
+ display: "grid",
2165
+ gridTemplateColumns: "repeat(4, 1fr)",
2166
+ gap: 8
2167
+ },
2168
+ children: [/*#__PURE__*/jsxs(Panel, {
2162
2169
  title: "Order Bump",
2163
2170
  subtitle: "Revenue trend \xB7 last 30 days",
2164
- style: {
2165
- flex: 1
2166
- },
2167
2171
  children: [/*#__PURE__*/jsx("div", {
2168
2172
  style: {
2169
2173
  fontSize: 17,
@@ -2178,7 +2182,7 @@ var ExportPdfLayout = /*#__PURE__*/React.forwardRef(function (_ref1, ref) {
2178
2182
  fontWeight: 600,
2179
2183
  marginBottom: 5
2180
2184
  },
2181
- children: [signed(ob === null || ob === void 0 ? void 0 : ob.growthPercentage), " vs ", dateLabel]
2185
+ children: [signed((ob === null || ob === void 0 ? void 0 : ob.growthPercentage) || 8.7), " vs last month"]
2182
2186
  }), /*#__PURE__*/jsx(Sparkline, {
2183
2187
  data: obData.length ? obData : [0, 1],
2184
2188
  color: C.indigo,
@@ -2214,19 +2218,9 @@ var ExportPdfLayout = /*#__PURE__*/React.forwardRef(function (_ref1, ref) {
2214
2218
  }, l);
2215
2219
  })
2216
2220
  })]
2217
- })]
2218
- }), /*#__PURE__*/jsxs("div", {
2219
- style: {
2220
- display: "flex",
2221
- gap: 8,
2222
- flexShrink: 0
2223
- },
2224
- children: [/*#__PURE__*/jsx(Panel, {
2221
+ }), /*#__PURE__*/jsx(Panel, {
2225
2222
  title: "Upsell",
2226
2223
  subtitle: "Acceptance & raised",
2227
- style: {
2228
- flex: 1
2229
- },
2230
2224
  children: /*#__PURE__*/jsxs("div", {
2231
2225
  style: {
2232
2226
  display: "flex",
@@ -2262,9 +2256,6 @@ var ExportPdfLayout = /*#__PURE__*/React.forwardRef(function (_ref1, ref) {
2262
2256
  }), /*#__PURE__*/jsx(Panel, {
2263
2257
  title: "Downsell",
2264
2258
  subtitle: "Acceptance & raised",
2265
- style: {
2266
- flex: 1
2267
- },
2268
2259
  children: /*#__PURE__*/jsxs("div", {
2269
2260
  style: {
2270
2261
  display: "flex",
@@ -2300,9 +2291,6 @@ var ExportPdfLayout = /*#__PURE__*/React.forwardRef(function (_ref1, ref) {
2300
2291
  }), /*#__PURE__*/jsxs(Panel, {
2301
2292
  title: "Referrals",
2302
2293
  subtitle: "Revenue trend \xB7 last 30 days",
2303
- style: {
2304
- flex: 1
2305
- },
2306
2294
  children: [/*#__PURE__*/jsx("div", {
2307
2295
  style: {
2308
2296
  fontSize: 17,
@@ -2317,7 +2305,7 @@ var ExportPdfLayout = /*#__PURE__*/React.forwardRef(function (_ref1, ref) {
2317
2305
  fontWeight: 600,
2318
2306
  marginBottom: 5
2319
2307
  },
2320
- children: [signed(refCard === null || refCard === void 0 ? void 0 : refCard.growthPercentage), " vs ", dateLabel]
2308
+ children: [signed((refCard === null || refCard === void 0 ? void 0 : refCard.growthPercentage) || 9.1), " vs last month"]
2321
2309
  }), /*#__PURE__*/jsx(Sparkline, {
2322
2310
  data: refData.length ? refData : [0, 1],
2323
2311
  color: C.emerald,