@burdenoff/microfe-billing 2026.614.1 → 2026.623.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 (135) hide show
  1. package/dist/billing/BillingAdminRoutes.js +7 -6
  2. package/dist/billing/BillingAdminRoutes.js.map +1 -1
  3. package/dist/billing/BillingRoot.js +1 -1
  4. package/dist/billing/BillingRoot.js.map +1 -1
  5. package/dist/billing/modules/addons/components/FloatingCartDrawer.js +22 -22
  6. package/dist/billing/modules/addons/components/FloatingCartDrawer.js.map +1 -1
  7. package/dist/billing/modules/addons/pages/AddonCreatePage.js +31 -31
  8. package/dist/billing/modules/addons/pages/AddonCreatePage.js.map +1 -1
  9. package/dist/billing/modules/addons/pages/AddonDetailPage.js +39 -39
  10. package/dist/billing/modules/addons/pages/AddonDetailPage.js.map +1 -1
  11. package/dist/billing/modules/addons/pages/AddonEditPage.js +29 -29
  12. package/dist/billing/modules/addons/pages/AddonEditPage.js.map +1 -1
  13. package/dist/billing/modules/addons/pages/AddonsListPage.js +91 -91
  14. package/dist/billing/modules/addons/pages/AddonsListPage.js.map +1 -1
  15. package/dist/billing/modules/analytics/pages/AnalyticsPage.js +40 -40
  16. package/dist/billing/modules/analytics/pages/AnalyticsPage.js.map +1 -1
  17. package/dist/billing/modules/billing/pages/InvoiceDetailPage.js +115 -115
  18. package/dist/billing/modules/billing/pages/InvoiceDetailPage.js.map +1 -1
  19. package/dist/billing/modules/billing/pages/InvoicesListPage.js +75 -72
  20. package/dist/billing/modules/billing/pages/InvoicesListPage.js.map +1 -1
  21. package/dist/billing/modules/billing/pages/RefundsPage.js +126 -126
  22. package/dist/billing/modules/billing/pages/RefundsPage.js.map +1 -1
  23. package/dist/billing/modules/billing/pages/UserRefundsPage.js +45 -45
  24. package/dist/billing/modules/billing/pages/UserRefundsPage.js.map +1 -1
  25. package/dist/billing/modules/checkout/components/BillingAccountSelector.js +25 -25
  26. package/dist/billing/modules/checkout/components/BillingAccountSelector.js.map +1 -1
  27. package/dist/billing/modules/checkout/components/CompleteBillingAccountModal.js +31 -35
  28. package/dist/billing/modules/checkout/components/CompleteBillingAccountModal.js.map +1 -1
  29. package/dist/billing/modules/checkout/components/CreditsAmountInput.js +9 -9
  30. package/dist/billing/modules/checkout/components/CreditsAmountInput.js.map +1 -1
  31. package/dist/billing/modules/checkout/components/OrderSummary.js +31 -31
  32. package/dist/billing/modules/checkout/components/OrderSummary.js.map +1 -1
  33. package/dist/billing/modules/checkout/components/PromoCodeInput.js +8 -8
  34. package/dist/billing/modules/checkout/components/PromoCodeInput.js.map +1 -1
  35. package/dist/billing/modules/checkout/components/RazorpayPaymentButton.js +5 -5
  36. package/dist/billing/modules/checkout/components/RazorpayPaymentButton.js.map +1 -1
  37. package/dist/billing/modules/checkout/components/SimpleAutoPayToggle.js +9 -9
  38. package/dist/billing/modules/checkout/components/SimpleAutoPayToggle.js.map +1 -1
  39. package/dist/billing/modules/checkout/components/StripePaymentForm.js +21 -21
  40. package/dist/billing/modules/checkout/components/StripePaymentForm.js.map +1 -1
  41. package/dist/billing/modules/checkout/components/SubscriptionSelector.js +11 -11
  42. package/dist/billing/modules/checkout/components/SubscriptionSelector.js.map +1 -1
  43. package/dist/billing/modules/checkout/components/UnifiedPaymentMethodSelector.js +31 -31
  44. package/dist/billing/modules/checkout/components/UnifiedPaymentMethodSelector.js.map +1 -1
  45. package/dist/billing/modules/checkout/components/WorkspaceQuotaAssignmentModal.js +23 -23
  46. package/dist/billing/modules/checkout/components/WorkspaceQuotaAssignmentModal.js.map +1 -1
  47. package/dist/billing/modules/checkout/pages/CheckoutPage.js +91 -91
  48. package/dist/billing/modules/checkout/pages/CheckoutPage.js.map +1 -1
  49. package/dist/billing/modules/coupons/pages/CouponDetailPage.js +62 -62
  50. package/dist/billing/modules/coupons/pages/CouponDetailPage.js.map +1 -1
  51. package/dist/billing/modules/coupons/pages/CouponsListPage.js +72 -60
  52. package/dist/billing/modules/coupons/pages/CouponsListPage.js.map +1 -1
  53. package/dist/billing/modules/coupons/pages/CreateCouponPage.js +66 -66
  54. package/dist/billing/modules/coupons/pages/CreateCouponPage.js.map +1 -1
  55. package/dist/billing/modules/coupons/pages/EditCouponPage.js +46 -46
  56. package/dist/billing/modules/coupons/pages/EditCouponPage.js.map +1 -1
  57. package/dist/billing/modules/credits/pages/AdminCreditsPage.js +19 -19
  58. package/dist/billing/modules/credits/pages/AdminCreditsPage.js.map +1 -1
  59. package/dist/billing/modules/credits/pages/CreditTransactionsPage.js +37 -37
  60. package/dist/billing/modules/credits/pages/CreditTransactionsPage.js.map +1 -1
  61. package/dist/billing/modules/credits/pages/CreditWithdrawalPage.js +90 -90
  62. package/dist/billing/modules/credits/pages/CreditWithdrawalPage.js.map +1 -1
  63. package/dist/billing/modules/credits/pages/CreditsPage.js +41 -41
  64. package/dist/billing/modules/credits/pages/CreditsPage.js.map +1 -1
  65. package/dist/billing/modules/dashboard/components/ActiveSubscriptionCard.js +31 -31
  66. package/dist/billing/modules/dashboard/components/ActiveSubscriptionCard.js.map +1 -1
  67. package/dist/billing/modules/dashboard/components/AddPaymentMethodModal.js +35 -35
  68. package/dist/billing/modules/dashboard/components/AddPaymentMethodModal.js.map +1 -1
  69. package/dist/billing/modules/dashboard/components/BillingAccountCard.js +24 -24
  70. package/dist/billing/modules/dashboard/components/BillingAccountCard.js.map +1 -1
  71. package/dist/billing/modules/dashboard/components/CreateBillingAccountModal.js +99 -99
  72. package/dist/billing/modules/dashboard/components/CreateBillingAccountModal.js.map +1 -1
  73. package/dist/billing/modules/dashboard/components/PaymentMethodsSection.js +23 -23
  74. package/dist/billing/modules/dashboard/components/PaymentMethodsSection.js.map +1 -1
  75. package/dist/billing/modules/dashboard/components/RecommendedAddonsSection.js +22 -22
  76. package/dist/billing/modules/dashboard/components/RecommendedAddonsSection.js.map +1 -1
  77. package/dist/billing/modules/dashboard/pages/OverviewPage.js +58 -58
  78. package/dist/billing/modules/dashboard/pages/OverviewPage.js.map +1 -1
  79. package/dist/billing/modules/discounts/pages/DiscountsListPage.js +126 -126
  80. package/dist/billing/modules/discounts/pages/DiscountsListPage.js.map +1 -1
  81. package/dist/billing/modules/earnings/pages/PayoutAdminPage.js +83 -79
  82. package/dist/billing/modules/earnings/pages/PayoutAdminPage.js.map +1 -1
  83. package/dist/billing/modules/plans/pages/PlanAssignFreePage.js +16 -16
  84. package/dist/billing/modules/plans/pages/PlanAssignFreePage.js.map +1 -1
  85. package/dist/billing/modules/plans/pages/PlanBrowseDetailPage.js +40 -40
  86. package/dist/billing/modules/plans/pages/PlanBrowseDetailPage.js.map +1 -1
  87. package/dist/billing/modules/plans/pages/PlanCreatePage.js +35 -35
  88. package/dist/billing/modules/plans/pages/PlanCreatePage.js.map +1 -1
  89. package/dist/billing/modules/plans/pages/PlanDetailPage.js +57 -57
  90. package/dist/billing/modules/plans/pages/PlanDetailPage.js.map +1 -1
  91. package/dist/billing/modules/plans/pages/PlanEditPage.js +35 -35
  92. package/dist/billing/modules/plans/pages/PlanEditPage.js.map +1 -1
  93. package/dist/billing/modules/plans/pages/PlansBrowsePage.js +57 -57
  94. package/dist/billing/modules/plans/pages/PlansBrowsePage.js.map +1 -1
  95. package/dist/billing/modules/plans/pages/PlansListPage.js +52 -52
  96. package/dist/billing/modules/plans/pages/PlansListPage.js.map +1 -1
  97. package/dist/billing/modules/promotions/pages/CreatePromotionPage.js +40 -39
  98. package/dist/billing/modules/promotions/pages/CreatePromotionPage.js.map +1 -1
  99. package/dist/billing/modules/promotions/pages/PromotionsListPage.js +22 -19
  100. package/dist/billing/modules/promotions/pages/PromotionsListPage.js.map +1 -1
  101. package/dist/billing/modules/quota/pages/QuotaTemplateCreatePage.js +34 -34
  102. package/dist/billing/modules/quota/pages/QuotaTemplateCreatePage.js.map +1 -1
  103. package/dist/billing/modules/quota/pages/QuotaTemplateDetailPage.js +47 -47
  104. package/dist/billing/modules/quota/pages/QuotaTemplateDetailPage.js.map +1 -1
  105. package/dist/billing/modules/quota/pages/QuotaTemplateEditPage.js +39 -39
  106. package/dist/billing/modules/quota/pages/QuotaTemplateEditPage.js.map +1 -1
  107. package/dist/billing/modules/quota/pages/QuotaTemplatesListPage.js +52 -52
  108. package/dist/billing/modules/quota/pages/QuotaTemplatesListPage.js.map +1 -1
  109. package/dist/billing/modules/subscriptions/components/ManageSeatsModal.js +23 -23
  110. package/dist/billing/modules/subscriptions/components/ManageSeatsModal.js.map +1 -1
  111. package/dist/billing/modules/subscriptions/pages/SubscriptionDetailPage.js +259 -246
  112. package/dist/billing/modules/subscriptions/pages/SubscriptionDetailPage.js.map +1 -1
  113. package/dist/billing/modules/subscriptions/pages/SubscriptionsListPage.js +88 -85
  114. package/dist/billing/modules/subscriptions/pages/SubscriptionsListPage.js.map +1 -1
  115. package/dist/billing/modules/subscriptions/pages/UpgradeSubscriptionPage.js +51 -51
  116. package/dist/billing/modules/subscriptions/pages/UpgradeSubscriptionPage.js.map +1 -1
  117. package/dist/billing/modules/usage/pages/UsagePage.js +206 -196
  118. package/dist/billing/modules/usage/pages/UsagePage.js.map +1 -1
  119. package/dist/billing/shared/components/ServerError.js +4 -4
  120. package/dist/billing/shared/components/ServerError.js.map +1 -1
  121. package/dist/billing/shared/components/StatCard.js +11 -33
  122. package/dist/billing/shared/components/StatCard.js.map +1 -1
  123. package/dist/billing/shared/ui/Card.js +15 -0
  124. package/dist/billing/shared/ui/Card.js.map +1 -0
  125. package/dist/billing/shared/ui/MetricCard.js +44 -0
  126. package/dist/billing/shared/ui/MetricCard.js.map +1 -0
  127. package/dist/billing/shared/ui/ProgressBar.js +30 -0
  128. package/dist/billing/shared/ui/ProgressBar.js.map +1 -0
  129. package/dist/billing/shared/ui/SectionHeader.js +2 -0
  130. package/dist/billing/shared/ui/StatusPill.js +28 -0
  131. package/dist/billing/shared/ui/StatusPill.js.map +1 -0
  132. package/dist/billing/shared/ui/index.js +5 -0
  133. package/dist/billing/shared/utils/tokens.js +13 -30
  134. package/dist/billing/shared/utils/tokens.js.map +1 -1
  135. package/package.json +1 -1
