@ammarkhalidfarooq/dashboard-package 0.5.19 → 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.cjs.js CHANGED
@@ -904,6 +904,17 @@ var W = 794;
904
904
  var H = 1123;
905
905
  var MX = 32; // horizontal margin
906
906
  var CW = W - MX * 2; // 730 px usable width
907
+ var THEME = {
908
+ pageBg: "#F8FAFC",
909
+ panelBg: "#FFFFFF",
910
+ panelBorder: "#DDE3EA",
911
+ kpiBg: "#F6F8FF",
912
+ kpiBorder: "#D9E0FF",
913
+ tableHeadBg: "#EEF2FF",
914
+ tableAltBg: "#F8FAFF",
915
+ muted: "#94A3B8",
916
+ text: "#111827"
917
+ };
907
918
 
908
919
  // ─── Number helpers ───────────────────────────────────────────────────────────
909
920
  var d$ = function d$(v) {
@@ -997,7 +1008,7 @@ var LineChart = function LineChart(_ref2) {
997
1008
  return /*#__PURE__*/jsxRuntime.jsx("div", {
998
1009
  style: {
999
1010
  height: height,
1000
- background: "#F9FAFB",
1011
+ background: THEME.tableAltBg,
1001
1012
  borderRadius: 6
1002
1013
  }
1003
1014
  });
@@ -1040,14 +1051,14 @@ var LineChart = function LineChart(_ref2) {
1040
1051
  y1: y,
1041
1052
  x2: width - PR,
1042
1053
  y2: y,
1043
- stroke: "#F3F4F6",
1054
+ stroke: "#E5EAF1",
1044
1055
  strokeWidth: 1
1045
1056
  }), /*#__PURE__*/jsxRuntime.jsx("text", {
1046
1057
  x: PL - 4,
1047
1058
  y: y + 3.5,
1048
1059
  textAnchor: "end",
1049
1060
  fontSize: 9,
1050
- fill: "#9CA3AF",
1061
+ fill: THEME.muted,
1051
1062
  children: label
1052
1063
  })]
1053
1064
  }, i);
@@ -1073,7 +1084,7 @@ var LineChart = function LineChart(_ref2) {
1073
1084
  y: height - 5,
1074
1085
  textAnchor: "middle",
1075
1086
  fontSize: 9,
1076
- fill: "#9CA3AF",
1087
+ fill: THEME.muted,
1077
1088
  children: label
1078
1089
  }, i);
1079
1090
  })]
@@ -1107,7 +1118,7 @@ var Donut = function Donut(_ref3) {
1107
1118
  cy: cy,
1108
1119
  r: r,
1109
1120
  fill: "none",
1110
- stroke: "#E5E7EB",
1121
+ stroke: "#E6EBF5",
1111
1122
  strokeWidth: 12
1112
1123
  }), segments.map(function (seg, i) {
1113
1124
  var dash = seg.value / total * circ;
@@ -1138,7 +1149,7 @@ var Donut = function Donut(_ref3) {
1138
1149
  y: cy + 13,
1139
1150
  textAnchor: "middle",
1140
1151
  fontSize: 9,
1141
- fill: "#6B7280",
1152
+ fill: THEME.muted,
1142
1153
  children: centerLabel
1143
1154
  })]
1144
1155
  });
