@streamoid/settings 0.2.0 → 0.2.2

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.
Files changed (3) hide show
  1. package/dist/index.js +100 -12
  2. package/dist/index.mjs +101 -14
  3. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -5340,16 +5340,66 @@ function UsageLogsTable({
5340
5340
  overflowY: "auto"
5341
5341
  },
5342
5342
  children: [
5343
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
5343
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(
5344
5344
  "div",
5345
5345
  {
5346
5346
  style: {
5347
5347
  position: "sticky",
5348
5348
  top: 0,
5349
5349
  zIndex: 1,
5350
- backgroundColor: "var(--alias-surface-base)"
5350
+ background: "var(--alias-fill-neutral-neutral, #1a1a1a)",
5351
+ padding: "var(--spacing-xl, 0.75rem) var(--spacing-3xl, 1rem)",
5352
+ display: "flex",
5353
+ flexDirection: "row",
5354
+ gap: "var(--spacing-6xl, 1.5rem)",
5355
+ alignItems: "center"
5351
5356
  },
5352
- children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_ui5.ScBillingLogsTableHeader, {})
5357
+ children: [
5358
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
5359
+ import_ui5.ScHeader,
5360
+ {
5361
+ text: "App",
5362
+ state: "none",
5363
+ style: { flex: 1, alignItems: "flex-start", gap: "0.25rem" }
5364
+ }
5365
+ ),
5366
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
5367
+ import_ui5.ScHeader,
5368
+ {
5369
+ text: "Activity",
5370
+ state: "none",
5371
+ style: { flex: 1, alignItems: "flex-start", gap: "0.25rem" }
5372
+ }
5373
+ ),
5374
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
5375
+ import_ui5.ScHeader,
5376
+ {
5377
+ text: "Used by",
5378
+ state: "none",
5379
+ style: { flexShrink: 0, width: "7.5rem" }
5380
+ }
5381
+ ),
5382
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
5383
+ import_ui5.ScHeader,
5384
+ {
5385
+ text: "Date",
5386
+ state: "none",
5387
+ style: { flexShrink: 0, width: "7.5rem" }
5388
+ }
5389
+ ),
5390
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
5391
+ import_ui5.ScHeader,
5392
+ {
5393
+ text: "Credits",
5394
+ state: "none",
5395
+ style: {
5396
+ flexShrink: 0,
5397
+ width: "5rem",
5398
+ justifyContent: "flex-end"
5399
+ }
5400
+ }
5401
+ )
5402
+ ]
5353
5403
  }
5354
5404
  ),
5355
5405
  logs.length === 0 && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
@@ -5376,16 +5426,54 @@ function UsageLogsTable({
5376
5426
  const userName = log.triggeredByUserId ? userMap[log.triggeredByUserId] || "Unknown" : "System";
5377
5427
  const app = log.service?.serviceGroupName || "\u2014";
5378
5428
  const activity = log.type === "return" ? "Returned Credits" : log.meta?.info || "Credit usage";
5379
- const runningBalance = log.amount;
5380
- return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
5381
- import_ui5.ScBillingLogsTableList,
5429
+ const isPositive = log.type === "return" || log.type === "add";
5430
+ const signedAmount = `${isPositive ? "+" : "-"}${log.amount}`;
5431
+ const amountColor = isPositive ? "var(--alias-text---icons-success, #1aa055)" : "var(--alias-text---icons-error, #d11a1a)";
5432
+ const rowCellRegular = {
5433
+ color: "var(--alias-text---icons-primary, #f5f5f5)",
5434
+ fontFamily: "var(--font-family-font-family-body)",
5435
+ fontSize: "var(--font-size-font-size-sm, 0.875rem)",
5436
+ fontWeight: 400,
5437
+ lineHeight: "var(--line-height-line-height-sm, 1.25rem)",
5438
+ textOverflow: "ellipsis",
5439
+ overflow: "hidden",
5440
+ whiteSpace: "nowrap"
5441
+ };
5442
+ return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(
5443
+ "div",
5382
5444
  {
5383
- app,
5384
- activity,
5385
- usedBy: userName,
5386
- date: formatDate(log.createdAt),
5387
- creditsUsed: log.amount.toString(),
5388
- balance: formatCredits(runningBalance)
5445
+ style: {
5446
+ borderBottom: "0.0625rem solid var(--alias-border-subtle, #242424)",
5447
+ padding: "var(--spacing-5xl, 1.25rem) var(--spacing-3xl, 1rem)",
5448
+ display: "flex",
5449
+ flexDirection: "row",
5450
+ gap: "var(--spacing-6xl, 1.5rem)",
5451
+ alignItems: "center"
5452
+ },
5453
+ children: [
5454
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { style: { ...rowCellRegular, flex: 1 }, children: app }),
5455
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { style: { ...rowCellRegular, flex: 1 }, children: activity }),
5456
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { style: { ...rowCellRegular, width: "7.5rem" }, children: userName }),
5457
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { style: { ...rowCellRegular, width: "7.5rem" }, children: formatDate(log.createdAt) }),
5458
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
5459
+ "div",
5460
+ {
5461
+ style: {
5462
+ width: "5rem",
5463
+ color: amountColor,
5464
+ fontFamily: "var(--font-family-font-family-body)",
5465
+ fontSize: "var(--font-size-font-size-md, 1rem)",
5466
+ fontWeight: 600,
5467
+ lineHeight: "var(--line-height-line-height-md, 1.5rem)",
5468
+ textAlign: "right",
5469
+ textOverflow: "ellipsis",
5470
+ overflow: "hidden",
5471
+ whiteSpace: "nowrap"
5472
+ },
5473
+ children: signedAmount
5474
+ }
5475
+ )
5476
+ ]
5389
5477
  },
