@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 +53 -38
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +53 -38
- package/dist/index.es.js.map +1 -1
- package/package.json +1 -1
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:
|
|
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: "#
|
|
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:
|
|
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:
|
|
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: "#
|
|
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:
|
|
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 #
|
|
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
|
|
1179
|
+
border: "1px solid ".concat(THEME.panelBorder),
|
|
1169
1180
|
borderRadius: 8,
|
|
1170
|
-
background:
|
|
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:
|
|
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:
|
|
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:
|
|
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: "#
|
|
1239
|
-
borderBottom: "1px solid #
|
|
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 ?
|
|
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: "#
|
|
1257
|
-
borderBottom: ri < rows.length - 1 ? "1px solid #
|
|
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
|
|
1288
|
+
border: "1px solid ".concat(THEME.kpiBorder),
|
|
1276
1289
|
borderRadius: 8,
|
|
1277
1290
|
padding: "10px 12px 9px",
|
|
1278
|
-
background:
|
|
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: "#
|
|
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:
|
|
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:
|
|
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:
|
|
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 #
|
|
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:
|
|
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: "#
|
|
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:
|
|
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: "#
|
|
1435
|
+
color: "#334155"
|
|
1422
1436
|
},
|
|
1423
1437
|
children: dateLabel
|
|
1424
1438
|
}), /*#__PURE__*/jsxs("div", {
|
|
1425
1439
|
style: {
|
|
1426
1440
|
fontSize: 9.5,
|
|
1427
|
-
color:
|
|
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:
|
|
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: "#
|
|
1447
|
-
border: "1px solid #
|
|
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 #
|
|
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:
|
|
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:
|
|
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:
|
|
1834
|
+
background: THEME.pageBg,
|
|
1820
1835
|
display: "flex",
|
|
1821
1836
|
flexDirection: "column",
|
|
1822
1837
|
fontFamily: "'Helvetica Neue', Helvetica, Arial, sans-serif",
|