@@ -1,68 +1,72 @@
1
1
  import { useBilling as e } from "../../../providers/BillingProvider.js";
2
- import { useBillingEventEmitter as t } from "../../../hooks/useBillingEventEmitter.js";
3
- import { useBillingAccountSelection as n } from "../../../hooks/useBillingAccountSelection.js";
4
- import { PricingModel as r } from "../../../shared/types/graphql.js";
5
- import { formatBytes as i, formatCurrency as a, formatDate as o, formatPercentage as s, formatPlanDuration as c, formatSubscriptionStatus as l } from "../../../shared/utils/format.js";
6
- import { getQuotaProgressColor as u, getStatusBadgeClasses as d, getSubscriptionStatusColor as f } from "../../../shared/utils/status.js";
7
- import { useBillingPermissions as ee } from "../../../hooks/useBillingPermissions.js";
8
- import { useGetDefaultBillingAccountDashboardQuery as p } from "../../../../generated/global-operations.js";
9
- import { useBillingNavigate as te } from "../../../hooks/useBillingNavigate.js";
2
+ import { Card as t } from "../../../shared/ui/Card.js";
3
+ import { StatusPill as n } from "../../../shared/ui/StatusPill.js";
4
+ import { ProgressBar as r } from "../../../shared/ui/ProgressBar.js";
5
+ import "../../../shared/ui/index.js";
6
+ import { useBillingEventEmitter as i } from "../../../hooks/useBillingEventEmitter.js";
7
+ import { useBillingAccountSelection as a } from "../../../hooks/useBillingAccountSelection.js";
8
+ import { PricingModel as o } from "../../../shared/types/graphql.js";
9
+ import { formatBytes as s, formatCurrency as c, formatDate as l, formatPercentage as u, formatPlanDuration as d, formatSubscriptionStatus as f } from "../../../shared/utils/format.js";
10
+ import { getQuotaProgressColor as p, getSubscriptionStatusColor as ee } from "../../../shared/utils/status.js";
11
+ import { useBillingPermissions as te } from "../../../hooks/useBillingPermissions.js";
12
+ import { useGetDefaultBillingAccountDashboardQuery as ne } from "../../../../generated/global-operations.js";
13
+ import { useBillingNavigate as re } from "../../../hooks/useBillingNavigate.js";
10
14
  import { withBillingAccountId as m } from "../../../shared/utils/navigation.js";
11
- import { useWorkspaceQuotaOverview as ne } from "../../usage/hooks/useUsage.js";
12
- import { WorkspaceQuotaAssignmentModal as re } from "../../checkout/components/WorkspaceQuotaAssignmentModal.js";
13
- import { useSubscription as h, useSubscriptionMutations as g } from "../hooks/useSubscriptions.js";
15
+ import { useWorkspaceQuotaOverview as h } from "../../usage/hooks/useUsage.js";
16
+ import { WorkspaceQuotaAssignmentModal as g } from "../../checkout/components/WorkspaceQuotaAssignmentModal.js";
17
+ import { useSubscription as ie, useSubscriptionMutations as ae } from "../hooks/useSubscriptions.js";
14
18
  import "../hooks/index.js";
15
- import { ManageSeatsModal as ie } from "../components/ManageSeatsModal.js";
19
+ import { ManageSeatsModal as oe } from "../components/ManageSeatsModal.js";
16
20
  import { useState as _ } from "react";
17
- import { useParams as ae } from "react-router-dom";
21
+ import { useParams as se } from "react-router-dom";
18
22
  import { jsx as v, jsxs as y } from "react/jsx-runtime";
19
- import { useI18n as b } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
23
+ import { useI18n as ce } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
20
24
  //#region src/billing/modules/subscriptions/pages/SubscriptionDetailPage.tsx
