@cimplify/sdk 0.67.0 → 0.69.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/advanced.d.mts +1 -1
- package/dist/advanced.d.ts +1 -1
- package/dist/advanced.js +20 -20
- package/dist/advanced.mjs +1 -1
- package/dist/{chunk-SSLFZPAI.js → chunk-5HAUJBOK.js} +35 -35
- package/dist/{chunk-FNK6UZOE.mjs → chunk-5UYNERYE.mjs} +2 -2
- package/dist/{chunk-SXGFJEME.js → chunk-I4MP2XZS.js} +73 -7
- package/dist/{chunk-JAPCAZN4.mjs → chunk-KNPE4WCQ.mjs} +1 -1
- package/dist/{chunk-FVGVJ4TC.mjs → chunk-O3ECKVOM.mjs} +73 -7
- package/dist/{chunk-QQMDEGAK.mjs → chunk-SOV4H6PQ.mjs} +177 -50
- package/dist/{chunk-SH6HJW4A.js → chunk-TBSDZN2W.js} +4 -4
- package/dist/{chunk-3QSW33RG.js → chunk-WCSAZRNC.js} +179 -49
- package/dist/{client-DVFQoDtI.d.ts → client-CO2s-kxY.d.ts} +57 -19
- package/dist/{client-CQlEWH5j.d.ts → client-DUpz-PGs.d.ts} +1 -1
- package/dist/{client-Dd82KQ_G.d.mts → client-DZ-nbVnb.d.mts} +1 -1
- package/dist/{client-ByI_3jfL.d.mts → client-K_n5ceLI.d.mts} +57 -19
- package/dist/index.d.mts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +89 -72
- package/dist/index.mjs +15 -10
- package/dist/mock/cli.mjs +73 -7
- package/dist/mock/library.js +73 -7
- package/dist/mock/library.mjs +73 -7
- package/dist/mock/msw.js +73 -7
- package/dist/mock/msw.mjs +73 -7
- package/dist/react.d.mts +197 -40
- package/dist/react.d.ts +197 -40
- package/dist/react.js +1241 -567
- package/dist/react.mjs +824 -155
- package/dist/server.d.mts +2 -2
- package/dist/server.d.ts +2 -2
- package/dist/server.js +7 -7
- package/dist/server.mjs +2 -2
- package/dist/{sign-in-RFuWZOgF.d.mts → sign-in-DQlIdqsi.d.mts} +8 -0
- package/dist/{sign-in-RFuWZOgF.d.ts → sign-in-DQlIdqsi.d.ts} +8 -0
- package/dist/styles.css +1 -1
- package/dist/testing/msw.js +2 -2
- package/dist/testing/msw.mjs +1 -1
- package/dist/testing/suite.d.mts +2 -2
- package/dist/testing/suite.d.ts +2 -2
- package/dist/testing/suite.js +23 -23
- package/dist/testing/suite.mjs +4 -4
- package/dist/testing.d.mts +17 -17
- package/dist/testing.d.ts +17 -17
- package/dist/testing.js +79 -79
- package/dist/testing.mjs +5 -5
- package/package.json +1 -1
- package/registry/index.json +0 -9
- package/registry/account.json +0 -15
package/dist/react.mjs
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { DURATION_UNIT, getVariantDisplayName, INPUT_FIELD_TYPE, PRODUCT_TYPE, resolveGallery, RENDER_HINT } from './chunk-E6T5VJMG.mjs';
|
|
3
3
|
export { getVariantDisplayName } from './chunk-E6T5VJMG.mjs';
|
|
4
|
-
import { createCimplifyClient } from './chunk-
|
|
5
|
-
import { ELEMENT_TYPES, EVENT_TYPES, startSignIn } from './chunk-
|
|
4
|
+
import { createCimplifyClient } from './chunk-KNPE4WCQ.mjs';
|
|
5
|
+
import { ELEMENT_TYPES, EVENT_TYPES, startSignIn } from './chunk-SOV4H6PQ.mjs';
|
|
6
6
|
import { formatPrice, parsePrice, getUnitPriceAtQuantity, isOnSale, getDiscountPercentage, getBasePrice, getPriceRange, formatPriceRange } from './chunk-TD3AY34U.mjs';
|
|
7
7
|
import { isSupportedCurrency } from './chunk-AMZXALF6.mjs';
|
|
8
8
|
import './chunk-3G6RQLXK.mjs';
|
|
9
|
-
import
|
|
9
|
+
import React14, { createContext, useRef, useState, useCallback, useEffect, useContext, useMemo, useId, useSyncExternalStore } from 'react';
|
|
10
10
|
import { jsx, Fragment, jsxs } from 'react/jsx-runtime';
|
|
11
11
|
import { clsx } from 'clsx';
|
|
12
12
|
import { twMerge } from 'tailwind-merge';
|
|
@@ -1427,14 +1427,14 @@ function CimplifyCheckout({
|
|
|
1427
1427
|
const resolvedCartRef = useRef(resolvedCart);
|
|
1428
1428
|
resolvedCartRef.current = resolvedCart;
|
|
1429
1429
|
const isDark = appearance?.theme === "dark";
|
|
1430
|
-
const emitStatus =
|
|
1430
|
+
const emitStatus = React14.useEffectEvent(
|
|
1431
1431
|
(nextStatus, context = {}) => {
|
|
1432
1432
|
setStatus(nextStatus);
|
|
1433
1433
|
setStatusText(context.display_text || "");
|
|
1434
1434
|
onStatusChange?.(nextStatus, context);
|
|
1435
1435
|
}
|
|
1436
1436
|
);
|
|
1437
|
-
const fireError =
|
|
1437
|
+
const fireError = React14.useEffectEvent(
|
|
1438
1438
|
(error) => {
|
|
1439
1439
|
onError?.(error);
|
|
1440
1440
|
}
|
|
@@ -1530,7 +1530,7 @@ function CimplifyCheckout({
|
|
|
1530
1530
|
activeCheckoutRef.current = null;
|
|
1531
1531
|
};
|
|
1532
1532
|
}, []);
|
|
1533
|
-
const handleSubmit =
|
|
1533
|
+
const handleSubmit = React14.useEffectEvent(async () => {
|
|
1534
1534
|
if (isSubmitting || isInitializing || !resolvedCartId) {
|
|
1535
1535
|
if (!resolvedCartId && !isInitializing) {
|
|
1536
1536
|
const message = "Your cart is empty. Add items before checkout.";
|
|
@@ -1657,100 +1657,6 @@ function CimplifyCheckout({
|
|
|
1657
1657
|
function cn(...inputs) {
|
|
1658
1658
|
return twMerge(clsx(inputs));
|
|
1659
1659
|
}
|
|
1660
|
-
var DEFAULT_LINK_URL = "https://link.cimplify.io";
|
|
1661
|
-
function CimplifyAccount({
|
|
1662
|
-
client: clientProp,
|
|
1663
|
-
linkUrl,
|
|
1664
|
-
section,
|
|
1665
|
-
businessId: businessIdProp,
|
|
1666
|
-
merchantName,
|
|
1667
|
-
appearance,
|
|
1668
|
-
onLogout,
|
|
1669
|
-
className
|
|
1670
|
-
}) {
|
|
1671
|
-
const context = useOptionalCimplify();
|
|
1672
|
-
const client = clientProp ?? context?.client;
|
|
1673
|
-
const resolvedLinkUrl = linkUrl || DEFAULT_LINK_URL;
|
|
1674
|
-
const resolvedBusinessId = businessIdProp || client?.getBusinessId?.() || "";
|
|
1675
|
-
const iframeRef = useRef(null);
|
|
1676
|
-
const [height, setHeight] = useState(400);
|
|
1677
|
-
const [isReady, setIsReady] = useState(false);
|
|
1678
|
-
const iframeSrc = useMemo(() => {
|
|
1679
|
-
const path = section ? `/elements/account/${section}` : "/elements/account";
|
|
1680
|
-
const url = new URL(path, resolvedLinkUrl);
|
|
1681
|
-
if (resolvedBusinessId) url.searchParams.set("businessId", resolvedBusinessId);
|
|
1682
|
-
return url.toString();
|
|
1683
|
-
}, [resolvedLinkUrl, section, resolvedBusinessId]);
|
|
1684
|
-
useEffect(() => {
|
|
1685
|
-
function handleMessage(event) {
|
|
1686
|
-
if (!event.data || typeof event.data !== "object") return;
|
|
1687
|
-
if (iframeRef.current?.contentWindow && event.source !== iframeRef.current.contentWindow) {
|
|
1688
|
-
return;
|
|
1689
|
-
}
|
|
1690
|
-
switch (event.data.type) {
|
|
1691
|
-
case "ready":
|
|
1692
|
-
setIsReady(true);
|
|
1693
|
-
if (typeof event.data.height === "number") {
|
|
1694
|
-
setHeight(event.data.height);
|
|
1695
|
-
}
|
|
1696
|
-
sendInit();
|
|
1697
|
-
break;
|
|
1698
|
-
case "height_change":
|
|
1699
|
-
if (typeof event.data.height === "number") {
|
|
1700
|
-
setHeight(event.data.height);
|
|
1701
|
-
}
|
|
1702
|
-
break;
|
|
1703
|
-
case "logout_complete":
|
|
1704
|
-
onLogout?.();
|
|
1705
|
-
break;
|
|
1706
|
-
}
|
|
1707
|
-
}
|
|
1708
|
-
window.addEventListener("message", handleMessage);
|
|
1709
|
-
return () => window.removeEventListener("message", handleMessage);
|
|
1710
|
-
}, [appearance, client, onLogout]);
|
|
1711
|
-
function sendInit() {
|
|
1712
|
-
const contentWindow = iframeRef.current?.contentWindow;
|
|
1713
|
-
if (!contentWindow) return;
|
|
1714
|
-
const token = client?.getAccessToken?.();
|
|
1715
|
-
contentWindow.postMessage(
|
|
1716
|
-
{
|
|
1717
|
-
type: "init",
|
|
1718
|
-
token: token ?? void 0,
|
|
1719
|
-
appearance: appearance ?? void 0,
|
|
1720
|
-
businessId: resolvedBusinessId || void 0,
|
|
1721
|
-
merchantName: merchantName ?? void 0
|
|
1722
|
-
},
|
|
1723
|
-
resolvedLinkUrl
|
|
1724
|
-
);
|
|
1725
|
-
}
|
|
1726
|
-
return /* @__PURE__ */ jsxs(
|
|
1727
|
-
"div",
|
|
1728
|
-
{
|
|
1729
|
-
"data-cimplify-account": true,
|
|
1730
|
-
className: cn("relative overflow-hidden", className),
|
|
1731
|
-
children: [
|
|
1732
|
-
!isReady && /* @__PURE__ */ jsx("div", { className: "flex items-center justify-center py-16", children: /* @__PURE__ */ jsx("div", { className: "w-6 h-6 border-2 border-border border-t-foreground rounded-full animate-spin" }) }),
|
|
1733
|
-
/* @__PURE__ */ jsx(
|
|
1734
|
-
"iframe",
|
|
1735
|
-
{
|
|
1736
|
-
ref: iframeRef,
|
|
1737
|
-
src: iframeSrc,
|
|
1738
|
-
style: {
|
|
1739
|
-
border: "none",
|
|
1740
|
-
width: "100%",
|
|
1741
|
-
height: `${height}px`,
|
|
1742
|
-
display: isReady ? "block" : "none",
|
|
1743
|
-
overflow: "hidden",
|
|
1744
|
-
background: "transparent"
|
|
1745
|
-
},
|
|
1746
|
-
allow: "geolocation",
|
|
1747
|
-
sandbox: "allow-scripts allow-same-origin allow-forms allow-popups allow-popups-to-escape-sandbox"
|
|
1748
|
-
}
|
|
1749
|
-
)
|
|
1750
|
-
]
|
|
1751
|
-
}
|
|
1752
|
-
);
|
|
1753
|
-
}
|
|
1754
1660
|
var BUTTON_BASE = "inline-flex items-center justify-center gap-2 font-semibold leading-none transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary/40 disabled:opacity-50 disabled:cursor-not-allowed [font-family:inherit] cursor-pointer rounded-[10px]";
|
|
1755
1661
|
var BUTTON_VARIANTS = {
|
|
1756
1662
|
primary: "bg-foreground text-background hover:bg-foreground/90",
|
|
@@ -1762,7 +1668,7 @@ var BUTTON_SIZES = {
|
|
|
1762
1668
|
sm: "px-[13px] py-[7px] text-[12.5px]",
|
|
1763
1669
|
md: "px-[18px] py-[10px] text-[13.5px]"
|
|
1764
1670
|
};
|
|
1765
|
-
var Button =
|
|
1671
|
+
var Button = React14.forwardRef(function Button2({ variant = "primary", size = "md", className, children, ...props }, ref) {
|
|
1766
1672
|
return /* @__PURE__ */ jsx(
|
|
1767
1673
|
"button",
|
|
1768
1674
|
{
|
|
@@ -1982,6 +1888,17 @@ function Toast({ title, description, onUndo, onDismiss, className }) {
|
|
|
1982
1888
|
}
|
|
1983
1889
|
);
|
|
1984
1890
|
}
|
|
1891
|
+
|
|
1892
|
+
// src/react/utils/avatar.ts
|
|
1893
|
+
function avatarGradient(seed) {
|
|
1894
|
+
let hash = 0;
|
|
1895
|
+
for (let i = 0; i < seed.length; i++) hash = (hash << 5) - hash + seed.charCodeAt(i) | 0;
|
|
1896
|
+
const hue = (Math.abs(hash) % 60 + 20) % 360;
|
|
1897
|
+
return `linear-gradient(135deg, oklch(0.78 0.10 ${hue}), oklch(0.55 0.16 ${hue - 8}))`;
|
|
1898
|
+
}
|
|
1899
|
+
function initials(name) {
|
|
1900
|
+
return name.trim().split(/\s+/).map((p) => p[0]).filter(Boolean).slice(0, 2).join("").toUpperCase();
|
|
1901
|
+
}
|
|
1985
1902
|
function AccountShell({ sidebar, children, className }) {
|
|
1986
1903
|
return /* @__PURE__ */ jsxs(
|
|
1987
1904
|
"div",
|
|
@@ -2016,15 +1933,6 @@ function AccountSidebar({ children, scopeNote, className }) {
|
|
|
2016
1933
|
}
|
|
2017
1934
|
);
|
|
2018
1935
|
}
|
|
2019
|
-
function avatarGradient(seed) {
|
|
2020
|
-
let hash = 0;
|
|
2021
|
-
for (let i = 0; i < seed.length; i++) hash = (hash << 5) - hash + seed.charCodeAt(i) | 0;
|
|
2022
|
-
const hue = (Math.abs(hash) % 60 + 20) % 360;
|
|
2023
|
-
return `linear-gradient(135deg, oklch(0.78 0.10 ${hue}), oklch(0.55 0.16 ${hue - 8}))`;
|
|
2024
|
-
}
|
|
2025
|
-
function initials(name) {
|
|
2026
|
-
return name.trim().split(/\s+/).map((p) => p[0]).filter(Boolean).slice(0, 2).join("").toUpperCase();
|
|
2027
|
-
}
|
|
2028
1936
|
function AccountIdentityStrip({
|
|
2029
1937
|
name,
|
|
2030
1938
|
email,
|
|
@@ -2541,6 +2449,560 @@ function ContextCard({ rows, className }) {
|
|
|
2541
2449
|
}
|
|
2542
2450
|
);
|
|
2543
2451
|
}
|
|
2452
|
+
function RiderAvatar({ rider, size }) {
|
|
2453
|
+
if (rider.photoUrl) {
|
|
2454
|
+
return /* @__PURE__ */ jsx(
|
|
2455
|
+
"img",
|
|
2456
|
+
{
|
|
2457
|
+
src: rider.photoUrl,
|
|
2458
|
+
alt: "",
|
|
2459
|
+
className: "rounded-full object-cover",
|
|
2460
|
+
style: { width: size, height: size }
|
|
2461
|
+
}
|
|
2462
|
+
);
|
|
2463
|
+
}
|
|
2464
|
+
return /* @__PURE__ */ jsx(
|
|
2465
|
+
"span",
|
|
2466
|
+
{
|
|
2467
|
+
"aria-hidden": true,
|
|
2468
|
+
className: "grid place-items-center rounded-full font-serif font-semibold text-white",
|
|
2469
|
+
style: { width: size, height: size, fontSize: size * 0.38, background: avatarGradient(rider.name) },
|
|
2470
|
+
children: initials(rider.name)
|
|
2471
|
+
}
|
|
2472
|
+
);
|
|
2473
|
+
}
|
|
2474
|
+
function RiderMeta({ rider }) {
|
|
2475
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
2476
|
+
/* @__PURE__ */ jsxs("div", { className: "flex min-w-0 items-center gap-2", children: [
|
|
2477
|
+
/* @__PURE__ */ jsx("span", { className: "truncate text-sm font-semibold text-foreground", children: rider.name }),
|
|
2478
|
+
rider.rating !== void 0 && /* @__PURE__ */ jsxs("span", { className: "shrink-0 text-xs font-semibold text-amber-500", children: [
|
|
2479
|
+
"\u2605 ",
|
|
2480
|
+
rider.rating.toFixed(1)
|
|
2481
|
+
] })
|
|
2482
|
+
] }),
|
|
2483
|
+
rider.vehicle && /* @__PURE__ */ jsx("div", { className: "truncate text-xs text-foreground/55", children: rider.vehicle })
|
|
2484
|
+
] });
|
|
2485
|
+
}
|
|
2486
|
+
function DotStep({ steps }) {
|
|
2487
|
+
const current = steps.find((s) => s.state === "current") ?? [...steps].reverse().find((s) => s.state === "done");
|
|
2488
|
+
return /* @__PURE__ */ jsxs("div", { className: "mt-3.5", children: [
|
|
2489
|
+
/* @__PURE__ */ jsx("div", { className: "flex items-center gap-1.5", children: steps.map((step, i) => /* @__PURE__ */ jsxs(React14.Fragment, { children: [
|
|
2490
|
+
i > 0 && /* @__PURE__ */ jsx(
|
|
2491
|
+
"span",
|
|
2492
|
+
{
|
|
2493
|
+
className: cn(
|
|
2494
|
+
"h-0.5 flex-1 rounded-full",
|
|
2495
|
+
steps[i - 1].state === "done" ? "bg-primary" : "bg-border"
|
|
2496
|
+
)
|
|
2497
|
+
}
|
|
2498
|
+
),
|
|
2499
|
+
/* @__PURE__ */ jsx(
|
|
2500
|
+
"span",
|
|
2501
|
+
{
|
|
2502
|
+
className: cn(
|
|
2503
|
+
"block size-[7px] shrink-0 rounded-full",
|
|
2504
|
+
step.state === "done" && "bg-primary",
|
|
2505
|
+
step.state === "current" && "bg-primary ring-4 ring-primary/15",
|
|
2506
|
+
step.state === "pending" && "bg-border"
|
|
2507
|
+
)
|
|
2508
|
+
}
|
|
2509
|
+
)
|
|
2510
|
+
] }, step.label)) }),
|
|
2511
|
+
current && /* @__PURE__ */ jsx("div", { className: "mt-2 truncate text-center text-[11.5px] font-semibold text-primary", children: current.label })
|
|
2512
|
+
] });
|
|
2513
|
+
}
|
|
2514
|
+
function DeliveryTracker({
|
|
2515
|
+
steps,
|
|
2516
|
+
statusLabel,
|
|
2517
|
+
etaLabel,
|
|
2518
|
+
rider,
|
|
2519
|
+
live,
|
|
2520
|
+
onTrackLive,
|
|
2521
|
+
onContactRider,
|
|
2522
|
+
variant = "card",
|
|
2523
|
+
className
|
|
2524
|
+
}) {
|
|
2525
|
+
return /* @__PURE__ */ jsx(
|
|
2526
|
+
"div",
|
|
2527
|
+
{
|
|
2528
|
+
"data-cimplify-delivery-tracker": true,
|
|
2529
|
+
"data-mode": live ? "live" : "steps",
|
|
2530
|
+
className: cn(
|
|
2531
|
+
"overflow-hidden",
|
|
2532
|
+
variant === "card" && "rounded-[var(--radius,12px)] border border-border/60 bg-card",
|
|
2533
|
+
className
|
|
2534
|
+
),
|
|
2535
|
+
children: live ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
2536
|
+
/* @__PURE__ */ jsxs("div", { className: "relative h-[216px] w-full overflow-hidden bg-muted", children: [
|
|
2537
|
+
live.map,
|
|
2538
|
+
/* @__PURE__ */ jsxs("div", { className: "absolute left-3 top-3 inline-flex items-center gap-1.5 rounded-full border border-border/40 bg-background/90 px-2.5 py-1 text-xs font-semibold shadow-sm backdrop-blur", children: [
|
|
2539
|
+
/* @__PURE__ */ jsx("span", { className: "relative size-[7px] rounded-full bg-emerald-500", children: /* @__PURE__ */ jsx("span", { className: "absolute inset-0 animate-ping rounded-full bg-emerald-500" }) }),
|
|
2540
|
+
"Live"
|
|
2541
|
+
] }),
|
|
2542
|
+
(live.etaLabel ?? etaLabel) && /* @__PURE__ */ jsx("div", { className: "absolute right-3 top-3 rounded-full bg-foreground px-3 py-1.5 text-xs font-semibold text-background shadow-lg", children: live.etaLabel ?? etaLabel })
|
|
2543
|
+
] }),
|
|
2544
|
+
rider && /* @__PURE__ */ jsxs("div", { className: "relative z-[2] -mt-6 mx-3.5 mb-3.5 rounded-2xl border border-border/60 bg-card p-3.5 shadow-[0_10px_30px_-16px_rgba(16,24,40,0.32)]", children: [
|
|
2545
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-3", children: [
|
|
2546
|
+
/* @__PURE__ */ jsxs("div", { className: "relative shrink-0", children: [
|
|
2547
|
+
/* @__PURE__ */ jsx(RiderAvatar, { rider, size: 46 }),
|
|
2548
|
+
/* @__PURE__ */ jsx("span", { className: "absolute -bottom-px -right-px size-3 rounded-full border-[2.5px] border-card bg-emerald-500" })
|
|
2549
|
+
] }),
|
|
2550
|
+
/* @__PURE__ */ jsx("div", { className: "min-w-0 flex-1", children: /* @__PURE__ */ jsx(RiderMeta, { rider }) }),
|
|
2551
|
+
(rider.etaLabel || rider.distanceLabel) && /* @__PURE__ */ jsxs("div", { className: "text-right", children: [
|
|
2552
|
+
rider.etaLabel && /* @__PURE__ */ jsx("div", { className: "text-[15px] font-semibold tabular-nums text-foreground", children: rider.etaLabel }),
|
|
2553
|
+
rider.distanceLabel && /* @__PURE__ */ jsx("div", { className: "text-[11.5px] text-foreground/55", children: rider.distanceLabel })
|
|
2554
|
+
] })
|
|
2555
|
+
] }),
|
|
2556
|
+
/* @__PURE__ */ jsxs("div", { className: "mt-3 flex gap-2", children: [
|
|
2557
|
+
/* @__PURE__ */ jsx(
|
|
2558
|
+
"button",
|
|
2559
|
+
{
|
|
2560
|
+
type: "button",
|
|
2561
|
+
onClick: onTrackLive,
|
|
2562
|
+
className: "h-10 flex-1 rounded-xl bg-primary text-sm font-semibold text-[var(--color-primary-foreground,#fff)] hover:brightness-105",
|
|
2563
|
+
children: "Track live"
|
|
2564
|
+
}
|
|
2565
|
+
),
|
|
2566
|
+
/* @__PURE__ */ jsx(
|
|
2567
|
+
"button",
|
|
2568
|
+
{
|
|
2569
|
+
type: "button",
|
|
2570
|
+
onClick: onContactRider,
|
|
2571
|
+
"aria-label": `Contact ${rider.name}`,
|
|
2572
|
+
className: "grid size-10 place-items-center rounded-xl border border-border bg-card text-foreground hover:bg-muted/50",
|
|
2573
|
+
children: /* @__PURE__ */ jsx("svg", { width: "18", height: "18", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "1.8", children: /* @__PURE__ */ jsx("path", { d: "M22 16.9v3a2 2 0 0 1-2.2 2 19.8 19.8 0 0 1-8.6-3 19.5 19.5 0 0 1-6-6 19.8 19.8 0 0 1-3-8.6A2 2 0 0 1 4.1 2h3a2 2 0 0 1 2 1.7c.1 1 .4 1.9.7 2.8a2 2 0 0 1-.5 2.1L8.1 9.9a16 16 0 0 0 6 6l1.3-1.2a2 2 0 0 1 2.1-.5c.9.3 1.8.6 2.8.7a2 2 0 0 1 1.7 2Z" }) })
|
|
2574
|
+
}
|
|
2575
|
+
)
|
|
2576
|
+
] }),
|
|
2577
|
+
/* @__PURE__ */ jsx(DotStep, { steps })
|
|
2578
|
+
] })
|
|
2579
|
+
] }) : /* @__PURE__ */ jsxs("div", { className: variant === "card" ? "p-4 sm:p-5" : "", children: [
|
|
2580
|
+
(statusLabel || etaLabel) && /* @__PURE__ */ jsxs("div", { className: "mb-4 flex items-center justify-between", children: [
|
|
2581
|
+
statusLabel && /* @__PURE__ */ jsxs("span", { className: "inline-flex items-center gap-1.5 rounded-full bg-amber-500/10 px-2.5 py-1 text-xs font-semibold text-amber-600", children: [
|
|
2582
|
+
/* @__PURE__ */ jsx("span", { className: "size-1.5 rounded-full bg-current" }),
|
|
2583
|
+
statusLabel
|
|
2584
|
+
] }),
|
|
2585
|
+
etaLabel && /* @__PURE__ */ jsx("span", { className: "text-[13px] font-semibold tabular-nums text-foreground", children: etaLabel })
|
|
2586
|
+
] }),
|
|
2587
|
+
/* @__PURE__ */ jsx("ol", { className: "relative ml-[9px] border-l-2 border-border", children: steps.map((step) => /* @__PURE__ */ jsxs("li", { className: "relative pb-4 pl-6 last:pb-0", children: [
|
|
2588
|
+
/* @__PURE__ */ jsxs(
|
|
2589
|
+
"span",
|
|
2590
|
+
{
|
|
2591
|
+
className: cn(
|
|
2592
|
+
"absolute -left-[9px] top-px grid size-[18px] place-items-center rounded-full border-2 bg-card",
|
|
2593
|
+
step.state === "done" && "border-primary bg-primary",
|
|
2594
|
+
step.state === "current" && "border-primary ring-4 ring-primary/15",
|
|
2595
|
+
step.state === "pending" && "border-border"
|
|
2596
|
+
),
|
|
2597
|
+
children: [
|
|
2598
|
+
step.state === "done" && /* @__PURE__ */ jsx("svg", { width: "10", height: "10", viewBox: "0 0 24 24", fill: "none", stroke: "#fff", strokeWidth: "3.5", children: /* @__PURE__ */ jsx("path", { d: "M20 6 9 17l-5-5" }) }),
|
|
2599
|
+
step.state === "current" && /* @__PURE__ */ jsx("span", { className: "size-[7px] rounded-full bg-primary" })
|
|
2600
|
+
]
|
|
2601
|
+
}
|
|
2602
|
+
),
|
|
2603
|
+
/* @__PURE__ */ jsx(
|
|
2604
|
+
"div",
|
|
2605
|
+
{
|
|
2606
|
+
className: cn(
|
|
2607
|
+
"text-[13px] font-semibold",
|
|
2608
|
+
step.state === "pending" ? "text-foreground/45" : "text-foreground"
|
|
2609
|
+
),
|
|
2610
|
+
children: step.label
|
|
2611
|
+
}
|
|
2612
|
+
),
|
|
2613
|
+
step.time && /* @__PURE__ */ jsx("div", { className: "text-xs text-foreground/55", children: step.time })
|
|
2614
|
+
] }, step.label)) }),
|
|
2615
|
+
rider && /* @__PURE__ */ jsxs("div", { className: "mt-1 flex items-center gap-3 border-t border-border/60 pt-4", children: [
|
|
2616
|
+
/* @__PURE__ */ jsx(RiderAvatar, { rider, size: 42 }),
|
|
2617
|
+
/* @__PURE__ */ jsx("div", { className: "min-w-0 flex-1", children: /* @__PURE__ */ jsx(RiderMeta, { rider }) }),
|
|
2618
|
+
/* @__PURE__ */ jsx(
|
|
2619
|
+
"button",
|
|
2620
|
+
{
|
|
2621
|
+
type: "button",
|
|
2622
|
+
onClick: onContactRider,
|
|
2623
|
+
className: "h-9 rounded-[10px] border border-border bg-card px-4 text-[13px] font-semibold text-foreground hover:bg-muted/50",
|
|
2624
|
+
children: "Contact"
|
|
2625
|
+
}
|
|
2626
|
+
)
|
|
2627
|
+
] })
|
|
2628
|
+
] })
|
|
2629
|
+
}
|
|
2630
|
+
);
|
|
2631
|
+
}
|
|
2632
|
+
var STATE_TONE = {
|
|
2633
|
+
preparing: "text-amber-600",
|
|
2634
|
+
ready: "text-emerald-600",
|
|
2635
|
+
delivered: "text-emerald-600",
|
|
2636
|
+
booked: "text-primary",
|
|
2637
|
+
cancelled: "text-destructive",
|
|
2638
|
+
default: "text-foreground/55"
|
|
2639
|
+
};
|
|
2640
|
+
function StateDot({ label, tone = "default" }) {
|
|
2641
|
+
return /* @__PURE__ */ jsxs("span", { className: cn("inline-flex items-center gap-1.5 text-xs font-medium", STATE_TONE[tone]), children: [
|
|
2642
|
+
/* @__PURE__ */ jsx("span", { className: "size-1.5 rounded-full bg-current" }),
|
|
2643
|
+
label
|
|
2644
|
+
] });
|
|
2645
|
+
}
|
|
2646
|
+
var TYPE_GLYPH = {
|
|
2647
|
+
product: null,
|
|
2648
|
+
bundle: null,
|
|
2649
|
+
composite: null,
|
|
2650
|
+
service: /* @__PURE__ */ jsxs("svg", { width: "19", height: "19", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "1.6", children: [
|
|
2651
|
+
/* @__PURE__ */ jsx("rect", { x: "3", y: "4", width: "18", height: "17", rx: "2" }),
|
|
2652
|
+
/* @__PURE__ */ jsx("path", { d: "M3 9h18M8 2v4M16 2v4" })
|
|
2653
|
+
] }),
|
|
2654
|
+
digital: /* @__PURE__ */ jsxs("svg", { width: "19", height: "19", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "1.6", children: [
|
|
2655
|
+
/* @__PURE__ */ jsx("path", { d: "M4 4h11l5 5v11a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1Z" }),
|
|
2656
|
+
/* @__PURE__ */ jsx("path", { d: "M14 4v5h5" })
|
|
2657
|
+
] })
|
|
2658
|
+
};
|
|
2659
|
+
function Thumb({ item }) {
|
|
2660
|
+
const glyph = item.lineType ? TYPE_GLYPH[item.lineType] : null;
|
|
2661
|
+
return /* @__PURE__ */ jsx("div", { className: "mt-px size-[46px] shrink-0 overflow-hidden rounded-[10px] bg-muted/50", children: item.imageUrl ? /* @__PURE__ */ jsx("img", { src: item.imageUrl, alt: "", className: "size-full object-cover" }) : /* @__PURE__ */ jsx("div", { className: "grid size-full place-items-center text-foreground/35", children: glyph }) });
|
|
2662
|
+
}
|
|
2663
|
+
function AccountLineItem({ item, className }) {
|
|
2664
|
+
const [open, setOpen] = useState(false);
|
|
2665
|
+
const subtitle = item.subtitle ?? ([item.variant, item.addOns?.length ? `+ ${item.addOns.map((a) => a.name).join(", ")}` : null].filter(Boolean).join(" \xB7 ") || void 0);
|
|
2666
|
+
const hasDetail = !!item.customerInputs?.length || !!item.includes?.length || !!item.customisations?.length;
|
|
2667
|
+
return /* @__PURE__ */ jsx("div", { "data-cimplify-line-item": true, "data-type": item.lineType, className: cn("py-[15px]", className), children: /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-[46px_minmax(0,1fr)_auto] items-start gap-x-[13px]", children: [
|
|
2668
|
+
/* @__PURE__ */ jsx(Thumb, { item }),
|
|
2669
|
+
/* @__PURE__ */ jsxs("div", { className: "min-w-0", children: [
|
|
2670
|
+
/* @__PURE__ */ jsx("div", { className: "text-sm font-semibold leading-tight tracking-[-0.01em] text-foreground", children: item.name }),
|
|
2671
|
+
subtitle && /* @__PURE__ */ jsx("div", { className: "mt-0.5 text-[12.5px] text-foreground/55", children: subtitle }),
|
|
2672
|
+
item.scheduling && /* @__PURE__ */ jsxs("div", { className: "mt-0.5 text-[12.5px] text-foreground/55", children: [
|
|
2673
|
+
item.scheduling.whenLabel,
|
|
2674
|
+
item.scheduling.staffName && ` \xB7 with ${item.scheduling.staffName}`
|
|
2675
|
+
] }),
|
|
2676
|
+
(item.stateLabel || item.scheduling?.confirmationCode || hasDetail || item.digital) && /* @__PURE__ */ jsxs("div", { className: "mt-2 flex flex-wrap items-center gap-x-3 gap-y-1.5", children: [
|
|
2677
|
+
item.stateLabel && /* @__PURE__ */ jsx(StateDot, { label: item.stateLabel, tone: item.stateTone }),
|
|
2678
|
+
item.scheduling?.confirmationCode && /* @__PURE__ */ jsxs("span", { className: "text-xs text-foreground/45", children: [
|
|
2679
|
+
"#",
|
|
2680
|
+
item.scheduling.confirmationCode
|
|
2681
|
+
] }),
|
|
2682
|
+
item.digital && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
2683
|
+
/* @__PURE__ */ jsx(
|
|
2684
|
+
StateDot,
|
|
2685
|
+
{
|
|
2686
|
+
label: item.digital.statusLabel,
|
|
2687
|
+
tone: item.digital.tone === "revoked" ? "cancelled" : "ready"
|
|
2688
|
+
}
|
|
2689
|
+
),
|
|
2690
|
+
item.digital.usageSummary && /* @__PURE__ */ jsx("span", { className: "text-[11.5px] text-foreground/55", children: item.digital.usageSummary }),
|
|
2691
|
+
item.digital.onDownload && /* @__PURE__ */ jsxs(
|
|
2692
|
+
"button",
|
|
2693
|
+
{
|
|
2694
|
+
type: "button",
|
|
2695
|
+
onClick: item.digital.onDownload,
|
|
2696
|
+
className: "inline-flex items-center gap-1.5 text-xs font-semibold text-primary hover:underline",
|
|
2697
|
+
children: [
|
|
2698
|
+
/* @__PURE__ */ jsx("svg", { width: "13", height: "13", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", children: /* @__PURE__ */ jsx("path", { d: "M12 3v12m0 0 4-4m-4 4-4-4M5 21h14" }) }),
|
|
2699
|
+
"Download"
|
|
2700
|
+
]
|
|
2701
|
+
}
|
|
2702
|
+
)
|
|
2703
|
+
] }),
|
|
2704
|
+
hasDetail && /* @__PURE__ */ jsxs(
|
|
2705
|
+
"button",
|
|
2706
|
+
{
|
|
2707
|
+
type: "button",
|
|
2708
|
+
onClick: () => setOpen((v) => !v),
|
|
2709
|
+
"aria-expanded": open,
|
|
2710
|
+
className: "inline-flex items-center gap-1.5 text-[12.5px] font-semibold text-foreground/55 hover:text-foreground",
|
|
2711
|
+
children: [
|
|
2712
|
+
/* @__PURE__ */ jsx(
|
|
2713
|
+
"svg",
|
|
2714
|
+
{
|
|
2715
|
+
width: "13",
|
|
2716
|
+
height: "13",
|
|
2717
|
+
viewBox: "0 0 24 24",
|
|
2718
|
+
fill: "none",
|
|
2719
|
+
stroke: "currentColor",
|
|
2720
|
+
strokeWidth: "2",
|
|
2721
|
+
className: cn("transition-transform", open && "rotate-90"),
|
|
2722
|
+
children: /* @__PURE__ */ jsx("path", { d: "m9 18 6-6-6-6" })
|
|
2723
|
+
}
|
|
2724
|
+
),
|
|
2725
|
+
item.customisations?.length || item.customerInputs?.length ? "Customisations & details" : "What's included"
|
|
2726
|
+
]
|
|
2727
|
+
}
|
|
2728
|
+
)
|
|
2729
|
+
] }),
|
|
2730
|
+
open && hasDetail && /* @__PURE__ */ jsx(LineItemDetails, { item, className: "ml-[1px] mt-2.5" })
|
|
2731
|
+
] }),
|
|
2732
|
+
/* @__PURE__ */ jsx("div", { className: "text-sm font-semibold tabular-nums text-foreground", children: item.priceLabel })
|
|
2733
|
+
] }) });
|
|
2734
|
+
}
|
|
2735
|
+
function ChildRow({ sel }) {
|
|
2736
|
+
return /* @__PURE__ */ jsxs("div", { className: "flex items-baseline gap-2 py-1.5 [&:not(:first-child)]:border-t [&:not(:first-child)]:border-border/50", children: [
|
|
2737
|
+
/* @__PURE__ */ jsxs("span", { className: "shrink-0 text-[11px] font-semibold tabular-nums text-foreground/55", children: [
|
|
2738
|
+
sel.quantity ?? 1,
|
|
2739
|
+
"\xD7"
|
|
2740
|
+
] }),
|
|
2741
|
+
/* @__PURE__ */ jsxs("div", { className: "min-w-0 flex-1", children: [
|
|
2742
|
+
/* @__PURE__ */ jsx("div", { className: "text-[12.5px] font-medium text-foreground", children: sel.name }),
|
|
2743
|
+
sel.variantName && /* @__PURE__ */ jsx("div", { className: "text-[11px] text-foreground/55", children: sel.variantName })
|
|
2744
|
+
] }),
|
|
2745
|
+
sel.priceLabel && /* @__PURE__ */ jsx("span", { className: "shrink-0 text-[11.5px] tabular-nums text-foreground/55", children: sel.priceLabel })
|
|
2746
|
+
] });
|
|
2747
|
+
}
|
|
2748
|
+
function LineItemDetails({
|
|
2749
|
+
item,
|
|
2750
|
+
className
|
|
2751
|
+
}) {
|
|
2752
|
+
return /* @__PURE__ */ jsxs("div", { className: cn("space-y-3", className), children: [
|
|
2753
|
+
item.includes && item.includes.length > 0 && /* @__PURE__ */ jsxs("div", { children: [
|
|
2754
|
+
/* @__PURE__ */ jsx("div", { className: "mb-1 text-[10px] font-bold uppercase tracking-wider text-foreground/45", children: "Bundle includes" }),
|
|
2755
|
+
item.includes.map((sel, i) => /* @__PURE__ */ jsx(ChildRow, { sel }, i))
|
|
2756
|
+
] }),
|
|
2757
|
+
item.customisations && item.customisations.length > 0 && /* @__PURE__ */ jsxs("div", { children: [
|
|
2758
|
+
/* @__PURE__ */ jsx("div", { className: "mb-1 text-[10px] font-bold uppercase tracking-wider text-foreground/45", children: "Customisations" }),
|
|
2759
|
+
item.customisations.map((sel, i) => /* @__PURE__ */ jsx(ChildRow, { sel }, i))
|
|
2760
|
+
] }),
|
|
2761
|
+
item.customerInputs && item.customerInputs.length > 0 && /* @__PURE__ */ jsx("div", { className: "grid grid-cols-[84px_minmax(0,1fr)] items-start gap-x-2.5 gap-y-1 text-xs sm:grid-cols-[104px_minmax(0,1fr)]", children: item.customerInputs.map((input) => /* @__PURE__ */ jsxs(React14.Fragment, { children: [
|
|
2762
|
+
/* @__PURE__ */ jsx("span", { className: "capitalize text-foreground/55", children: input.fieldName }),
|
|
2763
|
+
/* @__PURE__ */ jsx(CustomerInputValue, { input })
|
|
2764
|
+
] }, input.fieldId)) })
|
|
2765
|
+
] });
|
|
2766
|
+
}
|
|
2767
|
+
function asObject(v) {
|
|
2768
|
+
return v && typeof v === "object" && !Array.isArray(v) ? v : null;
|
|
2769
|
+
}
|
|
2770
|
+
function CustomerInputValue({ input }) {
|
|
2771
|
+
const v = input.value;
|
|
2772
|
+
const obj = asObject(v);
|
|
2773
|
+
if (input.semanticKind === "allergen" || input.semanticKind === "sensitivity") {
|
|
2774
|
+
return /* @__PURE__ */ jsxs("span", { className: "inline-flex items-center gap-1.5 font-medium text-amber-600", children: [
|
|
2775
|
+
/* @__PURE__ */ jsx("svg", { width: "12", height: "12", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", children: /* @__PURE__ */ jsx("path", { d: "M12 9v4M12 17h.01M10.3 3.9 1.8 18a2 2 0 0 0 1.7 3h17a2 2 0 0 0 1.7-3L13.7 3.9a2 2 0 0 0-3.4 0Z" }) }),
|
|
2776
|
+
String(v ?? "")
|
|
2777
|
+
] });
|
|
2778
|
+
}
|
|
2779
|
+
switch (input.fieldType) {
|
|
2780
|
+
case "textarea":
|
|
2781
|
+
return /* @__PURE__ */ jsx("span", { className: "block whitespace-pre-wrap rounded-md bg-muted/40 px-2.5 py-1.5 leading-relaxed text-foreground/90", children: String(v ?? "") });
|
|
2782
|
+
case "number":
|
|
2783
|
+
return /* @__PURE__ */ jsx("span", { className: "font-semibold tabular-nums text-foreground", children: String(v ?? "") });
|
|
2784
|
+
case "select":
|
|
2785
|
+
case "radio":
|
|
2786
|
+
return /* @__PURE__ */ jsx("span", { className: "inline-flex w-fit items-center rounded-full border border-primary/20 bg-primary/[0.12] px-2 py-0.5 text-[11.5px] font-medium text-primary", children: String(v ?? "") });
|
|
2787
|
+
case "multi_select":
|
|
2788
|
+
case "checkbox": {
|
|
2789
|
+
if (typeof v === "boolean") return /* @__PURE__ */ jsx(BooleanBadge, { value: v });
|
|
2790
|
+
const list = Array.isArray(v) ? v.map(String) : [String(v ?? "")];
|
|
2791
|
+
return /* @__PURE__ */ jsx("span", { className: "flex flex-wrap gap-1", children: list.filter(Boolean).map((label, i) => /* @__PURE__ */ jsx("span", { className: "inline-flex items-center rounded-full border border-border bg-muted/40 px-2 py-0.5 text-[11px] font-medium", children: label }, i)) });
|
|
2792
|
+
}
|
|
2793
|
+
case "color": {
|
|
2794
|
+
const hex = String(v ?? "");
|
|
2795
|
+
const label = obj?.label ? String(obj.label) : hex;
|
|
2796
|
+
return /* @__PURE__ */ jsxs("span", { className: "inline-flex items-center gap-1.5 font-medium text-foreground", children: [
|
|
2797
|
+
/* @__PURE__ */ jsx("span", { className: "inline-block size-3.5 rounded-full border border-black/10", style: { background: hex } }),
|
|
2798
|
+
label,
|
|
2799
|
+
hex && hex !== label && /* @__PURE__ */ jsx("span", { className: "font-mono text-[11px] text-foreground/55", children: hex })
|
|
2800
|
+
] });
|
|
2801
|
+
}
|
|
2802
|
+
case "date":
|
|
2803
|
+
case "date_time":
|
|
2804
|
+
case "time":
|
|
2805
|
+
return /* @__PURE__ */ jsx("span", { className: "font-medium tabular-nums text-foreground", children: String(v ?? "") });
|
|
2806
|
+
case "date_range": {
|
|
2807
|
+
return /* @__PURE__ */ jsxs("span", { className: "inline-flex items-center gap-1.5 font-medium tabular-nums text-foreground", children: [
|
|
2808
|
+
/* @__PURE__ */ jsx("span", { children: String(obj?.start ?? "") }),
|
|
2809
|
+
/* @__PURE__ */ jsx("span", { className: "text-foreground/55", children: "\u2192" }),
|
|
2810
|
+
/* @__PURE__ */ jsx("span", { children: String(obj?.end ?? "") })
|
|
2811
|
+
] });
|
|
2812
|
+
}
|
|
2813
|
+
case "file": {
|
|
2814
|
+
const url = String(v ?? "");
|
|
2815
|
+
const filename = url.split("/").pop() || "Attachment";
|
|
2816
|
+
return /* @__PURE__ */ jsxs(
|
|
2817
|
+
"a",
|
|
2818
|
+
{
|
|
2819
|
+
href: url,
|
|
2820
|
+
target: "_blank",
|
|
2821
|
+
rel: "noopener noreferrer",
|
|
2822
|
+
className: "inline-flex w-fit max-w-full items-center gap-1.5 rounded-md border border-border bg-muted/40 px-2 py-1 text-foreground hover:border-primary hover:text-primary",
|
|
2823
|
+
children: [
|
|
2824
|
+
/* @__PURE__ */ jsx("svg", { width: "12", height: "12", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "1.8", children: /* @__PURE__ */ jsx("path", { d: "M14 3v5h5M15 3H7a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V8Z" }) }),
|
|
2825
|
+
/* @__PURE__ */ jsx("span", { className: "truncate text-[11.5px] font-medium", children: filename })
|
|
2826
|
+
]
|
|
2827
|
+
}
|
|
2828
|
+
);
|
|
2829
|
+
}
|
|
2830
|
+
case "image": {
|
|
2831
|
+
const url = typeof v === "string" ? v : "";
|
|
2832
|
+
if (!url) return /* @__PURE__ */ jsx("span", { className: "italic text-foreground/55", children: "No image" });
|
|
2833
|
+
return /* @__PURE__ */ jsx("a", { href: url, target: "_blank", rel: "noopener noreferrer", className: "block size-14 overflow-hidden rounded-md border border-border", children: /* @__PURE__ */ jsx("img", { src: url, alt: input.fieldName, className: "size-full object-cover" }) });
|
|
2834
|
+
}
|
|
2835
|
+
case "url": {
|
|
2836
|
+
const url = String(v ?? "");
|
|
2837
|
+
return /* @__PURE__ */ jsx("a", { href: url, target: "_blank", rel: "noopener noreferrer", className: "inline-flex max-w-full items-center gap-1 truncate text-primary hover:underline", children: url.replace(/^https?:\/\//, "").replace(/\/$/, "") });
|
|
2838
|
+
}
|
|
2839
|
+
case "email":
|
|
2840
|
+
return /* @__PURE__ */ jsx("a", { href: `mailto:${String(v ?? "")}`, className: "text-primary hover:underline", children: String(v ?? "") });
|
|
2841
|
+
case "phone": {
|
|
2842
|
+
const display = obj?.formatted ? String(obj.formatted) : String(v ?? "");
|
|
2843
|
+
return /* @__PURE__ */ jsx("a", { href: `tel:${display}`, className: "tabular-nums text-primary hover:underline", children: display });
|
|
2844
|
+
}
|
|
2845
|
+
case "address": {
|
|
2846
|
+
const formatted = obj?.formatted_address ? String(obj.formatted_address) : String(v ?? "");
|
|
2847
|
+
return /* @__PURE__ */ jsx("span", { className: "block whitespace-pre-line rounded-md bg-muted/40 px-2.5 py-1.5 text-[11.5px] leading-relaxed", children: formatted });
|
|
2848
|
+
}
|
|
2849
|
+
case "location": {
|
|
2850
|
+
const label = obj?.label ? String(obj.label) : null;
|
|
2851
|
+
const lat = obj?.latitude;
|
|
2852
|
+
const lng = obj?.longitude;
|
|
2853
|
+
return /* @__PURE__ */ jsxs("span", { className: "inline-flex items-center gap-1.5 font-medium text-foreground", children: [
|
|
2854
|
+
/* @__PURE__ */ jsxs("svg", { width: "12", height: "12", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", className: "text-destructive", children: [
|
|
2855
|
+
/* @__PURE__ */ jsx("path", { d: "M12 21s-7-5.5-7-11a7 7 0 0 1 14 0c0 5.5-7 11-7 11Z" }),
|
|
2856
|
+
/* @__PURE__ */ jsx("circle", { cx: "12", cy: "10", r: "2.5" })
|
|
2857
|
+
] }),
|
|
2858
|
+
label ?? `${lat ?? "?"}, ${lng ?? "?"}`
|
|
2859
|
+
] });
|
|
2860
|
+
}
|
|
2861
|
+
case "signature": {
|
|
2862
|
+
const signer = obj?.signer_name ? String(obj.signer_name) : null;
|
|
2863
|
+
return /* @__PURE__ */ jsxs("span", { className: "inline-flex w-fit items-center gap-1 rounded-full border border-emerald-500/20 bg-emerald-500/[0.12] px-2 py-0.5 text-[11px] font-semibold text-emerald-600", children: [
|
|
2864
|
+
/* @__PURE__ */ jsx("svg", { width: "12", height: "12", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "3", children: /* @__PURE__ */ jsx("path", { d: "M20 6 9 17l-5-5" }) }),
|
|
2865
|
+
signer ? `Signed by ${signer}` : "Signed"
|
|
2866
|
+
] });
|
|
2867
|
+
}
|
|
2868
|
+
case "text":
|
|
2869
|
+
default:
|
|
2870
|
+
return /* @__PURE__ */ jsxs("span", { className: "italic text-foreground/90", children: [
|
|
2871
|
+
"\u201C",
|
|
2872
|
+
String(v ?? ""),
|
|
2873
|
+
"\u201D"
|
|
2874
|
+
] });
|
|
2875
|
+
}
|
|
2876
|
+
}
|
|
2877
|
+
function BooleanBadge({ value }) {
|
|
2878
|
+
return value ? /* @__PURE__ */ jsxs("span", { className: "inline-flex w-fit items-center gap-1 rounded-full border border-emerald-500/20 bg-emerald-500/[0.12] px-2 py-0.5 text-[11px] font-semibold text-emerald-600", children: [
|
|
2879
|
+
/* @__PURE__ */ jsx("svg", { width: "12", height: "12", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "3", children: /* @__PURE__ */ jsx("path", { d: "M20 6 9 17l-5-5" }) }),
|
|
2880
|
+
"Yes"
|
|
2881
|
+
] }) : /* @__PURE__ */ jsx("span", { className: "inline-flex w-fit items-center rounded-full bg-muted/40 px-2 py-0.5 text-[11px] font-medium text-foreground/55", children: "No" });
|
|
2882
|
+
}
|
|
2883
|
+
function AccountLineItems({ items, className }) {
|
|
2884
|
+
return /* @__PURE__ */ jsx("div", { "data-cimplify-line-items": true, className: cn("divide-y divide-border/60", className), children: items.map((item) => /* @__PURE__ */ jsx(AccountLineItem, { item }, item.id)) });
|
|
2885
|
+
}
|
|
2886
|
+
var STATUS_TONE = {
|
|
2887
|
+
progress: "bg-amber-500/10 text-amber-600",
|
|
2888
|
+
positive: "bg-emerald-500/10 text-emerald-600",
|
|
2889
|
+
muted: "bg-muted/60 text-foreground/60"
|
|
2890
|
+
};
|
|
2891
|
+
function SectionLabel({ children }) {
|
|
2892
|
+
return /* @__PURE__ */ jsx("div", { className: "text-[10px] font-bold uppercase tracking-wider text-foreground/45", children });
|
|
2893
|
+
}
|
|
2894
|
+
function AccountOrderView({
|
|
2895
|
+
orderNumber,
|
|
2896
|
+
placedLabel,
|
|
2897
|
+
statusLabel,
|
|
2898
|
+
statusTone = "progress",
|
|
2899
|
+
items,
|
|
2900
|
+
itemsLabel = "Items",
|
|
2901
|
+
delivery,
|
|
2902
|
+
payment,
|
|
2903
|
+
shipTo,
|
|
2904
|
+
actions,
|
|
2905
|
+
onBack,
|
|
2906
|
+
backLabel = "Back to orders",
|
|
2907
|
+
className
|
|
2908
|
+
}) {
|
|
2909
|
+
return /* @__PURE__ */ jsxs("div", { "data-cimplify-order-view": true, className: cn("min-w-0", className), children: [
|
|
2910
|
+
onBack && /* @__PURE__ */ jsxs(
|
|
2911
|
+
"button",
|
|
2912
|
+
{
|
|
2913
|
+
type: "button",
|
|
2914
|
+
onClick: onBack,
|
|
2915
|
+
className: "mb-5 inline-flex items-center gap-1.5 text-[13px] font-medium text-foreground/55 hover:text-foreground",
|
|
2916
|
+
children: [
|
|
2917
|
+
/* @__PURE__ */ jsx("svg", { width: "15", height: "15", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", children: /* @__PURE__ */ jsx("path", { d: "m15 18-6-6 6-6" }) }),
|
|
2918
|
+
backLabel
|
|
2919
|
+
]
|
|
2920
|
+
}
|
|
2921
|
+
),
|
|
2922
|
+
/* @__PURE__ */ jsxs("div", { className: "mb-5 flex items-start justify-between gap-3", children: [
|
|
2923
|
+
/* @__PURE__ */ jsxs("div", { className: "min-w-0", children: [
|
|
2924
|
+
/* @__PURE__ */ jsxs("h1", { className: "font-serif text-2xl font-semibold tracking-[-0.02em] tabular-nums text-foreground", children: [
|
|
2925
|
+
"Order #",
|
|
2926
|
+
orderNumber
|
|
2927
|
+
] }),
|
|
2928
|
+
placedLabel && /* @__PURE__ */ jsx("div", { className: "mt-0.5 text-[13px] text-foreground/55", children: placedLabel })
|
|
2929
|
+
] }),
|
|
2930
|
+
statusLabel && /* @__PURE__ */ jsx(
|
|
2931
|
+
"span",
|
|
2932
|
+
{
|
|
2933
|
+
className: cn(
|
|
2934
|
+
"shrink-0 rounded-full px-2.5 py-1 text-xs font-semibold",
|
|
2935
|
+
STATUS_TONE[statusTone]
|
|
2936
|
+
),
|
|
2937
|
+
children: statusLabel
|
|
2938
|
+
}
|
|
2939
|
+
)
|
|
2940
|
+
] }),
|
|
2941
|
+
/* @__PURE__ */ jsxs("div", { className: "grid grid-cols-1 gap-8 lg:grid-cols-[minmax(0,1fr)_300px] lg:gap-14", children: [
|
|
2942
|
+
/* @__PURE__ */ jsxs("div", { className: "min-w-0", children: [
|
|
2943
|
+
/* @__PURE__ */ jsxs("section", { children: [
|
|
2944
|
+
/* @__PURE__ */ jsx(SectionLabel, { children: itemsLabel }),
|
|
2945
|
+
/* @__PURE__ */ jsx(AccountLineItems, { items, className: "mt-2.5" })
|
|
2946
|
+
] }),
|
|
2947
|
+
delivery && /* @__PURE__ */ jsxs("section", { className: "mt-6 border-t border-border/60 pt-6", children: [
|
|
2948
|
+
/* @__PURE__ */ jsx("div", { className: "mb-1 flex items-center justify-between", children: /* @__PURE__ */ jsx(SectionLabel, { children: delivery.label ?? "Delivery" }) }),
|
|
2949
|
+
delivery.note && /* @__PURE__ */ jsx("p", { className: "mb-4 text-[11.5px] text-foreground/55", children: delivery.note }),
|
|
2950
|
+
/* @__PURE__ */ jsx(
|
|
2951
|
+
DeliveryTracker,
|
|
2952
|
+
{
|
|
2953
|
+
variant: "plain",
|
|
2954
|
+
steps: delivery.steps,
|
|
2955
|
+
statusLabel: delivery.statusLabel,
|
|
2956
|
+
etaLabel: delivery.etaLabel,
|
|
2957
|
+
rider: delivery.rider,
|
|
2958
|
+
live: delivery.live,
|
|
2959
|
+
onTrackLive: delivery.onTrackLive,
|
|
2960
|
+
onContactRider: delivery.onContactRider
|
|
2961
|
+
}
|
|
2962
|
+
)
|
|
2963
|
+
] })
|
|
2964
|
+
] }),
|
|
2965
|
+
/* @__PURE__ */ jsxs("div", { children: [
|
|
2966
|
+
/* @__PURE__ */ jsxs("div", { className: "rounded-[var(--radius,12px)] bg-muted/40 p-4", children: [
|
|
2967
|
+
/* @__PURE__ */ jsxs("div", { className: "mb-3 flex items-center justify-between", children: [
|
|
2968
|
+
/* @__PURE__ */ jsx(SectionLabel, { children: "Payment" }),
|
|
2969
|
+
payment.stateLabel && /* @__PURE__ */ jsx(
|
|
2970
|
+
"span",
|
|
2971
|
+
{
|
|
2972
|
+
className: cn(
|
|
2973
|
+
"rounded-full px-2 py-0.5 text-[11.5px] font-semibold",
|
|
2974
|
+
payment.stateTone === "warning" ? "bg-amber-500/10 text-amber-600" : payment.stateTone === "muted" ? "bg-muted/70 text-foreground/60" : "bg-emerald-500/10 text-emerald-600"
|
|
2975
|
+
),
|
|
2976
|
+
children: payment.stateLabel
|
|
2977
|
+
}
|
|
2978
|
+
)
|
|
2979
|
+
] }),
|
|
2980
|
+
/* @__PURE__ */ jsxs("div", { className: "space-y-2 text-[13px]", children: [
|
|
2981
|
+
payment.rows.map((row, i) => /* @__PURE__ */ jsxs("div", { className: "flex justify-between", children: [
|
|
2982
|
+
/* @__PURE__ */ jsx("span", { className: "text-foreground/55", children: row.label }),
|
|
2983
|
+
/* @__PURE__ */ jsx("span", { className: cn("tabular-nums", row.tone === "positive" && "text-emerald-600"), children: row.value })
|
|
2984
|
+
] }, i)),
|
|
2985
|
+
/* @__PURE__ */ jsx("div", { className: "my-2 h-px bg-border" }),
|
|
2986
|
+
/* @__PURE__ */ jsxs("div", { className: "flex justify-between text-[15px] font-semibold", children: [
|
|
2987
|
+
/* @__PURE__ */ jsx("span", { children: payment.total.label }),
|
|
2988
|
+
/* @__PURE__ */ jsx("span", { className: "tabular-nums", children: payment.total.value })
|
|
2989
|
+
] })
|
|
2990
|
+
] }),
|
|
2991
|
+
payment.method && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
2992
|
+
/* @__PURE__ */ jsx("div", { className: "my-3 h-px bg-border" }),
|
|
2993
|
+
/* @__PURE__ */ jsx("div", { className: "text-[12.5px] text-foreground", children: payment.method })
|
|
2994
|
+
] })
|
|
2995
|
+
] }),
|
|
2996
|
+
shipTo && /* @__PURE__ */ jsxs("div", { className: "mt-7", children: [
|
|
2997
|
+
/* @__PURE__ */ jsx(SectionLabel, { children: shipTo.heading ?? "Delivering to" }),
|
|
2998
|
+
shipTo.name && /* @__PURE__ */ jsx("div", { className: "mt-2 text-[13px] font-semibold text-foreground", children: shipTo.name }),
|
|
2999
|
+
/* @__PURE__ */ jsx("div", { className: "mt-1 text-[12.5px] leading-relaxed text-foreground/55", children: shipTo.lines })
|
|
3000
|
+
] }),
|
|
3001
|
+
actions && /* @__PURE__ */ jsx("div", { className: "mt-7 space-y-2.5", children: actions })
|
|
3002
|
+
] })
|
|
3003
|
+
] })
|
|
3004
|
+
] });
|
|
3005
|
+
}
|
|
2544
3006
|
function SubscriptionRow({
|
|
2545
3007
|
subscription,
|
|
2546
3008
|
onSelect,
|
|
@@ -3345,6 +3807,213 @@ function useCimplifySession(options) {
|
|
|
3345
3807
|
}, [fetchSession]);
|
|
3346
3808
|
return { session, loading, refresh: fetchSession };
|
|
3347
3809
|
}
|
|
3810
|
+
var DEFAULT_LINKS = [
|
|
3811
|
+
{
|
|
3812
|
+
label: "Your orders",
|
|
3813
|
+
href: "/account/orders",
|
|
3814
|
+
icon: /* @__PURE__ */ jsxs("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "1.8", "aria-hidden": true, children: [
|
|
3815
|
+
/* @__PURE__ */ jsx("path", { d: "M6 2 3 6v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V6l-3-4Z" }),
|
|
3816
|
+
/* @__PURE__ */ jsx("path", { d: "M3 6h18" }),
|
|
3817
|
+
/* @__PURE__ */ jsx("path", { d: "M16 10a4 4 0 0 1-8 0" })
|
|
3818
|
+
] })
|
|
3819
|
+
},
|
|
3820
|
+
{
|
|
3821
|
+
label: "Subscriptions",
|
|
3822
|
+
href: "/account/subscriptions",
|
|
3823
|
+
icon: /* @__PURE__ */ jsxs("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "1.8", "aria-hidden": true, children: [
|
|
3824
|
+
/* @__PURE__ */ jsx("rect", { x: "3", y: "4", width: "18", height: "16", rx: "2" }),
|
|
3825
|
+
/* @__PURE__ */ jsx("path", { d: "M3 9h18M8 2v4M16 2v4" })
|
|
3826
|
+
] })
|
|
3827
|
+
}
|
|
3828
|
+
];
|
|
3829
|
+
var LinkIcon = /* @__PURE__ */ jsxs("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "1.8", "aria-hidden": true, children: [
|
|
3830
|
+
/* @__PURE__ */ jsx("path", { d: "M10 13.5a4 4 0 0 0 5.6 0l3-3a4 4 0 0 0-5.6-5.6L11.5 6.4" }),
|
|
3831
|
+
/* @__PURE__ */ jsx("path", { d: "M14 10.5a4 4 0 0 0-5.6 0l-3 3a4 4 0 0 0 5.6 5.6l1.5-1.5" })
|
|
3832
|
+
] });
|
|
3833
|
+
var ExternalIcon = /* @__PURE__ */ jsx("svg", { width: "13", height: "13", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", "aria-hidden": true, className: "ml-auto opacity-50", children: /* @__PURE__ */ jsx("path", { d: "M7 17 17 7M9 7h8v8" }) });
|
|
3834
|
+
function Avatar({ seed, name, size }) {
|
|
3835
|
+
return /* @__PURE__ */ jsx(
|
|
3836
|
+
"span",
|
|
3837
|
+
{
|
|
3838
|
+
"aria-hidden": true,
|
|
3839
|
+
className: "grid place-items-center rounded-full font-serif font-semibold text-white shrink-0",
|
|
3840
|
+
style: { width: size, height: size, fontSize: size * 0.4, background: avatarGradient(seed) },
|
|
3841
|
+
children: initials(name)
|
|
3842
|
+
}
|
|
3843
|
+
);
|
|
3844
|
+
}
|
|
3845
|
+
function CimplifyUserButton({
|
|
3846
|
+
session: controlledSession,
|
|
3847
|
+
sessionUri,
|
|
3848
|
+
links = DEFAULT_LINKS,
|
|
3849
|
+
identityUrl = "https://link.cimplify.io",
|
|
3850
|
+
signOutHref = "/auth/signout",
|
|
3851
|
+
onSignOut,
|
|
3852
|
+
clientId,
|
|
3853
|
+
redirectUri,
|
|
3854
|
+
signInLabel,
|
|
3855
|
+
onSignIn,
|
|
3856
|
+
hideName,
|
|
3857
|
+
align = "end",
|
|
3858
|
+
className
|
|
3859
|
+
}) {
|
|
3860
|
+
const controlled = controlledSession !== void 0;
|
|
3861
|
+
const hook = useCimplifySession({ sessionUri });
|
|
3862
|
+
const session = controlled ? controlledSession : hook.session;
|
|
3863
|
+
const loading = controlled ? false : hook.loading;
|
|
3864
|
+
const [open, setOpen] = useState(false);
|
|
3865
|
+
const rootRef = useRef(null);
|
|
3866
|
+
const menuId = useId();
|
|
3867
|
+
useEffect(() => {
|
|
3868
|
+
if (!open) return;
|
|
3869
|
+
const onDocClick = (e) => {
|
|
3870
|
+
if (!rootRef.current?.contains(e.target)) setOpen(false);
|
|
3871
|
+
};
|
|
3872
|
+
const onKey = (e) => {
|
|
3873
|
+
if (e.key === "Escape") setOpen(false);
|
|
3874
|
+
};
|
|
3875
|
+
document.addEventListener("mousedown", onDocClick);
|
|
3876
|
+
document.addEventListener("keydown", onKey);
|
|
3877
|
+
return () => {
|
|
3878
|
+
document.removeEventListener("mousedown", onDocClick);
|
|
3879
|
+
document.removeEventListener("keydown", onKey);
|
|
3880
|
+
};
|
|
3881
|
+
}, [open]);
|
|
3882
|
+
if (loading) {
|
|
3883
|
+
return /* @__PURE__ */ jsx("div", { className: cn("inline-flex items-center", className), "data-cimplify-user-button": "loading", children: /* @__PURE__ */ jsx("span", { className: "size-8 rounded-full bg-muted/60 animate-pulse" }) });
|
|
3884
|
+
}
|
|
3885
|
+
if (!session) {
|
|
3886
|
+
if (!clientId || !redirectUri) return null;
|
|
3887
|
+
return /* @__PURE__ */ jsx(
|
|
3888
|
+
CimplifySignInButton,
|
|
3889
|
+
{
|
|
3890
|
+
variant: "outline",
|
|
3891
|
+
label: signInLabel ?? "Sign in",
|
|
3892
|
+
clientId,
|
|
3893
|
+
redirectUri,
|
|
3894
|
+
onSuccess: onSignIn,
|
|
3895
|
+
className
|
|
3896
|
+
}
|
|
3897
|
+
);
|
|
3898
|
+
}
|
|
3899
|
+
const name = session.name?.trim() || session.email || "Account";
|
|
3900
|
+
const seed = session.sub || name;
|
|
3901
|
+
return /* @__PURE__ */ jsxs("div", { ref: rootRef, className: cn("relative inline-block", className), "data-cimplify-user-button": true, children: [
|
|
3902
|
+
/* @__PURE__ */ jsxs(
|
|
3903
|
+
"button",
|
|
3904
|
+
{
|
|
3905
|
+
type: "button",
|
|
3906
|
+
onClick: () => setOpen((v) => !v),
|
|
3907
|
+
"aria-haspopup": "menu",
|
|
3908
|
+
"aria-expanded": open,
|
|
3909
|
+
"aria-controls": menuId,
|
|
3910
|
+
className: cn(
|
|
3911
|
+
"inline-flex items-center gap-2 rounded-full border border-border bg-card p-1 pr-2.5",
|
|
3912
|
+
"shadow-[0_1px_2px_rgba(16,24,40,0.06)] transition-colors cursor-pointer",
|
|
3913
|
+
"hover:border-foreground/30 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary/40",
|
|
3914
|
+
hideName && "pr-1"
|
|
3915
|
+
),
|
|
3916
|
+
children: [
|
|
3917
|
+
/* @__PURE__ */ jsx(Avatar, { seed, name, size: 28 }),
|
|
3918
|
+
!hideName && /* @__PURE__ */ jsx("span", { className: "max-w-[120px] truncate text-[13px] font-semibold text-foreground", children: session.name?.split(/\s+/)[0] || name }),
|
|
3919
|
+
/* @__PURE__ */ jsx(
|
|
3920
|
+
"svg",
|
|
3921
|
+
{
|
|
3922
|
+
width: "13",
|
|
3923
|
+
height: "13",
|
|
3924
|
+
viewBox: "0 0 24 24",
|
|
3925
|
+
fill: "none",
|
|
3926
|
+
stroke: "currentColor",
|
|
3927
|
+
strokeWidth: "2.2",
|
|
3928
|
+
"aria-hidden": true,
|
|
3929
|
+
className: cn("text-foreground/45 transition-transform", open && "rotate-180"),
|
|
3930
|
+
children: /* @__PURE__ */ jsx("path", { d: "m6 9 6 6 6-6" })
|
|
3931
|
+
}
|
|
3932
|
+
)
|
|
3933
|
+
]
|
|
3934
|
+
}
|
|
3935
|
+
),
|
|
3936
|
+
open && /* @__PURE__ */ jsxs(
|
|
3937
|
+
"div",
|
|
3938
|
+
{
|
|
3939
|
+
id: menuId,
|
|
3940
|
+
role: "menu",
|
|
3941
|
+
className: cn(
|
|
3942
|
+
"absolute top-[calc(100%+8px)] z-50 w-[280px] max-w-[calc(100vw-1.5rem)] overflow-hidden",
|
|
3943
|
+
"rounded-[14px] border border-border bg-card",
|
|
3944
|
+
"shadow-[0_1px_2px_rgba(16,24,40,0.04),0_16px_40px_-16px_rgba(16,24,40,0.24)]",
|
|
3945
|
+
align === "end" ? "right-0" : "left-0"
|
|
3946
|
+
),
|
|
3947
|
+
children: [
|
|
3948
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-3 border-b border-border/60 p-3.5", children: [
|
|
3949
|
+
/* @__PURE__ */ jsx(Avatar, { seed, name, size: 40 }),
|
|
3950
|
+
/* @__PURE__ */ jsxs("div", { className: "min-w-0", children: [
|
|
3951
|
+
/* @__PURE__ */ jsx("div", { className: "truncate text-[14px] font-semibold text-foreground", children: name }),
|
|
3952
|
+
session.email && /* @__PURE__ */ jsx("div", { className: "truncate text-[12px] text-foreground/55", children: session.email })
|
|
3953
|
+
] })
|
|
3954
|
+
] }),
|
|
3955
|
+
/* @__PURE__ */ jsxs("div", { className: "p-1.5", children: [
|
|
3956
|
+
links.map((link) => /* @__PURE__ */ jsxs(
|
|
3957
|
+
"a",
|
|
3958
|
+
{
|
|
3959
|
+
role: "menuitem",
|
|
3960
|
+
href: link.href,
|
|
3961
|
+
target: link.external ? "_blank" : void 0,
|
|
3962
|
+
rel: link.external ? "noreferrer" : void 0,
|
|
3963
|
+
className: "flex items-center gap-3 rounded-[9px] px-3 py-2 text-[13.5px] text-foreground hover:bg-muted/50",
|
|
3964
|
+
children: [
|
|
3965
|
+
/* @__PURE__ */ jsx("span", { className: "text-foreground/45", children: link.icon }),
|
|
3966
|
+
link.label,
|
|
3967
|
+
link.external && ExternalIcon
|
|
3968
|
+
]
|
|
3969
|
+
},
|
|
3970
|
+
link.href
|
|
3971
|
+
)),
|
|
3972
|
+
/* @__PURE__ */ jsx("div", { className: "my-1.5 h-px bg-border/60" }),
|
|
3973
|
+
/* @__PURE__ */ jsxs(
|
|
3974
|
+
"a",
|
|
3975
|
+
{
|
|
3976
|
+
role: "menuitem",
|
|
3977
|
+
href: identityUrl,
|
|
3978
|
+
target: "_blank",
|
|
3979
|
+
rel: "noreferrer",
|
|
3980
|
+
className: "flex items-center gap-3 rounded-[9px] px-3 py-2 text-[13.5px] text-foreground hover:bg-muted/50",
|
|
3981
|
+
children: [
|
|
3982
|
+
/* @__PURE__ */ jsx("span", { className: "text-foreground/45", children: LinkIcon }),
|
|
3983
|
+
"Manage Cimplify identity",
|
|
3984
|
+
ExternalIcon
|
|
3985
|
+
]
|
|
3986
|
+
}
|
|
3987
|
+
),
|
|
3988
|
+
/* @__PURE__ */ jsx(
|
|
3989
|
+
"form",
|
|
3990
|
+
{
|
|
3991
|
+
method: "post",
|
|
3992
|
+
action: signOutHref,
|
|
3993
|
+
onSubmit: onSignOut ? () => onSignOut() : void 0,
|
|
3994
|
+
children: /* @__PURE__ */ jsxs(
|
|
3995
|
+
"button",
|
|
3996
|
+
{
|
|
3997
|
+
type: "submit",
|
|
3998
|
+
role: "menuitem",
|
|
3999
|
+
className: "flex w-full items-center gap-3 rounded-[9px] px-3 py-2 text-[13.5px] text-destructive hover:bg-destructive/10",
|
|
4000
|
+
children: [
|
|
4001
|
+
/* @__PURE__ */ jsxs("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "1.8", "aria-hidden": true, children: [
|
|
4002
|
+
/* @__PURE__ */ jsx("path", { d: "M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4" }),
|
|
4003
|
+
/* @__PURE__ */ jsx("path", { d: "m16 17 5-5-5-5M21 12H9" })
|
|
4004
|
+
] }),
|
|
4005
|
+
"Sign out"
|
|
4006
|
+
]
|
|
4007
|
+
}
|
|
4008
|
+
)
|
|
4009
|
+
}
|
|
4010
|
+
)
|
|
4011
|
+
] })
|
|
4012
|
+
]
|
|
4013
|
+
}
|
|
4014
|
+
)
|
|
4015
|
+
] });
|
|
4016
|
+
}
|
|
3348
4017
|
function Price({ amount, currency, className, prefix }) {
|
|
3349
4018
|
const context = useOptionalCimplify();
|
|
3350
4019
|
const resolvedCurrency = currency ?? context?.displayCurrency ?? "USD";
|
|
@@ -7196,7 +7865,7 @@ function FileUploadInput({
|
|
|
7196
7865
|
onFileUpload,
|
|
7197
7866
|
classNames
|
|
7198
7867
|
}) {
|
|
7199
|
-
const [isUploading, setIsUploading] =
|
|
7868
|
+
const [isUploading, setIsUploading] = React14.useState(false);
|
|
7200
7869
|
const fileUrl = typeof value === "string" ? value : void 0;
|
|
7201
7870
|
const acceptedFormats = field.validation?.accepted_formats;
|
|
7202
7871
|
const accept = acceptedFormats ? acceptedFormats.map((f) => `.${f}`).join(",") : field.field_type === INPUT_FIELD_TYPE.Image ? "image/*" : void 0;
|
|
@@ -7346,22 +8015,22 @@ function AddressInput({
|
|
|
7346
8015
|
}) {
|
|
7347
8016
|
const clientContext = useOptionalCimplifyClient();
|
|
7348
8017
|
const addr = value && typeof value === "object" ? value : null;
|
|
7349
|
-
const [inputText, setInputText] =
|
|
7350
|
-
const [suggestions, setSuggestions] =
|
|
7351
|
-
const [isOpen, setIsOpen] =
|
|
7352
|
-
const [highlightedIndex, setHighlightedIndex] =
|
|
7353
|
-
const debounceRef =
|
|
7354
|
-
const seqRef =
|
|
7355
|
-
const sessionTokenRef =
|
|
7356
|
-
const blurTimeoutRef =
|
|
7357
|
-
|
|
8018
|
+
const [inputText, setInputText] = React14.useState(addr?.formatted_address ?? "");
|
|
8019
|
+
const [suggestions, setSuggestions] = React14.useState([]);
|
|
8020
|
+
const [isOpen, setIsOpen] = React14.useState(false);
|
|
8021
|
+
const [highlightedIndex, setHighlightedIndex] = React14.useState(-1);
|
|
8022
|
+
const debounceRef = React14.useRef(null);
|
|
8023
|
+
const seqRef = React14.useRef(0);
|
|
8024
|
+
const sessionTokenRef = React14.useRef(createSessionToken());
|
|
8025
|
+
const blurTimeoutRef = React14.useRef(null);
|
|
8026
|
+
React14.useEffect(() => {
|
|
7358
8027
|
return () => {
|
|
7359
8028
|
if (debounceRef.current) clearTimeout(debounceRef.current);
|
|
7360
8029
|
if (blurTimeoutRef.current) clearTimeout(blurTimeoutRef.current);
|
|
7361
8030
|
seqRef.current += 1;
|
|
7362
8031
|
};
|
|
7363
8032
|
}, []);
|
|
7364
|
-
const fetchSuggestions =
|
|
8033
|
+
const fetchSuggestions = React14.useCallback(async (query) => {
|
|
7365
8034
|
const client = clientContext?.client;
|
|
7366
8035
|
if (!client || query.length < 3) {
|
|
7367
8036
|
setSuggestions([]);
|
|
@@ -7385,7 +8054,7 @@ function AddressInput({
|
|
|
7385
8054
|
if (debounceRef.current) clearTimeout(debounceRef.current);
|
|
7386
8055
|
debounceRef.current = setTimeout(() => void fetchSuggestions(nextValue.trim()), 300);
|
|
7387
8056
|
};
|
|
7388
|
-
const selectSuggestion =
|
|
8057
|
+
const selectSuggestion = React14.useCallback(async (suggestion) => {
|
|
7389
8058
|
if (debounceRef.current) clearTimeout(debounceRef.current);
|
|
7390
8059
|
if (blurTimeoutRef.current) clearTimeout(blurTimeoutRef.current);
|
|
7391
8060
|
const fallback = suggestion.description.split(",")[0]?.trim() || suggestion.description;
|
|
@@ -7488,22 +8157,22 @@ function LocationInput({
|
|
|
7488
8157
|
}) {
|
|
7489
8158
|
const clientContext = useOptionalCimplifyClient();
|
|
7490
8159
|
const loc = value && typeof value === "object" ? value : null;
|
|
7491
|
-
const [inputText, setInputText] =
|
|
7492
|
-
const [suggestions, setSuggestions] =
|
|
7493
|
-
const [isOpen, setIsOpen] =
|
|
7494
|
-
const [highlightedIndex, setHighlightedIndex] =
|
|
7495
|
-
const debounceRef =
|
|
7496
|
-
const seqRef =
|
|
7497
|
-
const sessionTokenRef =
|
|
7498
|
-
const blurTimeoutRef =
|
|
7499
|
-
|
|
8160
|
+
const [inputText, setInputText] = React14.useState(loc?.label ?? "");
|
|
8161
|
+
const [suggestions, setSuggestions] = React14.useState([]);
|
|
8162
|
+
const [isOpen, setIsOpen] = React14.useState(false);
|
|
8163
|
+
const [highlightedIndex, setHighlightedIndex] = React14.useState(-1);
|
|
8164
|
+
const debounceRef = React14.useRef(null);
|
|
8165
|
+
const seqRef = React14.useRef(0);
|
|
8166
|
+
const sessionTokenRef = React14.useRef(createSessionToken());
|
|
8167
|
+
const blurTimeoutRef = React14.useRef(null);
|
|
8168
|
+
React14.useEffect(() => {
|
|
7500
8169
|
return () => {
|
|
7501
8170
|
if (debounceRef.current) clearTimeout(debounceRef.current);
|
|
7502
8171
|
if (blurTimeoutRef.current) clearTimeout(blurTimeoutRef.current);
|
|
7503
8172
|
seqRef.current += 1;
|
|
7504
8173
|
};
|
|
7505
8174
|
}, []);
|
|
7506
|
-
const fetchSuggestions =
|
|
8175
|
+
const fetchSuggestions = React14.useCallback(async (query) => {
|
|
7507
8176
|
const client = clientContext?.client;
|
|
7508
8177
|
if (!client || query.length < 3) {
|
|
7509
8178
|
setSuggestions([]);
|
|
@@ -7527,7 +8196,7 @@ function LocationInput({
|
|
|
7527
8196
|
if (debounceRef.current) clearTimeout(debounceRef.current);
|
|
7528
8197
|
debounceRef.current = setTimeout(() => void fetchSuggestions(nextValue.trim()), 300);
|
|
7529
8198
|
};
|
|
7530
|
-
const selectSuggestion =
|
|
8199
|
+
const selectSuggestion = React14.useCallback(async (suggestion) => {
|
|
7531
8200
|
if (debounceRef.current) clearTimeout(debounceRef.current);
|
|
7532
8201
|
if (blurTimeoutRef.current) clearTimeout(blurTimeoutRef.current);
|
|
7533
8202
|
const label = suggestion.description.split(",")[0]?.trim() || suggestion.description;
|
|
@@ -7616,8 +8285,8 @@ function PhoneInput({
|
|
|
7616
8285
|
inputClass
|
|
7617
8286
|
}) {
|
|
7618
8287
|
const phone = value && typeof value === "object" ? value : null;
|
|
7619
|
-
const [code, setCode] =
|
|
7620
|
-
const [number, setNumber] =
|
|
8288
|
+
const [code, setCode] = React14.useState(phone?.country_code ?? "+1");
|
|
8289
|
+
const [number, setNumber] = React14.useState(phone?.number ?? "");
|
|
7621
8290
|
const update = (nextCode, nextNumber) => {
|
|
7622
8291
|
setCode(nextCode);
|
|
7623
8292
|
setNumber(nextNumber);
|
|
@@ -7662,8 +8331,8 @@ function SignatureInput({
|
|
|
7662
8331
|
classNames
|
|
7663
8332
|
}) {
|
|
7664
8333
|
const sig = value && typeof value === "object" ? value : null;
|
|
7665
|
-
const canvasRef =
|
|
7666
|
-
const isDrawing =
|
|
8334
|
+
const canvasRef = React14.useRef(null);
|
|
8335
|
+
const isDrawing = React14.useRef(false);
|
|
7667
8336
|
const getCtx = () => canvasRef.current?.getContext("2d") ?? null;
|
|
7668
8337
|
const startDraw = (e) => {
|
|
7669
8338
|
const ctx = getCtx();
|
|
@@ -8695,7 +9364,7 @@ function ProductModel3D({
|
|
|
8695
9364
|
"data-cimplify-product-model-3d": true,
|
|
8696
9365
|
className,
|
|
8697
9366
|
style: { position: "relative", overflow: "hidden", ...ASPECT_STYLES3[aspectRatio] },
|
|
8698
|
-
children: ready ?
|
|
9367
|
+
children: ready ? React14.createElement("model-viewer", {
|
|
8699
9368
|
src,
|
|
8700
9369
|
"ios-src": iosSrc,
|
|
8701
9370
|
alt,
|
|
@@ -8706,12 +9375,12 @@ function ProductModel3D({
|
|
|
8706
9375
|
"auto-rotate": autoRotate || void 0,
|
|
8707
9376
|
"shadow-intensity": "1",
|
|
8708
9377
|
style: { width: "100%", height: "100%", backgroundColor: "transparent" }
|
|
8709
|
-
}) : poster ?
|
|
9378
|
+
}) : poster ? React14.createElement("img", {
|
|
8710
9379
|
src: poster,
|
|
8711
9380
|
alt: alt ?? "",
|
|
8712
9381
|
"data-cimplify-product-model-3d-loading": true,
|
|
8713
9382
|
style: { width: "100%", height: "100%", objectFit: "cover" }
|
|
8714
|
-
}) :
|
|
9383
|
+
}) : React14.createElement("div", {
|
|
8715
9384
|
"data-cimplify-product-model-3d-loading": true,
|
|
8716
9385
|
style: { width: "100%", height: "100%", backgroundColor: "var(--muted, #f3f4f6)" }
|
|
8717
9386
|
})
|
|
@@ -10638,13 +11307,13 @@ function ProductGrid({
|
|
|
10638
11307
|
className,
|
|
10639
11308
|
classNames
|
|
10640
11309
|
}) {
|
|
10641
|
-
const rawId =
|
|
11310
|
+
const rawId = React14.useId();
|
|
10642
11311
|
const gridId = `cimplify-grid-${rawId.replace(/:/g, "")}`;
|
|
10643
11312
|
const sm = columns?.sm ?? 1;
|
|
10644
11313
|
const md = columns?.md ?? 2;
|
|
10645
11314
|
const lg = columns?.lg ?? 3;
|
|
10646
11315
|
const xl = columns?.xl ?? 4;
|
|
10647
|
-
const css =
|
|
11316
|
+
const css = React14.useMemo(
|
|
10648
11317
|
() => [
|
|
10649
11318
|
`#${gridId}{display:grid;grid-template-columns:repeat(${sm},1fr);gap:1rem}`,
|
|
10650
11319
|
`@media(min-width:768px){#${gridId}{grid-template-columns:repeat(${md},1fr)}}`,
|
|
@@ -11005,7 +11674,7 @@ function CategoryGrid({
|
|
|
11005
11674
|
enabled: categoriesProp === void 0
|
|
11006
11675
|
});
|
|
11007
11676
|
const categories = categoriesProp ?? fetched;
|
|
11008
|
-
const rawId =
|
|
11677
|
+
const rawId = React14.useId();
|
|
11009
11678
|
const gridId = `cimplify-cat-grid-${rawId.replace(/:/g, "")}`;
|
|
11010
11679
|
const sm = columns?.sm ?? 2;
|
|
11011
11680
|
const md = columns?.md ?? 3;
|
|
@@ -11231,7 +11900,7 @@ function OrderSummary({
|
|
|
11231
11900
|
/* @__PURE__ */ jsx("p", { children: order.delivery_address })
|
|
11232
11901
|
] }),
|
|
11233
11902
|
/* @__PURE__ */ jsx("div", { "data-cimplify-order-items": true, className: classNames?.items, children: order.items.map(
|
|
11234
|
-
(item) => renderLineItem ? /* @__PURE__ */ jsx(
|
|
11903
|
+
(item) => renderLineItem ? /* @__PURE__ */ jsx(React14.Fragment, { children: renderLineItem(item) }, item.id) : /* @__PURE__ */ jsxs("div", { "data-cimplify-order-line-item": true, className: classNames?.lineItem, children: [
|
|
11235
11904
|
/* @__PURE__ */ jsxs("div", { "data-cimplify-order-line-info": true, children: [
|
|
11236
11905
|
/* @__PURE__ */ jsxs("span", { "data-cimplify-order-line-qty": true, children: [
|
|
11237
11906
|
item.quantity,
|
|
@@ -12391,7 +13060,7 @@ function DefaultCatalogueLayout({
|
|
|
12391
13060
|
/* @__PURE__ */ jsx("p", { className: "text-lg font-medium", children: "No products found" }),
|
|
12392
13061
|
/* @__PURE__ */ jsx("p", { className: "text-sm text-muted-foreground mt-1", children: "Try adjusting your filters" })
|
|
12393
13062
|
] }) : /* @__PURE__ */ jsx("div", { className: "grid grid-cols-2 md:grid-cols-3 gap-4", children: products.map(
|
|
12394
|
-
(product) => renderCard ? /* @__PURE__ */ jsx(
|
|
13063
|
+
(product) => renderCard ? /* @__PURE__ */ jsx(React14.Fragment, { children: renderCard(product) }, product.id) : /* @__PURE__ */ jsx(
|
|
12395
13064
|
ProductCard,
|
|
12396
13065
|
{
|
|
12397
13066
|
product,
|
|
@@ -12498,7 +13167,7 @@ function CompactCatalogueLayout({
|
|
|
12498
13167
|
/* @__PURE__ */ jsx("p", { className: "text-lg font-medium", children: "No items found" }),
|
|
12499
13168
|
/* @__PURE__ */ jsx("p", { className: "text-sm text-muted-foreground mt-1", children: "Try a different category or search" })
|
|
12500
13169
|
] }) : /* @__PURE__ */ jsx("div", { className: "grid grid-cols-2 lg:grid-cols-3 gap-5", children: products.map(
|
|
12501
|
-
(product) => renderCard ? /* @__PURE__ */ jsx(
|
|
13170
|
+
(product) => renderCard ? /* @__PURE__ */ jsx(React14.Fragment, { children: renderCard(product) }, product.id) : /* @__PURE__ */ jsx(
|
|
12502
13171
|
ProductCard,
|
|
12503
13172
|
{
|
|
12504
13173
|
product,
|
|
@@ -12521,8 +13190,8 @@ var BUILT_IN_LAYOUTS = {
|
|
|
12521
13190
|
["compact" /* Compact */]: CompactCatalogueLayout
|
|
12522
13191
|
};
|
|
12523
13192
|
function useDebounce(value, delay) {
|
|
12524
|
-
const [debounced, setDebounced] =
|
|
12525
|
-
|
|
13193
|
+
const [debounced, setDebounced] = React14.useState(value);
|
|
13194
|
+
React14.useEffect(() => {
|
|
12526
13195
|
const timer = setTimeout(() => setDebounced(value), delay);
|
|
12527
13196
|
return () => clearTimeout(timer);
|
|
12528
13197
|
}, [value, delay]);
|
|
@@ -12778,7 +13447,7 @@ function DefaultProductLayout({
|
|
|
12778
13447
|
showRelated = true,
|
|
12779
13448
|
className
|
|
12780
13449
|
}) {
|
|
12781
|
-
const [selectedVariantId, setSelectedVariantId] =
|
|
13450
|
+
const [selectedVariantId, setSelectedVariantId] = React14.useState();
|
|
12782
13451
|
const images = resolveGallery(product, selectedVariantId);
|
|
12783
13452
|
const hasRange = product.quantity_pricing && product.quantity_pricing.length > 1 || product.variants && product.variants.length > 1;
|
|
12784
13453
|
const onSale = isOnSale(product);
|
|
@@ -14044,7 +14713,7 @@ function DefaultCollectionLayout({
|
|
|
14044
14713
|
] })
|
|
14045
14714
|
] }),
|
|
14046
14715
|
filtered.length > 0 ? /* @__PURE__ */ jsx("div", { className: "grid grid-cols-2 md:grid-cols-3 lg:grid-cols-4 gap-4", children: filtered.map(
|
|
14047
|
-
(product) => renderCard ? /* @__PURE__ */ jsx(
|
|
14716
|
+
(product) => renderCard ? /* @__PURE__ */ jsx(React14.Fragment, { children: renderCard(product) }, product.id) : /* @__PURE__ */ jsx(
|
|
14048
14717
|
ProductCard,
|
|
14049
14718
|
{
|
|
14050
14719
|
product,
|
|
@@ -14097,7 +14766,7 @@ function FeaturedCollectionLayout({
|
|
|
14097
14766
|
] })
|
|
14098
14767
|
] }),
|
|
14099
14768
|
/* @__PURE__ */ jsx("div", { className: "grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-6", children: products.map(
|
|
14100
|
-
(product) => renderCard ? /* @__PURE__ */ jsx(
|
|
14769
|
+
(product) => renderCard ? /* @__PURE__ */ jsx(React14.Fragment, { children: renderCard(product) }, product.id) : /* @__PURE__ */ jsx(
|
|
14101
14770
|
ProductCard,
|
|
14102
14771
|
{
|
|
14103
14772
|
product,
|
|
@@ -14221,7 +14890,7 @@ function CatalogueCollectionLayout({
|
|
|
14221
14890
|
] })
|
|
14222
14891
|
] }),
|
|
14223
14892
|
filtered.length > 0 ? /* @__PURE__ */ jsx("div", { className: "grid grid-cols-2 md:grid-cols-3 lg:grid-cols-4 gap-4", children: filtered.map(
|
|
14224
|
-
(product) => renderCard ? /* @__PURE__ */ jsx(
|
|
14893
|
+
(product) => renderCard ? /* @__PURE__ */ jsx(React14.Fragment, { children: renderCard(product) }, product.id) : /* @__PURE__ */ jsx(
|
|
14225
14894
|
ProductCard,
|
|
14226
14895
|
{
|
|
14227
14896
|
product,
|
|
@@ -14601,7 +15270,7 @@ function DefaultSearchLayout({
|
|
|
14601
15270
|
/* @__PURE__ */ jsx("p", { className: "text-sm text-muted-foreground mt-1", children: "Try a different search term" }),
|
|
14602
15271
|
/* @__PURE__ */ jsx("button", { onClick: clear, className: "text-sm font-medium text-primary mt-4 hover:underline", children: "Clear search" })
|
|
14603
15272
|
] }) : results.length > 0 ? /* @__PURE__ */ jsx("div", { className: "grid grid-cols-2 md:grid-cols-3 gap-4", children: results.map(
|
|
14604
|
-
(product) => renderCard ? /* @__PURE__ */ jsx(
|
|
15273
|
+
(product) => renderCard ? /* @__PURE__ */ jsx(React14.Fragment, { children: renderCard(product) }, product.id) : /* @__PURE__ */ jsx(
|
|
14605
15274
|
ProductCard,
|
|
14606
15275
|
{
|
|
14607
15276
|
product,
|
|
@@ -14703,7 +15372,7 @@ function CompactSearchLayout({
|
|
|
14703
15372
|
/* @__PURE__ */ jsx("p", { className: "text-sm text-muted-foreground mt-1", children: "Try a different search term" }),
|
|
14704
15373
|
/* @__PURE__ */ jsx("button", { onClick: clear, className: "text-sm font-medium text-primary mt-4 hover:underline", children: "Clear search" })
|
|
14705
15374
|
] }) : results.length > 0 ? /* @__PURE__ */ jsx("div", { className: "grid grid-cols-2 lg:grid-cols-3 gap-5", children: results.map(
|
|
14706
|
-
(product) => renderCard ? /* @__PURE__ */ jsx(
|
|
15375
|
+
(product) => renderCard ? /* @__PURE__ */ jsx(React14.Fragment, { children: renderCard(product) }, product.id) : /* @__PURE__ */ jsx(
|
|
14707
15376
|
ProductCard,
|
|
14708
15377
|
{
|
|
14709
15378
|
product,
|
|
@@ -15657,4 +16326,4 @@ function SparkleIcon({ className }) {
|
|
|
15657
16326
|
);
|
|
15658
16327
|
}
|
|
15659
16328
|
|
|
15660
|
-
export { AccommodationCard, AccountContent, AccountDashboardPage, AccountHero, AccountIdentityStrip, AccountNav, AccountOrderDetailPage, AccountOrdersPage, AccountShell, AccountSidebar, AccountSignedOutPrompt, AccountSubscriptionDetailPage, AccountSubscriptionsPage, Ad, AdProvider, AddOnSelector, AddressElement, AuthElement, AvailabilityBadge, BackLink, BillingPlanSelector, BookingCard, BookingList, BookingPage, BookingsPage, BoxIcon24, BundleProductCard, BundleProductLayout, BundleSelector, Button, CardImage, CardShell, CardVariant, CartDrawer, CartDrawerProvider, CartPage, CartSummary, CartTemplate, CatalogueCollectionLayout, CataloguePage, CatalogueTemplate, CategoryFilter, CategoryGrid, ChatWidget, CheckIcon, CheckoutPage,
|
|
16329
|
+
export { AccommodationCard, AccountContent, AccountDashboardPage, AccountHero, AccountIdentityStrip, AccountLineItem, AccountLineItems, AccountNav, AccountOrderDetailPage, AccountOrderView, AccountOrdersPage, AccountShell, AccountSidebar, AccountSignedOutPrompt, AccountSubscriptionDetailPage, AccountSubscriptionsPage, Ad, AdProvider, AddOnSelector, AddressElement, AuthElement, AvailabilityBadge, BackLink, BillingPlanSelector, BookingCard, BookingList, BookingPage, BookingsPage, BoxIcon24, BundleProductCard, BundleProductLayout, BundleSelector, Button, CardImage, CardShell, CardVariant, CartDrawer, CartDrawerProvider, CartPage, CartSummary, CartTemplate, CatalogueCollectionLayout, CataloguePage, CatalogueTemplate, CategoryFilter, CategoryGrid, ChatWidget, CheckIcon, CheckoutPage, CimplifyCheckout, CimplifyProvider, CimplifySignInButton, CimplifyUserButton, CollectionPage, CollectionTemplate, CompactCartLayout, CompactCatalogueLayout, CompactSearchLayout, CompactServiceCard, CompositeProductCard, CompositeProductLayout, CompositeSelector, ContextCard, ContinuityCard, CurrencySelector, CustomAttributesTable, CustomerInputFields, DashboardIcon, DashboardIcon20, DatePicker, DateSlotPicker, DealBanner, DealsPage, DefaultCartLayout, DefaultCatalogueLayout, DefaultCollectionLayout, DefaultProductLayout, DefaultSearchLayout, DeliveryEstimate, DeliveryTracker, DeliveryTruckIcon, DigitalProductCard, DigitalProductLayout, DiscountInput, ElementsProvider, EmptyState, ErrorState, FeaturedCollectionLayout, FilterTabs, FoodProductCard, FoodProductLayout, HappeningCard, IdentityIcon, IdentityOfframp, InventoryBadge, ItemsCard, LeaseServiceCard, LineItemDetails, LocationPicker, MediaGallery, MetadataStringList, MobileAccountShell, MobileBackButton, MobileMoreButton, MobileTabBar, NextDeliveryCard, OrderDetailHeader, OrderDetailMetaPipe, OrderDetailPage, OrderHistory, OrderHistoryPage, OrderList, OrderRow, OrderSummary, OrderTimeline, OrderTotals, OrdersIcon, OrdersIcon20, OvenIcon, PackageIcon, PaymentElement, Price, PriceRange, ProductCard, ProductCustomizer, ProductGrid, ProductImageGallery, ProductModel3D, ProductPage, ProductSheet, ProductTemplate, PropertiesTable, QuantitySelector, QuickAddButton, RecentlyViewed, RecommendationCarousel, RelatedProductsSection, RentalServiceCard, ResourcePicker, RetailProductCard, RichText, SaleBadge, ScheduleServiceCard, SearchInput, SearchPage, SearchTemplate, Section, SectionMore, ServiceProductLayout, SessionMessageBanner, SignOutIcon, Skeleton, SlotPicker, SoldOutOverlay, StaffPicker, StandardServiceCard, Status, StoreNav, StoreVideo, SubscriptionCard, SubscriptionList, SubscriptionRow, SubscriptionsIcon, SubscriptionsIcon20, TagPills, TimePicker, Toast, TwoColumnGrid, VariantSelector, VolumePricing, WelcomeCard, WholesaleProductCard, WholesaleProductLayout, WishlistButton, cn, roomToResource, sanitizeRichTextHtml, stripHtmlToText, useActivityState, useAds, useAttributeDefinitions, useAvailableSlots, useBillingPlans, useBookings, useBootstrap, useBundles, useCart, useCartDrawer, useCategories, useChat, useCheckout, useCimplify, useCimplifyClient, useCimplifySession, useCollection, useCollections, useDeals, useDeliveryFee, useElements, useElementsReady, useFxRate, useLocations, useOptionalCimplify, useOrder, useOrders, useProduct, useProductAvailability, useProductDeals, useProductPrice, useProductSchedules, useProducts, useProductsOnSale, usePropertyFacets, useQuote, useRecommendations, useSearch, useServiceAvailability, useServices, useSubscription, useSubscriptions, useTaxonomies, useTaxonomy, useTaxonomyPath, useValidateDiscount, useVariantSelector };
|