@40rty/ams-ui 0.5.6 → 0.5.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/agent.js +3 -2
- package/dist/{chunk-2HM6EVDV.js → chunk-4ZX4IRC6.js} +241 -389
- package/dist/chunk-FSY7MEP5.js +843 -0
- package/dist/{chunk-WVD2Y2N2.js → chunk-G3IXNKXL.js} +15 -8
- package/dist/{chunk-H6MSAD5M.js → chunk-KNIUL72S.js} +10 -5
- package/dist/{chunk-CKNELL6G.js → chunk-M5T3ZTBB.js} +109 -79
- package/dist/{chunk-432XYPDT.js → chunk-ZP27BQQE.js} +1 -1
- package/dist/conversation.js +24 -21
- package/dist/css/preset/motion.css +4 -1
- package/dist/css/shell/spacefront-island.css +8 -6
- package/dist/css/shell/spacefront-presence.css +9 -4
- package/dist/css/shell/spacefront-thread-panel.css +12 -5
- package/dist/index.js +473 -403
- package/dist/island.js +18 -11
- package/dist/motion.js +1 -1
- package/dist/presence.js +20 -11
- package/dist/shell.js +6 -5
- package/dist/thread-panel.js +19 -9
- package/dist/types/catalog-data/ecommerce.d.ts +42 -0
- package/dist/types/catalog-data/social.d.ts +14 -0
- package/dist/types/components/content/article/BlogPosts.d.ts +1 -1
- package/dist/types/components/ecommerce/cart/cart-format.d.ts +3 -2
- package/dist/types/components/ecommerce/collection/CollectionList.d.ts +1 -1
- package/dist/types/components/ecommerce/product/AddToRegistry.d.ts +1 -1
- package/dist/types/components/ecommerce/product/ProductPrice.d.ts +1 -0
- package/dist/types/components/feedback/HydrationNotice.d.ts +9 -0
- package/dist/types/components/layout/Drawer.d.ts +2 -0
- package/dist/types/conversation/blocks/schemas.d.ts +40 -0
- package/dist/types/index.d.ts +3 -2
- package/dist/types/labels/en/agent.d.ts +2 -0
- package/dist/types/labels/en/commerce.d.ts +2 -0
- package/dist/types/labels/en/content.d.ts +2 -0
- package/dist/types/labels/en/notices.d.ts +2 -0
- package/dist/types/labels/en/shell.d.ts +2 -0
- package/dist/types/labels/he/agent.d.ts +2 -0
- package/dist/types/labels/he/commerce.d.ts +2 -0
- package/dist/types/labels/he/content.d.ts +2 -0
- package/dist/types/labels/he/count.d.ts +17 -0
- package/dist/types/labels/he/notices.d.ts +2 -0
- package/dist/types/labels/he/shell.d.ts +2 -0
- package/dist/types/labels/index.d.ts +34 -0
- package/dist/types/{labels.d.ts → labels/types-agent.d.ts} +4 -120
- package/dist/types/labels/types-commerce.d.ts +252 -0
- package/dist/types/labels/types-content.d.ts +28 -0
- package/dist/types/labels/types-notices.d.ts +9 -0
- package/dist/types/labels/types-shell.d.ts +137 -0
- package/dist/types/labels-context.d.ts +19 -5
- package/dist/types/primitives/Money/index.d.ts +1 -1
- package/dist/types/shell/Composer.d.ts +1 -1
- package/dist/types/shell/SideDock.d.ts +1 -1
- package/dist/types/shell/SpacefrontIsland.d.ts +1 -1
- package/dist/types/shell/SpacefrontPresence.d.ts +1 -1
- package/dist/types/shell/VoiceIsland.d.ts +1 -1
- package/dist/types/utils/format-money.d.ts +3 -1
- package/dist/types/utils/mirror-x.d.ts +8 -0
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -19,7 +19,6 @@ import {
|
|
|
19
19
|
import {
|
|
20
20
|
AgentPresenceWidget,
|
|
21
21
|
BriefHandle,
|
|
22
|
-
DEFAULT_LABELS,
|
|
23
22
|
DefaultNotch,
|
|
24
23
|
Dossier,
|
|
25
24
|
Eyebrow,
|
|
@@ -27,7 +26,6 @@ import {
|
|
|
27
26
|
Fallback,
|
|
28
27
|
FoldedRead,
|
|
29
28
|
InlinePresenceRead,
|
|
30
|
-
LabelsProvider,
|
|
31
29
|
LayoutMorphSkeleton,
|
|
32
30
|
PresenceBriefBody,
|
|
33
31
|
PresenceBriefDrawer,
|
|
@@ -35,11 +33,11 @@ import {
|
|
|
35
33
|
Rule,
|
|
36
34
|
Thought,
|
|
37
35
|
colorSwatch,
|
|
36
|
+
mirrorX,
|
|
38
37
|
presenceClass,
|
|
39
38
|
registerDefaultPresenceForms,
|
|
40
|
-
useLabels,
|
|
41
39
|
useMeasuredHeight
|
|
42
|
-
} from "./chunk-
|
|
40
|
+
} from "./chunk-4ZX4IRC6.js";
|
|
43
41
|
import {
|
|
44
42
|
readFacts,
|
|
45
43
|
readLabel,
|
|
@@ -53,12 +51,22 @@ import {
|
|
|
53
51
|
Spinner,
|
|
54
52
|
cn
|
|
55
53
|
} from "./chunk-WDL5PHO2.js";
|
|
54
|
+
import {
|
|
55
|
+
DEFAULT_LABELS,
|
|
56
|
+
EN_LABELS,
|
|
57
|
+
HE_LABELS,
|
|
58
|
+
LabelsProvider,
|
|
59
|
+
labelsForLocale,
|
|
60
|
+
useLabels,
|
|
61
|
+
useLocale,
|
|
62
|
+
useTextDirection
|
|
63
|
+
} from "./chunk-FSY7MEP5.js";
|
|
56
64
|
import {
|
|
57
65
|
AnimatePresence,
|
|
58
66
|
Reveal,
|
|
59
67
|
motion,
|
|
60
68
|
useReducedMotion
|
|
61
|
-
} from "./chunk-
|
|
69
|
+
} from "./chunk-ZP27BQQE.js";
|
|
62
70
|
|
|
63
71
|
// src/catalog.ts
|
|
64
72
|
import { adaptComponent, adaptCatalogComponent, buildComponentLibrary } from "@40rty/ams-sdk";
|
|
@@ -164,9 +172,9 @@ function HeroBannerFeatures({ features }) {
|
|
|
164
172
|
// src/components/marketing/HeroBanner.tsx
|
|
165
173
|
import { Fragment as Fragment2, jsx as jsx3, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
166
174
|
var alignClasses = {
|
|
167
|
-
left: "text-
|
|
175
|
+
left: "text-start items-start",
|
|
168
176
|
center: "text-center items-center",
|
|
169
|
-
right: "text-
|
|
177
|
+
right: "text-end items-end"
|
|
170
178
|
};
|
|
171
179
|
var HeroBanner = React.forwardRef(
|
|
172
180
|
({
|
|
@@ -193,6 +201,7 @@ var HeroBanner = React.forwardRef(
|
|
|
193
201
|
primaryCta?.action
|
|
194
202
|
);
|
|
195
203
|
const onSecondary = useAction(secondaryCta?.label ?? "", secondaryCta?.action);
|
|
204
|
+
const labels = useLabels().content;
|
|
196
205
|
const hasImage = !!backgroundImage;
|
|
197
206
|
const kickerText = kicker ?? badge;
|
|
198
207
|
const safeFeatures = Array.isArray(features) ? features : [];
|
|
@@ -361,9 +370,9 @@ var HeroBanner = React.forwardRef(
|
|
|
361
370
|
},
|
|
362
371
|
initial: false,
|
|
363
372
|
className: "pointer-events-auto absolute inset-x-0 bottom-7 z-10 mx-auto flex w-fit cursor-pointer flex-col items-center gap-2 bg-transparent text-white/70 transition-opacity hover:text-white",
|
|
364
|
-
"aria-label":
|
|
373
|
+
"aria-label": labels.scrollNext,
|
|
365
374
|
children: [
|
|
366
|
-
/* @__PURE__ */ jsx3("span", { className: "text-[10px] font-medium uppercase tracking-[0.32em]", children:
|
|
375
|
+
/* @__PURE__ */ jsx3("span", { className: "text-[10px] font-medium uppercase tracking-[0.32em]", children: labels.scroll }),
|
|
367
376
|
/* @__PURE__ */ jsx3(
|
|
368
377
|
motion2.span,
|
|
369
378
|
{
|
|
@@ -591,7 +600,7 @@ import React3 from "react";
|
|
|
591
600
|
// src/utils/format-money.ts
|
|
592
601
|
var formatterCache = /* @__PURE__ */ new Map();
|
|
593
602
|
function getFormatter(currencyCode, locale) {
|
|
594
|
-
const key = `${locale
|
|
603
|
+
const key = `${locale}:${currencyCode}`;
|
|
595
604
|
let formatter = formatterCache.get(key);
|
|
596
605
|
if (!formatter) {
|
|
597
606
|
formatter = new Intl.NumberFormat(locale, {
|
|
@@ -611,10 +620,12 @@ function formatMoney(money, locale) {
|
|
|
611
620
|
import { jsx as jsx5, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
612
621
|
var ProductPrice = React3.forwardRef(
|
|
613
622
|
({ className, price, compareAtPrice, locale, ...props }, ref) => {
|
|
623
|
+
const spaceLocale = useLocale();
|
|
624
|
+
const fmtLocale = locale === void 0 ? spaceLocale : locale;
|
|
614
625
|
const isOnSale = compareAtPrice && compareAtPrice.amount > price.amount;
|
|
615
626
|
return /* @__PURE__ */ jsxs5("div", { ref, className: cn("flex items-center gap-2", className), ...props, children: [
|
|
616
|
-
/* @__PURE__ */ jsx5("span", { className: cn("font-medium", isOnSale && "text-[var(--fourty-color-sale)]"), children: formatMoney(price,
|
|
617
|
-
isOnSale && /* @__PURE__ */ jsx5("span", { className: "text-sm text-[var(--fourty-color-text-subtle)] line-through", children: formatMoney(compareAtPrice,
|
|
627
|
+
/* @__PURE__ */ jsx5("span", { className: cn("font-medium", isOnSale && "text-[var(--fourty-color-sale)]"), children: formatMoney(price, fmtLocale) }),
|
|
628
|
+
isOnSale && /* @__PURE__ */ jsx5("span", { className: "text-sm text-[var(--fourty-color-text-subtle)] line-through", children: formatMoney(compareAtPrice, fmtLocale) })
|
|
618
629
|
] });
|
|
619
630
|
}
|
|
620
631
|
);
|
|
@@ -654,6 +665,7 @@ Badge.displayName = "Badge";
|
|
|
654
665
|
import { jsx as jsx7 } from "react/jsx-runtime";
|
|
655
666
|
var ProductBadge = React5.forwardRef(
|
|
656
667
|
({ className, product, type, compareAtPrice, availableForSale, ...props }, ref) => {
|
|
668
|
+
const badges = useLabels().product.badge;
|
|
657
669
|
const resolvedCompare = compareAtPrice ?? product?.compareAtPrice;
|
|
658
670
|
const resolvedAvailable = availableForSale ?? product?.availableForSale ?? true;
|
|
659
671
|
const resolvedPrice = product?.price;
|
|
@@ -667,9 +679,9 @@ var ProductBadge = React5.forwardRef(
|
|
|
667
679
|
}
|
|
668
680
|
if (!badgeType) return null;
|
|
669
681
|
const labelMap = {
|
|
670
|
-
sale:
|
|
671
|
-
"sold-out":
|
|
672
|
-
new:
|
|
682
|
+
sale: badges.sale,
|
|
683
|
+
"sold-out": badges.soldOut,
|
|
684
|
+
new: badges.new
|
|
673
685
|
};
|
|
674
686
|
const variantMap = {
|
|
675
687
|
sale: "sale",
|
|
@@ -876,6 +888,7 @@ function ProductImage({
|
|
|
876
888
|
const imgRef = React7.useRef(null);
|
|
877
889
|
const surfaceRef = React7.useRef(null);
|
|
878
890
|
const generation = useGenerationStyle();
|
|
891
|
+
const labels = useLabels().product;
|
|
879
892
|
const [errored, setErrored] = React7.useState(false);
|
|
880
893
|
const [loaded, setLoaded] = React7.useState(false);
|
|
881
894
|
const imageTrim = useImageTrim(src, trim);
|
|
@@ -985,7 +998,7 @@ function ProductImage({
|
|
|
985
998
|
}
|
|
986
999
|
}
|
|
987
1000
|
),
|
|
988
|
-
showFallback && /* @__PURE__ */ jsx8("div", { className: "absolute inset-0 flex items-center justify-center bg-[var(--fourty-color-bg-subtle)] text-xs uppercase tracking-wider text-[var(--fourty-color-text-subtle)]", children:
|
|
1001
|
+
showFallback && /* @__PURE__ */ jsx8("div", { className: "absolute inset-0 flex items-center justify-center bg-[var(--fourty-color-bg-subtle)] text-xs uppercase tracking-wider text-[var(--fourty-color-text-subtle)]", children: labels.noImage })
|
|
989
1002
|
]
|
|
990
1003
|
}
|
|
991
1004
|
);
|
|
@@ -1099,7 +1112,7 @@ var ProductCard = React8.forwardRef(
|
|
|
1099
1112
|
fit: "contain"
|
|
1100
1113
|
}
|
|
1101
1114
|
),
|
|
1102
|
-
/* @__PURE__ */ jsx10("div", { style: { position: "absolute",
|
|
1115
|
+
/* @__PURE__ */ jsx10("div", { style: { position: "absolute", insetInlineStart: 12, top: 10, zIndex: 2 }, children: /* @__PURE__ */ jsx10(
|
|
1103
1116
|
ProductBadge,
|
|
1104
1117
|
{
|
|
1105
1118
|
product,
|
|
@@ -1122,8 +1135,8 @@ var ProductCard = React8.forwardRef(
|
|
|
1122
1135
|
] }) : /* @__PURE__ */ jsxs7(Fragment3, { children: [
|
|
1123
1136
|
/* @__PURE__ */ jsx10(PlusGlyph, {}),
|
|
1124
1137
|
/* @__PURE__ */ jsx10("span", { children: labels.product.addToBag })
|
|
1125
|
-
] }) }) : /* @__PURE__ */ jsx10("span", { children:
|
|
1126
|
-
/* @__PURE__ */ jsx10("span", { className: "product-card__arrow", children: "\u2192" })
|
|
1138
|
+
] }) }) : /* @__PURE__ */ jsx10("span", { children: labels.product.specSheet }),
|
|
1139
|
+
/* @__PURE__ */ jsx10("span", { "aria-hidden": "true", className: "product-card__arrow rtl:inline-block rtl:-scale-x-100", children: "\u2192" })
|
|
1127
1140
|
] })
|
|
1128
1141
|
]
|
|
1129
1142
|
}
|
|
@@ -1199,6 +1212,7 @@ var ProductGallery = React10.forwardRef(
|
|
|
1199
1212
|
({ className, images: imagesProp, aspectRatio = 1, mode = "aspect", ...props }, ref) => {
|
|
1200
1213
|
const images = Array.isArray(imagesProp) ? imagesProp : [];
|
|
1201
1214
|
const [selectedIndex, setSelectedIndex] = useState3(0);
|
|
1215
|
+
const labels = useLabels().product;
|
|
1202
1216
|
const selectedImage = images[selectedIndex];
|
|
1203
1217
|
const isFill = mode === "fill";
|
|
1204
1218
|
if (images.length === 0) {
|
|
@@ -1209,7 +1223,7 @@ var ProductGallery = React10.forwardRef(
|
|
|
1209
1223
|
className: cn("rounded-lg bg-[var(--fourty-color-bg-subtle)]", isFill && "h-full w-full", className),
|
|
1210
1224
|
style: isFill ? void 0 : { aspectRatio: String(aspectRatio) },
|
|
1211
1225
|
...props,
|
|
1212
|
-
children: /* @__PURE__ */ jsx12("div", { className: "flex h-full items-center justify-center text-[var(--fourty-color-text-subtle)]", children:
|
|
1226
|
+
children: /* @__PURE__ */ jsx12("div", { className: "flex h-full items-center justify-center text-[var(--fourty-color-text-subtle)]", children: labels.noImages })
|
|
1213
1227
|
}
|
|
1214
1228
|
);
|
|
1215
1229
|
}
|
|
@@ -1242,7 +1256,7 @@ var ProductGallery = React10.forwardRef(
|
|
|
1242
1256
|
}
|
|
1243
1257
|
}
|
|
1244
1258
|
),
|
|
1245
|
-
images.length > 1 && /* @__PURE__ */ jsx12("div", { className: "absolute bottom-3
|
|
1259
|
+
images.length > 1 && /* @__PURE__ */ jsx12("div", { className: "absolute bottom-3 start-3 flex gap-2", children: images.map((image, index) => /* @__PURE__ */ jsx12(
|
|
1246
1260
|
"button",
|
|
1247
1261
|
{
|
|
1248
1262
|
type: "button",
|
|
@@ -1303,6 +1317,7 @@ ProductGallery.displayName = "ProductGallery";
|
|
|
1303
1317
|
import { orderedVideoSources } from "@40rty/ams-sdk";
|
|
1304
1318
|
import { jsx as jsx13 } from "react/jsx-runtime";
|
|
1305
1319
|
function ProductVideoPlayer({ videos, className }) {
|
|
1320
|
+
const labels = useLabels().product;
|
|
1306
1321
|
const video = videos.length > 0 ? videos[0] : void 0;
|
|
1307
1322
|
if (video === void 0) return null;
|
|
1308
1323
|
const label = video.altText.length > 0 ? video.altText : void 0;
|
|
@@ -1312,7 +1327,7 @@ function ProductVideoPlayer({ videos, className }) {
|
|
|
1312
1327
|
"iframe",
|
|
1313
1328
|
{
|
|
1314
1329
|
src: video.embedUrl,
|
|
1315
|
-
title: label === void 0 ?
|
|
1330
|
+
title: label === void 0 ? labels.video : label,
|
|
1316
1331
|
allow: "autoplay; fullscreen; picture-in-picture",
|
|
1317
1332
|
loading: "lazy"
|
|
1318
1333
|
}
|
|
@@ -1421,7 +1436,7 @@ function Reviews(props) {
|
|
|
1421
1436
|
children: review.author
|
|
1422
1437
|
}
|
|
1423
1438
|
),
|
|
1424
|
-
review.verified && /* @__PURE__ */ jsx14("p", { className: "text-[11px] uppercase tracking-[0.18em] text-[var(--fourty-color-text-subtle)]", children:
|
|
1439
|
+
review.verified && /* @__PURE__ */ jsx14("p", { className: "text-[11px] uppercase tracking-[0.18em] text-[var(--fourty-color-text-subtle)]", children: labels.reviews.verifiedBuyer })
|
|
1425
1440
|
] }),
|
|
1426
1441
|
/* @__PURE__ */ jsx14(
|
|
1427
1442
|
"p",
|
|
@@ -1452,7 +1467,7 @@ function sanitizeHtml(html) {
|
|
|
1452
1467
|
}
|
|
1453
1468
|
|
|
1454
1469
|
// src/components/ecommerce/product/ProductDetail.tsx
|
|
1455
|
-
import { jsx as jsx15, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
1470
|
+
import { Fragment as Fragment4, jsx as jsx15, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
1456
1471
|
function findBestVariantForOption(variants3, currentIdx, optName, optValue) {
|
|
1457
1472
|
const currentOpts = Array.isArray(variants3[currentIdx]?.selectedOptions) ? variants3[currentIdx].selectedOptions : [];
|
|
1458
1473
|
const desired = {};
|
|
@@ -1493,6 +1508,7 @@ function resolveVariantSelection(product, facts) {
|
|
|
1493
1508
|
}
|
|
1494
1509
|
function ProductDetail(props) {
|
|
1495
1510
|
const labels = useLabels();
|
|
1511
|
+
const locale = useLocale();
|
|
1496
1512
|
const projection = useProjection(props.__projection, props.product);
|
|
1497
1513
|
const rawProduct = props.product;
|
|
1498
1514
|
const rawProducts = props.products;
|
|
@@ -1568,9 +1584,9 @@ function ProductDetail(props) {
|
|
|
1568
1584
|
const images = (parsed.images ?? []).map((img) => ({ url: img.url, altText: img.altText ?? "" }));
|
|
1569
1585
|
const priceAmount = selectedVariant?.price?.amount ?? parsed.price?.amount ?? 0;
|
|
1570
1586
|
const priceCurrency = selectedVariant?.price?.currencyCode ?? parsed.price?.currencyCode ?? "USD";
|
|
1571
|
-
const priceLabel = priceAmount > 0 ? new Intl.NumberFormat(
|
|
1587
|
+
const priceLabel = priceAmount > 0 ? new Intl.NumberFormat(locale, { style: "currency", currency: priceCurrency }).format(priceAmount) : "";
|
|
1572
1588
|
const compareAt = selectedVariant?.compareAtPrice?.amount ?? parsed.compareAtPrice?.amount;
|
|
1573
|
-
const compareLabel = compareAt && compareAt > priceAmount ? new Intl.NumberFormat(
|
|
1589
|
+
const compareLabel = compareAt && compareAt > priceAmount ? new Intl.NumberFormat(locale, { style: "currency", currency: priceCurrency }).format(compareAt) : "";
|
|
1574
1590
|
const optionRows = (Array.isArray(parsed.options) ? parsed.options : []).filter((o) => {
|
|
1575
1591
|
if (!Array.isArray(o.values)) return false;
|
|
1576
1592
|
if (projection.active && !projection.expanded) return projection.trimmedAxes.includes(o.name);
|
|
@@ -1672,7 +1688,7 @@ function ProductDetail(props) {
|
|
|
1672
1688
|
cursor: "pointer",
|
|
1673
1689
|
color: "inherit"
|
|
1674
1690
|
},
|
|
1675
|
-
children: projection.expanded ?
|
|
1691
|
+
children: projection.expanded ? labels.product.showFewer : labels.product.showAll(projection.hiddenCount)
|
|
1676
1692
|
}
|
|
1677
1693
|
),
|
|
1678
1694
|
specs.length > 0 && /* @__PURE__ */ jsx15("dl", { className: "specs", children: specs.map(([k, v]) => /* @__PURE__ */ jsxs11("div", { children: [
|
|
@@ -1698,7 +1714,11 @@ function ProductDetail(props) {
|
|
|
1698
1714
|
exit: { opacity: 0, y: -6 },
|
|
1699
1715
|
transition: { duration: 0.18 },
|
|
1700
1716
|
style: { display: "inline-flex", alignItems: "center", gap: 6 },
|
|
1701
|
-
children: added ? labels.product.added :
|
|
1717
|
+
children: added ? labels.product.added : /* @__PURE__ */ jsxs11(Fragment4, { children: [
|
|
1718
|
+
`${labels.product.addToBag}${priceLabel ? ` \xB7 ${priceLabel}` : ""}`,
|
|
1719
|
+
" ",
|
|
1720
|
+
/* @__PURE__ */ jsx15("span", { "aria-hidden": "true", className: "rtl:inline-block rtl:-scale-x-100", children: "\u2192" })
|
|
1721
|
+
] })
|
|
1702
1722
|
},
|
|
1703
1723
|
added ? "added" : "idle"
|
|
1704
1724
|
) })
|
|
@@ -1839,8 +1859,9 @@ function rowWinnerIndex(row, products) {
|
|
|
1839
1859
|
import { Sparkle, Check } from "lucide-react";
|
|
1840
1860
|
import { jsx as jsx18, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
1841
1861
|
function ComparisonVerdict({ verdict }) {
|
|
1862
|
+
const labels = useLabels().comparison;
|
|
1842
1863
|
return /* @__PURE__ */ jsxs13("div", { className: "comparison__verdict", children: [
|
|
1843
|
-
/* @__PURE__ */ jsx18("span", { className: "comparison__verdict-eyebrow", children:
|
|
1864
|
+
/* @__PURE__ */ jsx18("span", { className: "comparison__verdict-eyebrow", children: labels.verdict }),
|
|
1844
1865
|
/* @__PURE__ */ jsx18("p", { className: "comparison__verdict-text", children: verdict })
|
|
1845
1866
|
] });
|
|
1846
1867
|
}
|
|
@@ -1850,6 +1871,8 @@ function ComparisonHeadCard({
|
|
|
1850
1871
|
clickable,
|
|
1851
1872
|
onClick
|
|
1852
1873
|
}) {
|
|
1874
|
+
const labels = useLabels();
|
|
1875
|
+
const locale = useLocale();
|
|
1853
1876
|
const firstImage = product.images?.[0];
|
|
1854
1877
|
const hasImage = firstImage !== void 0 && typeof firstImage.url === "string" && firstImage.url.length > 0;
|
|
1855
1878
|
const altText = hasImage && typeof firstImage.altText === "string" && firstImage.altText.length > 0 ? firstImage.altText : product.title;
|
|
@@ -1860,7 +1883,7 @@ function ComparisonHeadCard({
|
|
|
1860
1883
|
className: "comparison__head-card" + (isPick ? " is-recommended" : "") + (clickable ? " is-clickable" : ""),
|
|
1861
1884
|
role: clickable ? "button" : void 0,
|
|
1862
1885
|
tabIndex: clickable ? 0 : void 0,
|
|
1863
|
-
"aria-label": clickable ?
|
|
1886
|
+
"aria-label": clickable ? labels.product.view(product.title) : void 0,
|
|
1864
1887
|
onClick: clickable ? () => onClick(product) : void 0,
|
|
1865
1888
|
onKeyDown: clickable ? (e) => {
|
|
1866
1889
|
if (e.key === "Enter" || e.key === " ") {
|
|
@@ -1883,10 +1906,10 @@ function ComparisonHeadCard({
|
|
|
1883
1906
|
product.vendor && /* @__PURE__ */ jsx18("div", { className: "product-card__brand", children: product.vendor }),
|
|
1884
1907
|
/* @__PURE__ */ jsx18("div", { className: "name", children: product.title })
|
|
1885
1908
|
] }),
|
|
1886
|
-
product.price && /* @__PURE__ */ jsx18("div", { className: "price", children: formatMoney(product.price) }),
|
|
1909
|
+
product.price && /* @__PURE__ */ jsx18("div", { className: "price", children: formatMoney(product.price, locale) }),
|
|
1887
1910
|
isPick && /* @__PURE__ */ jsxs13("span", { className: "recommended", children: [
|
|
1888
1911
|
/* @__PURE__ */ jsx18(Sparkle, { size: 10, strokeWidth: 2.4, "aria-hidden": "true" }),
|
|
1889
|
-
|
|
1912
|
+
labels.comparison.myPick
|
|
1890
1913
|
] })
|
|
1891
1914
|
]
|
|
1892
1915
|
}
|
|
@@ -1911,13 +1934,14 @@ function computeTradeoff(rows, products, recommendIndex) {
|
|
|
1911
1934
|
return entries;
|
|
1912
1935
|
}
|
|
1913
1936
|
function ComparisonTradeoffRow({ entries }) {
|
|
1937
|
+
const labels = useLabels().comparison;
|
|
1914
1938
|
return /* @__PURE__ */ jsx18("div", { className: "comparison__row comparison__tradeoff", children: entries.map((e) => /* @__PURE__ */ jsxs13(
|
|
1915
1939
|
"div",
|
|
1916
1940
|
{
|
|
1917
1941
|
className: "comparison__tradeoff-line" + (e.isPick ? " is-pick" : ""),
|
|
1918
1942
|
children: [
|
|
1919
1943
|
/* @__PURE__ */ jsx18("span", { className: "comparison__tradeoff-name", children: e.name }),
|
|
1920
|
-
/* @__PURE__ */ jsx18("span", { className: "comparison__tradeoff-verb", children: e.isPick ?
|
|
1944
|
+
/* @__PURE__ */ jsx18("span", { className: "comparison__tradeoff-verb", children: e.isPick ? labels.leadsOn : labels.takes }),
|
|
1921
1945
|
/* @__PURE__ */ jsx18("span", { className: "comparison__tradeoff-axes", children: e.labels.join(" \xB7 ") })
|
|
1922
1946
|
]
|
|
1923
1947
|
},
|
|
@@ -1929,6 +1953,7 @@ function ComparisonAttributeRow({
|
|
|
1929
1953
|
products,
|
|
1930
1954
|
recommendIndex
|
|
1931
1955
|
}) {
|
|
1956
|
+
const labels = useLabels().comparison;
|
|
1932
1957
|
const values = projectRowValues(row, products);
|
|
1933
1958
|
const winnerIdx = rowWinnerIndex(row, products);
|
|
1934
1959
|
return /* @__PURE__ */ jsxs13("div", { className: "comparison__row" + (winnerIdx >= 0 ? " has-winner" : ""), children: [
|
|
@@ -1938,7 +1963,7 @@ function ComparisonAttributeRow({
|
|
|
1938
1963
|
const className = "comparison__cell" + (recommendIndex === j ? " is-recommended-col" : "") + (isWinner ? " is-winner" : "");
|
|
1939
1964
|
return /* @__PURE__ */ jsxs13("div", { className, children: [
|
|
1940
1965
|
/* @__PURE__ */ jsx18("span", { className: "comparison__value", children: v.length > 0 ? v : "\u2014" }),
|
|
1941
|
-
isWinner && /* @__PURE__ */ jsx18(Check, { size: 13, strokeWidth: 3, "aria-label":
|
|
1966
|
+
isWinner && /* @__PURE__ */ jsx18(Check, { size: 13, strokeWidth: 3, "aria-label": labels.wins, className: "comparison__win" })
|
|
1942
1967
|
] }, j);
|
|
1943
1968
|
})
|
|
1944
1969
|
] });
|
|
@@ -1950,6 +1975,8 @@ import { jsx as jsx19, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
|
1950
1975
|
var ComparisonTable = React13.forwardRef(
|
|
1951
1976
|
({ products: productsProp, attributeRows: rowsProp, highlightedProductId, verdict }, ref) => {
|
|
1952
1977
|
const labels = useLabels().product;
|
|
1978
|
+
const comparisonLabels = useLabels().comparison;
|
|
1979
|
+
const locale = useLocale();
|
|
1953
1980
|
const products = Array.isArray(productsProp) ? productsProp.filter((p) => p !== null && p !== void 0 && typeof p === "object") : [];
|
|
1954
1981
|
const rows = Array.isArray(rowsProp) ? rowsProp : void 0;
|
|
1955
1982
|
const recommend = highlightedProductId !== void 0 ? products.findIndex((p) => p.id === highlightedProductId) : -1;
|
|
@@ -1968,7 +1995,7 @@ var ComparisonTable = React13.forwardRef(
|
|
|
1968
1995
|
const suppliedUsable = (Array.isArray(rows) ? rows : []).filter(
|
|
1969
1996
|
(row) => new Set(projectRowValues(row, products)).size > 1
|
|
1970
1997
|
);
|
|
1971
|
-
const floor = buildComparisonRows(products);
|
|
1998
|
+
const floor = buildComparisonRows(products, locale, comparisonLabels.rows);
|
|
1972
1999
|
const floorLabels = new Set(floor.map((r) => r.label.trim().toLowerCase()));
|
|
1973
2000
|
const enrichment = suppliedUsable.filter(
|
|
1974
2001
|
(r) => !floorLabels.has(r.label.trim().toLowerCase())
|
|
@@ -1985,7 +2012,7 @@ var ComparisonTable = React13.forwardRef(
|
|
|
1985
2012
|
const tableBody = products.length > 0 ? /* @__PURE__ */ jsxs14("div", { className: editorialClass, children: [
|
|
1986
2013
|
/* @__PURE__ */ jsxs14("div", { className: "comparison__hero", children: [
|
|
1987
2014
|
/* @__PURE__ */ jsxs14("div", { className: "comparison__lead", children: [
|
|
1988
|
-
hasVerdict ? /* @__PURE__ */ jsx19(ComparisonVerdict, { verdict }) : /* @__PURE__ */ jsx19("span", { className: "comparison__verdict-eyebrow", children:
|
|
2015
|
+
hasVerdict ? /* @__PURE__ */ jsx19(ComparisonVerdict, { verdict }) : /* @__PURE__ */ jsx19("span", { className: "comparison__verdict-eyebrow", children: comparisonLabels.headToHead }),
|
|
1989
2016
|
tradeoff.length > 0 && /* @__PURE__ */ jsx19(ComparisonTradeoffRow, { entries: tradeoff })
|
|
1990
2017
|
] }),
|
|
1991
2018
|
/* @__PURE__ */ jsxs14("div", { className: "comparison__duo", style: colStyle, children: [
|
|
@@ -2124,6 +2151,7 @@ import React16 from "react";
|
|
|
2124
2151
|
import { jsx as jsx22, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
2125
2152
|
var UgcCard = React16.forwardRef(
|
|
2126
2153
|
({ className, mediaUrl, mediaType = "image", author, likes, caption, ...props }, ref) => {
|
|
2154
|
+
const labels = useLabels().content;
|
|
2127
2155
|
return /* @__PURE__ */ jsxs16(
|
|
2128
2156
|
"div",
|
|
2129
2157
|
{
|
|
@@ -2140,7 +2168,7 @@ var UgcCard = React16.forwardRef(
|
|
|
2140
2168
|
"img",
|
|
2141
2169
|
{
|
|
2142
2170
|
src: mediaUrl,
|
|
2143
|
-
alt:
|
|
2171
|
+
alt: labels.ugcVideoPoster(author),
|
|
2144
2172
|
className: "h-full w-full object-cover transition-transform duration-500 group-hover:scale-105"
|
|
2145
2173
|
}
|
|
2146
2174
|
),
|
|
@@ -2149,11 +2177,11 @@ var UgcCard = React16.forwardRef(
|
|
|
2149
2177
|
"img",
|
|
2150
2178
|
{
|
|
2151
2179
|
src: mediaUrl,
|
|
2152
|
-
alt:
|
|
2180
|
+
alt: labels.ugcUpload(author),
|
|
2153
2181
|
className: "h-full w-full object-cover transition-transform duration-500 group-hover:scale-105"
|
|
2154
2182
|
}
|
|
2155
2183
|
),
|
|
2156
|
-
likes !== void 0 && /* @__PURE__ */ jsxs16("div", { className: "absolute top-3
|
|
2184
|
+
likes !== void 0 && /* @__PURE__ */ jsxs16("div", { className: "absolute top-3 end-3 flex items-center gap-1.5 rounded-full bg-black/60 px-2.5 py-1 text-xs font-medium text-white backdrop-blur-sm", children: [
|
|
2157
2185
|
/* @__PURE__ */ jsx22("svg", { className: "h-3.5 w-3.5 fill-current text-rose-500", viewBox: "0 0 24 24", children: /* @__PURE__ */ jsx22("path", { d: "M12 21.35l-1.45-1.32C5.4 15.36 2 12.28 2 8.5 2 5.42 4.42 3 7.5 3c1.74 0 3.41.81 4.5 2.09C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.42 22 8.5c0 3.78-3.4 6.86-8.55 11.54L12 21.35z" }) }),
|
|
2158
2186
|
likes
|
|
2159
2187
|
] }),
|
|
@@ -2206,22 +2234,26 @@ function isHydratedArticle(item) {
|
|
|
2206
2234
|
const obj = item;
|
|
2207
2235
|
return typeof obj.id === "string" && typeof obj.title === "string";
|
|
2208
2236
|
}
|
|
2209
|
-
function formatDate(iso) {
|
|
2237
|
+
function formatDate(iso, locale) {
|
|
2210
2238
|
try {
|
|
2211
|
-
return new Date(iso).toLocaleDateString(
|
|
2212
|
-
} catch {
|
|
2239
|
+
return new Date(iso).toLocaleDateString(locale, { month: "short", year: "numeric" });
|
|
2240
|
+
} catch (err) {
|
|
2241
|
+
console.warn("[BlogPosts] date formatting failed; showing the raw value:", iso, locale, err);
|
|
2213
2242
|
return iso;
|
|
2214
2243
|
}
|
|
2215
2244
|
}
|
|
2216
2245
|
function BlogPosts({
|
|
2217
2246
|
title = "",
|
|
2218
2247
|
subtitle,
|
|
2219
|
-
eyebrow
|
|
2248
|
+
eyebrow: eyebrowProp,
|
|
2220
2249
|
moreLabel = "",
|
|
2221
2250
|
moreAction,
|
|
2222
2251
|
articles: articlesProp,
|
|
2223
2252
|
posts: postsProp
|
|
2224
2253
|
}) {
|
|
2254
|
+
const labels = useLabels().content;
|
|
2255
|
+
const locale = useLocale();
|
|
2256
|
+
const eyebrow = eyebrowProp === void 0 ? labels.blogEyebrow : eyebrowProp;
|
|
2225
2257
|
const onMore = useAction2(moreLabel, moreAction);
|
|
2226
2258
|
const actions = useContentActions();
|
|
2227
2259
|
const onArticleClick = (article) => {
|
|
@@ -2278,7 +2310,7 @@ function BlogPosts({
|
|
|
2278
2310
|
] }, i)) : articles.map((article, i) => {
|
|
2279
2311
|
const imageUrl = article.image && article.image.url ? article.image.url : "";
|
|
2280
2312
|
const imageAlt = article.image && article.image.altText ? article.image.altText : article.title;
|
|
2281
|
-
const date = article.publishedAt ? formatDate(article.publishedAt) : "";
|
|
2313
|
+
const date = article.publishedAt ? formatDate(article.publishedAt, locale) : "";
|
|
2282
2314
|
const author = article.author ? article.author : "";
|
|
2283
2315
|
const handleClick = onArticleClick(article);
|
|
2284
2316
|
return /* @__PURE__ */ jsxs18(
|
|
@@ -2349,6 +2381,7 @@ import { motion as motion6 } from "framer-motion";
|
|
|
2349
2381
|
import { ArticleSchema } from "@40rty/ams-sdk";
|
|
2350
2382
|
import { jsx as jsx25, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
2351
2383
|
function ArticleDetail(props) {
|
|
2384
|
+
const locale = useLocale();
|
|
2352
2385
|
const raw = props.article;
|
|
2353
2386
|
let article;
|
|
2354
2387
|
if (Array.isArray(raw)) {
|
|
@@ -2369,7 +2402,7 @@ function ArticleDetail(props) {
|
|
|
2369
2402
|
/* @__PURE__ */ jsx25("div", { className: "h-4 w-5/6 animate-pulse rounded bg-[var(--fourty-color-bg-subtle)]" })
|
|
2370
2403
|
] }) });
|
|
2371
2404
|
}
|
|
2372
|
-
const date = formatDate2(article.publishedAt);
|
|
2405
|
+
const date = formatDate2(article.publishedAt, locale);
|
|
2373
2406
|
const meta = [article.author, date].filter(Boolean).join(" \xB7 ");
|
|
2374
2407
|
const html = sanitizeHtml(normalizeArticleHtml(article.contentHtml, article.content));
|
|
2375
2408
|
return /* @__PURE__ */ jsxs19("div", { className: "flex h-full min-h-0 flex-col overflow-hidden", children: [
|
|
@@ -2426,11 +2459,12 @@ function ArticleDetail(props) {
|
|
|
2426
2459
|
] }) })
|
|
2427
2460
|
] });
|
|
2428
2461
|
}
|
|
2429
|
-
function formatDate2(iso) {
|
|
2462
|
+
function formatDate2(iso, locale) {
|
|
2430
2463
|
if (!iso) return "";
|
|
2431
2464
|
try {
|
|
2432
|
-
return new Date(iso).toLocaleDateString(
|
|
2433
|
-
} catch {
|
|
2465
|
+
return new Date(iso).toLocaleDateString(locale, { month: "short", day: "numeric", year: "numeric" });
|
|
2466
|
+
} catch (err) {
|
|
2467
|
+
console.warn("[ArticleDetail] date formatting failed; showing the raw value:", iso, locale, err);
|
|
2434
2468
|
return iso;
|
|
2435
2469
|
}
|
|
2436
2470
|
}
|
|
@@ -2515,6 +2549,7 @@ import { CmsPolicySchema } from "@40rty/ams-sdk";
|
|
|
2515
2549
|
import { FileText, ExternalLink } from "lucide-react";
|
|
2516
2550
|
import { jsx as jsx27, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
2517
2551
|
function PolicyDetail(props) {
|
|
2552
|
+
const labels = useLabels().content;
|
|
2518
2553
|
const raw = props.policy;
|
|
2519
2554
|
let policy;
|
|
2520
2555
|
if (Array.isArray(raw)) {
|
|
@@ -2554,7 +2589,7 @@ function PolicyDetail(props) {
|
|
|
2554
2589
|
className: "fourty-policy-article w-full max-w-3xl px-6 py-12 sm:px-10 sm:py-16",
|
|
2555
2590
|
children: [
|
|
2556
2591
|
/* @__PURE__ */ jsxs21("header", { className: "mb-12 border-b border-[var(--fourty-color-border)] pb-8", children: [
|
|
2557
|
-
/* @__PURE__ */ jsx27("p", { className: "mb-3 text-[10px] font-medium uppercase tracking-[0.32em] text-[var(--fourty-color-text-subtle)]", children:
|
|
2592
|
+
/* @__PURE__ */ jsx27("p", { className: "mb-3 text-[10px] font-medium uppercase tracking-[0.32em] text-[var(--fourty-color-text-subtle)]", children: labels.policyEyebrow }),
|
|
2558
2593
|
/* @__PURE__ */ jsx27(
|
|
2559
2594
|
"h1",
|
|
2560
2595
|
{
|
|
@@ -2593,6 +2628,7 @@ function PolicyAnswerCard({
|
|
|
2593
2628
|
answer,
|
|
2594
2629
|
excerptHtml
|
|
2595
2630
|
}) {
|
|
2631
|
+
const labels = useLabels().content;
|
|
2596
2632
|
return /* @__PURE__ */ jsxs21(
|
|
2597
2633
|
motion8.section,
|
|
2598
2634
|
{
|
|
@@ -2643,7 +2679,7 @@ function PolicyAnswerCard({
|
|
|
2643
2679
|
rel: "noopener noreferrer",
|
|
2644
2680
|
className: "mt-3 inline-flex items-center gap-1.5 text-xs font-medium text-[var(--fourty-color-text-muted)] underline-offset-2 hover:text-[var(--fourty-color-text)] hover:underline",
|
|
2645
2681
|
children: [
|
|
2646
|
-
|
|
2682
|
+
labels.readFullPolicy,
|
|
2647
2683
|
/* @__PURE__ */ jsx27(ExternalLink, { className: "h-3 w-3", "aria-hidden": "true" })
|
|
2648
2684
|
]
|
|
2649
2685
|
}
|
|
@@ -2722,7 +2758,7 @@ function CollectionListItem({
|
|
|
2722
2758
|
{
|
|
2723
2759
|
type: "button",
|
|
2724
2760
|
onClick: onClick ? onClick : void 0,
|
|
2725
|
-
className: "group flex h-full min-h-0 flex-col overflow-hidden text-
|
|
2761
|
+
className: "group flex h-full min-h-0 flex-col overflow-hidden text-start",
|
|
2726
2762
|
children: [
|
|
2727
2763
|
/* @__PURE__ */ jsxs23("div", { className: "relative aspect-[4/5] w-full min-h-0 flex-1 overflow-hidden rounded-md bg-[var(--fourty-color-bg-subtle)]", children: [
|
|
2728
2764
|
imageUrl ? /* @__PURE__ */ jsx29(
|
|
@@ -2826,10 +2862,12 @@ function normalizeCollection(input) {
|
|
|
2826
2862
|
function CollectionList({
|
|
2827
2863
|
title = "",
|
|
2828
2864
|
subtitle,
|
|
2829
|
-
eyebrow
|
|
2865
|
+
eyebrow: eyebrowProp,
|
|
2830
2866
|
collections: rawCollections,
|
|
2831
2867
|
actions: rawActions
|
|
2832
2868
|
}) {
|
|
2869
|
+
const labels = useLabels().content;
|
|
2870
|
+
const eyebrow = eyebrowProp === void 0 ? labels.collectionsEyebrow : eyebrowProp;
|
|
2833
2871
|
const collections = (Array.isArray(rawCollections) ? rawCollections : []).map(normalizeCollection).filter((c) => c !== null);
|
|
2834
2872
|
const actions = Array.isArray(rawActions) ? rawActions : [];
|
|
2835
2873
|
if (!collections.length) return null;
|
|
@@ -2871,7 +2909,7 @@ function CollectionList({
|
|
|
2871
2909
|
type: NAVIGATE_SIGNAL,
|
|
2872
2910
|
payload: { page: { kind: "collection", handle: c.handle, title: c.title } }
|
|
2873
2911
|
};
|
|
2874
|
-
const description = c.description && c.description.length > 0 ? c.description : typeof c.productCount === "number" ?
|
|
2912
|
+
const description = c.description && c.description.length > 0 ? c.description : typeof c.productCount === "number" ? labels.collectionStyles(c.productCount) : void 0;
|
|
2875
2913
|
return /* @__PURE__ */ jsx30(
|
|
2876
2914
|
CollectionListItem,
|
|
2877
2915
|
{
|
|
@@ -2949,7 +2987,7 @@ function FAQAccordionItem({ question, answer }) {
|
|
|
2949
2987
|
type: "button",
|
|
2950
2988
|
onClick: () => setOpen(!open),
|
|
2951
2989
|
className: cn(
|
|
2952
|
-
"fourty-faq__trigger flex w-full items-center justify-between text-
|
|
2990
|
+
"fourty-faq__trigger flex w-full items-center justify-between text-start",
|
|
2953
2991
|
"py-5"
|
|
2954
2992
|
),
|
|
2955
2993
|
"aria-expanded": open,
|
|
@@ -2985,7 +3023,7 @@ function FAQAccordionItem({ question, answer }) {
|
|
|
2985
3023
|
{
|
|
2986
3024
|
className: cn(
|
|
2987
3025
|
"fourty-faq__answer leading-relaxed text-[var(--fourty-color-text-subtle)]",
|
|
2988
|
-
"pb-5
|
|
3026
|
+
"pb-5 pe-8 text-sm"
|
|
2989
3027
|
),
|
|
2990
3028
|
children: answer
|
|
2991
3029
|
}
|
|
@@ -3014,9 +3052,9 @@ var FAQ = React20.forwardRef(
|
|
|
3014
3052
|
FAQ.displayName = "FAQ";
|
|
3015
3053
|
|
|
3016
3054
|
// src/components/layout/Page.tsx
|
|
3017
|
-
import { Fragment as
|
|
3055
|
+
import { Fragment as Fragment5, jsx as jsx34 } from "react/jsx-runtime";
|
|
3018
3056
|
function Page(props) {
|
|
3019
|
-
return /* @__PURE__ */ jsx34(
|
|
3057
|
+
return /* @__PURE__ */ jsx34(Fragment5, { children: props.children });
|
|
3020
3058
|
}
|
|
3021
3059
|
|
|
3022
3060
|
// src/components/agentic/Turn.tsx
|
|
@@ -3271,7 +3309,8 @@ import { useTurn, useStream, useDisplayedLayout, useFourtySession, useReasoning,
|
|
|
3271
3309
|
|
|
3272
3310
|
// src/components/feedback/Thinking.tsx
|
|
3273
3311
|
import { jsx as jsx39, jsxs as jsxs28 } from "react/jsx-runtime";
|
|
3274
|
-
function Thinking({ text
|
|
3312
|
+
function Thinking({ text }) {
|
|
3313
|
+
const fallback = useLabels().content.reading;
|
|
3275
3314
|
return /* @__PURE__ */ jsxs28("div", { className: "thinking", children: [
|
|
3276
3315
|
/* @__PURE__ */ jsxs28("span", { className: "thinking__bars", "aria-hidden": "true", children: [
|
|
3277
3316
|
/* @__PURE__ */ jsx39("span", {}),
|
|
@@ -3279,7 +3318,7 @@ function Thinking({ text = "reading\u2026" }) {
|
|
|
3279
3318
|
/* @__PURE__ */ jsx39("span", {}),
|
|
3280
3319
|
/* @__PURE__ */ jsx39("span", {})
|
|
3281
3320
|
] }),
|
|
3282
|
-
/* @__PURE__ */ jsx39("span", { children: text })
|
|
3321
|
+
/* @__PURE__ */ jsx39("span", { children: text === void 0 ? fallback : text })
|
|
3283
3322
|
] });
|
|
3284
3323
|
}
|
|
3285
3324
|
|
|
@@ -3350,10 +3389,11 @@ function PendingTurn() {
|
|
|
3350
3389
|
const reasoning = useReasoning();
|
|
3351
3390
|
const latestBeat = reasoning.length > 0 ? reasoning[reasoning.length - 1] : null;
|
|
3352
3391
|
const phaseLabel = defaultPhaseLabel(currentProgress);
|
|
3392
|
+
const pendingFloor = useLabels().live.pendingFloor;
|
|
3353
3393
|
const thinkingText = (() => {
|
|
3354
3394
|
if (latestBeat !== null) return latestBeat.text;
|
|
3355
3395
|
if (phaseLabel !== null && phaseLabel.length > 0) return phaseLabel;
|
|
3356
|
-
return
|
|
3396
|
+
return pendingFloor;
|
|
3357
3397
|
})();
|
|
3358
3398
|
const layoutChildCount = (() => {
|
|
3359
3399
|
if (!layout || !layout.elements) return 0;
|
|
@@ -3460,6 +3500,7 @@ function HistoryMenu() {
|
|
|
3460
3500
|
const currentIndex = useCurrentMessageIndex();
|
|
3461
3501
|
const selectMessage = useSelectMessage();
|
|
3462
3502
|
const { clearSession } = useFourtySession2();
|
|
3503
|
+
const copy = useLabels().history;
|
|
3463
3504
|
const [open, setOpen] = React24.useState(false);
|
|
3464
3505
|
const containerRef = React24.useRef(null);
|
|
3465
3506
|
React24.useEffect(() => {
|
|
@@ -3481,22 +3522,18 @@ function HistoryMenu() {
|
|
|
3481
3522
|
onClick: () => setOpen((o) => !o),
|
|
3482
3523
|
"aria-expanded": open,
|
|
3483
3524
|
"aria-haspopup": "listbox",
|
|
3484
|
-
title:
|
|
3485
|
-
"aria-label":
|
|
3525
|
+
title: copy.title,
|
|
3526
|
+
"aria-label": copy.title,
|
|
3486
3527
|
children: /* @__PURE__ */ jsx44(HistoryIcon, {})
|
|
3487
3528
|
}
|
|
3488
3529
|
),
|
|
3489
3530
|
open && /* @__PURE__ */ jsxs32("div", { className: "history-menu__panel", role: "listbox", children: [
|
|
3490
3531
|
/* @__PURE__ */ jsxs32("div", { className: "history-menu__head", children: [
|
|
3491
|
-
/* @__PURE__ */ jsx44("span", { children:
|
|
3492
|
-
/* @__PURE__ */
|
|
3493
|
-
turns.length,
|
|
3494
|
-
" ",
|
|
3495
|
-
turns.length === 1 ? "PROMPT" : "PROMPTS"
|
|
3496
|
-
] })
|
|
3532
|
+
/* @__PURE__ */ jsx44("span", { children: copy.session }),
|
|
3533
|
+
/* @__PURE__ */ jsx44("span", { children: copy.prompts(turns.length) })
|
|
3497
3534
|
] }),
|
|
3498
3535
|
/* @__PURE__ */ jsxs32("div", { className: "history-menu__list", children: [
|
|
3499
|
-
turns.length === 0 && /* @__PURE__ */ jsx44("div", { className: "history-menu__empty", children:
|
|
3536
|
+
turns.length === 0 && /* @__PURE__ */ jsx44("div", { className: "history-menu__empty", children: copy.empty }),
|
|
3500
3537
|
turns.map((m) => /* @__PURE__ */ jsxs32(
|
|
3501
3538
|
"button",
|
|
3502
3539
|
{
|
|
@@ -3525,7 +3562,7 @@ function HistoryMenu() {
|
|
|
3525
3562
|
setOpen(false);
|
|
3526
3563
|
clearSession();
|
|
3527
3564
|
},
|
|
3528
|
-
children:
|
|
3565
|
+
children: copy.clear
|
|
3529
3566
|
}
|
|
3530
3567
|
)
|
|
3531
3568
|
] })
|
|
@@ -3542,28 +3579,30 @@ function HistoryIcon() {
|
|
|
3542
3579
|
// src/components/shell/MenuButton.tsx
|
|
3543
3580
|
import * as React25 from "react";
|
|
3544
3581
|
import { AnimatePresence as AnimatePresence4, motion as motion10 } from "framer-motion";
|
|
3545
|
-
import { Fragment as
|
|
3582
|
+
import { Fragment as Fragment6, jsx as jsx45, jsxs as jsxs33 } from "react/jsx-runtime";
|
|
3546
3583
|
function MenuButton({ primary = [], secondary = [], bottomLink, legal = [], onSelectItem }) {
|
|
3584
|
+
const copy = useLabels().menu;
|
|
3585
|
+
const offscreen = mirrorX(useTextDirection(), "-100%");
|
|
3547
3586
|
const [open, setOpen] = React25.useState(false);
|
|
3548
3587
|
const pickItem = React25.useCallback((item) => {
|
|
3549
3588
|
setOpen(false);
|
|
3550
3589
|
onSelectItem(item);
|
|
3551
3590
|
}, [onSelectItem]);
|
|
3552
|
-
return /* @__PURE__ */ jsxs33(
|
|
3591
|
+
return /* @__PURE__ */ jsxs33(Fragment6, { children: [
|
|
3553
3592
|
/* @__PURE__ */ jsx45(
|
|
3554
3593
|
"button",
|
|
3555
3594
|
{
|
|
3556
3595
|
type: "button",
|
|
3557
3596
|
onClick: () => setOpen(true),
|
|
3558
3597
|
className: "menu-button menu-button--icon",
|
|
3559
|
-
"aria-label":
|
|
3598
|
+
"aria-label": copy.open,
|
|
3560
3599
|
children: /* @__PURE__ */ jsxs33("span", { "aria-hidden": "true", className: "menu-button__glyph", children: [
|
|
3561
3600
|
/* @__PURE__ */ jsx45("span", {}),
|
|
3562
3601
|
/* @__PURE__ */ jsx45("span", {})
|
|
3563
3602
|
] })
|
|
3564
3603
|
}
|
|
3565
3604
|
),
|
|
3566
|
-
/* @__PURE__ */ jsx45(AnimatePresence4, { children: open && /* @__PURE__ */ jsxs33(
|
|
3605
|
+
/* @__PURE__ */ jsx45(AnimatePresence4, { children: open && /* @__PURE__ */ jsxs33(Fragment6, { children: [
|
|
3567
3606
|
/* @__PURE__ */ jsx45(
|
|
3568
3607
|
motion10.div,
|
|
3569
3608
|
{
|
|
@@ -3578,14 +3617,14 @@ function MenuButton({ primary = [], secondary = [], bottomLink, legal = [], onSe
|
|
|
3578
3617
|
/* @__PURE__ */ jsxs33(
|
|
3579
3618
|
motion10.aside,
|
|
3580
3619
|
{
|
|
3581
|
-
initial: { x:
|
|
3620
|
+
initial: { x: offscreen },
|
|
3582
3621
|
animate: { x: 0 },
|
|
3583
|
-
exit: { x:
|
|
3622
|
+
exit: { x: offscreen },
|
|
3584
3623
|
transition: { type: "spring", damping: 36, stiffness: 320 },
|
|
3585
3624
|
className: "menu-drawer",
|
|
3586
3625
|
role: "dialog",
|
|
3587
3626
|
"aria-modal": "true",
|
|
3588
|
-
"aria-label":
|
|
3627
|
+
"aria-label": copy.site,
|
|
3589
3628
|
onKeyDown: (e) => {
|
|
3590
3629
|
if (e.key === "Escape") setOpen(false);
|
|
3591
3630
|
},
|
|
@@ -3596,7 +3635,7 @@ function MenuButton({ primary = [], secondary = [], bottomLink, legal = [], onSe
|
|
|
3596
3635
|
type: "button",
|
|
3597
3636
|
onClick: () => setOpen(false),
|
|
3598
3637
|
className: "menu-drawer__close",
|
|
3599
|
-
"aria-label":
|
|
3638
|
+
"aria-label": copy.close,
|
|
3600
3639
|
children: /* @__PURE__ */ jsx45("svg", { width: "14", height: "14", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", children: /* @__PURE__ */ jsx45("path", { d: "M18 6 6 18M6 6l12 12" }) })
|
|
3601
3640
|
}
|
|
3602
3641
|
) }),
|
|
@@ -3608,7 +3647,7 @@ function MenuButton({ primary = [], secondary = [], bottomLink, legal = [], onSe
|
|
|
3608
3647
|
onClick: () => pickItem(item),
|
|
3609
3648
|
children: [
|
|
3610
3649
|
item.label,
|
|
3611
|
-
/* @__PURE__ */ jsx45("span", { "aria-hidden": "true", children: "\u2192" })
|
|
3650
|
+
/* @__PURE__ */ jsx45("span", { "aria-hidden": "true", className: "rtl:inline-block rtl:-scale-x-100", children: "\u2192" })
|
|
3612
3651
|
]
|
|
3613
3652
|
},
|
|
3614
3653
|
item.label
|
|
@@ -3631,7 +3670,7 @@ function MenuButton({ primary = [], secondary = [], bottomLink, legal = [], onSe
|
|
|
3631
3670
|
onClick: () => pickItem(bottomLink),
|
|
3632
3671
|
children: [
|
|
3633
3672
|
bottomLink.label,
|
|
3634
|
-
/* @__PURE__ */ jsx45("span", { "aria-hidden": "true", children: "\u2192" })
|
|
3673
|
+
/* @__PURE__ */ jsx45("span", { "aria-hidden": "true", className: "rtl:inline-block rtl:-scale-x-100", children: "\u2192" })
|
|
3635
3674
|
]
|
|
3636
3675
|
}
|
|
3637
3676
|
) }),
|
|
@@ -3668,10 +3707,10 @@ import { Minus, Plus, Trash2 } from "lucide-react";
|
|
|
3668
3707
|
import { useCartLineRow } from "@40rty/ams-sdk";
|
|
3669
3708
|
|
|
3670
3709
|
// src/components/ecommerce/cart/cart-format.ts
|
|
3671
|
-
function formatPrice(amount, currency) {
|
|
3710
|
+
function formatPrice(amount, currency, locale) {
|
|
3672
3711
|
const hasCents = Math.round(amount * 100) % 100 !== 0;
|
|
3673
3712
|
try {
|
|
3674
|
-
return new Intl.NumberFormat(
|
|
3713
|
+
return new Intl.NumberFormat(locale, {
|
|
3675
3714
|
style: "currency",
|
|
3676
3715
|
currency,
|
|
3677
3716
|
minimumFractionDigits: hasCents ? 2 : 0,
|
|
@@ -3687,6 +3726,7 @@ function formatPrice(amount, currency) {
|
|
|
3687
3726
|
import { jsx as jsx46, jsxs as jsxs34 } from "react/jsx-runtime";
|
|
3688
3727
|
function CartLineRow({ line, onQty, onRemove, currency, onClose }) {
|
|
3689
3728
|
const labels = useLabels().cart;
|
|
3729
|
+
const locale = useLocale();
|
|
3690
3730
|
const image = line.image?.url;
|
|
3691
3731
|
const title = line.title.length > 0 ? line.title : labels.linePending;
|
|
3692
3732
|
const brand = line.vendor;
|
|
@@ -3727,7 +3767,7 @@ function CartLineRow({ line, onQty, onRemove, currency, onClose }) {
|
|
|
3727
3767
|
if (line.quantity > 1) onQty(line.quantity - 1);
|
|
3728
3768
|
else onRemove();
|
|
3729
3769
|
},
|
|
3730
|
-
"aria-label": line.quantity > 1 ?
|
|
3770
|
+
"aria-label": line.quantity > 1 ? labels.decrease : labels.removeLine,
|
|
3731
3771
|
children: line.quantity > 1 ? /* @__PURE__ */ jsx46(Minus, { size: 12, "aria-hidden": "true" }) : /* @__PURE__ */ jsx46(Trash2, { size: 12, "aria-hidden": "true" })
|
|
3732
3772
|
}
|
|
3733
3773
|
),
|
|
@@ -3741,13 +3781,13 @@ function CartLineRow({ line, onQty, onRemove, currency, onClose }) {
|
|
|
3741
3781
|
e.stopPropagation();
|
|
3742
3782
|
onQty(line.quantity + 1);
|
|
3743
3783
|
},
|
|
3744
|
-
"aria-label":
|
|
3784
|
+
"aria-label": labels.increase,
|
|
3745
3785
|
children: /* @__PURE__ */ jsx46(Plus, { size: 12, "aria-hidden": "true" })
|
|
3746
3786
|
}
|
|
3747
3787
|
)
|
|
3748
3788
|
] })
|
|
3749
3789
|
] }),
|
|
3750
|
-
/* @__PURE__ */ jsx46("div", { className: "cart-line__price", children: pending && total === 0 ? labels.linePendingPrice : formatPrice(total, currency) })
|
|
3790
|
+
/* @__PURE__ */ jsx46("div", { className: "cart-line__price", children: pending && total === 0 ? labels.linePendingPrice : formatPrice(total, currency, locale) })
|
|
3751
3791
|
]
|
|
3752
3792
|
}
|
|
3753
3793
|
);
|
|
@@ -3872,7 +3912,7 @@ function CartPromoCode({ discountCodes, onApply, onRemove, pending = false }) {
|
|
|
3872
3912
|
void onRemove(dc.code);
|
|
3873
3913
|
},
|
|
3874
3914
|
disabled: pending,
|
|
3875
|
-
"aria-label":
|
|
3915
|
+
"aria-label": labels.removeCode(dc.code),
|
|
3876
3916
|
children: /* @__PURE__ */ jsx47(X, { size: 10, strokeWidth: 1.5, "aria-hidden": "true" })
|
|
3877
3917
|
}
|
|
3878
3918
|
)
|
|
@@ -3884,7 +3924,7 @@ function CartPromoCode({ discountCodes, onApply, onRemove, pending = false }) {
|
|
|
3884
3924
|
}
|
|
3885
3925
|
|
|
3886
3926
|
// src/components/ecommerce/cart/CartFoot.tsx
|
|
3887
|
-
import { Fragment as
|
|
3927
|
+
import { Fragment as Fragment7, jsx as jsx48, jsxs as jsxs36 } from "react/jsx-runtime";
|
|
3888
3928
|
function CartFoot({
|
|
3889
3929
|
lines,
|
|
3890
3930
|
discountCodes,
|
|
@@ -3900,6 +3940,7 @@ function CartFoot({
|
|
|
3900
3940
|
discountPending = false
|
|
3901
3941
|
}) {
|
|
3902
3942
|
const labels = useLabels().cart;
|
|
3943
|
+
const locale = useLocale();
|
|
3903
3944
|
const discountAmount = backendTotal !== void 0 && backendTotal < subtotal ? subtotal - backendTotal : 0;
|
|
3904
3945
|
const effectiveTotal = backendTotal !== void 0 ? backendTotal : subtotal;
|
|
3905
3946
|
return /* @__PURE__ */ jsxs36("div", { className: "cart-drawer__foot", children: [
|
|
@@ -3914,28 +3955,28 @@ function CartFoot({
|
|
|
3914
3955
|
),
|
|
3915
3956
|
/* @__PURE__ */ jsxs36("div", { className: "row", children: [
|
|
3916
3957
|
/* @__PURE__ */ jsx48("span", { children: labels.subtotal }),
|
|
3917
|
-
/* @__PURE__ */ jsx48("span", { children: formatPrice(subtotal, currency) })
|
|
3958
|
+
/* @__PURE__ */ jsx48("span", { children: formatPrice(subtotal, currency, locale) })
|
|
3918
3959
|
] }),
|
|
3919
3960
|
discountAmount > 0 && /* @__PURE__ */ jsxs36("div", { className: "row", style: { color: "var(--fg3)" }, children: [
|
|
3920
3961
|
/* @__PURE__ */ jsx48("span", { children: labels.discount }),
|
|
3921
3962
|
/* @__PURE__ */ jsxs36("span", { children: [
|
|
3922
3963
|
"-",
|
|
3923
|
-
formatPrice(discountAmount, currency)
|
|
3964
|
+
formatPrice(discountAmount, currency, locale)
|
|
3924
3965
|
] })
|
|
3925
3966
|
] }),
|
|
3926
|
-
labels.freeShippingThreshold !== null && effectiveTotal >= labels.freeShippingThreshold ? /* @__PURE__ */ jsxs36(
|
|
3967
|
+
labels.freeShippingThreshold !== null && effectiveTotal >= labels.freeShippingThreshold ? /* @__PURE__ */ jsxs36(Fragment7, { children: [
|
|
3927
3968
|
/* @__PURE__ */ jsxs36("div", { className: "row", style: { color: "var(--fg3)" }, children: [
|
|
3928
3969
|
/* @__PURE__ */ jsx48("span", { children: labels.shipping }),
|
|
3929
3970
|
/* @__PURE__ */ jsx48("span", { children: labels.shippingFree })
|
|
3930
3971
|
] }),
|
|
3931
3972
|
/* @__PURE__ */ jsxs36("div", { className: "row total", children: [
|
|
3932
3973
|
/* @__PURE__ */ jsx48("span", { children: labels.total }),
|
|
3933
|
-
/* @__PURE__ */ jsx48("span", { children: formatPrice(effectiveTotal, currency) })
|
|
3974
|
+
/* @__PURE__ */ jsx48("span", { children: formatPrice(effectiveTotal, currency, locale) })
|
|
3934
3975
|
] })
|
|
3935
|
-
] }) : /* @__PURE__ */ jsxs36(
|
|
3976
|
+
] }) : /* @__PURE__ */ jsxs36(Fragment7, { children: [
|
|
3936
3977
|
discountAmount > 0 && /* @__PURE__ */ jsxs36("div", { className: "row total", children: [
|
|
3937
3978
|
/* @__PURE__ */ jsx48("span", { children: labels.total }),
|
|
3938
|
-
/* @__PURE__ */ jsx48("span", { children: formatPrice(effectiveTotal, currency) })
|
|
3979
|
+
/* @__PURE__ */ jsx48("span", { children: formatPrice(effectiveTotal, currency, locale) })
|
|
3939
3980
|
] }),
|
|
3940
3981
|
/* @__PURE__ */ jsx48("div", { className: "row", style: { color: "var(--fg3)" }, children: /* @__PURE__ */ jsx48("span", { children: labels.shippingDeferred }) })
|
|
3941
3982
|
] }),
|
|
@@ -3956,12 +3997,13 @@ function CartFoot({
|
|
|
3956
3997
|
alignItems: "center",
|
|
3957
3998
|
gap: 8
|
|
3958
3999
|
},
|
|
3959
|
-
children: exitPending === "checkout" ? /* @__PURE__ */ jsxs36(
|
|
4000
|
+
children: exitPending === "checkout" ? /* @__PURE__ */ jsxs36(Fragment7, { children: [
|
|
3960
4001
|
/* @__PURE__ */ jsx48(ExitSpinner, {}),
|
|
3961
|
-
|
|
3962
|
-
] }) : /* @__PURE__ */ jsxs36(
|
|
3963
|
-
|
|
3964
|
-
|
|
4002
|
+
labels.redirecting
|
|
4003
|
+
] }) : /* @__PURE__ */ jsxs36(Fragment7, { children: [
|
|
4004
|
+
labels.checkout,
|
|
4005
|
+
" ",
|
|
4006
|
+
/* @__PURE__ */ jsx48("span", { "aria-hidden": "true", className: "rtl:inline-block rtl:-scale-x-100", children: "\u2192" })
|
|
3965
4007
|
] })
|
|
3966
4008
|
}
|
|
3967
4009
|
),
|
|
@@ -3979,10 +4021,10 @@ function CartFoot({
|
|
|
3979
4021
|
width: "100%",
|
|
3980
4022
|
justifyContent: "center"
|
|
3981
4023
|
},
|
|
3982
|
-
children: exitPending === "store" ? /* @__PURE__ */ jsxs36(
|
|
4024
|
+
children: exitPending === "store" ? /* @__PURE__ */ jsxs36(Fragment7, { children: [
|
|
3983
4025
|
/* @__PURE__ */ jsx48(ExitSpinner, {}),
|
|
3984
4026
|
labels.viewOnStore
|
|
3985
|
-
] }) : /* @__PURE__ */ jsxs36(
|
|
4027
|
+
] }) : /* @__PURE__ */ jsxs36(Fragment7, { children: [
|
|
3986
4028
|
labels.viewOnStore,
|
|
3987
4029
|
" ",
|
|
3988
4030
|
/* @__PURE__ */ jsx48("span", { "aria-hidden": "true", children: "\u2197" })
|
|
@@ -4011,7 +4053,7 @@ function ExitSpinner() {
|
|
|
4011
4053
|
|
|
4012
4054
|
// src/components/ecommerce/cart/CartContent.tsx
|
|
4013
4055
|
import { useCartView } from "@40rty/ams-sdk";
|
|
4014
|
-
import { Fragment as
|
|
4056
|
+
import { Fragment as Fragment8, jsx as jsx49, jsxs as jsxs37 } from "react/jsx-runtime";
|
|
4015
4057
|
function CartContent({
|
|
4016
4058
|
cart,
|
|
4017
4059
|
onClose,
|
|
@@ -4036,7 +4078,7 @@ function CartContent({
|
|
|
4036
4078
|
handleCheckout,
|
|
4037
4079
|
handleGoToStore
|
|
4038
4080
|
} = useCartView(cart, onCheckout);
|
|
4039
|
-
return /* @__PURE__ */ jsxs37(
|
|
4081
|
+
return /* @__PURE__ */ jsxs37(Fragment8, { children: [
|
|
4040
4082
|
/* @__PURE__ */ jsxs37("div", { className: "cart-drawer__head", children: [
|
|
4041
4083
|
/* @__PURE__ */ jsx49(
|
|
4042
4084
|
"button",
|
|
@@ -4044,7 +4086,7 @@ function CartContent({
|
|
|
4044
4086
|
type: "button",
|
|
4045
4087
|
className: "icon-btn",
|
|
4046
4088
|
onClick: onClose,
|
|
4047
|
-
"aria-label": closeIcon === "back" ?
|
|
4089
|
+
"aria-label": closeIcon === "back" ? labels.backToChat : labels.close,
|
|
4048
4090
|
children: closeIcon === "back" ? /* @__PURE__ */ jsx49("svg", { width: "14", height: "14", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "1.6", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", children: /* @__PURE__ */ jsx49("path", { d: "M15 18l-6-6 6-6" }) }) : /* @__PURE__ */ jsx49(X2, { size: 14, strokeWidth: 1.5, "aria-hidden": "true" })
|
|
4049
4091
|
}
|
|
4050
4092
|
),
|
|
@@ -4096,7 +4138,7 @@ function CartContent({
|
|
|
4096
4138
|
}
|
|
4097
4139
|
|
|
4098
4140
|
// src/components/ecommerce/cart/CartDrawer.tsx
|
|
4099
|
-
import { Fragment as
|
|
4141
|
+
import { Fragment as Fragment9, jsx as jsx50, jsxs as jsxs38 } from "react/jsx-runtime";
|
|
4100
4142
|
function CartDrawer({
|
|
4101
4143
|
open,
|
|
4102
4144
|
onClose,
|
|
@@ -4111,6 +4153,7 @@ function CartDrawer({
|
|
|
4111
4153
|
}) {
|
|
4112
4154
|
const asideRef = React27.useRef(null);
|
|
4113
4155
|
useFocusTrap(asideRef, open);
|
|
4156
|
+
const offscreen = mirrorX(useTextDirection(), "100%");
|
|
4114
4157
|
const contentProps = {
|
|
4115
4158
|
cart,
|
|
4116
4159
|
onClose,
|
|
@@ -4122,7 +4165,7 @@ function CartDrawer({
|
|
|
4122
4165
|
discountPending,
|
|
4123
4166
|
closeIcon: "x"
|
|
4124
4167
|
};
|
|
4125
|
-
return /* @__PURE__ */ jsx50(AnimatePresence6, { children: open && /* @__PURE__ */ jsxs38(
|
|
4168
|
+
return /* @__PURE__ */ jsx50(AnimatePresence6, { children: open && /* @__PURE__ */ jsxs38(Fragment9, { children: [
|
|
4126
4169
|
/* @__PURE__ */ jsx50(
|
|
4127
4170
|
motion12.div,
|
|
4128
4171
|
{
|
|
@@ -4139,9 +4182,9 @@ function CartDrawer({
|
|
|
4139
4182
|
ref: asideRef,
|
|
4140
4183
|
"data-fourty-shell-part": "cartDrawer",
|
|
4141
4184
|
className: "cart-drawer open",
|
|
4142
|
-
initial: { x:
|
|
4185
|
+
initial: { x: offscreen },
|
|
4143
4186
|
animate: { x: 0 },
|
|
4144
|
-
exit: { x:
|
|
4187
|
+
exit: { x: offscreen },
|
|
4145
4188
|
transition: { duration: 0.22, ease: [0.22, 0.61, 0.36, 1] },
|
|
4146
4189
|
role: "dialog",
|
|
4147
4190
|
"aria-modal": "true",
|
|
@@ -4156,7 +4199,7 @@ function CartDrawer({
|
|
|
4156
4199
|
}
|
|
4157
4200
|
|
|
4158
4201
|
// src/components/shell/CartPill.tsx
|
|
4159
|
-
import { Fragment as
|
|
4202
|
+
import { Fragment as Fragment10, jsx as jsx51, jsxs as jsxs39 } from "react/jsx-runtime";
|
|
4160
4203
|
function BagIcon() {
|
|
4161
4204
|
return /* @__PURE__ */ jsxs39("svg", { width: "22", height: "22", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", children: [
|
|
4162
4205
|
/* @__PURE__ */ jsx51("path", { d: "M5 8h14l-1 12H6L5 8Z" }),
|
|
@@ -4166,6 +4209,7 @@ function BagIcon() {
|
|
|
4166
4209
|
function CartPill() {
|
|
4167
4210
|
const cart = useSafeCart();
|
|
4168
4211
|
const shellRoot = useShellRoot3();
|
|
4212
|
+
const bagTitle = useLabels().cart.bag;
|
|
4169
4213
|
const [open, setOpen] = React28.useState(false);
|
|
4170
4214
|
const drawer = cart ? /* @__PURE__ */ jsx51(
|
|
4171
4215
|
CartDrawer,
|
|
@@ -4180,13 +4224,13 @@ function CartPill() {
|
|
|
4180
4224
|
discountPending: cart.isDiscountPending
|
|
4181
4225
|
}
|
|
4182
4226
|
) : null;
|
|
4183
|
-
return /* @__PURE__ */ jsxs39(
|
|
4227
|
+
return /* @__PURE__ */ jsxs39(Fragment10, { children: [
|
|
4184
4228
|
/* @__PURE__ */ jsxs39(
|
|
4185
4229
|
"button",
|
|
4186
4230
|
{
|
|
4187
4231
|
className: "bag-pill",
|
|
4188
4232
|
type: "button",
|
|
4189
|
-
title:
|
|
4233
|
+
title: bagTitle,
|
|
4190
4234
|
"data-testid": "bag-pill",
|
|
4191
4235
|
onClick: () => cart && setOpen(true),
|
|
4192
4236
|
children: [
|
|
@@ -4202,6 +4246,7 @@ function CartPill() {
|
|
|
4202
4246
|
// src/components/shell/ShellTop.tsx
|
|
4203
4247
|
import { jsx as jsx52, jsxs as jsxs40 } from "react/jsx-runtime";
|
|
4204
4248
|
function ShellTop({ wordmark, mark, menuPrimary, menuSecondary, menuBottomLink, menuLegal, onLogoClick, onMenuItemSelect }) {
|
|
4249
|
+
const homeTitle = useLabels().nav.home;
|
|
4205
4250
|
const handleLogoClick = React29.useCallback((e) => {
|
|
4206
4251
|
e.preventDefault();
|
|
4207
4252
|
onLogoClick();
|
|
@@ -4217,7 +4262,7 @@ function ShellTop({ wordmark, mark, menuPrimary, menuSecondary, menuBottomLink,
|
|
|
4217
4262
|
onSelectItem: onMenuItemSelect
|
|
4218
4263
|
}
|
|
4219
4264
|
) }),
|
|
4220
|
-
/* @__PURE__ */ jsx52("div", { className: "center", children: /* @__PURE__ */ jsxs40("a", { className: "wordmark", "data-mark": mark, href: "#", onClick: handleLogoClick, title:
|
|
4265
|
+
/* @__PURE__ */ jsx52("div", { className: "center", children: /* @__PURE__ */ jsxs40("a", { className: "wordmark", "data-mark": mark, href: "#", onClick: handleLogoClick, title: homeTitle, children: [
|
|
4221
4266
|
/* @__PURE__ */ jsx52(ShellMark, { name: mark }),
|
|
4222
4267
|
/* @__PURE__ */ jsx52("span", { className: "wordmark__text", children: wordmark })
|
|
4223
4268
|
] }) }),
|
|
@@ -4436,7 +4481,7 @@ function ComposerDock({ onChipSelect }) {
|
|
|
4436
4481
|
{
|
|
4437
4482
|
type: "button",
|
|
4438
4483
|
className: "composer-bubble",
|
|
4439
|
-
"aria-label":
|
|
4484
|
+
"aria-label": labels.composer.open,
|
|
4440
4485
|
initial: { opacity: 0, y: 12 },
|
|
4441
4486
|
animate: { opacity: 1, y: 0 },
|
|
4442
4487
|
exit: { opacity: 0, y: 12 },
|
|
@@ -4448,8 +4493,8 @@ function ComposerDock({ onChipSelect }) {
|
|
|
4448
4493
|
requestAnimationFrame(() => inputRef.current?.focus());
|
|
4449
4494
|
},
|
|
4450
4495
|
children: [
|
|
4451
|
-
/* @__PURE__ */ jsx54("span", { className: "composer-bubble__caret", "aria-hidden": "true", children: "\u203A" }),
|
|
4452
|
-
/* @__PURE__ */ jsx54("span", { className: "composer-bubble__label", children:
|
|
4496
|
+
/* @__PURE__ */ jsx54("span", { className: "composer-bubble__caret rtl:inline-block rtl:-scale-x-100", "aria-hidden": "true", children: "\u203A" }),
|
|
4497
|
+
/* @__PURE__ */ jsx54("span", { className: "composer-bubble__label", children: labels.composer.openLabel }),
|
|
4453
4498
|
/* @__PURE__ */ jsx54("span", { className: "composer-bubble__dot", "aria-hidden": "true" })
|
|
4454
4499
|
]
|
|
4455
4500
|
},
|
|
@@ -4467,7 +4512,7 @@ function ComposerDock({ onChipSelect }) {
|
|
|
4467
4512
|
motion13.div,
|
|
4468
4513
|
{
|
|
4469
4514
|
className: "composer-suggestions",
|
|
4470
|
-
"aria-label":
|
|
4515
|
+
"aria-label": labels.composer.followUpSuggestions,
|
|
4471
4516
|
initial: { opacity: 0, y: 6 },
|
|
4472
4517
|
animate: { opacity: 1, y: 0 },
|
|
4473
4518
|
transition: { duration: 0.22, ease: [0.22, 0.61, 0.36, 1] },
|
|
@@ -4500,15 +4545,15 @@ function ComposerDock({ onChipSelect }) {
|
|
|
4500
4545
|
}
|
|
4501
4546
|
),
|
|
4502
4547
|
/* @__PURE__ */ jsxs41("div", { className: "composer-row", children: [
|
|
4503
|
-
canGoBack && mode === "bottom" && !isHero && /* @__PURE__ */ jsx54("button", { className: "composer-back", type: "button", title:
|
|
4548
|
+
canGoBack && mode === "bottom" && !isHero && /* @__PURE__ */ jsx54("button", { className: "composer-back", type: "button", title: labels.composer.back, onClick: goBack, children: /* @__PURE__ */ jsx54(ArrowLeftIcon, {}) }),
|
|
4504
4549
|
/* @__PURE__ */ jsxs41("form", { className: "composer-pill", onSubmit, children: [
|
|
4505
4550
|
canGoBack && mode === "side" && !isHero && /* @__PURE__ */ jsx54(
|
|
4506
4551
|
"button",
|
|
4507
4552
|
{
|
|
4508
4553
|
type: "button",
|
|
4509
4554
|
className: "composer-back composer-back--inline",
|
|
4510
|
-
title:
|
|
4511
|
-
"aria-label":
|
|
4555
|
+
title: labels.composer.back,
|
|
4556
|
+
"aria-label": labels.composer.back,
|
|
4512
4557
|
onClick: goBack,
|
|
4513
4558
|
tabIndex: -1,
|
|
4514
4559
|
children: /* @__PURE__ */ jsx54(ArrowLeftIcon, {})
|
|
@@ -4519,8 +4564,8 @@ function ComposerDock({ onChipSelect }) {
|
|
|
4519
4564
|
{
|
|
4520
4565
|
type: "button",
|
|
4521
4566
|
className: "composer-fold-handle",
|
|
4522
|
-
title:
|
|
4523
|
-
"aria-label":
|
|
4567
|
+
title: labels.composer.fold,
|
|
4568
|
+
"aria-label": labels.composer.fold,
|
|
4524
4569
|
onClick: collapseNow,
|
|
4525
4570
|
tabIndex: -1,
|
|
4526
4571
|
children: /* @__PURE__ */ jsx54(FoldIcon, {})
|
|
@@ -4542,14 +4587,14 @@ function ComposerDock({ onChipSelect }) {
|
|
|
4542
4587
|
{
|
|
4543
4588
|
type: "button",
|
|
4544
4589
|
className: "composer-mode-toggle",
|
|
4545
|
-
title: mode === "bottom" ?
|
|
4546
|
-
"aria-label": mode === "bottom" ?
|
|
4590
|
+
title: mode === "bottom" ? labels.composer.toSidePanel : labels.composer.toBottomDock,
|
|
4591
|
+
"aria-label": mode === "bottom" ? labels.composer.toSidePanel : labels.composer.toBottomDock,
|
|
4547
4592
|
onClick: () => setMode(mode === "bottom" ? "side" : "bottom"),
|
|
4548
4593
|
tabIndex: -1,
|
|
4549
4594
|
children: mode === "bottom" ? /* @__PURE__ */ jsx54(PanelRightIcon, {}) : /* @__PURE__ */ jsx54(PanelBottomIcon, {})
|
|
4550
4595
|
}
|
|
4551
4596
|
),
|
|
4552
|
-
isRunning ? /* @__PURE__ */ jsx54("button", { type: "button", className: "send armed", onClick: stopGeneration, title:
|
|
4597
|
+
isRunning ? /* @__PURE__ */ jsx54("button", { type: "button", className: "send armed", onClick: stopGeneration, title: labels.composer.stop, children: /* @__PURE__ */ jsx54(StopIcon, {}) }) : /* @__PURE__ */ jsx54("button", { type: "submit", className: `send ${value.trim() ? "armed" : ""}`, title: labels.composer.send, children: /* @__PURE__ */ jsx54(ArrowUpIcon, {}) })
|
|
4553
4598
|
] })
|
|
4554
4599
|
] })
|
|
4555
4600
|
]
|
|
@@ -4609,6 +4654,8 @@ function SideChatHistoryView({
|
|
|
4609
4654
|
}) {
|
|
4610
4655
|
const [view, setView] = React31.useState("chat");
|
|
4611
4656
|
const cart = useSafeCart2();
|
|
4657
|
+
const labels = useLabels();
|
|
4658
|
+
const dir = useTextDirection();
|
|
4612
4659
|
return /* @__PURE__ */ jsxs41("div", { className: "composer-side-wrap", children: [
|
|
4613
4660
|
/* @__PURE__ */ jsxs41("div", { className: "composer-side-header", children: [
|
|
4614
4661
|
/* @__PURE__ */ jsx54(
|
|
@@ -4616,8 +4663,8 @@ function SideChatHistoryView({
|
|
|
4616
4663
|
{
|
|
4617
4664
|
type: "button",
|
|
4618
4665
|
className: "composer-side-close",
|
|
4619
|
-
title:
|
|
4620
|
-
"aria-label":
|
|
4666
|
+
title: labels.composer.closePanel,
|
|
4667
|
+
"aria-label": labels.composer.closePanel,
|
|
4621
4668
|
onClick: onClose,
|
|
4622
4669
|
children: /* @__PURE__ */ jsx54(CloseIcon, {})
|
|
4623
4670
|
}
|
|
@@ -4627,9 +4674,9 @@ function SideChatHistoryView({
|
|
|
4627
4674
|
{
|
|
4628
4675
|
type: "button",
|
|
4629
4676
|
className: "bag-pill",
|
|
4630
|
-
title:
|
|
4677
|
+
title: labels.cart.bag,
|
|
4631
4678
|
onClick: () => setView("cart"),
|
|
4632
|
-
"aria-label":
|
|
4679
|
+
"aria-label": labels.cart.openBag,
|
|
4633
4680
|
children: [
|
|
4634
4681
|
/* @__PURE__ */ jsx54(BagIconLocal, {}),
|
|
4635
4682
|
cart.totalQuantity > 0 && /* @__PURE__ */ jsx54("span", { className: "bag-pill__count", children: cart.totalQuantity })
|
|
@@ -4641,12 +4688,12 @@ function SideChatHistoryView({
|
|
|
4641
4688
|
motion13.div,
|
|
4642
4689
|
{
|
|
4643
4690
|
className: "composer-side-pane composer-side-pane--chat",
|
|
4644
|
-
initial: { x: "-100%" },
|
|
4691
|
+
initial: { x: mirrorX(dir, "-100%") },
|
|
4645
4692
|
animate: { x: 0 },
|
|
4646
|
-
exit: { x: "-100%" },
|
|
4693
|
+
exit: { x: mirrorX(dir, "-100%") },
|
|
4647
4694
|
transition: { duration: 0.22, ease: [0.22, 0.61, 0.36, 1] },
|
|
4648
4695
|
children: /* @__PURE__ */ jsxs41("div", { className: "composer-side-history", ref: attachScroller, children: [
|
|
4649
|
-
messages.length === 0 && pending === null && /* @__PURE__ */ jsx54("div", { className: "composer-side-empty", children:
|
|
4696
|
+
messages.length === 0 && pending === null && /* @__PURE__ */ jsx54("div", { className: "composer-side-empty", children: labels.composer.emptyHint }),
|
|
4650
4697
|
messages.map((m) => /* @__PURE__ */ jsx54(
|
|
4651
4698
|
SideTurnRow,
|
|
4652
4699
|
{
|
|
@@ -4680,9 +4727,9 @@ function SideChatHistoryView({
|
|
|
4680
4727
|
motion13.div,
|
|
4681
4728
|
{
|
|
4682
4729
|
className: "composer-side-pane composer-side-pane--cart",
|
|
4683
|
-
initial: { x: "100%" },
|
|
4730
|
+
initial: { x: mirrorX(dir, "100%") },
|
|
4684
4731
|
animate: { x: 0 },
|
|
4685
|
-
exit: { x: "100%" },
|
|
4732
|
+
exit: { x: mirrorX(dir, "100%") },
|
|
4686
4733
|
transition: { duration: 0.22, ease: [0.22, 0.61, 0.36, 1] },
|
|
4687
4734
|
children: cart && /* @__PURE__ */ jsx54(
|
|
4688
4735
|
CartContent,
|
|
@@ -4793,7 +4840,7 @@ function FoldIcon() {
|
|
|
4793
4840
|
return /* @__PURE__ */ jsx54("svg", { width: "14", height: "14", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "1.6", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", children: /* @__PURE__ */ jsx54("path", { d: "m6 9 6 6 6-6" }) });
|
|
4794
4841
|
}
|
|
4795
4842
|
function ArrowLeftIcon() {
|
|
4796
|
-
return /* @__PURE__ */ jsxs41("svg", { width: "18", height: "18", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", children: [
|
|
4843
|
+
return /* @__PURE__ */ jsxs41("svg", { className: "rtl:-scale-x-100", width: "18", height: "18", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", children: [
|
|
4797
4844
|
/* @__PURE__ */ jsx54("path", { d: "M19 12H5" }),
|
|
4798
4845
|
/* @__PURE__ */ jsx54("path", { d: "m11 6-6 6 6 6" })
|
|
4799
4846
|
] });
|
|
@@ -4814,20 +4861,21 @@ import { motion as motion14, AnimatePresence as AnimatePresence8 } from "framer-
|
|
|
4814
4861
|
import { useSessionState, useFourtySession as useFourtySession4 } from "@40rty/ams-sdk";
|
|
4815
4862
|
import { jsx as jsx55, jsxs as jsxs42 } from "react/jsx-runtime";
|
|
4816
4863
|
var RECONNECT_CUE_DELAY_MS = 500;
|
|
4817
|
-
function friendlyMessage(raw) {
|
|
4818
|
-
if (!raw) return
|
|
4819
|
-
if (raw === "no_response") return
|
|
4820
|
-
if (raw.includes("No response")) return
|
|
4821
|
-
if (raw.startsWith("Interact failed:")) return
|
|
4822
|
-
if (raw.startsWith("Failed to send")) return
|
|
4823
|
-
if (raw.startsWith("Failed to create session")) return
|
|
4824
|
-
if (raw.startsWith("Session expired") || raw.startsWith("Session not found")) return
|
|
4825
|
-
if (raw.startsWith("Failed to restore")) return
|
|
4826
|
-
return
|
|
4864
|
+
function friendlyMessage(raw, copy) {
|
|
4865
|
+
if (!raw) return copy.generic;
|
|
4866
|
+
if (raw === "no_response") return copy.noAnswer;
|
|
4867
|
+
if (raw.includes("No response")) return copy.noResponse;
|
|
4868
|
+
if (raw.startsWith("Interact failed:")) return copy.dropped;
|
|
4869
|
+
if (raw.startsWith("Failed to send")) return copy.sendFailed;
|
|
4870
|
+
if (raw.startsWith("Failed to create session")) return copy.sessionFailed;
|
|
4871
|
+
if (raw.startsWith("Session expired") || raw.startsWith("Session not found")) return copy.expired;
|
|
4872
|
+
if (raw.startsWith("Failed to restore")) return copy.restoreFailed;
|
|
4873
|
+
return copy.generic;
|
|
4827
4874
|
}
|
|
4828
4875
|
function ErrorBanner() {
|
|
4829
4876
|
const sessionState = useSessionState();
|
|
4830
4877
|
const session = useFourtySession4();
|
|
4878
|
+
const copy = useLabels().errors;
|
|
4831
4879
|
const error = sessionState.error;
|
|
4832
4880
|
const reconnecting = sessionState.reconnecting;
|
|
4833
4881
|
const lastUserMessage = (() => {
|
|
@@ -4859,7 +4907,7 @@ function ErrorBanner() {
|
|
|
4859
4907
|
transition: { duration: 0.22 },
|
|
4860
4908
|
children: [
|
|
4861
4909
|
/* @__PURE__ */ jsx55(Spinner, { size: 14 }),
|
|
4862
|
-
/* @__PURE__ */ jsx55("div", { className: "error-banner__body", children:
|
|
4910
|
+
/* @__PURE__ */ jsx55("div", { className: "error-banner__body", children: copy.reconnecting })
|
|
4863
4911
|
]
|
|
4864
4912
|
},
|
|
4865
4913
|
"error-banner-reconnecting"
|
|
@@ -4875,14 +4923,14 @@ function ErrorBanner() {
|
|
|
4875
4923
|
transition: { duration: 0.22 },
|
|
4876
4924
|
children: [
|
|
4877
4925
|
/* @__PURE__ */ jsx55("div", { className: "error-banner__icon", "aria-hidden": "true", children: "!" }),
|
|
4878
|
-
/* @__PURE__ */ jsx55("div", { className: "error-banner__body", children: friendlyMessage(error) }),
|
|
4926
|
+
/* @__PURE__ */ jsx55("div", { className: "error-banner__body", children: friendlyMessage(error, copy) }),
|
|
4879
4927
|
lastUserMessage && /* @__PURE__ */ jsx55(
|
|
4880
4928
|
"button",
|
|
4881
4929
|
{
|
|
4882
4930
|
type: "button",
|
|
4883
4931
|
className: "error-banner__retry",
|
|
4884
4932
|
onClick: () => session.sendMessage(lastUserMessage),
|
|
4885
|
-
children:
|
|
4933
|
+
children: copy.retry
|
|
4886
4934
|
}
|
|
4887
4935
|
)
|
|
4888
4936
|
]
|
|
@@ -5033,20 +5081,30 @@ var Skeleton2 = React33.forwardRef(
|
|
|
5033
5081
|
);
|
|
5034
5082
|
Skeleton2.displayName = "Skeleton";
|
|
5035
5083
|
|
|
5084
|
+
// src/components/feedback/HydrationNotice.tsx
|
|
5085
|
+
import { jsx as jsx58 } from "react/jsx-runtime";
|
|
5086
|
+
function HydrationNotice({ unavailableCount, hasErrors }) {
|
|
5087
|
+
const labels = useLabels().notices;
|
|
5088
|
+
if (hasErrors) return /* @__PURE__ */ jsx58("p", { role: "status", className: "fourty-hydration-notice", children: labels.contentFailed });
|
|
5089
|
+
if (unavailableCount === 0) return null;
|
|
5090
|
+
return /* @__PURE__ */ jsx58("p", { role: "status", className: "fourty-hydration-notice", children: labels.itemsUnavailable(unavailableCount) });
|
|
5091
|
+
}
|
|
5092
|
+
|
|
5036
5093
|
// src/primitives/Money/index.tsx
|
|
5037
5094
|
import React34 from "react";
|
|
5038
|
-
import { jsx as
|
|
5095
|
+
import { jsx as jsx59 } from "react/jsx-runtime";
|
|
5039
5096
|
var Money = React34.forwardRef(
|
|
5040
5097
|
({ className, money, amount, currency = "USD", locale, ...props }, ref) => {
|
|
5098
|
+
const spaceLocale = useLocale();
|
|
5041
5099
|
const moneyObj = money ?? { amount: amount ?? 0, currencyCode: currency };
|
|
5042
|
-
return /* @__PURE__ */
|
|
5100
|
+
return /* @__PURE__ */ jsx59("span", { ref, className: cn(className), ...props, children: formatMoney(moneyObj, locale === void 0 ? spaceLocale : locale) });
|
|
5043
5101
|
}
|
|
5044
5102
|
);
|
|
5045
5103
|
Money.displayName = "Money";
|
|
5046
5104
|
|
|
5047
5105
|
// src/primitives/Input/index.tsx
|
|
5048
5106
|
import React35 from "react";
|
|
5049
|
-
import { jsx as
|
|
5107
|
+
import { jsx as jsx60, jsxs as jsxs44 } from "react/jsx-runtime";
|
|
5050
5108
|
var Input = React35.forwardRef(
|
|
5051
5109
|
({ className, label, required, id, ...props }, ref) => {
|
|
5052
5110
|
return /* @__PURE__ */ jsxs44("div", { className: "space-y-1.5", children: [
|
|
@@ -5057,11 +5115,11 @@ var Input = React35.forwardRef(
|
|
|
5057
5115
|
className: "block text-sm font-medium text-[var(--fourty-color-text)]",
|
|
5058
5116
|
children: [
|
|
5059
5117
|
label,
|
|
5060
|
-
required && /* @__PURE__ */
|
|
5118
|
+
required && /* @__PURE__ */ jsx60("span", { className: "text-red-500 ms-0.5", children: "*" })
|
|
5061
5119
|
]
|
|
5062
5120
|
}
|
|
5063
5121
|
),
|
|
5064
|
-
/* @__PURE__ */
|
|
5122
|
+
/* @__PURE__ */ jsx60(
|
|
5065
5123
|
"input",
|
|
5066
5124
|
{
|
|
5067
5125
|
ref,
|
|
@@ -5086,7 +5144,7 @@ Input.displayName = "Input";
|
|
|
5086
5144
|
|
|
5087
5145
|
// src/primitives/Select/index.tsx
|
|
5088
5146
|
import React36 from "react";
|
|
5089
|
-
import { jsx as
|
|
5147
|
+
import { jsx as jsx61, jsxs as jsxs45 } from "react/jsx-runtime";
|
|
5090
5148
|
var Select = React36.forwardRef(
|
|
5091
5149
|
({ className, label, required, id, children, ...props }, ref) => {
|
|
5092
5150
|
return /* @__PURE__ */ jsxs45("div", { className: "space-y-1.5", children: [
|
|
@@ -5097,11 +5155,11 @@ var Select = React36.forwardRef(
|
|
|
5097
5155
|
className: "block text-sm font-medium text-[var(--fourty-color-text)]",
|
|
5098
5156
|
children: [
|
|
5099
5157
|
label,
|
|
5100
|
-
required && /* @__PURE__ */
|
|
5158
|
+
required && /* @__PURE__ */ jsx61("span", { className: "text-red-500 ms-0.5", children: "*" })
|
|
5101
5159
|
]
|
|
5102
5160
|
}
|
|
5103
5161
|
),
|
|
5104
|
-
/* @__PURE__ */
|
|
5162
|
+
/* @__PURE__ */ jsx61(
|
|
5105
5163
|
"select",
|
|
5106
5164
|
{
|
|
5107
5165
|
ref,
|
|
@@ -5126,7 +5184,7 @@ Select.displayName = "Select";
|
|
|
5126
5184
|
|
|
5127
5185
|
// src/components/layout/Grid.tsx
|
|
5128
5186
|
import React37 from "react";
|
|
5129
|
-
import { jsx as
|
|
5187
|
+
import { jsx as jsx62 } from "react/jsx-runtime";
|
|
5130
5188
|
var columnClasses = {
|
|
5131
5189
|
1: "grid-cols-1",
|
|
5132
5190
|
2: "grid-cols-1 sm:grid-cols-2",
|
|
@@ -5143,7 +5201,7 @@ var gapClasses = {
|
|
|
5143
5201
|
};
|
|
5144
5202
|
var Grid = React37.forwardRef(
|
|
5145
5203
|
({ className, columns = 4, gap = "md", ...props }, ref) => {
|
|
5146
|
-
return /* @__PURE__ */
|
|
5204
|
+
return /* @__PURE__ */ jsx62(
|
|
5147
5205
|
"div",
|
|
5148
5206
|
{
|
|
5149
5207
|
ref,
|
|
@@ -5157,7 +5215,7 @@ Grid.displayName = "Grid";
|
|
|
5157
5215
|
|
|
5158
5216
|
// src/components/layout/Stack.tsx
|
|
5159
5217
|
import React38 from "react";
|
|
5160
|
-
import { jsx as
|
|
5218
|
+
import { jsx as jsx63 } from "react/jsx-runtime";
|
|
5161
5219
|
var gapClasses2 = {
|
|
5162
5220
|
none: "gap-0",
|
|
5163
5221
|
xs: "gap-1",
|
|
@@ -5173,7 +5231,7 @@ var alignClasses2 = {
|
|
|
5173
5231
|
};
|
|
5174
5232
|
var Stack = React38.forwardRef(
|
|
5175
5233
|
({ className, direction = "vertical", gap = "md", align = "stretch", ...props }, ref) => {
|
|
5176
|
-
return /* @__PURE__ */
|
|
5234
|
+
return /* @__PURE__ */ jsx63(
|
|
5177
5235
|
"div",
|
|
5178
5236
|
{
|
|
5179
5237
|
ref,
|
|
@@ -5193,16 +5251,16 @@ Stack.displayName = "Stack";
|
|
|
5193
5251
|
|
|
5194
5252
|
// src/components/layout/Divider.tsx
|
|
5195
5253
|
import React39 from "react";
|
|
5196
|
-
import { jsx as
|
|
5254
|
+
import { jsx as jsx64 } from "react/jsx-runtime";
|
|
5197
5255
|
var Divider = React39.forwardRef(
|
|
5198
5256
|
({ className, orientation = "horizontal", ...props }, ref) => {
|
|
5199
|
-
return /* @__PURE__ */
|
|
5257
|
+
return /* @__PURE__ */ jsx64(
|
|
5200
5258
|
"hr",
|
|
5201
5259
|
{
|
|
5202
5260
|
ref,
|
|
5203
5261
|
className: cn(
|
|
5204
5262
|
"border-[var(--fourty-color-border)]",
|
|
5205
|
-
orientation === "horizontal" ? "w-full border-t" : "h-full border-
|
|
5263
|
+
orientation === "horizontal" ? "w-full border-t" : "h-full border-s",
|
|
5206
5264
|
className
|
|
5207
5265
|
),
|
|
5208
5266
|
...props
|
|
@@ -5214,10 +5272,10 @@ Divider.displayName = "Divider";
|
|
|
5214
5272
|
|
|
5215
5273
|
// src/components/layout/AspectRatio.tsx
|
|
5216
5274
|
import React40 from "react";
|
|
5217
|
-
import { jsx as
|
|
5275
|
+
import { jsx as jsx65 } from "react/jsx-runtime";
|
|
5218
5276
|
var AspectRatio = React40.forwardRef(
|
|
5219
5277
|
({ className, ratio = 1, style, children, ...props }, ref) => {
|
|
5220
|
-
return /* @__PURE__ */
|
|
5278
|
+
return /* @__PURE__ */ jsx65(
|
|
5221
5279
|
"div",
|
|
5222
5280
|
{
|
|
5223
5281
|
ref,
|
|
@@ -5234,7 +5292,7 @@ AspectRatio.displayName = "AspectRatio";
|
|
|
5234
5292
|
// src/components/layout/Drawer.tsx
|
|
5235
5293
|
import React41, { useEffect as useEffect7, useCallback as useCallback7 } from "react";
|
|
5236
5294
|
import { motion as motion15, AnimatePresence as AnimatePresence9 } from "framer-motion";
|
|
5237
|
-
import { Fragment as
|
|
5295
|
+
import { Fragment as Fragment11, jsx as jsx66, jsxs as jsxs46 } from "react/jsx-runtime";
|
|
5238
5296
|
var Drawer = React41.forwardRef(
|
|
5239
5297
|
({ open, onClose, side = "right", className, children }, ref) => {
|
|
5240
5298
|
const handleKeyDown = useCallback7(
|
|
@@ -5249,16 +5307,18 @@ var Drawer = React41.forwardRef(
|
|
|
5249
5307
|
return () => document.removeEventListener("keydown", handleKeyDown);
|
|
5250
5308
|
}
|
|
5251
5309
|
}, [open, handleKeyDown]);
|
|
5310
|
+
const atEnd = side === "right";
|
|
5311
|
+
const offscreen = atEnd === (useTextDirection() === "ltr") ? "100%" : "-100%";
|
|
5252
5312
|
const slideVariants = {
|
|
5253
|
-
hidden: { x:
|
|
5313
|
+
hidden: { x: offscreen },
|
|
5254
5314
|
visible: {
|
|
5255
5315
|
x: 0,
|
|
5256
5316
|
transition: { duration: 0.3, ease: [0.25, 0.46, 0.45, 0.94] }
|
|
5257
5317
|
},
|
|
5258
|
-
exit: { x:
|
|
5318
|
+
exit: { x: offscreen, transition: { duration: 0.25 } }
|
|
5259
5319
|
};
|
|
5260
|
-
return /* @__PURE__ */
|
|
5261
|
-
/* @__PURE__ */
|
|
5320
|
+
return /* @__PURE__ */ jsx66(AnimatePresence9, { children: open && /* @__PURE__ */ jsxs46(Fragment11, { children: [
|
|
5321
|
+
/* @__PURE__ */ jsx66(
|
|
5262
5322
|
motion15.div,
|
|
5263
5323
|
{
|
|
5264
5324
|
initial: { opacity: 0 },
|
|
@@ -5269,7 +5329,7 @@ var Drawer = React41.forwardRef(
|
|
|
5269
5329
|
"aria-hidden": true
|
|
5270
5330
|
}
|
|
5271
5331
|
),
|
|
5272
|
-
/* @__PURE__ */
|
|
5332
|
+
/* @__PURE__ */ jsx66(
|
|
5273
5333
|
motion15.div,
|
|
5274
5334
|
{
|
|
5275
5335
|
ref,
|
|
@@ -5284,7 +5344,7 @@ var Drawer = React41.forwardRef(
|
|
|
5284
5344
|
// shell — e.g. the admin playground's preview pane — instead
|
|
5285
5345
|
// of escaping to the full viewport.
|
|
5286
5346
|
"absolute inset-y-0 z-50 w-full max-w-md bg-[var(--fourty-color-bg)] shadow-xl",
|
|
5287
|
-
|
|
5347
|
+
atEnd ? "end-0" : "start-0",
|
|
5288
5348
|
className
|
|
5289
5349
|
),
|
|
5290
5350
|
role: "dialog",
|
|
@@ -5300,7 +5360,7 @@ Drawer.displayName = "Drawer";
|
|
|
5300
5360
|
// src/components/layout/DrawerDockSlot.tsx
|
|
5301
5361
|
import React42 from "react";
|
|
5302
5362
|
import { useFormFactor } from "@40rty/ams-sdk";
|
|
5303
|
-
import { jsx as
|
|
5363
|
+
import { jsx as jsx67 } from "react/jsx-runtime";
|
|
5304
5364
|
function DrawerDockSlot({
|
|
5305
5365
|
width,
|
|
5306
5366
|
open,
|
|
@@ -5311,17 +5371,17 @@ function DrawerDockSlot({
|
|
|
5311
5371
|
const slotRef = React42.useRef(null);
|
|
5312
5372
|
useScrollLock(open, slotRef);
|
|
5313
5373
|
const { isMobile } = useFormFactor();
|
|
5314
|
-
return /* @__PURE__ */
|
|
5374
|
+
return /* @__PURE__ */ jsx67(
|
|
5315
5375
|
"div",
|
|
5316
5376
|
{
|
|
5317
5377
|
ref: slotRef,
|
|
5318
5378
|
style: {
|
|
5319
5379
|
position: "fixed",
|
|
5320
5380
|
top,
|
|
5321
|
-
|
|
5381
|
+
insetInlineEnd: 0,
|
|
5322
5382
|
bottom: 0,
|
|
5323
5383
|
width: isMobile ? "100%" : `min(${width}px, 100vw)`,
|
|
5324
|
-
|
|
5384
|
+
insetInlineStart: isMobile ? 0 : void 0,
|
|
5325
5385
|
pointerEvents: open ? "auto" : "none",
|
|
5326
5386
|
zIndex,
|
|
5327
5387
|
transform: "translateZ(0)"
|
|
@@ -5336,7 +5396,7 @@ import * as React43 from "react";
|
|
|
5336
5396
|
import { createPortal as createPortal5 } from "react-dom";
|
|
5337
5397
|
import { motion as motion16, AnimatePresence as AnimatePresence10 } from "framer-motion";
|
|
5338
5398
|
import { useShellRoot as useShellRoot5, useFormFactor as useFormFactor2 } from "@40rty/ams-sdk";
|
|
5339
|
-
import { jsx as
|
|
5399
|
+
import { jsx as jsx68 } from "react/jsx-runtime";
|
|
5340
5400
|
var BACKDROP_CLASS = "fourty-modal-backdrop";
|
|
5341
5401
|
var PANEL_CLASS = "fourty-modal-panel";
|
|
5342
5402
|
function Modal({ open, onClose, label, className, children }) {
|
|
@@ -5345,9 +5405,9 @@ function Modal({ open, onClose, label, className, children }) {
|
|
|
5345
5405
|
const panelRef = React43.useRef(null);
|
|
5346
5406
|
useFocusTrap(panelRef, open && !isMobile);
|
|
5347
5407
|
if (isMobile) {
|
|
5348
|
-
return /* @__PURE__ */
|
|
5408
|
+
return /* @__PURE__ */ jsx68(DragSheet, { open, onClose, label, fit: true, className, children });
|
|
5349
5409
|
}
|
|
5350
|
-
const modal = /* @__PURE__ */
|
|
5410
|
+
const modal = /* @__PURE__ */ jsx68(AnimatePresence10, { children: open && /* @__PURE__ */ jsx68(
|
|
5351
5411
|
motion16.div,
|
|
5352
5412
|
{
|
|
5353
5413
|
className: BACKDROP_CLASS,
|
|
@@ -5360,7 +5420,7 @@ function Modal({ open, onClose, label, className, children }) {
|
|
|
5360
5420
|
if (e.target === e.currentTarget) onClose();
|
|
5361
5421
|
},
|
|
5362
5422
|
style: { position: "absolute", inset: 0, zIndex: 80 },
|
|
5363
|
-
children: /* @__PURE__ */
|
|
5423
|
+
children: /* @__PURE__ */ jsx68(
|
|
5364
5424
|
motion16.div,
|
|
5365
5425
|
{
|
|
5366
5426
|
ref: panelRef,
|
|
@@ -5391,13 +5451,13 @@ var EXTEND_LOADING_CLASS = "fourty-extend-loading";
|
|
|
5391
5451
|
var CANVAS_BOOT_CLASS = "fourty-canvas-boot";
|
|
5392
5452
|
|
|
5393
5453
|
// src/components/browse/ContinuationLoading.tsx
|
|
5394
|
-
import { jsx as
|
|
5454
|
+
import { jsx as jsx69 } from "react/jsx-runtime";
|
|
5395
5455
|
function AgentContinuationFoot() {
|
|
5396
5456
|
const { kind } = useAgentPresence(EXTEND_FLOW);
|
|
5397
5457
|
const fresh = useAgentFlowFresh(EXTEND_FLOW);
|
|
5398
5458
|
const { isMobile } = useFormFactor3();
|
|
5399
5459
|
if (!fresh || kind === "idle") return null;
|
|
5400
|
-
return /* @__PURE__ */
|
|
5460
|
+
return /* @__PURE__ */ jsx69("section", { className: EXTEND_LOADING_CLASS, "aria-busy": "true", "aria-live": "polite", children: /* @__PURE__ */ jsx69(InlinePresenceRead, { flowId: EXTEND_FLOW, compact: isMobile }) });
|
|
5401
5461
|
}
|
|
5402
5462
|
|
|
5403
5463
|
// src/components/browse/canvas-booting.ts
|
|
@@ -5428,10 +5488,10 @@ function useCanvasBooting() {
|
|
|
5428
5488
|
}
|
|
5429
5489
|
|
|
5430
5490
|
// src/components/browse/CanvasBootLoader.tsx
|
|
5431
|
-
import { jsx as
|
|
5491
|
+
import { jsx as jsx70 } from "react/jsx-runtime";
|
|
5432
5492
|
function CanvasBootLoader() {
|
|
5433
5493
|
const booting = useCanvasBooting();
|
|
5434
|
-
return /* @__PURE__ */
|
|
5494
|
+
return /* @__PURE__ */ jsx70(AnimatePresence, { children: booting && /* @__PURE__ */ jsx70(
|
|
5435
5495
|
motion.div,
|
|
5436
5496
|
{
|
|
5437
5497
|
className: CANVAS_BOOT_CLASS,
|
|
@@ -5440,7 +5500,7 @@ function CanvasBootLoader() {
|
|
|
5440
5500
|
animate: { opacity: 1 },
|
|
5441
5501
|
exit: { opacity: 0 },
|
|
5442
5502
|
transition: { duration: 0.25 },
|
|
5443
|
-
children: /* @__PURE__ */
|
|
5503
|
+
children: /* @__PURE__ */ jsx70("div", { className: `${CANVAS_BOOT_CLASS}__stage`, children: /* @__PURE__ */ jsx70(InlinePresenceRead, {}) })
|
|
5444
5504
|
},
|
|
5445
5505
|
"canvas-boot"
|
|
5446
5506
|
) });
|
|
@@ -5448,43 +5508,44 @@ function CanvasBootLoader() {
|
|
|
5448
5508
|
|
|
5449
5509
|
// src/components/ecommerce/product/PresenceProductRail.tsx
|
|
5450
5510
|
import { useProducts } from "@40rty/ams-sdk";
|
|
5451
|
-
import { jsx as
|
|
5511
|
+
import { jsx as jsx71, jsxs as jsxs47 } from "react/jsx-runtime";
|
|
5452
5512
|
function Tile({ url, w, h }) {
|
|
5453
|
-
return /* @__PURE__ */
|
|
5513
|
+
return /* @__PURE__ */ jsx71("div", { style: {
|
|
5454
5514
|
width: w,
|
|
5455
5515
|
height: h,
|
|
5456
5516
|
flexShrink: 0,
|
|
5457
5517
|
background: "var(--color-surface)",
|
|
5458
5518
|
border: "1px solid color-mix(in srgb, var(--color-on-dark) 14%, transparent)",
|
|
5459
5519
|
overflow: "hidden"
|
|
5460
|
-
}, children: /* @__PURE__ */
|
|
5520
|
+
}, children: /* @__PURE__ */ jsx71(ProductImage, { src: url, alt: "", aspectRatio: w / h, fit: "cover", loading: "eager" }) });
|
|
5461
5521
|
}
|
|
5462
5522
|
function PresenceProductRail({ images, max = 7, tileHeight = 48, flow = false }) {
|
|
5463
5523
|
const tileWidth = Math.round(tileHeight * 0.8);
|
|
5524
|
+
const dir = useTextDirection();
|
|
5464
5525
|
if (flow) {
|
|
5465
5526
|
const loop = images.length > 0 ? [...images, ...images] : [];
|
|
5466
5527
|
const duration = Math.max(12, images.length * 1.3);
|
|
5467
5528
|
const fade = "linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent)";
|
|
5468
|
-
return /* @__PURE__ */
|
|
5529
|
+
return /* @__PURE__ */ jsx71("div", { style: { overflow: "hidden", flex: 1, minWidth: 0, WebkitMaskImage: fade, maskImage: fade }, children: /* @__PURE__ */ jsx71(
|
|
5469
5530
|
motion.div,
|
|
5470
5531
|
{
|
|
5471
5532
|
style: { display: "flex", gap: 8, width: "max-content" },
|
|
5472
|
-
animate: { x: ["0%", "-50%"] },
|
|
5533
|
+
animate: { x: ["0%", mirrorX(dir, "-50%")] },
|
|
5473
5534
|
transition: { repeat: Infinity, duration, ease: "linear" },
|
|
5474
|
-
children: loop.map((img, i) => /* @__PURE__ */
|
|
5535
|
+
children: loop.map((img, i) => /* @__PURE__ */ jsx71(Tile, { url: img.url, w: tileWidth, h: tileHeight }, `${img.id}-${i}`))
|
|
5475
5536
|
}
|
|
5476
5537
|
) });
|
|
5477
5538
|
}
|
|
5478
5539
|
const shown = images.slice(0, max);
|
|
5479
5540
|
const overflow = images.length - shown.length;
|
|
5480
5541
|
return /* @__PURE__ */ jsxs47("div", { style: { display: "flex", alignItems: "center", gap: 6, overflow: "hidden" }, children: [
|
|
5481
|
-
/* @__PURE__ */
|
|
5542
|
+
/* @__PURE__ */ jsx71(AnimatePresence, { initial: false, mode: "popLayout", children: shown.map((img, i) => /* @__PURE__ */ jsx71(
|
|
5482
5543
|
motion.div,
|
|
5483
5544
|
{
|
|
5484
5545
|
layout: true,
|
|
5485
|
-
initial: { opacity: 0, x: 10 },
|
|
5546
|
+
initial: { opacity: 0, x: mirrorX(dir, 10) },
|
|
5486
5547
|
animate: { opacity: 1, x: 0 },
|
|
5487
|
-
exit: { opacity: 0, x: -8 },
|
|
5548
|
+
exit: { opacity: 0, x: mirrorX(dir, -8) },
|
|
5488
5549
|
transition: { duration: 0.32, delay: i * 0.04, ease: [0.22, 1, 0.36, 1] },
|
|
5489
5550
|
style: {
|
|
5490
5551
|
width: tileWidth,
|
|
@@ -5494,7 +5555,7 @@ function PresenceProductRail({ images, max = 7, tileHeight = 48, flow = false })
|
|
|
5494
5555
|
border: "1px solid color-mix(in srgb, var(--color-on-dark) 16%, transparent)",
|
|
5495
5556
|
overflow: "hidden"
|
|
5496
5557
|
},
|
|
5497
|
-
children: /* @__PURE__ */
|
|
5558
|
+
children: /* @__PURE__ */ jsx71(ProductImage, { src: img.url, alt: "", aspectRatio: tileWidth / tileHeight, fit: "cover", loading: "eager" })
|
|
5498
5559
|
},
|
|
5499
5560
|
img.id
|
|
5500
5561
|
)) }),
|
|
@@ -5535,21 +5596,21 @@ function HydratedProductRail({ entityIds, tileHeight = 52 }) {
|
|
|
5535
5596
|
}
|
|
5536
5597
|
}
|
|
5537
5598
|
if (images.length === 0) return null;
|
|
5538
|
-
return /* @__PURE__ */
|
|
5599
|
+
return /* @__PURE__ */ jsx71(PresenceProductRail, { images, tileHeight });
|
|
5539
5600
|
}
|
|
5540
5601
|
|
|
5541
5602
|
// src/components/ecommerce/product/ProductOption.tsx
|
|
5542
5603
|
import React45 from "react";
|
|
5543
|
-
import { jsx as
|
|
5604
|
+
import { jsx as jsx72, jsxs as jsxs48 } from "react/jsx-runtime";
|
|
5544
5605
|
var ProductOption = React45.forwardRef(
|
|
5545
5606
|
({ className, name, values: valuesProp, selected, required, onSelect, ...props }, ref) => {
|
|
5546
5607
|
const values = Array.isArray(valuesProp) ? valuesProp : [];
|
|
5547
5608
|
return /* @__PURE__ */ jsxs48("fieldset", { ref, className: cn("space-y-2", className), ...props, children: [
|
|
5548
5609
|
/* @__PURE__ */ jsxs48("legend", { className: "text-sm font-medium text-[var(--fourty-color-text)]", children: [
|
|
5549
5610
|
name,
|
|
5550
|
-
required && /* @__PURE__ */
|
|
5611
|
+
required && /* @__PURE__ */ jsx72("span", { className: "text-red-500 ms-0.5", children: "*" })
|
|
5551
5612
|
] }),
|
|
5552
|
-
/* @__PURE__ */
|
|
5613
|
+
/* @__PURE__ */ jsx72("div", { className: "flex flex-wrap gap-2", children: values.map((value) => /* @__PURE__ */ jsx72(
|
|
5553
5614
|
"button",
|
|
5554
5615
|
{
|
|
5555
5616
|
type: "button",
|
|
@@ -5579,16 +5640,16 @@ var AMAZON_LOGO = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAR0AAABgCAYAAAA
|
|
|
5579
5640
|
var BABYLIST_LOGO = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAW8AAABaCAYAAAB3/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hUFd9MH+pDpGwm84/6B2Az9UHj32U5vWmuyiMfMYrPvUc1ZjhYrT9szQudLIhV0mgzsuDOrcKSm0NZMpSSGRES11M773poJl2iSL33pTdknaJaHJvafI0yCmsg0rXRNsKkvuK7CpDwTF6X/ndffA6huF3eRCajvApT2aX8WYwGPFRWFON+vXc3Y6IS+PQ81WLQteHsWCyUmScwWDM44orbrqDd3xi8DZmuJc+zHgzGIuNvFIjtAVfiFED8WTa58RIO8x4MxiLjeLm7/OOOUZ+hqmJ2BkfjCUBM94MxmJCZ9RDb/w29yCRfe1MTrGQsWhgxpvBWEwUN32VN83MaX0AzjFuzRHGkoMZbwZjsUDy0PPLbucdt3TcI4S8OWNxwIw3g7FYKG66nLdwiOjZ24dH0z4nRsZgxpvBWAyodHIUVHL3riRYOu/gK+ZgLE2Y8WYwFgOmxk/NagF2onwpkYdlnFQw481gLAaJhMLqu3nHLV03L0rRNkZSMOPNYGQ7pvpNvGJLRDN8/FhqdckZWQkz3gxGNkMU84rq+Zt1jPXeiGk/c3afhDDjzWBkM0W1a3m1qsPTQxjrTnWDb0aWwow3g5GtkGYLxnrSAo4bW9/NtBMT46SEGW8GI1sprG7mbS4cCTtg7nwm7XNiZA3MeDMY2YhULkJp60O845Mjd8HriL8HLGPJwZoxMBjZiEIrRVnrZfTf0Wh4doNfsRTW3r/AbeXu38lgMBgMBoPBYDAYDAaDwWAwGAwGg8FgMBgMBoPBYDAYmMn/A4QY9riH9S/iAAAAAElFTkSuQmCC";
|
|
5580
5641
|
|
|
5581
5642
|
// src/components/ecommerce/product/AddToRegistry.tsx
|
|
5582
|
-
import { jsx as
|
|
5643
|
+
import { jsx as jsx73, jsxs as jsxs49 } from "react/jsx-runtime";
|
|
5583
5644
|
var LOGOS = {
|
|
5584
5645
|
amazon: { src: AMAZON_LOGO, aspectRatio: "285 / 96" },
|
|
5585
5646
|
babylist: { src: BABYLIST_LOGO, aspectRatio: "367 / 90" }
|
|
5586
5647
|
};
|
|
5587
5648
|
function RegistryLogo({ id, label }) {
|
|
5588
5649
|
const logo = LOGOS[id];
|
|
5589
|
-
if (!logo) return /* @__PURE__ */
|
|
5650
|
+
if (!logo) return /* @__PURE__ */ jsx73("span", { className: "registry__wordmark", children: label });
|
|
5590
5651
|
const mask = `url(${logo.src})`;
|
|
5591
|
-
return /* @__PURE__ */
|
|
5652
|
+
return /* @__PURE__ */ jsx73(
|
|
5592
5653
|
"span",
|
|
5593
5654
|
{
|
|
5594
5655
|
role: "img",
|
|
@@ -5598,7 +5659,9 @@ function RegistryLogo({ id, label }) {
|
|
|
5598
5659
|
}
|
|
5599
5660
|
);
|
|
5600
5661
|
}
|
|
5601
|
-
function AddToRegistry({ title
|
|
5662
|
+
function AddToRegistry({ title: titleProp, providers, productId }) {
|
|
5663
|
+
const labels = useLabels().product.registry;
|
|
5664
|
+
const title = titleProp === void 0 ? labels.title : titleProp;
|
|
5602
5665
|
const [open, setOpen] = React46.useState(false);
|
|
5603
5666
|
const analytics = useOptionalAnalyticsSink();
|
|
5604
5667
|
const onProviderClick = (partnerId) => {
|
|
@@ -5620,8 +5683,8 @@ function AddToRegistry({ title = "Add to Registry", providers, productId }) {
|
|
|
5620
5683
|
onClick: () => setOpen((v) => !v),
|
|
5621
5684
|
"aria-expanded": open,
|
|
5622
5685
|
children: [
|
|
5623
|
-
/* @__PURE__ */
|
|
5624
|
-
/* @__PURE__ */
|
|
5686
|
+
/* @__PURE__ */ jsx73("span", { children: title }),
|
|
5687
|
+
/* @__PURE__ */ jsx73(
|
|
5625
5688
|
motion17.svg,
|
|
5626
5689
|
{
|
|
5627
5690
|
className: "registry__chevron",
|
|
@@ -5636,13 +5699,13 @@ function AddToRegistry({ title = "Add to Registry", providers, productId }) {
|
|
|
5636
5699
|
"aria-hidden": "true",
|
|
5637
5700
|
animate: { rotate: open ? 180 : 0 },
|
|
5638
5701
|
transition: { type: "spring", stiffness: 420, damping: 30 },
|
|
5639
|
-
children: /* @__PURE__ */
|
|
5702
|
+
children: /* @__PURE__ */ jsx73("path", { d: "M6 9l6 6 6-6" })
|
|
5640
5703
|
}
|
|
5641
5704
|
)
|
|
5642
5705
|
]
|
|
5643
5706
|
}
|
|
5644
5707
|
),
|
|
5645
|
-
/* @__PURE__ */
|
|
5708
|
+
/* @__PURE__ */ jsx73(AnimatePresence11, { initial: false, children: open && /* @__PURE__ */ jsx73(
|
|
5646
5709
|
motion17.div,
|
|
5647
5710
|
{
|
|
5648
5711
|
className: "registry__menu",
|
|
@@ -5650,7 +5713,7 @@ function AddToRegistry({ title = "Add to Registry", providers, productId }) {
|
|
|
5650
5713
|
animate: { height: "auto", opacity: 1 },
|
|
5651
5714
|
exit: { height: 0, opacity: 0 },
|
|
5652
5715
|
transition: { duration: 0.24, ease: [0.16, 1, 0.3, 1] },
|
|
5653
|
-
children: providers.map((p) => /* @__PURE__ */
|
|
5716
|
+
children: providers.map((p) => /* @__PURE__ */ jsx73(
|
|
5654
5717
|
"a",
|
|
5655
5718
|
{
|
|
5656
5719
|
className: "registry__item",
|
|
@@ -5658,8 +5721,8 @@ function AddToRegistry({ title = "Add to Registry", providers, productId }) {
|
|
|
5658
5721
|
target: "_blank",
|
|
5659
5722
|
rel: "noopener noreferrer",
|
|
5660
5723
|
onClick: () => onProviderClick(p.id),
|
|
5661
|
-
"aria-label":
|
|
5662
|
-
children: /* @__PURE__ */
|
|
5724
|
+
"aria-label": labels.addTo(p.label),
|
|
5725
|
+
children: /* @__PURE__ */ jsx73(RegistryLogo, { id: p.id, label: p.label })
|
|
5663
5726
|
},
|
|
5664
5727
|
p.id
|
|
5665
5728
|
))
|
|
@@ -5672,9 +5735,12 @@ function AddToRegistry({ title = "Add to Registry", providers, productId }) {
|
|
|
5672
5735
|
import React47, { useEffect as useEffect8, useRef as useRef8, useState as useState14, useCallback as useCallback8 } from "react";
|
|
5673
5736
|
import { AnimatePresence as AnimatePresence12, motion as motion18 } from "framer-motion";
|
|
5674
5737
|
import { Check as Check2, Loader2 } from "lucide-react";
|
|
5675
|
-
import { jsx as
|
|
5738
|
+
import { jsx as jsx74, jsxs as jsxs50 } from "react/jsx-runtime";
|
|
5676
5739
|
var AddToCartButton = React47.forwardRef(
|
|
5677
|
-
({ className, onAddToCart, addedLabel
|
|
5740
|
+
({ className, onAddToCart, addedLabel, addedDurationMs = 2e3, children, disabled, ...props }, ref) => {
|
|
5741
|
+
const labels = useLabels().product;
|
|
5742
|
+
const addedText = addedLabel === void 0 ? labels.addedToCart : addedLabel;
|
|
5743
|
+
const idleContent = children === void 0 ? labels.addToCart : children;
|
|
5678
5744
|
const [state, setState] = useState14("idle");
|
|
5679
5745
|
const revertTimerRef = useRef8(null);
|
|
5680
5746
|
useEffect8(() => () => {
|
|
@@ -5693,7 +5759,7 @@ var AddToCartButton = React47.forwardRef(
|
|
|
5693
5759
|
setState("idle");
|
|
5694
5760
|
}
|
|
5695
5761
|
}, [onAddToCart, addedDurationMs]);
|
|
5696
|
-
return /* @__PURE__ */
|
|
5762
|
+
return /* @__PURE__ */ jsx74(
|
|
5697
5763
|
Button,
|
|
5698
5764
|
{
|
|
5699
5765
|
ref,
|
|
@@ -5702,7 +5768,7 @@ var AddToCartButton = React47.forwardRef(
|
|
|
5702
5768
|
disabled: disabled || state === "loading",
|
|
5703
5769
|
"aria-live": "polite",
|
|
5704
5770
|
...props,
|
|
5705
|
-
children: /* @__PURE__ */
|
|
5771
|
+
children: /* @__PURE__ */ jsx74(AnimatePresence12, { mode: "wait", initial: false, children: state === "loading" ? /* @__PURE__ */ jsxs50(
|
|
5706
5772
|
motion18.span,
|
|
5707
5773
|
{
|
|
5708
5774
|
className: "flex items-center justify-center gap-2",
|
|
@@ -5711,8 +5777,8 @@ var AddToCartButton = React47.forwardRef(
|
|
|
5711
5777
|
exit: { opacity: 0, y: -4 },
|
|
5712
5778
|
transition: { duration: 0.15 },
|
|
5713
5779
|
children: [
|
|
5714
|
-
/* @__PURE__ */
|
|
5715
|
-
|
|
5780
|
+
/* @__PURE__ */ jsx74(Loader2, { className: "h-4 w-4 animate-spin", "aria-hidden": "true" }),
|
|
5781
|
+
labels.adding
|
|
5716
5782
|
]
|
|
5717
5783
|
},
|
|
5718
5784
|
"loading"
|
|
@@ -5725,19 +5791,19 @@ var AddToCartButton = React47.forwardRef(
|
|
|
5725
5791
|
exit: { opacity: 0, scale: 0.9 },
|
|
5726
5792
|
transition: { type: "spring", stiffness: 500, damping: 28 },
|
|
5727
5793
|
children: [
|
|
5728
|
-
/* @__PURE__ */
|
|
5729
|
-
|
|
5794
|
+
/* @__PURE__ */ jsx74(Check2, { className: "h-4 w-4", "aria-hidden": "true" }),
|
|
5795
|
+
addedText
|
|
5730
5796
|
]
|
|
5731
5797
|
},
|
|
5732
5798
|
"added"
|
|
5733
|
-
) : /* @__PURE__ */
|
|
5799
|
+
) : /* @__PURE__ */ jsx74(
|
|
5734
5800
|
motion18.span,
|
|
5735
5801
|
{
|
|
5736
5802
|
initial: { opacity: 0 },
|
|
5737
5803
|
animate: { opacity: 1 },
|
|
5738
5804
|
exit: { opacity: 0 },
|
|
5739
5805
|
transition: { duration: 0.15 },
|
|
5740
|
-
children
|
|
5806
|
+
children: idleContent
|
|
5741
5807
|
},
|
|
5742
5808
|
"idle"
|
|
5743
5809
|
) })
|
|
@@ -5752,15 +5818,16 @@ import React48 from "react";
|
|
|
5752
5818
|
import { motion as motion19 } from "framer-motion";
|
|
5753
5819
|
import { Minus as Minus2, Plus as Plus3, Trash2 as Trash22 } from "lucide-react";
|
|
5754
5820
|
import { useCartLineRow as useCartLineRow2 } from "@40rty/ams-sdk";
|
|
5755
|
-
import { jsx as
|
|
5821
|
+
import { jsx as jsx75, jsxs as jsxs51 } from "react/jsx-runtime";
|
|
5756
5822
|
var CartLineItem = React48.forwardRef(
|
|
5757
5823
|
({ className, line, onUpdateQuantity, onRemove, onNavigate, ...props }, ref) => {
|
|
5758
5824
|
const labels = useLabels().cart;
|
|
5825
|
+
const locale = useLocale();
|
|
5759
5826
|
const decDisabled = line.quantity <= 1;
|
|
5760
5827
|
const { pending, interaction, spotlightKey } = useCartLineRow2(line, { onNavigated: onNavigate });
|
|
5761
5828
|
const onNavClick = interaction === void 0 ? void 0 : interaction.onClick;
|
|
5762
5829
|
return /* @__PURE__ */ jsxs51("div", { ref, className: cn("relative flex gap-4 py-4", className), ...props, children: [
|
|
5763
|
-
spotlightKey !== null && /* @__PURE__ */
|
|
5830
|
+
spotlightKey !== null && /* @__PURE__ */ jsx75(
|
|
5764
5831
|
motion19.div,
|
|
5765
5832
|
{
|
|
5766
5833
|
className: "pointer-events-none absolute -inset-x-2 inset-y-0 rounded-md bg-[var(--fourty-color-text)]",
|
|
@@ -5770,7 +5837,7 @@ var CartLineItem = React48.forwardRef(
|
|
|
5770
5837
|
},
|
|
5771
5838
|
spotlightKey
|
|
5772
5839
|
),
|
|
5773
|
-
/* @__PURE__ */
|
|
5840
|
+
/* @__PURE__ */ jsx75(
|
|
5774
5841
|
"button",
|
|
5775
5842
|
{
|
|
5776
5843
|
type: "button",
|
|
@@ -5781,9 +5848,9 @@ var CartLineItem = React48.forwardRef(
|
|
|
5781
5848
|
onNavClick && "cursor-pointer"
|
|
5782
5849
|
),
|
|
5783
5850
|
style: { all: onNavClick ? "unset" : void 0, cursor: onNavClick ? "pointer" : "default", borderRadius: 6 },
|
|
5784
|
-
"aria-label": onNavClick ?
|
|
5851
|
+
"aria-label": onNavClick ? labels.openLine(line.title) : void 0,
|
|
5785
5852
|
tabIndex: onNavClick ? 0 : -1,
|
|
5786
|
-
children: /* @__PURE__ */
|
|
5853
|
+
children: /* @__PURE__ */ jsx75(
|
|
5787
5854
|
ProductImage,
|
|
5788
5855
|
{
|
|
5789
5856
|
src: line.image?.url,
|
|
@@ -5797,7 +5864,7 @@ var CartLineItem = React48.forwardRef(
|
|
|
5797
5864
|
/* @__PURE__ */ jsxs51("div", { className: "flex min-w-0 flex-1 flex-col", children: [
|
|
5798
5865
|
/* @__PURE__ */ jsxs51("div", { className: "flex justify-between", children: [
|
|
5799
5866
|
/* @__PURE__ */ jsxs51("div", { className: "min-w-0", children: [
|
|
5800
|
-
/* @__PURE__ */
|
|
5867
|
+
/* @__PURE__ */ jsx75(
|
|
5801
5868
|
"h4",
|
|
5802
5869
|
{
|
|
5803
5870
|
className: cn(
|
|
@@ -5815,24 +5882,24 @@ var CartLineItem = React48.forwardRef(
|
|
|
5815
5882
|
children: line.title.length > 0 ? line.title : labels.linePending
|
|
5816
5883
|
}
|
|
5817
5884
|
),
|
|
5818
|
-
line.variantTitle && line.variantTitle !== "Default Title" && /* @__PURE__ */
|
|
5885
|
+
line.variantTitle && line.variantTitle !== "Default Title" && /* @__PURE__ */ jsx75("p", { className: "text-xs text-[var(--fourty-color-text-subtle)]", children: line.variantTitle })
|
|
5819
5886
|
] }),
|
|
5820
|
-
/* @__PURE__ */
|
|
5887
|
+
/* @__PURE__ */ jsx75("p", { className: "ms-2 text-sm font-medium text-[var(--fourty-color-text)]", children: pending && line.totalPrice.amount === 0 ? labels.linePendingPrice : formatMoney(line.totalPrice, locale) })
|
|
5821
5888
|
] }),
|
|
5822
5889
|
/* @__PURE__ */ jsxs51("div", { className: "mt-2 flex items-center gap-3", children: [
|
|
5823
5890
|
/* @__PURE__ */ jsxs51("div", { className: "flex items-center rounded-md border border-[var(--fourty-color-border)]", children: [
|
|
5824
|
-
/* @__PURE__ */
|
|
5891
|
+
/* @__PURE__ */ jsx75(
|
|
5825
5892
|
"button",
|
|
5826
5893
|
{
|
|
5827
5894
|
type: "button",
|
|
5828
5895
|
onClick: () => onUpdateQuantity?.(line.id, line.quantity - 1),
|
|
5829
5896
|
disabled: decDisabled || pending,
|
|
5830
5897
|
className: "flex h-7 w-7 items-center justify-center text-[var(--fourty-color-text-subtle)] transition-colors hover:bg-[var(--fourty-color-surface-raised)] hover:text-[var(--fourty-color-text)] disabled:cursor-not-allowed disabled:opacity-40 disabled:hover:bg-transparent",
|
|
5831
|
-
"aria-label":
|
|
5832
|
-
children: /* @__PURE__ */
|
|
5898
|
+
"aria-label": labels.decrease,
|
|
5899
|
+
children: /* @__PURE__ */ jsx75(Minus2, { className: "h-3 w-3", "aria-hidden": "true" })
|
|
5833
5900
|
}
|
|
5834
5901
|
),
|
|
5835
|
-
/* @__PURE__ */
|
|
5902
|
+
/* @__PURE__ */ jsx75(
|
|
5836
5903
|
"span",
|
|
5837
5904
|
{
|
|
5838
5905
|
className: "min-w-[28px] px-1 text-center text-sm tabular-nums text-[var(--fourty-color-text)]",
|
|
@@ -5840,27 +5907,27 @@ var CartLineItem = React48.forwardRef(
|
|
|
5840
5907
|
children: line.quantity
|
|
5841
5908
|
}
|
|
5842
5909
|
),
|
|
5843
|
-
/* @__PURE__ */
|
|
5910
|
+
/* @__PURE__ */ jsx75(
|
|
5844
5911
|
"button",
|
|
5845
5912
|
{
|
|
5846
5913
|
type: "button",
|
|
5847
5914
|
onClick: () => onUpdateQuantity?.(line.id, line.quantity + 1),
|
|
5848
5915
|
disabled: pending,
|
|
5849
5916
|
className: "flex h-7 w-7 items-center justify-center text-[var(--fourty-color-text-subtle)] transition-colors hover:bg-[var(--fourty-color-surface-raised)] hover:text-[var(--fourty-color-text)] disabled:cursor-not-allowed disabled:opacity-40 disabled:hover:bg-transparent",
|
|
5850
|
-
"aria-label":
|
|
5851
|
-
children: /* @__PURE__ */
|
|
5917
|
+
"aria-label": labels.increase,
|
|
5918
|
+
children: /* @__PURE__ */ jsx75(Plus3, { className: "h-3 w-3", "aria-hidden": "true" })
|
|
5852
5919
|
}
|
|
5853
5920
|
)
|
|
5854
5921
|
] }),
|
|
5855
|
-
/* @__PURE__ */
|
|
5922
|
+
/* @__PURE__ */ jsx75(
|
|
5856
5923
|
"button",
|
|
5857
5924
|
{
|
|
5858
5925
|
type: "button",
|
|
5859
5926
|
onClick: () => onRemove?.(line.id),
|
|
5860
5927
|
disabled: pending,
|
|
5861
5928
|
className: "flex h-7 w-7 items-center justify-center rounded-md text-[var(--fourty-color-text-subtle)] transition-colors hover:bg-[var(--fourty-color-surface-raised)] hover:text-[var(--fourty-color-text)] focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-[var(--fourty-color-text)] disabled:cursor-not-allowed disabled:opacity-40 disabled:hover:bg-transparent",
|
|
5862
|
-
"aria-label":
|
|
5863
|
-
children: /* @__PURE__ */
|
|
5929
|
+
"aria-label": labels.removeItem,
|
|
5930
|
+
children: /* @__PURE__ */ jsx75(Trash22, { className: "h-3.5 w-3.5", "aria-hidden": "true" })
|
|
5864
5931
|
}
|
|
5865
5932
|
)
|
|
5866
5933
|
] })
|
|
@@ -5872,9 +5939,11 @@ CartLineItem.displayName = "CartLineItem";
|
|
|
5872
5939
|
|
|
5873
5940
|
// src/components/ecommerce/cart/CartSummary.tsx
|
|
5874
5941
|
import React49 from "react";
|
|
5875
|
-
import { jsx as
|
|
5942
|
+
import { jsx as jsx76, jsxs as jsxs52 } from "react/jsx-runtime";
|
|
5876
5943
|
var CartSummary = React49.forwardRef(
|
|
5877
5944
|
({ className, cart, onCheckout, ...props }, ref) => {
|
|
5945
|
+
const labels = useLabels().cart.summary;
|
|
5946
|
+
const locale = useLocale();
|
|
5878
5947
|
return /* @__PURE__ */ jsxs52(
|
|
5879
5948
|
"div",
|
|
5880
5949
|
{
|
|
@@ -5883,11 +5952,11 @@ var CartSummary = React49.forwardRef(
|
|
|
5883
5952
|
...props,
|
|
5884
5953
|
children: [
|
|
5885
5954
|
/* @__PURE__ */ jsxs52("div", { className: "flex justify-between text-base font-medium text-[var(--fourty-color-text)]", children: [
|
|
5886
|
-
/* @__PURE__ */
|
|
5887
|
-
/* @__PURE__ */
|
|
5955
|
+
/* @__PURE__ */ jsx76("span", { children: labels.subtotal }),
|
|
5956
|
+
/* @__PURE__ */ jsx76("span", { children: formatMoney(cart.subtotal, locale) })
|
|
5888
5957
|
] }),
|
|
5889
|
-
/* @__PURE__ */
|
|
5890
|
-
/* @__PURE__ */
|
|
5958
|
+
/* @__PURE__ */ jsx76("p", { className: "text-sm text-[var(--fourty-color-text-subtle)]", children: labels.note }),
|
|
5959
|
+
/* @__PURE__ */ jsx76(Button, { className: "w-full", onClick: onCheckout, children: labels.checkout })
|
|
5891
5960
|
]
|
|
5892
5961
|
}
|
|
5893
5962
|
);
|
|
@@ -5903,9 +5972,10 @@ import * as React50 from "react";
|
|
|
5903
5972
|
import { createPortal as createPortal6 } from "react-dom";
|
|
5904
5973
|
import { ShoppingBag } from "lucide-react";
|
|
5905
5974
|
import { useSafeCart as useSafeCart3, useShellRoot as useShellRoot6 } from "@40rty/ams-sdk";
|
|
5906
|
-
import { Fragment as
|
|
5975
|
+
import { Fragment as Fragment12, jsx as jsx77, jsxs as jsxs53 } from "react/jsx-runtime";
|
|
5907
5976
|
function CartWidget() {
|
|
5908
5977
|
const cart = useSafeCart3();
|
|
5978
|
+
const labels = useLabels().cart;
|
|
5909
5979
|
const shellRoot = useShellRoot6();
|
|
5910
5980
|
const [open, setOpen] = React50.useState(false);
|
|
5911
5981
|
const [bump, setBump] = React50.useState(false);
|
|
@@ -5922,7 +5992,7 @@ function CartWidget() {
|
|
|
5922
5992
|
return;
|
|
5923
5993
|
}, [cart]);
|
|
5924
5994
|
if (!cart) return null;
|
|
5925
|
-
const drawer = /* @__PURE__ */
|
|
5995
|
+
const drawer = /* @__PURE__ */ jsx77(
|
|
5926
5996
|
CartDrawer,
|
|
5927
5997
|
{
|
|
5928
5998
|
open,
|
|
@@ -5935,13 +6005,13 @@ function CartWidget() {
|
|
|
5935
6005
|
discountPending: cart.isDiscountPending
|
|
5936
6006
|
}
|
|
5937
6007
|
);
|
|
5938
|
-
return /* @__PURE__ */ jsxs53(
|
|
6008
|
+
return /* @__PURE__ */ jsxs53(Fragment12, { children: [
|
|
5939
6009
|
/* @__PURE__ */ jsxs53(
|
|
5940
6010
|
"button",
|
|
5941
6011
|
{
|
|
5942
6012
|
type: "button",
|
|
5943
6013
|
onClick: () => setOpen(true),
|
|
5944
|
-
"aria-label":
|
|
6014
|
+
"aria-label": labels.openWithCount(cart.totalQuantity),
|
|
5945
6015
|
style: {
|
|
5946
6016
|
pointerEvents: "auto",
|
|
5947
6017
|
position: "relative",
|
|
@@ -5962,14 +6032,14 @@ function CartWidget() {
|
|
|
5962
6032
|
transition: "transform 250ms cubic-bezier(0.34, 1.56, 0.64, 1)"
|
|
5963
6033
|
},
|
|
5964
6034
|
children: [
|
|
5965
|
-
/* @__PURE__ */
|
|
5966
|
-
cart.totalQuantity > 0 && /* @__PURE__ */
|
|
6035
|
+
/* @__PURE__ */ jsx77(ShoppingBag, { size: 18, strokeWidth: 2 }),
|
|
6036
|
+
cart.totalQuantity > 0 && /* @__PURE__ */ jsx77(
|
|
5967
6037
|
"span",
|
|
5968
6038
|
{
|
|
5969
6039
|
style: {
|
|
5970
6040
|
position: "absolute",
|
|
5971
6041
|
top: -4,
|
|
5972
|
-
|
|
6042
|
+
insetInlineEnd: -4,
|
|
5973
6043
|
minWidth: 18,
|
|
5974
6044
|
height: 18,
|
|
5975
6045
|
padding: "0 5px",
|
|
@@ -6000,8 +6070,8 @@ import { usePendingVariantChoice, clearVariantChoice, PRODUCT_SELECT_OPTION_SIGN
|
|
|
6000
6070
|
import { resolveProductVariant as resolveProductVariant2, preselectFromFacts } from "@40rty/ams-sdk";
|
|
6001
6071
|
import { formatVariantValue as formatVariantValue2 } from "@40rty/ams-sdk";
|
|
6002
6072
|
import { buildOptimisticCartLine as buildOptimisticCartLine2 } from "@40rty/ams-sdk";
|
|
6003
|
-
import { Fragment as
|
|
6004
|
-
function deriveHeader(choice) {
|
|
6073
|
+
import { Fragment as Fragment13, jsx as jsx78, jsxs as jsxs54 } from "react/jsx-runtime";
|
|
6074
|
+
function deriveHeader(choice, locale) {
|
|
6005
6075
|
const title = choice.product.title;
|
|
6006
6076
|
let image = null;
|
|
6007
6077
|
const first = choice.product.images[0];
|
|
@@ -6009,11 +6079,12 @@ function deriveHeader(choice) {
|
|
|
6009
6079
|
image = { url: first.url, altText: first.altText, srcSet: first.srcSet };
|
|
6010
6080
|
}
|
|
6011
6081
|
const price = choice.product.price;
|
|
6012
|
-
const priceText = price.amount > 0 ? formatMoney(price) : "";
|
|
6082
|
+
const priceText = price.amount > 0 ? formatMoney(price, locale) : "";
|
|
6013
6083
|
return { title, image, priceText };
|
|
6014
6084
|
}
|
|
6015
6085
|
function VariantPickerModal() {
|
|
6016
6086
|
const labels = useLabels();
|
|
6087
|
+
const locale = useLocale();
|
|
6017
6088
|
const session = useFourtySession6();
|
|
6018
6089
|
const choice = usePendingVariantChoice();
|
|
6019
6090
|
const facts = useFacts();
|
|
@@ -6055,13 +6126,13 @@ function VariantPickerModal() {
|
|
|
6055
6126
|
clearVariantChoice();
|
|
6056
6127
|
};
|
|
6057
6128
|
const gap = choice !== null ? choice.gap : null;
|
|
6058
|
-
const header = choice !== null ? deriveHeader(choice) : null;
|
|
6129
|
+
const header = choice !== null ? deriveHeader(choice, locale) : null;
|
|
6059
6130
|
const ready = gap !== null && gap.options.every(
|
|
6060
6131
|
(axis) => axis.values.some((v) => v.value === selections[axis.name] && v.available)
|
|
6061
6132
|
);
|
|
6062
|
-
return /* @__PURE__ */
|
|
6133
|
+
return /* @__PURE__ */ jsx78(Modal, { open: choice !== null, onClose, label: labels.variantPicker.title, children: gap !== null && header !== null && /* @__PURE__ */ jsxs54(Fragment13, { children: [
|
|
6063
6134
|
/* @__PURE__ */ jsxs54("div", { className: "variant-picker-modal__product", children: [
|
|
6064
|
-
header.image !== null && /* @__PURE__ */
|
|
6135
|
+
header.image !== null && /* @__PURE__ */ jsx78("div", { className: "variant-picker-modal__thumb", children: /* @__PURE__ */ jsx78(
|
|
6065
6136
|
"img",
|
|
6066
6137
|
{
|
|
6067
6138
|
src: header.image.url,
|
|
@@ -6071,16 +6142,16 @@ function VariantPickerModal() {
|
|
|
6071
6142
|
}
|
|
6072
6143
|
) }),
|
|
6073
6144
|
/* @__PURE__ */ jsxs54("div", { className: "variant-picker-modal__meta", children: [
|
|
6074
|
-
/* @__PURE__ */
|
|
6075
|
-
header.priceText !== "" && /* @__PURE__ */
|
|
6145
|
+
/* @__PURE__ */ jsx78("div", { className: "variant-picker-modal__name", children: header.title }),
|
|
6146
|
+
header.priceText !== "" && /* @__PURE__ */ jsx78("div", { className: "variant-picker-modal__price", children: header.priceText })
|
|
6076
6147
|
] })
|
|
6077
6148
|
] }),
|
|
6078
|
-
/* @__PURE__ */
|
|
6079
|
-
/* @__PURE__ */
|
|
6080
|
-
/* @__PURE__ */
|
|
6149
|
+
/* @__PURE__ */ jsx78("div", { className: "variant-picker", children: gap.options.map((axis) => /* @__PURE__ */ jsxs54("div", { className: "variant-picker__row", children: [
|
|
6150
|
+
/* @__PURE__ */ jsx78("div", { className: "variant-picker__label", children: axis.name }),
|
|
6151
|
+
/* @__PURE__ */ jsx78("div", { className: "variant-picker__chips", children: axis.values.map((value) => {
|
|
6081
6152
|
const isActive = selections[axis.name] === value.value;
|
|
6082
6153
|
const hasImage = value.image !== void 0;
|
|
6083
|
-
return /* @__PURE__ */
|
|
6154
|
+
return /* @__PURE__ */ jsx78(
|
|
6084
6155
|
"button",
|
|
6085
6156
|
{
|
|
6086
6157
|
type: "button",
|
|
@@ -6093,15 +6164,15 @@ function VariantPickerModal() {
|
|
|
6093
6164
|
touchedForProductRef.current = productId;
|
|
6094
6165
|
setSelections((prev) => ({ ...prev, [axis.name]: value.value }));
|
|
6095
6166
|
},
|
|
6096
|
-
children: value.image !== void 0 ? /* @__PURE__ */
|
|
6167
|
+
children: value.image !== void 0 ? /* @__PURE__ */ jsx78("img", { src: value.image.url, alt: value.image.altText, loading: "lazy" }) : formatVariantValue2(value.value)
|
|
6097
6168
|
},
|
|
6098
6169
|
value.value
|
|
6099
6170
|
);
|
|
6100
6171
|
}) })
|
|
6101
6172
|
] }, axis.name)) }),
|
|
6102
6173
|
/* @__PURE__ */ jsxs54("div", { className: "variant-picker__actions", children: [
|
|
6103
|
-
/* @__PURE__ */
|
|
6104
|
-
/* @__PURE__ */
|
|
6174
|
+
/* @__PURE__ */ jsx78("button", { type: "button", className: "btn-ghost", onClick: onClose, children: labels.variantPicker.dismiss }),
|
|
6175
|
+
/* @__PURE__ */ jsx78("button", { type: "button", className: "btn-primary", disabled: !ready, onClick: onConfirm, children: labels.product.addToBag })
|
|
6105
6176
|
] })
|
|
6106
6177
|
] }) });
|
|
6107
6178
|
}
|
|
@@ -6110,9 +6181,11 @@ function VariantPickerModal() {
|
|
|
6110
6181
|
import * as React52 from "react";
|
|
6111
6182
|
import { AnimatePresence as AnimatePresence13, motion as motion20 } from "framer-motion";
|
|
6112
6183
|
import { useProducts as useProducts2, useCommerceActions as useCommerceActions3 } from "@40rty/ams-sdk";
|
|
6113
|
-
import { Fragment as
|
|
6184
|
+
import { Fragment as Fragment14, jsx as jsx79, jsxs as jsxs55 } from "react/jsx-runtime";
|
|
6114
6185
|
function WishlistDrawer({ open, onClose, productIds, onRemove }) {
|
|
6115
6186
|
const actions = useCommerceActions3();
|
|
6187
|
+
const labels = useLabels().wishlist;
|
|
6188
|
+
const offscreen = mirrorX(useTextDirection(), "100%");
|
|
6116
6189
|
const productsQuery = useProducts2(open ? productIds : []);
|
|
6117
6190
|
const products = productsQuery.data;
|
|
6118
6191
|
const count = productIds.length;
|
|
@@ -6121,8 +6194,8 @@ function WishlistDrawer({ open, onClose, productIds, onRemove }) {
|
|
|
6121
6194
|
onClose();
|
|
6122
6195
|
actions.navigateToProduct(productId, title);
|
|
6123
6196
|
}, [actions, onClose]);
|
|
6124
|
-
return /* @__PURE__ */
|
|
6125
|
-
/* @__PURE__ */
|
|
6197
|
+
return /* @__PURE__ */ jsx79(AnimatePresence13, { children: open && /* @__PURE__ */ jsxs55(Fragment14, { children: [
|
|
6198
|
+
/* @__PURE__ */ jsx79(
|
|
6126
6199
|
motion20.div,
|
|
6127
6200
|
{
|
|
6128
6201
|
className: "cart-drawer-backdrop open",
|
|
@@ -6137,9 +6210,9 @@ function WishlistDrawer({ open, onClose, productIds, onRemove }) {
|
|
|
6137
6210
|
{
|
|
6138
6211
|
"data-fourty-shell-part": "wishlistDrawer",
|
|
6139
6212
|
className: "cart-drawer wishlist-drawer open",
|
|
6140
|
-
initial: { x:
|
|
6213
|
+
initial: { x: offscreen },
|
|
6141
6214
|
animate: { x: 0 },
|
|
6142
|
-
exit: { x:
|
|
6215
|
+
exit: { x: offscreen },
|
|
6143
6216
|
transition: { duration: 0.22, ease: [0.22, 0.61, 0.36, 1] },
|
|
6144
6217
|
role: "dialog",
|
|
6145
6218
|
"aria-modal": "true",
|
|
@@ -6150,16 +6223,12 @@ function WishlistDrawer({ open, onClose, productIds, onRemove }) {
|
|
|
6150
6223
|
children: [
|
|
6151
6224
|
/* @__PURE__ */ jsxs55("div", { className: "cart-drawer__head", children: [
|
|
6152
6225
|
/* @__PURE__ */ jsxs55("div", { children: [
|
|
6153
|
-
/* @__PURE__ */
|
|
6154
|
-
/* @__PURE__ */
|
|
6155
|
-
count,
|
|
6156
|
-
" ",
|
|
6157
|
-
count === 1 ? "piece" : "pieces"
|
|
6158
|
-
] })
|
|
6226
|
+
/* @__PURE__ */ jsx79("h3", { id: "wishlist-drawer-title", children: labels.title }),
|
|
6227
|
+
/* @__PURE__ */ jsx79("div", { className: "count", children: labels.pieces(count) })
|
|
6159
6228
|
] }),
|
|
6160
|
-
/* @__PURE__ */
|
|
6229
|
+
/* @__PURE__ */ jsx79("button", { type: "button", className: "icon-btn", onClick: onClose, "aria-label": labels.close, children: /* @__PURE__ */ jsx79("svg", { width: "14", height: "14", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", children: /* @__PURE__ */ jsx79("path", { d: "M18 6 6 18M6 6l12 12" }) }) })
|
|
6161
6230
|
] }),
|
|
6162
|
-
/* @__PURE__ */
|
|
6231
|
+
/* @__PURE__ */ jsx79("div", { className: "cart-drawer__body", children: count === 0 ? /* @__PURE__ */ jsx79(EmptyState, {}) : products.length === 0 && productsQuery.isLoading ? /* @__PURE__ */ jsx79(LoadingRows, { count: Math.min(count, 4) }) : products.map((product) => /* @__PURE__ */ jsx79(
|
|
6163
6232
|
WishlistRow,
|
|
6164
6233
|
{
|
|
6165
6234
|
product,
|
|
@@ -6170,12 +6239,8 @@ function WishlistDrawer({ open, onClose, productIds, onRemove }) {
|
|
|
6170
6239
|
)) }),
|
|
6171
6240
|
count > 0 && /* @__PURE__ */ jsxs55("div", { className: "cart-drawer__foot", children: [
|
|
6172
6241
|
/* @__PURE__ */ jsxs55("div", { className: "row", style: { color: "var(--fg3)" }, children: [
|
|
6173
|
-
/* @__PURE__ */
|
|
6174
|
-
/* @__PURE__ */
|
|
6175
|
-
count,
|
|
6176
|
-
" ",
|
|
6177
|
-
count === 1 ? "piece" : "pieces"
|
|
6178
|
-
] })
|
|
6242
|
+
/* @__PURE__ */ jsx79("span", { children: labels.saved }),
|
|
6243
|
+
/* @__PURE__ */ jsx79("span", { children: labels.pieces(count) })
|
|
6179
6244
|
] }),
|
|
6180
6245
|
/* @__PURE__ */ jsxs55(
|
|
6181
6246
|
"button",
|
|
@@ -6186,11 +6251,12 @@ function WishlistDrawer({ open, onClose, productIds, onRemove }) {
|
|
|
6186
6251
|
onClick: () => {
|
|
6187
6252
|
if (!actions) return;
|
|
6188
6253
|
onClose();
|
|
6189
|
-
actions.navigateToProductSet("saved",
|
|
6254
|
+
actions.navigateToProductSet("saved", labels.collectionTitle, productIds);
|
|
6190
6255
|
},
|
|
6191
6256
|
children: [
|
|
6192
|
-
|
|
6193
|
-
|
|
6257
|
+
labels.viewAll,
|
|
6258
|
+
" ",
|
|
6259
|
+
/* @__PURE__ */ jsx79("span", { "aria-hidden": "true", className: "rtl:inline-block rtl:-scale-x-100", children: "\u2192" })
|
|
6194
6260
|
]
|
|
6195
6261
|
}
|
|
6196
6262
|
)
|
|
@@ -6201,11 +6267,13 @@ function WishlistDrawer({ open, onClose, productIds, onRemove }) {
|
|
|
6201
6267
|
] }) });
|
|
6202
6268
|
}
|
|
6203
6269
|
function WishlistRow({ product, onView, onRemove }) {
|
|
6270
|
+
const labels = useLabels().wishlist;
|
|
6271
|
+
const locale = useLocale();
|
|
6204
6272
|
const image = product.images?.[0]?.url;
|
|
6205
6273
|
const title = product.title;
|
|
6206
6274
|
const brand = product.vendor;
|
|
6207
6275
|
const price = product.price;
|
|
6208
|
-
const priceLabel = price && price.amount > 0 ?
|
|
6276
|
+
const priceLabel = price && price.amount > 0 ? formatMoney(price, locale) : "";
|
|
6209
6277
|
const handleRemove = React52.useCallback((e) => {
|
|
6210
6278
|
e.stopPropagation();
|
|
6211
6279
|
onRemove();
|
|
@@ -6225,7 +6293,7 @@ function WishlistRow({ product, onView, onRemove }) {
|
|
|
6225
6293
|
},
|
|
6226
6294
|
style: { cursor: "pointer" },
|
|
6227
6295
|
children: [
|
|
6228
|
-
/* @__PURE__ */
|
|
6296
|
+
/* @__PURE__ */ jsx79("div", { className: "cart-line__img", children: image && /* @__PURE__ */ jsx79(
|
|
6229
6297
|
"img",
|
|
6230
6298
|
{
|
|
6231
6299
|
src: image,
|
|
@@ -6234,27 +6302,28 @@ function WishlistRow({ product, onView, onRemove }) {
|
|
|
6234
6302
|
}
|
|
6235
6303
|
) }),
|
|
6236
6304
|
/* @__PURE__ */ jsxs55("div", { children: [
|
|
6237
|
-
brand && /* @__PURE__ */
|
|
6238
|
-
/* @__PURE__ */
|
|
6239
|
-
priceLabel && /* @__PURE__ */
|
|
6240
|
-
/* @__PURE__ */
|
|
6305
|
+
brand && /* @__PURE__ */ jsx79("span", { className: "product-card__brand", children: brand }),
|
|
6306
|
+
/* @__PURE__ */ jsx79("div", { className: "cart-line__name", children: title }),
|
|
6307
|
+
priceLabel && /* @__PURE__ */ jsx79("div", { className: "cart-line__sku", children: priceLabel }),
|
|
6308
|
+
/* @__PURE__ */ jsx79(
|
|
6241
6309
|
"button",
|
|
6242
6310
|
{
|
|
6243
6311
|
type: "button",
|
|
6244
6312
|
className: "wishlist-row__remove",
|
|
6245
6313
|
onClick: handleRemove,
|
|
6246
|
-
"aria-label":
|
|
6247
|
-
children:
|
|
6314
|
+
"aria-label": labels.remove,
|
|
6315
|
+
children: labels.removeShort
|
|
6248
6316
|
}
|
|
6249
6317
|
)
|
|
6250
6318
|
] }),
|
|
6251
|
-
/* @__PURE__ */
|
|
6319
|
+
/* @__PURE__ */ jsx79("div", { className: "cart-line__price rtl:-scale-x-100", "aria-hidden": "true", children: "\u2192" })
|
|
6252
6320
|
]
|
|
6253
6321
|
}
|
|
6254
6322
|
);
|
|
6255
6323
|
}
|
|
6256
6324
|
function EmptyState() {
|
|
6257
|
-
|
|
6325
|
+
const labels = useLabels().wishlist;
|
|
6326
|
+
return /* @__PURE__ */ jsx79("div", { style: {
|
|
6258
6327
|
padding: "60px 0",
|
|
6259
6328
|
color: "var(--fg3)",
|
|
6260
6329
|
fontFamily: "var(--font-mono)",
|
|
@@ -6262,31 +6331,24 @@ function EmptyState() {
|
|
|
6262
6331
|
letterSpacing: ".12em",
|
|
6263
6332
|
textTransform: "uppercase",
|
|
6264
6333
|
textAlign: "center"
|
|
6265
|
-
}, children:
|
|
6334
|
+
}, children: labels.empty });
|
|
6266
6335
|
}
|
|
6267
6336
|
function LoadingRows({ count }) {
|
|
6268
|
-
return /* @__PURE__ */
|
|
6269
|
-
/* @__PURE__ */
|
|
6337
|
+
return /* @__PURE__ */ jsx79(Fragment14, { children: Array.from({ length: count }).map((_, i) => /* @__PURE__ */ jsxs55("div", { className: "cart-line", "aria-hidden": "true", children: [
|
|
6338
|
+
/* @__PURE__ */ jsx79("div", { className: "cart-line__img", style: { background: "var(--bg-sunken)" } }),
|
|
6270
6339
|
/* @__PURE__ */ jsxs55("div", { children: [
|
|
6271
|
-
/* @__PURE__ */
|
|
6272
|
-
/* @__PURE__ */
|
|
6340
|
+
/* @__PURE__ */ jsx79("div", { style: { height: 10, width: 80, background: "var(--bg-sunken)", marginBottom: 8 } }),
|
|
6341
|
+
/* @__PURE__ */ jsx79("div", { style: { height: 14, width: 180, background: "var(--bg-sunken)" } })
|
|
6273
6342
|
] }),
|
|
6274
|
-
/* @__PURE__ */
|
|
6343
|
+
/* @__PURE__ */ jsx79("div", {})
|
|
6275
6344
|
] }, i)) });
|
|
6276
6345
|
}
|
|
6277
|
-
function formatPrice2(amount, currency) {
|
|
6278
|
-
try {
|
|
6279
|
-
return new Intl.NumberFormat(void 0, { style: "currency", currency }).format(amount);
|
|
6280
|
-
} catch {
|
|
6281
|
-
return `${currency} ${amount.toFixed(2)}`;
|
|
6282
|
-
}
|
|
6283
|
-
}
|
|
6284
6346
|
|
|
6285
6347
|
// src/components/ecommerce/collection/CollectionCard.tsx
|
|
6286
6348
|
import React53 from "react";
|
|
6287
6349
|
import { Slot as Slot3 } from "@radix-ui/react-slot";
|
|
6288
6350
|
import { useCommerceActions as useCommerceActions4 } from "@40rty/ams-sdk";
|
|
6289
|
-
import { jsx as
|
|
6351
|
+
import { jsx as jsx80, jsxs as jsxs56 } from "react/jsx-runtime";
|
|
6290
6352
|
var CollectionCard = React53.forwardRef(
|
|
6291
6353
|
({ className, collection, title, imageSrc, imageAlt, asChild = false, onClick: onClickProp, ...props }, ref) => {
|
|
6292
6354
|
const resolvedTitle = title ? title : collection ? collection.title : "";
|
|
@@ -6321,7 +6383,7 @@ var CollectionCard = React53.forwardRef(
|
|
|
6321
6383
|
tabIndex: isClickable ? 0 : void 0,
|
|
6322
6384
|
...props,
|
|
6323
6385
|
children: [
|
|
6324
|
-
/* @__PURE__ */
|
|
6386
|
+
/* @__PURE__ */ jsx80("div", { className: "aspect-[4/3] bg-[var(--fourty-color-bg-subtle)]", children: resolvedImageSrc ? /* @__PURE__ */ jsx80(
|
|
6325
6387
|
"img",
|
|
6326
6388
|
{
|
|
6327
6389
|
src: resolvedImageSrc,
|
|
@@ -6329,8 +6391,8 @@ var CollectionCard = React53.forwardRef(
|
|
|
6329
6391
|
className: "h-full w-full object-cover transition-transform duration-500 group-hover:scale-105",
|
|
6330
6392
|
loading: "lazy"
|
|
6331
6393
|
}
|
|
6332
|
-
) : /* @__PURE__ */
|
|
6333
|
-
/* @__PURE__ */
|
|
6394
|
+
) : /* @__PURE__ */ jsx80("div", { className: "flex h-full items-center justify-center text-[var(--fourty-color-text-subtle)]", children: resolvedTitle }) }),
|
|
6395
|
+
/* @__PURE__ */ jsx80("div", { className: "absolute inset-0 flex items-end bg-gradient-to-t from-[rgba(10,11,13,0.65)] to-transparent p-6", children: /* @__PURE__ */ jsx80("h3", { className: "text-xl font-bold tracking-tight text-[#F4F2EC]", children: resolvedTitle }) })
|
|
6334
6396
|
]
|
|
6335
6397
|
}
|
|
6336
6398
|
);
|
|
@@ -6340,10 +6402,10 @@ CollectionCard.displayName = "CollectionCard";
|
|
|
6340
6402
|
|
|
6341
6403
|
// src/components/ecommerce/collection/CollectionGrid.tsx
|
|
6342
6404
|
import React54 from "react";
|
|
6343
|
-
import { jsx as
|
|
6405
|
+
import { jsx as jsx81 } from "react/jsx-runtime";
|
|
6344
6406
|
var CollectionGrid = React54.forwardRef(
|
|
6345
6407
|
({ className, collections, onCollectionClick, columns = 3, ...props }, ref) => {
|
|
6346
|
-
return /* @__PURE__ */
|
|
6408
|
+
return /* @__PURE__ */ jsx81(Grid, { ref, columns, className: cn(className), ...props, children: collections.map((collection) => /* @__PURE__ */ jsx81(
|
|
6347
6409
|
CollectionCard,
|
|
6348
6410
|
{
|
|
6349
6411
|
collection,
|
|
@@ -6361,16 +6423,16 @@ import React55, { useState as useState17 } from "react";
|
|
|
6361
6423
|
|
|
6362
6424
|
// src/components/marketing/internal/AnnouncementMessage.tsx
|
|
6363
6425
|
import { useAction as useAction4 } from "@40rty/ams-sdk";
|
|
6364
|
-
import { jsx as
|
|
6426
|
+
import { jsx as jsx82 } from "react/jsx-runtime";
|
|
6365
6427
|
function AnnouncementMessage({
|
|
6366
6428
|
text,
|
|
6367
6429
|
action
|
|
6368
6430
|
}) {
|
|
6369
6431
|
const onClick = useAction4(text, action);
|
|
6370
6432
|
if (!action || !onClick) {
|
|
6371
|
-
return /* @__PURE__ */
|
|
6433
|
+
return /* @__PURE__ */ jsx82("span", { children: text });
|
|
6372
6434
|
}
|
|
6373
|
-
return /* @__PURE__ */
|
|
6435
|
+
return /* @__PURE__ */ jsx82(
|
|
6374
6436
|
"button",
|
|
6375
6437
|
{
|
|
6376
6438
|
type: "button",
|
|
@@ -6383,13 +6445,13 @@ function AnnouncementMessage({
|
|
|
6383
6445
|
|
|
6384
6446
|
// src/components/marketing/internal/AnnouncementLink.tsx
|
|
6385
6447
|
import { useAction as useAction5 } from "@40rty/ams-sdk";
|
|
6386
|
-
import { jsx as
|
|
6448
|
+
import { jsx as jsx83 } from "react/jsx-runtime";
|
|
6387
6449
|
function AnnouncementLink({
|
|
6388
6450
|
label,
|
|
6389
6451
|
action
|
|
6390
6452
|
}) {
|
|
6391
6453
|
const onClick = useAction5(label, action);
|
|
6392
|
-
return /* @__PURE__ */
|
|
6454
|
+
return /* @__PURE__ */ jsx83(
|
|
6393
6455
|
"button",
|
|
6394
6456
|
{
|
|
6395
6457
|
type: "button",
|
|
@@ -6401,10 +6463,11 @@ function AnnouncementLink({
|
|
|
6401
6463
|
}
|
|
6402
6464
|
|
|
6403
6465
|
// src/components/marketing/AnnouncementBar.tsx
|
|
6404
|
-
import { Fragment as
|
|
6466
|
+
import { Fragment as Fragment15, jsx as jsx84, jsxs as jsxs57 } from "react/jsx-runtime";
|
|
6405
6467
|
var AnnouncementBar = React55.forwardRef(
|
|
6406
6468
|
({ className, messages = [], links, dismissible = false, onDismiss, ...props }, ref) => {
|
|
6407
6469
|
const [activeIndex, setActiveIndex] = useState17(0);
|
|
6470
|
+
const labels = useLabels().content;
|
|
6408
6471
|
const activeMessage = messages.length > 0 ? messages[activeIndex % messages.length] : void 0;
|
|
6409
6472
|
function handlePrev() {
|
|
6410
6473
|
setActiveIndex((i) => (i - 1 + messages.length) % messages.length);
|
|
@@ -6422,39 +6485,39 @@ var AnnouncementBar = React55.forwardRef(
|
|
|
6422
6485
|
),
|
|
6423
6486
|
...props,
|
|
6424
6487
|
children: [
|
|
6425
|
-
/* @__PURE__ */
|
|
6426
|
-
/* @__PURE__ */
|
|
6488
|
+
/* @__PURE__ */ jsx84("div", { className: "flex flex-1 items-center gap-1", children: messages.length > 1 && /* @__PURE__ */ jsxs57(Fragment15, { children: [
|
|
6489
|
+
/* @__PURE__ */ jsx84(
|
|
6427
6490
|
"button",
|
|
6428
6491
|
{
|
|
6429
6492
|
type: "button",
|
|
6430
6493
|
onClick: handlePrev,
|
|
6431
6494
|
className: "opacity-70 hover:opacity-100",
|
|
6432
|
-
"aria-label":
|
|
6433
|
-
children: /* @__PURE__ */
|
|
6495
|
+
"aria-label": labels.announcementPrev,
|
|
6496
|
+
children: /* @__PURE__ */ jsx84("svg", { className: "h-4 w-4 rtl:-scale-x-100", viewBox: "0 0 20 20", fill: "currentColor", children: /* @__PURE__ */ jsx84("path", { fillRule: "evenodd", d: "M12.707 5.293a1 1 0 010 1.414L9.414 10l3.293 3.293a1 1 0 01-1.414 1.414l-4-4a1 1 0 010-1.414l4-4a1 1 0 011.414 0z", clipRule: "evenodd" }) })
|
|
6434
6497
|
}
|
|
6435
6498
|
),
|
|
6436
|
-
/* @__PURE__ */
|
|
6499
|
+
/* @__PURE__ */ jsx84(
|
|
6437
6500
|
"button",
|
|
6438
6501
|
{
|
|
6439
6502
|
type: "button",
|
|
6440
6503
|
onClick: handleNext,
|
|
6441
6504
|
className: "opacity-70 hover:opacity-100",
|
|
6442
|
-
"aria-label":
|
|
6443
|
-
children: /* @__PURE__ */
|
|
6505
|
+
"aria-label": labels.announcementNext,
|
|
6506
|
+
children: /* @__PURE__ */ jsx84("svg", { className: "h-4 w-4 rtl:-scale-x-100", viewBox: "0 0 20 20", fill: "currentColor", children: /* @__PURE__ */ jsx84("path", { fillRule: "evenodd", d: "M7.293 14.707a1 1 0 010-1.414L10.586 10 7.293 6.707a1 1 0 011.414-1.414l4 4a1 1 0 010 1.414l-4 4a1 1 0 01-1.414 0z", clipRule: "evenodd" }) })
|
|
6444
6507
|
}
|
|
6445
6508
|
)
|
|
6446
6509
|
] }) }),
|
|
6447
|
-
/* @__PURE__ */
|
|
6510
|
+
/* @__PURE__ */ jsx84("div", { className: "flex-1 text-center", children: activeMessage && /* @__PURE__ */ jsx84(AnnouncementMessage, { text: activeMessage.text, action: activeMessage.action }) }),
|
|
6448
6511
|
/* @__PURE__ */ jsxs57("div", { className: "flex flex-1 items-center justify-end gap-4", children: [
|
|
6449
|
-
links && links.map((link, i) => /* @__PURE__ */
|
|
6450
|
-
dismissible && /* @__PURE__ */
|
|
6512
|
+
links && links.map((link, i) => /* @__PURE__ */ jsx84(AnnouncementLink, { label: link.label, action: link.action }, i)),
|
|
6513
|
+
dismissible && /* @__PURE__ */ jsx84(
|
|
6451
6514
|
"button",
|
|
6452
6515
|
{
|
|
6453
6516
|
type: "button",
|
|
6454
6517
|
onClick: onDismiss,
|
|
6455
|
-
className: "
|
|
6456
|
-
"aria-label":
|
|
6457
|
-
children: /* @__PURE__ */
|
|
6518
|
+
className: "ms-2 opacity-70 hover:opacity-100",
|
|
6519
|
+
"aria-label": labels.dismiss,
|
|
6520
|
+
children: /* @__PURE__ */ jsx84("svg", { className: "h-4 w-4", viewBox: "0 0 20 20", fill: "currentColor", children: /* @__PURE__ */ jsx84("path", { fillRule: "evenodd", d: "M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z", clipRule: "evenodd" }) })
|
|
6458
6521
|
}
|
|
6459
6522
|
)
|
|
6460
6523
|
] })
|
|
@@ -6468,7 +6531,7 @@ AnnouncementBar.displayName = "AnnouncementBar";
|
|
|
6468
6531
|
// src/components/marketing/PromoBanner.tsx
|
|
6469
6532
|
import React56 from "react";
|
|
6470
6533
|
import { useAction as useAction6 } from "@40rty/ams-sdk";
|
|
6471
|
-
import { jsx as
|
|
6534
|
+
import { jsx as jsx85, jsxs as jsxs58 } from "react/jsx-runtime";
|
|
6472
6535
|
var PromoBanner = React56.forwardRef(
|
|
6473
6536
|
({ className, title, description, imageSrc, ctaLabel, ctaAction, layout = "horizontal", ...props }, ref) => {
|
|
6474
6537
|
const onCta = useAction6(ctaLabel ? ctaLabel : "", ctaAction);
|
|
@@ -6483,10 +6546,10 @@ var PromoBanner = React56.forwardRef(
|
|
|
6483
6546
|
),
|
|
6484
6547
|
...props,
|
|
6485
6548
|
children: [
|
|
6486
|
-
imageSrc && /* @__PURE__ */
|
|
6549
|
+
imageSrc && /* @__PURE__ */ jsx85("div", { className: cn(
|
|
6487
6550
|
"overflow-hidden",
|
|
6488
6551
|
layout === "horizontal" ? "sm:w-1/2" : "aspect-[2/1]"
|
|
6489
|
-
), children: /* @__PURE__ */
|
|
6552
|
+
), children: /* @__PURE__ */ jsx85(
|
|
6490
6553
|
"img",
|
|
6491
6554
|
{
|
|
6492
6555
|
src: imageSrc,
|
|
@@ -6498,9 +6561,9 @@ var PromoBanner = React56.forwardRef(
|
|
|
6498
6561
|
"flex flex-col justify-center p-6 sm:p-8",
|
|
6499
6562
|
layout === "horizontal" && "sm:w-1/2"
|
|
6500
6563
|
), children: [
|
|
6501
|
-
/* @__PURE__ */
|
|
6502
|
-
description && /* @__PURE__ */
|
|
6503
|
-
ctaLabel && /* @__PURE__ */
|
|
6564
|
+
/* @__PURE__ */ jsx85("h3", { className: "text-xl font-semibold text-[var(--fourty-color-text)] sm:text-2xl", children: title }),
|
|
6565
|
+
description && /* @__PURE__ */ jsx85("p", { className: "mt-2 text-[var(--fourty-color-text-subtle)]", children: description }),
|
|
6566
|
+
ctaLabel && /* @__PURE__ */ jsx85("div", { className: "mt-4", children: /* @__PURE__ */ jsx85(Button, { variant: "primary", onClick: onCta ? onCta : void 0, children: ctaLabel }) })
|
|
6504
6567
|
] })
|
|
6505
6568
|
]
|
|
6506
6569
|
}
|
|
@@ -6511,21 +6574,22 @@ PromoBanner.displayName = "PromoBanner";
|
|
|
6511
6574
|
|
|
6512
6575
|
// src/components/social/ReviewCard.tsx
|
|
6513
6576
|
import React57 from "react";
|
|
6514
|
-
import { jsx as
|
|
6577
|
+
import { jsx as jsx86, jsxs as jsxs59 } from "react/jsx-runtime";
|
|
6515
6578
|
function StarRating2({ rating }) {
|
|
6516
|
-
return /* @__PURE__ */
|
|
6579
|
+
return /* @__PURE__ */ jsx86("div", { className: "flex gap-0.5", children: Array.from({ length: 5 }).map((_, i) => /* @__PURE__ */ jsx86(
|
|
6517
6580
|
"svg",
|
|
6518
6581
|
{
|
|
6519
6582
|
className: cn("h-4 w-4", i < rating ? "text-amber-400" : "text-gray-200"),
|
|
6520
6583
|
fill: "currentColor",
|
|
6521
6584
|
viewBox: "0 0 20 20",
|
|
6522
|
-
children: /* @__PURE__ */
|
|
6585
|
+
children: /* @__PURE__ */ jsx86("path", { d: "M9.049 2.927c.3-.921 1.603-.921 1.902 0l1.07 3.292a1 1 0 00.95.69h3.462c.969 0 1.371 1.24.588 1.81l-2.8 2.034a1 1 0 00-.364 1.118l1.07 3.292c.3.921-.755 1.688-1.54 1.118l-2.8-2.034a1 1 0 00-1.175 0l-2.8 2.034c-.784.57-1.838-.197-1.539-1.118l1.07-3.292a1 1 0 00-.364-1.118L2.98 8.72c-.783-.57-.38-1.81.588-1.81h3.461a1 1 0 00.951-.69l1.07-3.292z" })
|
|
6523
6586
|
},
|
|
6524
6587
|
i
|
|
6525
6588
|
)) });
|
|
6526
6589
|
}
|
|
6527
6590
|
var ReviewCard = React57.forwardRef(
|
|
6528
6591
|
({ className, author, rating, text, date, verified = false, ...props }, ref) => {
|
|
6592
|
+
const labels = useLabels().reviews;
|
|
6529
6593
|
return /* @__PURE__ */ jsxs59(
|
|
6530
6594
|
"div",
|
|
6531
6595
|
{
|
|
@@ -6538,13 +6602,13 @@ var ReviewCard = React57.forwardRef(
|
|
|
6538
6602
|
children: [
|
|
6539
6603
|
/* @__PURE__ */ jsxs59("div", { className: "flex items-center justify-between", children: [
|
|
6540
6604
|
/* @__PURE__ */ jsxs59("div", { className: "flex items-center gap-2", children: [
|
|
6541
|
-
/* @__PURE__ */
|
|
6542
|
-
verified && /* @__PURE__ */
|
|
6605
|
+
/* @__PURE__ */ jsx86(StarRating2, { rating }),
|
|
6606
|
+
verified && /* @__PURE__ */ jsx86(Badge, { variant: "outline", children: labels.verified })
|
|
6543
6607
|
] }),
|
|
6544
|
-
/* @__PURE__ */
|
|
6608
|
+
/* @__PURE__ */ jsx86("span", { className: "text-xs text-[var(--fourty-color-text-subtle)]", children: date })
|
|
6545
6609
|
] }),
|
|
6546
|
-
/* @__PURE__ */
|
|
6547
|
-
/* @__PURE__ */
|
|
6610
|
+
/* @__PURE__ */ jsx86("p", { className: "text-sm text-[var(--fourty-color-text)]", children: text }),
|
|
6611
|
+
/* @__PURE__ */ jsx86("p", { className: "text-xs font-medium text-[var(--fourty-color-text-subtle)]", children: author })
|
|
6548
6612
|
]
|
|
6549
6613
|
}
|
|
6550
6614
|
);
|
|
@@ -6554,40 +6618,38 @@ ReviewCard.displayName = "ReviewCard";
|
|
|
6554
6618
|
|
|
6555
6619
|
// src/components/social/ReviewSummary.tsx
|
|
6556
6620
|
import React58 from "react";
|
|
6557
|
-
import { jsx as
|
|
6621
|
+
import { jsx as jsx87, jsxs as jsxs60 } from "react/jsx-runtime";
|
|
6558
6622
|
var ReviewSummary = React58.forwardRef(
|
|
6559
6623
|
({ className, averageRating, totalReviews, distribution, ...props }, ref) => {
|
|
6624
|
+
const labels = useLabels().rating;
|
|
6560
6625
|
return /* @__PURE__ */ jsxs60("div", { ref, className: cn("flex gap-8", className), ...props, children: [
|
|
6561
6626
|
/* @__PURE__ */ jsxs60("div", { className: "text-center", children: [
|
|
6562
|
-
/* @__PURE__ */
|
|
6563
|
-
/* @__PURE__ */
|
|
6627
|
+
/* @__PURE__ */ jsx87("p", { className: "text-4xl font-bold text-[var(--fourty-color-text)]", children: averageRating.toFixed(1) }),
|
|
6628
|
+
/* @__PURE__ */ jsx87("div", { className: "mt-1 flex justify-center gap-0.5", children: Array.from({ length: 5 }).map((_, i) => /* @__PURE__ */ jsx87(
|
|
6564
6629
|
"svg",
|
|
6565
6630
|
{
|
|
6566
6631
|
className: cn("h-4 w-4", i < Math.round(averageRating) ? "text-amber-400" : "text-gray-200"),
|
|
6567
6632
|
fill: "currentColor",
|
|
6568
6633
|
viewBox: "0 0 20 20",
|
|
6569
|
-
children: /* @__PURE__ */
|
|
6634
|
+
children: /* @__PURE__ */ jsx87("path", { d: "M9.049 2.927c.3-.921 1.603-.921 1.902 0l1.07 3.292a1 1 0 00.95.69h3.462c.969 0 1.371 1.24.588 1.81l-2.8 2.034a1 1 0 00-.364 1.118l1.07 3.292c.3.921-.755 1.688-1.54 1.118l-2.8-2.034a1 1 0 00-1.175 0l-2.8 2.034c-.784.57-1.838-.197-1.539-1.118l1.07-3.292a1 1 0 00-.364-1.118L2.98 8.72c-.783-.57-.38-1.81.588-1.81h3.461a1 1 0 00.951-.69l1.07-3.292z" })
|
|
6570
6635
|
},
|
|
6571
6636
|
i
|
|
6572
6637
|
)) }),
|
|
6573
|
-
/* @__PURE__ */
|
|
6574
|
-
totalReviews,
|
|
6575
|
-
" reviews"
|
|
6576
|
-
] })
|
|
6638
|
+
/* @__PURE__ */ jsx87("p", { className: "mt-1 text-sm text-[var(--fourty-color-text-subtle)]", children: labels.reviewsCount(totalReviews) })
|
|
6577
6639
|
] }),
|
|
6578
|
-
distribution && /* @__PURE__ */
|
|
6640
|
+
distribution && /* @__PURE__ */ jsx87("div", { className: "flex-1 space-y-1", children: [5, 4, 3, 2, 1].map((star) => {
|
|
6579
6641
|
const count = distribution[star] ?? 0;
|
|
6580
6642
|
const pct = totalReviews > 0 ? count / totalReviews * 100 : 0;
|
|
6581
6643
|
return /* @__PURE__ */ jsxs60("div", { className: "flex items-center gap-2 text-sm", children: [
|
|
6582
|
-
/* @__PURE__ */
|
|
6583
|
-
/* @__PURE__ */
|
|
6644
|
+
/* @__PURE__ */ jsx87("span", { className: "w-3 text-[var(--fourty-color-text-subtle)]", children: star }),
|
|
6645
|
+
/* @__PURE__ */ jsx87("div", { className: "h-2 flex-1 overflow-hidden rounded-full bg-[var(--fourty-color-bg-subtle)]", children: /* @__PURE__ */ jsx87(
|
|
6584
6646
|
"div",
|
|
6585
6647
|
{
|
|
6586
6648
|
className: "h-full rounded-full bg-amber-400",
|
|
6587
6649
|
style: { width: `${pct}%` }
|
|
6588
6650
|
}
|
|
6589
6651
|
) }),
|
|
6590
|
-
/* @__PURE__ */
|
|
6652
|
+
/* @__PURE__ */ jsx87("span", { className: "w-8 text-end text-xs text-[var(--fourty-color-text-subtle)]", children: count })
|
|
6591
6653
|
] }, star);
|
|
6592
6654
|
}) })
|
|
6593
6655
|
] });
|
|
@@ -6598,12 +6660,12 @@ ReviewSummary.displayName = "ReviewSummary";
|
|
|
6598
6660
|
// src/components/content/article/BlogCard.tsx
|
|
6599
6661
|
import React59 from "react";
|
|
6600
6662
|
import { Slot as Slot4 } from "@radix-ui/react-slot";
|
|
6601
|
-
import { jsx as
|
|
6663
|
+
import { jsx as jsx88, jsxs as jsxs61 } from "react/jsx-runtime";
|
|
6602
6664
|
var BlogCard = React59.forwardRef(
|
|
6603
6665
|
({ className, title, excerpt, imageSrc, imageAlt, date, author, asChild = false, ...props }, ref) => {
|
|
6604
6666
|
const Comp = asChild ? Slot4 : "div";
|
|
6605
6667
|
return /* @__PURE__ */ jsxs61(Comp, { ref, className: cn("group", className), ...props, children: [
|
|
6606
|
-
imageSrc && /* @__PURE__ */
|
|
6668
|
+
imageSrc && /* @__PURE__ */ jsx88("div", { className: "aspect-[16/9] overflow-hidden rounded-lg bg-[var(--fourty-color-bg-subtle)]", children: /* @__PURE__ */ jsx88(
|
|
6607
6669
|
"img",
|
|
6608
6670
|
{
|
|
6609
6671
|
src: imageSrc,
|
|
@@ -6618,8 +6680,8 @@ var BlogCard = React59.forwardRef(
|
|
|
6618
6680
|
date && author && " \xB7 ",
|
|
6619
6681
|
author
|
|
6620
6682
|
] }),
|
|
6621
|
-
/* @__PURE__ */
|
|
6622
|
-
excerpt && /* @__PURE__ */
|
|
6683
|
+
/* @__PURE__ */ jsx88("h3", { className: "text-lg font-medium text-[var(--fourty-color-text)] group-hover:underline", children: title }),
|
|
6684
|
+
excerpt && /* @__PURE__ */ jsx88("p", { className: "text-sm text-[var(--fourty-color-text-subtle)] line-clamp-2", children: excerpt })
|
|
6623
6685
|
] })
|
|
6624
6686
|
] });
|
|
6625
6687
|
}
|
|
@@ -6628,11 +6690,11 @@ BlogCard.displayName = "BlogCard";
|
|
|
6628
6690
|
|
|
6629
6691
|
// src/components/content/RichText.tsx
|
|
6630
6692
|
import React60 from "react";
|
|
6631
|
-
import { jsx as
|
|
6693
|
+
import { jsx as jsx89 } from "react/jsx-runtime";
|
|
6632
6694
|
var RichText = React60.forwardRef(
|
|
6633
6695
|
({ className, html, ...props }, ref) => {
|
|
6634
6696
|
const clean = sanitizeHtml(html);
|
|
6635
|
-
return /* @__PURE__ */
|
|
6697
|
+
return /* @__PURE__ */ jsx89(
|
|
6636
6698
|
"div",
|
|
6637
6699
|
{
|
|
6638
6700
|
ref,
|
|
@@ -6654,14 +6716,14 @@ RichText.displayName = "RichText";
|
|
|
6654
6716
|
|
|
6655
6717
|
// src/components/content/FeatureGrid.tsx
|
|
6656
6718
|
import React61 from "react";
|
|
6657
|
-
import { jsx as
|
|
6719
|
+
import { jsx as jsx90, jsxs as jsxs62 } from "react/jsx-runtime";
|
|
6658
6720
|
var FeatureGrid = React61.forwardRef(
|
|
6659
6721
|
({ className, features: featuresProp, columns = 3, ...props }, ref) => {
|
|
6660
6722
|
const features = Array.isArray(featuresProp) ? featuresProp : [];
|
|
6661
|
-
return /* @__PURE__ */
|
|
6662
|
-
feature.icon && /* @__PURE__ */
|
|
6663
|
-
/* @__PURE__ */
|
|
6664
|
-
/* @__PURE__ */
|
|
6723
|
+
return /* @__PURE__ */ jsx90(Grid, { ref, columns, gap: "lg", className: cn(className), ...props, children: features.map((feature, i) => /* @__PURE__ */ jsxs62("div", { className: "text-center", children: [
|
|
6724
|
+
feature.icon && /* @__PURE__ */ jsx90("div", { className: "mx-auto mb-3 flex h-12 w-12 items-center justify-center rounded-full bg-[var(--fourty-color-bg-subtle)] text-[var(--fourty-color-text)]", children: feature.icon }),
|
|
6725
|
+
/* @__PURE__ */ jsx90("h3", { className: "text-sm font-semibold text-[var(--fourty-color-text)]", children: feature.title }),
|
|
6726
|
+
/* @__PURE__ */ jsx90("p", { className: "mt-1 text-sm text-[var(--fourty-color-text-subtle)]", children: feature.description })
|
|
6665
6727
|
] }, i)) });
|
|
6666
6728
|
}
|
|
6667
6729
|
);
|
|
@@ -6672,13 +6734,13 @@ import React62 from "react";
|
|
|
6672
6734
|
|
|
6673
6735
|
// src/components/navigation/internal/HeaderLink.tsx
|
|
6674
6736
|
import { useAction as useAction7 } from "@40rty/ams-sdk";
|
|
6675
|
-
import { jsx as
|
|
6737
|
+
import { jsx as jsx91 } from "react/jsx-runtime";
|
|
6676
6738
|
function HeaderLink({
|
|
6677
6739
|
label,
|
|
6678
6740
|
action
|
|
6679
6741
|
}) {
|
|
6680
6742
|
const onClick = useAction7(label, action);
|
|
6681
|
-
return /* @__PURE__ */
|
|
6743
|
+
return /* @__PURE__ */ jsx91(
|
|
6682
6744
|
"button",
|
|
6683
6745
|
{
|
|
6684
6746
|
type: "button",
|
|
@@ -6690,11 +6752,12 @@ function HeaderLink({
|
|
|
6690
6752
|
}
|
|
6691
6753
|
|
|
6692
6754
|
// src/components/navigation/Header.tsx
|
|
6693
|
-
import { jsx as
|
|
6755
|
+
import { jsx as jsx92, jsxs as jsxs63 } from "react/jsx-runtime";
|
|
6694
6756
|
var Header = React62.forwardRef(
|
|
6695
6757
|
({ className, logo, links: linksProp, cartCount = 0, onCartClick, onSearchClick, ...props }, ref) => {
|
|
6696
6758
|
const links = Array.isArray(linksProp) ? linksProp : [];
|
|
6697
|
-
|
|
6759
|
+
const labels = useLabels();
|
|
6760
|
+
return /* @__PURE__ */ jsx92(
|
|
6698
6761
|
"header",
|
|
6699
6762
|
{
|
|
6700
6763
|
ref,
|
|
@@ -6703,18 +6766,18 @@ var Header = React62.forwardRef(
|
|
|
6703
6766
|
className
|
|
6704
6767
|
),
|
|
6705
6768
|
...props,
|
|
6706
|
-
children: /* @__PURE__ */
|
|
6707
|
-
/* @__PURE__ */
|
|
6708
|
-
links.length > 0 && /* @__PURE__ */
|
|
6769
|
+
children: /* @__PURE__ */ jsx92(Container, { children: /* @__PURE__ */ jsxs63("div", { className: "flex h-16 items-center justify-between", children: [
|
|
6770
|
+
/* @__PURE__ */ jsx92("div", { className: "flex-shrink-0", children: logo ?? /* @__PURE__ */ jsx92("span", { className: "text-lg font-bold text-[var(--fourty-color-text)]", children: labels.nav.storeFallback }) }),
|
|
6771
|
+
links.length > 0 && /* @__PURE__ */ jsx92("nav", { className: "hidden gap-8 md:flex", children: links.map((link, i) => /* @__PURE__ */ jsx92(HeaderLink, { label: link.label, action: link.action }, i)) }),
|
|
6709
6772
|
/* @__PURE__ */ jsxs63("div", { className: "flex items-center gap-4", children: [
|
|
6710
|
-
onSearchClick && /* @__PURE__ */
|
|
6773
|
+
onSearchClick && /* @__PURE__ */ jsx92(
|
|
6711
6774
|
"button",
|
|
6712
6775
|
{
|
|
6713
6776
|
type: "button",
|
|
6714
6777
|
onClick: onSearchClick,
|
|
6715
6778
|
className: "text-[var(--fourty-color-text-subtle)] hover:text-[var(--fourty-color-text)]",
|
|
6716
|
-
"aria-label":
|
|
6717
|
-
children: /* @__PURE__ */
|
|
6779
|
+
"aria-label": labels.nav.search,
|
|
6780
|
+
children: /* @__PURE__ */ jsx92("svg", { className: "h-5 w-5", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 1.5, children: /* @__PURE__ */ jsx92("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M21 21l-5.197-5.197m0 0A7.5 7.5 0 105.196 5.196a7.5 7.5 0 0010.607 10.607z" }) })
|
|
6718
6781
|
}
|
|
6719
6782
|
),
|
|
6720
6783
|
onCartClick && /* @__PURE__ */ jsxs63(
|
|
@@ -6723,10 +6786,10 @@ var Header = React62.forwardRef(
|
|
|
6723
6786
|
type: "button",
|
|
6724
6787
|
onClick: onCartClick,
|
|
6725
6788
|
className: "relative text-[var(--fourty-color-text-subtle)] hover:text-[var(--fourty-color-text)]",
|
|
6726
|
-
"aria-label":
|
|
6789
|
+
"aria-label": labels.cart.headerA11y,
|
|
6727
6790
|
children: [
|
|
6728
|
-
/* @__PURE__ */
|
|
6729
|
-
cartCount > 0 && /* @__PURE__ */
|
|
6791
|
+
/* @__PURE__ */ jsx92("svg", { className: "h-5 w-5", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 1.5, children: /* @__PURE__ */ jsx92("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M15.75 10.5V6a3.75 3.75 0 10-7.5 0v4.5m11.356-1.993l1.263 12c.07.665-.45 1.243-1.119 1.243H4.25a1.125 1.125 0 01-1.12-1.243l1.264-12A1.125 1.125 0 015.513 7.5h12.974c.576 0 1.059.435 1.119 1.007zM8.625 10.5a.375.375 0 11-.75 0 .375.375 0 01.75 0zm7.5 0a.375.375 0 11-.75 0 .375.375 0 01.75 0z" }) }),
|
|
6792
|
+
cartCount > 0 && /* @__PURE__ */ jsx92("span", { className: "absolute -end-1.5 -top-1.5 flex h-5 w-5 sm:h-4 sm:w-4 items-center justify-center rounded-full bg-[var(--fourty-color-primary)] text-[10px] font-medium text-white", children: cartCount > 99 ? "99+" : cartCount })
|
|
6730
6793
|
]
|
|
6731
6794
|
}
|
|
6732
6795
|
)
|
|
@@ -6743,29 +6806,29 @@ import React63 from "react";
|
|
|
6743
6806
|
|
|
6744
6807
|
// src/components/navigation/internal/FooterLink.tsx
|
|
6745
6808
|
import { useAction as useAction8 } from "@40rty/ams-sdk";
|
|
6746
|
-
import { jsx as
|
|
6809
|
+
import { jsx as jsx93 } from "react/jsx-runtime";
|
|
6747
6810
|
function FooterLink({
|
|
6748
6811
|
label,
|
|
6749
6812
|
action
|
|
6750
6813
|
}) {
|
|
6751
6814
|
const onClick = useAction8(label, action);
|
|
6752
|
-
return /* @__PURE__ */
|
|
6815
|
+
return /* @__PURE__ */ jsx93(
|
|
6753
6816
|
"button",
|
|
6754
6817
|
{
|
|
6755
6818
|
type: "button",
|
|
6756
6819
|
onClick: onClick ? onClick : void 0,
|
|
6757
|
-
className: "text-sm text-[var(--fourty-color-text-subtle)] hover:text-[var(--fourty-color-text)] text-
|
|
6820
|
+
className: "text-sm text-[var(--fourty-color-text-subtle)] hover:text-[var(--fourty-color-text)] text-start",
|
|
6758
6821
|
children: label
|
|
6759
6822
|
}
|
|
6760
6823
|
);
|
|
6761
6824
|
}
|
|
6762
6825
|
|
|
6763
6826
|
// src/components/navigation/Footer.tsx
|
|
6764
|
-
import { jsx as
|
|
6827
|
+
import { jsx as jsx94, jsxs as jsxs64 } from "react/jsx-runtime";
|
|
6765
6828
|
var Footer = React63.forwardRef(
|
|
6766
6829
|
({ className, columns: columnsProp, copyright, logo, ...props }, ref) => {
|
|
6767
6830
|
const columns = Array.isArray(columnsProp) ? columnsProp : [];
|
|
6768
|
-
return /* @__PURE__ */
|
|
6831
|
+
return /* @__PURE__ */ jsx94(
|
|
6769
6832
|
"footer",
|
|
6770
6833
|
{
|
|
6771
6834
|
ref,
|
|
@@ -6774,17 +6837,17 @@ var Footer = React63.forwardRef(
|
|
|
6774
6837
|
className
|
|
6775
6838
|
),
|
|
6776
6839
|
...props,
|
|
6777
|
-
children: /* @__PURE__ */
|
|
6778
|
-
columns.length > 0 && /* @__PURE__ */
|
|
6840
|
+
children: /* @__PURE__ */ jsx94(Container, { children: /* @__PURE__ */ jsxs64("div", { className: "py-12", children: [
|
|
6841
|
+
columns.length > 0 && /* @__PURE__ */ jsx94("div", { className: "grid grid-cols-2 gap-4 sm:gap-8 md:grid-cols-4", children: columns.map((col) => {
|
|
6779
6842
|
const colLinks = Array.isArray(col.links) ? col.links : [];
|
|
6780
6843
|
return /* @__PURE__ */ jsxs64("div", { children: [
|
|
6781
|
-
/* @__PURE__ */
|
|
6782
|
-
/* @__PURE__ */
|
|
6844
|
+
/* @__PURE__ */ jsx94("h4", { className: "text-sm font-semibold text-[var(--fourty-color-text)]", children: col.title }),
|
|
6845
|
+
/* @__PURE__ */ jsx94("ul", { className: "mt-3 space-y-2", children: colLinks.map((link, i) => /* @__PURE__ */ jsx94("li", { children: /* @__PURE__ */ jsx94(FooterLink, { label: link.label, action: link.action }) }, i)) })
|
|
6783
6846
|
] }, col.title);
|
|
6784
6847
|
}) }),
|
|
6785
6848
|
/* @__PURE__ */ jsxs64("div", { className: "mt-8 flex items-center justify-between border-t border-[var(--fourty-color-border)] pt-8", children: [
|
|
6786
6849
|
logo,
|
|
6787
|
-
copyright && /* @__PURE__ */
|
|
6850
|
+
copyright && /* @__PURE__ */ jsx94("p", { className: "text-sm text-[var(--fourty-color-text-subtle)]", children: copyright })
|
|
6788
6851
|
] })
|
|
6789
6852
|
] }) })
|
|
6790
6853
|
}
|
|
@@ -6798,13 +6861,13 @@ import React64 from "react";
|
|
|
6798
6861
|
|
|
6799
6862
|
// src/components/navigation/internal/BreadcrumbLink.tsx
|
|
6800
6863
|
import { useAction as useAction9 } from "@40rty/ams-sdk";
|
|
6801
|
-
import { jsx as
|
|
6864
|
+
import { jsx as jsx95 } from "react/jsx-runtime";
|
|
6802
6865
|
function BreadcrumbLink({
|
|
6803
6866
|
label,
|
|
6804
6867
|
action
|
|
6805
6868
|
}) {
|
|
6806
6869
|
const onClick = useAction9(label, action);
|
|
6807
|
-
return /* @__PURE__ */
|
|
6870
|
+
return /* @__PURE__ */ jsx95(
|
|
6808
6871
|
"button",
|
|
6809
6872
|
{
|
|
6810
6873
|
type: "button",
|
|
@@ -6816,25 +6879,26 @@ function BreadcrumbLink({
|
|
|
6816
6879
|
}
|
|
6817
6880
|
|
|
6818
6881
|
// src/components/navigation/Breadcrumbs.tsx
|
|
6819
|
-
import { jsx as
|
|
6882
|
+
import { jsx as jsx96, jsxs as jsxs65 } from "react/jsx-runtime";
|
|
6820
6883
|
var Breadcrumbs = React64.forwardRef(
|
|
6821
6884
|
({ className, items: itemsProp, ...props }, ref) => {
|
|
6885
|
+
const labels = useLabels().nav;
|
|
6822
6886
|
const items = Array.isArray(itemsProp) ? itemsProp : [];
|
|
6823
|
-
return /* @__PURE__ */
|
|
6824
|
-
index > 0 && /* @__PURE__ */
|
|
6825
|
-
index < items.length - 1 ? /* @__PURE__ */
|
|
6887
|
+
return /* @__PURE__ */ jsx96("nav", { ref, className: cn(className), "aria-label": labels.breadcrumb, ...props, children: /* @__PURE__ */ jsx96("ol", { className: "flex items-center gap-1.5 text-sm", children: items.map((item, index) => /* @__PURE__ */ jsxs65("li", { className: "flex items-center gap-1.5", children: [
|
|
6888
|
+
index > 0 && /* @__PURE__ */ jsx96("svg", { className: "h-3.5 w-3.5 text-[var(--fourty-color-text-subtle)]", viewBox: "0 0 20 20", fill: "currentColor", children: /* @__PURE__ */ jsx96("path", { fillRule: "evenodd", d: "M7.21 14.77a.75.75 0 01.02-1.06L11.168 10 7.23 6.29a.75.75 0 111.04-1.08l4.5 4.25a.75.75 0 010 1.08l-4.5 4.25a.75.75 0 01-1.06-.02z", clipRule: "evenodd" }) }),
|
|
6889
|
+
index < items.length - 1 ? /* @__PURE__ */ jsx96(BreadcrumbLink, { label: item.label, action: item.action }) : /* @__PURE__ */ jsx96("span", { className: "text-[var(--fourty-color-text)]", "aria-current": index === items.length - 1 ? "page" : void 0, children: item.label })
|
|
6826
6890
|
] }, index)) }) });
|
|
6827
6891
|
}
|
|
6828
6892
|
);
|
|
6829
6893
|
Breadcrumbs.displayName = "Breadcrumbs";
|
|
6830
6894
|
|
|
6831
6895
|
// src/components/chat/SuggestionCards.tsx
|
|
6832
|
-
import { jsx as
|
|
6896
|
+
import { jsx as jsx97, jsxs as jsxs66 } from "react/jsx-runtime";
|
|
6833
6897
|
function SuggestionCards({ suggestions, onAction }) {
|
|
6834
6898
|
const { heading, actions: actionsRaw } = suggestions;
|
|
6835
6899
|
const actions = Array.isArray(actionsRaw) ? actionsRaw : [];
|
|
6836
6900
|
return /* @__PURE__ */ jsxs66("div", { style: { padding: "8px 16px" }, children: [
|
|
6837
|
-
heading && /* @__PURE__ */
|
|
6901
|
+
heading && /* @__PURE__ */ jsx97(
|
|
6838
6902
|
"div",
|
|
6839
6903
|
{
|
|
6840
6904
|
style: {
|
|
@@ -6847,7 +6911,7 @@ function SuggestionCards({ suggestions, onAction }) {
|
|
|
6847
6911
|
children: heading
|
|
6848
6912
|
}
|
|
6849
6913
|
),
|
|
6850
|
-
/* @__PURE__ */
|
|
6914
|
+
/* @__PURE__ */ jsx97(
|
|
6851
6915
|
"div",
|
|
6852
6916
|
{
|
|
6853
6917
|
style: {
|
|
@@ -6855,7 +6919,7 @@ function SuggestionCards({ suggestions, onAction }) {
|
|
|
6855
6919
|
flexWrap: "wrap",
|
|
6856
6920
|
gap: 6
|
|
6857
6921
|
},
|
|
6858
|
-
children: actions.map((action) => /* @__PURE__ */
|
|
6922
|
+
children: actions.map((action) => /* @__PURE__ */ jsx97(
|
|
6859
6923
|
"button",
|
|
6860
6924
|
{
|
|
6861
6925
|
onClick: () => onAction(action),
|
|
@@ -6922,6 +6986,7 @@ export {
|
|
|
6922
6986
|
Dossier,
|
|
6923
6987
|
Drawer,
|
|
6924
6988
|
DrawerDockSlot,
|
|
6989
|
+
EN_LABELS,
|
|
6925
6990
|
ErrorBanner,
|
|
6926
6991
|
Eyebrow,
|
|
6927
6992
|
FAQ,
|
|
@@ -6931,10 +6996,12 @@ export {
|
|
|
6931
6996
|
FoldedRead,
|
|
6932
6997
|
Footer,
|
|
6933
6998
|
Grid,
|
|
6999
|
+
HE_LABELS,
|
|
6934
7000
|
Header,
|
|
6935
7001
|
HeroBanner,
|
|
6936
7002
|
HistoryMenu,
|
|
6937
7003
|
HydratedProductRail,
|
|
7004
|
+
HydrationNotice,
|
|
6938
7005
|
InlinePresenceRead,
|
|
6939
7006
|
Input,
|
|
6940
7007
|
LabelsProvider,
|
|
@@ -6981,6 +7048,7 @@ export {
|
|
|
6981
7048
|
formatMoney,
|
|
6982
7049
|
formatPrice,
|
|
6983
7050
|
htmlToText,
|
|
7051
|
+
labelsForLocale,
|
|
6984
7052
|
parseBaseShell,
|
|
6985
7053
|
presenceClass,
|
|
6986
7054
|
projectRowValues,
|
|
@@ -6995,9 +7063,11 @@ export {
|
|
|
6995
7063
|
useContainerWidth,
|
|
6996
7064
|
useIsSeedHome2 as useIsSeedHome,
|
|
6997
7065
|
useLabels,
|
|
7066
|
+
useLocale,
|
|
6998
7067
|
useMeasuredHeight,
|
|
6999
7068
|
useMediaQuery,
|
|
7000
7069
|
useReducedMotion2 as useReducedMotion,
|
|
7001
7070
|
useScrollLock,
|
|
7071
|
+
useTextDirection,
|
|
7002
7072
|
useVisibleFacts
|
|
7003
7073
|
};
|