@thorprovider/blocks 0.1.2 → 0.1.3
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/.turbo/turbo-build.log +15 -15
- package/.turbo/turbo-test.log +37 -27
- package/README.md +42 -1
- package/dist/.tsbuildinfo +1 -1
- package/dist/contracts.d.mts +162 -14
- package/dist/contracts.d.ts +162 -14
- package/dist/contracts.js +36 -3
- package/dist/contracts.js.map +1 -1
- package/dist/contracts.mjs +34 -3
- package/dist/contracts.mjs.map +1 -1
- package/dist/index.d.mts +294 -12
- package/dist/index.d.ts +294 -12
- package/dist/index.js +3577 -2882
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +3431 -2750
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
- package/src/blocks/e-commerce/navigation/back-to-top.test.tsx +27 -0
- package/src/blocks/e-commerce/navigation/back-to-top.tsx +71 -0
- package/src/blocks/e-commerce/navigation/breadcrumb.test.tsx +174 -0
- package/src/blocks/e-commerce/navigation/breadcrumb.tsx +130 -0
- package/src/blocks/e-commerce/navigation/mobile-bottom-nav.test.tsx +74 -0
- package/src/blocks/e-commerce/navigation/mobile-bottom-nav.tsx +78 -0
- package/src/blocks/e-commerce/navigation/skip-to-content.test.tsx +35 -0
- package/src/blocks/e-commerce/navigation/skip-to-content.tsx +37 -0
- package/src/blocks/e-commerce/product-list/product-card-1.test.tsx +88 -0
- package/src/blocks/e-commerce/product-list/product-card-1.tsx +141 -80
- package/src/blocks/e-commerce/product-list/product-showcase-1.test.tsx +78 -0
- package/src/blocks/e-commerce/product-list/product-showcase-1.tsx +277 -0
- package/src/blocks/e-commerce/shopping-carts/shopping-cart-4.test.tsx +92 -0
- package/src/blocks/e-commerce/shopping-carts/shopping-cart-4.tsx +86 -25
- package/src/blocks/e-commerce/storefront-hero/storefront-hero-1.test.tsx +7 -0
- package/src/blocks/e-commerce/storefront-hero/storefront-hero-1.tsx +1 -1
- package/src/blocks/marketing/navbars/navbar-4-account-menu.test.tsx +38 -0
- package/src/blocks/marketing/navbars/navbar-4-account-menu.tsx +30 -14
- package/src/blocks/marketing/navbars/navbar-4-cart-sheet.test.tsx +150 -0
- package/src/blocks/marketing/navbars/navbar-4-cart-sheet.tsx +102 -9
- package/src/blocks/marketing/navbars/navbar-4.test.tsx +121 -0
- package/src/blocks/marketing/navbars/navbar-4.tsx +134 -32
- package/src/index.ts +18 -0
- package/src/lib/contracts.ts +53 -3
package/dist/index.d.ts
CHANGED
|
@@ -6,8 +6,8 @@ import { VariantProps } from 'class-variance-authority';
|
|
|
6
6
|
import { Avatar as Avatar$1 } from 'radix-ui';
|
|
7
7
|
import { LucideIcon } from 'lucide-react';
|
|
8
8
|
import { Money, ProductOption, SelectedOption, Image, PaymentMethod } from '@thorprovider/types';
|
|
9
|
-
import { StoreCategory } from './contracts.js';
|
|
10
|
-
export { AccountMenuItem, ButtonSpecProps, CanonMoney, CanonProduct, CardProduct, CartItem, CartTotals, NavCartItem, Navbar4SpecProps, PRODUCT_IMAGE_FALLBACK, ProductCard1SpecProps, ProductDetailProductSpec, ProductDetailVariantSpec, ProductOverview1SpecProps, Promotion, ShoppingCart4SpecProps, StoreContainer1SpecProps, StoreUser, UtilityLink, accountMenuItemSchema, buttonPropsSchema, cardProductSchema, cartItemSchema, cartTotalsSchema, formatMoney, isAvailableMoney, isCompleteFiniteDecimal, moneySchema, navCartItemSchema, navbar4PropsSchema, paymentMethodSchema, productCard1PropsSchema, productDetailProductSchema, productDetailVariantSchema, productOverview1PropsSchema, promotionSchema, resolveAbsoluteQuantity, shoppingCart4PropsSchema, storeCategorySchema, storeContainer1PropsSchema, storeUserSchema, utilityLinkSchema } from './contracts.js';
|
|
9
|
+
import { StoreCategory, ProductPresentation } from './contracts.js';
|
|
10
|
+
export { AccountMenuItem, ButtonSpecProps, CanonMoney, CanonProduct, CardProduct, CartItem, CartTotals, NavCartItem, Navbar4SpecProps, PRODUCT_IMAGE_FALLBACK, ProductCard1SpecProps, ProductDetailProductSpec, ProductDetailVariantSpec, ProductOverview1SpecProps, ProductShowcase1SpecProps, Promotion, ShoppingCart4SpecProps, StoreContainer1SpecProps, StoreUser, UtilityLink, accountMenuItemSchema, buttonPropsSchema, cardProductSchema, cartItemSchema, cartTotalsSchema, formatMoney, isAvailableMoney, isCompleteFiniteDecimal, moneySchema, navCartItemSchema, navbar4PropsSchema, paymentMethodSchema, productCard1PropsSchema, productDetailProductSchema, productDetailVariantSchema, productOverview1PropsSchema, productPresentationSchema, productShowcase1PropsSchema, promotionSchema, resolveAbsoluteQuantity, shoppingCart4PropsSchema, storeCategorySchema, storeContainer1PropsSchema, storeUserSchema, utilityLinkSchema } from './contracts.js';
|
|
11
11
|
import { z } from 'zod';
|
|
12
12
|
|
|
13
13
|
/**
|
|
@@ -140,7 +140,7 @@ declare function Navbar3({ navLinks, logoText, logoHref, currentPath, signIn, ct
|
|
|
140
140
|
interface StoreUser {
|
|
141
141
|
name: string;
|
|
142
142
|
email: string;
|
|
143
|
-
avatar
|
|
143
|
+
avatar?: string;
|
|
144
144
|
initials: string;
|
|
145
145
|
}
|
|
146
146
|
interface AccountMenuItem {
|
|
@@ -159,7 +159,14 @@ interface CartItem {
|
|
|
159
159
|
qty: number;
|
|
160
160
|
/** Optional; an absent image is omitted rather than serialized as `""`. */
|
|
161
161
|
image?: string;
|
|
162
|
+
/**
|
|
163
|
+
* Canonical backend line amount. Required for truthful rendering in
|
|
164
|
+
* `canonical` mode; when absent/invalid the line shows the unavailable
|
|
165
|
+
* label rather than a numeric fallback.
|
|
166
|
+
*/
|
|
167
|
+
lineTotal?: Money;
|
|
162
168
|
}
|
|
169
|
+
type CartSheetState = 'idle' | 'pending' | 'error';
|
|
163
170
|
|
|
164
171
|
interface UtilityLink {
|
|
165
172
|
label: string;
|
|
@@ -174,7 +181,12 @@ interface LogoAccent {
|
|
|
174
181
|
}
|
|
175
182
|
interface Navbar4Props {
|
|
176
183
|
storeCategories: StoreCategory[];
|
|
177
|
-
|
|
184
|
+
/**
|
|
185
|
+
* Optional note shown in the desktop utility strip. When omitted (or empty)
|
|
186
|
+
* and there are no `utilityLinks`, the strip is not rendered at all, so a
|
|
187
|
+
* block with no optional content paints no empty decorative chrome.
|
|
188
|
+
*/
|
|
189
|
+
shippingNote?: string;
|
|
178
190
|
utilityLinks: UtilityLink[];
|
|
179
191
|
logoText: string;
|
|
180
192
|
logoHref?: string;
|
|
@@ -184,7 +196,7 @@ interface Navbar4Props {
|
|
|
184
196
|
* `logoText`, the wordmark renders unchanged.
|
|
185
197
|
*/
|
|
186
198
|
logoAccent?: LogoAccent;
|
|
187
|
-
/**
|
|
199
|
+
/** Account destination for anonymous shoppers on every viewport. */
|
|
188
200
|
accountHref?: string;
|
|
189
201
|
/**
|
|
190
202
|
* When `false`, no search control is rendered at all — neither the desktop
|
|
@@ -193,6 +205,11 @@ interface Navbar4Props {
|
|
|
193
205
|
* storefront passes `false` while no verified global search contract exists
|
|
194
206
|
* (E2 task 5.4), so no global search is presented as working.
|
|
195
207
|
*/
|
|
208
|
+
/**
|
|
209
|
+
* The storefront's current route path. When it matches a destination the link
|
|
210
|
+
* is marked as the current page (accessibly, beyond color alone).
|
|
211
|
+
*/
|
|
212
|
+
currentPath?: string;
|
|
196
213
|
showSearch?: boolean;
|
|
197
214
|
searchQuery?: string;
|
|
198
215
|
onSearchChange?: (value: string) => void;
|
|
@@ -215,8 +232,40 @@ interface Navbar4Props {
|
|
|
215
232
|
accountMenuItems?: AccountMenuItem[];
|
|
216
233
|
onHelp?: () => void;
|
|
217
234
|
onSignOut?: () => void;
|
|
235
|
+
accountPending?: boolean;
|
|
236
|
+
accountUnavailable?: boolean;
|
|
237
|
+
onAccountRetry?: () => void;
|
|
218
238
|
onCheckout?: () => void;
|
|
219
239
|
onViewCart?: () => void;
|
|
240
|
+
/**
|
|
241
|
+
* Controlled visibility for the cart sheet. When provided, the sheet opens
|
|
242
|
+
* and closes from this value and `onCartOpenChange` instead of internal
|
|
243
|
+
* state, so a host can share one cart surface across the navbar trigger and
|
|
244
|
+
* successful add-to-cart. Omit both to keep the legacy uncontrolled sheet.
|
|
245
|
+
*/
|
|
246
|
+
cartOpen?: boolean;
|
|
247
|
+
/** Change handler paired with `cartOpen` for a controlled sheet. */
|
|
248
|
+
onCartOpenChange?: (open: boolean) => void;
|
|
249
|
+
/**
|
|
250
|
+
* Backend-authoritative cart rendering for the sheet. When `true`, line
|
|
251
|
+
* amounts use each item's canonical `lineTotal` Money and never fall back to
|
|
252
|
+
* numeric `price * qty`. Omit for the legacy numeric rendering.
|
|
253
|
+
*/
|
|
254
|
+
canonicalCart?: boolean;
|
|
255
|
+
/** Cart read/mutation lifecycle for the sheet. */
|
|
256
|
+
cartState?: CartSheetState;
|
|
257
|
+
/** Message shown when `cartState` is `error`. */
|
|
258
|
+
cartErrorLabel?: string;
|
|
259
|
+
/** Recovery action label for the error state. */
|
|
260
|
+
cartRetryLabel?: string;
|
|
261
|
+
/** Recovery action invoked from the error state. */
|
|
262
|
+
onCartRetry?: () => void;
|
|
263
|
+
/** When `true`, the sheet's checkout action is suppressed (checkout not installed). */
|
|
264
|
+
checkoutUnavailable?: boolean;
|
|
265
|
+
/** When `true`, the sheet's checkout action is disabled (cart not ready). */
|
|
266
|
+
checkoutDisabled?: boolean;
|
|
267
|
+
/** When `true`, the sheet's review action is suppressed (cart view not installed). */
|
|
268
|
+
viewCartUnavailable?: boolean;
|
|
220
269
|
/**
|
|
221
270
|
* Consumer-supplied classes merged onto the outer `<header>` as the final
|
|
222
271
|
* argument, so a semantic surface such as `bg-brand-nav
|
|
@@ -225,7 +274,7 @@ interface Navbar4Props {
|
|
|
225
274
|
*/
|
|
226
275
|
className?: string;
|
|
227
276
|
}
|
|
228
|
-
declare function Navbar4({ storeCategories, shippingNote, utilityLinks, logoText, logoHref, logoAccent, accountHref, showSearch, searchQuery: searchQueryProp, onSearchChange, items: itemsProp, onQtyChange: onQtyChangeProp, onRemove: onRemoveProp, subtotal, subtotalUnavailableLabel, formatMoney, user, accountMenuItems, onHelp, onSignOut, onCheckout, onViewCart, className, }: Navbar4Props): react.JSX.Element;
|
|
277
|
+
declare function Navbar4({ storeCategories, shippingNote, utilityLinks, logoText, logoHref, logoAccent, accountHref, currentPath, showSearch, searchQuery: searchQueryProp, onSearchChange, items: itemsProp, onQtyChange: onQtyChangeProp, onRemove: onRemoveProp, subtotal, subtotalUnavailableLabel, formatMoney, user, accountMenuItems, onHelp, onSignOut, accountPending, accountUnavailable, onAccountRetry, onCheckout, onViewCart, cartOpen, onCartOpenChange, canonicalCart, cartState, cartErrorLabel, cartRetryLabel, onCartRetry, checkoutUnavailable, checkoutDisabled, viewCartUnavailable, className, }: Navbar4Props): react.JSX.Element;
|
|
229
278
|
|
|
230
279
|
type Banner1Shape = 'bar' | 'pill';
|
|
231
280
|
interface Banner1Props {
|
|
@@ -567,15 +616,24 @@ interface Product {
|
|
|
567
616
|
image: string;
|
|
568
617
|
badge?: string;
|
|
569
618
|
}
|
|
619
|
+
/**
|
|
620
|
+
* A card entry is either the legacy numeric-price product or the canonical
|
|
621
|
+
* `Money`-price presentation. The block renders both without breaking legacy
|
|
622
|
+
* consumers: a numeric `price` keeps the legacy `$` output unchanged, while a
|
|
623
|
+
* canonical `Money` price is formatted in its own currency and locale.
|
|
624
|
+
*/
|
|
625
|
+
type ProductCard1Product = Product | ProductPresentation;
|
|
570
626
|
interface ProductCard1Props {
|
|
571
|
-
products:
|
|
627
|
+
products: ProductCard1Product[];
|
|
572
628
|
heading?: string;
|
|
573
629
|
maxItems?: number;
|
|
574
|
-
onAddToCart?: (product:
|
|
575
|
-
onProductClick?: (product:
|
|
630
|
+
onAddToCart?: (product: ProductCard1Product) => void;
|
|
631
|
+
onProductClick?: (product: ProductCard1Product) => void;
|
|
576
632
|
addToCartLabel?: string;
|
|
633
|
+
/** Shown when a canonical price is present but unavailable (never `$0`). */
|
|
634
|
+
unavailablePriceLabel?: string;
|
|
577
635
|
}
|
|
578
|
-
declare function ProductCard1({ products, heading, maxItems, onAddToCart, onProductClick, addToCartLabel, }: ProductCard1Props): react.JSX.Element;
|
|
636
|
+
declare function ProductCard1({ products, heading, maxItems, onAddToCart, onProductClick, addToCartLabel, unavailablePriceLabel, }: ProductCard1Props): react.JSX.Element;
|
|
579
637
|
|
|
580
638
|
interface ProductCard2Product {
|
|
581
639
|
id: string | number;
|
|
@@ -638,6 +696,34 @@ interface ProductCard5Props {
|
|
|
638
696
|
}
|
|
639
697
|
declare function ProductCard5({ products, onToggleWishlist, onAddToCart, onQuickView, onCompare, onExport, }: ProductCard5Props): react.JSX.Element;
|
|
640
698
|
|
|
699
|
+
interface ProductShowcase1Props {
|
|
700
|
+
products: ProductPresentation[];
|
|
701
|
+
heading?: string;
|
|
702
|
+
description?: string;
|
|
703
|
+
pageSize?: number;
|
|
704
|
+
prevLabel?: string;
|
|
705
|
+
nextLabel?: string;
|
|
706
|
+
/** Label for the current-page status, e.g. "Página". */
|
|
707
|
+
pageLabel?: string;
|
|
708
|
+
unavailablePriceLabel?: string;
|
|
709
|
+
emptyLabel?: string;
|
|
710
|
+
addToCartLabel?: string;
|
|
711
|
+
onAddToCart?: (product: ProductPresentation) => void;
|
|
712
|
+
onProductClick?: (product: ProductPresentation) => void;
|
|
713
|
+
}
|
|
714
|
+
/**
|
|
715
|
+
* Combined grid-and-carousel product presentation: fixed-size grid pages
|
|
716
|
+
* navigated manually (prev/next) with a visible current-page indication. There
|
|
717
|
+
* is no autoplay, no auto-advance, and no infinite loop. Controls are real
|
|
718
|
+
* buttons (keyboard operable and visible at every breakpoint); touch swipe is an
|
|
719
|
+
* addition, never the only way to navigate. Below-fold images are lazy.
|
|
720
|
+
*
|
|
721
|
+
* Data access lives in the host: this block only renders the props it receives
|
|
722
|
+
* and reports interactions through callbacks (no backend/router/measurement
|
|
723
|
+
* imports).
|
|
724
|
+
*/
|
|
725
|
+
declare function ProductShowcase1({ products, heading, description, pageSize, prevLabel, nextLabel, pageLabel, unavailablePriceLabel, emptyLabel, addToCartLabel, onAddToCart, onProductClick, }: ProductShowcase1Props): react.JSX.Element;
|
|
726
|
+
|
|
641
727
|
/**
|
|
642
728
|
* Canonical product-detail projection.
|
|
643
729
|
*
|
|
@@ -1314,6 +1400,187 @@ type CategoryIconProps = z.infer<typeof categoryIconPropsSchema>;
|
|
|
1314
1400
|
*/
|
|
1315
1401
|
declare function CategoryIcon({ name, className }: CategoryIconProps): react.JSX.Element | null;
|
|
1316
1402
|
|
|
1403
|
+
declare const breadcrumbItemSchema: z.ZodObject<{
|
|
1404
|
+
label: z.ZodString;
|
|
1405
|
+
href: z.ZodOptional<z.ZodString>;
|
|
1406
|
+
}, "strip", z.ZodTypeAny, {
|
|
1407
|
+
label: string;
|
|
1408
|
+
href?: string | undefined;
|
|
1409
|
+
}, {
|
|
1410
|
+
label: string;
|
|
1411
|
+
href?: string | undefined;
|
|
1412
|
+
}>;
|
|
1413
|
+
type BreadcrumbItemData = z.infer<typeof breadcrumbItemSchema>;
|
|
1414
|
+
declare const breadcrumbPropsSchema: z.ZodObject<{
|
|
1415
|
+
items: z.ZodArray<z.ZodObject<{
|
|
1416
|
+
label: z.ZodString;
|
|
1417
|
+
href: z.ZodOptional<z.ZodString>;
|
|
1418
|
+
}, "strip", z.ZodTypeAny, {
|
|
1419
|
+
label: string;
|
|
1420
|
+
href?: string | undefined;
|
|
1421
|
+
}, {
|
|
1422
|
+
label: string;
|
|
1423
|
+
href?: string | undefined;
|
|
1424
|
+
}>, "many">;
|
|
1425
|
+
maxItems: z.ZodOptional<z.ZodNumber>;
|
|
1426
|
+
ariaLabel: z.ZodOptional<z.ZodString>;
|
|
1427
|
+
backLabel: z.ZodOptional<z.ZodString>;
|
|
1428
|
+
className: z.ZodOptional<z.ZodString>;
|
|
1429
|
+
}, "strip", z.ZodTypeAny, {
|
|
1430
|
+
items: {
|
|
1431
|
+
label: string;
|
|
1432
|
+
href?: string | undefined;
|
|
1433
|
+
}[];
|
|
1434
|
+
className?: string | undefined;
|
|
1435
|
+
maxItems?: number | undefined;
|
|
1436
|
+
ariaLabel?: string | undefined;
|
|
1437
|
+
backLabel?: string | undefined;
|
|
1438
|
+
}, {
|
|
1439
|
+
items: {
|
|
1440
|
+
label: string;
|
|
1441
|
+
href?: string | undefined;
|
|
1442
|
+
}[];
|
|
1443
|
+
className?: string | undefined;
|
|
1444
|
+
maxItems?: number | undefined;
|
|
1445
|
+
ariaLabel?: string | undefined;
|
|
1446
|
+
backLabel?: string | undefined;
|
|
1447
|
+
}>;
|
|
1448
|
+
type BreadcrumbProps = z.infer<typeof breadcrumbPropsSchema>;
|
|
1449
|
+
/**
|
|
1450
|
+
* Breadcrumb trail for a real navigation path (Home → … → current).
|
|
1451
|
+
*
|
|
1452
|
+
* Framework-agnostic and prop-driven: plain anchors (no router) and the shared
|
|
1453
|
+
* shadcn breadcrumb primitives. The last item is the current page and is never
|
|
1454
|
+
* a link (`aria-current="page"`); earlier items link only when an `href` is
|
|
1455
|
+
* given. Long labels truncate, and trails longer than `maxItems` collapse the
|
|
1456
|
+
* intermediate levels behind an ellipsis. On mobile the full list is replaced
|
|
1457
|
+
* by a single back link to the parent, so a wide trail never overflows.
|
|
1458
|
+
*
|
|
1459
|
+
* Renders nothing when there are no labelled items.
|
|
1460
|
+
*/
|
|
1461
|
+
declare function Breadcrumb({ items, maxItems, ariaLabel, backLabel, className, }: BreadcrumbProps): react.JSX.Element | null;
|
|
1462
|
+
|
|
1463
|
+
declare const skipToContentPropsSchema: z.ZodObject<{
|
|
1464
|
+
targetId: z.ZodString;
|
|
1465
|
+
label: z.ZodOptional<z.ZodString>;
|
|
1466
|
+
className: z.ZodOptional<z.ZodString>;
|
|
1467
|
+
}, "strip", z.ZodTypeAny, {
|
|
1468
|
+
targetId: string;
|
|
1469
|
+
label?: string | undefined;
|
|
1470
|
+
className?: string | undefined;
|
|
1471
|
+
}, {
|
|
1472
|
+
targetId: string;
|
|
1473
|
+
label?: string | undefined;
|
|
1474
|
+
className?: string | undefined;
|
|
1475
|
+
}>;
|
|
1476
|
+
type SkipToContentProps = z.infer<typeof skipToContentPropsSchema>;
|
|
1477
|
+
/**
|
|
1478
|
+
* Skip-to-content link (WCAG 2.4.1 Bypass Blocks).
|
|
1479
|
+
*
|
|
1480
|
+
* Framework-agnostic and prop-driven: a plain anchor to the main content id,
|
|
1481
|
+
* visually hidden until it receives focus, then pinned at the top-left with
|
|
1482
|
+
* visible contrast. The target element is responsible for carrying the id (and
|
|
1483
|
+
* being focusable); this block only renders the bypass affordance.
|
|
1484
|
+
*/
|
|
1485
|
+
declare function SkipToContent({ targetId, label, className, }: SkipToContentProps): react.JSX.Element;
|
|
1486
|
+
|
|
1487
|
+
declare const backToTopPropsSchema: z.ZodObject<{
|
|
1488
|
+
threshold: z.ZodOptional<z.ZodNumber>;
|
|
1489
|
+
label: z.ZodOptional<z.ZodString>;
|
|
1490
|
+
className: z.ZodOptional<z.ZodString>;
|
|
1491
|
+
}, "strip", z.ZodTypeAny, {
|
|
1492
|
+
threshold?: number | undefined;
|
|
1493
|
+
label?: string | undefined;
|
|
1494
|
+
className?: string | undefined;
|
|
1495
|
+
}, {
|
|
1496
|
+
threshold?: number | undefined;
|
|
1497
|
+
label?: string | undefined;
|
|
1498
|
+
className?: string | undefined;
|
|
1499
|
+
}>;
|
|
1500
|
+
type BackToTopProps = z.infer<typeof backToTopPropsSchema>;
|
|
1501
|
+
/**
|
|
1502
|
+
* Resolve the scroll behavior for a back-to-top activation. Pure so it can be
|
|
1503
|
+
* unit-tested without a DOM: reduced motion yields an instant jump.
|
|
1504
|
+
*/
|
|
1505
|
+
declare function resolveScrollBehavior(prefersReducedMotion: boolean): 'auto' | 'smooth';
|
|
1506
|
+
/**
|
|
1507
|
+
* Back-to-top control that appears once the page is scrolled past `threshold`
|
|
1508
|
+
* and returns the viewport to the top. Honors `prefers-reduced-motion` (instant
|
|
1509
|
+
* jump instead of a smooth scroll). Framework-agnostic; icon-only with an
|
|
1510
|
+
* accessible label.
|
|
1511
|
+
*/
|
|
1512
|
+
declare function BackToTop({ threshold, label, className, }: BackToTopProps): react.JSX.Element | null;
|
|
1513
|
+
|
|
1514
|
+
declare const mobileBottomNavItemSchema: z.ZodObject<{
|
|
1515
|
+
id: z.ZodOptional<z.ZodString>;
|
|
1516
|
+
label: z.ZodString;
|
|
1517
|
+
href: z.ZodString;
|
|
1518
|
+
icon: z.ZodOptional<z.ZodEnum<["wrench", "bolt", "tree", "refrigerator", "wind", "droplet", "zap", "hard-hat", "car", "utensils", "boxes", "sofa", "shield", "sun", "chef-hat", "tractor", "store", "home"]>>;
|
|
1519
|
+
}, "strip", z.ZodTypeAny, {
|
|
1520
|
+
label: string;
|
|
1521
|
+
href: string;
|
|
1522
|
+
id?: string | undefined;
|
|
1523
|
+
icon?: "tree" | "home" | "wrench" | "bolt" | "refrigerator" | "wind" | "droplet" | "zap" | "hard-hat" | "car" | "utensils" | "boxes" | "sofa" | "shield" | "sun" | "chef-hat" | "tractor" | "store" | undefined;
|
|
1524
|
+
}, {
|
|
1525
|
+
label: string;
|
|
1526
|
+
href: string;
|
|
1527
|
+
id?: string | undefined;
|
|
1528
|
+
icon?: "tree" | "home" | "wrench" | "bolt" | "refrigerator" | "wind" | "droplet" | "zap" | "hard-hat" | "car" | "utensils" | "boxes" | "sofa" | "shield" | "sun" | "chef-hat" | "tractor" | "store" | undefined;
|
|
1529
|
+
}>;
|
|
1530
|
+
type MobileBottomNavItem = z.infer<typeof mobileBottomNavItemSchema>;
|
|
1531
|
+
declare const mobileBottomNavPropsSchema: z.ZodObject<{
|
|
1532
|
+
items: z.ZodArray<z.ZodObject<{
|
|
1533
|
+
id: z.ZodOptional<z.ZodString>;
|
|
1534
|
+
label: z.ZodString;
|
|
1535
|
+
href: z.ZodString;
|
|
1536
|
+
icon: z.ZodOptional<z.ZodEnum<["wrench", "bolt", "tree", "refrigerator", "wind", "droplet", "zap", "hard-hat", "car", "utensils", "boxes", "sofa", "shield", "sun", "chef-hat", "tractor", "store", "home"]>>;
|
|
1537
|
+
}, "strip", z.ZodTypeAny, {
|
|
1538
|
+
label: string;
|
|
1539
|
+
href: string;
|
|
1540
|
+
id?: string | undefined;
|
|
1541
|
+
icon?: "tree" | "home" | "wrench" | "bolt" | "refrigerator" | "wind" | "droplet" | "zap" | "hard-hat" | "car" | "utensils" | "boxes" | "sofa" | "shield" | "sun" | "chef-hat" | "tractor" | "store" | undefined;
|
|
1542
|
+
}, {
|
|
1543
|
+
label: string;
|
|
1544
|
+
href: string;
|
|
1545
|
+
id?: string | undefined;
|
|
1546
|
+
icon?: "tree" | "home" | "wrench" | "bolt" | "refrigerator" | "wind" | "droplet" | "zap" | "hard-hat" | "car" | "utensils" | "boxes" | "sofa" | "shield" | "sun" | "chef-hat" | "tractor" | "store" | undefined;
|
|
1547
|
+
}>, "many">;
|
|
1548
|
+
currentHref: z.ZodOptional<z.ZodString>;
|
|
1549
|
+
ariaLabel: z.ZodOptional<z.ZodString>;
|
|
1550
|
+
className: z.ZodOptional<z.ZodString>;
|
|
1551
|
+
}, "strip", z.ZodTypeAny, {
|
|
1552
|
+
items: {
|
|
1553
|
+
label: string;
|
|
1554
|
+
href: string;
|
|
1555
|
+
id?: string | undefined;
|
|
1556
|
+
icon?: "tree" | "home" | "wrench" | "bolt" | "refrigerator" | "wind" | "droplet" | "zap" | "hard-hat" | "car" | "utensils" | "boxes" | "sofa" | "shield" | "sun" | "chef-hat" | "tractor" | "store" | undefined;
|
|
1557
|
+
}[];
|
|
1558
|
+
className?: string | undefined;
|
|
1559
|
+
ariaLabel?: string | undefined;
|
|
1560
|
+
currentHref?: string | undefined;
|
|
1561
|
+
}, {
|
|
1562
|
+
items: {
|
|
1563
|
+
label: string;
|
|
1564
|
+
href: string;
|
|
1565
|
+
id?: string | undefined;
|
|
1566
|
+
icon?: "tree" | "home" | "wrench" | "bolt" | "refrigerator" | "wind" | "droplet" | "zap" | "hard-hat" | "car" | "utensils" | "boxes" | "sofa" | "shield" | "sun" | "chef-hat" | "tractor" | "store" | undefined;
|
|
1567
|
+
}[];
|
|
1568
|
+
className?: string | undefined;
|
|
1569
|
+
ariaLabel?: string | undefined;
|
|
1570
|
+
currentHref?: string | undefined;
|
|
1571
|
+
}>;
|
|
1572
|
+
type MobileBottomNavProps = z.infer<typeof mobileBottomNavPropsSchema>;
|
|
1573
|
+
/**
|
|
1574
|
+
* Mobile-only bottom navigation offering the primary destinations.
|
|
1575
|
+
*
|
|
1576
|
+
* Framework-agnostic and prop-driven: plain anchors (no router). Hidden at
|
|
1577
|
+
* `md` and up; offsets the iOS home indicator via `env(safe-area-inset-bottom)`;
|
|
1578
|
+
* each destination meets the 44px minimum touch target. The current
|
|
1579
|
+
* destination is marked with `aria-current="page"` and a non-colour cue (weight
|
|
1580
|
+
* + indicator bar), never colour alone.
|
|
1581
|
+
*/
|
|
1582
|
+
declare function MobileBottomNav({ items, currentHref, ariaLabel, className, }: MobileBottomNavProps): react.JSX.Element | null;
|
|
1583
|
+
|
|
1317
1584
|
interface CategoryFilter1Category {
|
|
1318
1585
|
id: string;
|
|
1319
1586
|
name: string;
|
|
@@ -1756,10 +2023,18 @@ interface ShoppingCart4RecentlyViewed {
|
|
|
1756
2023
|
price: number;
|
|
1757
2024
|
image?: string;
|
|
1758
2025
|
}
|
|
2026
|
+
type ShoppingCart4Presentation = 'compact' | 'page';
|
|
1759
2027
|
interface ShoppingCart4Props {
|
|
1760
2028
|
items: ShoppingCart4Item[];
|
|
1761
2029
|
promotions: ShoppingCart4Promotion[];
|
|
1762
2030
|
recentlyViewed?: ShoppingCart4RecentlyViewed[];
|
|
2031
|
+
/**
|
|
2032
|
+
* Layout presentation. `compact` (default) is the collapsible quick-cart
|
|
2033
|
+
* card; `page` is a wide, always-expanded review layout with a primary
|
|
2034
|
+
* heading, no collapse control, and normal page scrolling. Both use the same
|
|
2035
|
+
* line controls and authoritative monetary rendering.
|
|
2036
|
+
*/
|
|
2037
|
+
presentation?: ShoppingCart4Presentation;
|
|
1763
2038
|
/**
|
|
1764
2039
|
* Backend-authoritative totals. The curated cart renders these verbatim; it
|
|
1765
2040
|
* never computes subtotal/tax/shipping/total locally.
|
|
@@ -1806,6 +2081,11 @@ interface ShoppingCart4Props {
|
|
|
1806
2081
|
removeLabel?: string;
|
|
1807
2082
|
decreaseLabel?: string;
|
|
1808
2083
|
increaseLabel?: string;
|
|
2084
|
+
continueShoppingLabel?: string;
|
|
2085
|
+
/** Suppress the checkout action (e.g. the checkout feature is not installed). */
|
|
2086
|
+
checkoutUnavailable?: boolean;
|
|
2087
|
+
/** Disable checkout while the cart is not ready (pending/error/invalid totals). */
|
|
2088
|
+
checkoutDisabled?: boolean;
|
|
1809
2089
|
/**
|
|
1810
2090
|
* ABSOLUTE quantity for a backend cart line-item id (distinct from the
|
|
1811
2091
|
* Navbar's DELTA). The boundary mutates the cart by line-item id.
|
|
@@ -1818,8 +2098,10 @@ interface ShoppingCart4Props {
|
|
|
1818
2098
|
onPayWithApple?: () => void;
|
|
1819
2099
|
onPayWithGoogle?: () => void;
|
|
1820
2100
|
onRecentlyViewedClick?: (id: string) => void;
|
|
2101
|
+
/** Page presentation only: navigate back to browsing. */
|
|
2102
|
+
onContinueShopping?: () => void;
|
|
1821
2103
|
}
|
|
1822
|
-
declare function ShoppingCart4({ items, promotions, recentlyViewed, totals, totalsState, totalsErrorLabel, totalsUnavailableLabel, amountUnavailableLabel, retryLabel, onRetryTotals, formatMoney: formatMoneyProp, formatPrice, titleLabel, subtotalLabel, discountLabel, taxLabel, shippingLabel, shippingFreeLabel, totalLabel, totalsPendingLabel, awayFromLabel, activatedLabel, itemsLabel, expressCheckoutLabel, expressLabel, standardLabel, estimatedDeliveryLabel, secureCheckoutLabel, recentlyViewedLabel, collapseLabel, expandLabel, checkoutLabel, quickCheckoutLabel, checkoutNowLabel, emptyLabel, removeLabel, decreaseLabel, increaseLabel, onQuantityChange, onRemove, onCheckout, onQuickCheckout, onPayWithApple, onPayWithGoogle, onRecentlyViewedClick, }: ShoppingCart4Props): react.JSX.Element;
|
|
2104
|
+
declare function ShoppingCart4({ items, promotions, recentlyViewed, presentation, totals, totalsState, totalsErrorLabel, totalsUnavailableLabel, amountUnavailableLabel, retryLabel, onRetryTotals, formatMoney: formatMoneyProp, formatPrice, titleLabel, subtotalLabel, discountLabel, taxLabel, shippingLabel, shippingFreeLabel, totalLabel, totalsPendingLabel, awayFromLabel, activatedLabel, itemsLabel, expressCheckoutLabel, expressLabel, standardLabel, estimatedDeliveryLabel, secureCheckoutLabel, recentlyViewedLabel, collapseLabel, expandLabel, checkoutLabel, quickCheckoutLabel, checkoutNowLabel, emptyLabel, removeLabel, decreaseLabel, increaseLabel, continueShoppingLabel, checkoutUnavailable, checkoutDisabled, onQuantityChange, onRemove, onCheckout, onQuickCheckout, onPayWithApple, onPayWithGoogle, onRecentlyViewedClick, onContinueShopping, }: ShoppingCart4Props): react.JSX.Element;
|
|
1823
2105
|
|
|
1824
2106
|
type ShoppingCart3Tag = 'Limited Edition' | 'Best Seller' | 'New Arrival';
|
|
1825
2107
|
interface ShoppingCart3CartItem {
|
|
@@ -2783,4 +3065,4 @@ interface Verify1Props {
|
|
|
2783
3065
|
}
|
|
2784
3066
|
declare function Verify1({ verifyTitleLabel, verifyDescriptionLabel, backupCodeTitleLabel, backupCodeDescriptionLabel, backupCodeLabel, backupCodePlaceholder, otpAriaLabel, verifyLabel, resendCodeLabel, resendCooldownLabel, useBackupCodeLabel, useAuthenticatorLabel, tooManyAttemptsLabel, attemptsLeftLabel, verifiedTitleLabel, verifiedDescriptionLabel, continueLabel, demoOtpHintLabel, demoBackupHintLabel, onVerify, onVerifyBackup, onResend, onContinue, }: Verify1Props): react.JSX.Element;
|
|
2785
3067
|
|
|
2786
|
-
export { AppShell1, Avatar, AvatarFallback, AvatarImage, Badge, Banner1, Button, type CTA, Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, CategoryFilter1, type CategoryFilter1Category, type CategoryFilter1PriceRange, type CategoryFilter1SortOption, CategoryFilter2, type CategoryFilter2ActiveFilter, type CategoryFilter2ActiveFilterKind, type CategoryFilter2Category, type CategoryFilter2Collection, type CategoryFilter2Color, type CategoryFilter2Filters, type CategoryFilter2PriceRange, type CategoryFilter2Props, type CategoryFilter2QueryError, type CategoryFilter2SortOption, type CategoryFilter2Status, CategoryFilter2StatusView, type CategoryFilter2StatusViewProps, CategoryFilter4, type CategoryFilter4Facets, type CategoryFilter4Product, type CategoryFilter4Props, CategoryIcon, type CategoryIconName, type CategoryIconProps, CheckoutConfirmation, type CheckoutConfirmationProps, type CheckoutFieldError, type CheckoutFieldErrors, CheckoutForm1, type CheckoutForm1ChangeHandler, type CheckoutForm1CountryOption, type CheckoutForm1FieldDescriptions, type CheckoutForm1FieldErrors, type CheckoutForm1FormData, type CheckoutForm1OrderSummary, type CheckoutForm1OrderSummaryItem, type CheckoutForm1Props, type CheckoutForm1ShippingOption, type CheckoutForm1Totals, type CheckoutForm1TotalsState, CheckoutForm2, type CheckoutForm2Data, type CheckoutForm2FieldDescriptions, type CheckoutForm2FieldErrors, type CheckoutForm2Item, type CheckoutForm2Props, type CheckoutForm2Totals, CheckoutForm3, type CheckoutForm3CartItem, type CheckoutForm3CountryOption, type CheckoutForm3FormData, type CheckoutForm3Props, type CheckoutForm3ShippingMethod, type CollectionItem, CtaSection1, type CtaSection1Props, FaqBlock1, type FaqBlock1Props, type FaqItem, Feature1, type Feature1Item, type Feature1Props, Feature2, type Feature2Item, type Feature2Props, type FeaturedProduct$1 as FeaturedProduct, type FilterProduct, type FooterLink, type FooterLinkColumn, FooterSection1, FooterSection3, type FooterSection3Props, FooterSection4, type FooterSection4Contact, type FooterSection4Link, type FooterSection4LinkColumn, type FooterSection4Props, type FooterSection4SocialIcon, type FooterSection4SocialLink, ForgotPasswordPage1, type ForgotPasswordPage1Props, type FulfilmentStage, type FulfilmentStageDetail, HeroSection1, LoginPage1, type LoginPage1FormData, type LoginPage1Props, type LoginPage1SocialButton, LoginPage2, type LoginPage2Props, type LoginPage2SocialButton, LogoCloud1, type LogoCloud1Platform, type LogoCloud1Props, MegaMenu, type MegaMenuProps, type MenuItem, MobileCategoryDrawer, type MobileCategoryDrawerProps, Navbar1, Navbar2, Navbar3, Navbar4, type Order$1 as Order, type OrderAddress, OrderHistory1, OrderHistory2, type OrderLine, type OrderTotals, PricingSection1, type PricingSection1Props, type PricingTier, ProductCard1, ProductCard2, ProductCard3, ProductCard5, ProductCategory1, type ProductCategory1Category, type ProductCategory1CategoryIcon, type ProductCategory1Props, ProductCategory2, type ProductCategory2Category, type ProductCategory2Props, ProductCategory4, ProductCategory5, type ProductDetailProduct, type ProductDetailVariant, ProductOverview1, type ProductOverview1Props, type ProductOverview1Rating, ProductOverview2, type ProductOverview2Product, type ProductOverview2Props, ProductOverview5, type ProductOverview5Product, type ProductOverview5Props, type ProductOverview5Review, ProductQuickView, ReviewRating1, type ReviewRating1Review, ReviewRating2, ShoppingCart1, ShoppingCart2, type ShoppingCart2Item, type ShoppingCart2Props, ShoppingCart3, type ShoppingCart3CartItem, type ShoppingCart3Props, ShoppingCart4, type ShoppingCart4Item, type ShoppingCart4Props, SignUpPage1, type SignUpPage1Data, type SignUpPage1Props, type SignUpPage1SocialButton, type SocialLink, Statistic1, type Statistic1Props, type StatisticItem, StoreCategory, StoreContainer1, type StoreContainer1Props, StorefrontHero1, type StorefrontHero1Props, StorefrontHero2, StorefrontHero5, StorefrontHero6, Testimonial1, type Testimonial1Item, type Testimonial1Props, Testimonial2, type Testimonial2Item, type Testimonial2Props, Verify1, type Verify1Props, badgeVariants, buttonVariants, categoryIconNameSchema, categoryIconPropsSchema, cn, collectionItemSchema, megaMenuPropsSchema, menuItemSchema, mobileCategoryDrawerPropsSchema };
|
|
3068
|
+
export { AppShell1, Avatar, AvatarFallback, AvatarImage, BackToTop, type BackToTopProps, Badge, Banner1, Breadcrumb, type BreadcrumbItemData, type BreadcrumbProps, Button, type CTA, Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, CategoryFilter1, type CategoryFilter1Category, type CategoryFilter1PriceRange, type CategoryFilter1SortOption, CategoryFilter2, type CategoryFilter2ActiveFilter, type CategoryFilter2ActiveFilterKind, type CategoryFilter2Category, type CategoryFilter2Collection, type CategoryFilter2Color, type CategoryFilter2Filters, type CategoryFilter2PriceRange, type CategoryFilter2Props, type CategoryFilter2QueryError, type CategoryFilter2SortOption, type CategoryFilter2Status, CategoryFilter2StatusView, type CategoryFilter2StatusViewProps, CategoryFilter4, type CategoryFilter4Facets, type CategoryFilter4Product, type CategoryFilter4Props, CategoryIcon, type CategoryIconName, type CategoryIconProps, CheckoutConfirmation, type CheckoutConfirmationProps, type CheckoutFieldError, type CheckoutFieldErrors, CheckoutForm1, type CheckoutForm1ChangeHandler, type CheckoutForm1CountryOption, type CheckoutForm1FieldDescriptions, type CheckoutForm1FieldErrors, type CheckoutForm1FormData, type CheckoutForm1OrderSummary, type CheckoutForm1OrderSummaryItem, type CheckoutForm1Props, type CheckoutForm1ShippingOption, type CheckoutForm1Totals, type CheckoutForm1TotalsState, CheckoutForm2, type CheckoutForm2Data, type CheckoutForm2FieldDescriptions, type CheckoutForm2FieldErrors, type CheckoutForm2Item, type CheckoutForm2Props, type CheckoutForm2Totals, CheckoutForm3, type CheckoutForm3CartItem, type CheckoutForm3CountryOption, type CheckoutForm3FormData, type CheckoutForm3Props, type CheckoutForm3ShippingMethod, type CollectionItem, CtaSection1, type CtaSection1Props, FaqBlock1, type FaqBlock1Props, type FaqItem, Feature1, type Feature1Item, type Feature1Props, Feature2, type Feature2Item, type Feature2Props, type FeaturedProduct$1 as FeaturedProduct, type FilterProduct, type FooterLink, type FooterLinkColumn, FooterSection1, FooterSection3, type FooterSection3Props, FooterSection4, type FooterSection4Contact, type FooterSection4Link, type FooterSection4LinkColumn, type FooterSection4Props, type FooterSection4SocialIcon, type FooterSection4SocialLink, ForgotPasswordPage1, type ForgotPasswordPage1Props, type FulfilmentStage, type FulfilmentStageDetail, HeroSection1, LoginPage1, type LoginPage1FormData, type LoginPage1Props, type LoginPage1SocialButton, LoginPage2, type LoginPage2Props, type LoginPage2SocialButton, LogoCloud1, type LogoCloud1Platform, type LogoCloud1Props, MegaMenu, type MegaMenuProps, type MenuItem, MobileBottomNav, type MobileBottomNavItem, type MobileBottomNavProps, MobileCategoryDrawer, type MobileCategoryDrawerProps, Navbar1, Navbar2, Navbar3, Navbar4, type Order$1 as Order, type OrderAddress, OrderHistory1, OrderHistory2, type OrderLine, type OrderTotals, PricingSection1, type PricingSection1Props, type PricingTier, ProductCard1, type ProductCard1Product, type ProductCard1Props, ProductCard2, ProductCard3, ProductCard5, ProductCategory1, type ProductCategory1Category, type ProductCategory1CategoryIcon, type ProductCategory1Props, ProductCategory2, type ProductCategory2Category, type ProductCategory2Props, ProductCategory4, ProductCategory5, type ProductDetailProduct, type ProductDetailVariant, ProductOverview1, type ProductOverview1Props, type ProductOverview1Rating, ProductOverview2, type ProductOverview2Product, type ProductOverview2Props, ProductOverview5, type ProductOverview5Product, type ProductOverview5Props, type ProductOverview5Review, ProductPresentation, ProductQuickView, ProductShowcase1, type ProductShowcase1Props, ReviewRating1, type ReviewRating1Review, ReviewRating2, ShoppingCart1, ShoppingCart2, type ShoppingCart2Item, type ShoppingCart2Props, ShoppingCart3, type ShoppingCart3CartItem, type ShoppingCart3Props, ShoppingCart4, type ShoppingCart4Item, type ShoppingCart4Props, SignUpPage1, type SignUpPage1Data, type SignUpPage1Props, type SignUpPage1SocialButton, SkipToContent, type SkipToContentProps, type SocialLink, Statistic1, type Statistic1Props, type StatisticItem, StoreCategory, StoreContainer1, type StoreContainer1Props, StorefrontHero1, type StorefrontHero1Props, StorefrontHero2, StorefrontHero5, StorefrontHero6, Testimonial1, type Testimonial1Item, type Testimonial1Props, Testimonial2, type Testimonial2Item, type Testimonial2Props, Verify1, type Verify1Props, backToTopPropsSchema, badgeVariants, breadcrumbItemSchema, breadcrumbPropsSchema, buttonVariants, categoryIconNameSchema, categoryIconPropsSchema, cn, collectionItemSchema, megaMenuPropsSchema, menuItemSchema, mobileBottomNavItemSchema, mobileBottomNavPropsSchema, mobileCategoryDrawerPropsSchema, resolveScrollBehavior, skipToContentPropsSchema };
|