@burdenoff/microfe-billing 2026.625.3 → 2026.625.5

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 (98) hide show
  1. package/dist/billing/lib/native-purchases.js +2 -44
  2. package/dist/billing/modules/addons/pages/AddonBrowseDetailPage.js +192 -187
  3. package/dist/billing/modules/addons/pages/AddonBrowseDetailPage.js.map +1 -1
  4. package/dist/billing/modules/addons/pages/AddonCreatePage.js +322 -317
  5. package/dist/billing/modules/addons/pages/AddonCreatePage.js.map +1 -1
  6. package/dist/billing/modules/addons/pages/AddonDetailPage.js +190 -185
  7. package/dist/billing/modules/addons/pages/AddonDetailPage.js.map +1 -1
  8. package/dist/billing/modules/addons/pages/AddonEditPage.js +297 -292
  9. package/dist/billing/modules/addons/pages/AddonEditPage.js.map +1 -1
  10. package/dist/billing/modules/addons/pages/AddonsBrowsePage.js +60 -75
  11. package/dist/billing/modules/addons/pages/AddonsBrowsePage.js.map +1 -1
  12. package/dist/billing/modules/addons/pages/AddonsListPage.js +86 -101
  13. package/dist/billing/modules/addons/pages/AddonsListPage.js.map +1 -1
  14. package/dist/billing/modules/affiliate/pages/AffiliateDashboardPage.js +124 -121
  15. package/dist/billing/modules/affiliate/pages/AffiliateDashboardPage.js.map +1 -1
  16. package/dist/billing/modules/analytics/pages/AnalyticsPage.js +103 -111
  17. package/dist/billing/modules/analytics/pages/AnalyticsPage.js.map +1 -1
  18. package/dist/billing/modules/billing/pages/InvoiceDetailPage.js +196 -160
  19. package/dist/billing/modules/billing/pages/InvoiceDetailPage.js.map +1 -1
  20. package/dist/billing/modules/billing/pages/InvoicesListPage.js +58 -73
  21. package/dist/billing/modules/billing/pages/InvoicesListPage.js.map +1 -1
  22. package/dist/billing/modules/billing/pages/PaymentMethodsPage.js +65 -75
  23. package/dist/billing/modules/billing/pages/PaymentMethodsPage.js.map +1 -1
  24. package/dist/billing/modules/billing/pages/RefundsPage.js +399 -399
  25. package/dist/billing/modules/billing/pages/RefundsPage.js.map +1 -1
  26. package/dist/billing/modules/billing/pages/TransactionsPage.js +49 -48
  27. package/dist/billing/modules/billing/pages/TransactionsPage.js.map +1 -1
  28. package/dist/billing/modules/billing/pages/UserRefundsPage.js +144 -151
  29. package/dist/billing/modules/billing/pages/UserRefundsPage.js.map +1 -1
  30. package/dist/billing/modules/checkout/pages/CheckoutPage.js +430 -425
  31. package/dist/billing/modules/checkout/pages/CheckoutPage.js.map +1 -1
  32. package/dist/billing/modules/coupons/pages/CouponDetailPage.js +121 -93
  33. package/dist/billing/modules/coupons/pages/CouponDetailPage.js.map +1 -1
  34. package/dist/billing/modules/coupons/pages/CouponsListPage.js +154 -152
  35. package/dist/billing/modules/coupons/pages/CouponsListPage.js.map +1 -1
  36. package/dist/billing/modules/coupons/pages/CreateCouponPage.js +467 -462
  37. package/dist/billing/modules/coupons/pages/CreateCouponPage.js.map +1 -1
  38. package/dist/billing/modules/coupons/pages/EditCouponPage.js +294 -286
  39. package/dist/billing/modules/coupons/pages/EditCouponPage.js.map +1 -1
  40. package/dist/billing/modules/credits/pages/AdminCreditsPage.js +123 -117
  41. package/dist/billing/modules/credits/pages/AdminCreditsPage.js.map +1 -1
  42. package/dist/billing/modules/credits/pages/CreditTransactionsPage.js +43 -42
  43. package/dist/billing/modules/credits/pages/CreditTransactionsPage.js.map +1 -1
  44. package/dist/billing/modules/credits/pages/CreditWithdrawalPage.js +192 -207
  45. package/dist/billing/modules/credits/pages/CreditWithdrawalPage.js.map +1 -1
  46. package/dist/billing/modules/credits/pages/CreditsPage.js +40 -56
  47. package/dist/billing/modules/credits/pages/CreditsPage.js.map +1 -1
  48. package/dist/billing/modules/dashboard/pages/OverviewPage.js +128 -121
  49. package/dist/billing/modules/dashboard/pages/OverviewPage.js.map +1 -1
  50. package/dist/billing/modules/discounts/pages/DiscountsListPage.js +165 -180
  51. package/dist/billing/modules/discounts/pages/DiscountsListPage.js.map +1 -1
  52. package/dist/billing/modules/earnings/pages/EarningsPage.js +103 -100
  53. package/dist/billing/modules/earnings/pages/EarningsPage.js.map +1 -1
  54. package/dist/billing/modules/earnings/pages/PayoutAdminPage.js +175 -175
  55. package/dist/billing/modules/earnings/pages/PayoutAdminPage.js.map +1 -1
  56. package/dist/billing/modules/earnings/pages/PayoutsPage.js +96 -96
  57. package/dist/billing/modules/earnings/pages/PayoutsPage.js.map +1 -1
  58. package/dist/billing/modules/plans/pages/PlanAssignFreePage.js +42 -40
  59. package/dist/billing/modules/plans/pages/PlanAssignFreePage.js.map +1 -1
  60. package/dist/billing/modules/plans/pages/PlanBrowseDetailPage.js +45 -38
  61. package/dist/billing/modules/plans/pages/PlanBrowseDetailPage.js.map +1 -1
  62. package/dist/billing/modules/plans/pages/PlanCreatePage.js +339 -334
  63. package/dist/billing/modules/plans/pages/PlanCreatePage.js.map +1 -1
  64. package/dist/billing/modules/plans/pages/PlanDetailPage.js +80 -74
  65. package/dist/billing/modules/plans/pages/PlanDetailPage.js.map +1 -1
  66. package/dist/billing/modules/plans/pages/PlanEditPage.js +342 -337
  67. package/dist/billing/modules/plans/pages/PlanEditPage.js.map +1 -1
  68. package/dist/billing/modules/plans/pages/PlansBrowsePage.js +38 -53
  69. package/dist/billing/modules/plans/pages/PlansBrowsePage.js.map +1 -1
  70. package/dist/billing/modules/plans/pages/PlansListPage.js +60 -75
  71. package/dist/billing/modules/plans/pages/PlansListPage.js.map +1 -1
  72. package/dist/billing/modules/promotions/pages/CreatePromotionPage.js +242 -237
  73. package/dist/billing/modules/promotions/pages/CreatePromotionPage.js.map +1 -1
  74. package/dist/billing/modules/promotions/pages/PromotionsListPage.js +29 -39
  75. package/dist/billing/modules/promotions/pages/PromotionsListPage.js.map +1 -1
  76. package/dist/billing/modules/quota/pages/QuotaPage.js +1 -0
  77. package/dist/billing/modules/quota/pages/QuotaTemplateCreatePage.js +299 -294
  78. package/dist/billing/modules/quota/pages/QuotaTemplateCreatePage.js.map +1 -1
  79. package/dist/billing/modules/quota/pages/QuotaTemplateDetailPage.js +191 -186
  80. package/dist/billing/modules/quota/pages/QuotaTemplateDetailPage.js.map +1 -1
  81. package/dist/billing/modules/quota/pages/QuotaTemplateEditPage.js +308 -303
  82. package/dist/billing/modules/quota/pages/QuotaTemplateEditPage.js.map +1 -1
  83. package/dist/billing/modules/quota/pages/QuotaTemplatesListPage.js +57 -78
  84. package/dist/billing/modules/quota/pages/QuotaTemplatesListPage.js.map +1 -1
  85. package/dist/billing/modules/settings/pages/SettingsPage.js +79 -78
  86. package/dist/billing/modules/settings/pages/SettingsPage.js.map +1 -1
  87. package/dist/billing/modules/settings/pages/TeamPermissionsPage.js +15 -13
  88. package/dist/billing/modules/settings/pages/TeamPermissionsPage.js.map +1 -1
  89. package/dist/billing/modules/subscriptions/pages/SubscriptionDetailPage.js +338 -299
  90. package/dist/billing/modules/subscriptions/pages/SubscriptionDetailPage.js.map +1 -1
  91. package/dist/billing/modules/subscriptions/pages/SubscriptionsListPage.js +82 -103
  92. package/dist/billing/modules/subscriptions/pages/SubscriptionsListPage.js.map +1 -1
  93. package/dist/billing/modules/subscriptions/pages/UpgradeSubscriptionPage.js +59 -54
  94. package/dist/billing/modules/subscriptions/pages/UpgradeSubscriptionPage.js.map +1 -1
  95. package/dist/billing/modules/usage/pages/UsagePage.js +172 -215
  96. package/dist/billing/modules/usage/pages/UsagePage.js.map +1 -1
  97. package/package.json +2 -2
  98. package/dist/billing/lib/native-purchases.js.map +0 -1
