@stoker-platform/web-app 0.5.179 → 0.5.180

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/CHANGELOG.md CHANGED
@@ -1,5 +1,14 @@
1
1
  # @stoker-platform/web-app
2
2
 
3
+ ## 0.5.180
4
+
5
+ ### Patch Changes
6
+
7
+ - feat: add compact option to list metrics
8
+ - @stoker-platform/node-client@0.5.73
9
+ - @stoker-platform/utils@0.5.64
10
+ - @stoker-platform/web-client@0.5.75
11
+
3
12
  ## 0.5.179
4
13
 
5
14
  ### Patch Changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stoker-platform/web-app",
3
- "version": "0.5.179",
3
+ "version": "0.5.180",
4
4
  "type": "module",
5
5
  "license": "SEE LICENSE IN LICENSE.md",
6
6
  "scripts": {
@@ -51,9 +51,9 @@
51
51
  "@radix-ui/react-tooltip": "^1.2.8",
52
52
  "@react-google-maps/api": "^2.20.8",
53
53
  "@sentry/react": "^10.56.0",
54
- "@stoker-platform/node-client": "0.5.72",
55
- "@stoker-platform/utils": "0.5.63",
56
- "@stoker-platform/web-client": "0.5.74",
54
+ "@stoker-platform/node-client": "0.5.73",
55
+ "@stoker-platform/utils": "0.5.64",
56
+ "@stoker-platform/web-client": "0.5.75",
57
57
  "@tanstack/react-table": "^8.21.3",
58
58
  "@types/react": "18.3.13",
59
59
  "@types/react-dom": "18.3.1",
package/src/List.tsx CHANGED
@@ -1512,6 +1512,21 @@ export function List({
1512
1512
  metric.type === "custom"
1513
1513
  ) {
1514
1514
  const metricTitle = metric.title || `Total ${collectionTitle}`
1515
+ if (metric.compact) {
1516
+ return (
1517
+ <div
1518
+ key={`metric-${index}`}
1519
+ className={"grid gap-3 place-content-center"}
1520
+ >
1521
+ <Card className="p-4 flex flex-col min-w-[175px] place-content-center items-center bg-blue-500 dark:bg-blue-500/50 text-primary-foreground dark:text-primary">
1522
+ <div className="font-semibold line-clamp-1 text-center">
1523
+ {/* eslint-disable-next-line security/detect-object-injection */}
1524
+ {metricTitle}: {metricsValues[index] as string}
1525
+ </div>
1526
+ </Card>
1527
+ </div>
1528
+ )
1529
+ }
1515
1530
  return (
1516
1531
  <div
1517
1532
  key={`metric-${index}`}