@fanvue/ui 3.4.0 → 3.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/components/ChatInput/ChatInput.cjs +128 -92
- package/dist/cjs/components/ChatInput/ChatInput.cjs.map +1 -1
- package/dist/cjs/components/Drawer/Drawer.cjs +6 -3
- package/dist/cjs/components/Drawer/Drawer.cjs.map +1 -1
- package/dist/cjs/components/DropdownMenu/DropdownMenu.cjs +20 -4
- package/dist/cjs/components/DropdownMenu/DropdownMenu.cjs.map +1 -1
- package/dist/cjs/components/Icons/TickIcon.cjs +3 -1
- package/dist/cjs/components/Icons/TickIcon.cjs.map +1 -1
- package/dist/cjs/components/Logo/Logo.cjs +107 -33
- package/dist/cjs/components/Logo/Logo.cjs.map +1 -1
- package/dist/cjs/components/Logo/agenciesIcon.cjs +6 -0
- package/dist/cjs/components/Logo/agenciesIcon.cjs.map +1 -0
- package/dist/cjs/components/Pill/Pill.cjs +2 -1
- package/dist/cjs/components/Pill/Pill.cjs.map +1 -1
- package/dist/cjs/components/Table/Table.cjs +25 -18
- package/dist/cjs/components/Table/Table.cjs.map +1 -1
- package/dist/components/ChatInput/ChatInput.mjs +128 -92
- package/dist/components/ChatInput/ChatInput.mjs.map +1 -1
- package/dist/components/Drawer/Drawer.mjs +6 -3
- package/dist/components/Drawer/Drawer.mjs.map +1 -1
- package/dist/components/DropdownMenu/DropdownMenu.mjs +20 -4
- package/dist/components/DropdownMenu/DropdownMenu.mjs.map +1 -1
- package/dist/components/Icons/TickIcon.mjs +3 -1
- package/dist/components/Icons/TickIcon.mjs.map +1 -1
- package/dist/components/Logo/Logo.mjs +107 -33
- package/dist/components/Logo/Logo.mjs.map +1 -1
- package/dist/components/Logo/agenciesIcon.mjs +6 -0
- package/dist/components/Logo/agenciesIcon.mjs.map +1 -0
- package/dist/components/Pill/Pill.mjs +2 -1
- package/dist/components/Pill/Pill.mjs.map +1 -1
- package/dist/components/Table/Table.mjs +25 -18
- package/dist/components/Table/Table.mjs.map +1 -1
- package/dist/index.d.ts +73 -11
- package/package.json +7 -4
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DropdownMenu.cjs","sources":["../../../../src/components/DropdownMenu/DropdownMenu.tsx"],"sourcesContent":["import * as DropdownMenuPrimitive from \"@radix-ui/react-dropdown-menu\";\nimport { useControllableState } from \"@radix-ui/react-use-controllable-state\";\nimport * as React from \"react\";\nimport { cn } from \"../../utils/cn\";\nimport { FLOATING_CONTENT_COLLISION_PADDING } from \"../../utils/floatingContentCollisionPadding\";\nimport { IconButton } from \"../IconButton/IconButton\";\nimport { CloseIcon } from \"../Icons/CloseIcon\";\nimport { SearchIcon } from \"../Icons/SearchIcon\";\n\n// Movement, in CSS px, above which a touch press-and-release counts as a drag.\nconst TAP_MOVEMENT_THRESHOLD_PX = 10;\n\n// Keys that the menu must keep handling even when focus is inside a child\n// input — arrows move the highlight into the list, Tab leaves the menu, and\n// Enter / Escape close it.\nconst NAVIGATION_KEYS = new Set([\n \"ArrowDown\",\n \"ArrowUp\",\n \"ArrowLeft\",\n \"ArrowRight\",\n \"Escape\",\n \"Tab\",\n \"Enter\",\n]);\n\ntype ActiveTap = {\n pointerId: number;\n x: number;\n y: number;\n movedPastThreshold: boolean;\n};\n\n// Lets DropdownMenuTrigger toggle the menu directly so it can gate on touch\n// movement — see radix-ui/primitives#1912.\nconst ToggleOpenContext = React.createContext<\n ((updater: (prev: boolean) => boolean) => void) | null\n>(null);\n\n/** Props for the {@link DropdownMenu} root component. */\nexport interface DropdownMenuProps\n extends React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Root> {}\n\n/** Root component that manages open/close state for a dropdown menu. */\nexport function DropdownMenu({\n open: openProp,\n defaultOpen,\n onOpenChange,\n children,\n ...props\n}: DropdownMenuProps) {\n const [open = false, setOpen] = useControllableState({\n prop: openProp,\n defaultProp: defaultOpen ?? false,\n onChange: onOpenChange,\n });\n\n return (\n <ToggleOpenContext.Provider value={setOpen}>\n <DropdownMenuPrimitive.Root open={open} onOpenChange={setOpen} {...props}>\n {children}\n </DropdownMenuPrimitive.Root>\n </ToggleOpenContext.Provider>\n );\n}\n\n/** Props for the {@link DropdownMenuTrigger} component. */\nexport type DropdownMenuTriggerProps = React.ComponentPropsWithoutRef<\n typeof DropdownMenuPrimitive.Trigger\n>;\n\n/**\n * The element that toggles the dropdown menu when clicked.\n *\n * On touch devices, the menu only opens if the press-and-release stays within\n * a small movement threshold. A drag that incidentally ends over the trigger\n * (common when scrolling a feed on Android Chrome) is ignored. Mouse and\n * keyboard interactions are unchanged.\n */\nexport const DropdownMenuTrigger = React.forwardRef<\n React.ComponentRef<typeof DropdownMenuPrimitive.Trigger>,\n DropdownMenuTriggerProps\n>((props, ref) => {\n const toggleOpen = React.useContext(ToggleOpenContext);\n const tapRef = React.useRef<ActiveTap | null>(null);\n\n // Used outside our DropdownMenu wrapper — fall through to Radix defaults.\n if (toggleOpen === null) {\n return <DropdownMenuPrimitive.Trigger {...props} ref={ref} />;\n }\n\n return (\n <DropdownMenuPrimitive.Trigger\n {...props}\n ref={ref}\n onPointerDown={(event) => {\n props.onPointerDown?.(event);\n if (event.pointerType === \"mouse\" || props.disabled) return;\n // Keep pointerup / pointercancel on this element if the finger drifts off.\n // Optional because jsdom (used in tests) doesn't implement it.\n event.currentTarget.setPointerCapture?.(event.pointerId);\n tapRef.current = {\n pointerId: event.pointerId,\n x: event.clientX,\n y: event.clientY,\n movedPastThreshold: false,\n };\n // preventDefault stops Radix's pointerdown open path via composeEventHandlers.\n event.preventDefault();\n }}\n onPointerMove={(event) => {\n props.onPointerMove?.(event);\n const tap = tapRef.current;\n if (tap === null || event.pointerId !== tap.pointerId || tap.movedPastThreshold) {\n return;\n }\n const dx = event.clientX - tap.x;\n const dy = event.clientY - tap.y;\n if (Math.hypot(dx, dy) > TAP_MOVEMENT_THRESHOLD_PX) {\n tap.movedPastThreshold = true;\n }\n }}\n onPointerUp={(event) => {\n props.onPointerUp?.(event);\n const tap = tapRef.current;\n if (tap === null || event.pointerId !== tap.pointerId) return;\n const wasDrag = tap.movedPastThreshold;\n tapRef.current = null;\n if (!wasDrag && !props.disabled) {\n toggleOpen((prev) => !prev);\n }\n }}\n onPointerCancel={(event) => {\n props.onPointerCancel?.(event);\n const tap = tapRef.current;\n if (tap !== null && event.pointerId === tap.pointerId) {\n tapRef.current = null;\n }\n }}\n />\n );\n});\nDropdownMenuTrigger.displayName = \"DropdownMenuTrigger\";\n\n/** Props for the {@link DropdownMenuContent} component. */\nexport interface DropdownMenuContentProps\n extends React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Content> {}\n\n/**\n * The positioned content panel rendered inside a portal.\n *\n * Override the portal z-index per-instance via `style={{ zIndex: 1500 }}` or\n * globally with the `--fanvue-ui-portal-z-index` CSS custom property.\n *\n * @example\n * ```tsx\n * <DropdownMenu>\n * <DropdownMenuTrigger asChild>\n * <Button>Open</Button>\n * </DropdownMenuTrigger>\n * <DropdownMenuContent>\n * <DropdownMenuItem>Option 1</DropdownMenuItem>\n * <DropdownMenuItem>Option 2</DropdownMenuItem>\n * </DropdownMenuContent>\n * </DropdownMenu>\n * ```\n */\nexport const DropdownMenuContent = React.forwardRef<\n React.ComponentRef<typeof DropdownMenuPrimitive.Content>,\n DropdownMenuContentProps\n>(\n (\n {\n className,\n style,\n sideOffset = 4,\n collisionPadding = FLOATING_CONTENT_COLLISION_PADDING,\n ...props\n },\n ref,\n ) => (\n <DropdownMenuPrimitive.Portal>\n <DropdownMenuPrimitive.Content\n ref={ref}\n sideOffset={sideOffset}\n collisionPadding={collisionPadding}\n className={cn(\n \"w-max min-w-(--radix-dropdown-menu-trigger-width) max-w-(--radix-dropdown-menu-content-available-width) overflow-y-auto rounded-sm border border-neutral-alphas-200 bg-surface-primary p-1 text-content-primary shadow-lg\",\n \"data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95\",\n \"data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95\",\n \"data-[side=top]:slide-in-from-bottom-2 data-[side=bottom]:slide-in-from-top-2\",\n \"data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2\",\n className,\n )}\n style={{\n zIndex: \"var(--fanvue-ui-portal-z-index, 50)\",\n maxHeight: \"var(--radix-dropdown-menu-content-available-height)\",\n ...style,\n }}\n {...props}\n />\n </DropdownMenuPrimitive.Portal>\n ),\n);\nDropdownMenuContent.displayName = \"DropdownMenuContent\";\n\n/** Props for the {@link DropdownMenuGroup} component. */\nexport type DropdownMenuGroupProps = React.ComponentPropsWithoutRef<\n typeof DropdownMenuPrimitive.Group\n>;\n\n/** Groups related menu items. Accepts an optional `DropdownMenuLabel`. */\nexport const DropdownMenuGroup = DropdownMenuPrimitive.Group;\nDropdownMenuGroup.displayName = \"DropdownMenuGroup\";\n\n/** Vertical placement of a {@link DropdownMenuLabel} within its group. */\nexport type DropdownMenuLabelPosition = \"default\" | \"top\";\n\n/** Props for the {@link DropdownMenuLabel} component. */\nexport interface DropdownMenuLabelProps\n extends React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Label> {\n /**\n * Vertical placement within the surrounding group. `\"top\"` is used for the\n * first label directly under a header; `\"default\"` adds extra top padding to\n * separate it from preceding items. @default \"default\"\n */\n position?: DropdownMenuLabelPosition;\n}\n\n/** A non-interactive label that groups related items within a menu. */\nexport const DropdownMenuLabel = React.forwardRef<\n React.ComponentRef<typeof DropdownMenuPrimitive.Label>,\n DropdownMenuLabelProps\n>(({ className, position = \"default\", ...props }, ref) => (\n <DropdownMenuPrimitive.Label\n ref={ref}\n className={cn(\n \"typography-description-12px-regular flex items-center px-3 text-content-secondary\",\n position === \"top\" ? \"py-2\" : \"pb-2 pt-4\",\n className,\n )}\n {...props}\n />\n));\nDropdownMenuLabel.displayName = \"DropdownMenuLabel\";\n\n/**\n * Height preset for a dropdown menu item.\n *\n * `\"40\"` (default) and `\"32\"` are the v2 numeric tokens that mirror the Figma\n * design system. `\"sm\"` and `\"md\"` are deprecated aliases retained for\n * backwards compatibility — `\"sm\"` maps to `\"32\"`, `\"md\"` maps to `\"40\"`.\n */\nexport type DropdownMenuItemSize =\n | \"40\"\n | \"32\"\n /** @deprecated Use `\"32\"` instead. */\n | \"sm\"\n /** @deprecated Use `\"40\"` instead. */\n | \"md\";\n\nconst SIZE_NORMALIZED: Record<DropdownMenuItemSize, \"40\" | \"32\"> = {\n \"40\": \"40\",\n md: \"40\",\n \"32\": \"32\",\n sm: \"32\",\n};\n\nconst ITEM_SIZE_CLASSES: Record<\"40\" | \"32\", string> = {\n \"40\": \"min-h-10 py-2 typography-body-default-16px-regular\",\n \"32\": \"min-h-8 py-[7px] typography-body-small-14px-regular\",\n};\n\nconst ITEM_SELECTED_TYPOGRAPHY: Record<\"40\" | \"32\", string> = {\n \"40\": \"typography-body-default-16px-semibold\",\n \"32\": \"typography-body-small-14px-semibold\",\n};\n\nexport interface DropdownMenuItemProps\n extends React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Item> {\n /** Height of the menu item row. @default \"40\" */\n size?: DropdownMenuItemSize;\n /** Applies the destructive (error) treatment. Use for irreversible actions. @default false */\n destructive?: boolean;\n /** Icon (or other node) rendered before the label. */\n leadingIcon?: React.ReactNode;\n /** Icon (or other node) rendered after the label. */\n trailingIcon?: React.ReactNode;\n /** Marks the item as the current selection in a single-select menu. @default false */\n selected?: boolean;\n}\n\n/**\n * An individual item within a {@link DropdownMenuContent}.\n *\n * @example\n * ```tsx\n * <DropdownMenuItem>Edit profile</DropdownMenuItem>\n * <DropdownMenuItem destructive>Delete</DropdownMenuItem>\n * <DropdownMenuItem leadingIcon={<EditIcon />}>Edit</DropdownMenuItem>\n *\n * // As a link\n * <DropdownMenuItem asChild>\n * <a href=\"/settings\">Settings</a>\n * </DropdownMenuItem>\n * ```\n */\nexport const DropdownMenuItem = React.forwardRef<\n React.ComponentRef<typeof DropdownMenuPrimitive.Item>,\n DropdownMenuItemProps\n>(\n (\n {\n size = \"40\",\n destructive,\n leadingIcon,\n trailingIcon,\n selected,\n className,\n children,\n asChild,\n ...props\n },\n ref,\n ) => {\n const normalizedSize = SIZE_NORMALIZED[size];\n const itemClassName = cn(\n \"flex w-full cursor-pointer items-center gap-2 rounded-xs px-3 outline-none\",\n ITEM_SIZE_CLASSES[normalizedSize],\n \"data-[highlighted]:bg-neutral-alphas-50\",\n \"data-[disabled]:cursor-not-allowed data-[disabled]:text-content-disabled\",\n destructive && \"text-error-content\",\n selected && [\n \"bg-buttons-primary-default text-content-primary-inverted\",\n \"data-[highlighted]:bg-buttons-primary-default\",\n ITEM_SELECTED_TYPOGRAPHY[normalizedSize],\n ],\n className,\n );\n\n if (asChild) {\n return (\n <DropdownMenuPrimitive.Item ref={ref} asChild className={itemClassName} {...props}>\n {children}\n </DropdownMenuPrimitive.Item>\n );\n }\n\n return (\n <DropdownMenuPrimitive.Item ref={ref} className={itemClassName} {...props}>\n {leadingIcon}\n <span className=\"min-w-0 flex-1 truncate\">{children}</span>\n {trailingIcon}\n </DropdownMenuPrimitive.Item>\n );\n },\n);\nDropdownMenuItem.displayName = \"DropdownMenuItem\";\n\n/** Props for the {@link DropdownMenuSeparator} component. */\nexport interface DropdownMenuSeparatorProps\n extends React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Separator> {}\n\n/** Visual separator between groups of items. */\nexport const DropdownMenuSeparator = React.forwardRef<\n React.ComponentRef<typeof DropdownMenuPrimitive.Separator>,\n DropdownMenuSeparatorProps\n>(({ className, ...props }, ref) => (\n <DropdownMenuPrimitive.Separator\n ref={ref}\n className={cn(\"my-1 h-px bg-neutral-alphas-200\", className)}\n {...props}\n />\n));\nDropdownMenuSeparator.displayName = \"DropdownMenuSeparator\";\n\n/** Header type. `\"default\"` shows a title; `\"search\"` shows a search input. */\nexport type DropdownMenuHeaderType = \"default\" | \"search\";\n\n/** Header height preset. Matches the menu item sizing scale. */\nexport type DropdownMenuHeaderSize = \"40\" | \"32\";\n\n/** Search-input configuration for {@link DropdownMenuHeader} when `type=\"search\"`. */\nexport interface DropdownMenuHeaderSearchProps {\n /** Controlled value of the search input. */\n value?: string;\n /** Uncontrolled default value. */\n defaultValue?: string;\n /** Fires when the input value changes. */\n onChange?: (value: string) => void;\n /** Placeholder text shown when the input is empty. @default \"Search…\" */\n placeholder?: string;\n /** Accessible label for the search input. @default \"Search\" */\n \"aria-label\"?: string;\n}\n\nexport interface DropdownMenuHeaderProps extends React.HTMLAttributes<HTMLDivElement> {\n /** Visual type. `\"default\"` shows a title; `\"search\"` shows a search input. @default \"default\" */\n type?: DropdownMenuHeaderType;\n /** Height preset for the header row. @default \"40\" */\n size?: DropdownMenuHeaderSize;\n /** Title text shown when `type=\"default\"`. Ignored if `children` is provided. */\n title?: string;\n /** Configuration for the embedded search input when `type=\"search\"`. */\n searchProps?: DropdownMenuHeaderSearchProps;\n /** Whether to render the close icon button on the right. @default true */\n showClose?: boolean;\n /** Fires when the close icon button is activated. */\n onClose?: () => void;\n /** Accessible label for the close button. @default \"Close menu\" */\n closeLabel?: string;\n}\n\n/**\n * Optional header rendered at the top of a {@link DropdownMenuContent}. Use\n * `type=\"default\"` to title the menu, or `type=\"search\"` to embed a search\n * input for filtering long lists.\n *\n * Renders an inset separator beneath the row so it slots cleanly above the\n * first group of items.\n *\n * @example\n * ```tsx\n * <DropdownMenuContent>\n * <DropdownMenuHeader title=\"Sort by\" onClose={() => setOpen(false)} />\n * <DropdownMenuItem>Newest</DropdownMenuItem>\n * <DropdownMenuItem>Oldest</DropdownMenuItem>\n * </DropdownMenuContent>\n * ```\n */\nexport const DropdownMenuHeader = React.forwardRef<HTMLDivElement, DropdownMenuHeaderProps>(\n (\n {\n type = \"default\",\n size = \"40\",\n title,\n searchProps,\n showClose = true,\n onClose,\n closeLabel = \"Close menu\",\n className,\n children,\n ...props\n },\n ref,\n ) => {\n const titleTypography =\n size === \"32\"\n ? \"typography-body-small-14px-semibold\"\n : \"typography-body-default-16px-semibold\";\n const toggleOpen = React.useContext(ToggleOpenContext);\n\n const handleClose = () => {\n onClose?.();\n // Also dismiss the Radix menu when used in uncontrolled mode — otherwise\n // the close button would look broken to consumers that don't wire up\n // `open` / `onOpenChange` themselves.\n toggleOpen?.(() => false);\n };\n\n return (\n <div\n ref={ref}\n className={cn(\n \"flex flex-col px-1 pt-1 mb-1\",\n // Search needs an 8px gap between the input and the divider; the\n // default (title) variant uses 4px because the title baseline sits\n // closer to the divider naturally.\n type === \"search\" ? \"gap-2\" : \"gap-1\",\n className,\n )}\n {...props}\n >\n <div className=\"flex items-center gap-4 pl-2\">\n {type === \"default\" ? (\n <div className={cn(\"min-w-0 flex-1 truncate text-content-primary\", titleTypography)}>\n {children ?? title}\n </div>\n ) : (\n <SearchInput {...searchProps} />\n )}\n {showClose && (\n <IconButton\n variant=\"tertiary\"\n size=\"32\"\n icon={<CloseIcon />}\n onClick={handleClose}\n aria-label={closeLabel}\n />\n )}\n </div>\n <DropdownMenuSeparator className=\"my-0\" />\n </div>\n );\n },\n);\nDropdownMenuHeader.displayName = \"DropdownMenuHeader\";\n\nfunction SearchInput({\n value,\n defaultValue,\n onChange,\n placeholder = \"Search\\u2026\",\n \"aria-label\": ariaLabel = \"Search\",\n}: DropdownMenuHeaderSearchProps = {}) {\n return (\n <label\n className={cn(\n \"flex min-w-0 flex-1 items-center gap-2 rounded-xs border border-border-primary\",\n \"bg-neutral-alphas-50 px-3 py-1 text-content-primary\",\n \"focus-within:shadow-focus-ring focus-within:outline-none\",\n )}\n >\n <SearchIcon className=\"size-4 shrink-0 text-content-tertiary\" aria-hidden=\"true\" />\n <input\n type=\"search\"\n className={cn(\n \"typography-body-default-16px-regular min-w-0 flex-1 bg-transparent outline-none\",\n \"placeholder:text-content-tertiary\",\n )}\n value={value}\n defaultValue={defaultValue}\n placeholder={placeholder}\n aria-label={ariaLabel}\n onChange={(event) => onChange?.(event.target.value)}\n // Radix DropdownMenu listens for keystrokes on Content for its\n // typeahead (typing letters jumps focus to a matching item). That\n // listener steals focus from the input after the first letter, so we\n // stop character keys from bubbling. Navigation keys (arrows / Tab /\n // Escape / Enter) are still allowed through so the user can leave the\n // input for the list or close the menu. Pointer events are stopped so\n // clicking back into the input doesn't fight the menu's focus\n // management either.\n onKeyDown={(event) => {\n if (!NAVIGATION_KEYS.has(event.key)) event.stopPropagation();\n }}\n onPointerDown={(event) => event.stopPropagation()}\n onMouseDown={(event) => event.stopPropagation()}\n />\n </label>\n );\n}\n\n/** Props for the {@link DropdownMenuRadioGroup} component. */\nexport interface DropdownMenuRadioGroupProps\n extends React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.RadioGroup> {}\n\n/**\n * Groups {@link DropdownMenuRadioItem} children so they behave as a\n * single-select set. Controlled via `value`/`onValueChange`.\n *\n * @example\n * ```tsx\n * <DropdownMenuRadioGroup value={sort} onValueChange={setSort}>\n * <DropdownMenuRadioItem value=\"newest\">Newest first</DropdownMenuRadioItem>\n * <DropdownMenuRadioItem value=\"oldest\">Oldest first</DropdownMenuRadioItem>\n * </DropdownMenuRadioGroup>\n * ```\n */\nexport const DropdownMenuRadioGroup = DropdownMenuPrimitive.RadioGroup;\n\n/** Height preset for a {@link DropdownMenuRadioItem}. */\nexport type DropdownMenuRadioItemSize = \"40\";\n\nexport interface DropdownMenuRadioItemProps\n extends React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.RadioItem> {\n /** Optional secondary text shown below the title. */\n helper?: string;\n /** Height of the item row. @default \"40\" */\n size?: DropdownMenuRadioItemSize;\n}\n\n/**\n * A single radio-style choice within a {@link DropdownMenuRadioGroup}. Shows\n * a circular indicator that fills when selected, plus an optional helper line\n * underneath the title.\n */\nexport const DropdownMenuRadioItem = React.forwardRef<\n React.ComponentRef<typeof DropdownMenuPrimitive.RadioItem>,\n DropdownMenuRadioItemProps\n>(({ className, children, helper, size: _size = \"40\", ...props }, ref) => {\n return (\n <DropdownMenuPrimitive.RadioItem\n ref={ref}\n className={cn(\n \"group flex w-full cursor-pointer items-start gap-3 rounded-xs px-4 py-2 outline-none\",\n \"data-[highlighted]:bg-neutral-alphas-50\",\n \"data-[disabled]:cursor-not-allowed data-[disabled]:text-content-disabled\",\n \"data-[state=checked]:bg-buttons-primary-default data-[state=checked]:text-content-primary-inverted\",\n \"data-[state=checked]:data-[highlighted]:bg-buttons-primary-default\",\n className,\n )}\n {...props}\n >\n <span\n className={cn(\n \"mt-1 flex size-4 shrink-0 items-center justify-center rounded-full border border-icons-primary\",\n \"group-data-[disabled]:border-content-disabled\",\n \"group-data-[state=checked]:border-icons-primary-inverted\",\n )}\n aria-hidden=\"true\"\n >\n <DropdownMenuPrimitive.ItemIndicator asChild>\n <span className=\"size-2 rounded-full bg-content-primary-inverted\" />\n </DropdownMenuPrimitive.ItemIndicator>\n </span>\n <span className=\"flex min-w-0 flex-1 flex-col gap-1\">\n <span className=\"typography-body-default-16px-semibold truncate\">{children}</span>\n {helper && (\n <span\n className={cn(\n \"typography-description-12px-regular text-content-secondary\",\n \"group-data-[state=checked]:text-content-primary-inverted\",\n \"group-data-[disabled]:text-content-disabled\",\n )}\n >\n {helper}\n </span>\n )}\n </span>\n </DropdownMenuPrimitive.RadioItem>\n );\n});\nDropdownMenuRadioItem.displayName = \"DropdownMenuRadioItem\";\n"],"names":["React","useControllableState","jsx","DropdownMenuPrimitive","FLOATING_CONTENT_COLLISION_PADDING","cn","jsxs","IconButton","CloseIcon","SearchIcon"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAUA,MAAM,4BAA4B;AAKlC,MAAM,sCAAsB,IAAI;AAAA,EAC9B;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,CAAC;AAWD,MAAM,oBAAoBA,iBAAM,cAE9B,IAAI;AAOC,SAAS,aAAa;AAAA,EAC3B,MAAM;AAAA,EACN;AAAA,EACA;AAAA,EACA;AAAA,EACA,GAAG;AACL,GAAsB;AACpB,QAAM,CAAC,OA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AAAA;AAAAA,cACT;AAAA,cACA;AAAA,cACA;AAAA,YAAA;AAAA,YAEF,eAAY;AAAA,YAEZ,UAAAH,2BAAAA,IAACC,iCAAsB,eAAtB,EAAoC,SAAO,MAC1C,UAAAD,2BAAAA,IAAC,QAAA,EAAK,WAAU,kDAAA,CAAkD,EAAA,CACpE;AAAA,UAAA;AAAA,QAAA;AAAA,QAEFI,2BAAAA,KAAC,QAAA,EAAK,WAAU,sCACd,UAAA;AAAA,UAAAJ,2BAAAA,IAAC,QAAA,EAAK,WAAU,kDAAkD,SAAA,CAAS;AAAA,UAC1E,UACCA,2BAAAA;AAAAA,YAAC;AAAA,YAAA;AAAA,cACC,WAAWG,GAAAA;AAAAA,gBACT;AAAA,gBACA;AAAA,gBACA;AAAA,cAAA;AAAA,cAGD,UAAA;AAAA,YAAA;AAAA,UAAA;AAAA,QACH,EAAA,CAEJ;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAGN,CAAC;AACD,sBAAsB,cAAc;;;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"DropdownMenu.cjs","sources":["../../../../src/components/DropdownMenu/DropdownMenu.tsx"],"sourcesContent":["import * as DropdownMenuPrimitive from \"@radix-ui/react-dropdown-menu\";\nimport { useControllableState } from \"@radix-ui/react-use-controllable-state\";\nimport * as React from \"react\";\nimport { cn } from \"../../utils/cn\";\nimport { FLOATING_CONTENT_COLLISION_PADDING } from \"../../utils/floatingContentCollisionPadding\";\nimport { IconButton } from \"../IconButton/IconButton\";\nimport { CloseIcon } from \"../Icons/CloseIcon\";\nimport { SearchIcon } from \"../Icons/SearchIcon\";\n\n// Movement, in CSS px, above which a touch press-and-release counts as a drag.\nconst TAP_MOVEMENT_THRESHOLD_PX = 10;\n\n// Keys that the menu must keep handling even when focus is inside a child\n// input — arrows move the highlight into the list, Tab leaves the menu, and\n// Enter / Escape close it.\nconst NAVIGATION_KEYS = new Set([\n \"ArrowDown\",\n \"ArrowUp\",\n \"ArrowLeft\",\n \"ArrowRight\",\n \"Escape\",\n \"Tab\",\n \"Enter\",\n]);\n\ntype ActiveTap = {\n pointerId: number;\n x: number;\n y: number;\n movedPastThreshold: boolean;\n};\n\n// Lets DropdownMenuTrigger toggle the menu directly so it can gate on touch\n// movement — see radix-ui/primitives#1912.\nconst ToggleOpenContext = React.createContext<\n ((updater: (prev: boolean) => boolean) => void) | null\n>(null);\n\n/** Props for the {@link DropdownMenu} root component. */\nexport interface DropdownMenuProps\n extends React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Root> {}\n\n/** Root component that manages open/close state for a dropdown menu. */\nexport function DropdownMenu({\n open: openProp,\n defaultOpen,\n onOpenChange,\n children,\n ...props\n}: DropdownMenuProps) {\n const [open = false, setOpen] = useControllableState({\n prop: openProp,\n defaultProp: defaultOpen ?? false,\n onChange: onOpenChange,\n });\n\n return (\n <ToggleOpenContext.Provider value={setOpen}>\n <DropdownMenuPrimitive.Root open={open} onOpenChange={setOpen} {...props}>\n {children}\n </DropdownMenuPrimitive.Root>\n </ToggleOpenContext.Provider>\n );\n}\n\n/** Props for the {@link DropdownMenuTrigger} component. */\nexport type DropdownMenuTriggerProps = React.ComponentPropsWithoutRef<\n typeof DropdownMenuPrimitive.Trigger\n>;\n\n/**\n * The element that toggles the dropdown menu when clicked.\n *\n * On touch devices, the menu only opens if the press-and-release stays within\n * a small movement threshold. A drag that incidentally ends over the trigger\n * (common when scrolling a feed on Android Chrome) is ignored. Mouse and\n * keyboard interactions are unchanged.\n */\nexport const DropdownMenuTrigger = React.forwardRef<\n React.ComponentRef<typeof DropdownMenuPrimitive.Trigger>,\n DropdownMenuTriggerProps\n>((props, ref) => {\n const toggleOpen = React.useContext(ToggleOpenContext);\n const tapRef = React.useRef<ActiveTap | null>(null);\n\n // Used outside our DropdownMenu wrapper — fall through to Radix defaults.\n if (toggleOpen === null) {\n return <DropdownMenuPrimitive.Trigger {...props} ref={ref} />;\n }\n\n return (\n <DropdownMenuPrimitive.Trigger\n {...props}\n ref={ref}\n onPointerDown={(event) => {\n props.onPointerDown?.(event);\n if (event.pointerType === \"mouse\" || props.disabled) return;\n // Keep pointerup / pointercancel on this element if the finger drifts off.\n // Optional because jsdom (used in tests) doesn't implement it.\n event.currentTarget.setPointerCapture?.(event.pointerId);\n tapRef.current = {\n pointerId: event.pointerId,\n x: event.clientX,\n y: event.clientY,\n movedPastThreshold: false,\n };\n // preventDefault stops Radix's pointerdown open path via composeEventHandlers.\n event.preventDefault();\n }}\n onPointerMove={(event) => {\n props.onPointerMove?.(event);\n const tap = tapRef.current;\n if (tap === null || event.pointerId !== tap.pointerId || tap.movedPastThreshold) {\n return;\n }\n const dx = event.clientX - tap.x;\n const dy = event.clientY - tap.y;\n if (Math.hypot(dx, dy) > TAP_MOVEMENT_THRESHOLD_PX) {\n tap.movedPastThreshold = true;\n }\n }}\n onPointerUp={(event) => {\n props.onPointerUp?.(event);\n const tap = tapRef.current;\n if (tap === null || event.pointerId !== tap.pointerId) return;\n const wasDrag = tap.movedPastThreshold;\n tapRef.current = null;\n if (!wasDrag && !props.disabled) {\n toggleOpen((prev) => !prev);\n }\n }}\n onPointerCancel={(event) => {\n props.onPointerCancel?.(event);\n const tap = tapRef.current;\n if (tap !== null && event.pointerId === tap.pointerId) {\n tapRef.current = null;\n }\n }}\n />\n );\n});\nDropdownMenuTrigger.displayName = \"DropdownMenuTrigger\";\n\n/** Props for the {@link DropdownMenuContent} component. */\nexport interface DropdownMenuContentProps\n extends React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Content> {}\n\n/**\n * The positioned content panel rendered inside a portal.\n *\n * Override the portal z-index per-instance via `style={{ zIndex: 1500 }}` or\n * globally with the `--fanvue-ui-portal-z-index` CSS custom property.\n *\n * @example\n * ```tsx\n * <DropdownMenu>\n * <DropdownMenuTrigger asChild>\n * <Button>Open</Button>\n * </DropdownMenuTrigger>\n * <DropdownMenuContent>\n * <DropdownMenuItem>Option 1</DropdownMenuItem>\n * <DropdownMenuItem>Option 2</DropdownMenuItem>\n * </DropdownMenuContent>\n * </DropdownMenu>\n * ```\n */\nexport const DropdownMenuContent = React.forwardRef<\n React.ComponentRef<typeof DropdownMenuPrimitive.Content>,\n DropdownMenuContentProps\n>(\n (\n {\n className,\n style,\n sideOffset = 4,\n collisionPadding = FLOATING_CONTENT_COLLISION_PADDING,\n ...props\n },\n ref,\n ) => (\n <DropdownMenuPrimitive.Portal>\n <DropdownMenuPrimitive.Content\n ref={ref}\n sideOffset={sideOffset}\n collisionPadding={collisionPadding}\n className={cn(\n \"w-max min-w-(--radix-dropdown-menu-trigger-width) max-w-(--radix-dropdown-menu-content-available-width) overflow-y-auto rounded-sm border border-neutral-alphas-200 bg-surface-primary p-1 text-content-primary shadow-lg\",\n \"data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95\",\n \"data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95\",\n \"data-[side=top]:slide-in-from-bottom-2 data-[side=bottom]:slide-in-from-top-2\",\n \"data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2\",\n className,\n )}\n style={{\n zIndex: \"var(--fanvue-ui-portal-z-index, 50)\",\n maxHeight: \"var(--radix-dropdown-menu-content-available-height)\",\n ...style,\n }}\n {...props}\n />\n </DropdownMenuPrimitive.Portal>\n ),\n);\nDropdownMenuContent.displayName = \"DropdownMenuContent\";\n\n/** Props for the {@link DropdownMenuGroup} component. */\nexport type DropdownMenuGroupProps = React.ComponentPropsWithoutRef<\n typeof DropdownMenuPrimitive.Group\n>;\n\n/** Groups related menu items. Accepts an optional `DropdownMenuLabel`. */\nexport const DropdownMenuGroup = DropdownMenuPrimitive.Group;\nDropdownMenuGroup.displayName = \"DropdownMenuGroup\";\n\n/** Vertical placement of a {@link DropdownMenuLabel} within its group. */\nexport type DropdownMenuLabelPosition = \"default\" | \"top\";\n\n/** Props for the {@link DropdownMenuLabel} component. */\nexport interface DropdownMenuLabelProps\n extends React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Label> {\n /**\n * Vertical placement within the surrounding group. `\"top\"` is used for the\n * first label directly under a header; `\"default\"` adds extra top padding to\n * separate it from preceding items. @default \"default\"\n */\n position?: DropdownMenuLabelPosition;\n}\n\n/** A non-interactive label that groups related items within a menu. */\nexport const DropdownMenuLabel = React.forwardRef<\n React.ComponentRef<typeof DropdownMenuPrimitive.Label>,\n DropdownMenuLabelProps\n>(({ className, position = \"default\", ...props }, ref) => (\n <DropdownMenuPrimitive.Label\n ref={ref}\n className={cn(\n \"typography-description-12px-regular flex items-center px-3 text-content-secondary\",\n position === \"top\" ? \"py-2\" : \"pb-2 pt-4\",\n className,\n )}\n {...props}\n />\n));\nDropdownMenuLabel.displayName = \"DropdownMenuLabel\";\n\n/**\n * Height preset for a dropdown menu item.\n *\n * `\"40\"` (default) and `\"32\"` are the v2 numeric tokens that mirror the Figma\n * design system. `\"sm\"` and `\"md\"` are deprecated aliases retained for\n * backwards compatibility — `\"sm\"` maps to `\"32\"`, `\"md\"` maps to `\"40\"`.\n */\nexport type DropdownMenuItemSize =\n | \"40\"\n | \"32\"\n /** @deprecated Use `\"32\"` instead. */\n | \"sm\"\n /** @deprecated Use `\"40\"` instead. */\n | \"md\";\n\nconst SIZE_NORMALIZED: Record<DropdownMenuItemSize, \"40\" | \"32\"> = {\n \"40\": \"40\",\n md: \"40\",\n \"32\": \"32\",\n sm: \"32\",\n};\n\nconst ITEM_SIZE_CLASSES: Record<\"40\" | \"32\", string> = {\n \"40\": \"min-h-10 py-2 typography-body-default-16px-regular\",\n \"32\": \"min-h-8 py-[7px] typography-body-small-14px-regular\",\n};\n\nconst ITEM_SELECTED_TYPOGRAPHY: Record<\"40\" | \"32\", string> = {\n \"40\": \"typography-body-default-16px-semibold\",\n \"32\": \"typography-body-small-14px-semibold\",\n};\n\nexport interface DropdownMenuItemProps\n extends React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Item> {\n /** Height of the menu item row. @default \"40\" */\n size?: DropdownMenuItemSize;\n /** Applies the destructive (error) treatment. Use for irreversible actions. @default false */\n destructive?: boolean;\n /** Icon (or other node) rendered before the label. */\n leadingIcon?: React.ReactNode;\n /** Icon (or other node) rendered after the label. */\n trailingIcon?: React.ReactNode;\n /**\n * Optional secondary text rendered on a second line below the label. When\n * provided, the row switches to a two-line layout and the leading/trailing\n * icons align to the title line (top) rather than the row's vertical centre.\n */\n description?: React.ReactNode;\n /** Marks the item as the current selection in a single-select menu. @default false */\n selected?: boolean;\n}\n\n/**\n * An individual item within a {@link DropdownMenuContent}.\n *\n * @example\n * ```tsx\n * <DropdownMenuItem>Edit profile</DropdownMenuItem>\n * <DropdownMenuItem destructive>Delete</DropdownMenuItem>\n * <DropdownMenuItem leadingIcon={<EditIcon />}>Edit</DropdownMenuItem>\n *\n * // As a link\n * <DropdownMenuItem asChild>\n * <a href=\"/settings\">Settings</a>\n * </DropdownMenuItem>\n * ```\n */\nexport const DropdownMenuItem = React.forwardRef<\n React.ComponentRef<typeof DropdownMenuPrimitive.Item>,\n DropdownMenuItemProps\n>(\n (\n {\n size = \"40\",\n destructive,\n leadingIcon,\n trailingIcon,\n description,\n selected,\n className,\n children,\n asChild,\n ...props\n },\n ref,\n ) => {\n const normalizedSize = SIZE_NORMALIZED[size];\n const hasDescription = description != null;\n const itemClassName = cn(\n \"flex w-full cursor-pointer gap-2 rounded-xs px-3 outline-none\",\n hasDescription ? \"items-start\" : \"items-center\",\n ITEM_SIZE_CLASSES[normalizedSize],\n \"data-[highlighted]:bg-neutral-alphas-50\",\n \"data-[disabled]:cursor-not-allowed data-[disabled]:text-content-disabled\",\n destructive && \"text-error-content\",\n selected && [\n \"bg-buttons-primary-default text-content-primary-inverted\",\n \"data-[highlighted]:bg-buttons-primary-default\",\n ITEM_SELECTED_TYPOGRAPHY[normalizedSize],\n ],\n className,\n );\n\n if (asChild) {\n return (\n <DropdownMenuPrimitive.Item ref={ref} asChild className={itemClassName} {...props}>\n {children}\n </DropdownMenuPrimitive.Item>\n );\n }\n\n // In the two-line (description) layout, icons sit on the title's line.\n // 24px title line-height vs 16px icon → 4px (pt-1) centres the icon on it.\n const iconAlignClassName = hasDescription ? \"flex shrink-0 items-center pt-1\" : null;\n\n return (\n <DropdownMenuPrimitive.Item ref={ref} className={itemClassName} {...props}>\n {leadingIcon != null &&\n (hasDescription ? (\n <span className={iconAlignClassName!}>{leadingIcon}</span>\n ) : (\n leadingIcon\n ))}\n {hasDescription ? (\n <span className=\"flex min-w-0 flex-1 flex-col gap-0.5\">\n <span className=\"truncate\">{children}</span>\n <span\n className={cn(\n \"typography-body-small-14px-regular truncate\",\n selected ? \"text-content-primary-inverted\" : \"text-content-secondary\",\n )}\n >\n {description}\n </span>\n </span>\n ) : (\n <span className=\"min-w-0 flex-1 truncate\">{children}</span>\n )}\n {trailingIcon != null &&\n (hasDescription ? (\n <span className={iconAlignClassName!}>{trailingIcon}</span>\n ) : (\n trailingIcon\n ))}\n </DropdownMenuPrimitive.Item>\n );\n },\n);\nDropdownMenuItem.displayName = \"DropdownMenuItem\";\n\n/** Props for the {@link DropdownMenuSeparator} component. */\nexport interface DropdownMenuSeparatorProps\n extends React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Separator> {}\n\n/** Visual separator between groups of items. */\nexport const DropdownMenuSeparator = React.forwardRef<\n React.ComponentRef<typeof DropdownMenuPrimitive.Separator>,\n DropdownMenuSeparatorProps\n>(({ className, ...props }, ref) => (\n <DropdownMenuPrimitive.Separator\n ref={ref}\n className={cn(\"my-1 h-px bg-neutral-alphas-200\", className)}\n {...props}\n />\n));\nDropdownMenuSeparator.displayName = \"DropdownMenuSeparator\";\n\n/** Header type. `\"default\"` shows a title; `\"search\"` shows a search input. */\nexport type DropdownMenuHeaderType = \"default\" | \"search\";\n\n/** Header height preset. Matches the menu item sizing scale. */\nexport type DropdownMenuHeaderSize = \"40\" | \"32\";\n\n/** Search-input configuration for {@link DropdownMenuHeader} when `type=\"search\"`. */\nexport interface DropdownMenuHeaderSearchProps {\n /** Controlled value of the search input. */\n value?: string;\n /** Uncontrolled default value. */\n defaultValue?: string;\n /** Fires when the input value changes. */\n onChange?: (value: string) => void;\n /** Placeholder text shown when the input is empty. @default \"Search…\" */\n placeholder?: string;\n /** Accessible label for the search input. @default \"Search\" */\n \"aria-label\"?: string;\n}\n\nexport interface DropdownMenuHeaderProps extends React.HTMLAttributes<HTMLDivElement> {\n /** Visual type. `\"default\"` shows a title; `\"search\"` shows a search input. @default \"default\" */\n type?: DropdownMenuHeaderType;\n /** Height preset for the header row. @default \"40\" */\n size?: DropdownMenuHeaderSize;\n /** Title text shown when `type=\"default\"`. Ignored if `children` is provided. */\n title?: string;\n /** Configuration for the embedded search input when `type=\"search\"`. */\n searchProps?: DropdownMenuHeaderSearchProps;\n /** Whether to render the close icon button on the right. @default true */\n showClose?: boolean;\n /** Fires when the close icon button is activated. */\n onClose?: () => void;\n /** Accessible label for the close button. @default \"Close menu\" */\n closeLabel?: string;\n}\n\n/**\n * Optional header rendered at the top of a {@link DropdownMenuContent}. Use\n * `type=\"default\"` to title the menu, or `type=\"search\"` to embed a search\n * input for filtering long lists.\n *\n * Renders an inset separator beneath the row so it slots cleanly above the\n * first group of items.\n *\n * @example\n * ```tsx\n * <DropdownMenuContent>\n * <DropdownMenuHeader title=\"Sort by\" onClose={() => setOpen(false)} />\n * <DropdownMenuItem>Newest</DropdownMenuItem>\n * <DropdownMenuItem>Oldest</DropdownMenuItem>\n * </DropdownMenuContent>\n * ```\n */\nexport const DropdownMenuHeader = React.forwardRef<HTMLDivElement, DropdownMenuHeaderProps>(\n (\n {\n type = \"default\",\n size = \"40\",\n title,\n searchProps,\n showClose = true,\n onClose,\n closeLabel = \"Close menu\",\n className,\n children,\n ...props\n },\n ref,\n ) => {\n const titleTypography =\n size === \"32\"\n ? \"typography-body-small-14px-semibold\"\n : \"typography-body-default-16px-semibold\";\n const toggleOpen = React.useContext(ToggleOpenContext);\n\n const handleClose = () => {\n onClose?.();\n // Also dismiss the Radix menu when used in uncontrolled mode — otherwise\n // the close button would look broken to consumers that don't wire up\n // `open` / `onOpenChange` themselves.\n toggleOpen?.(() => false);\n };\n\n return (\n <div\n ref={ref}\n className={cn(\n \"flex flex-col px-1 pt-1 mb-1\",\n // Search needs an 8px gap between the input and the divider; the\n // default (title) variant uses 4px because the title baseline sits\n // closer to the divider naturally.\n type === \"search\" ? \"gap-2\" : \"gap-1\",\n className,\n )}\n {...props}\n >\n <div className=\"flex items-center gap-4 pl-2\">\n {type === \"default\" ? (\n <div className={cn(\"min-w-0 flex-1 truncate text-content-primary\", titleTypography)}>\n {children ?? title}\n </div>\n ) : (\n <SearchInput {...searchProps} />\n )}\n {showClose && (\n <IconButton\n variant=\"tertiary\"\n size=\"32\"\n icon={<CloseIcon />}\n onClick={handleClose}\n aria-label={closeLabel}\n />\n )}\n </div>\n <DropdownMenuSeparator className=\"my-0\" />\n </div>\n );\n },\n);\nDropdownMenuHeader.displayName = \"DropdownMenuHeader\";\n\nfunction SearchInput({\n value,\n defaultValue,\n onChange,\n placeholder = \"Search\\u2026\",\n \"aria-label\": ariaLabel = \"Search\",\n}: DropdownMenuHeaderSearchProps = {}) {\n return (\n <label\n className={cn(\n \"flex min-w-0 flex-1 items-center gap-2 rounded-xs border border-border-primary\",\n \"bg-neutral-alphas-50 px-3 py-1 text-content-primary\",\n \"focus-within:shadow-focus-ring focus-within:outline-none\",\n )}\n >\n <SearchIcon className=\"size-4 shrink-0 text-content-tertiary\" aria-hidden=\"true\" />\n <input\n type=\"search\"\n className={cn(\n \"typography-body-default-16px-regular min-w-0 flex-1 bg-transparent outline-none\",\n \"placeholder:text-content-tertiary\",\n )}\n value={value}\n defaultValue={defaultValue}\n placeholder={placeholder}\n aria-label={ariaLabel}\n onChange={(event) => onChange?.(event.target.value)}\n // Radix DropdownMenu listens for keystrokes on Content for its\n // typeahead (typing letters jumps focus to a matching item). That\n // listener steals focus from the input after the first letter, so we\n // stop character keys from bubbling. Navigation keys (arrows / Tab /\n // Escape / Enter) are still allowed through so the user can leave the\n // input for the list or close the menu. Pointer events are stopped so\n // clicking back into the input doesn't fight the menu's focus\n // management either.\n onKeyDown={(event) => {\n if (!NAVIGATION_KEYS.has(event.key)) event.stopPropagation();\n }}\n onPointerDown={(event) => event.stopPropagation()}\n onMouseDown={(event) => event.stopPropagation()}\n />\n </label>\n );\n}\n\n/** Props for the {@link DropdownMenuRadioGroup} component. */\nexport interface DropdownMenuRadioGroupProps\n extends React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.RadioGroup> {}\n\n/**\n * Groups {@link DropdownMenuRadioItem} children so they behave as a\n * single-select set. Controlled via `value`/`onValueChange`.\n *\n * @example\n * ```tsx\n * <DropdownMenuRadioGroup value={sort} onValueChange={setSort}>\n * <DropdownMenuRadioItem value=\"newest\">Newest first</DropdownMenuRadioItem>\n * <DropdownMenuRadioItem value=\"oldest\">Oldest first</DropdownMenuRadioItem>\n * </DropdownMenuRadioGroup>\n * ```\n */\nexport const DropdownMenuRadioGroup = DropdownMenuPrimitive.RadioGroup;\n\n/** Height preset for a {@link DropdownMenuRadioItem}. */\nexport type DropdownMenuRadioItemSize = \"40\";\n\nexport interface DropdownMenuRadioItemProps\n extends React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.RadioItem> {\n /** Optional secondary text shown below the title. */\n helper?: string;\n /** Height of the item row. @default \"40\" */\n size?: DropdownMenuRadioItemSize;\n}\n\n/**\n * A single radio-style choice within a {@link DropdownMenuRadioGroup}. Shows\n * a circular indicator that fills when selected, plus an optional helper line\n * underneath the title.\n */\nexport const DropdownMenuRadioItem = React.forwardRef<\n React.ComponentRef<typeof DropdownMenuPrimitive.RadioItem>,\n DropdownMenuRadioItemProps\n>(({ className, children, helper, size: _size = \"40\", ...props }, ref) => {\n return (\n <DropdownMenuPrimitive.RadioItem\n ref={ref}\n className={cn(\n \"group flex w-full cursor-pointer items-start gap-3 rounded-xs px-4 py-2 outline-none\",\n \"data-[highlighted]:bg-neutral-alphas-50\",\n \"data-[disabled]:cursor-not-allowed data-[disabled]:text-content-disabled\",\n \"data-[state=checked]:bg-buttons-primary-default data-[state=checked]:text-content-primary-inverted\",\n \"data-[state=checked]:data-[highlighted]:bg-buttons-primary-default\",\n className,\n )}\n {...props}\n >\n <span\n className={cn(\n \"mt-1 flex size-4 shrink-0 items-center justify-center rounded-full border border-icons-primary\",\n \"group-data-[disabled]:border-content-disabled\",\n \"group-data-[state=checked]:border-icons-primary-inverted\",\n )}\n aria-hidden=\"true\"\n >\n <DropdownMenuPrimitive.ItemIndicator asChild>\n <span className=\"size-2 rounded-full bg-content-primary-inverted\" />\n </DropdownMenuPrimitive.ItemIndicator>\n </span>\n <span className=\"flex min-w-0 flex-1 flex-col gap-1\">\n <span className=\"typography-body-default-16px-semibold truncate\">{children}</span>\n {helper && (\n <span\n className={cn(\n \"typography-description-12px-regular text-content-secondary\",\n \"group-data-[state=checked]:text-content-primary-inverted\",\n \"group-data-[disabled]:text-content-disabled\",\n )}\n >\n {helper}\n </span>\n )}\n </span>\n </DropdownMenuPrimitive.RadioItem>\n );\n});\nDropdownMenuRadioItem.displayName = \"DropdownMenuRadioItem\";\n"],"names":["React","useControllableState","jsx","DropdownMenuPrimitive","FLOATING_CONTENT_COLLISION_PADDING","cn","jsxs","IconButton","CloseIcon","SearchIcon"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAUA,MAAM,4BAA4B;AAKlC,MAAM,sCAAsB,IAAI;AAAA,EAC9B;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,CAAC;AAWD,MAAM,oBAAoBA,iBAAM,cAE9B,IAAI;AAOC,SAAS,aAAa;AAAA,EAC3B,MAAM;AAAA,EACN;AAAA,EACA;AAAA,EACA;AAAA,EACA,GAAG;AACL,GAAsB;AACpB,QAAM,CAAC,OAAO,OAAO,OAAO,IAAIC,0BAAAA,qBAAqB;AAAA,IACnD,MAAM;AAAA,IACN,aAAa,eAAe;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|
16: {
|
|
26
|
-
|
|
26
|
+
// `sw` must be set so BaseIcon strokes the checkmark; without it the path
|
|
27
|
+
// is filled into a solid wedge instead of a tick.
|
|
28
|
+
outlined: [{ d: "m3.333 8 3.334 3.333L13 5", sw: 1.333 }]
|
|
27
29
|
},
|
|
28
30
|
24: {
|
|
29
31
|
outlined: [{ d: "m5 12 5 5 9.5-9.5", sw: 1.5 }]
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TickIcon.cjs","sources":["../../../../src/components/Icons/TickIcon.tsx"],"sourcesContent":["import * as React from \"react\";\nimport { BaseIcon } from \"./BaseIcon\";\nimport type { BaseIconProps, IconVariants } from \"./types\";\n\nconst VARIANTS: IconVariants = {\n 16: {\n outlined: [{ d: \"m3.333 8 3.334 3.333L13 5\" }],\n },\n 24: {\n outlined: [{ d: \"m5 12 5 5 9.5-9.5\", sw: 1.5 }],\n },\n 32: {\n outlined: [{ d: \"m6.667 16 6.666 6.667L26 10\", sw: 2 }],\n },\n};\n\n/** Props for {@link TickIcon}. See {@link BaseIconProps} for the shared shape. */\nexport type TickIconProps = BaseIconProps;\n\n/**\n * Tick icon. Renders at sizes 16, 24, or 32 px.\n *\n * @example\n * ```tsx\n * <TickIcon size={24} />\n * ```\n */\nexport const TickIcon = React.forwardRef<SVGSVGElement, TickIconProps>((props, ref) => (\n <BaseIcon ref={ref} variants={VARIANTS} {...props} />\n));\n\nTickIcon.displayName = \"TickIcon\";\n"],"names":["React","jsx","BaseIcon"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAIA,MAAM,WAAyB;AAAA,EAC7B,IAAI;AAAA,
|
|
1
|
+
{"version":3,"file":"TickIcon.cjs","sources":["../../../../src/components/Icons/TickIcon.tsx"],"sourcesContent":["import * as React from \"react\";\nimport { BaseIcon } from \"./BaseIcon\";\nimport type { BaseIconProps, IconVariants } from \"./types\";\n\nconst VARIANTS: IconVariants = {\n 16: {\n // `sw` must be set so BaseIcon strokes the checkmark; without it the path\n // is filled into a solid wedge instead of a tick.\n outlined: [{ d: \"m3.333 8 3.334 3.333L13 5\", sw: 1.333 }],\n },\n 24: {\n outlined: [{ d: \"m5 12 5 5 9.5-9.5\", sw: 1.5 }],\n },\n 32: {\n outlined: [{ d: \"m6.667 16 6.666 6.667L26 10\", sw: 2 }],\n },\n};\n\n/** Props for {@link TickIcon}. See {@link BaseIconProps} for the shared shape. */\nexport type TickIconProps = BaseIconProps;\n\n/**\n * Tick icon. Renders at sizes 16, 24, or 32 px.\n *\n * @example\n * ```tsx\n * <TickIcon size={24} />\n * ```\n */\nexport const TickIcon = React.forwardRef<SVGSVGElement, TickIconProps>((props, ref) => (\n <BaseIcon ref={ref} variants={VARIANTS} {...props} />\n));\n\nTickIcon.displayName = \"TickIcon\";\n"],"names":["React","jsx","BaseIcon"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAIA,MAAM,WAAyB;AAAA,EAC7B,IAAI;AAAA;AAAA;AAAA,IAGF,UAAU,CAAC,EAAE,GAAG,6BAA6B,IAAI,OAAO;AAAA,EAAA;AAAA,EAE1D,IAAI;AAAA,IACF,UAAU,CAAC,EAAE,GAAG,qBAAqB,IAAI,KAAK;AAAA,EAAA;AAAA,EAEhD,IAAI;AAAA,IACF,UAAU,CAAC,EAAE,GAAG,+BAA+B,IAAI,GAAG;AAAA,EAAA;AAE1D;AAaO,MAAM,WAAWA,iBAAM,WAAyC,CAAC,OAAO,QAC7EC,2BAAAA,IAACC,SAAAA,UAAA,EAAS,KAAU,UAAU,UAAW,GAAG,OAAO,CACpD;AAED,SAAS,cAAc;;"}
|
|
@@ -4,6 +4,7 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
|
4
4
|
const jsxRuntime = require("react/jsx-runtime");
|
|
5
5
|
const React = require("react");
|
|
6
6
|
const cn = require("../../utils/cn.cjs");
|
|
7
|
+
const agenciesIcon = require("./agenciesIcon.cjs");
|
|
7
8
|
function _interopNamespaceDefault(e) {
|
|
8
9
|
const n = Object.create(null, { [Symbol.toStringTag]: { value: "Module" } });
|
|
9
10
|
if (e) {
|
|
@@ -27,7 +28,6 @@ const getLogoColors = (color, variant) => {
|
|
|
27
28
|
icon: "var(--color-brand-primary-default)",
|
|
28
29
|
iconInner: "var(--primitives-color-gray-black)",
|
|
29
30
|
textClass: ""
|
|
30
|
-
// Uses parent's text-content-primary
|
|
31
31
|
};
|
|
32
32
|
}
|
|
33
33
|
if (color === "decolour") {
|
|
@@ -35,7 +35,6 @@ const getLogoColors = (color, variant) => {
|
|
|
35
35
|
iconClass: "fill-[#151515] dark:fill-[#ffffff]",
|
|
36
36
|
iconInnerClass: "fill-[#ffffff] dark:fill-[#151515]",
|
|
37
37
|
textClass: ""
|
|
38
|
-
// Uses parent's text-content-primary
|
|
39
38
|
};
|
|
40
39
|
}
|
|
41
40
|
if (color === "whiteAlways") {
|
|
@@ -56,7 +55,6 @@ const getLogoColors = (color, variant) => {
|
|
|
56
55
|
icon: "var(--color-brand-primary-default)",
|
|
57
56
|
iconInner: "var(--primitives-color-gray-black)",
|
|
58
57
|
textClass: ""
|
|
59
|
-
// Default to adaptive color
|
|
60
58
|
};
|
|
61
59
|
};
|
|
62
60
|
const sizeClasses = {
|
|
@@ -68,6 +66,60 @@ const sizeClasses = {
|
|
|
68
66
|
"48": "h-12",
|
|
69
67
|
"64": "h-16"
|
|
70
68
|
};
|
|
69
|
+
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";
|
|
70
|
+
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";
|
|
71
|
+
const FlatIconSVG = ({
|
|
72
|
+
className,
|
|
73
|
+
color,
|
|
74
|
+
variant
|
|
75
|
+
}) => {
|
|
76
|
+
const colors = getLogoColors(color, variant);
|
|
77
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
78
|
+
"svg",
|
|
79
|
+
{
|
|
80
|
+
viewBox: "0 0 39 39",
|
|
81
|
+
fill: "none",
|
|
82
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
83
|
+
className,
|
|
84
|
+
"aria-hidden": "true",
|
|
85
|
+
"data-testid": "logo-icon",
|
|
86
|
+
children: [
|
|
87
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
88
|
+
"path",
|
|
89
|
+
{
|
|
90
|
+
d: ICON_BG_PATH,
|
|
91
|
+
...color === "decolour" ? { className: colors.iconClass } : { fill: colors.icon }
|
|
92
|
+
}
|
|
93
|
+
),
|
|
94
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
95
|
+
"path",
|
|
96
|
+
{
|
|
97
|
+
fillRule: "evenodd",
|
|
98
|
+
clipRule: "evenodd",
|
|
99
|
+
d: ICON_F_PATH,
|
|
100
|
+
...color === "decolour" ? { className: colors.iconInnerClass } : { fill: colors.iconInner }
|
|
101
|
+
}
|
|
102
|
+
)
|
|
103
|
+
]
|
|
104
|
+
}
|
|
105
|
+
);
|
|
106
|
+
};
|
|
107
|
+
const AgenciesIconSVG = ({ className }) => {
|
|
108
|
+
const ns = React__namespace.useId().replace(/:/g, "");
|
|
109
|
+
const html = React__namespace.useMemo(
|
|
110
|
+
() => agenciesIcon.AGENCIES_ICON_SVG.replace(/id="([a-z]+)"/g, `id="$1${ns}"`).replace(/url\(#([a-z]+)\)/g, `url(#$1${ns})`).replace(/href="#([a-z]+)"/g, `href="#$1${ns}"`),
|
|
111
|
+
[ns]
|
|
112
|
+
);
|
|
113
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
114
|
+
"span",
|
|
115
|
+
{
|
|
116
|
+
className: cn.cn("inline-block aspect-square isolate", className),
|
|
117
|
+
"aria-hidden": "true",
|
|
118
|
+
"data-testid": "logo-icon",
|
|
119
|
+
dangerouslySetInnerHTML: { __html: html }
|
|
120
|
+
}
|
|
121
|
+
);
|
|
122
|
+
};
|
|
71
123
|
const WordmarkSVG = ({ className }) => {
|
|
72
124
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
73
125
|
"svg",
|
|
@@ -88,20 +140,55 @@ const WordmarkSVG = ({ className }) => {
|
|
|
88
140
|
}
|
|
89
141
|
);
|
|
90
142
|
};
|
|
143
|
+
const AgenciesWordmark = ({
|
|
144
|
+
size,
|
|
145
|
+
color,
|
|
146
|
+
textClass,
|
|
147
|
+
padTop
|
|
148
|
+
}) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
149
|
+
"div",
|
|
150
|
+
{
|
|
151
|
+
className: cn.cn("inline-flex flex-col items-end", padTop && "pt-[0.125em]"),
|
|
152
|
+
style: { fontSize: `${size}px` },
|
|
153
|
+
children: [
|
|
154
|
+
/* @__PURE__ */ jsxRuntime.jsx(WordmarkSVG, { className: cn.cn("h-[0.75em] w-auto", textClass) }),
|
|
155
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
156
|
+
"span",
|
|
157
|
+
{
|
|
158
|
+
className: "font-bold uppercase leading-none",
|
|
159
|
+
style: {
|
|
160
|
+
color: color === "decolour" ? "currentColor" : "var(--primitives-color-purple-300)",
|
|
161
|
+
fontSize: "0.25em",
|
|
162
|
+
letterSpacing: "0.05em",
|
|
163
|
+
marginTop: "0.06em"
|
|
164
|
+
},
|
|
165
|
+
children: "AGENCIES"
|
|
166
|
+
}
|
|
167
|
+
)
|
|
168
|
+
]
|
|
169
|
+
}
|
|
170
|
+
);
|
|
91
171
|
const Logo = React__namespace.forwardRef(
|
|
92
|
-
({ className, variant = "full", color = "fullColour", size, ...props }, ref) => {
|
|
172
|
+
({ className, variant = "full", color = "fullColour", version = "default", size, ...props }, ref) => {
|
|
93
173
|
const colors = getLogoColors(color, variant);
|
|
174
|
+
const isAgencies = version === "agencies";
|
|
175
|
+
const isAgenciesFull = isAgencies && variant === "full";
|
|
94
176
|
const showIcon = variant === "full" || variant === "icon" || variant === "portrait";
|
|
95
177
|
const showWordmark = variant === "full" || variant === "wordmark" || variant === "portrait";
|
|
96
|
-
const
|
|
178
|
+
const resolvedSize = size ?? (variant === "icon" ? "40" : "32");
|
|
179
|
+
const sizeClass = sizeClasses[resolvedSize];
|
|
97
180
|
const ariaProps = props["aria-label"] ? { role: "img" } : {};
|
|
181
|
+
const useGlossyIcon = isAgencies && color !== "decolour";
|
|
98
182
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
99
183
|
"div",
|
|
100
184
|
{
|
|
101
185
|
ref,
|
|
102
186
|
"data-testid": "logo",
|
|
103
187
|
className: cn.cn(
|
|
104
|
-
"inline-flex
|
|
188
|
+
"inline-flex text-content-primary",
|
|
189
|
+
// Agencies full lockup aligns the icon and wordmark by their centres while the
|
|
190
|
+
// AGENCIES label hangs below; every other case centres the row.
|
|
191
|
+
isAgenciesFull ? "items-start" : "items-center",
|
|
105
192
|
variant === "portrait" ? "flex-col gap-2" : "flex-row",
|
|
106
193
|
variant === "full" && "gap-2",
|
|
107
194
|
className
|
|
@@ -109,36 +196,23 @@ const Logo = React__namespace.forwardRef(
|
|
|
109
196
|
...ariaProps,
|
|
110
197
|
...props,
|
|
111
198
|
children: [
|
|
112
|
-
showIcon && /* @__PURE__ */ jsxRuntime.
|
|
113
|
-
|
|
199
|
+
showIcon && (useGlossyIcon ? /* @__PURE__ */ jsxRuntime.jsx(AgenciesIconSVG, { className: cn.cn("w-auto shrink-0", sizeClass) }) : /* @__PURE__ */ jsxRuntime.jsx(
|
|
200
|
+
FlatIconSVG,
|
|
114
201
|
{
|
|
115
|
-
viewBox: "0 0 39 39",
|
|
116
|
-
fill: "none",
|
|
117
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
118
202
|
className: cn.cn("w-auto shrink-0", sizeClass),
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
"path",
|
|
131
|
-
{
|
|
132
|
-
fillRule: "evenodd",
|
|
133
|
-
clipRule: "evenodd",
|
|
134
|
-
d: "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",
|
|
135
|
-
...color === "decolour" ? { className: colors.iconInnerClass } : { fill: colors.iconInner }
|
|
136
|
-
}
|
|
137
|
-
)
|
|
138
|
-
]
|
|
203
|
+
color,
|
|
204
|
+
variant
|
|
205
|
+
}
|
|
206
|
+
)),
|
|
207
|
+
showWordmark && (isAgencies ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
208
|
+
AgenciesWordmark,
|
|
209
|
+
{
|
|
210
|
+
size: resolvedSize,
|
|
211
|
+
color,
|
|
212
|
+
textClass: colors.textClass,
|
|
213
|
+
padTop: isAgenciesFull
|
|
139
214
|
}
|
|
140
|
-
),
|
|
141
|
-
showWordmark && /* @__PURE__ */ jsxRuntime.jsx(WordmarkSVG, { className: cn.cn("w-auto", sizeClass, colors.textClass) })
|
|
215
|
+
) : /* @__PURE__ */ jsxRuntime.jsx(WordmarkSVG, { className: cn.cn("w-auto", sizeClass, colors.textClass) }))
|
|
142
216
|
]
|
|
143
217
|
}
|
|
144
218
|
);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Logo.cjs","sources":["../../../../src/components/Logo/Logo.tsx"],"sourcesContent":["import * as React from \"react\";\nimport { cn } from \"../../utils/cn\";\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: \"\", // Uses parent's text-content-primary\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: \"\", // Uses parent's text-content-primary\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: \"\", // Default to adaptive color\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/** 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 /** 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 `type` 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 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 brand logo. Supports full (icon + wordmark), icon-only, wordmark-only,\n * and portrait (stacked) layouts with multiple colour schemes.\n *\n * @example\n * ```tsx\n * <Logo type=\"full\" color=\"fullColour\" />\n * ```\n */\nexport const Logo = React.forwardRef<HTMLDivElement, LogoProps>(\n ({ className, variant = \"full\", color = \"fullColour\", size, ...props }, ref) => {\n const colors = getLogoColors(color, variant);\n const showIcon = variant === \"full\" || variant === \"icon\" || variant === \"portrait\";\n const showWordmark = variant === \"full\" || variant === \"wordmark\" || variant === \"portrait\";\n const sizeClass = sizeClasses[size ?? (variant === \"icon\" ? \"40\" : \"32\")];\n\n // When aria-label is provided, add role=\"img\" for proper accessibility\n const ariaProps = props[\"aria-label\"] ? { role: \"img\" as const } : {};\n\n return (\n <div\n ref={ref}\n data-testid=\"logo\"\n className={cn(\n \"inline-flex items-center text-content-primary\",\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 <svg\n viewBox=\"0 0 39 39\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n className={cn(\"w-auto shrink-0\", sizeClass)}\n aria-hidden=\"true\"\n data-testid=\"logo-icon\"\n >\n <path\n d=\"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\"\n {...(color === \"decolour\" ? { className: colors.iconClass } : { fill: colors.icon })}\n />\n <path\n fillRule=\"evenodd\"\n clipRule=\"evenodd\"\n d=\"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 {...(color === \"decolour\"\n ? { className: colors.iconInnerClass }\n : { fill: colors.iconInner })}\n />\n </svg>\n )}\n {showWordmark && <WordmarkSVG className={cn(\"w-auto\", sizeClass, colors.textClass)} />}\n </div>\n );\n },\n);\n\nLogo.displayName = \"Logo\";\n"],"names":["jsx","React","jsxs","cn"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAGA,MAAM,gBAAgB,CAAC,OAAkB,YAAyB;AAChE,MAAI,UAAU,cAAc;AAC1B,WAAO;AAAA,MACL,MAAM;AAAA,MACN,WAAW;AAAA,MACX,WAAW;AAAA;AAAA,IAAA;AAAA,EAEf;AAEA,MAAI,UAAU,YAAY;AACxB,WAAO;AAAA,MACL,WAAW;AAAA,MACX,gBAAgB;AAAA,MAChB,WAAW;AAAA;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;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,QAEH,UAAA;AAAA,UAAA,YACCD,2BAAAA;AAAAA,YAAC;AAAA,YAAA;AAAA,cACC,SAAQ;AAAA,cACR,MAAK;AAAA,cACL,OAAM;AAAA,cACN,WAAWC,GAAAA,GAAG,mBAAmB,SAAS;AAAA,cAC1C,eAAY;AAAA,cACZ,eAAY;AAAA,cAEZ,UAAA;AAAA,gBAAAH,2BAAAA;AAAAA,kBAAC;AAAA,kBAAA;AAAA,oBACC,GAAE;AAAA,oBACD,GAAI,UAAU,aAAa,EAAE,WAAW,OAAO,cAAc,EAAE,MAAM,OAAO,KAAA;AAAA,kBAAK;AAAA,gBAAA;AAAA,gBAEpFA,2BAAAA;AAAAA,kBAAC;AAAA,kBAAA;AAAA,oBACC,UAAS;AAAA,oBACT,UAAS;AAAA,oBACT,GAAE;AAAA,oBACD,GAAI,UAAU,aACX,EAAE,WAAW,OAAO,mBACpB,EAAE,MAAM,OAAO,UAAA;AAAA,kBAAU;AAAA,gBAAA;AAAA,cAC/B;AAAA,YAAA;AAAA,UAAA;AAAA,UAGH,+CAAiB,aAAA,EAAY,WAAWG,MAAG,UAAU,WAAW,OAAO,SAAS,EAAA,CAAG;AAAA,QAAA;AAAA,MAAA;AAAA,IAAA;AAAA,EAG1F;AACF;AAEA,KAAK,cAAc;;"}
|
|
1
|
+
{"version":3,"file":"Logo.cjs","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(\"inline-block aspect-square isolate\", 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":["jsxs","jsx","React","AGENCIES_ICON_SVG","cn"],"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,EACN,MAAM;AAAA,EAC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AAY,UAAU,YAAY,cAAc,YAAY;AACjF,UAAM,eAAe,SAAS,YAAY,SAAS,OAAO;AAC1D,UAAM,YAAY,YAAY,YAAY;AAE1C,UAAM,YAAY,MAAM,YAAY,IAAI,EAAE,MAAM,MAAA,IAAmB,CAAA;AAEnE,UAAM,gBAAgB,cAAc,UAAU;AAE9C,WACEF,2BAAAA;AAAAA,MAAC;AAAA,MAAA;AAAA,QACC;AAAA,QACA,eAAY;AAAA,QACZ,WAAWI,GAAAA;AAAAA,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,+CACE,iBAAA,EAAgB,WAAWA,GAAAA,GAAG,mBAAmB,SAAS,GAAG,IAE9DH,2BAAAA;AAAAA,YAAC;AAAA,YAAA;AAAA,cACC,WAAWG,GAAAA,GAAG,mBAAmB,SAAS;AAAA,cAC1C;AAAA,cACA;AAAA,YAAA;AAAA,UAAA;AAAA,UAGL,iBACE,aACCH,2BAAAA;AAAAA,YAAC;AAAA,YAAA;AAAA,cACC,MAAM;AAAA,cACN;AAAA,cACA,WAAW,OAAO;AAAA,cAClB,QAAQ;AAAA,YAAA;AAAA,UAAA,mCAGT,aAAA,EAAY,WAAWG,GAAAA,GAAG,UAAU,WAAW,OAAO,SAAS,GAAG;AAAA,QAAA;AAAA,MAAA;AAAA,IAAA;AAAA,EAI7E;AACF;AAEA,KAAK,cAAc;;"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
"use strict";
|
|
3
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
4
|
+
const AGENCIES_ICON_SVG = '<svg width="100%" height="100%" style="display:block" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><g clip-path="url(#a)"><path fill="#49f264" d="M0 9.21753C0 4.12683 4.12683 0 9.21753 0H22.7825C27.8732 0 32 4.12683 32 9.21753V22.7825C32 27.8732 27.8732 32 22.7825 32H9.21753C4.12683 32 0 27.8732 0 22.7825z"/><path fill="url(#b)" d="M0 9.21753C0 4.12683 4.12683 0 9.21753 0H22.7825C27.8732 0 32 4.12683 32 9.21753V22.7825C32 27.8732 27.8732 32 22.7825 32H9.21753C4.12683 32 0 27.8732 0 22.7825z" style="mix-blend-mode:lighten"/><path fill="url(#c)" d="M0 9.21753C0 4.12683 4.12683 0 9.21753 0H22.7825C27.8732 0 32 4.12683 32 9.21753V22.7825C32 27.8732 27.8732 32 22.7825 32H9.21753C4.12683 32 0 27.8732 0 22.7825z"/><g style="mix-blend-mode:color-dodge"><mask id="e" width="32" height="32" x="0" y="0" maskUnits="userSpaceOnUse" style="mask-type:alpha"><path fill="url(#d)" d="M0 0h32v32H0z"/></mask><g mask="url(#e)"><path fill="url(#f)" d="M0 9.21753C0 4.12683 4.12683 0 9.21753 0H22.7825C27.8732 0 32 4.12683 32 9.21753V22.7825C32 27.8732 27.8732 32 22.7825 32H9.21753C4.12683 32 0 27.8732 0 22.7825z"/></g></g><path stroke="url(#g)" stroke-width=".384064" d="M9.21777.192383H22.7822c4.9847 0 9.0254 4.040747 9.0254 9.025387V22.7822c0 4.9847-4.0407 9.0254-9.0254 9.0254H9.21777c-4.98464 0-9.025387-4.0407-9.025387-9.0254V9.21777c0-4.98464 4.040747-9.025387 9.025387-9.025387Z"/><path stroke="url(#h)" stroke-width=".384064" d="M9.21777.192383H22.7822c4.9847 0 9.0254 4.040747 9.0254 9.025387V22.7822c0 4.9847-4.0407 9.0254-9.0254 9.0254H9.21777c-4.98464 0-9.025387-4.0407-9.025387-9.0254V9.21777c0-4.98464 4.040747-9.025387 9.025387-9.025387Z"/><path stroke="url(#i)" stroke-width=".384064" d="M9.21777.192383H22.7822c4.9847 0 9.0254 4.040747 9.0254 9.025387V22.7822c0 4.9847-4.0407 9.0254-9.0254 9.0254H9.21777c-4.98464 0-9.025387-4.0407-9.025387-9.0254V9.21777c0-4.98464 4.040747-9.025387 9.025387-9.025387Z"/><path stroke="url(#j)" stroke-width=".384064" d="M9.21777.192383H22.7822c4.9847 0 9.0254 4.040747 9.0254 9.025387V22.7822c0 4.9847-4.0407 9.0254-9.0254 9.0254H9.21777c-4.98464 0-9.025387-4.0407-9.025387-9.0254V9.21777c0-4.98464 4.040747-9.025387 9.025387-9.025387Z"/><g fill-rule="evenodd" clip-rule="evenodd" filter="url(#k)"><path fill="url(#l)" d="M10.0735 25.0934c-.68532 0-1.01866-.588-.8788-1.2039.18182-.8399 1.1306-3.3317.41726-4.4516-1.04897-1.6378-3.65855-1.3998-4.24597-2.2398-.42339-.6163-.04608-1.2161.53963-1.5678 1.3147-.8399 3.86019-.602 6.33578-2.2538 1.3706-.8959 2.6294-2.7157 3.3427-3.80764 1.007-1.53986 1.4405-1.86183 3.5525-1.86183h7.3969c1.1649 0 1.5298 1.97802-.3712 2.19546-.4895.056-1.7949.25201-3.6551.47591-1.7762.224-5.7203.7583-4.1679 3.2921 1.1609 1.3298 3.6085 1.1619 4.1679 1.9598.4047.5523.0467 1.1398-.3939 1.422-1.3287.8399-4.1656.7478-6.6411 2.3856-1.6784 1.1199-3.0432 3.6117-3.6026 4.4516-.4056.6159-1.0968 1.2039-1.7821 1.2039z"/><path fill="url(#m)" d="M10.0735 25.0934c-.68532 0-1.01866-.588-.8788-1.2039.18182-.8399 1.1306-3.3317.41726-4.4516-1.04897-1.6378-3.65855-1.3998-4.24597-2.2398-.42339-.6163-.04608-1.2161.53963-1.5678 1.3147-.8399 3.86019-.602 6.33578-2.2538 1.3706-.8959 2.6294-2.7157 3.3427-3.80764 1.007-1.53986 1.4405-1.86183 3.5525-1.86183h7.3969c1.1649 0 1.5298 1.97802-.3712 2.19546-.4895.056-1.7949.25201-3.6551.47591-1.7762.224-5.7203.7583-4.1679 3.2921 1.1609 1.3298 3.6085 1.1619 4.1679 1.9598.4047.5523.0467 1.1398-.3939 1.422-1.3287.8399-4.1656.7478-6.6411 2.3856-1.6784 1.1199-3.0432 3.6117-3.6026 4.4516-.4056.6159-1.0968 1.2039-1.7821 1.2039z" style="mix-blend-mode:lighten"/></g><path fill="#000" fill-opacity=".01" fill-rule="evenodd" clip-rule="evenodd" d="M10.0735 25.0934c-.68532 0-1.01866-.588-.8788-1.2039.18182-.8399 1.1306-3.3317.41726-4.4516-1.04897-1.6378-3.65855-1.3998-4.24597-2.2398-.42339-.6163-.04608-1.2161.53963-1.5678 1.3147-.8399 3.86019-.602 6.33578-2.2538 1.3706-.8959 2.6294-2.7157 3.3427-3.80764 1.007-1.53986 1.4405-1.86183 3.5525-1.86183h7.3969c1.1649 0 1.5298 1.97802-.3712 2.19546-.4895.056-1.7949.25201-3.6551.47591-1.7762.224-5.7203.7583-4.1679 3.2921 1.1609 1.3298 3.6085 1.1619 4.1679 1.9598.4047.5523.0467 1.1398-.3939 1.422-1.3287.8399-4.1656.7478-6.6411 2.3856-1.6784 1.1199-3.0432 3.6117-3.6026 4.4516-.4056.6159-1.0968 1.2039-1.7821 1.2039z" clip-rule="evenodd"/><path stroke="url(#n)" stroke-width=".2" d="M19.1363 7.80664h7.3975c.5165.00015.8647.43888.8642.91602-.0004.2358-.0878.47842-.2832.6748-.1956.19642-.5063.35292-.9639.40527-.2461.02816-.6967.09198-1.3154.17579-.6197.08398-1.4106.18888-2.3398.30078h-.001c-.8847.1115-2.3314.3019-3.3623.7881-.5151.2429-.944.5683-1.1377 1.0107-.1965.4495-.1391.9935.2598 1.6446l.0039.0068.0058.0068c.6027.6904 1.5336.9866 2.3584 1.21.4178.1131.8057.2068 1.127.3223.3232.1161.5549.2466.6758.4189l.0009.002c.1808.2467.1905.4956.1075.7177-.0849.2269-.2685.4285-.4747.5606-.3192.2017-.7339.351-1.2226.4853-.4895.1345-1.0406.2513-1.6367.3955-1.1874.2873-2.5304.677-3.7832 1.5059-.8547.5703-1.6243 1.4859-2.2471 2.3564-.6205.8674-1.1094 1.7126-1.3828 2.1231l-.001.001c-.197.299-.4627.5907-.7607.8066-.2989.2166-.623.3516-.9375.3516h-.0137c-.31124 0-.53407-.1321-.66602-.3272-.13357-.1975-.1799-.4687-.11524-.7539v-.001c.0446-.206.13595-.5142.24024-.8867.10355-.3699.21853-.7984.30468-1.2363.08607-.4375.14448-.8885.13575-1.3027-.00875-.413-.08519-.7999-.27735-1.1016-.54613-.8525-1.49407-1.2105-2.35156-1.4609-.43536-.1272-.84117-.2245-1.18164-.3448-.34146-.1206-.58746-.2553-.71485-.4375-.19178-.2797-.19985-.5478-.09863-.7871.10381-.2452.32707-.4687.6084-.6377l.00195-.001c.31549-.2015.70908-.3411 1.16797-.4619.46026-.1211.97354-.2206 1.53321-.3476 1.04421-.2371 2.22539-.565 3.40139-1.294l.2343-.1513c1.3906-.9091 2.6595-2.7466 3.3711-3.83598.5042-.7709.8527-1.21602 1.3262-1.47558.4739-.25964 1.0875-.34179 2.1426-.3418Z"/><path stroke="url(#o)" stroke-width=".2" d="M19.1363 7.80664h7.3975c.5165.00015.8647.43888.8642.91602-.0004.2358-.0878.47842-.2832.6748-.1956.19642-.5063.35292-.9639.40527-.2461.02816-.6967.09198-1.3154.17579-.6197.08398-1.4106.18888-2.3398.30078h-.001c-.8847.1115-2.3314.3019-3.3623.7881-.5151.2429-.944.5683-1.1377 1.0107-.1965.4495-.1391.9935.2598 1.6446l.0039.0068.0058.0068c.6027.6904 1.5336.9866 2.3584 1.21.4178.1131.8057.2068 1.127.3223.3232.1161.5549.2466.6758.4189l.0009.002c.1808.2467.1905.4956.1075.7177-.0849.2269-.2685.4285-.4747.5606-.3192.2017-.7339.351-1.2226.4853-.4895.1345-1.0406.2513-1.6367.3955-1.1874.2873-2.5304.677-3.7832 1.5059-.8547.5703-1.6243 1.4859-2.2471 2.3564-.6205.8674-1.1094 1.7126-1.3828 2.1231l-.001.001c-.197.299-.4627.5907-.7607.8066-.2989.2166-.623.3516-.9375.3516h-.0137c-.31124 0-.53407-.1321-.66602-.3272-.13357-.1975-.1799-.4687-.11524-.7539v-.001c.0446-.206.13595-.5142.24024-.8867.10355-.3699.21853-.7984.30468-1.2363.08607-.4375.14448-.8885.13575-1.3027-.00875-.413-.08519-.7999-.27735-1.1016-.54613-.8525-1.49407-1.2105-2.35156-1.4609-.43536-.1272-.84117-.2245-1.18164-.3448-.34146-.1206-.58746-.2553-.71485-.4375-.19178-.2797-.19985-.5478-.09863-.7871.10381-.2452.32707-.4687.6084-.6377l.00195-.001c.31549-.2015.70908-.3411 1.16797-.4619.46026-.1211.97354-.2206 1.53321-.3476 1.04421-.2371 2.22539-.565 3.40139-1.294l.2343-.1513c1.3906-.9091 2.6595-2.7466 3.3711-3.83598.5042-.7709.8527-1.21602 1.3262-1.47558.4739-.25964 1.0875-.34179 2.1426-.3418Z"/><mask id="q" width="32" height="32" x="0" y="0" maskUnits="userSpaceOnUse" style="mask-type:alpha"><path fill="url(#p)" d="M0 0h32v32H0z"/></mask><g mask="url(#q)"><path fill="url(#r)" fill-rule="evenodd" clip-rule="evenodd" d="M10.0735 25.0934c-.68532 0-1.01866-.588-.8788-1.2039.18182-.8399 1.1306-3.3317.41726-4.4516-1.04897-1.6378-3.65855-1.3998-4.24597-2.2398-.42339-.6163-.04608-1.2161.53963-1.5678 1.3147-.8399 3.86019-.602 6.33578-2.2538 1.3706-.8959 2.6294-2.7157 3.3427-3.80764 1.007-1.53986 1.4405-1.86183 3.5525-1.86183h7.3969c1.1649 0 1.5298 1.97802-.3712 2.19546-.4895.056-1.7949.25201-3.6551.47591-1.7762.224-5.7203.7583-4.1679 3.2921 1.1609 1.3298 3.6085 1.1619 4.1679 1.9598.4047.5523.0467 1.1398-.3939 1.422-1.3287.8399-4.1656.7478-6.6411 2.3856-1.6784 1.1199-3.0432 3.6117-3.6026 4.4516-.4056.6159-1.0968 1.2039-1.7821 1.2039z" clip-rule="evenodd"/></g><rect width="32" height="32" fill="#9772ff" rx="9" style="mix-blend-mode:hue"/></g><defs><radialGradient id="b" cx="0" cy="0" r="1" gradientTransform="matrix(0 23.9175 -30.8218 0 16.1649 0)" gradientUnits="userSpaceOnUse"><stop stop-color="#80f593"/><stop offset="1" stop-color="#49f264"/></radialGradient><radialGradient id="c" cx="0" cy="0" r="1" gradientTransform="matrix(0 -8.2 26.3263 0 16 32)" gradientUnits="userSpaceOnUse"><stop stop-color="#0ec833"/><stop offset="1" stop-color="#49f264" stop-opacity="0"/></radialGradient><radialGradient id="g" cx="0" cy="0" r="1" gradientTransform="rotate(90 8 8)scale(16 216.921)" gradientUnits="userSpaceOnUse"><stop stop-color="#acf6b9"/><stop offset="1" stop-color="#49f264"/></radialGradient><radialGradient id="h" cx="0" cy="0" r="1" gradientTransform="matrix(0 -16 194.49 0 16 32)" gradientUnits="userSpaceOnUse"><stop stop-color="#80f593"/><stop offset="1" stop-color="#49f264" stop-opacity="0"/></radialGradient><radialGradient id="m" cx="0" cy="0" r="1" gradientTransform="matrix(-.05865 17.4934 -29.59743 -.09923 16.4 7.6)" gradientUnits="userSpaceOnUse"><stop stop-color="#fff" stop-opacity=".05"/><stop offset=".746382" stop-color="#fff" stop-opacity=".2"/></radialGradient><radialGradient id="n" cx="0" cy="0" r="1" gradientTransform="matrix(0 3.4 -19.5245 0 16.4 7.6)" gradientUnits="userSpaceOnUse"><stop stop-color="#fff" stop-opacity=".4"/><stop offset="1" stop-color="#fff" stop-opacity="0"/></radialGradient><radialGradient id="o" cx="0" cy="0" r="1" gradientTransform="matrix(.4 -12.20004 70.05845 2.29703 16 25.2)" gradientUnits="userSpaceOnUse"><stop stop-color="#fff" stop-opacity=".1"/><stop offset="1" stop-color="#fff" stop-opacity="0"/></radialGradient><linearGradient id="f" x1="16" x2="16" y1="0" y2="32" gradientUnits="userSpaceOnUse"><stop stop-color="#fff" stop-opacity=".95"/><stop offset=".317308" stop-color="#fff" stop-opacity=".5"/><stop offset="1" stop-color="#fff" stop-opacity=".95"/></linearGradient><linearGradient id="i" x1="16" x2="16" y1="32" y2="31.6" gradientUnits="userSpaceOnUse"><stop stop-color="#acf6b9"/><stop offset="1" stop-color="#49f264" stop-opacity="0"/></linearGradient><linearGradient id="j" x1="16" x2="16" y1=".4" y2="0" gradientUnits="userSpaceOnUse"><stop stop-color="#49f264" stop-opacity="0"/><stop offset="1" stop-color="#d4f7da"/></linearGradient><linearGradient id="l" x1="16.4" x2="16.4" y1="7.6" y2="20.2" gradientUnits="userSpaceOnUse"><stop stop-color="#2e2e2e"/><stop offset="1" stop-color="#151515"/></linearGradient><linearGradient id="r" x1="16.4" x2="16.4" y1="2.4" y2="25.2" gradientUnits="userSpaceOnUse"><stop stop-color="#737373"/><stop offset="1" stop-color="#333"/></linearGradient><pattern id="d" width="1" height="1" patternContentUnits="objectBoundingBox"><use xlink:href="#s" transform="scale(.00156)"/></pattern><pattern id="p" width="1" height="1" patternContentUnits="objectBoundingBox"><use xlink:href="#s" transform="scale(.00156)"/></pattern><clipPath id="a"><path fill="#fff" d="M0 0h32v32H0z"/></clipPath><filter id="k" width="29.9125" height="27.7864" x="4.38512" y="7.30703" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feColorMatrix in="SourceAlpha" result="hardAlpha" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"/><feOffset dy=".4"/><feGaussianBlur stdDeviation=".4"/><feColorMatrix values="0 0 0 0 0.12549 0 0 0 0 0.352941 0 0 0 0 0.172549 0 0 0 0.48 0"/><feBlend in2="BackgroundImageFix" result="effect1_dropShadow_7301_30525"/><feColorMatrix in="SourceAlpha" result="hardAlpha" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"/><feOffset dx=".8" dy="1.2"/><feGaussianBlur stdDeviation=".8"/><feColorMatrix values="0 0 0 0 0.12549 0 0 0 0 0.352941 0 0 0 0 0.172549 0 0 0 0.42 0"/><feBlend in2="effect1_dropShadow_7301_30525" result="effect2_dropShadow_7301_30525"/><feColorMatrix in="SourceAlpha" result="hardAlpha" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"/><feOffset dx="1.6" dy="2.8"/><feGaussianBlur stdDeviation="1"/><feColorMatrix values="0 0 0 0 0.12549 0 0 0 0 0.352941 0 0 0 0 0.172549 0 0 0 0.24 0"/><feBlend in2="effect2_dropShadow_7301_30525" result="effect3_dropShadow_7301_30525"/><feColorMatrix in="SourceAlpha" result="hardAlpha" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"/><feOffset dx="2.8" dy="4.8"/><feGaussianBlur stdDeviation="1.2"/><feColorMatrix values="0 0 0 0 0.12549 0 0 0 0 0.352941 0 0 0 0 0.172549 0 0 0 0.07 0"/><feBlend in2="effect3_dropShadow_7301_30525" result="effect4_dropShadow_7301_30525"/><feColorMatrix in="SourceAlpha" result="hardAlpha" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"/><feOffset dx="4.4" dy="7.6"/><feGaussianBlur stdDeviation="1.2"/><feColorMatrix values="0 0 0 0 0.12549 0 0 0 0 0.352941 0 0 0 0 0.172549 0 0 0 0.01 0"/><feBlend in2="effect4_dropShadow_7301_30525" result="effect5_dropShadow_7301_30525"/><feBlend in="SourceGraphic" in2="effect5_dropShadow_7301_30525" result="shape"/></filter></defs></svg>';
|
|
5
|
+
exports.AGENCIES_ICON_SVG = AGENCIES_ICON_SVG;
|
|
6
|
+
//# sourceMappingURL=agenciesIcon.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"agenciesIcon.cjs","sources":["../../../../src/components/Logo/agenciesIcon.ts"],"sourcesContent":["// Fanvue Agencies gradient icon, exported from Figma (vector, raster stripped). The purple\n// is produced by a `mix-blend-mode:hue` layer over the green base, matching the brand spec.\nexport const AGENCIES_ICON_SVG =\n '<svg width=\"100%\" height=\"100%\" style=\"display:block\" viewBox=\"0 0 32 32\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\"><g clip-path=\"url(#a)\"><path fill=\"#49f264\" d=\"M0 9.21753C0 4.12683 4.12683 0 9.21753 0H22.7825C27.8732 0 32 4.12683 32 9.21753V22.7825C32 27.8732 27.8732 32 22.7825 32H9.21753C4.12683 32 0 27.8732 0 22.7825z\"/><path fill=\"url(#b)\" d=\"M0 9.21753C0 4.12683 4.12683 0 9.21753 0H22.7825C27.8732 0 32 4.12683 32 9.21753V22.7825C32 27.8732 27.8732 32 22.7825 32H9.21753C4.12683 32 0 27.8732 0 22.7825z\" style=\"mix-blend-mode:lighten\"/><path fill=\"url(#c)\" d=\"M0 9.21753C0 4.12683 4.12683 0 9.21753 0H22.7825C27.8732 0 32 4.12683 32 9.21753V22.7825C32 27.8732 27.8732 32 22.7825 32H9.21753C4.12683 32 0 27.8732 0 22.7825z\"/><g style=\"mix-blend-mode:color-dodge\"><mask id=\"e\" width=\"32\" height=\"32\" x=\"0\" y=\"0\" maskUnits=\"userSpaceOnUse\" style=\"mask-type:alpha\"><path fill=\"url(#d)\" d=\"M0 0h32v32H0z\"/></mask><g mask=\"url(#e)\"><path fill=\"url(#f)\" d=\"M0 9.21753C0 4.12683 4.12683 0 9.21753 0H22.7825C27.8732 0 32 4.12683 32 9.21753V22.7825C32 27.8732 27.8732 32 22.7825 32H9.21753C4.12683 32 0 27.8732 0 22.7825z\"/></g></g><path stroke=\"url(#g)\" stroke-width=\".384064\" d=\"M9.21777.192383H22.7822c4.9847 0 9.0254 4.040747 9.0254 9.025387V22.7822c0 4.9847-4.0407 9.0254-9.0254 9.0254H9.21777c-4.98464 0-9.025387-4.0407-9.025387-9.0254V9.21777c0-4.98464 4.040747-9.025387 9.025387-9.025387Z\"/><path stroke=\"url(#h)\" stroke-width=\".384064\" d=\"M9.21777.192383H22.7822c4.9847 0 9.0254 4.040747 9.0254 9.025387V22.7822c0 4.9847-4.0407 9.0254-9.0254 9.0254H9.21777c-4.98464 0-9.025387-4.0407-9.025387-9.0254V9.21777c0-4.98464 4.040747-9.025387 9.025387-9.025387Z\"/><path stroke=\"url(#i)\" stroke-width=\".384064\" d=\"M9.21777.192383H22.7822c4.9847 0 9.0254 4.040747 9.0254 9.025387V22.7822c0 4.9847-4.0407 9.0254-9.0254 9.0254H9.21777c-4.98464 0-9.025387-4.0407-9.025387-9.0254V9.21777c0-4.98464 4.040747-9.025387 9.025387-9.025387Z\"/><path stroke=\"url(#j)\" stroke-width=\".384064\" d=\"M9.21777.192383H22.7822c4.9847 0 9.0254 4.040747 9.0254 9.025387V22.7822c0 4.9847-4.0407 9.0254-9.0254 9.0254H9.21777c-4.98464 0-9.025387-4.0407-9.025387-9.0254V9.21777c0-4.98464 4.040747-9.025387 9.025387-9.025387Z\"/><g fill-rule=\"evenodd\" clip-rule=\"evenodd\" filter=\"url(#k)\"><path fill=\"url(#l)\" d=\"M10.0735 25.0934c-.68532 0-1.01866-.588-.8788-1.2039.18182-.8399 1.1306-3.3317.41726-4.4516-1.04897-1.6378-3.65855-1.3998-4.24597-2.2398-.42339-.6163-.04608-1.2161.53963-1.5678 1.3147-.8399 3.86019-.602 6.33578-2.2538 1.3706-.8959 2.6294-2.7157 3.3427-3.80764 1.007-1.53986 1.4405-1.86183 3.5525-1.86183h7.3969c1.1649 0 1.5298 1.97802-.3712 2.19546-.4895.056-1.7949.25201-3.6551.47591-1.7762.224-5.7203.7583-4.1679 3.2921 1.1609 1.3298 3.6085 1.1619 4.1679 1.9598.4047.5523.0467 1.1398-.3939 1.422-1.3287.8399-4.1656.7478-6.6411 2.3856-1.6784 1.1199-3.0432 3.6117-3.6026 4.4516-.4056.6159-1.0968 1.2039-1.7821 1.2039z\"/><path fill=\"url(#m)\" d=\"M10.0735 25.0934c-.68532 0-1.01866-.588-.8788-1.2039.18182-.8399 1.1306-3.3317.41726-4.4516-1.04897-1.6378-3.65855-1.3998-4.24597-2.2398-.42339-.6163-.04608-1.2161.53963-1.5678 1.3147-.8399 3.86019-.602 6.33578-2.2538 1.3706-.8959 2.6294-2.7157 3.3427-3.80764 1.007-1.53986 1.4405-1.86183 3.5525-1.86183h7.3969c1.1649 0 1.5298 1.97802-.3712 2.19546-.4895.056-1.7949.25201-3.6551.47591-1.7762.224-5.7203.7583-4.1679 3.2921 1.1609 1.3298 3.6085 1.1619 4.1679 1.9598.4047.5523.0467 1.1398-.3939 1.422-1.3287.8399-4.1656.7478-6.6411 2.3856-1.6784 1.1199-3.0432 3.6117-3.6026 4.4516-.4056.6159-1.0968 1.2039-1.7821 1.2039z\" style=\"mix-blend-mode:lighten\"/></g><path fill=\"#000\" fill-opacity=\".01\" fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M10.0735 25.0934c-.68532 0-1.01866-.588-.8788-1.2039.18182-.8399 1.1306-3.3317.41726-4.4516-1.04897-1.6378-3.65855-1.3998-4.24597-2.2398-.42339-.6163-.04608-1.2161.53963-1.5678 1.3147-.8399 3.86019-.602 6.33578-2.2538 1.3706-.8959 2.6294-2.7157 3.3427-3.80764 1.007-1.53986 1.4405-1.86183 3.5525-1.86183h7.3969c1.1649 0 1.5298 1.97802-.3712 2.19546-.4895.056-1.7949.25201-3.6551.47591-1.7762.224-5.7203.7583-4.1679 3.2921 1.1609 1.3298 3.6085 1.1619 4.1679 1.9598.4047.5523.0467 1.1398-.3939 1.422-1.3287.8399-4.1656.7478-6.6411 2.3856-1.6784 1.1199-3.0432 3.6117-3.6026 4.4516-.4056.6159-1.0968 1.2039-1.7821 1.2039z\" clip-rule=\"evenodd\"/><path stroke=\"url(#n)\" stroke-width=\".2\" d=\"M19.1363 7.80664h7.3975c.5165.00015.8647.43888.8642.91602-.0004.2358-.0878.47842-.2832.6748-.1956.19642-.5063.35292-.9639.40527-.2461.02816-.6967.09198-1.3154.17579-.6197.08398-1.4106.18888-2.3398.30078h-.001c-.8847.1115-2.3314.3019-3.3623.7881-.5151.2429-.944.5683-1.1377 1.0107-.1965.4495-.1391.9935.2598 1.6446l.0039.0068.0058.0068c.6027.6904 1.5336.9866 2.3584 1.21.4178.1131.8057.2068 1.127.3223.3232.1161.5549.2466.6758.4189l.0009.002c.1808.2467.1905.4956.1075.7177-.0849.2269-.2685.4285-.4747.5606-.3192.2017-.7339.351-1.2226.4853-.4895.1345-1.0406.2513-1.6367.3955-1.1874.2873-2.5304.677-3.7832 1.5059-.8547.5703-1.6243 1.4859-2.2471 2.3564-.6205.8674-1.1094 1.7126-1.3828 2.1231l-.001.001c-.197.299-.4627.5907-.7607.8066-.2989.2166-.623.3516-.9375.3516h-.0137c-.31124 0-.53407-.1321-.66602-.3272-.13357-.1975-.1799-.4687-.11524-.7539v-.001c.0446-.206.13595-.5142.24024-.8867.10355-.3699.21853-.7984.30468-1.2363.08607-.4375.14448-.8885.13575-1.3027-.00875-.413-.08519-.7999-.27735-1.1016-.54613-.8525-1.49407-1.2105-2.35156-1.4609-.43536-.1272-.84117-.2245-1.18164-.3448-.34146-.1206-.58746-.2553-.71485-.4375-.19178-.2797-.19985-.5478-.09863-.7871.10381-.2452.32707-.4687.6084-.6377l.00195-.001c.31549-.2015.70908-.3411 1.16797-.4619.46026-.1211.97354-.2206 1.53321-.3476 1.04421-.2371 2.22539-.565 3.40139-1.294l.2343-.1513c1.3906-.9091 2.6595-2.7466 3.3711-3.83598.5042-.7709.8527-1.21602 1.3262-1.47558.4739-.25964 1.0875-.34179 2.1426-.3418Z\"/><path stroke=\"url(#o)\" stroke-width=\".2\" d=\"M19.1363 7.80664h7.3975c.5165.00015.8647.43888.8642.91602-.0004.2358-.0878.47842-.2832.6748-.1956.19642-.5063.35292-.9639.40527-.2461.02816-.6967.09198-1.3154.17579-.6197.08398-1.4106.18888-2.3398.30078h-.001c-.8847.1115-2.3314.3019-3.3623.7881-.5151.2429-.944.5683-1.1377 1.0107-.1965.4495-.1391.9935.2598 1.6446l.0039.0068.0058.0068c.6027.6904 1.5336.9866 2.3584 1.21.4178.1131.8057.2068 1.127.3223.3232.1161.5549.2466.6758.4189l.0009.002c.1808.2467.1905.4956.1075.7177-.0849.2269-.2685.4285-.4747.5606-.3192.2017-.7339.351-1.2226.4853-.4895.1345-1.0406.2513-1.6367.3955-1.1874.2873-2.5304.677-3.7832 1.5059-.8547.5703-1.6243 1.4859-2.2471 2.3564-.6205.8674-1.1094 1.7126-1.3828 2.1231l-.001.001c-.197.299-.4627.5907-.7607.8066-.2989.2166-.623.3516-.9375.3516h-.0137c-.31124 0-.53407-.1321-.66602-.3272-.13357-.1975-.1799-.4687-.11524-.7539v-.001c.0446-.206.13595-.5142.24024-.8867.10355-.3699.21853-.7984.30468-1.2363.08607-.4375.14448-.8885.13575-1.3027-.00875-.413-.08519-.7999-.27735-1.1016-.54613-.8525-1.49407-1.2105-2.35156-1.4609-.43536-.1272-.84117-.2245-1.18164-.3448-.34146-.1206-.58746-.2553-.71485-.4375-.19178-.2797-.19985-.5478-.09863-.7871.10381-.2452.32707-.4687.6084-.6377l.00195-.001c.31549-.2015.70908-.3411 1.16797-.4619.46026-.1211.97354-.2206 1.53321-.3476 1.04421-.2371 2.22539-.565 3.40139-1.294l.2343-.1513c1.3906-.9091 2.6595-2.7466 3.3711-3.83598.5042-.7709.8527-1.21602 1.3262-1.47558.4739-.25964 1.0875-.34179 2.1426-.3418Z\"/><mask id=\"q\" width=\"32\" height=\"32\" x=\"0\" y=\"0\" maskUnits=\"userSpaceOnUse\" style=\"mask-type:alpha\"><path fill=\"url(#p)\" d=\"M0 0h32v32H0z\"/></mask><g mask=\"url(#q)\"><path fill=\"url(#r)\" fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M10.0735 25.0934c-.68532 0-1.01866-.588-.8788-1.2039.18182-.8399 1.1306-3.3317.41726-4.4516-1.04897-1.6378-3.65855-1.3998-4.24597-2.2398-.42339-.6163-.04608-1.2161.53963-1.5678 1.3147-.8399 3.86019-.602 6.33578-2.2538 1.3706-.8959 2.6294-2.7157 3.3427-3.80764 1.007-1.53986 1.4405-1.86183 3.5525-1.86183h7.3969c1.1649 0 1.5298 1.97802-.3712 2.19546-.4895.056-1.7949.25201-3.6551.47591-1.7762.224-5.7203.7583-4.1679 3.2921 1.1609 1.3298 3.6085 1.1619 4.1679 1.9598.4047.5523.0467 1.1398-.3939 1.422-1.3287.8399-4.1656.7478-6.6411 2.3856-1.6784 1.1199-3.0432 3.6117-3.6026 4.4516-.4056.6159-1.0968 1.2039-1.7821 1.2039z\" clip-rule=\"evenodd\"/></g><rect width=\"32\" height=\"32\" fill=\"#9772ff\" rx=\"9\" style=\"mix-blend-mode:hue\"/></g><defs><radialGradient id=\"b\" cx=\"0\" cy=\"0\" r=\"1\" gradientTransform=\"matrix(0 23.9175 -30.8218 0 16.1649 0)\" gradientUnits=\"userSpaceOnUse\"><stop stop-color=\"#80f593\"/><stop offset=\"1\" stop-color=\"#49f264\"/></radialGradient><radialGradient id=\"c\" cx=\"0\" cy=\"0\" r=\"1\" gradientTransform=\"matrix(0 -8.2 26.3263 0 16 32)\" gradientUnits=\"userSpaceOnUse\"><stop stop-color=\"#0ec833\"/><stop offset=\"1\" stop-color=\"#49f264\" stop-opacity=\"0\"/></radialGradient><radialGradient id=\"g\" cx=\"0\" cy=\"0\" r=\"1\" gradientTransform=\"rotate(90 8 8)scale(16 216.921)\" gradientUnits=\"userSpaceOnUse\"><stop stop-color=\"#acf6b9\"/><stop offset=\"1\" stop-color=\"#49f264\"/></radialGradient><radialGradient id=\"h\" cx=\"0\" cy=\"0\" r=\"1\" gradientTransform=\"matrix(0 -16 194.49 0 16 32)\" gradientUnits=\"userSpaceOnUse\"><stop stop-color=\"#80f593\"/><stop offset=\"1\" stop-color=\"#49f264\" stop-opacity=\"0\"/></radialGradient><radialGradient id=\"m\" cx=\"0\" cy=\"0\" r=\"1\" gradientTransform=\"matrix(-.05865 17.4934 -29.59743 -.09923 16.4 7.6)\" gradientUnits=\"userSpaceOnUse\"><stop stop-color=\"#fff\" stop-opacity=\".05\"/><stop offset=\".746382\" stop-color=\"#fff\" stop-opacity=\".2\"/></radialGradient><radialGradient id=\"n\" cx=\"0\" cy=\"0\" r=\"1\" gradientTransform=\"matrix(0 3.4 -19.5245 0 16.4 7.6)\" gradientUnits=\"userSpaceOnUse\"><stop stop-color=\"#fff\" stop-opacity=\".4\"/><stop offset=\"1\" stop-color=\"#fff\" stop-opacity=\"0\"/></radialGradient><radialGradient id=\"o\" cx=\"0\" cy=\"0\" r=\"1\" gradientTransform=\"matrix(.4 -12.20004 70.05845 2.29703 16 25.2)\" gradientUnits=\"userSpaceOnUse\"><stop stop-color=\"#fff\" stop-opacity=\".1\"/><stop offset=\"1\" stop-color=\"#fff\" stop-opacity=\"0\"/></radialGradient><linearGradient id=\"f\" x1=\"16\" x2=\"16\" y1=\"0\" y2=\"32\" gradientUnits=\"userSpaceOnUse\"><stop stop-color=\"#fff\" stop-opacity=\".95\"/><stop offset=\".317308\" stop-color=\"#fff\" stop-opacity=\".5\"/><stop offset=\"1\" stop-color=\"#fff\" stop-opacity=\".95\"/></linearGradient><linearGradient id=\"i\" x1=\"16\" x2=\"16\" y1=\"32\" y2=\"31.6\" gradientUnits=\"userSpaceOnUse\"><stop stop-color=\"#acf6b9\"/><stop offset=\"1\" stop-color=\"#49f264\" stop-opacity=\"0\"/></linearGradient><linearGradient id=\"j\" x1=\"16\" x2=\"16\" y1=\".4\" y2=\"0\" gradientUnits=\"userSpaceOnUse\"><stop stop-color=\"#49f264\" stop-opacity=\"0\"/><stop offset=\"1\" stop-color=\"#d4f7da\"/></linearGradient><linearGradient id=\"l\" x1=\"16.4\" x2=\"16.4\" y1=\"7.6\" y2=\"20.2\" gradientUnits=\"userSpaceOnUse\"><stop stop-color=\"#2e2e2e\"/><stop offset=\"1\" stop-color=\"#151515\"/></linearGradient><linearGradient id=\"r\" x1=\"16.4\" x2=\"16.4\" y1=\"2.4\" y2=\"25.2\" gradientUnits=\"userSpaceOnUse\"><stop stop-color=\"#737373\"/><stop offset=\"1\" stop-color=\"#333\"/></linearGradient><pattern id=\"d\" width=\"1\" height=\"1\" patternContentUnits=\"objectBoundingBox\"><use xlink:href=\"#s\" transform=\"scale(.00156)\"/></pattern><pattern id=\"p\" width=\"1\" height=\"1\" patternContentUnits=\"objectBoundingBox\"><use xlink:href=\"#s\" transform=\"scale(.00156)\"/></pattern><clipPath id=\"a\"><path fill=\"#fff\" d=\"M0 0h32v32H0z\"/></clipPath><filter id=\"k\" width=\"29.9125\" height=\"27.7864\" x=\"4.38512\" y=\"7.30703\" color-interpolation-filters=\"sRGB\" filterUnits=\"userSpaceOnUse\"><feFlood flood-opacity=\"0\" result=\"BackgroundImageFix\"/><feColorMatrix in=\"SourceAlpha\" result=\"hardAlpha\" values=\"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0\"/><feOffset dy=\".4\"/><feGaussianBlur stdDeviation=\".4\"/><feColorMatrix values=\"0 0 0 0 0.12549 0 0 0 0 0.352941 0 0 0 0 0.172549 0 0 0 0.48 0\"/><feBlend in2=\"BackgroundImageFix\" result=\"effect1_dropShadow_7301_30525\"/><feColorMatrix in=\"SourceAlpha\" result=\"hardAlpha\" values=\"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0\"/><feOffset dx=\".8\" dy=\"1.2\"/><feGaussianBlur stdDeviation=\".8\"/><feColorMatrix values=\"0 0 0 0 0.12549 0 0 0 0 0.352941 0 0 0 0 0.172549 0 0 0 0.42 0\"/><feBlend in2=\"effect1_dropShadow_7301_30525\" result=\"effect2_dropShadow_7301_30525\"/><feColorMatrix in=\"SourceAlpha\" result=\"hardAlpha\" values=\"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0\"/><feOffset dx=\"1.6\" dy=\"2.8\"/><feGaussianBlur stdDeviation=\"1\"/><feColorMatrix values=\"0 0 0 0 0.12549 0 0 0 0 0.352941 0 0 0 0 0.172549 0 0 0 0.24 0\"/><feBlend in2=\"effect2_dropShadow_7301_30525\" result=\"effect3_dropShadow_7301_30525\"/><feColorMatrix in=\"SourceAlpha\" result=\"hardAlpha\" values=\"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0\"/><feOffset dx=\"2.8\" dy=\"4.8\"/><feGaussianBlur stdDeviation=\"1.2\"/><feColorMatrix values=\"0 0 0 0 0.12549 0 0 0 0 0.352941 0 0 0 0 0.172549 0 0 0 0.07 0\"/><feBlend in2=\"effect3_dropShadow_7301_30525\" result=\"effect4_dropShadow_7301_30525\"/><feColorMatrix in=\"SourceAlpha\" result=\"hardAlpha\" values=\"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0\"/><feOffset dx=\"4.4\" dy=\"7.6\"/><feGaussianBlur stdDeviation=\"1.2\"/><feColorMatrix values=\"0 0 0 0 0.12549 0 0 0 0 0.352941 0 0 0 0 0.172549 0 0 0 0.01 0\"/><feBlend in2=\"effect4_dropShadow_7301_30525\" result=\"effect5_dropShadow_7301_30525\"/><feBlend in=\"SourceGraphic\" in2=\"effect5_dropShadow_7301_30525\" result=\"shape\"/></filter></defs></svg>';\n"],"names":[],"mappings":";;;AAEO,MAAM,oBACX;;"}
|
|
@@ -33,7 +33,8 @@ const pillVariants = {
|
|
|
33
33
|
brand: "bg-brand-primary-default text-content-always-black",
|
|
34
34
|
brandLight: "bg-brand-primary-muted text-content-primary",
|
|
35
35
|
beta: "bg-brand-secondary-default text-content-always-black",
|
|
36
|
-
error: "bg-error-content text-error-surface"
|
|
36
|
+
error: "bg-error-content text-error-surface",
|
|
37
|
+
red: "bg-error-surface text-error-content"
|
|
37
38
|
}
|
|
38
39
|
};
|
|
39
40
|
const Pill = React__namespace.forwardRef(
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Pill.cjs","sources":["../../../../src/components/Pill/Pill.tsx"],"sourcesContent":["import { Slot, Slottable } from \"@radix-ui/react-slot\";\nimport * as React from \"react\";\nimport { cn } from \"../../utils/cn\";\n\nconst pillVariants = {\n variant: {\n green: \"bg-success-surface text-success-content\",\n grey: \"bg-neutral-alphas-50 text-content-secondary\",\n blue: \"bg-info-surface text-info-content\",\n gold: \"bg-warning-surface text-warning-content\",\n pinkLight: \"bg-brand-secondary-muted text-content-primary\",\n base: \"bg-surface-primary-inverted text-content-primary-inverted\",\n brand: \"bg-brand-primary-default text-content-always-black\",\n brandLight: \"bg-brand-primary-muted text-content-primary\",\n beta: \"bg-brand-secondary-default text-content-always-black\",\n error: \"bg-error-content text-error-surface\",\n },\n} as const;\n\n/** Colour variant of the pill. */\nexport type PillVariant =\n | \"green\"\n | \"grey\"\n | \"blue\"\n | \"gold\"\n | \"pinkLight\"\n | \"base\"\n | \"brand\"\n | \"brandLight\"\n | \"beta\"\n | \"error\";\n\nexport interface PillProps extends React.HTMLAttributes<HTMLSpanElement> {\n /** Colour variant of the pill. @default \"green\" */\n variant?: PillVariant;\n /** Icon element displayed before the label. */\n leftIcon?: React.ReactNode;\n /** Icon element displayed after the label. */\n rightIcon?: React.ReactNode;\n /** Merge props onto a child element instead of rendering a `<span>`. @default false */\n asChild?: boolean;\n}\n\n/**\n * A small rounded label for categorisation, status, or tagging.\n *\n * @example\n * ```tsx\n * <Pill variant=\"brand\">New</Pill>\n * ```\n */\nexport const Pill = React.forwardRef<HTMLSpanElement, PillProps>(\n (\n {\n className,\n variant = \"green\",\n leftIcon,\n rightIcon,\n asChild = false,\n onClick,\n children,\n ...props\n },\n ref,\n ) => {\n const Comp = asChild ? Slot : \"span\";\n\n return (\n <Comp\n ref={ref}\n data-testid=\"pill\"\n className={cn(\n // Base styles\n \"inline-flex min-w-0 items-center justify-center gap-2 rounded-full px-3 py-1\",\n // Typography\n \"typography-description-12px-semibold\",\n // Variant styles\n pillVariants.variant[variant],\n // Interactive\n onClick && \"cursor-pointer\",\n // Manual CSS overrides\n className,\n )}\n onClick={onClick}\n {...props}\n >\n {leftIcon && (\n <span className=\"flex [&>svg]:size-3\" aria-hidden=\"true\">\n {leftIcon}\n </span>\n )}\n {asChild ? (\n <Slottable>{children}</Slottable>\n ) : (\n <span className=\"min-w-0 truncate\">{children}</span>\n )}\n {rightIcon && (\n <span className=\"flex [&>svg]:size-3\" aria-hidden=\"true\">\n {rightIcon}\n </span>\n )}\n </Comp>\n );\n },\n);\n\nPill.displayName = \"Pill\";\n"],"names":["React","Slot","jsxs","cn","Slottable","jsx"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAIA,MAAM,eAAe;AAAA,EACnB,SAAS;AAAA,IACP,OAAO;AAAA,IACP,MAAM;AAAA,IACN,MAAM;AAAA,IACN,MAAM;AAAA,IACN,WAAW;AAAA,IACX,MAAM;AAAA,IACN,OAAO;AAAA,IACP,YAAY;AAAA,IACZ,MAAM;AAAA,IACN,OAAO;AAAA,EAAA;
|
|
1
|
+
{"version":3,"file":"Pill.cjs","sources":["../../../../src/components/Pill/Pill.tsx"],"sourcesContent":["import { Slot, Slottable } from \"@radix-ui/react-slot\";\nimport * as React from \"react\";\nimport { cn } from \"../../utils/cn\";\n\nconst pillVariants = {\n variant: {\n green: \"bg-success-surface text-success-content\",\n grey: \"bg-neutral-alphas-50 text-content-secondary\",\n blue: \"bg-info-surface text-info-content\",\n gold: \"bg-warning-surface text-warning-content\",\n pinkLight: \"bg-brand-secondary-muted text-content-primary\",\n base: \"bg-surface-primary-inverted text-content-primary-inverted\",\n brand: \"bg-brand-primary-default text-content-always-black\",\n brandLight: \"bg-brand-primary-muted text-content-primary\",\n beta: \"bg-brand-secondary-default text-content-always-black\",\n error: \"bg-error-content text-error-surface\",\n red: \"bg-error-surface text-error-content\",\n },\n} as const;\n\n/** Colour variant of the pill. */\nexport type PillVariant =\n | \"green\"\n | \"grey\"\n | \"blue\"\n | \"gold\"\n | \"pinkLight\"\n | \"base\"\n | \"brand\"\n | \"brandLight\"\n | \"beta\"\n | \"error\"\n | \"red\";\n\nexport interface PillProps extends React.HTMLAttributes<HTMLSpanElement> {\n /** Colour variant of the pill. @default \"green\" */\n variant?: PillVariant;\n /** Icon element displayed before the label. */\n leftIcon?: React.ReactNode;\n /** Icon element displayed after the label. */\n rightIcon?: React.ReactNode;\n /** Merge props onto a child element instead of rendering a `<span>`. @default false */\n asChild?: boolean;\n}\n\n/**\n * A small rounded label for categorisation, status, or tagging.\n *\n * @example\n * ```tsx\n * <Pill variant=\"brand\">New</Pill>\n * ```\n */\nexport const Pill = React.forwardRef<HTMLSpanElement, PillProps>(\n (\n {\n className,\n variant = \"green\",\n leftIcon,\n rightIcon,\n asChild = false,\n onClick,\n children,\n ...props\n },\n ref,\n ) => {\n const Comp = asChild ? Slot : \"span\";\n\n return (\n <Comp\n ref={ref}\n data-testid=\"pill\"\n className={cn(\n // Base styles\n \"inline-flex min-w-0 items-center justify-center gap-2 rounded-full px-3 py-1\",\n // Typography\n \"typography-description-12px-semibold\",\n // Variant styles\n pillVariants.variant[variant],\n // Interactive\n onClick && \"cursor-pointer\",\n // Manual CSS overrides\n className,\n )}\n onClick={onClick}\n {...props}\n >\n {leftIcon && (\n <span className=\"flex [&>svg]:size-3\" aria-hidden=\"true\">\n {leftIcon}\n </span>\n )}\n {asChild ? (\n <Slottable>{children}</Slottable>\n ) : (\n <span className=\"min-w-0 truncate\">{children}</span>\n )}\n {rightIcon && (\n <span className=\"flex [&>svg]:size-3\" aria-hidden=\"true\">\n {rightIcon}\n </span>\n )}\n </Comp>\n );\n },\n);\n\nPill.displayName = \"Pill\";\n"],"names":["React","Slot","jsxs","cn","Slottable","jsx"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAIA,MAAM,eAAe;AAAA,EACnB,SAAS;AAAA,IACP,OAAO;AAAA,IACP,MAAM;AAAA,IACN,MAAM;AAAA,IACN,MAAM;AAAA,IACN,WAAW;AAAA,IACX,MAAM;AAAA,IACN,OAAO;AAAA,IACP,YAAY;AAAA,IACZ,MAAM;AAAA,IACN,OAAO;AAAA,IACP,KAAK;AAAA,EAAA;AAET;AAmCO,MAAM,OAAOA,iBAAM;AAAA,EACxB,CACE;AAAA,IACE;AAAA,IACA,UAAU;AAAA,IACV;AAAA,IACA;AAAA,IACA,UAAU;AAAA,IACV;AAAA,IACA;AAAA,IACA,GAAG;AAAA,EAAA,GAEL,QACG;AACH,UAAM,OAAO,UAAUC,UAAAA,OAAO;AAE9B,WACEC,2BAAAA;AAAAA,MAAC;AAAA,MAAA;AAAA,QACC;AAAA,QACA,eAAY;AAAA,QACZ,WAAWC,GAAAA;AAAAA;AAAAA,UAET;AAAA;AAAA,UAEA;AAAA;AAAA,UAEA,aAAa,QAAQ,OAAO;AAAA;AAAA,UAE5B,WAAW;AAAA;AAAA,UAEX;AAAA,QAAA;AAAA,QAEF;AAAA,QACC,GAAG;AAAA,QAEH,UAAA;AAAA,UAAA,2CACE,QAAA,EAAK,WAAU,uBAAsB,eAAY,QAC/C,UAAA,UACH;AAAA,UAED,yCACEC,qBAAA,EAAW,SAAA,CAAS,IAErBC,+BAAC,QAAA,EAAK,WAAU,oBAAoB,SAAA,CAAS;AAAA,UAE9C,aACCA,2BAAAA,IAAC,QAAA,EAAK,WAAU,uBAAsB,eAAY,QAC/C,UAAA,UAAA,CACH;AAAA,QAAA;AAAA,MAAA;AAAA,IAAA;AAAA,EAIR;AACF;AAEA,KAAK,cAAc;;"}
|