5390
5478
  log._id
5391
5479
  );
package/dist/index.mjs CHANGED
@@ -3394,8 +3394,7 @@ import {
3394
3394
  ScTabComp as ScTabComp2,
3395
3395
  ScBillingHistoryHeader,
3396
3396
  ScBillingHistoryTableList,
3397
- ScBillingLogsTableHeader,
3398
- ScBillingLogsTableList,
3397
+ ScHeader,
3399
3398
  ScPlanCard
3400
3399
  } from "@streamoid/ui";
3401
3400
  import {
@@ -5355,16 +5354,66 @@ function UsageLogsTable({
5355
5354
  overflowY: "auto"
5356
5355
  },
5357
5356
  children: [
5358
- /* @__PURE__ */ jsx11(
5357
+ /* @__PURE__ */ jsxs9(
5359
5358
  "div",
5360
5359
  {
5361
5360
  style: {
5362
5361
  position: "sticky",
5363
5362
  top: 0,
5364
5363
  zIndex: 1,
5365
- backgroundColor: "var(--alias-surface-base)"
5364
+ background: "var(--alias-fill-neutral-neutral, #1a1a1a)",
5365
+ padding: "var(--spacing-xl, 0.75rem) var(--spacing-3xl, 1rem)",
5366
+ display: "flex",
5367
+ flexDirection: "row",
5368
+ gap: "var(--spacing-6xl, 1.5rem)",
5369
+ alignItems: "center"
5366
5370
  },
5367
- children: /* @__PURE__ */ jsx11(ScBillingLogsTableHeader, {})
5371
+ children: [
5372
+ /* @__PURE__ */ jsx11(
5373
+ ScHeader,
5374
+ {
5375
+ text: "App",
5376
+ state: "none",
5377
+ style: { flex: 1, alignItems: "flex-start", gap: "0.25rem" }
5378
+ }
5379
+ ),
5380
+ /* @__PURE__ */ jsx11(
5381
+ ScHeader,
5382
+ {
5383
+ text: "Activity",
5384
+ state: "none",
5385
+ style: { flex: 1, alignItems: "flex-start", gap: "0.25rem" }
5386
+ }
5387
+ ),
5388
+ /* @__PURE__ */ jsx11(
5389
+ ScHeader,
5390
+ {
5391
+ text: "Used by",
5392
+ state: "none",
5393
+ style: { flexShrink: 0, width: "7.5rem" }
5394
+ }
5395
+ ),
5396
+ /* @__PURE__ */ jsx11(
5397
+ ScHeader,
5398
+ {
5399
+ text: "Date",
5400
+ state: "none",
5401
+ style: { flexShrink: 0, width: "7.5rem" }
5402
+ }
5403
+ ),
5404
+ /* @__PURE__ */ jsx11(
5405
+ ScHeader,
5406
+ {
5407
+ text: "Credits",
5408
+ state: "none",
5409
+ style: {
5410
+ flexShrink: 0,
5411
+ width: "5rem",
5412
+ justifyContent: "flex-end"
5413
+ }
5414
+ }
5415
+ )
5416
+ ]
5368
5417
  }
5369
5418
  ),
5370
5419
  logs.length === 0 && /* @__PURE__ */ jsx11(
@@ -5391,16 +5440,54 @@ function UsageLogsTable({
5391
5440
  const userName = log.triggeredByUserId ? userMap[log.triggeredByUserId] || "Unknown" : "System";
5392
5441
  const app = log.service?.serviceGroupName || "\u2014";
5393
5442
  const activity = log.type === "return" ? "Returned Credits" : log.meta?.info || "Credit usage";
5394
- const runningBalance = log.amount;
5395
- return /* @__PURE__ */ jsx11(
5396
- ScBillingLogsTableList,
5443
+ const isPositive = log.type === "return" || log.type === "add";
5444
+ const signedAmount = `${isPositive ? "+" : "-"}${log.amount}`;
5445
+ const amountColor = isPositive ? "var(--alias-text---icons-success, #1aa055)" : "var(--alias-text---icons-error, #d11a1a)";
5446
+ const rowCellRegular = {
5447
+ color: "var(--alias-text---icons-primary, #f5f5f5)",
5448
+ fontFamily: "var(--font-family-font-family-body)",
5449
+ fontSize: "var(--font-size-font-size-sm, 0.875rem)",
5450
+ fontWeight: 400,
5451
+ lineHeight: "var(--line-height-line-height-sm, 1.25rem)",
5452
+ textOverflow: "ellipsis",
5453
+ overflow: "hidden",
5454
+ whiteSpace: "nowrap"
5455
+ };
5456
+ return /* @__PURE__ */ jsxs9(
5457
+ "div",
5397
5458
  {
5398
- app,
5399
- activity,
5400
- usedBy: userName,
5401
- date: formatDate(log.createdAt),
5402
- creditsUsed: log.amount.toString(),
5403
- balance: formatCredits(runningBalance)
5459
+ style: {
5460
+ borderBottom: "0.0625rem solid var(--alias-border-subtle, #242424)",
5461
+ padding: "var(--spacing-5xl, 1.25rem) var(--spacing-3xl, 1rem)",
5462
+ display: "flex",
5463
+ flexDirection: "row",
5464
+ gap: "var(--spacing-6xl, 1.5rem)",
5465
+ alignItems: "center"
5466
+ },
5467
+ children: [
5468
+ /* @__PURE__ */ jsx11("div", { style: { ...rowCellRegular, flex: 1 }, children: app }),
5469
+ /* @__PURE__ */ jsx11("div", { style: { ...rowCellRegular, flex: 1 }, children: activity }),
5470
+ /* @__PURE__ */ jsx11("div", { style: { ...rowCellRegular, width: "7.5rem" }, children: userName }),
5471
+ /* @__PURE__ */ jsx11("div", { style: { ...rowCellRegular, width: "7.5rem" }, children: formatDate(log.createdAt) }),
5472
+ /* @__PURE__ */ jsx11(
5473
+ "div",
5474
+ {
5475
+ style: {
5476
+ width: "5rem",
5477
+ color: amountColor,
5478
+ fontFamily: "var(--font-family-font-family-body)",
5479
+ fontSize: "var(--font-size-font-size-md, 1rem)",
5480
+ fontWeight: 600,
5481
+ lineHeight: "var(--line-height-line-height-md, 1.5rem)",
5482
+ textAlign: "right",
5483
+ textOverflow: "ellipsis",
5484
+ overflow: "hidden",
5485
+ whiteSpace: "nowrap"
5486
+ },
5487
+ children: signedAmount
5488
+ }
5489
+ )
5490
+ ]
5404
5491
  },
5405
5492
  log._id
5406
5493
  );
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@streamoid/settings",
3
- "version": "0.2.0",
3
+ "version": "0.2.2",
4
4
  "main": "./dist/index.js",
5
5
  "module": "./dist/index.mjs",
6
6
  "types": "./dist/index.d.ts",