@tribepad/themis 1.9.3 → 1.9.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +12 -0
- package/dist/elements/AlertDialog/index.js +1 -1
- package/dist/elements/AlertDialog/index.js.map +1 -1
- package/dist/elements/AlertDialog/index.mjs +1 -1
- package/dist/elements/AlertDialog/index.mjs.map +1 -1
- package/dist/elements/Breadcrumbs/index.js +1 -1
- package/dist/elements/Breadcrumbs/index.js.map +1 -1
- package/dist/elements/Breadcrumbs/index.mjs +1 -1
- package/dist/elements/Breadcrumbs/index.mjs.map +1 -1
- package/dist/elements/Button/index.js +1 -1
- package/dist/elements/Button/index.js.map +1 -1
- package/dist/elements/Button/index.mjs +1 -1
- package/dist/elements/Button/index.mjs.map +1 -1
- package/dist/elements/Card/index.js +1 -1
- package/dist/elements/Card/index.js.map +1 -1
- package/dist/elements/Card/index.mjs +1 -1
- package/dist/elements/Card/index.mjs.map +1 -1
- package/dist/elements/Carousel/Carousel.d.ts +8 -1
- package/dist/elements/Carousel/Carousel.d.ts.map +1 -1
- package/dist/elements/Carousel/LazyCarousel.d.ts +1 -1
- package/dist/elements/Carousel/LazyCarousel.d.ts.map +1 -1
- package/dist/elements/Carousel/index.js +1 -1
- package/dist/elements/Carousel/index.js.map +1 -1
- package/dist/elements/Carousel/index.mjs +1 -1
- package/dist/elements/Carousel/index.mjs.map +1 -1
- package/dist/elements/ChatInterface/ChatLiveRegions.d.ts +2 -2
- package/dist/elements/ChatInterface/ChatLiveRegions.d.ts.map +1 -1
- package/dist/elements/ChatInterface/ChatMessageBubble.d.ts +1 -1
- package/dist/elements/ChatInterface/ChatMessageBubble.d.ts.map +1 -1
- package/dist/elements/ChatInterface/ChatThinkingDisplay.d.ts +2 -2
- package/dist/elements/ChatInterface/ChatThinkingDisplay.d.ts.map +1 -1
- package/dist/elements/ChatInterface/ChatTypingIndicator.d.ts +2 -2
- package/dist/elements/ChatInterface/ChatTypingIndicator.d.ts.map +1 -1
- package/dist/elements/ChatInterface/index.js +1 -1
- package/dist/elements/ChatInterface/index.js.map +1 -1
- package/dist/elements/ChatInterface/index.mjs +1 -1
- package/dist/elements/ChatInterface/index.mjs.map +1 -1
- package/dist/elements/FeatureIcon/FeatureIcon.d.ts +3 -0
- package/dist/elements/FeatureIcon/FeatureIcon.d.ts.map +1 -0
- package/dist/elements/FeatureIcon/FeatureIcon.styles.d.ts +17 -0
- package/dist/elements/FeatureIcon/FeatureIcon.styles.d.ts.map +1 -0
- package/dist/elements/FeatureIcon/FeatureIcon.types.d.ts +137 -0
- package/dist/elements/FeatureIcon/FeatureIcon.types.d.ts.map +1 -0
- package/dist/elements/FeatureIcon/index.d.ts +25 -0
- package/dist/elements/FeatureIcon/index.d.ts.map +1 -0
- package/dist/elements/FeatureIcon/index.js +3 -0
- package/dist/elements/FeatureIcon/index.js.map +1 -0
- package/dist/elements/FeatureIcon/index.mjs +3 -0
- package/dist/elements/FeatureIcon/index.mjs.map +1 -0
- package/dist/elements/FileField/index.js +1 -1
- package/dist/elements/FileField/index.js.map +1 -1
- package/dist/elements/FileField/index.mjs +1 -1
- package/dist/elements/FileField/index.mjs.map +1 -1
- package/dist/elements/Filters/index.js +1 -1
- package/dist/elements/Filters/index.js.map +1 -1
- package/dist/elements/Filters/index.mjs +1 -1
- package/dist/elements/Filters/index.mjs.map +1 -1
- package/dist/elements/Modal/Modal.styles.d.ts +2 -2
- package/dist/elements/Modal/Modal.types.d.ts +2 -2
- package/dist/elements/NumberField/index.js +1 -1
- package/dist/elements/NumberField/index.js.map +1 -1
- package/dist/elements/NumberField/index.mjs +1 -1
- package/dist/elements/NumberField/index.mjs.map +1 -1
- package/dist/elements/PageTitle/index.js +1 -1
- package/dist/elements/PageTitle/index.js.map +1 -1
- package/dist/elements/PageTitle/index.mjs +1 -1
- package/dist/elements/PageTitle/index.mjs.map +1 -1
- package/dist/elements/Pagination/index.js +1 -1
- package/dist/elements/Pagination/index.js.map +1 -1
- package/dist/elements/Pagination/index.mjs +1 -1
- package/dist/elements/Pagination/index.mjs.map +1 -1
- package/dist/elements/Panel/Panel.d.ts +1 -1
- package/dist/elements/Panel/Panel.types.d.ts +2 -2
- package/dist/elements/PasswordField/index.js +1 -1
- package/dist/elements/PasswordField/index.js.map +1 -1
- package/dist/elements/PasswordField/index.mjs +1 -1
- package/dist/elements/PasswordField/index.mjs.map +1 -1
- package/dist/elements/RatingScale/RatingScale.d.ts.map +1 -1
- package/dist/elements/RatingScale/index.js +1 -1
- package/dist/elements/RatingScale/index.js.map +1 -1
- package/dist/elements/RatingScale/index.mjs +1 -1
- package/dist/elements/RatingScale/index.mjs.map +1 -1
- package/dist/elements/Resizable/index.js +1 -1
- package/dist/elements/Resizable/index.js.map +1 -1
- package/dist/elements/Resizable/index.mjs +1 -1
- package/dist/elements/Resizable/index.mjs.map +1 -1
- package/dist/elements/SearchField/index.js +1 -1
- package/dist/elements/SearchField/index.js.map +1 -1
- package/dist/elements/SearchField/index.mjs +1 -1
- package/dist/elements/SearchField/index.mjs.map +1 -1
- package/dist/elements/Select/Select.d.ts +3 -3
- package/dist/elements/Select/Select.d.ts.map +1 -1
- package/dist/elements/Sidebar/Sidebar.styles.d.ts +1 -1
- package/dist/elements/Sidebar/Sidebar.styles.d.ts.map +1 -1
- package/dist/elements/Sidebar/Sidebar.types.d.ts +2 -2
- package/dist/elements/Sidebar/SidebarRail.d.ts.map +1 -1
- package/dist/elements/Sidebar/index.js +1 -1
- package/dist/elements/Sidebar/index.js.map +1 -1
- package/dist/elements/Sidebar/index.mjs +1 -1
- package/dist/elements/Sidebar/index.mjs.map +1 -1
- package/dist/elements/Table/index.js +1 -1
- package/dist/elements/Table/index.js.map +1 -1
- package/dist/elements/Table/index.mjs +1 -1
- package/dist/elements/Table/index.mjs.map +1 -1
- package/dist/elements/TextField/index.js +1 -1
- package/dist/elements/TextField/index.js.map +1 -1
- package/dist/elements/TextField/index.mjs +1 -1
- package/dist/elements/TextField/index.mjs.map +1 -1
- package/dist/elements/Timeline/index.js +1 -1
- package/dist/elements/Timeline/index.js.map +1 -1
- package/dist/elements/Timeline/index.mjs +1 -1
- package/dist/elements/Timeline/index.mjs.map +1 -1
- package/dist/elements/Toast/index.js +1 -1
- package/dist/elements/Toast/index.js.map +1 -1
- package/dist/elements/Toast/index.mjs +1 -1
- package/dist/elements/Toast/index.mjs.map +1 -1
- package/dist/elements/Wizard/index.js +1 -1
- package/dist/elements/Wizard/index.js.map +1 -1
- package/dist/elements/Wizard/index.mjs +1 -1
- package/dist/elements/Wizard/index.mjs.map +1 -1
- package/dist/elements/index.d.ts +2 -0
- package/dist/elements/index.d.ts.map +1 -1
- package/dist/elements/index.js +1 -1
- package/dist/elements/index.js.map +1 -1
- package/dist/elements/index.mjs +1 -1
- package/dist/elements/index.mjs.map +1 -1
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +2 -2
- package/dist/index.mjs.map +1 -1
- package/dist/styles/animations.css +15 -0
- package/package.json +16 -14
- package/src/elements/FeatureIcon/FeatureIcon.stories.tsx +164 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/utils/cn.ts","../../../src/elements/PageTitle/PageTitleContext.tsx","../../../src/schemas/BaseComponentProps.ts","../../../src/elements/Breadcrumbs/Breadcrumbs.types.ts","../../../src/utils/browserExtensionOverlay.ts","../../../src/elements/Dropdown/Dropdown.styles.ts","../../../src/elements/Dropdown/Dropdown.tsx","../../../src/elements/Button/Button.styles.ts","../../../src/styles/interaction-states.ts","../../../src/elements/ButtonGroup/ButtonGroupContext.tsx","../../../src/elements/ButtonGroup/ButtonGroup.variants.ts","../../../src/elements/Button/Button.tsx","../../../src/elements/Breadcrumbs/Breadcrumbs.tsx","../../../src/elements/PageTitle/PageTitle.styles.ts","../../../src/elements/PageTitle/PageTitleBreadcrumbs.tsx","../../../src/elements/PageTitle/PageTitleHeading.tsx","../../../src/elements/PageTitle/PageTitleDescription.tsx","../../../src/elements/PageTitle/PageTitleActions.tsx","../../../src/elements/PageTitle/PageTitleTabs.tsx","../../../src/elements/PageTitle/PageTitle.tsx","../../../src/elements/PageTitle/PageTitle.types.ts"],"names":["cn","inputs","twMerge","clsx","PageTitleContext","createContext","usePageTitleContext","ctx","useContext","BaseComponentPropsSchema","z","BreadcrumbItemDataSchema","SeparatorTypeSchema","isExtensionInjectedElement","element","node","depth","tag","root","custom","parent","createInteractOutsideGuard","consumerShouldClose","menuVariants","cva","menuItemVariants","getDisplayName","type","DropdownRoot","forwardRef","defaultOpen","isOpen","onOpenChange","children","_ref","childArray","Children","hasTrigger","child","isValidElement","DropdownTrigger","hasMenu","DropdownMenu","jsx","AriaMenuTrigger","props","ref","cloneElement","AriaButton","align","side","className","placement","AriaPopover","AriaMenu","DropdownItem","onAction","isDisabled","shortcut","icon","iconRight","ariaLabel","isDropdownMenu","hasSubmenu","contentChildren","submenu","jsxs","AriaSubmenuTrigger","AriaMenuItem","ChevronRight","DropdownSeparator","memo","AriaSeparator","DropdownLabel","AriaHeader","Dropdown","buttonOuterVariants","buttonVisualVariants","PRESSED_STYLES","HIGH_CONTRAST_HOVER","HIGH_CONTRAST_PRESSED","ButtonGroupContext","useButtonGroupContext","ButtonGroupItemContext","useButtonGroupItemContext","buttonGroupItemVariants","Button","buttonVisualClassName","variant","size","visualSize","fullWidth","loading","loadingText","paywall","paywallRedirect","paywallDescription","onPress","paywallDescriptionId","useId","groupContext","itemContext","effectiveVariant","effectiveSize","effectiveIsDisabled","isInVerticalGroup","effectiveFullWidth","positionClassName","effectiveVisualSize","e","renderProps","Fragment","Loader2","Zap","breadcrumbsVariants","breadcrumbListVariants","breadcrumbItemVariants","breadcrumbLinkVariants","separatorVariants","ellipsisButtonVariants","isCurrentPage","index","total","getCollapsedItems","items","maxItems","itemsBeforeCollapse","itemsAfterCollapse","before","after","collapsed","BreadcrumbSeparator","separator","BreadcrumbLink","item","isCurrent","LinkComponent","isGroupDisabled","state","BreadcrumbEllipsis","MoreHorizontal","Breadcrumbs","linkComponent","collapsedData","isLast","globalIndex","pageTitleRootVariants","pageTitleRowVariants","pageTitleBodyVariants","pageTitleHeadingVariants","pageTitleDescriptionVariants","pageTitleBreadcrumbsVariants","pageTitleActionsVariants","pageTitleTabsVariants","PageTitleBreadcrumbs","testId","PageTitleHeading","as","id","useEffect","count","classes","PageTitleDescription","PageTitleActions","PageTitleTabs","SLOT_BY_DISPLAY_NAME","classifyChildren","slots","displayName","slot","PageTitleRoot","ariaLabelledBy","contextValue","useMemo","PageTitle","PageTitleVariantSchema","PageTitleHeadingLevelSchema","PageTitlePropsSchema","PageTitleHeadingPropsSchema","PageTitleDescriptionPropsSchema","PageTitleBreadcrumbsPropsSchema","PageTitleActionsPropsSchema","PageTitleTabsPropsSchema"],"mappings":"oTAcO,SAASA,KAAMC,CAAAA,CAA8B,CAClD,OAAOC,qBAAAA,CAAQC,UAAKF,CAAM,CAAC,CAC7B,CCPO,IAAMG,EAAmBC,mBAAAA,CAA4C,IAAI,EAEzE,SAASC,CAAAA,EAA6C,CAC3D,IAAMC,CAAAA,CAAMC,gBAAAA,CAAWJ,CAAgB,EACvC,GAAI,CAACG,EACH,MAAM,IAAI,MAAM,+DAA+D,CAAA,CAEjF,OAAOA,CACT,CCRO,IAAME,CAAAA,CAA2BC,KAAAA,CAAE,OAAO,CAE/C,SAAA,CAAWA,MAAE,MAAA,EAAO,CAAE,UAAS,CAG/B,QAAA,CAAUA,MAAE,GAAA,EAAI,CAAE,UAAS,CAC3B,EAAA,CAAIA,MAAE,MAAA,EAAO,CAAE,QAAA,EAAS,CAGxB,aAAcA,KAAAA,CAAE,MAAA,GAAS,QAAA,EAAS,CAClC,kBAAmBA,KAAAA,CAAE,MAAA,GAAS,QAAA,EAAS,CACvC,mBAAoBA,KAAAA,CAAE,MAAA,GAAS,QAAA,EAAS,CACxC,YAAaA,KAAAA,CAAE,IAAA,CAAK,CAAC,KAAA,CAAO,QAAA,CAAU,WAAW,CAAC,CA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BYG,EAAAA,CAA8BzK,CAAAA,CAAyB,OAAO,CACzE,QAAA,CAAUC,MAAE,MAAA,EAAkB,CAC9B,GAAIsK,EAAAA,CAA4B,QAAA,EAClC,CAAC,CAAA,CAeYG,EAAAA,CAAkC1K,CAAAA,CAAyB,OAAO,CAC7E,QAAA,CAAUC,MAAE,MAAA,EACd,CAAC,CAAA,CAaY0K,EAAAA,CAAkC3K,EAAyB,MAAA,CAAO,CAC7E,MAAOC,KAAAA,CAAE,KAAA,CAAMC,CAAwB,CAAA,CACvC,aAAA,CAAeD,MAAE,MAAA,EAAoB,CAAE,UACzC,CAAC,EAeY2K,EAAAA,CAA8B5K,CAAAA,CAAyB,OAAO,CACzE,QAAA,CAAUC,MAAE,MAAA,EACd,CAAC,CAAA,CAYY4K,EAAAA,CAA2B7K,EAAyB,MAAA,CAAO,CACtE,SAAUC,KAAAA,CAAE,MAAA,EACd,CAAC","file":"index.js","sourcesContent":["/**\n * Class Name Utility\n * Merges Tailwind CSS classes with conflict resolution\n *\n * Combines clsx for conditional classes and tailwind-merge for deduplication\n *\n * @example\n * cn('px-2 py-1', 'px-4') // => 'py-1 px-4' (px-4 overrides px-2)\n * cn('text-red-500', condition && 'text-blue-500') // => conditional application\n */\n\nimport { clsx, type ClassValue } from 'clsx';\nimport { twMerge } from 'tailwind-merge';\n\nexport function cn(...inputs: ClassValue[]): string {\n return twMerge(clsx(inputs));\n}\n","'use client';\n\nimport { createContext, useContext } from 'react';\nimport type { PageTitleVariant } from './PageTitle.types';\n\nexport interface PageTitleContextValue {\n variant: PageTitleVariant;\n}\n\nexport const PageTitleContext = createContext<PageTitleContextValue | null>(null);\n\nexport function usePageTitleContext(): PageTitleContextValue {\n const ctx = useContext(PageTitleContext);\n if (!ctx) {\n throw new Error('PageTitle compound components must be used within <PageTitle>');\n }\n return ctx;\n}\n","import { z } from 'zod';\n\n/**\n * Base props schema for all Themis components\n * Ensures consistent accessibility and styling APIs across the library\n *\n * @see spec.md FR-009 to FR-014 (Accessibility Requirements)\n * @see constitution.md Principle IV (Accessibility First - WCAG 2.2 AA minimum)\n */\nexport const BaseComponentPropsSchema = z.object({\n // Styling\n className: z.string().optional(),\n\n // React\n children: z.any().optional(), // ReactNode not directly supported by Zod\n id: z.string().optional(),\n\n // Accessibility (WCAG 2.2 AA requirements)\n 'aria-label': z.string().optional(),\n 'aria-labelledby': z.string().optional(),\n 'aria-describedby': z.string().optional(),\n 'aria-live': z.enum(['off', 'polite', 'assertive']).optional(),\n 'aria-hidden': z.boolean().optional(),\n\n // Testing & Development\n 'data-testid': z.string().optional(),\n});\n\nexport type BaseComponentProps = z.infer<typeof BaseComponentPropsSchema>;\n","import { z } from 'zod';\nimport { BaseComponentPropsSchema } from '../../schemas/BaseComponentProps';\nimport type { ReactNode, ElementType } from 'react';\n\n/**\n * Breadcrumb Item Data Schema\n * Represents a single item in the breadcrumb trail\n *\n * @see breadcrumbs-prd.md FR-001 (Render Breadcrumbs from Items Array)\n * @see breadcrumbs-prd.md FR-007 (Icon Support)\n * @see plan.md Decision 1 (Array-Based API)\n */\nexport const BreadcrumbItemDataSchema = z.object({\n /** Unique identifier for the breadcrumb item */\n id: z.union([z.string(), z.number()]),\n\n /** Display text for the breadcrumb (required - no icon-only items) */\n label: z.string(),\n\n /** Link URL - omit for non-navigable items */\n href: z.string().optional(),\n\n /** Optional leading icon (ReactNode) */\n icon: z.custom<ReactNode>().optional(),\n\n /** Disable this specific breadcrumb link */\n isDisabled: z.boolean().optional().default(false),\n});\n\nexport interface BreadcrumbItemData {\n id: string | number;\n label: string;\n href?: string;\n icon?: ReactNode;\n isDisabled?: boolean;\n}\n\n/**\n * Separator Type Schema\n * Controls the visual separator between breadcrumb items\n *\n * @see breadcrumbs-prd.md FR-003 (Configurable Separators)\n * @see plan.md Decision 3 (Configurable Separators)\n */\nexport const SeparatorTypeSchema = z.union([\n z.literal('chevron'),\n z.literal('slash'),\n z.custom<ReactNode>(),\n]);\n\nexport type SeparatorType = z.infer<typeof SeparatorTypeSchema>;\n\n/**\n * Breadcrumbs Props Schema\n * Main component props for the Breadcrumbs component\n *\n * @see breadcrumbs-prd.md FR-001 to FR-011 (All Functional Requirements)\n * @see plan.md (All Design Decisions)\n * @see constitution.md Principle IV (Accessibility First)\n */\nexport const BreadcrumbsPropsSchema = BaseComponentPropsSchema.extend({\n /**\n * Array of breadcrumb items to render\n * @see FR-001 (Render Breadcrumbs from Items Array)\n */\n items: z.array(BreadcrumbItemDataSchema),\n\n /**\n * Separator style between items\n * @default 'chevron'\n * @see FR-003 (Configurable Separators)\n */\n separator: SeparatorTypeSchema.optional().default('chevron'),\n\n /**\n * Maximum items to show before collapsing\n * @default 4\n * @see FR-004 (Ellipsis Collapse for Overflow)\n */\n maxItems: z.number().int().positive().optional().default(4),\n\n /**\n * Number of items to show before ellipsis\n * @default 1\n * @see FR-004 (Ellipsis Collapse for Overflow)\n */\n itemsBeforeCollapse: z.number().int().nonnegative().optional().default(1),\n\n /**\n * Number of items to show after ellipsis\n * @default 2\n * @see FR-004 (Ellipsis Collapse for Overflow)\n */\n itemsAfterCollapse: z.number().int().positive().optional().default(2),\n\n /**\n * Custom link component for framework integration (Next.js Link, React Router Link, etc.)\n * @default 'a'\n * @see FR-005 (Polymorphic Link Component)\n */\n linkComponent: z.custom<ElementType>().optional(),\n\n /**\n * Disable all breadcrumb links\n * @default false\n * @see FR-006 (Disabled States)\n */\n isDisabled: z.boolean().optional().default(false),\n});\n\nexport interface BreadcrumbsProps {\n className?: string;\n children?: unknown;\n id?: string;\n 'aria-label'?: string;\n 'aria-labelledby'?: string;\n 'aria-describedby'?: string;\n 'aria-live'?: 'off' | 'polite' | 'assertive';\n 'aria-hidden'?: boolean;\n 'data-testid'?: string;\n items: BreadcrumbItemData[];\n separator?: SeparatorType;\n maxItems?: number;\n itemsBeforeCollapse?: number;\n itemsAfterCollapse?: number;\n linkComponent?: ElementType;\n isDisabled?: boolean;\n}\n\n/**\n * Internal collapsed items structure\n * Used by ellipsis collapse logic\n *\n * @see FR-004 (Ellipsis Collapse for Overflow)\n * @see plan.md Decision 4 (Ellipsis Collapse)\n */\nexport interface CollapsedItems {\n /** Items shown before the ellipsis */\n before: BreadcrumbItemData[];\n /** Items hidden in the dropdown */\n collapsed: BreadcrumbItemData[];\n /** Items shown after the ellipsis */\n after: BreadcrumbItemData[];\n}\n\n/**\n * Internal BreadcrumbLink component props\n * Used by the internal link rendering component\n */\nexport interface BreadcrumbLinkInternalProps {\n item: BreadcrumbItemData;\n isCurrent: boolean;\n linkComponent?: ElementType;\n isGroupDisabled?: boolean;\n}\n\n/**\n * Internal BreadcrumbEllipsis component props\n * Used by the ellipsis dropdown component\n */\nexport interface BreadcrumbEllipsisInternalProps {\n items: BreadcrumbItemData[];\n linkComponent?: ElementType;\n isGroupDisabled?: boolean;\n}\n\n/**\n * Internal BreadcrumbSeparator component props\n * Used by the separator rendering component\n */\nexport interface BreadcrumbSeparatorInternalProps {\n separator: SeparatorType;\n}\n\n/**\n * CVA state type for breadcrumb link variants\n */\nexport type BreadcrumbLinkState = 'default' | 'current' | 'disabled';\n\n/**\n * CVA separator type for separator variants\n */\nexport type SeparatorVariantType = 'chevron' | 'slash' | 'custom';\n","/**\n * Detection + dismissal guard for in-page writing-assistant browser extensions\n * (Grammarly, LanguageTool, Wordtune, …).\n *\n * These extensions inject their suggestion UI as elements appended to `<body>`,\n * outside any open overlay's DOM subtree. React Aria's `isDismissable` behaviour\n * treats a click on that injected UI as an \"outside click\" and dismisses the\n * overlay — so clicking a spelling suggestion silently closes the form pop-up\n * and discards the user's in-progress correction.\n *\n * The guard below lets overlays keep open when the interaction lands on an\n * extension-injected node, while every other outside click, Escape, and the\n * close button behave exactly as before.\n */\n\nconst MAX_ANCESTOR_DEPTH = 100;\n\n/**\n * Returns `true` when `element` belongs to an injected in-page writing\n * assistant (Grammarly, LanguageTool, Wordtune, …).\n *\n * UX-ONLY heuristic. This is a deliberately spoofable DOM sniff used solely to\n * keep a form pop-up open when a writing-assistant suggestion is clicked. It is\n * NOT a security/authorization control and must never gate access to data or\n * actions (the frontend is not a security boundary). Pure function — never log\n * the element (it can reference arbitrary DOM / user content).\n */\nexport function isExtensionInjectedElement(element: Element): boolean {\n if (!(element instanceof Element)) return false;\n\n // 1. Known-vendor markers (authoritative). Walk up via parentElement, and\n // climb shadow boundaries via getRootNode().host so detection still finds\n // the <grammarly-extension> host if React Aria's shadowDOM flag is ever\n // enabled (it defaults to false today → the document-level listener\n // already receives the retargeted host, so the parentElement walk alone\n // suffices currently). Depth-bounded as a defensive guard against a\n // crafted/overridden getRootNode/host returning a cycle (which would\n // otherwise hang the tab — a client-side DoS).\n let node: Element | null = element;\n for (let depth = 0; node && depth < MAX_ANCESTOR_DEPTH; depth++) {\n const tag = node.tagName?.toLowerCase() ?? '';\n if (tag.startsWith('grammarly-')) return true; // Grammarly\n if (tag.startsWith('lt-')) return true; // LanguageTool\n if (node.hasAttribute('data-grammarly-shadow-root')) return true;\n\n if (node.parentElement) {\n node = node.parentElement;\n } else {\n const root = node.getRootNode();\n node = root instanceof ShadowRoot ? root.host : null;\n }\n }\n\n // 2. Structural fallback (best-effort, future-proofs the long tail).\n // Extensions inject their UI as a custom element (hyphenated tag name)\n // mounted as a top-level sibling of the React root — i.e. a direct child\n // of <body>/<html>. Our app never renders body-level custom elements, and\n // React Aria portals render plain <div>s, so this stays safe for any\n // future first-party web component nested inside the app tree.\n let custom: Element | null = element;\n while (custom && !custom.tagName.includes('-')) {\n custom = custom.parentElement;\n }\n if (!custom) return false;\n\n const parent = custom.parentElement;\n return parent === document.body || parent === document.documentElement;\n}\n\n/**\n * Builds a `shouldCloseOnInteractOutside` predicate for React Aria overlays\n * that keeps the overlay open when the interaction targets an extension-injected\n * element, while preserving any consumer-supplied predicate.\n *\n * React Aria semantics: the predicate returns `true` ⇒ the overlay should\n * close. So we close only when the element is NOT extension-injected AND the\n * consumer (if any) also agrees it should close.\n */\nexport function createInteractOutsideGuard(\n consumerShouldClose?: (element: Element) => boolean,\n): (element: Element) => boolean {\n return (element: Element): boolean =>\n !isExtensionInjectedElement(element) && (consumerShouldClose?.(element) ?? true);\n}\n","import { cva, type VariantProps } from 'class-variance-authority';\n\n/**\n * Menu variant styles using CVA\n * @see spec.md FR-040 (CVA for variant styling - single \"default\" variant for v1)\n */\nexport const menuVariants = cva(\n // Base styles - semantic tokens with fallbacks\n \"z-50 min-w-[8rem] overflow-hidden rounded-md border border-[var(--menu-border)] bg-[var(--menu-background)] text-[var(--menu-foreground)] p-1\",\n {\n variants: {\n variant: {\n default: \"\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n },\n }\n);\n\n/**\n * Menu Item variant styles using CVA\n * @see spec.md FR-041 (CVA for item states: hover, focus, active, disabled)\n */\nexport const menuItemVariants = cva(\n // Base styles - FR-014: 44x44px minimum touch targets\n \"relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none transition-colors data-[disabled]:pointer-events-none data-[disabled]:opacity-50 min-h-[44px] data-[focused]:bg-[var(--menu-accent)] data-[focused]:text-[var(--menu-accent-foreground)] data-[pressed]:bg-[var(--menu-accent)] [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0\",\n {\n variants: {\n variant: {\n default: \"\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n },\n }\n);\n\n/**\n * Type exports for variant props\n * Allows TypeScript inference of variant combinations\n */\nexport type MenuVariantProps = VariantProps<typeof menuVariants>;\nexport type MenuItemVariantProps = VariantProps<typeof menuItemVariants>;\n","\"use client\";\n\n/**\n * Dropdown Menu Component\n * Accessible dropdown menu with React Aria primitives, nested submenus, and CVA styling\n *\n * @see spec.md FR-001 to FR-054 (Dropdown Component Requirements)\n * @see spec.md FR-009 (WCAG 2.2 AAA - 7:1 contrast ratio)\n * @see spec.md FR-014 (44x44px minimum touch targets)\n * @see constitution.md Principle IV (Accessibility First)\n */\n\nimport { forwardRef, memo, Children, isValidElement, type ReactNode, type ReactElement, cloneElement, type ComponentType } from 'react';\nimport type { Placement } from 'react-aria';\nimport {\n MenuTrigger as AriaMenuTrigger,\n SubmenuTrigger as AriaSubmenuTrigger,\n Button as AriaButton,\n Menu as AriaMenu,\n MenuItem as AriaMenuItem,\n Separator as AriaSeparator,\n Header as AriaHeader,\n Popover as AriaPopover,\n} from 'react-aria-components';\nimport { ChevronRight } from 'lucide-react';\nimport { cn } from '../../utils/cn';\nimport { createInteractOutsideGuard } from '../../utils/browserExtensionOverlay';\nimport { menuVariants, menuItemVariants } from './Dropdown.styles';\nimport type {\n DropdownProps,\n DropdownTriggerProps,\n DropdownMenuProps,\n DropdownItemProps,\n DropdownSeparatorProps,\n DropdownLabelProps,\n} from './Dropdown.types';\n\n/**\n * Type-safe helper to get displayName from a component type.\n */\nfunction getDisplayName(type: unknown): string | undefined {\n if (typeof type === 'function' || typeof type === 'object') {\n return (type as ComponentType)?.displayName;\n }\n return undefined;\n}\n\n/**\n * Dropdown Root Component\n * Manages open/close state and coordinates Trigger and Menu children\n *\n * @see spec.md FR-001 to FR-007\n */\ninterface InternalDropdownProps extends DropdownProps {\n children: ReactNode;\n}\n\nconst DropdownRoot = forwardRef<HTMLDivElement, InternalDropdownProps>(\n ({ defaultOpen = false, isOpen, onOpenChange, children }, _ref) => {\n // Validate children structure in development only\n if (process.env.NODE_ENV !== 'production') {\n const childArray = Children.toArray(children);\n const hasTrigger = childArray.some(\n (child) =>\n isValidElement(child) &&\n (child.type === DropdownTrigger || getDisplayName(child.type) === 'DropdownTrigger')\n );\n const hasMenu = childArray.some(\n (child) =>\n isValidElement(child) &&\n (child.type === DropdownMenu || getDisplayName(child.type) === 'DropdownMenu')\n );\n\n if (!hasTrigger || !hasMenu) {\n throw new Error(\n 'Dropdown requires exactly one Dropdown.Trigger and one Dropdown.Menu as children'\n );\n }\n }\n\n return (\n <AriaMenuTrigger defaultOpen={defaultOpen} isOpen={isOpen} onOpenChange={onOpenChange}>\n {children}\n </AriaMenuTrigger>\n );\n }\n);\n\nDropdownRoot.displayName = 'Dropdown';\n\n/**\n * Dropdown.Trigger Component\n * Wraps trigger element (typically Button) with proper ARIA attributes\n *\n * @see spec.md FR-008 to FR-012\n */\nconst DropdownTrigger = forwardRef<HTMLButtonElement, DropdownTriggerProps>(\n ({ children, ...props }, ref) => {\n // Clone child to forward props. Note: NO `slot: 'trigger'` here —\n // `MenuTrigger` (the parent provider) injects its press behaviour into\n // the child Button via the default ButtonContext slot, not a named\n // 'trigger' slot. Adding `slot=\"trigger\"` worked in older react-aria-\n // components but 1.17+ strict-validates slots and throws\n // `Invalid slot \"trigger\". Valid slot names are \"close\".` when the\n // Dropdown is rendered inside a Dialog/Modal subtree.\n //\n // The Disclosure pattern (see Accordion.tsx) DOES require\n // `slot=\"trigger\"` — that's a different react-aria contract where\n // Disclosure's context exposes a named `trigger` slot.\n if (isValidElement(children)) {\n return cloneElement(children as ReactElement<Record<string, unknown>>, props);\n }\n\n // Fallback: wrap in AriaButton if not a React element\n return (\n <AriaButton ref={ref} {...props}>\n {children}\n </AriaButton>\n );\n }\n);\n\nDropdownTrigger.displayName = 'DropdownTrigger';\n\n/**\n * Dropdown.Menu Component\n * Renders menu with positioning, collision detection, and focus management\n *\n * @see spec.md FR-014 to FR-024\n */\nconst DropdownMenu = forwardRef<HTMLDivElement, DropdownMenuProps>(\n ({ align = 'start', side = 'bottom', className, children, ...props }, _ref) => {\n // Map align to React Aria placement\n const placement = `${side} ${align}` as Placement;\n\n return (\n <AriaPopover\n placement={placement}\n shouldCloseOnInteractOutside={createInteractOutsideGuard()}\n className=\"data-[entering]:motion-safe:animate-in data-[entering]:motion-safe:fade-in-0 data-[entering]:motion-safe:slide-in-from-top-2 data-[entering]:[animation-duration:250ms] data-[entering]:[animation-timing-function:cubic-bezier(0.16,1,0.3,1)] data-[exiting]:motion-safe:animate-out data-[exiting]:motion-safe:fade-out-0 data-[exiting]:motion-safe:slide-out-to-top-2 data-[exiting]:[animation-duration:150ms]\"\n >\n <AriaMenu\n className={cn(menuVariants({ variant: 'default' }), className)}\n {...props}\n >\n {children}\n </AriaMenu>\n </AriaPopover>\n );\n }\n);\n\nDropdownMenu.displayName = 'DropdownMenu';\n\n/**\n * Dropdown.Item Component\n * Menu item with action callbacks, disabled state, shortcuts, icons, and nested submenu support\n *\n * @see spec.md FR-025 to FR-034\n */\nconst DropdownItem = forwardRef<HTMLDivElement, DropdownItemProps>(\n (\n {\n children,\n onAction,\n isDisabled = false,\n shortcut,\n icon,\n iconRight,\n className,\n 'aria-label': ariaLabel,\n ...props\n },\n _ref\n ) => {\n // Check if this item contains a nested submenu\n const childArray = Children.toArray(children);\n const isDropdownMenu = (child: unknown): boolean =>\n isValidElement(child) &&\n (child.type === DropdownMenu || getDisplayName(child.type) === 'DropdownMenu');\n\n const hasSubmenu = childArray.some(isDropdownMenu);\n\n // Filter children to separate submenu from content\n const contentChildren = childArray.filter((child) => !isDropdownMenu(child));\n\n const submenu = childArray.find(isDropdownMenu);\n\n if (hasSubmenu && submenu) {\n // Render as submenu trigger using React Aria's SubmenuTrigger\n return (\n <AriaSubmenuTrigger>\n <AriaMenuItem\n aria-label={ariaLabel}\n className={cn(menuItemVariants({ variant: 'default' }), className)}\n {...props}\n >\n {icon && <span className=\"mr-2\">{icon}</span>}\n <span className=\"flex-1\">{contentChildren}</span>\n <ChevronRight className=\"ml-auto h-4 w-4\" aria-hidden=\"true\" />\n </AriaMenuItem>\n {submenu as ReactElement}\n </AriaSubmenuTrigger>\n );\n }\n\n // Regular menu item\n return (\n <AriaMenuItem\n onAction={onAction}\n isDisabled={isDisabled}\n aria-label={ariaLabel}\n className={cn(menuItemVariants({ variant: 'default' }), className)}\n {...props}\n >\n {icon && <span className=\"mr-2\">{icon}</span>}\n <span className=\"flex-1\">{children}</span>\n {iconRight && <span className=\"ml-auto\">{iconRight}</span>}\n {shortcut && (\n <kbd className=\"ml-auto pointer-events-none inline-flex h-5 select-none items-center gap-1 rounded border border-[var(--border)] bg-[var(--accent-background)] px-1.5 font-mono text-[10px] font-medium text-[var(--menu-muted)] opacity-100\">\n {shortcut}\n </kbd>\n )}\n </AriaMenuItem>\n );\n }\n);\n\nDropdownItem.displayName = 'DropdownItem';\n\n/**\n * Dropdown.Separator Component\n * Non-focusable visual divider\n *\n * @see spec.md FR-043 to FR-045\n */\nconst DropdownSeparator = memo(forwardRef<HTMLDivElement, DropdownSeparatorProps>(\n ({ className, ...props }, _ref) => {\n return (\n <AriaSeparator\n className={cn(\n '-mx-1 my-1 h-px bg-[var(--accent-background)]',\n className\n )}\n {...props}\n />\n );\n }\n));\n\nDropdownSeparator.displayName = 'DropdownSeparator';\n\n/**\n * Dropdown.Label Component\n * Non-interactive section header\n *\n * @see spec.md FR-046 to FR-048\n */\nconst DropdownLabel = memo(forwardRef<HTMLDivElement, DropdownLabelProps>(\n ({ children, className, ...props }, _ref) => {\n return (\n <AriaHeader\n className={cn(\n 'px-2 py-1.5 text-sm font-semibold text-[var(--menu-muted)]',\n className\n )}\n {...props}\n >\n {children}\n </AriaHeader>\n );\n }\n));\n\nDropdownLabel.displayName = 'DropdownLabel';\n\n/**\n * Export compound component via Object.assign for backwards compatibility.\n * Enables `<Dropdown.Trigger>`, `<Dropdown.Menu>`, etc.\n *\n * @deprecated v2 — Remove Object.assign pattern in favour of direct named exports\n * (DropdownTrigger, DropdownMenu, DropdownItem, DropdownSeparator, DropdownLabel)\n * for better tree-shaking. See named exports below.\n */\nexport const Dropdown = Object.assign(DropdownRoot, {\n Trigger: DropdownTrigger,\n Menu: DropdownMenu,\n Item: DropdownItem,\n Separator: DropdownSeparator,\n Label: DropdownLabel,\n});\n\n// Export individual components for flexibility\nexport { DropdownTrigger, DropdownMenu, DropdownItem, DropdownSeparator, DropdownLabel };\n\n// Export variant functions for external use\nexport { menuVariants, menuItemVariants };\n\n// Export types\nexport type {\n DropdownProps,\n DropdownTriggerProps,\n DropdownMenuProps,\n DropdownItemProps,\n DropdownSeparatorProps,\n DropdownLabelProps,\n};\n","import { cva } from 'class-variance-authority';\n\n/**\n * Layer 1: Transparent outer touch target (44x44px minimum)\n * Handles WCAG 2.2 AAA touch target requirement\n * Always transparent, centers the visual button inside\n * IMPORTANT: Focus ring stays on Layer 1 for AAA compliance (2.4.13)\n *\n * In vertical ButtonGroups, uses items-stretch so the visual layer (Layer 2)\n * can fill the full touch target height, eliminating gaps between buttons.\n */\nexport const buttonOuterVariants = cva(\n \"inline-flex justify-center min-h-[44px] min-w-[44px] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--ring)] focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:pointer-events-none disabled:opacity-50\",\n {\n variants: {\n fullWidth: {\n true: \"w-full\",\n false: \"\",\n },\n inVerticalGroup: {\n true: \"items-stretch\",\n false: \"items-center\",\n },\n },\n defaultVariants: {\n fullWidth: false,\n inVerticalGroup: false,\n },\n }\n);\n\n/**\n * Layer 2: Visual button appearance (adjustable size)\n * Provides the visual appearance with configurable size\n * Can be smaller than touch target for use cases like carousel dots\n * NOTE: NO focus-visible styles here - focus ring is on Layer 1\n */\nexport const buttonVisualVariants = cva(\n \"inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-normal ring-offset-background motion-safe:transition-transform motion-safe:duration-200 motion-safe:[transition-timing-function:cubic-bezier(0.34,1.56,0.64,1)] motion-reduce:transition-none [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 relative cursor-pointer\",\n {\n variants: {\n variant: {\n default:\n \"bg-[var(--primary-action)] text-[var(--primary-action-foreground)] shadow-md hover:bg-[var(--primary-action-hover)] hover:-translate-y-1\",\n destructive:\n \"bg-[var(--destructive-background)] text-[var(--destructive-foreground)] hover:bg-[var(--destructive-background-hover,var(--destructive-background))] motion-safe:hover:btn-warn-shake\",\n outline:\n \"border border-[var(--input-border)] bg-[var(--page-background)] hover:bg-[var(--input-border)]\",\n secondary:\n \"bg-[var(--secondary)] text-[var(--secondary-foreground)] hover:bg-[var(--secondary-hover,var(--secondary))]\",\n ghost:\n \"hover:bg-[var(--accent)] hover:text-[var(--accent-foreground)]\",\n link: \"text-[var(--text-link)] underline underline-offset-4 hover:bg-[var(--accent)] hover:text-[var(--text-link-hover)]\",\n },\n fullWidth: {\n true: \"w-full\",\n false: \"\",\n },\n visualSize: {\n default: \"h-10 px-4 py-2\",\n sm: \"h-9 rounded-md px-3 text-xs\",\n lg: \"h-11 rounded-md px-6 text-base\",\n icon: \"h-10 w-10\",\n dot: \"h-5 w-5 rounded-full p-0 min-h-0 min-w-0\",\n },\n paywall: {\n true: \"!bg-[var(--paywall)] !text-[var(--paywall-foreground)] hover:!bg-[var(--paywall)]/90 !cursor-not-allowed !border-transparent\",\n false: \"\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n visualSize: \"default\",\n paywall: false,\n },\n }\n);\n\n/**\n * @deprecated Use buttonVisualVariants instead. This alias is kept for backward compatibility.\n */\nexport const buttonVariants = buttonVisualVariants;\n","/**\n * Global Interaction State Styles\n *\n * Consistent interaction patterns across all Themis components.\n * These styles ensure WCAG 2.2 AAA compliance and predictable UX.\n *\n * @see spec.md FR-010 (Visible focus ring for keyboard navigation)\n * @see spec.md FR-031 (Pressed state feedback)\n * @see spec.md FR-012 (High contrast mode support)\n * @see constitution.md Principle IV (Accessibility First)\n */\n\n/**\n * Focus state styles (FR-010)\n * Visible focus ring for keyboard navigation - WCAG 2.2 Level AAA\n *\n * Components can override by extending these styles:\n * @example\n * cn(FOCUS_STYLES, \"ring-4\") // Increases ring width to 4px\n */\nexport const FOCUS_STYLES = \"data-[focus-visible]:ring-2 data-[focus-visible]:ring-[var(--themis-ring)] data-[focus-visible]:ring-offset-2\";\n\n/**\n * Pressed/Active state styles (FR-031)\n * Visual feedback for press interactions\n *\n * Components can override the scale amount:\n * @example\n * cn(PRESSED_STYLES_BASE, \"data-[pressed]:scale-[0.95]\") // More pronounced scale\n */\nexport const PRESSED_STYLES = \"data-[pressed]:scale-[0.97]\";\n\n/**\n * Base pressed styles without scale (for components that need different feedback)\n */\nexport const PRESSED_STYLES_BASE = \"data-[pressed]:transition-transform data-[pressed]:duration-100\";\n\n/**\n * Hover state styles\n * Elevation change on hover for better affordance\n *\n * Components can override shadow depth:\n * @example\n * cn(HOVER_STYLES_BASE, \"data-[hovered]:shadow-lg\") // Larger shadow\n */\nexport const HOVER_STYLES = \"\";\n\n/**\n * Base hover styles without shadow (for components that use different hover effects)\n */\nexport const HOVER_STYLES_BASE = \"data-[hovered]:transition-shadow data-[hovered]:duration-200\";\n\n/**\n * High contrast mode focus (FR-012)\n * Enhanced outlines for users requiring high contrast\n *\n * Uses 'hc:' prefix for prefers-contrast: more media query\n */\nexport const HIGH_CONTRAST_FOCUS = \"hc:data-[focus-visible]:outline hc:data-[focus-visible]:outline-4 hc:data-[focus-visible]:outline-offset-2 hc:data-[focus-visible]:outline-foreground\";\n\n/**\n * High contrast mode hover (FR-012)\n * Enhanced outlines for hover in high contrast mode\n */\nexport const HIGH_CONTRAST_HOVER = \"hc:data-[hovered]:outline hc:data-[hovered]:outline-2 hc:data-[hovered]:outline-foreground\";\n\n/**\n * High contrast mode pressed state\n * Enhanced outlines for pressed state in high contrast mode\n */\nexport const HIGH_CONTRAST_PRESSED = \"hc:data-[pressed]:outline hc:data-[pressed]:outline-2 hc:data-[pressed]:outline-offset-1 hc:data-[pressed]:outline-foreground\";\n\n/**\n * Combined high contrast styles\n * Use this for components that need all high contrast interaction states\n */\nexport const HIGH_CONTRAST_INTERACTIONS = `${HIGH_CONTRAST_FOCUS} ${HIGH_CONTRAST_HOVER} ${HIGH_CONTRAST_PRESSED}`;\n\n/**\n * Disabled state styles\n * Consistent disabled appearance across all components\n */\nexport const DISABLED_STYLES = \"disabled:pointer-events-none disabled:opacity-50\";\n\n/**\n * Default interaction bundle\n * Most common combination for interactive components\n *\n * Includes: focus ring, pressed scale, hover shadow, high contrast enhancements\n *\n * @example\n * <button className={cn(DEFAULT_INTERACTIONS, \"bg-primary\")}>Click</button>\n */\nexport const DEFAULT_INTERACTIONS = `${FOCUS_STYLES} ${PRESSED_STYLES} ${HOVER_STYLES} ${HIGH_CONTRAST_FOCUS} ${HIGH_CONTRAST_HOVER} ${HIGH_CONTRAST_PRESSED}`;\n\n/**\n * Subtle interaction bundle\n * For components that need less pronounced feedback\n *\n * Includes: focus ring and high contrast, but no hover shadow or pressed scale\n */\nexport const SUBTLE_INTERACTIONS = `${FOCUS_STYLES} ${HIGH_CONTRAST_FOCUS}`;\n\n/**\n * Non-interactive element styles\n * For elements that should indicate they are not interactive\n */\nexport const NON_INTERACTIVE = \"cursor-default select-none\";\n","\"use client\";\n\nimport { createContext, useContext } from 'react';\nimport type {\n ButtonGroupContextValue,\n ButtonGroupItemContextValue,\n} from './ButtonGroup.types';\n\n/**\n * ButtonGroup Context System (Two-Level)\n *\n * Provides a two-level context pattern for ButtonGroup:\n *\n * 1. ButtonGroupContext (group-level):\n * - Provides: orientation, variant, size, isDisabled\n * - Consumed by: Button (for prop inheritance), Separator (for orientation)\n *\n * 2. ButtonGroupItemContext (item-level):\n * - Provides: position ('first' | 'middle' | 'last' | 'only')\n * - Consumed by: Button (for border-radius styling)\n *\n * Both contexts return null when not in a provider, allowing Button\n * to work standalone without any group context.\n *\n * @see plan.md for architecture details\n * @see ButtonGroup.tsx for Provider implementation\n */\n\n// =============================================================================\n// Group-Level Context\n// =============================================================================\n\n/**\n * Context for group-level props (orientation, variant, size, isDisabled)\n * Default value is null to indicate \"not in a group\"\n */\nconst ButtonGroupContext = createContext<ButtonGroupContextValue | null>(null);\n\nButtonGroupContext.displayName = 'ButtonGroupContext';\n\n/**\n * Hook to access group-level context\n * @returns ButtonGroupContextValue if inside a ButtonGroup, null otherwise\n */\nexport function useButtonGroupContext(): ButtonGroupContextValue | null {\n return useContext(ButtonGroupContext);\n}\n\n// =============================================================================\n// Item-Level Context\n// =============================================================================\n\n/**\n * Context for per-button position information\n * Default value is null to indicate \"not wrapped with position context\"\n */\nconst ButtonGroupItemContext =\n createContext<ButtonGroupItemContextValue | null>(null);\n\nButtonGroupItemContext.displayName = 'ButtonGroupItemContext';\n\n/**\n * Hook to access item-level context (position)\n * @returns ButtonGroupItemContextValue if wrapped with position context, null otherwise\n */\nexport function useButtonGroupItemContext(): ButtonGroupItemContextValue | null {\n return useContext(ButtonGroupItemContext);\n}\n\n// =============================================================================\n// Exports\n// =============================================================================\n\nexport { ButtonGroupContext, ButtonGroupItemContext };\n","import { cva } from 'class-variance-authority';\n\n/**\n * ButtonGroup CVA Variants\n *\n * Defines Class Variance Authority (CVA) variants for:\n * - ButtonGroup container (orientation-based layout)\n * - ButtonGroupItem (position-based border-radius)\n * - ButtonGroupSeparator (orientation-based styling)\n *\n * @see plan.md Phase 1: Design & Contracts - CVA Variants\n * @see constitution.md Principle V (Component Quality Standards)\n */\n\n// =============================================================================\n// Container Variants\n// =============================================================================\n\n/**\n * ButtonGroup container variants\n * Controls the layout direction based on orientation\n * Uses gap-0 to ensure buttons are connected (share borders)\n */\nexport const buttonGroupVariants = cva('inline-flex items-center gap-0', {\n variants: {\n orientation: {\n horizontal: 'flex-row',\n vertical: 'flex-col w-full',\n },\n },\n defaultVariants: {\n orientation: 'horizontal',\n },\n});\n\n// =============================================================================\n// Item Position Variants\n// =============================================================================\n\n/**\n * ButtonGroupItem position variants\n * Applied to Button's visual layer (Layer 2) for position-aware border-radius\n *\n * Compound variants handle both orientation and position combinations:\n * - Horizontal: left/right borders and radii\n * - Vertical: top/bottom borders and radii\n */\nexport const buttonGroupItemVariants = cva('', {\n variants: {\n orientation: {\n // min-w-[44px] ensures visual layer fills touch target width (for icon buttons)\n horizontal: 'min-w-[44px]',\n // flex (overrides inline-flex) + min-h-[44px] makes visual layer fill touch target,\n // eliminating gaps between stacked buttons in vertical orientation\n vertical: 'flex min-h-[44px]',\n },\n position: {\n first: '',\n middle: '',\n last: '',\n only: '', // Single button - no modifications needed\n },\n },\n compoundVariants: [\n // ==========================================================================\n // Horizontal Orientation\n // ==========================================================================\n {\n orientation: 'horizontal',\n position: 'first',\n className: 'rounded-r-none border-r-0',\n },\n {\n orientation: 'horizontal',\n position: 'middle',\n className: 'rounded-none border-r-0',\n },\n {\n orientation: 'horizontal',\n position: 'last',\n className: 'rounded-l-none',\n },\n // ==========================================================================\n // Vertical Orientation\n // Note: w-full is handled by Button's effectiveFullWidth for both layers\n // ==========================================================================\n {\n orientation: 'vertical',\n position: 'first',\n className: 'rounded-b-none border-b-0',\n },\n {\n orientation: 'vertical',\n position: 'middle',\n className: 'rounded-none border-b-0',\n },\n {\n orientation: 'vertical',\n position: 'last',\n className: 'rounded-t-none',\n },\n ],\n defaultVariants: {\n orientation: 'horizontal',\n position: 'only',\n },\n});\n\n// =============================================================================\n// Separator Variants\n// =============================================================================\n\n/**\n * ButtonGroupSeparator variants\n * Orientation-aware visual divider between button groups\n */\nexport const buttonGroupSeparatorVariants = cva('bg-[var(--border)]', {\n variants: {\n orientation: {\n horizontal: 'w-px h-6 mx-1',\n vertical: 'h-px w-full my-1',\n },\n },\n defaultVariants: {\n orientation: 'horizontal',\n },\n});\n","\"use client\";\n\n/**\n * Button Component - 3-Layer Architecture\n * Accessible button with React Aria primitives and CVA styling\n *\n * Architecture:\n * - Layer 1: Touch Target (44x44px WCAG AAA compliant, transparent)\n * - Layer 2: Visual Button (configurable size, colors, borders)\n * - Layer 3: Content & Effects (text, icons, ripple, loading spinner)\n *\n * @see 3layer-plan.md for architecture details\n * @see spec.md FR-029 to FR-037 (Button Component Requirements)\n * @see spec.md FR-009 (WCAG 2.2 AAA - 7:1 contrast ratio)\n * @see spec.md FR-014 (44x44px minimum touch targets)\n * @see constitution.md Principle IV (Accessibility First)\n */\n\nimport { forwardRef, memo, useId } from 'react';\nimport {\n Button as AriaButton,\n type ButtonProps as AriaButtonProps,\n} from 'react-aria-components';\nimport { Loader2, Zap } from 'lucide-react';\nimport { cn } from '../../utils/cn';\nimport type { ButtonProps } from './Button.types';\nimport { buttonOuterVariants, buttonVisualVariants, buttonVariants } from './Button.styles';\nimport { PRESSED_STYLES, HOVER_STYLES, HIGH_CONTRAST_HOVER, HIGH_CONTRAST_PRESSED } from '../../styles/interaction-states';\nimport {\n useButtonGroupContext,\n useButtonGroupItemContext,\n} from '../ButtonGroup/ButtonGroupContext';\nimport { buttonGroupItemVariants } from '../ButtonGroup/ButtonGroup.variants';\n\n/**\n * Button Component - 3-Layer Architecture\n * Fully accessible button with React Aria and themed styling\n *\n * Layer 1: Touch Target (AriaButton) - 44x44px WCAG AAA compliant\n * Layer 2: Visual Button (span) - configurable appearance\n * Layer 3: Content (children) - text, icons, effects\n */\nconst Button = memo(forwardRef<HTMLButtonElement, ButtonProps>(\n (\n {\n className,\n buttonVisualClassName,\n variant,\n size,\n visualSize,\n fullWidth,\n loading = false,\n loadingText = \"Loading...\",\n shortcut,\n children,\n isDisabled,\n paywall = false,\n paywallRedirect,\n paywallDescription,\n onPress,\n ...props\n },\n ref\n ) => {\n const paywallDescriptionId = useId();\n\n // ==========================================================================\n // ButtonGroup Context Integration\n // ==========================================================================\n\n // Consume group-level context (variant, size, isDisabled, orientation)\n const groupContext = useButtonGroupContext();\n\n // Consume item-level context (position for border-radius styling)\n const itemContext = useButtonGroupItemContext();\n\n // Merge context values with props (props take precedence)\n const effectiveVariant = variant ?? groupContext?.variant ?? 'default';\n const effectiveSize = size ?? groupContext?.size;\n const effectiveIsDisabled = isDisabled ?? groupContext?.isDisabled ?? false;\n\n // In vertical groups, buttons should be full width automatically\n const isInVerticalGroup = groupContext?.orientation === 'vertical';\n const effectiveFullWidth = fullWidth || isInVerticalGroup;\n\n // Position styling for ButtonGroup (only applied when in a group)\n const positionClassName = itemContext\n ? buttonGroupItemVariants({\n orientation: groupContext?.orientation ?? 'horizontal',\n position: itemContext.position,\n })\n : '';\n\n // Default visualSize to size for backward compatibility\n const effectiveVisualSize = visualSize ?? effectiveSize ?? 'default';\n\n // AAA Accessibility: Warn in dev/test if icon/dot variant lacks accessible name\n if (process.env.NODE_ENV !== 'production') {\n if (\n (effectiveVisualSize === 'dot' || effectiveVisualSize === 'icon') &&\n !props['aria-label'] &&\n !children\n ) {\n console.warn(\n '[Button] visualSize=\"dot\" or \"icon\" requires aria-label when no visible text is provided (WCAG 1.1.1)'\n );\n }\n }\n\n /**\n * Handle button press - intercepts action when paywalled\n * If paywalled with redirect URL, opens in new tab\n * Otherwise, calls the normal onPress handler\n */\n const handlePress = (e: Parameters<NonNullable<AriaButtonProps['onPress']>>[0]): void => {\n if (paywall) {\n if (paywallRedirect) {\n window.open(paywallRedirect, '_blank', 'noopener,noreferrer');\n }\n // Don't call onPress when paywalled\n return;\n }\n onPress?.(e);\n };\n\n // Only set isDisabled when we have a reason to disable\n // Otherwise, let slot system control disabled state (e.g., in NumberField)\n const computedIsDisabled = effectiveIsDisabled || loading || undefined;\n\n return (\n <AriaButton\n ref={ref}\n isDisabled={computedIsDisabled}\n aria-disabled={paywall ? true : undefined}\n aria-describedby={paywall ? paywallDescriptionId : undefined}\n onPress={handlePress}\n className={cn(buttonOuterVariants({ fullWidth: effectiveFullWidth, inVerticalGroup: isInVerticalGroup }), className)}\n {...props}\n >\n {(renderProps) => (\n /* Layer 2: Visual Button */\n <span\n className={cn(\n buttonVisualVariants({\n variant: effectiveVariant,\n visualSize: effectiveVisualSize,\n paywall,\n fullWidth: effectiveFullWidth,\n }),\n // Position styling from ButtonGroup context (border-radius adjustments)\n positionClassName,\n buttonVisualClassName,\n // Layer 2 interaction styles (no focus - focus ring is on Layer 1)\n PRESSED_STYLES,\n HOVER_STYLES,\n HIGH_CONTRAST_HOVER,\n HIGH_CONTRAST_PRESSED\n )}\n data-pressed={renderProps.isPressed || undefined}\n >\n {/* Layer 3: Content & Effects */}\n\n {/* FR-033: Loading spinner with screen reader announcement */}\n {/* Uses motion-safe: for WCAG 2.3.3 AAA (Animation from Interactions) */}\n {loading && (\n <>\n <Loader2 className=\"motion-safe:animate-spin\" aria-hidden=\"true\" />\n <span className=\"sr-only\" aria-live=\"polite\">\n {loadingText}\n </span>\n </>\n )}\n\n {/* Hide children during loading */}\n {!loading && children}\n\n {/* Paywall: Lightning bolt icon */}\n {paywall && (\n <Zap\n data-testid=\"zap-icon\"\n aria-hidden=\"true\"\n className=\"ml-1\"\n />\n )}\n\n {/* Paywall: Screen reader description */}\n {paywall && (\n <span id={paywallDescriptionId} className=\"sr-only\">\n Premium feature: {paywallDescription || \"Upgrade required to access this feature\"}\n </span>\n )}\n\n {/* FR-034: Keyboard shortcut display on focus */}\n {renderProps.isFocusVisible && shortcut && (\n <kbd className=\"ml-auto hidden text-xs opacity-60 lg:inline\">\n {shortcut}\n </kbd>\n )}\n\n </span>\n )}\n </AriaButton>\n );\n }\n));\n\nButton.displayName = \"Button\";\n\nexport { Button, buttonVariants, buttonOuterVariants, buttonVisualVariants };\nexport type { ButtonProps } from './Button.types';\n","\"use client\";\n\n/**\n * Breadcrumbs Component\n * Accessible breadcrumb navigation with array-based API and ellipsis collapse\n *\n * @see breadcrumbs-prd.md FR-001 to FR-011 (Breadcrumbs Component Requirements)\n * @see breadcrumbs-prd.md FR-009 (WCAG 2.2 AAA - 7:1 contrast ratio)\n * @see breadcrumbs-prd.md FR-008 (44x44px minimum touch targets)\n * @see constitution.md Principle IV (Accessibility First)\n */\n\nimport { forwardRef, Fragment, type ElementType, type ReactNode } from 'react';\nimport { cva } from 'class-variance-authority';\nimport { ChevronRight, MoreHorizontal } from 'lucide-react';\nimport { cn } from '../../utils/cn';\nimport { Dropdown } from '../Dropdown';\nimport { Button } from '../Button';\nimport type {\n BreadcrumbsProps,\n BreadcrumbItemData,\n SeparatorType,\n CollapsedItems,\n BreadcrumbLinkState,\n} from './Breadcrumbs.types';\n\n// ============================================================================\n// CVA Variants (Task 3.1)\n// ============================================================================\n\n/**\n * Root container styling\n * @see plan.md CVA Variants Structure - breadcrumbsVariants\n */\nexport const breadcrumbsVariants = cva(\"flex items-center flex-wrap\", {\n variants: {},\n defaultVariants: {},\n});\n\n/**\n * Ordered list styling\n * @see plan.md CVA Variants Structure - breadcrumbListVariants\n */\nexport const breadcrumbListVariants = cva(\n \"flex flex-wrap items-center gap-1 break-words text-sm text-[var(--menu-muted)]\",\n {\n variants: {},\n defaultVariants: {},\n }\n);\n\n/**\n * Individual list item styling\n * @see plan.md CVA Variants Structure - breadcrumbItemVariants\n */\nexport const breadcrumbItemVariants = cva(\"inline-flex items-center gap-1\", {\n variants: {},\n defaultVariants: {},\n});\n\n/**\n * Link/span styling based on state\n * @see plan.md CVA Variants Structure - breadcrumbLinkVariants\n * @see FR-008 (44x44px minimum touch targets)\n */\nexport const breadcrumbLinkVariants = cva(\n \"inline-flex items-center gap-2 min-h-[44px] pr-2 rounded-sm transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--ring)] focus-visible:ring-offset-2\",\n {\n variants: {\n state: {\n default: [\n \"text-[var(--menu-muted)]\",\n \"underline underline-offset-4\",\n \"hover:text-[var(--content-foreground)]\",\n ].join(\" \"),\n current: \"text-[var(--content-foreground)] font-medium pointer-events-none\",\n disabled:\n \"text-[var(--menu-muted)] opacity-50 cursor-not-allowed pointer-events-none\",\n },\n },\n defaultVariants: {\n state: \"default\",\n },\n }\n);\n\n/**\n * Separator styling\n * @see plan.md CVA Variants Structure - separatorVariants\n */\nexport const separatorVariants = cva(\"text-[var(--menu-muted)]\", {\n variants: {\n type: {\n chevron: \"[&>svg]:h-4 [&>svg]:w-4\",\n slash: \"mx-2\",\n custom: \"\",\n },\n },\n defaultVariants: {\n type: \"chevron\",\n },\n});\n\n/**\n * Ellipsis button styling\n * @see plan.md CVA Variants Structure - ellipsisButtonVariants\n * @see FR-008 (44x44px minimum touch targets)\n */\nexport const ellipsisButtonVariants = cva(\n \"inline-flex items-center justify-center min-h-[44px] min-w-[44px] rounded-sm transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--ring)] focus-visible:ring-offset-2 hover:bg-[var(--accent)]\",\n {\n variants: {},\n defaultVariants: {},\n }\n);\n\n// ============================================================================\n// Helper Functions (Task 3.4)\n// ============================================================================\n\n/**\n * Determine if an item is the current page\n * Only the last item is considered current page\n *\n * @see plan.md Clarification: Current Page Detection - Only last item\n */\nfunction isCurrentPage(index: number, total: number): boolean {\n return index === total - 1;\n}\n\n/**\n * Calculate collapsed items for ellipsis dropdown\n *\n * @see FR-004 (Ellipsis Collapse for Overflow)\n * @see plan.md Clarification: Collapse Edge Case - No collapse if before + after >= total\n */\nfunction getCollapsedItems(\n items: BreadcrumbItemData[],\n maxItems: number,\n itemsBeforeCollapse: number,\n itemsAfterCollapse: number\n): CollapsedItems | null {\n // No collapse if items fit within maxItems\n if (items.length <= maxItems) {\n return null;\n }\n\n // Edge case: no collapse if before + after covers all items\n if (itemsBeforeCollapse + itemsAfterCollapse >= items.length) {\n return null;\n }\n\n const before = items.slice(0, itemsBeforeCollapse);\n const after = items.slice(-itemsAfterCollapse);\n const collapsed = items.slice(itemsBeforeCollapse, items.length - itemsAfterCollapse);\n\n return { before, collapsed, after };\n}\n\n// ============================================================================\n// Internal Components (Tasks 3.2, 3.3)\n// ============================================================================\n\n/**\n * BreadcrumbSeparator - Internal component for rendering separators\n *\n * @see FR-003 (Configurable Separators)\n * @see plan.md Task 3.2\n */\ninterface BreadcrumbSeparatorProps {\n separator: SeparatorType;\n}\n\nfunction BreadcrumbSeparator({ separator }: BreadcrumbSeparatorProps): ReactNode {\n if (separator === 'chevron') {\n return (\n <li\n role=\"presentation\"\n aria-hidden=\"true\"\n className={separatorVariants({ type: 'chevron' })}\n >\n <ChevronRight />\n </li>\n );\n }\n\n if (separator === 'slash') {\n return (\n <li\n role=\"presentation\"\n aria-hidden=\"true\"\n className={separatorVariants({ type: 'slash' })}\n >\n /\n </li>\n );\n }\n\n // Custom ReactNode separator\n return (\n <li\n role=\"presentation\"\n aria-hidden=\"true\"\n className={separatorVariants({ type: 'custom' })}\n >\n {separator}\n </li>\n );\n}\n\n/**\n * BreadcrumbLink - Internal component for rendering individual breadcrumb links\n *\n * @see FR-001 (Render Breadcrumbs from Items Array)\n * @see FR-002 (Auto-Detect Current Page)\n * @see FR-005 (Polymorphic Link Component)\n * @see plan.md Task 3.3\n */\ninterface BreadcrumbLinkProps {\n item: BreadcrumbItemData;\n isCurrent: boolean;\n linkComponent?: ElementType;\n isGroupDisabled?: boolean;\n}\n\nfunction BreadcrumbLink({\n item,\n isCurrent,\n linkComponent: LinkComponent = 'a',\n isGroupDisabled,\n}: BreadcrumbLinkProps): ReactNode {\n const isDisabled = isGroupDisabled || item.isDisabled;\n const state: BreadcrumbLinkState = isCurrent\n ? 'current'\n : isDisabled\n ? 'disabled'\n : 'default';\n\n // Render current page as span with aria-current\n if (isCurrent) {\n return (\n <span\n className={breadcrumbLinkVariants({ state: 'current' })}\n aria-current=\"page\"\n >\n {item.icon && <span aria-hidden=\"true\">{item.icon}</span>}\n {item.label}\n </span>\n );\n }\n\n // Render non-navigable item (no href) as span without aria-current\n if (!item.href) {\n return (\n <span\n className={breadcrumbLinkVariants({ state: isDisabled ? 'disabled' : 'default' })}\n aria-disabled={isDisabled || undefined}\n >\n {item.icon && <span aria-hidden=\"true\">{item.icon}</span>}\n {item.label}\n </span>\n );\n }\n\n // Render link - navigation handled by linkComponent\n return (\n <LinkComponent\n href={item.href}\n className={breadcrumbLinkVariants({ state })}\n aria-disabled={isDisabled || undefined}\n >\n {item.icon && <span aria-hidden=\"true\">{item.icon}</span>}\n {item.label}\n </LinkComponent>\n );\n}\n\n/**\n * BreadcrumbEllipsis - Internal component for collapsed items dropdown\n *\n * @see FR-004 (Ellipsis Collapse for Overflow)\n * @see plan.md Task 4.2 - Uses Themis Dropdown with nested LinkComponent\n */\ninterface BreadcrumbEllipsisProps {\n items: BreadcrumbItemData[];\n linkComponent?: ElementType;\n isGroupDisabled?: boolean;\n}\n\nfunction BreadcrumbEllipsis({\n items,\n linkComponent: LinkComponent = 'a',\n isGroupDisabled,\n}: BreadcrumbEllipsisProps): ReactNode {\n return (\n <Dropdown defaultOpen={false}>\n <Dropdown.Trigger>\n <Button\n variant=\"ghost\"\n size=\"icon\"\n className={ellipsisButtonVariants()}\n aria-label=\"More breadcrumbs\"\n >\n <MoreHorizontal className=\"h-4 w-4\" />\n </Button>\n </Dropdown.Trigger>\n <Dropdown.Menu align=\"start\" side=\"bottom\">\n {items.map((item) => (\n <Dropdown.Item\n key={item.id}\n isDisabled={isGroupDisabled || item.isDisabled}\n >\n {/* Nest LinkComponent inside Item (ShadCN pattern) */}\n <LinkComponent\n href={item.href}\n className=\"flex flex-1 items-center gap-2\"\n >\n {item.icon && <span aria-hidden=\"true\">{item.icon}</span>}\n {item.label}\n </LinkComponent>\n </Dropdown.Item>\n ))}\n </Dropdown.Menu>\n </Dropdown>\n );\n}\n\n// ============================================================================\n// Main Component (Tasks 3.5, 3.6)\n// ============================================================================\n\n/**\n * Breadcrumbs Component\n *\n * Accessible breadcrumb navigation with array-based API and ellipsis collapse.\n * Supports polymorphic link components for framework integration.\n *\n * @example\n * ```tsx\n * <Breadcrumbs\n * items={[\n * { id: 'home', label: 'Home', href: '/' },\n * { id: 'products', label: 'Products', href: '/products' },\n * { id: 'current', label: 'Product Details' }\n * ]}\n * />\n * ```\n *\n * @see breadcrumbs-prd.md FR-001 to FR-011 (All Functional Requirements)\n */\nconst Breadcrumbs = forwardRef<HTMLElement, BreadcrumbsProps>(\n (\n {\n items,\n separator = 'chevron',\n maxItems = 4,\n itemsBeforeCollapse = 1,\n itemsAfterCollapse = 2,\n linkComponent,\n isDisabled,\n className,\n 'aria-label': ariaLabel = 'Breadcrumb',\n ...props\n },\n ref\n ) => {\n // Handle empty items - render nothing\n if (!items || items.length === 0) {\n return null;\n }\n\n // Calculate if we need to collapse\n const collapsedData = getCollapsedItems(\n items,\n maxItems,\n itemsBeforeCollapse,\n itemsAfterCollapse\n );\n\n // Render without collapse\n if (!collapsedData) {\n return (\n <nav\n ref={ref}\n aria-label={ariaLabel}\n className={cn(breadcrumbsVariants(), className)}\n {...props}\n >\n <ol className={breadcrumbListVariants()}>\n {items.map((item, index) => (\n <Fragment key={item.id}>\n <li className={breadcrumbItemVariants()}>\n <BreadcrumbLink\n item={item}\n isCurrent={isCurrentPage(index, items.length)}\n linkComponent={linkComponent}\n isGroupDisabled={isDisabled}\n />\n </li>\n {index < items.length - 1 && (\n <BreadcrumbSeparator separator={separator} />\n )}\n </Fragment>\n ))}\n </ol>\n </nav>\n );\n }\n\n // Render with collapse\n return (\n <nav\n ref={ref}\n aria-label={ariaLabel}\n className={cn(breadcrumbsVariants(), className)}\n {...props}\n >\n <ol className={breadcrumbListVariants()}>\n {/* Items before ellipsis */}\n {collapsedData.before.map((item) => (\n <Fragment key={item.id}>\n <li className={breadcrumbItemVariants()}>\n <BreadcrumbLink\n item={item}\n isCurrent={false}\n linkComponent={linkComponent}\n isGroupDisabled={isDisabled}\n />\n </li>\n <BreadcrumbSeparator separator={separator} />\n </Fragment>\n ))}\n\n {/* Ellipsis dropdown */}\n <li className={breadcrumbItemVariants()}>\n <BreadcrumbEllipsis\n items={collapsedData.collapsed}\n linkComponent={linkComponent}\n isGroupDisabled={isDisabled}\n />\n </li>\n <BreadcrumbSeparator separator={separator} />\n\n {/* Items after ellipsis */}\n {collapsedData.after.map((item, index) => {\n const isLast = index === collapsedData.after.length - 1;\n const globalIndex =\n items.length - collapsedData.after.length + index;\n return (\n <Fragment key={item.id}>\n <li className={breadcrumbItemVariants()}>\n <BreadcrumbLink\n item={item}\n isCurrent={isCurrentPage(globalIndex, items.length)}\n linkComponent={linkComponent}\n isGroupDisabled={isDisabled}\n />\n </li>\n {!isLast && <BreadcrumbSeparator separator={separator} />}\n </Fragment>\n );\n })}\n </ol>\n </nav>\n );\n }\n);\n\nBreadcrumbs.displayName = 'Breadcrumbs';\n\nexport { Breadcrumbs };\n","import { cva } from 'class-variance-authority';\n\n/**\n * PageTitle CVA variants.\n *\n * Colour strategy\n * - Default: `var(--content-background)` + `var(--content-foreground)`\n * (standard card surface; description uses `var(--menu-muted)`).\n * - Feature: branded gradient `var(--primary)` → darkened; all text uses\n * `var(--primary-foreground)` at full opacity (no `/70` modifiers).\n * Gradient direction flips in RTL so the visual weight stays at the\n * reading end.\n *\n * AAA contrast of the feature variant's gradient depends on the tenant's\n * `--primary` value. Tenant-specific contrast guardrails live in the\n * theme validator, not here — this component renders whatever the tenant\n * theme supplies.\n */\n\n// =============================================================================\n// Root — semantic <header> wrapper\n// =============================================================================\n\nexport const pageTitleRootVariants = cva(\n // gap-2, not the Figma's 20px: Themis breadcrumbs carry a 44px touch zone that\n // already adds ~11px below the visible crumb text, so a smaller flex gap lands\n // the *visual* breadcrumb→title spacing where the design intends.\n '@container/page-title flex flex-col gap-2 border-b border-[var(--border)] p-4',\n {\n variants: {\n variant: {\n default: 'bg-[var(--content-background)]',\n feature: [\n 'bg-[linear-gradient(to_right,var(--primary),color-mix(in_oklch,var(--primary),black_60%))]',\n 'rtl:bg-[linear-gradient(to_left,var(--primary),color-mix(in_oklch,var(--primary),black_60%))]',\n ].join(' '),\n },\n },\n defaultVariants: {\n variant: 'default',\n },\n },\n);\n\n// =============================================================================\n// Title row — stacks column when the page-title CONTAINER is narrow, regardless\n// of viewport width. Switches to row at ≥36rem container width and allows\n// actions to wrap below the body when the row can't accommodate both.\n// =============================================================================\n\nexport const pageTitleRowVariants = cva(\n 'flex w-full flex-col gap-4 @xl/page-title:flex-row @xl/page-title:flex-wrap @xl/page-title:items-center @xl/page-title:justify-between',\n);\n\nexport const pageTitleBodyVariants = cva(\n 'flex min-w-0 flex-1 flex-col gap-3 @xl/page-title:basis-[18rem]',\n);\n\n// =============================================================================\n// Heading\n// =============================================================================\n\nexport const pageTitleHeadingVariants = cva(\n 'text-[28px] font-semibold leading-none tracking-[-0.28px]',\n {\n variants: {\n variant: {\n default: 'text-[var(--content-foreground)]',\n feature: 'text-[var(--primary-foreground)]',\n },\n },\n defaultVariants: {\n variant: 'default',\n },\n },\n);\n\n// =============================================================================\n// Description\n// =============================================================================\n\nexport const pageTitleDescriptionVariants = cva(\n 'text-base leading-normal',\n {\n variants: {\n variant: {\n default: 'text-[var(--menu-muted)]',\n feature: 'text-[var(--primary-foreground)]',\n },\n },\n defaultVariants: {\n variant: 'default',\n },\n },\n);\n\n// =============================================================================\n// Breadcrumbs wrapper — variant-aware class override for feature contrast\n// =============================================================================\n\nexport const pageTitleBreadcrumbsVariants = cva('flex w-full', {\n variants: {\n variant: {\n default: '',\n // On the feature variant, breadcrumb links/separators must clear the\n // gradient. Override the inner link colour scheme at full opacity.\n feature: [\n '[&_a]:text-[var(--primary-foreground)]',\n '[&_a:hover]:text-[var(--primary-foreground)]',\n '[&_[aria-current=page]]:text-[var(--primary-foreground)]',\n '[&_[role=presentation]]:text-[var(--primary-foreground)]',\n // Focus ring on the gradient: use foreground as the ring colour.\n '[&_:focus-visible]:ring-[var(--primary-foreground)]',\n ].join(' '),\n },\n },\n defaultVariants: {\n variant: 'default',\n },\n});\n\n// =============================================================================\n// Actions — primary/secondary button container\n// =============================================================================\n\nexport const pageTitleActionsVariants = cva(\n 'flex shrink-0 flex-wrap items-center gap-2',\n);\n\n// =============================================================================\n// Tabs slot — renders below the title row, full-width\n// =============================================================================\n\nexport const pageTitleTabsVariants = cva(\n // Full-bleed: break out of the root's `p-4` so the tab strip spans the\n // container edge-to-edge. `-mx-4 -mb-4` mirror the root padding; `mt-2` lifts\n // the gap above the tabs back toward the design's ~16px (root flex gap\n // contributes the other half). Kept as a block (NOT flex) so the `Tabs` root\n // div stays full width — a flex wrapper would shrink it to content. The inner\n // TabList is then stretched to full width so *its own* `border-b` becomes the\n // seamless PageTitle divider (no separate wrapper border to double up); the\n // root drops its bottom border when tabs are present (see PageTitle.tsx).\n // No `w-full`: an auto-width block lets `-mx-4` expand symmetrically to full\n // bleed (with `w-full` the 100% width is fixed and the negative right margin\n // can't extend it, leaving a right-side gap).\n //\n // The Default tab now carries `px-4` (16px) itself, so with the tablist flush\n // at x=0 the first tab's text aligns with the 16px content inset above. The\n // border-b lives on the full-bleed tablist box, so it stays flush at both edges.\n '-mx-4 -mb-4 mt-2 [&_[role=tablist]]:flex [&_[role=tablist]]:w-full',\n);\n","'use client';\n\nimport { forwardRef, type ReactElement } from 'react';\nimport { cn } from '../../utils/cn';\nimport { Breadcrumbs } from '../Breadcrumbs';\nimport { usePageTitleContext } from './PageTitleContext';\nimport { pageTitleBreadcrumbsVariants } from './PageTitle.styles';\nimport type { PageTitleBreadcrumbsProps } from './PageTitle.types';\n\n/**\n * PageTitle.Breadcrumbs\n *\n * Items-driven breadcrumb trail for the page header. Renders a Themis\n * `<Breadcrumbs>` internally so the surrounding `<nav aria-label=\"Breadcrumb\">`\n * and `aria-current=\"page\"` semantics are always correct.\n *\n * On the `feature` variant, applies a full-opacity colour override so link and\n * separator text clear the gradient without relying on reduced-opacity hacks.\n */\nexport const PageTitleBreadcrumbs = forwardRef<HTMLDivElement, PageTitleBreadcrumbsProps>(\n function PageTitleBreadcrumbsImpl(\n { items, linkComponent, className, 'data-testid': testId, 'aria-label': ariaLabel },\n ref,\n ): ReactElement {\n const { variant } = usePageTitleContext();\n return (\n <div\n ref={ref}\n className={cn(pageTitleBreadcrumbsVariants({ variant }), className)}\n data-testid={testId ?? 'page-title-breadcrumbs'}\n >\n <Breadcrumbs\n items={items}\n linkComponent={linkComponent}\n aria-label={ariaLabel}\n />\n </div>\n );\n },\n);\n\nPageTitleBreadcrumbs.displayName = 'PageTitle.Breadcrumbs';\n","'use client';\n\nimport { forwardRef, useEffect, type ReactElement } from 'react';\nimport { cn } from '../../utils/cn';\nimport { usePageTitleContext } from './PageTitleContext';\nimport { pageTitleHeadingVariants } from './PageTitle.styles';\nimport type { PageTitleHeadingProps } from './PageTitle.types';\n\n/**\n * PageTitle.Heading\n *\n * Renders an `<h1>` by default. Use `as=\"h2\"` or `as=\"h3\"` when `PageTitle` is\n * not the page's primary heading (e.g. inside an editor that already owns the\n * page-level `<h1>`).\n *\n * Dev-mode check warns if multiple `<h1>`s land on the page.\n */\nexport const PageTitleHeading = forwardRef<HTMLHeadingElement, PageTitleHeadingProps>(\n function PageTitleHeadingImpl(\n { as = 'h1', children, className, id, 'data-testid': testId },\n ref,\n ): ReactElement {\n const { variant } = usePageTitleContext();\n\n useEffect(() => {\n if (process.env.NODE_ENV !== 'production' && as === 'h1') {\n const count = document.querySelectorAll('h1').length;\n if (count > 1) {\n console.warn(\n `[PageTitle] Multiple <h1> elements detected on the page (${count}). ` +\n 'Each page should have exactly one <h1>. Pass `as=\"h2\"` when PageTitle ' +\n 'is not the primary page heading.',\n );\n }\n }\n }, [as]);\n\n const classes = cn(pageTitleHeadingVariants({ variant }), className);\n const props = {\n ref,\n id,\n className: classes,\n 'data-testid': testId ?? 'page-title-heading',\n };\n\n if (as === 'h2') return <h2 {...props}>{children}</h2>;\n if (as === 'h3') return <h3 {...props}>{children}</h3>;\n return <h1 {...props}>{children}</h1>;\n },\n);\n\nPageTitleHeading.displayName = 'PageTitle.Heading';\n","'use client';\n\nimport { forwardRef, type ReactElement } from 'react';\nimport { cn } from '../../utils/cn';\nimport { usePageTitleContext } from './PageTitleContext';\nimport { pageTitleDescriptionVariants } from './PageTitle.styles';\nimport type { PageTitleDescriptionProps } from './PageTitle.types';\n\n/**\n * PageTitle.Description\n *\n * Full-opacity supporting copy below the heading. No `opacity-*` or `/70`\n * modifier — visual hierarchy is weight/size only.\n */\nexport const PageTitleDescription = forwardRef<HTMLParagraphElement, PageTitleDescriptionProps>(\n function PageTitleDescriptionImpl(\n { children, className, id, 'data-testid': testId },\n ref,\n ): ReactElement {\n const { variant } = usePageTitleContext();\n return (\n <p\n ref={ref}\n id={id}\n className={cn(pageTitleDescriptionVariants({ variant }), className)}\n data-testid={testId ?? 'page-title-description'}\n >\n {children}\n </p>\n );\n },\n);\n\nPageTitleDescription.displayName = 'PageTitle.Description';\n","'use client';\n\nimport { forwardRef, type ReactElement } from 'react';\nimport { cn } from '../../utils/cn';\nimport { usePageTitleContext } from './PageTitleContext';\nimport { pageTitleActionsVariants } from './PageTitle.styles';\nimport type { PageTitleActionsProps } from './PageTitle.types';\n\n/**\n * PageTitle.Actions\n *\n * Container for page-level primary actions (typically Themis `Button`s).\n * Actions wrap on narrow viewports so 400%-zoom reflow stays intact.\n *\n * WCAG 2.2 AAA 2.5.8 Target Size — Button children in this slot must be\n * `size=\"md\"` or larger (44×44 minimum). The compound does not enforce this\n * but documents the expectation.\n */\nexport const PageTitleActions = forwardRef<HTMLDivElement, PageTitleActionsProps>(\n function PageTitleActionsImpl(\n { children, className, 'data-testid': testId },\n ref,\n ): ReactElement {\n // Subscribe to context so the guard throws if rendered outside <PageTitle>.\n usePageTitleContext();\n return (\n <div\n ref={ref}\n className={cn(pageTitleActionsVariants(), className)}\n data-testid={testId ?? 'page-title-actions'}\n >\n {children}\n </div>\n );\n },\n);\n\nPageTitleActions.displayName = 'PageTitle.Actions';\n","'use client';\n\nimport { forwardRef, type ReactElement } from 'react';\nimport { cn } from '../../utils/cn';\nimport { usePageTitleContext } from './PageTitleContext';\nimport { pageTitleTabsVariants } from './PageTitle.styles';\nimport type { PageTitleTabsProps } from './PageTitle.types';\n\n/**\n * PageTitle.Tabs\n *\n * Optional tabs region that renders below the title row. Consumers place\n * Themis `<Tabs>` (or any tablist) inside. Renders full-width on all\n * viewports; sits inside the `<header>` landmark so tabs read as part of\n * the page header.\n */\nexport const PageTitleTabs = forwardRef<HTMLDivElement, PageTitleTabsProps>(\n function PageTitleTabsImpl(\n { children, className, 'data-testid': testId },\n ref,\n ): ReactElement {\n usePageTitleContext();\n return (\n <div\n ref={ref}\n className={cn(pageTitleTabsVariants(), className)}\n data-testid={testId ?? 'page-title-tabs'}\n >\n {children}\n </div>\n );\n },\n);\n\nPageTitleTabs.displayName = 'PageTitle.Tabs';\n","'use client';\n\n/**\n * PageTitle — Compound Root\n *\n * Accessible page-level header for listing and landing pages. WCAG 2.2 target.\n *\n * Layout (matches Figma `EOS x Themis v1.1` node 4434:7793):\n * <header>\n * <Breadcrumbs /> {/* optional; full width *\\/}\n * <row>\n * <body>\n * <Heading /> {/* h1 by default *\\/}\n * <Description /> {/* optional; full-opacity *\\/}\n * </body>\n * <Actions /> {/* right on ≥sm, wraps below on mobile *\\/}\n * </row>\n * <Tabs /> {/* optional; full width *\\/}\n * </header>\n *\n * Compound API: children are classified by `displayName` (same pattern as\n * Wizard.Content). Unknown children are dropped into the body below the\n * description so consumers can still inject ad-hoc content when needed.\n *\n * Accessibility\n * - Root is a semantic `<header>`; no `role=\"banner\"` (reserved for the\n * site-level landmark).\n * - `<h1>` by default via `PageTitle.Heading`; override to `h2`/`h3` when\n * the page's primary heading lives elsewhere.\n * - Feature variant applies a foreground-only focus-ring inside\n * breadcrumbs so focus remains visible over the gradient.\n * - Responsive stacking: column on mobile, row on ≥sm. 400% zoom reflow\n * is supported without horizontal scroll.\n * - RTL: gradient direction flips via `rtl:` modifier.\n *\n * Limitations\n * - AAA contrast of the feature gradient depends on the tenant's\n * `--primary` token. A contrast guardrail lives in the theme\n * validator, not here.\n */\n\nimport {\n Children,\n forwardRef,\n isValidElement,\n useMemo,\n type ReactElement,\n type ReactNode,\n} from 'react';\nimport { cn } from '../../utils/cn';\nimport { PageTitleContext, type PageTitleContextValue } from './PageTitleContext';\nimport { PageTitleBreadcrumbs } from './PageTitleBreadcrumbs';\nimport { PageTitleHeading } from './PageTitleHeading';\nimport { PageTitleDescription } from './PageTitleDescription';\nimport { PageTitleActions } from './PageTitleActions';\nimport { PageTitleTabs } from './PageTitleTabs';\nimport {\n pageTitleBodyVariants,\n pageTitleRootVariants,\n pageTitleRowVariants,\n} from './PageTitle.styles';\nimport type { PageTitleProps } from './PageTitle.types';\n\ntype Slot = 'breadcrumbs' | 'heading' | 'description' | 'actions' | 'tabs';\n\nconst SLOT_BY_DISPLAY_NAME: Record<string, Slot> = {\n 'PageTitle.Breadcrumbs': 'breadcrumbs',\n 'PageTitle.Heading': 'heading',\n 'PageTitle.Description': 'description',\n 'PageTitle.Actions': 'actions',\n 'PageTitle.Tabs': 'tabs',\n};\n\ninterface Slots {\n breadcrumbs: ReactNode;\n heading: ReactNode;\n description: ReactNode;\n actions: ReactNode;\n tabs: ReactNode;\n other: ReactNode[];\n}\n\nfunction classifyChildren(children: ReactNode): Slots {\n const slots: Slots = {\n breadcrumbs: null,\n heading: null,\n description: null,\n actions: null,\n tabs: null,\n other: [],\n };\n\n Children.forEach(children, (child) => {\n if (!isValidElement(child)) {\n if (child !== null && child !== undefined && child !== false) {\n slots.other.push(child);\n }\n return;\n }\n const type = child.type as { displayName?: string } | string;\n const displayName = typeof type === 'string' ? undefined : type?.displayName;\n const slot = displayName ? SLOT_BY_DISPLAY_NAME[displayName] : undefined;\n if (slot) {\n slots[slot] = child;\n } else {\n slots.other.push(child);\n }\n });\n\n return slots;\n}\n\nconst PageTitleRoot = forwardRef<HTMLDivElement, PageTitleProps>(function PageTitleRootImpl(\n {\n children,\n variant = 'default',\n className,\n id,\n 'aria-label': ariaLabel,\n 'aria-labelledby': ariaLabelledBy,\n 'data-testid': testId = 'page-title',\n },\n ref,\n): ReactElement {\n const slots = classifyChildren(children);\n\n const contextValue = useMemo<PageTitleContextValue>(() => ({ variant }), [variant]);\n\n return (\n <PageTitleContext.Provider value={contextValue}>\n <div\n ref={ref}\n id={id}\n className={cn(\n pageTitleRootVariants({ variant }),\n // When tabs are present, the full-width tab strip border is the\n // divider — drop the root's own bottom border so they don't double up.\n slots.tabs != null && 'border-b-0',\n className,\n )}\n aria-label={ariaLabel}\n aria-labelledby={ariaLabelledBy}\n data-testid={testId}\n data-page-title-variant={variant}\n >\n {slots.breadcrumbs}\n <div className={pageTitleRowVariants()}>\n <div className={pageTitleBodyVariants()}>\n {slots.heading}\n {slots.description}\n {slots.other}\n </div>\n {slots.actions}\n </div>\n {slots.tabs}\n </div>\n </PageTitleContext.Provider>\n );\n});\n\nPageTitleRoot.displayName = 'PageTitle';\n\n/**\n * PageTitle compound component with dot-syntax sub-components.\n *\n * @example\n * ```tsx\n * <PageTitle variant=\"feature\">\n * <PageTitle.Breadcrumbs\n * items={[\n * { id: 'home', label: 'Dashboard', href: '/' },\n * { id: 'forms', label: 'Forms' },\n * ]}\n * linkComponent={Link}\n * />\n * <PageTitle.Heading>Forms</PageTitle.Heading>\n * <PageTitle.Description>\n * Build and manage reusable forms for applications, interviews, screening,\n * and onboarding.\n * </PageTitle.Description>\n * <PageTitle.Actions>\n * <Button size=\"md\" leadingIcon={<Plus />}>Create Form</Button>\n * </PageTitle.Actions>\n * </PageTitle>\n * ```\n */\nexport const PageTitle = Object.assign(PageTitleRoot, {\n Breadcrumbs: PageTitleBreadcrumbs,\n Heading: PageTitleHeading,\n Description: PageTitleDescription,\n Actions: PageTitleActions,\n Tabs: PageTitleTabs,\n});\n","import { z } from 'zod';\nimport type { ElementType, ReactNode } from 'react';\nimport { BaseComponentPropsSchema } from '../../schemas/BaseComponentProps';\nimport { BreadcrumbItemDataSchema, type BreadcrumbItemData } from '../Breadcrumbs/Breadcrumbs.types';\n\n/**\n * PageTitle variants.\n *\n * - `default` — light card background with dark text. Inner pages, editor contexts.\n * - `feature` — branded gradient background with light text. Top-level landings.\n *\n * Extension policy: add new variants by (1) extending this enum, (2) adding the\n * CVA variant in `PageTitle.styles`, (3) wiring context-aware sub-component\n * classes. Do NOT add visual props (gradient, border, shadow) at the root level\n * — extend through a named variant.\n */\nexport const PageTitleVariantSchema = z.enum(['default', 'feature']);\n\n/**\n * Heading tag override for `PageTitle.Heading`.\n *\n * Default is `h1`. Callers should override to `h2` when `PageTitle` is not the\n * page's primary heading (e.g. inside an editor that owns its own `<h1>`).\n */\nexport const PageTitleHeadingLevelSchema = z.enum(['h1', 'h2', 'h3']);\n\n// =============================================================================\n// Root\n// =============================================================================\n\nexport const PageTitlePropsSchema = BaseComponentPropsSchema.extend({\n children: z.custom<ReactNode>(),\n variant: PageTitleVariantSchema.optional(),\n});\n\nexport interface PageTitleProps {\n children: ReactNode;\n /** Visual treatment. @default \"default\" */\n variant?: 'default' | 'feature';\n className?: string;\n id?: string;\n 'aria-label'?: string;\n 'aria-labelledby'?: string;\n 'data-testid'?: string;\n}\n\n// =============================================================================\n// Heading\n// =============================================================================\n\nexport const PageTitleHeadingPropsSchema = BaseComponentPropsSchema.extend({\n children: z.custom<ReactNode>(),\n as: PageTitleHeadingLevelSchema.optional(),\n});\n\nexport interface PageTitleHeadingProps {\n children: ReactNode;\n /** Heading level. @default \"h1\" */\n as?: 'h1' | 'h2' | 'h3';\n className?: string;\n id?: string;\n 'data-testid'?: string;\n}\n\n// =============================================================================\n// Description\n// =============================================================================\n\nexport const PageTitleDescriptionPropsSchema = BaseComponentPropsSchema.extend({\n children: z.custom<ReactNode>(),\n});\n\nexport interface PageTitleDescriptionProps {\n children: ReactNode;\n className?: string;\n id?: string;\n 'data-testid'?: string;\n}\n\n// =============================================================================\n// Breadcrumbs — items-driven, not free children\n// =============================================================================\n\nexport const PageTitleBreadcrumbsPropsSchema = BaseComponentPropsSchema.extend({\n items: z.array(BreadcrumbItemDataSchema),\n linkComponent: z.custom<ElementType>().optional(),\n});\n\nexport interface PageTitleBreadcrumbsProps {\n items: BreadcrumbItemData[];\n /** Polymorphic link component (e.g. next/link). @default \"a\" */\n linkComponent?: ElementType;\n className?: string;\n 'data-testid'?: string;\n 'aria-label'?: string;\n}\n\n// =============================================================================\n// Actions\n// =============================================================================\n\nexport const PageTitleActionsPropsSchema = BaseComponentPropsSchema.extend({\n children: z.custom<ReactNode>(),\n});\n\nexport interface PageTitleActionsProps {\n children: ReactNode;\n className?: string;\n 'data-testid'?: string;\n}\n\n// =============================================================================\n// Tabs slot\n// =============================================================================\n\nexport const PageTitleTabsPropsSchema = BaseComponentPropsSchema.extend({\n children: z.custom<ReactNode>(),\n});\n\nexport interface PageTitleTabsProps {\n children: ReactNode;\n className?: string;\n 'data-testid'?: string;\n}\n\n// =============================================================================\n// Inferred helper types (safe — these have no .default() fields)\n// =============================================================================\n\nexport type PageTitleVariant = z.infer<typeof PageTitleVariantSchema>;\nexport type PageTitleHeadingLevel = z.infer<typeof PageTitleHeadingLevelSchema>;\n"]}
|
|
1
|
+
{"version":3,"sources":["../../../src/utils/cn.ts","../../../src/elements/PageTitle/PageTitleContext.tsx","../../../src/schemas/BaseComponentProps.ts","../../../src/elements/Breadcrumbs/Breadcrumbs.types.ts","../../../src/utils/browserExtensionOverlay.ts","../../../src/elements/Dropdown/Dropdown.styles.ts","../../../src/elements/Dropdown/Dropdown.tsx","../../../src/elements/Button/Button.styles.ts","../../../src/styles/interaction-states.ts","../../../src/elements/ButtonGroup/ButtonGroupContext.tsx","../../../src/elements/ButtonGroup/ButtonGroup.variants.ts","../../../src/elements/Button/Button.tsx","../../../src/elements/Breadcrumbs/Breadcrumbs.tsx","../../../src/elements/PageTitle/PageTitle.styles.ts","../../../src/elements/PageTitle/PageTitleBreadcrumbs.tsx","../../../src/elements/PageTitle/PageTitleHeading.tsx","../../../src/elements/PageTitle/PageTitleDescription.tsx","../../../src/elements/PageTitle/PageTitleActions.tsx","../../../src/elements/PageTitle/PageTitleTabs.tsx","../../../src/elements/PageTitle/PageTitle.tsx","../../../src/elements/PageTitle/PageTitle.types.ts"],"names":["cn","inputs","twMerge","clsx","PageTitleContext","createContext","usePageTitleContext","ctx","useContext","BaseComponentPropsSchema","z","BreadcrumbItemDataSchema","SeparatorTypeSchema","isExtensionInjectedElement","element","node","depth","tag","root","custom","parent","createInteractOutsideGuard","consumerShouldClose","menuVariants","cva","menuItemVariants","getDisplayName","type","DropdownRoot","forwardRef","defaultOpen","isOpen","onOpenChange","children","_ref","childArray","Children","hasTrigger","child","isValidElement","DropdownTrigger","hasMenu","DropdownMenu","jsx","AriaMenuTrigger","props","ref","cloneElement","AriaButton","align","side","className","placement","AriaPopover","AriaMenu","DropdownItem","onAction","isDisabled","shortcut","icon","iconRight","ariaLabel","isDropdownMenu","hasSubmenu","contentChildren","submenu","jsxs","AriaSubmenuTrigger","AriaMenuItem","ChevronRight","DropdownSeparator","memo","AriaSeparator","DropdownLabel","AriaHeader","Dropdown","buttonOuterVariants","buttonVisualVariants","PRESSED_STYLES","HIGH_CONTRAST_HOVER","HIGH_CONTRAST_PRESSED","ButtonGroupContext","useButtonGroupContext","ButtonGroupItemContext","useButtonGroupItemContext","buttonGroupItemVariants","Button","buttonVisualClassName","variant","size","visualSize","fullWidth","loading","loadingText","paywall","paywallRedirect","paywallDescription","onPress","paywallDescriptionId","useId","groupContext","itemContext","effectiveVariant","effectiveSize","effectiveIsDisabled","isInVerticalGroup","effectiveFullWidth","positionClassName","effectiveVisualSize","e","renderProps","Fragment","Loader2","Zap","breadcrumbsVariants","breadcrumbListVariants","breadcrumbItemVariants","breadcrumbLinkVariants","separatorVariants","ellipsisButtonVariants","isCurrentPage","index","total","getCollapsedItems","items","maxItems","itemsBeforeCollapse","itemsAfterCollapse","before","after","collapsed","BreadcrumbSeparator","separator","BreadcrumbLink","item","isCurrent","LinkComponent","isGroupDisabled","state","BreadcrumbEllipsis","MoreHorizontal","Breadcrumbs","linkComponent","collapsedData","isLast","globalIndex","pageTitleRootVariants","pageTitleRowVariants","pageTitleBodyVariants","pageTitleHeadingVariants","pageTitleDescriptionVariants","pageTitleBreadcrumbsVariants","pageTitleActionsVariants","pageTitleTabsVariants","PageTitleBreadcrumbs","testId","PageTitleHeading","as","id","useEffect","count","classes","PageTitleDescription","PageTitleActions","PageTitleTabs","SLOT_BY_DISPLAY_NAME","classifyChildren","slots","displayName","slot","PageTitleRoot","ariaLabelledBy","contextValue","useMemo","PageTitle","PageTitleVariantSchema","PageTitleHeadingLevelSchema","PageTitlePropsSchema","PageTitleHeadingPropsSchema","PageTitleDescriptionPropsSchema","PageTitleBreadcrumbsPropsSchema","PageTitleActionsPropsSchema","PageTitleTabsPropsSchema"],"mappings":"oTAcO,SAASA,KAAMC,CAAAA,CAA8B,CAClD,OAAOC,qBAAAA,CAAQC,UAAKF,CAAM,CAAC,CAC7B,CCPO,IAAMG,EAAmBC,mBAAAA,CAA4C,IAAI,EAEzE,SAASC,CAAAA,EAA6C,CAC3D,IAAMC,CAAAA,CAAMC,gBAAAA,CAAWJ,CAAgB,EACvC,GAAI,CAACG,EACH,MAAM,IAAI,MAAM,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AA,CAAc,WAAA,KA0BfI,EAAAA,CAAY,MAAA,CAAO,OAAOJ,EAAAA,CAAe,CACpD,YAAahB,CAAAA,CACb,OAAA,CAASE,EACT,WAAA,CAAaM,CAAAA,CACb,QAASC,CAAAA,CACT,IAAA,CAAMC,CACR,CAAC,EChLM,IAAMW,GAAyBrK,KAAAA,CAAE,IAAA,CAAK,CAAC,SAAA,CAAW,SAAS,CAAC,CAAA,CAQtDsK,EAAAA,CAA8BtK,MAAE,IAAA,CAAK,CAAC,KAAM,IAAA,CAAM,IAAI,CAAC,CAAA,CAMvDuK,EAAAA,CAAuBxK,EAAyB,MAAA,CAAO,CAClE,SAAUC,KAAAA,CAAE,MAAA,GACZ,OAAA,CAASqK,EAAAA,CAAuB,UAClC,CAAC,EAiBYG,EAAAA,CAA8BzK,CAAAA,CAAyB,OAAO,CACzE,QAAA,CAAUC,MAAE,MAAA,EAAkB,CAC9B,GAAIsK,EAAAA,CAA4B,QAAA,EAClC,CAAC,CAAA,CAeYG,EAAAA,CAAkC1K,CAAAA,CAAyB,OAAO,CAC7E,QAAA,CAAUC,MAAE,MAAA,EACd,CAAC,CAAA,CAaY0K,EAAAA,CAAkC3K,EAAyB,MAAA,CAAO,CAC7E,MAAOC,KAAAA,CAAE,KAAA,CAAMC,CAAwB,CAAA,CACvC,aAAA,CAAeD,MAAE,MAAA,EAAoB,CAAE,UACzC,CAAC,EAeY2K,EAAAA,CAA8B5K,CAAAA,CAAyB,OAAO,CACzE,QAAA,CAAUC,MAAE,MAAA,EACd,CAAC,CAAA,CAYY4K,EAAAA,CAA2B7K,EAAyB,MAAA,CAAO,CACtE,SAAUC,KAAAA,CAAE,MAAA,EACd,CAAC","file":"index.js","sourcesContent":["/**\n * Class Name Utility\n * Merges Tailwind CSS classes with conflict resolution\n *\n * Combines clsx for conditional classes and tailwind-merge for deduplication\n *\n * @example\n * cn('px-2 py-1', 'px-4') // => 'py-1 px-4' (px-4 overrides px-2)\n * cn('text-red-500', condition && 'text-blue-500') // => conditional application\n */\n\nimport { clsx, type ClassValue } from 'clsx';\nimport { twMerge } from 'tailwind-merge';\n\nexport function cn(...inputs: ClassValue[]): string {\n return twMerge(clsx(inputs));\n}\n","'use client';\n\nimport { createContext, useContext } from 'react';\nimport type { PageTitleVariant } from './PageTitle.types';\n\nexport interface PageTitleContextValue {\n variant: PageTitleVariant;\n}\n\nexport const PageTitleContext = createContext<PageTitleContextValue | null>(null);\n\nexport function usePageTitleContext(): PageTitleContextValue {\n const ctx = useContext(PageTitleContext);\n if (!ctx) {\n throw new Error('PageTitle compound components must be used within <PageTitle>');\n }\n return ctx;\n}\n","import { z } from 'zod';\n\n/**\n * Base props schema for all Themis components\n * Ensures consistent accessibility and styling APIs across the library\n *\n * @see spec.md FR-009 to FR-014 (Accessibility Requirements)\n * @see constitution.md Principle IV (Accessibility First - WCAG 2.2 AA minimum)\n */\nexport const BaseComponentPropsSchema = z.object({\n // Styling\n className: z.string().optional(),\n\n // React\n children: z.any().optional(), // ReactNode not directly supported by Zod\n id: z.string().optional(),\n\n // Accessibility (WCAG 2.2 AA requirements)\n 'aria-label': z.string().optional(),\n 'aria-labelledby': z.string().optional(),\n 'aria-describedby': z.string().optional(),\n 'aria-live': z.enum(['off', 'polite', 'assertive']).optional(),\n 'aria-hidden': z.boolean().optional(),\n\n // Testing & Development\n 'data-testid': z.string().optional(),\n});\n\nexport type BaseComponentProps = z.infer<typeof BaseComponentPropsSchema>;\n","import { z } from 'zod';\nimport { BaseComponentPropsSchema } from '../../schemas/BaseComponentProps';\nimport type { ReactNode, ElementType } from 'react';\n\n/**\n * Breadcrumb Item Data Schema\n * Represents a single item in the breadcrumb trail\n *\n * @see breadcrumbs-prd.md FR-001 (Render Breadcrumbs from Items Array)\n * @see breadcrumbs-prd.md FR-007 (Icon Support)\n * @see plan.md Decision 1 (Array-Based API)\n */\nexport const BreadcrumbItemDataSchema = z.object({\n /** Unique identifier for the breadcrumb item */\n id: z.union([z.string(), z.number()]),\n\n /** Display text for the breadcrumb (required - no icon-only items) */\n label: z.string(),\n\n /** Link URL - omit for non-navigable items */\n href: z.string().optional(),\n\n /** Optional leading icon (ReactNode) */\n icon: z.custom<ReactNode>().optional(),\n\n /** Disable this specific breadcrumb link */\n isDisabled: z.boolean().optional().default(false),\n});\n\nexport interface BreadcrumbItemData {\n id: string | number;\n label: string;\n href?: string;\n icon?: ReactNode;\n isDisabled?: boolean;\n}\n\n/**\n * Separator Type Schema\n * Controls the visual separator between breadcrumb items\n *\n * @see breadcrumbs-prd.md FR-003 (Configurable Separators)\n * @see plan.md Decision 3 (Configurable Separators)\n */\nexport const SeparatorTypeSchema = z.union([\n z.literal('chevron'),\n z.literal('slash'),\n z.custom<ReactNode>(),\n]);\n\nexport type SeparatorType = z.infer<typeof SeparatorTypeSchema>;\n\n/**\n * Breadcrumbs Props Schema\n * Main component props for the Breadcrumbs component\n *\n * @see breadcrumbs-prd.md FR-001 to FR-011 (All Functional Requirements)\n * @see plan.md (All Design Decisions)\n * @see constitution.md Principle IV (Accessibility First)\n */\nexport const BreadcrumbsPropsSchema = BaseComponentPropsSchema.extend({\n /**\n * Array of breadcrumb items to render\n * @see FR-001 (Render Breadcrumbs from Items Array)\n */\n items: z.array(BreadcrumbItemDataSchema),\n\n /**\n * Separator style between items\n * @default 'chevron'\n * @see FR-003 (Configurable Separators)\n */\n separator: SeparatorTypeSchema.optional().default('chevron'),\n\n /**\n * Maximum items to show before collapsing\n * @default 4\n * @see FR-004 (Ellipsis Collapse for Overflow)\n */\n maxItems: z.number().int().positive().optional().default(4),\n\n /**\n * Number of items to show before ellipsis\n * @default 1\n * @see FR-004 (Ellipsis Collapse for Overflow)\n */\n itemsBeforeCollapse: z.number().int().nonnegative().optional().default(1),\n\n /**\n * Number of items to show after ellipsis\n * @default 2\n * @see FR-004 (Ellipsis Collapse for Overflow)\n */\n itemsAfterCollapse: z.number().int().positive().optional().default(2),\n\n /**\n * Custom link component for framework integration (Next.js Link, React Router Link, etc.)\n * @default 'a'\n * @see FR-005 (Polymorphic Link Component)\n */\n linkComponent: z.custom<ElementType>().optional(),\n\n /**\n * Disable all breadcrumb links\n * @default false\n * @see FR-006 (Disabled States)\n */\n isDisabled: z.boolean().optional().default(false),\n});\n\nexport interface BreadcrumbsProps {\n className?: string;\n children?: unknown;\n id?: string;\n 'aria-label'?: string;\n 'aria-labelledby'?: string;\n 'aria-describedby'?: string;\n 'aria-live'?: 'off' | 'polite' | 'assertive';\n 'aria-hidden'?: boolean;\n 'data-testid'?: string;\n items: BreadcrumbItemData[];\n separator?: SeparatorType;\n maxItems?: number;\n itemsBeforeCollapse?: number;\n itemsAfterCollapse?: number;\n linkComponent?: ElementType;\n isDisabled?: boolean;\n}\n\n/**\n * Internal collapsed items structure\n * Used by ellipsis collapse logic\n *\n * @see FR-004 (Ellipsis Collapse for Overflow)\n * @see plan.md Decision 4 (Ellipsis Collapse)\n */\nexport interface CollapsedItems {\n /** Items shown before the ellipsis */\n before: BreadcrumbItemData[];\n /** Items hidden in the dropdown */\n collapsed: BreadcrumbItemData[];\n /** Items shown after the ellipsis */\n after: BreadcrumbItemData[];\n}\n\n/**\n * Internal BreadcrumbLink component props\n * Used by the internal link rendering component\n */\nexport interface BreadcrumbLinkInternalProps {\n item: BreadcrumbItemData;\n isCurrent: boolean;\n linkComponent?: ElementType;\n isGroupDisabled?: boolean;\n}\n\n/**\n * Internal BreadcrumbEllipsis component props\n * Used by the ellipsis dropdown component\n */\nexport interface BreadcrumbEllipsisInternalProps {\n items: BreadcrumbItemData[];\n linkComponent?: ElementType;\n isGroupDisabled?: boolean;\n}\n\n/**\n * Internal BreadcrumbSeparator component props\n * Used by the separator rendering component\n */\nexport interface BreadcrumbSeparatorInternalProps {\n separator: SeparatorType;\n}\n\n/**\n * CVA state type for breadcrumb link variants\n */\nexport type BreadcrumbLinkState = 'default' | 'current' | 'disabled';\n\n/**\n * CVA separator type for separator variants\n */\nexport type SeparatorVariantType = 'chevron' | 'slash' | 'custom';\n","/**\n * Detection + dismissal guard for in-page writing-assistant browser extensions\n * (Grammarly, LanguageTool, Wordtune, …).\n *\n * These extensions inject their suggestion UI as elements appended to `<body>`,\n * outside any open overlay's DOM subtree. React Aria's `isDismissable` behaviour\n * treats a click on that injected UI as an \"outside click\" and dismisses the\n * overlay — so clicking a spelling suggestion silently closes the form pop-up\n * and discards the user's in-progress correction.\n *\n * The guard below lets overlays keep open when the interaction lands on an\n * extension-injected node, while every other outside click, Escape, and the\n * close button behave exactly as before.\n */\n\nconst MAX_ANCESTOR_DEPTH = 100;\n\n/**\n * Returns `true` when `element` belongs to an injected in-page writing\n * assistant (Grammarly, LanguageTool, Wordtune, …).\n *\n * UX-ONLY heuristic. This is a deliberately spoofable DOM sniff used solely to\n * keep a form pop-up open when a writing-assistant suggestion is clicked. It is\n * NOT a security/authorization control and must never gate access to data or\n * actions (the frontend is not a security boundary). Pure function — never log\n * the element (it can reference arbitrary DOM / user content).\n */\nexport function isExtensionInjectedElement(element: Element): boolean {\n if (!(element instanceof Element)) return false;\n\n // 1. Known-vendor markers (authoritative). Walk up via parentElement, and\n // climb shadow boundaries via getRootNode().host so detection still finds\n // the <grammarly-extension> host if React Aria's shadowDOM flag is ever\n // enabled (it defaults to false today → the document-level listener\n // already receives the retargeted host, so the parentElement walk alone\n // suffices currently). Depth-bounded as a defensive guard against a\n // crafted/overridden getRootNode/host returning a cycle (which would\n // otherwise hang the tab — a client-side DoS).\n let node: Element | null = element;\n for (let depth = 0; node && depth < MAX_ANCESTOR_DEPTH; depth++) {\n const tag = node.tagName?.toLowerCase() ?? '';\n if (tag.startsWith('grammarly-')) return true; // Grammarly\n if (tag.startsWith('lt-')) return true; // LanguageTool\n if (node.hasAttribute('data-grammarly-shadow-root')) return true;\n\n if (node.parentElement) {\n node = node.parentElement;\n } else {\n const root = node.getRootNode();\n node = root instanceof ShadowRoot ? root.host : null;\n }\n }\n\n // 2. Structural fallback (best-effort, future-proofs the long tail).\n // Extensions inject their UI as a custom element (hyphenated tag name)\n // mounted as a top-level sibling of the React root — i.e. a direct child\n // of <body>/<html>. Our app never renders body-level custom elements, and\n // React Aria portals render plain <div>s, so this stays safe for any\n // future first-party web component nested inside the app tree.\n let custom: Element | null = element;\n while (custom && !custom.tagName.includes('-')) {\n custom = custom.parentElement;\n }\n if (!custom) return false;\n\n const parent = custom.parentElement;\n return parent === document.body || parent === document.documentElement;\n}\n\n/**\n * Builds a `shouldCloseOnInteractOutside` predicate for React Aria overlays\n * that keeps the overlay open when the interaction targets an extension-injected\n * element, while preserving any consumer-supplied predicate.\n *\n * React Aria semantics: the predicate returns `true` ⇒ the overlay should\n * close. So we close only when the element is NOT extension-injected AND the\n * consumer (if any) also agrees it should close.\n */\nexport function createInteractOutsideGuard(\n consumerShouldClose?: (element: Element) => boolean,\n): (element: Element) => boolean {\n return (element: Element): boolean =>\n !isExtensionInjectedElement(element) && (consumerShouldClose?.(element) ?? true);\n}\n","import { cva, type VariantProps } from 'class-variance-authority';\n\n/**\n * Menu variant styles using CVA\n * @see spec.md FR-040 (CVA for variant styling - single \"default\" variant for v1)\n */\nexport const menuVariants = cva(\n // Base styles - semantic tokens with fallbacks\n \"z-50 min-w-[8rem] overflow-hidden rounded-md border border-[var(--menu-border)] bg-[var(--menu-background)] text-[var(--menu-foreground)] p-1\",\n {\n variants: {\n variant: {\n default: \"\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n },\n }\n);\n\n/**\n * Menu Item variant styles using CVA\n * @see spec.md FR-041 (CVA for item states: hover, focus, active, disabled)\n */\nexport const menuItemVariants = cva(\n // Base styles - FR-014: 44x44px minimum touch targets\n \"relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none transition-colors data-[disabled]:pointer-events-none data-[disabled]:opacity-50 min-h-[44px] data-[focused]:bg-[var(--menu-accent)] data-[focused]:text-[var(--menu-accent-foreground)] data-[pressed]:bg-[var(--menu-accent)] [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0\",\n {\n variants: {\n variant: {\n default: \"\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n },\n }\n);\n\n/**\n * Type exports for variant props\n * Allows TypeScript inference of variant combinations\n */\nexport type MenuVariantProps = VariantProps<typeof menuVariants>;\nexport type MenuItemVariantProps = VariantProps<typeof menuItemVariants>;\n","\"use client\";\n\n/**\n * Dropdown Menu Component\n * Accessible dropdown menu with React Aria primitives, nested submenus, and CVA styling\n *\n * @see spec.md FR-001 to FR-054 (Dropdown Component Requirements)\n * @see spec.md FR-009 (WCAG 2.2 AAA - 7:1 contrast ratio)\n * @see spec.md FR-014 (44x44px minimum touch targets)\n * @see constitution.md Principle IV (Accessibility First)\n */\n\nimport { forwardRef, memo, Children, isValidElement, type ReactNode, type ReactElement, cloneElement, type ComponentType } from 'react';\nimport type { Placement } from 'react-aria';\nimport {\n MenuTrigger as AriaMenuTrigger,\n SubmenuTrigger as AriaSubmenuTrigger,\n Button as AriaButton,\n Menu as AriaMenu,\n MenuItem as AriaMenuItem,\n Separator as AriaSeparator,\n Header as AriaHeader,\n Popover as AriaPopover,\n} from 'react-aria-components';\nimport { ChevronRight } from 'lucide-react';\nimport { cn } from '../../utils/cn';\nimport { createInteractOutsideGuard } from '../../utils/browserExtensionOverlay';\nimport { menuVariants, menuItemVariants } from './Dropdown.styles';\nimport type {\n DropdownProps,\n DropdownTriggerProps,\n DropdownMenuProps,\n DropdownItemProps,\n DropdownSeparatorProps,\n DropdownLabelProps,\n} from './Dropdown.types';\n\n/**\n * Type-safe helper to get displayName from a component type.\n */\nfunction getDisplayName(type: unknown): string | undefined {\n if (typeof type === 'function' || typeof type === 'object') {\n return (type as ComponentType)?.displayName;\n }\n return undefined;\n}\n\n/**\n * Dropdown Root Component\n * Manages open/close state and coordinates Trigger and Menu children\n *\n * @see spec.md FR-001 to FR-007\n */\ninterface InternalDropdownProps extends DropdownProps {\n children: ReactNode;\n}\n\nconst DropdownRoot = forwardRef<HTMLDivElement, InternalDropdownProps>(\n ({ defaultOpen = false, isOpen, onOpenChange, children }, _ref) => {\n // Validate children structure in development only\n if (process.env.NODE_ENV !== 'production') {\n const childArray = Children.toArray(children);\n const hasTrigger = childArray.some(\n (child) =>\n isValidElement(child) &&\n (child.type === DropdownTrigger || getDisplayName(child.type) === 'DropdownTrigger')\n );\n const hasMenu = childArray.some(\n (child) =>\n isValidElement(child) &&\n (child.type === DropdownMenu || getDisplayName(child.type) === 'DropdownMenu')\n );\n\n if (!hasTrigger || !hasMenu) {\n throw new Error(\n 'Dropdown requires exactly one Dropdown.Trigger and one Dropdown.Menu as children'\n );\n }\n }\n\n return (\n <AriaMenuTrigger defaultOpen={defaultOpen} isOpen={isOpen} onOpenChange={onOpenChange}>\n {children}\n </AriaMenuTrigger>\n );\n }\n);\n\nDropdownRoot.displayName = 'Dropdown';\n\n/**\n * Dropdown.Trigger Component\n * Wraps trigger element (typically Button) with proper ARIA attributes\n *\n * @see spec.md FR-008 to FR-012\n */\nconst DropdownTrigger = forwardRef<HTMLButtonElement, DropdownTriggerProps>(\n ({ children, ...props }, ref) => {\n // Clone child to forward props. Note: NO `slot: 'trigger'` here —\n // `MenuTrigger` (the parent provider) injects its press behaviour into\n // the child Button via the default ButtonContext slot, not a named\n // 'trigger' slot. Adding `slot=\"trigger\"` worked in older react-aria-\n // components but 1.17+ strict-validates slots and throws\n // `Invalid slot \"trigger\". Valid slot names are \"close\".` when the\n // Dropdown is rendered inside a Dialog/Modal subtree.\n //\n // The Disclosure pattern (see Accordion.tsx) DOES require\n // `slot=\"trigger\"` — that's a different react-aria contract where\n // Disclosure's context exposes a named `trigger` slot.\n if (isValidElement(children)) {\n return cloneElement(children as ReactElement<Record<string, unknown>>, props);\n }\n\n // Fallback: wrap in AriaButton if not a React element\n return (\n <AriaButton ref={ref} {...props}>\n {children}\n </AriaButton>\n );\n }\n);\n\nDropdownTrigger.displayName = 'DropdownTrigger';\n\n/**\n * Dropdown.Menu Component\n * Renders menu with positioning, collision detection, and focus management\n *\n * @see spec.md FR-014 to FR-024\n */\nconst DropdownMenu = forwardRef<HTMLDivElement, DropdownMenuProps>(\n ({ align = 'start', side = 'bottom', className, children, ...props }, _ref) => {\n // Map align to React Aria placement\n const placement = `${side} ${align}` as Placement;\n\n return (\n <AriaPopover\n placement={placement}\n shouldCloseOnInteractOutside={createInteractOutsideGuard()}\n className=\"data-[entering]:motion-safe:animate-in data-[entering]:motion-safe:fade-in-0 data-[entering]:motion-safe:slide-in-from-top-2 data-[entering]:[animation-duration:250ms] data-[entering]:[animation-timing-function:cubic-bezier(0.16,1,0.3,1)] data-[exiting]:motion-safe:animate-out data-[exiting]:motion-safe:fade-out-0 data-[exiting]:motion-safe:slide-out-to-top-2 data-[exiting]:[animation-duration:150ms]\"\n >\n <AriaMenu\n className={cn(menuVariants({ variant: 'default' }), className)}\n {...props}\n >\n {children}\n </AriaMenu>\n </AriaPopover>\n );\n }\n);\n\nDropdownMenu.displayName = 'DropdownMenu';\n\n/**\n * Dropdown.Item Component\n * Menu item with action callbacks, disabled state, shortcuts, icons, and nested submenu support\n *\n * @see spec.md FR-025 to FR-034\n */\nconst DropdownItem = forwardRef<HTMLDivElement, DropdownItemProps>(\n (\n {\n children,\n onAction,\n isDisabled = false,\n shortcut,\n icon,\n iconRight,\n className,\n 'aria-label': ariaLabel,\n ...props\n },\n _ref\n ) => {\n // Check if this item contains a nested submenu\n const childArray = Children.toArray(children);\n const isDropdownMenu = (child: unknown): boolean =>\n isValidElement(child) &&\n (child.type === DropdownMenu || getDisplayName(child.type) === 'DropdownMenu');\n\n const hasSubmenu = childArray.some(isDropdownMenu);\n\n // Filter children to separate submenu from content\n const contentChildren = childArray.filter((child) => !isDropdownMenu(child));\n\n const submenu = childArray.find(isDropdownMenu);\n\n if (hasSubmenu && submenu) {\n // Render as submenu trigger using React Aria's SubmenuTrigger\n return (\n <AriaSubmenuTrigger>\n <AriaMenuItem\n aria-label={ariaLabel}\n className={cn(menuItemVariants({ variant: 'default' }), className)}\n {...props}\n >\n {icon && <span className=\"mr-2\">{icon}</span>}\n <span className=\"flex-1\">{contentChildren}</span>\n <ChevronRight className=\"ml-auto h-4 w-4\" aria-hidden=\"true\" />\n </AriaMenuItem>\n {submenu as ReactElement}\n </AriaSubmenuTrigger>\n );\n }\n\n // Regular menu item\n return (\n <AriaMenuItem\n onAction={onAction}\n isDisabled={isDisabled}\n aria-label={ariaLabel}\n className={cn(menuItemVariants({ variant: 'default' }), className)}\n {...props}\n >\n {icon && <span className=\"mr-2\">{icon}</span>}\n <span className=\"flex-1\">{children}</span>\n {iconRight && <span className=\"ml-auto\">{iconRight}</span>}\n {shortcut && (\n <kbd className=\"ml-auto pointer-events-none inline-flex h-5 select-none items-center gap-1 rounded border border-[var(--border)] bg-[var(--accent-background)] px-1.5 font-mono text-[10px] font-medium text-[var(--menu-muted)] opacity-100\">\n {shortcut}\n </kbd>\n )}\n </AriaMenuItem>\n );\n }\n);\n\nDropdownItem.displayName = 'DropdownItem';\n\n/**\n * Dropdown.Separator Component\n * Non-focusable visual divider\n *\n * @see spec.md FR-043 to FR-045\n */\nconst DropdownSeparator = memo(forwardRef<HTMLDivElement, DropdownSeparatorProps>(\n ({ className, ...props }, _ref) => {\n return (\n <AriaSeparator\n className={cn(\n '-mx-1 my-1 h-px bg-[var(--accent-background)]',\n className\n )}\n {...props}\n />\n );\n }\n));\n\nDropdownSeparator.displayName = 'DropdownSeparator';\n\n/**\n * Dropdown.Label Component\n * Non-interactive section header\n *\n * @see spec.md FR-046 to FR-048\n */\nconst DropdownLabel = memo(forwardRef<HTMLDivElement, DropdownLabelProps>(\n ({ children, className, ...props }, _ref) => {\n return (\n <AriaHeader\n className={cn(\n 'px-2 py-1.5 text-sm font-semibold text-[var(--menu-muted)]',\n className\n )}\n {...props}\n >\n {children}\n </AriaHeader>\n );\n }\n));\n\nDropdownLabel.displayName = 'DropdownLabel';\n\n/**\n * Export compound component via Object.assign for backwards compatibility.\n * Enables `<Dropdown.Trigger>`, `<Dropdown.Menu>`, etc.\n *\n * @deprecated v2 — Remove Object.assign pattern in favour of direct named exports\n * (DropdownTrigger, DropdownMenu, DropdownItem, DropdownSeparator, DropdownLabel)\n * for better tree-shaking. See named exports below.\n */\nexport const Dropdown = Object.assign(DropdownRoot, {\n Trigger: DropdownTrigger,\n Menu: DropdownMenu,\n Item: DropdownItem,\n Separator: DropdownSeparator,\n Label: DropdownLabel,\n});\n\n// Export individual components for flexibility\nexport { DropdownTrigger, DropdownMenu, DropdownItem, DropdownSeparator, DropdownLabel };\n\n// Export variant functions for external use\nexport { menuVariants, menuItemVariants };\n\n// Export types\nexport type {\n DropdownProps,\n DropdownTriggerProps,\n DropdownMenuProps,\n DropdownItemProps,\n DropdownSeparatorProps,\n DropdownLabelProps,\n};\n","import { cva } from 'class-variance-authority';\n\n/**\n * Layer 1: Transparent outer touch target (44x44px minimum)\n * Handles WCAG 2.2 AAA touch target requirement\n * Always transparent, centers the visual button inside\n * IMPORTANT: Focus ring stays on Layer 1 for AAA compliance (2.4.13)\n *\n * In vertical ButtonGroups, uses items-stretch so the visual layer (Layer 2)\n * can fill the full touch target height, eliminating gaps between buttons.\n */\nexport const buttonOuterVariants = cva(\n \"inline-flex justify-center min-h-[44px] min-w-[44px] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--ring)] focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:pointer-events-none disabled:opacity-50\",\n {\n variants: {\n fullWidth: {\n true: \"w-full\",\n false: \"\",\n },\n inVerticalGroup: {\n true: \"items-stretch\",\n false: \"items-center\",\n },\n },\n defaultVariants: {\n fullWidth: false,\n inVerticalGroup: false,\n },\n }\n);\n\n/**\n * Layer 2: Visual button appearance (adjustable size)\n * Provides the visual appearance with configurable size\n * Can be smaller than touch target for use cases like carousel dots\n * NOTE: NO focus-visible styles here - focus ring is on Layer 1\n */\nexport const buttonVisualVariants = cva(\n \"inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-normal ring-offset-background motion-safe:transition-transform motion-safe:duration-200 motion-safe:[transition-timing-function:cubic-bezier(0.34,1.56,0.64,1)] motion-reduce:transition-none [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 relative cursor-pointer\",\n {\n variants: {\n variant: {\n default:\n \"bg-[var(--primary-action)] text-[var(--primary-action-foreground)] shadow-md hover:bg-[var(--primary-action-hover)] hover:-translate-y-1\",\n destructive:\n \"bg-[var(--destructive-background)] text-[var(--destructive-foreground)] hover:bg-[var(--destructive-background-hover,var(--destructive-background))] motion-safe:hover:btn-warn-shake\",\n outline:\n \"border border-[var(--input-border)] bg-[var(--content-background)] hover:bg-[var(--accent-background)]/50\",\n secondary:\n \"bg-[var(--secondary)] text-[var(--secondary-foreground)] hover:bg-[var(--secondary-hover,var(--secondary))]\",\n ghost:\n \"hover:bg-[var(--accent)] hover:text-[var(--accent-foreground)]\",\n link: \"text-[var(--text-link)] underline underline-offset-4 hover:bg-[var(--accent)] hover:text-[var(--text-link-hover)]\",\n },\n fullWidth: {\n true: \"w-full\",\n false: \"\",\n },\n visualSize: {\n default: \"h-10 px-4 py-2\",\n sm: \"h-9 rounded-md px-3 text-xs\",\n lg: \"h-11 rounded-md px-6 text-base\",\n icon: \"h-10 w-10\",\n dot: \"h-5 w-5 rounded-full p-0 min-h-0 min-w-0\",\n },\n paywall: {\n true: \"!bg-[var(--paywall)] !text-[var(--paywall-foreground)] hover:!bg-[var(--paywall)]/90 !cursor-not-allowed !border-transparent\",\n false: \"\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n visualSize: \"default\",\n paywall: false,\n },\n }\n);\n\n/**\n * @deprecated Use buttonVisualVariants instead. This alias is kept for backward compatibility.\n */\nexport const buttonVariants = buttonVisualVariants;\n","/**\n * Global Interaction State Styles\n *\n * Consistent interaction patterns across all Themis components.\n * These styles ensure WCAG 2.2 AAA compliance and predictable UX.\n *\n * @see spec.md FR-010 (Visible focus ring for keyboard navigation)\n * @see spec.md FR-031 (Pressed state feedback)\n * @see spec.md FR-012 (High contrast mode support)\n * @see constitution.md Principle IV (Accessibility First)\n */\n\n/**\n * Focus state styles (FR-010)\n * Visible focus ring for keyboard navigation - WCAG 2.2 Level AAA\n *\n * Components can override by extending these styles:\n * @example\n * cn(FOCUS_STYLES, \"ring-4\") // Increases ring width to 4px\n */\nexport const FOCUS_STYLES = \"data-[focus-visible]:ring-2 data-[focus-visible]:ring-[var(--themis-ring)] data-[focus-visible]:ring-offset-2\";\n\n/**\n * Pressed/Active state styles (FR-031)\n * Visual feedback for press interactions\n *\n * Components can override the scale amount:\n * @example\n * cn(PRESSED_STYLES_BASE, \"data-[pressed]:scale-[0.95]\") // More pronounced scale\n */\nexport const PRESSED_STYLES = \"data-[pressed]:scale-[0.97]\";\n\n/**\n * Base pressed styles without scale (for components that need different feedback)\n */\nexport const PRESSED_STYLES_BASE = \"data-[pressed]:transition-transform data-[pressed]:duration-100\";\n\n/**\n * Hover state styles\n * Elevation change on hover for better affordance\n *\n * Components can override shadow depth:\n * @example\n * cn(HOVER_STYLES_BASE, \"data-[hovered]:shadow-lg\") // Larger shadow\n */\nexport const HOVER_STYLES = \"\";\n\n/**\n * Base hover styles without shadow (for components that use different hover effects)\n */\nexport const HOVER_STYLES_BASE = \"data-[hovered]:transition-shadow data-[hovered]:duration-200\";\n\n/**\n * High contrast mode focus (FR-012)\n * Enhanced outlines for users requiring high contrast\n *\n * Uses 'hc:' prefix for prefers-contrast: more media query\n */\nexport const HIGH_CONTRAST_FOCUS = \"hc:data-[focus-visible]:outline hc:data-[focus-visible]:outline-4 hc:data-[focus-visible]:outline-offset-2 hc:data-[focus-visible]:outline-foreground\";\n\n/**\n * High contrast mode hover (FR-012)\n * Enhanced outlines for hover in high contrast mode\n */\nexport const HIGH_CONTRAST_HOVER = \"hc:data-[hovered]:outline hc:data-[hovered]:outline-2 hc:data-[hovered]:outline-foreground\";\n\n/**\n * High contrast mode pressed state\n * Enhanced outlines for pressed state in high contrast mode\n */\nexport const HIGH_CONTRAST_PRESSED = \"hc:data-[pressed]:outline hc:data-[pressed]:outline-2 hc:data-[pressed]:outline-offset-1 hc:data-[pressed]:outline-foreground\";\n\n/**\n * Combined high contrast styles\n * Use this for components that need all high contrast interaction states\n */\nexport const HIGH_CONTRAST_INTERACTIONS = `${HIGH_CONTRAST_FOCUS} ${HIGH_CONTRAST_HOVER} ${HIGH_CONTRAST_PRESSED}`;\n\n/**\n * Disabled state styles\n * Consistent disabled appearance across all components\n */\nexport const DISABLED_STYLES = \"disabled:pointer-events-none disabled:opacity-50\";\n\n/**\n * Default interaction bundle\n * Most common combination for interactive components\n *\n * Includes: focus ring, pressed scale, hover shadow, high contrast enhancements\n *\n * @example\n * <button className={cn(DEFAULT_INTERACTIONS, \"bg-primary\")}>Click</button>\n */\nexport const DEFAULT_INTERACTIONS = `${FOCUS_STYLES} ${PRESSED_STYLES} ${HOVER_STYLES} ${HIGH_CONTRAST_FOCUS} ${HIGH_CONTRAST_HOVER} ${HIGH_CONTRAST_PRESSED}`;\n\n/**\n * Subtle interaction bundle\n * For components that need less pronounced feedback\n *\n * Includes: focus ring and high contrast, but no hover shadow or pressed scale\n */\nexport const SUBTLE_INTERACTIONS = `${FOCUS_STYLES} ${HIGH_CONTRAST_FOCUS}`;\n\n/**\n * Non-interactive element styles\n * For elements that should indicate they are not interactive\n */\nexport const NON_INTERACTIVE = \"cursor-default select-none\";\n","\"use client\";\n\nimport { createContext, useContext } from 'react';\nimport type {\n ButtonGroupContextValue,\n ButtonGroupItemContextValue,\n} from './ButtonGroup.types';\n\n/**\n * ButtonGroup Context System (Two-Level)\n *\n * Provides a two-level context pattern for ButtonGroup:\n *\n * 1. ButtonGroupContext (group-level):\n * - Provides: orientation, variant, size, isDisabled\n * - Consumed by: Button (for prop inheritance), Separator (for orientation)\n *\n * 2. ButtonGroupItemContext (item-level):\n * - Provides: position ('first' | 'middle' | 'last' | 'only')\n * - Consumed by: Button (for border-radius styling)\n *\n * Both contexts return null when not in a provider, allowing Button\n * to work standalone without any group context.\n *\n * @see plan.md for architecture details\n * @see ButtonGroup.tsx for Provider implementation\n */\n\n// =============================================================================\n// Group-Level Context\n// =============================================================================\n\n/**\n * Context for group-level props (orientation, variant, size, isDisabled)\n * Default value is null to indicate \"not in a group\"\n */\nconst ButtonGroupContext = createContext<ButtonGroupContextValue | null>(null);\n\nButtonGroupContext.displayName = 'ButtonGroupContext';\n\n/**\n * Hook to access group-level context\n * @returns ButtonGroupContextValue if inside a ButtonGroup, null otherwise\n */\nexport function useButtonGroupContext(): ButtonGroupContextValue | null {\n return useContext(ButtonGroupContext);\n}\n\n// =============================================================================\n// Item-Level Context\n// =============================================================================\n\n/**\n * Context for per-button position information\n * Default value is null to indicate \"not wrapped with position context\"\n */\nconst ButtonGroupItemContext =\n createContext<ButtonGroupItemContextValue | null>(null);\n\nButtonGroupItemContext.displayName = 'ButtonGroupItemContext';\n\n/**\n * Hook to access item-level context (position)\n * @returns ButtonGroupItemContextValue if wrapped with position context, null otherwise\n */\nexport function useButtonGroupItemContext(): ButtonGroupItemContextValue | null {\n return useContext(ButtonGroupItemContext);\n}\n\n// =============================================================================\n// Exports\n// =============================================================================\n\nexport { ButtonGroupContext, ButtonGroupItemContext };\n","import { cva } from 'class-variance-authority';\n\n/**\n * ButtonGroup CVA Variants\n *\n * Defines Class Variance Authority (CVA) variants for:\n * - ButtonGroup container (orientation-based layout)\n * - ButtonGroupItem (position-based border-radius)\n * - ButtonGroupSeparator (orientation-based styling)\n *\n * @see plan.md Phase 1: Design & Contracts - CVA Variants\n * @see constitution.md Principle V (Component Quality Standards)\n */\n\n// =============================================================================\n// Container Variants\n// =============================================================================\n\n/**\n * ButtonGroup container variants\n * Controls the layout direction based on orientation\n * Uses gap-0 to ensure buttons are connected (share borders)\n */\nexport const buttonGroupVariants = cva('inline-flex items-center gap-0', {\n variants: {\n orientation: {\n horizontal: 'flex-row',\n vertical: 'flex-col w-full',\n },\n },\n defaultVariants: {\n orientation: 'horizontal',\n },\n});\n\n// =============================================================================\n// Item Position Variants\n// =============================================================================\n\n/**\n * ButtonGroupItem position variants\n * Applied to Button's visual layer (Layer 2) for position-aware border-radius\n *\n * Compound variants handle both orientation and position combinations:\n * - Horizontal: left/right borders and radii\n * - Vertical: top/bottom borders and radii\n */\nexport const buttonGroupItemVariants = cva('', {\n variants: {\n orientation: {\n // min-w-[44px] ensures visual layer fills touch target width (for icon buttons)\n horizontal: 'min-w-[44px]',\n // flex (overrides inline-flex) + min-h-[44px] makes visual layer fill touch target,\n // eliminating gaps between stacked buttons in vertical orientation\n vertical: 'flex min-h-[44px]',\n },\n position: {\n first: '',\n middle: '',\n last: '',\n only: '', // Single button - no modifications needed\n },\n },\n compoundVariants: [\n // ==========================================================================\n // Horizontal Orientation\n // ==========================================================================\n {\n orientation: 'horizontal',\n position: 'first',\n className: 'rounded-r-none border-r-0',\n },\n {\n orientation: 'horizontal',\n position: 'middle',\n className: 'rounded-none border-r-0',\n },\n {\n orientation: 'horizontal',\n position: 'last',\n className: 'rounded-l-none',\n },\n // ==========================================================================\n // Vertical Orientation\n // Note: w-full is handled by Button's effectiveFullWidth for both layers\n // ==========================================================================\n {\n orientation: 'vertical',\n position: 'first',\n className: 'rounded-b-none border-b-0',\n },\n {\n orientation: 'vertical',\n position: 'middle',\n className: 'rounded-none border-b-0',\n },\n {\n orientation: 'vertical',\n position: 'last',\n className: 'rounded-t-none',\n },\n ],\n defaultVariants: {\n orientation: 'horizontal',\n position: 'only',\n },\n});\n\n// =============================================================================\n// Separator Variants\n// =============================================================================\n\n/**\n * ButtonGroupSeparator variants\n * Orientation-aware visual divider between button groups\n */\nexport const buttonGroupSeparatorVariants = cva('bg-[var(--border)]', {\n variants: {\n orientation: {\n horizontal: 'w-px h-6 mx-1',\n vertical: 'h-px w-full my-1',\n },\n },\n defaultVariants: {\n orientation: 'horizontal',\n },\n});\n","\"use client\";\n\n/**\n * Button Component - 3-Layer Architecture\n * Accessible button with React Aria primitives and CVA styling\n *\n * Architecture:\n * - Layer 1: Touch Target (44x44px WCAG AAA compliant, transparent)\n * - Layer 2: Visual Button (configurable size, colors, borders)\n * - Layer 3: Content & Effects (text, icons, ripple, loading spinner)\n *\n * @see 3layer-plan.md for architecture details\n * @see spec.md FR-029 to FR-037 (Button Component Requirements)\n * @see spec.md FR-009 (WCAG 2.2 AAA - 7:1 contrast ratio)\n * @see spec.md FR-014 (44x44px minimum touch targets)\n * @see constitution.md Principle IV (Accessibility First)\n */\n\nimport { forwardRef, memo, useId } from 'react';\nimport {\n Button as AriaButton,\n type ButtonProps as AriaButtonProps,\n} from 'react-aria-components';\nimport { Loader2, Zap } from 'lucide-react';\nimport { cn } from '../../utils/cn';\nimport type { ButtonProps } from './Button.types';\nimport { buttonOuterVariants, buttonVisualVariants, buttonVariants } from './Button.styles';\nimport { PRESSED_STYLES, HOVER_STYLES, HIGH_CONTRAST_HOVER, HIGH_CONTRAST_PRESSED } from '../../styles/interaction-states';\nimport {\n useButtonGroupContext,\n useButtonGroupItemContext,\n} from '../ButtonGroup/ButtonGroupContext';\nimport { buttonGroupItemVariants } from '../ButtonGroup/ButtonGroup.variants';\n\n/**\n * Button Component - 3-Layer Architecture\n * Fully accessible button with React Aria and themed styling\n *\n * Layer 1: Touch Target (AriaButton) - 44x44px WCAG AAA compliant\n * Layer 2: Visual Button (span) - configurable appearance\n * Layer 3: Content (children) - text, icons, effects\n */\nconst Button = memo(forwardRef<HTMLButtonElement, ButtonProps>(\n (\n {\n className,\n buttonVisualClassName,\n variant,\n size,\n visualSize,\n fullWidth,\n loading = false,\n loadingText = \"Loading...\",\n shortcut,\n children,\n isDisabled,\n paywall = false,\n paywallRedirect,\n paywallDescription,\n onPress,\n ...props\n },\n ref\n ) => {\n const paywallDescriptionId = useId();\n\n // ==========================================================================\n // ButtonGroup Context Integration\n // ==========================================================================\n\n // Consume group-level context (variant, size, isDisabled, orientation)\n const groupContext = useButtonGroupContext();\n\n // Consume item-level context (position for border-radius styling)\n const itemContext = useButtonGroupItemContext();\n\n // Merge context values with props (props take precedence)\n const effectiveVariant = variant ?? groupContext?.variant ?? 'default';\n const effectiveSize = size ?? groupContext?.size;\n const effectiveIsDisabled = isDisabled ?? groupContext?.isDisabled ?? false;\n\n // In vertical groups, buttons should be full width automatically\n const isInVerticalGroup = groupContext?.orientation === 'vertical';\n const effectiveFullWidth = fullWidth || isInVerticalGroup;\n\n // Position styling for ButtonGroup (only applied when in a group)\n const positionClassName = itemContext\n ? buttonGroupItemVariants({\n orientation: groupContext?.orientation ?? 'horizontal',\n position: itemContext.position,\n })\n : '';\n\n // Default visualSize to size for backward compatibility\n const effectiveVisualSize = visualSize ?? effectiveSize ?? 'default';\n\n // AAA Accessibility: Warn in dev/test if icon/dot variant lacks accessible name\n if (process.env.NODE_ENV !== 'production') {\n if (\n (effectiveVisualSize === 'dot' || effectiveVisualSize === 'icon') &&\n !props['aria-label'] &&\n !children\n ) {\n console.warn(\n '[Button] visualSize=\"dot\" or \"icon\" requires aria-label when no visible text is provided (WCAG 1.1.1)'\n );\n }\n }\n\n /**\n * Handle button press - intercepts action when paywalled\n * If paywalled with redirect URL, opens in new tab\n * Otherwise, calls the normal onPress handler\n */\n const handlePress = (e: Parameters<NonNullable<AriaButtonProps['onPress']>>[0]): void => {\n if (paywall) {\n if (paywallRedirect) {\n window.open(paywallRedirect, '_blank', 'noopener,noreferrer');\n }\n // Don't call onPress when paywalled\n return;\n }\n onPress?.(e);\n };\n\n // Only set isDisabled when we have a reason to disable\n // Otherwise, let slot system control disabled state (e.g., in NumberField)\n const computedIsDisabled = effectiveIsDisabled || loading || undefined;\n\n return (\n <AriaButton\n ref={ref}\n isDisabled={computedIsDisabled}\n aria-disabled={paywall ? true : undefined}\n aria-describedby={paywall ? paywallDescriptionId : undefined}\n onPress={handlePress}\n className={cn(buttonOuterVariants({ fullWidth: effectiveFullWidth, inVerticalGroup: isInVerticalGroup }), className)}\n {...props}\n >\n {(renderProps) => (\n /* Layer 2: Visual Button */\n <span\n className={cn(\n buttonVisualVariants({\n variant: effectiveVariant,\n visualSize: effectiveVisualSize,\n paywall,\n fullWidth: effectiveFullWidth,\n }),\n // Position styling from ButtonGroup context (border-radius adjustments)\n positionClassName,\n buttonVisualClassName,\n // Layer 2 interaction styles (no focus - focus ring is on Layer 1)\n PRESSED_STYLES,\n HOVER_STYLES,\n HIGH_CONTRAST_HOVER,\n HIGH_CONTRAST_PRESSED\n )}\n data-pressed={renderProps.isPressed || undefined}\n >\n {/* Layer 3: Content & Effects */}\n\n {/* FR-033: Loading spinner with screen reader announcement */}\n {/* Uses motion-safe: for WCAG 2.3.3 AAA (Animation from Interactions) */}\n {loading && (\n <>\n <Loader2 className=\"motion-safe:animate-spin\" aria-hidden=\"true\" />\n <span className=\"sr-only\" aria-live=\"polite\">\n {loadingText}\n </span>\n </>\n )}\n\n {/* Hide children during loading */}\n {!loading && children}\n\n {/* Paywall: Lightning bolt icon */}\n {paywall && (\n <Zap\n data-testid=\"zap-icon\"\n aria-hidden=\"true\"\n className=\"ml-1\"\n />\n )}\n\n {/* Paywall: Screen reader description */}\n {paywall && (\n <span id={paywallDescriptionId} className=\"sr-only\">\n Premium feature: {paywallDescription || \"Upgrade required to access this feature\"}\n </span>\n )}\n\n {/* FR-034: Keyboard shortcut display on focus */}\n {renderProps.isFocusVisible && shortcut && (\n <kbd className=\"ml-auto hidden text-xs opacity-60 lg:inline\">\n {shortcut}\n </kbd>\n )}\n\n </span>\n )}\n </AriaButton>\n );\n }\n));\n\nButton.displayName = \"Button\";\n\nexport { Button, buttonVariants, buttonOuterVariants, buttonVisualVariants };\nexport type { ButtonProps } from './Button.types';\n","\"use client\";\n\n/**\n * Breadcrumbs Component\n * Accessible breadcrumb navigation with array-based API and ellipsis collapse\n *\n * @see breadcrumbs-prd.md FR-001 to FR-011 (Breadcrumbs Component Requirements)\n * @see breadcrumbs-prd.md FR-009 (WCAG 2.2 AAA - 7:1 contrast ratio)\n * @see breadcrumbs-prd.md FR-008 (44x44px minimum touch targets)\n * @see constitution.md Principle IV (Accessibility First)\n */\n\nimport { forwardRef, Fragment, type ElementType, type ReactNode } from 'react';\nimport { cva } from 'class-variance-authority';\nimport { ChevronRight, MoreHorizontal } from 'lucide-react';\nimport { cn } from '../../utils/cn';\nimport { Dropdown } from '../Dropdown';\nimport { Button } from '../Button';\nimport type {\n BreadcrumbsProps,\n BreadcrumbItemData,\n SeparatorType,\n CollapsedItems,\n BreadcrumbLinkState,\n} from './Breadcrumbs.types';\n\n// ============================================================================\n// CVA Variants (Task 3.1)\n// ============================================================================\n\n/**\n * Root container styling\n * @see plan.md CVA Variants Structure - breadcrumbsVariants\n */\nexport const breadcrumbsVariants = cva(\"flex items-center flex-wrap\", {\n variants: {},\n defaultVariants: {},\n});\n\n/**\n * Ordered list styling\n * @see plan.md CVA Variants Structure - breadcrumbListVariants\n */\nexport const breadcrumbListVariants = cva(\n \"flex flex-wrap items-center gap-1 break-words text-sm text-[var(--menu-muted)]\",\n {\n variants: {},\n defaultVariants: {},\n }\n);\n\n/**\n * Individual list item styling\n * @see plan.md CVA Variants Structure - breadcrumbItemVariants\n */\nexport const breadcrumbItemVariants = cva(\"inline-flex items-center gap-1\", {\n variants: {},\n defaultVariants: {},\n});\n\n/**\n * Link/span styling based on state\n * @see plan.md CVA Variants Structure - breadcrumbLinkVariants\n * @see FR-008 (44x44px minimum touch targets)\n */\nexport const breadcrumbLinkVariants = cva(\n \"inline-flex items-center gap-2 min-h-[44px] pr-2 rounded-sm transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--ring)] focus-visible:ring-offset-2\",\n {\n variants: {\n state: {\n default: [\n \"text-[var(--menu-muted)]\",\n \"underline underline-offset-4\",\n \"hover:text-[var(--content-foreground)]\",\n ].join(\" \"),\n current: \"text-[var(--content-foreground)] font-medium pointer-events-none\",\n disabled:\n \"text-[var(--menu-muted)] opacity-50 cursor-not-allowed pointer-events-none\",\n },\n },\n defaultVariants: {\n state: \"default\",\n },\n }\n);\n\n/**\n * Separator styling\n * @see plan.md CVA Variants Structure - separatorVariants\n */\nexport const separatorVariants = cva(\"text-[var(--menu-muted)]\", {\n variants: {\n type: {\n chevron: \"[&>svg]:h-4 [&>svg]:w-4\",\n slash: \"mx-2\",\n custom: \"\",\n },\n },\n defaultVariants: {\n type: \"chevron\",\n },\n});\n\n/**\n * Ellipsis button styling\n * @see plan.md CVA Variants Structure - ellipsisButtonVariants\n * @see FR-008 (44x44px minimum touch targets)\n */\nexport const ellipsisButtonVariants = cva(\n \"inline-flex items-center justify-center min-h-[44px] min-w-[44px] rounded-sm transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--ring)] focus-visible:ring-offset-2 hover:bg-[var(--accent)]\",\n {\n variants: {},\n defaultVariants: {},\n }\n);\n\n// ============================================================================\n// Helper Functions (Task 3.4)\n// ============================================================================\n\n/**\n * Determine if an item is the current page\n * Only the last item is considered current page\n *\n * @see plan.md Clarification: Current Page Detection - Only last item\n */\nfunction isCurrentPage(index: number, total: number): boolean {\n return index === total - 1;\n}\n\n/**\n * Calculate collapsed items for ellipsis dropdown\n *\n * @see FR-004 (Ellipsis Collapse for Overflow)\n * @see plan.md Clarification: Collapse Edge Case - No collapse if before + after >= total\n */\nfunction getCollapsedItems(\n items: BreadcrumbItemData[],\n maxItems: number,\n itemsBeforeCollapse: number,\n itemsAfterCollapse: number\n): CollapsedItems | null {\n // No collapse if items fit within maxItems\n if (items.length <= maxItems) {\n return null;\n }\n\n // Edge case: no collapse if before + after covers all items\n if (itemsBeforeCollapse + itemsAfterCollapse >= items.length) {\n return null;\n }\n\n const before = items.slice(0, itemsBeforeCollapse);\n const after = items.slice(-itemsAfterCollapse);\n const collapsed = items.slice(itemsBeforeCollapse, items.length - itemsAfterCollapse);\n\n return { before, collapsed, after };\n}\n\n// ============================================================================\n// Internal Components (Tasks 3.2, 3.3)\n// ============================================================================\n\n/**\n * BreadcrumbSeparator - Internal component for rendering separators\n *\n * @see FR-003 (Configurable Separators)\n * @see plan.md Task 3.2\n */\ninterface BreadcrumbSeparatorProps {\n separator: SeparatorType;\n}\n\nfunction BreadcrumbSeparator({ separator }: BreadcrumbSeparatorProps): ReactNode {\n if (separator === 'chevron') {\n return (\n <li\n role=\"presentation\"\n aria-hidden=\"true\"\n className={separatorVariants({ type: 'chevron' })}\n >\n <ChevronRight />\n </li>\n );\n }\n\n if (separator === 'slash') {\n return (\n <li\n role=\"presentation\"\n aria-hidden=\"true\"\n className={separatorVariants({ type: 'slash' })}\n >\n /\n </li>\n );\n }\n\n // Custom ReactNode separator\n return (\n <li\n role=\"presentation\"\n aria-hidden=\"true\"\n className={separatorVariants({ type: 'custom' })}\n >\n {separator}\n </li>\n );\n}\n\n/**\n * BreadcrumbLink - Internal component for rendering individual breadcrumb links\n *\n * @see FR-001 (Render Breadcrumbs from Items Array)\n * @see FR-002 (Auto-Detect Current Page)\n * @see FR-005 (Polymorphic Link Component)\n * @see plan.md Task 3.3\n */\ninterface BreadcrumbLinkProps {\n item: BreadcrumbItemData;\n isCurrent: boolean;\n linkComponent?: ElementType;\n isGroupDisabled?: boolean;\n}\n\nfunction BreadcrumbLink({\n item,\n isCurrent,\n linkComponent: LinkComponent = 'a',\n isGroupDisabled,\n}: BreadcrumbLinkProps): ReactNode {\n const isDisabled = isGroupDisabled || item.isDisabled;\n const state: BreadcrumbLinkState = isCurrent\n ? 'current'\n : isDisabled\n ? 'disabled'\n : 'default';\n\n // Render current page as span with aria-current\n if (isCurrent) {\n return (\n <span\n className={breadcrumbLinkVariants({ state: 'current' })}\n aria-current=\"page\"\n >\n {item.icon && <span aria-hidden=\"true\">{item.icon}</span>}\n {item.label}\n </span>\n );\n }\n\n // Render non-navigable item (no href) as span without aria-current\n if (!item.href) {\n return (\n <span\n className={breadcrumbLinkVariants({ state: isDisabled ? 'disabled' : 'default' })}\n aria-disabled={isDisabled || undefined}\n >\n {item.icon && <span aria-hidden=\"true\">{item.icon}</span>}\n {item.label}\n </span>\n );\n }\n\n // Render link - navigation handled by linkComponent\n return (\n <LinkComponent\n href={item.href}\n className={breadcrumbLinkVariants({ state })}\n aria-disabled={isDisabled || undefined}\n >\n {item.icon && <span aria-hidden=\"true\">{item.icon}</span>}\n {item.label}\n </LinkComponent>\n );\n}\n\n/**\n * BreadcrumbEllipsis - Internal component for collapsed items dropdown\n *\n * @see FR-004 (Ellipsis Collapse for Overflow)\n * @see plan.md Task 4.2 - Uses Themis Dropdown with nested LinkComponent\n */\ninterface BreadcrumbEllipsisProps {\n items: BreadcrumbItemData[];\n linkComponent?: ElementType;\n isGroupDisabled?: boolean;\n}\n\nfunction BreadcrumbEllipsis({\n items,\n linkComponent: LinkComponent = 'a',\n isGroupDisabled,\n}: BreadcrumbEllipsisProps): ReactNode {\n return (\n <Dropdown defaultOpen={false}>\n <Dropdown.Trigger>\n <Button\n variant=\"ghost\"\n size=\"icon\"\n className={ellipsisButtonVariants()}\n aria-label=\"More breadcrumbs\"\n >\n <MoreHorizontal className=\"h-4 w-4\" />\n </Button>\n </Dropdown.Trigger>\n <Dropdown.Menu align=\"start\" side=\"bottom\">\n {items.map((item) => (\n <Dropdown.Item\n key={item.id}\n isDisabled={isGroupDisabled || item.isDisabled}\n >\n {/* Nest LinkComponent inside Item (ShadCN pattern) */}\n <LinkComponent\n href={item.href}\n className=\"flex flex-1 items-center gap-2\"\n >\n {item.icon && <span aria-hidden=\"true\">{item.icon}</span>}\n {item.label}\n </LinkComponent>\n </Dropdown.Item>\n ))}\n </Dropdown.Menu>\n </Dropdown>\n );\n}\n\n// ============================================================================\n// Main Component (Tasks 3.5, 3.6)\n// ============================================================================\n\n/**\n * Breadcrumbs Component\n *\n * Accessible breadcrumb navigation with array-based API and ellipsis collapse.\n * Supports polymorphic link components for framework integration.\n *\n * @example\n * ```tsx\n * <Breadcrumbs\n * items={[\n * { id: 'home', label: 'Home', href: '/' },\n * { id: 'products', label: 'Products', href: '/products' },\n * { id: 'current', label: 'Product Details' }\n * ]}\n * />\n * ```\n *\n * @see breadcrumbs-prd.md FR-001 to FR-011 (All Functional Requirements)\n */\nconst Breadcrumbs = forwardRef<HTMLElement, BreadcrumbsProps>(\n (\n {\n items,\n separator = 'chevron',\n maxItems = 4,\n itemsBeforeCollapse = 1,\n itemsAfterCollapse = 2,\n linkComponent,\n isDisabled,\n className,\n 'aria-label': ariaLabel = 'Breadcrumb',\n ...props\n },\n ref\n ) => {\n // Handle empty items - render nothing\n if (!items || items.length === 0) {\n return null;\n }\n\n // Calculate if we need to collapse\n const collapsedData = getCollapsedItems(\n items,\n maxItems,\n itemsBeforeCollapse,\n itemsAfterCollapse\n );\n\n // Render without collapse\n if (!collapsedData) {\n return (\n <nav\n ref={ref}\n aria-label={ariaLabel}\n className={cn(breadcrumbsVariants(), className)}\n {...props}\n >\n <ol className={breadcrumbListVariants()}>\n {items.map((item, index) => (\n <Fragment key={item.id}>\n <li className={breadcrumbItemVariants()}>\n <BreadcrumbLink\n item={item}\n isCurrent={isCurrentPage(index, items.length)}\n linkComponent={linkComponent}\n isGroupDisabled={isDisabled}\n />\n </li>\n {index < items.length - 1 && (\n <BreadcrumbSeparator separator={separator} />\n )}\n </Fragment>\n ))}\n </ol>\n </nav>\n );\n }\n\n // Render with collapse\n return (\n <nav\n ref={ref}\n aria-label={ariaLabel}\n className={cn(breadcrumbsVariants(), className)}\n {...props}\n >\n <ol className={breadcrumbListVariants()}>\n {/* Items before ellipsis */}\n {collapsedData.before.map((item) => (\n <Fragment key={item.id}>\n <li className={breadcrumbItemVariants()}>\n <BreadcrumbLink\n item={item}\n isCurrent={false}\n linkComponent={linkComponent}\n isGroupDisabled={isDisabled}\n />\n </li>\n <BreadcrumbSeparator separator={separator} />\n </Fragment>\n ))}\n\n {/* Ellipsis dropdown */}\n <li className={breadcrumbItemVariants()}>\n <BreadcrumbEllipsis\n items={collapsedData.collapsed}\n linkComponent={linkComponent}\n isGroupDisabled={isDisabled}\n />\n </li>\n <BreadcrumbSeparator separator={separator} />\n\n {/* Items after ellipsis */}\n {collapsedData.after.map((item, index) => {\n const isLast = index === collapsedData.after.length - 1;\n const globalIndex =\n items.length - collapsedData.after.length + index;\n return (\n <Fragment key={item.id}>\n <li className={breadcrumbItemVariants()}>\n <BreadcrumbLink\n item={item}\n isCurrent={isCurrentPage(globalIndex, items.length)}\n linkComponent={linkComponent}\n isGroupDisabled={isDisabled}\n />\n </li>\n {!isLast && <BreadcrumbSeparator separator={separator} />}\n </Fragment>\n );\n })}\n </ol>\n </nav>\n );\n }\n);\n\nBreadcrumbs.displayName = 'Breadcrumbs';\n\nexport { Breadcrumbs };\n","import { cva } from 'class-variance-authority';\n\n/**\n * PageTitle CVA variants.\n *\n * Colour strategy\n * - Default: `var(--content-background)` + `var(--content-foreground)`\n * (standard card surface; description uses `var(--menu-muted)`).\n * - Feature: branded gradient `var(--primary)` → darkened; all text uses\n * `var(--primary-foreground)` at full opacity (no `/70` modifiers).\n * Gradient direction flips in RTL so the visual weight stays at the\n * reading end.\n *\n * AAA contrast of the feature variant's gradient depends on the tenant's\n * `--primary` value. Tenant-specific contrast guardrails live in the\n * theme validator, not here — this component renders whatever the tenant\n * theme supplies.\n */\n\n// =============================================================================\n// Root — semantic <header> wrapper\n// =============================================================================\n\nexport const pageTitleRootVariants = cva(\n // gap-2, not the Figma's 20px: Themis breadcrumbs carry a 44px touch zone that\n // already adds ~11px below the visible crumb text, so a smaller flex gap lands\n // the *visual* breadcrumb→title spacing where the design intends.\n '@container/page-title flex flex-col gap-2 border-b border-[var(--border)] p-4',\n {\n variants: {\n variant: {\n default: 'bg-[var(--content-background)]',\n feature: [\n 'bg-[linear-gradient(to_right,var(--primary),color-mix(in_oklch,var(--primary),black_60%))]',\n 'rtl:bg-[linear-gradient(to_left,var(--primary),color-mix(in_oklch,var(--primary),black_60%))]',\n ].join(' '),\n },\n },\n defaultVariants: {\n variant: 'default',\n },\n },\n);\n\n// =============================================================================\n// Title row — stacks column when the page-title CONTAINER is narrow, regardless\n// of viewport width. Switches to row at ≥36rem container width and allows\n// actions to wrap below the body when the row can't accommodate both.\n// =============================================================================\n\nexport const pageTitleRowVariants = cva(\n 'flex w-full flex-col gap-4 @xl/page-title:flex-row @xl/page-title:flex-wrap @xl/page-title:items-center @xl/page-title:justify-between',\n);\n\nexport const pageTitleBodyVariants = cva(\n 'flex min-w-0 flex-1 flex-col gap-3 @xl/page-title:basis-[18rem]',\n);\n\n// =============================================================================\n// Heading\n// =============================================================================\n\nexport const pageTitleHeadingVariants = cva(\n 'text-[28px] font-semibold leading-none tracking-[-0.28px]',\n {\n variants: {\n variant: {\n default: 'text-[var(--content-foreground)]',\n feature: 'text-[var(--primary-foreground)]',\n },\n },\n defaultVariants: {\n variant: 'default',\n },\n },\n);\n\n// =============================================================================\n// Description\n// =============================================================================\n\nexport const pageTitleDescriptionVariants = cva(\n 'text-base leading-normal',\n {\n variants: {\n variant: {\n default: 'text-[var(--menu-muted)]',\n feature: 'text-[var(--primary-foreground)]',\n },\n },\n defaultVariants: {\n variant: 'default',\n },\n },\n);\n\n// =============================================================================\n// Breadcrumbs wrapper — variant-aware class override for feature contrast\n// =============================================================================\n\nexport const pageTitleBreadcrumbsVariants = cva('flex w-full', {\n variants: {\n variant: {\n default: '',\n // On the feature variant, breadcrumb links/separators must clear the\n // gradient. Override the inner link colour scheme at full opacity.\n feature: [\n '[&_a]:text-[var(--primary-foreground)]',\n '[&_a:hover]:text-[var(--primary-foreground)]',\n '[&_[aria-current=page]]:text-[var(--primary-foreground)]',\n '[&_[role=presentation]]:text-[var(--primary-foreground)]',\n // Focus ring on the gradient: use foreground as the ring colour.\n '[&_:focus-visible]:ring-[var(--primary-foreground)]',\n ].join(' '),\n },\n },\n defaultVariants: {\n variant: 'default',\n },\n});\n\n// =============================================================================\n// Actions — primary/secondary button container\n// =============================================================================\n\nexport const pageTitleActionsVariants = cva(\n 'flex shrink-0 flex-wrap items-center gap-2',\n);\n\n// =============================================================================\n// Tabs slot — renders below the title row, full-width\n// =============================================================================\n\nexport const pageTitleTabsVariants = cva(\n // Full-bleed: break out of the root's `p-4` so the tab strip spans the\n // container edge-to-edge. `-mx-4 -mb-4` mirror the root padding; `mt-2` lifts\n // the gap above the tabs back toward the design's ~16px (root flex gap\n // contributes the other half). Kept as a block (NOT flex) so the `Tabs` root\n // div stays full width — a flex wrapper would shrink it to content. The inner\n // TabList is then stretched to full width so *its own* `border-b` becomes the\n // seamless PageTitle divider (no separate wrapper border to double up); the\n // root drops its bottom border when tabs are present (see PageTitle.tsx).\n // No `w-full`: an auto-width block lets `-mx-4` expand symmetrically to full\n // bleed (with `w-full` the 100% width is fixed and the negative right margin\n // can't extend it, leaving a right-side gap).\n //\n // The Default tab now carries `px-4` (16px) itself, so with the tablist flush\n // at x=0 the first tab's text aligns with the 16px content inset above. The\n // border-b lives on the full-bleed tablist box, so it stays flush at both edges.\n '-mx-4 -mb-4 mt-2 [&_[role=tablist]]:flex [&_[role=tablist]]:w-full',\n);\n","'use client';\n\nimport { forwardRef, type ReactElement } from 'react';\nimport { cn } from '../../utils/cn';\nimport { Breadcrumbs } from '../Breadcrumbs';\nimport { usePageTitleContext } from './PageTitleContext';\nimport { pageTitleBreadcrumbsVariants } from './PageTitle.styles';\nimport type { PageTitleBreadcrumbsProps } from './PageTitle.types';\n\n/**\n * PageTitle.Breadcrumbs\n *\n * Items-driven breadcrumb trail for the page header. Renders a Themis\n * `<Breadcrumbs>` internally so the surrounding `<nav aria-label=\"Breadcrumb\">`\n * and `aria-current=\"page\"` semantics are always correct.\n *\n * On the `feature` variant, applies a full-opacity colour override so link and\n * separator text clear the gradient without relying on reduced-opacity hacks.\n */\nexport const PageTitleBreadcrumbs = forwardRef<HTMLDivElement, PageTitleBreadcrumbsProps>(\n function PageTitleBreadcrumbsImpl(\n { items, linkComponent, className, 'data-testid': testId, 'aria-label': ariaLabel },\n ref,\n ): ReactElement {\n const { variant } = usePageTitleContext();\n return (\n <div\n ref={ref}\n className={cn(pageTitleBreadcrumbsVariants({ variant }), className)}\n data-testid={testId ?? 'page-title-breadcrumbs'}\n >\n <Breadcrumbs\n items={items}\n linkComponent={linkComponent}\n aria-label={ariaLabel}\n />\n </div>\n );\n },\n);\n\nPageTitleBreadcrumbs.displayName = 'PageTitle.Breadcrumbs';\n","'use client';\n\nimport { forwardRef, useEffect, type ReactElement } from 'react';\nimport { cn } from '../../utils/cn';\nimport { usePageTitleContext } from './PageTitleContext';\nimport { pageTitleHeadingVariants } from './PageTitle.styles';\nimport type { PageTitleHeadingProps } from './PageTitle.types';\n\n/**\n * PageTitle.Heading\n *\n * Renders an `<h1>` by default. Use `as=\"h2\"` or `as=\"h3\"` when `PageTitle` is\n * not the page's primary heading (e.g. inside an editor that already owns the\n * page-level `<h1>`).\n *\n * Dev-mode check warns if multiple `<h1>`s land on the page.\n */\nexport const PageTitleHeading = forwardRef<HTMLHeadingElement, PageTitleHeadingProps>(\n function PageTitleHeadingImpl(\n { as = 'h1', children, className, id, 'data-testid': testId },\n ref,\n ): ReactElement {\n const { variant } = usePageTitleContext();\n\n useEffect(() => {\n if (process.env.NODE_ENV !== 'production' && as === 'h1') {\n const count = document.querySelectorAll('h1').length;\n if (count > 1) {\n console.warn(\n `[PageTitle] Multiple <h1> elements detected on the page (${count}). ` +\n 'Each page should have exactly one <h1>. Pass `as=\"h2\"` when PageTitle ' +\n 'is not the primary page heading.',\n );\n }\n }\n }, [as]);\n\n const classes = cn(pageTitleHeadingVariants({ variant }), className);\n const props = {\n ref,\n id,\n className: classes,\n 'data-testid': testId ?? 'page-title-heading',\n };\n\n if (as === 'h2') return <h2 {...props}>{children}</h2>;\n if (as === 'h3') return <h3 {...props}>{children}</h3>;\n return <h1 {...props}>{children}</h1>;\n },\n);\n\nPageTitleHeading.displayName = 'PageTitle.Heading';\n","'use client';\n\nimport { forwardRef, type ReactElement } from 'react';\nimport { cn } from '../../utils/cn';\nimport { usePageTitleContext } from './PageTitleContext';\nimport { pageTitleDescriptionVariants } from './PageTitle.styles';\nimport type { PageTitleDescriptionProps } from './PageTitle.types';\n\n/**\n * PageTitle.Description\n *\n * Full-opacity supporting copy below the heading. No `opacity-*` or `/70`\n * modifier — visual hierarchy is weight/size only.\n */\nexport const PageTitleDescription = forwardRef<HTMLParagraphElement, PageTitleDescriptionProps>(\n function PageTitleDescriptionImpl(\n { children, className, id, 'data-testid': testId },\n ref,\n ): ReactElement {\n const { variant } = usePageTitleContext();\n return (\n <p\n ref={ref}\n id={id}\n className={cn(pageTitleDescriptionVariants({ variant }), className)}\n data-testid={testId ?? 'page-title-description'}\n >\n {children}\n </p>\n );\n },\n);\n\nPageTitleDescription.displayName = 'PageTitle.Description';\n","'use client';\n\nimport { forwardRef, type ReactElement } from 'react';\nimport { cn } from '../../utils/cn';\nimport { usePageTitleContext } from './PageTitleContext';\nimport { pageTitleActionsVariants } from './PageTitle.styles';\nimport type { PageTitleActionsProps } from './PageTitle.types';\n\n/**\n * PageTitle.Actions\n *\n * Container for page-level primary actions (typically Themis `Button`s).\n * Actions wrap on narrow viewports so 400%-zoom reflow stays intact.\n *\n * WCAG 2.2 AAA 2.5.8 Target Size — Button children in this slot must be\n * `size=\"md\"` or larger (44×44 minimum). The compound does not enforce this\n * but documents the expectation.\n */\nexport const PageTitleActions = forwardRef<HTMLDivElement, PageTitleActionsProps>(\n function PageTitleActionsImpl(\n { children, className, 'data-testid': testId },\n ref,\n ): ReactElement {\n // Subscribe to context so the guard throws if rendered outside <PageTitle>.\n usePageTitleContext();\n return (\n <div\n ref={ref}\n className={cn(pageTitleActionsVariants(), className)}\n data-testid={testId ?? 'page-title-actions'}\n >\n {children}\n </div>\n );\n },\n);\n\nPageTitleActions.displayName = 'PageTitle.Actions';\n","'use client';\n\nimport { forwardRef, type ReactElement } from 'react';\nimport { cn } from '../../utils/cn';\nimport { usePageTitleContext } from './PageTitleContext';\nimport { pageTitleTabsVariants } from './PageTitle.styles';\nimport type { PageTitleTabsProps } from './PageTitle.types';\n\n/**\n * PageTitle.Tabs\n *\n * Optional tabs region that renders below the title row. Consumers place\n * Themis `<Tabs>` (or any tablist) inside. Renders full-width on all\n * viewports; sits inside the `<header>` landmark so tabs read as part of\n * the page header.\n */\nexport const PageTitleTabs = forwardRef<HTMLDivElement, PageTitleTabsProps>(\n function PageTitleTabsImpl(\n { children, className, 'data-testid': testId },\n ref,\n ): ReactElement {\n usePageTitleContext();\n return (\n <div\n ref={ref}\n className={cn(pageTitleTabsVariants(), className)}\n data-testid={testId ?? 'page-title-tabs'}\n >\n {children}\n </div>\n );\n },\n);\n\nPageTitleTabs.displayName = 'PageTitle.Tabs';\n","'use client';\n\n/**\n * PageTitle — Compound Root\n *\n * Accessible page-level header for listing and landing pages. WCAG 2.2 target.\n *\n * Layout (matches Figma `EOS x Themis v1.1` node 4434:7793):\n * <header>\n * <Breadcrumbs /> {/* optional; full width *\\/}\n * <row>\n * <body>\n * <Heading /> {/* h1 by default *\\/}\n * <Description /> {/* optional; full-opacity *\\/}\n * </body>\n * <Actions /> {/* right on ≥sm, wraps below on mobile *\\/}\n * </row>\n * <Tabs /> {/* optional; full width *\\/}\n * </header>\n *\n * Compound API: children are classified by `displayName` (same pattern as\n * Wizard.Content). Unknown children are dropped into the body below the\n * description so consumers can still inject ad-hoc content when needed.\n *\n * Accessibility\n * - Root is a semantic `<header>`; no `role=\"banner\"` (reserved for the\n * site-level landmark).\n * - `<h1>` by default via `PageTitle.Heading`; override to `h2`/`h3` when\n * the page's primary heading lives elsewhere.\n * - Feature variant applies a foreground-only focus-ring inside\n * breadcrumbs so focus remains visible over the gradient.\n * - Responsive stacking: column on mobile, row on ≥sm. 400% zoom reflow\n * is supported without horizontal scroll.\n * - RTL: gradient direction flips via `rtl:` modifier.\n *\n * Limitations\n * - AAA contrast of the feature gradient depends on the tenant's\n * `--primary` token. A contrast guardrail lives in the theme\n * validator, not here.\n */\n\nimport {\n Children,\n forwardRef,\n isValidElement,\n useMemo,\n type ReactElement,\n type ReactNode,\n} from 'react';\nimport { cn } from '../../utils/cn';\nimport { PageTitleContext, type PageTitleContextValue } from './PageTitleContext';\nimport { PageTitleBreadcrumbs } from './PageTitleBreadcrumbs';\nimport { PageTitleHeading } from './PageTitleHeading';\nimport { PageTitleDescription } from './PageTitleDescription';\nimport { PageTitleActions } from './PageTitleActions';\nimport { PageTitleTabs } from './PageTitleTabs';\nimport {\n pageTitleBodyVariants,\n pageTitleRootVariants,\n pageTitleRowVariants,\n} from './PageTitle.styles';\nimport type { PageTitleProps } from './PageTitle.types';\n\ntype Slot = 'breadcrumbs' | 'heading' | 'description' | 'actions' | 'tabs';\n\nconst SLOT_BY_DISPLAY_NAME: Record<string, Slot> = {\n 'PageTitle.Breadcrumbs': 'breadcrumbs',\n 'PageTitle.Heading': 'heading',\n 'PageTitle.Description': 'description',\n 'PageTitle.Actions': 'actions',\n 'PageTitle.Tabs': 'tabs',\n};\n\ninterface Slots {\n breadcrumbs: ReactNode;\n heading: ReactNode;\n description: ReactNode;\n actions: ReactNode;\n tabs: ReactNode;\n other: ReactNode[];\n}\n\nfunction classifyChildren(children: ReactNode): Slots {\n const slots: Slots = {\n breadcrumbs: null,\n heading: null,\n description: null,\n actions: null,\n tabs: null,\n other: [],\n };\n\n Children.forEach(children, (child) => {\n if (!isValidElement(child)) {\n if (child !== null && child !== undefined && child !== false) {\n slots.other.push(child);\n }\n return;\n }\n const type = child.type as { displayName?: string } | string;\n const displayName = typeof type === 'string' ? undefined : type?.displayName;\n const slot = displayName ? SLOT_BY_DISPLAY_NAME[displayName] : undefined;\n if (slot) {\n slots[slot] = child;\n } else {\n slots.other.push(child);\n }\n });\n\n return slots;\n}\n\nconst PageTitleRoot = forwardRef<HTMLDivElement, PageTitleProps>(function PageTitleRootImpl(\n {\n children,\n variant = 'default',\n className,\n id,\n 'aria-label': ariaLabel,\n 'aria-labelledby': ariaLabelledBy,\n 'data-testid': testId = 'page-title',\n },\n ref,\n): ReactElement {\n const slots = classifyChildren(children);\n\n const contextValue = useMemo<PageTitleContextValue>(() => ({ variant }), [variant]);\n\n return (\n <PageTitleContext.Provider value={contextValue}>\n <div\n ref={ref}\n id={id}\n className={cn(\n pageTitleRootVariants({ variant }),\n // When tabs are present, the full-width tab strip border is the\n // divider — drop the root's own bottom border so they don't double up.\n slots.tabs != null && 'border-b-0',\n className,\n )}\n aria-label={ariaLabel}\n aria-labelledby={ariaLabelledBy}\n data-testid={testId}\n data-page-title-variant={variant}\n >\n {slots.breadcrumbs}\n <div className={pageTitleRowVariants()}>\n <div className={pageTitleBodyVariants()}>\n {slots.heading}\n {slots.description}\n {slots.other}\n </div>\n {slots.actions}\n </div>\n {slots.tabs}\n </div>\n </PageTitleContext.Provider>\n );\n});\n\nPageTitleRoot.displayName = 'PageTitle';\n\n/**\n * PageTitle compound component with dot-syntax sub-components.\n *\n * @example\n * ```tsx\n * <PageTitle variant=\"feature\">\n * <PageTitle.Breadcrumbs\n * items={[\n * { id: 'home', label: 'Dashboard', href: '/' },\n * { id: 'forms', label: 'Forms' },\n * ]}\n * linkComponent={Link}\n * />\n * <PageTitle.Heading>Forms</PageTitle.Heading>\n * <PageTitle.Description>\n * Build and manage reusable forms for applications, interviews, screening,\n * and onboarding.\n * </PageTitle.Description>\n * <PageTitle.Actions>\n * <Button size=\"md\" leadingIcon={<Plus />}>Create Form</Button>\n * </PageTitle.Actions>\n * </PageTitle>\n * ```\n */\nexport const PageTitle = Object.assign(PageTitleRoot, {\n Breadcrumbs: PageTitleBreadcrumbs,\n Heading: PageTitleHeading,\n Description: PageTitleDescription,\n Actions: PageTitleActions,\n Tabs: PageTitleTabs,\n});\n","import { z } from 'zod';\nimport type { ElementType, ReactNode } from 'react';\nimport { BaseComponentPropsSchema } from '../../schemas/BaseComponentProps';\nimport { BreadcrumbItemDataSchema, type BreadcrumbItemData } from '../Breadcrumbs/Breadcrumbs.types';\n\n/**\n * PageTitle variants.\n *\n * - `default` — light card background with dark text. Inner pages, editor contexts.\n * - `feature` — branded gradient background with light text. Top-level landings.\n *\n * Extension policy: add new variants by (1) extending this enum, (2) adding the\n * CVA variant in `PageTitle.styles`, (3) wiring context-aware sub-component\n * classes. Do NOT add visual props (gradient, border, shadow) at the root level\n * — extend through a named variant.\n */\nexport const PageTitleVariantSchema = z.enum(['default', 'feature']);\n\n/**\n * Heading tag override for `PageTitle.Heading`.\n *\n * Default is `h1`. Callers should override to `h2` when `PageTitle` is not the\n * page's primary heading (e.g. inside an editor that owns its own `<h1>`).\n */\nexport const PageTitleHeadingLevelSchema = z.enum(['h1', 'h2', 'h3']);\n\n// =============================================================================\n// Root\n// =============================================================================\n\nexport const PageTitlePropsSchema = BaseComponentPropsSchema.extend({\n children: z.custom<ReactNode>(),\n variant: PageTitleVariantSchema.optional(),\n});\n\nexport interface PageTitleProps {\n children: ReactNode;\n /** Visual treatment. @default \"default\" */\n variant?: 'default' | 'feature';\n className?: string;\n id?: string;\n 'aria-label'?: string;\n 'aria-labelledby'?: string;\n 'data-testid'?: string;\n}\n\n// =============================================================================\n// Heading\n// =============================================================================\n\nexport const PageTitleHeadingPropsSchema = BaseComponentPropsSchema.extend({\n children: z.custom<ReactNode>(),\n as: PageTitleHeadingLevelSchema.optional(),\n});\n\nexport interface PageTitleHeadingProps {\n children: ReactNode;\n /** Heading level. @default \"h1\" */\n as?: 'h1' | 'h2' | 'h3';\n className?: string;\n id?: string;\n 'data-testid'?: string;\n}\n\n// =============================================================================\n// Description\n// =============================================================================\n\nexport const PageTitleDescriptionPropsSchema = BaseComponentPropsSchema.extend({\n children: z.custom<ReactNode>(),\n});\n\nexport interface PageTitleDescriptionProps {\n children: ReactNode;\n className?: string;\n id?: string;\n 'data-testid'?: string;\n}\n\n// =============================================================================\n// Breadcrumbs — items-driven, not free children\n// =============================================================================\n\nexport const PageTitleBreadcrumbsPropsSchema = BaseComponentPropsSchema.extend({\n items: z.array(BreadcrumbItemDataSchema),\n linkComponent: z.custom<ElementType>().optional(),\n});\n\nexport interface PageTitleBreadcrumbsProps {\n items: BreadcrumbItemData[];\n /** Polymorphic link component (e.g. next/link). @default \"a\" */\n linkComponent?: ElementType;\n className?: string;\n 'data-testid'?: string;\n 'aria-label'?: string;\n}\n\n// =============================================================================\n// Actions\n// =============================================================================\n\nexport const PageTitleActionsPropsSchema = BaseComponentPropsSchema.extend({\n children: z.custom<ReactNode>(),\n});\n\nexport interface PageTitleActionsProps {\n children: ReactNode;\n className?: string;\n 'data-testid'?: string;\n}\n\n// =============================================================================\n// Tabs slot\n// =============================================================================\n\nexport const PageTitleTabsPropsSchema = BaseComponentPropsSchema.extend({\n children: z.custom<ReactNode>(),\n});\n\nexport interface PageTitleTabsProps {\n children: ReactNode;\n className?: string;\n 'data-testid'?: string;\n}\n\n// =============================================================================\n// Inferred helper types (safe — these have no .default() fields)\n// =============================================================================\n\nexport type PageTitleVariant = z.infer<typeof PageTitleVariantSchema>;\nexport type PageTitleHeadingLevel = z.infer<typeof PageTitleHeadingLevelSchema>;\n"]}
|