storefront-layouts 1.0.16 → 1.0.18
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/components/auth/LoginForm.js +1 -1
- package/dist/components/auth/LoginSheet.js +1 -1
- package/dist/components/auth/login-form-core.js +2 -2
- package/dist/components/auth/login-sheet-registry.js +2 -2
- package/dist/components/auth/login-sheet-themes/booking-agenda.theme.js +1 -1
- package/dist/components/auth/login-sheet-themes/booking.theme.js +1 -1
- package/dist/components/auth/login-sheet-themes/clothing-minimal.theme.js +1 -1
- package/dist/components/auth/login-sheet-themes/clothing.theme.js +1 -1
- package/dist/components/auth/login-sheet-themes/electronics-grid.theme.js +1 -1
- package/dist/components/auth/login-sheet-themes/electronics.theme.js +1 -1
- package/dist/components/auth/login-sheet-themes/food-modern.theme.js +1 -1
- package/dist/components/auth/login-sheet-themes/food.theme.js +1 -1
- package/dist/components/auth/login-sheet-themes/index.js +9 -9
- package/dist/components/auth/login-sheet-themes/motivational-speaker.theme.js +1 -1
- package/dist/components/auth/login-sheets/StoreLoginSheetShell.js +3 -3
- package/dist/components/categories/category-masonry-grid.js +3 -3
- package/dist/components/learning/CertificateViewer.js +1 -1
- package/dist/components/rich-text/CategoryDescription.js +2 -2
- package/dist/components/rich-text/ProductDescription.js +2 -2
- package/dist/components/rich-text/RichTextExcerpt.js +1 -1
- package/dist/components/rich-text/SafeRichHtml.js +1 -1
- package/dist/components/shipping/ProductDeliveryInfoSection.js +2 -2
- package/dist/components/ui/alert-modal.js +1 -1
- package/dist/components/ui/guest-checkout-modal.js +2 -2
- package/dist/components/ui/image-skeleton.js +1 -1
- package/dist/components/ui/image-with-fallback.js +1 -1
- package/dist/components/ui/loading-skeleton-wrapper.js +1 -1
- package/dist/components/ui/modal.js +1 -1
- package/dist/components/ui/page-content-loader.js +1 -1
- package/dist/components/ui/product-card.d.ts.map +1 -1
- package/dist/components/ui/product-card.js +3 -2
- package/dist/components/ui/route-skeleton-loader.js +5 -5
- package/dist/components/ui/sheet.js +1 -1
- package/dist/components/ui/skeletons/index.js +5 -5
- package/dist/components/ui/skeletons/product-grid-skeleton.js +1 -1
- package/dist/editor/alignment-schemas/booking.js +1 -1
- package/dist/editor/alignment-schemas/clothing-minimal.js +1 -1
- package/dist/editor/alignment-schemas/index.js +20 -20
- package/dist/editor/alignment-schemas/lazy-loader.js +1 -1
- package/dist/editor/alignment-schemas/metadata.js +1 -1
- package/dist/editor/alignment-schemas/resolve-canvas-inspector-leaf.js +3 -3
- package/dist/editor/blocks/index.js +3 -3
- package/dist/editor/blocks/migrate-clothing-minimal.js +3 -3
- package/dist/editor/blocks/nav-outline-utils.js +2 -2
- package/dist/editor/blocks/registry.js +1 -1
- package/dist/editor/document/adapter.js +4 -4
- package/dist/editor/document/block-tree.js +1 -1
- package/dist/editor/document/index.js +6 -6
- package/dist/editor/document/validate.js +1 -1
- package/dist/editor/index.js +12 -12
- package/dist/editor/layout-content-loader.js +3 -3
- package/dist/editor/payaza-form/ArrayItemManager.js +2 -2
- package/dist/editor/payaza-form/EditorCanvasPreview.js +4 -4
- package/dist/editor/payaza-form/FieldRenderer.js +17 -17
- package/dist/editor/payaza-form/IframePreviewMessageBridge.js +3 -3
- package/dist/editor/payaza-form/PayazaFormEditor.js +29 -29
- package/dist/editor/payaza-form/PayazaFormEditorFullPage.js +2 -2
- package/dist/editor/payaza-form/SliderArrayEditor.js +2 -2
- package/dist/editor/payaza-form/components/ArrayField.js +1 -1
- package/dist/editor/payaza-form/components/BlockStylesInspector.js +1 -1
- package/dist/editor/payaza-form/components/BlocksField.js +8 -8
- package/dist/editor/payaza-form/components/ButtonField.js +3 -3
- package/dist/editor/payaza-form/components/CanvasGranularInspector.js +11 -11
- package/dist/editor/payaza-form/components/IconField.js +2 -2
- package/dist/editor/payaza-form/components/ImageField.js +1 -1
- package/dist/editor/payaza-form/components/NumberField.js +1 -1
- package/dist/editor/payaza-form/components/RichTextField.js +2 -2
- package/dist/editor/payaza-form/components/SectionSchemaInspector.js +3 -3
- package/dist/editor/payaza-form/components/StarRatingField.js +1 -1
- package/dist/editor/payaza-form/components/TextField.js +1 -1
- package/dist/editor/payaza-form/data-merger.js +6 -6
- package/dist/editor/payaza-form/data-transformer.js +3 -3
- package/dist/editor/payaza-form/engine.js +1 -1
- package/dist/editor/payaza-form/examples/custom-widgets.example.js +1 -1
- package/dist/editor/payaza-form/index.js +8 -8
- package/dist/editor/payaza-form/layout-loader.js +2 -2
- package/dist/editor/payaza-form/preview-message-handler.js +3 -3
- package/dist/editor/payaza-form/schema-bridge.js +3 -3
- package/dist/editor/payaza-form/widget-registry.js +1 -1
- package/dist/editor/shared/BlockOutlineTree.js +1 -1
- package/dist/editor/shared/EditorHeader.js +1 -1
- package/dist/editor/shared/EditorNavigator.js +1 -1
- package/dist/editor/shared/IframePreview.js +6 -6
- package/dist/editor/shared/InlineCanvasPreview.js +7 -7
- package/dist/editor/shared/LayoutRenderer.js +1 -1
- package/dist/editor/shared/ResizableSidebar.js +1 -1
- package/dist/editor/shared/index.js +7 -7
- package/dist/hooks/use-product-reviews.js +1 -1
- package/dist/hooks/usePreviewSlideSync.js +1 -1
- package/dist/index.js +143 -143
- package/dist/layouts/booking/components/BookingHomePage.js +1 -1
- package/dist/layouts/booking/components/BookingMultilineHeading.js +1 -1
- package/dist/layouts/booking/components/BookingTestimonialCard.js +1 -1
- package/dist/layouts/booking/components/booking-footer-defaults.js +2 -2
- package/dist/layouts/booking/index.js +8 -8
- package/dist/layouts/booking/pages/AboutPage.d.ts.map +1 -1
- package/dist/layouts/booking/pages/AboutPage.js +16 -7
- package/dist/layouts/booking/pages/BookPage.js +1 -1
- package/dist/layouts/booking/pages/CategoriesPage.js +2 -2
- package/dist/layouts/booking/pages/ProductDetailPage.js +3 -3
- package/dist/layouts/booking-agenda/components/BookingHomePageAgenda.js +3 -3
- package/dist/layouts/booking-agenda/index.js +8 -8
- package/dist/layouts/booking-agenda/pages/AboutPage.d.ts.map +1 -1
- package/dist/layouts/booking-agenda/pages/AboutPage.js +16 -7
- package/dist/layouts/booking-agenda/pages/CategoriesPage.js +1 -1
- package/dist/layouts/booking-agenda/pages/ProductDetailPage.js +3 -3
- package/dist/layouts/clothing/components/ClothingHomePage.d.ts.map +1 -1
- package/dist/layouts/clothing/components/ClothingHomePage.js +13 -12
- package/dist/layouts/clothing/index.js +7 -7
- package/dist/layouts/clothing/pages/AboutPage.d.ts.map +1 -1
- package/dist/layouts/clothing/pages/AboutPage.js +11 -5
- package/dist/layouts/clothing/pages/CategoriesPage.js +9 -9
- package/dist/layouts/clothing/pages/CategoryPage.js +7 -7
- package/dist/layouts/clothing/pages/ContactPage.js +3 -3
- package/dist/layouts/clothing/pages/ProductDetailPage.js +24 -24
- package/dist/layouts/clothing/pages/ProductsPage.js +17 -17
- package/dist/layouts/clothing/payaza-bindings.js +2 -2
- package/dist/layouts/clothing-minimal/components/ClothingHomePageMinimal.d.ts.map +1 -1
- package/dist/layouts/clothing-minimal/components/ClothingHomePageMinimal.js +11 -10
- package/dist/layouts/clothing-minimal/components/clothing-minimal-block-render.js +7 -7
- package/dist/layouts/clothing-minimal/index.js +7 -7
- package/dist/layouts/clothing-minimal/pages/AboutPage.d.ts.map +1 -1
- package/dist/layouts/clothing-minimal/pages/AboutPage.js +12 -5
- package/dist/layouts/clothing-minimal/pages/CategoriesPage.js +8 -8
- package/dist/layouts/clothing-minimal/pages/CategoryPage.js +7 -7
- package/dist/layouts/clothing-minimal/pages/ContactPage.js +3 -3
- package/dist/layouts/clothing-minimal/pages/ProductDetailPage.js +24 -24
- package/dist/layouts/clothing-minimal/pages/ProductsPage.js +18 -18
- package/dist/layouts/electronics/components/ElectronicsCategoriesPage.js +3 -3
- package/dist/layouts/electronics/components/ElectronicsGridProductCard.d.ts.map +1 -1
- package/dist/layouts/electronics/components/ElectronicsGridProductCard.js +4 -3
- package/dist/layouts/electronics/components/ElectronicsHomePage.d.ts.map +1 -1
- package/dist/layouts/electronics/components/ElectronicsHomePage.js +5 -4
- package/dist/layouts/electronics/components/ElectronicsPageWrapper.js +2 -2
- package/dist/layouts/electronics/components/ElectronicsProductsPage.js +4 -4
- package/dist/layouts/electronics/components/ElectronicsStoreHeader.js +1 -1
- package/dist/layouts/electronics/index.js +18 -18
- package/dist/layouts/electronics/pages/AboutPage.d.ts.map +1 -1
- package/dist/layouts/electronics/pages/AboutPage.js +7 -2
- package/dist/layouts/electronics/pages/CategoriesPage.js +1 -1
- package/dist/layouts/electronics/pages/ProductDetailPage.js +3 -3
- package/dist/layouts/electronics/pages/ProductsPage.js +2 -2
- package/dist/layouts/electronics-grid/components/ElectronicsGridProductCard.d.ts.map +1 -1
- package/dist/layouts/electronics-grid/components/ElectronicsGridProductCard.js +4 -3
- package/dist/layouts/electronics-grid/components/ElectronicsHomePageGrid.js +2 -2
- package/dist/layouts/electronics-grid/index.js +14 -14
- package/dist/layouts/electronics-grid/pages/AboutPage.d.ts.map +1 -1
- package/dist/layouts/electronics-grid/pages/AboutPage.js +7 -2
- package/dist/layouts/electronics-grid/pages/CategoriesPage.js +1 -1
- package/dist/layouts/electronics-grid/pages/ProductDetailPage.js +3 -3
- package/dist/layouts/electronics-grid/pages/ProductsPage.js +2 -2
- package/dist/layouts/food/components/FoodHomePage.js +1 -1
- package/dist/layouts/food/index.js +8 -8
- package/dist/layouts/food/pages/AboutPage.d.ts.map +1 -1
- package/dist/layouts/food/pages/AboutPage.js +5 -1
- package/dist/layouts/food/pages/CategoriesPage.js +2 -2
- package/dist/layouts/food/pages/CategoryPage.js +2 -2
- package/dist/layouts/food/pages/ProductDetailPage.js +4 -4
- package/dist/layouts/food/pages/ProductsPage.js +2 -2
- package/dist/layouts/food-modern/components/FoodHomePageModern.js +3 -3
- package/dist/layouts/food-modern/index.js +8 -8
- package/dist/layouts/food-modern/pages/AboutPage.d.ts.map +1 -1
- package/dist/layouts/food-modern/pages/AboutPage.js +10 -3
- package/dist/layouts/food-modern/pages/CategoriesPage.js +1 -1
- package/dist/layouts/food-modern/pages/CategoryPage.js +2 -2
- package/dist/layouts/food-modern/pages/ProductDetailPage.js +3 -3
- package/dist/layouts/food-modern/pages/ProductsPage.js +2 -2
- package/dist/layouts/motivational-speaker/components/MotivationalSpeakerPageWrapper.js +1 -1
- package/dist/layouts/motivational-speaker/index.js +9 -9
- package/dist/layouts/motivational-speaker/pages/AboutPage.d.ts.map +1 -1
- package/dist/layouts/motivational-speaker/pages/AboutPage.js +9 -2
- package/dist/layouts/motivational-speaker/pages/ProductsPage.js +2 -2
- package/dist/layouts/shared/about-story-media.d.ts +27 -0
- package/dist/layouts/shared/about-story-media.d.ts.map +1 -0
- package/dist/layouts/shared/about-story-media.js +46 -0
- package/dist/layouts/shared/components/BaseStoreLayout.js +9 -9
- package/dist/layouts/shared/components/GenericPageWrapper.js +3 -3
- package/dist/layouts/shared/components/PdpVariationSelectors.js +2 -2
- package/dist/layouts/shared/components/PromoBanner.js +4 -4
- package/dist/layouts/shared/components/StoreCartSheet.js +9 -9
- package/dist/layouts/shared/components/StoreFooter.js +9 -9
- package/dist/layouts/shared/components/StoreHeader.js +8 -8
- package/dist/layouts/shared/components/headers/BookingAgendaSidebar.js +2 -2
- package/dist/layouts/shared/components/headers/ClothingMinimalHeader.js +9 -9
- package/dist/layouts/shared/components/headers/FoodModernHeader.js +7 -7
- package/dist/layouts/shared/index.js +22 -22
- package/dist/layouts/shared/pages/StoreMaintenanceScreen.js +2 -2
- package/dist/layouts/shared/wrappers/BookingAgendaLayout.js +16 -16
- package/dist/layouts/shared/wrappers/ClothingLayout.js +8 -8
- package/dist/layouts/shared/wrappers/ClothingMinimalLayout.js +7 -7
- package/dist/layouts/shared/wrappers/ElectronicsLayout.js +5 -5
- package/dist/layouts/shared/wrappers/FoodModernLayout.js +6 -6
- package/dist/layouts/shared/wrappers/MotivationalLayout.js +9 -9
- package/dist/layouts/shared/wrappers/StandardLayout.js +8 -8
- package/dist/lib/auth-context.js +2 -2
- package/dist/lib/layout-config-hydration.js +2 -2
- package/dist/lib/product-variation-utils.js +1 -1
- package/dist/lib/services/analytics.service.js +1 -1
- package/dist/lib/services/auth.service.js +1 -1
- package/dist/lib/services/booking.service.js +1 -1
- package/dist/lib/services/category.service.js +1 -1
- package/dist/lib/services/checkout.service.js +1 -1
- package/dist/lib/services/contact.service.js +1 -1
- package/dist/lib/services/customer.service.js +1 -1
- package/dist/lib/services/fees.service.js +1 -1
- package/dist/lib/services/index.js +13 -13
- package/dist/lib/services/location.service.js +1 -1
- package/dist/lib/services/order.service.js +1 -1
- package/dist/lib/services/payment.service.js +1 -1
- package/dist/lib/services/product.service.js +1 -1
- package/dist/lib/services/promo.service.js +1 -1
- package/dist/lib/services/review.service.js +1 -1
- package/dist/lib/services/service.service.js +1 -1
- package/dist/lib/services/shipping.service.js +1 -1
- package/dist/lib/services/store.service.js +1 -1
- package/dist/lib/store-config-utils.js +7 -7
- package/dist/lib/store-config.js +1 -1
- package/dist/lib/store-context.js +12 -12
- package/dist/lib/utils/asset-helpers.js +2 -2
- package/dist/lib/utils/editor-preview.js +3 -3
- package/dist/lib/utils/index.js +3 -3
- package/dist/lib/utils/product-images.js +1 -1
- package/dist/lib/utils/product-share.js +1 -1
- package/dist/lib/utils/url-helpers.js +1 -1
- package/dist/preview/LayoutPreview.js +5 -5
- package/dist/preview/PreviewRouter.js +2 -2
- package/dist/preview/canvas/PreviewCanvasEnhancer.js +8 -8
- package/dist/preview/canvas/preview-flush-await.js +1 -1
- package/dist/preview/canvas/preview-isolation.js +1 -1
- package/dist/preview/canvas/preview-route.js +2 -2
- package/dist/preview/index.js +4 -4
- package/package.json +30 -31
|
@@ -7,18 +7,27 @@ import { useStore } from '../../../lib/store-context.js';
|
|
|
7
7
|
import Image from 'next/image';
|
|
8
8
|
import { SafeRichHtml } from '../../../components/rich-text/SafeRichHtml.js';
|
|
9
9
|
import { RichTextExcerpt } from '../../../components/rich-text/RichTextExcerpt.js';
|
|
10
|
+
import { storySectionImage, storySectionLabel, storySectionTitle, storyTeamSubtitle, storyTeamTitle, } from '../../shared/about-story-media.js';
|
|
10
11
|
export function AboutPage({ storeConfig: initialConfig }) {
|
|
11
12
|
const { store } = useStore();
|
|
12
13
|
const storeConfig = store || initialConfig;
|
|
13
14
|
const primaryColor = storeConfig.branding.primaryColor;
|
|
14
15
|
const secondaryColor = storeConfig.branding.secondaryColor || primaryColor;
|
|
15
16
|
const aboutConfig = storeConfig.layoutConfig?.pages?.about;
|
|
16
|
-
|
|
17
|
-
const
|
|
18
|
-
const
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
const
|
|
17
|
+
const heroConfig = aboutConfig?.hero || aboutConfig;
|
|
18
|
+
const storyConfig = aboutConfig?.story || aboutConfig;
|
|
19
|
+
const heroImage = heroConfig?.heroImage ||
|
|
20
|
+
aboutConfig?.heroImage ||
|
|
21
|
+
'https://images.unsplash.com/photo-1522071820081-009f0129c71c?q=80&w=2070&auto=format&fit=crop';
|
|
22
|
+
const pageTitle = heroConfig?.title || aboutConfig?.title || "Crafting Experiences, Delivering Joy.";
|
|
23
|
+
const pageContent = storyConfig?.content || aboutConfig?.content || storeConfig.description;
|
|
24
|
+
const missionStatement = heroConfig?.missionStatement || aboutConfig?.missionStatement;
|
|
25
|
+
const galleryImages = storyConfig?.gallerySection || aboutConfig?.gallerySection;
|
|
26
|
+
const storyImage = storySectionImage(storyConfig);
|
|
27
|
+
const storyLabel = storySectionLabel(storyConfig);
|
|
28
|
+
const storyTitle = storySectionTitle(storyConfig);
|
|
29
|
+
const storyCaptionTitle = storyTeamTitle(storyConfig);
|
|
30
|
+
const storyCaptionSubtitle = storyTeamSubtitle(storyConfig);
|
|
22
31
|
const values = [
|
|
23
32
|
{
|
|
24
33
|
icon: Award,
|
|
@@ -41,7 +50,7 @@ export function AboutPage({ storeConfig: initialConfig }) {
|
|
|
41
50
|
description: "Honest, transparent, and ethical practices in everything we do."
|
|
42
51
|
}
|
|
43
52
|
];
|
|
44
|
-
return (_jsxs("div", { className: "min-h-screen bg-white pb-20 overflow-hidden", children: [_jsxs("section", { "data-section": "hero", className: "relative h-[60vh] min-h-[500px] w-full overflow-hidden", children: [_jsxs("div", { className: "absolute inset-0", children: [_jsx(Image, { src: heroImage, alt: "About Us", fill: true, className: "w-full h-full object-cover transform scale-105 animate-pulse-slow" }), _jsx("div", { className: "absolute inset-0 bg-gradient-to-r from-black/80 via-black/50 to-transparent" })] }), _jsx("div", { className: "absolute inset-0 flex items-center", children: _jsx("div", { className: "container mx-auto px-4 sm:px-6 lg:px-8", children: _jsxs("div", { className: "max-w-3xl animate-fade-in-up", children: [_jsxs("div", { className: "inline-flex items-center gap-2 px-4 py-1.5 rounded-full bg-white/10 backdrop-blur-md border border-white/20 text-white text-sm font-medium mb-6", children: [_jsx("span", { className: "w-2 h-2 rounded-full bg-white animate-pulse" }), "Est. 2024"] }), _jsx("h1", { className: "text-5xl md:text-7xl font-bold text-white mb-6 tracking-tight leading-tight", children: pageTitle }), _jsx(SafeRichHtml, { value: missionStatement || storeConfig.description, as: "div", className: "text-xl md:text-2xl text-gray-200 max-w-2xl leading-relaxed font-light [&_p]:mb-0" })] }) }) })] }), _jsxs("section", { "data-section": "story", className: "py-24 px-4 sm:px-6 lg:px-8 relative", children: [_jsx("div", { className: "absolute top-0 right-0 -mt-24 -mr-24 w-96 h-96 bg-gray-50 rounded-full blur-3xl -z-10" }), _jsx("div", { className: "container mx-auto max-w-7xl", children: _jsxs("div", { className: "grid grid-cols-1 lg:grid-cols-2 gap-16 items-center", children: [_jsxs("div", { className: "relative", children: [galleryImages && galleryImages.length > 0 ? (_jsx("div", { className: "grid grid-cols-2 gap-4", children: galleryImages.slice(0, 4).map((img, i) => (_jsx("div", { className: `relative overflow-hidden rounded-2xl shadow-lg ${i === 0 ? 'col-span-2 aspect-[16/9]' : 'aspect-square'}`, children: _jsx(Image, { src: img.image, alt: img.caption || "Gallery Image", fill: true, className: "w-full h-full object-cover hover:scale-110 transition-transform duration-500" }) }, i))) })) : (_jsxs("div", { className: "relative aspect-[4/5] rounded-[2rem] overflow-hidden shadow-2xl", children: [_jsx(Image, { src:
|
|
53
|
+
return (_jsxs("div", { className: "min-h-screen bg-white pb-20 overflow-hidden", children: [_jsxs("section", { "data-section": "hero", className: "relative h-[60vh] min-h-[500px] w-full overflow-hidden", children: [_jsxs("div", { className: "absolute inset-0", children: [_jsx(Image, { src: heroImage, alt: "About Us", fill: true, className: "w-full h-full object-cover transform scale-105 animate-pulse-slow" }), _jsx("div", { className: "absolute inset-0 bg-gradient-to-r from-black/80 via-black/50 to-transparent" })] }), _jsx("div", { className: "absolute inset-0 flex items-center", children: _jsx("div", { className: "container mx-auto px-4 sm:px-6 lg:px-8", children: _jsxs("div", { className: "max-w-3xl animate-fade-in-up", children: [_jsxs("div", { className: "inline-flex items-center gap-2 px-4 py-1.5 rounded-full bg-white/10 backdrop-blur-md border border-white/20 text-white text-sm font-medium mb-6", children: [_jsx("span", { className: "w-2 h-2 rounded-full bg-white animate-pulse" }), "Est. 2024"] }), _jsx("h1", { className: "text-5xl md:text-7xl font-bold text-white mb-6 tracking-tight leading-tight", children: pageTitle }), _jsx(SafeRichHtml, { value: missionStatement || storeConfig.description, as: "div", className: "text-xl md:text-2xl text-gray-200 max-w-2xl leading-relaxed font-light [&_p]:mb-0" })] }) }) })] }), _jsxs("section", { "data-section": "story", className: "py-24 px-4 sm:px-6 lg:px-8 relative", children: [_jsx("div", { className: "absolute top-0 right-0 -mt-24 -mr-24 w-96 h-96 bg-gray-50 rounded-full blur-3xl -z-10" }), _jsx("div", { className: "container mx-auto max-w-7xl", children: _jsxs("div", { className: "grid grid-cols-1 lg:grid-cols-2 gap-16 items-center", children: [_jsxs("div", { className: "relative", children: [galleryImages && galleryImages.length > 0 ? (_jsx("div", { className: "grid grid-cols-2 gap-4", children: galleryImages.slice(0, 4).map((img, i) => (_jsx("div", { className: `relative overflow-hidden rounded-2xl shadow-lg ${i === 0 ? 'col-span-2 aspect-[16/9]' : 'aspect-square'}`, children: _jsx(Image, { src: img.image, alt: img.caption || "Gallery Image", fill: true, className: "w-full h-full object-cover hover:scale-110 transition-transform duration-500" }) }, i))) })) : (_jsxs("div", { className: "relative aspect-[4/5] rounded-[2rem] overflow-hidden shadow-2xl", children: [_jsx(Image, { src: storyImage, alt: storyCaptionTitle, fill: true, className: "w-full h-full object-cover" }), _jsx("div", { className: "absolute inset-0 bg-gradient-to-t from-black/60 via-transparent to-transparent opacity-60" }), _jsxs("div", { className: "absolute bottom-8 left-8 text-white", children: [_jsx("p", { className: "font-bold text-lg", children: storyCaptionTitle }), _jsx("p", { className: "text-white/80 text-sm", children: storyCaptionSubtitle })] })] })), _jsx("div", { className: "absolute -bottom-6 -right-6 w-24 h-24 bg-white rounded-2xl shadow-xl flex items-center justify-center p-4 animate-bounce duration-[3000ms]", children: _jsx(Heart, { className: "w-10 h-10", style: { color: primaryColor, fill: primaryColor } }) })] }), _jsxs("div", { className: "space-y-10", children: [_jsxs("div", { children: [_jsx("span", { className: "text-sm font-bold uppercase tracking-widest mb-3 block", style: { color: primaryColor }, children: "Who We Are" }), _jsx("h2", { className: "text-4xl md:text-5xl font-black text-gray-900 mb-6 tracking-tight", children: "Our Journey" }), _jsxs("div", { className: "prose prose-lg text-gray-600 leading-relaxed space-y-6", children: [pageContent?.split('\n').map((paragraph, idx) => (_jsx("p", { children: paragraph }, idx))), !pageContent && (_jsxs(_Fragment, { children: [_jsxs("p", { children: ["Founded with a bold vision to redefine excellence in the ", _jsx("span", { className: "font-semibold text-gray-900", children: storeConfig.type }), " industry, ", storeConfig.name, " has grown from a small passion project into a beloved brand. We believe in the power of quality, innovation, and community."] }), _jsx("p", { children: "Every day, we strive to bring you the best products, curated with care and delivered with a smile. Our team is dedicated to ensuring that your experience with us is nothing short of exceptional." })] }))] })] }), _jsx("div", { className: "grid grid-cols-1 sm:grid-cols-2 gap-8", children: values.map((item, idx) => (_jsxs("div", { className: "flex gap-4 group", children: [_jsx("div", { className: "flex-shrink-0", children: _jsx("div", { className: "w-14 h-14 rounded-2xl flex items-center justify-center transition-colors group-hover:bg-gray-100", style: { backgroundColor: `${primaryColor}10` }, children: _jsx(item.icon, { className: "h-7 w-7 transition-transform group-hover:scale-110", style: { color: primaryColor } }) }) }), _jsxs("div", { children: [_jsx("h4", { className: "font-bold text-gray-900 mb-2 text-lg", children: item.title }), _jsx(RichTextExcerpt, { value: item.description, as: "p", className: "text-gray-600 text-sm leading-relaxed" })] })] }, idx))) })] })] }) })] }), _jsxs("section", { "data-section": "stats", className: "py-20 relative overflow-hidden", children: [_jsx("div", { className: "absolute inset-0 opacity-10", children: _jsx(DotPattern, { color: primaryColor, cx: 2, cy: 2, cr: 2, width: 30, height: 30 }) }), _jsx("div", { className: "absolute inset-0", style: { backgroundColor: `${secondaryColor}15` } }), _jsx("div", { className: "container mx-auto px-4 relative z-10", children: _jsx("div", { className: "grid grid-cols-2 md:grid-cols-4 gap-8 md:gap-12", children: [
|
|
45
54
|
{ label: "Sessions Held", value: "12k+" },
|
|
46
55
|
{ label: "Elite Experts", value: "20+" },
|
|
47
56
|
{ label: "Programs", value: storeConfig.services?.length ? `${storeConfig.services.length}+` : "25+" },
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
3
|
import { Breadcrumbs } from '../../../components/ui/breadcrumbs.js';
|
|
4
|
-
import { CategoryMasonryGrid } from '../../../components/categories/category-masonry-grid';
|
|
4
|
+
import { CategoryMasonryGrid } from '../../../components/categories/category-masonry-grid.js';
|
|
5
5
|
import { useStore } from '../../../lib/store-context.js';
|
|
6
6
|
import { useCatalogLoader } from '../../../hooks/use-catalog-loader.js';
|
|
7
7
|
import { isEditorPreviewMode, resolveStoreCategoriesForDisplay } from '../../../lib/utils/index.js';
|
|
@@ -27,9 +27,9 @@ import { usePdpVariation } from '../../../hooks/use-pdp-variation.js';
|
|
|
27
27
|
import { buildPdpBuyNowItem } from '../../../lib/pdp-cart-actions.js';
|
|
28
28
|
import { assertVariationSelected } from '../../../lib/product-variation-utils.js';
|
|
29
29
|
import { shippingService } from '../../../lib/services/shipping.service.js';
|
|
30
|
-
import { ProductDeliveryInfoSection } from '../../../components/shipping/ProductDeliveryInfoSection';
|
|
31
|
-
import { PdpVariationSelectors } from '../../shared/components/PdpVariationSelectors';
|
|
32
|
-
import { formatDateSafe } from '../../../utils/date';
|
|
30
|
+
import { ProductDeliveryInfoSection } from '../../../components/shipping/ProductDeliveryInfoSection.js';
|
|
31
|
+
import { PdpVariationSelectors } from '../../shared/components/PdpVariationSelectors.js';
|
|
32
|
+
import { formatDateSafe } from '../../../utils/date.js';
|
|
33
33
|
// Helper function to format date
|
|
34
34
|
const formatDate = (dateString) => {
|
|
35
35
|
return formatDateSafe(dateString, '—', { year: 'numeric', month: 'long', day: 'numeric' });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ClothingHomePage.d.ts","sourceRoot":"","sources":["../../../../src/layouts/clothing/components/ClothingHomePage.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ClothingHomePage.d.ts","sourceRoot":"","sources":["../../../../src/layouts/clothing/components/ClothingHomePage.tsx"],"names":[],"mappings":"AAMA,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAoBvD,UAAU,qBAAqB;IAC7B,WAAW,EAAE,WAAW,CAAC;CAC1B;AAaD,wBAAgB,gBAAgB,CAAC,EAAE,WAAW,EAAE,aAAa,EAAE,EAAE,qBAAqB,+BA8yBrF"}
|
|
@@ -1,21 +1,22 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
3
|
+
import { hasValidCompareAtPrice } from '../../../utils/price-display.js';
|
|
3
4
|
import { useFeaturedProducts } from '../../../hooks/use-featured-products.js';
|
|
4
|
-
import { Button } from '../../../components/ui/button';
|
|
5
|
-
import { ProductRating } from '../../../components/ui/product-rating';
|
|
5
|
+
import { Button } from '../../../components/ui/button.js';
|
|
6
|
+
import { ProductRating } from '../../../components/ui/product-rating.js';
|
|
6
7
|
import { ShoppingCart, Heart, ArrowRight, ChevronLeft, ChevronRight } from 'lucide-react';
|
|
7
8
|
import Link from 'next/link';
|
|
8
9
|
import { useRouter } from 'next/navigation';
|
|
9
|
-
import { ImageWithFallback } from '../../../components/ui/image-with-fallback';
|
|
10
|
+
import { ImageWithFallback } from '../../../components/ui/image-with-fallback.js';
|
|
10
11
|
import { useState, useEffect } from 'react';
|
|
11
|
-
import { useToast } from '../../../components/ui/toast';
|
|
12
|
-
import { formatCurrency, filterActiveProducts } from '../../../lib/utils';
|
|
13
|
-
import { getLayoutText, getBannerImage } from '../../../lib/utils/asset-helpers';
|
|
14
|
-
import { toStoreHref } from '../../../lib/utils/url-helpers';
|
|
15
|
-
import { shouldUseAPI } from '../../../lib/utils/demo-detection';
|
|
16
|
-
import { useStore } from '../../../lib/store-context';
|
|
17
|
-
import { SafeRichHtml } from '../../../components/rich-text/SafeRichHtml';
|
|
18
|
-
import { useClothingPayaza } from '../payaza-bindings';
|
|
12
|
+
import { useToast } from '../../../components/ui/toast.js';
|
|
13
|
+
import { formatCurrency, filterActiveProducts } from '../../../lib/utils/index.js';
|
|
14
|
+
import { getLayoutText, getBannerImage } from '../../../lib/utils/asset-helpers.js';
|
|
15
|
+
import { toStoreHref } from '../../../lib/utils/url-helpers.js';
|
|
16
|
+
import { shouldUseAPI } from '../../../lib/utils/demo-detection.js';
|
|
17
|
+
import { useStore } from '../../../lib/store-context.js';
|
|
18
|
+
import { SafeRichHtml } from '../../../components/rich-text/SafeRichHtml.js';
|
|
19
|
+
import { useClothingPayaza } from '../payaza-bindings.js';
|
|
19
20
|
export function ClothingHomePage({ storeConfig: initialConfig }) {
|
|
20
21
|
// Use the store from context which is updated in real-time by the editor
|
|
21
22
|
const { store, addToCart, toggleWishlist, isInWishlist, isWishlistLoading } = useStore();
|
|
@@ -363,6 +364,6 @@ export function ClothingHomePage({ storeConfig: initialConfig }) {
|
|
|
363
364
|
addToast('Failed to add to cart', 'error');
|
|
364
365
|
}
|
|
365
366
|
};
|
|
366
|
-
return (_jsxs("div", { className: "group", children: [_jsxs("div", { className: "relative aspect-[3/4] bg-gray-50 rounded-xl overflow-hidden mb-4", children: [_jsxs(Link, { href: productHref, className: "block w-full h-full", children: [_jsx(ImageWithFallback, { src: firstImage, alt: product.name, className: "w-full h-full object-cover transition-transform duration-700 group-hover:scale-105", skeletonAspectRatio: "3/4", lazy: true }), validImages[1] && (_jsx(ImageWithFallback, { src: validImages[1], alt: product.name, className: "absolute inset-0 w-full h-full object-cover opacity-0 group-hover:opacity-100 transition-opacity duration-500 pointer-events-none", skeletonAspectRatio: "3/4", lazy: true }))] }), _jsxs("div", { className: "hidden lg:flex absolute bottom-4 right-4 z-20 flex-col gap-2 opacity-0 transform translate-x-4 group-hover:opacity-100 group-hover:translate-x-0 transition-all duration-300", children: [storeConfig.features.wishlist && (_jsx(Button, { type: "button", variant: "secondary", size: "icon", onClick: handleWishlistClick, disabled: isWishlistLoading, className: "bg-white hover:bg-black hover:text-white shadow-md rounded-full transition-colors", "aria-label": inWishlist ? 'Remove from wishlist' : 'Add to wishlist', children: _jsx(Heart, { className: `h-4 w-4 ${inWishlist ? 'fill-current text-red-500' : ''}` }) })), _jsx(Button, { type: "button", variant: "secondary", size: "icon", onClick: handleAddToCartClick, className: "bg-white hover:bg-black hover:text-white shadow-md rounded-full transition-colors", "aria-label": "Add to cart", children: _jsx(ShoppingCart, { className: "h-4 w-4" }) })] }), _jsx(Button, { type: "button", variant: "secondary", size: "icon", onClick: handleAddToCartClick, className: "lg:hidden absolute bottom-3 right-3 z-20 bg-white text-black h-10 w-10 rounded-full shadow-lg active:scale-95 transition-transform", "aria-label": "Add to cart", children: _jsx(ShoppingCart, { className: "h-4 w-4" }) }), product.
|
|
367
|
+
return (_jsxs("div", { className: "group", children: [_jsxs("div", { className: "relative aspect-[3/4] bg-gray-50 rounded-xl overflow-hidden mb-4", children: [_jsxs(Link, { href: productHref, className: "block w-full h-full", children: [_jsx(ImageWithFallback, { src: firstImage, alt: product.name, className: "w-full h-full object-cover transition-transform duration-700 group-hover:scale-105", skeletonAspectRatio: "3/4", lazy: true }), validImages[1] && (_jsx(ImageWithFallback, { src: validImages[1], alt: product.name, className: "absolute inset-0 w-full h-full object-cover opacity-0 group-hover:opacity-100 transition-opacity duration-500 pointer-events-none", skeletonAspectRatio: "3/4", lazy: true }))] }), _jsxs("div", { className: "hidden lg:flex absolute bottom-4 right-4 z-20 flex-col gap-2 opacity-0 transform translate-x-4 group-hover:opacity-100 group-hover:translate-x-0 transition-all duration-300", children: [storeConfig.features.wishlist && (_jsx(Button, { type: "button", variant: "secondary", size: "icon", onClick: handleWishlistClick, disabled: isWishlistLoading, className: "bg-white hover:bg-black hover:text-white shadow-md rounded-full transition-colors", "aria-label": inWishlist ? 'Remove from wishlist' : 'Add to wishlist', children: _jsx(Heart, { className: `h-4 w-4 ${inWishlist ? 'fill-current text-red-500' : ''}` }) })), _jsx(Button, { type: "button", variant: "secondary", size: "icon", onClick: handleAddToCartClick, className: "bg-white hover:bg-black hover:text-white shadow-md rounded-full transition-colors", "aria-label": "Add to cart", children: _jsx(ShoppingCart, { className: "h-4 w-4" }) })] }), _jsx(Button, { type: "button", variant: "secondary", size: "icon", onClick: handleAddToCartClick, className: "lg:hidden absolute bottom-3 right-3 z-20 bg-white text-black h-10 w-10 rounded-full shadow-lg active:scale-95 transition-transform", "aria-label": "Add to cart", children: _jsx(ShoppingCart, { className: "h-4 w-4" }) }), hasValidCompareAtPrice(product.price, product.compareAtPrice) && (_jsx("span", { className: "absolute top-3 left-3 z-10 bg-black text-white text-xs font-bold px-3 py-1 rounded-full uppercase tracking-wide", children: getLayoutText(storeConfig, 'common.sale', 'Sale') }))] }), _jsxs(Link, { href: productHref, className: "block space-y-1", children: [_jsx("h3", { className: "font-semibold text-gray-900 group-hover:text-gray-600 transition-colors text-lg", children: product.name }), _jsxs("div", { className: "flex items-center gap-2", children: [_jsx("span", { className: "font-medium text-gray-900", children: formatCurrency(product.price, product.currency || 'USD') }), hasValidCompareAtPrice(product.price, product.compareAtPrice) && (_jsx("span", { className: "text-sm text-gray-400 line-through", children: formatCurrency(product.compareAtPrice, product.currency || 'USD') }))] }), _jsx(ProductRating, { rating: product.rating, reviewCount: product.reviewCount, size: "sm", showReviewCount: false, className: "shrink-0" })] })] }, product.id));
|
|
367
368
|
}) }), layoutConfig?.sections?.featuredProducts?.showViewAll !== false && (_jsx("div", { className: "mt-16 text-center", children: _jsx(Link, { href: `/${storeConfig.slug}/products`, children: _jsx(Button, { variant: "outline", className: "rounded-full px-10 py-6 border-gray-200 hover:border-black hover:bg-black hover:text-white transition-all text-base font-medium", children: getLayoutText(storeConfig, 'sections.featuredProducts.viewAll', 'View All Products') }) }) }))] }) }))] }));
|
|
368
369
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
// Fashion Hub (clothing) layout — fully sandboxed exports (see ClothingLayout + styles/clothing.css)
|
|
2
|
-
export { ClothingHomePage } from './components/ClothingHomePage';
|
|
3
|
-
export { ProductsPage as ClothingProductsPage } from './pages/ProductsPage';
|
|
4
|
-
export { ProductDetailPage as ClothingProductDetailPage } from './pages/ProductDetailPage';
|
|
5
|
-
export { CategoryPage as ClothingCategoryPage } from './pages/CategoryPage';
|
|
6
|
-
export { ClothingCategoriesPage } from './pages/CategoriesPage';
|
|
7
|
-
export { AboutPage as ClothingAboutPage } from './pages/AboutPage';
|
|
8
|
-
export { ContactPage as ClothingContactPage } from './pages/ContactPage';
|
|
2
|
+
export { ClothingHomePage } from './components/ClothingHomePage.js';
|
|
3
|
+
export { ProductsPage as ClothingProductsPage } from './pages/ProductsPage.js';
|
|
4
|
+
export { ProductDetailPage as ClothingProductDetailPage } from './pages/ProductDetailPage.js';
|
|
5
|
+
export { CategoryPage as ClothingCategoryPage } from './pages/CategoryPage.js';
|
|
6
|
+
export { ClothingCategoriesPage } from './pages/CategoriesPage.js';
|
|
7
|
+
export { AboutPage as ClothingAboutPage } from './pages/AboutPage.js';
|
|
8
|
+
export { ContactPage as ClothingContactPage } from './pages/ContactPage.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AboutPage.d.ts","sourceRoot":"","sources":["../../../../src/layouts/clothing/pages/AboutPage.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;
|
|
1
|
+
{"version":3,"file":"AboutPage.d.ts","sourceRoot":"","sources":["../../../../src/layouts/clothing/pages/AboutPage.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAiBvD,UAAU,cAAc;IACtB,WAAW,EAAE,WAAW,CAAC;CAC1B;AAED,wBAAgB,SAAS,CAAC,EAAE,WAAW,EAAE,aAAa,EAAE,EAAE,cAAc,+BA0PvE"}
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
3
3
|
import { Heart, MapPin, Clock, Mail, ArrowRight } from 'lucide-react';
|
|
4
|
-
import { Button } from '../../../components/ui/button';
|
|
5
|
-
import { DotPattern } from '../../../components/ui/background-patterns';
|
|
6
|
-
import { useStore } from '../../../lib/store-context';
|
|
7
|
-
import { DynamicIcon } from '../../../components/ui/dynamic-icon';
|
|
4
|
+
import { Button } from '../../../components/ui/button.js';
|
|
5
|
+
import { DotPattern } from '../../../components/ui/background-patterns.js';
|
|
6
|
+
import { useStore } from '../../../lib/store-context.js';
|
|
7
|
+
import { DynamicIcon } from '../../../components/ui/dynamic-icon.js';
|
|
8
8
|
import Image from 'next/image';
|
|
9
9
|
import { RichTextExcerpt } from '../../../components/rich-text/RichTextExcerpt.js';
|
|
10
|
+
import { storySectionImage, storySectionLabel, storySectionTitle, storyTeamSubtitle, storyTeamTitle, } from '../../shared/about-story-media.js';
|
|
10
11
|
export function AboutPage({ storeConfig: initialConfig }) {
|
|
11
12
|
const { store } = useStore();
|
|
12
13
|
const storeConfig = store || initialConfig;
|
|
@@ -26,6 +27,11 @@ export function AboutPage({ storeConfig: initialConfig }) {
|
|
|
26
27
|
// Story section data
|
|
27
28
|
const pageContent = storyConfig?.content || storeConfig.description;
|
|
28
29
|
const gallerySection = storyConfig?.gallerySection || [];
|
|
30
|
+
const storyImage = storySectionImage(storyConfig);
|
|
31
|
+
const storyLabel = storySectionLabel(storyConfig);
|
|
32
|
+
const storyTitle = storySectionTitle(storyConfig);
|
|
33
|
+
const storyCaptionTitle = storyTeamTitle(storyConfig);
|
|
34
|
+
const storyCaptionSubtitle = storyTeamSubtitle(storyConfig);
|
|
29
35
|
// Values section data - use config if available, otherwise use defaults
|
|
30
36
|
const valuesItems = (valuesConfig?.items || [
|
|
31
37
|
{ icon: 'Award', title: "Premium Fabrics", description: "We use only the highest quality materials for our collections." },
|
|
@@ -33,7 +39,7 @@ export function AboutPage({ storeConfig: initialConfig }) {
|
|
|
33
39
|
{ icon: 'Heart', title: "Ethical Fashion", description: "We believe in fair trade and ethical manufacturing processes." },
|
|
34
40
|
{ icon: 'Leaf', title: "Sustainable Style", description: "Eco-friendly collections that look good and do good for the planet." }
|
|
35
41
|
]).filter(Boolean);
|
|
36
|
-
return (_jsxs("div", { className: "min-h-screen bg-white pb-20 overflow-hidden", children: [heroConfig?.show !== false && (_jsxs("section", { "data-section": "hero", className: "relative h-[60vh] min-h-[500px] w-full overflow-hidden", children: [_jsxs("div", { className: "absolute inset-0", children: [_jsx(Image, { src: heroImage, alt: "About Us", fill: true, className: "w-full h-full object-cover transform scale-105 animate-pulse-slow" }), _jsx("div", { className: "absolute inset-0 bg-gradient-to-r from-black/80 via-black/50 to-transparent" })] }), _jsx("div", { className: "absolute inset-0 flex items-center", children: _jsx("div", { className: "container mx-auto px-4 sm:px-6 lg:px-8", children: _jsxs("div", { className: "max-w-3xl animate-fade-in-up", children: [_jsxs("div", { className: "inline-flex items-center gap-2 px-4 py-1.5 rounded-full bg-white/10 backdrop-blur-md border border-white/20 text-white text-sm font-medium mb-6", children: [_jsx("span", { className: "w-2 h-2 rounded-full bg-white animate-pulse" }), "Est. 2024"] }), _jsx("h1", { className: "text-5xl md:text-7xl font-bold text-white mb-6 tracking-tight leading-tight", children: pageTitle }), _jsx("p", { className: "text-xl md:text-2xl text-gray-200 max-w-2xl leading-relaxed font-light", children: missionStatement })] }) }) })] })), storyConfig?.show !== false && (_jsxs("section", { "data-section": "story", className: "py-24 px-4 sm:px-6 lg:px-8 relative", children: [_jsx("div", { className: "absolute top-0 right-0 -mt-24 -mr-24 w-96 h-96 bg-gray-50 rounded-full blur-3xl -z-10" }), _jsx("div", { className: "container mx-auto max-w-7xl", children: _jsxs("div", { className: "grid grid-cols-1 lg:grid-cols-2 gap-16 items-center", children: [_jsxs("div", { className: "relative", children: [gallerySection && gallerySection.length > 0 ? (_jsx("div", { className: "grid grid-cols-2 gap-4", children: gallerySection.slice(0, 4).map((img, i) => (_jsx("div", { className: `relative overflow-hidden rounded-2xl shadow-lg ${i === 0 ? 'col-span-2 aspect-[16/9]' : 'aspect-square'}`, children: _jsx(Image, { src: img.image, alt: img.caption || "Gallery Image", fill: true, className: "w-full h-full object-cover hover:scale-110 transition-transform duration-500" }) }, i))) })) : (_jsxs("div", { className: "relative aspect-[4/5] rounded-[2rem] overflow-hidden shadow-2xl", children: [_jsx(Image, { src:
|
|
42
|
+
return (_jsxs("div", { className: "min-h-screen bg-white pb-20 overflow-hidden", children: [heroConfig?.show !== false && (_jsxs("section", { "data-section": "hero", className: "relative h-[60vh] min-h-[500px] w-full overflow-hidden", children: [_jsxs("div", { className: "absolute inset-0", children: [_jsx(Image, { src: heroImage, alt: "About Us", fill: true, className: "w-full h-full object-cover transform scale-105 animate-pulse-slow" }), _jsx("div", { className: "absolute inset-0 bg-gradient-to-r from-black/80 via-black/50 to-transparent" })] }), _jsx("div", { className: "absolute inset-0 flex items-center", children: _jsx("div", { className: "container mx-auto px-4 sm:px-6 lg:px-8", children: _jsxs("div", { className: "max-w-3xl animate-fade-in-up", children: [_jsxs("div", { className: "inline-flex items-center gap-2 px-4 py-1.5 rounded-full bg-white/10 backdrop-blur-md border border-white/20 text-white text-sm font-medium mb-6", children: [_jsx("span", { className: "w-2 h-2 rounded-full bg-white animate-pulse" }), "Est. 2024"] }), _jsx("h1", { className: "text-5xl md:text-7xl font-bold text-white mb-6 tracking-tight leading-tight", children: pageTitle }), _jsx("p", { className: "text-xl md:text-2xl text-gray-200 max-w-2xl leading-relaxed font-light", children: missionStatement })] }) }) })] })), storyConfig?.show !== false && (_jsxs("section", { "data-section": "story", className: "py-24 px-4 sm:px-6 lg:px-8 relative", children: [_jsx("div", { className: "absolute top-0 right-0 -mt-24 -mr-24 w-96 h-96 bg-gray-50 rounded-full blur-3xl -z-10" }), _jsx("div", { className: "container mx-auto max-w-7xl", children: _jsxs("div", { className: "grid grid-cols-1 lg:grid-cols-2 gap-16 items-center", children: [_jsxs("div", { className: "relative", children: [gallerySection && gallerySection.length > 0 ? (_jsx("div", { className: "grid grid-cols-2 gap-4", children: gallerySection.slice(0, 4).map((img, i) => (_jsx("div", { className: `relative overflow-hidden rounded-2xl shadow-lg ${i === 0 ? 'col-span-2 aspect-[16/9]' : 'aspect-square'}`, children: _jsx(Image, { src: img.image, alt: img.caption || "Gallery Image", fill: true, className: "w-full h-full object-cover hover:scale-110 transition-transform duration-500" }) }, i))) })) : (_jsxs("div", { className: "relative aspect-[4/5] rounded-[2rem] overflow-hidden shadow-2xl", children: [_jsx(Image, { src: storyImage, alt: storyCaptionTitle, fill: true, className: "w-full h-full object-cover" }), _jsx("div", { className: "absolute inset-0 bg-gradient-to-t from-black/60 via-transparent to-transparent opacity-60" }), _jsxs("div", { className: "absolute bottom-8 left-8 text-white", children: [_jsx("p", { className: "font-bold text-lg", children: storyCaptionTitle }), _jsx("p", { className: "text-white/80 text-sm", children: storyCaptionSubtitle })] })] })), _jsx("div", { className: "absolute -bottom-6 -right-6 w-24 h-24 bg-white rounded-2xl shadow-xl flex items-center justify-center p-4 animate-bounce duration-[3000ms]", children: _jsx(Heart, { className: "w-10 h-10", style: { color: primaryColor, fill: primaryColor } }) })] }), _jsxs("div", { className: "space-y-10", children: [_jsxs("div", { children: [_jsx("span", { className: "text-sm font-bold uppercase tracking-widest mb-3 block", style: { color: primaryColor }, children: storyLabel }), _jsx("h2", { className: "text-4xl md:text-5xl font-black text-gray-900 mb-6 tracking-tight", children: storyTitle }), _jsxs("div", { className: "prose prose-lg text-gray-600 leading-relaxed space-y-6", children: [pageContent?.split('\n').map((paragraph, idx) => (_jsx("p", { children: paragraph }, idx))), !pageContent && (_jsxs(_Fragment, { children: [_jsxs("p", { children: ["Founded with a bold vision to redefine excellence in the ", _jsx("span", { className: "font-semibold text-gray-900", children: storeConfig.type }), " industry, ", storeConfig.name, " has grown from a small passion project into a beloved brand. We believe in the power of quality, innovation, and community."] }), _jsx("p", { children: "Every day, we strive to bring you the best products, curated with care and delivered with a smile. Our team is dedicated to ensuring that your experience with us is nothing short of exceptional." })] }))] })] }), valuesConfig?.show !== false && valuesItems.length > 0 && (_jsx("div", { className: "grid grid-cols-1 sm:grid-cols-2 gap-8", children: valuesItems.map((item, idx) => (_jsxs("div", { className: "flex gap-4 group", children: [_jsx("div", { className: "flex-shrink-0", children: _jsx("div", { className: "w-14 h-14 rounded-2xl flex items-center justify-center transition-colors group-hover:bg-gray-100", style: { backgroundColor: `${primaryColor}10` }, children: _jsx(DynamicIcon, { name: item.icon, className: "h-7 w-7 transition-transform group-hover:scale-110", style: { color: primaryColor } }) }) }), _jsxs("div", { children: [_jsx("h4", { className: "font-bold text-gray-900 mb-2 text-lg", children: item.title }), _jsx(RichTextExcerpt, { value: item.description, as: "p", className: "text-gray-600 text-sm leading-relaxed" })] })] }, idx))) }))] })] }) })] })), statsConfig?.show !== false && (_jsxs("section", { "data-section": "stats", className: "py-20 relative overflow-hidden", children: [_jsx("div", { className: "absolute inset-0 opacity-10", children: _jsx(DotPattern, { color: primaryColor, cx: 2, cy: 2, cr: 2, width: 30, height: 30 }) }), _jsx("div", { className: "absolute inset-0", style: { backgroundColor: `${secondaryColor}15` } }), _jsx("div", { className: "container mx-auto px-4 relative z-10", children: _jsx("div", { className: "grid grid-cols-2 md:grid-cols-4 gap-8 md:gap-12", children: [
|
|
37
43
|
{ label: "Style Lovers", value: "20k+" },
|
|
38
44
|
{ label: "New Arrivals", value: storeConfig.products?.length ? `${storeConfig.products.length * 5}+` : "100+" },
|
|
39
45
|
{ label: "Global Shipping", value: "50+" },
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
-
import { Breadcrumbs } from '../../../components/ui/breadcrumbs';
|
|
4
|
-
import { ImageWithFallback } from '../../../components/ui/image-with-fallback';
|
|
5
|
-
import { useStore } from '../../../lib/store-context';
|
|
6
|
-
import { useCatalogLoader } from '../../../hooks/use-catalog-loader';
|
|
7
|
-
import { getPayazaSectionInlineStyle } from '../../../lib/payaza-section-styles';
|
|
8
|
-
import { isEditorPreviewMode, resolveStoreCategoriesForDisplay } from '../../../lib/utils';
|
|
9
|
-
import { useClothingPayaza } from '../payaza-bindings';
|
|
10
|
-
import { CategoryMasonryGrid } from '../../../components/categories/category-masonry-grid';
|
|
11
|
-
import { SafeRichHtml } from '../../../components/rich-text/SafeRichHtml';
|
|
3
|
+
import { Breadcrumbs } from '../../../components/ui/breadcrumbs.js';
|
|
4
|
+
import { ImageWithFallback } from '../../../components/ui/image-with-fallback.js';
|
|
5
|
+
import { useStore } from '../../../lib/store-context.js';
|
|
6
|
+
import { useCatalogLoader } from '../../../hooks/use-catalog-loader.js';
|
|
7
|
+
import { getPayazaSectionInlineStyle } from '../../../lib/payaza-section-styles.js';
|
|
8
|
+
import { isEditorPreviewMode, resolveStoreCategoriesForDisplay } from '../../../lib/utils/index.js';
|
|
9
|
+
import { useClothingPayaza } from '../payaza-bindings.js';
|
|
10
|
+
import { CategoryMasonryGrid } from '../../../components/categories/category-masonry-grid.js';
|
|
11
|
+
import { SafeRichHtml } from '../../../components/rich-text/SafeRichHtml.js';
|
|
12
12
|
export function ClothingCategoriesPage({ storeConfig: initialConfig }) {
|
|
13
13
|
const { store } = useStore();
|
|
14
14
|
const storeConfig = store || initialConfig;
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
3
3
|
import { useCategoryProducts } from '../../../hooks/use-category-products.js';
|
|
4
|
-
import { Button } from '../../../components/ui/button';
|
|
5
|
-
import { ImageWithFallback } from '../../../components/ui/image-with-fallback';
|
|
6
|
-
import { useStore } from '../../../lib/store-context';
|
|
4
|
+
import { Button } from '../../../components/ui/button.js';
|
|
5
|
+
import { ImageWithFallback } from '../../../components/ui/image-with-fallback.js';
|
|
6
|
+
import { useStore } from '../../../lib/store-context.js';
|
|
7
7
|
import { ArrowLeft, Filter } from 'lucide-react';
|
|
8
8
|
import Link from 'next/link';
|
|
9
|
-
import { useToast } from '../../../components/ui/toast';
|
|
10
|
-
import { useAnalytics } from '../../../hooks/use-analytics';
|
|
9
|
+
import { useToast } from '../../../components/ui/toast.js';
|
|
10
|
+
import { useAnalytics } from '../../../hooks/use-analytics.js';
|
|
11
11
|
import { useEffect } from 'react';
|
|
12
|
-
import { ProductCard } from '../../../components/ui/product-card';
|
|
13
|
-
import { CategoryDescription } from '../../../components/rich-text/CategoryDescription';
|
|
12
|
+
import { ProductCard } from '../../../components/ui/product-card.js';
|
|
13
|
+
import { CategoryDescription } from '../../../components/rich-text/CategoryDescription.js';
|
|
14
14
|
export function CategoryPage({ storeConfig: initialConfig, categorySlug, categoryProductsSeed }) {
|
|
15
15
|
const { store, addToCart } = useStore();
|
|
16
16
|
const storeConfig = store || initialConfig;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
3
3
|
import { useState } from 'react';
|
|
4
|
-
import { Button } from '../../../components/ui/button';
|
|
4
|
+
import { Button } from '../../../components/ui/button.js';
|
|
5
5
|
import { Mail, Phone, MapPin, Clock, Send, MessageSquare, CheckCircle } from 'lucide-react';
|
|
6
|
-
import { useStore } from '../../../lib/store-context';
|
|
6
|
+
import { useStore } from '../../../lib/store-context.js';
|
|
7
7
|
import Image from 'next/image';
|
|
8
|
-
import { submitContact } from '../../../lib/services/contact.service';
|
|
8
|
+
import { submitContact } from '../../../lib/services/contact.service.js';
|
|
9
9
|
export function ContactPage({ storeConfig: initialConfig }) {
|
|
10
10
|
const { store } = useStore();
|
|
11
11
|
const storeConfig = store || initialConfig;
|
|
@@ -2,34 +2,34 @@
|
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
3
3
|
import { useProductBySlug } from '../../../hooks/use-product-by-slug.js';
|
|
4
4
|
import { useProductReviews } from '../../../hooks/use-product-reviews.js';
|
|
5
|
-
import { Button } from '../../../components/ui/button';
|
|
6
|
-
import { Breadcrumbs } from '../../../components/ui/breadcrumbs';
|
|
7
|
-
import { Modal } from '../../../components/ui/modal';
|
|
5
|
+
import { Button } from '../../../components/ui/button.js';
|
|
6
|
+
import { Breadcrumbs } from '../../../components/ui/breadcrumbs.js';
|
|
7
|
+
import { Modal } from '../../../components/ui/modal.js';
|
|
8
8
|
import { ShoppingCart, Heart, Star, CheckCircle, ThumbsUp, User, Minus, Plus, Share2, Info } from 'lucide-react';
|
|
9
9
|
import { useState, useMemo, useEffect, useCallback } from 'react';
|
|
10
|
-
import { useStore } from '../../../lib/store-context';
|
|
11
|
-
import { useToast } from '../../../components/ui/toast';
|
|
10
|
+
import { useStore } from '../../../lib/store-context.js';
|
|
11
|
+
import { useToast } from '../../../components/ui/toast.js';
|
|
12
12
|
import { useRouter } from 'next/navigation';
|
|
13
|
-
import { useAuth } from '../../../lib/auth-context';
|
|
14
|
-
import { useAnalytics } from '../../../hooks/use-analytics';
|
|
15
|
-
import { customerService } from '../../../lib/services/customer.service';
|
|
16
|
-
import { GuestCheckoutModal } from '../../../components/ui/guest-checkout-modal';
|
|
17
|
-
import { getGuestUserInfo, saveGuestUserInfo } from '../../../lib/guest-user';
|
|
18
|
-
import { ProductCard } from '../../../components/ui/product-card';
|
|
13
|
+
import { useAuth } from '../../../lib/auth-context.js';
|
|
14
|
+
import { useAnalytics } from '../../../hooks/use-analytics.js';
|
|
15
|
+
import { customerService } from '../../../lib/services/customer.service.js';
|
|
16
|
+
import { GuestCheckoutModal } from '../../../components/ui/guest-checkout-modal.js';
|
|
17
|
+
import { getGuestUserInfo, saveGuestUserInfo } from '../../../lib/guest-user.js';
|
|
18
|
+
import { ProductCard } from '../../../components/ui/product-card.js';
|
|
19
19
|
import Image from 'next/image';
|
|
20
|
-
import { ImageWithFallback } from '../../../components/ui/image-with-fallback';
|
|
21
|
-
import { SafeRichHtml } from '../../../components/rich-text/SafeRichHtml';
|
|
22
|
-
import { ButtonLoader } from '../../../components/ui/page-loader';
|
|
23
|
-
import { extractImageUrls } from '../../../lib/store-config-utils';
|
|
24
|
-
import { OutOfStockOverlay } from '../../../components/ui/out-of-stock-overlay';
|
|
25
|
-
import { cn, formatCurrency, filterActiveProducts, isEditorPreviewMode, resolvePdpProduct } from '../../../lib/utils';
|
|
26
|
-
import { usePdpVariation } from '../../../hooks/use-pdp-variation';
|
|
27
|
-
import { buildPdpBuyNowItem } from '../../../lib/pdp-cart-actions';
|
|
28
|
-
import { assertVariationSelected } from '../../../lib/product-variation-utils';
|
|
29
|
-
import { shippingService } from '../../../lib/services/shipping.service';
|
|
30
|
-
import { ProductDeliveryInfoSection } from '../../../components/shipping/ProductDeliveryInfoSection';
|
|
31
|
-
import { PdpVariationSelectors } from '../../shared/components/PdpVariationSelectors';
|
|
32
|
-
import { formatDateSafe } from '../../../utils/date';
|
|
20
|
+
import { ImageWithFallback } from '../../../components/ui/image-with-fallback.js';
|
|
21
|
+
import { SafeRichHtml } from '../../../components/rich-text/SafeRichHtml.js';
|
|
22
|
+
import { ButtonLoader } from '../../../components/ui/page-loader.js';
|
|
23
|
+
import { extractImageUrls } from '../../../lib/store-config-utils.js';
|
|
24
|
+
import { OutOfStockOverlay } from '../../../components/ui/out-of-stock-overlay.js';
|
|
25
|
+
import { cn, formatCurrency, filterActiveProducts, isEditorPreviewMode, resolvePdpProduct } from '../../../lib/utils/index.js';
|
|
26
|
+
import { usePdpVariation } from '../../../hooks/use-pdp-variation.js';
|
|
27
|
+
import { buildPdpBuyNowItem } from '../../../lib/pdp-cart-actions.js';
|
|
28
|
+
import { assertVariationSelected } from '../../../lib/product-variation-utils.js';
|
|
29
|
+
import { shippingService } from '../../../lib/services/shipping.service.js';
|
|
30
|
+
import { ProductDeliveryInfoSection } from '../../../components/shipping/ProductDeliveryInfoSection.js';
|
|
31
|
+
import { PdpVariationSelectors } from '../../shared/components/PdpVariationSelectors.js';
|
|
32
|
+
import { formatDateSafe } from '../../../utils/date.js';
|
|
33
33
|
// Helper function to format date
|
|
34
34
|
const formatDate = (dateString) => {
|
|
35
35
|
return formatDateSafe(dateString, '—', { year: 'numeric', month: 'long', day: 'numeric' });
|
|
@@ -1,31 +1,31 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
3
|
-
import { Button } from '../../../components/ui/button';
|
|
4
|
-
import { Breadcrumbs } from '../../../components/ui/breadcrumbs';
|
|
5
|
-
import { Sheet } from '../../../components/ui/sheet';
|
|
6
|
-
import { ImageWithFallback } from '../../../components/ui/image-with-fallback';
|
|
7
|
-
import { ProductCard } from '../../../components/ui/product-card';
|
|
8
|
-
import { ProductGridSkeleton } from '../../../components/ui/skeletons';
|
|
9
|
-
import { CategoryTree } from '../../../components/ui/category-tree';
|
|
10
|
-
import { useStore } from '../../../lib/store-context';
|
|
11
|
-
import { useToast } from '../../../components/ui/toast';
|
|
12
|
-
import { useLoading } from '../../../lib/loading-context';
|
|
13
|
-
import { useAnalytics } from '../../../hooks/use-analytics';
|
|
3
|
+
import { Button } from '../../../components/ui/button.js';
|
|
4
|
+
import { Breadcrumbs } from '../../../components/ui/breadcrumbs.js';
|
|
5
|
+
import { Sheet } from '../../../components/ui/sheet.js';
|
|
6
|
+
import { ImageWithFallback } from '../../../components/ui/image-with-fallback.js';
|
|
7
|
+
import { ProductCard } from '../../../components/ui/product-card.js';
|
|
8
|
+
import { ProductGridSkeleton } from '../../../components/ui/skeletons/index.js';
|
|
9
|
+
import { CategoryTree } from '../../../components/ui/category-tree.js';
|
|
10
|
+
import { useStore } from '../../../lib/store-context.js';
|
|
11
|
+
import { useToast } from '../../../components/ui/toast.js';
|
|
12
|
+
import { useLoading } from '../../../lib/loading-context.js';
|
|
13
|
+
import { useAnalytics } from '../../../hooks/use-analytics.js';
|
|
14
14
|
import { ChevronDown, ChevronUp, Star, Check, Search, RotateCcw, SlidersHorizontal } from 'lucide-react';
|
|
15
15
|
import { useSearchParams } from 'next/navigation';
|
|
16
16
|
import { useState, useMemo, useEffect, Suspense } from 'react';
|
|
17
17
|
import { useProductBrands } from '../../../hooks/use-product-brands.js';
|
|
18
18
|
import { useFilteredProductsFetch } from '../../../hooks/use-filtered-products-fetch.js';
|
|
19
|
-
import { filterActiveProducts } from '../../../lib/utils';
|
|
20
|
-
import { getAllCategoryIds, flattenCategoryTree, buildCategoryTree } from '../../../lib/utils/category-tree';
|
|
21
|
-
import { getBannerImage, getLayoutText } from '../../../lib/utils/asset-helpers';
|
|
22
|
-
import { shouldUseAPI } from '../../../lib/utils/demo-detection';
|
|
23
|
-
import { productCategoryFilterChipClass } from '../../shared/product-category-filter-chip';
|
|
19
|
+
import { filterActiveProducts } from '../../../lib/utils/index.js';
|
|
20
|
+
import { getAllCategoryIds, flattenCategoryTree, buildCategoryTree } from '../../../lib/utils/category-tree.js';
|
|
21
|
+
import { getBannerImage, getLayoutText } from '../../../lib/utils/asset-helpers.js';
|
|
22
|
+
import { shouldUseAPI } from '../../../lib/utils/demo-detection.js';
|
|
23
|
+
import { productCategoryFilterChipClass } from '../../shared/product-category-filter-chip.js';
|
|
24
24
|
import { useCatalogPriceRange } from '../../../hooks/use-catalog-price-range.js';
|
|
25
25
|
import { getApiPriceFilterActive, isWithinActivePriceRange } from '../../../lib/utils/catalog-price-bounds.js';
|
|
26
26
|
import { buildFilteredProductQuery, getFilteredProductQueryKey, productMatchesCategoryIds, productMatchesCategorySlug, } from '../../../lib/utils/filtered-product-query.js';
|
|
27
27
|
import { transformProductToStoreProduct } from '../../../lib/store-config-utils.js';
|
|
28
|
-
import { ProductPriceFilterSection } from '../../shared/components/ProductPriceFilterSection';
|
|
28
|
+
import { ProductPriceFilterSection } from '../../shared/components/ProductPriceFilterSection.js';
|
|
29
29
|
function ProductsPageContent({ storeConfig: initialConfig }) {
|
|
30
30
|
const { store, addToCart } = useStore();
|
|
31
31
|
const storeConfig = store || initialConfig;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import { encodePayazaFieldKey, payazaIconBindingProps, payazaInlineBindingProps } from '../../preview/canvas/field-key';
|
|
3
|
-
import { isEditorPreviewMode } from '../../lib/utils/editor-preview';
|
|
2
|
+
import { encodePayazaFieldKey, payazaIconBindingProps, payazaInlineBindingProps } from '../../preview/canvas/field-key.js';
|
|
3
|
+
import { isEditorPreviewMode } from '../../lib/utils/editor-preview.js';
|
|
4
4
|
/** Preview + Payaza field helpers for Fashion Hub (clothing) layout pages. */
|
|
5
5
|
export function useClothingPayaza(storeConfig, pageId) {
|
|
6
6
|
const isPreview = isEditorPreviewMode(storeConfig);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ClothingHomePageMinimal.d.ts","sourceRoot":"","sources":["../../../../src/layouts/clothing-minimal/components/ClothingHomePageMinimal.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ClothingHomePageMinimal.d.ts","sourceRoot":"","sources":["../../../../src/layouts/clothing-minimal/components/ClothingHomePageMinimal.tsx"],"names":[],"mappings":"AAMA,OAAO,EAAE,WAAW,EAAgB,MAAM,0BAA0B,CAAC;AAgBrE,UAAU,4BAA4B;IACpC,WAAW,EAAE,WAAW,CAAC;CAC1B;AAED,wBAAgB,uBAAuB,CAAC,EAAE,WAAW,EAAE,aAAa,EAAE,EAAE,4BAA4B,+BAqUnG"}
|
|
@@ -1,17 +1,18 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
3
|
+
import { hasValidCompareAtPrice } from '../../../utils/price-display.js';
|
|
3
4
|
import { useFeaturedProducts } from '../../../hooks/use-featured-products.js';
|
|
4
|
-
import { Button } from '../../../components/ui/button';
|
|
5
|
-
import { useStore } from '../../../lib/store-context';
|
|
6
|
-
import { ImageWithFallback } from '../../../components/ui/image-with-fallback';
|
|
7
|
-
import { useToast } from '../../../components/ui/toast';
|
|
5
|
+
import { Button } from '../../../components/ui/button.js';
|
|
6
|
+
import { useStore } from '../../../lib/store-context.js';
|
|
7
|
+
import { ImageWithFallback } from '../../../components/ui/image-with-fallback.js';
|
|
8
|
+
import { useToast } from '../../../components/ui/toast.js';
|
|
8
9
|
import { ArrowUpRight, Plus } from 'lucide-react';
|
|
9
10
|
import Link from 'next/link';
|
|
10
|
-
import { formatCurrency, filterActiveProducts } from '../../../lib/utils';
|
|
11
|
-
import { countProductsInCategoryTree, getCategoriesForDisplay, } from '../../../lib/utils/category-tree';
|
|
12
|
-
import { getLayoutText, getBannerImage, resolveClothingMinimalHeroBadge } from '../../../lib/utils/asset-helpers';
|
|
13
|
-
import { PromoBanner } from '../../shared/components/PromoBanner';
|
|
14
|
-
import { SafeRichHtml } from '../../../components/rich-text/SafeRichHtml';
|
|
11
|
+
import { formatCurrency, filterActiveProducts } from '../../../lib/utils/index.js';
|
|
12
|
+
import { countProductsInCategoryTree, getCategoriesForDisplay, } from '../../../lib/utils/category-tree.js';
|
|
13
|
+
import { getLayoutText, getBannerImage, resolveClothingMinimalHeroBadge } from '../../../lib/utils/asset-helpers.js';
|
|
14
|
+
import { PromoBanner } from '../../shared/components/PromoBanner.js';
|
|
15
|
+
import { SafeRichHtml } from '../../../components/rich-text/SafeRichHtml.js';
|
|
15
16
|
export function ClothingHomePageMinimal({ storeConfig: initialConfig }) {
|
|
16
17
|
const { store, addToCart } = useStore();
|
|
17
18
|
const storeConfig = store || initialConfig;
|
|
@@ -61,6 +62,6 @@ export function ClothingHomePageMinimal({ storeConfig: initialConfig }) {
|
|
|
61
62
|
}, className: "bg-white text-black px-8 py-3 rounded-full text-sm font-bold shadow-lg transform translate-y-4 group-hover:translate-y-0 transition-all duration-300 hover:bg-black hover:text-white", children: "Add to cart" }) }), _jsx("button", { onClick: (e) => {
|
|
62
63
|
e.preventDefault();
|
|
63
64
|
handleAddToCart(product);
|
|
64
|
-
}, className: "lg:hidden absolute bottom-3 right-3 bg-white text-black h-10 w-10 flex items-center justify-center rounded-full shadow-lg z-10 active:scale-95 transition-transform", children: _jsx(Plus, { className: "h-5 w-5" }) }), product.
|
|
65
|
+
}, className: "lg:hidden absolute bottom-3 right-3 bg-white text-black h-10 w-10 flex items-center justify-center rounded-full shadow-lg z-10 active:scale-95 transition-transform", children: _jsx(Plus, { className: "h-5 w-5" }) }), hasValidCompareAtPrice(product.price, product.compareAtPrice) && (_jsx("span", { className: "absolute top-2 left-2 text-[10px] font-bold uppercase tracking-wider bg-black text-white px-2 py-1", children: getLayoutText(storeConfig, 'common.sale', 'Sale') }))] }), _jsxs("div", { className: "flex justify-between items-start", children: [_jsxs("div", { children: [_jsx("h3", { className: "font-medium text-base mb-1 group-hover:underline decoration-1 underline-offset-4", children: product.name }), _jsx("div", { className: "flex gap-2 mb-2", children: ['#D4D4D4', '#171717', '#737373'].map((color, i) => (_jsx("div", { className: "w-3 h-3 rounded-full border border-gray-200", style: { backgroundColor: color } }, i))) })] }), _jsx("span", { className: "font-medium text-sm", children: formatCurrency(product.price, product.currency || 'USD') })] })] }) }, product.id))) })] }) })), layoutConfig?.sections?.about?.show !== false && (_jsx("section", { "data-section": "about", className: "py-16 md:py-24 px-4 md:px-8 border-t border-gray-100", children: _jsx("div", { className: "container mx-auto", children: _jsxs("div", { className: "grid grid-cols-1 lg:grid-cols-2 gap-10 md:gap-16 items-center", children: [_jsxs("div", { className: "relative aspect-[4/5] bg-gray-100 group overflow-hidden", children: [_jsx(ImageWithFallback, { src: "https://images.unsplash.com/photo-1483985988355-763728e1935b?q=80&w=2070&auto=format&fit=crop", alt: "Shop the look", className: "w-full h-full object-cover" }), _jsxs("div", { className: "absolute top-[30%] left-[45%] group/spot", children: [_jsx("div", { className: "w-4 h-4 bg-white rounded-full animate-pulse cursor-pointer relative z-10 hover:scale-125 transition-transform" }), _jsxs("div", { className: "absolute left-6 top-1/2 -translate-y-1/2 bg-white p-3 rounded shadow-lg w-48 opacity-0 group-hover/spot:opacity-100 transition-opacity pointer-events-none group-hover/spot:pointer-events-auto", children: [_jsx("p", { className: "font-bold text-xs mb-1", children: "Oversized Wool Coat" }), _jsx("p", { className: "text-xs text-gray-500", children: "$299.00" })] })] }), _jsxs("div", { className: "absolute bottom-[25%] right-[40%] group/spot", children: [_jsx("div", { className: "w-4 h-4 bg-white rounded-full animate-pulse cursor-pointer relative z-10 hover:scale-125 transition-transform" }), _jsxs("div", { className: "absolute right-6 top-1/2 -translate-y-1/2 bg-white p-3 rounded shadow-lg w-48 opacity-0 group-hover/spot:opacity-100 transition-opacity pointer-events-none group-hover/spot:pointer-events-auto", children: [_jsx("p", { className: "font-bold text-xs mb-1", children: "Leather Ankle Boots" }), _jsx("p", { className: "text-xs text-gray-500", children: "$189.00" })] })] })] }), _jsxs("div", { className: "space-y-8", children: [_jsx("h2", { className: "text-4xl font-light", children: layoutConfig?.sections?.about?.title || (_jsxs(_Fragment, { children: ["Winter ", _jsx("span", { className: "font-serif italic", children: "Layering" })] })) }), _jsx("div", { className: "text-gray-600 leading-relaxed max-w-md [&_p]:mb-3 [&_p:last-child]:mb-0", children: _jsx(SafeRichHtml, { value: layoutConfig?.sections?.about?.description ||
|
|
65
66
|
'Master the art of layering with our winter collection. Combining warmth with style, these pieces are designed to work together seamlessly.', fallbackPlain: "Master the art of layering with our winter collection. Combining warmth with style, these pieces are designed to work together seamlessly." }) }), _jsx("div", { className: "space-y-4", children: products.slice(0, 3).map((item, i) => (_jsxs("div", { className: "flex gap-4 items-center p-2 hover:bg-gray-50 rounded-lg transition-colors group cursor-pointer", children: [_jsx("div", { className: "w-16 h-20 bg-white relative", children: _jsx(ImageWithFallback, { src: item.images[0], alt: item.name, className: "w-full h-full object-cover" }) }), _jsxs("div", { className: "flex-1", children: [_jsx("h4", { className: "font-medium text-sm mb-1", children: item.name }), _jsx("p", { className: "text-xs text-gray-500", children: formatCurrency(item.price, item.currency || storeConfig.settings?.currency || 'USD') })] }), _jsx(Button, { variant: "ghost", size: "icon", onClick: () => handleAddToCart(item), className: "opacity-0 group-hover:opacity-100 transition-opacity", children: _jsx(Plus, { className: "h-4 w-4" }) })] }, i))) }), _jsx(Link, { href: `/${storeConfig.slug}/products`, children: _jsx(Button, { className: "w-full bg-black text-white hover:bg-gray-800 h-12 rounded-none uppercase tracking-widest text-xs font-bold", children: getLayoutText(storeConfig, 'common.shopNow', 'Shop The Edit') }) })] })] }) }) })), _jsx(PromoBanner, { config: layoutConfig?.sections?.promoBanner, layoutStyle: "clothing" })] }));
|
|
66
67
|
}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
3
|
import Link from 'next/link';
|
|
4
|
-
import { Button } from '../../../components/ui/button';
|
|
5
|
-
import { ImageWithFallback } from '../../../components/ui/image-with-fallback';
|
|
4
|
+
import { Button } from '../../../components/ui/button.js';
|
|
5
|
+
import { ImageWithFallback } from '../../../components/ui/image-with-fallback.js';
|
|
6
6
|
import { Plus } from 'lucide-react';
|
|
7
|
-
import { encodePayazaFieldKey, payazaInlineBindingProps, payazaGroupBindingProps } from '../../../preview/canvas/field-key';
|
|
8
|
-
import { richFieldHasContent, richFieldHtmlForRender } from '../../../lib/rich-html';
|
|
9
|
-
import { resolveClothingMinimalHeroBadge } from '../../../lib/utils/asset-helpers';
|
|
10
|
-
import { formatCurrency } from '../../../lib/utils';
|
|
11
|
-
import { getPayazaBlockDefinition } from '../../../editor/blocks/registry';
|
|
7
|
+
import { encodePayazaFieldKey, payazaInlineBindingProps, payazaGroupBindingProps } from '../../../preview/canvas/field-key.js';
|
|
8
|
+
import { richFieldHasContent, richFieldHtmlForRender } from '../../../lib/rich-html.js';
|
|
9
|
+
import { resolveClothingMinimalHeroBadge } from '../../../lib/utils/asset-helpers.js';
|
|
10
|
+
import { formatCurrency } from '../../../lib/utils/index.js';
|
|
11
|
+
import { getPayazaBlockDefinition } from '../../../editor/blocks/registry.js';
|
|
12
12
|
export function blkAttr(block) {
|
|
13
13
|
const a = block.attributes;
|
|
14
14
|
if (a && typeof a === 'object' && !Array.isArray(a))
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
// Fashion Minimal (clothing-minimal) layout — fully sandboxed exports
|
|
2
|
-
export { ClothingHomePageMinimal } from './components/ClothingHomePageMinimal';
|
|
3
|
-
export { ProductsPage as ClothingMinimalProductsPage } from './pages/ProductsPage';
|
|
4
|
-
export { ProductDetailPage as ClothingMinimalProductDetailPage } from './pages/ProductDetailPage';
|
|
5
|
-
export { CategoryPage as ClothingMinimalCategoryPage } from './pages/CategoryPage';
|
|
6
|
-
export { ClothingMinimalCategoriesPage } from './pages/CategoriesPage';
|
|
7
|
-
export { AboutPage as ClothingMinimalAboutPage } from './pages/AboutPage';
|
|
8
|
-
export { ContactPage as ClothingMinimalContactPage } from './pages/ContactPage';
|
|
2
|
+
export { ClothingHomePageMinimal } from './components/ClothingHomePageMinimal.js';
|
|
3
|
+
export { ProductsPage as ClothingMinimalProductsPage } from './pages/ProductsPage.js';
|
|
4
|
+
export { ProductDetailPage as ClothingMinimalProductDetailPage } from './pages/ProductDetailPage.js';
|
|
5
|
+
export { CategoryPage as ClothingMinimalCategoryPage } from './pages/CategoryPage.js';
|
|
6
|
+
export { ClothingMinimalCategoriesPage } from './pages/CategoriesPage.js';
|
|
7
|
+
export { AboutPage as ClothingMinimalAboutPage } from './pages/AboutPage.js';
|
|
8
|
+
export { ContactPage as ClothingMinimalContactPage } from './pages/ContactPage.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AboutPage.d.ts","sourceRoot":"","sources":["../../../../src/layouts/clothing-minimal/pages/AboutPage.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;
|
|
1
|
+
{"version":3,"file":"AboutPage.d.ts","sourceRoot":"","sources":["../../../../src/layouts/clothing-minimal/pages/AboutPage.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAgBvD,UAAU,cAAc;IACtB,WAAW,EAAE,WAAW,CAAC;CAC1B;AAED,wBAAgB,SAAS,CAAC,EAAE,WAAW,EAAE,aAAa,EAAE,EAAE,cAAc,+BAoPvE"}
|