@fanvue/ui 3.32.0 → 3.33.1

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.
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Logo3dIcon.cjs","sources":["../../../../src/components/Logo/Logo3dIcon.tsx"],"sourcesContent":["import * as React from \"react\";\nimport { cn } from \"../../utils/cn\";\nimport type { LogoSize } from \"./Logo\";\n\nconst ICON_BG_PATH =\n \"M0 23.0438C0 10.3171 10.3171 0 23.0438 0H56.9562C69.6829 0 80 10.3171 80 23.0438V56.9562C80 69.6829 69.6829 80 56.9562 80H23.0438C10.3171 80 0 69.6829 0 56.9562V23.0438Z\";\nconst ICON_STROKE_PATH =\n \"M23.0439 0.480469H56.9561C69.4177 0.480469 79.5195 10.5823 79.5195 23.0439V56.9561C79.5195 69.4177 69.4177 79.5195 56.9561 79.5195H23.0439C10.5823 79.5195 0.480469 69.4177 0.480469 56.9561V23.0439C0.480469 10.5823 10.5823 0.480469 23.0439 0.480469Z\";\nconst ICON_F_PATH =\n \"M25.1836 62.7333C23.4703 62.7333 22.6369 61.2634 22.9866 59.7236C23.4412 57.6238 25.813 51.3944 24.0297 48.5946C21.4073 44.5 14.8834 45.095 13.4148 42.9952C12.3564 41.4542 13.2996 39.9549 14.7639 39.0755C18.0507 36.9757 24.4144 37.5707 30.6033 33.4411C34.0299 31.2013 37.1768 26.6517 38.96 23.922C41.4775 20.0723 42.5615 19.2674 47.8412 19.2674H66.3336C69.246 19.2674 70.158 24.2124 65.4055 24.7561C64.1818 24.896 60.9183 25.386 56.2679 25.9459C51.8273 26.5059 41.967 27.8416 45.8482 34.176C48.7503 37.5007 54.8693 37.0807 56.2679 39.0755C57.2796 40.4563 56.3846 41.925 55.2831 42.6306C51.9614 44.7304 44.8692 44.5 38.6803 48.5946C34.4844 51.3944 31.0724 57.6238 29.6738 59.7236C28.6598 61.2634 26.9319 62.7333 25.2186 62.7333H25.1836Z\";\n\n/**\n * The white sheen along the \"F\". Figma keeps it as a separate `stroke-wrapper` layer holding\n * two strokes of this path, one bright radial catching the upper-left edge and one tighter,\n * dimmer one on the lower-right, each softened by a 0.125 blur. The path is authored in its\n * own space, so it is translated into the icon's.\n */\nconst SHEEN_PATH =\n \"M35.1289 0.5H53.6211C54.913 0.50009 55.7831 1.59667 55.7812 2.79004C55.7803 3.37956 55.5637 3.98463 55.0752 4.47559C54.5862 4.96701 53.8087 5.3593 52.6641 5.49023C52.0487 5.56064 50.9224 5.71923 49.376 5.92871C47.8265 6.13861 45.8489 6.4009 43.5254 6.68066H43.5244C41.3126 6.95956 37.6956 7.43662 35.1182 8.65234C33.83 9.25996 32.7564 10.0719 32.2725 11.1787C31.7813 12.3023 31.9256 13.6615 32.9229 15.2891L32.9336 15.3076L32.9473 15.3232C34.4541 17.0493 36.7816 17.7901 38.8438 18.3486C39.8881 18.6315 40.858 18.8657 41.6611 19.1543C42.469 19.4446 43.0484 19.7705 43.3506 20.2012V20.2021L43.3535 20.2061C43.8056 20.8231 43.8288 21.4456 43.6211 22.001C43.4089 22.5682 42.9508 23.0723 42.4355 23.4023C41.6374 23.9066 40.6009 24.2784 39.3789 24.6143C38.1546 24.9507 36.7761 25.2437 35.2852 25.6045C32.3169 26.3228 28.962 27.2971 25.8301 29.3691H25.8291C23.6925 30.7948 21.7689 33.0825 20.2119 35.2588C18.6601 37.428 17.4365 39.5411 16.7529 40.5674L16.752 40.5684C16.2594 41.3163 15.5941 42.0459 14.8486 42.5859C14.1014 43.1272 13.292 43.4658 12.5059 43.4658H12.4707C11.6928 43.4657 11.1355 43.136 10.8057 42.6484C10.4715 42.1545 10.3557 41.475 10.5176 40.7617L10.5186 40.7588C10.6301 40.2436 10.8594 39.4743 11.1201 38.543C11.379 37.6183 11.6645 36.5469 11.8799 35.4521C12.095 34.3585 12.2425 33.2319 12.2207 32.1963C12.1989 31.1638 12.0086 30.1977 11.5283 29.4434L11.5273 29.4424C10.162 27.3106 7.79153 26.4151 5.64746 25.7891C4.55906 25.4713 3.54552 25.2274 2.69434 24.9268C1.94734 24.6628 1.38279 24.3734 1.04004 24L0.907227 23.835C0.427176 23.1353 0.407978 22.4656 0.661133 21.8672C0.888078 21.3308 1.34183 20.8358 1.92285 20.4375L2.17969 20.2725L2.18555 20.2686C2.9743 19.7646 3.95913 19.4161 5.10645 19.1143C6.25684 18.8116 7.53869 18.5636 8.9375 18.2461C11.7223 17.614 14.8966 16.7221 18.0293 14.6318L18.0283 14.6309C21.5049 12.3577 24.6782 7.76408 26.457 5.04102C27.7175 3.11358 28.5882 2.00133 29.7725 1.35254C30.9573 0.703524 32.491 0.5 35.1289 0.5Z\";\nconst SHEEN_OFFSET = \"translate(12.709 19.018)\";\nconst SHEEN_BOX = { width: 56.2812, height: 43.9659 };\n\nconst SHADOW_LAYERS = [\n { dx: 0.824742, dy: 1.64948, blur: 1.64948, opacity: 0.78 },\n { dx: 4.12371, dy: 4.94845, blur: 3.29897, opacity: 0.68 },\n { dx: 9.07216, dy: 11.5464, blur: 4.53608, opacity: 0.4 },\n { dx: 16.4948, dy: 20.6186, blur: 5.36082, opacity: 0.12 },\n { dx: 26.3918, dy: 32.1649, blur: 5.7732, opacity: 0.01 },\n];\n\nconst SHADOW_RGB = \"0 0 0 0 0.054902 0 0 0 0 0.784314 0 0 0 0 0.2\";\nconst ALPHA_MATRIX = \"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0\";\n\nconst GLOW_RGB = \"92, 238, 116\";\nconst GLOW_ALPHAS = [0.08, 0.07, 0.04, 0.01];\nconst GLOW_BY_SIZE = {\n base: [\n { y: 2.667, blur: 2.667 },\n { y: 10.667, blur: 5.333 },\n { y: 24, blur: 8 },\n { y: 40, blur: 9.333 },\n ],\n \"80\": [\n { y: 3.333, blur: 3.333 },\n { y: 13.333, blur: 6.667 },\n { y: 30, blur: 10 },\n { y: 50, blur: 11.667 },\n ],\n};\n\n/**\n * The 3D brand icon: a rounded square with a radial gradient face and a gradient rim, an\n * extruded \"F\" lifted off it by five stacked drop shadows, a white sheen along the \"F\", and\n * a soft green glow cast beneath the whole mark.\n *\n * The SVG filter region is Figma's exact box rather than a generous one, so the inner shadow\n * is clipped exactly where Figma clips it.\n *\n * The mark is clipped to its own box, matching Figma, so the inner shadow never escapes.\n * The green glow is a CSS drop-shadow on the wrapper, so it paints outside the box and is\n * the one part that a parent with `overflow-hidden` will cut off.\n *\n * The glow does not scale with the icon, and that is deliberate. Figma authored it at 64px,\n * scaled it by 1.25 for the 80px mark, and applies those same 64px values unchanged at 48,\n * 32 and 24 — the desktop nav uses the full-strength set on a 24px mark. Scaling it down by\n * size made it visibly too weak there, so both sets are Figma's own numbers. The outermost\n * layer is exported at zero opacity and is omitted.\n */\nexport const Logo3dIcon = ({ className, size }: { className?: string; size: LogoSize }) => {\n const ns = React.useId().replace(/:/g, \"\");\n const filterId = `logo3d-shadow-${ns}`;\n const faceId = `logo3d-face-${ns}`;\n const rimId = `logo3d-rim-${ns}`;\n const markId = `logo3d-mark-${ns}`;\n const sheenBlurId = `logo3d-sheen-blur-${ns}`;\n const sheenTopId = `logo3d-sheen-top-${ns}`;\n const sheenLowId = `logo3d-sheen-low-${ns}`;\n\n const glow = (size === \"80\" ? GLOW_BY_SIZE[\"80\"] : GLOW_BY_SIZE.base)\n .map(({ y, blur }, i) => `drop-shadow(0 ${y}px ${blur}px rgba(${GLOW_RGB}, ${GLOW_ALPHAS[i]}))`)\n .join(\" \");\n\n return (\n <span\n className={cn(\"inline-block overflow-hidden\", className)}\n style={{ filter: glow }}\n aria-hidden=\"true\"\n data-testid=\"logo-icon\"\n >\n <svg\n viewBox=\"0 0 80 80\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n className=\"block size-full\"\n aria-hidden=\"true\"\n >\n <path d={ICON_BG_PATH} fill=\"#49F264\" />\n <path d={ICON_BG_PATH} fill={`url(#${faceId})`} style={{ mixBlendMode: \"lighten\" }} />\n <path d={ICON_STROKE_PATH} stroke={`url(#${rimId})`} strokeWidth=\"0.96016\" />\n <g filter={`url(#${filterId})`}>\n <path fillRule=\"evenodd\" clipRule=\"evenodd\" d={ICON_F_PATH} fill={`url(#${markId})`} />\n </g>\n <g transform={SHEEN_OFFSET}>\n <g filter={`url(#${sheenBlurId})`}>\n <path d={SHEEN_PATH} stroke={`url(#${sheenTopId})`} strokeWidth=\"0.5\" />\n </g>\n <g filter={`url(#${sheenBlurId})`}>\n <path d={SHEEN_PATH} stroke={`url(#${sheenLowId})`} strokeWidth=\"0.5\" />\n </g>\n </g>\n <defs>\n <filter\n id={filterId}\n x=\"10.4884\"\n y=\"17.6179\"\n width=\"96.1936\"\n height=\"88.8267\"\n filterUnits=\"userSpaceOnUse\"\n colorInterpolationFilters=\"sRGB\"\n >\n <feFlood floodOpacity=\"0\" result=\"BackgroundImageFix\" />\n {SHADOW_LAYERS.map((layer, i) => (\n <React.Fragment key={layer.opacity}>\n <feColorMatrix\n in=\"SourceAlpha\"\n type=\"matrix\"\n values={ALPHA_MATRIX}\n result=\"hardAlpha\"\n />\n <feOffset dx={layer.dx} dy={layer.dy} />\n <feGaussianBlur stdDeviation={layer.blur} />\n <feColorMatrix type=\"matrix\" values={`${SHADOW_RGB} 0 0 0 ${layer.opacity} 0`} />\n <feBlend\n mode=\"normal\"\n in2={i === 0 ? \"BackgroundImageFix\" : `shadow${i}`}\n result={`shadow${i + 1}`}\n />\n </React.Fragment>\n ))}\n <feBlend\n mode=\"normal\"\n in=\"SourceGraphic\"\n in2={`shadow${SHADOW_LAYERS.length}`}\n result=\"shape\"\n />\n </filter>\n <radialGradient\n id={faceId}\n cx=\"0\"\n cy=\"0\"\n r=\"1\"\n gradientUnits=\"userSpaceOnUse\"\n gradientTransform=\"translate(40.4124 0) rotate(90) scale(59.7938 77.0544)\"\n >\n <stop stopColor=\"#80F593\" />\n <stop offset=\"1\" stopColor=\"#49F264\" />\n </radialGradient>\n <linearGradient id={rimId} x1=\"40\" y1=\"0\" x2=\"40\" y2=\"80\" gradientUnits=\"userSpaceOnUse\">\n <stop stopColor=\"#ACF6B9\" />\n <stop offset=\"1\" stopColor=\"#0EC833\" />\n </linearGradient>\n <filter\n id={sheenBlurId}\n x=\"0\"\n y=\"0\"\n width={SHEEN_BOX.width}\n height={SHEEN_BOX.height}\n filterUnits=\"userSpaceOnUse\"\n colorInterpolationFilters=\"sRGB\"\n >\n <feFlood floodOpacity=\"0\" result=\"BackgroundImageFix\" />\n <feBlend mode=\"normal\" in=\"SourceGraphic\" in2=\"BackgroundImageFix\" result=\"shape\" />\n <feGaussianBlur stdDeviation=\"0.125\" result=\"sheenBlur\" />\n </filter>\n <radialGradient\n id={sheenTopId}\n cx=\"0\"\n cy=\"0\"\n r=\"1\"\n gradientUnits=\"userSpaceOnUse\"\n gradientTransform=\"translate(18.7874 13.9827) rotate(-127.349) scale(23.9008 34.223)\"\n >\n <stop stopColor=\"white\" stopOpacity=\"0.95\" />\n <stop offset=\"1\" stopColor=\"white\" stopOpacity=\"0\" />\n </radialGradient>\n <radialGradient\n id={sheenLowId}\n cx=\"0\"\n cy=\"0\"\n r=\"1\"\n gradientUnits=\"userSpaceOnUse\"\n gradientTransform=\"translate(31.2874 25.9827) rotate(59.7436) scale(6.94622 9.94611)\"\n >\n <stop stopColor=\"white\" stopOpacity=\"0.6\" />\n <stop offset=\"1\" stopColor=\"white\" stopOpacity=\"0\" />\n </radialGradient>\n <linearGradient\n id={markId}\n x1=\"40.8533\"\n y1=\"19.2674\"\n x2=\"40.8533\"\n y2=\"62.7333\"\n gradientUnits=\"userSpaceOnUse\"\n >\n <stop stopColor=\"#151515\" />\n <stop offset=\"1\" stopColor=\"#151515\" stopOpacity=\"0.7\" />\n </linearGradient>\n </defs>\n </svg>\n </span>\n );\n};\n\nLogo3dIcon.displayName = \"Logo3dIcon\";\n"],"names":["React","jsx","cn","jsxs"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAIA,MAAM,eACJ;AACF,MAAM,mBACJ;AACF,MAAM,cACJ;AA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new Set(["relative", "absolute", "fixed", "sticky"]);
30
+ function surfaceZIndex(element) {
31
+ let zIndex = null;
32
+ const { body } = element.ownerDocument;
33
+ for (let node = element.parentElement; node !== null && node !== body; node = node.parentElement) {
34
+ const { position, zIndex: candidate } = getComputedStyle(node);
35
+ if (POSITIONED.has(position) && candidate !== "" && candidate !== "auto") zIndex = candidate;
36
+ }
37
+ return zIndex;
38
+ }
29
39
  function useLatestRef(value) {
30
40
  const ref = React.useRef(value);
31
41
  React.useLayoutEffect(() => {
@@ -273,12 +283,10 @@ const DropdownMenuReorderGroup = React.forwardRef(
273
283
  measure(drag2);
274
284
  drag2.lifted = true;
275
285
  drag2.dropIndex = computeDropIndex(drag2, pointer.y);
276
- const surface = element.closest('[role="menu"],[role="dialog"]');
277
- const surfaceZIndex = surface === null ? "" : getComputedStyle(surface).zIndex;
278
286
  setLifted({
279
287
  value: drag2.value,
280
288
  width: rect.width,
281
- zIndex: surfaceZIndex === "" || surfaceZIndex === "auto" ? "var(--fanvue-ui-portal-z-index, 50)" : surfaceZIndex
289
+ zIndex: surfaceZIndex(element) ?? "var(--fanvue-ui-portal-z-index, 50)"
282
290
  });
283
291
  setDropIndex(drag2.dropIndex);
284
292
  },
@@ -1 +1 @@
1
- {"version":3,"file":"DropdownMenuReorderGroup.mjs","sources":["../../../src/components/DropdownMenu/DropdownMenuReorderGroup.tsx"],"sourcesContent":["import * as React from \"react\";\nimport { cn } from \"../../utils/cn\";\nimport { DropdownMenuVariantContext } from \"./context\";\nimport {\n type DropdownMenuReorderDetail,\n type RegisteredReorderItem,\n type ReorderActions,\n ReorderActionsContext,\n type ReorderDrag,\n type ReorderLifted,\n ReorderLiftedContext,\n} from \"./reorderShared\";\n\n// Movement, in CSS px, below which a press-and-release on a reorder row still\n// counts as a click rather than a drag lift.\nconst REORDER_LIFT_THRESHOLD_PX = 4;\n\n// Distance from a scrollable menu's top/bottom edge within which a lifted drag\n// auto-scrolls it, and the fastest per-frame scroll step that ramps up as the\n// pointer nears the edge.\nconst REORDER_AUTOSCROLL_ZONE_PX = 32;\nconst REORDER_AUTOSCROLL_MAX_STEP_PX = 8;\n\nconst DEFAULT_REORDER_INSTRUCTIONS = \"Press the up and down arrow keys to move this item.\";\n\nfunction findScrollableAncestor(element: HTMLElement): HTMLElement | null {\n let current = element.parentElement;\n while (current !== null) {\n const { overflowY } = getComputedStyle(current);\n if (\n (overflowY === \"auto\" || overflowY === \"scroll\") &&\n current.scrollHeight > current.clientHeight\n ) {\n return current;\n }\n current = current.parentElement;\n }\n return null;\n}\n\n// How far past the auto-scroll zone the pointer sits: negative above the top\n// zone, positive below the bottom one, 0 when it is clear of both.\nfunction edgeOvershoot(rect: DOMRect, y: number): number {\n if (y < rect.top + REORDER_AUTOSCROLL_ZONE_PX) return y - (rect.top + REORDER_AUTOSCROLL_ZONE_PX);\n if (y > rect.bottom - REORDER_AUTOSCROLL_ZONE_PX) {\n return y - (rect.bottom - REORDER_AUTOSCROLL_ZONE_PX);\n }\n return 0;\n}\n\n// Keeps the latest value of a prop reachable from callbacks that must stay\n// referentially stable (they are handed to imperative listeners and a context).\nfunction useLatestRef<T>(value: T): React.RefObject<T> {\n const ref = React.useRef(value);\n React.useLayoutEffect(() => {\n ref.current = value;\n });\n return ref;\n}\n\nfunction shallowEqualArrays(a: readonly string[], b: readonly string[]): boolean {\n return a.length === b.length && a.every((value, index) => value === b[index]);\n}\nfunction defaultReorderAnnouncement({ label, to, total }: DropdownMenuReorderDetail): string {\n return `${label} moved to position ${to + 1} of ${total}`;\n}\n/** Props for the {@link DropdownMenuReorderGroup} component. */\nexport interface DropdownMenuReorderGroupProps\n extends Omit<React.HTMLAttributes<HTMLDivElement>, \"onChange\"> {\n /**\n * Item values in their current order. Must contain one entry per\n * {@link DropdownMenuReorderItem} child, in the same order the children are\n * rendered.\n */\n values: string[];\n /**\n * Fires after a drop or a keyboard move completes with the new order, plus\n * which item moved and from/to where — enough to call a move-to-position\n * API without diffing the arrays.\n */\n onReorder: (values: string[], detail: DropdownMenuReorderDetail) => void;\n /**\n * Builds the text announced to screen readers after a move. Override to\n * localise it.\n * @default ({ label, to, total }) => `${label} moved to position ${to + 1} of ${total}`\n */\n getAnnouncement?: (detail: DropdownMenuReorderDetail) => string;\n /**\n * Screen-reader instructions attached to every drag handle. Override to\n * localise them.\n * @default \"Press the up and down arrow keys to move this item.\"\n */\n instructions?: string;\n}\n\n/**\n * A drag-to-reorder list of {@link DropdownMenuReorderItem} rows within a\n * dropdown menu — the \"Reorganise\" mode of `V2 Menu Dropdown`. Rows are\n * dragged with the pointer (from anywhere on the row with a mouse, from the\n * drag handle on touch) or moved with ArrowUp/ArrowDown on the focused\n * handle. Works in both the `\"menu\"` and `\"sheet\"` variants — for a long\n * list in a sheet, give the scrolling ancestor `overflow-y-auto` (the sheet\n * only caps its height) so edge auto-scroll has something to scroll.\n *\n * Inside a `\"menu\"`, Tab cycles through the handles and any header actions\n * (Radix menus otherwise swallow Tab), and the first handle takes focus when\n * the menu opens straight into the group.\n *\n * Pair with a {@link DropdownMenuHeader} whose `actions` contains a commit\n * button to exit the reorder mode.\n *\n * @example\n * ```tsx\n * <DropdownMenuReorderGroup\n * values={folders.map((folder) => folder.id)}\n * onReorder={(_, { value, to }) => moveFolder(value, to)}\n * aria-label=\"Reorder folders\"\n * >\n * {folders.map((folder) => (\n * <DropdownMenuReorderItem key={folder.id} value={folder.id} label={folder.name}>\n * {folder.name}\n * </DropdownMenuReorderItem>\n * ))}\n * </DropdownMenuReorderGroup>\n * ```\n */\nexport const DropdownMenuReorderGroup = React.forwardRef<\n HTMLDivElement,\n DropdownMenuReorderGroupProps\n>(\n (\n {\n values,\n onReorder,\n getAnnouncement = defaultReorderAnnouncement,\n instructions = DEFAULT_REORDER_INSTRUCTIONS,\n className,\n children,\n ...props\n },\n ref,\n ) => {\n const variant = React.useContext(DropdownMenuVariantContext);\n const instructionsId = React.useId();\n const groupRef = React.useRef<HTMLDivElement | null>(null);\n const itemsRef = React.useRef(new Map<string, RegisteredReorderItem>());\n const dragRef = React.useRef<ReorderDrag | null>(null);\n const ghostRef = React.useRef<HTMLDivElement | null>(null);\n const scrollContainerRef = React.useRef<HTMLElement | null>(null);\n const lastPointerRef = React.useRef<{ x: number; y: number } | null>(null);\n const autoScrollFrameRef = React.useRef<number | null>(null);\n const dragDisposersRef = React.useRef<Array<() => void>>([]);\n const valuesRef = useLatestRef(values);\n const onReorderRef = useLatestRef(onReorder);\n const getAnnouncementRef = useLatestRef(getAnnouncement);\n const [lifted, setLifted] = React.useState<ReorderLifted | null>(null);\n const [dropIndex, setDropIndex] = React.useState(-1);\n const [announcement, setAnnouncement] = React.useState(\"\");\n\n const registerItem = React.useCallback((value: string, item: RegisteredReorderItem | null) => {\n if (item === null) {\n itemsRef.current.delete(value);\n } else {\n itemsRef.current.set(value, item);\n }\n }, []);\n\n const positionGhost = React.useCallback(() => {\n const drag = dragRef.current;\n const ghost = ghostRef.current;\n const pointer = lastPointerRef.current;\n if (drag === null || ghost === null || pointer === null) return;\n // A transform, not left/top: it moves the ghost on the compositor\n // without invalidating layout, so nothing forces a reflow per move.\n ghost.style.transform = `translate3d(${pointer.x - drag.offsetX}px, ${pointer.y - drag.offsetY}px, 0)`;\n }, []);\n\n const registerGhost = React.useCallback(\n (element: HTMLDivElement | null) => {\n ghostRef.current = element;\n // The ghost mounts in the commit after the lift; place it straight away\n // rather than waiting for the next pointer move.\n if (element !== null) positionGhost();\n },\n [positionGhost],\n );\n\n // Reads every row rect once, in a single batch with no writes in between,\n // so it costs one layout flush per lift instead of one per pointer move.\n const measure = React.useCallback(\n (drag: ReorderDrag) => {\n const group = groupRef.current;\n if (group === null) return;\n const groupTop = group.getBoundingClientRect().top;\n const midpoints: number[] = [];\n const edges: number[] = [];\n let bottom = groupTop;\n for (const value of valuesRef.current) {\n const rect = itemsRef.current.get(value)?.element.getBoundingClientRect();\n if (rect === undefined) {\n midpoints.push(bottom);\n edges.push(bottom - groupTop);\n continue;\n }\n midpoints.push(rect.top + rect.height / 2);\n edges.push(rect.top - groupTop);\n bottom = rect.bottom;\n }\n edges.push(bottom - groupTop);\n drag.midpoints = midpoints;\n drag.edges = edges;\n const container = scrollContainerRef.current;\n drag.scrollTopAtMeasure = container?.scrollTop ?? 0;\n drag.containerRect = container?.getBoundingClientRect() ?? null;\n },\n [valuesRef],\n );\n\n // Rows only move when the container scrolls, so a pointer position in\n // measure-time coordinates is the live one shifted by the scroll delta.\n const computeDropIndex = React.useCallback((drag: ReorderDrag, clientY: number) => {\n const container = scrollContainerRef.current;\n const y = clientY + (container === null ? 0 : container.scrollTop - drag.scrollTopAtMeasure);\n let index = 0;\n for (const midpoint of drag.midpoints) {\n if (midpoint >= y) break;\n index += 1;\n }\n return index;\n }, []);\n\n const refreshDropIndex = React.useCallback(\n (drag: ReorderDrag, clientY: number) => {\n const next = computeDropIndex(drag, clientY);\n if (next === drag.dropIndex) return;\n drag.dropIndex = next;\n setDropIndex(next);\n },\n [computeDropIndex],\n );\n\n const stopAutoScroll = React.useCallback(() => {\n if (autoScrollFrameRef.current === null) return;\n cancelAnimationFrame(autoScrollFrameRef.current);\n autoScrollFrameRef.current = null;\n }, []);\n\n // Runs a frame loop only while the pointer sits in an edge zone of a\n // scrollable container; each frame scrolls one step and the container's\n // scroll event (below) moves the drop target. The loop ends by itself when\n // the pointer leaves the zone or the container runs out of scroll range.\n const updateAutoScroll = React.useCallback(() => {\n const drag = dragRef.current;\n const container = scrollContainerRef.current;\n const pointer = lastPointerRef.current;\n if (\n drag === null ||\n !drag.lifted ||\n container === null ||\n drag.containerRect === null ||\n pointer === null ||\n edgeOvershoot(drag.containerRect, pointer.y) === 0\n ) {\n stopAutoScroll();\n return;\n }\n if (autoScrollFrameRef.current !== null) return;\n const step = () => {\n autoScrollFrameRef.current = null;\n const current = dragRef.current;\n const latest = lastPointerRef.current;\n if (\n current === null ||\n !current.lifted ||\n current.containerRect === null ||\n latest === null\n ) {\n return;\n }\n const overshoot = edgeOvershoot(current.containerRect, latest.y);\n if (overshoot === 0) return;\n const amount = Math.min(Math.ceil(Math.abs(overshoot) / 4), REORDER_AUTOSCROLL_MAX_STEP_PX);\n const before = container.scrollTop;\n container.scrollTop = before + (overshoot < 0 ? -amount : amount);\n // At the end of the scroll range there is nothing more to do until the\n // pointer moves again.\n if (container.scrollTop === before) return;\n autoScrollFrameRef.current = requestAnimationFrame(step);\n };\n autoScrollFrameRef.current = requestAnimationFrame(step);\n }, [stopAutoScroll]);\n\n const clearDrag = React.useCallback(() => {\n stopAutoScroll();\n for (const dispose of dragDisposersRef.current) dispose();\n dragDisposersRef.current = [];\n const drag = dragRef.current;\n dragRef.current = null;\n lastPointerRef.current = null;\n scrollContainerRef.current = null;\n if (drag?.lifted) {\n setLifted(null);\n setDropIndex(-1);\n }\n }, [stopAutoScroll]);\n\n const applyReorder = React.useCallback(\n (value: string, from: number, to: number) => {\n const next = [...valuesRef.current];\n next.splice(from, 1);\n next.splice(to, 0, value);\n const detail: DropdownMenuReorderDetail = {\n value,\n label: itemsRef.current.get(value)?.label ?? value,\n from,\n to,\n total: next.length,\n };\n onReorderRef.current(next, detail);\n setAnnouncement(getAnnouncementRef.current(detail));\n },\n [valuesRef, onReorderRef, getAnnouncementRef],\n );\n\n const endDrag = React.useCallback(\n (pointerId: number, commit: boolean) => {\n const drag = dragRef.current;\n if (drag === null || pointerId !== drag.pointerId) return;\n clearDrag();\n if (!commit || !drag.lifted) return;\n const current = valuesRef.current;\n const from = current.indexOf(drag.value);\n if (from === -1) return;\n const to = Math.max(\n 0,\n Math.min(drag.dropIndex > from ? drag.dropIndex - 1 : drag.dropIndex, current.length - 1),\n );\n if (to === from) return;\n applyReorder(drag.value, from, to);\n },\n [clearDrag, applyReorder, valuesRef],\n );\n\n const startDrag = React.useCallback(\n (value: string, event: React.PointerEvent, element: HTMLDivElement) => {\n // One drag at a time: a second finger cannot hijack the first.\n if (dragRef.current !== null || groupRef.current === null) return false;\n dragRef.current = {\n value,\n pointerId: event.pointerId,\n element,\n startX: event.clientX,\n startY: event.clientY,\n offsetX: 0,\n offsetY: 0,\n lifted: false,\n dropIndex: -1,\n midpoints: [],\n edges: [],\n scrollTopAtMeasure: 0,\n containerRect: null,\n };\n lastPointerRef.current = { x: event.clientX, y: event.clientY };\n\n const view = element.ownerDocument.defaultView ?? window;\n // The row's own pointer handlers end the drag in the normal case. These\n // catch the pointer the row never sees again — the row unmounting\n // mid-drag (a list refetch) or its capture being lost — so a drag can't\n // be left half-finished with its listeners still attached.\n const onPointerUp = (pointerEvent: PointerEvent) => endDrag(pointerEvent.pointerId, true);\n const onPointerCancel = (pointerEvent: PointerEvent) =>\n endDrag(pointerEvent.pointerId, false);\n const onKeyDown = (keyEvent: KeyboardEvent) => {\n // Before the lift a press is still just a press: Escape must keep\n // closing the menu as usual.\n if (keyEvent.key !== \"Escape\" || dragRef.current?.lifted !== true) return;\n // Swallow it entirely so Radix's dismissable layer doesn't also close\n // the whole menu — Escape mid-drag only cancels the drag.\n keyEvent.preventDefault();\n keyEvent.stopPropagation();\n clearDrag();\n };\n view.addEventListener(\"pointerup\", onPointerUp);\n view.addEventListener(\"pointercancel\", onPointerCancel);\n view.addEventListener(\"keydown\", onKeyDown, true);\n dragDisposersRef.current.push(() => {\n view.removeEventListener(\"pointerup\", onPointerUp);\n view.removeEventListener(\"pointercancel\", onPointerCancel);\n view.removeEventListener(\"keydown\", onKeyDown, true);\n });\n return true;\n },\n [endDrag, clearDrag],\n );\n\n const lift = React.useCallback(\n (drag: ReorderDrag, pointer: { x: number; y: number }) => {\n const { element } = drag;\n const rect = element.getBoundingClientRect();\n drag.offsetX = drag.startX - rect.left;\n drag.offsetY = drag.startY - rect.top;\n\n const container = findScrollableAncestor(element);\n scrollContainerRef.current = container;\n if (container !== null) {\n // Covers both edge auto-scroll and the user wheel-scrolling mid-drag:\n // the pointer may not move again, so pointermove alone can't keep the\n // drop target honest.\n const onScroll = () => {\n const current = dragRef.current;\n const latest = lastPointerRef.current;\n if (current === null || !current.lifted || latest === null) return;\n refreshDropIndex(current, latest.y);\n };\n container.addEventListener(\"scroll\", onScroll, { passive: true });\n dragDisposersRef.current.push(() => container.removeEventListener(\"scroll\", onScroll));\n }\n\n measure(drag);\n drag.lifted = true;\n drag.dropIndex = computeDropIndex(drag, pointer.y);\n\n // The ghost is portalled to <body>, outside the menu's stacking context,\n // so it inherits none of the menu's z-index. Match the surface it lifted\n // from (the popper sets its own z, and a consumer may have raised it) —\n // being appended later in the DOM keeps it painted above at equal z.\n const surface = element.closest<HTMLElement>('[role=\"menu\"],[role=\"dialog\"]');\n const surfaceZIndex = surface === null ? \"\" : getComputedStyle(surface).zIndex;\n setLifted({\n value: drag.value,\n width: rect.width,\n zIndex:\n surfaceZIndex === \"\" || surfaceZIndex === \"auto\"\n ? \"var(--fanvue-ui-portal-z-index, 50)\"\n : surfaceZIndex,\n });\n setDropIndex(drag.dropIndex);\n },\n [measure, computeDropIndex, refreshDropIndex],\n );\n\n const updateDrag = React.useCallback(\n (event: React.PointerEvent) => {\n const drag = dragRef.current;\n if (drag === null || event.pointerId !== drag.pointerId) return;\n const pointer = { x: event.clientX, y: event.clientY };\n lastPointerRef.current = pointer;\n if (!drag.lifted) {\n if (\n Math.hypot(pointer.x - drag.startX, pointer.y - drag.startY) <=\n REORDER_LIFT_THRESHOLD_PX\n ) {\n return;\n }\n lift(drag, pointer);\n }\n positionGhost();\n refreshDropIndex(drag, pointer.y);\n updateAutoScroll();\n },\n [lift, positionGhost, refreshDropIndex, updateAutoScroll],\n );\n\n const moveItem = React.useCallback(\n (value: string, delta: number) => {\n const current = valuesRef.current;\n const from = current.indexOf(value);\n const to = from + delta;\n if (from === -1 || to < 0 || to >= current.length) return;\n applyReorder(value, from, to);\n },\n [applyReorder, valuesRef],\n );\n\n // Never leave listeners or a frame loop behind when the group goes away\n // mid-drag (the menu closing, for instance).\n React.useEffect(() => clearDrag, [clearDrag]);\n\n // The list changed under a drag: drop the drag if its row is gone, else\n // re-measure so the indicator tracks the rows' new positions.\n const previousValuesRef = React.useRef(values);\n React.useLayoutEffect(() => {\n if (shallowEqualArrays(previousValuesRef.current, values)) return;\n previousValuesRef.current = values;\n const drag = dragRef.current;\n if (drag === null) return;\n if (!values.includes(drag.value)) {\n clearDrag();\n return;\n }\n if (!drag.lifted) return;\n measure(drag);\n const pointer = lastPointerRef.current;\n if (pointer !== null) refreshDropIndex(drag, pointer.y);\n }, [values, clearDrag, measure, refreshDropIndex]);\n\n // Keyboard reachability inside a Radix menu. Radix parks focus on the menu\n // content when it opens and moves it only between menu items — which\n // these rows are not — so without help a keyboard user could never reach\n // a handle. When the menu opens straight into the group, the first handle\n // takes focus once Radix has finished its own focus work. And if focus has\n // fallen to <body> (the control that switched the menu into reorder mode\n // unmounted under it), Tab lands on the first handle instead of leaving\n // the menu for the page behind it.\n React.useEffect(() => {\n if (variant !== \"menu\") return;\n const group = groupRef.current;\n const menu = group?.closest<HTMLElement>('[role=\"menu\"]') ?? null;\n // Nothing to do outside a menu (the sheet variant, or a bare group).\n if (group === null || menu === null) return;\n const doc = group.ownerDocument;\n const focusFirstHandle = () => {\n const handle = group.querySelector<HTMLElement>(\"button:not(:disabled)\");\n if (handle === null) return false;\n handle.focus({ preventScroll: true });\n return true;\n };\n const frame = requestAnimationFrame(() => {\n const active = doc.activeElement;\n const parkedOnMenu = active === null || active === doc.body || active === menu;\n // A menu that also lists regular items keeps Radix's item-first\n // navigation; only claim focus when the group is all there is.\n const hasMenuItems = menu.querySelector('[role^=\"menuitem\"]') !== null;\n if (parkedOnMenu && !hasMenuItems) focusFirstHandle();\n });\n const rescueTab = (event: KeyboardEvent) => {\n if (event.key !== \"Tab\" || event.altKey || event.ctrlKey || event.metaKey) return;\n const active = doc.activeElement;\n if (active !== null && active !== doc.body) return;\n if (menu.getAttribute(\"data-state\") !== \"open\") return;\n if (focusFirstHandle()) event.preventDefault();\n };\n doc.addEventListener(\"keydown\", rescueTab, true);\n return () => {\n cancelAnimationFrame(frame);\n doc.removeEventListener(\"keydown\", rescueTab, true);\n };\n }, [variant]);\n\n const actions = React.useMemo<ReorderActions>(\n () => ({\n registerItem,\n registerGhost,\n startDrag,\n updateDrag,\n endDrag,\n moveItem,\n instructionsId,\n }),\n [registerItem, registerGhost, startDrag, updateDrag, endDrag, moveItem, instructionsId],\n );\n\n const drag = dragRef.current;\n const liftedFrom = lifted === null ? -1 : values.indexOf(lifted.value);\n const showDropIndicator =\n lifted !== null &&\n drag !== null &&\n dropIndex !== -1 &&\n dropIndex !== liftedFrom &&\n dropIndex !== liftedFrom + 1;\n\n return (\n // biome-ignore lint/a11y/useSemanticElements: <fieldset> carries form semantics and default styling we don't want inside a menu; role=\"group\" is the correct ARIA pattern here\n <div\n ref={(node) => {\n groupRef.current = node;\n if (typeof ref === \"function\") {\n ref(node);\n } else if (ref) {\n ref.current = node;\n }\n }}\n role=\"group\"\n data-dropdown-menu-tab-stops=\"\"\n className={cn(\"relative flex w-full flex-col\", className)}\n {...props}\n >\n <ReorderActionsContext.Provider value={actions}>\n <ReorderLiftedContext.Provider value={lifted}>{children}</ReorderLiftedContext.Provider>\n </ReorderActionsContext.Provider>\n {showDropIndicator && (\n <div\n aria-hidden=\"true\"\n data-reorder-indicator=\"\"\n className=\"pointer-events-none absolute inset-x-3 z-10 flex -translate-y-1/2 items-center\"\n style={{ top: drag.edges[dropIndex] }}\n >\n <span className=\"size-2 shrink-0 rounded-full bg-content-primary\" />\n <span className=\"h-0.5 min-w-0 flex-1 rounded-full bg-content-primary\" />\n </div>\n )}\n <span id={instructionsId} className=\"sr-only\">\n {instructions}\n </span>\n {/* biome-ignore lint/a11y/useSemanticElements: <output> is not appropriate here; using role=\"status\" for live region announcements */}\n <span role=\"status\" aria-live=\"polite\" className=\"sr-only\">\n {announcement}\n </span>\n </div>\n );\n },\n);\nDropdownMenuReorderGroup.displayName = \"DropdownMenuReorderGroup\";\n"],"names":["drag"],"mappings":";;;;;;AAeA,MAAM,4BAA4B;AAKlC,MAAM,6BAA6B;AACnC,MAAM,iCAAiC;AAEvC,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qBACC;AAAA,cAAC;AAAA,cAAA;AAAA,gBACC,eAAY;AAAA,gBACZ,0BAAuB;AAAA,gBACvB,WAAU;AAAA,gBACV,OAAO,EAAE,KAAK,KAAK,MAAM,SAAS,EAAA;AAAA,gBAElC,UAAA;AAAA,kBAAA,oBAAC,QAAA,EAAK,WAAU,kDAAA,CAAkD;AAAA,kBAClE,oBAAC,QAAA,EAAK,WAAU,uDAAA,CAAuD;AAAA,gBAAA;AAAA,cAAA;AAAA,YAAA;AAAA,gCAG1E,QAAA,EAAK,IAAI,gBAAgB,WAAU,WACjC,UAAA,cACH;AAAA,YAEA,oBAAC,UAAK,MAAK,UAAS,aAAU,UAAS,WAAU,WAC9C,UAAA,aAAA,CACH;AAAA,UAAA;AAAA,QAAA;AAAA,MAAA;AAAA;AAAA,EAGN;AACF;AACA,yBAAyB,cAAc;"}
1
+ {"version":3,"file":"DropdownMenuReorderGroup.mjs","sources":["../../../src/components/DropdownMenu/DropdownMenuReorderGroup.tsx"],"sourcesContent":["import * as React from \"react\";\nimport { cn } from \"../../utils/cn\";\nimport { DropdownMenuVariantContext } from \"./context\";\nimport {\n type DropdownMenuReorderDetail,\n type RegisteredReorderItem,\n type ReorderActions,\n ReorderActionsContext,\n type ReorderDrag,\n type ReorderLifted,\n ReorderLiftedContext,\n} from \"./reorderShared\";\n\n// Movement, in CSS px, below which a press-and-release on a reorder row still\n// counts as a click rather than a drag lift.\nconst REORDER_LIFT_THRESHOLD_PX = 4;\n\n// Distance from a scrollable menu's top/bottom edge within which a lifted drag\n// auto-scrolls it, and the fastest per-frame scroll step that ramps up as the\n// pointer nears the edge.\nconst REORDER_AUTOSCROLL_ZONE_PX = 32;\nconst REORDER_AUTOSCROLL_MAX_STEP_PX = 8;\n\nconst DEFAULT_REORDER_INSTRUCTIONS = \"Press the up and down arrow keys to move this item.\";\n\nfunction findScrollableAncestor(element: HTMLElement): HTMLElement | null {\n let current = element.parentElement;\n while (current !== null) {\n const { overflowY } = getComputedStyle(current);\n if (\n (overflowY === \"auto\" || overflowY === \"scroll\") &&\n current.scrollHeight > current.clientHeight\n ) {\n return current;\n }\n current = current.parentElement;\n }\n return null;\n}\n\n// How far past the auto-scroll zone the pointer sits: negative above the top\n// zone, positive below the bottom one, 0 when it is clear of both.\nfunction edgeOvershoot(rect: DOMRect, y: number): number {\n if (y < rect.top + REORDER_AUTOSCROLL_ZONE_PX) return y - (rect.top + REORDER_AUTOSCROLL_ZONE_PX);\n if (y > rect.bottom - REORDER_AUTOSCROLL_ZONE_PX) {\n return y - (rect.bottom - REORDER_AUTOSCROLL_ZONE_PX);\n }\n return 0;\n}\n\nconst POSITIONED = new Set([\"relative\", \"absolute\", \"fixed\", \"sticky\"]);\n\n// The z-index a row's surface paints at, or null when no positioned ancestor\n// carries one. The row's own menu / dialog element is not the place to read\n// it: Radix's popper copies the content's z-index onto its wrapper, which is\n// where the browser applies it — and a host may raise the wrapper further\n// (eden lifts `[data-radix-popper-content-wrapper]` above dialogs with\n// `!important`). Walking up to <body> and taking the outermost positioned\n// ancestor with a numeric z-index finds the value that wins in either variant.\nfunction surfaceZIndex(element: HTMLElement): string | null {\n let zIndex: string | null = null;\n const { body } = element.ownerDocument;\n for (\n let node = element.parentElement;\n node !== null && node !== body;\n node = node.parentElement\n ) {\n const { position, zIndex: candidate } = getComputedStyle(node);\n if (POSITIONED.has(position) && candidate !== \"\" && candidate !== \"auto\") zIndex = candidate;\n }\n return zIndex;\n}\n\n// Keeps the latest value of a prop reachable from callbacks that must stay\n// referentially stable (they are handed to imperative listeners and a context).\nfunction useLatestRef<T>(value: T): React.RefObject<T> {\n const ref = React.useRef(value);\n React.useLayoutEffect(() => {\n ref.current = value;\n });\n return ref;\n}\n\nfunction shallowEqualArrays(a: readonly string[], b: readonly string[]): boolean {\n return a.length === b.length && a.every((value, index) => value === b[index]);\n}\nfunction defaultReorderAnnouncement({ label, to, total }: DropdownMenuReorderDetail): string {\n return `${label} moved to position ${to + 1} of ${total}`;\n}\n/** Props for the {@link DropdownMenuReorderGroup} component. */\nexport interface DropdownMenuReorderGroupProps\n extends Omit<React.HTMLAttributes<HTMLDivElement>, \"onChange\"> {\n /**\n * Item values in their current order. Must contain one entry per\n * {@link DropdownMenuReorderItem} child, in the same order the children are\n * rendered.\n */\n values: string[];\n /**\n * Fires after a drop or a keyboard move completes with the new order, plus\n * which item moved and from/to where — enough to call a move-to-position\n * API without diffing the arrays.\n */\n onReorder: (values: string[], detail: DropdownMenuReorderDetail) => void;\n /**\n * Builds the text announced to screen readers after a move. Override to\n * localise it.\n * @default ({ label, to, total }) => `${label} moved to position ${to + 1} of ${total}`\n */\n getAnnouncement?: (detail: DropdownMenuReorderDetail) => string;\n /**\n * Screen-reader instructions attached to every drag handle. Override to\n * localise them.\n * @default \"Press the up and down arrow keys to move this item.\"\n */\n instructions?: string;\n}\n\n/**\n * A drag-to-reorder list of {@link DropdownMenuReorderItem} rows within a\n * dropdown menu — the \"Reorganise\" mode of `V2 Menu Dropdown`. Rows are\n * dragged with the pointer (from anywhere on the row with a mouse, from the\n * drag handle on touch) or moved with ArrowUp/ArrowDown on the focused\n * handle. Works in both the `\"menu\"` and `\"sheet\"` variants — for a long\n * list in a sheet, give the scrolling ancestor `overflow-y-auto` (the sheet\n * only caps its height) so edge auto-scroll has something to scroll.\n *\n * Inside a `\"menu\"`, Tab cycles through the handles and any header actions\n * (Radix menus otherwise swallow Tab), and the first handle takes focus when\n * the menu opens straight into the group.\n *\n * Pair with a {@link DropdownMenuHeader} whose `actions` contains a commit\n * button to exit the reorder mode.\n *\n * @example\n * ```tsx\n * <DropdownMenuReorderGroup\n * values={folders.map((folder) => folder.id)}\n * onReorder={(_, { value, to }) => moveFolder(value, to)}\n * aria-label=\"Reorder folders\"\n * >\n * {folders.map((folder) => (\n * <DropdownMenuReorderItem key={folder.id} value={folder.id} label={folder.name}>\n * {folder.name}\n * </DropdownMenuReorderItem>\n * ))}\n * </DropdownMenuReorderGroup>\n * ```\n */\nexport const DropdownMenuReorderGroup = React.forwardRef<\n HTMLDivElement,\n DropdownMenuReorderGroupProps\n>(\n (\n {\n values,\n onReorder,\n getAnnouncement = defaultReorderAnnouncement,\n instructions = DEFAULT_REORDER_INSTRUCTIONS,\n className,\n children,\n ...props\n },\n ref,\n ) => {\n const variant = React.useContext(DropdownMenuVariantContext);\n const instructionsId = React.useId();\n const groupRef = React.useRef<HTMLDivElement | null>(null);\n const itemsRef = React.useRef(new Map<string, RegisteredReorderItem>());\n const dragRef = React.useRef<ReorderDrag | null>(null);\n const ghostRef = React.useRef<HTMLDivElement | null>(null);\n const scrollContainerRef = React.useRef<HTMLElement | null>(null);\n const lastPointerRef = React.useRef<{ x: number; y: number } | null>(null);\n const autoScrollFrameRef = React.useRef<number | null>(null);\n const dragDisposersRef = React.useRef<Array<() => void>>([]);\n const valuesRef = useLatestRef(values);\n const onReorderRef = useLatestRef(onReorder);\n const getAnnouncementRef = useLatestRef(getAnnouncement);\n const [lifted, setLifted] = React.useState<ReorderLifted | null>(null);\n const [dropIndex, setDropIndex] = React.useState(-1);\n const [announcement, setAnnouncement] = React.useState(\"\");\n\n const registerItem = React.useCallback((value: string, item: RegisteredReorderItem | null) => {\n if (item === null) {\n itemsRef.current.delete(value);\n } else {\n itemsRef.current.set(value, item);\n }\n }, []);\n\n const positionGhost = React.useCallback(() => {\n const drag = dragRef.current;\n const ghost = ghostRef.current;\n const pointer = lastPointerRef.current;\n if (drag === null || ghost === null || pointer === null) return;\n // A transform, not left/top: it moves the ghost on the compositor\n // without invalidating layout, so nothing forces a reflow per move.\n ghost.style.transform = `translate3d(${pointer.x - drag.offsetX}px, ${pointer.y - drag.offsetY}px, 0)`;\n }, []);\n\n const registerGhost = React.useCallback(\n (element: HTMLDivElement | null) => {\n ghostRef.current = element;\n // The ghost mounts in the commit after the lift; place it straight away\n // rather than waiting for the next pointer move.\n if (element !== null) positionGhost();\n },\n [positionGhost],\n );\n\n // Reads every row rect once, in a single batch with no writes in between,\n // so it costs one layout flush per lift instead of one per pointer move.\n const measure = React.useCallback(\n (drag: ReorderDrag) => {\n const group = groupRef.current;\n if (group === null) return;\n const groupTop = group.getBoundingClientRect().top;\n const midpoints: number[] = [];\n const edges: number[] = [];\n let bottom = groupTop;\n for (const value of valuesRef.current) {\n const rect = itemsRef.current.get(value)?.element.getBoundingClientRect();\n if (rect === undefined) {\n midpoints.push(bottom);\n edges.push(bottom - groupTop);\n continue;\n }\n midpoints.push(rect.top + rect.height / 2);\n edges.push(rect.top - groupTop);\n bottom = rect.bottom;\n }\n edges.push(bottom - groupTop);\n drag.midpoints = midpoints;\n drag.edges = edges;\n const container = scrollContainerRef.current;\n drag.scrollTopAtMeasure = container?.scrollTop ?? 0;\n drag.containerRect = container?.getBoundingClientRect() ?? null;\n },\n [valuesRef],\n );\n\n // Rows only move when the container scrolls, so a pointer position in\n // measure-time coordinates is the live one shifted by the scroll delta.\n const computeDropIndex = React.useCallback((drag: ReorderDrag, clientY: number) => {\n const container = scrollContainerRef.current;\n const y = clientY + (container === null ? 0 : container.scrollTop - drag.scrollTopAtMeasure);\n let index = 0;\n for (const midpoint of drag.midpoints) {\n if (midpoint >= y) break;\n index += 1;\n }\n return index;\n }, []);\n\n const refreshDropIndex = React.useCallback(\n (drag: ReorderDrag, clientY: number) => {\n const next = computeDropIndex(drag, clientY);\n if (next === drag.dropIndex) return;\n drag.dropIndex = next;\n setDropIndex(next);\n },\n [computeDropIndex],\n );\n\n const stopAutoScroll = React.useCallback(() => {\n if (autoScrollFrameRef.current === null) return;\n cancelAnimationFrame(autoScrollFrameRef.current);\n autoScrollFrameRef.current = null;\n }, []);\n\n // Runs a frame loop only while the pointer sits in an edge zone of a\n // scrollable container; each frame scrolls one step and the container's\n // scroll event (below) moves the drop target. The loop ends by itself when\n // the pointer leaves the zone or the container runs out of scroll range.\n const updateAutoScroll = React.useCallback(() => {\n const drag = dragRef.current;\n const container = scrollContainerRef.current;\n const pointer = lastPointerRef.current;\n if (\n drag === null ||\n !drag.lifted ||\n container === null ||\n drag.containerRect === null ||\n pointer === null ||\n edgeOvershoot(drag.containerRect, pointer.y) === 0\n ) {\n stopAutoScroll();\n return;\n }\n if (autoScrollFrameRef.current !== null) return;\n const step = () => {\n autoScrollFrameRef.current = null;\n const current = dragRef.current;\n const latest = lastPointerRef.current;\n if (\n current === null ||\n !current.lifted ||\n current.containerRect === null ||\n latest === null\n ) {\n return;\n }\n const overshoot = edgeOvershoot(current.containerRect, latest.y);\n if (overshoot === 0) return;\n const amount = Math.min(Math.ceil(Math.abs(overshoot) / 4), REORDER_AUTOSCROLL_MAX_STEP_PX);\n const before = container.scrollTop;\n container.scrollTop = before + (overshoot < 0 ? -amount : amount);\n // At the end of the scroll range there is nothing more to do until the\n // pointer moves again.\n if (container.scrollTop === before) return;\n autoScrollFrameRef.current = requestAnimationFrame(step);\n };\n autoScrollFrameRef.current = requestAnimationFrame(step);\n }, [stopAutoScroll]);\n\n const clearDrag = React.useCallback(() => {\n stopAutoScroll();\n for (const dispose of dragDisposersRef.current) dispose();\n dragDisposersRef.current = [];\n const drag = dragRef.current;\n dragRef.current = null;\n lastPointerRef.current = null;\n scrollContainerRef.current = null;\n if (drag?.lifted) {\n setLifted(null);\n setDropIndex(-1);\n }\n }, [stopAutoScroll]);\n\n const applyReorder = React.useCallback(\n (value: string, from: number, to: number) => {\n const next = [...valuesRef.current];\n next.splice(from, 1);\n next.splice(to, 0, value);\n const detail: DropdownMenuReorderDetail = {\n value,\n label: itemsRef.current.get(value)?.label ?? value,\n from,\n to,\n total: next.length,\n };\n onReorderRef.current(next, detail);\n setAnnouncement(getAnnouncementRef.current(detail));\n },\n [valuesRef, onReorderRef, getAnnouncementRef],\n );\n\n const endDrag = React.useCallback(\n (pointerId: number, commit: boolean) => {\n const drag = dragRef.current;\n if (drag === null || pointerId !== drag.pointerId) return;\n clearDrag();\n if (!commit || !drag.lifted) return;\n const current = valuesRef.current;\n const from = current.indexOf(drag.value);\n if (from === -1) return;\n const to = Math.max(\n 0,\n Math.min(drag.dropIndex > from ? drag.dropIndex - 1 : drag.dropIndex, current.length - 1),\n );\n if (to === from) return;\n applyReorder(drag.value, from, to);\n },\n [clearDrag, applyReorder, valuesRef],\n );\n\n const startDrag = React.useCallback(\n (value: string, event: React.PointerEvent, element: HTMLDivElement) => {\n // One drag at a time: a second finger cannot hijack the first.\n if (dragRef.current !== null || groupRef.current === null) return false;\n dragRef.current = {\n value,\n pointerId: event.pointerId,\n element,\n startX: event.clientX,\n startY: event.clientY,\n offsetX: 0,\n offsetY: 0,\n lifted: false,\n dropIndex: -1,\n midpoints: [],\n edges: [],\n scrollTopAtMeasure: 0,\n containerRect: null,\n };\n lastPointerRef.current = { x: event.clientX, y: event.clientY };\n\n const view = element.ownerDocument.defaultView ?? window;\n // The row's own pointer handlers end the drag in the normal case. These\n // catch the pointer the row never sees again — the row unmounting\n // mid-drag (a list refetch) or its capture being lost — so a drag can't\n // be left half-finished with its listeners still attached.\n const onPointerUp = (pointerEvent: PointerEvent) => endDrag(pointerEvent.pointerId, true);\n const onPointerCancel = (pointerEvent: PointerEvent) =>\n endDrag(pointerEvent.pointerId, false);\n const onKeyDown = (keyEvent: KeyboardEvent) => {\n // Before the lift a press is still just a press: Escape must keep\n // closing the menu as usual.\n if (keyEvent.key !== \"Escape\" || dragRef.current?.lifted !== true) return;\n // Swallow it entirely so Radix's dismissable layer doesn't also close\n // the whole menu — Escape mid-drag only cancels the drag.\n keyEvent.preventDefault();\n keyEvent.stopPropagation();\n clearDrag();\n };\n view.addEventListener(\"pointerup\", onPointerUp);\n view.addEventListener(\"pointercancel\", onPointerCancel);\n view.addEventListener(\"keydown\", onKeyDown, true);\n dragDisposersRef.current.push(() => {\n view.removeEventListener(\"pointerup\", onPointerUp);\n view.removeEventListener(\"pointercancel\", onPointerCancel);\n view.removeEventListener(\"keydown\", onKeyDown, true);\n });\n return true;\n },\n [endDrag, clearDrag],\n );\n\n const lift = React.useCallback(\n (drag: ReorderDrag, pointer: { x: number; y: number }) => {\n const { element } = drag;\n const rect = element.getBoundingClientRect();\n drag.offsetX = drag.startX - rect.left;\n drag.offsetY = drag.startY - rect.top;\n\n const container = findScrollableAncestor(element);\n scrollContainerRef.current = container;\n if (container !== null) {\n // Covers both edge auto-scroll and the user wheel-scrolling mid-drag:\n // the pointer may not move again, so pointermove alone can't keep the\n // drop target honest.\n const onScroll = () => {\n const current = dragRef.current;\n const latest = lastPointerRef.current;\n if (current === null || !current.lifted || latest === null) return;\n refreshDropIndex(current, latest.y);\n };\n container.addEventListener(\"scroll\", onScroll, { passive: true });\n dragDisposersRef.current.push(() => container.removeEventListener(\"scroll\", onScroll));\n }\n\n measure(drag);\n drag.lifted = true;\n drag.dropIndex = computeDropIndex(drag, pointer.y);\n\n // The ghost is portalled to <body>, outside the menu's stacking context,\n // so it inherits none of the menu's z-index. Match the z the surface it\n // lifted from actually paints at — being appended later in the DOM keeps\n // the ghost above at equal z.\n setLifted({\n value: drag.value,\n width: rect.width,\n zIndex: surfaceZIndex(element) ?? \"var(--fanvue-ui-portal-z-index, 50)\",\n });\n setDropIndex(drag.dropIndex);\n },\n [measure, computeDropIndex, refreshDropIndex],\n );\n\n const updateDrag = React.useCallback(\n (event: React.PointerEvent) => {\n const drag = dragRef.current;\n if (drag === null || event.pointerId !== drag.pointerId) return;\n const pointer = { x: event.clientX, y: event.clientY };\n lastPointerRef.current = pointer;\n if (!drag.lifted) {\n if (\n Math.hypot(pointer.x - drag.startX, pointer.y - drag.startY) <=\n REORDER_LIFT_THRESHOLD_PX\n ) {\n return;\n }\n lift(drag, pointer);\n }\n positionGhost();\n refreshDropIndex(drag, pointer.y);\n updateAutoScroll();\n },\n [lift, positionGhost, refreshDropIndex, updateAutoScroll],\n );\n\n const moveItem = React.useCallback(\n (value: string, delta: number) => {\n const current = valuesRef.current;\n const from = current.indexOf(value);\n const to = from + delta;\n if (from === -1 || to < 0 || to >= current.length) return;\n applyReorder(value, from, to);\n },\n [applyReorder, valuesRef],\n );\n\n // Never leave listeners or a frame loop behind when the group goes away\n // mid-drag (the menu closing, for instance).\n React.useEffect(() => clearDrag, [clearDrag]);\n\n // The list changed under a drag: drop the drag if its row is gone, else\n // re-measure so the indicator tracks the rows' new positions.\n const previousValuesRef = React.useRef(values);\n React.useLayoutEffect(() => {\n if (shallowEqualArrays(previousValuesRef.current, values)) return;\n previousValuesRef.current = values;\n const drag = dragRef.current;\n if (drag === null) return;\n if (!values.includes(drag.value)) {\n clearDrag();\n return;\n }\n if (!drag.lifted) return;\n measure(drag);\n const pointer = lastPointerRef.current;\n if (pointer !== null) refreshDropIndex(drag, pointer.y);\n }, [values, clearDrag, measure, refreshDropIndex]);\n\n // Keyboard reachability inside a Radix menu. Radix parks focus on the menu\n // content when it opens and moves it only between menu items — which\n // these rows are not — so without help a keyboard user could never reach\n // a handle. When the menu opens straight into the group, the first handle\n // takes focus once Radix has finished its own focus work. And if focus has\n // fallen to <body> (the control that switched the menu into reorder mode\n // unmounted under it), Tab lands on the first handle instead of leaving\n // the menu for the page behind it.\n React.useEffect(() => {\n if (variant !== \"menu\") return;\n const group = groupRef.current;\n const menu = group?.closest<HTMLElement>('[role=\"menu\"]') ?? null;\n // Nothing to do outside a menu (the sheet variant, or a bare group).\n if (group === null || menu === null) return;\n const doc = group.ownerDocument;\n const focusFirstHandle = () => {\n const handle = group.querySelector<HTMLElement>(\"button:not(:disabled)\");\n if (handle === null) return false;\n handle.focus({ preventScroll: true });\n return true;\n };\n const frame = requestAnimationFrame(() => {\n const active = doc.activeElement;\n const parkedOnMenu = active === null || active === doc.body || active === menu;\n // A menu that also lists regular items keeps Radix's item-first\n // navigation; only claim focus when the group is all there is.\n const hasMenuItems = menu.querySelector('[role^=\"menuitem\"]') !== null;\n if (parkedOnMenu && !hasMenuItems) focusFirstHandle();\n });\n const rescueTab = (event: KeyboardEvent) => {\n if (event.key !== \"Tab\" || event.altKey || event.ctrlKey || event.metaKey) return;\n const active = doc.activeElement;\n if (active !== null && active !== doc.body) return;\n if (menu.getAttribute(\"data-state\") !== \"open\") return;\n if (focusFirstHandle()) event.preventDefault();\n };\n doc.addEventListener(\"keydown\", rescueTab, true);\n return () => {\n cancelAnimationFrame(frame);\n doc.removeEventListener(\"keydown\", rescueTab, true);\n };\n }, [variant]);\n\n const actions = React.useMemo<ReorderActions>(\n () => ({\n registerItem,\n registerGhost,\n startDrag,\n updateDrag,\n endDrag,\n moveItem,\n instructionsId,\n }),\n [registerItem, registerGhost, startDrag, updateDrag, endDrag, moveItem, instructionsId],\n );\n\n const drag = dragRef.current;\n const liftedFrom = lifted === null ? -1 : values.indexOf(lifted.value);\n const showDropIndicator =\n lifted !== null &&\n drag !== null &&\n dropIndex !== -1 &&\n dropIndex !== liftedFrom &&\n dropIndex !== liftedFrom + 1;\n\n return (\n // biome-ignore lint/a11y/useSemanticElements: <fieldset> carries form semantics and default styling we don't want inside a menu; role=\"group\" is the correct ARIA pattern here\n <div\n ref={(node) => {\n groupRef.current = node;\n if (typeof ref === \"function\") {\n ref(node);\n } else if (ref) {\n ref.current = node;\n }\n }}\n role=\"group\"\n data-dropdown-menu-tab-stops=\"\"\n className={cn(\"relative flex w-full flex-col\", className)}\n {...props}\n >\n <ReorderActionsContext.Provider value={actions}>\n <ReorderLiftedContext.Provider value={lifted}>{children}</ReorderLiftedContext.Provider>\n </ReorderActionsContext.Provider>\n {showDropIndicator && (\n <div\n aria-hidden=\"true\"\n data-reorder-indicator=\"\"\n className=\"pointer-events-none absolute inset-x-3 z-10 flex -translate-y-1/2 items-center\"\n style={{ top: drag.edges[dropIndex] }}\n >\n <span className=\"size-2 shrink-0 rounded-full bg-content-primary\" />\n <span className=\"h-0.5 min-w-0 flex-1 rounded-full bg-content-primary\" />\n </div>\n )}\n <span id={instructionsId} className=\"sr-only\">\n {instructions}\n </span>\n {/* biome-ignore lint/a11y/useSemanticElements: <output> is not appropriate here; using role=\"status\" for live region announcements */}\n <span role=\"status\" aria-live=\"polite\" className=\"sr-only\">\n {announcement}\n </span>\n </div>\n );\n },\n);\nDropdownMenuReorderGroup.displ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AAS,UAAU;AACnB,gBAAI,OAAO,QAAQ,YAAY;AAC7B,kBAAI,IAAI;AAAA,YACV,WAAW,KAAK;AACd,kBAAI,UAAU;AAAA,YAChB;AAAA,UACF;AAAA,UACA,MAAK;AAAA,UACL,gCAA6B;AAAA,UAC7B,WAAW,GAAG,iCAAiC,SAAS;AAAA,UACvD,GAAG;AAAA,UAEJ,UAAA;AAAA,YAAA,oBAAC,sBAAsB,UAAtB,EAA+B,OAAO,SACrC,UAAA,oBAAC,qBAAqB,UAArB,EAA8B,OAAO,QAAS,SAAA,CAAS,EAAA,CAC1D;AAAA,YACC,qBACC;AAAA,cAAC;AAAA,cAAA;AAAA,gBACC,eAAY;AAAA,gBACZ,0BAAuB;AAAA,gBACvB,WAAU;AAAA,gBACV,OAAO,EAAE,KAAK,KAAK,MAAM,SAAS,EAAA;AAAA,gBAElC,UAAA;AAAA,kBAAA,oBAAC,QAAA,EAAK,WAAU,kDAAA,CAAkD;AAAA,kBAClE,oBAAC,QAAA,EAAK,WAAU,uDAAA,CAAuD;AAAA,gBAAA;AAAA,cAAA;AAAA,YAAA;AAAA,gCAG1E,QAAA,EAAK,IAAI,gBAAgB,WAAU,WACjC,UAAA,cACH;AAAA,YAEA,oBAAC,UAAK,MAAK,UAAS,aAAU,UAAS,WAAU,WAC9C,UAAA,aAAA,CACH;AAAA,UAAA;AAAA,QAAA;AAAA,MAAA;AAAA;AAAA,EAGN;AACF;AACA,yBAAyB,cAAc;"}
@@ -3,6 +3,7 @@ import { jsxs, jsx } from "react/jsx-runtime";
3
3
  import * as React from "react";
4
4
  import { cn } from "../../utils/cn.mjs";
5
5
  import { AGENCIES_ICON_SVG } from "./agenciesIcon.mjs";
6
+ import { Logo3dIcon } from "./Logo3dIcon.mjs";
6
7
  const getLogoColors = (color, variant) => {
7
8
  if (color === "fullColour") {
8
9
  return {
@@ -45,7 +46,8 @@ const sizeClasses = {
45
46
  "32": "h-8",
46
47
  "40": "h-10",
47
48
  "48": "h-12",
48
- "64": "h-16"
49
+ "64": "h-16",
50
+ "80": "h-20"
49
51
  };
50
52
  const ICON_BG_PATH = "M0 11.2339C0 5.02957 5.02957 0 11.2339 0H27.7661C33.9704 0 39 5.02957 39 11.2339V27.7661C39 33.9704 33.9704 39 27.7661 39H11.2339C5.02957 39 0 33.9704 0 27.7661V11.2339Z";
51
53
  const ICON_F_PATH = "M12.277 30.5825C11.4418 30.5825 11.0355 29.8659 11.2059 29.1153C11.4275 28.0916 12.5838 25.0548 11.7145 23.6899C10.4361 21.6938 7.25562 21.9838 6.5397 20.9602C6.02371 20.2089 6.48355 19.478 7.19738 19.0493C8.79967 18.0257 11.902 18.3157 14.9191 16.3025C16.5895 15.2106 18.1237 12.9927 18.993 11.662C20.2203 9.78527 20.7487 9.39287 23.3226 9.39287H32.3376C33.7574 9.39287 34.202 11.8036 31.8852 12.0686C31.2886 12.1368 29.6977 12.3757 27.4306 12.6487C25.2658 12.9216 20.4589 13.5728 22.351 16.6608C23.7658 18.2816 26.7488 18.0769 27.4306 19.0493C27.9238 19.7225 27.4875 20.4384 26.9505 20.7824C25.3311 21.8061 21.8737 21.6938 18.8566 23.6899C16.8111 25.0548 15.1478 28.0916 14.4659 29.1153C13.9716 29.8659 13.1293 30.5825 12.294 30.5825H12.277Z";
@@ -101,6 +103,21 @@ const AgenciesIconSVG = ({ className }) => {
101
103
  }
102
104
  );
103
105
  };
106
+ const LogoIcon = ({
107
+ className,
108
+ variant,
109
+ color,
110
+ glossy,
111
+ size
112
+ }) => {
113
+ if (variant === "3d") {
114
+ return /* @__PURE__ */ jsx(Logo3dIcon, { className: cn("aspect-square", className), size });
115
+ }
116
+ if (glossy) {
117
+ return /* @__PURE__ */ jsx(AgenciesIconSVG, { className });
118
+ }
119
+ return /* @__PURE__ */ jsx(FlatIconSVG, { className, color, variant });
120
+ };
104
121
  const WordmarkSVG = ({ className }) => {
105
122
  return /* @__PURE__ */ jsx(
106
123
  "svg",
@@ -154,9 +171,10 @@ const Logo = React.forwardRef(
154
171
  const colors = getLogoColors(color, variant);
155
172
  const isAgencies = version === "agencies";
156
173
  const isAgenciesFull = isAgencies && variant === "full";
157
- const showIcon = variant === "full" || variant === "icon" || variant === "portrait";
174
+ const is3D = variant === "3d";
175
+ const showIcon = variant === "full" || variant === "icon" || variant === "portrait" || is3D;
158
176
  const showWordmark = variant === "full" || variant === "wordmark" || variant === "portrait";
159
- const resolvedSize = size ?? (variant === "icon" ? "40" : "32");
177
+ const resolvedSize = size ?? (variant === "icon" || is3D ? "40" : "32");
160
178
  const sizeClass = sizeClasses[resolvedSize];
161
179
  const ariaProps = props["aria-label"] ? { role: "img" } : {};
162
180
  const useGlossyIcon = isAgencies && color !== "decolour";
@@ -177,14 +195,16 @@ const Logo = React.forwardRef(
177
195
  ...ariaProps,
178
196
  ...props,
179
197
  children: [
180
- showIcon && (useGlossyIcon ? /* @__PURE__ */ jsx(AgenciesIconSVG, { className: cn("w-auto shrink-0", sizeClass) }) : /* @__PURE__ */ jsx(
181
- FlatIconSVG,
198
+ showIcon && /* @__PURE__ */ jsx(
199
+ LogoIcon,
182
200
  {
183
201
  className: cn("w-auto shrink-0", sizeClass),
202
+ variant,
184
203
  color,
185
- variant
204
+ glossy: useGlossyIcon,
205
+ size: resolvedSize
186
206
  }
187
- )),
207
+ ),
188
208
  showWordmark && (isAgencies ? /* @__PURE__ */ jsx(
189
209
  AgenciesWordmark,
190
210
  {
@@ -1 +1 @@
1
- {"version":3,"file":"Logo.mjs","sources":["../../../src/components/Logo/Logo.tsx"],"sourcesContent":["import * as React from \"react\";\nimport { cn } from \"../../utils/cn\";\nimport { AGENCIES_ICON_SVG } from \"./agenciesIcon\";\n\nconst getLogoColors = (color: LogoColor, variant: LogoVariant) => {\n if (color === \"fullColour\") {\n return {\n icon: \"var(--color-brand-primary-default)\",\n iconInner: \"var(--primitives-color-gray-black)\",\n textClass: \"\",\n };\n }\n\n if (color === \"decolour\") {\n return {\n iconClass: \"fill-[#151515] dark:fill-[#ffffff]\",\n iconInnerClass: \"fill-[#ffffff] dark:fill-[#151515]\",\n textClass: \"\",\n };\n }\n\n if (color === \"whiteAlways\") {\n return {\n icon:\n variant === \"icon\"\n ? \"var(--primitives-color-gray-white)\"\n : \"var(--color-brand-primary-default)\",\n iconInner: \"var(--primitives-color-gray-black)\",\n textClass: \"text-content-always-white\",\n };\n }\n\n if (color === \"blackAlways\") {\n return {\n icon:\n variant === \"icon\"\n ? \"var(--primitives-color-gray-black)\"\n : \"var(--color-brand-primary-default)\",\n iconInner:\n variant === \"icon\"\n ? \"var(--primitives-color-gray-white)\"\n : \"var(--primitives-color-gray-black)\",\n textClass: \"text-content-always-black\",\n };\n }\n\n return {\n icon: \"var(--color-brand-primary-default)\",\n iconInner: \"var(--primitives-color-gray-black)\",\n textClass: \"\",\n };\n};\n\n/** Layout variant of the logo. */\nexport type LogoVariant = \"full\" | \"icon\" | \"wordmark\" | \"portrait\";\n/** Colour scheme of the logo. */\nexport type LogoColor = \"fullColour\" | \"decolour\" | \"whiteAlways\" | \"blackAlways\";\n/** Sub-brand version of the logo. */\nexport type LogoVersion = \"default\" | \"agencies\";\n/** Height of the logo in pixels. Both icon and wordmark scale proportionally. */\nexport type LogoSize = \"16\" | \"20\" | \"24\" | \"32\" | \"40\" | \"48\" | \"64\";\n\nconst sizeClasses: Record<LogoSize, string> = {\n \"16\": \"h-4\",\n \"20\": \"h-5\",\n \"24\": \"h-6\",\n \"32\": \"h-8\",\n \"40\": \"h-10\",\n \"48\": \"h-12\",\n \"64\": \"h-16\",\n};\n\nexport interface LogoProps extends React.HTMLAttributes<HTMLDivElement> {\n /** Layout variant of the logo. @default \"full\" */\n variant?: LogoVariant;\n /** Colour scheme of the logo. @default \"fullColour\" */\n color?: LogoColor;\n /** Sub-brand version of the logo. @default \"default\" */\n version?: LogoVersion;\n /** Height of the logo in pixels. @default \"32\" (or \"40\" when `variant=\"icon\"`) */\n size?: LogoSize;\n /**\n * Accessible label for the logo. Required when `variant` is `\"icon\"` and\n * the logo is used inside interactive contexts (links, buttons).\n *\n * @example \"Fanvue home\"\n */\n \"aria-label\"?: string;\n}\n\nconst ICON_BG_PATH =\n \"M0 11.2339C0 5.02957 5.02957 0 11.2339 0H27.7661C33.9704 0 39 5.02957 39 11.2339V27.7661C39 33.9704 33.9704 39 27.7661 39H11.2339C5.02957 39 0 33.9704 0 27.7661V11.2339Z\";\nconst ICON_F_PATH =\n \"M12.277 30.5825C11.4418 30.5825 11.0355 29.8659 11.2059 29.1153C11.4275 28.0916 12.5838 25.0548 11.7145 23.6899C10.4361 21.6938 7.25562 21.9838 6.5397 20.9602C6.02371 20.2089 6.48355 19.478 7.19738 19.0493C8.79967 18.0257 11.902 18.3157 14.9191 16.3025C16.5895 15.2106 18.1237 12.9927 18.993 11.662C20.2203 9.78527 20.7487 9.39287 23.3226 9.39287H32.3376C33.7574 9.39287 34.202 11.8036 31.8852 12.0686C31.2886 12.1368 29.6977 12.3757 27.4306 12.6487C25.2658 12.9216 20.4589 13.5728 22.351 16.6608C23.7658 18.2816 26.7488 18.0769 27.4306 19.0493C27.9238 19.7225 27.4875 20.4384 26.9505 20.7824C25.3311 21.8061 21.8737 21.6938 18.8566 23.6899C16.8111 25.0548 15.1478 28.0916 14.4659 29.1153C13.9716 29.8659 13.1293 30.5825 12.294 30.5825H12.277Z\";\n\n/** The flat brand icon (rounded square + \"F\" knockout), coloured per scheme. */\nconst FlatIconSVG = ({\n className,\n color,\n variant,\n}: {\n className?: string;\n color: LogoColor;\n variant: LogoVariant;\n}) => {\n const colors = getLogoColors(color, variant);\n return (\n <svg\n viewBox=\"0 0 39 39\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n className={className}\n aria-hidden=\"true\"\n data-testid=\"logo-icon\"\n >\n <path\n d={ICON_BG_PATH}\n {...(color === \"decolour\" ? { className: colors.iconClass } : { fill: colors.icon })}\n />\n <path\n fillRule=\"evenodd\"\n clipRule=\"evenodd\"\n d={ICON_F_PATH}\n {...(color === \"decolour\"\n ? { className: colors.iconInnerClass }\n : { fill: colors.iconInner })}\n />\n </svg>\n );\n};\n\n/**\n * The glossy \"Fanvue Agencies\" gradient icon. Injected as markup so its gradients and\n * blend-mode gloss render intact; `isolate` keeps the blend from reaching the page, and\n * ids are namespaced per instance so multiple logos on a page don't collide.\n */\nconst AgenciesIconSVG = ({ className }: { className?: string }) => {\n const ns = React.useId().replace(/:/g, \"\");\n const html = React.useMemo(\n () =>\n AGENCIES_ICON_SVG.replace(/id=\"([a-z]+)\"/g, `id=\"$1${ns}\"`)\n .replace(/url\\(#([a-z]+)\\)/g, `url(#$1${ns})`)\n .replace(/href=\"#([a-z]+)\"/g, `href=\"#$1${ns}\"`),\n [ns],\n );\n return (\n <span\n className={cn(\"isolate inline-block aspect-square\", className)}\n aria-hidden=\"true\"\n data-testid=\"logo-icon\"\n // biome-ignore lint/security/noDangerouslySetInnerHtml: static asset, ids namespaced per instance\n dangerouslySetInnerHTML={{ __html: html }}\n />\n );\n};\n\nconst WordmarkSVG = ({ className }: { className?: string }) => {\n return (\n <svg\n viewBox=\"0 0 128 30\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n aria-hidden=\"true\"\n className={className}\n data-testid=\"logo-wordmark\"\n >\n <path\n d=\"M89.0679 20.1823C89.0679 23.4373 90.1256 25.553 93.0961 25.553C95.9847 25.553 98.1815 23.0304 98.1815 17.7818V8.01701H102.902V29.0523H98.2629V25.3495C97.1238 27.75 95.2114 29.6218 91.9566 29.6218C86.464 29.6218 84.3888 26.0006 84.3888 21.1589V8.01701H89.0679V20.1823ZM116.586 7.44485C123.787 7.44485 126.717 12.9782 126.757 18.9592C126.757 19.1627 126.757 19.4883 126.716 19.8544H110.523C110.889 23.5569 113.249 25.8353 116.586 25.8353C118.986 25.8353 121.02 24.8995 121.752 22.8245H126.432C125.211 27.0966 121.59 29.6192 116.586 29.6192C110.279 29.6192 106.007 25.1028 106.007 18.4707C106.007 12.0829 110.483 7.44485 116.586 7.44485ZM29.0135 7.40527C35.971 7.40527 37.8834 11.5958 37.8834 16.112V24.2089C37.8834 25.7957 37.965 27.8301 38.2091 29.0508H33.408C33.3266 28.237 33.2858 27.4232 33.2858 26.5688V25.5922H33.2451C32.5534 27.301 30.7633 29.5795 26.5726 29.5796C21.8122 29.5796 19.1673 26.6501 19.1673 23.3137C19.1674 17.4955 26.2876 17.0073 29.3391 16.5191C32.0245 16.1122 33.2451 15.5831 33.2451 13.7929C33.2451 12.1248 31.6581 11.067 29.0949 11.067C26.8165 11.067 25.1484 12.3691 24.6601 14.4441H20.1846C20.7135 11.1078 23.5208 7.40535 29.0135 7.40527ZM66.6676 8.01701C68.4577 13.5504 70.2072 18.8399 71.9568 24.3326H71.9973C73.5435 19.2874 75.4559 13.5911 77.2055 8.01701H82.2099C79.606 15.0559 77.0835 22.0134 74.5202 29.0523H69.312L61.6223 8.01701H66.6676ZM18.3094 4.15021H4.92328V12.2878H17.2107V16.3973H4.92328V29.0508H0V0H18.3094V4.15021ZM52.6473 7.44485C58.099 7.44493 60.2147 11.066 60.2147 15.9077V29.0497H55.536V16.8839C55.536 13.629 54.437 11.5133 51.5078 11.5133C48.5783 11.5133 46.4216 14.036 46.4216 19.2845V29.0497H41.7024V8.01436H46.3406V11.7168C47.4392 9.31627 49.3921 7.44485 52.6473 7.44485ZM33.3265 17.0886C32.879 18.2685 31.7802 19.2856 28.1997 19.9773C25.3111 20.5062 23.8464 21.4015 23.8464 23.1509C23.8464 24.8191 25.2704 26.04 27.7523 26.04C30.5597 26.04 33.3265 24.2902 33.3265 19.2857V17.0886ZM116.586 11.1066C113.249 11.1066 111.011 13.263 110.564 16.5179H122.119C121.834 13.5071 120.085 11.1066 116.586 11.1066Z\"\n fill=\"currentColor\"\n />\n </svg>\n );\n};\n\n/**\n * The \"Fanvue Agencies\" lockup: the wordmark with a right-aligned AGENCIES sub-label.\n * Anchoring the column's font-size to the icon height (1em) sizes the wordmark (0.75em)\n * and label (0.25em) in `em`, so both scale with `size`. `padTop` adds the 0.125em that\n * centres the 0.75em wordmark against the full-height icon in the horizontal lockup.\n */\nconst AgenciesWordmark = ({\n size,\n color,\n textClass,\n padTop,\n}: {\n size: LogoSize;\n color: LogoColor;\n textClass: string;\n padTop: boolean;\n}) => (\n <div\n className={cn(\"inline-flex flex-col items-end\", padTop && \"pt-[0.125em]\")}\n style={{ fontSize: `${size}px` }}\n >\n <WordmarkSVG className={cn(\"h-[0.75em] w-auto\", textClass)} />\n <span\n className=\"font-bold uppercase leading-none\"\n style={{\n color: color === \"decolour\" ? \"currentColor\" : \"var(--primitives-color-purple-300)\",\n fontSize: \"0.25em\",\n letterSpacing: \"0.05em\",\n marginTop: \"0.06em\",\n }}\n >\n AGENCIES\n </span>\n </div>\n);\n\n/**\n * The Fanvue brand logo. Supports full (icon + wordmark), icon-only, wordmark-only, and\n * portrait (stacked) layouts with multiple colour schemes. `version=\"agencies\"` renders the\n * sub-brand lockup: a glossy purple icon and an \"AGENCIES\" label beneath the wordmark.\n *\n * @example\n * ```tsx\n * <Logo variant=\"full\" color=\"fullColour\" />\n * <Logo variant=\"full\" version=\"agencies\" />\n * ```\n */\nexport const Logo = React.forwardRef<HTMLDivElement, LogoProps>(\n (\n { className, variant = \"full\", color = \"fullColour\", version = \"default\", size, ...props },\n ref,\n ) => {\n const colors = getLogoColors(color, variant);\n const isAgencies = version === \"agencies\";\n const isAgenciesFull = isAgencies && variant === \"full\";\n const showIcon = variant === \"full\" || variant === \"icon\" || variant === \"portrait\";\n const showWordmark = variant === \"full\" || variant === \"wordmark\" || variant === \"portrait\";\n const resolvedSize = size ?? (variant === \"icon\" ? \"40\" : \"32\");\n const sizeClass = sizeClasses[resolvedSize];\n\n const ariaProps = props[\"aria-label\"] ? { role: \"img\" as const } : {};\n // The glossy icon only has a purple treatment; decolour falls back to the flat mono icon.\n const useGlossyIcon = isAgencies && color !== \"decolour\";\n\n return (\n <div\n ref={ref}\n data-testid=\"logo\"\n className={cn(\n \"inline-flex text-content-primary\",\n // Agencies full lockup aligns the icon and wordmark by their centres while the\n // AGENCIES label hangs below; every other case centres the row.\n isAgenciesFull ? \"items-start\" : \"items-center\",\n variant === \"portrait\" ? \"flex-col gap-2\" : \"flex-row\",\n variant === \"full\" && \"gap-2\",\n className,\n )}\n {...ariaProps}\n {...props}\n >\n {showIcon &&\n (useGlossyIcon ? (\n <AgenciesIconSVG className={cn(\"w-auto shrink-0\", sizeClass)} />\n ) : (\n <FlatIconSVG\n className={cn(\"w-auto shrink-0\", sizeClass)}\n color={color}\n variant={variant}\n />\n ))}\n {showWordmark &&\n (isAgencies ? (\n <AgenciesWordmark\n size={resolvedSize}\n color={color}\n textClass={colors.textClass}\n padTop={isAgenciesFull}\n />\n ) : (\n <WordmarkSVG className={cn(\"w-auto\", sizeClass, colors.textClass)} />\n ))}\n </div>\n );\n },\n);\n\nLogo.displayName = \"Logo\";\n"],"names":[],"mappings":";;;;;AAIA,MAAM,gBAAgB,CAAC,OAAkB,YAAyB;AAChE,MAAI,UAAU,cAAc;AAC1B,WAAO;AAAA,MACL,MAAM;AAAA,MACN,WAAW;AAAA,MACX,WAAW;AAAA,IAAA;AAAA,EAEf;AAEA,MAAI,UAAU,YAAY;AACxB,WAAO;AAAA,MACL,WAAW;AAAA,MACX,gBAAgB;AAAA,MAChB,WAAW;AAAA,IAAA;AAAA,EAEf;AAEA,MAAI,UAAU,eAAe;AAC3B,WAAO;AAAA,MACL,MACE,YAAY,SACR,uCACA;AAAA,MACN,WAAW;AAAA,MACX,WAAW;AAAA,IAAA;AAAA,EAEf;AAEA,MAAI,UAAU,eAAe;AAC3B,WAAO;AAAA,MACL,MACE,YAAY,SACR,uCACA;AAAA,MACN,WACE,YAAY,SACR,uCACA;AAAA,MACN,WAAW;AAAA,IAAA;AAAA,EAEf;AAEA,SAAO;AAAA,IACL,MAAM;AAAA,IACN,WAAW;AAAA,IACX,WAAW;AAAA,EAAA;AAEf;AAWA,MAAM,cAAwC;AAAA,EAC5C,MAAM;AAAA,EACN,MAAM;AAAA,EAC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Y,MAAM,YAAY,IAAI,EAAE,MAAM,MAAA,IAAmB,CAAA;AAEnE,UAAM,gBAAgB,cAAc,UAAU;AAE9C,WACE;AAAA,MAAC;AAAA,MAAA;AAAA,QACC;AAAA,QACA,eAAY;AAAA,QACZ,WAAW;AAAA,UACT;AAAA;AAAA;AAAA,UAGA,iBAAiB,gBAAgB;AAAA,UACjC,YAAY,aAAa,mBAAmB;AAAA,UAC5C,YAAY,UAAU;AAAA,UACtB;AAAA,QAAA;AAAA,QAED,GAAG;AAAA,QACH,GAAG;AAAA,QAEH,UAAA;AAAA,UAAA,aACE,oCACE,iBAAA,EAAgB,WAAW,GAAG,mBAAmB,SAAS,GAAG,IAE9D;AAAA,YAAC;AAAA,YAAA;AAAA,cACC,WAAW,GAAG,mBAAmB,SAAS;AAAA,cAC1C;AAAA,cACA;AAAA,YAAA;AAAA,UAAA;AAAA,UAGL,iBACE,aACC;AAAA,YAAC;AAAA,YAAA;AAAA,cACC,MAAM;AAAA,cACN;AAAA,cACA,WAAW,OAAO;AAAA,cAClB,QAAQ;AAAA,YAAA;AAAA,UAAA,wBAGT,aAAA,EAAY,WAAW,GAAG,UAAU,WAAW,OAAO,SAAS,GAAG;AAAA,QAAA;AAAA,MAAA;AAAA,IAAA;AAAA,EAI7E;AACF;AAEA,KAAK,cAAc;"}
1
+ {"version":3,"file":"Logo.mjs","sources":["../../../src/components/Logo/Logo.tsx"],"sourcesContent":["import * as React from \"react\";\nimport { cn } from \"../../utils/cn\";\nimport { AGENCIES_ICON_SVG } from \"./agenciesIcon\";\nimport { Logo3dIcon } from \"./Logo3dIcon\";\n\nconst getLogoColors = (color: LogoColor, variant: LogoVariant) => {\n if (color === \"fullColour\") {\n return {\n icon: \"var(--color-brand-primary-default)\",\n iconInner: \"var(--primitives-color-gray-black)\",\n textClass: \"\",\n };\n }\n\n if (color === \"decolour\") {\n return {\n iconClass: \"fill-[#151515] dark:fill-[#ffffff]\",\n iconInnerClass: \"fill-[#ffffff] dark:fill-[#151515]\",\n textClass: \"\",\n };\n }\n\n if (color === \"whiteAlways\") {\n return {\n icon:\n variant === \"icon\"\n ? \"var(--primitives-color-gray-white)\"\n : \"var(--color-brand-primary-default)\",\n iconInner: \"var(--primitives-color-gray-black)\",\n textClass: \"text-content-always-white\",\n };\n }\n\n if (color === \"blackAlways\") {\n return {\n icon:\n variant === \"icon\"\n ? \"var(--primitives-color-gray-black)\"\n : \"var(--color-brand-primary-default)\",\n iconInner:\n variant === \"icon\"\n ? \"var(--primitives-color-gray-white)\"\n : \"var(--primitives-color-gray-black)\",\n textClass: \"text-content-always-black\",\n };\n }\n\n return {\n icon: \"var(--color-brand-primary-default)\",\n iconInner: \"var(--primitives-color-gray-black)\",\n textClass: \"\",\n };\n};\n\n/** Layout variant of the logo. `\"3d\"` is the icon-only 3D brand mark. */\nexport type LogoVariant = \"full\" | \"icon\" | \"wordmark\" | \"portrait\" | \"3d\";\n/** Colour scheme of the logo. */\nexport type LogoColor = \"fullColour\" | \"decolour\" | \"whiteAlways\" | \"blackAlways\";\n/** Sub-brand version of the logo. */\nexport type LogoVersion = \"default\" | \"agencies\";\n/** Height of the logo in pixels. Both icon and wordmark scale proportionally. */\nexport type LogoSize = \"16\" | \"20\" | \"24\" | \"32\" | \"40\" | \"48\" | \"64\" | \"80\";\n\nconst sizeClasses: Record<LogoSize, string> = {\n \"16\": \"h-4\",\n \"20\": \"h-5\",\n \"24\": \"h-6\",\n \"32\": \"h-8\",\n \"40\": \"h-10\",\n \"48\": \"h-12\",\n \"64\": \"h-16\",\n \"80\": \"h-20\",\n};\n\nexport interface LogoProps extends React.HTMLAttributes<HTMLDivElement> {\n /** Layout variant of the logo. @default \"full\" */\n variant?: LogoVariant;\n /** Colour scheme of the logo. @default \"fullColour\" */\n color?: LogoColor;\n /** Sub-brand version of the logo. @default \"default\" */\n version?: LogoVersion;\n /** Height of the logo in pixels. @default \"32\" (or \"40\" when `variant` is `\"icon\"` or `\"3d\"`) */\n size?: LogoSize;\n /**\n * Accessible label for the logo. Required when `variant` is `\"icon\"` or `\"3d\"`\n * and the logo is used inside interactive contexts (links, buttons).\n *\n * @example \"Fanvue home\"\n */\n \"aria-label\"?: string;\n}\n\nconst ICON_BG_PATH =\n \"M0 11.2339C0 5.02957 5.02957 0 11.2339 0H27.7661C33.9704 0 39 5.02957 39 11.2339V27.7661C39 33.9704 33.9704 39 27.7661 39H11.2339C5.02957 39 0 33.9704 0 27.7661V11.2339Z\";\nconst ICON_F_PATH =\n \"M12.277 30.5825C11.4418 30.5825 11.0355 29.8659 11.2059 29.1153C11.4275 28.0916 12.5838 25.0548 11.7145 23.6899C10.4361 21.6938 7.25562 21.9838 6.5397 20.9602C6.02371 20.2089 6.48355 19.478 7.19738 19.0493C8.79967 18.0257 11.902 18.3157 14.9191 16.3025C16.5895 15.2106 18.1237 12.9927 18.993 11.662C20.2203 9.78527 20.7487 9.39287 23.3226 9.39287H32.3376C33.7574 9.39287 34.202 11.8036 31.8852 12.0686C31.2886 12.1368 29.6977 12.3757 27.4306 12.6487C25.2658 12.9216 20.4589 13.5728 22.351 16.6608C23.7658 18.2816 26.7488 18.0769 27.4306 19.0493C27.9238 19.7225 27.4875 20.4384 26.9505 20.7824C25.3311 21.8061 21.8737 21.6938 18.8566 23.6899C16.8111 25.0548 15.1478 28.0916 14.4659 29.1153C13.9716 29.8659 13.1293 30.5825 12.294 30.5825H12.277Z\";\n\n/** The flat brand icon (rounded square + \"F\" knockout), coloured per scheme. */\nconst FlatIconSVG = ({\n className,\n color,\n variant,\n}: {\n className?: string;\n color: LogoColor;\n variant: LogoVariant;\n}) => {\n const colors = getLogoColors(color, variant);\n return (\n <svg\n viewBox=\"0 0 39 39\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n className={className}\n aria-hidden=\"true\"\n data-testid=\"logo-icon\"\n >\n <path\n d={ICON_BG_PATH}\n {...(color === \"decolour\" ? { className: colors.iconClass } : { fill: colors.icon })}\n />\n <path\n fillRule=\"evenodd\"\n clipRule=\"evenodd\"\n d={ICON_F_PATH}\n {...(color === \"decolour\"\n ? { className: colors.iconInnerClass }\n : { fill: colors.iconInner })}\n />\n </svg>\n );\n};\n\n/**\n * The glossy \"Fanvue Agencies\" gradient icon. Injected as markup so its gradients and\n * blend-mode gloss render intact; `isolate` keeps the blend from reaching the page, and\n * ids are namespaced per instance so multiple logos on a page don't collide.\n */\nconst AgenciesIconSVG = ({ className }: { className?: string }) => {\n const ns = React.useId().replace(/:/g, \"\");\n const html = React.useMemo(\n () =>\n AGENCIES_ICON_SVG.replace(/id=\"([a-z]+)\"/g, `id=\"$1${ns}\"`)\n .replace(/url\\(#([a-z]+)\\)/g, `url(#$1${ns})`)\n .replace(/href=\"#([a-z]+)\"/g, `href=\"#$1${ns}\"`),\n [ns],\n );\n return (\n <span\n className={cn(\"isolate inline-block aspect-square\", className)}\n aria-hidden=\"true\"\n data-testid=\"logo-icon\"\n // biome-ignore lint/security/noDangerouslySetInnerHtml: static asset, ids namespaced per instance\n dangerouslySetInnerHTML={{ __html: html }}\n />\n );\n};\n\n/** Picks the icon treatment for the variant: 3D mark, glossy agencies icon, or the flat one. */\nconst LogoIcon = ({\n className,\n variant,\n color,\n glossy,\n size,\n}: {\n className?: string;\n variant: LogoVariant;\n color: LogoColor;\n glossy: boolean;\n size: LogoSize;\n}) => {\n if (variant === \"3d\") {\n return <Logo3dIcon className={cn(\"aspect-square\", className)} size={size} />;\n }\n if (glossy) {\n return <AgenciesIconSVG className={className} />;\n }\n return <FlatIconSVG className={className} color={color} variant={variant} />;\n};\n\nconst WordmarkSVG = ({ className }: { className?: string }) => {\n return (\n <svg\n viewBox=\"0 0 128 30\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n aria-hidden=\"true\"\n className={className}\n data-testid=\"logo-wordmark\"\n >\n <path\n d=\"M89.0679 20.1823C89.0679 23.4373 90.1256 25.553 93.0961 25.553C95.9847 25.553 98.1815 23.0304 98.1815 17.7818V8.01701H102.902V29.0523H98.2629V25.3495C97.1238 27.75 95.2114 29.6218 91.9566 29.6218C86.464 29.6218 84.3888 26.0006 84.3888 21.1589V8.01701H89.0679V20.1823ZM116.586 7.44485C123.787 7.44485 126.717 12.9782 126.757 18.9592C126.757 19.1627 126.757 19.4883 126.716 19.8544H110.523C110.889 23.5569 113.249 25.8353 116.586 25.8353C118.986 25.8353 121.02 24.8995 121.752 22.8245H126.432C125.211 27.0966 121.59 29.6192 116.586 29.6192C110.279 29.6192 106.007 25.1028 106.007 18.4707C106.007 12.0829 110.483 7.44485 116.586 7.44485ZM29.0135 7.40527C35.971 7.40527 37.8834 11.5958 37.8834 16.112V24.2089C37.8834 25.7957 37.965 27.8301 38.2091 29.0508H33.408C33.3266 28.237 33.2858 27.4232 33.2858 26.5688V25.5922H33.2451C32.5534 27.301 30.7633 29.5795 26.5726 29.5796C21.8122 29.5796 19.1673 26.6501 19.1673 23.3137C19.1674 17.4955 26.2876 17.0073 29.3391 16.5191C32.0245 16.1122 33.2451 15.5831 33.2451 13.7929C33.2451 12.1248 31.6581 11.067 29.0949 11.067C26.8165 11.067 25.1484 12.3691 24.6601 14.4441H20.1846C20.7135 11.1078 23.5208 7.40535 29.0135 7.40527ZM66.6676 8.01701C68.4577 13.5504 70.2072 18.8399 71.9568 24.3326H71.9973C73.5435 19.2874 75.4559 13.5911 77.2055 8.01701H82.2099C79.606 15.0559 77.0835 22.0134 74.5202 29.0523H69.312L61.6223 8.01701H66.6676ZM18.3094 4.15021H4.92328V12.2878H17.2107V16.3973H4.92328V29.0508H0V0H18.3094V4.15021ZM52.6473 7.44485C58.099 7.44493 60.2147 11.066 60.2147 15.9077V29.0497H55.536V16.8839C55.536 13.629 54.437 11.5133 51.5078 11.5133C48.5783 11.5133 46.4216 14.036 46.4216 19.2845V29.0497H41.7024V8.01436H46.3406V11.7168C47.4392 9.31627 49.3921 7.44485 52.6473 7.44485ZM33.3265 17.0886C32.879 18.2685 31.7802 19.2856 28.1997 19.9773C25.3111 20.5062 23.8464 21.4015 23.8464 23.1509C23.8464 24.8191 25.2704 26.04 27.7523 26.04C30.5597 26.04 33.3265 24.2902 33.3265 19.2857V17.0886ZM116.586 11.1066C113.249 11.1066 111.011 13.263 110.564 16.5179H122.119C121.834 13.5071 120.085 11.1066 116.586 11.1066Z\"\n fill=\"currentColor\"\n />\n </svg>\n );\n};\n\n/**\n * The \"Fanvue Agencies\" lockup: the wordmark with a right-aligned AGENCIES sub-label.\n * Anchoring the column's font-size to the icon height (1em) sizes the wordmark (0.75em)\n * and label (0.25em) in `em`, so both scale with `size`. `padTop` adds the 0.125em that\n * centres the 0.75em wordmark against the full-height icon in the horizontal lockup.\n */\nconst AgenciesWordmark = ({\n size,\n color,\n textClass,\n padTop,\n}: {\n size: LogoSize;\n color: LogoColor;\n textClass: string;\n padTop: boolean;\n}) => (\n <div\n className={cn(\"inline-flex flex-col items-end\", padTop && \"pt-[0.125em]\")}\n style={{ fontSize: `${size}px` }}\n >\n <WordmarkSVG className={cn(\"h-[0.75em] w-auto\", textClass)} />\n <span\n className=\"font-bold uppercase leading-none\"\n style={{\n color: color === \"decolour\" ? \"currentColor\" : \"var(--primitives-color-purple-300)\",\n fontSize: \"0.25em\",\n letterSpacing: \"0.05em\",\n marginTop: \"0.06em\",\n }}\n >\n AGENCIES\n </span>\n </div>\n);\n\n/**\n * The Fanvue brand logo. Supports full (icon + wordmark), icon-only, wordmark-only, and\n * portrait (stacked) layouts with multiple colour schemes. `version=\"agencies\"` renders the\n * sub-brand lockup: a glossy purple icon and an \"AGENCIES\" label beneath the wordmark.\n *\n * `variant=\"3d\"` renders the icon-only 3D brand mark. It is an additional mark rather than a\n * replacement for the flat one, and it has a single fixed treatment, so `color` and `version`\n * do not apply to it. The mark itself is clipped to its own box, but it casts a soft green\n * glow beneath, which a parent with `overflow-hidden` will cut off.\n *\n * @example\n * ```tsx\n * <Logo variant=\"full\" color=\"fullColour\" />\n * <Logo variant=\"full\" version=\"agencies\" />\n * <Logo variant=\"3d\" size=\"24\" aria-label=\"Fanvue\" />\n * ```\n */\nexport const Logo = React.forwardRef<HTMLDivElement, LogoProps>(\n (\n { className, variant = \"full\", color = \"fullColour\", version = \"default\", size, ...props },\n ref,\n ) => {\n const colors = getLogoColors(color, variant);\n const isAgencies = version === \"agencies\";\n const isAgenciesFull = isAgencies && variant === \"full\";\n const is3D = variant === \"3d\";\n const showIcon = variant === \"full\" || variant === \"icon\" || variant === \"portrait\" || is3D;\n const showWordmark = variant === \"full\" || variant === \"wordmark\" || variant === \"portrait\";\n const resolvedSize = size ?? (variant === \"icon\" || is3D ? \"40\" : \"32\");\n const sizeClass = sizeClasses[resolvedSize];\n\n const ariaProps = props[\"aria-label\"] ? { role: \"img\" as const } : {};\n // The glossy icon only has a purple treatment; decolour falls back to the flat mono icon.\n const useGlossyIcon = isAgencies && color !== \"decolour\";\n\n return (\n <div\n ref={ref}\n data-testid=\"logo\"\n className={cn(\n \"inline-flex text-content-primary\",\n // Agencies full lockup aligns the icon and wordmark by their centres while the\n // AGENCIES label hangs below; every other case centres the row.\n isAgenciesFull ? \"items-start\" : \"items-center\",\n variant === \"portrait\" ? \"flex-col gap-2\" : \"flex-row\",\n variant === \"full\" && \"gap-2\",\n className,\n )}\n {...ariaProps}\n {...props}\n >\n {showIcon && (\n <LogoIcon\n className={cn(\"w-auto shrink-0\", sizeClass)}\n variant={variant}\n color={color}\n glossy={useGlossyIcon}\n size={resolvedSize}\n />\n )}\n {showWordmark &&\n (isAgencies ? (\n <AgenciesWordmark\n size={resolvedSize}\n color={color}\n textClass={colors.textClass}\n padTop={isAgenciesFull}\n />\n ) : (\n <WordmarkSVG className={cn(\"w-auto\", sizeClass, colors.textClass)} />\n ))}\n </div>\n );\n },\n);\n\nLogo.displayName = \"Logo\";\n"],"names":[],"mappings":";;;;;;AAKA,MAAM,gBAAgB,CAAC,OAAkB,YAAyB;AAChE,MAAI,UAAU,cAAc;AAC1B,WAAO;AAAA,MACL,MAAM;AAAA,MACN,WAAW;AAAA,MACX,WAAW;A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QAED,GAAG;AAAA,QACH,GAAG;AAAA,QAEH,UAAA;AAAA,UAAA,YACC;AAAA,YAAC;AAAA,YAAA;AAAA,cACC,WAAW,GAAG,mBAAmB,SAAS;AAAA,cAC1C;AAAA,cACA;AAAA,cACA,QAAQ;AAAA,cACR,MAAM;AAAA,YAAA;AAAA,UAAA;AAAA,UAGT,iBACE,aACC;AAAA,YAAC;AAAA,YAAA;AAAA,cACC,MAAM;AAAA,cACN;AAAA,cACA,WAAW,OAAO;AAAA,cAClB,QAAQ;AAAA,YAAA;AAAA,UAAA,wBAGT,aAAA,EAAY,WAAW,GAAG,UAAU,WAAW,OAAO,SAAS,GAAG;AAAA,QAAA;AAAA,MAAA;AAAA,IAAA;AAAA,EAI7E;AACF;AAEA,KAAK,cAAc;"}
@@ -0,0 +1,209 @@
1
+ "use client";
2
+ import { jsx, jsxs } from "react/jsx-runtime";
3
+ import * as React from "react";
4
+ import { cn } from "../../utils/cn.mjs";
5
+ const ICON_BG_PATH = "M0 23.0438C0 10.3171 10.3171 0 23.0438 0H56.9562C69.6829 0 80 10.3171 80 23.0438V56.9562C80 69.6829 69.6829 80 56.9562 80H23.0438C10.3171 80 0 69.6829 0 56.9562V23.0438Z";
6
+ const ICON_STROKE_PATH = "M23.0439 0.480469H56.9561C69.4177 0.480469 79.5195 10.5823 79.5195 23.0439V56.9561C79.5195 69.4177 69.4177 79.5195 56.9561 79.5195H23.0439C10.5823 79.5195 0.480469 69.4177 0.480469 56.9561V23.0439C0.480469 10.5823 10.5823 0.480469 23.0439 0.480469Z";
7
+ const ICON_F_PATH = "M25.1836 62.7333C23.4703 62.7333 22.6369 61.2634 22.9866 59.7236C23.4412 57.6238 25.813 51.3944 24.0297 48.5946C21.4073 44.5 14.8834 45.095 13.4148 42.9952C12.3564 41.4542 13.2996 39.9549 14.7639 39.0755C18.0507 36.9757 24.4144 37.5707 30.6033 33.4411C34.0299 31.2013 37.1768 26.6517 38.96 23.922C41.4775 20.0723 42.5615 19.2674 47.8412 19.2674H66.3336C69.246 19.2674 70.158 24.2124 65.4055 24.7561C64.1818 24.896 60.9183 25.386 56.2679 25.9459C51.8273 26.5059 41.967 27.8416 45.8482 34.176C48.7503 37.5007 54.8693 37.0807 56.2679 39.0755C57.2796 40.4563 56.3846 41.925 55.2831 42.6306C51.9614 44.7304 44.8692 44.5 38.6803 48.5946C34.4844 51.3944 31.0724 57.6238 29.6738 59.7236C28.6598 61.2634 26.9319 62.7333 25.2186 62.7333H25.1836Z";
8
+ const SHEEN_PATH = "M35.1289 0.5H53.6211C54.913 0.50009 55.7831 1.59667 55.7812 2.79004C55.7803 3.37956 55.5637 3.98463 55.0752 4.47559C54.5862 4.96701 53.8087 5.3593 52.6641 5.49023C52.0487 5.56064 50.9224 5.71923 49.376 5.92871C47.8265 6.13861 45.8489 6.4009 43.5254 6.68066H43.5244C41.3126 6.95956 37.6956 7.43662 35.1182 8.65234C33.83 9.25996 32.7564 10.0719 32.2725 11.1787C31.7813 12.3023 31.9256 13.6615 32.9229 15.2891L32.9336 15.3076L32.9473 15.3232C34.4541 17.0493 36.7816 17.7901 38.8438 18.3486C39.8881 18.6315 40.858 18.8657 41.6611 19.1543C42.469 19.4446 43.0484 19.7705 43.3506 20.2012V20.2021L43.3535 20.2061C43.8056 20.8231 43.8288 21.4456 43.6211 22.001C43.4089 22.5682 42.9508 23.0723 42.4355 23.4023C41.6374 23.9066 40.6009 24.2784 39.3789 24.6143C38.1546 24.9507 36.7761 25.2437 35.2852 25.6045C32.3169 26.3228 28.962 27.2971 25.8301 29.3691H25.8291C23.6925 30.7948 21.7689 33.0825 20.2119 35.2588C18.6601 37.428 17.4365 39.5411 16.7529 40.5674L16.752 40.5684C16.2594 41.3163 15.5941 42.0459 14.8486 42.5859C14.1014 43.1272 13.292 43.4658 12.5059 43.4658H12.4707C11.6928 43.4657 11.1355 43.136 10.8057 42.6484C10.4715 42.1545 10.3557 41.475 10.5176 40.7617L10.5186 40.7588C10.6301 40.2436 10.8594 39.4743 11.1201 38.543C11.379 37.6183 11.6645 36.5469 11.8799 35.4521C12.095 34.3585 12.2425 33.2319 12.2207 32.1963C12.1989 31.1638 12.0086 30.1977 11.5283 29.4434L11.5273 29.4424C10.162 27.3106 7.79153 26.4151 5.64746 25.7891C4.55906 25.4713 3.54552 25.2274 2.69434 24.9268C1.94734 24.6628 1.38279 24.3734 1.04004 24L0.907227 23.835C0.427176 23.1353 0.407978 22.4656 0.661133 21.8672C0.888078 21.3308 1.34183 20.8358 1.92285 20.4375L2.17969 20.2725L2.18555 20.2686C2.9743 19.7646 3.95913 19.4161 5.10645 19.1143C6.25684 18.8116 7.53869 18.5636 8.9375 18.2461C11.7223 17.614 14.8966 16.7221 18.0293 14.6318L18.0283 14.6309C21.5049 12.3577 24.6782 7.76408 26.457 5.04102C27.7175 3.11358 28.5882 2.00133 29.7725 1.35254C30.9573 0.703524 32.491 0.5 35.1289 0.5Z";
9
+ const SHEEN_OFFSET = "translate(12.709 19.018)";
10
+ const SHEEN_BOX = { width: 56.2812, height: 43.9659 };
11
+ const SHADOW_LAYERS = [
12
+ { dx: 0.824742, dy: 1.64948, blur: 1.64948, opacity: 0.78 },
13
+ { dx: 4.12371, dy: 4.94845, blur: 3.29897, opacity: 0.68 },
14
+ { dx: 9.07216, dy: 11.5464, blur: 4.53608, opacity: 0.4 },
15
+ { dx: 16.4948, dy: 20.6186, blur: 5.36082, opacity: 0.12 },
16
+ { dx: 26.3918, dy: 32.1649, blur: 5.7732, opacity: 0.01 }
17
+ ];
18
+ const SHADOW_RGB = "0 0 0 0 0.054902 0 0 0 0 0.784314 0 0 0 0 0.2";
19
+ const ALPHA_MATRIX = "0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0";
20
+ const GLOW_RGB = "92, 238, 116";
21
+ const GLOW_ALPHAS = [0.08, 0.07, 0.04, 0.01];
22
+ const GLOW_BY_SIZE = {
23
+ base: [
24
+ { y: 2.667, blur: 2.667 },
25
+ { y: 10.667, blur: 5.333 },
26
+ { y: 24, blur: 8 },
27
+ { y: 40, blur: 9.333 }
28
+ ],
29
+ "80": [
30
+ { y: 3.333, blur: 3.333 },
31
+ { y: 13.333, blur: 6.667 },
32
+ { y: 30, blur: 10 },
33
+ { y: 50, blur: 11.667 }
34
+ ]
35
+ };
36
+ const Logo3dIcon = ({ className, size }) => {
37
+ const ns = React.useId().replace(/:/g, "");
38
+ const filterId = `logo3d-shadow-${ns}`;
39
+ const faceId = `logo3d-face-${ns}`;
40
+ const rimId = `logo3d-rim-${ns}`;
41
+ const markId = `logo3d-mark-${ns}`;
42
+ const sheenBlurId = `logo3d-sheen-blur-${ns}`;
43
+ const sheenTopId = `logo3d-sheen-top-${ns}`;
44
+ const sheenLowId = `logo3d-sheen-low-${ns}`;
45
+ const glow = (size === "80" ? GLOW_BY_SIZE["80"] : GLOW_BY_SIZE.base).map(({ y, blur }, i) => `drop-shadow(0 ${y}px ${blur}px rgba(${GLOW_RGB}, ${GLOW_ALPHAS[i]}))`).join(" ");
46
+ return /* @__PURE__ */ jsx(
47
+ "span",
48
+ {
49
+ className: cn("inline-block overflow-hidden", className),
50
+ style: { filter: glow },
51
+ "aria-hidden": "true",
52
+ "data-testid": "logo-icon",
53
+ children: /* @__PURE__ */ jsxs(
54
+ "svg",
55
+ {
56
+ viewBox: "0 0 80 80",
57
+ fill: "none",
58
+ xmlns: "http://www.w3.org/2000/svg",
59
+ className: "block size-full",
60
+ "aria-hidden": "true",
61
+ children: [
62
+ /* @__PURE__ */ jsx("path", { d: ICON_BG_PATH, fill: "#49F264" }),
63
+ /* @__PURE__ */ jsx("path", { d: ICON_BG_PATH, fill: `url(#${faceId})`, style: { mixBlendMode: "lighten" } }),
64
+ /* @__PURE__ */ jsx("path", { d: ICON_STROKE_PATH, stroke: `url(#${rimId})`, strokeWidth: "0.96016" }),
65
+ /* @__PURE__ */ jsx("g", { filter: `url(#${filterId})`, children: /* @__PURE__ */ jsx("path", { fillRule: "evenodd", clipRule: "evenodd", d: ICON_F_PATH, fill: `url(#${markId})` }) }),
66
+ /* @__PURE__ */ jsxs("g", { transform: SHEEN_OFFSET, children: [
67
+ /* @__PURE__ */ jsx("g", { filter: `url(#${sheenBlurId})`, children: /* @__PURE__ */ jsx("path", { d: SHEEN_PATH, stroke: `url(#${sheenTopId})`, strokeWidth: "0.5" }) }),
68
+ /* @__PURE__ */ jsx("g", { filter: `url(#${sheenBlurId})`, children: /* @__PURE__ */ jsx("path", { d: SHEEN_PATH, stroke: `url(#${sheenLowId})`, strokeWidth: "0.5" }) })
69
+ ] }),
70
+ /* @__PURE__ */ jsxs("defs", { children: [
71
+ /* @__PURE__ */ jsxs(
72
+ "filter",
73
+ {
74
+ id: filterId,
75
+ x: "10.4884",
76
+ y: "17.6179",
77
+ width: "96.1936",
78
+ height: "88.8267",
79
+ filterUnits: "userSpaceOnUse",
80
+ colorInterpolationFilters: "sRGB",
81
+ children: [
82
+ /* @__PURE__ */ jsx("feFlood", { floodOpacity: "0", result: "BackgroundImageFix" }),
83
+ SHADOW_LAYERS.map((layer, i) => /* @__PURE__ */ jsxs(React.Fragment, { children: [
84
+ /* @__PURE__ */ jsx(
85
+ "feColorMatrix",
86
+ {
87
+ in: "SourceAlpha",
88
+ type: "matrix",
89
+ values: ALPHA_MATRIX,
90
+ result: "hardAlpha"
91
+ }
92
+ ),
93
+ /* @__PURE__ */ jsx("feOffset", { dx: layer.dx, dy: layer.dy }),
94
+ /* @__PURE__ */ jsx("feGaussianBlur", { stdDeviation: layer.blur }),
95
+ /* @__PURE__ */ jsx("feColorMatrix", { type: "matrix", values: `${SHADOW_RGB} 0 0 0 ${layer.opacity} 0` }),
96
+ /* @__PURE__ */ jsx(
97
+ "feBlend",
98
+ {
99
+ mode: "normal",
100
+ in2: i === 0 ? "BackgroundImageFix" : `shadow${i}`,
101
+ result: `shadow${i + 1}`
102
+ }
103
+ )
104
+ ] }, layer.opacity)),
105
+ /* @__PURE__ */ jsx(
106
+ "feBlend",
107
+ {
108
+ mode: "normal",
109
+ in: "SourceGraphic",
110
+ in2: `shadow${SHADOW_LAYERS.length}`,
111
+ result: "shape"
112
+ }
113
+ )
114
+ ]
115
+ }
116
+ ),
117
+ /* @__PURE__ */ jsxs(
118
+ "radialGradient",
119
+ {
120
+ id: faceId,
121
+ cx: "0",
122
+ cy: "0",
123
+ r: "1",
124
+ gradientUnits: "userSpaceOnUse",
125
+ gradientTransform: "translate(40.4124 0) rotate(90) scale(59.7938 77.0544)",
126
+ children: [
127
+ /* @__PURE__ */ jsx("stop", { stopColor: "#80F593" }),
128
+ /* @__PURE__ */ jsx("stop", { offset: "1", stopColor: "#49F264" })
129
+ ]
130
+ }
131
+ ),
132
+ /* @__PURE__ */ jsxs("linearGradient", { id: rimId, x1: "40", y1: "0", x2: "40", y2: "80", gradientUnits: "userSpaceOnUse", children: [
133
+ /* @__PURE__ */ jsx("stop", { stopColor: "#ACF6B9" }),
134
+ /* @__PURE__ */ jsx("stop", { offset: "1", stopColor: "#0EC833" })
135
+ ] }),
136
+ /* @__PURE__ */ jsxs(
137
+ "filter",
138
+ {
139
+ id: sheenBlurId,
140
+ x: "0",
141
+ y: "0",
142
+ width: SHEEN_BOX.width,
143
+ height: SHEEN_BOX.height,
144
+ filterUnits: "userSpaceOnUse",
145
+ colorInterpolationFilters: "sRGB",
146
+ children: [
147
+ /* @__PURE__ */ jsx("feFlood", { floodOpacity: "0", result: "BackgroundImageFix" }),
148
+ /* @__PURE__ */ jsx("feBlend", { mode: "normal", in: "SourceGraphic", in2: "BackgroundImageFix", result: "shape" }),
149
+ /* @__PURE__ */ jsx("feGaussianBlur", { stdDeviation: "0.125", result: "sheenBlur" })
150
+ ]
151
+ }
152
+ ),
153
+ /* @__PURE__ */ jsxs(
154
+ "radialGradient",
155
+ {
156
+ id: sheenTopId,
157
+ cx: "0",
158
+ cy: "0",
159
+ r: "1",
160
+ gradientUnits: "userSpaceOnUse",
161
+ gradientTransform: "translate(18.7874 13.9827) rotate(-127.349) scale(23.9008 34.223)",
162
+ children: [
163
+ /* @__PURE__ */ jsx("stop", { stopColor: "white", stopOpacity: "0.95" }),
164
+ /* @__PURE__ */ jsx("stop", { offset: "1", stopColor: "white", stopOpacity: "0" })
165
+ ]
166
+ }
167
+ ),
168
+ /* @__PURE__ */ jsxs(
169
+ "radialGradient",
170
+ {
171
+ id: sheenLowId,
172
+ cx: "0",
173
+ cy: "0",
174
+ r: "1",
175
+ gradientUnits: "userSpaceOnUse",
176
+ gradientTransform: "translate(31.2874 25.9827) rotate(59.7436) scale(6.94622 9.94611)",
177
+ children: [
178
+ /* @__PURE__ */ jsx("stop", { stopColor: "white", stopOpacity: "0.6" }),
179
+ /* @__PURE__ */ jsx("stop", { offset: "1", stopColor: "white", stopOpacity: "0" })
180
+ ]
181
+ }
182
+ ),
183
+ /* @__PURE__ */ jsxs(
184
+ "linearGradient",
185
+ {
186
+ id: markId,
187
+ x1: "40.8533",
188
+ y1: "19.2674",
189
+ x2: "40.8533",
190
+ y2: "62.7333",
191
+ gradientUnits: "userSpaceOnUse",
192
+ children: [
193
+ /* @__PURE__ */ jsx("stop", { stopColor: "#151515" }),
194
+ /* @__PURE__ */ jsx("stop", { offset: "1", stopColor: "#151515", stopOpacity: "0.7" })
195
+ ]
196
+ }
197
+ )
198
+ ] })
199
+ ]
200
+ }
201
+ )
202
+ }
203
+ );
204
+ };
205
+ Logo3dIcon.displayName = "Logo3dIcon";
206
+ export {
207
+ Logo3dIcon
208
+ };
209
+ //# sourceMappingURL=Logo3dIcon.mjs.map