efficient-storefront-blocks 0.80.0 → 0.82.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 +23 -0
- package/README.md +1 -1
- package/dist/chunks/{EditorPreviewCheckout-PSONSVRR.js → EditorPreviewCheckout-XM22X3CX.js} +4 -4
- package/dist/chunks/{SiteEditorProvider-PWHW2UA6.js → SiteEditorProvider-5YHSOW4Y.js} +1 -1
- package/dist/chunks/{chunk-MCCDGDRW.js → chunk-47L7KHRW.js} +1 -1
- package/dist/chunks/{chunk-3Q66B5NU.js → chunk-NSBGNY7R.js} +1 -1
- package/dist/chunks/chunk-VIPMT34C.js +320 -0
- package/dist/chunks/{fitment-data-Q2TJ6FBU.js → fitment-data-SZWTO4WT.js} +1 -1
- package/dist/editor/components/CategoryProductFields.d.ts +4 -1
- package/dist/editor/components/CategoryProductFields.js +1 -1
- package/dist/editor/components/EditReviewsLink.d.ts +4 -0
- package/dist/editor/components/EditReviewsLink.js +1 -0
- package/dist/editor/components/GalleryShowcaseSource.js +1 -1
- package/dist/editor/components/PreviewProductPicker.js +1 -1
- package/dist/editor/components/ProductHeroSource.js +1 -1
- package/dist/editor/components/ProductPicker.js +1 -1
- package/dist/editor/components/ReviewsProductSource.d.ts +26 -0
- package/dist/editor/components/ReviewsProductSource.js +1 -0
- package/dist/editor/components/SpecTableSource.js +1 -1
- package/dist/editor/lib/document/blocks/commerce/DetailRows/fields.js +1 -1
- package/dist/editor/lib/document/blocks/commerce/GalleryB/fields.js +1 -1
- package/dist/editor/lib/document/blocks/commerce/ProductGrid/fields.js +1 -1
- package/dist/editor/lib/document/blocks/commerce/ProductHero/fields.js +1 -1
- package/dist/editor/lib/document/blocks/commerce/RelatedProducts/fields.js +1 -1
- package/dist/editor/lib/document/blocks/commerce/SpecTable/fields.js +1 -1
- package/dist/editor/lib/document/blocks/commerce/index.d.ts +1 -1
- package/dist/editor/lib/document/blocks/commerce/page-rules.d.ts +2 -0
- package/dist/editor/lib/document/blocks/commerce/page-rules.js +1 -1
- package/dist/editor/lib/document/blocks/service/ReviewForm/fields.js +1 -1
- package/dist/editor/lib/document/blocks/service/Reviews/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/document/section-text-regions.d.ts +1 -0
- package/dist/editor/lib/document/section-text-regions.js +1 -0
- package/dist/editor/lib/storefront-editor-words.d.ts +4 -1
- package/dist/editor/lib/storefront-editor-words.js +1 -1
- package/dist/index.js +36 -28
- package/dist/render/app/globals.css +69 -20
- package/dist/render/built-with.json +1 -1
- package/dist/render/components/AppointmentBooking.js +1 -1
- package/dist/render/components/ChatContext.js +1 -1
- package/dist/render/components/CheckoutCTA.js +1 -1
- package/dist/render/components/CollectionCard.js +1 -1
- package/dist/render/components/Collections.js +1 -1
- package/dist/render/components/CompatibleTyres.js +1 -1
- package/dist/render/components/ConsentBanner.js +1 -1
- package/dist/render/components/ContactCards.js +1 -1
- package/dist/render/components/ContactRouting.js +1 -1
- package/dist/render/components/DeliveryOptions.js +1 -1
- package/dist/render/components/DetailRows.js +1 -1
- package/dist/render/components/EuTyreLabels.d.ts +1 -1
- package/dist/render/components/EuTyreLabels.js +1 -1
- package/dist/render/components/Events.js +1 -1
- package/dist/render/components/FitmentTable.js +1 -1
- package/dist/render/components/FooterDivider.js +1 -1
- package/dist/render/components/FooterSection.js +1 -1
- package/dist/render/components/FooterSocial.js +1 -1
- package/dist/render/components/FormBlock.js +1 -1
- package/dist/render/components/GalleryCard.js +1 -1
- package/dist/render/components/GalleryGrid.js +1 -1
- package/dist/render/components/GalleryItem.js +1 -1
- package/dist/render/components/GalleryShowcase.js +1 -1
- package/dist/render/components/LinkedProductHero.d.ts +2 -1
- package/dist/render/components/MessagingCards.js +1 -1
- package/dist/render/components/ProductCard.js +1 -1
- package/dist/render/components/ProductCardChrome.d.ts +4 -3
- package/dist/render/components/ProductCardChrome.js +1 -1
- package/dist/render/components/ProductGallery.js +1 -1
- package/dist/render/components/ProductGridSection.d.ts +7 -6
- package/dist/render/components/ProductGridSection.js +1 -1
- package/dist/render/components/ProductHeroPanel.d.ts +7 -2
- package/dist/render/components/ProductHeroPanel.js +1 -1
- package/dist/render/components/ProductLightbox.js +1 -1
- package/dist/render/components/RateTable.js +1 -1
- package/dist/render/components/ReviewForm.js +1 -1
- package/dist/render/components/Reviews.js +1 -1
- package/dist/render/components/SectionBand.d.ts +5 -2
- package/dist/render/components/SectionBand.js +1 -1
- package/dist/render/components/SectionBandChoice.d.ts +5 -0
- package/dist/render/components/SectionBandChoice.js +1 -0
- package/dist/render/components/SpecTable.js +1 -1
- package/dist/render/components/SubmitBuild.js +1 -1
- package/dist/render/components/Subscribe.js +1 -1
- package/dist/render/components/ThemedSelect.d.ts +4 -2
- package/dist/render/components/ThemedSelect.js +1 -1
- package/dist/render/components/TyreVehicleFitment.d.ts +2 -2
- package/dist/render/components/TyreVehicleFitment.js +1 -1
- package/dist/render/components/WheelCardFrame.js +1 -1
- package/dist/render/components/WheelPlaceholder.d.ts +3 -1
- package/dist/render/components/WheelPlaceholder.js +1 -1
- package/dist/render/components/booking/BookingRegions.js +1 -1
- package/dist/render/components/buy-row.d.ts +1 -1
- package/dist/render/components/buy-row.js +1 -1
- package/dist/render/components/card-pieces/CardPicture.d.ts +1 -1
- package/dist/render/components/card-pieces/CardPicture.js +1 -1
- package/dist/render/components/card-spin.d.ts +7 -0
- package/dist/render/components/card-spin.js +1 -0
- package/dist/render/components/catalog/CatalogFilterBar.js +1 -1
- package/dist/render/components/catalog/CatalogVehiclePicker.js +1 -1
- package/dist/render/components/catalog/PriceRange.d.ts +6 -0
- package/dist/render/components/catalog/PriceRange.js +1 -0
- package/dist/render/components/catalog/SortSelect.d.ts +8 -0
- package/dist/render/components/catalog/SortSelect.js +1 -0
- package/dist/render/components/checkout/CheckoutPageClient.js +1 -1
- package/dist/render/components/checkout/checkout-parts.js +1 -1
- package/dist/render/components/fitment/FitmentFinder.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/pdp-dynamic/DynamicBundleOffer.js +1 -1
- package/dist/render/components/pdp-dynamic/DynamicDetailRows.js +1 -1
- package/dist/render/components/pdp-dynamic/DynamicGalleryGrid.js +1 -1
- package/dist/render/components/pdp-dynamic/DynamicProductHero.d.ts +2 -1
- package/dist/render/components/pdp-dynamic/DynamicRelatedProducts.d.ts +3 -2
- package/dist/render/components/pdp-dynamic/DynamicRelatedProducts.js +1 -1
- package/dist/render/components/pdp-dynamic/DynamicTyreSizes.js +1 -1
- package/dist/render/components/pdp-dynamic/KindGate.js +1 -1
- package/dist/render/components/pdp-dynamic/RecordPhotoGallery.js +1 -1
- package/dist/render/components/wheels-plp/AlloyWheelsListing.d.ts +3 -2
- package/dist/render/components/wheels-plp/AlloyWheelsListing.js +1 -1
- package/dist/render/components/wheels-plp/PlpCard.d.ts +3 -2
- package/dist/render/components/wheels-plp/PlpCard.js +1 -1
- package/dist/render/components/wheels-plp/PlpToolbar.d.ts +16 -0
- package/dist/render/components/wheels-plp/PlpToolbar.js +1 -0
- package/dist/render/lib/catalog/relationships.js +1 -1
- package/dist/render/lib/document/blocks/commerce/AlloyWheelsListing/render.js +1 -1
- package/dist/render/lib/document/blocks/commerce/DetailRows/render.js +1 -1
- package/dist/render/lib/document/blocks/commerce/ProductGrid/meta.js +1 -1
- package/dist/render/lib/document/blocks/commerce/ProductGrid/render.js +1 -1
- package/dist/render/lib/document/blocks/commerce/ProductHero/render.js +1 -1
- package/dist/render/lib/document/blocks/commerce/RelatedProducts/render.js +1 -1
- package/dist/render/lib/document/blocks/text-part-shapes.json +0 -14
- package/dist/render/lib/sections/catalog-text-size.d.ts +7 -0
- package/dist/render/lib/sections/catalog-text-size.js +1 -0
- package/dist/render/lib/sections/fill-row.js +1 -1
- package/dist/render/lib/sections/grid-no-hole.d.ts +1 -1
- package/dist/render/lib/sections/grid-no-hole.js +1 -1
- package/dist/render/lib/sections/product-hero-text-regions.d.ts +3 -0
- package/dist/render/lib/sections/product-hero-text-regions.js +1 -0
- package/dist/render/lib/sections/reviews.d.ts +7 -0
- package/dist/render/lib/sections/reviews.js +1 -1
- package/dist/render/lib/sections/section-band.d.ts +2 -0
- package/dist/render/lib/sections/section-band.js +1 -0
- package/dist/render/lib/wheels/catalog-default-layout.js +1 -1
- package/dist/render/lib/wheels/lug-count.d.ts +1 -0
- package/dist/render/lib/wheels/lug-count.js +1 -1
- package/dist/words.d.ts +17 -2
- package/dist/words.js +5 -5
- package/package.json +5 -4
- package/dist/chunks/chunk-6MHGEO3D.js +0 -320
- package/dist/editor/lib/document/blocks/service/placeholders.d.ts +0 -1
- package/dist/editor/lib/document/blocks/service/placeholders.js +0 -1
- /package/dist/chunks/{chunk-X5W6GJLI.js → chunk-T2R5CZ2F.js} +0 -0
- /package/dist/chunks/{chunk-6MHGEO3D.js.LEGAL.txt → chunk-VIPMT34C.js.LEGAL.txt} +0 -0
- /package/dist/chunks/{chunk-JUGY3EKR.js → chunk-VVWX2P2N.js} +0 -0
|
@@ -464,7 +464,7 @@
|
|
|
464
464
|
family would bring the whole question back.
|
|
465
465
|
|
|
466
466
|
The fallbacks live here rather than in the emitted style attribute so the
|
|
467
|
-
wrapper stays a pure reference with no hex in it (
|
|
467
|
+
wrapper stays a pure reference with no hex in it (the design rule, 2026-08-25). */
|
|
468
468
|
/* ⚠️ TWO SELECTORS, ONE COPY OF THE MAPPING — the map/paint split the
|
|
469
469
|
`[ADD] The Header Can Take Its Own Space, And Pick A Theme` card owed an
|
|
470
470
|
answer for, and it is a SELECTOR LIST rather than a second block on purpose.
|
|
@@ -474,7 +474,7 @@
|
|
|
474
474
|
block). A SECTION wants both. The HEADER wants only the first half: its bar
|
|
475
475
|
must stay see-through at the top of a `Shared` page, so a rule that painted
|
|
476
476
|
unconditionally would fill it in. Copying the nine references into a second
|
|
477
|
-
block would be the duplication
|
|
477
|
+
block would be the duplication the design rule and card 66152 both exist to stop —
|
|
478
478
|
a copy is cheap the day it is made and permanent afterwards.
|
|
479
479
|
|
|
480
480
|
So the mapping is declared ONCE, for both, and only the paint is
|
|
@@ -1313,7 +1313,7 @@ body:has([data-page-width="full"]) footer {
|
|
|
1313
1313
|
--breakpoint-view-desktop: 1100px;
|
|
1314
1314
|
/* THE WIDE LINE: below it a page draws its phone layout (`max-view-wide:`),
|
|
1315
1315
|
from it the wide one (`view-wide:`). Under the v1 rules it is 800, the line
|
|
1316
|
-
|
|
1316
|
+
the hand-typed 800px classes drew before they took these names, and it compiles to
|
|
1317
1317
|
the same `width < 800px` / `width >= 800px`. The switch to the v2 rules
|
|
1318
1318
|
(three-views plan PR 11) moves it to 720, the Tablet view's edge, in this
|
|
1319
1319
|
one line; the same guard holds it to the rules in force. */
|
|
@@ -1492,7 +1492,8 @@ body:has([data-page-width="full"]) footer {
|
|
|
1492
1492
|
/* Stick to top — the pin any section or card can be given (efficient-web-builder
|
|
1493
1493
|
lib/content/section-sticky.ts, card [ADD] Every Section Can Stick To The Top).
|
|
1494
1494
|
The pass wraps a node that sticks in `.sf-section-stick` and publishes the
|
|
1495
|
-
distance below the header as `--sf-stick-distance` (and `-
|
|
1495
|
+
distance below the header as `--sf-stick-distance` (and `-tablet`,
|
|
1496
|
+
`-phone`); nothing
|
|
1496
1497
|
is emitted for a node that does not stick, so these rules match nothing on
|
|
1497
1498
|
a page that never used it.
|
|
1498
1499
|
|
|
@@ -1529,6 +1530,25 @@ body:has([data-page-width="full"]) footer {
|
|
|
1529
1530
|
position: relative;
|
|
1530
1531
|
z-index: 2;
|
|
1531
1532
|
}
|
|
1533
|
+
/* The tablet's own answer (three-views plan 2026-11-02, PR 5c): the Tablet
|
|
1534
|
+
view's widths, efficient-easel's VIEW_TABLET_MIN (720) up to, not including,
|
|
1535
|
+
VIEW_DESKTOP_MIN (1100), the builder's lib/content/view-values `TABLET_MEDIA`.
|
|
1536
|
+
The builder adds `-tablet-on` / `-tablet-off` and `--sf-stick-distance-tablet`
|
|
1537
|
+
only when the tablet draws a value of its own, so a node without one matches
|
|
1538
|
+
nothing here. scripts/test-tablet-section-css.ts. */
|
|
1539
|
+
@media (min-width: 720px) and (max-width: 1099.98px) {
|
|
1540
|
+
.sf-section-stick.sf-section-stick-tablet-on {
|
|
1541
|
+
position: sticky;
|
|
1542
|
+
top: calc(var(--sf-header-h, 88px) + var(--sf-stick-distance-tablet, 0px));
|
|
1543
|
+
}
|
|
1544
|
+
.sf-section-stick.sf-section-stick-tablet-off {
|
|
1545
|
+
position: static;
|
|
1546
|
+
}
|
|
1547
|
+
:root[data-header-sticky="none"] .sf-section-stick.sf-section-stick-tablet-on,
|
|
1548
|
+
:root[data-header-sticky="on_scroll_up"] .sf-section-stick.sf-section-stick-tablet-on {
|
|
1549
|
+
top: var(--sf-stick-distance-tablet, 0px);
|
|
1550
|
+
}
|
|
1551
|
+
}
|
|
1532
1552
|
/* The phone's own answer (below 720px, VIEW_TABLET_MIN, written as in the
|
|
1533
1553
|
phone padding block below). */
|
|
1534
1554
|
@media not all and (min-width: 720px) {
|
|
@@ -2335,8 +2355,8 @@ em.text-accent {
|
|
|
2335
2355
|
flex-direction: column;
|
|
2336
2356
|
flex-wrap: nowrap;
|
|
2337
2357
|
/* The slide's own padding steps down HERE rather than on the element (card
|
|
2338
|
-
66265). It used to be `max-
|
|
2339
|
-
max-
|
|
2358
|
+
66265). It used to be (in today's names) `max-view-wide:px-5 max-view-wide:pt-[100px]
|
|
2359
|
+
max-view-wide:pb-[90px]`, which Tailwind compiles to
|
|
2340
2360
|
`@media (width < 800px)` — one pixel short of this block's own line — so
|
|
2341
2361
|
at exactly 800px THIS DIV was a phone column with desktop padding on it.
|
|
2342
2362
|
The values are the ones those three utilities emitted, `--spacing` and
|
|
@@ -2379,7 +2399,7 @@ em.text-accent {
|
|
|
2379
2399
|
button is the same collision this whole block exists to prevent, one tier
|
|
2380
2400
|
down. The stored answer is untouched and comes straight back at 801px.
|
|
2381
2401
|
|
|
2382
|
-
IT LIVES HERE, IN THIS BLOCK, RATHER THAN AS A `max-
|
|
2402
|
+
IT LIVES HERE, IN THIS BLOCK, RATHER THAN AS A `max-view-wide:flex-col` ON THE
|
|
2383
2403
|
ELEMENT — which is how components/Flex.tsx spells the same idea, and how the
|
|
2384
2404
|
rest of the shop spells every phone rule it has. Tailwind compiles that
|
|
2385
2405
|
variant to `@media (width < 800px)`, which stops at 799; this block is
|
|
@@ -2396,7 +2416,7 @@ em.text-accent {
|
|
|
2396
2416
|
flex-direction: column;
|
|
2397
2417
|
}
|
|
2398
2418
|
/* ── AND THE REST OF THE HERO, MOVED HERE BY CARD 66265 ──────────────────
|
|
2399
|
-
Everything below drew its phone answer from a `max-
|
|
2419
|
+
Everything below drew its phone answer from a `max-view-wide:` variant on the
|
|
2400
2420
|
element until that card. Tailwind v4 compiles that variant to
|
|
2401
2421
|
`@media (width < 800px)`, which STOPS AT 799, while this block is
|
|
2402
2422
|
`@media (max-width: 800px)`, which does not — so at a viewport of exactly
|
|
@@ -2429,8 +2449,8 @@ em.text-accent {
|
|
|
2429
2449
|
}
|
|
2430
2450
|
/* ── AND THE HERO'S OVER-MEDIA CHROME, MOVED HERE BY CARD 66270 ──────────
|
|
2431
2451
|
The MIRROR HALF of the block above. Those declarations arrived because
|
|
2432
|
-
`max-
|
|
2433
|
-
SHORT of this block's line. These two arrive because `
|
|
2452
|
+
`max-view-wide:` compiles to `@media (width < 800px)`, which stops one pixel
|
|
2453
|
+
SHORT of this block's line. These two arrive because `view-wide:`
|
|
2434
2454
|
compiles to `@media (width >= 800px)`, which INCLUDES 800 — exactly as this
|
|
2435
2455
|
block does. So at a viewport of exactly 800px the slide had already
|
|
2436
2456
|
collapsed into its phone column, above, while the slideshow still drew its
|
|
@@ -2474,7 +2494,7 @@ em.text-accent {
|
|
|
2474
2494
|
margin-top: 28px;
|
|
2475
2495
|
}
|
|
2476
2496
|
/* ── ON A PHONE THE HERO GROWS TO FIT ITS WORDS (card [FIX] Hero Grows On
|
|
2477
|
-
Phone,
|
|
2497
|
+
Phone, the reviewer 2026-10-16) ─────────────────────────────────────────────────
|
|
2478
2498
|
The phone column above is bottom-aligned (`justify-content: flex-end`) in
|
|
2479
2499
|
a layer that covered a hero of FIXED height (`absolute inset-0` on a
|
|
2480
2500
|
`h-[…]` / `h-screen min-h-[680px]` section). Words taller than the hero
|
|
@@ -2500,7 +2520,7 @@ em.text-accent {
|
|
|
2500
2520
|
Words that already fit stay exactly where the bottom-aligned stack put
|
|
2501
2521
|
them. 801px and up is untouched.
|
|
2502
2522
|
|
|
2503
|
-
HERE, on the hero's one phone line, and not as `max-
|
|
2523
|
+
HERE, on the hero's one phone line, and not as `max-view-tablet:` utilities on
|
|
2504
2524
|
the components (17.0.1 did that, and drew the layout on a second line —
|
|
2505
2525
|
between 720 and 800 the old overflow stayed). UNLAYERED, like the rest of
|
|
2506
2526
|
this block: it must beat the height and position utilities the elements
|
|
@@ -2533,7 +2553,7 @@ em.text-accent {
|
|
|
2533
2553
|
}
|
|
2534
2554
|
}
|
|
2535
2555
|
/* …and WHICH height is the minimum between 720 and 800: the desktop one, as
|
|
2536
|
-
the builder's own `
|
|
2556
|
+
the builder's own `view-tablet:h-[var(--sf-hero-h-d)]` says (VIEW_TABLET_MIN,
|
|
2537
2557
|
the line the Height control switches on). Only the height is chosen here;
|
|
2538
2558
|
the layout above is on the hero's one line, 800. */
|
|
2539
2559
|
@media (min-width: 720px) and (max-width: 800px) {
|
|
@@ -2583,7 +2603,7 @@ em.text-accent {
|
|
|
2583
2603
|
reading a "the gaps got smaller on mobile" report should stop here.
|
|
2584
2604
|
|
|
2585
2605
|
800px is the breakpoint the Gallery already shipped a 2:1 step at
|
|
2586
|
-
(`gap-2 max-
|
|
2606
|
+
(`gap-2 max-view-wide:gap-1`), so the one number every container now halves at
|
|
2587
2607
|
is the one number one of them already used, rather than a sixth opinion.
|
|
2588
2608
|
|
|
2589
2609
|
`calc(… / 2)` rather than a second property from the render: the halving is a
|
|
@@ -2612,7 +2632,7 @@ em.text-accent {
|
|
|
2612
2632
|
gap: var(--sf-gap-len-phone, calc(var(--sf-gap-len) / 2));
|
|
2613
2633
|
}
|
|
2614
2634
|
}
|
|
2615
|
-
/* The Tablet view's own Gap (three-views plan PR 5b;
|
|
2635
|
+
/* The Tablet view's own Gap (three-views plan PR 5b; the reviewer 2026-11-03), on
|
|
2616
2636
|
`--sf-gap-len-tablet`, which efficient-web-builder's `containerGapProps`
|
|
2617
2637
|
writes only when a tablet value is drawn, as it does the phone's. The widths
|
|
2618
2638
|
are the Tablet view's: efficient-easel's VIEW_TABLET_MIN (720) up to, not
|
|
@@ -2622,7 +2642,7 @@ em.text-accent {
|
|
|
2622
2642
|
length from 800 up, and from 720 to 800 the phone rule above (its own phone
|
|
2623
2643
|
length, else half). The second block restates that part, after the first.
|
|
2624
2644
|
An empty PHONE value keeps the phone rule: it does not follow the tablet
|
|
2625
|
-
(
|
|
2645
|
+
(the reviewer 2026-11-03, the named exception in plan row 5b).
|
|
2626
2646
|
scripts/test-gap-tablet-css.ts holds all of it. */
|
|
2627
2647
|
@media (min-width: 720px) and (max-width: 1099.98px) {
|
|
2628
2648
|
.sf-gap-zone {
|
|
@@ -2927,7 +2947,7 @@ em.text-accent {
|
|
|
2927
2947
|
itself on the published page, the editor's item on the canvas — the same
|
|
2928
2948
|
"both are the grid item" fact the nth-child rules rely on.
|
|
2929
2949
|
|
|
2930
|
-
⚠️ THE TILE IS NAMED BY ITS ROLE, NOT BY HOW DEEP IT SITS (
|
|
2950
|
+
⚠️ THE TILE IS NAMED BY ITS ROLE, NOT BY HOW DEEP IT SITS (the reviewer 2026-10-26,
|
|
2931
2951
|
Lewis 2026-10-25: hartesmetal.com Home's "Vehicle gallery" drew its heading
|
|
2932
2952
|
and an empty grid in the editor). This read `.sf-gallery-zone > * > *`, which
|
|
2933
2953
|
on the canvas is the builder's part host (`[data-sf-part-host]`,
|
|
@@ -3016,8 +3036,9 @@ em.text-accent {
|
|
|
3016
3036
|
section that has a border inherits the section's properties for whatever it
|
|
3017
3037
|
did not set itself: the Box follows the tier above, as Corners does.
|
|
3018
3038
|
|
|
3019
|
-
On a
|
|
3020
|
-
fallback, so an unset phone value
|
|
3039
|
+
On a tablet the `-tablet` properties come first, and on a phone the `-phone`
|
|
3040
|
+
ones; the desktop ones are the fallback, so an unset tablet or phone value
|
|
3041
|
+
follows the desktop (the tablet rule: scripts/test-tablet-section-css.ts). The boundary is the
|
|
3021
3042
|
phone padding's below (`not all and (min-width: 720px)`, lib/content/
|
|
3022
3043
|
view-tiers' VIEW_TABLET_MIN). scripts/test-section-border-css.ts.
|
|
3023
3044
|
|
|
@@ -3031,6 +3052,19 @@ em.text-accent {
|
|
|
3031
3052
|
border-color: var(--sf-border-color, var(--site-line));
|
|
3032
3053
|
border-width: var(--sf-border-top-width, 0) var(--sf-border-right-width, 0) var(--sf-border-bottom-width, 0) var(--sf-border-left-width, 0);
|
|
3033
3054
|
}
|
|
3055
|
+
/* The tablet's own Border (three-views plan 2026-11-02, PR 5c), in the Tablet
|
|
3056
|
+
view's widths (720 up to, not including, 1100; the builder's `TABLET_MEDIA`).
|
|
3057
|
+
The `-tablet` properties come first and the desktop ones are the fallback, one
|
|
3058
|
+
property at a time, so a node with no tablet value draws as before.
|
|
3059
|
+
scripts/test-tablet-section-css.ts. */
|
|
3060
|
+
@media (min-width: 720px) and (max-width: 1099.98px) {
|
|
3061
|
+
.sf-section-border > *,
|
|
3062
|
+
.sf-section-border-self {
|
|
3063
|
+
border-style: var(--sf-border-style-tablet, var(--sf-border-style, solid));
|
|
3064
|
+
border-color: var(--sf-border-color-tablet, var(--sf-border-color, var(--site-line)));
|
|
3065
|
+
border-width: var(--sf-border-top-width-tablet, var(--sf-border-top-width, 0)) var(--sf-border-right-width-tablet, var(--sf-border-right-width, 0)) var(--sf-border-bottom-width-tablet, var(--sf-border-bottom-width, 0)) var(--sf-border-left-width-tablet, var(--sf-border-left-width, 0));
|
|
3066
|
+
}
|
|
3067
|
+
}
|
|
3034
3068
|
@media not all and (min-width: 720px) {
|
|
3035
3069
|
.sf-section-border > *,
|
|
3036
3070
|
.sf-section-border-self {
|
|
@@ -3207,6 +3241,21 @@ em.text-accent {
|
|
|
3207
3241
|
padding-right: 0;
|
|
3208
3242
|
}
|
|
3209
3243
|
|
|
3244
|
+
/* The tablet's own Height (three-views plan 2026-11-02, PR 5c): the same pair
|
|
3245
|
+
as the phone's (next block), in the Tablet view's widths (720 up to, not including,
|
|
3246
|
+
1100; the builder's `TABLET_MEDIA`). The builder adds the class only when the
|
|
3247
|
+
tablet draws a height of its own. scripts/test-tablet-section-css.ts. */
|
|
3248
|
+
@media (min-width: 720px) and (max-width: 1099.98px) {
|
|
3249
|
+
.sf-section-minh-tablet {
|
|
3250
|
+
display: grid !important;
|
|
3251
|
+
min-height: var(--sf-section-minh-t) !important;
|
|
3252
|
+
}
|
|
3253
|
+
@supports (min-height: 1svh) {
|
|
3254
|
+
.sf-section-minh-tablet {
|
|
3255
|
+
min-height: var(--sf-section-minh-ts, var(--sf-section-minh-t)) !important;
|
|
3256
|
+
}
|
|
3257
|
+
}
|
|
3258
|
+
}
|
|
3210
3259
|
/* ── A section's height on a phone ────────────────────────────────────────────
|
|
3211
3260
|
The phone half of the Height group. Lewis chose 甲 on 2026-09-08: the phone
|
|
3212
3261
|
overrides the group AS ONE UNIT, so a section either follows the desktop
|
|
@@ -3257,7 +3306,7 @@ em.text-accent {
|
|
|
3257
3306
|
`padding-block`, not `padding`: a block's own SIDE padding is its business and
|
|
3258
3307
|
several blocks read the site gutter through it.
|
|
3259
3308
|
|
|
3260
|
-
ONE RULE FOR THE PAGE AND THE EDITOR'S CANVAS (
|
|
3309
|
+
ONE RULE FOR THE PAGE AND THE EDITOR'S CANVAS (the reviewer 2026-10-23, the hartesmetal
|
|
3261
3310
|
Home name Box: apart on the canvas, on top of each other live). On the canvas
|
|
3262
3311
|
two elements stand between the Box and each block: The editor's item
|
|
3263
3312
|
(`[data-easel-block]`) and the builder's part host (`[data-sf-part-host]`,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{jsx as e,jsxs as i}from"react/jsx-runtime";import{BookingFormProvider as S,useBookingForm as b}from"./booking/BookingFormState.js";import{useBookingPreview as k}from"efficient-web-builder/render/lib/document/booking-preview";import{say as n}from"efficient-web-builder/format/lib/editor-words";import{BookingChoose as N,BookingConfirmed as
|
|
1
|
+
"use client";import{jsx as e,jsxs as i}from"react/jsx-runtime";import{BookingFormProvider as S,useBookingForm as b}from"./booking/BookingFormState.js";import{useBookingPreview as k}from"efficient-web-builder/render/lib/document/booking-preview";import{say as n}from"efficient-web-builder/format/lib/editor-words";import{BookingChoose as N,BookingConfirmed as w,BookingDetails as B,BookingHead as y}from"./booking/BookingRegions.js";function A(t={}){const o=k();return e(S,{editing:t.editing,previewConfirmation:!!t.nodeId&&o===t.nodeId,children:e(C,{...t})})}const p="mx-auto max-w-[var(--sf-site-width,1600px)] px-[min(24px,var(--sf-site-gutter,40px))] py-16 view-wide:px-[var(--sf-site-gutter,40px)] view-wide:py-[88px]",s="grid gap-8 min-[960px]:grid-cols-[minmax(0,1fr)_minmax(360px,0.8fr)] min-[960px]:gap-12";function C({eyebrow:t,heading:o,intro:g,buttonLabel:f,successMessage:u,boxes:r,inBoxes:x=!1}){const{fieldPrefix:_,editing:v,services:m,currency:D,serviceId:I,setServiceId:L,requiresPayment:P,date:j,earliestDate:z,setDate:E,setDateTouched:F,availability:M,loadingSlots:T,noSlotsMessage:R,selectedStart:$,setSelectedStart:q,customerTimezone:G,name:H,setName:O,email:J,setEmail:K,phone:Q,setPhone:U,notes:V,setNotes:W,confirmation:c,submitting:X,error:Y,canSubmit:Z,handleSubmit:l,sample:h}=b(),d=h?e("p",{className:"mb-6 font-mono text-[12px] uppercase tracking-[0.2em] text-fg-dim",role:"status",children:n("Example form — add an active service in {place}.",{place:n("Storefront → Booking Services")})}):null,a=m===void 0?e("p",{className:"font-mono text-[12px] uppercase tracking-[0.2em] text-fg-dim",children:"Loading appointments…"}):m?.length===0?e("p",{className:"font-mono text-[12px] uppercase tracking-[0.2em] text-fg-dim",role:"status",children:v?n("Add an active service in {place}.",{place:n("Storefront → Booking Services")}):"Appointments are not available right now."}):null;return x&&r?e("section",{className:"relative z-[2] border-t border-line bg-surface",children:i("div",{className:p,children:[d,c?e(r,{className:`${s} items-start`}):i("form",{onSubmit:l,children:[e(r,{className:`${s} items-start`}),a]})]})}):e("section",{className:"relative z-[2] border-t border-line bg-surface",children:i("div",{className:p,children:[d,e(y,{eyebrow:t,heading:o,intro:g}),c?e(w,{successMessage:u}):a||i("form",{onSubmit:l,className:s,children:[e(N,{}),e(B,{buttonLabel:f})]})]})})}export{C as AppointmentBookingBody,A as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{jsx as
|
|
1
|
+
"use client";import{jsx as $}from"react/jsx-runtime";import{createContext as q,useCallback as f,useContext as z,useEffect as p,useMemo as B,useRef as x,useState as c}from"react";import{auth as D}from"../lib/auth.js";import{api as F}from"../lib/api/index.js";import{chatSocketUrl as G}from"../lib/chat-socket.js";import{safeLocalStorage as I}from"efficient-web-builder/format/lib/safe-storage";import{getChatThread as Q,postChatMessage as X,startChat as Z}from"../lib/api/chat.js";const ee="sf:aid",A="sf:chat",U=q(null);function te(){const u=I.getItem(A);if(!u)return null;try{return JSON.parse(u)}catch{return null}}function ie({children:u,preview:t=!1}){const[m,y]=c(!1),[e,O]=c(null),[b,g]=c([]),[E,T]=c(!1),[v,P]=c(null),[M,C]=c(0),[N,R]=c(!1),[J,H]=c(!1),S=x(m);S.current=m;const h=x(null),_=x(e);_.current=e,p(()=>{t||O(te())},[t]);const i=f(async r=>{try{const o=await Q(r.id,r.token);g(o.messages)}catch{}},[]),l=f(()=>(t||h.current||(h.current=F.restoreSession().then(()=>{R(!0),_.current&&i(_.current)},()=>R(!1))),h.current),[t,i]);p(()=>{t||e&&i(e)},[t,e,i]),p(()=>{if(t||!e)return;const r=D.getAccess()??e.token;let o=!1,s=null,n,a=3e3;const d=()=>{o||(s=new WebSocket(G(e.id,r)),s.onmessage=V=>{try{const k=JSON.parse(V.data);k.type==="chat_event"&&k.event==="message"&&(i(e),!S.current&&k.payload?.sender_role==="employee"&&C(W=>W+1))}catch{}},s.onclose=()=>{o||(n=setTimeout(d,a),a=Math.min(a*2,3e4))},s.onerror=()=>s?.close())};return d(),()=>{o=!0,n&&clearTimeout(n),s?.close()}},[t,e,i]);const K=f(()=>{y(!0),C(0),l()},[l]),Y=f(()=>y(!1),[]),j=f(()=>{S.current||l(),y(r=>(r||C(0),!r))},[l]),w=f(async(r,o)=>{const s=r.trim();if(s){if(t){g(n=>[...n,{id:`preview-${n.length}`,sender_role:"customer",sender_name:o?.name||"You",body:s,image_url:null,created_at:""}]),H(!0);return}T(!0),P(null),await l();try{if(e){const n=await X(e.id,e.token,s);g(a=>[...a,n])}else{const n=I.getItem(ee)||"",a=await Z({body:s,guestName:o?.name,guestEmail:o?.email,guestKey:n}),d={id:a.id,token:a.guest_token};I.setItem(A,JSON.stringify(d)),O(d),g(a.messages)}}catch{P("Could not send your message. Please try again shortly.")}finally{T(!1)}}},[e,t,l]),L=B(()=>({isOpen:m,open:K,close:Y,toggle:j,messages:b,sending:E,error:v,unread:M,hasConversation:t?J:!!e,isSignedIn:N,send:w}),[m,K,Y,j,b,E,v,M,e,N,w,t,J]);return $(U.Provider,{value:L,children:u})}function le(){const u=z(U);if(!u)throw new Error("useChat must be used within <ChatProvider>");return u}export{ie as ChatProvider,le as useChat};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as e,jsxs as p}from"react/jsx-runtime";import d from"efficient-web-builder/render/components/BlockFrame";import f from"efficient-web-builder/render/components/Btn";import h from"efficient-web-builder/render/components/SectionEyebrow";import{renderGold as
|
|
1
|
+
import{jsx as e,jsxs as p}from"react/jsx-runtime";import d from"efficient-web-builder/render/components/BlockFrame";import f from"efficient-web-builder/render/components/Btn";import h from"efficient-web-builder/render/components/SectionEyebrow";import{renderGold as r,renderHeadline as g,splitParagraphs as u}from"efficient-web-builder/render/components/goldPhrases";function v({eyebrow:m,title:n,body:t,ctaText:a,ctaHref:s,secondaryText:i,secondaryHref:l,contained:c}){return e(d,{contained:c,className:"py-6",children:p("div",{className:"flex flex-col items-center gap-5 px-6 py-16 text-center max-view-wide:py-10",children:[m&&e(h,{text:m,scaled:!1}),n&&e("h2",{className:"max-w-[720px] font-display text-[min(44px,var(--sf-heading-max,9999px))] font-medium leading-[1.05] tracking-[-0.03em] max-view-wide:text-[min(30px,var(--sf-heading-max,9999px))]",children:g(n,!1)}),t&&u(t).map((o,x)=>e("p",{className:"max-w-[560px] text-[16px] leading-[1.6] opacity-85",children:r(o)},x)),(a||i)&&p("div",{className:"mt-2 flex items-center gap-6",children:[a&&e(f,{href:s||"/checkout",variant:"primary",children:r(a)}),i&&e("a",{href:l||"#",className:"font-mono text-[13px] uppercase tracking-[0.2em] underline underline-offset-4 opacity-70 hover:opacity-100",children:r(i)})]})]})})}export{v as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{jsx as e,jsxs as s}from"react/jsx-runtime";import{createContext as
|
|
1
|
+
"use client";import{jsx as e,jsxs as s}from"react/jsx-runtime";import{createContext as w,useContext as C}from"react";import _ from"next/link";import N from"efficient-web-builder/render/components/Placeholder";import{SIZE_STEP_OF_ROLE as E}from"efficient-web-builder/format/lib/fonts";import{COLLECTION_CARD_REGIONS as O,COLLECTION_CARD_TEXT_SIZE as r}from"efficient-web-builder/format/lib/sections/collection-card-text-regions";import{TEXT_REGION_ATTR as T,regionStyle as k,textRegionPartKey as S}from"efficient-web-builder/format/lib/sections/text-regions";import{renderGold as l,renderHeadline as I,splitParagraphs as L}from"efficient-web-builder/render/components/goldPhrases";import{absolutizeApiUrl as R}from"efficient-web-builder/render/lib/media";function $(a){return R(a)??void 0}const P=w({}),K=3;function j({tag:a,name:i,desc:c,href:p,imageSrc:g,imageLabel:f,price:m}){const{showPrice:x,cardStyle:d,partStyles:u,editing:h}=C(P),b=d==="bordered"?" border border-line":d==="shadow"?" shadow-[0_8px_30px_rgba(0,0,0,0.12)]":"",v=$(g),o=t=>h?{[T]:t}:{},n=t=>k(u?.[S(t)]?.role,O[t],E);return s(_,{href:p||"#",className:`sf-card group relative block w-full min-w-0 overflow-hidden bg-surface-2${b}`,children:[e("div",{className:"relative z-0 aspect-[4/5] transition-transform duration-700 [transition-timing-function:cubic-bezier(.2,.6,.2,1)] group-hover:scale-[1.04]",children:e(N,{label:f||"collection.jpg",src:v})}),e("div",{className:"pointer-events-none absolute inset-0 z-[1] [background:rgba(0,0,0,0.4)] group-hover:[background:rgba(0,0,0,0.3)] max-view-wide:hidden",style:{transition:"none"}}),s("div",{className:"absolute inset-x-8 bottom-8 z-[2] flex flex-col gap-3 text-overlay-fg max-view-wide:relative max-view-wide:inset-auto max-view-wide:p-6 max-view-wide:gap-3 max-view-wide:text-fg",children:[a&&e("span",{...o("tag"),style:n("tag"),className:`font-mono ${r.tag} uppercase tracking-[0.25em] opacity-70`,children:l(a)}),i&&e("h3",{...o("name"),style:n("name"),className:`font-heading2 ${r.name} font-medium leading-none tracking-[-0.03em] ${r.namePhone}`,children:typeof i=="string"?I(i,!1):i}),c&&L(c).map((t,y)=>e("p",{...o("body"),style:n("body"),className:`max-w-[420px] ${r.body} leading-[1.5] opacity-80`,children:l(t)},y)),x&&m&&e("span",{...o("price"),style:n("price"),className:`font-mono ${r.price} tracking-[0.05em] text-accent`,children:l(m)}),s("span",{...o("link"),style:n("link"),className:`mt-2 inline-flex items-center gap-3 font-mono ${r.link} uppercase tracking-[0.2em]`,children:["Explore",e("span",{className:"transition-transform group-hover:translate-x-[3px]","aria-hidden":!0,children:"→"})]})]})]})}export{K as COLLECTION_CARD_SEED_COUNT,P as CollectionCardStyleContext,j as default,$ as resolveCategoryImage};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{Fragment as
|
|
1
|
+
"use client";import{Fragment as m,jsx as e,jsxs as o}from"react/jsx-runtime";import{useScopeClass as N}from"../lib/use-scope-class.js";import _ from"efficient-web-builder/render/components/SectionHeader";import{SectionTextParts as y}from"efficient-web-builder/render/lib/document/editing-bridges";import{CollectionCardStyleContext as T}from"./CollectionCard.js";import{fillRowCss as E}from"../lib/sections/fill-row.js";import{renderHeadline as M}from"efficient-web-builder/render/components/goldPhrases";import{CONTENT_CAP_GUTTER as x}from"../lib/sections/content-cap-gutter.js";function S({editing:t,nodeId:i,children:s}){return!t||!i?e(m,{children:s}):e(y,{nodeId:i,sectionType:"Collections",children:s})}const $=`${x} py-[120px] max-view-wide:px-[min(20px,var(--sf-site-gutter,40px))] max-view-wide:py-[70px]`,R=`${x} pt-0 pb-[120px] max-view-wide:px-[min(20px,var(--sf-site-gutter,40px))] max-view-wide:pt-0 max-view-wide:pb-[70px]`,j={2:"grid-cols-2",3:"grid-cols-3",4:"grid-cols-4",5:"grid-cols-5"};function A({eyebrow:t,heading:i,columns:s,showPrice:f,cardStyle:g,layout:u,limit:n,cards:l,omitHead:c=!1,nodeId:w,partStyles:h,editing:a=!1}={}){const r=N("cg"),C=typeof n=="number"&&n>0,v=u==="list"?"grid-cols-1":s===void 0?"grid-cols-3":j[Math.min(5,Math.max(2,Math.round(s)))]??"grid-cols-3",d=`${r} grid ${v} gap-4 max-view-wide:grid-cols-1 max-view-wide:gap-3`,p=E(r,d,{limit:n});return o("section",{className:c?R:$,children:[c?null:e(_,{num:t!==void 0?t:"01 / Collections",accentNum:!0,title:i!==void 0?M(i,!1):o(m,{children:["Three ranges,",e("br",{}),"one standard."]}),link:{text:"View all",href:"/wheels"}}),l&&e(S,{editing:a,nodeId:w,children:o(T.Provider,{value:{showPrice:f,cardStyle:g,partStyles:h,editing:a},children:[C&&e("style",{children:`.${r} > *:nth-child(n+${n+1}){display:none}`}),p&&e("style",{children:p}),e(l,{className:d,minEmptyHeight:260})]})})]})}export{A as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{jsx as e,jsxs as
|
|
1
|
+
"use client";import{jsx as e,jsxs as f}from"react/jsx-runtime";import E from"./SectionBand.js";import{useScopeClass as I}from"../lib/use-scope-class.js";import R from"efficient-web-builder/render/components/SectionHeader";import j from"./SectionFootnote.js";import z from"./TyreCard.js";import F from"./ViewMoreLink.js";import{renderGold as p,renderHeadline as L}from"efficient-web-builder/render/components/goldPhrases";import{useCurrency as H}from"./CurrencyContext.js";import{tyrePagePath as O}from"../lib/tyres/tyre-page-path.js";import{TYRE_ILLUSTRATION_NOTE as P}from"../lib/wheels/tyre-render.js";import{cardImageShapeTokens as B}from"efficient-web-builder/format/lib/content/card-image-shape";import{DEFAULT_CARD_INDEX_FORMAT as $,cardIndexCss as U}from"efficient-web-builder/format/lib/sections/product-card-style";import{say as Y}from"efficient-web-builder/format/lib/editor-words";const G="border-b border-line py-[120px] max-view-desktop:py-20";function u({frameClassName:i,style:o,children:t}){return i!==void 0?e("section",{className:i,style:o,children:t}):e(E,{className:G,style:o,children:t})}const g={2:"grid grid-cols-2 gap-2 max-view-tablet:grid-cols-1",3:"grid grid-cols-3 gap-2 max-view-desktop:grid-cols-2 max-view-tablet:grid-cols-1",4:"grid grid-cols-4 gap-2 max-view-desktop:grid-cols-2 max-view-tablet:grid-cols-1"};function V({num:i,title:o,description:t,tyres:x,footnote:h,footnoteLinkText:b,footnoteLinkHref:y,viewMore:n,editing:T=!1,frameClassName:l,omitHead:k=!1,columns:N=3,cardImage:S,outline:w,indexBadge:_}){const{currency:v,formatPrice:C}=H(),s=x??[],c=I("ct"),m=_??$,a=U(c,m),A=s.some(r=>!r.image),D=[h,A?P:null].filter(Boolean).join(" "),d=k?null:e(R,{num:i!=null?p(i):void 0,title:o!=null?L(o,!1):void 0,description:t!=null?p(t):void 0,accent:!0});return s.length===0?T?f(u,{frameClassName:l,children:[d,e("p",{className:"border-t border-line py-6 font-mono text-[length:var(--size-label,13px)] uppercase tracking-[0.18em] text-fg-dim",children:Y("No compatible tyres found for this wheel’s sizes yet — tyres appear automatically when a matching size is active and priced in the catalog.")})]}):null:f(u,{frameClassName:l,style:B(S),children:[a&&e("style",{children:a}),d,e("div",{className:`${a?`${c} `:""}${g[N]??g[3]}`,children:s.map(r=>e(z,{outline:w,showIndex:m!=="off",size:r.size,specs:r.specs,prices:r.prices,image:r.image,inStock:r.inStock,href:O(r.slug),currency:v,formatPrice:C},r.sku))}),n&&e("div",{className:"mt-10 flex",children:e(F,{href:n.href,label:n.label})}),e(j,{text:D,linkText:b,linkHref:y})]})}export{V as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{jsx as e,jsxs as n,Fragment as
|
|
1
|
+
"use client";import{jsx as e,jsxs as n,Fragment as s}from"react/jsx-runtime";import{usePreviewHeader as v}from"efficient-web-builder/render/components/PreviewHeaderContext";import{NEUTRAL_SITE_NAME as y}from"../lib/content/site.js";import{bannerWords as k,CONSENT_BUTTONS as r,CONSENT_RULES as C}from"../lib/consent/rules.js";const i="flex items-center justify-center gap-5 border border-fg bg-transparent px-6 py-4 font-mono text-[14px] uppercase tracking-[0.3em] text-fg transition-colors hover:bg-fg hover:text-bg",T="font-mono text-[13px] uppercase tracking-[0.15em] text-fg underline decoration-line underline-offset-4 hover:decoration-fg",w="text-fg underline decoration-line underline-offset-4";function f({text:a}){return n("div",{className:"flex items-center gap-3 font-mono text-[12px] uppercase tracking-[0.18em] text-fg-dim",children:[e("span",{className:"block h-1.5 w-1.5 rounded-full bg-accent"}),e("span",{children:a})]})}function E({model:a,words:t,layout:g,privacyHref:c,onAccept:l,onReject:h,onChoose:p,inline:N=!1}){const m=n("p",{className:"mt-3 font-body text-[15px] leading-[1.55] text-fg-dim max-[880px]:text-[14px]",children:[t.before,e("span",{className:"text-fg",children:t.link}),t.after,c&&n(s,{children:[" ",e("a",{className:w,href:c,children:r.privacyPolicy})]})]}),d=a==="opt-in",b=d?n(s,{children:[e("button",{type:"button",className:`${i} max-[880px]:order-2`,onClick:h,children:r.reject}),e("button",{type:"button",className:`${i} max-[880px]:order-1`,onClick:l,children:r.accept})]}):n(s,{children:[e("button",{type:"button",className:`${i} max-[880px]:order-2`,onClick:p,children:r.privacyChoices}),e("button",{type:"button",className:`${i} max-[880px]:order-1`,onClick:l,children:r.ok})]}),o=d?e("button",{type:"button",className:T,onClick:p,children:r.choose}):null,u=N?"absolute":"fixed";return g==="card"?n("div",{role:"region","aria-label":t.heading,"data-consent-banner":"card",className:`${u} bottom-6 left-6 z-[90] w-[420px] border border-line bg-bg p-6 [border-radius:var(--sf-section-radius,0px)] max-[880px]:inset-x-0 max-[880px]:bottom-0 max-[880px]:left-0 max-[880px]:w-auto max-[880px]:border-x-0 max-[880px]:border-b-0 max-[880px]:px-5 max-[880px]:pb-8 max-[880px]:pt-6 max-[880px]:[border-radius:0]`,children:[e(f,{text:t.heading}),m,e("div",{className:"mt-5 grid grid-cols-2 gap-3 max-[880px]:grid-cols-1",children:b}),o&&e("div",{className:"mt-4 max-[880px]:text-center",children:o})]}):e("div",{role:"region","aria-label":t.heading,"data-consent-banner":"bar",className:`${u} inset-x-0 bottom-0 z-[90] border-t border-line bg-bg`,children:n("div",{className:"flex items-center justify-between gap-10 px-10 py-6 max-view-desktop:flex-col max-view-desktop:items-start max-view-desktop:gap-5 max-[880px]:px-5 max-[880px]:pb-8",children:[n("div",{className:"min-w-0 max-w-[700px]",children:[e(f,{text:t.heading}),m]}),n("div",{className:"flex flex-none items-center gap-3 max-[880px]:grid max-[880px]:w-full",children:[o&&e("span",{className:"mr-3 max-[880px]:order-3 max-[880px]:mr-0 max-[880px]:mt-1 max-[880px]:text-center",children:o}),b]})]})})}function $({layout:a}){const t=v().websiteName?.trim()||y;return e("div",{className:"relative min-h-[640px] w-full","data-consent-banner-preview":!0,children:e(E,{model:"opt-in",words:k(C.other,t,{analytics:!0,googleAds:!0,meta:!0}),layout:a,privacyHref:null,onAccept:x,onReject:x,onChoose:x,inline:!0})})}function x(){}export{i as CONSENT_CHOICE_BUTTON,T as CONSENT_TEXT_BUTTON,$ as ConsentBannerPreview,E as ConsentBannerView,f as ConsentEyebrow};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as a,jsxs as r}from"react/jsx-runtime";import x from"efficient-web-builder/render/components/BlockFrame";import{renderGold as f,renderHeadline as g,splitParagraphs as o}from"efficient-web-builder/render/components/goldPhrases";import N from"./CopyText.js";import t from"./QrCode.js";import{MESSAGING_ACTION as i,MESSAGING_WORDS as d}from"../lib/sections/messaging.js";const p={call:l=>l?`Call ${l}`:"Call",email:l=>l?`Email ${l}`:"Email"};function c({title:l,description:s,contacts:n,contained:h}){return n.length?a(x,{contained:h,className:"py-6",children:r("div",{className:"flex flex-col gap-6",children:[(l||s)&&r("div",{className:"flex max-w-[680px] flex-col gap-3",children:[l&&a("h2",{className:"font-heading2 text-[length:min(var(--size-headingMedium,44px),var(--sf-heading-max,9999px))] font-medium leading-[1.05] tracking-[-0.03em] max-
|
|
1
|
+
import{jsx as a,jsxs as r}from"react/jsx-runtime";import x from"efficient-web-builder/render/components/BlockFrame";import{renderGold as f,renderHeadline as g,splitParagraphs as o}from"efficient-web-builder/render/components/goldPhrases";import N from"./CopyText.js";import t from"./QrCode.js";import{MESSAGING_ACTION as i,MESSAGING_WORDS as d}from"../lib/sections/messaging.js";const p={call:l=>l?`Call ${l}`:"Call",email:l=>l?`Email ${l}`:"Email"};function c({title:l,description:s,contacts:n,contained:h}){return n.length?a(x,{contained:h,className:"py-6",children:r("div",{className:"flex flex-col gap-6",children:[(l||s)&&r("div",{className:"flex max-w-[680px] flex-col gap-3",children:[l&&a("h2",{className:"font-heading2 text-[length:min(var(--size-headingMedium,44px),var(--sf-heading-max,9999px))] font-medium leading-[1.05] tracking-[-0.03em] max-view-wide:text-[length:min(var(--size-headingMedium,32px),var(--sf-heading-max,9999px))]",children:g(l,!1)}),s&&o(s).map((e,m)=>a("p",{className:"text-[15px] leading-[1.6] opacity-85",children:f(e)},m))]}),a("ul",{className:"grid gap-3 sm:grid-cols-2 md:gap-4 lg:grid-cols-3","data-contact-cards":"",children:n.map((e,m)=>r("li",{className:"flex min-w-0 items-start justify-between gap-4 rounded-[var(--radius-card,12px)] border border-line p-4 md:p-5",children:[r("div",{className:"flex min-w-0 flex-col gap-1.5",children:[a("p",{className:"font-mono text-[12px] uppercase tracking-[0.14em] text-fg-dim",children:e.way}),e.name&&a("p",{className:"font-heading2 text-[18px] font-medium leading-tight",children:e.name}),a("p",{className:"break-all text-[15px] text-fg-dim",children:e.handle}),a("div",{className:"pt-1",children:e.kind==="phone"?a("a",{href:e.href,className:i,children:p.call(e.name)}):e.kind==="email"?a("a",{href:e.href,className:i,children:p.email(e.name)}):e.href?r("a",{href:e.href,target:"_blank",rel:"noopener noreferrer",className:i,children:[d.open(e.way),r("span",{className:"sr-only",children:[" ",d.opensApp]})]}):a(N,{text:e.handle,className:i})})]}),e.qr&&a(t,{text:e.qr,label:d.qrLabel(e.way,e.handle),className:"aspect-square w-24 shrink-0 rounded-sm"})]},m))})]})}):null}export{p as CONTACT_WORDS,c as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{jsx as n,jsxs as i,Fragment as Y}from"react/jsx-runtime";import ee from"./SectionBand.js";import{useEffect as _,useState as q}from"react";import{useRootIsDark as ne}from"efficient-shell/theme";import{OTHER_REASON_ID as h}from"efficient-web-builder/format/lib/content/contact";import{FormFieldInput as te,FormHoneypot as ae,successMessageFor as re,useBoundForm as le,useFormSubmission as oe}from"./formSubmission.js";import ie from"efficient-web-builder/render/components/SectionEyebrow";import se,{FieldCaption as ce}from"./WebFormField.js";import{scrollBehavior as de}from"efficient-web-builder/render/components/useReducedMotion";import{renderChrome as T,renderGold as $,renderHeadline as me,splitParagraphs as pe}from"efficient-web-builder/render/components/goldPhrases";import{say as j}from"efficient-web-builder/format/lib/editor-words";import{phoneHref as fe}from"efficient-web-builder/format/lib/links/phone-href";import{PART_ROW_ATTR as ue,encodePartRow as xe}from"efficient-web-builder/render/lib/document/text-parts";const t={bodySmall:"text-[length:var(--size-body,14px)]",body:"text-[length:var(--size-body,15px)]",bodyLarge:"text-[length:var(--size-body,18px)]",headingSmall1:"text-[length:var(--size-headingSmall,24px)]",headingSmall2:"text-[length:var(--size-headingSmall,26px)]",labelSmall:"text-[length:var(--size-label,12px)]",labelLarge:"text-[length:var(--size-label,13px)]",labelXl:"text-[length:var(--size-label,14px)]"},E={label:"Label",value:"Value",sub:"Sub line"};function be(s,r){return s.map((l,a)=>r?{...l,at:a,label:l.label||j(E.label),value:l.value||j(E.value),sub:l.sub||j(E.sub)}:{...l,at:a}).filter(l=>!l.hidden)}function V(s,r){return r?{[ue]:xe("channels",s.at)}:{}}function X(s){if(s.href)return s.href;const r=(s.value??"").trim();if(r.includes("@"))return`mailto:${r}`;if(/^\+?[\d\s().-]{6,}$/.test(r))return fe(r)}function ge(s){const r=[],l=new Map;for(const a of s){if(!a.groupId){r.push(a);continue}const p=a.value.trim().toLowerCase(),x=l.get(p);if(x)x.label=`${x.label} · ${a.label}`;else{const b={...a};l.set(p,b),r.push(b)}}return r}function he(s,r,l){const a=p=>String(p??"").trim().toLowerCase();for(const p of s?.fields??[]){if(p.type!=="select"||!Array.isArray(p.options))continue;const x=p.options.map(String);if(!r.some(c=>x.some(f=>a(f)===a(c.title))))continue;const b=c=>a(c===h?l:r.find(f=>f.id===c)?.title);return{key:p.key,optionFor:c=>x.find(f=>a(f)===b(c)&&b(c)!==""),idFor:c=>{const f=r.find(w=>a(w.title)===a(c));return f?f.id:l&&a(c)===a(l)?h:void 0}}}return null}const A=`border-b border-line bg-transparent py-4 font-display ${t.bodyLarge} tracking-[0.01em] text-fg outline-none transition-colors focus:border-accent`;function ye({routingNumber:s,routingTagline:r,groups:l,formNumber:a,formHeading:p,metaLines:x,showOther:b=!0,otherLabel:c="Other",otherNoteTitle:f,otherNoteBody:w,buttonText:H,consent:M,channels:B,formSlug:O,form:D,editing:y,initialActiveId:v,onActiveChange:L,reasonExtras:W}){const N=[...l.map(e=>e.id),...b?[h]:[]],G=v&&N.includes(v)?v:N[0]??h,[g,C]=q(G);_(()=>{N.includes(g)||C(N[0]??h)},[N.join("|")]),_(()=>{v&&N.includes(v)&&C(v)},[v]);const k=le(O,D),d=oe({form:k,formSlug:O,editing:y}),u=he(k,l,b?c:void 0),R=e=>{C(e),z(null);const o=u?.optionFor(e);u&&o!==void 0&&d.set(u.key,o),L?.(e)};_(()=>{if(!u||d.valueOf(u.key))return;const e=u.optionFor(g);e!==void 0&&d.set(u.key,e)},[u?.key]);const[P,z]=q(null),S=be(B??[],!!y),U=e=>P!==null?!e.groupId&&e.value===P:e.groupId===g,Z=k===void 0,I=!!k||!!y,J=!ne({whenUnset:!0}),K=l.length>0||!!y;return i(Y,{children:[K&&i(ee,{className:"border-b border-line py-[60px]",style:J?void 0:{background:"var(--section-bg)"},children:[(s||r)&&i("div",{className:"mb-6 flex items-center gap-6 border-b border-line pb-6",children:[s&&n(ie,{text:s}),r&&n("span",{className:`font-display ${t.bodySmall} uppercase tracking-[0.04em] text-fg-dim`,children:$(r)})]}),n("div",{className:"sf-card grid grid-cols-4 gap-[2px] border border-line bg-line max-[1100px]:grid-cols-2 max-[700px]:grid-cols-1",children:l.map(e=>{const o=g===e.id;return i("button",{type:"button",onClick:()=>{R(e.id),typeof window<"u"&&window.matchMedia("(max-width: 1100px)").matches&&document.getElementById("contact-form")?.scrollIntoView({behavior:de(),block:"start"})},className:["flex min-h-[240px] cursor-pointer flex-col gap-4 px-8 py-10 text-left transition-colors",o?"bg-surface outline outline-2 -outline-offset-2 outline-accent":"bg-bg hover:bg-surface"].join(" "),children:[e.eyebrow&&n("span",{className:`font-mono ${t.labelSmall} uppercase tracking-[0.24em] text-accent`,children:e.eyebrow}),n("h3",{className:`whitespace-pre-line font-heading3 ${t.headingSmall2} font-medium uppercase leading-[1.05] tracking-[-0.02em]`,children:e.title}),e.copy&&n("p",{className:`mt-auto font-display ${t.bodySmall} leading-[1.5] text-fg-dim`,children:e.copy}),e.response&&i("div",{className:`mt-2 flex justify-between border-t border-line pt-4 font-mono ${t.labelSmall} uppercase tracking-[0.22em] text-fg-dim`,children:[n("span",{children:"Response"}),n("strong",{className:"font-normal text-fg",children:e.response})]})]},e.id)})})]}),(I||S.length>0)&&n("section",{id:"contact-form",className:"scroll-mt-[80px] border-b border-line py-20 max-[1100px]:py-[60px]",children:i("div",{className:["mx-auto grid max-w-[var(--sf-site-width,1600px)] gap-20 px-[var(--sf-site-gutter,40px)] max-[1100px]:grid-cols-1 max-[1100px]:gap-[60px] max-[1100px]:px-[min(24px,var(--sf-site-gutter,40px))]",I&&S.length>0?"grid-cols-[1.3fr_1fr]":"grid-cols-1"].join(" "),children:[I&&i("div",{children:[i("div",{className:"mb-8 flex items-end justify-between gap-6 border-b border-line pb-6",children:[i("div",{children:[a&&n("div",{className:`pb-2 font-mono ${t.labelLarge} uppercase tracking-[0.3em] text-accent`,children:$(a)}),p&&n("h2",{className:"font-heading2 text-[length:min(var(--size-headingMedium,clamp(36px,4vw,56px)),var(--sf-heading-max,9999px))] font-medium uppercase leading-none tracking-[-0.03em]",children:me(p,!0)})]}),!!(x&&x.length)&&n("div",{className:`text-right font-mono ${t.labelSmall} uppercase leading-[1.8] tracking-[0.22em] text-fg-dim max-[700px]:text-left`,children:x.map((e,o)=>n("div",{children:e},o))})]}),k?d.done?n("div",{className:`border border-accent bg-accent/[0.08] p-8 font-display ${t.body} leading-[1.6] text-fg-dim`,children:re(k,"Thanks — we've received your message.")}):i("form",{className:"grid grid-cols-2 gap-5 max-[700px]:grid-cols-1",onSubmit:d.handleSubmit,children:[k.fields.map(e=>n(se,{label:e.label,required:e.required,className:e.type==="textarea"||e.type==="checkbox"?"col-span-2 max-[700px]:col-span-1":void 0,children:n(te,{field:e,value:d.valueOf(e.key),onChange:o=>{d.set(e.key,o);const m=u&&e.key===u.key?u.idFor(o):void 0;m!==void 0&&(C(m),z(null),L?.(m))},className:e.type==="textarea"?`${A} min-h-[140px] resize-y leading-[1.5]`:e.type==="checkbox"?"size-4 self-start accent-accent":A})},e.key)),i("div",{className:"col-span-2 flex flex-col gap-2 max-[700px]:col-span-1",children:[n(ce,{required:!0,children:"Reason"}),i("div",{className:"mt-1 flex flex-wrap gap-2",children:[l.map(e=>{const o=g===e.id;return n("button",{type:"button",onClick:()=>R(e.id),className:[`cursor-pointer border px-4 py-3 font-mono ${t.labelSmall} uppercase tracking-[0.2em] transition-colors`,o?"border-accent bg-accent text-bg":"border-line text-fg-dim hover:text-fg"].join(" "),children:e.title},e.id)}),b&&n("button",{type:"button",onClick:()=>R(h),className:[`cursor-pointer border px-4 py-3 font-mono ${t.labelSmall} uppercase tracking-[0.2em] transition-colors`,g===h?"border-accent bg-accent text-bg":"border-line text-fg-dim hover:text-fg"].join(" "),children:T(c)})]})]}),W?.(g),g===h&&(f||w)&&i("div",{className:"sf-card col-span-2 flex flex-col gap-2 border border-line bg-bg/40 p-5 max-[700px]:col-span-1",children:[f&&n("span",{className:`font-mono ${t.labelSmall} uppercase tracking-[0.24em] text-accent`,children:$(f)}),w&&pe(w).map((e,o)=>n("p",{className:`font-display ${t.body} leading-[1.55] text-fg-dim`,children:$(e)},o))]}),n(ae,{value:d.honeypot,onChange:d.setHoneypot}),d.error&&n("p",{role:"alert",className:`col-span-2 font-mono ${t.labelSmall} uppercase tracking-[0.18em] text-alert max-[700px]:col-span-1`,children:d.error}),i("div",{className:"col-span-2 mt-5 flex flex-wrap items-center justify-between gap-6 border-t border-line pt-6 max-[700px]:col-span-1 max-[700px]:flex-col max-[700px]:items-stretch",children:[M&&n("span",{className:`max-w-[380px] font-mono ${t.labelSmall} uppercase leading-[1.6] tracking-[0.18em] text-fg-dim`,children:$(M)}),n("button",{type:y?"button":"submit",disabled:d.submitting,className:`cursor-pointer bg-btn px-8 py-5 font-mono ${t.labelXl} uppercase tracking-[0.32em] text-btn-ink transition-colors hover:bg-fg disabled:cursor-wait disabled:opacity-60 max-[700px]:w-full`,children:d.submitting?"Sending…":H?T(H):"Send Message →"})]})]}):n("p",{className:`font-mono ${t.labelSmall} uppercase tracking-[0.22em] text-fg-dim`,children:Z?j("Loading form…"):j("Choose a form in the inspector, under Message form — until then this column is hidden on the live page and no message can be sent.")})]}),S.length>0&&n("aside",{className:"flex flex-col gap-0 max-[1100px]:hidden",children:S.map((e,o)=>{const m=U(e),F=!!!e.groupId;return i("div",{...V(e,y),onClick:F?()=>z(e.value):void 0,className:["relative flex flex-col gap-3 border-b border-line border-l-2 px-5 py-8 transition-all",F?"cursor-pointer border-t-2 border-t-accent":"",m?"border-l-accent pl-6":F?"border-l-transparent hover:bg-accent/[0.04]":"border-l-transparent"].join(" "),style:m?{background:"color-mix(in oklab, var(--accent) 8%, transparent)"}:void 0,children:[n("span",{className:[`font-mono ${t.labelSmall} uppercase tracking-[0.3em] transition-colors`,m?"text-fg":"text-accent"].join(" "),children:e.label}),F?n("a",{href:e.href,onClick:Q=>Q.stopPropagation(),className:[`font-heading3 ${t.headingSmall1} font-medium leading-[1.2] tracking-[-0.02em] transition-colors hover:text-accent`,m?"text-accent":"text-fg"].join(" "),children:e.value}):n("a",{href:X(e),className:[`font-heading3 ${t.headingSmall1} font-medium leading-[1.2] tracking-[-0.02em]`,m?"text-accent":"text-fg"].join(" "),children:e.value}),e.sub&&n("span",{className:`font-mono ${t.labelSmall} uppercase tracking-[0.2em] text-fg-dim`,children:e.sub})]},`${e.value}-${o}`)})}),S.length>0&&n("div",{"data-contact-phone-list":!0,className:"hidden flex-col gap-0 max-[1100px]:flex",children:ge(S).map((e,o)=>{const m=!!e.groupId;return i("div",{...V(e,y),className:["flex flex-col gap-3 border-b border-line px-5 py-5",m?"":"border-t-2 border-t-accent"].join(" "),children:[n("span",{className:[`font-mono ${t.labelSmall} uppercase tracking-[0.3em]`,m?"text-fg":"text-accent"].join(" "),children:e.label}),n("a",{href:X(e),className:[`font-heading3 ${t.headingSmall1} font-medium leading-[1.2] tracking-[-0.02em] [overflow-wrap:anywhere]`,m?"text-accent":"text-fg"].join(" "),children:e.value}),e.sub&&n("span",{className:`font-mono ${t.labelSmall} uppercase tracking-[0.2em] text-fg-dim`,children:e.sub})]},`${e.value}-${o}`)})})]})})]})}export{E as CHANNEL_HINTS,X as channelHref,ye as default,be as drawnChannels,A as fieldClass,ge as mergeChannelsForPhone,he as topicFieldOf};
|
|
1
|
+
"use client";import{jsx as n,jsxs as i,Fragment as Y}from"react/jsx-runtime";import ee from"./SectionBand.js";import{useEffect as _,useState as q}from"react";import{useRootIsDark as ne}from"efficient-shell/theme";import{OTHER_REASON_ID as h}from"efficient-web-builder/format/lib/content/contact";import{FormFieldInput as te,FormHoneypot as ae,successMessageFor as re,useBoundForm as le,useFormSubmission as oe}from"./formSubmission.js";import ie from"efficient-web-builder/render/components/SectionEyebrow";import se,{FieldCaption as ce}from"./WebFormField.js";import{scrollBehavior as de}from"efficient-web-builder/render/components/useReducedMotion";import{renderChrome as T,renderGold as $,renderHeadline as me,splitParagraphs as pe}from"efficient-web-builder/render/components/goldPhrases";import{say as j}from"efficient-web-builder/format/lib/editor-words";import{phoneHref as fe}from"efficient-web-builder/format/lib/links/phone-href";import{PART_ROW_ATTR as ue,encodePartRow as be}from"efficient-web-builder/render/lib/document/text-parts";const t={bodySmall:"text-[length:var(--size-body,14px)]",body:"text-[length:var(--size-body,15px)]",bodyLarge:"text-[length:var(--size-body,18px)]",headingSmall1:"text-[length:var(--size-headingSmall,24px)]",headingSmall2:"text-[length:var(--size-headingSmall,26px)]",labelSmall:"text-[length:var(--size-label,12px)]",labelLarge:"text-[length:var(--size-label,13px)]",labelXl:"text-[length:var(--size-label,14px)]"},E={label:"Label",value:"Value",sub:"Sub line"};function xe(s,r){return s.map((l,a)=>r?{...l,at:a,label:l.label||j(E.label),value:l.value||j(E.value),sub:l.sub||j(E.sub)}:{...l,at:a}).filter(l=>!l.hidden)}function V(s,r){return r?{[ue]:be("channels",s.at)}:{}}function X(s){if(s.href)return s.href;const r=(s.value??"").trim();if(r.includes("@"))return`mailto:${r}`;if(/^\+?[\d\s().-]{6,}$/.test(r))return fe(r)}function ge(s){const r=[],l=new Map;for(const a of s){if(!a.groupId){r.push(a);continue}const p=a.value.trim().toLowerCase(),b=l.get(p);if(b)b.label=`${b.label} · ${a.label}`;else{const x={...a};l.set(p,x),r.push(x)}}return r}function he(s,r,l){const a=p=>String(p??"").trim().toLowerCase();for(const p of s?.fields??[]){if(p.type!=="select"||!Array.isArray(p.options))continue;const b=p.options.map(String);if(!r.some(c=>b.some(f=>a(f)===a(c.title))))continue;const x=c=>a(c===h?l:r.find(f=>f.id===c)?.title);return{key:p.key,optionFor:c=>b.find(f=>a(f)===x(c)&&x(c)!==""),idFor:c=>{const f=r.find(S=>a(S.title)===a(c));return f?f.id:l&&a(c)===a(l)?h:void 0}}}return null}const A=`border-b border-line bg-transparent py-4 font-display ${t.bodyLarge} tracking-[0.01em] text-fg outline-none transition-colors focus:border-accent`;function ve({routingNumber:s,routingTagline:r,groups:l,formNumber:a,formHeading:p,metaLines:b,showOther:x=!0,otherLabel:c="Other",otherNoteTitle:f,otherNoteBody:S,buttonText:H,consent:M,channels:B,formSlug:O,form:D,editing:v,initialActiveId:y,onActiveChange:L,reasonExtras:W}){const w=[...l.map(e=>e.id),...x?[h]:[]],G=y&&w.includes(y)?y:w[0]??h,[g,C]=q(G);_(()=>{w.includes(g)||C(w[0]??h)},[w.join("|")]),_(()=>{y&&w.includes(y)&&C(y)},[y]);const k=le(O,D),d=oe({form:k,formSlug:O,editing:v}),u=he(k,l,x?c:void 0),R=e=>{C(e),z(null);const o=u?.optionFor(e);u&&o!==void 0&&d.set(u.key,o),L?.(e)};_(()=>{if(!u||d.valueOf(u.key))return;const e=u.optionFor(g);e!==void 0&&d.set(u.key,e)},[u?.key]);const[P,z]=q(null),N=xe(B??[],!!v),U=e=>P!==null?!e.groupId&&e.value===P:e.groupId===g,Z=k===void 0,I=!!k||!!v,J=!ne({whenUnset:!0}),K=l.length>0||!!v;return i(Y,{children:[K&&i(ee,{className:"border-b border-line py-[60px]",style:J?void 0:{background:"var(--section-bg)"},children:[(s||r)&&i("div",{className:"mb-6 flex items-center gap-6 border-b border-line pb-6",children:[s&&n(ie,{text:s}),r&&n("span",{className:`font-display ${t.bodySmall} uppercase tracking-[0.04em] text-fg-dim`,children:$(r)})]}),n("div",{className:"sf-card grid grid-cols-4 gap-[2px] border border-line bg-line max-view-desktop:grid-cols-2 max-[700px]:grid-cols-1",children:l.map(e=>{const o=g===e.id;return i("button",{type:"button",onClick:()=>{R(e.id),typeof window<"u"&&window.matchMedia("(max-width: 1100px)").matches&&document.getElementById("contact-form")?.scrollIntoView({behavior:de(),block:"start"})},className:["flex min-h-[240px] cursor-pointer flex-col gap-4 px-8 py-10 text-left transition-colors",o?"bg-surface outline outline-2 -outline-offset-2 outline-accent":"bg-bg hover:bg-surface"].join(" "),children:[e.eyebrow&&n("span",{className:`font-mono ${t.labelSmall} uppercase tracking-[0.24em] text-accent`,children:e.eyebrow}),n("h3",{className:`whitespace-pre-line font-heading3 ${t.headingSmall2} font-medium uppercase leading-[1.05] tracking-[-0.02em]`,children:e.title}),e.copy&&n("p",{className:`mt-auto font-display ${t.bodySmall} leading-[1.5] text-fg-dim`,children:e.copy}),e.response&&i("div",{className:`mt-2 flex justify-between border-t border-line pt-4 font-mono ${t.labelSmall} uppercase tracking-[0.22em] text-fg-dim`,children:[n("span",{children:"Response"}),n("strong",{className:"font-normal text-fg",children:e.response})]})]},e.id)})})]}),(I||N.length>0)&&n("section",{id:"contact-form",className:"scroll-mt-[80px] border-b border-line py-20 max-view-desktop:py-[60px]",children:i("div",{className:["mx-auto grid max-w-[var(--sf-site-width,1600px)] gap-20 px-[var(--sf-site-gutter,40px)] max-view-desktop:grid-cols-1 max-view-desktop:gap-[60px] max-view-desktop:px-[min(24px,var(--sf-site-gutter,40px))]",I&&N.length>0?"grid-cols-[1.3fr_1fr]":"grid-cols-1"].join(" "),children:[I&&i("div",{children:[i("div",{className:"mb-8 flex items-end justify-between gap-6 border-b border-line pb-6",children:[i("div",{children:[a&&n("div",{className:`pb-2 font-mono ${t.labelLarge} uppercase tracking-[0.3em] text-accent`,children:$(a)}),p&&n("h2",{className:"font-heading2 text-[length:min(var(--size-headingMedium,clamp(36px,4vw,56px)),var(--sf-heading-max,9999px))] font-medium uppercase leading-none tracking-[-0.03em]",children:me(p,!0)})]}),!!(b&&b.length)&&n("div",{className:`text-right font-mono ${t.labelSmall} uppercase leading-[1.8] tracking-[0.22em] text-fg-dim max-[700px]:text-left`,children:b.map((e,o)=>n("div",{children:e},o))})]}),k?d.done?n("div",{className:`border border-accent bg-accent/[0.08] p-8 font-display ${t.body} leading-[1.6] text-fg-dim`,children:re(k,"Thanks — we've received your message.")}):i("form",{className:"grid grid-cols-2 gap-5 max-[700px]:grid-cols-1",onSubmit:d.handleSubmit,children:[k.fields.map(e=>n(se,{label:e.label,required:e.required,className:e.type==="textarea"||e.type==="checkbox"?"col-span-2 max-[700px]:col-span-1":void 0,children:n(te,{field:e,value:d.valueOf(e.key),onChange:o=>{d.set(e.key,o);const m=u&&e.key===u.key?u.idFor(o):void 0;m!==void 0&&(C(m),z(null),L?.(m))},className:e.type==="textarea"?`${A} min-h-[140px] resize-y leading-[1.5]`:e.type==="checkbox"?"size-4 self-start accent-accent":A})},e.key)),i("div",{className:"col-span-2 flex flex-col gap-2 max-[700px]:col-span-1",children:[n(ce,{required:!0,children:"Reason"}),i("div",{className:"mt-1 flex flex-wrap gap-2",children:[l.map(e=>{const o=g===e.id;return n("button",{type:"button",onClick:()=>R(e.id),className:[`cursor-pointer border px-4 py-3 font-mono ${t.labelSmall} uppercase tracking-[0.2em] transition-colors`,o?"border-accent bg-accent text-bg":"border-line text-fg-dim hover:text-fg"].join(" "),children:e.title},e.id)}),x&&n("button",{type:"button",onClick:()=>R(h),className:[`cursor-pointer border px-4 py-3 font-mono ${t.labelSmall} uppercase tracking-[0.2em] transition-colors`,g===h?"border-accent bg-accent text-bg":"border-line text-fg-dim hover:text-fg"].join(" "),children:T(c)})]})]}),W?.(g),g===h&&(f||S)&&i("div",{className:"sf-card col-span-2 flex flex-col gap-2 border border-line bg-bg/40 p-5 max-[700px]:col-span-1",children:[f&&n("span",{className:`font-mono ${t.labelSmall} uppercase tracking-[0.24em] text-accent`,children:$(f)}),S&&pe(S).map((e,o)=>n("p",{className:`font-display ${t.body} leading-[1.55] text-fg-dim`,children:$(e)},o))]}),n(ae,{value:d.honeypot,onChange:d.setHoneypot}),d.error&&n("p",{role:"alert",className:`col-span-2 font-mono ${t.labelSmall} uppercase tracking-[0.18em] text-alert max-[700px]:col-span-1`,children:d.error}),i("div",{className:"col-span-2 mt-5 flex flex-wrap items-center justify-between gap-6 border-t border-line pt-6 max-[700px]:col-span-1 max-[700px]:flex-col max-[700px]:items-stretch",children:[M&&n("span",{className:`max-w-[380px] font-mono ${t.labelSmall} uppercase leading-[1.6] tracking-[0.18em] text-fg-dim`,children:$(M)}),n("button",{type:v?"button":"submit",disabled:d.submitting,className:`cursor-pointer bg-btn px-8 py-5 font-mono ${t.labelXl} uppercase tracking-[0.32em] text-btn-ink transition-colors hover:bg-fg disabled:cursor-wait disabled:opacity-60 max-[700px]:w-full`,children:d.submitting?"Sending…":H?T(H):"Send Message →"})]})]}):n("p",{className:`font-mono ${t.labelSmall} uppercase tracking-[0.22em] text-fg-dim`,children:Z?j("Loading form…"):j("Choose a form in the inspector, under Message form — until then this column is hidden on the live page and no message can be sent.")})]}),N.length>0&&n("aside",{className:"flex flex-col gap-0 max-view-desktop:hidden",children:N.map((e,o)=>{const m=U(e),F=!!!e.groupId;return i("div",{...V(e,v),onClick:F?()=>z(e.value):void 0,className:["relative flex flex-col gap-3 border-b border-line border-l-2 px-5 py-8 transition-all",F?"cursor-pointer border-t-2 border-t-accent":"",m?"border-l-accent pl-6":F?"border-l-transparent hover:bg-accent/[0.04]":"border-l-transparent"].join(" "),style:m?{background:"color-mix(in oklab, var(--accent) 8%, transparent)"}:void 0,children:[n("span",{className:[`font-mono ${t.labelSmall} uppercase tracking-[0.3em] transition-colors`,m?"text-fg":"text-accent"].join(" "),children:e.label}),F?n("a",{href:e.href,onClick:Q=>Q.stopPropagation(),className:[`font-heading3 ${t.headingSmall1} font-medium leading-[1.2] tracking-[-0.02em] transition-colors hover:text-accent`,m?"text-accent":"text-fg"].join(" "),children:e.value}):n("a",{href:X(e),className:[`font-heading3 ${t.headingSmall1} font-medium leading-[1.2] tracking-[-0.02em]`,m?"text-accent":"text-fg"].join(" "),children:e.value}),e.sub&&n("span",{className:`font-mono ${t.labelSmall} uppercase tracking-[0.2em] text-fg-dim`,children:e.sub})]},`${e.value}-${o}`)})}),N.length>0&&n("div",{"data-contact-phone-list":!0,className:"hidden flex-col gap-0 max-view-desktop:flex",children:ge(N).map((e,o)=>{const m=!!e.groupId;return i("div",{...V(e,v),className:["flex flex-col gap-3 border-b border-line px-5 py-5",m?"":"border-t-2 border-t-accent"].join(" "),children:[n("span",{className:[`font-mono ${t.labelSmall} uppercase tracking-[0.3em]`,m?"text-fg":"text-accent"].join(" "),children:e.label}),n("a",{href:X(e),className:[`font-heading3 ${t.headingSmall1} font-medium leading-[1.2] tracking-[-0.02em] [overflow-wrap:anywhere]`,m?"text-accent":"text-fg"].join(" "),children:e.value}),e.sub&&n("span",{className:`font-mono ${t.labelSmall} uppercase tracking-[0.2em] text-fg-dim`,children:e.sub})]},`${e.value}-${o}`)})})]})})]})}export{E as CHANNEL_HINTS,X as channelHref,ve as default,xe as drawnChannels,A as fieldClass,ge as mergeChannelsForPhone,he as topicFieldOf};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as a,jsxs as r}from"react/jsx-runtime";import
|
|
1
|
+
import{jsx as a,jsxs as r}from"react/jsx-runtime";import x from"efficient-web-builder/render/components/BlockFrame";import f from"efficient-web-builder/render/components/SectionEyebrow";import{renderGold as l,renderHeadline as o,splitParagraphs as g}from"efficient-web-builder/render/components/goldPhrases";const h="py-6",u="pt-0 pb-6";function N({eyebrow:n,title:t,body:i,options:c=[],highlightBadge:p,contained:d,omitHead:m=!1}){return a(x,{contained:d,className:m?u:h,children:r("div",{className:"flex flex-col gap-6",children:[m?null:n||t||i?r("div",{className:"flex max-w-[680px] flex-col gap-3",children:[n&&a(f,{text:n,scaled:!1}),t&&a("h2",{className:"font-heading2 text-[length:min(var(--size-headingMedium,44px),var(--sf-heading-max,9999px))] font-medium leading-[1.05] tracking-[-0.03em] max-view-wide:text-[length:min(var(--size-headingMedium,32px),var(--sf-heading-max,9999px))]",children:o(t,!1)}),i&&g(i).map((e,s)=>a("p",{className:"text-[15px] leading-[1.6] opacity-85",children:l(e)},s))]}):null,c.length>0&&a("ul",{className:"grid grid-cols-3 gap-4 max-view-wide:grid-cols-1",children:c.map((e,s)=>r("li",{className:`sf-card relative flex flex-col gap-2 border bg-surface px-6 py-6 ${e.highlighted?"border-accent":"border-line"}`,children:[e.highlighted&&p&&a("span",{className:"absolute -top-2.5 left-5 bg-bg px-2 font-mono text-[10px] uppercase tracking-[0.25em] text-accent",children:l(p)}),e.name&&a("span",{className:"text-[17px] font-medium",children:l(e.name)}),e.eta&&a("span",{className:"font-mono text-[12px] uppercase tracking-[0.18em] opacity-60",children:l(e.eta)}),e.blurb&&a("p",{className:"text-[13.5px] leading-[1.6] opacity-75",children:l(e.blurb)}),e.price&&a("span",{className:"mt-auto pt-2 font-display text-[20px] font-medium text-accent",children:l(e.price)})]},s))})]})})}export{N as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as t,jsxs as
|
|
1
|
+
import{jsx as t,jsxs as r}from"react/jsx-runtime";import j from"./SectionBand.js";import z from"efficient-web-builder/render/components/Placeholder";import{withRMark as s}from"efficient-web-builder/render/components/RMark";import{renderGold as x}from"efficient-web-builder/render/components/goldPhrases";import{say as d}from"efficient-web-builder/format/lib/editor-words";import{stripMarkup as $}from"efficient-web-builder/format/lib/markup";import{finiteNumber as h}from"efficient-web-builder/format/lib/finite-number";const m={body:"text-[length:var(--size-body,15px)]",labelSmall:"text-[length:var(--size-label,11px)]",label:"text-[length:var(--size-label,12px)]",labelLarge:"text-[length:var(--size-label,13px)]"};function R({rows:b,startLeft:u=!1,layout:v="even",padTop:w,padBottom:N,editing:y=!1}){const i=v==="narrow",o=h(w),c=h(N),p=(b??[]).filter(e=>(e?.eyebrow??"").trim()||(e?.title??"").trim()||(e?.copy??"").trim()||(e?.tag??"").trim()||(e?.image??"").trim()),g=p.length>0?p:y?[{tag:d("Row {n}",{n:1})},{tag:d("Row {n}",{n:2})},{tag:d("Row {n}",{n:3})}]:[];return g.length===0?null:t(j,{className:"relative z-[2] border-b border-line bg-bg",style:{...o===void 0?{}:{paddingTop:o},...c===void 0?{}:{paddingBottom:c}},defaults:{paddingTop:100,paddingBottom:100},children:g.map((e,l)=>{const n=l%2===1!==u;return r("div",{className:["grid items-center py-[60px]",i?"grid-cols-[1fr_460px] gap-[72px]":"grid-cols-2 gap-12","max-view-desktop:grid-cols-1",n?"[direction:rtl] max-view-desktop:[direction:ltr]":"",l>0?"border-t border-line":""].join(" "),children:[r("div",{className:["[direction:ltr] flex flex-col gap-4",i?"max-w-[560px]":"",i&&!n?"ml-auto max-view-desktop:ml-0":""].join(" "),children:[e.eyebrow?.trim()&&t("div",{className:`font-mono ${m.labelLarge} uppercase tracking-[0.2em] text-accent`,children:s(e.eyebrow)}),e.title?.trim()&&t("h2",{className:"font-heading2 text-[length:min(var(--size-headingMedium,clamp(28px,3vw,42px)),var(--sf-heading-max,9999px))] [font-weight:var(--sf-heading-weight,500)] [&_em]:[font-weight:var(--sf-heading-weight-strong,inherit)] leading-[1.1] tracking-[-0.02em]",children:x(e.title,!0)}),e.copy?.trim()&&t("p",{className:`${m.body} leading-[1.6] text-fg-dim`,children:x(e.copy,!1)}),(()=>{const f=(e.specs??[]).filter(a=>(a?.label??"").trim()||(a?.value??"").trim());return f.length===0?null:t("dl",{className:`mt-2 border-t border-line pt-3 font-mono ${m.label} uppercase tracking-[0.1em] leading-[2.1]`,children:f.map((a,k)=>r("div",{className:"flex items-baseline justify-between gap-6",children:[t("dt",{className:"text-fg-dim",children:s(a.label??"")}),t("dd",{className:"text-fg",children:s(a.value??"")})]},k))})})()]}),r("div",{className:["[direction:ltr] flex flex-col gap-3",i?n?"items-end":"items-start":"",i?"max-view-desktop:items-start":""].join(" "),children:[e.media?t("div",{className:"w-full",children:e.media}):t("div",{className:["relative overflow-hidden max-w-full",i?e.imageShape==="wide"?"w-[460px] aspect-[16/9]":"w-[360px] aspect-square":"aspect-square"].join(" "),children:t(z,{label:e.tag?.trim()||e.title?.trim()||`row-${l+1}`,src:e.image||void 0,alt:$(e.title?.trim()||e.tag?.trim()||""),showBackground:!e.image,objectFit:"contain",sizes:i?"(max-width: 1100px) 100vw, 460px":"(max-width: 1100px) 100vw, 50vw"})}),e.tag?.trim()&&t("span",{className:`font-mono ${m.labelSmall} uppercase tracking-[0.2em] text-fg-dim ${n?"text-left":"text-right"}`,children:s(e.tag)})]})]},l)})})}export{R as default};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { EuTyreLabel } from "../lib/tyres/eu-tyre-label.js";
|
|
2
|
-
export declare const EU_LABEL_BAND = "border-b border-line py-[120px] max-
|
|
2
|
+
export declare const EU_LABEL_BAND = "border-b border-line py-[120px] max-view-desktop:py-20";
|
|
3
3
|
export default function EuTyreLabels({ labels, num, capped, }: {
|
|
4
4
|
labels: EuTyreLabel[];
|
|
5
5
|
num: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as
|
|
1
|
+
import{jsx as e,jsxs as o,Fragment as a}from"react/jsx-runtime";import s from"./EuTyreLabelCard.js";import n from"./SectionBand.js";import d from"efficient-web-builder/render/components/SectionHeader";import l from"./SectionFootnote.js";const c="border-b border-line py-[120px] max-view-desktop:py-20";function m({labels:r,num:t,capped:i=!0}){return r.length===0?null:o(n,{className:c,capped:i,children:[e(d,{num:t,title:"EU tyre *label.*",description:"The registered grades for this tyre, read live from the EU product registry.",accent:!0}),e(p,{labels:r})]})}function p({labels:r}){return o(a,{children:[e("div",{className:"grid grid-cols-3 gap-2 max-view-desktop:grid-cols-2 max-view-tablet:grid-cols-1",children:r.map(t=>e(s,{label:t},t.registrationNumber))}),e(l,{text:"Source: *EPREL*, the European Product Registry for Energy Labelling. Grades are shown as registered; the registry is the authority."})]})}export{c as EU_LABEL_BAND,p as EuTyreLabelGrades,m as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as n,jsxs as l}from"react/jsx-runtime";import{useState as G}from"react";import{useScopeClass as ue}from"../lib/use-scope-class.js";import{containerGapProps as he}from"efficient-web-builder/format/lib/content/container-gap";import be from"efficient-web-builder/render/components/SectionHeader";import v from"efficient-web-builder/render/components/PostCard";import ve from"efficient-web-builder/render/components/Placeholder";import{SiteLink as z}from"efficient-web-builder/render/lib/site-runtime";import{renderGold as x,renderHeadline as N}from"efficient-web-builder/render/components/goldPhrases";import{say as y}from"efficient-web-builder/format/lib/editor-words";import{cardImageShapeTokens as Ne}from"efficient-web-builder/format/lib/content/card-image-shape";import{SITE_COLUMN as K}from"efficient-web-builder/format/lib/content/page-width";import{fillRowCss as ye}from"../lib/sections/fill-row.js";import{headIsEmpty as Ee,ownPadding as Te}from"../lib/sections/own-padding.js";const Ae=4;function st(t){if(!Array.isArray(t))return;const a=t.filter(e=>typeof e=="string"&&!!e.trim()).map(e=>e.trim()).slice(0,Ae);return a.length?a:void 0}function ot(t){if(!t||typeof t!="object"||Array.isArray(t))return;const a={};for(const[e,r]of Object.entries(t))if(e.trim()){if(typeof r=="string")r.trim()&&(a[e]=r.trim());else if(Array.isArray(r)){const o=r.filter(c=>typeof c=="string"&&!!c.trim()).map(c=>c.trim());o.length&&(a[e]=o)}}return Object.keys(a).length?a:void 0}function H(t,a){const e=t.facets?.[a];return e===void 0?[]:typeof e=="string"?[e]:e}const _e=new Intl.Collator("en",{numeric:!0,sensitivity:"base"});function Ce(t){const a=[],e=new Map;for(const r of t)for(const o of Object.keys(r.facets??{})){e.has(o)||(a.push(o),e.set(o,new Set));for(const c of H(r,o))e.get(o).add(c)}return a.map(r=>({label:r,values:[...e.get(r)].sort(_e.compare)}))}function Le(t,a){return Object.entries(a).every(([e,r])=>r===""||H(t,e).includes(r))}const W=3,X="featured",J="tabs",q="portrait",u="spread",Q="count",lt=[{label:"Even grid",value:"even"},{label:"Featured first",value:X},{label:"Tabs",value:J},{label:"Photo cards",value:q},{label:"Staggered spread",value:u},{label:"Count",value:Q}],Se=[q,u],it="even",k={min:2,max:11,step:1,fallback:7,unit:"of 12"},$e="bottom-left",Oe=55,we="bottom";function Fe(t){const a=typeof t=="number"?t:Number.parseFloat(String(t??"")),e=Number.isFinite(a)?Math.min(k.max,Math.max(k.min,Math.round(a))):k.fallback;return`${e}fr ${12-e}fr`}const Z={1:"grid-cols-1",2:"grid-cols-2 max-[800px]:grid-cols-1",3:"grid-cols-3 max-[800px]:grid-cols-1",4:"grid-cols-4 max-[1100px]:grid-cols-2 max-[800px]:grid-cols-1"},ee={2:"grid-cols-2",3:"grid-cols-3 max-[800px]:grid-cols-2",4:"grid-cols-4 max-[1100px]:grid-cols-3 max-[800px]:grid-cols-2"},ze="Find by name",ke="Nobody by that name.",Re="Nobody matches.",Me="Any";function Ue(t,a){const e=o=>o.normalize("NFD").replace(/[\u0300-\u036f]/g,"").toLocaleLowerCase().trim(),r=e(a);return r===""||e(t).includes(r)}function te({typed:t,onType:a,wide:e=!1}){return l("label",{className:`flex max-w-[360px] flex-col gap-1.5${e?" w-full":""}`,children:[n("span",{className:"font-mono text-[length:var(--size-label,12px)] uppercase tracking-[0.18em] text-fg-dim",children:ze}),n("input",{type:"search",value:t,onChange:r=>a(r.target.value),autoComplete:"off",className:"rounded-[var(--sf-button-radius,6px)] border border-line bg-bg px-4 py-2.5 text-[length:var(--size-body,15px)] text-fg outline-none focus:border-accent"})]})}function ne({tags:t}){return n("ul",{"aria-label":"Details",className:"flex gap-1.5 overflow-hidden",children:t.map((a,e)=>n("li",{className:"shrink-0 rounded-[var(--sf-button-radius,4px)] border border-line px-2 py-0.5 text-[length:var(--size-label,12px)] text-fg-dim",children:a},`${a}-${e}`))})}function De({card:t,scaffold:a,lower:e=!1}){return l(z,{href:t.href||"#",className:`sf-card group relative isolate flex aspect-[3/4] overflow-hidden bg-surface${e?" min-[801px]:mt-16":""}`,"aria-disabled":a||void 0,tabIndex:a?-1:void 0,children:[n("div",{className:"absolute inset-0 transition-transform duration-700 group-hover:scale-[1.03] motion-reduce:transition-none motion-reduce:group-hover:scale-100",children:n(ve,{label:`card-${t.slug}`,src:t.cover||void 0,sizes:"(max-width: 800px) 50vw, 25vw"})}),n("div",{"aria-hidden":!0,className:"absolute inset-0 z-0",style:{background:"linear-gradient(180deg, transparent 45%, color-mix(in srgb, var(--bg) 88%, transparent) 100%)"}}),t.meta&&n("span",{className:"absolute left-3 top-3 z-[1] rounded-[var(--sf-button-radius,999px)] bg-bg/85 px-2.5 py-1 font-mono text-[length:var(--size-label,11px)] uppercase tracking-[0.16em] text-accent",children:x(t.meta)}),l("div",{className:"relative z-[1] mt-auto flex w-full flex-col gap-1 p-4 max-[800px]:p-3",children:[n("h3",{className:"font-heading3 text-[length:var(--size-headingSmall,24px)] leading-[1.1] tracking-[-0.01em] text-fg",children:N(t.title,!1)}),t.dateLabel&&n("p",{className:"font-mono text-[length:var(--size-label,12px)] uppercase tracking-[0.16em] text-accent",children:x(t.dateLabel)}),t.tags&&t.tags.length>0&&n(ne,{tags:t.tags}),t.excerpt&&n("p",{className:"line-clamp-2 text-[length:var(--size-body,14px)] leading-[1.45] text-fg-dim",children:x(t.excerpt)})]})]})}function Ie({cards:t,scaffold:a}){return n("nav",{"aria-label":"Days",className:"-mx-1 [scrollbar-width:none] max-[800px]:overflow-x-auto [&::-webkit-scrollbar]:hidden",children:n("ul",{className:"flex flex-wrap gap-2 px-1 pb-1 max-[800px]:min-w-max max-[800px]:flex-nowrap",children:t.map((e,r)=>{const o=!!e.meta;return n("li",{children:l(z,{href:e.href||"#","aria-current":o?"page":void 0,"aria-disabled":a||void 0,tabIndex:a?-1:void 0,className:`flex flex-col gap-0.5 rounded-[var(--sf-button-radius,999px)] border px-5 py-2.5 transition-colors ${o?"border-accent bg-accent text-accent-ink":"border-line text-fg hover:border-accent hover:text-accent"}`,children:[n("span",{className:"font-heading3 text-[length:var(--size-body,15px)] leading-[1.2]",children:N(e.title,!1)}),e.excerpt&&n("span",{className:`font-mono text-[length:var(--size-label,11px)] uppercase tracking-[0.14em] ${o?"opacity-80":"text-fg-dim"}`,children:x(e.excerpt)})]})},`${e.slug}-${r}`)})})})}function Pe({count:t,words:a,href:e}){const r=l("span",{className:"inline-flex items-baseline gap-3",children:[n("span",{className:"font-heading text-[length:var(--size-headingLarge,64px)] leading-none text-accent",children:t}),a!==void 0&&n("span",{className:"font-mono text-[length:var(--size-label,13px)] uppercase tracking-[0.2em] text-fg",children:a})]});return e?n(z,{href:e,className:"inline-flex hover:opacity-85",children:r}):r}const je="relative z-[2] bg-bg py-[120px] max-[800px]:py-[70px]",Ve="relative z-[2] bg-bg pt-0 pb-[120px] max-[800px]:pt-0 max-[800px]:pb-[70px]",Ye="relative z-[2] bg-bg py-[32px] max-[800px]:py-[24px]";function Be({num:t,title:a,link:e,posts:r,columns:o,limit:c,showAll:E=!1,editing:T=!1,cardImage:ae,gap:re,gapPhone:se,layout:f,featuredWidth:oe,listCover:le=!0,featuredDarken:ie,omitHead:h=!1,sample:A,nameFilter:ce=!1,padTop:de,padBottom:pe}){const[_,R]=G(""),[M,fe]=G({}),C=ue("ev"),U=r??[],D=E?U.length:typeof c=="number"&&c>0?c:W,L=U.slice(0,D),m=T&&L.length===0;if(L.length===0&&!T)return null;const I=E?W:D,d=m?A?.length?A.slice(0,E?A.length:I):Array.from({length:I},(s,i)=>({slug:`placeholder-${i}`,title:y("Blog post title"),excerpt:y("A short summary of the post appears here."),cover:"",meta:y("Journal"),dateLabel:y("Date")})):L,p=he("Events",re,"both",se),S=f===X&&d.length>1,me=Fe(oe),$=f===J,P=f===Q,j=Se.includes(f??""),O=ce&&!$&&!P&&!S,w=O?Ce(d):[],b=O?d.filter(s=>Ue(s.title,_)&&Le(s,M)):d,F=Te(de,pe),xe=!T&&Ee(t,a,e?.text),V=f===u?"grid-cols-3 max-[800px]:grid-cols-2":ee[Math.min(4,Math.max(2,o??3))]??ee[3],Y=Z[Math.min(4,Math.max(1,o??3))]??Z[3],B=$||S||f===u?"":ye(C,j?V:Y,{cards:b.length});return P?n("section",{className:Ye,style:Object.keys(F).length?F:void 0,children:n("div",{className:K,children:n(Pe,{count:d.length,words:h||a===void 0?void 0:N(a,!1),href:h?void 0:e?.href})})}):n("section",{className:h?Ve:je,style:{...Ne(ae),...F},children:l("div",{className:K,children:[h||xe?null:n(be,{num:t!==void 0?x(t):void 0,title:a!==void 0?N(a,!1):void 0,link:e?{text:x(e.text),href:e.href}:void 0}),O&&l("div",{className:"mb-6 flex flex-col gap-2",children:[w.length===0?n(te,{typed:_,onType:R}):l("div",{className:"flex flex-wrap items-end gap-3",children:[n(te,{typed:_,onType:R,wide:!0}),w.map(({label:s,values:i})=>l("label",{className:"flex min-w-[140px] flex-col gap-1.5 max-[800px]:flex-1",children:[n("span",{className:"font-mono text-[length:var(--size-label,12px)] uppercase tracking-[0.18em] text-fg-dim",children:s}),l("select",{value:M[s]??"",onChange:g=>fe(ge=>({...ge,[s]:g.target.value})),className:"rounded-[var(--sf-button-radius,6px)] border border-line bg-bg px-4 py-2.5 text-[length:var(--size-body,15px)] text-fg outline-none focus:border-accent",children:[n("option",{value:"",children:Me}),i.map(g=>n("option",{value:g,children:g},g))]})]},s))]}),b.length===0&&n("p",{role:"status",className:"text-[length:var(--size-body,14px)] text-fg-dim",children:w.length===0?ke:Re})]}),B&&n("style",{children:B}),$?n(Ie,{cards:d,scaffold:m}):j?n("div",{className:`${C} sf-card-grid grid${p.className} ${V}`,style:p.style,children:b.map((s,i)=>n(De,{card:s,scaffold:m,lower:f===u&&i%3===1},`${s.slug}-${i}`))}):S?l("div",{className:`sf-card-grid grid grid-cols-[var(--sf-events-split)] max-[800px]:grid-cols-1${p.className}`,style:{...p.style,"--sf-events-split":me},children:[n(v,{post:d[0],href:d[0].href,scaffold:m,layout:"cover",darken:ie??Oe,darkenStyle:we,placement:$e},`${d[0].slug}-0`),n("div",{className:`grid auto-rows-min${p.className}`,style:p.style,children:d.slice(1).map((s,i)=>n(v,{post:s,href:s.href,scaffold:m,showCover:le},`${s.slug}-${i+1}`))})]}):n("div",{className:`${C} sf-card-grid grid${p.className} ${Y}`,style:p.style,children:b.map((s,i)=>s.tags&&s.tags.length>0?l("div",{className:"flex flex-col gap-2",children:[n(v,{post:s,href:s.href,scaffold:m}),n(ne,{tags:s.tags})]},`${s.slug}-${i}`):n(v,{post:s,href:s.href,scaffold:m},`${s.slug}-${i}`))})]})})}export{k as EVENTS_FEATURED_WIDTH,lt as EVENTS_LAYOUTS,Q as EVENTS_LAYOUT_COUNT,it as EVENTS_LAYOUT_FALLBACK,X as EVENTS_LAYOUT_FEATURED,q as EVENTS_LAYOUT_PORTRAIT,u as EVENTS_LAYOUT_SPREAD,J as EVENTS_LAYOUT_TABS,Se as EVENTS_PHOTO_LAYOUTS,Ae as MAX_CARD_TAGS,Be as default,Ce as facetChoices,Le as matchesFacets,Ue as matchesName,ot as readFacets,st as readTags};
|
|
1
|
+
import{jsx as n,jsxs as l}from"react/jsx-runtime";import{useState as G}from"react";import{useScopeClass as xe}from"../lib/use-scope-class.js";import{containerGapProps as he}from"efficient-web-builder/format/lib/content/container-gap";import be from"efficient-web-builder/render/components/SectionHeader";import v from"efficient-web-builder/render/components/PostCard";import ve from"efficient-web-builder/render/components/Placeholder";import{SiteLink as F}from"efficient-web-builder/render/lib/site-runtime";import{renderGold as g,renderHeadline as N}from"efficient-web-builder/render/components/goldPhrases";import{say as w}from"efficient-web-builder/format/lib/editor-words";import{cardImageShapeTokens as Ne}from"efficient-web-builder/format/lib/content/card-image-shape";import{SITE_COLUMN as K}from"efficient-web-builder/format/lib/content/page-width";import{fillRowCss as we}from"../lib/sections/fill-row.js";import{headIsEmpty as ye,ownPadding as Ee}from"../lib/sections/own-padding.js";const Te=4;function st(t){if(!Array.isArray(t))return;const a=t.filter(e=>typeof e=="string"&&!!e.trim()).map(e=>e.trim()).slice(0,Te);return a.length?a:void 0}function ot(t){if(!t||typeof t!="object"||Array.isArray(t))return;const a={};for(const[e,r]of Object.entries(t))if(e.trim()){if(typeof r=="string")r.trim()&&(a[e]=r.trim());else if(Array.isArray(r)){const o=r.filter(c=>typeof c=="string"&&!!c.trim()).map(c=>c.trim());o.length&&(a[e]=o)}}return Object.keys(a).length?a:void 0}function H(t,a){const e=t.facets?.[a];return e===void 0?[]:typeof e=="string"?[e]:e}const Ae=new Intl.Collator("en",{numeric:!0,sensitivity:"base"});function _e(t){const a=[],e=new Map;for(const r of t)for(const o of Object.keys(r.facets??{})){e.has(o)||(a.push(o),e.set(o,new Set));for(const c of H(r,o))e.get(o).add(c)}return a.map(r=>({label:r,values:[...e.get(r)].sort(Ae.compare)}))}function Ce(t,a){return Object.entries(a).every(([e,r])=>r===""||H(t,e).includes(r))}const W=3,X="featured",J="tabs",q="portrait",x="spread",Q="count",lt=[{label:"Even grid",value:"even"},{label:"Featured first",value:X},{label:"Tabs",value:J},{label:"Photo cards",value:q},{label:"Staggered spread",value:x},{label:"Count",value:Q}],Le=[q,x],it="even",z={min:2,max:11,step:1,fallback:7,unit:"of 12"},Se="bottom-left",$e=55,Oe="bottom";function ke(t){const a=typeof t=="number"?t:Number.parseFloat(String(t??"")),e=Number.isFinite(a)?Math.min(z.max,Math.max(z.min,Math.round(a))):z.fallback;return`${e}fr ${12-e}fr`}const Z={1:"grid-cols-1",2:"grid-cols-2 max-view-wide:grid-cols-1",3:"grid-cols-3 max-view-wide:grid-cols-1",4:"grid-cols-4 max-view-desktop:grid-cols-2 max-view-wide:grid-cols-1"},ee={2:"grid-cols-2",3:"grid-cols-3 max-view-wide:grid-cols-2",4:"grid-cols-4 max-view-desktop:grid-cols-3 max-view-wide:grid-cols-2"},Fe="Find by name",ze="Nobody by that name.",Re="Nobody matches.",Me="Any";function Ue(t,a){const e=o=>o.normalize("NFD").replace(/[\u0300-\u036f]/g,"").toLocaleLowerCase().trim(),r=e(a);return r===""||e(t).includes(r)}function te({typed:t,onType:a,wide:e=!1}){return l("label",{className:`flex max-w-[360px] flex-col gap-1.5${e?" w-full":""}`,children:[n("span",{className:"font-mono text-[length:var(--size-label,12px)] uppercase tracking-[0.18em] text-fg-dim",children:Fe}),n("input",{type:"search",value:t,onChange:r=>a(r.target.value),autoComplete:"off",className:"rounded-[var(--sf-button-radius,6px)] border border-line bg-bg px-4 py-2.5 text-[length:var(--size-body,15px)] text-fg outline-none focus:border-accent"})]})}function ne({tags:t}){return n("ul",{"aria-label":"Details",className:"flex gap-1.5 overflow-hidden",children:t.map((a,e)=>n("li",{className:"shrink-0 rounded-[var(--sf-button-radius,4px)] border border-line px-2 py-0.5 text-[length:var(--size-label,12px)] text-fg-dim",children:a},`${a}-${e}`))})}function De({card:t,scaffold:a,lower:e=!1}){return l(F,{href:t.href||"#",className:`sf-card group relative isolate flex aspect-[3/4] overflow-hidden bg-surface${e?" min-[801px]:mt-16":""}`,"aria-disabled":a||void 0,tabIndex:a?-1:void 0,children:[n("div",{className:"absolute inset-0 transition-transform duration-700 group-hover:scale-[1.03] motion-reduce:transition-none motion-reduce:group-hover:scale-100",children:n(ve,{label:`card-${t.slug}`,src:t.cover||void 0,sizes:"(max-width: 800px) 50vw, 25vw"})}),n("div",{"aria-hidden":!0,className:"absolute inset-0 z-0",style:{background:"linear-gradient(180deg, transparent 45%, color-mix(in srgb, var(--bg) 88%, transparent) 100%)"}}),t.meta&&n("span",{className:"absolute left-3 top-3 z-[1] rounded-[var(--sf-button-radius,999px)] bg-bg/85 px-2.5 py-1 font-mono text-[length:var(--size-label,11px)] uppercase tracking-[0.16em] text-accent",children:g(t.meta)}),l("div",{className:"relative z-[1] mt-auto flex w-full flex-col gap-1 p-4 max-view-wide:p-3",children:[n("h3",{className:"font-heading3 text-[length:var(--size-headingSmall,24px)] leading-[1.1] tracking-[-0.01em] text-fg",children:N(t.title,!1)}),t.dateLabel&&n("p",{className:"font-mono text-[length:var(--size-label,12px)] uppercase tracking-[0.16em] text-accent",children:g(t.dateLabel)}),t.tags&&t.tags.length>0&&n(ne,{tags:t.tags}),t.excerpt&&n("p",{className:"line-clamp-2 text-[length:var(--size-body,14px)] leading-[1.45] text-fg-dim",children:g(t.excerpt)})]})]})}function Ie({cards:t,scaffold:a}){return n("nav",{"aria-label":"Days",className:"-mx-1 [scrollbar-width:none] max-view-wide:overflow-x-auto [&::-webkit-scrollbar]:hidden",children:n("ul",{className:"flex flex-wrap gap-2 px-1 pb-1 max-view-wide:min-w-max max-view-wide:flex-nowrap",children:t.map((e,r)=>{const o=!!e.meta;return n("li",{children:l(F,{href:e.href||"#","aria-current":o?"page":void 0,"aria-disabled":a||void 0,tabIndex:a?-1:void 0,className:`flex flex-col gap-0.5 rounded-[var(--sf-button-radius,999px)] border px-5 py-2.5 transition-colors ${o?"border-accent bg-accent text-accent-ink":"border-line text-fg hover:border-accent hover:text-accent"}`,children:[n("span",{className:"font-heading3 text-[length:var(--size-body,15px)] leading-[1.2]",children:N(e.title,!1)}),e.excerpt&&n("span",{className:`font-mono text-[length:var(--size-label,11px)] uppercase tracking-[0.14em] ${o?"opacity-80":"text-fg-dim"}`,children:g(e.excerpt)})]})},`${e.slug}-${r}`)})})})}function Pe({count:t,words:a,href:e}){const r=l("span",{className:"inline-flex items-baseline gap-3",children:[n("span",{className:"font-heading text-[length:var(--size-headingLarge,64px)] leading-none text-accent",children:t}),a!==void 0&&n("span",{className:"font-mono text-[length:var(--size-label,13px)] uppercase tracking-[0.2em] text-fg",children:a})]});return e?n(F,{href:e,className:"inline-flex hover:opacity-85",children:r}):r}const je="relative z-[2] bg-bg py-[120px] max-view-wide:py-[70px]",Ve="relative z-[2] bg-bg pt-0 pb-[120px] max-view-wide:pt-0 max-view-wide:pb-[70px]",Ye="relative z-[2] bg-bg py-[32px] max-view-wide:py-[24px]";function Be({num:t,title:a,link:e,posts:r,columns:o,limit:c,showAll:y=!1,editing:E=!1,cardImage:ae,gap:re,gapPhone:se,layout:p,featuredWidth:oe,listCover:le=!0,featuredDarken:ie,omitHead:h=!1,sample:T,nameFilter:ce=!1,padTop:de,padBottom:fe}){const[A,R]=G(""),[M,pe]=G({}),_=xe("ev"),U=r??[],D=y?U.length:typeof c=="number"&&c>0?c:W,C=U.slice(0,D),m=E&&C.length===0;if(C.length===0&&!E)return null;const I=y?W:D,d=m?T?.length?T.slice(0,y?T.length:I):Array.from({length:I},(s,i)=>({slug:`placeholder-${i}`,title:w("Blog post title"),excerpt:w("A short summary of the post appears here."),cover:"",meta:w("Journal"),dateLabel:w("Date")})):C,f=he("Events",re,"both",se),L=p===X&&d.length>1,me=ke(oe),S=p===J,P=p===Q,j=Le.includes(p??""),$=ce&&!S&&!P&&!L,O=$?_e(d):[],b=$?d.filter(s=>Ue(s.title,A)&&Ce(s,M)):d,k=Ee(de,fe),ge=!E&&ye(t,a,e?.text),V=p===x?"grid-cols-3 max-view-wide:grid-cols-2":ee[Math.min(4,Math.max(2,o??3))]??ee[3],Y=Z[Math.min(4,Math.max(1,o??3))]??Z[3],B=S||L||p===x?"":we(_,j?V:Y,{cards:b.length});return P?n("section",{className:Ye,style:Object.keys(k).length?k:void 0,children:n("div",{className:K,children:n(Pe,{count:d.length,words:h||a===void 0?void 0:N(a,!1),href:h?void 0:e?.href})})}):n("section",{className:h?Ve:je,style:{...Ne(ae),...k},children:l("div",{className:K,children:[h||ge?null:n(be,{num:t!==void 0?g(t):void 0,title:a!==void 0?N(a,!1):void 0,link:e?{text:g(e.text),href:e.href}:void 0}),$&&l("div",{className:"mb-6 flex flex-col gap-2",children:[O.length===0?n(te,{typed:A,onType:R}):l("div",{className:"flex flex-wrap items-end gap-3",children:[n(te,{typed:A,onType:R,wide:!0}),O.map(({label:s,values:i})=>l("label",{className:"flex min-w-[140px] flex-col gap-1.5 max-view-wide:flex-1",children:[n("span",{className:"font-mono text-[length:var(--size-label,12px)] uppercase tracking-[0.18em] text-fg-dim",children:s}),l("select",{value:M[s]??"",onChange:u=>pe(ue=>({...ue,[s]:u.target.value})),className:"rounded-[var(--sf-button-radius,6px)] border border-line bg-bg px-4 py-2.5 text-[length:var(--size-body,15px)] text-fg outline-none focus:border-accent",children:[n("option",{value:"",children:Me}),i.map(u=>n("option",{value:u,children:u},u))]})]},s))]}),b.length===0&&n("p",{role:"status",className:"text-[length:var(--size-body,14px)] text-fg-dim",children:O.length===0?ze:Re})]}),B&&n("style",{children:B}),S?n(Ie,{cards:d,scaffold:m}):j?n("div",{className:`${_} sf-card-grid grid${f.className} ${V}`,style:f.style,children:b.map((s,i)=>n(De,{card:s,scaffold:m,lower:p===x&&i%3===1},`${s.slug}-${i}`))}):L?l("div",{className:`sf-card-grid grid grid-cols-[var(--sf-events-split)] max-view-wide:grid-cols-1${f.className}`,style:{...f.style,"--sf-events-split":me},children:[n(v,{post:d[0],href:d[0].href,scaffold:m,layout:"cover",darken:ie??$e,darkenStyle:Oe,placement:Se},`${d[0].slug}-0`),n("div",{className:`grid auto-rows-min${f.className}`,style:f.style,children:d.slice(1).map((s,i)=>n(v,{post:s,href:s.href,scaffold:m,showCover:le},`${s.slug}-${i+1}`))})]}):n("div",{className:`${_} sf-card-grid grid${f.className} ${Y}`,style:f.style,children:b.map((s,i)=>s.tags&&s.tags.length>0?l("div",{className:"flex flex-col gap-2",children:[n(v,{post:s,href:s.href,scaffold:m}),n(ne,{tags:s.tags})]},`${s.slug}-${i}`):n(v,{post:s,href:s.href,scaffold:m},`${s.slug}-${i}`))})]})})}export{z as EVENTS_FEATURED_WIDTH,lt as EVENTS_LAYOUTS,Q as EVENTS_LAYOUT_COUNT,it as EVENTS_LAYOUT_FALLBACK,X as EVENTS_LAYOUT_FEATURED,q as EVENTS_LAYOUT_PORTRAIT,x as EVENTS_LAYOUT_SPREAD,J as EVENTS_LAYOUT_TABS,Le as EVENTS_PHOTO_LAYOUTS,Te as MAX_CARD_TAGS,Be as default,_e as facetChoices,Ce as matchesFacets,Ue as matchesName,ot as readFacets,st as readTags};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{jsx as t,jsxs as
|
|
1
|
+
"use client";import{jsx as t,jsxs as l,Fragment as D}from"react/jsx-runtime";import F from"./SectionBand.js";import{useEffect as J,useState as A}from"react";import E from"efficient-web-builder/render/components/SectionHeader";import M from"./SectionFootnote.js";import{renderGold as u,renderHeadline as _}from"efficient-web-builder/render/components/goldPhrases";import Q from"./fitment/FitmentRowFit.js";import{useVehicleFit as Y}from"./fitment/useVehicleFit.js";import{fitmentRowAnswer as ee}from"../lib/wheels/fitment-row-fit.js";import{fitmentColumns as te,loadUnitFor as ne}from"../lib/wheels/fitment-columns.js";import{useActiveCountry as le}from"./CurrencyContext.js";import{say as T}from"efficient-web-builder/format/lib/editor-words";import{useEnglish as re}from"./EnglishVariant.js";const o={body:"text-[length:var(--size-body,12px)]",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)]"},oe=[],ae="whitespace-nowrap border-b border-line px-4 py-4",X=`relative cursor-pointer border-2 px-4 py-2 font-mono ${o.labelSmall} font-semibold uppercase tracking-[0.18em] text-fg transition-colors`,j="border-b border-line py-[120px] max-view-desktop:py-20",L="border-b border-line pt-0 pb-[120px] max-view-desktop:pt-0 max-view-desktop:pb-20",R={background:"color-mix(in oklab, var(--accent) 14%, transparent)"},B=(a,i,s)=>i.map(f=>f.cell(a,s)).join("|");function ie({num:a,title:i,description:s,rows:f,showFilter:I=!0,tooltipDefaultOn:b=!0,footnote:H,footnoteLinkText:O,footnoteLinkHref:W,editing:y=!1,omitHead:p=!1,fieldUsage:G=oe}){const N=f??[],c=te(G),K=re(),h=ne(le()),[x,k]=A(null),[r,S]=A(b);J(()=>S(b),[b]);const P=Y({editing:y}),$=c.length===0;if(N.length===0||$)return y?l(F,{className:p?L:j,children:[p?null:t(E,{num:a!=null?u(a):void 0,title:i!=null?_(i,!1):void 0,description:s!=null?u(s):void 0,accent:!0}),t("p",{className:`border-t border-line py-6 font-mono ${o.labelLarge} uppercase tracking-[0.18em] text-fg-dim`,children:$?T("Every fitment column is hidden in Product Types — show one to draw this table."):T("No fitment data for this wheel — pick a wheel with fitment specs.")})]}):null;const z=new Set,g=N.filter(e=>{const n=B(e,c,h);return z.has(n)?!1:(z.add(n),!0)}),w=Array.from(new Set(g.map(e=>e.diameter))).sort((e,n)=>e-n),d=x!==null&&w.includes(x)?x:null,v=d===null?g:g.filter(e=>e.diameter===d),V=I&&w.length>1,U=e=>{if(e===0)return!1;const n=v[e-1],m=v[e];return n.diameter!==m.diameter||n.width!==m.width};return l(F,{className:p?L:j,children:[p?null:t(E,{num:a!=null?u(a):void 0,title:i!=null?_(i,!1):void 0,description:s!=null?u(s):void 0,accent:!0}),l("div",{className:"mb-6 flex flex-wrap items-center gap-x-2 gap-y-3",children:[V&&l(D,{children:[t("span",{className:`mr-2 font-mono ${o.labelSmall} uppercase tracking-[0.24em] text-fg-dim max-view-tablet:mr-0 max-view-tablet:mb-1 max-view-tablet:w-full`,children:"Filter by size:"}),l("button",{type:"button",onClick:()=>k(null),className:`${X} ${d===null?"border-accent outline outline-1 outline-accent -outline-offset-1":"border-fg-dim/50 hover:border-accent"}`,style:d===null?R:void 0,children:[d===null&&t("span",{"aria-hidden":!0,className:"absolute inset-y-0 left-0 w-[3px] bg-accent"}),"All"]}),w.map(e=>{const n=e===d;return l("button",{type:"button",onClick:()=>k(n?null:e),className:`${X} ${n?"border-accent outline outline-1 outline-accent -outline-offset-1":"border-fg-dim/50 hover:border-accent"}`,style:n?R:void 0,children:[n&&t("span",{"aria-hidden":!0,className:"absolute inset-y-0 left-0 w-[3px] bg-accent"}),e,'"']},e)})]}),l("button",{type:"button",onClick:()=>S(e=>!e),"aria-pressed":r,"aria-label":r?"Hide vehicle tooltip":"Show vehicle tooltip",className:`ml-auto inline-flex items-center gap-3 font-mono ${o.labelSmall} uppercase tracking-[0.24em] text-fg-dim transition-colors hover:text-fg max-view-tablet:hidden`,children:[t("span",{children:"Vehicle tooltip"}),t("span",{className:`relative inline-flex h-5 w-9 shrink-0 items-center rounded-full border-2 transition-colors ${r?"border-accent":"border-fg-dim/50"}`,style:r?{background:"color-mix(in oklab, var(--accent) 30%, transparent)"}:void 0,"aria-hidden":!0,children:t("span",{className:`block h-3 w-3 rounded-full transition-transform ${r?"translate-x-[18px] bg-accent":"translate-x-[2px] bg-fg-dim"}`})}),t("span",{className:r?"text-accent":"text-fg-dim",children:r?"On":"Off"})]})]}),t("div",{className:"-mx-1 overflow-x-auto",children:l("table",{className:`w-full border-collapse font-mono ${o.labelXl} tracking-[0.06em] text-fg`,children:[t("thead",{children:t("tr",{children:c.map(({header:e},n)=>t("th",{className:`whitespace-nowrap border-b border-line bg-surface px-4 py-4 text-left ${o.body} font-normal uppercase tracking-[0.22em] text-fg-dim`,children:K(e)},n))})}),t("tbody",{children:v.map((e,n)=>t("tr",{className:`group transition-colors hover:[&>td]:bg-surface ${U(n)?"[&>td]:border-t [&>td]:border-line":""}`,children:c.map((m,Z)=>{const C=Z===c.length-1,q=m.fieldKey==="diameter";return l("td",{className:`${C?"relative ":""}${ae}${q?" text-accent":""}`,children:[m.cell(e,h),C&&r&&t("span",{role:"tooltip",className:`pointer-events-none absolute top-1/2 right-0 z-20 hidden w-[520px] -translate-y-1/2 whitespace-normal bg-[var(--tooltip-bg)] px-3 py-2 text-right font-mono ${o.labelXs} normal-case tracking-[0.12em] text-fg shadow-lg group-hover:block max-view-tablet:!hidden`,children:t(Q,{answer:ee(e,P)})})]},m.fieldKey)})},B(e,c,h)))})]})}),t(M,{text:H,linkText:O,linkHref:W})]})}export{ie as default};
|