@@ -1152,7 +1163,7 @@ var Divider = function Divider(_ref4) {
1152
1163
  mb = _ref4$mb === void 0 ? 0 : _ref4$mb;
1153
1164
  return /*#__PURE__*/jsxRuntime.jsx("div", {
1154
1165
  style: {
1155
- borderTop: "1px solid #E5E7EB",
1166
+ borderTop: "1px solid #E5EAF1",
1156
1167
  marginTop: mt,
1157
1168
  marginBottom: mb
1158
1169
  }
@@ -1167,13 +1178,14 @@ var Panel = function Panel(_ref5) {
1167
1178
  style = _ref5$style === void 0 ? {} : _ref5$style;
1168
1179
  return /*#__PURE__*/jsxRuntime.jsxs("div", {
1169
1180
  style: _objectSpread2({
1170
- border: "1px solid #E5E7EB",
1181
+ border: "1px solid ".concat(THEME.panelBorder),
1171
1182
  borderRadius: 8,
1172
- background: "#fff",
1183
+ background: THEME.panelBg,
1173
1184
  padding: 12,
1174
1185
  display: "flex",
1175
1186
  flexDirection: "column",
1176
- boxSizing: "border-box"
1187
+ boxSizing: "border-box",
1188
+ boxShadow: "0 1px 0 rgba(15,23,42,0.03)"
1177
1189
  }, style),
1178
1190
  children: [(title || subtitle || action) && /*#__PURE__*/jsxRuntime.jsxs("div", {
1179
1191
  style: {
@@ -1188,14 +1200,14 @@ var Panel = function Panel(_ref5) {
1188
1200
  style: {
1189
1201
  fontSize: 12,
1190
1202
  fontWeight: 700,
1191
- color: "#111827",
1203
+ color: THEME.text,
1192
1204
  lineHeight: 1.2
1193
1205
  },
1194
1206
  children: title
1195
1207
  }), subtitle && /*#__PURE__*/jsxRuntime.jsx("div", {
1196
1208
  style: {
1197
1209
  fontSize: 9.5,
1198
- color: "#9CA3AF",
1210
+ color: THEME.muted,
1199
1211
  marginTop: 2
1200
1212
  },
1201
1213
  children: subtitle
@@ -1222,12 +1234,13 @@ var MiniTable = function MiniTable(_ref6) {
1222
1234
  width: "100%",
1223
1235
  borderCollapse: "collapse",
1224
1236
  fontSize: 9.5,
1225
- tableLayout: "fixed"
1237
+ tableLayout: "fixed",
1238
+ background: "#fff"
1226
1239
  },
1227
1240
  children: [/*#__PURE__*/jsxRuntime.jsx("thead", {
1228
1241
  children: /*#__PURE__*/jsxRuntime.jsx("tr", {
1229
1242
  style: {
1230
- background: "#F9FAFB"
1243
+ background: THEME.tableHeadBg
1231
1244
  },
1232
1245
  children: head.map(function (h, i) {
1233
1246
  return /*#__PURE__*/jsxRuntime.jsx("th", {
@@ -1237,8 +1250,8 @@ var MiniTable = function MiniTable(_ref6) {
1237
1250
  fontWeight: 700,
1238
1251
  fontSize: 8.5,
1239
1252
  letterSpacing: "0.3px",
1240
- color: "#6B7280",
1241
- borderBottom: "1px solid #E5E7EB"
1253
+ color: "#64748B",
1254
+ borderBottom: "1px solid #DDE3EA"
1242
1255
  },
1243
1256
  children: h
1244
1257
  }, i);
@@ -1248,15 +1261,15 @@ var MiniTable = function MiniTable(_ref6) {
1248
1261
  children: rows.map(function (row, ri) {
1249
1262
  return /*#__PURE__*/jsxRuntime.jsx("tr", {
1250
1263
  style: {
1251
- background: ri % 2 === 1 ? "#F9FAFB" : "#fff"
1264
+ background: ri % 2 === 1 ? THEME.tableAltBg : "#fff"
1252
1265
  },
1253
1266
  children: row.map(function (cell, ci) {
1254
1267
  return /*#__PURE__*/jsxRuntime.jsx("td", {
1255
1268
  style: {
1256
1269
  padding: "4px 6px",
1257
1270
  textAlign: ci === 0 ? "left" : "right",
1258
- color: "#374151",
1259
- borderBottom: ri < rows.length - 1 ? "1px solid #F3F4F6" : "none"
1271
+ color: "#334155",
1272
+ borderBottom: ri < rows.length - 1 ? "1px solid #EEF2F7" : "none"
1260
1273
  },
1261
1274
  children: cell
1262
1275
  }, ci);
@@ -1274,10 +1287,10 @@ var KpiCard = function KpiCard(_ref7) {
1274
1287
  var neg = "".concat(trend).trim().startsWith("-");
1275
1288
  return /*#__PURE__*/jsxRuntime.jsxs("div", {
1276
1289
  style: {
1277
- border: "1px solid #E5E7EB",
1290
+ border: "1px solid ".concat(THEME.kpiBorder),
1278
1291
  borderRadius: 8,
1279
1292
  padding: "10px 12px 9px",
1280
- background: "#fff",
1293
+ background: THEME.kpiBg,
1281
1294
  width: "100%",
1282
1295
  minWidth: 0,
1283
1296
  boxSizing: "border-box",
@@ -1290,7 +1303,7 @@ var KpiCard = function KpiCard(_ref7) {
1290
1303
  fontSize: 8,
1291
1304
  fontWeight: 700,
1292
1305
  letterSpacing: "0.7px",
1293
- color: "#6B7280",
1306
+ color: "#64748B",
1294
1307
  textTransform: "uppercase"
1295
1308
  },
1296
1309
  children: title
@@ -1298,7 +1311,7 @@ var KpiCard = function KpiCard(_ref7) {
1298
1311
  style: {
1299
1312
  fontSize: 17,
1300
1313
  fontWeight: 800,
1301
- color: "#111827",
1314
+ color: THEME.text,
1302
1315
  lineHeight: 1.1,
1303
1316
  marginTop: 2
1304
1317
  },
@@ -1313,7 +1326,7 @@ var KpiCard = function KpiCard(_ref7) {
1313
1326
  }), /*#__PURE__*/jsxRuntime.jsx("div", {
1314
1327
  style: {
1315
1328
  fontSize: 8.5,
1316
- color: "#9CA3AF",
1329
+ color: THEME.muted,
1317
1330
  lineHeight: 1.4
1318
1331
  },
1319
1332
  children: detail
@@ -1332,7 +1345,7 @@ var StatPair = function StatPair(_ref8) {
1332
1345
  children: [/*#__PURE__*/jsxRuntime.jsx("div", {
1333
1346
  style: {
1334
1347
  fontSize: 8.5,
1335
- color: "#9CA3AF",
1348
+ color: THEME.muted,
1336
1349
  marginBottom: 1
1337
1350
  },
1338
1351
  children: label
@@ -1368,7 +1381,8 @@ var PageHeader = function PageHeader(_ref9) {
1368
1381
  return /*#__PURE__*/jsxRuntime.jsxs("div", {
1369
1382
  style: {
1370
1383
  padding: "22px ".concat(MX, "px 12px"),
1371
- borderBottom: "1px solid #E5E7EB",
1384
+ borderBottom: "1px solid #DEE5EF",
1385
+ background: "#FFFFFF",
1372
1386
  flexShrink: 0
1373
1387
  },
1374
1388
  children: [/*#__PURE__*/jsxRuntime.jsx("div", {
@@ -1387,7 +1401,7 @@ var PageHeader = function PageHeader(_ref9) {
1387
1401
  style: {
1388
1402
  fontSize: 20,
1389
1403
  fontWeight: 800,
1390
- color: "#111827",
1404
+ color: THEME.text,
1391
1405
  letterSpacing: "-0.5px"
1392
1406
  },
1393
1407
  children: "Madinah"
@@ -1396,7 +1410,7 @@ var PageHeader = function PageHeader(_ref9) {
1396
1410
  fontSize: 8.5,
1397
1411
  fontWeight: 700,
1398
1412
  letterSpacing: "1.5px",
1399
- color: "#9CA3AF",
1413
+ color: "#94A3B8",
1400
1414
  textTransform: "uppercase"
1401
1415
  },
1402
1416
  children: "PERFORMANCE REPORT"
@@ -1407,7 +1421,7 @@ var PageHeader = function PageHeader(_ref9) {
1407
1421
  marginTop: 8,
1408
1422
  fontSize: 13.5,
1409
1423
  fontWeight: 700,
1410
- color: "#111827"
1424
+ color: THEME.text
1411
1425
  },
1412
1426
  children: "Dashboard overview \u2014 Overall"
1413
1427
  }), /*#__PURE__*/jsxRuntime.jsxs("div", {
@@ -1420,13 +1434,13 @@ var PageHeader = function PageHeader(_ref9) {
1420
1434
  children: [/*#__PURE__*/jsxRuntime.jsx("div", {
1421
1435
  style: {
1422
1436
  fontSize: 10.5,
1423
- color: "#374151"
1437
+ color: "#334155"
1424
1438
  },
1425
1439
  children: dateLabel
1426
1440
  }), /*#__PURE__*/jsxRuntime.jsxs("div", {
1427
1441
  style: {
1428
1442
  fontSize: 9.5,
1429
- color: "#9CA3AF",
1443
+ color: THEME.muted,
1430
1444
  marginTop: 1
1431
1445
  },
1432
1446
  children: ["30-day window \xB7 Generated ", generatedLabel]
@@ -1434,7 +1448,7 @@ var PageHeader = function PageHeader(_ref9) {
1434
1448
  }), /*#__PURE__*/jsxRuntime.jsxs("div", {
1435
1449
  style: {
1436
1450
  fontSize: 9,
1437
- color: "#9CA3AF",
1451
+ color: THEME.muted,
1438
1452
  textAlign: "right",
1439
1453
  alignSelf: "flex-end"
1440
1454
  },
@@ -1445,8 +1459,8 @@ var PageHeader = function PageHeader(_ref9) {
1445
1459
  marginTop: 7,
1446
1460
  display: "inline-flex",
1447
1461
  gap: 5,
1448
- background: "#F9FAFB",
1449
- border: "1px solid #E5E7EB",
1462
+ background: "#EEF2FF",
1463
+ border: "1px solid #D7DEFF",
1450
1464
  borderRadius: 4,
1451
1465
  padding: "3px 9px",
1452
1466
  fontSize: 8.5
@@ -1473,14 +1487,15 @@ var PageFooter = function PageFooter(_ref0) {
1473
1487
  return /*#__PURE__*/jsxRuntime.jsx("div", {
1474
1488
  style: {
1475
1489
  padding: "7px ".concat(MX, "px"),
1476
- borderTop: "1px solid #E5E7EB",
1490
+ borderTop: "1px solid #DEE5EF",
1491
+ background: "#FFFFFF",
1477
1492
  marginTop: "auto",
1478
1493
  flexShrink: 0
1479
1494
  },
1480
1495
  children: /*#__PURE__*/jsxRuntime.jsxs("span", {
1481
1496
  style: {
1482
1497
  fontSize: 8,
1483
- color: "#9CA3AF"
1498
+ color: THEME.muted
1484
1499
  },
1485
1500
  children: ["Confidential \xB7 Generated by Dashboard \xB7 ", generatedLabel, " \xA0\xA0 Page ", page, " of 2 \xB7 madinah.com"]
1486
1501
  })
@@ -1651,7 +1666,7 @@ var ExportPdfLayout = /*#__PURE__*/React.forwardRef(function (_ref1, ref) {
1651
1666
  style: {
1652
1667
  width: W,
1653
1668
  height: H,
1654
- background: "#fff",
1669
+ background: THEME.pageBg,
1655
1670
  display: "flex",
1656
1671
  flexDirection: "column",
1657
1672
  fontFamily: "'Helvetica Neue', Helvetica, Arial, sans-serif",
@@ -1818,7 +1833,7 @@ var ExportPdfLayout = /*#__PURE__*/React.forwardRef(function (_ref1, ref) {
1818
1833
  style: {
1819
1834
  width: W,
1820
1835
  height: H,
1821
- background: "#fff",
1836
+ background: THEME.pageBg,
1822
1837
  display: "flex",
1823
1838
  flexDirection: "column",
1824
1839
  fontFamily: "'Helvetica Neue', Helvetica, Arial, sans-serif",