@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.
- package/dist/billing/BillingAdminRoutes.js +7 -6
- package/dist/billing/BillingAdminRoutes.js.map +1 -1
- package/dist/billing/BillingRoot.js +1 -1
- package/dist/billing/BillingRoot.js.map +1 -1
- package/dist/billing/modules/addons/components/FloatingCartDrawer.js +22 -22
- package/dist/billing/modules/addons/components/FloatingCartDrawer.js.map +1 -1
- package/dist/billing/modules/addons/pages/AddonCreatePage.js +31 -31
- package/dist/billing/modules/addons/pages/AddonCreatePage.js.map +1 -1
- package/dist/billing/modules/addons/pages/AddonDetailPage.js +39 -39
- package/dist/billing/modules/addons/pages/AddonDetailPage.js.map +1 -1
- package/dist/billing/modules/addons/pages/AddonEditPage.js +29 -29
- package/dist/billing/modules/addons/pages/AddonEditPage.js.map +1 -1
- package/dist/billing/modules/addons/pages/AddonsListPage.js +91 -91
- package/dist/billing/modules/addons/pages/AddonsListPage.js.map +1 -1
- package/dist/billing/modules/analytics/pages/AnalyticsPage.js +40 -40
- package/dist/billing/modules/analytics/pages/AnalyticsPage.js.map +1 -1
- package/dist/billing/modules/billing/pages/InvoiceDetailPage.js +115 -115
- package/dist/billing/modules/billing/pages/InvoiceDetailPage.js.map +1 -1
- package/dist/billing/modules/billing/pages/InvoicesListPage.js +75 -72
- package/dist/billing/modules/billing/pages/InvoicesListPage.js.map +1 -1
- package/dist/billing/modules/billing/pages/RefundsPage.js +126 -126
- package/dist/billing/modules/billing/pages/RefundsPage.js.map +1 -1
- package/dist/billing/modules/billing/pages/UserRefundsPage.js +45 -45
- package/dist/billing/modules/billing/pages/UserRefundsPage.js.map +1 -1
- package/dist/billing/modules/checkout/components/BillingAccountSelector.js +25 -25
- package/dist/billing/modules/checkout/components/BillingAccountSelector.js.map +1 -1
- package/dist/billing/modules/checkout/components/CompleteBillingAccountModal.js +31 -35
- package/dist/billing/modules/checkout/components/CompleteBillingAccountModal.js.map +1 -1
- package/dist/billing/modules/checkout/components/CreditsAmountInput.js +9 -9
- package/dist/billing/modules/checkout/components/CreditsAmountInput.js.map +1 -1
- package/dist/billing/modules/checkout/components/OrderSummary.js +31 -31
- package/dist/billing/modules/checkout/components/OrderSummary.js.map +1 -1
- package/dist/billing/modules/checkout/components/PromoCodeInput.js +8 -8
- package/dist/billing/modules/checkout/components/PromoCodeInput.js.map +1 -1
- package/dist/billing/modules/checkout/components/RazorpayPaymentButton.js +5 -5
- package/dist/billing/modules/checkout/components/RazorpayPaymentButton.js.map +1 -1
- package/dist/billing/modules/checkout/components/SimpleAutoPayToggle.js +9 -9
- package/dist/billing/modules/checkout/components/SimpleAutoPayToggle.js.map +1 -1
- package/dist/billing/modules/checkout/components/StripePaymentForm.js +21 -21
- package/dist/billing/modules/checkout/components/StripePaymentForm.js.map +1 -1
- package/dist/billing/modules/checkout/components/SubscriptionSelector.js +11 -11
- package/dist/billing/modules/checkout/components/SubscriptionSelector.js.map +1 -1
- package/dist/billing/modules/checkout/components/UnifiedPaymentMethodSelector.js +31 -31
- package/dist/billing/modules/checkout/components/UnifiedPaymentMethodSelector.js.map +1 -1
- package/dist/billing/modules/checkout/components/WorkspaceQuotaAssignmentModal.js +23 -23
- package/dist/billing/modules/checkout/components/WorkspaceQuotaAssignmentModal.js.map +1 -1
- package/dist/billing/modules/checkout/pages/CheckoutPage.js +91 -91
- package/dist/billing/modules/checkout/pages/CheckoutPage.js.map +1 -1
- package/dist/billing/modules/coupons/pages/CouponDetailPage.js +62 -62
- package/dist/billing/modules/coupons/pages/CouponDetailPage.js.map +1 -1
- package/dist/billing/modules/coupons/pages/CouponsListPage.js +72 -60
- package/dist/billing/modules/coupons/pages/CouponsListPage.js.map +1 -1
- package/dist/billing/modules/coupons/pages/CreateCouponPage.js +66 -66
- package/dist/billing/modules/coupons/pages/CreateCouponPage.js.map +1 -1
- package/dist/billing/modules/coupons/pages/EditCouponPage.js +46 -46
- package/dist/billing/modules/coupons/pages/EditCouponPage.js.map +1 -1
- package/dist/billing/modules/credits/pages/AdminCreditsPage.js +19 -19
- package/dist/billing/modules/credits/pages/AdminCreditsPage.js.map +1 -1
- package/dist/billing/modules/credits/pages/CreditTransactionsPage.js +37 -37
- package/dist/billing/modules/credits/pages/CreditTransactionsPage.js.map +1 -1
- package/dist/billing/modules/credits/pages/CreditWithdrawalPage.js +90 -90
- package/dist/billing/modules/credits/pages/CreditWithdrawalPage.js.map +1 -1
- package/dist/billing/modules/credits/pages/CreditsPage.js +41 -41
- package/dist/billing/modules/credits/pages/CreditsPage.js.map +1 -1
- package/dist/billing/modules/dashboard/components/ActiveSubscriptionCard.js +31 -31
- package/dist/billing/modules/dashboard/components/ActiveSubscriptionCard.js.map +1 -1
- package/dist/billing/modules/dashboard/components/AddPaymentMethodModal.js +35 -35
- package/dist/billing/modules/dashboard/components/AddPaymentMethodModal.js.map +1 -1
- package/dist/billing/modules/dashboard/components/BillingAccountCard.js +24 -24
- package/dist/billing/modules/dashboard/components/BillingAccountCard.js.map +1 -1
- package/dist/billing/modules/dashboard/components/CreateBillingAccountModal.js +99 -99
- package/dist/billing/modules/dashboard/components/CreateBillingAccountModal.js.map +1 -1
- package/dist/billing/modules/dashboard/components/PaymentMethodsSection.js +23 -23
- package/dist/billing/modules/dashboard/components/PaymentMethodsSection.js.map +1 -1
- package/dist/billing/modules/dashboard/components/RecommendedAddonsSection.js +22 -22
- package/dist/billing/modules/dashboard/components/RecommendedAddonsSection.js.map +1 -1
- package/dist/billing/modules/dashboard/pages/OverviewPage.js +58 -58
- package/dist/billing/modules/dashboard/pages/OverviewPage.js.map +1 -1
- package/dist/billing/modules/discounts/pages/DiscountsListPage.js +126 -126
- package/dist/billing/modules/discounts/pages/DiscountsListPage.js.map +1 -1
- package/dist/billing/modules/earnings/pages/PayoutAdminPage.js +83 -79
- package/dist/billing/modules/earnings/pages/PayoutAdminPage.js.map +1 -1
- package/dist/billing/modules/plans/pages/PlanAssignFreePage.js +16 -16
- package/dist/billing/modules/plans/pages/PlanAssignFreePage.js.map +1 -1
- package/dist/billing/modules/plans/pages/PlanBrowseDetailPage.js +40 -40
- package/dist/billing/modules/plans/pages/PlanBrowseDetailPage.js.map +1 -1
- package/dist/billing/modules/plans/pages/PlanCreatePage.js +35 -35
- package/dist/billing/modules/plans/pages/PlanCreatePage.js.map +1 -1
- package/dist/billing/modules/plans/pages/PlanDetailPage.js +57 -57
- package/dist/billing/modules/plans/pages/PlanDetailPage.js.map +1 -1
- package/dist/billing/modules/plans/pages/PlanEditPage.js +35 -35
- package/dist/billing/modules/plans/pages/PlanEditPage.js.map +1 -1
- package/dist/billing/modules/plans/pages/PlansBrowsePage.js +57 -57
- package/dist/billing/modules/plans/pages/PlansBrowsePage.js.map +1 -1
- package/dist/billing/modules/plans/pages/PlansListPage.js +52 -52
- package/dist/billing/modules/plans/pages/PlansListPage.js.map +1 -1
- package/dist/billing/modules/promotions/pages/CreatePromotionPage.js +40 -39
- package/dist/billing/modules/promotions/pages/CreatePromotionPage.js.map +1 -1
- package/dist/billing/modules/promotions/pages/PromotionsListPage.js +22 -19
- package/dist/billing/modules/promotions/pages/PromotionsListPage.js.map +1 -1
- package/dist/billing/modules/quota/pages/QuotaTemplateCreatePage.js +34 -34
- package/dist/billing/modules/quota/pages/QuotaTemplateCreatePage.js.map +1 -1
- package/dist/billing/modules/quota/pages/QuotaTemplateDetailPage.js +47 -47
- package/dist/billing/modules/quota/pages/QuotaTemplateDetailPage.js.map +1 -1
- package/dist/billing/modules/quota/pages/QuotaTemplateEditPage.js +39 -39
- package/dist/billing/modules/quota/pages/QuotaTemplateEditPage.js.map +1 -1
- package/dist/billing/modules/quota/pages/QuotaTemplatesListPage.js +52 -52
- package/dist/billing/modules/quota/pages/QuotaTemplatesListPage.js.map +1 -1
- package/dist/billing/modules/subscriptions/components/ManageSeatsModal.js +23 -23
- package/dist/billing/modules/subscriptions/components/ManageSeatsModal.js.map +1 -1
- package/dist/billing/modules/subscriptions/pages/SubscriptionDetailPage.js +259 -246
- package/dist/billing/modules/subscriptions/pages/SubscriptionDetailPage.js.map +1 -1
- package/dist/billing/modules/subscriptions/pages/SubscriptionsListPage.js +88 -85
- package/dist/billing/modules/subscriptions/pages/SubscriptionsListPage.js.map +1 -1
- package/dist/billing/modules/subscriptions/pages/UpgradeSubscriptionPage.js +51 -51
- package/dist/billing/modules/subscriptions/pages/UpgradeSubscriptionPage.js.map +1 -1
- package/dist/billing/modules/usage/pages/UsagePage.js +206 -196
- package/dist/billing/modules/usage/pages/UsagePage.js.map +1 -1
- package/dist/billing/shared/components/ServerError.js +4 -4
- package/dist/billing/shared/components/ServerError.js.map +1 -1
- package/dist/billing/shared/components/StatCard.js +11 -33
- package/dist/billing/shared/components/StatCard.js.map +1 -1
- package/dist/billing/shared/ui/Card.js +15 -0
- package/dist/billing/shared/ui/Card.js.map +1 -0
- package/dist/billing/shared/ui/MetricCard.js +44 -0
- package/dist/billing/shared/ui/MetricCard.js.map +1 -0
- package/dist/billing/shared/ui/ProgressBar.js +30 -0
- package/dist/billing/shared/ui/ProgressBar.js.map +1 -0
- package/dist/billing/shared/ui/SectionHeader.js +2 -0
- package/dist/billing/shared/ui/StatusPill.js +28 -0
- package/dist/billing/shared/ui/StatusPill.js.map +1 -0
- package/dist/billing/shared/ui/index.js +5 -0
- package/dist/billing/shared/utils/tokens.js +13 -30
- package/dist/billing/shared/utils/tokens.js.map +1 -1
- package/package.json +1 -1
|
@@ -115,7 +115,7 @@ var g = {
|
|
|
115
115
|
return b && U.length === 0 ? /* @__PURE__ */ f("div", {
|
|
116
116
|
className: "space-y-6 p-6",
|
|
117
117
|
children: [
|
|
118
|
-
/* @__PURE__ */ d("div", { className: "h-8 w-48 bg-
|
|
118
|
+
/* @__PURE__ */ d("div", { className: "h-8 w-48 bg-bg-sunken animate-pulse rounded" }),
|
|
119
119
|
/* @__PURE__ */ d("div", {
|
|
120
120
|
className: "grid grid-cols-1 sm:grid-cols-3 gap-4",
|
|
121
121
|
children: [
|
|
@@ -123,8 +123,8 @@ var g = {
|
|
|
123
123
|
2,
|
|
124
124
|
3
|
|
125
125
|
].map((e) => /* @__PURE__ */ f("div", {
|
|
126
|
-
className: "border border-border rounded-lg p-4 space-y-2",
|
|
127
|
-
children: [/* @__PURE__ */ d("div", { className: "h-4 w-24 bg-
|
|
126
|
+
className: "border border-border-subtle rounded-lg p-4 space-y-2",
|
|
127
|
+
children: [/* @__PURE__ */ d("div", { className: "h-4 w-24 bg-bg-sunken animate-pulse rounded" }), /* @__PURE__ */ d("div", { className: "h-6 w-16 bg-bg-sunken animate-pulse rounded" })]
|
|
128
128
|
}, e))
|
|
129
129
|
}),
|
|
130
130
|
/* @__PURE__ */ d("div", {
|
|
@@ -136,12 +136,12 @@ var g = {
|
|
|
136
136
|
4,
|
|
137
137
|
5
|
|
138
138
|
].map((e) => /* @__PURE__ */ d("div", {
|
|
139
|
-
className: "border border-border rounded-lg p-4",
|
|
139
|
+
className: "border border-border-subtle rounded-lg p-4",
|
|
140
140
|
children: /* @__PURE__ */ f("div", {
|
|
141
141
|
className: "flex items-center gap-4",
|
|
142
|
-
children: [/* @__PURE__ */ d("div", { className: "size-10 bg-
|
|
142
|
+
children: [/* @__PURE__ */ d("div", { className: "size-10 bg-bg-sunken animate-pulse rounded" }), /* @__PURE__ */ f("div", {
|
|
143
143
|
className: "flex-1 space-y-2",
|
|
144
|
-
children: [/* @__PURE__ */ d("div", { className: "h-4 w-32 bg-
|
|
144
|
+
children: [/* @__PURE__ */ d("div", { className: "h-4 w-32 bg-bg-sunken animate-pulse rounded" }), /* @__PURE__ */ d("div", { className: "h-3 w-48 bg-bg-sunken animate-pulse rounded" })]
|
|
145
145
|
})]
|
|
146
146
|
})
|
|
147
147
|
}, e))
|
|
@@ -153,9 +153,9 @@ var g = {
|
|
|
153
153
|
className: "text-center space-y-4",
|
|
154
154
|
children: [
|
|
155
155
|
/* @__PURE__ */ d("div", {
|
|
156
|
-
className: "size-12 mx-auto rounded-full bg-
|
|
156
|
+
className: "size-12 mx-auto rounded-full bg-status-error-bg-subtle flex items-center justify-center",
|
|
157
157
|
children: /* @__PURE__ */ d("svg", {
|
|
158
|
-
className: "size-6 text-
|
|
158
|
+
className: "size-6 text-status-error-text",
|
|
159
159
|
fill: "none",
|
|
160
160
|
viewBox: "0 0 24 24",
|
|
161
161
|
stroke: "currentColor",
|
|
@@ -168,17 +168,17 @@ var g = {
|
|
|
168
168
|
})
|
|
169
169
|
}),
|
|
170
170
|
/* @__PURE__ */ d("h2", {
|
|
171
|
-
className: "text-lg font-semibold text-
|
|
171
|
+
className: "text-lg font-semibold text-text-primary",
|
|
172
172
|
children: "Failed to load discounts"
|
|
173
173
|
}),
|
|
174
174
|
/* @__PURE__ */ d("p", {
|
|
175
|
-
className: "text-sm text-muted
|
|
175
|
+
className: "text-sm text-text-muted",
|
|
176
176
|
children: x.message
|
|
177
177
|
}),
|
|
178
178
|
/* @__PURE__ */ d("button", {
|
|
179
179
|
type: "button",
|
|
180
180
|
onClick: () => S(),
|
|
181
|
-
className: "px-4 py-2 text-sm font-medium bg-primary text-primary-
|
|
181
|
+
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",
|
|
182
182
|
children: "Try Again"
|
|
183
183
|
})
|
|
184
184
|
]
|
|
@@ -189,15 +189,15 @@ var g = {
|
|
|
189
189
|
/* @__PURE__ */ f("div", {
|
|
190
190
|
className: "flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between",
|
|
191
191
|
children: [/* @__PURE__ */ f("div", { children: [/* @__PURE__ */ d("h1", {
|
|
192
|
-
className: "text-2xl font-
|
|
192
|
+
className: "text-2xl md:text-3xl font-semibold tracking-tight text-text-primary",
|
|
193
193
|
children: "Discount Codes"
|
|
194
194
|
}), /* @__PURE__ */ d("p", {
|
|
195
|
-
className: "text-sm text-
|
|
195
|
+
className: "text-sm text-text-secondary mt-1",
|
|
196
196
|
children: "Create, view, and manage discount codes for billing"
|
|
197
197
|
})] }), /* @__PURE__ */ f("button", {
|
|
198
198
|
type: "button",
|
|
199
199
|
onClick: Z,
|
|
200
|
-
className: "inline-flex items-center gap-2 px-4 py-2 text-sm font-medium bg-primary text-primary-
|
|
200
|
+
className: "inline-flex items-center gap-2 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 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-focus-ring)]",
|
|
201
201
|
children: [/* @__PURE__ */ d("svg", {
|
|
202
202
|
className: "size-4",
|
|
203
203
|
fill: "none",
|
|
@@ -216,43 +216,43 @@ var g = {
|
|
|
216
216
|
className: "grid grid-cols-1 sm:grid-cols-3 gap-4",
|
|
217
217
|
children: [
|
|
218
218
|
/* @__PURE__ */ f("div", {
|
|
219
|
-
className: "border border-border
|
|
219
|
+
className: "rounded-card border border-border-subtle bg-bg-surface p-5 shadow-[var(--shadow-elevation-1)]",
|
|
220
220
|
children: [/* @__PURE__ */ d("p", {
|
|
221
|
-
className: "text-sm text-
|
|
221
|
+
className: "text-sm text-text-secondary",
|
|
222
222
|
children: "Total Discounts"
|
|
223
223
|
}), /* @__PURE__ */ d("p", {
|
|
224
|
-
className: "text-
|
|
224
|
+
className: "text-2xl font-semibold text-text-primary tabular-nums mt-1",
|
|
225
225
|
children: J
|
|
226
226
|
})]
|
|
227
227
|
}),
|
|
228
228
|
/* @__PURE__ */ f("div", {
|
|
229
|
-
className: "border border-border
|
|
229
|
+
className: "rounded-card border border-border-subtle bg-bg-surface p-5 shadow-[var(--shadow-elevation-1)]",
|
|
230
230
|
children: [/* @__PURE__ */ d("p", {
|
|
231
|
-
className: "text-sm text-
|
|
231
|
+
className: "text-sm text-text-secondary",
|
|
232
232
|
children: "Active"
|
|
233
233
|
}), /* @__PURE__ */ d("p", {
|
|
234
|
-
className: "text-
|
|
234
|
+
className: "text-2xl font-semibold text-status-success-text tabular-nums mt-1",
|
|
235
235
|
children: Y
|
|
236
236
|
})]
|
|
237
237
|
}),
|
|
238
238
|
/* @__PURE__ */ f("div", {
|
|
239
|
-
className: "border border-border
|
|
239
|
+
className: "rounded-card border border-border-subtle bg-bg-surface p-5 shadow-[var(--shadow-elevation-1)]",
|
|
240
240
|
children: [/* @__PURE__ */ d("p", {
|
|
241
|
-
className: "text-sm text-
|
|
241
|
+
className: "text-sm text-text-secondary",
|
|
242
242
|
children: "Expired"
|
|
243
243
|
}), /* @__PURE__ */ d("p", {
|
|
244
|
-
className: "text-
|
|
244
|
+
className: "text-2xl font-semibold text-status-warning-text tabular-nums mt-1",
|
|
245
245
|
children: X
|
|
246
246
|
})]
|
|
247
247
|
})
|
|
248
248
|
]
|
|
249
249
|
}),
|
|
250
250
|
/* @__PURE__ */ d("div", {
|
|
251
|
-
className: "flex flex-col sm:flex-row flex-wrap items-stretch sm:items-center gap-3 sm:gap-4 pb-4 border-b border-border",
|
|
251
|
+
className: "flex flex-col sm:flex-row flex-wrap items-stretch sm:items-center gap-3 sm:gap-4 pb-4 border-b border-border-subtle",
|
|
252
252
|
children: /* @__PURE__ */ f("div", {
|
|
253
253
|
className: "relative flex-1 min-w-0 w-full sm:max-w-md",
|
|
254
254
|
children: [/* @__PURE__ */ d("svg", {
|
|
255
|
-
className: "absolute left-3 top-1/2 -translate-y-1/2 size-4 text-muted
|
|
255
|
+
className: "absolute left-3 top-1/2 -translate-y-1/2 size-4 text-text-muted",
|
|
256
256
|
fill: "none",
|
|
257
257
|
viewBox: "0 0 24 24",
|
|
258
258
|
stroke: "currentColor",
|
|
@@ -267,14 +267,14 @@ var g = {
|
|
|
267
267
|
placeholder: "Search by discount code...",
|
|
268
268
|
value: k,
|
|
269
269
|
onChange: (e) => A(e.target.value),
|
|
270
|
-
className: "w-full pl-[3.25rem] pr-4 py-2 text-sm border border-border rounded-
|
|
270
|
+
className: "w-full pl-[3.25rem] pr-4 py-2 text-sm border border-border-subtle rounded-input bg-bg-surface text-text-primary placeholder:text-text-muted focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)] focus:border-transparent"
|
|
271
271
|
})]
|
|
272
272
|
})
|
|
273
273
|
}),
|
|
274
274
|
W.length > 0 && /* @__PURE__ */ f("div", {
|
|
275
|
-
className: "flex flex-col gap-3 rounded-lg border border-border bg-
|
|
275
|
+
className: "flex flex-col gap-3 rounded-lg border border-border-subtle bg-bg-surface p-4 sm:flex-row sm:items-center sm:justify-between",
|
|
276
276
|
children: [/* @__PURE__ */ f("label", {
|
|
277
|
-
className: "flex items-center gap-2 text-sm text-
|
|
277
|
+
className: "flex items-center gap-2 text-sm text-text-primary",
|
|
278
278
|
children: [/* @__PURE__ */ d("input", {
|
|
279
279
|
type: "checkbox",
|
|
280
280
|
checked: K,
|
|
@@ -283,13 +283,13 @@ var g = {
|
|
|
283
283
|
},
|
|
284
284
|
onChange: (e) => $(e.target.checked),
|
|
285
285
|
"aria-label": "Select all discounts",
|
|
286
|
-
className: "size-4 rounded border-border text-
|
|
286
|
+
className: "size-4 rounded border-border-subtle text-text-link"
|
|
287
287
|
}), /* @__PURE__ */ d("span", { children: "Select all visible" })]
|
|
288
288
|
}), /* @__PURE__ */ f("div", {
|
|
289
289
|
className: "flex items-center gap-2",
|
|
290
290
|
children: [
|
|
291
291
|
/* @__PURE__ */ f("span", {
|
|
292
|
-
className: "text-sm text-muted
|
|
292
|
+
className: "text-sm text-text-muted",
|
|
293
293
|
children: [z.size, " selected"]
|
|
294
294
|
}),
|
|
295
295
|
z.size > 0 && /* @__PURE__ */ d("button", {
|
|
@@ -297,25 +297,25 @@ var g = {
|
|
|
297
297
|
onClick: () => {
|
|
298
298
|
B(/* @__PURE__ */ new Set()), H(!1);
|
|
299
299
|
},
|
|
300
|
-
className: "text-sm text-muted
|
|
300
|
+
className: "text-sm text-text-muted hover:text-text-primary",
|
|
301
301
|
children: "Clear selection"
|
|
302
302
|
}),
|
|
303
303
|
/* @__PURE__ */ f("button", {
|
|
304
304
|
type: "button",
|
|
305
305
|
onClick: () => H(!0),
|
|
306
306
|
disabled: G.length === 0 || O,
|
|
307
|
-
className: "inline-flex items-center gap-2 px-3 py-2 text-sm font-medium border border-
|
|
307
|
+
className: "inline-flex items-center gap-2 px-3 py-2 text-sm font-medium border border-status-error-border text-status-error-text rounded-md hover:bg-status-error-bg-subtle transition-colors disabled:opacity-50",
|
|
308
308
|
children: ["Delete Selected", G.length > 0 ? ` (${G.length})` : ""]
|
|
309
309
|
})
|
|
310
310
|
]
|
|
311
311
|
})]
|
|
312
312
|
}),
|
|
313
313
|
V && G.length > 0 && /* @__PURE__ */ d("div", {
|
|
314
|
-
className: "rounded-lg border border-
|
|
314
|
+
className: "rounded-lg border border-status-error-border bg-status-error-bg-subtle p-4",
|
|
315
315
|
children: /* @__PURE__ */ f("div", {
|
|
316
316
|
className: "flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",
|
|
317
317
|
children: [/* @__PURE__ */ f("div", { children: [/* @__PURE__ */ f("p", {
|
|
318
|
-
className: "text-sm font-medium text-
|
|
318
|
+
className: "text-sm font-medium text-text-primary",
|
|
319
319
|
children: [
|
|
320
320
|
"Delete ",
|
|
321
321
|
G.length,
|
|
@@ -324,32 +324,32 @@ var g = {
|
|
|
324
324
|
"?"
|
|
325
325
|
]
|
|
326
326
|
}), /* @__PURE__ */ d("p", {
|
|
327
|
-
className: "text-sm text-muted
|
|
327
|
+
className: "text-sm text-text-muted",
|
|
328
328
|
children: "This action cannot be undone."
|
|
329
329
|
})] }), /* @__PURE__ */ f("div", {
|
|
330
330
|
className: "flex items-center gap-2",
|
|
331
331
|
children: [/* @__PURE__ */ d("button", {
|
|
332
332
|
type: "button",
|
|
333
333
|
onClick: () => H(!1),
|
|
334
|
-
className: "px-3 py-2 text-sm font-medium text-muted
|
|
334
|
+
className: "px-3 py-2 text-sm font-medium text-text-muted hover:text-text-primary",
|
|
335
335
|
children: "Cancel"
|
|
336
336
|
}), /* @__PURE__ */ d("button", {
|
|
337
337
|
type: "button",
|
|
338
338
|
onClick: se,
|
|
339
339
|
disabled: O,
|
|
340
|
-
className: "inline-flex items-center gap-2 rounded-
|
|
340
|
+
className: "inline-flex items-center gap-2 rounded-button bg-action-danger-bg px-3 py-2 text-sm font-medium text-action-danger-text hover:bg-action-danger-bgHover disabled:opacity-50",
|
|
341
341
|
children: "Confirm Delete"
|
|
342
342
|
})]
|
|
343
343
|
})]
|
|
344
344
|
})
|
|
345
345
|
}),
|
|
346
346
|
W.length === 0 ? /* @__PURE__ */ f("div", {
|
|
347
|
-
className: "flex flex-col items-center justify-center py-
|
|
347
|
+
className: "flex flex-col items-center justify-center py-16 border border-dashed border-border-subtle rounded-card bg-bg-surface",
|
|
348
348
|
children: [
|
|
349
349
|
/* @__PURE__ */ d("div", {
|
|
350
|
-
className: "size-12 rounded-full bg-
|
|
350
|
+
className: "size-12 rounded-full bg-[var(--color-accent-soft)] flex items-center justify-center mb-4",
|
|
351
351
|
children: /* @__PURE__ */ d("svg", {
|
|
352
|
-
className: "size-6 text-muted
|
|
352
|
+
className: "size-6 text-text-muted",
|
|
353
353
|
fill: "none",
|
|
354
354
|
viewBox: "0 0 24 24",
|
|
355
355
|
stroke: "currentColor",
|
|
@@ -362,31 +362,31 @@ var g = {
|
|
|
362
362
|
})
|
|
363
363
|
}),
|
|
364
364
|
/* @__PURE__ */ d("h3", {
|
|
365
|
-
className: "text-lg font-medium text-
|
|
365
|
+
className: "text-lg font-medium text-text-primary",
|
|
366
366
|
children: "No discount codes found"
|
|
367
367
|
}),
|
|
368
368
|
/* @__PURE__ */ d("p", {
|
|
369
|
-
className: "text-sm text-muted
|
|
369
|
+
className: "text-sm text-text-muted mt-1",
|
|
370
370
|
children: k ? "No discount codes match your search." : "Create your first discount code to get started."
|
|
371
371
|
}),
|
|
372
372
|
!k && /* @__PURE__ */ d("button", {
|
|
373
373
|
type: "button",
|
|
374
374
|
onClick: Z,
|
|
375
|
-
className: "mt-4 px-4 py-2 text-sm font-medium bg-primary text-primary-
|
|
375
|
+
className: "mt-4 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",
|
|
376
376
|
children: "Create your first discount"
|
|
377
377
|
})
|
|
378
378
|
]
|
|
379
379
|
}) : /* @__PURE__ */ d("div", {
|
|
380
|
-
className: "border border-border rounded-
|
|
380
|
+
className: "border border-border-subtle rounded-card overflow-hidden shadow-[var(--shadow-elevation-1)]",
|
|
381
381
|
children: /* @__PURE__ */ d("div", {
|
|
382
382
|
className: "overflow-x-auto",
|
|
383
383
|
children: /* @__PURE__ */ f("table", {
|
|
384
384
|
className: "w-full",
|
|
385
385
|
children: [/* @__PURE__ */ d("thead", {
|
|
386
|
-
className: "bg-
|
|
386
|
+
className: "sticky top-0 z-10 bg-bg-sunken border-b border-border-subtle",
|
|
387
387
|
children: /* @__PURE__ */ f("tr", { children: [
|
|
388
388
|
/* @__PURE__ */ d("th", {
|
|
389
|
-
className: "text-left px-4 py-3 text-
|
|
389
|
+
className: "text-left px-4 py-3 text-xs font-medium uppercase tracking-wide text-text-muted w-12",
|
|
390
390
|
children: /* @__PURE__ */ d("input", {
|
|
391
391
|
type: "checkbox",
|
|
392
392
|
checked: K,
|
|
@@ -395,44 +395,44 @@ var g = {
|
|
|
395
395
|
},
|
|
396
396
|
onChange: (e) => $(e.target.checked),
|
|
397
397
|
"aria-label": "Select all discounts",
|
|
398
|
-
className: "size-4 rounded border-border text-primary"
|
|
398
|
+
className: "size-4 rounded border-border-subtle text-action-primary-bg focus-visible:ring-2 focus-visible:ring-[var(--color-focus-ring)]"
|
|
399
399
|
})
|
|
400
400
|
}),
|
|
401
401
|
/* @__PURE__ */ d("th", {
|
|
402
|
-
className: "text-left px-4 py-3 text-
|
|
402
|
+
className: "text-left px-4 py-3 text-xs font-medium uppercase tracking-wide text-text-muted",
|
|
403
403
|
children: "Code"
|
|
404
404
|
}),
|
|
405
405
|
/* @__PURE__ */ d("th", {
|
|
406
|
-
className: "text-left px-4 py-3 text-
|
|
406
|
+
className: "text-left px-4 py-3 text-xs font-medium uppercase tracking-wide text-text-muted",
|
|
407
407
|
children: "Type"
|
|
408
408
|
}),
|
|
409
409
|
/* @__PURE__ */ d("th", {
|
|
410
|
-
className: "text-left px-4 py-3 text-
|
|
410
|
+
className: "text-left px-4 py-3 text-xs font-medium uppercase tracking-wide text-text-muted",
|
|
411
411
|
children: "Value"
|
|
412
412
|
}),
|
|
413
413
|
/* @__PURE__ */ d("th", {
|
|
414
|
-
className: "text-left px-4 py-3 text-
|
|
414
|
+
className: "text-left px-4 py-3 text-xs font-medium uppercase tracking-wide text-text-muted hidden md:table-cell",
|
|
415
415
|
children: "Uses"
|
|
416
416
|
}),
|
|
417
417
|
/* @__PURE__ */ d("th", {
|
|
418
|
-
className: "text-left px-4 py-3 text-
|
|
418
|
+
className: "text-left px-4 py-3 text-xs font-medium uppercase tracking-wide text-text-muted hidden lg:table-cell",
|
|
419
419
|
children: "Valid From"
|
|
420
420
|
}),
|
|
421
421
|
/* @__PURE__ */ d("th", {
|
|
422
|
-
className: "text-left px-4 py-3 text-
|
|
422
|
+
className: "text-left px-4 py-3 text-xs font-medium uppercase tracking-wide text-text-muted hidden sm:table-cell",
|
|
423
423
|
children: "Valid Until"
|
|
424
424
|
}),
|
|
425
425
|
/* @__PURE__ */ d("th", {
|
|
426
|
-
className: "text-left px-4 py-3 text-
|
|
426
|
+
className: "text-left px-4 py-3 text-xs font-medium uppercase tracking-wide text-text-muted",
|
|
427
427
|
children: "Status"
|
|
428
428
|
}),
|
|
429
429
|
/* @__PURE__ */ d("th", {
|
|
430
|
-
className: "text-right px-4 py-3 text-
|
|
430
|
+
className: "text-right px-4 py-3 text-xs font-medium uppercase tracking-wide text-text-muted",
|
|
431
431
|
children: "Actions"
|
|
432
432
|
})
|
|
433
433
|
] })
|
|
434
434
|
}), /* @__PURE__ */ d("tbody", {
|
|
435
|
-
className: "divide-y divide-border",
|
|
435
|
+
className: "divide-y divide-border-subtle",
|
|
436
436
|
children: W.map((e) => /* @__PURE__ */ d(v, {
|
|
437
437
|
discount: e,
|
|
438
438
|
selected: z.has(e.id),
|
|
@@ -453,14 +453,14 @@ var g = {
|
|
|
453
453
|
/* @__PURE__ */ f("div", {
|
|
454
454
|
className: "flex items-center justify-between mb-2",
|
|
455
455
|
children: [/* @__PURE__ */ d("h2", {
|
|
456
|
-
className: "text-lg font-semibold text-
|
|
456
|
+
className: "text-lg font-semibold text-text-primary",
|
|
457
457
|
children: n("billing.discounts.createDiscountCode", "Create Discount Code")
|
|
458
458
|
}), /* @__PURE__ */ d("button", {
|
|
459
459
|
type: "button",
|
|
460
460
|
onClick: Q,
|
|
461
|
-
className: "p-1.5 rounded hover:bg-
|
|
461
|
+
className: "p-1.5 rounded hover:bg-bg-sunken transition-colors",
|
|
462
462
|
children: /* @__PURE__ */ d("svg", {
|
|
463
|
-
className: "size-5 text-muted
|
|
463
|
+
className: "size-5 text-text-muted",
|
|
464
464
|
fill: "none",
|
|
465
465
|
viewBox: "0 0 24 24",
|
|
466
466
|
stroke: "currentColor",
|
|
@@ -474,17 +474,17 @@ var g = {
|
|
|
474
474
|
})]
|
|
475
475
|
}),
|
|
476
476
|
L && /* @__PURE__ */ d("div", {
|
|
477
|
-
className: "p-3 text-sm text-
|
|
477
|
+
className: "p-3 text-sm text-status-error-text bg-status-error-bg-subtle border border-status-error-border rounded-md",
|
|
478
478
|
children: L
|
|
479
479
|
}),
|
|
480
480
|
/* @__PURE__ */ f("div", { children: [/* @__PURE__ */ f("label", {
|
|
481
481
|
htmlFor: "create-code",
|
|
482
|
-
className: "block text-sm font-medium text-
|
|
482
|
+
className: "block text-sm font-medium text-text-primary mb-1",
|
|
483
483
|
children: [
|
|
484
484
|
n("billing.discounts.code", "Code"),
|
|
485
485
|
" ",
|
|
486
486
|
/* @__PURE__ */ d("span", {
|
|
487
|
-
className: "text-
|
|
487
|
+
className: "text-status-error-text",
|
|
488
488
|
children: "*"
|
|
489
489
|
})
|
|
490
490
|
]
|
|
@@ -498,18 +498,18 @@ var g = {
|
|
|
498
498
|
code: e.target.value
|
|
499
499
|
})),
|
|
500
500
|
placeholder: n("billing.discounts.codePlaceholder", "e.g. SUMMER25"),
|
|
501
|
-
className: "w-full px-3 py-2 text-sm border border-border rounded-
|
|
501
|
+
className: "w-full px-3 py-2 text-sm border border-border-subtle rounded-input bg-bg-surface text-text-primary placeholder:text-text-muted focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)] focus:border-transparent uppercase"
|
|
502
502
|
})] }),
|
|
503
503
|
/* @__PURE__ */ f("div", {
|
|
504
504
|
className: "grid grid-cols-2 gap-4",
|
|
505
505
|
children: [/* @__PURE__ */ f("div", { children: [/* @__PURE__ */ f("label", {
|
|
506
506
|
htmlFor: "create-type",
|
|
507
|
-
className: "block text-sm font-medium text-
|
|
507
|
+
className: "block text-sm font-medium text-text-primary mb-1",
|
|
508
508
|
children: [
|
|
509
509
|
n("billing.discounts.type", "Type"),
|
|
510
510
|
" ",
|
|
511
511
|
/* @__PURE__ */ d("span", {
|
|
512
|
-
className: "text-
|
|
512
|
+
className: "text-status-error-text",
|
|
513
513
|
children: "*"
|
|
514
514
|
})
|
|
515
515
|
]
|
|
@@ -520,7 +520,7 @@ var g = {
|
|
|
520
520
|
...t,
|
|
521
521
|
type: e.target.value
|
|
522
522
|
})),
|
|
523
|
-
className: "w-full px-3 py-2 text-sm border border-border rounded-
|
|
523
|
+
className: "w-full px-3 py-2 text-sm border border-border-subtle rounded-input bg-bg-surface text-text-primary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)] focus:border-transparent",
|
|
524
524
|
children: [/* @__PURE__ */ d("option", {
|
|
525
525
|
value: "PERCENTAGE",
|
|
526
526
|
children: n("billing.discounts.typePercentage", "Percentage")
|
|
@@ -530,12 +530,12 @@ var g = {
|
|
|
530
530
|
})]
|
|
531
531
|
})] }), /* @__PURE__ */ f("div", { children: [/* @__PURE__ */ f("label", {
|
|
532
532
|
htmlFor: "create-value",
|
|
533
|
-
className: "block text-sm font-medium text-
|
|
533
|
+
className: "block text-sm font-medium text-text-primary mb-1",
|
|
534
534
|
children: [
|
|
535
535
|
n("billing.discounts.value", "Value"),
|
|
536
536
|
" ",
|
|
537
537
|
/* @__PURE__ */ d("span", {
|
|
538
|
-
className: "text-
|
|
538
|
+
className: "text-status-error-text",
|
|
539
539
|
children: "*"
|
|
540
540
|
})
|
|
541
541
|
]
|
|
@@ -554,16 +554,16 @@ var g = {
|
|
|
554
554
|
value: e.target.value
|
|
555
555
|
})),
|
|
556
556
|
placeholder: N.type === "PERCENTAGE" ? "10" : "25.00",
|
|
557
|
-
className: "w-full px-3 py-2 pr-8 text-sm border border-border rounded-
|
|
557
|
+
className: "w-full px-3 py-2 pr-8 text-sm border border-border-subtle rounded-input bg-bg-surface text-text-primary placeholder:text-text-muted focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)] focus:border-transparent"
|
|
558
558
|
}), /* @__PURE__ */ d("span", {
|
|
559
|
-
className: "absolute right-3 top-1/2 -translate-y-1/2 text-sm text-muted
|
|
559
|
+
className: "absolute right-3 top-1/2 -translate-y-1/2 text-sm text-text-muted",
|
|
560
560
|
children: N.type === "PERCENTAGE" ? "%" : N.currency
|
|
561
561
|
})]
|
|
562
562
|
})] })]
|
|
563
563
|
}),
|
|
564
564
|
N.type === "FIXED" && /* @__PURE__ */ f("div", { children: [/* @__PURE__ */ d("label", {
|
|
565
565
|
htmlFor: "create-currency",
|
|
566
|
-
className: "block text-sm font-medium text-
|
|
566
|
+
className: "block text-sm font-medium text-text-primary mb-1",
|
|
567
567
|
children: n("billing.discounts.currency", "Currency")
|
|
568
568
|
}), /* @__PURE__ */ f("select", {
|
|
569
569
|
id: "create-currency",
|
|
@@ -572,7 +572,7 @@ var g = {
|
|
|
572
572
|
...t,
|
|
573
573
|
currency: e.target.value
|
|
574
574
|
})),
|
|
575
|
-
className: "w-full px-3 py-2 text-sm border border-border rounded-
|
|
575
|
+
className: "w-full px-3 py-2 text-sm border border-border-subtle rounded-input bg-bg-surface text-text-primary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)] focus:border-transparent",
|
|
576
576
|
children: [
|
|
577
577
|
/* @__PURE__ */ d("option", {
|
|
578
578
|
value: "USD",
|
|
@@ -603,7 +603,7 @@ var g = {
|
|
|
603
603
|
/* @__PURE__ */ f("div", { children: [
|
|
604
604
|
/* @__PURE__ */ d("label", {
|
|
605
605
|
htmlFor: "create-max-uses",
|
|
606
|
-
className: "block text-sm font-medium text-
|
|
606
|
+
className: "block text-sm font-medium text-text-primary mb-1",
|
|
607
607
|
children: n("billing.discounts.maxUses", "Max Uses")
|
|
608
608
|
}),
|
|
609
609
|
/* @__PURE__ */ d("input", {
|
|
@@ -617,10 +617,10 @@ var g = {
|
|
|
617
617
|
maxUses: e.target.value
|
|
618
618
|
})),
|
|
619
619
|
placeholder: n("billing.discounts.unlimited", "Unlimited"),
|
|
620
|
-
className: "w-full px-3 py-2 text-sm border border-border rounded-
|
|
620
|
+
className: "w-full px-3 py-2 text-sm border border-border-subtle rounded-input bg-bg-surface text-text-primary placeholder:text-text-muted focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)] focus:border-transparent"
|
|
621
621
|
}),
|
|
622
622
|
/* @__PURE__ */ d("p", {
|
|
623
|
-
className: "text-xs text-muted
|
|
623
|
+
className: "text-xs text-text-muted mt-1",
|
|
624
624
|
children: n("billing.discounts.unlimitedHelp", "Leave empty for unlimited uses.")
|
|
625
625
|
})
|
|
626
626
|
] }),
|
|
@@ -628,7 +628,7 @@ var g = {
|
|
|
628
628
|
className: "grid grid-cols-2 gap-4",
|
|
629
629
|
children: [/* @__PURE__ */ f("div", { children: [/* @__PURE__ */ d("label", {
|
|
630
630
|
htmlFor: "create-valid-from",
|
|
631
|
-
className: "block text-sm font-medium text-
|
|
631
|
+
className: "block text-sm font-medium text-text-primary mb-1",
|
|
632
632
|
children: n("billing.discounts.validFrom", "Valid From")
|
|
633
633
|
}), /* @__PURE__ */ d("input", {
|
|
634
634
|
id: "create-valid-from",
|
|
@@ -638,10 +638,10 @@ var g = {
|
|
|
638
638
|
...t,
|
|
639
639
|
validFrom: e.target.value
|
|
640
640
|
})),
|
|
641
|
-
className: "w-full px-3 py-2 text-sm border border-border rounded-
|
|
641
|
+
className: "w-full px-3 py-2 text-sm border border-border-subtle rounded-input bg-bg-surface text-text-primary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)] focus:border-transparent"
|
|
642
642
|
})] }), /* @__PURE__ */ f("div", { children: [/* @__PURE__ */ d("label", {
|
|
643
643
|
htmlFor: "create-valid-until",
|
|
644
|
-
className: "block text-sm font-medium text-
|
|
644
|
+
className: "block text-sm font-medium text-text-primary mb-1",
|
|
645
645
|
children: n("billing.discounts.validUntil", "Valid Until")
|
|
646
646
|
}), /* @__PURE__ */ d("input", {
|
|
647
647
|
id: "create-valid-until",
|
|
@@ -651,20 +651,20 @@ var g = {
|
|
|
651
651
|
...t,
|
|
652
652
|
validUntil: e.target.value
|
|
653
653
|
})),
|
|
654
|
-
className: "w-full px-3 py-2 text-sm border border-border rounded-
|
|
654
|
+
className: "w-full px-3 py-2 text-sm border border-border-subtle rounded-input bg-bg-surface text-text-primary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)] focus:border-transparent"
|
|
655
655
|
})] })]
|
|
656
656
|
}),
|
|
657
657
|
/* @__PURE__ */ f("div", {
|
|
658
|
-
className: "flex items-center justify-end gap-3 pt-2 border-t border-border",
|
|
658
|
+
className: "flex items-center justify-end gap-3 pt-2 border-t border-border-subtle",
|
|
659
659
|
children: [/* @__PURE__ */ d("button", {
|
|
660
660
|
type: "button",
|
|
661
661
|
onClick: Q,
|
|
662
|
-
className: "px-4 py-2 text-sm font-medium border border-border text-
|
|
662
|
+
className: "px-4 py-2 text-sm font-medium border border-border-subtle text-text-primary rounded-button hover:bg-bg-sunken transition-colors",
|
|
663
663
|
children: n("billing.discounts.cancel", "Cancel")
|
|
664
664
|
}), /* @__PURE__ */ d("button", {
|
|
665
665
|
type: "submit",
|
|
666
666
|
disabled: w,
|
|
667
|
-
className: "px-4 py-2 text-sm font-medium bg-primary text-primary-
|
|
667
|
+
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 disabled:opacity-50 disabled:cursor-not-allowed",
|
|
668
668
|
children: w ? n("billing.discounts.creating", "Creating...") : n("billing.discounts.createDiscount", "Create Discount")
|
|
669
669
|
})]
|
|
670
670
|
})
|
|
@@ -680,14 +680,14 @@ var g = {
|
|
|
680
680
|
/* @__PURE__ */ f("div", {
|
|
681
681
|
className: "flex items-center justify-between mb-2",
|
|
682
682
|
children: [/* @__PURE__ */ d("h2", {
|
|
683
|
-
className: "text-lg font-semibold text-
|
|
683
|
+
className: "text-lg font-semibold text-text-primary",
|
|
684
684
|
children: "Edit Discount"
|
|
685
685
|
}), /* @__PURE__ */ d("button", {
|
|
686
686
|
type: "button",
|
|
687
687
|
onClick: Q,
|
|
688
|
-
className: "p-1.5 rounded hover:bg-
|
|
688
|
+
className: "p-1.5 rounded hover:bg-bg-sunken transition-colors",
|
|
689
689
|
children: /* @__PURE__ */ d("svg", {
|
|
690
|
-
className: "size-5 text-muted
|
|
690
|
+
className: "size-5 text-text-muted",
|
|
691
691
|
fill: "none",
|
|
692
692
|
viewBox: "0 0 24 24",
|
|
693
693
|
stroke: "currentColor",
|
|
@@ -701,49 +701,49 @@ var g = {
|
|
|
701
701
|
})]
|
|
702
702
|
}),
|
|
703
703
|
L && /* @__PURE__ */ d("div", {
|
|
704
|
-
className: "p-3 text-sm text-
|
|
704
|
+
className: "p-3 text-sm text-status-error-text bg-status-error-bg-subtle border border-status-error-border rounded-md",
|
|
705
705
|
children: L
|
|
706
706
|
}),
|
|
707
707
|
/* @__PURE__ */ f("div", {
|
|
708
|
-
className: "p-3 bg-
|
|
708
|
+
className: "p-3 bg-bg-sunken/50 border border-border-subtle rounded-md space-y-1",
|
|
709
709
|
children: [
|
|
710
710
|
/* @__PURE__ */ f("div", {
|
|
711
711
|
className: "flex items-center justify-between text-sm",
|
|
712
712
|
children: [/* @__PURE__ */ d("span", {
|
|
713
|
-
className: "text-muted
|
|
713
|
+
className: "text-text-muted",
|
|
714
714
|
children: "Code"
|
|
715
715
|
}), /* @__PURE__ */ d("span", {
|
|
716
|
-
className: "font-mono font-medium text-
|
|
716
|
+
className: "font-mono font-medium text-text-primary",
|
|
717
717
|
children: j.discount.code
|
|
718
718
|
})]
|
|
719
719
|
}),
|
|
720
720
|
/* @__PURE__ */ f("div", {
|
|
721
721
|
className: "flex items-center justify-between text-sm",
|
|
722
722
|
children: [/* @__PURE__ */ d("span", {
|
|
723
|
-
className: "text-muted
|
|
723
|
+
className: "text-text-muted",
|
|
724
724
|
children: "Type"
|
|
725
725
|
}), /* @__PURE__ */ d("span", {
|
|
726
|
-
className: "text-
|
|
726
|
+
className: "text-text-primary",
|
|
727
727
|
children: j.discount.type === "PERCENTAGE" ? "Percentage" : "Fixed Amount"
|
|
728
728
|
})]
|
|
729
729
|
}),
|
|
730
730
|
/* @__PURE__ */ f("div", {
|
|
731
731
|
className: "flex items-center justify-between text-sm",
|
|
732
732
|
children: [/* @__PURE__ */ d("span", {
|
|
733
|
-
className: "text-muted
|
|
733
|
+
className: "text-text-muted",
|
|
734
734
|
children: "Value"
|
|
735
735
|
}), /* @__PURE__ */ d("span", {
|
|
736
|
-
className: "text-
|
|
736
|
+
className: "text-text-primary",
|
|
737
737
|
children: h(j.discount)
|
|
738
738
|
})]
|
|
739
739
|
}),
|
|
740
740
|
/* @__PURE__ */ f("div", {
|
|
741
741
|
className: "flex items-center justify-between text-sm",
|
|
742
742
|
children: [/* @__PURE__ */ d("span", {
|
|
743
|
-
className: "text-muted
|
|
743
|
+
className: "text-text-muted",
|
|
744
744
|
children: "Used"
|
|
745
745
|
}), /* @__PURE__ */ f("span", {
|
|
746
|
-
className: "text-
|
|
746
|
+
className: "text-text-primary",
|
|
747
747
|
children: [j.discount.usedCount, " times"]
|
|
748
748
|
})]
|
|
749
749
|
})
|
|
@@ -752,7 +752,7 @@ var g = {
|
|
|
752
752
|
/* @__PURE__ */ f("div", { children: [
|
|
753
753
|
/* @__PURE__ */ d("label", {
|
|
754
754
|
htmlFor: "edit-max-uses",
|
|
755
|
-
className: "block text-sm font-medium text-
|
|
755
|
+
className: "block text-sm font-medium text-text-primary mb-1",
|
|
756
756
|
children: "Max Uses"
|
|
757
757
|
}),
|
|
758
758
|
/* @__PURE__ */ d("input", {
|
|
@@ -766,16 +766,16 @@ var g = {
|
|
|
766
766
|
maxUses: e.target.value
|
|
767
767
|
})),
|
|
768
768
|
placeholder: "Unlimited",
|
|
769
|
-
className: "w-full px-3 py-2 text-sm border border-border rounded-
|
|
769
|
+
className: "w-full px-3 py-2 text-sm border border-border-subtle rounded-input bg-bg-surface text-text-primary placeholder:text-text-muted focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)] focus:border-transparent"
|
|
770
770
|
}),
|
|
771
771
|
/* @__PURE__ */ d("p", {
|
|
772
|
-
className: "text-xs text-muted
|
|
772
|
+
className: "text-xs text-text-muted mt-1",
|
|
773
773
|
children: "Leave empty for unlimited uses."
|
|
774
774
|
})
|
|
775
775
|
] }),
|
|
776
776
|
/* @__PURE__ */ f("div", { children: [/* @__PURE__ */ d("label", {
|
|
777
777
|
htmlFor: "edit-valid-until",
|
|
778
|
-
className: "block text-sm font-medium text-
|
|
778
|
+
className: "block text-sm font-medium text-text-primary mb-1",
|
|
779
779
|
children: "Valid Until"
|
|
780
780
|
}), /* @__PURE__ */ d("input", {
|
|
781
781
|
id: "edit-valid-until",
|
|
@@ -785,19 +785,19 @@ var g = {
|
|
|
785
785
|
...t,
|
|
786
786
|
validUntil: e.target.value
|
|
787
787
|
})),
|
|
788
|
-
className: "w-full px-3 py-2 text-sm border border-border rounded-
|
|
788
|
+
className: "w-full px-3 py-2 text-sm border border-border-subtle rounded-input bg-bg-surface text-text-primary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)] focus:border-transparent"
|
|
789
789
|
})] }),
|
|
790
790
|
/* @__PURE__ */ f("div", {
|
|
791
|
-
className: "flex items-center justify-end gap-3 pt-2 border-t border-border",
|
|
791
|
+
className: "flex items-center justify-end gap-3 pt-2 border-t border-border-subtle",
|
|
792
792
|
children: [/* @__PURE__ */ d("button", {
|
|
793
793
|
type: "button",
|
|
794
794
|
onClick: Q,
|
|
795
|
-
className: "px-4 py-2 text-sm font-medium border border-border text-
|
|
795
|
+
className: "px-4 py-2 text-sm font-medium border border-border-subtle text-text-primary rounded-button hover:bg-bg-sunken transition-colors",
|
|
796
796
|
children: "Cancel"
|
|
797
797
|
}), /* @__PURE__ */ d("button", {
|
|
798
798
|
type: "submit",
|
|
799
799
|
disabled: E,
|
|
800
|
-
className: "px-4 py-2 text-sm font-medium bg-primary text-primary-
|
|
800
|
+
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 disabled:opacity-50 disabled:cursor-not-allowed",
|
|
801
801
|
children: E ? "Saving..." : "Save Changes"
|
|
802
802
|
})]
|
|
803
803
|
})
|
|
@@ -812,14 +812,14 @@ var g = {
|
|
|
812
812
|
/* @__PURE__ */ f("div", {
|
|
813
813
|
className: "flex items-center justify-between mb-2",
|
|
814
814
|
children: [/* @__PURE__ */ d("h2", {
|
|
815
|
-
className: "text-lg font-semibold text-
|
|
815
|
+
className: "text-lg font-semibold text-text-primary",
|
|
816
816
|
children: "Delete Discount"
|
|
817
817
|
}), /* @__PURE__ */ d("button", {
|
|
818
818
|
type: "button",
|
|
819
819
|
onClick: Q,
|
|
820
|
-
className: "p-1.5 rounded hover:bg-
|
|
820
|
+
className: "p-1.5 rounded hover:bg-bg-sunken transition-colors",
|
|
821
821
|
children: /* @__PURE__ */ d("svg", {
|
|
822
|
-
className: "size-5 text-muted
|
|
822
|
+
className: "size-5 text-text-muted",
|
|
823
823
|
fill: "none",
|
|
824
824
|
viewBox: "0 0 24 24",
|
|
825
825
|
stroke: "currentColor",
|
|
@@ -833,15 +833,15 @@ var g = {
|
|
|
833
833
|
})]
|
|
834
834
|
}),
|
|
835
835
|
L && /* @__PURE__ */ d("div", {
|
|
836
|
-
className: "p-3 text-sm text-
|
|
836
|
+
className: "p-3 text-sm text-status-error-text bg-status-error-bg-subtle border border-status-error-border rounded-md",
|
|
837
837
|
children: L
|
|
838
838
|
}),
|
|
839
839
|
/* @__PURE__ */ f("div", {
|
|
840
840
|
className: "flex items-start gap-3",
|
|
841
841
|
children: [/* @__PURE__ */ d("div", {
|
|
842
|
-
className: "size-10 rounded-full bg-
|
|
842
|
+
className: "size-10 rounded-full bg-status-error-bg-subtle flex items-center justify-center shrink-0",
|
|
843
843
|
children: /* @__PURE__ */ d("svg", {
|
|
844
|
-
className: "size-5 text-
|
|
844
|
+
className: "size-5 text-status-error-text",
|
|
845
845
|
fill: "none",
|
|
846
846
|
viewBox: "0 0 24 24",
|
|
847
847
|
stroke: "currentColor",
|
|
@@ -853,7 +853,7 @@ var g = {
|
|
|
853
853
|
})
|
|
854
854
|
})
|
|
855
855
|
}), /* @__PURE__ */ f("div", { children: [/* @__PURE__ */ f("p", {
|
|
856
|
-
className: "text-sm text-
|
|
856
|
+
className: "text-sm text-text-primary",
|
|
857
857
|
children: [
|
|
858
858
|
"Are you sure you want to delete the discount code",
|
|
859
859
|
" ",
|
|
@@ -864,7 +864,7 @@ var g = {
|
|
|
864
864
|
"?"
|
|
865
865
|
]
|
|
866
866
|
}), /* @__PURE__ */ f("p", {
|
|
867
|
-
className: "text-sm text-muted
|
|
867
|
+
className: "text-sm text-text-muted mt-1",
|
|
868
868
|
children: [
|
|
869
869
|
"This action cannot be undone. The discount has been used",
|
|
870
870
|
" ",
|
|
@@ -879,17 +879,17 @@ var g = {
|
|
|
879
879
|
})] })]
|
|
880
880
|
}),
|
|
881
881
|
/* @__PURE__ */ f("div", {
|
|
882
|
-
className: "flex items-center justify-end gap-3 pt-2 border-t border-border",
|
|
882
|
+
className: "flex items-center justify-end gap-3 pt-2 border-t border-border-subtle",
|
|
883
883
|
children: [/* @__PURE__ */ d("button", {
|
|
884
884
|
type: "button",
|
|
885
885
|
onClick: Q,
|
|
886
|
-
className: "px-4 py-2 text-sm font-medium border border-border text-
|
|
886
|
+
className: "px-4 py-2 text-sm font-medium border border-border-subtle text-text-primary rounded-button hover:bg-bg-sunken transition-colors",
|
|
887
887
|
children: "Cancel"
|
|
888
888
|
}), /* @__PURE__ */ d("button", {
|
|
889
889
|
type: "button",
|
|
890
890
|
onClick: oe,
|
|
891
891
|
disabled: O,
|
|
892
|
-
className: "px-4 py-2 text-sm font-medium bg-
|
|
892
|
+
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 disabled:opacity-50 disabled:cursor-not-allowed",
|
|
893
893
|
children: O ? "Deleting..." : "Delete Discount"
|
|
894
894
|
})]
|
|
895
895
|
})
|
|
@@ -901,7 +901,7 @@ var g = {
|
|
|
901
901
|
}, v = ({ discount: e, selected: t, onToggleSelect: r, onEdit: i, onDelete: a }) => {
|
|
902
902
|
let o = m(e);
|
|
903
903
|
return /* @__PURE__ */ f("tr", {
|
|
904
|
-
className: `hover:bg-
|
|
904
|
+
className: `hover:bg-bg-sunken/30 transition-colors ${t ? "bg-bg-sunken/20" : ""}`,
|
|
905
905
|
children: [
|
|
906
906
|
/* @__PURE__ */ d("td", {
|
|
907
907
|
className: "p-4",
|
|
@@ -910,43 +910,43 @@ var g = {
|
|
|
910
910
|
checked: t,
|
|
911
911
|
onChange: (t) => r(e.id, t.target.checked),
|
|
912
912
|
"aria-label": `Select discount ${e.code}`,
|
|
913
|
-
className: "size-4 rounded border-border text-
|
|
913
|
+
className: "size-4 rounded border-border-subtle text-text-link"
|
|
914
914
|
})
|
|
915
915
|
}),
|
|
916
916
|
/* @__PURE__ */ d("td", {
|
|
917
917
|
className: "p-4",
|
|
918
918
|
children: /* @__PURE__ */ d("span", {
|
|
919
|
-
className: "font-mono font-medium text-
|
|
919
|
+
className: "font-mono font-medium text-text-primary",
|
|
920
920
|
children: e.code
|
|
921
921
|
})
|
|
922
922
|
}),
|
|
923
923
|
/* @__PURE__ */ d("td", {
|
|
924
924
|
className: "p-4",
|
|
925
925
|
children: /* @__PURE__ */ d("span", {
|
|
926
|
-
className: "text-sm text-muted
|
|
926
|
+
className: "text-sm text-text-muted",
|
|
927
927
|
children: e.type === "PERCENTAGE" ? "Percentage" : "Fixed"
|
|
928
928
|
})
|
|
929
929
|
}),
|
|
930
930
|
/* @__PURE__ */ d("td", {
|
|
931
931
|
className: "p-4",
|
|
932
932
|
children: /* @__PURE__ */ d("span", {
|
|
933
|
-
className: "text-sm font-medium text-
|
|
933
|
+
className: "text-sm font-medium text-text-primary",
|
|
934
934
|
children: h(e)
|
|
935
935
|
})
|
|
936
936
|
}),
|
|
937
937
|
/* @__PURE__ */ d("td", {
|
|
938
938
|
className: "p-4 hidden md:table-cell",
|
|
939
939
|
children: /* @__PURE__ */ f("span", {
|
|
940
|
-
className: "text-sm text-muted
|
|
940
|
+
className: "text-sm text-text-muted",
|
|
941
941
|
children: [e.usedCount, e.maxUses == null ? " / ∞" : ` / ${e.maxUses}`]
|
|
942
942
|
})
|
|
943
943
|
}),
|
|
944
944
|
/* @__PURE__ */ d("td", {
|
|
945
|
-
className: "p-4 text-sm text-muted
|
|
945
|
+
className: "p-4 text-sm text-text-muted hidden lg:table-cell",
|
|
946
946
|
children: e.validFrom ? n(e.validFrom, "short") : "—"
|
|
947
947
|
}),
|
|
948
948
|
/* @__PURE__ */ d("td", {
|
|
949
|
-
className: "p-4 text-sm text-muted
|
|
949
|
+
className: "p-4 text-sm text-text-muted hidden sm:table-cell",
|
|
950
950
|
children: e.validUntil ? n(e.validUntil, "short") : "—"
|
|
951
951
|
}),
|
|
952
952
|
/* @__PURE__ */ d("td", {
|
|
@@ -966,7 +966,7 @@ var g = {
|
|
|
966
966
|
children: [/* @__PURE__ */ d("button", {
|
|
967
967
|
type: "button",
|
|
968
968
|
onClick: () => i(e),
|
|
969
|
-
className: "px-3 py-1.5 text-sm font-medium text-
|
|
969
|
+
className: "px-3 py-1.5 text-sm font-medium text-text-primary hover:bg-bg-sunken rounded-button transition-colors",
|
|
970
970
|
title: "Edit discount",
|
|
971
971
|
children: /* @__PURE__ */ d("svg", {
|
|
972
972
|
className: "size-4",
|
|
@@ -983,7 +983,7 @@ var g = {
|
|
|
983
983
|
}), /* @__PURE__ */ d("button", {
|
|
984
984
|
type: "button",
|
|
985
985
|
onClick: () => a(e),
|
|
986
|
-
className: "px-3 py-1.5 text-sm font-medium text-
|
|
986
|
+
className: "px-3 py-1.5 text-sm font-medium text-status-error-text hover:bg-status-error-bg-subtle rounded-md transition-colors",
|
|
987
987
|
title: "Delete discount",
|
|
988
988
|
children: /* @__PURE__ */ d("svg", {
|
|
989
989
|
className: "size-4",
|
|
@@ -1005,10 +1005,10 @@ var g = {
|
|
|
1005
1005
|
}, y = ({ onClose: e, children: t }) => /* @__PURE__ */ f("div", {
|
|
1006
1006
|
className: "fixed inset-0 z-50 flex items-center justify-center",
|
|
1007
1007
|
children: [/* @__PURE__ */ d("div", {
|
|
1008
|
-
className: "absolute inset-0 bg-overlay
|
|
1008
|
+
className: "absolute inset-0 bg-bg-overlay",
|
|
1009
1009
|
onClick: e
|
|
1010
1010
|
}), /* @__PURE__ */ d("div", {
|
|
1011
|
-
className: "relative w-full max-w-lg max-h-[85vh] overflow-y-auto bg-
|
|
1011
|
+
className: "relative w-full max-w-lg max-h-[85vh] overflow-y-auto bg-bg-elevated border border-border-subtle rounded-card shadow-[var(--shadow-elevation-4)] p-6 mx-4",
|
|
1012
1012
|
children: t
|
|
1013
1013
|
})]
|
|
1014
1014
|
});
|