@mohasinac/appkit 2.7.57 → 2.7.58
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/_internal/client/features/layout/DashboardLayoutClient.d.ts +7 -1
- package/dist/_internal/client/features/layout/DashboardLayoutClient.js +8 -2
- package/dist/client.d.ts +1 -1
- package/dist/client.js +1 -1
- package/dist/configs/tailwind.d.ts +16 -3
- package/dist/configs/tailwind.js +18 -5
- package/dist/features/account/components/AddressBook.js +1 -1
- package/dist/features/account/components/BuyerAccountGuideView.js +7 -7
- package/dist/features/account/components/BuyerAuctionsGuideView.js +7 -7
- package/dist/features/account/components/BuyerOrdersGuideView.js +6 -6
- package/dist/features/account/components/BuyerShoppingGuideView.js +7 -7
- package/dist/features/account/components/UserOffersPanel.js +1 -1
- package/dist/features/account/components/UserSupportView.js +4 -4
- package/dist/features/admin/components/AdminAdsView.js +1 -1
- package/dist/features/admin/components/AdminAllEventEntriesView.js +1 -1
- package/dist/features/admin/components/AdminAnalyticsGuideView.js +3 -3
- package/dist/features/admin/components/AdminBidsView.js +1 -1
- package/dist/features/admin/components/AdminBlogView.js +1 -1
- package/dist/features/admin/components/AdminBrandsView.js +1 -1
- package/dist/features/admin/components/AdminBundlesView.js +1 -1
- package/dist/features/admin/components/AdminCarouselView.js +2 -2
- package/dist/features/admin/components/AdminCartsView.js +1 -1
- package/dist/features/admin/components/AdminCatalogGuideView.js +5 -5
- package/dist/features/admin/components/AdminCategoriesView.js +1 -1
- package/dist/features/admin/components/AdminContactEditorView.js +2 -2
- package/dist/features/admin/components/AdminContactView.js +1 -1
- package/dist/features/admin/components/AdminContentGuideView.js +6 -6
- package/dist/features/admin/components/AdminCouponsView.js +1 -1
- package/dist/features/admin/components/AdminFaqsView.js +1 -1
- package/dist/features/admin/components/AdminFeatureFlagsView.js +1 -1
- package/dist/features/admin/components/AdminFeaturesView.js +1 -1
- package/dist/features/admin/components/AdminGuideHubView.js +1 -1
- package/dist/features/admin/components/AdminHistoryView.js +1 -1
- package/dist/features/admin/components/AdminListingScaffold.js +1 -1
- package/dist/features/admin/components/AdminNewsletterView.js +1 -1
- package/dist/features/admin/components/AdminNotificationsView.js +1 -1
- package/dist/features/admin/components/AdminOrdersGuideView.js +5 -5
- package/dist/features/admin/components/AdminOrdersView.js +1 -1
- package/dist/features/admin/components/AdminPayoutsView.js +1 -1
- package/dist/features/admin/components/AdminProductsView.js +1 -1
- package/dist/features/admin/components/AdminReturnRequestsView.js +1 -1
- package/dist/features/admin/components/AdminReviewsView.js +1 -1
- package/dist/features/admin/components/AdminScammerEditorView.js +3 -3
- package/dist/features/admin/components/AdminScammersView.js +4 -4
- package/dist/features/admin/components/AdminSectionsView.js +1 -1
- package/dist/features/admin/components/AdminSessionsView.js +1 -1
- package/dist/features/admin/components/AdminSiteSettingsView.js +1 -1
- package/dist/features/admin/components/AdminStoreAddressesView.js +1 -1
- package/dist/features/admin/components/AdminStoresGuideView.js +6 -6
- package/dist/features/admin/components/AdminStoresView.js +1 -1
- package/dist/features/admin/components/AdminSublistingCategoriesView.js +1 -1
- package/dist/features/admin/components/AdminSupportTicketDetailView.js +4 -4
- package/dist/features/admin/components/AdminSupportTicketsView.js +7 -7
- package/dist/features/admin/components/AdminTeamGuideView.js +4 -4
- package/dist/features/admin/components/AdminTeamView.js +1 -1
- package/dist/features/admin/components/AdminTrustGuideView.js +5 -5
- package/dist/features/admin/components/AdminUserEditorView.js +1 -1
- package/dist/features/admin/components/AdminUsersGuideView.js +5 -5
- package/dist/features/admin/components/AdminUsersView.js +1 -1
- package/dist/features/admin/components/AdminViewCards.js +1 -1
- package/dist/features/admin/components/AdminWishlistsView.js +1 -1
- package/dist/features/admin/components/DataTable.js +1 -1
- package/dist/features/auctions/components/AuctionBidsTable.js +1 -1
- package/dist/features/auctions/components/AuctionDetailPageView.js +2 -2
- package/dist/features/auctions/components/MarketplaceAuctionCard.js +2 -2
- package/dist/features/auctions/components/PlaceBidFormClient.js +1 -1
- package/dist/features/auth/components/VerifyEmailView.js +1 -1
- package/dist/features/blog/components/BlogListView.js +1 -1
- package/dist/features/blog/components/BlogPostView.js +1 -1
- package/dist/features/cart/components/CartDrawer.js +1 -1
- package/dist/features/categories/components/CategoryDetailPageView.js +1 -1
- package/dist/features/checkout/components/CheckoutStepper.js +1 -1
- package/dist/features/collections/components/CollectionCard.js +1 -1
- package/dist/features/copilot/components/AdminCopilotView.js +2 -2
- package/dist/features/events/components/AdminEventsView.js +1 -1
- package/dist/features/events/components/EventPollWidget.js +2 -2
- package/dist/features/events/components/EventStatusBadge.js +4 -4
- package/dist/features/events/components/SpinWheelView.js +1 -1
- package/dist/features/faq/components/FAQAccordion.js +2 -2
- package/dist/features/forms/Input.js +3 -3
- package/dist/features/forms/Select.js +2 -2
- package/dist/features/forms/Textarea.js +2 -2
- package/dist/features/forms/utils.d.ts +1 -1
- package/dist/features/forms/utils.js +1 -1
- package/dist/features/homepage/components/CharacterHotspotForm.js +2 -2
- package/dist/features/layout/BottomActions.js +2 -2
- package/dist/features/layout/ListingLayout.js +3 -3
- package/dist/features/layout/TitleBarLayout.js +1 -1
- package/dist/features/media/index.d.ts +2 -0
- package/dist/features/media/index.js +1 -0
- package/dist/features/media/modals/ImageCropModal.js +1 -1
- package/dist/features/media/modals/ImageEditor.d.ts +12 -0
- package/dist/features/media/modals/ImageEditor.js +73 -0
- package/dist/features/media/upload/ImageUpload.d.ts +5 -1
- package/dist/features/media/upload/ImageUpload.js +33 -8
- package/dist/features/media/upload/MediaUploadField.d.ts +5 -1
- package/dist/features/media/upload/MediaUploadField.js +26 -12
- package/dist/features/orders/components/OrdersList.js +7 -7
- package/dist/features/orders/components/RefundHistoryTable.js +2 -2
- package/dist/features/orders/components/RefundRequestView.js +3 -3
- package/dist/features/pre-orders/components/PreOrderActionsClient.js +1 -1
- package/dist/features/pre-orders/components/PreOrderBadge.js +4 -4
- package/dist/features/pre-orders/components/PreOrderDetailPageView.js +1 -1
- package/dist/features/pre-orders/components/PreorderCard.js +2 -2
- package/dist/features/products/components/CustomSectionsEditor.js +1 -1
- package/dist/features/products/components/MakeOfferButton.js +2 -2
- package/dist/features/products/components/PrizeDrawDetailPageView.js +2 -2
- package/dist/features/products/components/PrizeDrawItemsEditor.js +3 -3
- package/dist/features/products/components/PrizeRevealModal.js +3 -3
- package/dist/features/products/components/ProductDetailPageView.js +4 -4
- package/dist/features/products/components/ProductFeaturesSelector.js +1 -1
- package/dist/features/products/components/ProductGrid.js +3 -3
- package/dist/features/promotions/components/CouponCard.js +2 -2
- package/dist/features/promotions/components/PromotionsView.js +1 -1
- package/dist/features/reviews/components/ReviewDetailShell.js +2 -2
- package/dist/features/reviews/components/ReviewsList.js +1 -1
- package/dist/features/seller/components/SellerAddressesView.js +2 -2
- package/dist/features/seller/components/SellerAnalyticsAlertsView.js +2 -2
- package/dist/features/seller/components/SellerAuctionsView.js +1 -1
- package/dist/features/seller/components/SellerBidsView.js +1 -1
- package/dist/features/seller/components/SellerBundlesView.js +2 -2
- package/dist/features/seller/components/SellerClassifiedView.js +3 -3
- package/dist/features/seller/components/SellerCouponEditorView.js +2 -2
- package/dist/features/seller/components/SellerCouponsView.js +1 -1
- package/dist/features/seller/components/SellerDigitalCodesView.js +2 -2
- package/dist/features/seller/components/SellerFeaturesView.js +1 -1
- package/dist/features/seller/components/SellerLiveView.js +4 -4
- package/dist/features/seller/components/SellerOffersPanel.js +2 -2
- package/dist/features/seller/components/SellerOffersView.js +1 -1
- package/dist/features/seller/components/SellerOrdersView.js +2 -2
- package/dist/features/seller/components/SellerPayoutMethodsView.js +2 -2
- package/dist/features/seller/components/SellerPayoutsView.js +1 -1
- package/dist/features/seller/components/SellerProductsCards.js +1 -1
- package/dist/features/seller/components/SellerProductsView.js +1 -1
- package/dist/features/seller/components/SellerReviewsView.js +1 -1
- package/dist/features/seller/components/SellerShippingConfigsView.js +3 -3
- package/dist/features/seller/components/SellerStoreCategoriesView.js +2 -2
- package/dist/features/seller/components/SellerTemplatesView.js +2 -2
- package/dist/features/seller/components/analytics/SellerTopProducts.js +1 -1
- package/dist/features/stores/components/StoreFinanceGuideView.js +2 -2
- package/dist/features/stores/components/StoreHeader.js +1 -1
- package/dist/features/stores/components/StoreListingsGuideView.js +3 -3
- package/dist/features/stores/components/StoreOrdersGuideView.js +4 -4
- package/dist/features/stores/components/StoreSettingsGuideView.js +2 -2
- package/dist/features/whatsapp-bot/components/SellerWhatsAppSettingsView.js +4 -4
- package/dist/features/wishlist/components/WishlistPage.js +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.js +3 -0
- package/dist/styles.css +286 -3
- package/dist/tailwind-utilities.css +1 -1
- package/dist/tokens/motion.d.ts +162 -0
- package/dist/tokens/motion.js +89 -0
- package/dist/ui/DataTable.js +3 -2
- package/dist/ui/components/Accordion.js +2 -1
- package/dist/ui/components/Card.d.ts +5 -2
- package/dist/ui/components/Card.js +29 -11
- package/dist/ui/components/Div.d.ts +2 -16
- package/dist/ui/components/Div.js +2 -16
- package/dist/ui/components/Layout.d.ts +9 -19
- package/dist/ui/components/Layout.js +9 -7
- package/dist/ui/components/Modal.js +7 -4
- package/dist/ui/components/Motion.d.ts +75 -0
- package/dist/ui/components/Motion.js +122 -0
- package/dist/ui/components/Semantic.d.ts +81 -14
- package/dist/ui/components/Semantic.js +75 -10
- package/dist/ui/components/Semantic.style.css +261 -2
- package/dist/ui/components/SideDrawer.d.ts +1 -1
- package/dist/ui/components/SideDrawer.js +8 -6
- package/dist/ui/components/SideModal.d.ts +1 -1
- package/dist/ui/components/SideModal.js +11 -9
- package/dist/ui/components/StackedViewShell.js +6 -1
- package/dist/ui/components/Toast.js +5 -2
- package/dist/ui/components/Typography.d.ts +44 -3
- package/dist/ui/components/Typography.js +15 -30
- package/dist/ui/components/Typography.style.css +24 -0
- package/dist/ui/components/VacationBanner.js +2 -1
- package/dist/ui/components/surface-tokens.d.ts +70 -0
- package/dist/ui/components/surface-tokens.js +68 -0
- package/dist/ui/forms/FormShell.d.ts +6 -1
- package/dist/ui/forms/FormShell.js +32 -4
- package/dist/ui/index.d.ts +9 -2
- package/dist/ui/index.js +4 -2
- package/dist/validation/schemas.d.ts +28 -28
- package/package.json +3 -1
|
@@ -40,6 +40,12 @@ export interface DashboardLayoutClientProps {
|
|
|
40
40
|
renderSidebarFooter?: () => ReactNode;
|
|
41
41
|
/** Optional className passed through to the sidebar component. */
|
|
42
42
|
className?: string;
|
|
43
|
+
/** Override the content area padding classes. */
|
|
44
|
+
contentPadding?: string;
|
|
45
|
+
/** Additional className applied to the content area background. */
|
|
46
|
+
contentSurface?: string;
|
|
47
|
+
/** Override the max-width class on the inner content wrapper. */
|
|
48
|
+
contentMaxWidth?: string;
|
|
43
49
|
children: ReactNode;
|
|
44
50
|
}
|
|
45
|
-
export declare function DashboardLayoutClient({ variant, groups, permissions, activeHref: explicitActiveHref, responsive: _responsive, className, children, }: DashboardLayoutClientProps): import("react/jsx-runtime").JSX.Element;
|
|
51
|
+
export declare function DashboardLayoutClient({ variant, groups, permissions, activeHref: explicitActiveHref, responsive: _responsive, className, contentPadding, contentSurface, contentMaxWidth, children, }: DashboardLayoutClientProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -81,7 +81,9 @@ function filterGroups(groups, navConfig, permissions) {
|
|
|
81
81
|
}))
|
|
82
82
|
.filter((group) => group.items.length > 0);
|
|
83
83
|
}
|
|
84
|
-
|
|
84
|
+
const DEFAULT_CONTENT_PADDING = "px-5 py-8 md:pl-14 md:pr-6 lg:pl-16 lg:pr-10";
|
|
85
|
+
const DEFAULT_CONTENT_MAX_WIDTH = "max-w-screen-2xl";
|
|
86
|
+
export function DashboardLayoutClient({ variant, groups, permissions, activeHref: explicitActiveHref, responsive: _responsive, className, contentPadding, contentSurface, contentMaxWidth, children, }) {
|
|
85
87
|
const pathname = usePathname();
|
|
86
88
|
const activeHref = explicitActiveHref ?? pathname ?? "";
|
|
87
89
|
const { desktopOpen, mobileOpen, close, toggle } = useResponsiveDrawer();
|
|
@@ -91,5 +93,9 @@ export function DashboardLayoutClient({ variant, groups, permissions, activeHref
|
|
|
91
93
|
const adminGroups = variant === "admin"
|
|
92
94
|
? filteredGroups
|
|
93
95
|
: groups;
|
|
94
|
-
return (_jsxs(_Fragment, { children: [variant === "admin" && (_jsx(AdminSidebar, { variant: "sidebar", desktopOpen: desktopOpen, mobileOpen: mobileOpen, activePath: activeHref, groups: adminGroups, onCloseMobile: close, onToggle: toggle, className: className })), variant === "store" && (_jsx(StoreSidebar, { variant: "sidebar", desktopOpen: desktopOpen, mobileOpen: mobileOpen, activeHref: activeHref, items: [], groups: filteredGroups, onCloseMobile: close, onToggle: toggle, className: className })), variant === "user" && (_jsx(UserSidebar, { variant: "sidebar", desktopOpen: desktopOpen, mobileOpen: mobileOpen, items: filteredGroups.flatMap((g) => g.items), groups: filteredGroups, onCloseMobile: close, onToggle: toggle, className: className })), _jsx("div", { className:
|
|
96
|
+
return (_jsxs(_Fragment, { children: [variant === "admin" && (_jsx(AdminSidebar, { variant: "sidebar", desktopOpen: desktopOpen, mobileOpen: mobileOpen, activePath: activeHref, groups: adminGroups, onCloseMobile: close, onToggle: toggle, className: className })), variant === "store" && (_jsx(StoreSidebar, { variant: "sidebar", desktopOpen: desktopOpen, mobileOpen: mobileOpen, activeHref: activeHref, items: [], groups: filteredGroups, onCloseMobile: close, onToggle: toggle, className: className })), variant === "user" && (_jsx(UserSidebar, { variant: "sidebar", desktopOpen: desktopOpen, mobileOpen: mobileOpen, items: filteredGroups.flatMap((g) => g.items), groups: filteredGroups, onCloseMobile: close, onToggle: toggle, className: className })), _jsx("div", { className: [
|
|
97
|
+
"w-full flex-1 flex flex-col min-h-[calc(100dvh-var(--header-height,3.5rem))]",
|
|
98
|
+
contentPadding ?? DEFAULT_CONTENT_PADDING,
|
|
99
|
+
contentSurface,
|
|
100
|
+
].filter(Boolean).join(" "), children: _jsx("div", { className: ["w-full flex-1 mx-auto", contentMaxWidth ?? DEFAULT_CONTENT_MAX_WIDTH].filter(Boolean).join(" "), children: children }) })] }));
|
|
95
101
|
}
|
package/dist/client.d.ts
CHANGED
|
@@ -84,7 +84,7 @@ export { FieldCheckbox } from "./ui/forms";
|
|
|
84
84
|
export { Select } from "./ui/components/Select";
|
|
85
85
|
export type { SelectOption, SelectProps } from "./ui/components/Select";
|
|
86
86
|
export { Heading } from "./ui/components/Typography";
|
|
87
|
-
export { Label, Text } from "./ui/components/Typography";
|
|
87
|
+
export { Label, Text, Span, Caption } from "./ui/components/Typography";
|
|
88
88
|
export { TextLink } from "./ui/components/TextLink";
|
|
89
89
|
export type { TextLinkProps } from "./ui/components/TextLink";
|
|
90
90
|
export { Textarea } from "./ui/components/Textarea";
|
package/dist/client.js
CHANGED
|
@@ -140,7 +140,7 @@ export { FieldSelect } from "./ui/forms";
|
|
|
140
140
|
export { FieldCheckbox } from "./ui/forms";
|
|
141
141
|
export { Select } from "./ui/components/Select";
|
|
142
142
|
export { Heading } from "./ui/components/Typography";
|
|
143
|
-
export { Label, Text } from "./ui/components/Typography";
|
|
143
|
+
export { Label, Text, Span, Caption } from "./ui/components/Typography";
|
|
144
144
|
export { TextLink } from "./ui/components/TextLink";
|
|
145
145
|
export { Textarea } from "./ui/components/Textarea";
|
|
146
146
|
export { GlobalError } from "./next/components/GlobalError";
|
|
@@ -48,10 +48,23 @@ export declare function defineTailwindConfig(override?: TailwindConfigOverride):
|
|
|
48
48
|
"text-inverse": string;
|
|
49
49
|
link: string;
|
|
50
50
|
"link-hover": string;
|
|
51
|
-
success:
|
|
52
|
-
|
|
51
|
+
success: {
|
|
52
|
+
DEFAULT: string;
|
|
53
|
+
surface: string;
|
|
54
|
+
};
|
|
55
|
+
warning: {
|
|
56
|
+
DEFAULT: string;
|
|
57
|
+
surface: string;
|
|
58
|
+
};
|
|
59
|
+
error: {
|
|
60
|
+
DEFAULT: string;
|
|
61
|
+
surface: string;
|
|
62
|
+
};
|
|
53
63
|
danger: string;
|
|
54
|
-
info:
|
|
64
|
+
info: {
|
|
65
|
+
DEFAULT: string;
|
|
66
|
+
surface: string;
|
|
67
|
+
};
|
|
55
68
|
};
|
|
56
69
|
};
|
|
57
70
|
};
|
package/dist/configs/tailwind.js
CHANGED
|
@@ -46,11 +46,24 @@ export function defineTailwindConfig(override = {}) {
|
|
|
46
46
|
"text-inverse": "var(--appkit-color-textInverse)",
|
|
47
47
|
link: "var(--appkit-color-link)",
|
|
48
48
|
"link-hover": "var(--appkit-color-linkHover)",
|
|
49
|
-
// State
|
|
50
|
-
success:
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
49
|
+
// State — semantic colors with surface sub-keys
|
|
50
|
+
success: {
|
|
51
|
+
DEFAULT: "var(--appkit-color-success)",
|
|
52
|
+
surface: "var(--appkit-color-success-surface)",
|
|
53
|
+
},
|
|
54
|
+
warning: {
|
|
55
|
+
DEFAULT: "var(--appkit-color-warning)",
|
|
56
|
+
surface: "var(--appkit-color-warning-surface)",
|
|
57
|
+
},
|
|
58
|
+
error: {
|
|
59
|
+
DEFAULT: "var(--appkit-color-error)",
|
|
60
|
+
surface: "var(--appkit-color-error-surface)",
|
|
61
|
+
},
|
|
62
|
+
danger: "var(--appkit-color-error)",
|
|
63
|
+
info: {
|
|
64
|
+
DEFAULT: "var(--appkit-color-info)",
|
|
65
|
+
surface: "var(--appkit-color-info-surface)",
|
|
66
|
+
},
|
|
54
67
|
},
|
|
55
68
|
...(consumerTheme.extend ?? {}),
|
|
56
69
|
},
|
|
@@ -8,7 +8,7 @@ export function AddressCard({ address, onEdit, onDelete, onSetDefault, labels =
|
|
|
8
8
|
const line2 = "line2" in address && address.line2
|
|
9
9
|
? address.line2
|
|
10
10
|
: address.addressLine2;
|
|
11
|
-
return (_jsxs(Div, {
|
|
11
|
+
return (_jsxs(Div, { surface: "card", padding: "sm", className: "relative", children: [address.isDefault && (_jsx(Span, { className: "absolute right-3 top-3 rounded-full bg-success-surface px-2 py-0.5 text-xs font-medium text-success", children: labels.defaultBadge ?? "Default" })), address.label && (_jsx(Text, { className: "mb-1 text-xs font-semibold uppercase tracking-wide text-neutral-500 dark:text-zinc-400", children: address.label })), _jsx(Text, { className: "text-sm text-neutral-900 dark:text-zinc-100", children: line1 }), line2 && _jsx(Text, { className: "text-sm text-neutral-900 dark:text-zinc-100", children: line2 }), _jsxs(Text, { className: "text-sm text-neutral-900 dark:text-zinc-100", children: [address.city, ", ", address.state, " ", address.postalCode] }), _jsx(Text, { className: "text-sm text-neutral-900 dark:text-zinc-100", children: address.country }), address.phone && (_jsx(Text, { className: "mt-1 text-sm text-neutral-500 dark:text-zinc-400", children: address.phone })), _jsxs(Div, { className: `mt-3 flex ${THEME_CONSTANTS.spacing.gap.xs}`, children: [onEdit && (_jsx(Button, { onClick: () => onEdit(address), variant: "ghost", size: "sm", className: "text-xs font-medium text-primary hover:underline", children: labels.edit ?? "Edit" })), onDelete && (_jsx(Button, { onClick: () => onDelete(address.id), variant: "ghost", size: "sm", className: "text-xs font-medium text-error hover:underline", children: labels.delete ?? "Delete" })), !address.isDefault && onSetDefault && (_jsx(Button, { onClick: () => onSetDefault(address.id), variant: "outline", size: "sm", className: "ml-auto text-xs font-medium", children: labels.setDefault ?? "Set default" }))] })] }));
|
|
12
12
|
}
|
|
13
13
|
export function AddressBook({ addresses, onEdit, onDelete, onSetDefault, onAdd, emptyLabel = "No saved addresses", addLabel = "Add Address", }) {
|
|
14
14
|
return (_jsxs(Div, { className: "space-y-4", children: [addresses.length === 0 && (_jsx(Text, { className: "text-sm text-neutral-500 dark:text-zinc-400", children: emptyLabel })), _jsx(Div, { className: `grid ${THEME_CONSTANTS.spacing.gap.md} sm:grid-cols-2`, children: addresses.map((addr) => (_jsx(AddressCard, { address: addr, onEdit: onEdit, onDelete: onDelete, onSetDefault: onSetDefault }, addr.id))) }), onAdd && (_jsxs(Button, { onClick: onAdd, variant: "outline", className: "mt-2 rounded-lg border border-dashed border-neutral-300 dark:border-slate-600 px-4 py-3 text-sm font-medium text-neutral-500 dark:text-zinc-400 transition hover:border-neutral-400 dark:hover:border-slate-500 hover:text-neutral-700 dark:hover:text-zinc-200", children: ["+ ", addLabel] }))] }));
|
|
@@ -1,32 +1,32 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
2
|
import { UserCheck, Bell, Heart, Star, Lock, AlertTriangle, Flag } from "lucide-react";
|
|
3
|
-
import { Div, Heading, Text, Section, Alert } from "../../../ui";
|
|
3
|
+
import { Div, Heading, Span, Text, Section, Alert } from "../../../ui";
|
|
4
4
|
import { ROUTES } from "../../../constants";
|
|
5
5
|
import { GC } from "../../_guide-cls";
|
|
6
6
|
const SECTIONS = [
|
|
7
7
|
{
|
|
8
8
|
Icon: UserCheck, title: "Your Profile",
|
|
9
|
-
content: (_jsxs(Div, { className: "space-y-3", children: [_jsxs(Text, { className: GC.textMuted, children: ["Update your profile at ", _jsx("
|
|
9
|
+
content: (_jsxs(Div, { className: "space-y-3", children: [_jsxs(Text, { className: GC.textMuted, children: ["Update your profile at ", _jsx(Span, { weight: "bold", children: "My Account \u2192 My Profile" }), ". Your ", _jsx(Span, { weight: "bold", children: "display name" }), " is shown to sellers on order summaries."] }), _jsxs(Div, { className: "grid sm:grid-cols-2 gap-4 text-sm", children: [_jsxs(Div, { children: [_jsx(Text, { className: "font-semibold text-[var(--appkit-color-text)] mb-1", children: "Visible to others:" }), _jsxs("ul", { className: GC.listDiscMuted, children: [_jsx("li", { children: "Display name" }), _jsx("li", { children: "Avatar / profile photo" }), _jsx("li", { children: "Bio" }), _jsx("li", { children: "Member since date" })] })] }), _jsxs(Div, { children: [_jsx(Text, { className: "font-semibold text-[var(--appkit-color-text)] mb-1", children: "Only you can see:" }), _jsxs("ul", { className: GC.listDiscMuted, children: [_jsx("li", { children: "Email address" }), _jsx("li", { children: "Phone number" }), _jsx("li", { children: "Saved addresses" }), _jsx("li", { children: "Order history" })] })] })] })] })),
|
|
10
10
|
},
|
|
11
11
|
{
|
|
12
12
|
Icon: Bell, title: "Notifications",
|
|
13
|
-
content: (_jsxs(Div, { className: "space-y-3", children: [_jsx(Text, { className: GC.textMuted, children: "You'll receive in-app notifications for:" }), _jsxs("ul", { className: GC.listDiscMuted, children: [_jsx("li", { children: "Order status changes (Processing, Shipped, Delivered)" }), _jsx("li", { children: "Outbid alerts on auctions you're participating in" }), _jsx("li", { children: "Auction win notification" }), _jsx("li", { children: "Review request after a delivered order" }), _jsx("li", { children: "Support ticket replies" })] }), _jsxs(Text, { className: GC.textMuted, children: ["Manage notification preferences at ", _jsx("
|
|
13
|
+
content: (_jsxs(Div, { className: "space-y-3", children: [_jsx(Text, { className: GC.textMuted, children: "You'll receive in-app notifications for:" }), _jsxs("ul", { className: GC.listDiscMuted, children: [_jsx("li", { children: "Order status changes (Processing, Shipped, Delivered)" }), _jsx("li", { children: "Outbid alerts on auctions you're participating in" }), _jsx("li", { children: "Auction win notification" }), _jsx("li", { children: "Review request after a delivered order" }), _jsx("li", { children: "Support ticket replies" })] }), _jsxs(Text, { className: GC.textMuted, children: ["Manage notification preferences at ", _jsx(Span, { weight: "bold", children: "My Account \u2192 Settings \u2192 Notifications" }), "."] })] })),
|
|
14
14
|
},
|
|
15
15
|
{
|
|
16
16
|
Icon: Heart, iconCls: "w-5 h-5 text-rose-500", title: "Wishlist",
|
|
17
|
-
content: (_jsxs(Div, { className: "space-y-3", children: [_jsxs(Text, { className: GC.textMuted, children: ["Save any listing to your wishlist by clicking the heart icon on a product card. View your wishlist at ", _jsx("
|
|
17
|
+
content: (_jsxs(Div, { className: "space-y-3", children: [_jsxs(Text, { className: GC.textMuted, children: ["Save any listing to your wishlist by clicking the heart icon on a product card. View your wishlist at ", _jsx(Span, { weight: "bold", children: "My Account \u2192 Wishlist" }), "."] }), _jsxs(Alert, { variant: "info", children: ["Your wishlist holds up to ", _jsx(Span, { weight: "bold", children: "20 items" }), ". Remove items you no longer want to make room for new ones. Wishlists are private \u2014 other users cannot see your saved items."] })] })),
|
|
18
18
|
},
|
|
19
19
|
{
|
|
20
20
|
Icon: Star, iconCls: "w-5 h-5 text-amber-400", title: "Leaving a Review",
|
|
21
|
-
content: (_jsxs(Div, { className: "space-y-3", children: [_jsxs(Text, { className: GC.textMuted, children: ["You can leave a review after your order is marked ", _jsx("
|
|
21
|
+
content: (_jsxs(Div, { className: "space-y-3", children: [_jsxs(Text, { className: GC.textMuted, children: ["You can leave a review after your order is marked ", _jsx(Span, { weight: "bold", children: "DELIVERED" }), ". Reviews are verified \u2014 only buyers who completed an order can review that product."] }), _jsxs("ul", { className: GC.listMuted, children: [_jsxs("li", { children: [_jsx(Span, { weight: "bold", className: GC.textStrong, children: "Rating" }), " \u2014 1\u20135 stars. Be fair and specific."] }), _jsxs("li", { children: [_jsx(Span, { weight: "bold", className: GC.textStrong, children: "Title & body" }), " \u2014 describe item condition vs listing, packaging quality, and seller communication."] }), _jsxs("li", { children: [_jsx(Span, { weight: "bold", className: GC.textStrong, children: "Photos" }), " \u2014 optional but helpful for other buyers."] }), _jsxs("li", { children: [_jsx(Span, { weight: "bold", className: GC.textStrong, children: "Seller response" }), " \u2014 the seller may respond publicly. You cannot edit a review after a seller has responded."] })] }), _jsx(Text, { className: GC.textMuted, children: "Review guidelines: no personal information, no hate speech or slurs, factual only." })] })),
|
|
22
22
|
},
|
|
23
23
|
{
|
|
24
24
|
Icon: Lock, title: "Account Security",
|
|
25
|
-
content: (_jsxs("ul", { className: GC.listMuted, children: [_jsxs("li", { children: [_jsx("
|
|
25
|
+
content: (_jsxs("ul", { className: GC.listMuted, children: [_jsxs("li", { children: [_jsx(Span, { weight: "bold", className: GC.textStrong, children: "Change password" }), " \u2014 use \"Forgot password\" on the login page. A reset link is sent to your registered email."] }), _jsxs("li", { children: [_jsx(Span, { weight: "bold", className: GC.textStrong, children: "Active sessions" }), " \u2014 view all devices signed in at ", _jsx(Span, { weight: "bold", children: "My Account \u2192 Sessions" }), ". Sign out unfamiliar devices immediately."] }), _jsxs("li", { children: [_jsx(Span, { weight: "bold", className: GC.textStrong, children: "Sign out everywhere" }), " \u2014 use \"Sign out everywhere\" on the Sessions page to invalidate all active sessions at once."] })] })),
|
|
26
26
|
},
|
|
27
27
|
{
|
|
28
28
|
Icon: AlertTriangle, iconCls: "w-5 h-5 text-amber-500", title: "Scam Awareness",
|
|
29
|
-
content: (_jsxs(_Fragment, { children: [_jsx(Alert, { variant: "warning", title: "Top scam types in the collectibles market:", children: _jsxs("ul", { className: "space-y-1 text-sm mt-1", children: [_jsxs("li", { children: [_jsx("
|
|
29
|
+
content: (_jsxs(_Fragment, { children: [_jsx(Alert, { variant: "warning", title: "Top scam types in the collectibles market:", children: _jsxs("ul", { className: "space-y-1 text-sm mt-1", children: [_jsxs("li", { children: [_jsx(Span, { weight: "bold", children: "1. Fake payment screenshots" }), " \u2014 always verify refunds in your bank app."] }), _jsxs("li", { children: [_jsx(Span, { weight: "bold", children: "2. Empty box shipping" }), " \u2014 item photos look real but the box arrives empty. Check seller rating."] }), _jsxs("li", { children: [_jsx(Span, { weight: "bold", children: "3. Fake graded cards" }), " \u2014 counterfeit PSA/BGS slabs. Verify cert numbers on the grading company's website."] }), _jsxs("li", { children: [_jsx(Span, { weight: "bold", children: "4. Urgency pressure" }), " \u2014 \"someone else is about to buy\". Legitimate sellers don't pressure you."] }), _jsxs("li", { children: [_jsx(Span, { weight: "bold", children: "5. Sympathy plays" }), " \u2014 emotional manipulation is a red flag."] })] }) }), _jsxs(Text, { className: `${GC.textMuted} mt-4`, children: ["Read the full ", _jsx("a", { href: String(ROUTES.PUBLIC.SCAMS), className: "text-[var(--appkit-color-primary)] underline hover:no-underline font-medium", children: "Scam Registry \u2192" }), " for all 27 documented scam types."] })] })),
|
|
30
30
|
},
|
|
31
31
|
{
|
|
32
32
|
Icon: Flag, iconCls: "w-5 h-5 text-rose-500", title: "Reporting Issues",
|
|
@@ -1,31 +1,31 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
2
|
import { Gavel, TrendingUp, Trophy, AlertTriangle, Package, XCircle, ShieldCheck } from "lucide-react";
|
|
3
|
-
import { Div, Heading, Text, Section, Alert } from "../../../ui";
|
|
3
|
+
import { Div, Heading, Span, Text, Section, Alert } from "../../../ui";
|
|
4
4
|
import { GC } from "../../_guide-cls";
|
|
5
5
|
const SECTIONS = [
|
|
6
6
|
{
|
|
7
7
|
Icon: Gavel, title: "How Auctions Work",
|
|
8
|
-
content: (_jsxs("ul", { className: GC.listMuted, children: [_jsxs("li", { children: [_jsx("
|
|
8
|
+
content: (_jsxs("ul", { className: GC.listMuted, children: [_jsxs("li", { children: [_jsx(Span, { weight: "bold", className: GC.textStrong, children: "Reserve price" }), " \u2014 the minimum amount the seller will accept. If bidding ends below the reserve, no sale occurs. You'll see \"Reserve not met\" on the listing."] }), _jsxs("li", { children: [_jsx(Span, { weight: "bold", className: GC.textStrong, children: "Bid increment" }), " \u2014 each new bid must exceed the current highest bid by at least the set increment. The increment is shown on the listing."] }), _jsxs("li", { children: [_jsx(Span, { weight: "bold", className: GC.textStrong, children: "Auction end time" }), " \u2014 displayed in your local timezone. Countdown timer shows hours and minutes remaining."] }), _jsxs("li", { children: [_jsx(Span, { weight: "bold", className: GC.textStrong, children: "Auto-extend" }), " \u2014 if a bid is placed within the last 5 minutes of an auction, the end time extends by 5 minutes. This prevents last-second sniping and gives all bidders a fair chance."] })] })),
|
|
9
9
|
},
|
|
10
10
|
{
|
|
11
11
|
Icon: TrendingUp, title: "Placing a Bid",
|
|
12
|
-
content: (_jsxs(_Fragment, { children: [_jsxs(Text, { className: `${GC.textMuted} mb-3`, children: ["Enter your bid amount \u2014 it must be at least the current high bid plus the increment \u2014 and click ", _jsx("
|
|
12
|
+
content: (_jsxs(_Fragment, { children: [_jsxs(Text, { className: `${GC.textMuted} mb-3`, children: ["Enter your bid amount \u2014 it must be at least the current high bid plus the increment \u2014 and click ", _jsx(Span, { weight: "bold", children: "Place Bid" }), ". You'll be asked to confirm."] }), _jsxs("ul", { className: GC.listMuted, children: [_jsxs("li", { children: [_jsx(Span, { weight: "bold", className: GC.textStrong, children: "Outbid notification" }), " \u2014 you'll receive an in-app notification and email if someone outbids you."] }), _jsxs("li", { children: [_jsx(Span, { weight: "bold", className: GC.textStrong, children: "Max bid (proxy bidding)" }), " \u2014 enter the maximum you're willing to pay. LetItRip will automatically bid on your behalf up to that amount, in the minimum increments needed to keep you in the lead. Your max bid is never revealed to other bidders."] })] }), _jsxs(Text, { className: `${GC.textMuted} mt-3`, children: [_jsx(Span, { weight: "bold", children: "Example:" }), " Current bid is \u20B9500, increment is \u20B950. You set a max bid of \u20B9800. Your bid is placed at \u20B9550. If someone bids \u20B9600, the system auto-bids \u20B9650 for you \u2014 up to \u20B9800."] })] })),
|
|
13
13
|
},
|
|
14
14
|
{
|
|
15
15
|
Icon: Trophy, title: "Winning an Auction",
|
|
16
|
-
content: (_jsxs(_Fragment, { children: [_jsx(Text, { className: `${GC.textMuted} mb-3`, children: "When an auction ends and you're the highest bidder (above the reserve), you've won." }), _jsxs("ul", { className: GC.listMuted, children: [_jsxs("li", { children: [_jsx("
|
|
16
|
+
content: (_jsxs(_Fragment, { children: [_jsx(Text, { className: `${GC.textMuted} mb-3`, children: "When an auction ends and you're the highest bidder (above the reserve), you've won." }), _jsxs("ul", { className: GC.listMuted, children: [_jsxs("li", { children: [_jsx(Span, { weight: "bold", className: GC.textStrong, children: "Payment window" }), " \u2014 you have ", _jsx(Span, { weight: "bold", children: "48 hours" }), " from the auction end time to complete payment."] }), _jsxs("li", { children: [_jsx(Span, { weight: "bold", className: GC.textStrong, children: "No payment" }), " \u2014 the order auto-cancels after 48 hours, you may receive a bid restriction, and the item may be offered to the next highest bidder."] }), _jsxs("li", { children: [_jsx(Span, { weight: "bold", className: GC.textStrong, children: "Winner badge" }), " \u2014 your winning order gets an \"Auction Winner\" badge in My Orders."] })] })] })),
|
|
17
17
|
},
|
|
18
18
|
{
|
|
19
19
|
Icon: AlertTriangle, iconCls: "w-5 h-5 text-amber-500", title: "Bid Retraction Policy",
|
|
20
|
-
content: (_jsxs(Alert, { variant: "warning", children: ["Bids on LetItRip are ", _jsx("
|
|
20
|
+
content: (_jsxs(Alert, { variant: "warning", children: ["Bids on LetItRip are ", _jsx(Span, { weight: "bold", children: "binding" }), ". Only place a bid if you intend to pay. Retraction requires contacting support with a valid reason. Repeated retractions may result in a temporary restriction on placing new bids."] })),
|
|
21
21
|
},
|
|
22
22
|
{
|
|
23
23
|
Icon: Package, title: "Pre-orders",
|
|
24
|
-
content: (_jsxs(_Fragment, { children: [_jsx(Text, { className: `${GC.textMuted} mb-3`, children: "A pre-order is an item not yet in stock. The seller takes deposits or full payment upfront and orders from their supplier in bulk once demand is confirmed." }), _jsxs("ul", { className: GC.listMuted, children: [_jsxs("li", { children: [_jsx("
|
|
24
|
+
content: (_jsxs(_Fragment, { children: [_jsx(Text, { className: `${GC.textMuted} mb-3`, children: "A pre-order is an item not yet in stock. The seller takes deposits or full payment upfront and orders from their supplier in bulk once demand is confirmed." }), _jsxs("ul", { className: GC.listMuted, children: [_jsxs("li", { children: [_jsx(Span, { weight: "bold", className: GC.textStrong, children: "Deposit vs full price" }), " \u2014 check the listing. Some sellers take a partial deposit; others require full payment."] }), _jsxs("li", { children: [_jsx(Span, { weight: "bold", className: GC.textStrong, children: "Expected delivery date" }), " \u2014 shown on the listing. This is the seller's estimate based on supplier timelines \u2014 not a guaranteed date."] }), _jsxs("li", { children: [_jsx(Span, { weight: "bold", className: GC.textStrong, children: "\"Confirmed supplier\" status" }), " \u2014 some listings show this badge, meaning the seller has placed the order with their supplier and stock is secured."] })] })] })),
|
|
25
25
|
},
|
|
26
26
|
{
|
|
27
27
|
Icon: XCircle, iconCls: "w-5 h-5 text-rose-500", title: "Pre-order Cancellations",
|
|
28
|
-
content: (_jsxs(_Fragment, { children: [_jsxs(Text, { className: `${GC.textMuted} mb-3`, children: ["To cancel a pre-order before the item is shipped, open a support ticket with category ", _jsx("
|
|
28
|
+
content: (_jsxs(_Fragment, { children: [_jsxs(Text, { className: `${GC.textMuted} mb-3`, children: ["To cancel a pre-order before the item is shipped, open a support ticket with category ", _jsx(Span, { weight: "bold", children: "Billing & Payment" }), " or ", _jsx(Span, { weight: "bold", children: "Order Issue" }), " and reference your order ID."] }), _jsx(Text, { className: GC.textMuted, children: "After cancellation is accepted, refunds follow the standard timeline: 3\u20137 business days to your original payment method." })] })),
|
|
29
29
|
},
|
|
30
30
|
{
|
|
31
31
|
Icon: ShieldCheck, iconCls: "w-5 h-5 text-emerald-500", title: "Bidding Safety Tips",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
2
|
import { PackageCheck, Truck, Camera, RotateCcw, Clock, Headphones, Scale } from "lucide-react";
|
|
3
|
-
import { Div, Heading, Text, Section, Alert } from "../../../ui";
|
|
3
|
+
import { Div, Heading, Span, Text, Section, Alert } from "../../../ui";
|
|
4
4
|
import { GC } from "../../_guide-cls";
|
|
5
5
|
// ─── Section data ─────────────────────────────────────────────────────────────
|
|
6
6
|
const ORDER_STATUSES = [
|
|
@@ -19,19 +19,19 @@ const SECTIONS = [
|
|
|
19
19
|
},
|
|
20
20
|
{
|
|
21
21
|
Icon: Truck, title: "Tracking Your Order",
|
|
22
|
-
content: (_jsxs(Div, { className: "space-y-3", children: [_jsxs(Text, { className: GC.textMuted, children: ["Once your order is SHIPPED, go to ", _jsx("
|
|
22
|
+
content: (_jsxs(Div, { className: "space-y-3", children: [_jsxs(Text, { className: GC.textMuted, children: ["Once your order is SHIPPED, go to ", _jsx(Span, { weight: "bold", children: "My Orders \u2192 [Order] \u2192 Tracking" }), " tab. Your tracking number and carrier name are shown there."] }), _jsx(Text, { className: GC.textMuted, children: "Paste the tracking number into the carrier's website for real-time updates. Common carriers: Shiprocket, Delhivery, BlueDart, India Post, Ekart." }), _jsx(Text, { className: GC.textMuted, children: "Typical delivery times: 2\u20135 days metro cities, 5\u201310 days remote areas, 7\u201314 days for pre-orders subject to supplier shipping." })] })),
|
|
23
23
|
},
|
|
24
24
|
{
|
|
25
25
|
Icon: Camera, iconCls: "w-5 h-5 text-amber-500", title: "Wrong or Damaged Item",
|
|
26
|
-
content: (_jsxs(_Fragment, { children: [_jsx(Alert, { variant: "warning", title: "Do NOT refuse delivery.", children: "Accept the parcel, then photograph it immediately \u2014 both the packaging and the contents before and after unwrapping. This evidence is required for any return or damage claim." }), _jsxs(Text, { className: `${GC.textMuted} mt-4`, children: ["After photographing, open a ", _jsx("
|
|
26
|
+
content: (_jsxs(_Fragment, { children: [_jsx(Alert, { variant: "warning", title: "Do NOT refuse delivery.", children: "Accept the parcel, then photograph it immediately \u2014 both the packaging and the contents before and after unwrapping. This evidence is required for any return or damage claim." }), _jsxs(Text, { className: `${GC.textMuted} mt-4`, children: ["After photographing, open a ", _jsx(Span, { weight: "bold", children: "return request within 2 days of delivery" }), " and attach your photos."] })] })),
|
|
27
27
|
},
|
|
28
28
|
{
|
|
29
29
|
Icon: RotateCcw, title: "Return Policy",
|
|
30
|
-
content: (_jsxs(Div, { className: "space-y-3", children: [_jsxs(Text, { className: GC.textMuted, children: ["Platform-wide return window: ", _jsx("
|
|
30
|
+
content: (_jsxs(Div, { className: "space-y-3", children: [_jsxs(Text, { className: GC.textMuted, children: ["Platform-wide return window: ", _jsx(Span, { weight: "bold", children: "7 days from DELIVERED date" }), ". Some stores offer 30-day windows \u2014 shown on the product page."] }), _jsx(Text, { className: "text-sm font-semibold text-[var(--appkit-color-text)]", children: "Non-returnable items:" }), _jsxs("ul", { className: GC.listDiscMuted, children: [_jsx("li", { children: "Opened card packs (Pok\u00E9mon, Yu-Gi-Oh!, etc.)" }), _jsx("li", { children: "Cracked or opened graded card slabs without documented photographic evidence of a defect" }), _jsx("li", { children: "Items explicitly marked \"Final Sale\" on the listing" })] })] })),
|
|
31
31
|
},
|
|
32
32
|
{
|
|
33
33
|
Icon: Clock, title: "Refund Timeline",
|
|
34
|
-
content: (_jsxs(Div, { className: "space-y-3", children: [_jsx(Text, { className: GC.textMuted, children: "After the seller accepts your return and confirms receipt of the item:" }), _jsxs("ul", { className: GC.listMuted, children: [_jsxs("li", { children: [_jsx("
|
|
34
|
+
content: (_jsxs(Div, { className: "space-y-3", children: [_jsx(Text, { className: GC.textMuted, children: "After the seller accepts your return and confirms receipt of the item:" }), _jsxs("ul", { className: GC.listMuted, children: [_jsxs("li", { children: [_jsx(Span, { weight: "bold", className: GC.textStrong, children: "Credit/debit card" }), " \u2014 3\u20137 business days back to your card via Razorpay."] }), _jsxs("li", { children: [_jsx(Span, { weight: "bold", className: GC.textStrong, children: "UPI" }), " \u2014 typically 1\u20132 business days."] }), _jsxs("li", { children: [_jsx(Span, { weight: "bold", className: GC.textStrong, children: "Net banking" }), " \u2014 3\u20135 business days."] })] }), _jsx(Text, { className: GC.textMuted, children: "Refunds go back to the original payment method. LetItRip does not issue platform credits in lieu of a refund unless both parties agree." })] })),
|
|
35
35
|
},
|
|
36
36
|
{
|
|
37
37
|
Icon: Headphones, title: "Opening a Support Ticket",
|
|
@@ -39,7 +39,7 @@ const SECTIONS = [
|
|
|
39
39
|
},
|
|
40
40
|
{
|
|
41
41
|
Icon: Scale, title: "Dispute Escalation",
|
|
42
|
-
content: (_jsxs(Div, { className: "space-y-3", children: [_jsxs(Text, { className: GC.textMuted, children: ["If the seller does not respond to your return request within ", _jsx("
|
|
42
|
+
content: (_jsxs(Div, { className: "space-y-3", children: [_jsxs(Text, { className: GC.textMuted, children: ["If the seller does not respond to your return request within ", _jsx(Span, { weight: "bold", children: "3 days" }), ", LetItRip's support team steps in to mediate."] }), _jsxs(Text, { className: GC.textMuted, children: ["If mediation cannot resolve the dispute, LetItRip issues a ", _jsx(Span, { weight: "bold", children: "full platform-funded refund" }), " to the buyer. The seller's payout for that order is withheld."] }), _jsx(Alert, { variant: "info", children: "All dispute decisions are final. False dispute claims may result in account restrictions. Always provide accurate, photographic evidence when raising a dispute." })] })),
|
|
43
43
|
},
|
|
44
44
|
];
|
|
45
45
|
// ─── Component ────────────────────────────────────────────────────────────────
|
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
2
|
import { ShoppingBag, ShoppingCart, CreditCard, Tag, CheckCircle, UserX } from "lucide-react";
|
|
3
|
-
import { Div, Heading, Text, Section, Alert } from "../../../ui";
|
|
3
|
+
import { Div, Heading, Span, Text, Section, Alert } from "../../../ui";
|
|
4
4
|
import { GC } from "../../_guide-cls";
|
|
5
5
|
const SECTIONS = [
|
|
6
6
|
{
|
|
7
7
|
Icon: ShoppingBag, title: "Browsing & Search",
|
|
8
|
-
content: (_jsxs(_Fragment, { children: [_jsx(Text, { className: `${GC.textMuted} mb-3`, children: "Use the search bar at the top of any page to find items by keyword \u2014 e.g. \"Charizard Base Set\", \"Hot Wheels Redline\", or \"Beyblade Burst\". Combine keywords for best results." }), _jsx(Text, { className: "text-sm font-semibold text-[var(--appkit-color-text)] mb-2", children: "Available filters:" }), _jsxs("ul", { className: GC.listDiscMuted, children: [_jsxs("li", { children: [_jsx("
|
|
8
|
+
content: (_jsxs(_Fragment, { children: [_jsx(Text, { className: `${GC.textMuted} mb-3`, children: "Use the search bar at the top of any page to find items by keyword \u2014 e.g. \"Charizard Base Set\", \"Hot Wheels Redline\", or \"Beyblade Burst\". Combine keywords for best results." }), _jsx(Text, { className: "text-sm font-semibold text-[var(--appkit-color-text)] mb-2", children: "Available filters:" }), _jsxs("ul", { className: GC.listDiscMuted, children: [_jsxs("li", { children: [_jsx(Span, { weight: "bold", children: "Category" }), " \u2014 Trading Cards, Action Figures, Diecast, Spinning Tops, Model Kits, Vintage & Rare"] }), _jsxs("li", { children: [_jsx(Span, { weight: "bold", children: "Brand" }), " \u2014 Pok\u00E9mon Company, Bandai, Hot Wheels, Hasbro, Funko, and more"] }), _jsxs("li", { children: [_jsx(Span, { weight: "bold", children: "Price range" }), " \u2014 set a minimum and maximum in rupees"] }), _jsxs("li", { children: [_jsx(Span, { weight: "bold", children: "Condition" }), " \u2014 grades 1\u201310 (10 = Gem Mint, 1 = Poor)"] }), _jsxs("li", { children: [_jsx(Span, { weight: "bold", children: "Listing type" }), " \u2014 Standard / Auction / Pre-order"] })] }), _jsx(Text, { className: `${GC.textMuted} mt-3`, children: "Sort options: Relevance, Price (Low to High), Price (High to Low), Newest First. On mobile, tap the Filter icon to open the filter drawer." })] })),
|
|
9
9
|
},
|
|
10
10
|
{
|
|
11
11
|
Icon: ShoppingBag, title: "Reading a Product Page",
|
|
12
|
-
content: (_jsxs("ul", { className: GC.listMuted, children: [_jsxs("li", { children: [_jsx("
|
|
12
|
+
content: (_jsxs("ul", { className: GC.listMuted, children: [_jsxs("li", { children: [_jsx(Span, { weight: "bold", className: GC.textStrong, children: "Images" }), " \u2014 tap or click to zoom; swipe left/right to browse all photos."] }), _jsxs("li", { children: [_jsx(Span, { weight: "bold", className: GC.textStrong, children: "Condition grade" }), " \u2014 rated 1\u201310: 10 = PSA 10 Gem Mint (flawless), 9 = Mint, 8 = Near Mint\u2013Mint, 7 = Near Mint, 5 = Heavily Played, 3 = Damaged, 1 = Poor."] }), _jsxs("li", { children: [_jsx(Span, { weight: "bold", className: GC.textStrong, children: "Seller card" }), " \u2014 shows store name, rating, and total orders delivered. Click the store name to browse all their listings."] }), _jsxs("li", { children: [_jsx(Span, { weight: "bold", className: GC.textStrong, children: "Reviews tab" }), " \u2014 verified buyer reviews with star ratings, photos, and seller responses."] }), _jsxs("li", { children: [_jsx(Span, { weight: "bold", className: GC.textStrong, children: "Questions?" }), " \u2014 if listing details are unclear, open a support ticket and reference the product URL."] })] })),
|
|
13
13
|
},
|
|
14
14
|
{
|
|
15
15
|
Icon: ShoppingCart, title: "Cart",
|
|
16
|
-
content: (_jsxs("ul", { className: GC.listMuted, children: [_jsxs("li", { children: [_jsx("
|
|
16
|
+
content: (_jsxs("ul", { className: GC.listMuted, children: [_jsxs("li", { children: [_jsx(Span, { weight: "bold", className: GC.textStrong, children: "Adding items" }), " \u2014 click \"Add to Cart\" on any standard product or pre-order. Auctions have a \"Place Bid\" flow instead."] }), _jsxs("li", { children: [_jsx(Span, { weight: "bold", className: GC.textStrong, children: "Guest cart" }), " \u2014 saved in your browser (localStorage); cleared after 30 days of inactivity."] }), _jsxs("li", { children: [_jsx(Span, { weight: "bold", className: GC.textStrong, children: "Logged-in cart" }), " \u2014 synced to your account via Firestore; persists across all your devices."] }), _jsxs("li", { children: [_jsx(Span, { weight: "bold", className: GC.textStrong, children: "Item limit" }), " \u2014 up to 20 items per cart. Remove items before adding more."] }), _jsxs("li", { children: [_jsx(Span, { weight: "bold", className: GC.textStrong, children: "Updating" }), " \u2014 use the quantity selector or click the trash icon to remove. Changes sync instantly."] })] })),
|
|
17
17
|
},
|
|
18
18
|
{
|
|
19
19
|
Icon: CreditCard, title: "Checkout",
|
|
20
|
-
content: (_jsxs("ul", { className: GC.listMuted, children: [_jsxs("li", { children: [_jsx("
|
|
20
|
+
content: (_jsxs("ul", { className: GC.listMuted, children: [_jsxs("li", { children: [_jsx(Span, { weight: "bold", className: GC.textStrong, children: "Shipping address" }), " \u2014 enter or select a saved address. All fields required: full name, phone, address line, city, state, pin code."] }), _jsxs("li", { children: [_jsx(Span, { weight: "bold", className: GC.textStrong, children: "Payment methods" }), " \u2014 UPI, credit/debit card (Visa, Mastercard, Rupay), net banking \u2014 all processed via Razorpay."] }), _jsxs("li", { children: [_jsx(Span, { weight: "bold", className: GC.textStrong, children: "Secure checkout" }), " \u2014 LetItRip never stores your card details. All payment data is handled by Razorpay's PCI-DSS compliant gateway."] })] })),
|
|
21
21
|
},
|
|
22
22
|
{
|
|
23
23
|
Icon: Tag, title: "Coupons",
|
|
@@ -25,11 +25,11 @@ const SECTIONS = [
|
|
|
25
25
|
},
|
|
26
26
|
{
|
|
27
27
|
Icon: CheckCircle, title: "Order Confirmation",
|
|
28
|
-
content: (_jsxs(_Fragment, { children: [_jsx(Text, { className: GC.textMuted, children: "After a successful payment you'll see an on-screen confirmation with your order ID. You'll also receive:" }), _jsxs("ul", { className: `${GC.listDiscMuted} mt-3`, children: [_jsx("li", { children: "An email confirmation to your registered address" }), _jsx("li", { children: "A WhatsApp message if you've added and verified your phone number" })] }), _jsxs(Text, { className: `${GC.textMuted} mt-3`, children: ["View all your orders at any time under ", _jsx("
|
|
28
|
+
content: (_jsxs(_Fragment, { children: [_jsx(Text, { className: GC.textMuted, children: "After a successful payment you'll see an on-screen confirmation with your order ID. You'll also receive:" }), _jsxs("ul", { className: `${GC.listDiscMuted} mt-3`, children: [_jsx("li", { children: "An email confirmation to your registered address" }), _jsx("li", { children: "A WhatsApp message if you've added and verified your phone number" })] }), _jsxs(Text, { className: `${GC.textMuted} mt-3`, children: ["View all your orders at any time under ", _jsx(Span, { weight: "bold", children: "My Account \u2192 My Orders" }), "."] })] })),
|
|
29
29
|
},
|
|
30
30
|
{
|
|
31
31
|
Icon: UserX, title: "Guest Limitations",
|
|
32
|
-
content: (_jsxs(Alert, { variant: "info", title: "Browsing as a guest?", children: ["You can browse listings and add items to your cart as a guest. However, to ", _jsx("
|
|
32
|
+
content: (_jsxs(Alert, { variant: "info", title: "Browsing as a guest?", children: ["You can browse listings and add items to your cart as a guest. However, to ", _jsx(Span, { weight: "bold", children: "complete checkout" }), ", save your wishlist, or contact support you must be signed in. Creating an account takes under 30 seconds \u2014 just an email and a password."] })),
|
|
33
33
|
},
|
|
34
34
|
];
|
|
35
35
|
// ─── Component ────────────────────────────────────────────────────────────────
|
|
@@ -56,7 +56,7 @@ function BuyerOfferCard({ offer, onAcceptCounter, onWithdraw, onCheckout, onUpda
|
|
|
56
56
|
}
|
|
57
57
|
});
|
|
58
58
|
}
|
|
59
|
-
return (_jsxs(Div, {
|
|
59
|
+
return (_jsxs(Div, { surface: "card", padding: "sm", className: "space-y-3", children: [_jsxs(Div, { className: "flex items-start justify-between gap-2 flex-wrap", children: [_jsxs(Div, { className: "min-w-0", children: [_jsx(Text, { className: "font-semibold text-sm text-zinc-900 dark:text-zinc-100 truncate", children: offer.productTitle ?? "Unknown Product" }), _jsx(Text, { className: "text-xs text-zinc-500 dark:text-zinc-400 mt-0.5", children: relativeTime(offer.createdAt) })] }), _jsx(Badge, { variant: statusVariant(offer.status), className: "shrink-0 capitalize text-xs", children: offer.status })] }), _jsxs(Div, { className: "flex gap-4 flex-wrap", children: [_jsxs(Div, { children: [_jsx(Text, { className: "text-xs text-zinc-400 dark:text-zinc-400 uppercase tracking-wide", children: "Listed" }), _jsx(Text, { className: "text-sm font-medium text-zinc-700 dark:text-zinc-300", children: formatRupees(offer.listedPrice) })] }), _jsxs(Div, { children: [_jsx(Text, { className: "text-xs text-zinc-400 dark:text-zinc-400 uppercase tracking-wide", children: "Your Offer" }), _jsx(Text, { className: "text-sm font-semibold text-zinc-900 dark:text-zinc-100", children: formatRupees(offer.offerAmount) })] }), offer.counterAmount != null && (_jsxs(Div, { children: [_jsx(Text, { className: "text-xs text-zinc-400 dark:text-zinc-400 uppercase tracking-wide", children: "Seller Counter" }), _jsx(Text, { className: "text-sm font-semibold text-blue-600 dark:text-blue-400", children: formatRupees(offer.counterAmount) })] })), offer.lockedPrice != null && (_jsxs(Div, { children: [_jsx(Text, { className: "text-xs text-zinc-400 dark:text-zinc-400 uppercase tracking-wide", children: "Agreed Price" }), _jsx(Text, { className: "text-sm font-semibold text-success", children: formatRupees(offer.lockedPrice) })] }))] }), offer.sellerNote && (_jsxs(Text, { className: "text-xs text-zinc-500 dark:text-zinc-400 italic", children: ["Seller note: \"", offer.sellerNote, "\""] })), offer.status === "countered" && (_jsxs(Div, { className: "space-y-2", children: [_jsxs(Text, { className: "text-xs text-info font-medium", children: ["Seller countered at ", formatRupees(offer.counterAmount), ". Accept or withdraw your offer."] }), _jsxs(Div, { className: "flex gap-2 flex-wrap", children: [_jsx(Button, { size: "sm", variant: "primary", onClick: () => act(() => onAcceptCounter(offer.id), { status: "accepted", lockedPrice: offer.counterAmount }), disabled: isPending, children: isPending ? "Accepting…" : `Accept ${formatRupees(offer.counterAmount)}` }), _jsx(Button, { size: "sm", variant: "ghost", onClick: () => setConfirming("withdraw"), disabled: isPending, className: "text-error border border-red-200 dark:border-red-800", children: "Withdraw" })] })] })), offer.status === "accepted" && onCheckout && (_jsx(Button, { size: "sm", variant: "primary", onClick: () => act(() => onCheckout(offer.id), { status: "paid" }), disabled: isPending, children: isPending ? "Processing…" : "Checkout at Agreed Price" })), offer.status === "pending" && (_jsx(Button, { size: "sm", variant: "ghost", onClick: () => setConfirming("withdraw"), disabled: isPending, className: "text-error border border-red-200 dark:border-red-800 text-xs", children: "Withdraw Offer" })), confirming === "withdraw" && (_jsxs(Div, { className: "flex gap-2", children: [_jsx(Button, { size: "sm", variant: "ghost", onClick: () => act(() => onWithdraw(offer.id), { status: "withdrawn" }), disabled: isPending, className: "text-error border border-red-200 dark:border-red-800", children: isPending ? "Withdrawing…" : "Confirm Withdraw" }), _jsx(Button, { size: "sm", variant: "ghost", onClick: () => setConfirming(null), disabled: isPending, children: "Cancel" })] })), error && _jsx(Alert, { variant: "error", children: _jsx(Text, { className: "text-xs", children: error }) })] }));
|
|
60
60
|
}
|
|
61
61
|
export function UserOffersPanel({ fetchEndpoint = "/api/user/offers", onAcceptCounter, onWithdraw, onCheckout, className = "", }) {
|
|
62
62
|
const [offers, setOffers] = useState([]);
|
|
@@ -17,10 +17,10 @@ const CATEGORY_OPTIONS = [
|
|
|
17
17
|
{ label: "General", value: "general" },
|
|
18
18
|
];
|
|
19
19
|
const STATUS_BADGE = {
|
|
20
|
-
open: "bg-
|
|
21
|
-
in_progress: "bg-
|
|
20
|
+
open: "bg-info-surface text-info",
|
|
21
|
+
in_progress: "bg-warning-surface text-warning",
|
|
22
22
|
waiting_on_user: "bg-purple-100 text-purple-700 dark:bg-purple-900/40 dark:text-purple-300",
|
|
23
|
-
resolved: "bg-
|
|
23
|
+
resolved: "bg-success-surface text-success",
|
|
24
24
|
closed: "bg-zinc-100 text-zinc-600 dark:bg-zinc-800 dark:text-zinc-400",
|
|
25
25
|
};
|
|
26
26
|
const ROLE_LABEL = {
|
|
@@ -86,7 +86,7 @@ export function UserSupportView(_props) {
|
|
|
86
86
|
}
|
|
87
87
|
function renderTicketListArea(props) {
|
|
88
88
|
const { isLoading, error, tickets, setSelectedTicket, setDetailOpen } = props;
|
|
89
|
-
return (_jsxs(_Fragment, { children: [isLoading && (_jsx(Div, { className: "space-y-3", children: [1, 2, 3].map((i) => _jsx("div", { className: "h-16 animate-pulse rounded-lg bg-zinc-100 dark:bg-zinc-800" }, i)) })), error && (_jsx(Div, { className: "rounded-xl border border-red-200 bg-
|
|
89
|
+
return (_jsxs(_Fragment, { children: [isLoading && (_jsx(Div, { className: "space-y-3", children: [1, 2, 3].map((i) => _jsx("div", { className: "h-16 animate-pulse rounded-lg bg-zinc-100 dark:bg-zinc-800" }, i)) })), error && (_jsx(Div, { className: "rounded-xl border border-red-200 bg-error-surface px-4 py-3 text-sm text-error dark:border-red-900/60", children: "Failed to load support tickets." })), !isLoading && tickets.length === 0 && (_jsx(Div, { className: "rounded-xl border border-zinc-200 bg-zinc-50 px-6 py-10 text-center dark:border-zinc-700 dark:bg-zinc-900/40", children: _jsx(Text, { className: "text-sm text-zinc-500 dark:text-zinc-400", children: "You haven't opened any support tickets yet." }) })), _jsx("ul", { className: "space-y-3", children: tickets.map((ticket) => (_jsx("li", { children: _jsx("button", { type: "button", className: "w-full rounded-xl border border-zinc-200 bg-white p-4 text-left shadow-sm hover:border-primary-300 transition-colors dark:border-zinc-700 dark:bg-zinc-900", onClick: () => { setSelectedTicket(ticket); setDetailOpen(true); }, children: _jsxs("div", { className: "flex items-start justify-between gap-2", children: [_jsxs("div", { className: "min-w-0 flex-1", children: [_jsx(Text, { className: "font-medium text-zinc-900 dark:text-zinc-100 truncate", children: ticket.subject }), _jsxs(Text, { className: "text-xs text-zinc-500 dark:text-zinc-400", children: [ticket.category.replace(/_/g, " "), ticket.orderId ? ` · Order: ${ticket.orderId}` : ""] })] }), _jsx("span", { className: `shrink-0 inline-flex rounded-full px-2.5 py-0.5 text-xs font-medium ${STATUS_BADGE[ticket.status] ?? STATUS_BADGE.open}`, children: ticket.status.replace(/_/g, " ") })] }) }) }, ticket.id))) })] }));
|
|
90
90
|
}
|
|
91
91
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
92
92
|
function renderNewTicketDrawer(props) {
|
|
@@ -99,7 +99,7 @@ export function AdminAdsView({ endpoint = ADMIN_ENDPOINTS.ADS, labels = {}, crea
|
|
|
99
99
|
{
|
|
100
100
|
key: "status",
|
|
101
101
|
header: "Status",
|
|
102
|
-
render: (row) => (_jsxs("div", { "data-section": "adminadsview-div-242", children: [_jsx(Text, { className: "text-xs uppercase tracking-wide", children: row.status }), row.publishReady === false ? (_jsx(Text, { className: "text-[11px] text-
|
|
102
|
+
render: (row) => (_jsxs("div", { "data-section": "adminadsview-div-242", children: [_jsx(Text, { className: "text-xs uppercase tracking-wide", children: row.status }), row.publishReady === false ? (_jsx(Text, { className: "text-[11px] text-error", children: "Publish blocked" })) : null] })),
|
|
103
103
|
},
|
|
104
104
|
{
|
|
105
105
|
key: "placementIds",
|
|
@@ -101,7 +101,7 @@ export function AdminAllEventEntriesView({ children, ...props }) {
|
|
|
101
101
|
if (hasChildren) {
|
|
102
102
|
return _jsx(ListingViewShell, { portal: "admin", ...props, children: children });
|
|
103
103
|
}
|
|
104
|
-
return (_jsxs("div", { className: "min-h-screen", children: [_jsx(ListingToolbar, { filterCount: activeFilterCount, onFiltersClick: openFilters, searchValue: searchInput, searchPlaceholder: "Search by user name or event ID", onSearchChange: setSearchInput, onSearchCommit: commitSearch, sortValue: table.get("sort") || DEFAULT_SORT, sortOptions: SORT_OPTIONS, onSortChange: (v) => { table.set("sort", v); }, showTableView: true, view: view, onViewChange: (v) => setView(v), onResetAll: resetAll, hasActiveState: hasActiveState }), totalPages > 1 && (_jsx("div", { className: "sticky top-[calc(var(--header-height,0px)+44px)] z-10 flex justify-center bg-white/95 dark:bg-slate-900/95 backdrop-blur-sm border-b border-zinc-200 dark:border-slate-700 px-3 py-1.5", children: _jsx(Pagination, { currentPage: currentPage, totalPages: totalPages, onPageChange: (p) => table.setPage(p) }) })), _jsxs("div", { className: "py-4 px-3 sm:px-4", children: [errorMessage && (_jsx("div", { className: "mb-4 rounded-xl border border-red-200 bg-
|
|
104
|
+
return (_jsxs("div", { className: "min-h-screen", children: [_jsx(ListingToolbar, { filterCount: activeFilterCount, onFiltersClick: openFilters, searchValue: searchInput, searchPlaceholder: "Search by user name or event ID", onSearchChange: setSearchInput, onSearchCommit: commitSearch, sortValue: table.get("sort") || DEFAULT_SORT, sortOptions: SORT_OPTIONS, onSortChange: (v) => { table.set("sort", v); }, showTableView: true, view: view, onViewChange: (v) => setView(v), onResetAll: resetAll, hasActiveState: hasActiveState }), totalPages > 1 && (_jsx("div", { className: "sticky top-[calc(var(--header-height,0px)+44px)] z-10 flex justify-center bg-white/95 dark:bg-slate-900/95 backdrop-blur-sm border-b border-zinc-200 dark:border-slate-700 px-3 py-1.5", children: _jsx(Pagination, { currentPage: currentPage, totalPages: totalPages, onPageChange: (p) => table.setPage(p) }) })), _jsxs("div", { className: "py-4 px-3 sm:px-4", children: [errorMessage && (_jsx("div", { className: "mb-4 rounded-xl border border-red-200 bg-error-surface px-4 py-3 text-sm text-error dark:border-red-900/60", children: errorMessage })), _jsx(DataTable, { rows: rows, isLoading: isLoading, emptyLabel: "No entries found", renderRowActions: (row) => {
|
|
105
105
|
const er = row;
|
|
106
106
|
return (_jsx(RowActionMenu, { actions: [
|
|
107
107
|
{ label: ACTIONS.ADMIN["confirm-entry"].label, onClick: () => updateMutation.mutate({ id: er.id, status: "CONFIRMED" }) },
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
2
|
import { BarChart2 } from "lucide-react";
|
|
3
|
-
import { Div, Heading, Text, Section, Alert } from "../../../ui";
|
|
3
|
+
import { Div, Heading, Span, Text, Section, Alert } from "../../../ui";
|
|
4
4
|
import { GC } from "../../_guide-cls";
|
|
5
5
|
export function AdminAnalyticsGuideView() {
|
|
6
6
|
return (_jsxs(Div, { className: "space-y-8 pb-10 max-w-3xl mx-auto", children: [_jsxs(Section, { children: [_jsxs(Div, { className: "flex items-center gap-3 mb-2", children: [_jsx(Div, { className: "flex-shrink-0 w-10 h-10 rounded-xl flex items-center justify-center", style: { background: "linear-gradient(135deg,var(--appkit-color-primary-700,#4f46e5) 0%,var(--appkit-color-cobalt,#2563eb) 100%)" }, children: _jsx(BarChart2, { className: "w-5 h-5 text-white" }) }), _jsx(Text, { className: "text-sm font-semibold text-[var(--appkit-color-text-muted)] uppercase tracking-widest", children: "Admin Guide" })] }), _jsx(Heading, { level: 1, className: "text-2xl md:text-3xl font-bold text-[var(--appkit-color-text)] mb-2", children: "Analytics" }), _jsx(Text, { className: "text-[var(--appkit-color-text-muted)]", children: "Revenue, order funnel, product performance, and store metrics on LetItRip." })] }), [
|
|
7
7
|
{
|
|
8
8
|
title: "Revenue Dashboard",
|
|
9
|
-
content: (_jsxs("ul", { className: GC.listMuted, children: [_jsxs("li", { children: [_jsx("
|
|
9
|
+
content: (_jsxs("ul", { className: GC.listMuted, children: [_jsxs("li", { children: [_jsx(Span, { weight: "bold", className: "text-[var(--appkit-color-text)]", children: "GMV (Gross Merchandise Value)" }), ": Total order subtotals across all stores. Does not deduct platform commission or refunds."] }), _jsxs("li", { children: [_jsx(Span, { weight: "bold", className: "text-[var(--appkit-color-text)]", children: "Net Revenue" }), ": GMV \u00D7 platformFee \u2014 refunded orders excluded."] }), _jsxs("li", { children: [_jsx(Span, { weight: "bold", className: "text-[var(--appkit-color-text)]", children: "Period filter" }), ": Last 7 / 30 / 90 days, or custom date range. All monetary values shown in INR."] }), _jsxs("li", { children: [_jsx(Span, { weight: "bold", className: "text-[var(--appkit-color-text)]", children: "Payout total" }), ": Total disbursed to sellers in the same period. Revenue - Payout = Platform earnings."] })] })),
|
|
10
10
|
},
|
|
11
11
|
{
|
|
12
12
|
title: "Order Funnel",
|
|
@@ -14,7 +14,7 @@ export function AdminAnalyticsGuideView() {
|
|
|
14
14
|
},
|
|
15
15
|
{
|
|
16
16
|
title: "Product Performance",
|
|
17
|
-
content: (_jsxs("ul", { className: GC.listMuted, children: [_jsxs("li", { children: [_jsx("
|
|
17
|
+
content: (_jsxs("ul", { className: GC.listMuted, children: [_jsxs("li", { children: [_jsx(Span, { weight: "bold", className: "text-[var(--appkit-color-text)]", children: "Top products by orders" }), ": Which products drive the most completed transactions."] }), _jsxs("li", { children: [_jsx(Span, { weight: "bold", className: "text-[var(--appkit-color-text)]", children: "Top products by views" }), ": High views but low orders may indicate pricing, photos, or description issues."] }), _jsxs("li", { children: [_jsx(Span, { weight: "bold", className: "text-[var(--appkit-color-text)]", children: "Return rate" }), ": Products with >10% return rate need review \u2014 usually a condition description or photo quality issue."] })] })),
|
|
18
18
|
},
|
|
19
19
|
{
|
|
20
20
|
title: "Store-Level Metrics",
|
|
@@ -110,7 +110,7 @@ export function AdminBidsView({ children, ...props }) {
|
|
|
110
110
|
}
|
|
111
111
|
return (_jsxs(_Fragment, { children: [_jsxs("div", { className: "min-h-screen", children: [_jsx(ListingToolbar, { filterCount: activeFilterCount, onFiltersClick: openFilters, searchValue: searchInput, searchPlaceholder: "Search bids, products, or bidder IDs", onSearchChange: setSearchInput, onSearchCommit: commitSearch, sortValue: table.get("sort") || DEFAULT_SORT, sortOptions: SORT_OPTIONS, onSortChange: (v) => { table.set("sort", v); }, showTableView: true, view: view, onViewChange: (v) => setView(v), onResetAll: resetAll, hasActiveState: hasActiveState }), _jsx(BulkActionBar, { selectedCount: selection.selectedCount, onClearSelection: selection.clearSelection, actions: [
|
|
112
112
|
{ id: ROW_ACTION_ID.CANCEL, label: ACTIONS.ADMIN["cancel-bid"].label, variant: "secondary", onClick: () => { selection.clearSelection(); } },
|
|
113
|
-
] }), totalPages > 1 && (_jsx("div", { className: "sticky top-[calc(var(--header-height,0px)+44px)] z-10 flex justify-center bg-white/95 dark:bg-slate-900/95 backdrop-blur-sm border-b border-zinc-200 dark:border-slate-700 px-3 py-1.5", children: _jsx(Pagination, { currentPage: currentPage, totalPages: totalPages, onPageChange: (p) => table.setPage(p) }) })), _jsxs("div", { className: "py-4 px-3 sm:px-4", children: [errorMessage && (_jsx("div", { className: "mb-4 rounded-xl border border-red-200 bg-
|
|
113
|
+
] }), totalPages > 1 && (_jsx("div", { className: "sticky top-[calc(var(--header-height,0px)+44px)] z-10 flex justify-center bg-white/95 dark:bg-slate-900/95 backdrop-blur-sm border-b border-zinc-200 dark:border-slate-700 px-3 py-1.5", children: _jsx(Pagination, { currentPage: currentPage, totalPages: totalPages, onPageChange: (p) => table.setPage(p) }) })), _jsxs("div", { className: "py-4 px-3 sm:px-4", children: [errorMessage && (_jsx("div", { className: "mb-4 rounded-xl border border-red-200 bg-error-surface px-4 py-3 text-sm text-error dark:border-red-900/60", children: errorMessage })), _jsx(DataTable, { rows: rows, isLoading: isLoading, emptyLabel: "No bids found", renderRowActions: (row) => {
|
|
114
114
|
const bidRow = row;
|
|
115
115
|
const isCancelled = bidRow.status === "cancelled" || bidRow.status === "voided";
|
|
116
116
|
useBottomActions(selection.selectedCount > 0 ? { bulk: { selectedCount: selection.selectedCount, onClearSelection: selection.clearSelection, actions: [
|
|
@@ -113,5 +113,5 @@ export function AdminBlogView({ children, getRowHref, ...props }) {
|
|
|
113
113
|
return (_jsxs("div", { className: "min-h-screen", children: [_jsx(Heading, { level: 1, className: "sr-only", children: "Blog Posts" }), _jsx(ListingToolbar, { filterCount: activeFilterCount, onFiltersClick: openFilters, searchValue: searchInput, searchPlaceholder: "Search articles, authors, or tags", onSearchChange: setSearchInput, onSearchCommit: commitSearch, sortValue: table.get("sort") || DEFAULT_SORT, sortOptions: SORT_OPTIONS, onSortChange: (v) => { table.set("sort", v); }, showTableView: true, view: view, onViewChange: (v) => setView(v), onResetAll: resetAll, hasActiveState: hasActiveState, extra: _jsxs(Button, { size: "sm", onClick: openCreatePanel, className: "flex items-center gap-1.5", children: [_jsx(Plus, { className: "h-4 w-4" }), "New Post"] }) }), _jsx(BulkActionBar, { selectedCount: selection.selectedCount, onClearSelection: selection.clearSelection, actions: [
|
|
114
114
|
{ id: "publish", label: ACTIONS.ADMIN["publish-blog"].label, variant: "primary", onClick: () => { selection.clearSelection(); } },
|
|
115
115
|
{ id: "draft", label: ACTIONS.ADMIN["draft-blog"].label, variant: "secondary", onClick: () => { selection.clearSelection(); } },
|
|
116
|
-
] }), totalPages > 1 && (_jsx("div", { className: "sticky top-[calc(var(--header-height,0px)+44px)] z-10 flex justify-center bg-white/95 dark:bg-slate-900/95 backdrop-blur-sm border-b border-zinc-200 dark:border-slate-700 px-3 py-1.5", children: _jsx(Pagination, { currentPage: currentPage, totalPages: totalPages, onPageChange: (p) => table.setPage(p) }) })), _jsxs("div", { className: "py-4 px-3 sm:px-4", children: [errorMessage && (_jsx("div", { className: "mb-4 rounded-xl border border-red-200 bg-
|
|
116
|
+
] }), totalPages > 1 && (_jsx("div", { className: "sticky top-[calc(var(--header-height,0px)+44px)] z-10 flex justify-center bg-white/95 dark:bg-slate-900/95 backdrop-blur-sm border-b border-zinc-200 dark:border-slate-700 px-3 py-1.5", children: _jsx(Pagination, { currentPage: currentPage, totalPages: totalPages, onPageChange: (p) => table.setPage(p) }) })), _jsxs("div", { className: "py-4 px-3 sm:px-4", children: [errorMessage && (_jsx("div", { className: "mb-4 rounded-xl border border-red-200 bg-error-surface px-4 py-3 text-sm text-error dark:border-red-900/60", children: errorMessage })), view === "table" ? (_jsx(DataTable, { rows: rows, isLoading: isLoading, emptyLabel: "No blog posts found", selectedIds: selection.selectedIdSet, onToggleSelect: selection.toggle, onToggleSelectAll: (next) => next ? selection.setSelectedIds(rows.map(r => r.id)) : selection.clearSelection(), onRowClick: (row) => openEditPanel(row.id) })) : (_jsx(AdminViewCards, { rows: rows, view: view, isLoading: isLoading, emptyLabel: "No blog posts found", onRowClick: (row) => openEditPanel(row.id), selectedIdSet: selection.selectedIdSet, onToggleSelect: selection.toggle }))] }), _jsx(BlogFilterDrawer, { filterOpen: filterOpen, setFilterOpen: setFilterOpen, activeFilterCount: activeFilterCount, clearFilters: clearFilters, pendingFilters: pendingFilters, setPendingFilters: setPendingFilters, applyFilters: applyFilters }), _jsx(SideDrawer, { isOpen: isCreateOpen || isEditOpen, onClose: closePanel, title: isCreateOpen ? "New Post" : "Edit Post", mode: isCreateOpen ? "create" : "edit", children: (isCreateOpen || isEditOpen) && (_jsx(AdminBlogEditorView, { postId: editId ?? undefined, onSaved: closePanel, onDeleted: closePanel, embedded: true })) })] }));
|
|
117
117
|
}
|
|
@@ -93,5 +93,5 @@ export function AdminBrandsView({ children, ...props }) {
|
|
|
93
93
|
return (_jsxs("div", { className: "min-h-screen", children: [_jsx(ListingToolbar, { filterCount: activeFilterCount, onFiltersClick: openFilters, searchValue: searchInput, searchPlaceholder: "Search brands by name or slug", onSearchChange: setSearchInput, onSearchCommit: commitSearch, sortValue: table.get("sort") || DEFAULT_SORT, sortOptions: SORT_OPTIONS, onSortChange: (v) => { table.set("sort", v); }, showTableView: true, view: view, onViewChange: (v) => setView(v), onResetAll: resetAll, hasActiveState: hasActiveState, extra: _jsxs(Button, { size: "sm", onClick: openCreatePanel, className: "flex items-center gap-1.5", children: [_jsx(Plus, { className: "h-4 w-4" }), "Add Brand"] }) }), _jsx(BulkActionBar, { selectedCount: selection.selectedCount, onClearSelection: selection.clearSelection, actions: [
|
|
94
94
|
{ id: "edit", label: ACTIONS.ADMIN["edit-brand"].label, variant: "primary", onClick: () => { const id = selection.selectedIds[0]; if (id)
|
|
95
95
|
openEditPanel(id); selection.clearSelection(); } },
|
|
96
|
-
] }), totalPages > 1 && (_jsx("div", { className: "sticky top-[calc(var(--header-height,0px)+44px)] z-10 flex justify-center bg-white/95 dark:bg-slate-900/95 backdrop-blur-sm border-b border-zinc-200 dark:border-slate-700 px-3 py-1.5", children: _jsx(Pagination, { currentPage: currentPage, totalPages: totalPages, onPageChange: (p) => table.setPage(p) }) })), _jsxs("div", { className: "py-4 px-3 sm:px-4", children: [errorMessage && (_jsx("div", { className: "mb-4 rounded-xl border border-red-200 bg-
|
|
96
|
+
] }), totalPages > 1 && (_jsx("div", { className: "sticky top-[calc(var(--header-height,0px)+44px)] z-10 flex justify-center bg-white/95 dark:bg-slate-900/95 backdrop-blur-sm border-b border-zinc-200 dark:border-slate-700 px-3 py-1.5", children: _jsx(Pagination, { currentPage: currentPage, totalPages: totalPages, onPageChange: (p) => table.setPage(p) }) })), _jsxs("div", { className: "py-4 px-3 sm:px-4", children: [errorMessage && (_jsx("div", { className: "mb-4 rounded-xl border border-red-200 bg-error-surface px-4 py-3 text-sm text-error dark:border-red-900/60", children: errorMessage })), view === "table" ? (_jsx(DataTable, { rows: rows, isLoading: isLoading, emptyLabel: "No brands found", selectedIds: selection.selectedIdSet, onToggleSelect: selection.toggle, onToggleSelectAll: (next) => next ? selection.setSelectedIds(rows.map(r => r.id)) : selection.clearSelection(), onRowClick: (row) => openEditPanel(row.id) })) : (_jsx(AdminViewCards, { rows: rows, view: view, isLoading: isLoading, emptyLabel: "No brands found", onRowClick: (row) => openEditPanel(row.id), selectedIdSet: selection.selectedIdSet, onToggleSelect: selection.toggle }))] }), _jsx(BrandsFilterDrawer, { filterOpen: filterOpen, setFilterOpen: setFilterOpen, activeFilterCount: activeFilterCount, clearFilters: clearFilters, pendingFilters: pendingFilters, setPendingFilters: setPendingFilters, applyFilters: applyFilters }), _jsx(SideDrawer, { isOpen: isCreateOpen || isEditOpen, onClose: closePanel, title: isCreateOpen ? "Add Brand" : "Edit Brand", mode: isCreateOpen ? "create" : "edit", children: (isCreateOpen || isEditOpen) && (_jsx(AdminBrandEditorView, { brandId: editId ?? undefined, onSaved: closePanel, onDeleted: closePanel, embedded: true })) })] }));
|
|
97
97
|
}
|
|
@@ -193,7 +193,7 @@ export function AdminBundlesView({ getEditHref, newHref }) {
|
|
|
193
193
|
useBottomActions(selection.selectedCount > 0 ? { bulk: { selectedCount: selection.selectedCount, onClearSelection: selection.clearSelection, actions: bulkActions } } : {});
|
|
194
194
|
return (_jsxs("div", { className: "min-h-screen", children: [_jsx(Heading, { level: 1, className: "sr-only", children: "Bundles" }), _jsx(ListingToolbar, { filterCount: activeFilterCount, onFiltersClick: openFilters, searchValue: searchInput, searchPlaceholder: "Search bundles by name or slug\u2026", onSearchChange: setSearchInput, onSearchCommit: commitSearch, sortValue: table.get("sort") || DEFAULT_SORT, sortOptions: SORT_OPTIONS, onSortChange: (v) => {
|
|
195
195
|
table.set("sort", v);
|
|
196
|
-
}, onResetAll: resetAll, hasActiveState: hasActiveState, extra: _jsx(Button, { asChild: true, size: "sm", variant: "primary", children: _jsxs("a", { href: newHref, className: "flex items-center gap-1.5", children: [_jsx(Plus, { className: "h-4 w-4" }), BUNDLE_COPY.adminList.newButton] }) }) }), _jsx(BulkActionBar, { selectedCount: selection.selectedCount, onClearSelection: selection.clearSelection, actions: bulkActions }), totalPages > 1 && (_jsx("div", { className: "sticky top-[calc(var(--header-height,0px)+44px)] z-10 flex justify-center bg-white/95 dark:bg-slate-900/95 backdrop-blur-sm border-b border-zinc-200 dark:border-slate-700 px-3 py-1.5", children: _jsx(Pagination, { currentPage: currentPage, totalPages: totalPages, onPageChange: (p) => table.setPage(p) }) })), _jsxs("div", { className: "py-4 px-3 sm:px-4", children: [errorMessage && (_jsx("div", { className: "mb-4 rounded-xl border border-red-200 bg-
|
|
196
|
+
}, onResetAll: resetAll, hasActiveState: hasActiveState, extra: _jsx(Button, { asChild: true, size: "sm", variant: "primary", children: _jsxs("a", { href: newHref, className: "flex items-center gap-1.5", children: [_jsx(Plus, { className: "h-4 w-4" }), BUNDLE_COPY.adminList.newButton] }) }) }), _jsx(BulkActionBar, { selectedCount: selection.selectedCount, onClearSelection: selection.clearSelection, actions: bulkActions }), totalPages > 1 && (_jsx("div", { className: "sticky top-[calc(var(--header-height,0px)+44px)] z-10 flex justify-center bg-white/95 dark:bg-slate-900/95 backdrop-blur-sm border-b border-zinc-200 dark:border-slate-700 px-3 py-1.5", children: _jsx(Pagination, { currentPage: currentPage, totalPages: totalPages, onPageChange: (p) => table.setPage(p) }) })), _jsxs("div", { className: "py-4 px-3 sm:px-4", children: [errorMessage && (_jsx("div", { className: "mb-4 rounded-xl border border-red-200 bg-error-surface px-4 py-3 text-sm text-error dark:border-red-900/60", children: errorMessage })), _jsx(DataTable, { columns: COLUMNS, rows: rows, isLoading: isLoading, emptyLabel: BUNDLE_COPY.adminList.empty, getRowHref: getEditHref, selectedIds: selection.selectedIdSet, onToggleSelect: selection.toggle, onToggleSelectAll: (next) => next
|
|
197
197
|
? selection.setSelectedIds(rows.map((r) => r.id))
|
|
198
198
|
: selection.clearSelection(), renderRowActions: (row) => (_jsx(Button, { variant: "ghost", size: "sm", isLoading: rebuildingId === row.id, disabled: rebuildingId === row.id, onClick: () => void handleRebuild(row.id), children: ACTIONS.ADMIN["rebuild-bundle"].label })) })] }), _jsx(BundlesFilterDrawer, { filterOpen: filterOpen, setFilterOpen: setFilterOpen, activeFilterCount: activeFilterCount, clearFilters: clearFilters, pendingFilters: pendingFilters, setPendingFilters: setPendingFilters, applyFilters: applyFilters })] }));
|
|
199
199
|
}
|