21
- function x(e, t) {
25
+ function b(e, t) {
22
26
  if (t?.displayName && typeof t.displayName == "string") return t.displayName;
23
27
  if (t?.label && typeof t.label == "string") return t.label;
24
28
  let n = e.split(".");
25
29
  return (n.length > 1 ? n.slice(1) : n).map((e) => e.replace(/_/g, " ").replace(/\b\w/g, (e) => e.toUpperCase())).join(" ");
26
30
  }
27
- function S(e) {
31
+ function x(e) {
28
32
  return e === "DAILY" ? "Resets daily" : e === "MONTHLY" ? "Resets monthly" : "";
29
33
  }
30
- var C = () => {
31
- let { t: i } = b(), s = (e, t) => {
32
- let n = i(e);
34
+ var S = () => {
35
+ let { t: s } = ce(), u = (e, t) => {
36
+ let n = s(e);
33
37
  return n === e ? t : n;
34
- }, { subscriptionId: u } = ae(), x = te(), { emit: S } = t(), { orgId: C } = e(), T = ee(), { selectedAccountId: ue } = n({
35
- orgId: C,
38
+ }, { subscriptionId: p } = se(), b = re(), { emit: x } = i(), { orgId: S } = e(), w = te(), { selectedAccountId: pe } = a({
39
+ orgId: S,
36
40
  syncFromUrl: !0,
37
41
  urlParamName: "billingAccountId"
38
- }), { data: de } = p({ fetchPolicy: "cache-first" }), E = ue ?? de?.getDefaultBillingAccount?.id ?? void 0, { subscription: D, isLoading: fe, error: O, refetch: k } = h(u, E), { cancelSubscription: pe, isCanceling: A, updateSubscriptionSeats: me, isUpdatingSeats: he } = g(), { workspaceId: j } = e(), { overview: M, refetch: N } = ne(j ?? void 0), [P, F] = _(!1), [I, L] = _(!1), [ge, R] = _(!1), [z, B] = _(""), [V, H] = _(null), _e = async () => {
39
- if (D) {
42
+ }), { data: me } = ne({ fetchPolicy: "cache-first" }), T = pe ?? me?.getDefaultBillingAccount?.id ?? void 0, { subscription: E, isLoading: he, error: D, refetch: O } = ie(p, T), { cancelSubscription: ge, isCanceling: k, updateSubscriptionSeats: A, isUpdatingSeats: j } = ae(), { workspaceId: M } = e(), { overview: N, refetch: P } = h(M ?? void 0), [F, I] = _(!1), [_e, L] = _(!1), [ve, R] = _(!1), [z, B] = _(""), [V, H] = _(null), ye = async () => {
43
+ if (E) {
40
44
  H(null);
41
45
  try {
42
- await pe({
43
- billingAccountId: E ?? D.billingAccountId,
44
- subscriptionId: D.id,
46
+ await ge({
47
+ billingAccountId: T ?? E.billingAccountId,
48
+ subscriptionId: E.id,
45
49
  reason: z || "User requested cancellation"
46
- }), S("billing.subscription.cancelled", {
50
+ }), x("billing.subscription.cancelled", {
47
51
  route: "/billing/subscriptions",
48
- entityId: D.id,
52
+ entityId: E.id,
49
53
  source: "subscription-detail",
50
54
  reason: z || "User requested cancellation"
51
- }), F(!1), B(""), await k();
55
+ }), I(!1), B(""), await O();
52
56
  } catch (e) {
53
57
  H(e instanceof Error ? e.message : "Failed to cancel subscription");
54
58
  }
55
59
  }
56
60
  };
57
- if (!T.canViewSubscriptions) return /* @__PURE__ */ v("div", {
61
+ if (!w.canViewSubscriptions) return /* @__PURE__ */ v("div", {
58
62
  className: "flex items-center justify-center h-full min-h-[400px]",
59
63
  children: /* @__PURE__ */ y("div", {
60
64
  className: "text-center space-y-2",
61
65
  children: [
62
66
  /* @__PURE__ */ v("div", {
63
- className: "size-12 mx-auto rounded-full bg-muted flex items-center justify-center",
67
+ className: "size-12 mx-auto rounded-full bg-[var(--color-accent-soft)] flex items-center justify-center",
64
68
  children: /* @__PURE__ */ v("svg", {
65
- className: "size-6 text-muted-foreground",
69
+ className: "size-6 text-text-secondary",
66
70
  fill: "none",
67
71
  viewBox: "0 0 24 24",
68
72
  stroke: "currentColor",
@@ -75,41 +79,41 @@ var C = () => {
75
79
  })
76
80
  }),
77
81
  /* @__PURE__ */ v("h2", {
78
- className: "text-lg font-semibold text-foreground",
82
+ className: "text-lg font-semibold text-text-primary",
79
83
  children: "Access Denied"
80
84
  }),
81
85
  /* @__PURE__ */ v("p", {
82
- className: "text-sm text-muted-foreground max-w-sm",
86
+ className: "text-sm text-text-secondary max-w-sm",
83
87
  children: "You don't have permission to view this subscription."
84
88
  })
85
89
  ]
86
90
  })
87
91
  });
88
- if (fe) return /* @__PURE__ */ y("div", {
89
- className: "space-y-6 p-6",
92
+ if (he) return /* @__PURE__ */ y("div", {
93
+ className: "space-y-6 px-6 lg:px-8 py-6",
90
94
  children: [/* @__PURE__ */ y("div", {
91
95
  className: "flex items-center gap-4",
92
- children: [/* @__PURE__ */ v("div", { className: "size-10 bg-muted animate-pulse rounded" }), /* @__PURE__ */ v("div", { className: "h-8 w-48 bg-muted animate-pulse rounded" })]
96
+ children: [/* @__PURE__ */ v("div", { className: "size-10 bg-bg-sunken animate-pulse rounded-button" }), /* @__PURE__ */ v("div", { className: "h-8 w-48 bg-bg-sunken animate-pulse rounded" })]
93
97
  }), /* @__PURE__ */ v("div", {
94
98
  className: "grid grid-cols-1 lg:grid-cols-3 gap-6",
95
99
  children: /* @__PURE__ */ v("div", {
96
100
  className: "lg:col-span-2 space-y-6",
97
101
  children: /* @__PURE__ */ y("div", {
98
- className: "border border-border rounded-lg p-6 space-y-4",
99
- children: [/* @__PURE__ */ v("div", { className: "h-6 w-32 bg-muted animate-pulse rounded" }), /* @__PURE__ */ v("div", { className: "h-4 w-full bg-muted animate-pulse rounded" })]
102
+ className: "border border-border-subtle rounded-card bg-bg-surface shadow-elevation-1 p-5 space-y-4",
103
+ children: [/* @__PURE__ */ v("div", { className: "h-6 w-32 bg-bg-sunken animate-pulse rounded" }), /* @__PURE__ */ v("div", { className: "h-4 w-full bg-bg-sunken animate-pulse rounded" })]
100
104
  })
101
105
  })
102
106
  })]
103
107
  });
104
- if (O || !D) return /* @__PURE__ */ v("div", {
108
+ if (D || !E) return /* @__PURE__ */ v("div", {
105
109
  className: "flex items-center justify-center h-full min-h-[400px]",
106
110
  children: /* @__PURE__ */ y("div", {
107
111
  className: "text-center space-y-4",
108
112
  children: [
109
113
  /* @__PURE__ */ v("div", {
110
- className: "size-12 mx-auto rounded-full bg-destructive/10 flex items-center justify-center",
114
+ className: "size-12 mx-auto rounded-full bg-status-error-bg-subtle flex items-center justify-center",
111
115
  children: /* @__PURE__ */ v("svg", {
112
- className: "size-6 text-destructive",
116
+ className: "size-6 text-status-error-text",
113
117
  fill: "none",
114
118
  viewBox: "0 0 24 24",
115
119
  stroke: "currentColor",
@@ -122,25 +126,25 @@ var C = () => {
122
126
  })
123
127
  }),
124
128
  /* @__PURE__ */ v("h2", {
125
- className: "text-lg font-semibold text-foreground",
126
- children: s("billing.subscriptions.notFound", "Subscription not found")
129
+ className: "text-lg font-semibold text-text-primary",
130
+ children: u("billing.subscriptions.notFound", "Subscription not found")
127
131
  }),
128
132
  /* @__PURE__ */ v("p", {
129
- className: "text-sm text-muted-foreground",
130
- children: O?.message || "The subscription you are looking for does not exist."
133
+ className: "text-sm text-text-secondary",
134
+ children: D?.message || "The subscription you are looking for does not exist."
131
135
  }),
132
136
  /* @__PURE__ */ v("button", {
133
137
  type: "button",
134
- onClick: () => x(m("/subscriptions", E)),
135
- className: "px-4 py-2 text-sm font-medium bg-primary text-primary-foreground rounded-md hover:bg-primary/90 transition-colors",
138
+ onClick: () => b(m("/subscriptions", T)),
139
+ className: "px-4 py-2 text-sm font-medium bg-action-primary-bg text-action-primary-text rounded-button hover:bg-action-primary-bgHover transition-colors duration-200",
136
140
  children: "Back to Subscriptions"
137
141
  })
138
142
  ]
139
143
  })
140
144
  });
141
- let U = D.plan, W = D.quotas || [], G = D.addonSubscriptions || [], K = D.transactions || [], q = D.history || [], ve = f(D.status), J = D.status === "active", Y = M.filter((e) => e.assignment.subscriptionId === D.id && e.assignment.isActive), X = !!D.assignedWorkspaceId || Y.length > 0, Z = new Date(D.endDate), ye = new Date(D.startDate), be = /* @__PURE__ */ new Date(), Q = Math.ceil((Z.getTime() - ye.getTime()) / (1e3 * 60 * 60 * 24)), $ = Math.max(0, Math.ceil((Z.getTime() - be.getTime()) / (1e3 * 60 * 60 * 24))), xe = Math.round((Q - $) / Q * 100);
145
+ let U = E.plan, W = E.quotas || [], G = E.addonSubscriptions || [], K = E.transactions || [], q = E.history || [], be = ee(E.status), J = E.status === "active", Y = N.filter((e) => e.assignment.subscriptionId === E.id && e.assignment.isActive), X = !!E.assignedWorkspaceId || Y.length > 0, Z = new Date(E.endDate), xe = new Date(E.startDate), Se = /* @__PURE__ */ new Date(), Q = Math.ceil((Z.getTime() - xe.getTime()) / (1e3 * 60 * 60 * 24)), $ = Math.max(0, Math.ceil((Z.getTime() - Se.getTime()) / (1e3 * 60 * 60 * 24))), Ce = Math.round((Q - $) / Q * 100);
142
146
  return /* @__PURE__ */ y("div", {
143
- className: "space-y-6 p-6",
147
+ className: "space-y-6 px-6 lg:px-8 py-6",
144
148
  children: [
145
149
  /* @__PURE__ */ y("div", {
146
150
  className: "flex flex-col gap-4 sm:flex-row sm:items-start sm:justify-between",
@@ -148,8 +152,9 @@ var C = () => {
148
152
  className: "flex items-start gap-4",
149
153
  children: [/* @__PURE__ */ v("button", {
150
154
  type: "button",
151
- onClick: () => x(m("/subscriptions", E)),
152
- className: "p-2 -ml-2 text-muted-foreground hover:text-foreground hover:bg-muted rounded-md transition-colors",
155
+ "aria-label": "Back to subscriptions",
156
+ onClick: () => b(m("/subscriptions", T)),
157
+ className: "p-2 -ml-2 text-text-secondary hover:text-text-primary hover:bg-bg-sunken rounded-button transition-colors duration-200",
153
158
  children: /* @__PURE__ */ v("svg", {
154
159
  className: "size-5",
155
160
  fill: "none",
@@ -163,42 +168,43 @@ var C = () => {
163
168
  })
164
169
  })
165
170
  }), /* @__PURE__ */ y("div", { children: [/* @__PURE__ */ y("div", {
166
- className: "flex items-center gap-3",
171
+ className: "flex items-center gap-3 flex-wrap",
167
172
  children: [/* @__PURE__ */ v("h1", {
168
- className: "text-2xl font-bold text-foreground",
173
+ className: "text-2xl md:text-3xl font-semibold tracking-tight text-text-primary",
169
174
  children: U?.name || "Subscription"
170
- }), /* @__PURE__ */ v("span", {
171
- className: `px-2 py-1 text-xs font-medium rounded ${d(ve)}`,
172
- children: l(D.status)
175
+ }), /* @__PURE__ */ v(n, {
176
+ status: be,
177
+ dot: !0,
178
+ children: f(E.status)
173
179
  })]
174
180
  }), /* @__PURE__ */ v("p", {
175
- className: "text-sm text-muted-foreground mt-1",
176
- children: U?.pricingModel === r.PER_SEAT && U.pricePerSeat ? `${a(U.pricePerSeat, U.currency)} / seat / ${c(U.duration)} · ${D.seatCount ?? U.minSeats ?? 1} seats = ${a(U.pricePerSeat * (D.seatCount ?? U.minSeats ?? 1), U.currency)} / ${c(U.duration)}` : U ? `${a(U.price, U.currency)} / ${c(U.duration)}` : "Unknown plan"
181
+ className: "text-sm text-text-secondary mt-1",
182
+ children: U?.pricingModel === o.PER_SEAT && U.pricePerSeat ? `${c(U.pricePerSeat, U.currency)} / seat / ${d(U.duration)} · ${E.seatCount ?? U.minSeats ?? 1} seats = ${c(U.pricePerSeat * (E.seatCount ?? U.minSeats ?? 1), U.currency)} / ${d(U.duration)}` : U ? `${c(U.price, U.currency)} / ${d(U.duration)}` : "Unknown plan"
177
183
  })] })]
178
184
  }), /* @__PURE__ */ y("div", {
179
185
  className: "flex items-center gap-2",
180
186
  children: [
181
- J && T.canUpdateSubscription && U?.pricingModel === r.PER_SEAT && /* @__PURE__ */ v("button", {
187
+ J && w.canUpdateSubscription && U?.pricingModel === o.PER_SEAT && /* @__PURE__ */ v("button", {
182
188
  type: "button",
183
189
  onClick: () => L(!0),
184
- className: "px-4 py-2 text-sm font-medium border border-border rounded-md hover:bg-accent text-foreground transition-colors",
190
+ className: "px-4 py-2 text-sm font-medium border border-border-subtle text-text-primary rounded-button hover:bg-bg-sunken hover:border-border-strong transition-all duration-200",
185
191
  children: "Manage Seats"
186
192
  }),
187
- J && T.canUpdateSubscription && /* @__PURE__ */ v("button", {
193
+ J && w.canUpdateSubscription && /* @__PURE__ */ v("button", {
188
194
  type: "button",
189
- onClick: () => x(m(`/subscriptions/${D.id}/upgrade`, E ?? D.billingAccountId)),
190
- className: "px-4 py-2 text-sm font-medium bg-primary text-primary-foreground rounded-md hover:bg-primary/90 transition-colors",
195
+ onClick: () => b(m(`/subscriptions/${E.id}/upgrade`, T ?? E.billingAccountId)),
196
+ className: "px-4 py-2 text-sm font-medium bg-action-primary-bg text-action-primary-text rounded-button hover:bg-action-primary-bgHover transition-colors duration-200",
191
197
  children: "Change Plan"
192
198
  }),
193
- J && T.canCancelSubscription && !D.canceledAt && /* @__PURE__ */ v("button", {
199
+ J && w.canCancelSubscription && !E.canceledAt && /* @__PURE__ */ v("button", {
194
200
  type: "button",
195
- onClick: () => F(!0),
196
- disabled: A,
197
- className: "px-4 py-2 text-sm font-medium border border-border text-destructive rounded-md hover:bg-destructive/10 transition-colors disabled:opacity-50",
198
- children: A ? "Canceling..." : "Cancel Subscription"
201
+ onClick: () => I(!0),
202
+ disabled: k,
203
+ className: "px-4 py-2 text-sm font-medium border border-border-subtle text-status-error-text rounded-button hover:bg-status-error-bg-subtle hover:border-border-strong transition-all duration-200 disabled:opacity-50",
204
+ children: k ? "Canceling..." : "Cancel Subscription"
199
205
  }),
200
- D.canceledAt && /* @__PURE__ */ v("span", {
201
- className: "px-4 py-2 text-sm font-medium text-status-warning-text bg-status-warning-bg-subtle rounded-md",
206
+ E.canceledAt && /* @__PURE__ */ v("span", {
207
+ className: "px-4 py-2 text-sm font-medium text-status-warning-text bg-status-warning-bg-subtle rounded-button",
202
208
  children: "Cancellation Scheduled"
203
209
  })
204
210
  ]
@@ -209,39 +215,38 @@ var C = () => {
209
215
  children: [/* @__PURE__ */ y("div", {
210
216
  className: "lg:col-span-2 space-y-6",
211
217
  children: [
212
- J && /* @__PURE__ */ y("div", {
213
- className: "border border-border rounded-lg bg-card p-6",
218
+ J && /* @__PURE__ */ y(t, {
219
+ className: "p-5",
214
220
  children: [/* @__PURE__ */ y("div", {
215
221
  className: "flex items-center justify-between mb-4",
216
222
  children: [/* @__PURE__ */ v("h2", {
217
- className: "text-lg font-semibold text-foreground",
223
+ className: "text-base font-semibold text-text-primary",
218
224
  children: "Current Period"
219
225
  }), /* @__PURE__ */ y("span", {
220
- className: "text-sm text-muted-foreground",
226
+ className: "text-sm text-text-secondary tabular-nums",
221
227
  children: [$, " days remaining"]
222
228
  })]
223
229
  }), /* @__PURE__ */ y("div", {
224
230
  className: "space-y-2",
225
- children: [/* @__PURE__ */ v("div", {
226
- className: "h-2 rounded-full bg-muted overflow-hidden",
227
- children: /* @__PURE__ */ v("div", {
228
- className: "h-full bg-primary transition-all duration-300",
229
- style: { width: `${xe}%` }
230
- })
231
+ children: [/* @__PURE__ */ v(r, {
232
+ value: Ce,
233
+ status: "primary",
234
+ size: "md",
235
+ "aria-label": "Billing period progress"
231
236
  }), /* @__PURE__ */ y("div", {
232
- className: "flex items-center justify-between text-sm text-muted-foreground",
233
- children: [/* @__PURE__ */ v("span", { children: o(D.startDate, "short") }), /* @__PURE__ */ v("span", { children: o(D.endDate, "short") })]
237
+ className: "flex items-center justify-between text-sm text-text-secondary",
238
+ children: [/* @__PURE__ */ v("span", { children: l(E.startDate, "short") }), /* @__PURE__ */ v("span", { children: l(E.endDate, "short") })]
234
239
  })]
235
240
  })]
236
241
  }),
237
- /* @__PURE__ */ y("div", {
238
- className: "border border-border rounded-lg bg-card overflow-hidden",
242
+ /* @__PURE__ */ y(t, {
243
+ className: "overflow-hidden",
239
244
  children: [/* @__PURE__ */ y("div", {
240
- className: "p-6 border-b border-border bg-muted/30",
245
+ className: "p-5 border-b border-border-subtle",
241
246
  children: [/* @__PURE__ */ y("h2", {
242
- className: "text-lg font-semibold text-foreground",
247
+ className: "text-base font-semibold text-text-primary",
243
248
  children: ["Plan Quotas", W.length > 0 && /* @__PURE__ */ y("span", {
244
- className: "ml-2 text-sm font-normal text-muted-foreground",
249
+ className: "ml-2 text-sm font-normal text-text-muted tabular-nums",
245
250
  children: [
246
251
  "(",
247
252
  W.length,
@@ -249,54 +254,55 @@ var C = () => {
249
254
  ]
250
255
  })]
251
256
  }), /* @__PURE__ */ v("p", {
252
- className: "text-sm text-muted-foreground mt-0.5",
257
+ className: "text-sm text-text-secondary mt-0.5",
253
258
  children: "Limits included in your plan"
254
259
  })]
255
260
  }), /* @__PURE__ */ v("div", {
256
- className: "p-6",
261
+ className: "p-5",
257
262
  children: W.length === 0 ? /* @__PURE__ */ v("p", {
258
- className: "text-sm text-muted-foreground",
263
+ className: "text-sm text-text-secondary",
259
264
  children: "No quotas assigned to this subscription."
260
265
  }) : /* @__PURE__ */ v("div", {
261
266
  className: "space-y-3",
262
- children: W.map((e) => /* @__PURE__ */ v(oe, { quota: e }, e.id))
267
+ children: W.map((e) => /* @__PURE__ */ v(C, { quota: e }, e.id))
263
268
  })
264
269
  })]
265
270
  }),
266
- J && j && /* @__PURE__ */ y("div", {
267
- className: "border border-border rounded-lg bg-card overflow-hidden",
271
+ J && M && /* @__PURE__ */ y(t, {
272
+ className: "overflow-hidden",
268
273
  children: [
269
274
  /* @__PURE__ */ y("div", {
270
- className: "p-6 border-b border-border bg-muted/30 flex items-center justify-between",
275
+ className: "p-5 border-b border-border-subtle flex items-center justify-between gap-4",
271
276
  children: [/* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("h2", {
272
- className: "text-lg font-semibold text-foreground",
277
+ className: "text-base font-semibold text-text-primary",
273
278
  children: "Workspace Quotas"
274
279
  }), /* @__PURE__ */ v("p", {
275
- className: "text-sm text-muted-foreground mt-0.5",
280
+ className: "text-sm text-text-secondary mt-0.5",
276
281
  children: "Active limits for your workspace"
277
- })] }), X ? /* @__PURE__ */ y("span", {
278
- className: "flex items-center gap-1.5 px-2.5 py-1 text-xs font-medium rounded-full bg-status-success-bg-subtle text-status-success-text",
279
- children: [/* @__PURE__ */ v("span", { className: "size-1.5 rounded-full bg-status-success-text inline-block" }), "Active"]
282
+ })] }), X ? /* @__PURE__ */ v(n, {
283
+ status: "success",
284
+ dot: !0,
285
+ children: "Active"
280
286
  }) : /* @__PURE__ */ v("button", {
281
287
  type: "button",
282
288
  onClick: () => R(!0),
283
- className: "px-3 py-1.5 text-sm font-medium bg-primary text-primary-foreground rounded-md hover:bg-primary/90 transition-colors",
289
+ className: "px-3 py-1.5 text-sm font-medium bg-action-primary-bg text-action-primary-text rounded-button hover:bg-action-primary-bgHover transition-colors duration-200",
284
290
  children: "Activate for Workspace"
285
291
  })]
286
292
  }),
287
293
  /* @__PURE__ */ v("div", {
288
- className: "p-6",
294
+ className: "p-5",
289
295
  children: X ? Y.length > 0 ? /* @__PURE__ */ v("div", {
290
296
  className: "space-y-3",
291
- children: Y.map((e) => /* @__PURE__ */ v(se, { item: e }, e.assignment.id))
297
+ children: Y.map((e) => /* @__PURE__ */ v(le, { item: e }, e.assignment.id))
292
298
  }) : /* @__PURE__ */ y("p", {
293
- className: "text-sm text-muted-foreground",
299
+ className: "text-sm text-text-secondary",
294
300
  children: [
295
301
  "Quotas are activated on workspace",
296
302
  " ",
297
303
  /* @__PURE__ */ v("span", {
298
- className: "font-mono text-xs text-foreground",
299
- children: D.assignedWorkspaceId
304
+ className: "font-mono text-xs text-text-primary bg-bg-sunken/60 rounded px-1.5 py-0.5",
305
+ children: E.assignedWorkspaceId
300
306
  }),
301
307
  ". Usage data will appear here once quotas are consumed."
302
308
  ]
@@ -317,17 +323,17 @@ var C = () => {
317
323
  })
318
324
  })
319
325
  }), /* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("p", {
320
- className: "text-sm font-medium text-foreground",
326
+ className: "text-sm font-medium text-text-primary",
321
327
  children: "Workspace quotas not activated yet"
322
328
  }), /* @__PURE__ */ y("p", {
323
- className: "text-sm text-muted-foreground mt-0.5",
329
+ className: "text-sm text-text-secondary mt-0.5",
324
330
  children: [
325
331
  "Click",
326
332
  " ",
327
333
  /* @__PURE__ */ v("button", {
328
334
  type: "button",
329
335
  onClick: () => R(!0),
330
- className: "text-primary hover:underline font-medium",
336
+ className: "text-text-link hover:underline font-medium",
331
337
  children: "Activate for Workspace"
332
338
  }),
333
339
  " ",
@@ -336,61 +342,68 @@ var C = () => {
336
342
  })] })]
337
343
  })
338
344
  }),
339
- ge && /* @__PURE__ */ v(re, {
340
- billingAccountId: E ?? D.billingAccountId,
341
- subscriptionId: D.id,
345
+ ve && /* @__PURE__ */ v(g, {
346
+ billingAccountId: T ?? E.billingAccountId,
347
+ subscriptionId: E.id,
342
348
  quotas: [],
343
349
  workspaces: [{
344
- id: j,
350
+ id: M,
345
351
  name: "Current workspace"
346
352
  }],
347
- currentWorkspaceId: j,
353
+ currentWorkspaceId: M,
348
354
  onAssigned: () => {
349
- R(!1), k(), N();
355
+ R(!1), O(), P();
350
356
  },
351
357
  onSkip: () => R(!1)
352
358
  })
353
359
  ]
354
360
  }),
355
- G.length > 0 && /* @__PURE__ */ y("div", {
356
- className: "border border-border rounded-lg bg-card overflow-hidden",
361
+ G.length > 0 && /* @__PURE__ */ y(t, {
362
+ className: "overflow-hidden",
357
363
  children: [/* @__PURE__ */ v("div", {
358
- className: "p-6 border-b border-border bg-muted/30",
364
+ className: "p-5 border-b border-border-subtle",
359
365
  children: /* @__PURE__ */ y("h2", {
360
- className: "text-lg font-semibold text-foreground",
366
+ className: "text-base font-semibold text-text-primary",
361
367
  children: [
362
- "Addons (",
363
- G.length,
364
- ")"
368
+ "Addons",
369
+ " ",
370
+ /* @__PURE__ */ y("span", {
371
+ className: "text-sm font-normal text-text-muted tabular-nums",
372
+ children: [
373
+ "(",
374
+ G.length,
375
+ ")"
376
+ ]
377
+ })
365
378
  ]
366
379
  })
367
380
  }), /* @__PURE__ */ v("div", {
368
- className: "p-6",
381
+ className: "p-5",
369
382
  children: /* @__PURE__ */ v("div", {
370
383
  className: "space-y-3",
371
- children: G.map((e) => /* @__PURE__ */ v(ce, { addonSubscription: e }, e.id))
384
+ children: G.map((e) => /* @__PURE__ */ v(ue, { addonSubscription: e }, e.id))
372
385
  })
373
386
  })]
374
387
  }),
375
- K.length > 0 && /* @__PURE__ */ y("div", {
376
- className: "border border-border rounded-lg bg-card overflow-hidden",
388
+ K.length > 0 && /* @__PURE__ */ y(t, {
389
+ className: "overflow-hidden",
377
390
  children: [
378
391
  /* @__PURE__ */ v("div", {
379
- className: "p-6 border-b border-border bg-muted/30",
392
+ className: "p-5 border-b border-border-subtle",
380
393
  children: /* @__PURE__ */ v("h2", {
381
- className: "text-lg font-semibold text-foreground",
394
+ className: "text-base font-semibold text-text-primary",
382
395
  children: "Recent Transactions"
383
396
  })
384
397
  }),
385
398
  /* @__PURE__ */ v("div", {
386
- className: "divide-y divide-border",
387
- children: K.slice(0, 5).map((e) => /* @__PURE__ */ v(w, { transaction: e }, e.id))
399
+ className: "divide-y divide-border-subtle",
400
+ children: K.slice(0, 5).map((e) => /* @__PURE__ */ v(de, { transaction: e }, e.id))
388
401
  }),
389
402
  K.length > 5 && /* @__PURE__ */ v("div", {
390
- className: "p-4 text-center border-t border-border",
403
+ className: "p-4 text-center border-t border-border-subtle",
391
404
  children: /* @__PURE__ */ v("button", {
392
405
  type: "button",
393
- className: "text-sm text-primary hover:underline",
406
+ className: "text-sm text-text-link hover:underline",
394
407
  children: "View all transactions"
395
408
  })
396
409
  })
@@ -399,128 +412,128 @@ var C = () => {
399
412
  ]
400
413
  }), /* @__PURE__ */ y("div", {
401
414
  className: "space-y-6",
402
- children: [/* @__PURE__ */ y("div", {
403
- className: "border border-border rounded-lg bg-card overflow-hidden",
415
+ children: [/* @__PURE__ */ y(t, {
416
+ className: "overflow-hidden",
404
417
  children: [/* @__PURE__ */ v("div", {
405
- className: "p-6 border-b border-border bg-muted/30",
418
+ className: "p-5 border-b border-border-subtle",
406
419
  children: /* @__PURE__ */ v("h2", {
407
- className: "text-lg font-semibold text-foreground",
420
+ className: "text-base font-semibold text-text-primary",
408
421
  children: "Details"
409
422
  })
410
423
  }), /* @__PURE__ */ y("div", {
411
- className: "p-6 space-y-4",
424
+ className: "p-5 space-y-4",
412
425
  children: [
413
426
  /* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("p", {
414
- className: "text-sm text-muted-foreground",
427
+ className: "text-sm text-text-secondary",
415
428
  children: "Subscription ID"
416
429
  }), /* @__PURE__ */ v("p", {
417
- className: "font-mono text-sm text-foreground mt-0.5 break-all",
418
- children: D.id
430
+ className: "font-mono text-sm text-text-primary mt-0.5 break-all",
431
+ children: E.id
419
432
  })] }),
420
433
  /* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("p", {
421
- className: "text-sm text-muted-foreground",
434
+ className: "text-sm text-text-secondary",
422
435
  children: "Plan"
423
436
  }), /* @__PURE__ */ v("p", {
424
- className: "text-sm text-foreground mt-0.5",
437
+ className: "text-sm text-text-primary mt-0.5",
425
438
  children: U?.name || "Unknown"
426
439
  })] }),
427
440
  /* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("p", {
428
- className: "text-sm text-muted-foreground",
441
+ className: "text-sm text-text-secondary",
429
442
  children: "Billing Account"
430
443
  }), /* @__PURE__ */ v("p", {
431
- className: "text-sm text-foreground mt-0.5",
432
- children: D.billingAccount?.name || "Unknown"
444
+ className: "text-sm text-text-primary mt-0.5",
445
+ children: E.billingAccount?.name || "Unknown"
433
446
  })] }),
434
447
  /* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("p", {
435
- className: "text-sm text-muted-foreground",
448
+ className: "text-sm text-text-secondary",
436
449
  children: "Start Date"
437
450
  }), /* @__PURE__ */ v("p", {
438
- className: "text-sm text-foreground mt-0.5",
439
- children: o(D.startDate)
451
+ className: "text-sm text-text-primary mt-0.5",
452
+ children: l(E.startDate)
440
453
  })] }),
441
454
  /* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("p", {
442
- className: "text-sm text-muted-foreground",
455
+ className: "text-sm text-text-secondary",
443
456
  children: "End Date"
444
457
  }), /* @__PURE__ */ v("p", {
445
- className: "text-sm text-foreground mt-0.5",
446
- children: o(D.endDate)
458
+ className: "text-sm text-text-primary mt-0.5",
459
+ children: l(E.endDate)
447
460
  })] }),
448
- D.nextBillingDate && /* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("p", {
449
- className: "text-sm text-muted-foreground",
461
+ E.nextBillingDate && /* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("p", {
462
+ className: "text-sm text-text-secondary",
450
463
  children: "Next Billing"
451
464
  }), /* @__PURE__ */ v("p", {
452
- className: "text-sm text-foreground mt-0.5",
453
- children: o(D.nextBillingDate)
465
+ className: "text-sm text-text-primary mt-0.5",
466
+ children: l(E.nextBillingDate)
454
467
  })] }),
455
468
  /* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("p", {
456
- className: "text-sm text-muted-foreground",
469
+ className: "text-sm text-text-secondary",
457
470
  children: "Auto Renewal"
458
471
  }), /* @__PURE__ */ v("p", {
459
- className: "text-sm text-foreground mt-0.5",
460
- children: D.autoRenewal ? "Enabled" : "Disabled"
472
+ className: "text-sm text-text-primary mt-0.5",
473
+ children: E.autoRenewal ? "Enabled" : "Disabled"
461
474
  })] }),
462
- D.paymentGateway && /* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("p", {
463
- className: "text-sm text-muted-foreground",
475
+ E.paymentGateway && /* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("p", {
476
+ className: "text-sm text-text-secondary",
464
477
  children: "Payment Gateway"
465
478
  }), /* @__PURE__ */ v("p", {
466
- className: "text-sm text-foreground mt-0.5 capitalize",
467
- children: D.paymentGateway
479
+ className: "text-sm text-text-primary mt-0.5 capitalize",
480
+ children: E.paymentGateway
468
481
  })] })
469
482
  ]
470
483
  })]
471
- }), q.length > 0 && /* @__PURE__ */ y("div", {
472
- className: "border border-border rounded-lg bg-card overflow-hidden",
484
+ }), q.length > 0 && /* @__PURE__ */ y(t, {
485
+ className: "overflow-hidden",
473
486
  children: [/* @__PURE__ */ v("div", {
474
- className: "p-6 border-b border-border bg-muted/30",
487
+ className: "p-5 border-b border-border-subtle",
475
488
  children: /* @__PURE__ */ v("h2", {
476
- className: "text-lg font-semibold text-foreground",
489
+ className: "text-base font-semibold text-text-primary",
477
490
  children: "History"
478
491
  })
479
492
  }), /* @__PURE__ */ v("div", {
480
- className: "p-6",
493
+ className: "p-5",
481
494
  children: /* @__PURE__ */ v("div", {
482
495
  className: "space-y-3",
483
- children: q.slice(0, 5).map((e) => /* @__PURE__ */ v(le, { item: e }, e.id))
496
+ children: q.slice(0, 5).map((e) => /* @__PURE__ */ v(fe, { item: e }, e.id))
484
497
  })
485
498
  })]
486
499
  })]
487
500
  })]
488
501
  }),
489
- I && D && /* @__PURE__ */ v(ie, {
490
- subscription: D,
502
+ _e && E && /* @__PURE__ */ v(oe, {
503
+ subscription: E,
491
504
  onClose: () => L(!1),
492
505
  onConfirm: async (e) => {
493
- await me({
494
- subscriptionId: D.id,
506
+ await A({
507
+ subscriptionId: E.id,
495
508
  seatCount: e
496
- }), await k();
509
+ }), await O();
497
510
  },
498
- isLoading: he
511
+ isLoading: j
499
512
  }),
500
- P && /* @__PURE__ */ y("div", {
513
+ F && /* @__PURE__ */ y("div", {
501
514
  className: "fixed inset-0 z-50 flex items-center justify-center",
502
515
  children: [/* @__PURE__ */ v("div", {
503
516
  className: "absolute inset-0 bg-overlay-scrim",
504
- onClick: () => F(!1)
517
+ onClick: () => I(!1)
505
518
  }), /* @__PURE__ */ y("div", {
506
- className: "relative bg-card border border-border rounded-lg shadow-lg w-full max-w-md mx-4 p-6",
519
+ className: "relative bg-bg-elevated border border-border-subtle rounded-card shadow-[var(--shadow-elevation-4)] w-full max-w-md mx-4 p-6",
507
520
  role: "dialog",
508
521
  "aria-modal": "true",
509
522
  "aria-labelledby": "cancel-subscription-title",
510
523
  children: [
511
524
  /* @__PURE__ */ v("h3", {
512
525
  id: "cancel-subscription-title",
513
- className: "text-lg font-semibold text-foreground mb-2",
526
+ className: "text-lg font-semibold text-text-primary mb-2",
514
527
  children: "Cancel Subscription"
515
528
  }),
516
529
  /* @__PURE__ */ y("p", {
517
- className: "text-sm text-muted-foreground mb-4",
530
+ className: "text-sm text-text-secondary mb-4",
518
531
  children: [
519
532
  "Are you sure you want to cancel this subscription? Your subscription will remain active until",
520
533
  " ",
521
534
  /* @__PURE__ */ v("span", {
522
- className: "font-medium text-foreground",
523
- children: o(D.endDate)
535
+ className: "font-medium text-text-primary",
536
+ children: l(E.endDate)
524
537
  }),
525
538
  ", but will not renew automatically."
526
539
  ]
@@ -528,20 +541,20 @@ var C = () => {
528
541
  /* @__PURE__ */ y("div", {
529
542
  className: "mb-4",
530
543
  children: [/* @__PURE__ */ v("label", {
531
- className: "block text-sm font-medium text-foreground mb-1",
544
+ className: "block text-sm font-medium text-text-primary mb-1",
532
545
  children: "Reason for cancellation (optional)"
533
546
  }), /* @__PURE__ */ v("textarea", {
534
547
  value: z,
535
548
  onChange: (e) => B(e.target.value),
536
549
  placeholder: "Please share why you're canceling...",
537
- className: "w-full px-3 py-2 text-sm border border-border rounded-md bg-background text-foreground placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-primary focus:border-transparent resize-none",
550
+ className: "w-full px-3 py-2 text-sm border border-border-subtle rounded-input bg-bg-surface text-text-primary placeholder:text-text-placeholder focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)] focus:border-transparent resize-none",
538
551
  rows: 3
539
552
  })]
540
553
  }),
541
554
  V && /* @__PURE__ */ v("div", {
542
- className: "mb-4 p-3 bg-destructive/10 border border-destructive/20 rounded-md",
555
+ className: "mb-4 p-3 bg-status-error-bg-subtle border border-status-error-border rounded-card",
543
556
  children: /* @__PURE__ */ v("p", {
544
- className: "text-sm text-destructive",
557
+ className: "text-sm text-status-error-text",
545
558
  children: V
546
559
  })
547
560
  }),
@@ -550,16 +563,16 @@ var C = () => {
550
563
  children: [/* @__PURE__ */ v("button", {
551
564
  type: "button",
552
565
  onClick: () => {
553
- F(!1), B(""), H(null);
566
+ I(!1), B(""), H(null);
554
567
  },
555
- className: "px-4 py-2 text-sm font-medium text-muted-foreground hover:text-foreground transition-colors",
568
+ className: "px-4 py-2 text-sm font-medium text-text-secondary hover:text-text-primary transition-colors",
556
569
  children: "Keep Subscription"
557
570
  }), /* @__PURE__ */ v("button", {
558
571
  type: "button",
559
- onClick: _e,
560
- disabled: A,
561
- className: "px-4 py-2 text-sm font-medium bg-destructive text-destructive-foreground rounded-md hover:bg-destructive/90 transition-colors disabled:opacity-50",
562
- children: A ? "Canceling..." : "Confirm Cancellation"
572
+ onClick: ye,
573
+ disabled: k,
574
+ className: "px-4 py-2 text-sm font-medium bg-action-danger-bg text-action-danger-text rounded-button hover:bg-action-danger-bgHover transition-colors duration-200 disabled:opacity-50",
575
+ children: k ? "Canceling..." : "Confirm Cancellation"
563
576
  })]
564
577
  })
565
578
  ]
@@ -567,132 +580,132 @@ var C = () => {
567
580
  })
568
581
  ]
569
582
  });
570
- }, oe = ({ quota: e }) => {
571
- let t = e.context, n = x(e.name, t), r = t?.description && typeof t.description == "string" ? t.description : null, a = e.limits?.value ?? 0, c = e.currentUsageSum ?? 0, l = a > 0 ? Math.min(100, c / a * 100) : 0, d = e.name.includes("bytes") || e.name.includes("storage"), f = e.quotaType === "POOLED";
583
+ }, C = ({ quota: e }) => {
584
+ let t = e.context, n = b(e.name, t), r = t?.description && typeof t.description == "string" ? t.description : null, i = e.limits?.value ?? 0, a = e.currentUsageSum ?? 0, o = i > 0 ? Math.min(100, a / i * 100) : 0, c = e.name.includes("bytes") || e.name.includes("storage"), d = e.quotaType === "POOLED";
572
585
  return /* @__PURE__ */ y("div", {
573
- className: "p-4 rounded-lg border border-border bg-card",
586
+ className: "p-4 rounded-card border border-border-subtle bg-bg-surface",
574
587
  children: [
575
588
  /* @__PURE__ */ y("div", {
576
589
  className: "flex items-start justify-between gap-4 mb-2",
577
590
  children: [/* @__PURE__ */ y("div", {
578
591
  className: "min-w-0",
579
592
  children: [/* @__PURE__ */ v("p", {
580
- className: "font-medium text-foreground truncate",
593
+ className: "font-medium text-text-primary truncate",
581
594
  children: n
582
595
  }), r && /* @__PURE__ */ v("p", {
583
- className: "text-xs text-muted-foreground mt-0.5 line-clamp-2",
596
+ className: "text-xs text-text-secondary mt-0.5 line-clamp-2",
584
597
  children: r
585
598
  })]
586
599
  }), /* @__PURE__ */ y("span", {
587
- className: "text-sm font-medium text-foreground shrink-0 tabular-nums",
600
+ className: "text-sm font-medium text-text-primary shrink-0 tabular-nums",
588
601
  children: [
589
- d ? i(c) : c.toLocaleString(),
602
+ c ? s(a) : a.toLocaleString(),
590
603
  " / ",
591
- a > 0 ? d ? i(a) : a.toLocaleString() : "∞"
604
+ i > 0 ? c ? s(i) : i.toLocaleString() : "∞"
592
605
  ]
593
606
  })]
594
607
  }),
595
- a > 0 && /* @__PURE__ */ v("div", {
596
- className: "h-1.5 rounded-full bg-muted overflow-hidden mb-2",
608
+ i > 0 && /* @__PURE__ */ v("div", {
609
+ className: "h-1.5 rounded-full bg-bg-sunken overflow-hidden mb-2",
597
610
  children: /* @__PURE__ */ v("div", {
598
- className: `h-full transition-all duration-300 ${u(l)}`,
599
- style: { width: `${l}%` }
611
+ className: `h-full rounded-full transition-all duration-300 ${p(o)}`,
612
+ style: { width: `${o}%` }
600
613
  })
601
614
  }),
602
615
  /* @__PURE__ */ y("div", {
603
- className: "flex items-center justify-between text-xs text-muted-foreground",
616
+ className: "flex items-center justify-between text-xs text-text-secondary",
604
617
  children: [/* @__PURE__ */ v("span", {
605
- className: "px-1.5 py-0.5 rounded bg-muted font-medium",
606
- children: f ? "Shared" : "Per Workspace"
618
+ className: "px-1.5 py-0.5 rounded bg-bg-sunken font-medium",
619
+ children: d ? "Shared" : "Per Workspace"
607
620
  }), /* @__PURE__ */ y("div", {
608
621
  className: "flex items-center gap-3",
609
- children: [e.endtime && /* @__PURE__ */ y("span", { children: ["Expires ", o(e.endtime, "short")] }), a > 0 && /* @__PURE__ */ y("span", {
610
- className: l >= 90 ? "text-status-error-text font-medium" : l >= 70 ? "text-status-warning-text font-medium" : "",
611
- children: [s(l), " used"]
622
+ children: [e.endtime && /* @__PURE__ */ y("span", { children: ["Expires ", l(e.endtime, "short")] }), i > 0 && /* @__PURE__ */ y("span", {
623
+ className: o >= 90 ? "text-status-error-text font-medium" : o >= 70 ? "text-status-warning-text font-medium" : "",
624
+ children: [u(o), " used"]
612
625
  })]
613
626
  })]
614
627
  })
615
628
  ]
616
629
  });
617
- }, se = ({ item: e }) => {
618
- let { assignment: t, effectiveUsed: n, usagePercentage: r } = e, a = x(t.quotaName), c = !t.noLimit && t.limit !== null, l = t.limit ?? 0, d = t.quotaName.includes("bytes") || t.quotaName.includes("storage"), f = S(t.resetPeriod);
630
+ }, le = ({ item: e }) => {
631
+ let { assignment: t, effectiveUsed: n, usagePercentage: r } = e, i = b(t.quotaName), a = !t.noLimit && t.limit !== null, o = t.limit ?? 0, c = t.quotaName.includes("bytes") || t.quotaName.includes("storage"), d = x(t.resetPeriod);
619
632
  return /* @__PURE__ */ y("div", {
620
- className: "p-4 rounded-lg border border-border bg-card",
633
+ className: "p-4 rounded-card border border-border-subtle bg-bg-surface",
621
634
  children: [
622
635
  /* @__PURE__ */ y("div", {
623
636
  className: "flex items-start justify-between gap-4 mb-2",
624
637
  children: [/* @__PURE__ */ y("div", {
625
638
  className: "min-w-0",
626
639
  children: [/* @__PURE__ */ v("p", {
627
- className: "font-medium text-foreground truncate",
628
- children: a
640
+ className: "font-medium text-text-primary truncate",
641
+ children: i
629
642
  }), /* @__PURE__ */ y("p", {
630
- className: "text-xs text-muted-foreground mt-0.5",
631
- children: [t.quotaMode === "pooled" ? "Pooled across workspaces" : "Dedicated", f && ` · ${f}`]
643
+ className: "text-xs text-text-secondary mt-0.5",
644
+ children: [t.quotaMode === "pooled" ? "Pooled across workspaces" : "Dedicated", d && ` · ${d}`]
632
645
  })]
633
646
  }), /* @__PURE__ */ y("span", {
634
- className: "text-sm font-medium text-foreground shrink-0 tabular-nums",
647
+ className: "text-sm font-medium text-text-primary shrink-0 tabular-nums",
635
648
  children: [
636
- d ? i(n) : n.toLocaleString(),
649
+ c ? s(n) : n.toLocaleString(),
637
650
  " / ",
638
- t.noLimit ? "∞" : c ? d ? i(l) : l.toLocaleString() : "∞"
651
+ t.noLimit ? "∞" : a ? c ? s(o) : o.toLocaleString() : "∞"
639
652
  ]
640
653
  })]
641
654
  }),
642
- c && /* @__PURE__ */ v("div", {
643
- className: "h-1.5 rounded-full bg-muted overflow-hidden mb-2",
655
+ a && /* @__PURE__ */ v("div", {
656
+ className: "h-1.5 rounded-full bg-bg-sunken overflow-hidden mb-2",
644
657
  children: /* @__PURE__ */ v("div", {
645
- className: `h-full transition-all duration-300 ${u(r)}`,
658
+ className: `h-full rounded-full transition-all duration-300 ${p(r)}`,
646
659
  style: { width: `${Math.min(100, r)}%` }
647
660
  })
648
661
  }),
649
662
  /* @__PURE__ */ y("div", {
650
- className: "flex items-center justify-between text-xs text-muted-foreground",
651
- children: [/* @__PURE__ */ y("span", { children: ["Since ", o(t.createdAt, "short")] }), c && /* @__PURE__ */ y("span", {
663
+ className: "flex items-center justify-between text-xs text-text-secondary",
664
+ children: [/* @__PURE__ */ y("span", { children: ["Since ", l(t.createdAt, "short")] }), a && /* @__PURE__ */ y("span", {
652
665
  className: r >= 90 ? "text-status-error-text font-medium" : r >= 70 ? "text-status-warning-text font-medium" : "",
653
- children: [s(r), " used"]
666
+ children: [u(r), " used"]
654
667
  })]
655
668
  })
656
669
  ]
657
670
  });
658
- }, ce = ({ addonSubscription: e }) => {
671
+ }, ue = ({ addonSubscription: e }) => {
659
672
  let t = e.addon;
660
673
  return /* @__PURE__ */ y("div", {
661
- className: "flex items-center justify-between p-3 rounded-lg bg-muted/30",
674
+ className: "flex items-center justify-between p-3 rounded-card border border-border-subtle bg-bg-sunken",
662
675
  children: [/* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("p", {
663
- className: "font-medium text-foreground",
676
+ className: "font-medium text-text-primary",
664
677
  children: t?.name || "Unknown Addon"
665
678
  }), /* @__PURE__ */ y("p", {
666
- className: "text-sm text-muted-foreground",
679
+ className: "text-sm text-text-secondary",
667
680
  children: ["Qty: ", e.quantity]
668
681
  })] }), t && /* @__PURE__ */ v("p", {
669
- className: "text-sm font-medium text-foreground",
670
- children: a(t.price * e.quantity, t.currency)
682
+ className: "text-sm font-medium text-text-primary tabular-nums",
683
+ children: c(t.price * e.quantity, t.currency)
671
684
  })]
672
685
  });
673
- }, w = ({ transaction: e }) => /* @__PURE__ */ y("div", {
674
- className: "flex items-center justify-between px-6 py-4",
686
+ }, de = ({ transaction: e }) => /* @__PURE__ */ y("div", {
687
+ className: "flex items-center justify-between px-5 py-4 hover:bg-bg-sunken transition-colors",
675
688
  children: [/* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("p", {
676
- className: "font-medium text-foreground capitalize",
689
+ className: "font-medium text-text-primary capitalize",
677
690
  children: e.type
678
691
  }), /* @__PURE__ */ v("p", {
679
- className: "text-sm text-muted-foreground",
680
- children: o(e.createdAt, "short")
692
+ className: "text-sm text-text-secondary",
693
+ children: l(e.createdAt, "short")
681
694
  })] }), /* @__PURE__ */ y("div", {
682
695
  className: "text-right",
683
696
  children: [/* @__PURE__ */ y("p", {
684
- className: `font-medium ${e.type === "refund" ? "text-status-error-text" : "text-foreground"}`,
685
- children: [e.type === "refund" ? "-" : "", a(e.amount, e.currency)]
697
+ className: `font-medium tabular-nums ${e.type === "refund" ? "text-status-error-text" : "text-text-primary"}`,
698
+ children: [e.type === "refund" ? "-" : "", c(e.amount, e.currency)]
686
699
  }), /* @__PURE__ */ v("p", {
687
- className: "text-sm text-muted-foreground capitalize",
700
+ className: "text-sm text-text-secondary capitalize",
688
701
  children: e.status
689
702
  })]
690
703
  })]
691
- }), le = ({ item: e }) => /* @__PURE__ */ y("div", {
704
+ }), fe = ({ item: e }) => /* @__PURE__ */ y("div", {
692
705
  className: "flex items-start gap-3",
693
- children: [/* @__PURE__ */ v("div", { className: "size-2 rounded-full bg-muted-foreground mt-2 shrink-0" }), /* @__PURE__ */ y("div", { children: [
706
+ children: [/* @__PURE__ */ v("div", { className: "size-2 rounded-full bg-text-muted mt-2 shrink-0" }), /* @__PURE__ */ y("div", { children: [
694
707
  /* @__PURE__ */ y("p", {
695
- className: "text-sm text-foreground",
708
+ className: "text-sm text-text-primary",
696
709
  children: [
697
710
  /* @__PURE__ */ v("span", {
698
711
  className: "capitalize",
@@ -706,16 +719,16 @@ var C = () => {
706
719
  ]
707
720
  }),
708
721
  e.reason && /* @__PURE__ */ v("p", {
709
- className: "text-xs text-muted-foreground mt-0.5",
722
+ className: "text-xs text-text-secondary mt-0.5",
710
723
  children: e.reason
711
724
  }),
712
725
  /* @__PURE__ */ v("p", {
713
- className: "text-xs text-muted-foreground mt-0.5",
714
- children: o(e.createdAt, "short")
726
+ className: "text-xs text-text-secondary mt-0.5",
727
+ children: l(e.createdAt, "short")
715
728
  })
716
729
  ] })]
717
730
  });
718
731
  //#endregion
719
- export { C as SubscriptionDetailPage };
732
+ export { S as SubscriptionDetailPage };
720
733
 
721
734
  //# sourceMappingURL=SubscriptionDetailPage.js.map