efficient-storefront-blocks 0.89.0 → 0.90.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 +16 -0
- package/dist/chunks/{EditorPreviewCheckout-R7XG75DW.js → EditorPreviewCheckout-M4LID5YF.js} +1 -1
- package/dist/chunks/{SiteEditorProvider-YNUCDQ2D.js → SiteEditorProvider-2JWQZN2Q.js} +1 -1
- package/dist/chunks/chunk-3XIZADE6.js +1 -0
- package/dist/chunks/chunk-6TDIG6W3.js +395 -0
- package/dist/chunks/chunk-JMUP4FBL.js +1 -0
- package/dist/chunks/{chunk-E54FFOUS.js → chunk-U6UPMVSX.js} +1 -1
- package/dist/chunks/{fitment-data-URBK335I.js → fitment-data-3VLLTJW6.js} +1 -1
- package/dist/contract.js +2 -2
- package/dist/editor/components/GalleryPicturesSource.d.ts +33 -0
- package/dist/editor/components/GalleryPicturesSource.js +1 -0
- package/dist/editor/components/ProductSourceRows.d.ts +35 -0
- package/dist/editor/components/ProductSourceRows.js +1 -0
- package/dist/editor/components/ReviewsProductSource.js +1 -1
- package/dist/editor/lib/document/blocks/commerce/GalleryB/fields.js +1 -1
- package/dist/editor/lib/document/blocks/service/FooterDivider/fields.js +1 -1
- package/dist/editor/lib/document/config.d.ts +1 -0
- package/dist/editor/lib/document/config.js +1 -1
- package/dist/editor/lib/storefront-editor-words.d.ts +1 -0
- package/dist/editor/lib/storefront-editor-words.js +1 -1
- package/dist/editor.css +1 -1
- package/dist/index.js +62 -43
- package/dist/links.js +1 -1
- package/dist/render/built-with.json +1 -1
- package/dist/render/components/AppointmentBooking.js +1 -1
- package/dist/render/components/ArticleBody.js +1 -1
- package/dist/render/components/BoxHeaderBar.js +1 -1
- package/dist/render/components/CollectionCard.d.ts +1 -1
- package/dist/render/components/CollectionCard.js +1 -1
- package/dist/render/components/ContactRouting.js +1 -1
- package/dist/render/components/EuTyreLabels.d.ts +2 -1
- package/dist/render/components/EuTyreLabels.js +1 -1
- package/dist/render/components/Events.js +1 -1
- package/dist/render/components/FooterDivider.d.ts +1 -2
- package/dist/render/components/FooterDivider.js +1 -1
- package/dist/render/components/FooterEmailSignup.js +1 -1
- package/dist/render/components/FooterGroup.js +1 -1
- package/dist/render/components/FooterLogo.js +1 -1
- package/dist/render/components/FooterMenu.js +1 -1
- package/dist/render/components/FooterMessaging.js +1 -1
- package/dist/render/components/FooterPayment.js +1 -1
- package/dist/render/components/FooterSection.js +1 -1
- package/dist/render/components/FooterSocial.js +1 -1
- package/dist/render/components/FooterText.js +1 -1
- package/dist/render/components/GalleryCard.js +1 -1
- package/dist/render/components/GalleryGrid.d.ts +3 -1
- package/dist/render/components/GalleryGrid.js +3 -1
- package/dist/render/components/GalleryItem.d.ts +1 -0
- package/dist/render/components/GalleryItem.js +1 -1
- package/dist/render/components/GalleryShowcase.js +1 -1
- package/dist/render/components/GridCardTemplate.js +1 -1
- package/dist/render/components/HeaderNavItem.d.ts +1 -1
- package/dist/render/components/HeaderNavItem.js +1 -1
- package/dist/render/components/HeaderToolBlocks.js +1 -1
- package/dist/render/components/HeaderTools.d.ts +5 -3
- package/dist/render/components/HeaderTools.js +1 -1
- package/dist/render/components/LegalLine.js +1 -1
- package/dist/render/components/MenuLinkBlock.js +1 -1
- package/dist/render/components/MenuPlaceholderLabel.js +1 -1
- package/dist/render/components/ProductGallery.d.ts +2 -1
- package/dist/render/components/ProductGallery.js +1 -1
- package/dist/render/components/ProductRef.js +1 -1
- package/dist/render/components/QuoteLink.d.ts +2 -1
- package/dist/render/components/QuoteLink.js +1 -1
- package/dist/render/components/RatingStars.js +1 -1
- package/dist/render/components/ReviewForm.js +1 -1
- package/dist/render/components/SectionBand.js +1 -1
- package/dist/render/components/SectionFootnote.d.ts +2 -1
- package/dist/render/components/SectionFootnote.js +1 -1
- package/dist/render/components/SectionGroupBody.js +1 -1
- package/dist/render/components/SectionNotice.js +1 -1
- package/dist/render/components/TyreFitVerdicts.js +1 -1
- package/dist/render/components/booking/BookingBox.js +1 -1
- package/dist/render/components/booking/BookingRegions.js +1 -1
- package/dist/render/components/card-pieces/CardBuyButton.d.ts +3 -1
- package/dist/render/components/card-pieces/CardBuyButton.js +1 -1
- package/dist/render/components/card-pieces/CardEyebrow.js +1 -1
- package/dist/render/components/card-pieces/CardName.js +1 -1
- package/dist/render/components/card-pieces/CardPrice.js +1 -1
- package/dist/render/components/card-pieces/CardProductPicture.js +1 -1
- package/dist/render/components/card-pieces/CardSpecs.js +1 -1
- package/dist/render/components/card-pieces/HostPart.js +1 -1
- package/dist/render/components/card-pieces/card-row.js +1 -1
- package/dist/render/components/catalog/ShopperChips.js +1 -1
- package/dist/render/components/catalog/ShopperFilters.js +1 -1
- package/dist/render/components/fitment/FitmentPickerGrid.js +1 -1
- package/dist/render/components/fitment/StockFitmentCard.js +1 -1
- package/dist/render/components/fitment/StockFitmentPart.js +1 -1
- package/dist/render/components/pdp-dynamic/DynamicEuTyreLabel.d.ts +4 -0
- package/dist/render/components/pdp-dynamic/DynamicEuTyreLabel.js +1 -1
- package/dist/render/components/pdp-dynamic/DynamicGalleryGrid.js +1 -1
- package/dist/render/components/pdp-dynamic/DynamicProductGallery.js +1 -1
- package/dist/render/components/submit/SubmitBox.js +1 -1
- package/dist/render/lib/content/served-lists.d.ts +8 -0
- package/dist/render/lib/content/served-lists.js +1 -0
- package/dist/render/lib/document/blocks/commerce/GalleryB/render.js +1 -1
- package/dist/render/lib/document/blocks/commerce/ProductHero/render.js +1 -1
- package/dist/render/lib/document/blocks/commerce/ProductPrice/render.js +1 -1
- package/dist/render/lib/document/blocks/service/Events/render.js +1 -1
- package/dist/render/lib/document/blocks/service/FooterDivider/meta.js +1 -1
- package/dist/render/lib/document/blocks/service/FooterDivider/render.js +1 -1
- package/dist/render/lib/document/blocks/service/RatingBlock/render.js +1 -1
- package/dist/render/lib/document/card-templates.d.ts +2 -0
- package/dist/render/lib/document/card-templates.js +1 -1
- package/dist/render/lib/document/lazy-draws.js +1 -1
- package/dist/render/lib/document/render-config.d.ts +1 -0
- package/dist/render/lib/document/render-config.js +1 -1
- package/dist/render/lib/document/section-to-box-rows-productgrid.d.ts +1 -0
- package/dist/render/lib/document/section-to-box-rows-productgrid.js +1 -0
- package/dist/render/lib/sections/product-pictures.d.ts +25 -0
- package/dist/render/lib/sections/product-pictures.js +1 -0
- package/dist/render/lib/sections/product-source.d.ts +8 -0
- package/dist/render/lib/sections/product-source.js +1 -0
- package/dist/render/lib/sections/reviews.js +1 -1
- package/dist/words.d.ts +11 -0
- package/dist/words.js +5 -5
- package/package.json +4 -3
- package/dist/chunks/chunk-BYBBZS7L.js +0 -1
- package/dist/chunks/chunk-G4Y7XXRV.js +0 -1
- package/dist/chunks/chunk-WRDUOJZO.js +0 -382
- /package/dist/chunks/{chunk-WRDUOJZO.js.LEGAL.txt → chunk-6TDIG6W3.js.LEGAL.txt} +0 -0
- /package/dist/chunks/{chunk-ZA3ULZOA.js → chunk-N445XY3W.js} +0 -0
- /package/dist/editor/lib/{editor-words-kept.d.ts → storefront-editor-words-kept.d.ts} +0 -0
- /package/dist/editor/lib/{editor-words-kept.js → storefront-editor-words-kept.js} +0 -0
|
@@ -1 +1,3 @@
|
|
|
1
|
-
"use client";import{jsx as
|
|
1
|
+
"use client";import{jsx as r,jsxs as q}from"react/jsx-runtime";import{useCallback as J,useMemo as u,useState as Q}from"react";import{usePathname as Z}from"next/navigation";import{containerGapProps as ee}from"efficient-web-builder/format/lib/content/container-gap";import se from"efficient-web-builder/render/components/Btn";import re,{GALLERY_GRID_ATTR as te,GalleryLinksContext as le,GalleryTilesContext as ne}from"./GalleryItem.js";import{useShopperGallery as oe}from"./catalog/ShopperScope.js";import{galleryShownIds as ae,galleryToolbarIdle as ie,WALL_PLACED_CELL as de,WALL_PLACED_CSS as ce,wallSpanAt as me}from"../lib/sections/gallery-toolbar.js";import{useSiteSells as pe}from"./SiteRecordContext.js";import{SharedPartKinds as fe}from"efficient-web-builder/render/components/PublishedPartStylesContext";import{renderHeadline as ge}from"efficient-web-builder/render/components/goldPhrases";import ue from"efficient-web-builder/render/components/SectionHeader";import{headIsEmpty as ye,ownPadding as xe}from"../lib/sections/own-padding.js";import{resolveGridColumns as he,resolveGridMobileColumns as we}from"efficient-web-builder/format/lib/content/grid-span";import{galleryLayoutClass as ve,galleryLayoutCss as Le,resolveGalleryLayout as Ne}from"efficient-web-builder/format/lib/content/gallery-layout";import{HideTaker as Se}from"efficient-web-builder/render/components/ViewHideRoot";const be="relative z-[2] bg-bg py-[120px] max-view-wide:py-[70px]",_e="relative z-[2] bg-bg pt-0 pb-[120px] max-view-wide:pt-0 max-view-wide:pb-[70px]",Ge="mx-auto max-w-[var(--sf-site-width,1600px)] px-[var(--sf-site-gutter,40px)] max-view-wide:px-[min(20px,var(--sf-site-gutter,40px))]";function Ce({items:i,sourced:d,num:h,title:y,linkText:w,linkHref:E,galleryHref:m="/gallery",submitHref:I="/contact",previewHover:k,display:R,displayPhone:M,styleOwner:T,layout:v,columns:p,columnsMobile:j,gap:O,gapPhone:z,omitHead:L=!1,padTop:$,padBottom:B,editing:N=!1}){const D=Z(),W=pe(),F=m!==D&&(W||m!=="/gallery"),S=Ne(v),o=S?v:null,K=!S&&p!=null&&p!=="",a=ee("GalleryB",O,"both",z),b=o?{className:`sf-card-grid sf-gallery-zone ${ve(o)} grid${a.className}`,style:a.style}:K?{className:`sf-card-grid sf-grid-zone grid${a.className}`,style:{...a.style,"--sf-grid-cols":String(he(p)),"--sf-grid-cols-phone":String(we(j,p))}}:{className:`sf-card-grid grid grid-cols-4${a.className} max-[1500px]:grid-cols-3 max-view-wide:grid-cols-1`,style:a.style},_=w?{text:w,href:E||"#"}:void 0,H=y?ge(y,!1):void 0,[G,U]=Q({}),C=J((e,t)=>{U(s=>{const n=s[e.id];if(t){if(!n)return s;const{[e.id]:Pe,...Y}=s;return Y}return n&&n.tag===e.tag&&n.name===e.name?s:{...s,[e.id]:e}})},[]),f=d?.map(e=>e.tile.id).join(`
|
|
2
|
+
`),P=u(()=>f!==void 0?f?f.split(`
|
|
3
|
+
`):[]:i?.blockIds,[f,i?.blockIds]),g=u(()=>(P??[]).map(e=>G[e]).filter(e=>!!e),[P,G]),{ref:V,toolbar:c}=oe(g),A=c!==null&&!ie(c,g),l=u(()=>A&&c?ae(g,c):null,[A,c,g]),X=u(()=>{const e=new Map((l??[]).map((t,s)=>[t,s]));return{report:C,positionOf:t=>{const s=l?e.get(t):void 0;return s===void 0?null:{index:s+1,total:l.length}}}},[C,l]),x=l?e=>{const t=l.indexOf(e);if(t<0)return{style:{display:"none"}};if(!o)return{style:{order:t}};const s=me(o,t,l.length);return{className:de,style:{order:t,"--sf-wall-c":s.col,"--sf-wall-r":s.row,"--sf-wall-cp":s.colPhone,"--sf-wall-rp":s.rowPhone}}}:void 0;return r(Se,{as:"section",ref:V,className:L?_e:be,style:xe($,B),children:q("div",{className:Ge,children:[L||!N&&ye(h,y,_?.text)?null:r(ue,{num:h,title:H,link:_}),o&&r("style",{dangerouslySetInnerHTML:{__html:Le(o)+(l?ce:"")}}),(i||d)&&r(le.Provider,{value:{galleryHref:m,submitHref:I,previewHover:k,display:R,displayPhone:M,styleOwner:T,wordsAtRest:!!d},children:r(ne.Provider,{value:X,children:r(fe,{children:r("div",{[te]:"",style:{display:"contents"},children:d?r("div",{...b,children:d.map(({tile:e,...t})=>{const s=r(re,{...t,tile:e,editing:N},e.id),n=x?.(e.id);return n?r("div",{className:n.className,style:n.style,children:s},e.id):s})}):i?r(i,{...b,minEmptyHeight:320,...x?{cell:x}:{}}):null})})})}),F&&r("div",{className:"mt-12 flex flex-col items-center gap-3",children:r(se,{href:m,variant:"ghost",children:"See Gallery"})})]})})}export{Ce as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{jsx as r,jsxs as n,Fragment as m}from"react/jsx-runtime";import{createContext as
|
|
1
|
+
"use client";import{jsx as r,jsxs as n,Fragment as m}from"react/jsx-runtime";import{createContext as G,useCallback as Z,useContext as M,useEffect as J,useRef as K,useState as C}from"react";import _ from"next/link";import{slugify as Q}from"efficient-shell/format";import ee from"./GalleryCard.js";import te,{LightboxClose as re,LIGHTBOX_CLOSE_TINT as oe}from"./Lightbox.js";import{useSiteSells as ne}from"./SiteRecordContext.js";import{renderGold as p,renderHeadline as Y}from"efficient-web-builder/render/components/goldPhrases";import{sizedImage as le}from"efficient-web-builder/format/lib/sized-image";import{useIsoLayoutEffect as ae}from"./catalog/ShopperScope.js";import{HideTaker as B}from"efficient-web-builder/render/components/ViewHideRoot";const se="(max-width: 1100px) 100vw, min(59vw, 1050px)",ie=G({}),Oe=[{id:"tag",label:"Tag"},{id:"eyebrow",label:"Eyebrow"},{id:"title",label:"Title"},{id:"meta",label:"Meta"},{id:"number",label:"Card number"}],ce=G(null),de="data-gallery-grid",T="data-gallery-tile";function pe(t,o){const[l,s]=C(null);return J(()=>{const i=t.current,a=i?.closest(`[${de}]`);if(!i||!a)return;const b=()=>{const y=Array.from(a.querySelectorAll(`[${T}]`)),w=y.indexOf(i),f=w>=0?{index:w+1,total:y.length}:null;s(h=>h?.index===f?.index&&h?.total===f?.total?h:f)};if(b(),!o)return;const v=new MutationObserver(b);return v.observe(a,{childList:!0,subtree:!0}),()=>v.disconnect()},[t,o]),l}const Pe={process:"Category",eyebrow:"Subtitle",name:"Item name",meta:"Detail"},me=()=>({image:"",href:"#",process:"",eyebrow:"",name:"",meta:""}),ze=Array.from({length:6},me);function fe(t){const o=(t.photos??[]).map(a=>a?.src).filter(a=>!!a),l=t.image||o[0]||"",s=[l,...o].filter(a=>!!a),i=Q(t.name)||"gallery-item";return{car:t.eyebrow??"",wheel:t.name??"",process:t.process??"",finish:t.meta??"",imageLabel:`${i}.jpg`,detailLabel:`${i}-detail.jpg`,imageSrc:l||void 0,detailSrc:o[0]||l||void 0,photos:s,href:t.href}}function he({editing:t=!1,previewHover:o,ratio:l,captionPlace:s,tile:i,...a}){const{galleryHref:b="/gallery",submitHref:v="/contact",previewHover:y,display:w,displayPhone:f,styleOwner:h,photosOnly:F=!1,wordsAtRest:V=!1}=M(ie),e=fe(a),x=ne()&&!F,O=!x&&!xe(e),d=e.photos??(e.imageSrc?[e.imageSrc]:[]),P=K(null),z=Z(c=>{P.current=c},[]),q=pe(P,t),E=M(ce),N=E?.report,u=i?.id,j=i?.tag??"",I=i?.name??"";ae(()=>{if(!N||!u)return;const c={id:u,tag:j,name:I};return N(c),()=>N(c,!0)},[N,u,j,I]);const A=(u?E?.positionOf(u):null)??q,U=t&&(!!o||!!y),[X,g]=C(!1),[k,L]=C(0),H=()=>L(c=>(c-1+d.length)%d.length),R=()=>L(c=>(c+1)%d.length),S=d[k]??e.imageSrc??"",$=r(ee,{build:e,forceHover:U,alwaysShowOverlay:V,index:A?.index,total:A?.total,ratio:l,captionPlace:s,display:w,displayPhone:f,styleOwner:h,editing:t});return n(m,{children:[t?r(B,{as:"div",ref:z,[T]:"",className:"block w-full text-left",children:$}):r(B,{as:"button",ref:z,[T]:"",type:"button","aria-label":x?`Open ${e.car||"build"} on ${e.wheel||"wheel"}`:D(e),onClick:()=>{L(0),g(!0)},className:"block w-full cursor-pointer text-left focus:outline-none focus-visible:outline focus-visible:outline-2 focus-visible:outline-accent focus-visible:outline-offset-2",children:$}),r(te,{open:X,onClose:()=>g(!1),label:x?`${e.car} on ${e.wheel}`:D(e),onPrev:d.length>1?H:void 0,onNext:d.length>1?R:void 0,className:"flex items-center justify-center p-6 max-[700px]:p-3",children:n("div",{onClick:c=>c.stopPropagation(),className:`relative grid w-[min(1800px,100%)] max-h-[calc(100vh-48px)] ${O?"grid-cols-1":"grid-cols-[1.4fr_1fr]"} overflow-hidden border border-line bg-bg max-view-desktop:grid-cols-1 max-view-desktop:overflow-auto`,style:{boxShadow:"0 60px 120px -20px color-mix(in srgb, var(--sf-shadow-color, #141416) 70%, transparent)"},children:[r(re,{label:"Close popup",className:"absolute right-[24px] top-[24px] z-[5] flex h-[56px] w-[56px] items-center justify-center border border-line font-mono text-[length:var(--size-label,21px)] text-fg-dim transition-colors hover:border-accent hover:text-fg",style:{background:oe},children:"✕"}),n("div",{className:"relative flex min-h-[690px] items-center justify-center overflow-hidden bg-surface-2 max-view-desktop:min-h-[450px]",children:[S&&r("img",{...le(S,{fallbackWidth:1280}),sizes:se,alt:`${(x?e.car:e.wheel||e.car)||"Photo"} — ${k+1} of ${d.length}`,className:"block h-full max-h-[88vh] w-full object-cover"},S),d.length>1&&n(m,{children:[r("button",{type:"button","aria-label":"Previous photo",onClick:H,className:"absolute left-4 top-1/2 flex h-16 w-16 -translate-y-1/2 cursor-pointer items-center justify-center border border-fg-dim/40 bg-overlay-scrim/40 font-mono text-[length:var(--size-label,24px)] text-fg-dim transition-colors hover:border-accent hover:text-accent",children:"◁"}),r("button",{type:"button","aria-label":"Next photo",onClick:R,className:"absolute right-4 top-1/2 flex h-16 w-16 -translate-y-1/2 cursor-pointer items-center justify-center border border-fg-dim/40 bg-overlay-scrim/40 font-mono text-[length:var(--size-label,24px)] text-fg-dim transition-colors hover:border-accent hover:text-accent",children:"▷"}),n("span",{className:"absolute bottom-4 left-1/2 -translate-x-1/2 border border-fg-dim/30 bg-overlay-scrim/50 px-4 py-1.5 font-mono text-[length:var(--size-label,15px)] uppercase tracking-[0.22em] text-fg-dim backdrop-blur-[4px]",children:[k+1," / ",d.length]})]})]}),x?n("div",{className:"flex flex-col gap-[30px] px-[60px] py-[72px] max-view-desktop:px-9 max-view-desktop:py-[54px]",children:[e.process&&r("span",{className:"font-mono text-[length:var(--size-label,15px)] uppercase tracking-[0.3em] text-accent",children:p(e.process)}),e.wheel&&r("h2",{className:"font-heading2 text-[length:min(var(--size-headingMedium,clamp(42px,4.5vw,60px)),var(--sf-heading-max,9999px))] font-medium uppercase leading-[0.95] tracking-[-0.025em]",children:Y(e.wheel,!1)}),e.car&&n("div",{className:"font-heading3 text-[length:var(--size-headingSmall,27px)] leading-[1.4] text-fg",children:["on ",r("em",{className:"font-serif font-normal italic text-accent tracking-[-0.01em]",children:p(e.car,!0)})]}),n("dl",{className:"mt-3 grid grid-cols-[auto_1fr] gap-x-7 gap-y-[18px] border-y border-line py-[30px] font-mono text-[length:var(--size-label,15px)] uppercase tracking-[0.22em]",children:[e.wheel&&n(m,{children:[r("dt",{className:"text-fg-dim",children:"Wheel"}),r("dd",{className:"text-fg",children:p(e.wheel)})]}),e.process&&n(m,{children:[r("dt",{className:"text-fg-dim",children:"Process"}),r("dd",{className:"text-fg",children:p(e.process)})]}),e.finish&&n(m,{children:[r("dt",{className:"text-fg-dim",children:"Finish"}),r("dd",{className:"text-fg",children:p(e.finish)})]}),e.car&&n(m,{children:[r("dt",{className:"text-fg-dim",children:"Vehicle"}),r("dd",{className:"text-fg",children:p(e.car)})]})]}),n("div",{className:"mt-auto flex flex-col gap-3.5 pt-6",children:[n(_,{href:e.href||"/wheels",onClick:()=>g(!1),className:"group flex items-center justify-between gap-6 border border-btn bg-btn px-9 py-6 font-mono text-[length:var(--size-label,16px)] uppercase tracking-[0.3em] text-btn-ink transition-colors hover:border-fg hover:bg-fg",children:[r("span",{children:"View product"}),r("span",{className:"transition-transform group-hover:translate-x-[6px]",children:"→"})]}),n(_,{href:b,onClick:()=>g(!1),className:"flex items-center justify-between gap-6 border border-line px-9 py-6 font-mono text-[length:var(--size-label,16px)] uppercase tracking-[0.3em] text-fg transition-colors hover:border-accent hover:text-accent",children:[r("span",{children:"See more builds"}),r("span",{children:"→"})]}),n(_,{href:v,onClick:()=>g(!1),className:"flex items-center justify-between gap-6 border border-line px-9 py-6 font-mono text-[length:var(--size-label,16px)] uppercase tracking-[0.3em] text-fg transition-colors hover:border-accent hover:text-accent",children:[r("span",{children:"Submit your build"}),r("span",{children:"→"})]})]})]}):!O&&r(ue,{build:e})]})})]})}function W(t){return[t.process,t.car,t.finish].filter((o,l,s)=>!!o&&o!==t.wheel&&s.indexOf(o)===l)}function xe(t){return!!t.wheel||W(t).length>0}function D(t){const o=t.wheel||t.car;return o?`Open photo of ${o}`:"Open photo"}function ue({build:t}){const o=t.wheel,l=W(t);return n("div",{className:"flex flex-col gap-[24px] px-[60px] py-[72px] max-view-desktop:px-9 max-view-desktop:py-[54px]",children:[o&&r("h2",{className:"font-heading2 text-[length:min(var(--size-headingMedium,clamp(42px,4.5vw,60px)),var(--sf-heading-max,9999px))] font-medium uppercase leading-[0.95] tracking-[-0.025em]",children:Y(o,!1)}),l.map(s=>r("p",{className:"text-[length:var(--size-body,18px)] leading-[1.5] text-fg",children:p(s)},s))]})}export{de as GALLERY_GRID_ATTR,Pe as GALLERY_ITEM_HINTS,ze as GALLERY_ITEM_SEEDS,T as GALLERY_TILE_ATTR,Oe as GALLERY_TILE_PARTS,ie as GalleryLinksContext,ce as GalleryTilesContext,he as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{jsx as t,jsxs as r,Fragment as y}from"react/jsx-runtime";import $e from"next/link";import{useMemo as W,useState as N}from"react";import{slugify as F}from"efficient-shell/format";import{stripMarkup as T}from"efficient-web-builder/format/lib/markup";import{renderChrome as k,renderGold as i,renderHeadline as Ce}from"efficient-web-builder/render/components/goldPhrases";import G from"efficient-web-builder/render/components/Placeholder";import je,{LightboxClose as Se}from"./Lightbox.js";import ze from"./ThemedSelect.js";import{say as $}from"efficient-web-builder/format/lib/editor-words";const l={bodyUpTo720:"max-view-tablet:text-[length:var(--size-body,15px)]",labelUpTo720:"max-view-tablet:text-[length:var(--size-label,11px)]",body:"text-[length:var(--size-body,17px)]",labelXs:"text-[length:var(--size-label,11px)]",labelSmall:"text-[length:var(--size-label,12px)]",labelLarge:"text-[length:var(--size-label,13px)]",labelXl:"text-[length:var(--size-label,14px)]"};function Y(x){const g=[x.image,...(x.photos??[]).map(u=>u?.src)].filter(u=>!!u);return g.length?g:[""]}const O=6,Le=()=>Array.from({length:O},(x,g)=>({image:"",process:$("Tag"),eyebrow:$("Category"),name:$("Item name"),meta:$("{n} photos",{n:`0${g+1}`})}));function _e({mode:x="both",kicker:g,breadcrumbLabel:u,vehicleTabLabel:X="Gallery A",vehicleTitle:ee,vehicleBody1:te,vehicleBody2:ae,vehicleStats:re,vehicleCards:B,wheelTabLabel:U="Gallery B",wheelTitle:le,wheelBody1:ne,wheelBody2:se,wheelStats:oe,wheelCards:E,othersTitle:ie,othersBody1:ce,othersBody2:me,othersStats:pe,othersCards:de,showBreadcrumb:xe=!0,showStats:ge=!0,showIntro:ue=!0,showTabs:fe=!0,showFilters:H=!0,showCount:M=!0,showSort:I=!0,previewTab:C,previewHover:be=!1,editing:h=!1}){const j=x==="both",v=j?["vehicles","wheels"]:x==="wheels"?["wheels"]:x==="others"?["others"]:["vehicles"],[Z,he]=N(v[0]),w=(h&&j&&C&&v.includes(C)?C:null)??(v.includes(Z)?Z:v[0]),ve=h&&be,[S,D]=N("all"),[z,we]=N("newest"),[L,b]=N(null),n=w==="vehicles"?{title:ee,body1:te,body2:ae,stats:re??[],cards:B??[],unit:"items",word:X}:w==="others"?{title:ie,body1:ce,body2:me,stats:pe??[],cards:de??[],unit:"items",word:"Others"}:{title:le,body1:ne,body2:se,stats:oe??[],cards:E??[],unit:"items",word:U},V=W(()=>{const e=[];for(const a of n.cards)a.process&&!e.includes(a.process)&&e.push(a.process);return e},[n.cards]),_=S!=="all"&&V.includes(S)?S:"all",q=_==="all"?n.cards:n.cards.filter(e=>e.process===_),J=W(()=>{const e=[...q];return z==="name"&&e.sort((a,o)=>(a.name??"").localeCompare(o.name??"")),e},[q,z]),K=n.cards.length===0,A=h&&K,P=A?Le():J,ye=A?O:n.cards.length,Ne=A?O:J.length,Q=g?`${g} · ${T(n.word)}`:void 0;function ke(e){e!==w&&(he(e),D("all"))}return r("section",{className:"relative z-[2] bg-bg",children:[xe&&r("nav",{className:`mx-auto flex max-w-[var(--sf-site-width,1600px)] items-center gap-4 border-b border-line px-[var(--sf-site-gutter,40px)] py-6 font-mono ${l.labelLarge} uppercase tracking-[0.2em] text-fg-dim max-view-tablet:px-[min(20px,var(--sf-site-gutter,40px))] max-view-tablet:py-4`,children:[t("span",{className:"hover:text-fg",children:"Home"}),t("span",{className:"opacity-40",children:"/"}),t("span",{className:"text-fg",children:u?k(u):"Gallery"})]}),r("div",{className:"mx-auto grid max-w-[var(--sf-site-width,1600px)] grid-cols-[auto_1fr_auto] items-end gap-[60px] border-b border-line px-[var(--sf-site-gutter,40px)] pt-[100px] pb-[60px] max-view-desktop:grid-cols-1 max-view-desktop:gap-5 max-view-desktop:px-[min(24px,var(--sf-site-gutter,40px))] max-view-desktop:pt-[60px]",children:[t("span",{className:`pb-4 font-mono ${l.labelXl} uppercase tracking-[0.3em] text-accent`,children:Q?i(Q):null}),t("h2",{className:"font-display text-[length:min(var(--size-headingLarge,clamp(64px,9vw,140px)),var(--sf-heading-max,9999px))] font-medium uppercase leading-[0.9] tracking-[-0.04em]",children:n.title?Ce(n.title,!0):null}),t("div",{className:`pb-4 text-right font-mono ${l.labelLarge} uppercase leading-[1.8] tracking-[0.18em] text-fg-dim max-view-desktop:text-left`,children:ge&&n.stats.map((e,a)=>r("div",{children:[e.value?t("strong",{className:"font-normal text-fg",children:i(e.value)}):null," ",e.label?i(e.label):null]},a))})]}),ue&&(n.body1||n.body2)&&r("div",{className:"mx-auto grid max-w-[var(--sf-site-width,1600px)] grid-cols-2 gap-[60px] px-[var(--sf-site-gutter,40px)] pt-8 max-view-desktop:grid-cols-1 max-view-desktop:gap-4 max-view-desktop:px-[min(24px,var(--sf-site-gutter,40px))]",children:[n.body1&&t("p",{className:`max-w-[540px] font-display ${l.body} leading-[1.6] text-fg-dim`,children:i(n.body1)}),n.body2&&t("p",{className:`max-w-[540px] font-display ${l.body} leading-[1.6] text-fg-dim`,children:i(n.body2)})]}),j&&fe&&t("div",{className:"mx-auto mt-10 flex max-w-[var(--sf-site-width,1600px)] items-stretch border-y border-line px-[var(--sf-site-gutter,40px)] max-view-desktop:px-[min(24px,var(--sf-site-gutter,40px))] max-view-tablet:px-3",children:["vehicles","wheels"].map((e,a)=>{const o=w===e,c=e==="vehicles"?X:U,f=e==="vehicles"?(B??[]).length:(E??[]).length,m=(c||"").trim().split(/\s+/),p=m.slice(0,-1).join(" "),s=m.slice(-1)[0]??"";return r("button",{type:"button",onClick:()=>ke(e),className:["group relative grid flex-1 cursor-pointer grid-cols-[auto_1fr_auto] items-end gap-5 px-6 py-8 text-left transition-colors",a===0?"border-r border-line":"","max-view-tablet:grid-cols-[auto_1fr] max-view-tablet:items-center max-view-tablet:gap-2 max-view-tablet:px-3 max-view-tablet:py-3",o?"bg-surface":"hover:bg-fg/[0.04]"].join(" "),children:[t("span",{className:[`pb-2 font-mono ${l.labelLarge} tracking-[0.3em] max-view-tablet:pb-0 ${l.labelUpTo720} max-view-tablet:tracking-[0.24em]`,o?"text-accent":"text-fg-dim group-hover:text-accent"].join(" "),children:a===0?"A":"B"}),r("span",{className:`font-heading2 text-[length:min(var(--size-headingMedium,clamp(28px,3.6vw,48px)),var(--sf-heading-max,9999px))] font-medium uppercase leading-none tracking-[-0.02em] ${l.bodyUpTo720}`,children:[p?r(y,{children:[k(p)," "]}):null,t("em",{className:"font-normal italic text-accent",children:k(s)})]}),r("span",{className:`pb-2 text-right font-mono ${l.labelSmall} uppercase leading-[1.7] tracking-[0.24em] text-fg-dim max-view-tablet:hidden`,children:[t("strong",{className:"font-normal text-fg",children:f})," ","items",t("br",{}),e==="vehicles"?"Community photos":"Featured photos"]}),o&&t("span",{className:"pointer-events-none absolute inset-x-0 -bottom-px h-0.5 bg-accent"})]},e)})}),(H||M||I)&&r("div",{className:"mx-auto grid max-w-[var(--sf-site-width,1600px)] grid-cols-[auto_1fr_auto] items-center gap-8 border-b border-line px-[var(--sf-site-gutter,40px)] py-5 max-view-tablet:grid-cols-1 max-view-tablet:gap-4 max-view-tablet:px-[min(20px,var(--sf-site-gutter,40px))] max-view-tablet:py-3",style:{background:"color-mix(in oklab, var(--bg) 92%, transparent)"},children:[t("div",{className:"flex flex-wrap gap-1",children:H&&["all",...V].map(e=>{const a=_===e,o=e==="all"?"All":e;return t("button",{type:"button",onClick:()=>D(e),className:[`cursor-pointer border px-4 py-3 font-mono ${l.labelLarge} uppercase tracking-[0.2em] transition-colors`,a?"border-fg bg-fg text-bg":"border-transparent text-fg-dim hover:text-fg"].join(" "),children:k(o)},e)})}),M?r("div",{className:`text-center font-mono ${l.labelLarge} uppercase tracking-[0.2em] text-fg-dim`,children:[t("strong",{className:"font-normal text-accent",children:Ne})," / ",ye," ",n.unit]}):t("div",{}),I?r("div",{className:`flex items-center gap-3 font-mono ${l.labelLarge} uppercase tracking-[0.18em] text-fg-dim`,children:[t("span",{children:"Sort"}),r(ze,{value:z,onChange:e=>we(e.target.value),className:`cursor-pointer border border-line bg-bg px-3 py-2 font-mono ${l.labelLarge} uppercase tracking-[0.18em] text-fg`,children:[t("option",{value:"newest",children:"Newest"}),t("option",{value:"featured",children:"Featured"}),t("option",{value:"name",children:"Name A–Z"})]})]}):t("div",{})]}),t("div",{className:"mx-auto max-w-[var(--sf-site-width,1600px)] px-[var(--sf-site-gutter,40px)] pt-5 pb-20 max-view-desktop:px-[min(24px,var(--sf-site-gutter,40px))] max-view-tablet:px-[min(20px,var(--sf-site-gutter,40px))]",children:P.length>0?t("div",{className:"grid grid-cols-6 gap-2 max-view-desktop:grid-cols-2 max-view-tablet:grid-cols-1",children:P.map((e,a)=>{const o=Y(e)[0],f=`group relative block aspect-[4/3] w-full overflow-hidden bg-surface-2 text-left ${a<2?"col-span-3 max-view-desktop:col-span-1":"col-span-2 max-view-desktop:col-span-1"}`,m=`${e.name??"card"}-${a}`,p=r(y,{children:[t(G,{label:F(e.name)||`gallery-card-${a+1}`,src:o||void 0,alt:T(e.name??""),sizes:"(max-width: 720px) 100vw, (max-width: 1100px) 50vw, 33vw",className:`transition-transform duration-700 ${ve?"scale-[1.04]":"group-hover:scale-[1.04]"}`}),r("div",{className:"pointer-events-none absolute inset-0 z-10 flex flex-col justify-between p-6 max-view-tablet:p-3",style:{background:"linear-gradient(180deg, rgba(10,10,10,.55) 0%, transparent 35%, transparent 55%, rgba(10,10,10,.92) 100%)"},children:[r("div",{className:`flex items-start justify-between font-mono ${l.labelSmall} uppercase tracking-[0.24em]`,children:[e.process?t("span",{className:"text-accent",children:i(e.process)}):t("span",{}),r("span",{className:"text-overlay-fg/70",children:[String(a+1).padStart(2,"0")," / ",String(P.length).padStart(2,"0")]})]}),r("div",{className:"flex flex-col gap-2",children:[e.eyebrow&&t("div",{className:`font-mono ${l.labelSmall} uppercase tracking-[0.24em] text-accent`,children:i(e.eyebrow)}),e.name&&t("div",{className:"font-heading3 text-[length:var(--size-headingSmall,clamp(22px,2.4vw,32px))] font-medium uppercase leading-none tracking-[-0.02em] text-overlay-fg",children:i(e.name)}),e.meta&&t("div",{className:`flex flex-wrap gap-3 pt-1 font-mono ${l.labelXs} uppercase tracking-[0.2em] text-overlay-fg/70`,children:t("span",{children:i(e.meta)})})]})]})]});return h?t("div",{className:f,children:p},m):t("button",{type:"button",onClick:()=>b({card:e,index:0}),"aria-label":`Open ${e.name??"gallery item"}`,className:`${f} cursor-pointer focus:outline-none focus-visible:outline focus-visible:outline-2 focus-visible:outline-accent focus-visible:outline-offset-2`,children:p},m)})}):t("div",{className:`py-20 text-center font-mono ${l.labelXl} uppercase tracking-[0.2em] text-fg-dim`,children:K?"No items in this gallery yet.":"No items match this filter."})}),L&&(()=>{const e=Y(L.card),{card:a,index:o}=L,c=e.length,f=e[o]??e[0]??"",m=s=>b(d=>d&&{...d,index:(d.index+s+c)%c}),p=[a.process,a.meta].filter(Boolean).join(" · ");return r(je,{open:!0,onClose:()=>b(null),label:a.name??"Gallery item",onPrev:c>1?()=>m(-1):void 0,onNext:c>1?()=>m(1):void 0,className:"flex cursor-zoom-out flex-col items-center justify-center p-6 max-view-tablet:p-3",children:[r("div",{className:"relative flex w-full flex-1 items-center justify-center",children:[t("div",{className:"relative h-full max-h-[72vh] w-full max-w-[92vw]",children:t(G,{label:F(a.name)||"gallery-photo",src:f||void 0,alt:T(a.name??""),objectFit:"contain",sizes:"92vw"})}),c>1&&r(y,{children:[t("button",{type:"button","aria-label":"Previous photo",onClick:s=>{s.stopPropagation(),m(-1)},className:"absolute left-2 top-1/2 flex h-12 w-12 -translate-y-1/2 cursor-pointer items-center justify-center border border-fg-dim/40 bg-overlay-scrim/40 text-fg-dim transition-colors hover:border-accent hover:text-accent",children:"◁"}),t("button",{type:"button","aria-label":"Next photo",onClick:s=>{s.stopPropagation(),m(1)},className:"absolute right-2 top-1/2 flex h-12 w-12 -translate-y-1/2 cursor-pointer items-center justify-center border border-fg-dim/40 bg-overlay-scrim/40 text-fg-dim transition-colors hover:border-accent hover:text-accent",children:"▷"})]})]}),r("div",{className:`mt-5 flex flex-col items-center gap-3 text-center font-mono ${l.labelSmall} uppercase tracking-[0.2em] text-fg-dim`,onClick:s=>s.stopPropagation(),children:[r("div",{className:"flex flex-col items-center gap-1",children:[a.name&&t("span",{className:"text-accent",children:i(a.name)}),a.eyebrow&&t("span",{children:i(a.eyebrow)}),r("span",{className:"text-fg-dim/70",children:[p?r(y,{children:[i(p)," · "]}):null,o+1," / ",c]})]}),a.href&&t($e,{href:a.href,onClick:()=>b(null),className:`cursor-pointer border border-btn bg-btn/[0.08] px-5 py-3 font-mono ${l.labelLarge} uppercase tracking-[0.28em] text-btn transition-colors hover:bg-btn hover:text-btn-ink`,children:"View Product →"})]}),c>1&&t("div",{onClick:s=>s.stopPropagation(),className:"mt-5 flex max-w-[92vw] gap-2 overflow-x-auto pb-1",children:e.map((s,d)=>t("button",{type:"button","aria-label":`Photo ${d+1}`,onClick:()=>b(R=>R&&{...R,index:d}),className:["relative h-16 w-24 shrink-0 cursor-pointer overflow-hidden border transition-colors max-view-tablet:h-12 max-view-tablet:w-16",d===o?"border-accent":"border-line opacity-60 hover:border-fg-dim hover:opacity-100"].join(" "),children:t(G,{label:F(a.name)||"gallery-photo",src:s||void 0,alt:"",sizes:"120px"})},`${s}-${d}`))}),t(Se,{})]})})()]})}export{_e as default};
|
|
1
|
+
"use client";import{jsx as t,jsxs as r,Fragment as y}from"react/jsx-runtime";import $e from"next/link";import{useMemo as W,useState as N}from"react";import{slugify as F}from"efficient-shell/format";import{stripMarkup as T}from"efficient-web-builder/format/lib/markup";import{renderChrome as k,renderGold as i,renderHeadline as Ce}from"efficient-web-builder/render/components/goldPhrases";import G from"efficient-web-builder/render/components/Placeholder";import je,{LightboxClose as Se}from"./Lightbox.js";import ze from"./ThemedSelect.js";import{say as $}from"efficient-web-builder/format/lib/editor-words";import{HideTaker as Le}from"efficient-web-builder/render/components/ViewHideRoot";const l={bodyUpTo720:"max-view-tablet:text-[length:var(--size-body,15px)]",labelUpTo720:"max-view-tablet:text-[length:var(--size-label,11px)]",body:"text-[length:var(--size-body,17px)]",labelXs:"text-[length:var(--size-label,11px)]",labelSmall:"text-[length:var(--size-label,12px)]",labelLarge:"text-[length:var(--size-label,13px)]",labelXl:"text-[length:var(--size-label,14px)]"};function Y(x){const g=[x.image,...(x.photos??[]).map(f=>f?.src)].filter(f=>!!f);return g.length?g:[""]}const O=6,_e=()=>Array.from({length:O},(x,g)=>({image:"",process:$("Tag"),eyebrow:$("Category"),name:$("Item name"),meta:$("{n} photos",{n:`0${g+1}`})}));function Ae({mode:x="both",kicker:g,breadcrumbLabel:f,vehicleTabLabel:X="Gallery A",vehicleTitle:ee,vehicleBody1:te,vehicleBody2:ae,vehicleStats:re,vehicleCards:B,wheelTabLabel:U="Gallery B",wheelTitle:le,wheelBody1:ne,wheelBody2:se,wheelStats:oe,wheelCards:H,othersTitle:ie,othersBody1:ce,othersBody2:me,othersStats:pe,othersCards:de,showBreadcrumb:xe=!0,showStats:ge=!0,showIntro:fe=!0,showTabs:ue=!0,showFilters:E=!0,showCount:M=!0,showSort:I=!0,previewTab:C,previewHover:be=!1,editing:h=!1}){const j=x==="both",v=j?["vehicles","wheels"]:x==="wheels"?["wheels"]:x==="others"?["others"]:["vehicles"],[Z,he]=N(v[0]),w=(h&&j&&C&&v.includes(C)?C:null)??(v.includes(Z)?Z:v[0]),ve=h&&be,[S,D]=N("all"),[z,we]=N("newest"),[L,b]=N(null),n=w==="vehicles"?{title:ee,body1:te,body2:ae,stats:re??[],cards:B??[],unit:"items",word:X}:w==="others"?{title:ie,body1:ce,body2:me,stats:pe??[],cards:de??[],unit:"items",word:"Others"}:{title:le,body1:ne,body2:se,stats:oe??[],cards:H??[],unit:"items",word:U},V=W(()=>{const e=[];for(const a of n.cards)a.process&&!e.includes(a.process)&&e.push(a.process);return e},[n.cards]),_=S!=="all"&&V.includes(S)?S:"all",q=_==="all"?n.cards:n.cards.filter(e=>e.process===_),J=W(()=>{const e=[...q];return z==="name"&&e.sort((a,o)=>(a.name??"").localeCompare(o.name??"")),e},[q,z]),K=n.cards.length===0,A=h&&K,P=A?_e():J,ye=A?O:n.cards.length,Ne=A?O:J.length,Q=g?`${g} · ${T(n.word)}`:void 0;function ke(e){e!==w&&(he(e),D("all"))}return r(Le,{as:"section",className:"relative z-[2] bg-bg",children:[xe&&r("nav",{className:`mx-auto flex max-w-[var(--sf-site-width,1600px)] items-center gap-4 border-b border-line px-[var(--sf-site-gutter,40px)] py-6 font-mono ${l.labelLarge} uppercase tracking-[0.2em] text-fg-dim max-view-tablet:px-[min(20px,var(--sf-site-gutter,40px))] max-view-tablet:py-4`,children:[t("span",{className:"hover:text-fg",children:"Home"}),t("span",{className:"opacity-40",children:"/"}),t("span",{className:"text-fg",children:f?k(f):"Gallery"})]}),r("div",{className:"mx-auto grid max-w-[var(--sf-site-width,1600px)] grid-cols-[auto_1fr_auto] items-end gap-[60px] border-b border-line px-[var(--sf-site-gutter,40px)] pt-[100px] pb-[60px] max-view-desktop:grid-cols-1 max-view-desktop:gap-5 max-view-desktop:px-[min(24px,var(--sf-site-gutter,40px))] max-view-desktop:pt-[60px]",children:[t("span",{className:`pb-4 font-mono ${l.labelXl} uppercase tracking-[0.3em] text-accent`,children:Q?i(Q):null}),t("h2",{className:"font-display text-[length:min(var(--size-headingLarge,clamp(64px,9vw,140px)),var(--sf-heading-max,9999px))] font-medium uppercase leading-[0.9] tracking-[-0.04em]",children:n.title?Ce(n.title,!0):null}),t("div",{className:`pb-4 text-right font-mono ${l.labelLarge} uppercase leading-[1.8] tracking-[0.18em] text-fg-dim max-view-desktop:text-left`,children:ge&&n.stats.map((e,a)=>r("div",{children:[e.value?t("strong",{className:"font-normal text-fg",children:i(e.value)}):null," ",e.label?i(e.label):null]},a))})]}),fe&&(n.body1||n.body2)&&r("div",{className:"mx-auto grid max-w-[var(--sf-site-width,1600px)] grid-cols-2 gap-[60px] px-[var(--sf-site-gutter,40px)] pt-8 max-view-desktop:grid-cols-1 max-view-desktop:gap-4 max-view-desktop:px-[min(24px,var(--sf-site-gutter,40px))]",children:[n.body1&&t("p",{className:`max-w-[540px] font-display ${l.body} leading-[1.6] text-fg-dim`,children:i(n.body1)}),n.body2&&t("p",{className:`max-w-[540px] font-display ${l.body} leading-[1.6] text-fg-dim`,children:i(n.body2)})]}),j&&ue&&t("div",{className:"mx-auto mt-10 flex max-w-[var(--sf-site-width,1600px)] items-stretch border-y border-line px-[var(--sf-site-gutter,40px)] max-view-desktop:px-[min(24px,var(--sf-site-gutter,40px))] max-view-tablet:px-3",children:["vehicles","wheels"].map((e,a)=>{const o=w===e,c=e==="vehicles"?X:U,u=e==="vehicles"?(B??[]).length:(H??[]).length,m=(c||"").trim().split(/\s+/),p=m.slice(0,-1).join(" "),s=m.slice(-1)[0]??"";return r("button",{type:"button",onClick:()=>ke(e),className:["group relative grid flex-1 cursor-pointer grid-cols-[auto_1fr_auto] items-end gap-5 px-6 py-8 text-left transition-colors",a===0?"border-r border-line":"","max-view-tablet:grid-cols-[auto_1fr] max-view-tablet:items-center max-view-tablet:gap-2 max-view-tablet:px-3 max-view-tablet:py-3",o?"bg-surface":"hover:bg-fg/[0.04]"].join(" "),children:[t("span",{className:[`pb-2 font-mono ${l.labelLarge} tracking-[0.3em] max-view-tablet:pb-0 ${l.labelUpTo720} max-view-tablet:tracking-[0.24em]`,o?"text-accent":"text-fg-dim group-hover:text-accent"].join(" "),children:a===0?"A":"B"}),r("span",{className:`font-heading2 text-[length:min(var(--size-headingMedium,clamp(28px,3.6vw,48px)),var(--sf-heading-max,9999px))] font-medium uppercase leading-none tracking-[-0.02em] ${l.bodyUpTo720}`,children:[p?r(y,{children:[k(p)," "]}):null,t("em",{className:"font-normal italic text-accent",children:k(s)})]}),r("span",{className:`pb-2 text-right font-mono ${l.labelSmall} uppercase leading-[1.7] tracking-[0.24em] text-fg-dim max-view-tablet:hidden`,children:[t("strong",{className:"font-normal text-fg",children:u})," ","items",t("br",{}),e==="vehicles"?"Community photos":"Featured photos"]}),o&&t("span",{className:"pointer-events-none absolute inset-x-0 -bottom-px h-0.5 bg-accent"})]},e)})}),(E||M||I)&&r("div",{className:"mx-auto grid max-w-[var(--sf-site-width,1600px)] grid-cols-[auto_1fr_auto] items-center gap-8 border-b border-line px-[var(--sf-site-gutter,40px)] py-5 max-view-tablet:grid-cols-1 max-view-tablet:gap-4 max-view-tablet:px-[min(20px,var(--sf-site-gutter,40px))] max-view-tablet:py-3",style:{background:"color-mix(in oklab, var(--bg) 92%, transparent)"},children:[t("div",{className:"flex flex-wrap gap-1",children:E&&["all",...V].map(e=>{const a=_===e,o=e==="all"?"All":e;return t("button",{type:"button",onClick:()=>D(e),className:[`cursor-pointer border px-4 py-3 font-mono ${l.labelLarge} uppercase tracking-[0.2em] transition-colors`,a?"border-fg bg-fg text-bg":"border-transparent text-fg-dim hover:text-fg"].join(" "),children:k(o)},e)})}),M?r("div",{className:`text-center font-mono ${l.labelLarge} uppercase tracking-[0.2em] text-fg-dim`,children:[t("strong",{className:"font-normal text-accent",children:Ne})," / ",ye," ",n.unit]}):t("div",{}),I?r("div",{className:`flex items-center gap-3 font-mono ${l.labelLarge} uppercase tracking-[0.18em] text-fg-dim`,children:[t("span",{children:"Sort"}),r(ze,{value:z,onChange:e=>we(e.target.value),className:`cursor-pointer border border-line bg-bg px-3 py-2 font-mono ${l.labelLarge} uppercase tracking-[0.18em] text-fg`,children:[t("option",{value:"newest",children:"Newest"}),t("option",{value:"featured",children:"Featured"}),t("option",{value:"name",children:"Name A–Z"})]})]}):t("div",{})]}),t("div",{className:"mx-auto max-w-[var(--sf-site-width,1600px)] px-[var(--sf-site-gutter,40px)] pt-5 pb-20 max-view-desktop:px-[min(24px,var(--sf-site-gutter,40px))] max-view-tablet:px-[min(20px,var(--sf-site-gutter,40px))]",children:P.length>0?t("div",{className:"grid grid-cols-6 gap-2 max-view-desktop:grid-cols-2 max-view-tablet:grid-cols-1",children:P.map((e,a)=>{const o=Y(e)[0],u=`group relative block aspect-[4/3] w-full overflow-hidden bg-surface-2 text-left ${a<2?"col-span-3 max-view-desktop:col-span-1":"col-span-2 max-view-desktop:col-span-1"}`,m=`${e.name??"card"}-${a}`,p=r(y,{children:[t(G,{label:F(e.name)||`gallery-card-${a+1}`,src:o||void 0,alt:T(e.name??""),sizes:"(max-width: 720px) 100vw, (max-width: 1100px) 50vw, 33vw",className:`transition-transform duration-700 ${ve?"scale-[1.04]":"group-hover:scale-[1.04]"}`}),r("div",{className:"pointer-events-none absolute inset-0 z-10 flex flex-col justify-between p-6 max-view-tablet:p-3",style:{background:"linear-gradient(180deg, rgba(10,10,10,.55) 0%, transparent 35%, transparent 55%, rgba(10,10,10,.92) 100%)"},children:[r("div",{className:`flex items-start justify-between font-mono ${l.labelSmall} uppercase tracking-[0.24em]`,children:[e.process?t("span",{className:"text-accent",children:i(e.process)}):t("span",{}),r("span",{className:"text-overlay-fg/70",children:[String(a+1).padStart(2,"0")," / ",String(P.length).padStart(2,"0")]})]}),r("div",{className:"flex flex-col gap-2",children:[e.eyebrow&&t("div",{className:`font-mono ${l.labelSmall} uppercase tracking-[0.24em] text-accent`,children:i(e.eyebrow)}),e.name&&t("div",{className:"font-heading3 text-[length:var(--size-headingSmall,clamp(22px,2.4vw,32px))] font-medium uppercase leading-none tracking-[-0.02em] text-overlay-fg",children:i(e.name)}),e.meta&&t("div",{className:`flex flex-wrap gap-3 pt-1 font-mono ${l.labelXs} uppercase tracking-[0.2em] text-overlay-fg/70`,children:t("span",{children:i(e.meta)})})]})]})]});return h?t("div",{className:u,children:p},m):t("button",{type:"button",onClick:()=>b({card:e,index:0}),"aria-label":`Open ${e.name??"gallery item"}`,className:`${u} cursor-pointer focus:outline-none focus-visible:outline focus-visible:outline-2 focus-visible:outline-accent focus-visible:outline-offset-2`,children:p},m)})}):t("div",{className:`py-20 text-center font-mono ${l.labelXl} uppercase tracking-[0.2em] text-fg-dim`,children:K?"No items in this gallery yet.":"No items match this filter."})}),L&&(()=>{const e=Y(L.card),{card:a,index:o}=L,c=e.length,u=e[o]??e[0]??"",m=s=>b(d=>d&&{...d,index:(d.index+s+c)%c}),p=[a.process,a.meta].filter(Boolean).join(" · ");return r(je,{open:!0,onClose:()=>b(null),label:a.name??"Gallery item",onPrev:c>1?()=>m(-1):void 0,onNext:c>1?()=>m(1):void 0,className:"flex cursor-zoom-out flex-col items-center justify-center p-6 max-view-tablet:p-3",children:[r("div",{className:"relative flex w-full flex-1 items-center justify-center",children:[t("div",{className:"relative h-full max-h-[72vh] w-full max-w-[92vw]",children:t(G,{label:F(a.name)||"gallery-photo",src:u||void 0,alt:T(a.name??""),objectFit:"contain",sizes:"92vw"})}),c>1&&r(y,{children:[t("button",{type:"button","aria-label":"Previous photo",onClick:s=>{s.stopPropagation(),m(-1)},className:"absolute left-2 top-1/2 flex h-12 w-12 -translate-y-1/2 cursor-pointer items-center justify-center border border-fg-dim/40 bg-overlay-scrim/40 text-fg-dim transition-colors hover:border-accent hover:text-accent",children:"◁"}),t("button",{type:"button","aria-label":"Next photo",onClick:s=>{s.stopPropagation(),m(1)},className:"absolute right-2 top-1/2 flex h-12 w-12 -translate-y-1/2 cursor-pointer items-center justify-center border border-fg-dim/40 bg-overlay-scrim/40 text-fg-dim transition-colors hover:border-accent hover:text-accent",children:"▷"})]})]}),r("div",{className:`mt-5 flex flex-col items-center gap-3 text-center font-mono ${l.labelSmall} uppercase tracking-[0.2em] text-fg-dim`,onClick:s=>s.stopPropagation(),children:[r("div",{className:"flex flex-col items-center gap-1",children:[a.name&&t("span",{className:"text-accent",children:i(a.name)}),a.eyebrow&&t("span",{children:i(a.eyebrow)}),r("span",{className:"text-fg-dim/70",children:[p?r(y,{children:[i(p)," · "]}):null,o+1," / ",c]})]}),a.href&&t($e,{href:a.href,onClick:()=>b(null),className:`cursor-pointer border border-btn bg-btn/[0.08] px-5 py-3 font-mono ${l.labelLarge} uppercase tracking-[0.28em] text-btn transition-colors hover:bg-btn hover:text-btn-ink`,children:"View Product →"})]}),c>1&&t("div",{onClick:s=>s.stopPropagation(),className:"mt-5 flex max-w-[92vw] gap-2 overflow-x-auto pb-1",children:e.map((s,d)=>t("button",{type:"button","aria-label":`Photo ${d+1}`,onClick:()=>b(R=>R&&{...R,index:d}),className:["relative h-16 w-24 shrink-0 cursor-pointer overflow-hidden border transition-colors max-view-tablet:h-12 max-view-tablet:w-16",d===o?"border-accent":"border-line opacity-60 hover:border-fg-dim hover:opacity-100"].join(" "),children:t(G,{label:F(a.name)||"gallery-photo",src:s||void 0,alt:"",sizes:"120px"})},`${s}-${d}`))}),t(Se,{})]})})()]})}export{Ae as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{jsx as t,jsxs as c,Fragment as b}from"react/jsx-runtime";import v from"next/link";import{createContext as h,useContext as g}from"react";import{CardTemplateRows as m}from"efficient-web-builder/render/components/CardRowContext";import{InsideSiteColumn as w}from"efficient-web-builder/render/components/SiteGutterFrame";import{
|
|
1
|
+
"use client";import{jsx as t,jsxs as c,Fragment as b}from"react/jsx-runtime";import v from"next/link";import{createContext as h,useContext as g}from"react";import{CardTemplateRows as m}from"efficient-web-builder/render/components/CardRowContext";import{InsideSiteColumn as w}from"efficient-web-builder/render/components/SiteGutterFrame";import{HideTaker as S}from"efficient-web-builder/render/components/ViewHideRoot";import{cardHoverOf as _}from"efficient-web-builder/format/lib/animation/hover";import{NO_FIELD_ANSWERS as y}from"../lib/content/field-usage.js";import{CARD_IMAGE_SIZES as I}from"../lib/sections/card-image-sizes.js";import{CardLookContext as f}from"./card-pieces/card-row.js";import{CardBuyDialog as R}from"./card-pieces/CardBuyButton.js";import{BundleCardStateProvider as E,useWheelCardState as P,WheelCardStateProvider as T}from"./card-pieces/ProductCardState.js";import{say as G}from"efficient-web-builder/format/lib/editor-words";import{CARD_INDEX_OPTIONS as A,cardIndexCss as N}from"efficient-web-builder/format/lib/sections/product-card-style";import{SHARED_ROWS_LIST_CLASS as D}from"efficient-web-builder/render/lib/content/box-shared-columns";import{GAP_ZONE_CLASS as L}from"efficient-web-builder/format/lib/content/container-gap";import{CARD_ROWS_GRID_CLASS as O,cardRowsGap as $,cardRowsGridStyle as k}from"./WheelCardFrame.js";function fe(e){return A.map(({value:r})=>r==="off"?"":N(e,r).replace(".sf-card-index::before",`.sf-card-index[data-format="${r}"]::before`)).join("")}function pe(e){return e.className.includes(L)?{className:`${e.className} ${O} ${D}`,style:{...e.style,...k($(e))}}:e}const F={ownerId:"",Template:void 0,hover:_({},"ProductGrid"),imageSizes:I,fieldUsage:y,reserveEyebrow:!1,editing:!1},p=h(F);function d(){return g(p)}function ue({value:e,children:r}){return t(p.Provider,{value:e,children:r})}function W(e){return{name:e.name??"",eyebrow:e.process??"",note:"",href:e.slug?`/wheels/${e.slug}`:""}}const u=e=>`/bundles/${e.slug}`;function j(e){return{name:e.name,eyebrow:"",note:e.subtitle??"",href:u(e)}}const z="sf-card sf-card-fill group relative flex flex-col bg-[var(--card-bg)] transition-colors duration-200 hover:bg-[var(--card-bg-hover)] [.sf-card-rows>&]:mb-[var(--sf-card-row-gap)]",B="sf-card group relative flex flex-col border border-line bg-bg transition-colors hover:border-accent",H="col-span-2 max-view-wide:col-span-1 @max-[720px]:col-span-1 [&:has([data-set-picture=one])]:col-span-1",U="relative z-[2] flex flex-1 flex-col pointer-events-none [&_a]:pointer-events-auto [&_button]:pointer-events-auto [&_input]:pointer-events-auto [&_select]:pointer-events-auto [&_label]:pointer-events-auto",Y="relative flex flex-1 flex-col";function x({copy:e,href:r,label:o,wide:n=!1,kit:a=!1,probes:l}){const{editing:i}=d(),s=a?B:z;return c(S,{as:"article",className:n?`${s} ${H}`:s,children:[l,!i&&r?t(v,{href:r,"aria-label":o,className:"absolute inset-0 z-[1]"}):null,t("div",{className:i?Y:U,children:t(w,{children:e})})]})}function K({copy:e}){const{wheel:r,sel:o,isSet:n}=P();return c(b,{children:[t(x,{copy:e,href:r.slug?`/wheels/${r.slug}`:"",label:r.name,wide:n,probes:o.probes}),t(R,{})]})}function M(e,r,o){const n=r.item;return t(T,{wheel:n,defaultFinish:o?.[r.index],children:t(f.Provider,{value:"catalog",children:t(K,{copy:e})})})}function xe({wheels:e,finishes:r,children:o}){const{ownerId:n,Template:a,editing:l}=d();return t(m,{ownerId:n,ownerType:"ProductGrid",Template:a,rows:e.map(W),items:e,fallback:l?t(C,{}):null,wrapCopy:(i,s)=>M(i,s,r),children:o})}function V(e,r){const o=r.item;return t(E,{bundle:o,children:t(f.Provider,{value:"catalog",children:t(x,{copy:e,href:u(o),label:o.name,kit:!0})})})}function Ce({bundles:e,children:r}){const{ownerId:o,Template:n,editing:a}=d();return t(m,{ownerId:o,ownerType:"ProductGrid",Template:n,rows:e.map(j),items:e,fallback:a?t(C,{}):null,wrapCopy:V,children:r})}function C(){return t("div",{"data-grid-card-empty":"",className:"p-4 text-center font-mono text-[length:var(--size-label,12px)] uppercase tracking-[0.2em] text-fg-dim",children:G("The card is empty. Add parts to its card template in Layers.")})}export{Ce as GridBundleCards,ue as GridCardProvider,xe as GridCards,j as bundleCardRow,u as bundlePagePath,pe as cardRowsGrid,fe as gridIndexCss,W as productCardRow,d as useGridCard};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{jsx as n,jsxs as
|
|
1
|
+
"use client";import{jsx as n,jsxs as p}from"react/jsx-runtime";import l from"next/link";import{useEffect as k,useId as $,useRef as g,useState as C}from"react";import{isLabelOnlyMenuUrl as h}from"../lib/menu-link.js";import{useTakeViewHide as j,withViewHide as m}from"efficient-web-builder/render/components/ViewHideRoot";function L({item:s,mobile:c=!1,onNavigate:y,dropdownAlign:b="start"}){const[o,t]=C(!1),u=$(),f=g(null),v=g(null),w=s.dropdownItems.length>0,d=!h(s.href),i=j();k(()=>{if(!o)return;const e=f.current?.ownerDocument??document,r=N=>{f.current?.contains(N.target)||t(!1)};return e.addEventListener("pointerdown",r),()=>e.removeEventListener("pointerdown",r)},[o]);const a=()=>{t(!1),y?.()};if(!w)return d?i.scope(n(l,{href:s.href,onClick:a,className:m(c?"flex min-h-11 items-center font-display text-3xl focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent":"whitespace-nowrap opacity-80 transition-opacity hover:opacity-100 focus-visible:rounded-sm focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent",i.className),...i.attrs,children:s.label})):i.scope(n("span",{className:m(c?"flex min-h-11 items-center font-display text-3xl":"whitespace-nowrap opacity-80",i.className),...i.attrs,children:s.label}));const x=n("button",{ref:v,type:"button","aria-label":`${o?"Close":"Open"} ${s.plainLabel} menu`,"aria-expanded":o,"aria-controls":u,onClick:()=>t(e=>!e),className:c?"flex h-11 w-11 shrink-0 items-center justify-center rounded-full focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent":"flex h-8 w-8 shrink-0 items-center justify-center rounded-full opacity-70 transition-opacity hover:opacity-100 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent",children:n("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",stroke:"currentColor",strokeWidth:"1.5","aria-hidden":"true",className:`transition-transform ${o?"rotate-180":""}`,children:n("path",{d:"m3 5 4 4 4-4"})})});return c?i.scope(p("div",{ref:f,className:i.className||void 0,...i.attrs,children:[p("div",{className:"flex min-h-11 items-center justify-between gap-3",children:[d?n(l,{href:s.href,onClick:a,className:"min-w-0 flex-1 font-display text-3xl focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent",children:s.label}):n("span",{className:"min-w-0 flex-1 font-display text-3xl",children:s.label}),x]}),o?n("div",{id:u,className:"mt-3 flex flex-col border-l border-line pl-5",children:s.dropdownItems.map((e,r)=>h(e.href)?n("span",{className:"flex min-h-11 items-center text-base opacity-80",children:e.label},`${e.href}-${r}`):n(l,{href:e.href,onClick:a,className:"flex min-h-11 items-center text-base opacity-80 transition-opacity hover:opacity-100 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent",children:e.label},`${e.href}-${r}`))}):null]})):i.scope(p("div",{ref:f,className:m("relative flex items-center whitespace-nowrap",i.className),...i.attrs,onMouseEnter:()=>t(!0),onMouseLeave:()=>t(!1),onBlurCapture:e=>{e.currentTarget.contains(e.relatedTarget)||t(!1)},onKeyDown:e=>{e.key==="Escape"&&(t(!1),v.current?.focus())},children:[d?n(l,{href:s.href,onClick:a,onFocus:()=>t(!0),className:"opacity-80 transition-opacity hover:opacity-100 focus-visible:rounded-sm focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent",children:s.label}):n("span",{className:"opacity-80",children:s.label}),x,o?n("div",{id:u,className:`absolute top-full z-[60] w-72 pt-3 text-fg ${b==="end"?"right-0":b==="center"?"left-1/2 -translate-x-1/2":"left-0"}`,children:n("div",{className:"overflow-hidden rounded-lg border border-line bg-bg p-2 shadow-xl",children:s.dropdownItems.map((e,r)=>h(e.href)?n("span",{className:"flex min-h-11 items-center rounded-md px-4 py-2 text-sm opacity-80",children:e.label},`${e.href}-${r}`):n(l,{href:e.href,onClick:a,className:"flex min-h-11 items-center rounded-md px-4 py-2 text-sm opacity-80 transition-[background,opacity] hover:bg-[var(--card-bg)] hover:opacity-100 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent",children:e.label},`${e.href}-${r}`))})}):null]}))}export{L as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{jsx as o}from"react/jsx-runtime";import{useCart as
|
|
1
|
+
"use client";import{jsx as o}from"react/jsx-runtime";import{useCart as c}from"./CartContext.js";import i,{useCountrySelectShows as a}from"./CountrySelect.js";import{AccountButton as m,CartButton as h,SearchButton as f}from"./HeaderTools.js";import p from"./ThemeToggle.js";import{useOfferToPhoneMenu as r}from"efficient-web-builder/render/components/PhoneMenuTools";import{useSearch as T}from"./SearchContext.js";import{useSiteSells as l,useSiteThemeSwitchShown as x}from"./SiteRecordContext.js";import{HideTaker as u}from"efficient-web-builder/render/components/ViewHideRoot";function N({style:e="icon",editing:t=!1}){const{open:s}=T(),n=l();return r(n?"search":null),n?o(u,{as:"span","data-phone-menu-tool":"search",className:"contents",children:o(f,{onClick:t?void 0:s,asText:e==="text"})}):null}function j({style:e="icon",editing:t=!1}){const{open:s,totals:n}=c();return l()?o(h,{onClick:t?()=>{}:s,count:n.sets,asText:e==="text",takesViewHide:!0}):null}function V({style:e="icon"}){const t=l();return r(t?"account":null),t?o(m,{asText:e==="text",takesViewHide:!0}):null}function M(){const e=x();return r(e?"theme":null),e?o(u,{as:"span","data-phone-menu-tool":"theme",className:"contents",children:o(p,{})}):null}function O({showAs:e}){const t=a();return r(t?"region":null),t?o(u,{as:"span","data-phone-menu-tool":"region",className:"contents",children:o(i,{showAs:e})}):null}export{V as AccountTool,j as CartTool,O as CountrySwitchTool,N as SearchTool,M as ThemeSwitchTool};
|
|
@@ -4,16 +4,18 @@ export declare const UTIL_WORDS: {
|
|
|
4
4
|
readonly cart: "Bag";
|
|
5
5
|
};
|
|
6
6
|
export declare const UTIL_WORD_CLASS = "whitespace-nowrap";
|
|
7
|
-
export declare function CartButton({ onClick, count, asText, className, }: {
|
|
7
|
+
export declare function CartButton({ onClick, count, asText, className, takesViewHide, }: {
|
|
8
8
|
onClick: () => void;
|
|
9
9
|
count: number;
|
|
10
10
|
asText?: boolean;
|
|
11
11
|
className?: string;
|
|
12
|
+
takesViewHide?: boolean;
|
|
12
13
|
}): import("react").JSX.Element;
|
|
13
|
-
export declare function AccountButton({ asText, className }: {
|
|
14
|
+
export declare function AccountButton({ asText, className, takesViewHide, }: {
|
|
14
15
|
asText?: boolean;
|
|
15
16
|
className?: string;
|
|
16
|
-
|
|
17
|
+
takesViewHide?: boolean;
|
|
18
|
+
}): import("react").ReactNode;
|
|
17
19
|
export declare function SearchButton({ onClick, asText, className, }: {
|
|
18
20
|
onClick?: () => void;
|
|
19
21
|
asText?: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{jsx as
|
|
1
|
+
"use client";import{jsx as t,jsxs as o}from"react/jsx-runtime";import p from"next/link";import{useEffect as h,useRef as d}from"react";import{CART_GLYPH as m}from"efficient-web-builder/render/components/cartGlyph";import f from"efficient-easel/screen/components/UiIcon";import{prefersReducedMotion as x}from"efficient-web-builder/render/components/useReducedMotion";import{HideTaker as b,NO_HIDE as g,useTakeViewHide as y,withViewHide as k}from"efficient-web-builder/render/components/ViewHideRoot";const s={search:"Search",account:"Account",cart:"Bag"},c="whitespace-nowrap";function w(r){return r>99?"99+":String(r)}function v({count:r,ref:e}){return t("span",{ref:e,"data-cart-badge":"","aria-hidden":"true",className:"pointer-events-none absolute -top-[7px] -right-[9px] inline-flex h-4 min-w-4 items-center justify-center rounded-full bg-current px-1 text-[10px] leading-none font-semibold tabular-nums",style:{letterSpacing:0},children:t("span",{style:{color:"var(--sf-header-ground, var(--bg))"},children:w(r)})})}function R({onClick:r,count:e,asText:n,className:i,takesViewHide:a=!1}){const l=d(null),u=d(e);return h(()=>{u.current!==e&&(u.current=e,!x()&&l.current?.animate([{transform:"scale(0.6)"},{transform:"scale(1)"}],{duration:180,easing:"ease-out"}))},[e]),t(b,{as:"button",takes:a,type:"button",onClick:r,"aria-label":`Open cart, ${e} item${e===1?"":"s"}`,className:`mono-eyebrow-ctl inline-flex items-center gap-2 opacity-80 transition-opacity hover:opacity-100 ${i??""}`,children:n?o("span",{className:c,children:[s.cart,e>0?` ${e}`:""]}):o("span",{className:"relative inline-flex",children:[t("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:m}),e>0?t(v,{count:e,ref:l}):null]})})}function $({asText:r,className:e,takesViewHide:n=!1}){const i=y(),a=n?i:g;return a.scope(t(p,{href:"/account","aria-label":"Account",className:k(`mono-eyebrow-ctl inline-flex items-center opacity-80 transition-opacity hover:opacity-100 ${e??""}`,a.className),...a.attrs,children:r?t("span",{className:c,children:s.account}):o("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[t("circle",{cx:"12",cy:"8",r:"3.4"}),t("path",{d:"M5 20a7 7 0 0 1 14 0"})]})}))}function A({onClick:r,asText:e,className:n}){return t("button",{type:"button",onClick:r,"aria-label":"Search",title:"Search (⌘K)",className:`mono-eyebrow-ctl inline-flex items-center opacity-80 transition-opacity hover:opacity-100 ${n??""}`,children:e?t("span",{className:c,children:s.search}):t(f,{name:"search",size:18,strokeWidth:1.6,rounded:!0})})}export{$ as AccountButton,R as CartButton,A as SearchButton,s as UTIL_WORDS,c as UTIL_WORD_CLASS};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{jsx as e,Fragment as
|
|
1
|
+
"use client";import{jsx as e,Fragment as s,jsxs as r}from"react/jsx-runtime";import{readHidable as l}from"efficient-easel/screen/lib/document/hidable";import{useSiteCopyright as p}from"./SiteRecordContext.js";import{useConsentControls as c}from"./ConsentContext.js";import{CONSENT_TEXT_BUTTON as d}from"./ConsentBanner.js";import{HideTaker as m}from"efficient-web-builder/render/components/ViewHideRoot";function u({copyright:i}={}){const o=p(),n=l(i),a=n.hidden?null:n.text.trim()||o,t=c();return r(m,{as:"div",className:"flex flex-wrap justify-between gap-x-6 gap-y-3 border-t border-line pt-6 font-mono text-[13px] uppercase tracking-[0.15em] text-fg-dim max-view-tablet:flex-col max-view-tablet:gap-3",children:[a!==null&&e("span",{children:a}),r("span",{className:"flex flex-wrap items-center gap-3 view-tablet:ml-auto",children:[e("span",{children:"Privacy"}),e("span",{"aria-hidden":!0,children:"·"}),e("span",{children:"Terms"}),e("span",{"aria-hidden":!0,children:"·"}),e("span",{children:"Cookies"}),t?.ready&&r(s,{children:[e("span",{"aria-hidden":!0,children:"·"}),e("button",{type:"button",className:`${d} text-left`,onClick:t.openPanel,children:t.rule.footerLink})]})]})]})}export{u as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{jsx as n,jsxs as
|
|
1
|
+
"use client";import{jsx as n,jsxs as m}from"react/jsx-runtime";import{createContext as b,useContext as h}from"react";import k from"next/link";import x from"./HeaderNavItem.js";import L from"./MenuPlaceholderLabel.js";import{useCardRow as N}from"efficient-web-builder/render/components/CardRowContext";import{renderGold as i}from"efficient-web-builder/render/components/goldPhrases";import{useTakeViewHide as w,withViewHide as u}from"efficient-web-builder/render/components/ViewHideRoot";import{isLabelOnlyMenuUrl as C,menuLinkKind as _}from"../lib/menu-link.js";import{CURRENT_LINE as f,TAB_CELLS as p}from"../lib/content/tab-strip.js";const g=b(null),d="opacity-80 transition-opacity hover:opacity-100";function c({item:e,label:l,link:r,onNavigate:t,current:s=!1,children:a}){const o=w();return C(e.url)?o.scope(n("span",{className:u(l,o.className),...o.attrs,children:i(e.label)})):o.scope(_(e.url)==="off-site"?m("a",{href:e.url,target:"_blank",rel:"noopener noreferrer",className:u(r,o.className),onClick:t,...o.attrs,children:[i(e.label),a]}):m(k,{href:e.url,className:u(r,o.className),onClick:t,"aria-current":s?"page":void 0,...o.attrs,children:[i(e.label),a]}))}function y(){const e=N(),l=h(g);if(!e||!l)return null;if(l.placeholder)return n(L,{});const r={label:e.row.label??"",url:e.row.href??""},t=!!l.current&&l.current.index===e.index&&l.current.href===r.url;if(l.place==="tab"){const a=p.tab(e.index===0,t);return n(c,{item:r,label:a,link:a,current:t,children:t?n("span",{className:p.underline}):null})}if(l.place==="column")return n(c,{item:r,label:"text-fg",link:"text-fg transition-colors hover:text-accent",current:t});if(l.place==="panel")return n(c,{item:r,label:"",link:` ${d}`,onNavigate:l.onNavigate,current:t});const s=e.item?.dropdown_items??[];return s.length?n(x,{item:{href:r.url,label:i(r.label),plainLabel:r.label,dropdownItems:s.map(a=>({href:a.url,label:i(a.label),plainLabel:a.label}))}}):t?n(c,{item:r,label:"",link:f.rowLink,current:!0,children:n("span",{"aria-hidden":"true",className:f.row})}):n(c,{item:r,label:"",link:` ${d}`})}export{g as MenuPlaceContext,y as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as r}from"react/jsx-runtime";import{MENU_PLACEHOLDER_LABEL as o}from"../lib/content/menu-placeholder.js";import{say as a}from"efficient-web-builder/format/lib/editor-words";function
|
|
1
|
+
import{jsx as r}from"react/jsx-runtime";import{MENU_PLACEHOLDER_LABEL as o}from"../lib/content/menu-placeholder.js";import{say as a}from"efficient-web-builder/format/lib/editor-words";import{HideTaker as e}from"efficient-web-builder/render/components/ViewHideRoot";function m(){return r(e,{as:"span",className:"opacity-50",children:a(o)})}export{m as default};
|
|
@@ -2,7 +2,7 @@ import type { CSSProperties } from "react";
|
|
|
2
2
|
import { type HeroView } from "./product-hero/hero-view.js";
|
|
3
3
|
import type { StoreProduct } from "../lib/catalog/store-product.js";
|
|
4
4
|
import { type HeroGalleryMode, type HeroImageFit } from "../lib/sections/hero-gallery.js";
|
|
5
|
-
export default function ProductGallery({ product, view, angleIdx, onSelect, isLight, onLightbox, galleryMode, imageFit, style, }: {
|
|
5
|
+
export default function ProductGallery({ product, view, angleIdx, onSelect, isLight, onLightbox, galleryMode, imageFit, style, takesViewHide, }: {
|
|
6
6
|
product: StoreProduct;
|
|
7
7
|
view: HeroView;
|
|
8
8
|
angleIdx: number;
|
|
@@ -12,4 +12,5 @@ export default function ProductGallery({ product, view, angleIdx, onSelect, isLi
|
|
|
12
12
|
galleryMode?: HeroGalleryMode;
|
|
13
13
|
imageFit?: HeroImageFit;
|
|
14
14
|
style?: CSSProperties;
|
|
15
|
+
takesViewHide?: boolean;
|
|
15
16
|
}): import("react").JSX.Element;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{jsx as t,jsxs as
|
|
1
|
+
"use client";import{jsx as t,jsxs as n,Fragment as y}from"react/jsx-runtime";import{photoLabel as b}from"./product-hero/hero-view.js";import{stageControls as C,useHeldStagePhoto as H}from"./product-hero/stage-photo.js";import{DEFAULT_HERO_GALLERY_MODE as k,DEFAULT_HERO_IMAGE_FIT as w,parseHeroGalleryMode as L,parseHeroImageFit as M,resolveHeroImageFit as S}from"../lib/sections/hero-gallery.js";import{productHasComposedRender as $}from"../lib/wheels/set-mode.js";import{HideTaker as F}from"efficient-web-builder/render/components/ViewHideRoot";function T({product:a,view:e,angleIdx:r,onSelect:c,isLight:d,onLightbox:p,galleryMode:i=k,imageFit:h=w,style:l,takesViewHide:m=!1}){const s=L(i),f=S(M(h),$(a));return n(F,{as:"div",takes:m,"data-hero-gallery":s,"data-hero-fit":f,className:s==="tiled"?"flex items-start gap-3 max-view-tablet:gap-2":void 0,style:l,children:[t("div",{className:s==="tiled"?"min-w-0 flex-1":void 0,children:t(A,{name:a.name,view:e,angleIdx:r,onSelect:c,isLight:d,onLightbox:p,fit:f})}),s!=="main"&&t(E,{name:a.name,view:e,angleIdx:r,onSelect:c,isLight:d,tiled:s==="tiled"})]})}function N(a){return a.photos.length>0?a.photos.length:a.thumbFallbackCells}const z=6;function A({name:a,view:e,angleIdx:r,onSelect:c,isLight:d,onLightbox:p,fit:i}){const h=e.photos[Math.min(r,e.photos.length-1)],l=H(e.photos,h),m=N(e),s=m>=2,f=String(m).padStart(2,"0"),x=Math.min(r,Math.max(e.photos.length-1,0)),v=s||e.captions[x]?b(e,x):"",u=[a,e.metaValue,v].filter(Boolean).join(" — "),g="max-view-tablet:static",_=["relative flex aspect-square items-center justify-center overflow-hidden max-view-tablet:col-span-2",d?"bg-bg":""].join(" ");return n("div",{className:"relative max-view-tablet:grid max-view-tablet:grid-cols-[minmax(0,1fr)_auto] max-view-tablet:items-start max-view-tablet:gap-x-3 max-view-tablet:gap-y-2",style:{color:e.tint},children:[n("div",{className:`absolute left-0 top-0 z-10 flex items-center gap-3 font-mono text-[length:var(--size-label,13px)] font-semibold uppercase tracking-[0.2em] text-fg ${g} max-view-tablet:min-w-0 max-view-tablet:flex-wrap max-view-tablet:gap-x-2 max-view-tablet:gap-y-1`,children:[s&&n(y,{children:[n("span",{className:"text-accent",children:[String(r+1).padStart(2,"0")," / ",f]}),t("span",{className:"text-fg-dim",children:"·"})]}),t("span",{children:a}),e.metaValue&&n(y,{children:[t("span",{className:"text-fg-dim",children:"·"}),t("span",{className:"text-accent",children:e.metaValue})]})]}),s&&t("div",{className:`absolute right-5 top-5 z-10 flex gap-1 ${g}`,children:C(r,m,c).map(o=>t("button",{type:"button","aria-label":o.label,title:o.label,onClick:o.onClick,className:"flex h-7 w-7 items-center justify-center border border-fg-dim/60 text-fg transition-colors hover:border-accent hover:text-accent",children:o.glyph},o.label))}),n("div",{className:_,children:[["top-3 left-3","top-3 right-3","bottom-3 left-3","bottom-3 right-3"].map((o,j)=>t("span",{className:`absolute ${o} h-3 w-3 border border-fg-dim/40`,style:{borderTop:o.includes("top")?"1px solid var(--site-line)":"none",borderBottom:o.includes("bottom")?"1px solid var(--site-line)":"none",borderLeft:o.includes("left")?"1px solid var(--site-line)":"none",borderRight:o.includes("right")?"1px solid var(--site-line)":"none"}},j)),e.stageImage({photo:l,alt:u,label:`Open ${[a,e.metaValue].filter(Boolean).join(" ")} at full resolution`,onZoom:()=>p(l,u),fit:i})]}),n("div",{className:`absolute bottom-0 left-0 right-0 z-10 flex items-end justify-between gap-3 font-mono text-[length:var(--size-label,12px)] uppercase tracking-[0.18em] text-fg-dim ${g} max-view-tablet:col-span-2 max-view-tablet:flex-wrap`,children:[n("span",{className:"flex min-w-0 flex-col gap-1",children:[e.specCaption&&t("span",{children:e.specCaption}),e.referenceNote&&t("span",{"data-hero-reference-note":!0,children:e.referenceNote}),e.galleryHint&&t("span",{"data-hero-gallery-hint":!0,children:e.galleryHint})]}),t("span",{children:e.originCaption})]})]})}function E({name:a,view:e,angleIdx:r,onSelect:c,isLight:d,tiled:p=!1}){const i=N(e);return i<2?null:t("div",{className:p?"order-[-1] flex w-16 flex-col gap-2 max-view-tablet:w-12 max-view-tablet:gap-1":"mt-2 grid grid-cols-4 gap-2 max-view-tablet:gap-1",style:!p&&i>4?{gridTemplateColumns:`repeat(${Math.min(i,z)}, minmax(0, 1fr))`}:void 0,children:Array.from({length:i}).map((h,l)=>{const m=e.photos[l];return n("button",{type:"button",onClick:()=>c(l),"aria-label":`View ${b(e,l)}`,"aria-pressed":l===r,className:["relative flex aspect-square items-center justify-center overflow-hidden transition-colors",d?"bg-bg":"",l===r?"border border-accent":"border border-transparent hover:border-fg-dim"].join(" "),style:{color:e.tint},children:[t("span",{className:"absolute top-1.5 left-2 z-10 font-mono text-[length:var(--size-label,8px)] uppercase tracking-[0.18em] text-fg-dim",children:String(l+1).padStart(2,"0")}),e.thumbImage({photo:m,alt:`${a} — ${b(e,l)}`})]},l)})})}export{T as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{jsx as d}from"react/jsx-runtime";import{createContext as
|
|
1
|
+
"use client";import{jsx as d}from"react/jsx-runtime";import{createContext as b,useContext as B,useEffect as p,useId as k,useMemo as v,useState as x}from"react";import{GridCards as z}from"./GridCardTemplate.js";import{useCatalogFilter as F}from"./catalog/CatalogFilterContext.js";import{loadProductCatalog as S}from"./useProductCatalog.js";import{itemKind as h}from"../lib/catalog/plp-item.js";import{applyCatalogFilters as j}from"../lib/wheels/catalog-filters.js";import{finishFamiliesOf as L}from"../lib/wheels/finish-defaults.js";import{lugCountsOf as N}from"../lib/wheels/lug-count.js";import{diametersOf as O}from"../lib/wheels/size-range.js";import{say as C}from"efficient-web-builder/format/lib/editor-words";import{HideTaker as y}from"efficient-web-builder/render/components/ViewHideRoot";const g=b({wheels:[],loading:!1,live:!1,obeysBar:!1,currency:""});function M(e,r,t,n,a){return h(e)==="tyre"?!0:j([P(e,r)],{...t,process:null},n,a).length>0}function P(e,r){const t=r?e.finishes?.find(n=>n.name===r):void 0;return t?{...e,finishes:[t]}:e}function W(e,r){return e.find(t=>t.designCode===r)??e.find(t=>t.slug===r)}function U({wheels:e,currency:r="",children:t}){return d(g.Provider,{value:{wheels:e??[],loading:!1,live:!0,obeysBar:!0,currency:r},children:t})}function V({currency:e="",children:r}){const[t,n]=x([]),[a,i]=x(!0);return p(()=>{let o=!1;return S().then(l=>{o||(n(l),i(!1))}).catch(()=>{o||i(!1)}),()=>{o=!0}},[]),d(g.Provider,{value:{wheels:t,loading:a,live:!1,obeysBar:!0,currency:e},children:r})}function $({code:e,finish:r,wheel:t}){const{wheels:n,loading:a,live:i,obeysBar:o,currency:l}=B(g),u=t??(e?W(n,e):void 0),s=q(o?u:void 0,r,l);if(u){const c=d(z,{wheels:[u],finishes:[r],children:f=>f},`${u.slug}:${r??""}`);return s?c:i?null:d(y,{as:"div","data-bar-hidden":"",className:"opacity-40",children:c})}return i?null:d(y,{as:"div",className:"sf-card flex aspect-square w-full items-center justify-center bg-surface-2 p-4 text-center",children:d("span",{className:"font-mono text-[length:var(--size-label,12px)] uppercase tracking-[0.2em] text-fg-dim",children:a?C("Loading…"):e||C("Set a design code")})})}function q(e,r,t){const{filters:n,vehicle:a,reportCount:i,reportSizes:o,reportLugs:l,reportFinishes:u}=F(),s=k(),c=v(()=>!e||M(e,r,n,t,a.fit),[e,r,n,t,a.fit]);p(()=>{if(e)return i(s,c?1:0),()=>i(s,0)},[e,c,i,s]);const f=v(()=>{if(!e||h(e)==="tyre")return null;const m=P(e,r);return{sizes:O([m]),lugs:N([m]),finishes:L([m])}},[e,r]);return p(()=>{if(f)return o(s,f.sizes),l(s,f.lugs),u(s,f.finishes),()=>{o(s,[]),l(s,[]),u(s,[])}},[f,o,l,u,s]),c}export{V as ProductCatalogProvider,U as SectionWheelsProvider,$ as default,M as handPickedMatchesBar,W as wheelForCode};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as
|
|
1
|
+
import{jsx as t}from"react/jsx-runtime";import e from"next/link";import{SET_QUOTE_LABEL as n}from"../lib/wheels/price-display.js";const i="/contact";function m({className:o,attrs:r}){return t(e,{href:i,className:o,...r,children:n})}export{i as QUOTE_HREF,m as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as
|
|
1
|
+
import{jsx as r}from"react/jsx-runtime";import{HideTaker as o}from"efficient-web-builder/render/components/ViewHideRoot";const i={body:"text-[length:var(--size-body,17px)]"},t=5;function s({rating:n}){const a=Math.min(t,Math.max(0,Math.round(n)));return r(o,{role:"img","aria-label":`${a} out of ${t} stars`,className:`flex gap-1 ${i.body} leading-none`,children:Array.from({length:t}).map((l,e)=>r("span",{"aria-hidden":!0,className:e<a?"text-accent":"text-fg-dim/30",children:"★"},e))})}export{t as RATING_STARS,s as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{jsx as e,Fragment as
|
|
1
|
+
"use client";import{jsx as e,Fragment as E,jsxs as r}from"react/jsx-runtime";import{useState as a}from"react";import{products as _}from"../lib/api/index.js";import j from"efficient-web-builder/render/components/SectionEyebrow";import n,{FieldCaption as q}from"./WebFormField.js";import{renderHeadline as T}from"efficient-web-builder/render/components/goldPhrases";import{FIELD_INPUT_CLASS as l}from"../lib/field-input.js";import{HideTaker as z}from"efficient-web-builder/render/components/ViewHideRoot";const A="mx-auto max-w-[var(--sf-site-width,1600px)] px-[var(--sf-site-gutter,40px)] py-[84px] max-[960px]:px-[min(24px,var(--sf-site-gutter,40px))]",I="mx-auto max-w-[var(--sf-site-width,1600px)] px-[var(--sf-site-gutter,40px)] pt-0 pb-[84px] max-[960px]:px-[min(24px,var(--sf-site-gutter,40px))]";function M({eyebrow:p,title:u,designCode:d,omitHead:x=!1,editing:g=!1}={}){const[f,w]=a(""),[o,N]=a(""),[i,y]=a(0),[m,S]=a(""),[h,F]=a(""),[c,v]=a(!1),[R,k]=a(!1),[b,s]=a(null);async function C(t){if(t.preventDefault(),!(g||c)){if(i<1){s("Choose a star rating.");return}v(!0),s(null);try{await _.submitReview({authorName:f.trim(),...o.trim()?{email:o.trim()}:{},rating:i,...m.trim()?{title:m.trim()}:{},body:h.trim(),...d?.trim()?{designCode:d.trim()}:{}}),k(!0)}catch{s("Something went wrong — your review wasn't sent. Please try again.")}finally{v(!1)}}}return e(z,{as:"section",className:"relative z-[2] border-t border-line bg-surface",children:r("div",{className:x?I:A,children:[x?null:r(E,{children:[(p??"").trim()&&e(j,{text:p??"",scaled:!1,className:"mb-4 block"}),(u??"").trim()&&e("h2",{className:"mb-12 font-heading2 text-[length:min(var(--size-headingMedium,44px),var(--sf-heading-max,9999px))] font-medium uppercase leading-none tracking-[-0.02em] text-fg max-view-wide:mb-8 max-view-wide:text-[length:min(var(--size-headingMedium,32px),var(--sf-heading-max,9999px))]",children:T(u??"",!1)})]}),R?e("p",{role:"status",className:"max-w-[560px] font-serif text-[19px] italic leading-[1.6] text-fg-dim",children:"Thanks — your review will appear once approved."}):r("form",{className:"flex max-w-[720px] flex-col gap-5",onSubmit:C,children:[r("div",{className:"grid grid-cols-2 gap-3 max-[640px]:grid-cols-1",children:[e(n,{label:"Name",required:!0,children:e("input",{type:"text",required:!0,value:f,onChange:t=>w(t.target.value),className:l})}),e(n,{label:"Email — never shown publicly",children:e("input",{type:"email",value:o,onChange:t=>N(t.target.value),className:l})})]}),r("div",{className:"flex flex-col gap-2",children:[e(q,{required:!0,children:"Rating"}),e("div",{role:"group","aria-label":"Rating",className:"flex gap-1",children:[1,2,3,4,5].map(t=>e("button",{type:"button","aria-pressed":i>=t,"aria-label":`${t} star${t===1?"":"s"}`,onClick:()=>{y(t),s(null)},className:["cursor-pointer text-[30px] leading-none transition-colors",i>=t?"text-accent":"text-fg-dim/30 hover:text-fg-dim"].join(" "),children:"★"},t))})]}),e(n,{label:"Review title (optional)",children:e("input",{type:"text",value:m,onChange:t=>S(t.target.value),className:l})}),e(n,{label:"Your review",required:!0,children:e("textarea",{required:!0,rows:5,value:h,onChange:t=>F(t.target.value),className:l+" resize-y"})}),b&&e("p",{role:"alert",className:"font-mono text-[12px] uppercase tracking-[0.18em] text-alert",children:b}),e("button",{type:g?"button":"submit",disabled:c,className:"cursor-pointer self-start bg-btn px-8 py-4 font-mono text-[14px] uppercase tracking-[0.32em] text-btn-ink transition-colors hover:bg-fg hover:text-bg disabled:cursor-wait disabled:opacity-60",children:c?"Sending…":"Submit review →"})]})]})})}export{M as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as o}from"react/jsx-runtime";import{EDITORIAL_COLUMN as
|
|
1
|
+
import{jsx as o}from"react/jsx-runtime";import{EDITORIAL_COLUMN as N}from"efficient-web-builder/format/lib/content/page-width";import{BAND_CAP as T,bandClassesInBox as f}from"../lib/sections/section-band.js";import _ from"./SectionBandChoice.js";import{HideTaker as m}from"efficient-web-builder/render/components/ViewHideRoot";import{BAND_CAP as L}from"../lib/sections/section-band.js";function u({className:i,capped:p=!1,column:n=N,style:s,defaults:t,id:a,attrs:r,rootRef:c,inAnyBox:l=!1,children:e}){const x=f(i),d=n===null?"":f(n),B=o(m,{as:"section",ref:c,...r,className:x||void 0,style:s,id:a,children:d?o("div",{className:d,children:e}):e}),A=t?{...t,...s}:s,C=o(m,{as:"section",ref:c,...r,className:p?`${T} ${i}`:i,style:A,id:a,children:n===null?e:o("div",{className:n,children:e})});return o(_,{inBox:B,atTop:C,anyBox:l})}export{L as BAND_CAP,u as default};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
export default function SectionFootnote({ text, linkText, linkHref, }: {
|
|
1
|
+
export default function SectionFootnote({ text, linkText, linkHref, viewHide, }: {
|
|
2
2
|
text?: string;
|
|
3
3
|
linkText?: string;
|
|
4
4
|
linkHref?: string;
|
|
5
|
+
viewHide?: string;
|
|
5
6
|
}): import("react").JSX.Element | null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsxs as
|
|
1
|
+
import{jsxs as n}from"react/jsx-runtime";import a from"next/link";import{renderGold as i}from"efficient-web-builder/render/components/goldPhrases";import{withViewHide as c}from"efficient-web-builder/render/components/ViewHideRoot";function f({text:t,linkText:l,linkHref:m,viewHide:s=""}){const o=(l??"").trim(),e=(m??"").trim(),r=!!o&&!!e;return!t&&!r?null:n("p",{className:c("mt-5 font-mono text-[length:var(--size-label,13px)] tracking-[0.06em] text-fg-dim",s),children:[t?i(t):null,t&&r?" ":null,r&&n(a,{href:e,className:"text-accent transition-colors hover:text-fg",children:[i(o)," →"]})]})}export{f as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{jsx as
|
|
1
|
+
"use client";import{jsx as n}from"react/jsx-runtime";import{PhoneMenuToolsProvider as m}from"efficient-web-builder/render/components/PhoneMenuTools";import{SectionGroupWidthsProvider as h}from"efficient-web-builder/render/components/SiteGutterFrame";import{chromeOwnWidth as p}from"efficient-web-builder/format/lib/content/section-width";import{centredCap as g,SITE_WIDTH_CAP as v}from"efficient-web-builder/format/lib/content/page-width";import{resolveMenuRow as x,resolveNavTextCase as b}from"../lib/content/header-bar.js";import{HideTaker as w}from"efficient-web-builder/render/components/ViewHideRoot";function T({place:o,sections:d,editing:i=!1,widths:l,navTextCase:a,menuRow:c}){const u=o==="footer"?"footer":"div",e=p(l),t=e.content==="full"?"100vw":e.contentMax===null?null:`${e.contentMax}px`,r=o==="footer"&&e.background==="content"?g(v):null,f=t===null&&r===null?void 0:{...r,...t===null?null:{"--sf-site-width":t}},s=n(w,{as:u,"data-section-group":o,...o==="header"?{"data-header-nav-case":b(a),"data-header-menu-row":x(c)??"top"}:null,className:i&&o==="footer"?"sf-theme-surfaces bg-bg text-fg":void 0,style:f,children:n(h,{value:{background:e.background,content:e.content==="content"?"content":null},children:n(d,{minEmptyHeight:120})})});return o==="header"?n(m,{children:s}):s}export{T as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as e}from"react/jsx-runtime";const
|
|
1
|
+
import{jsx as e}from"react/jsx-runtime";import{HideTaker as r}from"efficient-web-builder/render/components/ViewHideRoot";const a="font-mono text-[length:var(--size-label,13px)] uppercase tracking-[0.2em] text-fg-dim";function i({size:s,children:t}){return s==="tall"?e(r,{as:"section",className:"grid min-h-[70vh] place-items-center border-b border-line px-[var(--sf-site-gutter,40px)] pt-[104px] pb-14 text-center",style:{background:"var(--section-bg)"},children:e("p",{className:a,children:t})}):e(r,{as:"section",className:"relative z-[2] border-t border-line bg-surface",children:e("div",{className:"mx-auto max-w-[var(--sf-site-width,1600px)] px-[var(--sf-site-gutter,40px)] py-[84px] max-[960px]:px-[min(24px,var(--sf-site-gutter,40px))]",children:e("p",{className:a,children:t})})})}export{a as SECTION_NOTICE_TEXT_CLASS,i as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{jsx as e,jsxs as i}from"react/jsx-runtime";import{TYRE_FIT_LABEL as
|
|
1
|
+
"use client";import{jsx as e,jsxs as i}from"react/jsx-runtime";import{HideTaker as o}from"efficient-web-builder/render/components/ViewHideRoot";import{TYRE_FIT_LABEL as p,tyreFitHeadline as g}from"../lib/tyres/tyre-fit-copy.js";import{variantFitStatus as u}from"../lib/tyres/tyre-vehicle-fitment.js";const t={body:"text-[length:var(--size-body,18px)]",labelSmall:"text-[length:var(--size-label,12px)]",labelLarge:"text-[length:var(--size-label,13px)]"},f={fits:{className:"font-medium",style:{color:"var(--green)"}},doesNotFit:{className:"text-fg-dim"},unknown:{className:"text-fg-dim"}};function b({variants:c,answer:a,loading:m=!1,onRetry:s,headline:d}){return a?i(o,{className:"mt-10",children:[e("p",{className:`max-w-[68ch] font-serif ${t.body} italic leading-[1.55] text-fg-dim`,children:d??g(a)}),a.failed&&s?e("button",{type:"button",onClick:s,className:`mt-4 cursor-pointer font-mono ${t.labelLarge} uppercase tracking-[0.18em] text-accent underline-offset-4 hover:underline`,children:"Try again"}):null,e("ul",{className:"mt-6 grid gap-[2px] border border-line bg-line",children:c.map(l=>{const r=u(a,l.sku),n=f[r];return i("li",{className:"flex items-baseline justify-between gap-6 bg-bg px-5 py-4",children:[e("span",{className:`font-mono ${t.labelLarge} uppercase tracking-[0.14em] text-fg`,children:l.size}),e("span",{className:`font-mono ${t.labelSmall} uppercase tracking-[0.24em] ${n.className}`,style:n.style,children:p[r]})]},l.sku)})})]}):m?e(o,{as:"p",className:`mt-10 border border-line bg-bg p-6 font-mono ${t.labelLarge} uppercase tracking-[0.24em] text-fg-dim`,children:"Checking your car…"}):null}export{b as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{jsx as o}from"react/jsx-runtime";import{BookingChoose as
|
|
1
|
+
"use client";import{jsx as o}from"react/jsx-runtime";import{BookingChoose as u,BookingConfirmed as d,BookingDetails as k,BookingHead as p}from"./BookingRegions.js";import{useBookingForm as g}from"./BookingFormState.js";import{HideTaker as t}from"efficient-web-builder/render/components/ViewHideRoot";import{bookingKindStyle as B}from"../../lib/booking/text-kinds.js";const G=["head","booking","details","confirm"],I={head:"Head",booking:"Booking",details:"Your details",confirm:"Confirmation"};function h({region:e,eyebrow:s,heading:l,intro:a,buttonLabel:m,successMessage:f,...c}){const{confirmation:i,services:r}=g(),n=B(c);return e==="head"?o(t,{className:"min-[960px]:col-span-2",style:n,children:o(p,{eyebrow:s,heading:l,intro:a})}):e==="confirm"?i?o(t,{className:"min-[960px]:col-span-2",style:n,children:o(d,{successMessage:f})}):null:i||!r||r.length===0?null:e==="booking"?o(u,{style:n}):e==="details"?o(k,{buttonLabel:m,style:n}):null}export{G as BOOKING_REGIONS,I as BOOKING_REGION_NAMES,h as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{jsx as e,jsxs as r}from"react/jsx-runtime";import{SAMPLE_CONFIRMATION as
|
|
1
|
+
"use client";import{jsx as e,jsxs as r}from"react/jsx-runtime";import{SAMPLE_CONFIRMATION as B,useBookingForm as z}from"./BookingFormState.js";import $ from"efficient-web-builder/render/components/Btn";import{HideTaker as T}from"efficient-web-builder/render/components/ViewHideRoot";import c from"../WebFormField.js";import{formatAppointment as w,formatAppointmentTime as S}from"../../lib/booking/appointment-time.js";import{formatMoneyInCurrency as A}from"../../lib/commerce.js";import{FREE_PRICE as q}from"../../lib/wheels/price-display.js";const d="w-full border-2 border-line bg-bg px-4 py-4 font-[family-name:var(--bk-value-font,var(--font-display))] text-[length:var(--bk-value-size,17px)] text-fg outline-none transition-colors placeholder:text-fg-dim hover:border-fg-dim focus:border-accent";function E(o,t){const a=Number(o);if(a===0)return q;try{return A(a,t)}catch{return`${t} ${o}`}}const p="font-[family-name:var(--bk-name-font,var(--font-mono))] text-[length:var(--bk-name-size,12px)]";function C({number:o,children:t}){return r("div",{className:"mb-4 flex items-center gap-3",children:[e("span",{className:"flex size-8 shrink-0 items-center justify-center rounded-full border border-line font-[family-name:var(--bk-step-font,var(--font-mono))] text-[length:var(--bk-step-size,11px)] font-semibold text-fg-dim",children:o}),e("h3",{className:"font-[family-name:var(--bk-step-font,var(--font-mono))] text-[length:var(--bk-step-size,12px)] font-semibold uppercase tracking-[0.2em] text-fg",children:t})]})}function H({eyebrow:o,heading:t,intro:a}){return r("div",{className:"mb-10 max-w-[760px]",children:[(o??"").trim()&&e("p",{className:"mb-4 font-mono text-[12px] font-semibold uppercase tracking-[0.24em] text-accent",children:o}),(t??"").trim()&&e("h2",{className:"font-heading2 text-[length:min(var(--size-headingMedium,44px),var(--sf-heading-max,9999px))] font-medium uppercase leading-[0.98] tracking-[-0.025em] text-fg max-view-wide:text-[length:min(var(--size-headingMedium,32px),var(--sf-heading-max,9999px))]",children:t}),(a??"").trim()&&e("p",{className:"mt-5 max-w-[660px] font-display text-[17px] leading-[1.65] text-fg-dim",children:a})]})}function O({style:o}={}){const{fieldPrefix:t,services:a,currency:u,serviceId:b,setServiceId:g,requiresPayment:x,date:h,earliestDate:v,setDate:k,setDateTouched:N,availability:i,loadingSlots:y,noSlotsMessage:s,selectedStart:f,setSelectedStart:l,customerTimezone:m}=z();return a?r(T,{className:"flex flex-col gap-10",style:o,children:[r("div",{children:[e(C,{number:"01",children:"Choose a service"}),e("div",{className:"grid gap-3 sm:grid-cols-2",children:a.map(n=>{const F=n.id===b;return r("button",{type:"button","aria-pressed":F,onClick:()=>g(n.id),className:`min-h-11 border p-4 text-left transition-colors ${F?"border-accent bg-accent/10":"border-line bg-bg hover:border-fg-dim"}`,children:[e("span",{className:"block font-[family-name:var(--bk-name-font,var(--font-display))] text-[length:var(--bk-name-size,18px)] font-medium text-fg",children:n.name}),r("span",{className:"mt-1 block font-[family-name:var(--bk-value-font,var(--font-mono))] text-[length:var(--bk-value-size,11px)] uppercase tracking-[0.14em] text-fg-dim",children:[n.durationMinutes," min · ",E(n.price,u)]}),n.description&&e("span",{className:"mt-3 block font-[family-name:var(--bk-note-font,var(--font-display))] text-[length:var(--bk-note-size,14px)] leading-[1.5] text-fg-dim",children:n.description})]},n.id)})}),x&&e("p",{className:"mt-3 font-[family-name:var(--bk-note-font,var(--font-mono))] text-[length:var(--bk-note-size,11px)] uppercase tracking-[0.14em] text-alert",role:"alert",children:"This service requires an upfront payment and cannot be booked through this form yet."})]}),r("div",{children:[e(C,{number:"02",children:"Choose a date and time"}),e(c,{separate:!0,htmlFor:`${t}-date`,label:"Date",required:!0,labelFace:p,children:e("input",{id:`${t}-date`,type:"date",min:v,value:h,onChange:n=>{N(!0),k(n.target.value)},className:d,required:!0})}),e("div",{className:"mt-4 grid grid-cols-2 gap-2 sm:grid-cols-3 min-[1200px]:grid-cols-4",role:"group","aria-label":"Available appointment times",children:y?e("p",{className:"col-span-full py-3 font-[family-name:var(--bk-note-font,var(--font-mono))] text-[length:var(--bk-note-size,11px)] uppercase tracking-[0.18em] text-fg-dim",children:"Loading times…"}):i?.slots.length?i.slots.map(n=>r("button",{type:"button","aria-pressed":f===n.start,onClick:()=>l(n.start),className:`min-h-11 border px-3 py-2 font-[family-name:var(--bk-value-font,var(--font-mono))] text-[length:var(--bk-value-size,12px)] font-semibold uppercase tracking-[0.12em] transition-colors ${f===n.start?"border-accent bg-accent text-bg":"border-line bg-bg text-fg hover:border-accent"}`,children:[e("span",{className:"block",children:S(n.start,m||i.timezone)}),m&&m!==i.timezone&&r("span",{className:"mt-0.5 block text-[9px] font-normal tracking-[0.08em] opacity-70",children:[S(n.start,i.timezone)," business"]})]},n.start)):s?e("p",{className:"col-span-full py-3 font-[family-name:var(--bk-note-font,var(--font-mono))] text-[length:var(--bk-note-size,11px)] uppercase tracking-[0.18em] text-fg-dim",role:"status",children:s}):null}),i?.timezone&&r("p",{className:"mt-3 font-[family-name:var(--bk-note-font,var(--font-mono))] text-[length:var(--bk-note-size,10px)] uppercase tracking-[0.16em] text-fg-dim",children:["Times shown in ",m||i.timezone,m&&m!==i.timezone?` · business timezone ${i.timezone}`:""]})]})]}):null}function U({buttonLabel:o,style:t}){const{fieldPrefix:a,editing:u,name:b,setName:g,email:x,setEmail:h,phone:v,setPhone:k,notes:N,setNotes:i,submitting:y,error:s,canSubmit:f}=z();return r(T,{className:"sf-card border border-line bg-bg p-5 min-[640px]:p-8",style:t,children:[e(C,{number:"03",children:"Your details"}),r("div",{className:"flex flex-col gap-4",children:[e(c,{separate:!0,htmlFor:`${a}-name`,label:"Name",required:!0,labelFace:p,children:e("input",{id:`${a}-name`,type:"text",autoComplete:"name",value:b,onChange:l=>g(l.target.value),className:d,required:!0})}),e(c,{separate:!0,htmlFor:`${a}-email`,label:"Email",required:!0,labelFace:p,children:e("input",{id:`${a}-email`,type:"email",inputMode:"email",autoComplete:"email",value:x,onChange:l=>h(l.target.value),className:d,required:!0})}),e(c,{separate:!0,htmlFor:`${a}-phone`,label:"Phone",labelFace:p,children:e("input",{id:`${a}-phone`,type:"tel",inputMode:"tel",autoComplete:"tel",value:v,onChange:l=>k(l.target.value),className:d})}),e(c,{separate:!0,htmlFor:`${a}-notes`,label:"What would you like to cover?",labelFace:p,children:e("textarea",{id:`${a}-notes`,rows:4,value:N,onChange:l=>i(l.target.value),className:`${d} resize-y`})})]}),s&&e("p",{className:"mt-4 font-[family-name:var(--bk-note-font,var(--font-mono))] text-[length:var(--bk-note-size,11px)] uppercase tracking-[0.16em] text-alert",role:"alert",children:s}),e($,{type:u?"button":"submit",disabled:!f,arrow:null,className:"mt-6 w-full disabled:cursor-not-allowed disabled:opacity-50",children:y?"Submitting…":(o??"").trim()||"Book appointment"})]})}function W({successMessage:o}){const{confirmation:t,customerTimezone:a}=z();return t?r("div",{className:"sf-card max-w-[760px] border border-line bg-bg p-6 min-[640px]:p-10",role:"status",children:[r("p",{className:"font-mono text-[12px] font-semibold uppercase tracking-[0.22em] text-accent",children:["Request received · ",t.bookingNumber]}),e("h3",{className:"mt-4 font-display text-[28px] font-medium uppercase text-fg",children:t.service}),e("p",{className:"mt-2 font-display text-[17px] text-fg-dim",children:w(t.startAt,t.customerTimezone||a||t.timezone)}),t.customerTimezone&&t.timezone!==t.customerTimezone&&r("p",{className:"mt-1 font-mono text-[10px] uppercase tracking-[0.16em] text-fg-dim",children:["Business time: ",w(t.startAt,t.timezone)]}),(o??"").trim()&&e("p",{className:"mt-5 max-w-[620px] font-serif text-[18px] italic leading-[1.6] text-fg-dim",children:o}),e($,{href:`/book/${encodeURIComponent(t.manageToken)}`,newTab:t!==B,variant:"ghost",className:"mt-8",children:"Manage booking"})]}):null}export{O as BookingChoose,W as BookingConfirmed,U as BookingDetails,H as BookingHead};
|