@thorprovider/blocks 0.1.3 → 2.0.0
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/CHANGELOG.md +155 -0
- package/README.md +228 -68
- package/docs/standards/data-contracts.md +13 -2
- package/package.json +26 -10
- package/scripts/fix-esm-extensions.mjs +40 -0
- package/src/blocks/application/login-forms/login-page.test.tsx +190 -0
- package/src/blocks/application/login-forms/login-page.tsx +240 -0
- package/src/blocks/application/password-recovery/forgot-password-page-1.tsx +6 -8
- package/src/blocks/application/signup-forms/signup-page-1.tsx +127 -129
- package/src/blocks/application/verification/verify-1.tsx +2 -2
- package/src/blocks/application/viewport-ownership.test.tsx +41 -0
- package/src/blocks/e-commerce/category-filters/category-listing-filter-fields.tsx +218 -0
- package/src/blocks/e-commerce/category-filters/{category-filter-2.test.tsx → category-listing.test.tsx} +287 -199
- package/src/blocks/e-commerce/category-filters/category-listing.tsx +934 -0
- package/src/blocks/e-commerce/checkout-forms/checkout-contact-step.tsx +149 -0
- package/src/blocks/e-commerce/checkout-forms/{checkout-form-1-country-field.tsx → checkout-country-field.tsx} +10 -8
- package/src/blocks/e-commerce/checkout-forms/checkout-order-summary.tsx +230 -0
- package/src/blocks/e-commerce/checkout-forms/checkout-payment-step.tsx +100 -0
- package/src/blocks/e-commerce/checkout-forms/checkout-progress.tsx +62 -0
- package/src/blocks/e-commerce/checkout-forms/checkout-review-step.tsx +59 -0
- package/src/blocks/e-commerce/checkout-forms/{checkout-form-1-shipping-step.tsx → checkout-shipping-step.tsx} +65 -41
- package/src/blocks/e-commerce/checkout-forms/checkout.test.tsx +478 -0
- package/src/blocks/e-commerce/checkout-forms/checkout.tsx +550 -0
- package/src/blocks/e-commerce/navigation/storefront-navbar-account-menu.test.tsx +56 -0
- package/src/blocks/{marketing/navbars/navbar-4-account-menu.tsx → e-commerce/navigation/storefront-navbar-account-menu.tsx} +3 -3
- package/src/blocks/{marketing/navbars/navbar-4-cart-sheet.test.tsx → e-commerce/navigation/storefront-navbar-cart-sheet.test.tsx} +22 -22
- package/src/blocks/{marketing/navbars/navbar-4-cart-sheet.tsx → e-commerce/navigation/storefront-navbar-cart-sheet.tsx} +3 -3
- package/src/blocks/{marketing/navbars/navbar-4-mobile-nav.tsx → e-commerce/navigation/storefront-navbar-mobile-nav.tsx} +4 -12
- package/src/blocks/{marketing/navbars/navbar-4-search-bar.tsx → e-commerce/navigation/storefront-navbar-search-bar.tsx} +3 -3
- package/src/blocks/{marketing/navbars/navbar-4.test.tsx → e-commerce/navigation/storefront-navbar.test.tsx} +67 -36
- package/src/blocks/{marketing/navbars/navbar-4.tsx → e-commerce/navigation/storefront-navbar.tsx} +43 -25
- package/src/blocks/e-commerce/product-categories/category-card-grid.test.tsx +122 -0
- package/src/blocks/e-commerce/product-categories/category-card.test.tsx +68 -0
- package/src/blocks/e-commerce/product-categories/category-card.tsx +172 -0
- package/src/blocks/e-commerce/product-categories/category-grid.test.tsx +67 -0
- package/src/blocks/e-commerce/product-categories/category-shared.tsx +109 -0
- package/src/blocks/e-commerce/product-categories/product-category-grid.tsx +170 -0
- package/src/blocks/e-commerce/product-categories/product-category.test.tsx +266 -0
- package/src/blocks/e-commerce/product-categories/product-category.tsx +462 -0
- package/src/blocks/e-commerce/product-list/product-card.test.tsx +263 -0
- package/src/blocks/e-commerce/product-list/product-card.tsx +447 -0
- package/src/blocks/e-commerce/product-list/product-grid.test.tsx +162 -0
- package/src/blocks/e-commerce/product-list/product-grid.tsx +114 -0
- package/src/blocks/e-commerce/product-overview/product-overview-gallery.tsx +71 -0
- package/src/blocks/e-commerce/product-overview/{product-overview-5-lightbox-tab.tsx → product-overview-lightbox-tab.tsx} +35 -23
- package/src/blocks/e-commerce/product-overview/{product-overview-5-reviews-tab.tsx → product-overview-reviews-tab.tsx} +40 -17
- package/src/blocks/e-commerce/product-overview/{product-overview-5-tabs.tsx → product-overview-tabs.tsx} +8 -7
- package/src/blocks/e-commerce/product-overview/product-overview.test.tsx +283 -0
- package/src/blocks/e-commerce/product-overview/product-overview.tsx +1186 -0
- package/src/blocks/e-commerce/reviews/review-rating-2.tsx +5 -6
- package/src/blocks/e-commerce/shopping-carts/shopping-cart.test.tsx +399 -0
- package/src/blocks/e-commerce/shopping-carts/{shopping-cart-4.tsx → shopping-cart.tsx} +119 -85
- package/src/blocks/e-commerce/storefront-hero/storefront-hero.test.tsx +412 -0
- package/src/blocks/e-commerce/storefront-hero/storefront-hero.tsx +1283 -0
- package/src/blocks/marketing/features/feature.test.tsx +153 -0
- package/src/blocks/marketing/features/feature.tsx +195 -0
- package/src/blocks/marketing/footers/footer-section-accessibility.test.tsx +118 -0
- package/src/blocks/marketing/footers/footer-section-actions.test.tsx +131 -0
- package/src/blocks/marketing/footers/footer-section-data.test.tsx +127 -0
- package/src/blocks/marketing/footers/footer-section-native-links.test.tsx +100 -0
- package/src/blocks/marketing/footers/footer-section-public-api.test.tsx +11 -0
- package/src/blocks/marketing/footers/footer-section.test.tsx +46 -0
- package/src/blocks/marketing/footers/footer-section.tsx +532 -0
- package/src/blocks/marketing/navbars/navbar-public-api.test.tsx +57 -0
- package/src/blocks/marketing/navbars/navbar.mega.test.tsx +149 -0
- package/src/blocks/marketing/navbars/navbar.test.tsx +155 -0
- package/src/blocks/marketing/navbars/navbar.tsx +735 -0
- package/src/blocks/marketing/testimonials/testimonial-section.test.tsx +171 -0
- package/src/blocks/marketing/testimonials/testimonial-section.tsx +237 -0
- package/src/index.ts +156 -128
- package/src/lib/contracts-curated.test.ts +47 -29
- package/src/lib/contracts.test.ts +198 -2
- package/src/lib/contracts.ts +410 -16
- package/src/ui/button-group.tsx +1 -1
- package/src/ui/carousel.tsx +1 -1
- package/src/ui/dialog.tsx +1 -1
- package/src/ui/field.tsx +2 -2
- package/src/ui/input-group.tsx +3 -3
- package/src/ui/pagination.tsx +1 -1
- package/src/ui/sidebar.tsx +7 -7
- package/src/ui/toggle-group.tsx +1 -1
- package/tsconfig.build.json +12 -0
- package/tsup.config.ts +11 -7
- package/.turbo/turbo-build.log +0 -24
- package/.turbo/turbo-test.log +0 -47
- package/.turbo/turbo-type-check.log +0 -0
- package/dist/.tsbuildinfo +0 -1
- package/dist/contracts.d.mts +0 -1732
- package/dist/contracts.d.ts +0 -1732
- package/dist/contracts.js +0 -423
- package/dist/contracts.js.map +0 -1
- package/dist/contracts.mjs +0 -365
- package/dist/contracts.mjs.map +0 -1
- package/dist/index.d.mts +0 -3068
- package/dist/index.d.ts +0 -3068
- package/dist/index.js +0 -17834
- package/dist/index.js.map +0 -1
- package/dist/index.mjs +0 -17740
- package/dist/index.mjs.map +0 -1
- package/src/blocks/application/login-forms/login-page-1.tsx +0 -246
- package/src/blocks/application/login-forms/login-page-2.tsx +0 -207
- package/src/blocks/e-commerce/category-filters/category-filter-1.tsx +0 -260
- package/src/blocks/e-commerce/category-filters/category-filter-2-filter-panel.tsx +0 -222
- package/src/blocks/e-commerce/category-filters/category-filter-2.tsx +0 -921
- package/src/blocks/e-commerce/category-filters/category-filter-4-chip-rail.tsx +0 -57
- package/src/blocks/e-commerce/category-filters/category-filter-4-drawer.tsx +0 -124
- package/src/blocks/e-commerce/category-filters/category-filter-4-fields.tsx +0 -170
- package/src/blocks/e-commerce/category-filters/category-filter-4-sidebar.tsx +0 -52
- package/src/blocks/e-commerce/category-filters/category-filter-4-sort-sheet.tsx +0 -57
- package/src/blocks/e-commerce/category-filters/category-filter-4-state.ts +0 -68
- package/src/blocks/e-commerce/category-filters/category-filter-4.tsx +0 -298
- package/src/blocks/e-commerce/checkout-forms/card-formatting.test.ts +0 -47
- package/src/blocks/e-commerce/checkout-forms/card-formatting.ts +0 -9
- package/src/blocks/e-commerce/checkout-forms/checkout-form-1-contact-step.tsx +0 -96
- package/src/blocks/e-commerce/checkout-forms/checkout-form-1-order-summary.tsx +0 -252
- package/src/blocks/e-commerce/checkout-forms/checkout-form-1-payment-step.tsx +0 -188
- package/src/blocks/e-commerce/checkout-forms/checkout-form-1-progress.tsx +0 -36
- package/src/blocks/e-commerce/checkout-forms/checkout-form-1.test.tsx +0 -216
- package/src/blocks/e-commerce/checkout-forms/checkout-form-1.tsx +0 -338
- package/src/blocks/e-commerce/checkout-forms/checkout-form-2-order-summary.tsx +0 -130
- package/src/blocks/e-commerce/checkout-forms/checkout-form-2-payment-card.tsx +0 -175
- package/src/blocks/e-commerce/checkout-forms/checkout-form-2-shipping-card.tsx +0 -190
- package/src/blocks/e-commerce/checkout-forms/checkout-form-2.tsx +0 -312
- package/src/blocks/e-commerce/checkout-forms/checkout-form-3-information-step.tsx +0 -91
- package/src/blocks/e-commerce/checkout-forms/checkout-form-3-order-summary.tsx +0 -110
- package/src/blocks/e-commerce/checkout-forms/checkout-form-3-payment-step.tsx +0 -137
- package/src/blocks/e-commerce/checkout-forms/checkout-form-3-progress.tsx +0 -68
- package/src/blocks/e-commerce/checkout-forms/checkout-form-3-review-step.tsx +0 -79
- package/src/blocks/e-commerce/checkout-forms/checkout-form-3-shipping-step.tsx +0 -172
- package/src/blocks/e-commerce/checkout-forms/checkout-form-3.tsx +0 -392
- package/src/blocks/e-commerce/product-categories/avatar-group.tsx +0 -86
- package/src/blocks/e-commerce/product-categories/product-category-1.tsx +0 -126
- package/src/blocks/e-commerce/product-categories/product-category-2.test.tsx +0 -51
- package/src/blocks/e-commerce/product-categories/product-category-2.tsx +0 -120
- package/src/blocks/e-commerce/product-categories/product-category-4.tsx +0 -129
- package/src/blocks/e-commerce/product-categories/product-category-5.tsx +0 -218
- package/src/blocks/e-commerce/product-list/product-card-1.test.tsx +0 -88
- package/src/blocks/e-commerce/product-list/product-card-1.tsx +0 -192
- package/src/blocks/e-commerce/product-list/product-card-2.tsx +0 -71
- package/src/blocks/e-commerce/product-list/product-card-3-reaction-toggle.tsx +0 -166
- package/src/blocks/e-commerce/product-list/product-card-3.tsx +0 -215
- package/src/blocks/e-commerce/product-list/product-card-5-checkbox-check.tsx +0 -98
- package/src/blocks/e-commerce/product-list/product-card-5-reaction-toggle.tsx +0 -171
- package/src/blocks/e-commerce/product-list/product-card-5.tsx +0 -367
- package/src/blocks/e-commerce/product-overview/product-overview-1.test.tsx +0 -182
- package/src/blocks/e-commerce/product-overview/product-overview-1.tsx +0 -370
- package/src/blocks/e-commerce/product-overview/product-overview-2.tsx +0 -272
- package/src/blocks/e-commerce/product-overview/product-overview-5-gallery.tsx +0 -59
- package/src/blocks/e-commerce/product-overview/product-overview-5.tsx +0 -274
- package/src/blocks/e-commerce/shopping-carts/shopping-cart-1-spinning-counter.tsx +0 -142
- package/src/blocks/e-commerce/shopping-carts/shopping-cart-1.tsx +0 -291
- package/src/blocks/e-commerce/shopping-carts/shopping-cart-2-item-row.tsx +0 -110
- package/src/blocks/e-commerce/shopping-carts/shopping-cart-2-recommendations.tsx +0 -51
- package/src/blocks/e-commerce/shopping-carts/shopping-cart-2-spinning-counter.tsx +0 -146
- package/src/blocks/e-commerce/shopping-carts/shopping-cart-2.tsx +0 -295
- package/src/blocks/e-commerce/shopping-carts/shopping-cart-3-spinning-counter.tsx +0 -142
- package/src/blocks/e-commerce/shopping-carts/shopping-cart-3.tsx +0 -342
- package/src/blocks/e-commerce/shopping-carts/shopping-cart-4-spinning-counter.tsx +0 -146
- package/src/blocks/e-commerce/shopping-carts/shopping-cart-4.test.tsx +0 -229
- package/src/blocks/e-commerce/storefront-hero/storefront-hero-1.test.tsx +0 -72
- package/src/blocks/e-commerce/storefront-hero/storefront-hero-1.tsx +0 -263
- package/src/blocks/e-commerce/storefront-hero/storefront-hero-2.tsx +0 -283
- package/src/blocks/e-commerce/storefront-hero/storefront-hero-5.tsx +0 -318
- package/src/blocks/e-commerce/storefront-hero/storefront-hero-6.tsx +0 -205
- package/src/blocks/marketing/features/feature-1.tsx +0 -97
- package/src/blocks/marketing/features/feature-2.tsx +0 -82
- package/src/blocks/marketing/footers/footer-section-1.test.tsx +0 -117
- package/src/blocks/marketing/footers/footer-section-1.tsx +0 -178
- package/src/blocks/marketing/footers/footer-section-3.tsx +0 -192
- package/src/blocks/marketing/footers/footer-section-4.tsx +0 -355
- package/src/blocks/marketing/navbars/navbar-1.tsx +0 -267
- package/src/blocks/marketing/navbars/navbar-2.tsx +0 -351
- package/src/blocks/marketing/navbars/navbar-3.tsx +0 -303
- package/src/blocks/marketing/navbars/navbar-4-account-menu.test.tsx +0 -38
- package/src/blocks/marketing/navbars/navbar-4-like-button.tsx +0 -177
- package/src/blocks/marketing/navbars/navbar-4-product-grid.tsx +0 -219
- package/src/blocks/marketing/testimonials/testimonial-1.tsx +0 -141
- package/src/blocks/marketing/testimonials/testimonial-2.tsx +0 -108
package/src/index.ts
CHANGED
|
@@ -16,77 +16,93 @@ export {
|
|
|
16
16
|
CardContent,
|
|
17
17
|
} from './ui/card'
|
|
18
18
|
|
|
19
|
-
export { default as
|
|
20
|
-
export { default as
|
|
21
|
-
export { default as Navbar3 } from './blocks/marketing/navbars/navbar-3'
|
|
22
|
-
export { default as Navbar4 } from './blocks/marketing/navbars/navbar-4'
|
|
19
|
+
export { default as Navbar } from './blocks/marketing/navbars/navbar'
|
|
20
|
+
export { default as StorefrontNavbar } from './blocks/e-commerce/navigation/storefront-navbar'
|
|
23
21
|
export { default as Banner1 } from './blocks/marketing/banners/banner-1'
|
|
24
22
|
export { default as HeroSection1 } from './blocks/marketing/hero-sections/hero-section-1'
|
|
25
23
|
export { default as CtaSection1 } from './blocks/marketing/cta/cta-section-1'
|
|
26
|
-
export { default as
|
|
27
|
-
export {
|
|
28
|
-
export { default as Testimonial1 } from './blocks/marketing/testimonials/testimonial-1'
|
|
29
|
-
export { default as Testimonial2 } from './blocks/marketing/testimonials/testimonial-2'
|
|
24
|
+
export { default as Feature } from './blocks/marketing/features/feature'
|
|
25
|
+
export { TestimonialSection } from './blocks/marketing/testimonials/testimonial-section'
|
|
30
26
|
export { default as FaqBlock1 } from './blocks/marketing/faq/faq-block-1'
|
|
31
27
|
export { default as PricingSection1 } from './blocks/marketing/pricing/pricing-section-1'
|
|
32
28
|
export type { CtaSection1Props } from './blocks/marketing/cta/cta-section-1'
|
|
33
29
|
export type { FaqBlock1Props, FaqItem } from './blocks/marketing/faq/faq-block-1'
|
|
34
|
-
export type {
|
|
35
|
-
|
|
30
|
+
export type {
|
|
31
|
+
FeatureProps,
|
|
32
|
+
FeatureItem,
|
|
33
|
+
FeaturePresentation,
|
|
34
|
+
} from './blocks/marketing/features/feature'
|
|
36
35
|
export type { LogoCloud1Props, LogoCloud1Platform } from './blocks/marketing/logo-clouds/logo-cloud-1'
|
|
37
36
|
export type { PricingSection1Props, PricingTier } from './blocks/marketing/pricing/pricing-section-1'
|
|
38
37
|
export type { Statistic1Props, StatisticItem } from './blocks/marketing/statistics/statistic-1'
|
|
39
|
-
export type {
|
|
40
|
-
|
|
38
|
+
export type {
|
|
39
|
+
TestimonialItem,
|
|
40
|
+
TestimonialCarouselLabels,
|
|
41
|
+
TestimonialSectionProps,
|
|
42
|
+
} from './blocks/marketing/testimonials/testimonial-section'
|
|
41
43
|
export { default as Statistic1 } from './blocks/marketing/statistics/statistic-1'
|
|
42
44
|
export { default as LogoCloud1 } from './blocks/marketing/logo-clouds/logo-cloud-1'
|
|
43
|
-
export {
|
|
44
|
-
export { default as FooterSection3 } from './blocks/marketing/footers/footer-section-3'
|
|
45
|
-
export type { FooterSection3Props, FooterLinkColumn, FooterLink, SocialLink } from './blocks/marketing/footers/footer-section-3'
|
|
46
|
-
export { default as FooterSection4 } from './blocks/marketing/footers/footer-section-4'
|
|
45
|
+
export { FooterSection } from './blocks/marketing/footers/footer-section'
|
|
47
46
|
export type {
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
export { default as ProductShowcase1 } from './blocks/e-commerce/product-list/product-showcase-1'
|
|
47
|
+
FooterBrandAccent,
|
|
48
|
+
FooterContact,
|
|
49
|
+
FooterContactItem,
|
|
50
|
+
FooterLink as CanonicalFooterLink,
|
|
51
|
+
FooterLinkBehavior,
|
|
52
|
+
FooterLinkColumn as CanonicalFooterLinkColumn,
|
|
53
|
+
FooterNewsletter,
|
|
54
|
+
FooterPresentation,
|
|
55
|
+
FooterSectionProps,
|
|
56
|
+
FooterSocialLink,
|
|
57
|
+
} from './blocks/marketing/footers/footer-section'
|
|
60
58
|
export type {
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
59
|
+
NavbarFeatured,
|
|
60
|
+
NavbarGroup,
|
|
61
|
+
NavbarIcon,
|
|
62
|
+
NavbarIconMap,
|
|
63
|
+
NavbarItem,
|
|
64
|
+
NavbarLink,
|
|
65
|
+
NavbarPresentation,
|
|
66
|
+
NavbarProps,
|
|
67
|
+
} from './blocks/marketing/navbars/navbar'
|
|
68
|
+
export type { StorefrontNavbarProps } from './blocks/e-commerce/navigation/storefront-navbar'
|
|
69
|
+
export { ProductCard } from './blocks/e-commerce/product-list/product-card'
|
|
70
|
+
export type {
|
|
71
|
+
ProductCardProps,
|
|
72
|
+
ProductCardPresentation,
|
|
73
|
+
} from './blocks/e-commerce/product-list/product-card'
|
|
74
|
+
export { ProductGrid } from './blocks/e-commerce/product-list/product-grid'
|
|
75
|
+
export type { ProductGridProps } from './blocks/e-commerce/product-list/product-grid'
|
|
76
|
+
export { default as ProductShowcase1 } from './blocks/e-commerce/product-list/product-showcase-1'
|
|
64
77
|
export type { ProductShowcase1Props } from './blocks/e-commerce/product-list/product-showcase-1'
|
|
65
|
-
export { default as
|
|
78
|
+
export { default as ProductOverview } from './blocks/e-commerce/product-overview/product-overview'
|
|
66
79
|
export type {
|
|
67
|
-
|
|
68
|
-
|
|
80
|
+
ProductOverviewProps,
|
|
81
|
+
ProductOverviewRating,
|
|
82
|
+
ProductOverviewPresentation,
|
|
83
|
+
ProductOverviewReview,
|
|
69
84
|
ProductDetailProduct,
|
|
70
85
|
ProductDetailVariant,
|
|
71
|
-
} from './blocks/e-commerce/product-overview/product-overview
|
|
72
|
-
export { default as ProductOverview2 } from './blocks/e-commerce/product-overview/product-overview-2'
|
|
73
|
-
export { default as ProductOverview5 } from './blocks/e-commerce/product-overview/product-overview-5'
|
|
74
|
-
export type { ProductOverview2Props, ProductOverview2Product } from './blocks/e-commerce/product-overview/product-overview-2'
|
|
75
|
-
export type { ProductOverview5Props, ProductOverview5Product, ProductOverview5Review } from './blocks/e-commerce/product-overview/product-overview-5'
|
|
86
|
+
} from './blocks/e-commerce/product-overview/product-overview'
|
|
76
87
|
export { default as ProductQuickView } from './blocks/e-commerce/product-overview/product-quick-view'
|
|
77
88
|
export { default as ReviewRating1 } from './blocks/e-commerce/reviews/review-rating-1'
|
|
78
89
|
export type { ReviewRating1Review } from './blocks/e-commerce/reviews/review-rating-1'
|
|
79
90
|
export { default as ReviewRating2 } from './blocks/e-commerce/reviews/review-rating-2'
|
|
80
|
-
export { default as
|
|
91
|
+
export { default as ProductCategory } from './blocks/e-commerce/product-categories/product-category'
|
|
92
|
+
export type {
|
|
93
|
+
ProductCategoryProps,
|
|
94
|
+
ProductCategoryPresentation,
|
|
95
|
+
} from './blocks/e-commerce/product-categories/product-category'
|
|
96
|
+
export { default as CategoryCard } from './blocks/e-commerce/product-categories/category-card'
|
|
81
97
|
export type {
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
} from './blocks/e-commerce/product-categories/product-category-
|
|
86
|
-
export {
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
98
|
+
CategoryCardProps,
|
|
99
|
+
CategoryCardPresentation,
|
|
100
|
+
} from './blocks/e-commerce/product-categories/category-card'
|
|
101
|
+
export { default as CategoryGrid } from './blocks/e-commerce/product-categories/product-category-grid'
|
|
102
|
+
export type {
|
|
103
|
+
CategoryGridProps,
|
|
104
|
+
CategoryGridPresentation,
|
|
105
|
+
} from './blocks/e-commerce/product-categories/product-category-grid'
|
|
90
106
|
export { MegaMenu, megaMenuPropsSchema } from './blocks/e-commerce/navigation/mega-menu'
|
|
91
107
|
export type { MegaMenuProps } from './blocks/e-commerce/navigation/mega-menu'
|
|
92
108
|
export { MobileCategoryDrawer, mobileCategoryDrawerPropsSchema } from './blocks/e-commerce/navigation/mobile-category-drawer'
|
|
@@ -103,72 +119,49 @@ export { MobileBottomNav, mobileBottomNavItemSchema, mobileBottomNavPropsSchema
|
|
|
103
119
|
export type { MobileBottomNavItem, MobileBottomNavProps } from './blocks/e-commerce/navigation/mobile-bottom-nav'
|
|
104
120
|
export { menuItemSchema, collectionItemSchema } from './lib/types/menu'
|
|
105
121
|
export type { MenuItem, CollectionItem } from './lib/types/menu'
|
|
106
|
-
export {
|
|
122
|
+
export { CategoryListing, CategoryListingStatusView, buildFilterChange, reconcileSearchDraft, toggleFilterValue } from './blocks/e-commerce/category-filters/category-listing'
|
|
107
123
|
export type {
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
124
|
+
CategoryListingActiveFilter,
|
|
125
|
+
CategoryListingActiveFilterKind,
|
|
126
|
+
CategoryListingFacetGroup,
|
|
127
|
+
CategoryListingFacetOption,
|
|
128
|
+
CategoryListingFilters,
|
|
129
|
+
CategoryListingOption,
|
|
130
|
+
CategoryListingPresentation,
|
|
131
|
+
CategoryListingPriceRange,
|
|
132
|
+
CategoryListingProps,
|
|
133
|
+
CategoryListingQueryError,
|
|
134
|
+
CategoryListingSortOption,
|
|
135
|
+
CategoryListingStatus,
|
|
136
|
+
CategoryListingStatusViewProps,
|
|
137
|
+
} from './blocks/e-commerce/category-filters/category-listing'
|
|
138
|
+
export { default as ShoppingCart } from './blocks/e-commerce/shopping-carts/shopping-cart'
|
|
114
139
|
export type {
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
CategoryFilter2PriceRange,
|
|
121
|
-
CategoryFilter2SortOption,
|
|
122
|
-
CategoryFilter2Filters,
|
|
123
|
-
CategoryFilter2Status,
|
|
124
|
-
CategoryFilter2StatusViewProps,
|
|
125
|
-
CategoryFilter2QueryError,
|
|
126
|
-
CategoryFilter2ActiveFilter,
|
|
127
|
-
CategoryFilter2ActiveFilterKind,
|
|
128
|
-
} from './blocks/e-commerce/category-filters/category-filter-2'
|
|
129
|
-
export { default as CategoryFilter4 } from './blocks/e-commerce/category-filters/category-filter-4'
|
|
130
|
-
export type { CategoryFilter4Props, CategoryFilter4Product, CategoryFilter4Facets } from './blocks/e-commerce/category-filters/category-filter-4'
|
|
131
|
-
export { default as ShoppingCart1 } from './blocks/e-commerce/shopping-carts/shopping-cart-1'
|
|
132
|
-
export { default as ShoppingCart2 } from './blocks/e-commerce/shopping-carts/shopping-cart-2'
|
|
133
|
-
export { default as ShoppingCart4 } from './blocks/e-commerce/shopping-carts/shopping-cart-4'
|
|
134
|
-
export { default as ShoppingCart3 } from './blocks/e-commerce/shopping-carts/shopping-cart-3'
|
|
135
|
-
export type { ShoppingCart3Props, ShoppingCart3CartItem } from './blocks/e-commerce/shopping-carts/shopping-cart-3'
|
|
136
|
-
export type { ShoppingCart2Props, ShoppingCart2Item } from './blocks/e-commerce/shopping-carts/shopping-cart-2'
|
|
137
|
-
export type { ShoppingCart4Props, ShoppingCart4Item } from './blocks/e-commerce/shopping-carts/shopping-cart-4'
|
|
140
|
+
ShoppingCartProps,
|
|
141
|
+
ShoppingCartPromotion,
|
|
142
|
+
ShoppingCartPresentation,
|
|
143
|
+
ShoppingCartTotalsState,
|
|
144
|
+
} from './blocks/e-commerce/shopping-carts/shopping-cart'
|
|
138
145
|
export { default as StoreContainer1 } from './blocks/e-commerce/store-containers/store-container-1'
|
|
139
146
|
export type { StoreContainer1Props } from './blocks/e-commerce/store-containers/store-container-1'
|
|
140
|
-
export { default as
|
|
141
|
-
export { default as CheckoutForm2 } from './blocks/e-commerce/checkout-forms/checkout-form-2'
|
|
142
|
-
export { default as CheckoutForm3 } from './blocks/e-commerce/checkout-forms/checkout-form-3'
|
|
143
|
-
export { default as CheckoutConfirmation } from './blocks/e-commerce/checkout-forms/checkout-confirmation'
|
|
144
|
-
export type {
|
|
145
|
-
CheckoutForm1Props,
|
|
146
|
-
CheckoutForm1FormData,
|
|
147
|
-
CheckoutForm1FieldErrors,
|
|
148
|
-
CheckoutForm1FieldDescriptions,
|
|
149
|
-
CheckoutForm1ChangeHandler,
|
|
150
|
-
CheckoutForm1OrderSummary,
|
|
151
|
-
CheckoutForm1OrderSummaryItem,
|
|
152
|
-
CheckoutForm1CountryOption,
|
|
153
|
-
CheckoutForm1ShippingOption,
|
|
154
|
-
CheckoutForm1Totals,
|
|
155
|
-
CheckoutForm1TotalsState,
|
|
156
|
-
} from './blocks/e-commerce/checkout-forms/checkout-form-1'
|
|
147
|
+
export { default as Checkout } from './blocks/e-commerce/checkout-forms/checkout'
|
|
157
148
|
export type {
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
149
|
+
CheckoutProps,
|
|
150
|
+
CheckoutValues,
|
|
151
|
+
CheckoutPresentation,
|
|
152
|
+
CheckoutStepId,
|
|
153
|
+
CheckoutLabels,
|
|
154
|
+
CheckoutValuesFieldErrors,
|
|
155
|
+
CheckoutFieldDescriptions,
|
|
156
|
+
CheckoutChangeHandler,
|
|
157
|
+
CheckoutOrderSummary,
|
|
158
|
+
CheckoutOrderLine,
|
|
159
|
+
CheckoutTotals,
|
|
160
|
+
CheckoutTotalsState,
|
|
161
|
+
CheckoutCountryOption,
|
|
162
|
+
CheckoutShippingOption,
|
|
163
|
+
} from './blocks/e-commerce/checkout-forms/checkout'
|
|
164
|
+
export { default as CheckoutConfirmation } from './blocks/e-commerce/checkout-forms/checkout-confirmation'
|
|
172
165
|
export type {
|
|
173
166
|
CheckoutConfirmationProps,
|
|
174
167
|
FulfilmentStage,
|
|
@@ -181,22 +174,24 @@ export type {
|
|
|
181
174
|
export type { CheckoutFieldError, CheckoutFieldErrors } from './blocks/e-commerce/checkout-forms/checkout-form-types'
|
|
182
175
|
export { default as OrderHistory1 } from './blocks/e-commerce/order-history/order-history-1'
|
|
183
176
|
export { default as OrderHistory2 } from './blocks/e-commerce/order-history/order-history-2'
|
|
184
|
-
export { default as
|
|
177
|
+
export { default as StorefrontHero } from './blocks/e-commerce/storefront-hero/storefront-hero'
|
|
185
178
|
export type {
|
|
186
179
|
FeaturedProduct,
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
180
|
+
HeroImage,
|
|
181
|
+
HeroDepartment,
|
|
182
|
+
HeroFeaturedDeal,
|
|
183
|
+
HeroStoreLocator,
|
|
184
|
+
HeroDeal,
|
|
185
|
+
HeroCategory,
|
|
186
|
+
StorefrontHeroPresentation,
|
|
187
|
+
StorefrontHeroProps,
|
|
188
|
+
} from './blocks/e-commerce/storefront-hero/storefront-hero'
|
|
192
189
|
export { default as AppShell1 } from './blocks/application/app-shells/app-shell-1'
|
|
193
|
-
export { default as
|
|
194
|
-
export { default as LoginPage2 } from './blocks/application/login-forms/login-page-2'
|
|
190
|
+
export { default as LoginPage } from './blocks/application/login-forms/login-page'
|
|
195
191
|
export { default as SignUpPage1 } from './blocks/application/signup-forms/signup-page-1'
|
|
196
192
|
export { default as ForgotPasswordPage1 } from './blocks/application/password-recovery/forgot-password-page-1'
|
|
197
193
|
export { default as Verify1 } from './blocks/application/verification/verify-1'
|
|
198
|
-
export type {
|
|
199
|
-
export type { LoginPage2Props, LoginPage2SocialButton } from './blocks/application/login-forms/login-page-2'
|
|
194
|
+
export type { LoginPageProps, LoginPageFormData, LoginPageProvider } from './blocks/application/login-forms/login-page'
|
|
200
195
|
export type { SignUpPage1Props, SignUpPage1Data, SignUpPage1SocialButton } from './blocks/application/signup-forms/signup-page-1'
|
|
201
196
|
export type { ForgotPasswordPage1Props } from './blocks/application/password-recovery/forgot-password-page-1'
|
|
202
197
|
export type { Verify1Props } from './blocks/application/verification/verify-1'
|
|
@@ -215,14 +210,25 @@ export {
|
|
|
215
210
|
cartTotalsSchema,
|
|
216
211
|
productDetailProductSchema,
|
|
217
212
|
productDetailVariantSchema,
|
|
218
|
-
|
|
213
|
+
productOverviewPropsSchema,
|
|
214
|
+
storefrontHeroPropsSchema,
|
|
215
|
+
storefrontHeroProductSchema,
|
|
219
216
|
buttonPropsSchema,
|
|
220
217
|
storeContainer1PropsSchema,
|
|
221
|
-
|
|
218
|
+
productCardPropsSchema,
|
|
219
|
+
productGridPropsSchema,
|
|
222
220
|
productPresentationSchema,
|
|
223
221
|
productShowcase1PropsSchema,
|
|
224
|
-
|
|
225
|
-
|
|
222
|
+
shoppingCartPropsSchema,
|
|
223
|
+
shoppingCartItemSchema,
|
|
224
|
+
shoppingCartSuggestionSchema,
|
|
225
|
+
navbarPresentationSchema,
|
|
226
|
+
navbarItemSchema,
|
|
227
|
+
navbarGroupSchema,
|
|
228
|
+
navbarLinkSchema,
|
|
229
|
+
navbarFeaturedSchema,
|
|
230
|
+
navbarPropsSchema,
|
|
231
|
+
storefrontNavbarPropsSchema,
|
|
226
232
|
paymentMethodSchema,
|
|
227
233
|
cardProductSchema,
|
|
228
234
|
cartItemSchema,
|
|
@@ -232,19 +238,34 @@ export {
|
|
|
232
238
|
navCartItemSchema,
|
|
233
239
|
storeUserSchema,
|
|
234
240
|
accountMenuItemSchema,
|
|
241
|
+
featurePropsSchema,
|
|
242
|
+
featureCardsSpecSchema,
|
|
243
|
+
featureSplitSpecSchema,
|
|
244
|
+
productCategoryItemSchema,
|
|
245
|
+
productCategoryPropsSchema,
|
|
235
246
|
} from './lib/contracts'
|
|
236
247
|
export type {
|
|
237
248
|
ProductDetailProductSpec,
|
|
238
249
|
ProductDetailVariantSpec,
|
|
239
|
-
|
|
250
|
+
StorefrontHeroProduct,
|
|
251
|
+
StorefrontHeroSpecProps,
|
|
240
252
|
CartTotals,
|
|
241
253
|
ButtonSpecProps,
|
|
242
254
|
StoreContainer1SpecProps,
|
|
243
|
-
|
|
255
|
+
ProductCardSpecProps,
|
|
256
|
+
ProductGridSpecProps,
|
|
244
257
|
ProductPresentation,
|
|
245
258
|
ProductShowcase1SpecProps,
|
|
246
|
-
|
|
247
|
-
|
|
259
|
+
ShoppingCartItem,
|
|
260
|
+
ShoppingCartSuggestion,
|
|
261
|
+
ShoppingCartSpecProps,
|
|
262
|
+
NavbarPresentationSpec,
|
|
263
|
+
NavbarItemSpec,
|
|
264
|
+
NavbarGroupSpec,
|
|
265
|
+
NavbarLinkSpec,
|
|
266
|
+
NavbarFeaturedSpec,
|
|
267
|
+
NavbarSpecProps,
|
|
268
|
+
StorefrontNavbarSpecProps,
|
|
248
269
|
CardProduct,
|
|
249
270
|
CartItem,
|
|
250
271
|
Promotion,
|
|
@@ -253,4 +274,11 @@ export type {
|
|
|
253
274
|
NavCartItem,
|
|
254
275
|
StoreUser,
|
|
255
276
|
AccountMenuItem,
|
|
256
|
-
|
|
277
|
+
FeatureSpecProps,
|
|
278
|
+
FeatureCardsSpecProps,
|
|
279
|
+
FeatureSplitSpecProps,
|
|
280
|
+
ProductCategoryItem,
|
|
281
|
+
ProductCategorySpecProps,
|
|
282
|
+
CategoryCardSpecProps,
|
|
283
|
+
CategoryGridSpecProps,
|
|
284
|
+
} from './lib/contracts'
|
|
@@ -10,9 +10,9 @@ import {
|
|
|
10
10
|
logoAccentSchema,
|
|
11
11
|
moneySchema,
|
|
12
12
|
navCartItemSchema,
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
13
|
+
storefrontNavbarPropsSchema,
|
|
14
|
+
productOverviewPropsSchema,
|
|
15
|
+
shoppingCartPropsSchema,
|
|
16
16
|
} from './contracts'
|
|
17
17
|
|
|
18
18
|
const product = {
|
|
@@ -55,13 +55,13 @@ describe('moneySchema', () => {
|
|
|
55
55
|
})
|
|
56
56
|
})
|
|
57
57
|
|
|
58
|
-
describe('
|
|
58
|
+
describe('productOverviewPropsSchema', () => {
|
|
59
59
|
it('accepts a product whose variant price is omitted or null (unavailable)', () => {
|
|
60
|
-
expect(
|
|
60
|
+
expect(productOverviewPropsSchema.safeParse({ product }).success).toBe(true)
|
|
61
61
|
})
|
|
62
62
|
|
|
63
63
|
it('accepts an explicit controlled selected variant id', () => {
|
|
64
|
-
expect(
|
|
64
|
+
expect(productOverviewPropsSchema.safeParse({ product, selectedVariantId: 'v1' }).success).toBe(true)
|
|
65
65
|
})
|
|
66
66
|
|
|
67
67
|
it('rejects a variant missing selectedOptions', () => {
|
|
@@ -69,7 +69,7 @@ describe('productOverview1PropsSchema', () => {
|
|
|
69
69
|
...product,
|
|
70
70
|
variants: [{ id: 'v1', title: 'x', availableForSale: true, price: null }],
|
|
71
71
|
}
|
|
72
|
-
expect(
|
|
72
|
+
expect(productOverviewPropsSchema.safeParse({ product: bad }).success).toBe(false)
|
|
73
73
|
})
|
|
74
74
|
})
|
|
75
75
|
|
|
@@ -113,12 +113,12 @@ describe('optional brand seams — present, omitted, invalid', () => {
|
|
|
113
113
|
utilityLinks: [],
|
|
114
114
|
logoText: 'ElectroCuba',
|
|
115
115
|
}
|
|
116
|
-
const parsed =
|
|
116
|
+
const parsed = storefrontNavbarPropsSchema.parse(base)
|
|
117
117
|
expect(parsed.logoAccent).toBeUndefined()
|
|
118
118
|
})
|
|
119
119
|
|
|
120
120
|
it('accepts navbar props with the accent present', () => {
|
|
121
|
-
const parsed =
|
|
121
|
+
const parsed = storefrontNavbarPropsSchema.parse({
|
|
122
122
|
storeCategories: [],
|
|
123
123
|
shippingNote: 'Catálogo en línea',
|
|
124
124
|
utilityLinks: [],
|
|
@@ -135,8 +135,8 @@ describe('optional brand seams — present, omitted, invalid', () => {
|
|
|
135
135
|
utilityLinks: [],
|
|
136
136
|
logoText: 'My Shop',
|
|
137
137
|
}
|
|
138
|
-
expect(
|
|
139
|
-
expect(
|
|
138
|
+
expect(storefrontNavbarPropsSchema.parse(base).className).toBeUndefined()
|
|
139
|
+
expect(storefrontNavbarPropsSchema.parse({ ...base, className: 'bg-brand-nav text-brand-nav-foreground' }).className).toBe(
|
|
140
140
|
'bg-brand-nav text-brand-nav-foreground',
|
|
141
141
|
)
|
|
142
142
|
})
|
|
@@ -147,24 +147,6 @@ describe('optional brand seams — present, omitted, invalid', () => {
|
|
|
147
147
|
})
|
|
148
148
|
})
|
|
149
149
|
|
|
150
|
-
describe('shoppingCart4PropsSchema — authoritative totals', () => {
|
|
151
|
-
it('accepts backend totals and a controlled totals state', () => {
|
|
152
|
-
const result = shoppingCart4PropsSchema.safeParse({
|
|
153
|
-
items: [],
|
|
154
|
-
totals: {
|
|
155
|
-
subtotal: { amount: '0', currencyCode: 'USD' },
|
|
156
|
-
total: { amount: '0', currencyCode: 'USD' },
|
|
157
|
-
},
|
|
158
|
-
totalsState: 'idle',
|
|
159
|
-
})
|
|
160
|
-
expect(result.success).toBe(true)
|
|
161
|
-
})
|
|
162
|
-
|
|
163
|
-
it('rejects an unknown totals state', () => {
|
|
164
|
-
expect(shoppingCart4PropsSchema.safeParse({ items: [], totalsState: 'loading' }).success).toBe(false)
|
|
165
|
-
})
|
|
166
|
-
})
|
|
167
|
-
|
|
168
150
|
describe('faqBlock1PropsSchema / ctaSection1PropsSchema — bounded editorial sections', () => {
|
|
169
151
|
const faqItem = { value: 'q1', question: '¿Envían a todo el país?', answer: 'Sí.' }
|
|
170
152
|
|
|
@@ -205,3 +187,39 @@ describe('faqBlock1PropsSchema / ctaSection1PropsSchema — bounded editorial se
|
|
|
205
187
|
expect('onPrimaryClick' in parsed).toBe(false)
|
|
206
188
|
})
|
|
207
189
|
})
|
|
190
|
+
|
|
191
|
+
describe('shoppingCartPropsSchema — canonical Money-only cart lines', () => {
|
|
192
|
+
const money = { amount: '22.22', currencyCode: 'USD' }
|
|
193
|
+
|
|
194
|
+
it('accepts a canonical Money line keyed by backend line id', () => {
|
|
195
|
+
const result = shoppingCartPropsSchema.safeParse({
|
|
196
|
+
items: [{ id: 'line_1', name: 'Teclado', quantity: 2, unitPrice: money, lineTotal: money }],
|
|
197
|
+
totals: { subtotal: money, total: money },
|
|
198
|
+
totalsState: 'idle',
|
|
199
|
+
})
|
|
200
|
+
expect(result.success).toBe(true)
|
|
201
|
+
})
|
|
202
|
+
|
|
203
|
+
it('rejects a legacy numeric-price line without canonical Money', () => {
|
|
204
|
+
const result = shoppingCartPropsSchema.safeParse({
|
|
205
|
+
items: [{ id: 'line_1', name: 'Teclado', price: 10, quantity: 2 }],
|
|
206
|
+
})
|
|
207
|
+
expect(result.success).toBe(false)
|
|
208
|
+
})
|
|
209
|
+
|
|
210
|
+
it('rejects an unknown totals state', () => {
|
|
211
|
+
const result = shoppingCartPropsSchema.safeParse({
|
|
212
|
+
items: [],
|
|
213
|
+
totalsState: 'loading',
|
|
214
|
+
})
|
|
215
|
+
expect(result.success).toBe(false)
|
|
216
|
+
})
|
|
217
|
+
|
|
218
|
+
it('omits an absent suggestion image and price honestly', () => {
|
|
219
|
+
const result = shoppingCartPropsSchema.safeParse({
|
|
220
|
+
items: [{ id: 'line_1', name: 'x', quantity: 1, unitPrice: money, lineTotal: money }],
|
|
221
|
+
recentlyViewed: [{ id: 'p1', name: 'Mouse' }],
|
|
222
|
+
})
|
|
223
|
+
expect(result.success).toBe(true)
|
|
224
|
+
})
|
|
225
|
+
})
|