@@ -9,322 +9,327 @@ import "../hooks/index.js";
9
9
  import { useState as s } from "react";
10
10
  import { jsx as c, jsxs as l } from "react/jsx-runtime";
11
11
  import { useI18n as u } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
12
+ import { PagePurpose as d } from "@burdenoff/fe-libs/ui";
12
13
  //#region src/billing/modules/quota/pages/QuotaTemplateCreatePage.tsx
13
- var d = () => {
14
- let { t: d } = u(), f = (e, t) => {
15
- let n = d(e);
14
+ var f = () => {
15
+ let { t: f } = u(), p = (e, t) => {
16
+ let n = f(e);
16
17
  return n === e ? t : n;
17
- }, p = a(), m = i(), { createQuota: h, isCreating: g } = o(), [_, v] = s(""), [y, b] = s(""), [x, S] = s(""), [C, w] = s("numeric"), [T, E] = s(""), [D, O] = s(""), [k, A] = s(r.PRODUCT_SPECIFIC), [j, M] = s(!1), [N, P] = s(n.NEVER), [F, I] = s(null), [L, R] = s(!1);
18
- return m.canManageQuotas ? /* @__PURE__ */ l("div", {
18
+ }, m = a(), h = i(), { createQuota: g, isCreating: _ } = o(), [v, y] = s(""), [b, x] = s(""), [S, C] = s(""), [w, T] = s("numeric"), [E, D] = s(""), [O, k] = s(""), [A, j] = s(r.PRODUCT_SPECIFIC), [M, N] = s(!1), [P, F] = s(n.NEVER), [I, L] = s(null), [R, z] = s(!1);
19
+ return h.canManageQuotas ? /* @__PURE__ */ l("div", {
19
20
  className: "space-y-6 p-6",
20
- children: [/* @__PURE__ */ c(t, {
21
- title: "Create New Quota",
22
- description: "Set up a new quota template"
23
- }), /* @__PURE__ */ l("form", {
24
- onSubmit: async (e) => {
25
- if (e.preventDefault(), I(null), R(!1), !_.trim()) {
26
- I("Quota name is required");
27
- return;
28
- }
29
- if (!T || isNaN(Number(T)) || Number(T) < 0) {
30
- I("Valid limit value is required");
31
- return;
32
- }
33
- if (!D.trim()) {
34
- I("Unit is required (e.g., bots, GB, seats)");
35
- return;
36
- }
37
- let t = {
38
- name: _.trim(),
39
- limits: {
40
- type: C,
41
- value: Number(T),
42
- unit: D.trim()
43
- },
44
- quotaType: k,
45
- reusable: j,
46
- resetPeriod: N,
47
- context: {
48
- displayName: y.trim() || _.trim(),
49
- description: x.trim()
21
+ children: [
22
+ /* @__PURE__ */ c(t, {
23
+ title: "Create New Quota",
24
+ description: "Set up a new quota template"
25
+ }),
26
+ /* @__PURE__ */ c(d, { children: "Define a reusable limit — its name, type (pooled or product-specific), unit and default value — that you can then attach to any number of plans and add-ons. Build the template once here instead of redefining the same limit on every plan." }),
27
+ /* @__PURE__ */ l("form", {
28
+ onSubmit: async (e) => {
29
+ if (e.preventDefault(), L(null), z(!1), !v.trim()) {
30
+ L("Quota name is required");
31
+ return;
50
32
  }
51
- };
52
- try {
53
- await h(t), R(!0), setTimeout(() => p("/quotas"), 1500);
54
- } catch (e) {
55
- I(e instanceof Error ? e.message : "Failed to create quota");
56
- }
57
- },
58
- className: "max-w-2xl space-y-6",
59
- children: [
60
- F && /* @__PURE__ */ c("div", {
61
- className: "p-4 bg-status-error-bg-subtle border border-border-subtle rounded-lg",
62
- children: /* @__PURE__ */ c("p", {
63
- className: "text-sm text-status-error-text",
64
- children: F
65
- })
66
- }),
67
- L && /* @__PURE__ */ c("div", {
68
- className: "p-4 bg-status-success-bg-subtle border border-border-subtle rounded-lg",
69
- children: /* @__PURE__ */ c("p", {
70
- className: "text-sm text-status-success-text",
71
- children: "Quota created successfully! Redirecting…"
72
- })
73
- }),
74
- /* @__PURE__ */ l("div", {
75
- className: "border border-border-seam rounded-card bg-bg-surface overflow-hidden shadow-[var(--shadow-elevation-1)]",
76
- children: [/* @__PURE__ */ c("div", {
77
- className: "p-4 border-b border-border-subtle bg-bg-sunken/30",
78
- children: /* @__PURE__ */ c("h2", {
79
- className: "font-semibold text-text-primary",
80
- children: "Basic Information"
33
+ if (!E || isNaN(Number(E)) || Number(E) < 0) {
34
+ L("Valid limit value is required");
35
+ return;
36
+ }
37
+ if (!O.trim()) {
38
+ L("Unit is required (e.g., bots, GB, seats)");
39
+ return;
40
+ }
41
+ let t = {
42
+ name: v.trim(),
43
+ limits: {
44
+ type: w,
45
+ value: Number(E),
46
+ unit: O.trim()
47
+ },
48
+ quotaType: A,
49
+ reusable: M,
50
+ resetPeriod: P,
51
+ context: {
52
+ displayName: b.trim() || v.trim(),
53
+ description: S.trim()
54
+ }
55
+ };
56
+ try {
57
+ await g(t), z(!0), setTimeout(() => m("/quotas"), 1500);
58
+ } catch (e) {
59
+ L(e instanceof Error ? e.message : "Failed to create quota");
60
+ }
61
+ },
62
+ className: "max-w-2xl space-y-6",
63
+ children: [
64
+ I && /* @__PURE__ */ c("div", {
65
+ className: "p-4 bg-status-error-bg-subtle border border-border-subtle rounded-lg",
66
+ children: /* @__PURE__ */ c("p", {
67
+ className: "text-sm text-status-error-text",
68
+ children: I
81
69
  })
82
- }), /* @__PURE__ */ l("div", {
83
- className: "p-4 space-y-4",
84
- children: [
85
- /* @__PURE__ */ l("div", { children: [
86
- /* @__PURE__ */ c("label", {
87
- htmlFor: "name",
88
- className: "block text-sm font-medium text-text-primary mb-1",
89
- children: "Quota Key *"
90
- }),
91
- /* @__PURE__ */ c("input", {
92
- id: "name",
93
- type: "text",
94
- value: _,
95
- onChange: (e) => v(e.target.value),
96
- className: "w-full px-3 py-2 border border-border-subtle rounded-input bg-bg-surface text-text-primary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)] font-mono text-sm",
97
- placeholder: "e.g., sessions-started, tunnels-created",
98
- required: !0
99
- }),
100
- /* @__PURE__ */ l("p", {
101
- className: "text-xs text-text-muted mt-1",
102
- children: [
103
- "Internal machine key, must match the ",
104
- /* @__PURE__ */ c("code", { children: "quotaName" }),
105
- " used in",
106
- " ",
107
- /* @__PURE__ */ c("code", { children: "@usage" }),
108
- " directives. Never shown to users."
109
- ]
110
- })
111
- ] }),
112
- /* @__PURE__ */ l("div", { children: [
113
- /* @__PURE__ */ c("label", {
114
- htmlFor: "displayName",
115
- className: "block text-sm font-medium text-text-primary mb-1",
116
- children: "Display Name *"
117
- }),
118
- /* @__PURE__ */ c("input", {
119
- id: "displayName",
120
- type: "text",
121
- value: y,
122
- onChange: (e) => b(e.target.value),
123
- className: "w-full px-3 py-2 border border-border-subtle rounded-input bg-bg-surface text-text-primary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]",
124
- placeholder: "e.g., Tunnels, Session Starts, Webhooks",
125
- required: !0
126
- }),
127
- /* @__PURE__ */ c("p", {
128
- className: "text-xs text-text-muted mt-1",
129
- children: "Human-readable name shown to users in billing and usage UI."
130
- })
131
- ] }),
132
- /* @__PURE__ */ l("div", { children: [
133
- /* @__PURE__ */ c("label", {
134
- htmlFor: "description",
135
- className: "block text-sm font-medium text-text-primary mb-1",
136
- children: "Description"
137
- }),
138
- /* @__PURE__ */ c("textarea", {
139
- id: "description",
140
- value: x,
141
- onChange: (e) => S(e.target.value),
142
- rows: 2,
143
- className: "w-full px-3 py-2 border border-border-subtle rounded-input bg-bg-surface text-text-primary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)] resize-none",
144
- placeholder: "e.g., Active tunnels created through VibeControls (slot freed on delete)"
145
- }),
146
- /* @__PURE__ */ c("p", {
147
- className: "text-xs text-text-muted mt-1",
148
- children: "Short explanation shown in billing and usage detail views."
149
- })
150
- ] }),
151
- /* @__PURE__ */ l("div", { children: [
152
- /* @__PURE__ */ c("label", {
153
- htmlFor: "quotaType",
154
- className: "block text-sm font-medium text-text-primary mb-1",
155
- children: "Quota Type *"
156
- }),
157
- /* @__PURE__ */ l("select", {
158
- id: "quotaType",
159
- value: k,
160
- onChange: (e) => A(e.target.value),
161
- className: "w-full px-3 py-2 border border-border-subtle rounded-input bg-bg-surface text-text-primary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]",
162
- children: [/* @__PURE__ */ c("option", {
163
- value: r.PRODUCT_SPECIFIC,
164
- children: "Product Specific"
165
- }), /* @__PURE__ */ c("option", {
166
- value: r.POOLED,
167
- children: "Pooled"
168
- })]
70
+ }),
71
+ R && /* @__PURE__ */ c("div", {
72
+ className: "p-4 bg-status-success-bg-subtle border border-border-subtle rounded-lg",
73
+ children: /* @__PURE__ */ c("p", {
74
+ className: "text-sm text-status-success-text",
75
+ children: "Quota created successfully! Redirecting…"
76
+ })
77
+ }),
78
+ /* @__PURE__ */ l("div", {
79
+ className: "border border-border-seam rounded-card bg-bg-surface overflow-hidden shadow-[var(--shadow-elevation-1)]",
80
+ children: [/* @__PURE__ */ c("div", {
81
+ className: "p-4 border-b border-border-subtle bg-bg-sunken/30",
82
+ children: /* @__PURE__ */ c("h2", {
83
+ className: "font-semibold text-text-primary",
84
+ children: "Basic Information"
85
+ })
86
+ }), /* @__PURE__ */ l("div", {
87
+ className: "p-4 space-y-4",
88
+ children: [
89
+ /* @__PURE__ */ l("div", { children: [
90
+ /* @__PURE__ */ c("label", {
91
+ htmlFor: "name",
92
+ className: "block text-sm font-medium text-text-primary mb-1",
93
+ children: "Quota Key *"
94
+ }),
95
+ /* @__PURE__ */ c("input", {
96
+ id: "name",
97
+ type: "text",
98
+ value: v,
99
+ onChange: (e) => y(e.target.value),
100
+ className: "w-full px-3 py-2 border border-border-subtle rounded-input bg-bg-surface text-text-primary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)] font-mono text-sm",
101
+ placeholder: "e.g., sessions-started, tunnels-created",
102
+ required: !0
103
+ }),
104
+ /* @__PURE__ */ l("p", {
105
+ className: "text-xs text-text-muted mt-1",
106
+ children: [
107
+ "Internal machine key, must match the ",
108
+ /* @__PURE__ */ c("code", { children: "quotaName" }),
109
+ " used in",
110
+ " ",
111
+ /* @__PURE__ */ c("code", { children: "@usage" }),
112
+ " directives. Never shown to users."
113
+ ]
114
+ })
115
+ ] }),
116
+ /* @__PURE__ */ l("div", { children: [
117
+ /* @__PURE__ */ c("label", {
118
+ htmlFor: "displayName",
119
+ className: "block text-sm font-medium text-text-primary mb-1",
120
+ children: "Display Name *"
121
+ }),
122
+ /* @__PURE__ */ c("input", {
123
+ id: "displayName",
124
+ type: "text",
125
+ value: b,
126
+ onChange: (e) => x(e.target.value),
127
+ className: "w-full px-3 py-2 border border-border-subtle rounded-input bg-bg-surface text-text-primary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]",
128
+ placeholder: "e.g., Tunnels, Session Starts, Webhooks",
129
+ required: !0
130
+ }),
131
+ /* @__PURE__ */ c("p", {
132
+ className: "text-xs text-text-muted mt-1",
133
+ children: "Human-readable name shown to users in billing and usage UI."
134
+ })
135
+ ] }),
136
+ /* @__PURE__ */ l("div", { children: [
137
+ /* @__PURE__ */ c("label", {
138
+ htmlFor: "description",
139
+ className: "block text-sm font-medium text-text-primary mb-1",
140
+ children: "Description"
141
+ }),
142
+ /* @__PURE__ */ c("textarea", {
143
+ id: "description",
144
+ value: S,
145
+ onChange: (e) => C(e.target.value),
146
+ rows: 2,
147
+ className: "w-full px-3 py-2 border border-border-subtle rounded-input bg-bg-surface text-text-primary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)] resize-none",
148
+ placeholder: "e.g., Active tunnels created through VibeControls (slot freed on delete)"
149
+ }),
150
+ /* @__PURE__ */ c("p", {
151
+ className: "text-xs text-text-muted mt-1",
152
+ children: "Short explanation shown in billing and usage detail views."
153
+ })
154
+ ] }),
155
+ /* @__PURE__ */ l("div", { children: [
156
+ /* @__PURE__ */ c("label", {
157
+ htmlFor: "quotaType",
158
+ className: "block text-sm font-medium text-text-primary mb-1",
159
+ children: "Quota Type *"
160
+ }),
161
+ /* @__PURE__ */ l("select", {
162
+ id: "quotaType",
163
+ value: A,
164
+ onChange: (e) => j(e.target.value),
165
+ className: "w-full px-3 py-2 border border-border-subtle rounded-input bg-bg-surface text-text-primary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]",
166
+ children: [/* @__PURE__ */ c("option", {
167
+ value: r.PRODUCT_SPECIFIC,
168
+ children: "Product Specific"
169
+ }), /* @__PURE__ */ c("option", {
170
+ value: r.POOLED,
171
+ children: "Pooled"
172
+ })]
173
+ }),
174
+ /* @__PURE__ */ c("p", {
175
+ className: "text-xs text-text-muted mt-1",
176
+ children: A === r.POOLED ? "Shared across all products" : "Specific to individual products"
177
+ })
178
+ ] }),
179
+ /* @__PURE__ */ l("div", {
180
+ className: "flex items-center gap-3",
181
+ children: [/* @__PURE__ */ c("input", {
182
+ id: "reusable",
183
+ type: "checkbox",
184
+ checked: M,
185
+ onChange: (e) => N(e.target.checked),
186
+ className: "size-4 rounded border-border-subtle text-text-link focus:ring-[var(--color-focus-ring)]"
187
+ }), /* @__PURE__ */ l("div", { children: [/* @__PURE__ */ c("label", {
188
+ htmlFor: "reusable",
189
+ className: "text-sm font-medium text-text-primary",
190
+ children: "Reusable Quota"
191
+ }), /* @__PURE__ */ c("p", {
192
+ className: "text-xs text-text-muted",
193
+ children: "Enable for quotas like seats or bots that can be freed up"
194
+ })] })]
169
195
  }),
170
- /* @__PURE__ */ c("p", {
171
- className: "text-xs text-text-muted mt-1",
172
- children: k === r.POOLED ? "Shared across all products" : "Specific to individual products"
173
- })
174
- ] }),
175
- /* @__PURE__ */ l("div", {
176
- className: "flex items-center gap-3",
177
- children: [/* @__PURE__ */ c("input", {
178
- id: "reusable",
179
- type: "checkbox",
180
- checked: j,
181
- onChange: (e) => M(e.target.checked),
182
- className: "size-4 rounded border-border-subtle text-text-link focus:ring-[var(--color-focus-ring)]"
183
- }), /* @__PURE__ */ l("div", { children: [/* @__PURE__ */ c("label", {
184
- htmlFor: "reusable",
185
- className: "text-sm font-medium text-text-primary",
186
- children: "Reusable Quota"
187
- }), /* @__PURE__ */ c("p", {
188
- className: "text-xs text-text-muted",
189
- children: "Enable for quotas like seats or bots that can be freed up"
190
- })] })]
191
- }),
192
- /* @__PURE__ */ l("div", { children: [
193
- /* @__PURE__ */ c("label", {
194
- htmlFor: "resetPeriod",
196
+ /* @__PURE__ */ l("div", { children: [
197
+ /* @__PURE__ */ c("label", {
198
+ htmlFor: "resetPeriod",
199
+ className: "block text-sm font-medium text-text-primary mb-1",
200
+ children: "Reset Period"
201
+ }),
202
+ /* @__PURE__ */ l("select", {
203
+ id: "resetPeriod",
204
+ value: P,
205
+ onChange: (e) => F(e.target.value),
206
+ className: "w-full px-3 py-2 border border-border-subtle rounded-input bg-bg-surface text-text-primary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]",
207
+ children: [
208
+ /* @__PURE__ */ c("option", {
209
+ value: n.NEVER,
210
+ children: "Never (one-time limit)"
211
+ }),
212
+ /* @__PURE__ */ c("option", {
213
+ value: n.DAILY,
214
+ children: "Daily (resets every day)"
215
+ }),
216
+ /* @__PURE__ */ c("option", {
217
+ value: n.MONTHLY,
218
+ children: "Monthly (resets every month)"
219
+ })
220
+ ]
221
+ }),
222
+ /* @__PURE__ */ c("p", {
223
+ className: "text-xs text-text-muted mt-1",
224
+ children: "How often the quota usage counter is reset to zero"
225
+ })
226
+ ] })
227
+ ]
228
+ })]
229
+ }),
230
+ /* @__PURE__ */ l("div", {
231
+ className: "border border-border-seam rounded-card bg-bg-surface overflow-hidden shadow-[var(--shadow-elevation-1)]",
232
+ children: [/* @__PURE__ */ c("div", {
233
+ className: "p-4 border-b border-border-subtle bg-bg-sunken/30",
234
+ children: /* @__PURE__ */ c("h2", {
235
+ className: "font-semibold text-text-primary",
236
+ children: "Limits Configuration"
237
+ })
238
+ }), /* @__PURE__ */ l("div", {
239
+ className: "p-4 space-y-4",
240
+ children: [
241
+ /* @__PURE__ */ l("div", { children: [/* @__PURE__ */ c("label", {
242
+ htmlFor: "limitType",
195
243
  className: "block text-sm font-medium text-text-primary mb-1",
196
- children: "Reset Period"
197
- }),
198
- /* @__PURE__ */ l("select", {
199
- id: "resetPeriod",
200
- value: N,
201
- onChange: (e) => P(e.target.value),
244
+ children: "Limit Type *"
245
+ }), /* @__PURE__ */ l("select", {
246
+ id: "limitType",
247
+ value: w,
248
+ onChange: (e) => T(e.target.value),
202
249
  className: "w-full px-3 py-2 border border-border-subtle rounded-input bg-bg-surface text-text-primary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]",
203
250
  children: [
204
251
  /* @__PURE__ */ c("option", {
205
- value: n.NEVER,
206
- children: "Never (one-time limit)"
252
+ value: "numeric",
253
+ children: "Numeric (count)"
254
+ }),
255
+ /* @__PURE__ */ c("option", {
256
+ value: "storage",
257
+ children: "Storage (bytes)"
207
258
  }),
208
259
  /* @__PURE__ */ c("option", {
209
- value: n.DAILY,
210
- children: "Daily (resets every day)"
260
+ value: "duration",
261
+ children: "Duration (seconds)"
211
262
  }),
212
263
  /* @__PURE__ */ c("option", {
213
- value: n.MONTHLY,
214
- children: "Monthly (resets every month)"
264
+ value: "percentage",
265
+ children: "Percentage"
215
266
  })
216
267
  ]
217
- }),
218
- /* @__PURE__ */ c("p", {
219
- className: "text-xs text-text-muted mt-1",
220
- children: "How often the quota usage counter is reset to zero"
221
- })
222
- ] })
223
- ]
224
- })]
225
- }),
226
- /* @__PURE__ */ l("div", {
227
- className: "border border-border-seam rounded-card bg-bg-surface overflow-hidden shadow-[var(--shadow-elevation-1)]",
228
- children: [/* @__PURE__ */ c("div", {
229
- className: "p-4 border-b border-border-subtle bg-bg-sunken/30",
230
- children: /* @__PURE__ */ c("h2", {
231
- className: "font-semibold text-text-primary",
232
- children: "Limits Configuration"
233
- })
234
- }), /* @__PURE__ */ l("div", {
235
- className: "p-4 space-y-4",
236
- children: [
237
- /* @__PURE__ */ l("div", { children: [/* @__PURE__ */ c("label", {
238
- htmlFor: "limitType",
239
- className: "block text-sm font-medium text-text-primary mb-1",
240
- children: "Limit Type *"
241
- }), /* @__PURE__ */ l("select", {
242
- id: "limitType",
243
- value: C,
244
- onChange: (e) => w(e.target.value),
245
- className: "w-full px-3 py-2 border border-border-subtle rounded-input bg-bg-surface text-text-primary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]",
246
- children: [
247
- /* @__PURE__ */ c("option", {
248
- value: "numeric",
249
- children: "Numeric (count)"
268
+ })] }),
269
+ /* @__PURE__ */ l("div", { children: [
270
+ /* @__PURE__ */ c("label", {
271
+ htmlFor: "limitValue",
272
+ className: "block text-sm font-medium text-text-primary mb-1",
273
+ children: "Limit Value *"
250
274
  }),
251
- /* @__PURE__ */ c("option", {
252
- value: "storage",
253
- children: "Storage (bytes)"
275
+ /* @__PURE__ */ c("input", {
276
+ id: "limitValue",
277
+ type: "number",
278
+ min: "0",
279
+ value: E,
280
+ onChange: (e) => D(e.target.value),
281
+ className: "w-full px-3 py-2 border border-border-subtle rounded-input bg-bg-surface text-text-primary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]",
282
+ placeholder: "1000",
283
+ required: !0
284
+ }),
285
+ /* @__PURE__ */ c("p", {
286
+ className: "text-xs text-text-muted mt-1",
287
+ children: "The maximum limit value for this quota"
288
+ })
289
+ ] }),
290
+ /* @__PURE__ */ l("div", { children: [
291
+ /* @__PURE__ */ c("label", {
292
+ htmlFor: "unit",
293
+ className: "block text-sm font-medium text-text-primary mb-1",
294
+ children: "Unit *"
254
295
  }),
255
- /* @__PURE__ */ c("option", {
256
- value: "duration",
257
- children: "Duration (seconds)"
296
+ /* @__PURE__ */ c("input", {
297
+ id: "unit",
298
+ type: "text",
299
+ value: O,
300
+ onChange: (e) => k(e.target.value),
301
+ className: "w-full px-3 py-2 border border-border-subtle rounded-input bg-bg-surface text-text-primary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]",
302
+ placeholder: "e.g., bots, GB, MB, seats, workflow runs",
303
+ required: !0
258
304
  }),
259
- /* @__PURE__ */ c("option", {
260
- value: "percentage",
261
- children: "Percentage"
305
+ /* @__PURE__ */ c("p", {
306
+ className: "text-xs text-text-muted mt-1",
307
+ children: "The unit of measurement displayed with usage values (e.g., \"2/6 bots\")"
262
308
  })
263
- ]
264
- })] }),
265
- /* @__PURE__ */ l("div", { children: [
266
- /* @__PURE__ */ c("label", {
267
- htmlFor: "limitValue",
268
- className: "block text-sm font-medium text-text-primary mb-1",
269
- children: "Limit Value *"
270
- }),
271
- /* @__PURE__ */ c("input", {
272
- id: "limitValue",
273
- type: "number",
274
- min: "0",
275
- value: T,
276
- onChange: (e) => E(e.target.value),
277
- className: "w-full px-3 py-2 border border-border-subtle rounded-input bg-bg-surface text-text-primary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]",
278
- placeholder: "1000",
279
- required: !0
280
- }),
281
- /* @__PURE__ */ c("p", {
282
- className: "text-xs text-text-muted mt-1",
283
- children: "The maximum limit value for this quota"
284
- })
285
- ] }),
286
- /* @__PURE__ */ l("div", { children: [
287
- /* @__PURE__ */ c("label", {
288
- htmlFor: "unit",
289
- className: "block text-sm font-medium text-text-primary mb-1",
290
- children: "Unit *"
291
- }),
292
- /* @__PURE__ */ c("input", {
293
- id: "unit",
294
- type: "text",
295
- value: D,
296
- onChange: (e) => O(e.target.value),
297
- className: "w-full px-3 py-2 border border-border-subtle rounded-input bg-bg-surface text-text-primary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]",
298
- placeholder: "e.g., bots, GB, MB, seats, workflow runs",
299
- required: !0
300
- }),
301
- /* @__PURE__ */ c("p", {
302
- className: "text-xs text-text-muted mt-1",
303
- children: "The unit of measurement displayed with usage values (e.g., \"2/6 bots\")"
304
- })
305
- ] })
306
- ]
307
- })]
308
- }),
309
- /* @__PURE__ */ l("div", {
310
- className: "flex items-center gap-3 pt-4",
311
- children: [/* @__PURE__ */ c("button", {
312
- type: "submit",
313
- disabled: g,
314
- className: "px-6 py-2 text-sm font-medium bg-action-primary-bg text-action-primary-text rounded-button hover:bg-action-primary-bgHover transition-colors disabled:opacity-50",
315
- children: g ? f("billing.quota.creating", "Creating...") : f("billing.quota.createQuota", "Create Quota")
316
- }), /* @__PURE__ */ c("button", {
317
- type: "button",
318
- onClick: () => p("/quotas"),
319
- className: "px-6 py-2 text-sm font-medium border border-border-subtle text-text-primary rounded-button hover:bg-bg-sunken transition-colors",
320
- children: "Cancel"
321
- })]
322
- })
323
- ]
324
- })]
309
+ ] })
310
+ ]
311
+ })]
312
+ }),
313
+ /* @__PURE__ */ l("div", {
314
+ className: "flex items-center gap-3 pt-4",
315
+ children: [/* @__PURE__ */ c("button", {
316
+ type: "submit",
317
+ disabled: _,
318
+ className: "px-6 py-2 text-sm font-medium bg-action-primary-bg text-action-primary-text rounded-button hover:bg-action-primary-bgHover transition-colors disabled:opacity-50",
319
+ children: _ ? p("billing.quota.creating", "Creating...") : p("billing.quota.createQuota", "Create Quota")
320
+ }), /* @__PURE__ */ c("button", {
321
+ type: "button",
322
+ onClick: () => m("/quotas"),
323
+ className: "px-6 py-2 text-sm font-medium border border-border-subtle text-text-primary rounded-button hover:bg-bg-sunken transition-colors",
324
+ children: "Cancel"
325
+ })]
326
+ })
327
+ ]
328
+ })
329
+ ]
325
330
  }) : /* @__PURE__ */ c(e, { message: "You don't have permission to create quotas." });
326
331
  };
327
332
  //#endregion
328
- export { d as QuotaTemplateCreatePage };
333
+ export { f as QuotaTemplateCreatePage };
329
334
 
330
335
  //# sourceMappingURL=QuotaTemplateCreatePage.js.map