@tribepad/themis 1.11.0 → 1.11.2

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.
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/styles/shared-variants.ts","../../../src/utils/cn.ts","../../../src/utils/browserExtensionOverlay.ts","../../../src/elements/Select/Select.styles.ts","../../../src/elements/Select/Select.tsx","../../../src/schemas/BaseComponentProps.ts","../../../src/elements/Select/Select.types.ts"],"names":["FIELD_HEIGHTS","FIELD_INPUT_SIZES","FIELD_TOUCH_TARGET","cn","inputs","twMerge","clsx","isExtensionInjectedElement","element","node","depth","tag","root","custom","parent","createInteractOutsideGuard","consumerShouldClose","selectTriggerVariants","cva","selectItemVariants","selectPopoverVariants","selectSectionVariants","selectErrorVariants","LOADING_SKELETON","_","i","jsx","SelectBase","ariaSelectProps","triggerContent","triggerRef","label","description","isRequired","isDisabled","isLoading","errorMessage","size","emptyStateMessage","childCount","children","labelId","useId","descriptionId","errorId","isInvalid","rootClassName","restAriaSelectProps","jsxs","AriaSelect","Label","Text","Button","Loader2","ChevronDown","FieldError","validationErrors","displayError","Fragment","Popover","ListBox","ListBoxItem","SelectRoot","forwardRef","placeholder","value","defaultValue","isOpen","disabledKeys","validate","validationBehavior","name","onChange","onOpenChange","className","props","ref","Children","key","SelectValue","MultiSelectRoot","_selectionMode","valueToLabelMap","useMemo","map","processChildren","nodes","child","isValidElement","SelectItem","itemValue","itemChildren","displayValue","v","keys","memo","textValue","message","isSelected","selectionMode","itemDisabled","CheckSquare","Check","SelectSection","ListBoxSection","SelectHeader","Header","Select","MultiSelect","BaseComponentPropsSchema","z","SelectSizeSchema","SelectionModeSchema","ValidationBehaviorSchema","SelectPropsSchema","SelectItemPropsSchema","SelectSectionPropsSchema","SelectHeaderPropsSchema"],"mappings":"scAyHO,IAAMA,CAAAA,CAAgB,CAC3B,GAAI,KAAA,CACJ,OAAA,CAAS,OACT,EAAA,CAAI,MACN,EAQaC,CA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AAyB,MAAA,CAAO,CAEtE,QAAA,CAAUC,IAAE,MAAA,EAAkB,CAG9B,UAAWA,GAAAA,CAAE,MAAA,GAAS,QAAA,EACxB,CAAC,CAAA,CAcYO,EAAAA,CAA0BR,CAAAA,CAAyB,OAAO,CAErE,QAAA,CAAUC,GAAAA,CAAE,MAAA,EAAkB,CAG9B,SAAA,CAAWA,IAAE,MAAA,EAAO,CAAE,QAAA,EACxB,CAAC","file":"index.mjs","sourcesContent":["/**\n * Shared CVA Variant Utilities\n *\n * Common patterns extracted from component variants for consistency and reduced bundle size.\n * Use these constants in CVA definitions to ensure consistent styling across Themis.\n *\n * @see interaction-states.ts for interaction-specific styles (focus, hover, pressed)\n */\n\n// =============================================================================\n// Focus Ring Patterns\n// =============================================================================\n\n/**\n * Focus-within ring (for container elements with focusable children)\n * Use when the container should show focus when any child is focused\n */\nexport const FOCUS_WITHIN_RING = [\n 'focus-within:outline-none',\n 'focus-within:ring-2',\n 'focus-within:ring-[var(--ring)]',\n 'focus-within:ring-offset-2',\n] as const;\n\n/**\n * Focus-visible ring (for directly focusable elements)\n * Use for buttons, inputs, and other interactive elements\n */\nexport const FOCUS_VISIBLE_RING = [\n 'focus-visible:outline-none',\n 'focus-visible:ring-2',\n 'focus-visible:ring-[var(--ring)]',\n 'focus-visible:ring-offset-2',\n] as const;\n\n/**\n * Standard focus ring (for elements using :focus pseudo-class)\n * Prefer focus-visible when possible for better UX\n */\nexport const FOCUS_RING = [\n 'focus:outline-none',\n 'focus:ring-2',\n 'focus:ring-[var(--ring)]',\n] as const;\n\n/**\n * Focus with background change (for segments, cells, menu items)\n */\nexport const FOCUS_HIGHLIGHT = [\n 'focus:outline-none',\n 'focus:bg-[var(--accent)]',\n 'focus:text-[var(--accent-foreground)]',\n] as const;\n\n// =============================================================================\n// Disabled State Patterns\n// =============================================================================\n\n/**\n * Standard disabled state using disabled attribute\n */\nexport const DISABLED_STANDARD = [\n 'disabled:pointer-events-none',\n 'disabled:opacity-50',\n] as const;\n\n/**\n * Disabled state using data attribute (React Aria pattern)\n */\nexport const DISABLED_DATA_ATTR = [\n 'data-[disabled]:pointer-events-none',\n 'data-[disabled]:opacity-50',\n 'data-[disabled]:cursor-not-allowed',\n] as const;\n\n// =============================================================================\n// Size-Based Text Variants\n// =============================================================================\n\n/**\n * Small text size scale (xs -> sm -> base)\n */\nexport const TEXT_SIZE_SMALL_SCALE = {\n sm: 'text-xs',\n default: 'text-sm',\n lg: 'text-base',\n} as const;\n\n/**\n * Medium text size scale (sm -> base -> lg)\n */\nexport const TEXT_SIZE_MEDIUM_SCALE = {\n sm: 'text-sm',\n default: 'text-base',\n lg: 'text-lg',\n} as const;\n\n// =============================================================================\n// Touch Target Utilities\n// =============================================================================\n\n/**\n * WCAG 2.2 AAA minimum touch target (44x44px)\n */\nexport const TOUCH_TARGET_MIN = [\n 'min-h-[44px]',\n 'min-w-[44px]',\n] as const;\n\n/**\n * Common button/cell sizes with touch target compliance\n */\nexport const INTERACTIVE_SIZES = {\n sm: 'h-9 w-9', // 36px - desktop only, NOT AAA compliant\n default: 'h-11 w-11', // 44px - AAA compliant\n lg: 'h-14 w-14', // 56px - AAA compliant, enhanced\n} as const;\n\n/**\n * Height-only sizes for fields and inputs\n */\nexport const FIELD_HEIGHTS = {\n sm: 'h-9', // 36px\n default: 'h-10', // 40px\n lg: 'h-11', // 44px\n} as const;\n\n/**\n * Layer 2: Visual sizing for form field inputs (height + padding + font).\n * Use on the <input>, <select>, or trigger element itself.\n *\n * Components may append additional classes (e.g. gap-* for segmented fields, py-* for text inputs).\n */\nexport const FIELD_INPUT_SIZES = {\n sm: `${FIELD_HEIGHTS.sm} px-2 text-xs`,\n default: `${FIELD_HEIGHTS.default} px-3 text-sm`,\n lg: `${FIELD_HEIGHTS.lg} px-4 text-base`,\n} as const;\n\n/**\n * Layer 1: Invisible touch target wrapper for form fields.\n * Apply to a <label> (or wrapper div) around the input element.\n * The <label> natively routes clicks/taps to the contained input\n * without JavaScript — achieving a 44px touch target while the\n * input stays at its visual height (h-9/h-10/h-11).\n */\nexport const FIELD_TOUCH_TARGET = 'min-h-[44px] flex items-center' as const;\n\n// =============================================================================\n// Message/Feedback Patterns\n// =============================================================================\n\n/**\n * Error message styling\n */\nexport const ERROR_MESSAGE_BASE = [\n 'flex',\n 'items-center',\n 'gap-1.5',\n 'text-[var(--destructive-background)]',\n] as const;\n\n/**\n * Success message styling\n */\nexport const SUCCESS_MESSAGE_BASE = [\n 'flex',\n 'items-center',\n 'gap-1.5',\n 'text-[var(--success-background)]',\n] as const;\n\n/**\n * Description/helper text styling\n */\nexport const DESCRIPTION_BASE = [\n 'text-[var(--menu-muted)]',\n] as const;\n\n/**\n * Label base styling\n */\nexport const LABEL_BASE = [\n 'font-medium',\n 'text-[var(--content-foreground)]',\n] as const;\n\n/**\n * Required indicator pattern\n */\nexport const REQUIRED_INDICATOR = \"after:content-['*'] after:ml-0.5 after:text-[var(--destructive-background)]\";\n\n// =============================================================================\n// Animation Patterns\n// =============================================================================\n\n/**\n * Popover/dropdown entry animation\n */\nexport const POPOVER_ANIMATION_IN = [\n 'data-[entering]:animate-in',\n 'data-[entering]:fade-in-0',\n 'data-[entering]:zoom-in-95',\n] as const;\n\n/**\n * Popover/dropdown exit animation\n */\nexport const POPOVER_ANIMATION_OUT = [\n 'data-[exiting]:animate-out',\n 'data-[exiting]:fade-out-0',\n 'data-[exiting]:zoom-out-95',\n] as const;\n\n/**\n * Modal content enter animation (fade + zoom)\n * Uses React Aria data-[entering]/data-[exiting] attributes\n */\nexport const MODAL_ANIMATION_IN = [\n 'data-[entering]:animate-in',\n 'data-[entering]:fade-in-0',\n 'data-[entering]:zoom-in-95',\n 'data-[entering]:duration-200',\n 'data-[entering]:ease-out',\n] as const;\n\n/**\n * Modal content exit animation (fade + zoom)\n * Uses React Aria data-[entering]/data-[exiting] attributes\n */\nexport const MODAL_ANIMATION_OUT = [\n 'data-[exiting]:animate-out',\n 'data-[exiting]:fade-out-0',\n 'data-[exiting]:zoom-out-95',\n 'data-[exiting]:duration-150',\n 'data-[exiting]:ease-in',\n] as const;\n\n/**\n * Modal slide enter animation (fade + slide up)\n */\nexport const MODAL_SLIDE_IN = [\n 'data-[entering]:animate-in',\n 'data-[entering]:fade-in-0',\n 'data-[entering]:slide-in-from-bottom-4',\n 'data-[entering]:duration-200',\n 'data-[entering]:ease-out',\n] as const;\n\n/**\n * Modal slide exit animation (fade + slide down)\n */\nexport const MODAL_SLIDE_OUT = [\n 'data-[exiting]:animate-out',\n 'data-[exiting]:fade-out-0',\n 'data-[exiting]:slide-out-to-bottom-4',\n 'data-[exiting]:duration-150',\n 'data-[exiting]:ease-in',\n] as const;\n\n/**\n * Directional slide animations for edge-anchored drawers (Modal `position` variant).\n *\n * Unitless `slide-in-from-*` / `slide-out-to-*` translate the full extent of the\n * element (100%), so the drawer slides all the way in from / out to its anchored\n * edge — distinct from `MODAL_SLIDE_*` above, which is the small 1rem nudge used by\n * the centred `slide` animation. No `fade` is paired here: a drawer slides, it\n * does not fade. Honour `prefers-reduced-motion` via REDUCED_MOTION on the element.\n */\nexport const MODAL_SLIDE_IN_LEFT = [\n 'data-[entering]:animate-in',\n 'data-[entering]:slide-in-from-left',\n 'data-[entering]:duration-200',\n 'data-[entering]:ease-out',\n] as const;\n\nexport const MODAL_SLIDE_OUT_LEFT = [\n 'data-[exiting]:animate-out',\n 'data-[exiting]:slide-out-to-left',\n 'data-[exiting]:duration-150',\n 'data-[exiting]:ease-in',\n] as const;\n\nexport const MODAL_SLIDE_IN_RIGHT = [\n 'data-[entering]:animate-in',\n 'data-[entering]:slide-in-from-right',\n 'data-[entering]:duration-200',\n 'data-[entering]:ease-out',\n] as const;\n\nexport const MODAL_SLIDE_OUT_RIGHT = [\n 'data-[exiting]:animate-out',\n 'data-[exiting]:slide-out-to-right',\n 'data-[exiting]:duration-150',\n 'data-[exiting]:ease-in',\n] as const;\n\nexport const MODAL_SLIDE_IN_TOP = [\n 'data-[entering]:animate-in',\n 'data-[entering]:slide-in-from-top',\n 'data-[entering]:duration-200',\n 'data-[entering]:ease-out',\n] as const;\n\nexport const MODAL_SLIDE_OUT_TOP = [\n 'data-[exiting]:animate-out',\n 'data-[exiting]:slide-out-to-top',\n 'data-[exiting]:duration-150',\n 'data-[exiting]:ease-in',\n] as const;\n\nexport const MODAL_SLIDE_IN_BOTTOM = [\n 'data-[entering]:animate-in',\n 'data-[entering]:slide-in-from-bottom',\n 'data-[entering]:duration-200',\n 'data-[entering]:ease-out',\n] as const;\n\nexport const MODAL_SLIDE_OUT_BOTTOM = [\n 'data-[exiting]:animate-out',\n 'data-[exiting]:slide-out-to-bottom',\n 'data-[exiting]:duration-150',\n 'data-[exiting]:ease-in',\n] as const;\n\n/**\n * Modal overlay enter/exit animation (fade only)\n */\nexport const MODAL_OVERLAY_IN = [\n 'data-[entering]:animate-in',\n 'data-[entering]:fade-in-0',\n 'data-[entering]:duration-200',\n] as const;\n\nexport const MODAL_OVERLAY_OUT = [\n 'data-[exiting]:animate-out',\n 'data-[exiting]:fade-out-0',\n 'data-[exiting]:duration-150',\n] as const;\n\n/**\n * Reduced motion support (WCAG 2.2)\n */\nexport const REDUCED_MOTION = [\n 'motion-reduce:transition-none',\n 'motion-reduce:animate-none',\n] as const;\n\n/**\n * Standard transition for colors\n */\nexport const TRANSITION_COLORS = [\n 'transition-colors',\n 'duration-200',\n] as const;\n\n/**\n * Fast transition for interactions\n */\nexport const TRANSITION_FAST = [\n 'transition-colors',\n 'duration-150',\n] as const;\n\n// =============================================================================\n// Hover State Patterns\n// =============================================================================\n\n/**\n * Accent background on hover (for interactive items)\n */\nexport const HOVER_ACCENT = [\n 'hover:bg-[var(--accent)]',\n 'hover:text-[var(--accent-foreground)]',\n] as const;\n\n// =============================================================================\n// Helper Functions\n// =============================================================================\n\n/**\n * Combines multiple style arrays into a flat array for CVA base styles\n */\nexport function combineStyles(...styles: (readonly string[] | string)[]): string[] {\n return styles.flatMap(s => Array.isArray(s) ? [...s] : [s]);\n}\n","/**\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","/**\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';\nimport { FIELD_INPUT_SIZES } from '../../styles';\n\n/**\n * CVA Variants for Select Trigger Button\n *\n * Styles the trigger button that opens the select popover.\n * All sizes enforce 44px minimum touch targets for WCAG 2.2 AAA compliance.\n */\nexport const selectTriggerVariants = cva(\n [\n // Base styles\n 'flex',\n 'w-full',\n 'items-center',\n 'justify-between',\n 'gap-2',\n 'rounded-md',\n 'border',\n 'bg-[var(--content-background)]',\n 'text-[var(--content-foreground)]',\n 'transition-colors',\n 'duration-200',\n 'outline-none',\n // Focus ring (WCAG 2.2 AAA - 7:1 contrast)\n 'focus-visible:ring-2',\n 'focus-visible:ring-[var(--ring)]',\n 'focus-visible:ring-offset-2',\n // Hover state\n 'hover:bg-[var(--accent)]/10',\n // Disabled state\n 'disabled:cursor-not-allowed',\n 'disabled:opacity-50',\n // Loading state\n 'data-[loading=true]:cursor-wait',\n // Truncate text\n 'truncate',\n ],\n {\n variants: {\n size: {\n sm: `${FIELD_INPUT_SIZES.sm} pr-1`,\n default: `${FIELD_INPUT_SIZES.default} pr-1.5`,\n lg: `${FIELD_INPUT_SIZES.lg} pr-2`,\n },\n isInvalid: {\n true: 'border-[var(--destructive-background)]',\n false: 'border-[var(--input-border)] hover:border-[var(--input-border)]/80',\n },\n },\n defaultVariants: {\n size: 'default',\n isInvalid: false,\n },\n }\n);\n\n/**\n * CVA Variants for Select Items\n *\n * Styles individual selectable items within the listbox.\n * All sizes enforce 44px minimum touch targets for WCAG 2.2 AAA compliance.\n */\nexport const selectItemVariants = cva(\n [\n // Base styles\n 'relative',\n 'flex',\n 'w-full',\n 'cursor-pointer',\n 'select-none',\n 'items-center',\n 'rounded-sm',\n 'outline-none',\n 'transition-colors',\n // Padding for checkmark icon (left side)\n 'pl-8',\n 'pr-2',\n // Hover state\n 'hover:bg-[var(--accent)]',\n 'hover:text-[var(--accent-foreground)]',\n // Focus state\n 'focus:bg-[var(--accent)]',\n 'focus:text-[var(--accent-foreground)]',\n // Selected state\n 'data-[selected=true]:bg-[var(--accent)]',\n 'data-[selected=true]:text-[var(--accent-foreground)]',\n // Disabled state\n 'data-[disabled=true]:pointer-events-none',\n 'data-[disabled=true]:opacity-50',\n 'data-[disabled=true]:text-[var(--menu-muted)]',\n ],\n {\n variants: {\n size: {\n sm: `${FIELD_INPUT_SIZES.sm} py-1`,\n default: `${FIELD_INPUT_SIZES.default} py-2`,\n lg: `${FIELD_INPUT_SIZES.lg} py-3`,\n },\n },\n defaultVariants: {\n size: 'default',\n },\n }\n);\n\n/**\n * CVA Variants for Select Popover\n *\n * Styles the popover container that holds the listbox.\n * Uses menu tokens to match Dropdown styling.\n */\nexport const selectPopoverVariants = cva(\n [\n // Base styles - use menu tokens to match Dropdown styling\n 'z-50',\n 'w-[--trigger-width]',\n 'rounded-md',\n 'border',\n 'border-[var(--menu-border)]',\n 'bg-[var(--menu-background)]',\n 'text-[var(--menu-foreground)]',\n 'outline-none',\n 'overflow-auto',\n // Animations\n 'data-[entering]:animate-in',\n 'data-[entering]:fade-in-0',\n 'data-[entering]:zoom-in-95',\n 'data-[exiting]:animate-out',\n 'data-[exiting]:fade-out-0',\n 'data-[exiting]:zoom-out-95',\n ],\n {\n variants: {\n size: {\n sm: 'max-h-[200px] p-1',\n default: 'max-h-[300px] p-1',\n lg: 'max-h-[400px] p-1',\n },\n },\n defaultVariants: {\n size: 'default',\n },\n }\n);\n\n/**\n * CVA Variants for Section Headers\n *\n * Styles the non-interactive section header labels within grouped selects.\n */\nexport const selectSectionVariants = cva(\n [\n 'px-2',\n 'py-1.5',\n 'text-xs',\n 'font-semibold',\n 'text-[var(--menu-muted)]',\n 'uppercase',\n 'tracking-wider',\n ],\n {\n variants: {\n size: {\n sm: 'px-2 py-1 text-[10px]',\n default: 'px-2 py-1 text-xs',\n lg: 'px-2 py-1.5 text-xs',\n },\n },\n defaultVariants: {\n size: 'default',\n },\n }\n);\n\n/**\n * CVA Variants for Error Messages\n *\n * Styles the error message displayed below the select trigger.\n */\nexport const selectErrorVariants = cva(\n [\n 'flex',\n 'items-center',\n 'gap-1.5',\n 'text-sm',\n 'font-medium',\n 'text-[var(--destructive-background)]',\n // mt-1 (4px) per design spec \"Input → hint: 4px\"; variants below override for size\n 'mt-1',\n ],\n {\n variants: {\n size: {\n sm: 'text-xs mt-1',\n default: 'text-sm mt-1',\n lg: 'text-base mt-1',\n },\n },\n defaultVariants: {\n size: 'default',\n },\n }\n);\n\n/**\n * Type exports for variant props.\n * Allows TypeScript inference of variant combinations.\n */\nexport type SelectTriggerVariantProps = VariantProps<typeof selectTriggerVariants>;\nexport type SelectItemVariantProps = VariantProps<typeof selectItemVariants>;\nexport type SelectPopoverVariantProps = VariantProps<typeof selectPopoverVariants>;\nexport type SelectSectionVariantProps = VariantProps<typeof selectSectionVariants>;\nexport type SelectErrorVariantProps = VariantProps<typeof selectErrorVariants>;\n","'use client';\n\n/**\n * Select Component - Implementation\n *\n * Accessible select/dropdown component combining React Aria primitives with ShadCN styling.\n * Follows Themis library patterns with compound component structure.\n *\n * Architecture:\n * - SelectBase: Internal component containing shared label, description, trigger, error, and listbox rendering.\n * - SelectRoot: Single selection wrapper (thin layer over SelectBase).\n * - MultiSelectRoot: Multiple selection wrapper with display value logic (thin layer over SelectBase).\n * - SelectItem, SelectSection, SelectHeader: Compound sub-components.\n *\n * @see select-prd.md (Full requirements)\n * @see Select.types.ts (Zod schemas)\n * @see Select.styles.ts (CVA variant definitions)\n * @see plan.md (Implementation plan)\n */\n\nimport {\n forwardRef,\n memo,\n Children,\n useId,\n useMemo,\n isValidElement,\n type ReactElement,\n type ReactNode,\n type Ref,\n} from 'react';\nimport {\n Select as AriaSelect,\n Label,\n Button,\n SelectValue,\n Popover,\n ListBox,\n ListBoxItem,\n ListBoxSection,\n Header,\n Text,\n FieldError,\n} from 'react-aria-components';\nimport { Check, CheckSquare, ChevronDown, Loader2 } from 'lucide-react';\nimport { FIELD_TOUCH_TARGET } from '../../styles';\nimport { cn } from '../../utils/cn';\nimport { createInteractOutsideGuard } from '../../utils/browserExtensionOverlay';\nimport type {\n SelectProps,\n SelectItemProps,\n SelectSectionProps,\n SelectHeaderProps,\n SelectSize,\n} from './Select.types';\nimport {\n selectTriggerVariants,\n selectItemVariants,\n selectPopoverVariants,\n selectSectionVariants,\n selectErrorVariants,\n} from './Select.styles';\n\n// Re-export CVA variants so existing imports from './Select' continue to work\nexport {\n selectTriggerVariants,\n selectItemVariants,\n selectPopoverVariants,\n selectSectionVariants,\n selectErrorVariants,\n} from './Select.styles';\n\n// Hoisted static JSX — avoids re-creation on every render\nconst LOADING_SKELETON = Array.from({ length: 3 }).map((_, i) => (\n <div\n key={`skeleton-${i}`}\n className=\"h-11 px-4 py-2\"\n >\n <div className=\"h-4 bg-[var(--accent-background)] rounded animate-pulse\" />\n </div>\n));\n\n/**\n * Internal props for SelectBase.\n * Extends the shared props with selection-mode-specific configuration.\n */\ninterface SelectBaseProps {\n /** The AriaSelect props to spread onto the root element */\n ariaSelectProps: Record<string, unknown>;\n /** Content to render inside the trigger button (SelectValue for single, span for multi) */\n triggerContent: ReactNode;\n /** Ref to forward to the trigger button */\n triggerRef: Ref<HTMLButtonElement>;\n /** Label text */\n label: string;\n /** Optional description text */\n description?: string;\n /** Whether the field is required */\n isRequired: boolean;\n /** Whether the field is disabled */\n isDisabled: boolean;\n /** Whether the field is in a loading state */\n isLoading: boolean;\n /** Error message to display */\n errorMessage?: string;\n /** Size variant */\n size: SelectSize;\n /** Empty state message override */\n emptyStateMessage?: string;\n /** Child count (pre-computed by parent) */\n childCount: number;\n /** Children to render in the listbox */\n children: ReactNode;\n}\n\n/**\n * SelectBase - Internal shared rendering component\n *\n * Contains the shared rendering logic for label, description, trigger button,\n * error message, and popover/listbox that both SelectRoot and MultiSelectRoot use.\n * This is not exported as part of the public API.\n */\nfunction SelectBase({\n ariaSelectProps,\n triggerContent,\n triggerRef,\n label,\n description,\n isRequired,\n isDisabled,\n isLoading,\n errorMessage,\n size,\n emptyStateMessage,\n childCount,\n children,\n}: SelectBaseProps): ReactElement {\n // Generate unique IDs for accessibility\n const labelId = useId();\n const descriptionId = useId();\n const errorId = useId();\n\n // Determine if invalid based on errorMessage\n const isInvalid = Boolean(errorMessage);\n\n // Stack label, description, trigger and error vertically (matching TextField). Without\n // this the inline <label> and description <span> collapse onto one line, so the helper\n // text reads as part of the label instead of sitting beneath the field.\n const { className: rootClassName, ...restAriaSelectProps } = ariaSelectProps as { className?: string } & Record<string, unknown>;\n\n return (\n <AriaSelect\n {...restAriaSelectProps}\n className={cn('flex flex-col gap-1.5', rootClassName)}\n isInvalid={isInvalid}\n >\n {/* Label */}\n <Label id={labelId} className=\"text-sm font-medium text-[var(--content-foreground)]\">\n {label}\n {isRequired && <span className=\"text-[var(--destructive-background)] ml-1\">*</span>}\n </Label>\n\n {/* Description (if provided) — sits below the label; the root's gap handles spacing. */}\n {description && (\n <Text id={descriptionId} slot=\"description\" className=\"text-sm text-[var(--menu-muted)]\">\n {description}\n </Text>\n )}\n\n {/* Layer 1: Touch target (44px min) */}\n <div className={FIELD_TOUCH_TARGET}>\n {/* Layer 2: Visual trigger button */}\n <Button\n ref={triggerRef}\n className={selectTriggerVariants({ size, isInvalid })}\n aria-labelledby={labelId}\n aria-describedby={description ? descriptionId : errorMessage ? errorId : undefined}\n data-loading={isLoading}\n {...(isRequired && { 'aria-required': 'true' })}\n {...(isLoading && { 'aria-busy': 'true' })}\n {...((isDisabled || isLoading) && { 'aria-disabled': 'true' })}\n >\n {triggerContent}\n\n {/* Loading spinner or chevron icon */}\n {isLoading ? (\n <Loader2 className=\"ml-auto h-4 w-4 shrink-0 animate-spin text-[var(--menu-muted)]\" aria-hidden=\"true\" />\n ) : (\n <ChevronDown className=\"ml-auto h-4 w-4 shrink-0 text-[var(--menu-muted)]\" aria-hidden=\"true\" />\n )}\n </Button>\n </div>\n\n {/* Error Message — text only, no decorative icon. Errors are conveyed\n by the red border on the trigger plus the message text colour;\n a leading icon adds visual noise that the other field types don't\n carry (NumberField, TextField error message, RichTextEditor). */}\n <FieldError id={errorId} className={selectErrorVariants({ size })}>\n {({ validationErrors }) => {\n const displayError = errorMessage || validationErrors.join(' ');\n return displayError ? <>{displayError}</> : null;\n }}\n </FieldError>\n\n {/* Popover with ListBox */}\n <Popover\n shouldCloseOnInteractOutside={createInteractOutsideGuard()}\n className={selectPopoverVariants({ size })}\n >\n <ListBox className=\"outline-none\">\n {/* Loading skeleton (if loading and has children) */}\n {isLoading && childCount > 0 && LOADING_SKELETON}\n\n {/* Items or empty state */}\n {!isLoading && (\n <>\n {children}\n {/* Empty state - render as disabled item so popover can open */}\n {childCount === 0 && (\n <ListBoxItem\n id=\"__empty__\"\n textValue=\"empty\"\n isDisabled\n className=\"py-6 text-center text-sm text-[var(--menu-muted)] cursor-default pointer-events-none\"\n >\n <span role=\"status\">\n {emptyStateMessage || 'No options available'}\n </span>\n </ListBoxItem>\n )}\n </>\n )}\n </ListBox>\n </Popover>\n </AriaSelect>\n );\n}\n\n/**\n * Select Root Component (Single Selection Only)\n *\n * Main select component with controlled/uncontrolled modes for single selection.\n * For multiple selection, use MultiSelect component.\n * Delegates shared rendering to SelectBase.\n *\n * @see select-prd.md US-1 (Basic Single Selection)\n * @see plan.md Decision 28 (Ref forwarding to trigger button)\n */\nconst SelectRoot = forwardRef<HTMLButtonElement, Omit<SelectProps, 'selectionMode'>>(\n (\n {\n // Display props\n label,\n placeholder,\n description,\n\n // Selection props\n value,\n defaultValue,\n\n // State props\n isOpen,\n isDisabled = false,\n isRequired = false,\n disabledKeys,\n\n // Validation props\n validate,\n validationBehavior = 'aria',\n errorMessage,\n\n // Loading state\n isLoading = false,\n emptyStateMessage,\n\n // Form integration\n name,\n\n // Size variant\n size = 'default',\n\n // Event handlers\n onChange,\n onOpenChange,\n\n // Standard props\n className,\n children,\n ...props\n },\n ref\n ) => {\n // Warn if >1000 items (Decision 22: Large Item Count Handling)\n const childCount = Children.count(children);\n if (childCount > 1000) {\n console.warn(\n 'Select has >1000 items. Consider using Autocomplete component for better performance.'\n );\n }\n\n return (\n <SelectBase\n ariaSelectProps={{\n value: value as string,\n defaultValue: defaultValue as string,\n onChange: (key: unknown) => {\n if (onChange) {\n onChange(key as string);\n }\n },\n placeholder,\n disabledKeys,\n isOpen,\n onOpenChange,\n isDisabled: isDisabled || isLoading,\n isRequired,\n name,\n validate: validate as ((value: unknown) => true | string | null | undefined) | undefined,\n validationBehavior,\n className,\n ...props,\n }}\n triggerContent={<SelectValue className=\"flex-1 text-left truncate\" />}\n triggerRef={ref}\n label={label}\n description={description}\n isRequired={isRequired}\n isDisabled={isDisabled}\n isLoading={isLoading}\n errorMessage={errorMessage}\n size={size}\n emptyStateMessage={emptyStateMessage}\n childCount={childCount}\n >\n {children}\n </SelectBase>\n );\n }\n);\n\nSelectRoot.displayName = 'Select';\n\n/**\n * MultiSelect Root Component (Multiple Selection)\n *\n * Select component for multiple selection. Uses different API from single Select.\n * Delegates shared rendering to SelectBase, adding multi-select display value logic.\n *\n * @see select-prd.md US-6 (Multiple Selection)\n * @see plan.md Decision 28 (Ref forwarding to trigger button)\n */\nconst MultiSelectRoot = forwardRef<HTMLButtonElement, SelectProps>(\n (\n {\n // Display props\n label,\n placeholder,\n description,\n\n // Selection props\n value,\n defaultValue,\n selectionMode: _selectionMode = 'multiple',\n\n // State props\n isOpen,\n isDisabled = false,\n isRequired = false,\n disabledKeys,\n\n // Validation props\n validate,\n validationBehavior = 'aria',\n errorMessage,\n\n // Loading state\n isLoading = false,\n emptyStateMessage,\n\n // Form integration\n name,\n\n // Size variant\n size = 'default',\n\n // Event handlers\n onChange,\n onOpenChange,\n\n // Standard props\n className,\n children,\n ...props\n },\n ref\n ) => {\n // Warn if >1000 items\n const childCount = Children.count(children);\n if (childCount > 1000) {\n console.warn(\n 'Select has >1000 items. Consider using Autocomplete component for better performance.'\n );\n }\n\n // Build value-to-label map for display (memoized to prevent recreation on every render)\n const valueToLabelMap = useMemo(() => {\n const map = new Map<string, string>();\n const processChildren = (nodes: ReactNode): void => {\n Children.forEach(nodes, (child) => {\n if (isValidElement(child)) {\n const element = child as ReactElement<{ value?: string; children?: ReactNode }>;\n if (element.type === SelectItem || element.props?.value) {\n const itemValue = element.props.value;\n const itemChildren = element.props.children;\n if (itemValue && typeof itemChildren === 'string') {\n map.set(itemValue, itemChildren);\n }\n }\n if (element.props?.children) {\n processChildren(element.props.children);\n }\n }\n });\n };\n processChildren(children);\n return map;\n }, [children]);\n\n // Multi-select display logic (Decision 5: Multi-select threshold)\n // Memoized to prevent recalculation on every render\n const displayValue = useMemo(() => {\n if (!value || !Array.isArray(value) || value.length === 0) {\n return placeholder || '';\n }\n\n if (value.length <= 2) {\n // Show item labels for 1-2 items\n const labels = value.map(v => valueToLabelMap.get(v as string) || v);\n return labels.join(', ');\n }\n\n // Show count for 3+ items\n return `${value.length} items selected`;\n }, [value, valueToLabelMap, placeholder]);\n\n return (\n <SelectBase\n ariaSelectProps={{\n value: value as string[],\n defaultValue: defaultValue as string[],\n onChange: (keys: unknown) => {\n if (onChange) {\n onChange(keys as string[]);\n }\n },\n selectionMode: 'multiple',\n disabledKeys,\n isOpen,\n onOpenChange,\n isDisabled: isDisabled || isLoading,\n isRequired,\n name,\n validate: validate as ((value: unknown) => true | string | null | undefined) | undefined,\n validationBehavior,\n className,\n ...props,\n }}\n triggerContent={\n <span className=\"flex-1 text-left truncate\">\n {displayValue}\n </span>\n }\n triggerRef={ref}\n label={label}\n description={description}\n isRequired={isRequired}\n isDisabled={isDisabled}\n isLoading={isLoading}\n errorMessage={errorMessage}\n size={size}\n emptyStateMessage={emptyStateMessage}\n childCount={childCount}\n >\n {children}\n </SelectBase>\n );\n }\n);\n\nMultiSelectRoot.displayName = 'MultiSelect';\n\n/**\n * Select.Item Component\n *\n * Individual selectable item with checkmark icon.\n *\n * @see select-prd.md US-1 (Basic Single Selection)\n * @see plan.md Decision 6 (Left-side checkmark)\n * @see plan.md Decision 23 (textValue required for custom children)\n */\nconst SelectItem = memo(function SelectItem({ children, textValue, value, isDisabled = false, className, ...props }: SelectItemProps): ReactElement {\n // Validate textValue for custom children (Decision 23)\n if (!textValue && typeof children !== 'string') {\n const message = 'Select.Item with custom children requires textValue prop for accessibility';\n if (process.env.NODE_ENV === 'development') {\n throw new Error(message);\n } else {\n console.warn(message);\n }\n }\n\n return (\n <ListBoxItem\n id={value}\n textValue={textValue || (typeof children === 'string' ? children : undefined)}\n className={`${selectItemVariants({ size: 'default' })} ${className || ''}`}\n isDisabled={isDisabled}\n {...props}\n >\n {({ isSelected, selectionMode, isDisabled: itemDisabled }) => (\n <>\n {/* Checkmark icon (left side) - Decision 6 */}\n {selectionMode === 'multiple' ? (\n <CheckSquare\n className={`absolute left-2 h-4 w-4 ${isSelected ? 'visible' : 'invisible'}`}\n aria-hidden=\"true\"\n />\n ) : (\n isSelected && <Check className=\"absolute left-2 h-4 w-4\" aria-hidden=\"true\" />\n )}\n <span className={itemDisabled ? 'text-[var(--menu-muted)]' : ''}>\n {children}\n </span>\n </>\n )}\n </ListBoxItem>\n );\n});\n\nSelectItem.displayName = 'SelectItem';\n\n/**\n * Select.Section Component\n *\n * Groups related items with optional header.\n *\n * @see select-prd.md US-3 (Grouped Options with Sections)\n */\nfunction SelectSection({ children, className, ...props }: SelectSectionProps): ReactElement {\n return (\n <ListBoxSection className={`border-t border-[var(--border)] first:border-t-0 ${className || ''}`} {...props}>\n {children}\n </ListBoxSection>\n );\n}\n\nSelectSection.displayName = 'SelectSection';\n\n/**\n * Select.Header Component\n *\n * Section header with non-interactive label.\n *\n * @see select-prd.md US-3 (Grouped Options with Sections)\n */\nfunction SelectHeader({ children, className, ...props }: SelectHeaderProps): ReactElement {\n return (\n <Header className={`${selectSectionVariants({ size: 'default' })} ${className || ''}`} {...props}>\n {children}\n </Header>\n );\n}\n\nSelectHeader.displayName = 'SelectHeader';\n\n/**\n * Compound Component Exports\n *\n * Uses Object.assign() for compound components (e.g., Select.Item, Select.Section).\n * Named exports (SelectItem, SelectSection, SelectHeader) are also available below\n * for better tree-shaking. Prefer named exports in new code.\n *\n * @deprecated (v2) The Object.assign compound pattern will be removed in v2.\n * Migrate to named imports: `import { SelectItem, SelectSection, SelectHeader } from '...'`\n *\n * @see GUIDE.mdx (Compound component pattern)\n */\nexport const Select = Object.assign(SelectRoot, {\n Item: SelectItem,\n Section: SelectSection,\n Header: SelectHeader,\n});\n\nexport const MultiSelect = Object.assign(MultiSelectRoot, {\n Item: SelectItem,\n Section: SelectSection,\n Header: SelectHeader,\n});\n\n// Named exports for individual components (preferred for tree-shaking)\nexport { SelectRoot, MultiSelectRoot, SelectItem, SelectSection, SelectHeader };\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 } from 'react';\nimport type {\n SelectProps as AriaSelectProps,\n ListBoxItemProps as AriaListBoxItemProps,\n} from 'react-aria-components';\n\n/**\n * Select size variants\n *\n * @see select-prd.md US-9 (Visual States - Size Variants)\n * @see plan.md Decision 4 (Include sm size with warning for desktop-only)\n */\nexport const SelectSizeSchema = z.enum(['sm', 'default', 'lg']);\nexport type SelectSize = z.infer<typeof SelectSizeSchema>;\n\n/**\n * Select selection mode\n *\n * @see select-prd.md US-6 (Multiple Selection)\n */\nexport const SelectionModeSchema = z.enum(['single', 'multiple']);\nexport type SelectionMode = z.infer<typeof SelectionModeSchema>;\n\n/**\n * Select validation behavior\n *\n * @see select-prd.md US-4 (Validation and Error Messages)\n */\nexport const ValidationBehaviorSchema = z.enum(['native', 'aria']);\nexport type ValidationBehavior = z.infer<typeof ValidationBehaviorSchema>;\n\n/**\n * Select root component props schema\n *\n * @see select-prd.md US-1 (Basic Single Selection)\n * @see select-prd.md US-4 (Validation and Error Messages)\n * @see select-prd.md US-5 (Disabled States)\n * @see select-prd.md US-6 (Multiple Selection)\n * @see select-prd.md US-7 (Async Data Loading)\n * @see select-prd.md US-10 (Form Integration)\n */\nexport const SelectPropsSchema = BaseComponentPropsSchema.extend({\n // Display props (US-1)\n label: z.string(), // Required for accessibility\n placeholder: z.string().optional(),\n description: z.string().optional(),\n\n // Selection props (US-1, US-6)\n value: z.union([z.string(), z.array(z.string())]).optional(),\n defaultValue: z.union([z.string(), z.array(z.string())]).optional(),\n selectionMode: SelectionModeSchema.optional().default('single'),\n\n // State props (US-1, US-5)\n isOpen: z.boolean().optional(),\n isDisabled: z.boolean().optional().default(false),\n isRequired: z.boolean().optional().default(false),\n disabledKeys: z.array(z.string()).optional(),\n\n // Validation props (US-4)\n validate: z\n .custom<(value: string | string[]) => string | undefined>()\n .optional(),\n validationBehavior: ValidationBehaviorSchema.optional().default('aria'),\n errorMessage: z.string().optional(),\n\n // Loading state (US-7)\n isLoading: z.boolean().optional().default(false),\n emptyStateMessage: z.string().optional(),\n\n // Form integration (US-10)\n name: z.string().optional(),\n\n // Size variant (US-9)\n size: SelectSizeSchema.optional().default('default'),\n\n // Event handlers (US-1)\n onChange: z\n .custom<(value: string | string[]) => void>()\n .optional(),\n onOpenChange: z.custom<(isOpen: boolean) => void>().optional(),\n\n // Children (Select.Item, Select.Section components)\n children: z.custom<ReactNode>(),\n});\n\nexport interface SelectPropsOwn {\n className?: string;\n children?: ReactNode;\n id?: string;\n 'aria-label'?: string;\n 'aria-labelledby'?: string;\n 'aria-describedby'?: string;\n 'data-testid'?: string;\n label: string;\n placeholder?: string;\n description?: string;\n value?: string | string[];\n defaultValue?: string | string[];\n selectionMode?: SelectionMode;\n isOpen?: boolean;\n isDisabled?: boolean;\n isRequired?: boolean;\n disabledKeys?: string[];\n validate?: (value: string | string[]) => string | undefined;\n validationBehavior?: ValidationBehavior;\n errorMessage?: string;\n isLoading?: boolean;\n emptyStateMessage?: string;\n name?: string;\n size?: SelectSize;\n onChange?: (value: string | string[]) => void;\n onOpenChange?: (isOpen: boolean) => void;\n}\n\nexport type SelectProps = SelectPropsOwn &\n Omit<AriaSelectProps<object>, keyof SelectPropsOwn>;\n\n/**\n * Select.Item props schema\n *\n * @see select-prd.md US-1 (Basic Single Selection)\n * @see select-prd.md US-5 (Disabled States)\n * @see select-prd.md US-8 (Custom Value Rendering)\n * @see plan.md Decision 23 (textValue required for custom children)\n */\nexport const SelectItemPropsSchema = BaseComponentPropsSchema.extend({\n // Item value (required)\n value: z.string(),\n\n // Text value for typeahead and accessibility (required for custom children)\n textValue: z.string().optional(),\n\n // Disabled state\n isDisabled: z.boolean().optional().default(false),\n\n // Item content\n children: z.custom<ReactNode>(),\n\n // Optional className for custom styling\n className: z.string().optional(),\n});\n\nexport interface SelectItemPropsOwn {\n className?: string;\n children?: ReactNode;\n id?: string;\n 'aria-label'?: string;\n 'data-testid'?: string;\n value: string;\n textValue?: string;\n isDisabled?: boolean;\n}\n\nexport type SelectItemProps = SelectItemPropsOwn &\n Omit<AriaListBoxItemProps, keyof SelectItemPropsOwn>;\n\n/**\n * Select.Section props schema\n *\n * @see select-prd.md US-3 (Grouped Options with Sections)\n */\nexport const SelectSectionPropsSchema = BaseComponentPropsSchema.extend({\n // Section content (typically Select.Header + Select.Item components)\n children: z.custom<ReactNode>(),\n\n // Optional className for custom styling\n className: z.string().optional(),\n});\n\nexport interface SelectSectionProps {\n className?: string;\n children?: ReactNode;\n id?: string;\n 'data-testid'?: string;\n}\n\n/**\n * Select.Header props schema (for section headers)\n *\n * @see select-prd.md US-3 (Grouped Options with Sections)\n */\nexport const SelectHeaderPropsSchema = BaseComponentPropsSchema.extend({\n // Header text\n children: z.custom<ReactNode>(),\n\n // Optional className for header styling\n className: z.string().optional(),\n});\n\nexport interface SelectHeaderProps {\n className?: string;\n children?: ReactNode;\n id?: string;\n 'data-testid'?: string;\n}\n\n/**\n * CVA variant configuration types\n * Used for class-variance-authority integration\n */\nexport type SelectVariantSize = SelectSize;\nexport type SelectVariantSelectionMode = SelectionMode;\n"]}
1
+ {"version":3,"sources":["../../../src/styles/shared-variants.ts","../../../src/utils/cn.ts","../../../src/utils/browserExtensionOverlay.ts","../../../src/elements/Select/Select.styles.ts","../../../src/elements/Select/Select.tsx","../../../src/schemas/BaseComponentProps.ts","../../../src/elements/Select/Select.types.ts"],"names":["FIELD_HEIGHTS","FIELD_INPUT_SIZES","FIELD_TOUCH_TARGET","cn","inputs","twMerge","clsx","isExtensionInjectedElement","element","node","depth","tag","root","custom","parent","createInteractOutsideGuard","consumerShouldClose","selectTriggerVariants","cva","selectItemVariants","selectPopoverVariants","SELECT_POPOVER_MAX_HEIGHT","selectSectionVariants","selectErrorVariants","LOADING_SKELETON","_","i","jsx","SelectBase","ariaSelectProps","triggerContent","triggerRef","label","description","isRequired","isDisabled","isLoading","errorMessage","size","emptyStateMessage","childCount","children","labelId","useId","descriptionId","errorId","isInvalid","rootClassName","restAriaSelectProps","jsxs","AriaSelect","Label","Text","Button","Loader2","ChevronDown","FieldError","validationErrors","displayError","Fragment","Popover","ListBox","ListBoxItem","SelectRoot","forwardRef","placeholder","value","defaultValue","isOpen","disabledKeys","validate","validationBehavior","name","onChange","onOpenChange","className","props","ref","Children","key","SelectValue","MultiSelectRoot","_selectionMode","valueToLabelMap","useMemo","map","processChildren","nodes","child","isValidElement","SelectItem","itemValue","itemChildren","displayValue","v","keys","memo","textValue","message","isSelected","selectionMode","itemDisabled","CheckSquare","Check","SelectSection","ListBoxSection","SelectHeader","Header","Select","MultiSelect","BaseComponentPropsSchema","z","SelectSizeSchema","SelectionModeSchema","ValidationBehaviorSchema","SelectPropsSchema","SelectItemPropsSchema","SelectSectionPropsSchema","SelectHeaderPropsSchema"],"mappings":"+bAyHO,IAAMA,CAAAA,CAAgB,CAC3B,GAAI,KAAA,CACJ,OAAA,CAAS,OACT,EAAA,CAAI,MACN,EAQaC,CAAAA,CAAoB,CAC/B,EAAA,CAAI,CAAA,EAAGD,CAAAA,CAAc,EAAE,gBACvB,OAAA,CAAS,CAAA,EAAGA,EAAc,OAAO,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MAAA,GAAS,QAAA,EACxB,CAAC,CAAA,CAqBYM,EAAAA,CAA2BP,CAAAA,CAAyB,MAAA,CAAO,CAEtE,QAAA,CAAUC,EAAE,MAAA,EAAkB,CAG9B,UAAWA,CAAAA,CAAE,MAAA,GAAS,QAAA,EACxB,CAAC,CAAA,CAcYO,EAAAA,CAA0BR,CAAAA,CAAyB,OAAO,CAErE,QAAA,CAAUC,CAAAA,CAAE,MAAA,EAAkB,CAG9B,SAAA,CAAWA,EAAE,MAAA,EAAO,CAAE,QAAA,EACxB,CAAC","file":"index.mjs","sourcesContent":["/**\n * Shared CVA Variant Utilities\n *\n * Common patterns extracted from component variants for consistency and reduced bundle size.\n * Use these constants in CVA definitions to ensure consistent styling across Themis.\n *\n * @see interaction-states.ts for interaction-specific styles (focus, hover, pressed)\n */\n\n// =============================================================================\n// Focus Ring Patterns\n// =============================================================================\n\n/**\n * Focus-within ring (for container elements with focusable children)\n * Use when the container should show focus when any child is focused\n */\nexport const FOCUS_WITHIN_RING = [\n 'focus-within:outline-none',\n 'focus-within:ring-2',\n 'focus-within:ring-[var(--ring)]',\n 'focus-within:ring-offset-2',\n] as const;\n\n/**\n * Focus-visible ring (for directly focusable elements)\n * Use for buttons, inputs, and other interactive elements\n */\nexport const FOCUS_VISIBLE_RING = [\n 'focus-visible:outline-none',\n 'focus-visible:ring-2',\n 'focus-visible:ring-[var(--ring)]',\n 'focus-visible:ring-offset-2',\n] as const;\n\n/**\n * Standard focus ring (for elements using :focus pseudo-class)\n * Prefer focus-visible when possible for better UX\n */\nexport const FOCUS_RING = [\n 'focus:outline-none',\n 'focus:ring-2',\n 'focus:ring-[var(--ring)]',\n] as const;\n\n/**\n * Focus with background change (for segments, cells, menu items)\n */\nexport const FOCUS_HIGHLIGHT = [\n 'focus:outline-none',\n 'focus:bg-[var(--accent)]',\n 'focus:text-[var(--accent-foreground)]',\n] as const;\n\n// =============================================================================\n// Disabled State Patterns\n// =============================================================================\n\n/**\n * Standard disabled state using disabled attribute\n */\nexport const DISABLED_STANDARD = [\n 'disabled:pointer-events-none',\n 'disabled:opacity-50',\n] as const;\n\n/**\n * Disabled state using data attribute (React Aria pattern)\n */\nexport const DISABLED_DATA_ATTR = [\n 'data-[disabled]:pointer-events-none',\n 'data-[disabled]:opacity-50',\n 'data-[disabled]:cursor-not-allowed',\n] as const;\n\n// =============================================================================\n// Size-Based Text Variants\n// =============================================================================\n\n/**\n * Small text size scale (xs -> sm -> base)\n */\nexport const TEXT_SIZE_SMALL_SCALE = {\n sm: 'text-xs',\n default: 'text-sm',\n lg: 'text-base',\n} as const;\n\n/**\n * Medium text size scale (sm -> base -> lg)\n */\nexport const TEXT_SIZE_MEDIUM_SCALE = {\n sm: 'text-sm',\n default: 'text-base',\n lg: 'text-lg',\n} as const;\n\n// =============================================================================\n// Touch Target Utilities\n// =============================================================================\n\n/**\n * WCAG 2.2 AAA minimum touch target (44x44px)\n */\nexport const TOUCH_TARGET_MIN = [\n 'min-h-[44px]',\n 'min-w-[44px]',\n] as const;\n\n/**\n * Common button/cell sizes with touch target compliance\n */\nexport const INTERACTIVE_SIZES = {\n sm: 'h-9 w-9', // 36px - desktop only, NOT AAA compliant\n default: 'h-11 w-11', // 44px - AAA compliant\n lg: 'h-14 w-14', // 56px - AAA compliant, enhanced\n} as const;\n\n/**\n * Height-only sizes for fields and inputs\n */\nexport const FIELD_HEIGHTS = {\n sm: 'h-9', // 36px\n default: 'h-10', // 40px\n lg: 'h-11', // 44px\n} as const;\n\n/**\n * Layer 2: Visual sizing for form field inputs (height + padding + font).\n * Use on the <input>, <select>, or trigger element itself.\n *\n * Components may append additional classes (e.g. gap-* for segmented fields, py-* for text inputs).\n */\nexport const FIELD_INPUT_SIZES = {\n sm: `${FIELD_HEIGHTS.sm} px-2 text-xs`,\n default: `${FIELD_HEIGHTS.default} px-3 text-sm`,\n lg: `${FIELD_HEIGHTS.lg} px-4 text-base`,\n} as const;\n\n/**\n * Layer 1: Invisible touch target wrapper for form fields.\n * Apply to a <label> (or wrapper div) around the input element.\n * The <label> natively routes clicks/taps to the contained input\n * without JavaScript — achieving a 44px touch target while the\n * input stays at its visual height (h-9/h-10/h-11).\n */\nexport const FIELD_TOUCH_TARGET = 'min-h-[44px] flex items-center' as const;\n\n// =============================================================================\n// Message/Feedback Patterns\n// =============================================================================\n\n/**\n * Error message styling\n */\nexport const ERROR_MESSAGE_BASE = [\n 'flex',\n 'items-center',\n 'gap-1.5',\n 'text-[var(--destructive-background)]',\n] as const;\n\n/**\n * Success message styling\n */\nexport const SUCCESS_MESSAGE_BASE = [\n 'flex',\n 'items-center',\n 'gap-1.5',\n 'text-[var(--success-background)]',\n] as const;\n\n/**\n * Description/helper text styling\n */\nexport const DESCRIPTION_BASE = [\n 'text-[var(--menu-muted)]',\n] as const;\n\n/**\n * Label base styling\n */\nexport const LABEL_BASE = [\n 'font-medium',\n 'text-[var(--content-foreground)]',\n] as const;\n\n/**\n * Required indicator pattern\n */\nexport const REQUIRED_INDICATOR = \"after:content-['*'] after:ml-0.5 after:text-[var(--destructive-background)]\";\n\n// =============================================================================\n// Animation Patterns\n// =============================================================================\n\n/**\n * Popover/dropdown entry animation\n */\nexport const POPOVER_ANIMATION_IN = [\n 'data-[entering]:animate-in',\n 'data-[entering]:fade-in-0',\n 'data-[entering]:zoom-in-95',\n] as const;\n\n/**\n * Popover/dropdown exit animation\n */\nexport const POPOVER_ANIMATION_OUT = [\n 'data-[exiting]:animate-out',\n 'data-[exiting]:fade-out-0',\n 'data-[exiting]:zoom-out-95',\n] as const;\n\n/**\n * Modal content enter animation (fade + zoom)\n * Uses React Aria data-[entering]/data-[exiting] attributes\n */\nexport const MODAL_ANIMATION_IN = [\n 'data-[entering]:animate-in',\n 'data-[entering]:fade-in-0',\n 'data-[entering]:zoom-in-95',\n 'data-[entering]:duration-200',\n 'data-[entering]:ease-out',\n] as const;\n\n/**\n * Modal content exit animation (fade + zoom)\n * Uses React Aria data-[entering]/data-[exiting] attributes\n */\nexport const MODAL_ANIMATION_OUT = [\n 'data-[exiting]:animate-out',\n 'data-[exiting]:fade-out-0',\n 'data-[exiting]:zoom-out-95',\n 'data-[exiting]:duration-150',\n 'data-[exiting]:ease-in',\n] as const;\n\n/**\n * Modal slide enter animation (fade + slide up)\n */\nexport const MODAL_SLIDE_IN = [\n 'data-[entering]:animate-in',\n 'data-[entering]:fade-in-0',\n 'data-[entering]:slide-in-from-bottom-4',\n 'data-[entering]:duration-200',\n 'data-[entering]:ease-out',\n] as const;\n\n/**\n * Modal slide exit animation (fade + slide down)\n */\nexport const MODAL_SLIDE_OUT = [\n 'data-[exiting]:animate-out',\n 'data-[exiting]:fade-out-0',\n 'data-[exiting]:slide-out-to-bottom-4',\n 'data-[exiting]:duration-150',\n 'data-[exiting]:ease-in',\n] as const;\n\n/**\n * Directional slide animations for edge-anchored drawers (Modal `position` variant).\n *\n * Unitless `slide-in-from-*` / `slide-out-to-*` translate the full extent of the\n * element (100%), so the drawer slides all the way in from / out to its anchored\n * edge — distinct from `MODAL_SLIDE_*` above, which is the small 1rem nudge used by\n * the centred `slide` animation. No `fade` is paired here: a drawer slides, it\n * does not fade. Honour `prefers-reduced-motion` via REDUCED_MOTION on the element.\n */\nexport const MODAL_SLIDE_IN_LEFT = [\n 'data-[entering]:animate-in',\n 'data-[entering]:slide-in-from-left',\n 'data-[entering]:duration-200',\n 'data-[entering]:ease-out',\n] as const;\n\nexport const MODAL_SLIDE_OUT_LEFT = [\n 'data-[exiting]:animate-out',\n 'data-[exiting]:slide-out-to-left',\n 'data-[exiting]:duration-150',\n 'data-[exiting]:ease-in',\n] as const;\n\nexport const MODAL_SLIDE_IN_RIGHT = [\n 'data-[entering]:animate-in',\n 'data-[entering]:slide-in-from-right',\n 'data-[entering]:duration-200',\n 'data-[entering]:ease-out',\n] as const;\n\nexport const MODAL_SLIDE_OUT_RIGHT = [\n 'data-[exiting]:animate-out',\n 'data-[exiting]:slide-out-to-right',\n 'data-[exiting]:duration-150',\n 'data-[exiting]:ease-in',\n] as const;\n\nexport const MODAL_SLIDE_IN_TOP = [\n 'data-[entering]:animate-in',\n 'data-[entering]:slide-in-from-top',\n 'data-[entering]:duration-200',\n 'data-[entering]:ease-out',\n] as const;\n\nexport const MODAL_SLIDE_OUT_TOP = [\n 'data-[exiting]:animate-out',\n 'data-[exiting]:slide-out-to-top',\n 'data-[exiting]:duration-150',\n 'data-[exiting]:ease-in',\n] as const;\n\nexport const MODAL_SLIDE_IN_BOTTOM = [\n 'data-[entering]:animate-in',\n 'data-[entering]:slide-in-from-bottom',\n 'data-[entering]:duration-200',\n 'data-[entering]:ease-out',\n] as const;\n\nexport const MODAL_SLIDE_OUT_BOTTOM = [\n 'data-[exiting]:animate-out',\n 'data-[exiting]:slide-out-to-bottom',\n 'data-[exiting]:duration-150',\n 'data-[exiting]:ease-in',\n] as const;\n\n/**\n * Modal overlay enter/exit animation (fade only)\n */\nexport const MODAL_OVERLAY_IN = [\n 'data-[entering]:animate-in',\n 'data-[entering]:fade-in-0',\n 'data-[entering]:duration-200',\n] as const;\n\nexport const MODAL_OVERLAY_OUT = [\n 'data-[exiting]:animate-out',\n 'data-[exiting]:fade-out-0',\n 'data-[exiting]:duration-150',\n] as const;\n\n/**\n * Reduced motion support (WCAG 2.2)\n */\nexport const REDUCED_MOTION = [\n 'motion-reduce:transition-none',\n 'motion-reduce:animate-none',\n] as const;\n\n/**\n * Standard transition for colors\n */\nexport const TRANSITION_COLORS = [\n 'transition-colors',\n 'duration-200',\n] as const;\n\n/**\n * Fast transition for interactions\n */\nexport const TRANSITION_FAST = [\n 'transition-colors',\n 'duration-150',\n] as const;\n\n// =============================================================================\n// Hover State Patterns\n// =============================================================================\n\n/**\n * Accent background on hover (for interactive items)\n */\nexport const HOVER_ACCENT = [\n 'hover:bg-[var(--accent)]',\n 'hover:text-[var(--accent-foreground)]',\n] as const;\n\n// =============================================================================\n// Helper Functions\n// =============================================================================\n\n/**\n * Combines multiple style arrays into a flat array for CVA base styles\n */\nexport function combineStyles(...styles: (readonly string[] | string)[]): string[] {\n return styles.flatMap(s => Array.isArray(s) ? [...s] : [s]);\n}\n","/**\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","/**\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';\nimport { FIELD_INPUT_SIZES } from '../../styles';\nimport type { SelectSize } from './Select.types';\n\n/**\n * CVA Variants for Select Trigger Button\n *\n * Styles the trigger button that opens the select popover.\n * All sizes enforce 44px minimum touch targets for WCAG 2.2 AAA compliance.\n */\nexport const selectTriggerVariants = cva(\n [\n // Base styles\n 'flex',\n 'w-full',\n 'items-center',\n 'justify-between',\n 'gap-2',\n 'rounded-md',\n 'border',\n 'bg-[var(--content-background)]',\n 'text-[var(--content-foreground)]',\n 'transition-colors',\n 'duration-200',\n 'outline-none',\n // Focus ring (WCAG 2.2 AAA - 7:1 contrast)\n 'focus-visible:ring-2',\n 'focus-visible:ring-[var(--ring)]',\n 'focus-visible:ring-offset-2',\n // Hover state\n 'hover:bg-[var(--accent)]/10',\n // Disabled state\n 'disabled:cursor-not-allowed',\n 'disabled:opacity-50',\n // Loading state\n 'data-[loading=true]:cursor-wait',\n // Truncate text\n 'truncate',\n ],\n {\n variants: {\n size: {\n sm: `${FIELD_INPUT_SIZES.sm} pr-1`,\n default: `${FIELD_INPUT_SIZES.default} pr-1.5`,\n lg: `${FIELD_INPUT_SIZES.lg} pr-2`,\n },\n isInvalid: {\n true: 'border-[var(--destructive-background)]',\n false: 'border-[var(--input-border)] hover:border-[var(--input-border)]/80',\n },\n },\n defaultVariants: {\n size: 'default',\n isInvalid: false,\n },\n }\n);\n\n/**\n * CVA Variants for Select Items\n *\n * Styles individual selectable items within the listbox.\n * All sizes enforce 44px minimum touch targets for WCAG 2.2 AAA compliance.\n */\nexport const selectItemVariants = cva(\n [\n // Base styles\n 'relative',\n 'flex',\n 'w-full',\n 'cursor-pointer',\n 'select-none',\n 'items-center',\n 'rounded-sm',\n 'outline-none',\n 'transition-colors',\n // Padding for checkmark icon (left side)\n 'pl-8',\n 'pr-2',\n // Hover state\n 'hover:bg-[var(--accent)]',\n 'hover:text-[var(--accent-foreground)]',\n // Focus state\n 'focus:bg-[var(--accent)]',\n 'focus:text-[var(--accent-foreground)]',\n // Selected state\n 'data-[selected=true]:bg-[var(--accent)]',\n 'data-[selected=true]:text-[var(--accent-foreground)]',\n // Disabled state\n 'data-[disabled=true]:pointer-events-none',\n 'data-[disabled=true]:opacity-50',\n 'data-[disabled=true]:text-[var(--menu-muted)]',\n ],\n {\n variants: {\n size: {\n sm: `${FIELD_INPUT_SIZES.sm} py-1`,\n default: `${FIELD_INPUT_SIZES.default} py-2`,\n lg: `${FIELD_INPUT_SIZES.lg} py-3`,\n },\n },\n defaultVariants: {\n size: 'default',\n },\n }\n);\n\n/**\n * CVA Variants for Select Popover\n *\n * Styles the popover container that holds the listbox.\n * Uses menu tokens to match Dropdown styling.\n */\nexport const selectPopoverVariants = cva(\n [\n // Base styles - use menu tokens to match Dropdown styling\n 'z-50',\n 'w-[--trigger-width]',\n 'rounded-md',\n 'border',\n 'border-[var(--menu-border)]',\n 'bg-[var(--menu-background)]',\n 'text-[var(--menu-foreground)]',\n 'outline-none',\n 'overflow-auto',\n // Animations\n 'data-[entering]:animate-in',\n 'data-[entering]:fade-in-0',\n 'data-[entering]:zoom-in-95',\n 'data-[exiting]:animate-out',\n 'data-[exiting]:fade-out-0',\n 'data-[exiting]:zoom-out-95',\n ],\n {\n variants: {\n size: {\n // The `max-h-*` classes are a no-JS/pre-positioning fallback only. Once\n // React Aria positions the popover it writes an inline `max-height` that\n // wins over these classes, so the real cap comes from the `maxHeight`\n // prop (see SELECT_POPOVER_MAX_HEIGHT) which React Aria clamps to the\n // available viewport space.\n sm: 'max-h-[200px] p-1',\n default: 'max-h-[300px] p-1',\n lg: 'max-h-[400px] p-1',\n },\n },\n defaultVariants: {\n size: 'default',\n },\n }\n);\n\n/**\n * Max popover height (px) passed to React Aria's `<Popover maxHeight>` prop.\n *\n * React Aria only honours a height cap supplied as a prop — it overrides any\n * CSS `max-height` with an inline style on open. Passing these values lets it\n * clamp the popover to `min(cap, availableViewportSpace)` so the list never\n * runs off the page and scrolls internally instead. Values match the\n * `max-h-*` fallbacks in selectPopoverVariants.\n */\nexport const SELECT_POPOVER_MAX_HEIGHT: Record<SelectSize, number> = {\n sm: 200,\n default: 300,\n lg: 400,\n};\n\n/**\n * CVA Variants for Section Headers\n *\n * Styles the non-interactive section header labels within grouped selects.\n */\nexport const selectSectionVariants = cva(\n [\n 'px-2',\n 'py-1.5',\n 'text-xs',\n 'font-semibold',\n 'text-[var(--menu-muted)]',\n 'uppercase',\n 'tracking-wider',\n ],\n {\n variants: {\n size: {\n sm: 'px-2 py-1 text-[10px]',\n default: 'px-2 py-1 text-xs',\n lg: 'px-2 py-1.5 text-xs',\n },\n },\n defaultVariants: {\n size: 'default',\n },\n }\n);\n\n/**\n * CVA Variants for Error Messages\n *\n * Styles the error message displayed below the select trigger.\n */\nexport const selectErrorVariants = cva(\n [\n 'flex',\n 'items-center',\n 'gap-1.5',\n 'text-sm',\n 'font-medium',\n 'text-[var(--destructive-background)]',\n // mt-1 (4px) per design spec \"Input → hint: 4px\"; variants below override for size\n 'mt-1',\n ],\n {\n variants: {\n size: {\n sm: 'text-xs mt-1',\n default: 'text-sm mt-1',\n lg: 'text-base mt-1',\n },\n },\n defaultVariants: {\n size: 'default',\n },\n }\n);\n\n/**\n * Type exports for variant props.\n * Allows TypeScript inference of variant combinations.\n */\nexport type SelectTriggerVariantProps = VariantProps<typeof selectTriggerVariants>;\nexport type SelectItemVariantProps = VariantProps<typeof selectItemVariants>;\nexport type SelectPopoverVariantProps = VariantProps<typeof selectPopoverVariants>;\nexport type SelectSectionVariantProps = VariantProps<typeof selectSectionVariants>;\nexport type SelectErrorVariantProps = VariantProps<typeof selectErrorVariants>;\n","'use client';\n\n/**\n * Select Component - Implementation\n *\n * Accessible select/dropdown component combining React Aria primitives with ShadCN styling.\n * Follows Themis library patterns with compound component structure.\n *\n * Architecture:\n * - SelectBase: Internal component containing shared label, description, trigger, error, and listbox rendering.\n * - SelectRoot: Single selection wrapper (thin layer over SelectBase).\n * - MultiSelectRoot: Multiple selection wrapper with display value logic (thin layer over SelectBase).\n * - SelectItem, SelectSection, SelectHeader: Compound sub-components.\n *\n * @see select-prd.md (Full requirements)\n * @see Select.types.ts (Zod schemas)\n * @see Select.styles.ts (CVA variant definitions)\n * @see plan.md (Implementation plan)\n */\n\nimport {\n forwardRef,\n memo,\n Children,\n useId,\n useMemo,\n isValidElement,\n type ReactElement,\n type ReactNode,\n type Ref,\n} from 'react';\nimport {\n Select as AriaSelect,\n Label,\n Button,\n SelectValue,\n Popover,\n ListBox,\n ListBoxItem,\n ListBoxSection,\n Header,\n Text,\n FieldError,\n} from 'react-aria-components';\nimport { Check, CheckSquare, ChevronDown, Loader2 } from 'lucide-react';\nimport { FIELD_TOUCH_TARGET } from '../../styles';\nimport { cn } from '../../utils/cn';\nimport { createInteractOutsideGuard } from '../../utils/browserExtensionOverlay';\nimport type {\n SelectProps,\n SelectItemProps,\n SelectSectionProps,\n SelectHeaderProps,\n SelectSize,\n} from './Select.types';\nimport {\n selectTriggerVariants,\n selectItemVariants,\n selectPopoverVariants,\n selectSectionVariants,\n selectErrorVariants,\n SELECT_POPOVER_MAX_HEIGHT,\n} from './Select.styles';\n\n// Re-export CVA variants so existing imports from './Select' continue to work\nexport {\n selectTriggerVariants,\n selectItemVariants,\n selectPopoverVariants,\n selectSectionVariants,\n selectErrorVariants,\n} from './Select.styles';\n\n// Hoisted static JSX — avoids re-creation on every render\nconst LOADING_SKELETON = Array.from({ length: 3 }).map((_, i) => (\n <div\n key={`skeleton-${i}`}\n className=\"h-11 px-4 py-2\"\n >\n <div className=\"h-4 bg-[var(--accent-background)] rounded animate-pulse\" />\n </div>\n));\n\n/**\n * Internal props for SelectBase.\n * Extends the shared props with selection-mode-specific configuration.\n */\ninterface SelectBaseProps {\n /** The AriaSelect props to spread onto the root element */\n ariaSelectProps: Record<string, unknown>;\n /** Content to render inside the trigger button (SelectValue for single, span for multi) */\n triggerContent: ReactNode;\n /** Ref to forward to the trigger button */\n triggerRef: Ref<HTMLButtonElement>;\n /** Label text */\n label: string;\n /** Optional description text */\n description?: string;\n /** Whether the field is required */\n isRequired: boolean;\n /** Whether the field is disabled */\n isDisabled: boolean;\n /** Whether the field is in a loading state */\n isLoading: boolean;\n /** Error message to display */\n errorMessage?: string;\n /** Size variant */\n size: SelectSize;\n /** Empty state message override */\n emptyStateMessage?: string;\n /** Child count (pre-computed by parent) */\n childCount: number;\n /** Children to render in the listbox */\n children: ReactNode;\n}\n\n/**\n * SelectBase - Internal shared rendering component\n *\n * Contains the shared rendering logic for label, description, trigger button,\n * error message, and popover/listbox that both SelectRoot and MultiSelectRoot use.\n * This is not exported as part of the public API.\n */\nfunction SelectBase({\n ariaSelectProps,\n triggerContent,\n triggerRef,\n label,\n description,\n isRequired,\n isDisabled,\n isLoading,\n errorMessage,\n size,\n emptyStateMessage,\n childCount,\n children,\n}: SelectBaseProps): ReactElement {\n // Generate unique IDs for accessibility\n const labelId = useId();\n const descriptionId = useId();\n const errorId = useId();\n\n // Determine if invalid based on errorMessage\n const isInvalid = Boolean(errorMessage);\n\n // Stack label, description, trigger and error vertically (matching TextField). Without\n // this the inline <label> and description <span> collapse onto one line, so the helper\n // text reads as part of the label instead of sitting beneath the field.\n const { className: rootClassName, ...restAriaSelectProps } = ariaSelectProps as { className?: string } & Record<string, unknown>;\n\n return (\n <AriaSelect\n {...restAriaSelectProps}\n className={cn('flex flex-col gap-1.5', rootClassName)}\n isInvalid={isInvalid}\n >\n {/* Label */}\n <Label id={labelId} className=\"text-sm font-medium text-[var(--content-foreground)]\">\n {label}\n {isRequired && <span className=\"text-[var(--destructive-background)] ml-1\">*</span>}\n </Label>\n\n {/* Description (if provided) — sits below the label; the root's gap handles spacing. */}\n {description && (\n <Text id={descriptionId} slot=\"description\" className=\"text-sm text-[var(--menu-muted)]\">\n {description}\n </Text>\n )}\n\n {/* Layer 1: Touch target (44px min) */}\n <div className={FIELD_TOUCH_TARGET}>\n {/* Layer 2: Visual trigger button */}\n <Button\n ref={triggerRef}\n className={selectTriggerVariants({ size, isInvalid })}\n aria-labelledby={labelId}\n aria-describedby={description ? descriptionId : errorMessage ? errorId : undefined}\n data-loading={isLoading}\n {...(isRequired && { 'aria-required': 'true' })}\n {...(isLoading && { 'aria-busy': 'true' })}\n {...((isDisabled || isLoading) && { 'aria-disabled': 'true' })}\n >\n {triggerContent}\n\n {/* Loading spinner or chevron icon */}\n {isLoading ? (\n <Loader2 className=\"ml-auto h-4 w-4 shrink-0 animate-spin text-[var(--menu-muted)]\" aria-hidden=\"true\" />\n ) : (\n <ChevronDown className=\"ml-auto h-4 w-4 shrink-0 text-[var(--menu-muted)]\" aria-hidden=\"true\" />\n )}\n </Button>\n </div>\n\n {/* Error Message — text only, no decorative icon. Errors are conveyed\n by the red border on the trigger plus the message text colour;\n a leading icon adds visual noise that the other field types don't\n carry (NumberField, TextField error message, RichTextEditor). */}\n <FieldError id={errorId} className={selectErrorVariants({ size })}>\n {({ validationErrors }) => {\n const displayError = errorMessage || validationErrors.join(' ');\n return displayError ? <>{displayError}</> : null;\n }}\n </FieldError>\n\n {/* Popover with ListBox */}\n <Popover\n shouldCloseOnInteractOutside={createInteractOutsideGuard()}\n maxHeight={SELECT_POPOVER_MAX_HEIGHT[size]}\n className={selectPopoverVariants({ size })}\n >\n <ListBox className=\"outline-none\">\n {/* Loading skeleton (if loading and has children) */}\n {isLoading && childCount > 0 && LOADING_SKELETON}\n\n {/* Items or empty state */}\n {!isLoading && (\n <>\n {children}\n {/* Empty state - render as disabled item so popover can open */}\n {childCount === 0 && (\n <ListBoxItem\n id=\"__empty__\"\n textValue=\"empty\"\n isDisabled\n className=\"py-6 text-center text-sm text-[var(--menu-muted)] cursor-default pointer-events-none\"\n >\n <span role=\"status\">\n {emptyStateMessage || 'No options available'}\n </span>\n </ListBoxItem>\n )}\n </>\n )}\n </ListBox>\n </Popover>\n </AriaSelect>\n );\n}\n\n/**\n * Select Root Component (Single Selection Only)\n *\n * Main select component with controlled/uncontrolled modes for single selection.\n * For multiple selection, use MultiSelect component.\n * Delegates shared rendering to SelectBase.\n *\n * @see select-prd.md US-1 (Basic Single Selection)\n * @see plan.md Decision 28 (Ref forwarding to trigger button)\n */\nconst SelectRoot = forwardRef<HTMLButtonElement, Omit<SelectProps, 'selectionMode'>>(\n (\n {\n // Display props\n label,\n placeholder,\n description,\n\n // Selection props\n value,\n defaultValue,\n\n // State props\n isOpen,\n isDisabled = false,\n isRequired = false,\n disabledKeys,\n\n // Validation props\n validate,\n validationBehavior = 'aria',\n errorMessage,\n\n // Loading state\n isLoading = false,\n emptyStateMessage,\n\n // Form integration\n name,\n\n // Size variant\n size = 'default',\n\n // Event handlers\n onChange,\n onOpenChange,\n\n // Standard props\n className,\n children,\n ...props\n },\n ref\n ) => {\n // Warn if >1000 items (Decision 22: Large Item Count Handling)\n const childCount = Children.count(children);\n if (childCount > 1000) {\n console.warn(\n 'Select has >1000 items. Consider using Autocomplete component for better performance.'\n );\n }\n\n return (\n <SelectBase\n ariaSelectProps={{\n value: value as string,\n defaultValue: defaultValue as string,\n onChange: (key: unknown) => {\n if (onChange) {\n onChange(key as string);\n }\n },\n placeholder,\n disabledKeys,\n isOpen,\n onOpenChange,\n isDisabled: isDisabled || isLoading,\n isRequired,\n name,\n validate: validate as ((value: unknown) => true | string | null | undefined) | undefined,\n validationBehavior,\n className,\n ...props,\n }}\n triggerContent={<SelectValue className=\"flex-1 text-left truncate\" />}\n triggerRef={ref}\n label={label}\n description={description}\n isRequired={isRequired}\n isDisabled={isDisabled}\n isLoading={isLoading}\n errorMessage={errorMessage}\n size={size}\n emptyStateMessage={emptyStateMessage}\n childCount={childCount}\n >\n {children}\n </SelectBase>\n );\n }\n);\n\nSelectRoot.displayName = 'Select';\n\n/**\n * MultiSelect Root Component (Multiple Selection)\n *\n * Select component for multiple selection. Uses different API from single Select.\n * Delegates shared rendering to SelectBase, adding multi-select display value logic.\n *\n * @see select-prd.md US-6 (Multiple Selection)\n * @see plan.md Decision 28 (Ref forwarding to trigger button)\n */\nconst MultiSelectRoot = forwardRef<HTMLButtonElement, SelectProps>(\n (\n {\n // Display props\n label,\n placeholder,\n description,\n\n // Selection props\n value,\n defaultValue,\n selectionMode: _selectionMode = 'multiple',\n\n // State props\n isOpen,\n isDisabled = false,\n isRequired = false,\n disabledKeys,\n\n // Validation props\n validate,\n validationBehavior = 'aria',\n errorMessage,\n\n // Loading state\n isLoading = false,\n emptyStateMessage,\n\n // Form integration\n name,\n\n // Size variant\n size = 'default',\n\n // Event handlers\n onChange,\n onOpenChange,\n\n // Standard props\n className,\n children,\n ...props\n },\n ref\n ) => {\n // Warn if >1000 items\n const childCount = Children.count(children);\n if (childCount > 1000) {\n console.warn(\n 'Select has >1000 items. Consider using Autocomplete component for better performance.'\n );\n }\n\n // Build value-to-label map for display (memoized to prevent recreation on every render)\n const valueToLabelMap = useMemo(() => {\n const map = new Map<string, string>();\n const processChildren = (nodes: ReactNode): void => {\n Children.forEach(nodes, (child) => {\n if (isValidElement(child)) {\n const element = child as ReactElement<{ value?: string; children?: ReactNode }>;\n if (element.type === SelectItem || element.props?.value) {\n const itemValue = element.props.value;\n const itemChildren = element.props.children;\n if (itemValue && typeof itemChildren === 'string') {\n map.set(itemValue, itemChildren);\n }\n }\n if (element.props?.children) {\n processChildren(element.props.children);\n }\n }\n });\n };\n processChildren(children);\n return map;\n }, [children]);\n\n // Multi-select display logic (Decision 5: Multi-select threshold)\n // Memoized to prevent recalculation on every render\n const displayValue = useMemo(() => {\n if (!value || !Array.isArray(value) || value.length === 0) {\n return placeholder || '';\n }\n\n if (value.length <= 2) {\n // Show item labels for 1-2 items\n const labels = value.map(v => valueToLabelMap.get(v as string) || v);\n return labels.join(', ');\n }\n\n // Show count for 3+ items\n return `${value.length} items selected`;\n }, [value, valueToLabelMap, placeholder]);\n\n return (\n <SelectBase\n ariaSelectProps={{\n value: value as string[],\n defaultValue: defaultValue as string[],\n onChange: (keys: unknown) => {\n if (onChange) {\n onChange(keys as string[]);\n }\n },\n selectionMode: 'multiple',\n disabledKeys,\n isOpen,\n onOpenChange,\n isDisabled: isDisabled || isLoading,\n isRequired,\n name,\n validate: validate as ((value: unknown) => true | string | null | undefined) | undefined,\n validationBehavior,\n className,\n ...props,\n }}\n triggerContent={\n <span className=\"flex-1 text-left truncate\">\n {displayValue}\n </span>\n }\n triggerRef={ref}\n label={label}\n description={description}\n isRequired={isRequired}\n isDisabled={isDisabled}\n isLoading={isLoading}\n errorMessage={errorMessage}\n size={size}\n emptyStateMessage={emptyStateMessage}\n childCount={childCount}\n >\n {children}\n </SelectBase>\n );\n }\n);\n\nMultiSelectRoot.displayName = 'MultiSelect';\n\n/**\n * Select.Item Component\n *\n * Individual selectable item with checkmark icon.\n *\n * @see select-prd.md US-1 (Basic Single Selection)\n * @see plan.md Decision 6 (Left-side checkmark)\n * @see plan.md Decision 23 (textValue required for custom children)\n */\nconst SelectItem = memo(function SelectItem({ children, textValue, value, isDisabled = false, className, ...props }: SelectItemProps): ReactElement {\n // Validate textValue for custom children (Decision 23)\n if (!textValue && typeof children !== 'string') {\n const message = 'Select.Item with custom children requires textValue prop for accessibility';\n if (process.env.NODE_ENV === 'development') {\n throw new Error(message);\n } else {\n console.warn(message);\n }\n }\n\n return (\n <ListBoxItem\n id={value}\n textValue={textValue || (typeof children === 'string' ? children : undefined)}\n className={`${selectItemVariants({ size: 'default' })} ${className || ''}`}\n isDisabled={isDisabled}\n {...props}\n >\n {({ isSelected, selectionMode, isDisabled: itemDisabled }) => (\n <>\n {/* Checkmark icon (left side) - Decision 6 */}\n {selectionMode === 'multiple' ? (\n <CheckSquare\n className={`absolute left-2 h-4 w-4 ${isSelected ? 'visible' : 'invisible'}`}\n aria-hidden=\"true\"\n />\n ) : (\n isSelected && <Check className=\"absolute left-2 h-4 w-4\" aria-hidden=\"true\" />\n )}\n <span className={itemDisabled ? 'text-[var(--menu-muted)]' : ''}>\n {children}\n </span>\n </>\n )}\n </ListBoxItem>\n );\n});\n\nSelectItem.displayName = 'SelectItem';\n\n/**\n * Select.Section Component\n *\n * Groups related items with optional header.\n *\n * @see select-prd.md US-3 (Grouped Options with Sections)\n */\nfunction SelectSection({ children, className, ...props }: SelectSectionProps): ReactElement {\n return (\n <ListBoxSection className={`border-t border-[var(--border)] first:border-t-0 ${className || ''}`} {...props}>\n {children}\n </ListBoxSection>\n );\n}\n\nSelectSection.displayName = 'SelectSection';\n\n/**\n * Select.Header Component\n *\n * Section header with non-interactive label.\n *\n * @see select-prd.md US-3 (Grouped Options with Sections)\n */\nfunction SelectHeader({ children, className, ...props }: SelectHeaderProps): ReactElement {\n return (\n <Header className={`${selectSectionVariants({ size: 'default' })} ${className || ''}`} {...props}>\n {children}\n </Header>\n );\n}\n\nSelectHeader.displayName = 'SelectHeader';\n\n/**\n * Compound Component Exports\n *\n * Uses Object.assign() for compound components (e.g., Select.Item, Select.Section).\n * Named exports (SelectItem, SelectSection, SelectHeader) are also available below\n * for better tree-shaking. Prefer named exports in new code.\n *\n * @deprecated (v2) The Object.assign compound pattern will be removed in v2.\n * Migrate to named imports: `import { SelectItem, SelectSection, SelectHeader } from '...'`\n *\n * @see GUIDE.mdx (Compound component pattern)\n */\nexport const Select = Object.assign(SelectRoot, {\n Item: SelectItem,\n Section: SelectSection,\n Header: SelectHeader,\n});\n\nexport const MultiSelect = Object.assign(MultiSelectRoot, {\n Item: SelectItem,\n Section: SelectSection,\n Header: SelectHeader,\n});\n\n// Named exports for individual components (preferred for tree-shaking)\nexport { SelectRoot, MultiSelectRoot, SelectItem, SelectSection, SelectHeader };\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 } from 'react';\nimport type {\n SelectProps as AriaSelectProps,\n ListBoxItemProps as AriaListBoxItemProps,\n} from 'react-aria-components';\n\n/**\n * Select size variants\n *\n * @see select-prd.md US-9 (Visual States - Size Variants)\n * @see plan.md Decision 4 (Include sm size with warning for desktop-only)\n */\nexport const SelectSizeSchema = z.enum(['sm', 'default', 'lg']);\nexport type SelectSize = z.infer<typeof SelectSizeSchema>;\n\n/**\n * Select selection mode\n *\n * @see select-prd.md US-6 (Multiple Selection)\n */\nexport const SelectionModeSchema = z.enum(['single', 'multiple']);\nexport type SelectionMode = z.infer<typeof SelectionModeSchema>;\n\n/**\n * Select validation behavior\n *\n * @see select-prd.md US-4 (Validation and Error Messages)\n */\nexport const ValidationBehaviorSchema = z.enum(['native', 'aria']);\nexport type ValidationBehavior = z.infer<typeof ValidationBehaviorSchema>;\n\n/**\n * Select root component props schema\n *\n * @see select-prd.md US-1 (Basic Single Selection)\n * @see select-prd.md US-4 (Validation and Error Messages)\n * @see select-prd.md US-5 (Disabled States)\n * @see select-prd.md US-6 (Multiple Selection)\n * @see select-prd.md US-7 (Async Data Loading)\n * @see select-prd.md US-10 (Form Integration)\n */\nexport const SelectPropsSchema = BaseComponentPropsSchema.extend({\n // Display props (US-1)\n label: z.string(), // Required for accessibility\n placeholder: z.string().optional(),\n description: z.string().optional(),\n\n // Selection props (US-1, US-6)\n value: z.union([z.string(), z.array(z.string())]).optional(),\n defaultValue: z.union([z.string(), z.array(z.string())]).optional(),\n selectionMode: SelectionModeSchema.optional().default('single'),\n\n // State props (US-1, US-5)\n isOpen: z.boolean().optional(),\n isDisabled: z.boolean().optional().default(false),\n isRequired: z.boolean().optional().default(false),\n disabledKeys: z.array(z.string()).optional(),\n\n // Validation props (US-4)\n validate: z\n .custom<(value: string | string[]) => string | undefined>()\n .optional(),\n validationBehavior: ValidationBehaviorSchema.optional().default('aria'),\n errorMessage: z.string().optional(),\n\n // Loading state (US-7)\n isLoading: z.boolean().optional().default(false),\n emptyStateMessage: z.string().optional(),\n\n // Form integration (US-10)\n name: z.string().optional(),\n\n // Size variant (US-9)\n size: SelectSizeSchema.optional().default('default'),\n\n // Event handlers (US-1)\n onChange: z\n .custom<(value: string | string[]) => void>()\n .optional(),\n onOpenChange: z.custom<(isOpen: boolean) => void>().optional(),\n\n // Children (Select.Item, Select.Section components)\n children: z.custom<ReactNode>(),\n});\n\nexport interface SelectPropsOwn {\n className?: string;\n children?: ReactNode;\n id?: string;\n 'aria-label'?: string;\n 'aria-labelledby'?: string;\n 'aria-describedby'?: string;\n 'data-testid'?: string;\n label: string;\n placeholder?: string;\n description?: string;\n value?: string | string[];\n defaultValue?: string | string[];\n selectionMode?: SelectionMode;\n isOpen?: boolean;\n isDisabled?: boolean;\n isRequired?: boolean;\n disabledKeys?: string[];\n validate?: (value: string | string[]) => string | undefined;\n validationBehavior?: ValidationBehavior;\n errorMessage?: string;\n isLoading?: boolean;\n emptyStateMessage?: string;\n name?: string;\n size?: SelectSize;\n onChange?: (value: string | string[]) => void;\n onOpenChange?: (isOpen: boolean) => void;\n}\n\nexport type SelectProps = SelectPropsOwn &\n Omit<AriaSelectProps<object>, keyof SelectPropsOwn>;\n\n/**\n * Select.Item props schema\n *\n * @see select-prd.md US-1 (Basic Single Selection)\n * @see select-prd.md US-5 (Disabled States)\n * @see select-prd.md US-8 (Custom Value Rendering)\n * @see plan.md Decision 23 (textValue required for custom children)\n */\nexport const SelectItemPropsSchema = BaseComponentPropsSchema.extend({\n // Item value (required)\n value: z.string(),\n\n // Text value for typeahead and accessibility (required for custom children)\n textValue: z.string().optional(),\n\n // Disabled state\n isDisabled: z.boolean().optional().default(false),\n\n // Item content\n children: z.custom<ReactNode>(),\n\n // Optional className for custom styling\n className: z.string().optional(),\n});\n\nexport interface SelectItemPropsOwn {\n className?: string;\n children?: ReactNode;\n id?: string;\n 'aria-label'?: string;\n 'data-testid'?: string;\n value: string;\n textValue?: string;\n isDisabled?: boolean;\n}\n\nexport type SelectItemProps = SelectItemPropsOwn &\n Omit<AriaListBoxItemProps, keyof SelectItemPropsOwn>;\n\n/**\n * Select.Section props schema\n *\n * @see select-prd.md US-3 (Grouped Options with Sections)\n */\nexport const SelectSectionPropsSchema = BaseComponentPropsSchema.extend({\n // Section content (typically Select.Header + Select.Item components)\n children: z.custom<ReactNode>(),\n\n // Optional className for custom styling\n className: z.string().optional(),\n});\n\nexport interface SelectSectionProps {\n className?: string;\n children?: ReactNode;\n id?: string;\n 'data-testid'?: string;\n}\n\n/**\n * Select.Header props schema (for section headers)\n *\n * @see select-prd.md US-3 (Grouped Options with Sections)\n */\nexport const SelectHeaderPropsSchema = BaseComponentPropsSchema.extend({\n // Header text\n children: z.custom<ReactNode>(),\n\n // Optional className for header styling\n className: z.string().optional(),\n});\n\nexport interface SelectHeaderProps {\n className?: string;\n children?: ReactNode;\n id?: string;\n 'data-testid'?: string;\n}\n\n/**\n * CVA variant configuration types\n * Used for class-variance-authority integration\n */\nexport type SelectVariantSize = SelectSize;\nexport type SelectVariantSelectionMode = SelectionMode;\n"]}
@@ -1,3 +1,3 @@
1
1
  "use client";
2
- 'use strict';var react=require('react'),reactAriaComponents=require('react-aria-components'),classVarianceAuthority=require('class-variance-authority'),clsx=require('clsx'),tailwindMerge=require('tailwind-merge'),jsxRuntime=require('react/jsx-runtime'),lucideReact=require('lucide-react');function g(...t){return tailwindMerge.twMerge(clsx.clsx(t))}var X="data-[focus-visible]:ring-2 data-[focus-visible]:ring-[var(--themis-ring)] data-[focus-visible]:ring-offset-2",me="data-[pressed]:scale-[0.97]";var K="hc:data-[focus-visible]:outline hc:data-[focus-visible]:outline-4 hc:data-[focus-visible]:outline-offset-2 hc:data-[focus-visible]:outline-foreground",Q="hc:data-[hovered]:outline hc:data-[hovered]:outline-2 hc:data-[hovered]:outline-foreground",J="hc:data-[pressed]:outline hc:data-[pressed]:outline-2 hc:data-[pressed]:outline-offset-1 hc:data-[pressed]:outline-foreground";var Le=classVarianceAuthority.cva(["group relative inline-flex items-center gap-2 cursor-pointer","transition-colors duration-200","rtl:flex-row-reverse",X,K].join(" "),{variants:{size:{sm:"min-h-[44px] text-sm",default:"min-h-[44px] text-sm",lg:"min-h-[48px] text-base"},isDisabled:{true:"opacity-50 cursor-not-allowed",false:""}},defaultVariants:{size:"default",isDisabled:false}}),Be=classVarianceAuthority.cva("flex-shrink-0 rounded-sm border-2 bg-[var(--content-background)] flex items-center justify-center transition-colors duration-200 motion-safe:data-[selected]:selection-pulse",{variants:{variant:{default:["border-[var(--border)]","data-[selected]:border-[var(--primary)]","data-[selected]:bg-[var(--primary)]","data-[indeterminate]:border-[var(--primary)]","data-[indeterminate]:bg-[var(--primary)]"].join(" "),destructive:["border-[var(--border)]","data-[selected]:border-[var(--destructive-background)]","data-[selected]:bg-[var(--destructive-background)]","data-[indeterminate]:border-[var(--destructive-background)]","data-[indeterminate]:bg-[var(--destructive-background)]"].join(" ")},size:{sm:"h-4 w-4",default:"h-5 w-5",lg:"h-6 w-6"},isInvalid:{true:"border-[var(--destructive-background)]",false:""}},defaultVariants:{variant:"default",size:"default",isInvalid:false}}),Pe=classVarianceAuthority.cva(["transition-transform duration-200","[transition-timing-function:cubic-bezier(0.34,1.56,0.64,1)]","motion-reduce:transition-none","scale-0 data-[selected]:scale-100 data-[indeterminate]:scale-100"].join(" "),{variants:{variant:{default:"text-[var(--primary-foreground)]",destructive:"text-[var(--destructive-foreground)]"},size:{sm:"h-3 w-3",default:"h-3.5 w-3.5",lg:"h-4 w-4"}},defaultVariants:{variant:"default",size:"default"}});function He({className:t,...e}){return jsxRuntime.jsx("svg",{className:t,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:3,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...e,children:jsxRuntime.jsx("polyline",{points:"20 6 9 17 4 12"})})}function De({className:t,...e}){return jsxRuntime.jsx("svg",{className:t,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:3,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...e,children:jsxRuntime.jsx("line",{x1:"5",y1:"12",x2:"19",y2:"12"})})}var H=react.forwardRef(({isSelected:t,defaultSelected:e,isDisabled:a,isReadOnly:r,isIndeterminate:n,isInvalid:l=false,isRequired:o=false,onChange:s,onFocusChange:i,value:p,name:y,size:d="default",variant:m="default",label:S,description:T,selectedIcon:f,className:v,id:E,"aria-label":b,"aria-labelledby":N,"aria-describedby":I,"data-testid":k,slot:O},R)=>{let c=a||void 0,_=r||void 0,C=n||void 0,L=(V,u)=>{let x=g(Pe({variant:m,size:d})),P=V||void 0,$=u||void 0;if(u)return jsxRuntime.jsx(De,{className:x,"data-selected":P,"data-indeterminate":$});if(f&&V){if(react.isValidElement(f)){let ke=f;return react.cloneElement(ke,{className:g(x,ke.props.className),"data-selected":P})}return jsxRuntime.jsx("span",{className:x,"data-selected":P,children:f})}return jsxRuntime.jsx(He,{className:x,"data-selected":P,"data-indeterminate":$})};return jsxRuntime.jsx(reactAriaComponents.Checkbox,{ref:R,id:E,isSelected:t,defaultSelected:e,isDisabled:c,isReadOnly:_,isIndeterminate:C,isInvalid:l,isRequired:o,onChange:s,onFocusChange:i,value:p,name:y,slot:O,"aria-label":b,"aria-labelledby":N,"aria-describedby":I,"data-testid":k,className:V=>g(Le({size:d,isDisabled:V.isDisabled}),v),children:V=>jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("div",{className:Be({variant:m,size:d,isInvalid:V.isInvalid}),"data-selected":V.isSelected||void 0,"data-indeterminate":V.isIndeterminate||void 0,children:L(V.isSelected,V.isIndeterminate)}),(S||T)&&jsxRuntime.jsxs("div",{className:"flex flex-col",children:[S&&jsxRuntime.jsx("span",{className:"font-medium text-[var(--content-foreground)]",children:S}),T&&jsxRuntime.jsx("span",{className:"text-sm text-[var(--menu-muted)]",children:T})]})]})})});H.displayName="Checkbox";var be=classVarianceAuthority.cva(["relative w-full overflow-auto","rounded-lg border border-[var(--border)] bg-[var(--content-background)]"]),xe=classVarianceAuthority.cva(["w-full caption-bottom text-sm","border-collapse"],{variants:{variant:{default:"",bordered:"[&_tr>*+*]:border-l [&_tr>*+*]:border-[var(--border)]"}},defaultVariants:{variant:"default"}}),ge=classVarianceAuthority.cva(["[&_tr]:border-b [&_tr]:border-[var(--border)]"],{variants:{sticky:{true:"sticky top-0 z-10 bg-[var(--content-background)]",false:""}},defaultVariants:{sticky:false}}),ve=classVarianceAuthority.cva(["border-t border-[var(--border)]","bg-[var(--accent-background)]/50","font-medium","[&>tr]:last:border-b-0"]),ee=classVarianceAuthority.cva(["h-12 px-4 text-left align-middle font-semibold","uppercase tracking-wide","bg-[var(--accent-background)] text-[var(--content-foreground)]","[&:has([role=checkbox])]:pr-0","select-none","focus-visible:outline-none focus-visible:ring-2","focus-visible:ring-[var(--ring)] focus-visible:ring-inset"],{variants:{allowsSorting:{true:"cursor-pointer hover:bg-[var(--accent)]/50",false:""},align:{start:"text-start",center:"text-center",end:"text-end"},size:{sm:"h-10 px-3 text-xs",default:"h-12 px-4 text-sm",lg:"h-14 px-5 text-base"}},defaultVariants:{allowsSorting:false,align:"start",size:"default"}}),te=classVarianceAuthority.cva(["border-b border-[var(--border)]","transition-colors","focus-visible:outline-none focus-visible:ring-2","focus-visible:ring-[var(--ring)] focus-visible:ring-inset","hover:bg-[var(--accent-background)]/50","data-[disabled]:pointer-events-none data-[disabled]:opacity-50"],{variants:{isSelected:{true:"bg-[var(--selected)] data-[selected]:bg-[var(--selected)]",false:""},zebra:{true:"even:bg-[var(--accent-background)]/30",false:""}},defaultVariants:{isSelected:false,zebra:true}}),ae=classVarianceAuthority.cva(["p-4 align-middle","[&:has([role=checkbox])]:pr-0"],{variants:{align:{start:"text-start",center:"text-center",end:"text-end"},size:{sm:"p-3 text-xs",default:"p-4 text-sm",lg:"p-5 text-base"},isRowHeader:{true:"font-medium",false:""}},defaultVariants:{align:"start",size:"default",isRowHeader:false}});var Y=react.createContext({variant:"default",size:"default",selectionMode:"none",stickyHeader:false,zebra:true}),Ge=react.forwardRef(({className:t,variant:e="default",size:a="default",stickyHeader:r=false,zebra:n=true,toolbar:l,selectionMode:o="none",selectionBehavior:s="toggle",disallowEmptySelection:i=false,disabledBehavior:p="selection",selectedKeys:y,defaultSelectedKeys:d,onSelectionChange:m,disabledKeys:S,sortDescriptor:T,onSortChange:f,onRowAction:v,children:E,...b},N)=>{process.env.NODE_ENV!=="production"&&a==="sm"&&o!=="none"&&console.warn('[Table] size="sm" with selectionMode produces rows shorter than the 44px WCAG 2.2 AAA minimum touch target. Use size="default" or size="lg" for accessible interactive tables.');let I=react.useMemo(()=>({variant:e,size:a,selectionMode:o,stickyHeader:r,zebra:n}),[e,a,o,r,n]);return jsxRuntime.jsx(Y.Provider,{value:I,children:jsxRuntime.jsxs("div",{className:g(be(),t),"data-testid":"table-container",children:[l,jsxRuntime.jsx(reactAriaComponents.Table,{ref:N,className:g(xe({variant:e})),selectionMode:o,selectionBehavior:s,disallowEmptySelection:i,disabledBehavior:p,selectedKeys:y,defaultSelectedKeys:d,onSelectionChange:m,disabledKeys:S,sortDescriptor:T,onSortChange:f,onRowAction:v,"data-testid":"table","data-variant":e,"data-size":a,"data-zebra":n,...b,children:E})]})})});Ge.displayName="Table";function Ut({className:t,children:e,columns:a,...r},n){let{size:l,selectionMode:o,stickyHeader:s}=react.useContext(Y),{allowsDragging:i}=reactAriaComponents.useTableOptions();return jsxRuntime.jsxs(reactAriaComponents.TableHeader,{ref:n,className:g(ge({sticky:s}),t),"data-testid":"table-header",...r,children:[o==="multiple"&&jsxRuntime.jsx(reactAriaComponents.Column,{className:g(ee({size:l}),"w-12"),children:jsxRuntime.jsx(H,{slot:"selection","aria-label":"Select all",size:l})}),i&&jsxRuntime.jsx(reactAriaComponents.Column,{}),a?jsxRuntime.jsx(reactAriaComponents.Collection,{items:a,children:e}):e]})}var Ue=react.forwardRef(Ut);Ue.displayName="TableHeader";function Ft({className:t,children:e,items:a,renderEmptyState:r,...n},l){return jsxRuntime.jsx(reactAriaComponents.TableBody,{ref:l,className:g(t),items:a,renderEmptyState:r?()=>jsxRuntime.jsx("div",{className:"text-center p-8",children:r()}):void 0,"data-testid":"table-body",...n,children:e})}var Fe=react.forwardRef(Ft);Fe.displayName="TableBody";var je=react.forwardRef(({className:t,children:e,...a},r)=>jsxRuntime.jsx("tfoot",{ref:r,className:g(ve(),t),"data-testid":"table-footer",...a,children:e}));je.displayName="TableFooter";var $e=react.forwardRef(({className:t,children:e,isRowHeader:a=false,allowsSorting:r=false,align:n="start",width:l,minWidth:o,maxWidth:s,...i},p)=>{let{size:y}=react.useContext(Y);return jsxRuntime.jsx(reactAriaComponents.Column,{ref:p,isRowHeader:a,allowsSorting:r,width:l,minWidth:o,maxWidth:s,className:g(ee({allowsSorting:r,align:n,size:y}),t),...i,children:({allowsSorting:d,sortDirection:m})=>jsxRuntime.jsxs("div",{className:"flex items-center gap-1",children:[jsxRuntime.jsx("span",{children:e}),d&&jsxRuntime.jsx("span",{"aria-hidden":"true","data-sort-direction":m??"none",className:m?"text-[var(--primary-action)]":"opacity-50",children:m==="ascending"?jsxRuntime.jsx(lucideReact.ChevronUp,{className:"h-4 w-4"}):m==="descending"?jsxRuntime.jsx(lucideReact.ChevronDown,{className:"h-4 w-4"}):jsxRuntime.jsx(lucideReact.ChevronsUpDown,{className:"h-4 w-4"})})]})})});$e.displayName="Column";function jt({className:t,children:e,columns:a,href:r,isDisabled:n,...l},o){let{size:s,selectionMode:i,zebra:p}=react.useContext(Y),{allowsDragging:y}=reactAriaComponents.useTableOptions(),d=te({isSelected:true,zebra:p}),m=te({isSelected:false,zebra:p}),S=g(ae({size:s}),"w-12");return jsxRuntime.jsxs(reactAriaComponents.Row,{ref:o,href:r,isDisabled:n,className:({isSelected:T,isDisabled:f})=>g(T?d:m,f&&"opacity-50",t),"data-testid":"table-row",...l,children:[i==="multiple"&&jsxRuntime.jsx(reactAriaComponents.Cell,{className:S,children:jsxRuntime.jsx(H,{slot:"selection","aria-label":"Select row",size:s})}),y&&jsxRuntime.jsx(reactAriaComponents.Cell,{}),a?jsxRuntime.jsx(reactAriaComponents.Collection,{items:a,children:e}):e]})}var Ke=react.forwardRef(jt);Ke.displayName="Row";var Ye=react.memo(react.forwardRef(({className:t,children:e,align:a="start",colSpan:r,...n},l)=>{let{size:o}=react.useContext(Y);return jsxRuntime.jsx(reactAriaComponents.Cell,{ref:l,className:g(ae({align:a,size:o}),t),...n,children:e})}));Ye.displayName="Cell";var Ee=classVarianceAuthority.cva("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",{variants:{fullWidth:{true:"w-full",false:""},inVerticalGroup:{true:"items-stretch",false:"items-center"}},defaultVariants:{fullWidth:false,inVerticalGroup:false}}),he=classVarianceAuthority.cva("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",{variants:{variant:{default:"bg-[var(--primary-action)] text-[var(--primary-action-foreground)] shadow-md hover:bg-[var(--primary-action-hover)] hover:-translate-y-1",destructive:"bg-[var(--destructive-background)] text-[var(--destructive-foreground)] hover:bg-[var(--destructive-background-hover,var(--destructive-background))] motion-safe:hover:btn-warn-shake",outline:"border border-[var(--input-border)] bg-[var(--content-background)] hover:bg-[var(--accent-background)]/50",secondary:"bg-[var(--secondary)] text-[var(--secondary-foreground)] hover:bg-[var(--secondary-hover,var(--secondary))]",ghost:"hover:bg-[var(--accent)] hover:text-[var(--accent-foreground)]",link:"text-[var(--text-link)] underline underline-offset-4 hover:bg-[var(--accent)] hover:text-[var(--text-link-hover)]"},fullWidth:{true:"w-full",false:""},visualSize:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3 text-xs",lg:"h-11 rounded-md px-6 text-base",icon:"h-10 w-10",dot:"h-5 w-5 rounded-full p-0 min-h-0 min-w-0"},paywall:{true:"!bg-[var(--paywall)] !text-[var(--paywall-foreground)] hover:!bg-[var(--paywall)]/90 !cursor-not-allowed !border-transparent",false:""}},defaultVariants:{variant:"default",visualSize:"default",paywall:false}});var Xe=react.createContext(null);Xe.displayName="ButtonGroupContext";function Qe(){return react.useContext(Xe)}var Je=react.createContext(null);Je.displayName="ButtonGroupItemContext";function et(){return react.useContext(Je)}classVarianceAuthority.cva("inline-flex items-center gap-0",{variants:{orientation:{horizontal:"flex-row",vertical:"flex-col w-full"}},defaultVariants:{orientation:"horizontal"}});var tt=classVarianceAuthority.cva("",{variants:{orientation:{horizontal:"min-w-[44px]",vertical:"flex min-h-[44px]"},position:{first:"",middle:"",last:"",only:""}},compoundVariants:[{orientation:"horizontal",position:"first",className:"rounded-r-none border-r-0"},{orientation:"horizontal",position:"middle",className:"rounded-none border-r-0"},{orientation:"horizontal",position:"last",className:"rounded-l-none"},{orientation:"vertical",position:"first",className:"rounded-b-none border-b-0"},{orientation:"vertical",position:"middle",className:"rounded-none border-b-0"},{orientation:"vertical",position:"last",className:"rounded-t-none"}],defaultVariants:{orientation:"horizontal",position:"only"}});classVarianceAuthority.cva("bg-[var(--border)]",{variants:{orientation:{horizontal:"w-px h-6 mx-1",vertical:"h-px w-full my-1"}},defaultVariants:{orientation:"horizontal"}});var U=react.memo(react.forwardRef(({className:t,buttonVisualClassName:e,variant:a,size:r,visualSize:n,fullWidth:l,loading:o=false,loadingText:s="Loading...",shortcut:i,children:p,isDisabled:y,paywall:d=false,paywallRedirect:m,paywallDescription:S,onPress:T,...f},v)=>{let E=react.useId(),b=Qe(),N=et(),I=a??b?.variant??"default",k=r??b?.size,O=y??b?.isDisabled??false,R=b?.orientation==="vertical",c=l||R,_=N?tt({orientation:b?.orientation??"horizontal",position:N.position}):"",C=n??k??"default";return process.env.NODE_ENV!=="production"&&(C==="dot"||C==="icon")&&!f["aria-label"]&&!p&&console.warn('[Button] visualSize="dot" or "icon" requires aria-label when no visible text is provided (WCAG 1.1.1)'),jsxRuntime.jsx(reactAriaComponents.Button,{ref:v,isDisabled:O||o||void 0,"aria-disabled":d?true:void 0,"aria-describedby":d?E:void 0,onPress:u=>{if(d){m&&window.open(m,"_blank","noopener,noreferrer");return}T?.(u);},className:g(Ee({fullWidth:c,inVerticalGroup:R}),t),...f,children:u=>jsxRuntime.jsxs("span",{className:g(he({variant:I,visualSize:C,paywall:d,fullWidth:c}),_,e,me,"",Q,J),"data-pressed":u.isPressed||void 0,children:[o&&jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(lucideReact.Loader2,{className:"motion-safe:animate-spin","aria-hidden":"true"}),jsxRuntime.jsx("span",{className:"sr-only","aria-live":"polite",children:s})]}),!o&&p,d&&jsxRuntime.jsx(lucideReact.Zap,{"data-testid":"zap-icon","aria-hidden":"true",className:"ml-1"}),d&&jsxRuntime.jsxs("span",{id:E,className:"sr-only",children:["Premium feature: ",S||"Upgrade required to access this feature"]}),u.isFocusVisible&&i&&jsxRuntime.jsx("kbd",{className:"ml-auto hidden text-xs opacity-60 lg:inline",children:i})]})})}));U.displayName="Button";var ne=classVarianceAuthority.cva(["flex items-center justify-between gap-3 flex-wrap","px-4 py-2.5","bg-[var(--selected)]"],{variants:{sticky:{true:"sticky top-0 z-[6]",false:""},framed:{true:"rounded-lg border border-[var(--border)]",false:"border-b border-[var(--border)]"}},defaultVariants:{sticky:true,framed:false}}),se=classVarianceAuthority.cva(["flex items-center gap-3 flex-wrap w-full justify-between"]),ie=classVarianceAuthority.cva(["text-sm text-[var(--content-muted)] inline-flex items-center gap-1.5"]),at=classVarianceAuthority.cva(["inline-flex items-center justify-center","min-w-[1.5rem] h-6 px-1.5 rounded","border border-[var(--primary)]/40 bg-[var(--content-background)]","font-mono text-xs font-semibold text-[var(--primary-action)]"]),rt=classVarianceAuthority.cva(["text-[var(--primary-action)] border-[var(--primary)]/30","hover:bg-[var(--content-background)]"]);function ra(t,e){typeof t=="function"?t(e):t&&(t.current=e);}var ot=react.forwardRef(({selectedCount:t,actions:e,onAction:a,onClearSelection:r,sticky:n=true,framed:l=false,showJumpHint:o=false,shortcutKey:s="A",labels:i,className:p,"data-testid":y="bulk-action-bar"},d)=>{let m=react.useRef(null),S=react.useRef(t),T=react.useRef([]),[f,v]=react.useState(0),E=e.length+1,b=Math.min(f,E-1),N=c=>{let _=(c+E)%E;v(_),T.current[_]?.focus();},I=c=>{switch(c.key){case "ArrowRight":case "ArrowDown":c.preventDefault(),N(b+1);break;case "ArrowLeft":case "ArrowUp":c.preventDefault(),N(b-1);break;case "Home":c.preventDefault(),N(0);break;case "End":c.preventDefault(),N(E-1);break;}};react.useEffect(()=>{let c=S.current;if(S.current=t,c>0&&t===0){let _=document.activeElement;(!_||_===document.body)&&m.current?.focus();}},[t]);let k=t>0,O=o&&!!i.jumpHint,R="";if(k){let c=[i.selectedCount(t)];i.actionsAvailable&&c.push(i.actionsAvailable(e.length)),o&&i.jumpAnnouncement&&c.push(i.jumpAnnouncement),R=c.join(". ");}return jsxRuntime.jsxs("div",{ref:c=>{m.current=c,ra(d,c);},tabIndex:-1,className:g("outline-none",p),"data-testid":y,children:[jsxRuntime.jsx("div",{className:"sr-only",role:"status","aria-live":"polite",children:R}),k&&jsxRuntime.jsx("div",{className:ne({sticky:n,framed:l}),children:jsxRuntime.jsxs("div",{role:"toolbar","aria-label":i.toolbarLabel(t),"aria-orientation":"horizontal",onKeyDown:I,className:se(),children:[jsxRuntime.jsxs("div",{className:"flex items-center gap-4 flex-wrap",children:[jsxRuntime.jsx("span",{className:"text-sm font-bold text-[var(--content-foreground)]",children:i.selectedCount(t)}),jsxRuntime.jsx(U,{ref:c=>{T.current[0]=c;},variant:"link",excludeFromTabOrder:b!==0,onFocus:()=>v(0),onPress:r,children:i.clear}),O&&i.jumpHint&&jsxRuntime.jsx("span",{"aria-hidden":"true",className:ie(),children:i.jumpHint(jsxRuntime.jsx("kbd",{className:at(),children:s}))})]}),jsxRuntime.jsx("div",{className:"flex items-center gap-2 flex-wrap",children:e.map((c,_)=>{let C=_+1;return jsxRuntime.jsxs(U,{ref:L=>{T.current[C]=L;},variant:c.tone==="danger"?"destructive":"outline",buttonVisualClassName:c.tone==="danger"?void 0:rt(),isDisabled:c.isDisabled,excludeFromTabOrder:b!==C,onFocus:()=>v(C),onPress:()=>a(c.id),children:[c.icon!=null&&jsxRuntime.jsx("span",{"aria-hidden":"true",className:"inline-flex",children:c.icon}),c.label]},c.id)})})]})})]})});ot.displayName="BulkActionBar";function oa(t,e){if(t==="all"){let a=0;for(let r of e)a+=1;return a}return t.size}var sa=new Set(["text","search","email","url","tel","number","password"]);function ia(t){if(!(t instanceof HTMLElement))return false;if(t.isContentEditable||t.closest('[contenteditable=""],[contenteditable="true"]'))return true;let e=t.tagName;if(e==="TEXTAREA"||e==="SELECT"||e==="INPUT"&&sa.has(t.type))return true;let a=t.getAttribute("role");return a==="textbox"||a==="searchbox"||a==="combobox"}function la({scopeRef:t,toolbarRef:e,key:a="a",disabled:r=false}){react.useEffect(()=>{if(r)return;let n=t.current;if(!n)return;let l=o=>{if(o.metaKey||o.ctrlKey||o.altKey||o.key.toLowerCase()!==a.toLowerCase()||ia(o.target))return;let s=e.current;if(!s)return;let i=s.querySelector('[tabindex="0"]')??s.querySelector("button:not([disabled])");i&&(o.preventDefault(),i.focus());};return n.addEventListener("keydown",l),()=>n.removeEventListener("keydown",l)},[t,e,a,r]);}var ce={sm:"h-9",default:"h-10",lg:"h-11"},M={sm:`${ce.sm} px-2 text-xs`,default:`${ce.default} px-3 text-sm`,lg:`${ce.lg} px-4 text-base`},Ie="min-h-[44px] flex items-center";function ca(t){if(!(t instanceof Element))return false;let e=t;for(let n=0;e&&n<100;n++){let l=e.tagName?.toLowerCase()??"";if(l.startsWith("grammarly-")||l.startsWith("lt-")||e.hasAttribute("data-grammarly-shadow-root"))return true;if(e.parentElement)e=e.parentElement;else {let o=e.getRootNode();e=o instanceof ShadowRoot?o.host:null;}}let a=t;for(;a&&!a.tagName.includes("-");)a=a.parentElement;if(!a)return false;let r=a.parentElement;return r===document.body||r===document.documentElement}function nt(t){return e=>!ca(e)&&(t?.(e)??true)}var st=classVarianceAuthority.cva(["flex","w-full","items-center","justify-between","gap-2","rounded-md","border","bg-[var(--content-background)]","text-[var(--content-foreground)]","transition-colors","duration-200","outline-none","focus-visible:ring-2","focus-visible:ring-[var(--ring)]","focus-visible:ring-offset-2","hover:bg-[var(--accent)]/10","disabled:cursor-not-allowed","disabled:opacity-50","data-[loading=true]:cursor-wait","truncate"],{variants:{size:{sm:`${M.sm} pr-1`,default:`${M.default} pr-1.5`,lg:`${M.lg} pr-2`},isInvalid:{true:"border-[var(--destructive-background)]",false:"border-[var(--input-border)] hover:border-[var(--input-border)]/80"}},defaultVariants:{size:"default",isInvalid:false}}),it=classVarianceAuthority.cva(["relative","flex","w-full","cursor-pointer","select-none","items-center","rounded-sm","outline-none","transition-colors","pl-8","pr-2","hover:bg-[var(--accent)]","hover:text-[var(--accent-foreground)]","focus:bg-[var(--accent)]","focus:text-[var(--accent-foreground)]","data-[selected=true]:bg-[var(--accent)]","data-[selected=true]:text-[var(--accent-foreground)]","data-[disabled=true]:pointer-events-none","data-[disabled=true]:opacity-50","data-[disabled=true]:text-[var(--menu-muted)]"],{variants:{size:{sm:`${M.sm} py-1`,default:`${M.default} py-2`,lg:`${M.lg} py-3`}},defaultVariants:{size:"default"}}),lt=classVarianceAuthority.cva(["z-50","w-[--trigger-width]","rounded-md","border","border-[var(--menu-border)]","bg-[var(--menu-background)]","text-[var(--menu-foreground)]","outline-none","overflow-auto","data-[entering]:animate-in","data-[entering]:fade-in-0","data-[entering]:zoom-in-95","data-[exiting]:animate-out","data-[exiting]:fade-out-0","data-[exiting]:zoom-out-95"],{variants:{size:{sm:"max-h-[200px] p-1",default:"max-h-[300px] p-1",lg:"max-h-[400px] p-1"}},defaultVariants:{size:"default"}}),ct=classVarianceAuthority.cva(["px-2","py-1.5","text-xs","font-semibold","text-[var(--menu-muted)]","uppercase","tracking-wider"],{variants:{size:{sm:"px-2 py-1 text-[10px]",default:"px-2 py-1 text-xs",lg:"px-2 py-1.5 text-xs"}},defaultVariants:{size:"default"}}),dt=classVarianceAuthority.cva(["flex","items-center","gap-1.5","text-sm","font-medium","text-[var(--destructive-background)]","mt-1"],{variants:{size:{sm:"text-xs mt-1",default:"text-sm mt-1",lg:"text-base mt-1"}},defaultVariants:{size:"default"}});var Ia=Array.from({length:3}).map((t,e)=>jsxRuntime.jsx("div",{className:"h-11 px-4 py-2",children:jsxRuntime.jsx("div",{className:"h-4 bg-[var(--accent-background)] rounded animate-pulse"})},`skeleton-${e}`));function ft({ariaSelectProps:t,triggerContent:e,triggerRef:a,label:r,description:n,isRequired:l,isDisabled:o,isLoading:s,errorMessage:i,size:p,emptyStateMessage:y,childCount:d,children:m}){let S=react.useId(),T=react.useId(),f=react.useId(),v=!!i,{className:E,...b}=t;return jsxRuntime.jsxs(reactAriaComponents.Select,{...b,className:g("flex flex-col gap-1.5",E),isInvalid:v,children:[jsxRuntime.jsxs(reactAriaComponents.Label,{id:S,className:"text-sm font-medium text-[var(--content-foreground)]",children:[r,l&&jsxRuntime.jsx("span",{className:"text-[var(--destructive-background)] ml-1",children:"*"})]}),n&&jsxRuntime.jsx(reactAriaComponents.Text,{id:T,slot:"description",className:"text-sm text-[var(--menu-muted)]",children:n}),jsxRuntime.jsx("div",{className:Ie,children:jsxRuntime.jsxs(reactAriaComponents.Button,{ref:a,className:st({size:p,isInvalid:v}),"aria-labelledby":S,"aria-describedby":n?T:i?f:void 0,"data-loading":s,...l&&{"aria-required":"true"},...s&&{"aria-busy":"true"},...(o||s)&&{"aria-disabled":"true"},children:[e,s?jsxRuntime.jsx(lucideReact.Loader2,{className:"ml-auto h-4 w-4 shrink-0 animate-spin text-[var(--menu-muted)]","aria-hidden":"true"}):jsxRuntime.jsx(lucideReact.ChevronDown,{className:"ml-auto h-4 w-4 shrink-0 text-[var(--menu-muted)]","aria-hidden":"true"})]})}),jsxRuntime.jsx(reactAriaComponents.FieldError,{id:f,className:dt({size:p}),children:({validationErrors:N})=>{let I=i||N.join(" ");return I?jsxRuntime.jsx(jsxRuntime.Fragment,{children:I}):null}}),jsxRuntime.jsx(reactAriaComponents.Popover,{shouldCloseOnInteractOutside:nt(),className:lt({size:p}),children:jsxRuntime.jsxs(reactAriaComponents.ListBox,{className:"outline-none",children:[s&&d>0&&Ia,!s&&jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[m,d===0&&jsxRuntime.jsx(reactAriaComponents.ListBoxItem,{id:"__empty__",textValue:"empty",isDisabled:true,className:"py-6 text-center text-sm text-[var(--menu-muted)] cursor-default pointer-events-none",children:jsxRuntime.jsx("span",{role:"status",children:y||"No options available"})})]})]})})]})}var bt=react.forwardRef(({label:t,placeholder:e,description:a,value:r,defaultValue:n,isOpen:l,isDisabled:o=false,isRequired:s=false,disabledKeys:i,validate:p,validationBehavior:y="aria",errorMessage:d,isLoading:m=false,emptyStateMessage:S,name:T,size:f="default",onChange:v,onOpenChange:E,className:b,children:N,...I},k)=>{let O=react.Children.count(N);return O>1e3&&console.warn("Select has >1000 items. Consider using Autocomplete component for better performance."),jsxRuntime.jsx(ft,{ariaSelectProps:{value:r,defaultValue:n,onChange:R=>{v&&v(R);},placeholder:e,disabledKeys:i,isOpen:l,onOpenChange:E,isDisabled:o||m,isRequired:s,name:T,validate:p,validationBehavior:y,className:b,...I},triggerContent:jsxRuntime.jsx(reactAriaComponents.SelectValue,{className:"flex-1 text-left truncate"}),triggerRef:k,label:t,description:a,isRequired:s,isDisabled:o,isLoading:m,errorMessage:d,size:f,emptyStateMessage:S,childCount:O,children:N})});bt.displayName="Select";var xt=react.forwardRef(({label:t,placeholder:e,description:a,value:r,defaultValue:n,selectionMode:l="multiple",isOpen:o,isDisabled:s=false,isRequired:i=false,disabledKeys:p,validate:y,validationBehavior:d="aria",errorMessage:m,isLoading:S=false,emptyStateMessage:T,name:f,size:v="default",onChange:E,onOpenChange:b,className:N,children:I,...k},O)=>{let R=react.Children.count(I);R>1e3&&console.warn("Select has >1000 items. Consider using Autocomplete component for better performance.");let c=react.useMemo(()=>{let C=new Map,L=V=>{react.Children.forEach(V,u=>{if(react.isValidElement(u)){let x=u;if(x.type===de||x.props?.value){let P=x.props.value,$=x.props.children;P&&typeof $=="string"&&C.set(P,$);}x.props?.children&&L(x.props.children);}});};return L(I),C},[I]),_=react.useMemo(()=>!r||!Array.isArray(r)||r.length===0?e||"":r.length<=2?r.map(L=>c.get(L)||L).join(", "):`${r.length} items selected`,[r,c,e]);return jsxRuntime.jsx(ft,{ariaSelectProps:{value:r,defaultValue:n,onChange:C=>{E&&E(C);},selectionMode:"multiple",disabledKeys:p,isOpen:o,onOpenChange:b,isDisabled:s||S,isRequired:i,name:f,validate:y,validationBehavior:d,className:N,...k},triggerContent:jsxRuntime.jsx("span",{className:"flex-1 text-left truncate",children:_}),triggerRef:O,label:t,description:a,isRequired:i,isDisabled:s,isLoading:S,errorMessage:m,size:v,emptyStateMessage:T,childCount:R,children:I})});xt.displayName="MultiSelect";var de=react.memo(function({children:e,textValue:a,value:r,isDisabled:n=false,className:l,...o}){if(!a&&typeof e!="string"){let s="Select.Item with custom children requires textValue prop for accessibility";if(process.env.NODE_ENV==="development")throw new Error(s);console.warn(s);}return jsxRuntime.jsx(reactAriaComponents.ListBoxItem,{id:r,textValue:a||(typeof e=="string"?e:void 0),className:`${it({size:"default"})} ${l||""}`,isDisabled:n,...o,children:({isSelected:s,selectionMode:i,isDisabled:p})=>jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[i==="multiple"?jsxRuntime.jsx(lucideReact.CheckSquare,{className:`absolute left-2 h-4 w-4 ${s?"visible":"invisible"}`,"aria-hidden":"true"}):s&&jsxRuntime.jsx(lucideReact.Check,{className:"absolute left-2 h-4 w-4","aria-hidden":"true"}),jsxRuntime.jsx("span",{className:p?"text-[var(--menu-muted)]":"",children:e})]})})});de.displayName="SelectItem";function Re({children:t,className:e,...a}){return jsxRuntime.jsx(reactAriaComponents.ListBoxSection,{className:`border-t border-[var(--border)] first:border-t-0 ${e||""}`,...a,children:t})}Re.displayName="SelectSection";function we({children:t,className:e,...a}){return jsxRuntime.jsx(reactAriaComponents.Header,{className:`${ct({size:"default"})} ${e||""}`,...a,children:t})}we.displayName="SelectHeader";var ue=Object.assign(bt,{Item:de,Section:Re,Header:we});Object.assign(xt,{Item:de,Section:Re,Header:we});var gt=classVarianceAuthority.cva(["flex flex-col gap-3"]),vt=classVarianceAuthority.cva(["flex items-center justify-between gap-3 flex-wrap px-0.5"]),St=classVarianceAuthority.cva(["flex flex-col gap-2.5 list-none m-0 p-0"]),Tt=classVarianceAuthority.cva(["flex items-start gap-2.5 p-3.5","rounded-lg border border-[var(--border)] bg-[var(--content-background)]","motion-safe:transition-colors"],{variants:{isSelected:{true:"bg-[var(--selected)] border-[var(--primary)]/40",false:""}},defaultVariants:{isSelected:false}}),Et=classVarianceAuthority.cva(["flex items-center justify-center min-w-[44px] min-h-[44px] -m-1 flex-none"]),ht=classVarianceAuthority.cva(["flex-1 min-w-0"]),yt=classVarianceAuthority.cva(["block w-full text-left cursor-pointer rounded-md","outline-none focus-visible:ring-2 focus-visible:ring-[var(--ring)] focus-visible:ring-offset-2"]);function Nt({items:t,getRowId:e,renderCard:a,selectionMode:r="none",selectedKeys:n=new Set,onSelectionChange:l,onRowAction:o,sortDescriptor:s,onSortChange:i,sortColumns:p=[],renderEmptyState:y,labels:d,"aria-label":m,className:S,"data-testid":T="table-card-list"}){let f=r==="multiple",v=t.map(e),E=u=>n==="all"||n.has(u),b=v.length>0&&v.every(E),N=v.some(E)&&!b,I=()=>n==="all"?new Set(v):new Set(n),k=()=>{l?.(b?new Set:new Set(v));},O=u=>{let x=I();x.has(u)?x.delete(u):x.add(u),l?.(x);},R=s?.column!=null?String(s.column):void 0,c=s?.direction??"ascending",_=u=>{let x=Array.isArray(u)?u[0]:u;x&&i?.({column:x,direction:s?.direction??"ascending"});},C=()=>{s?.column!=null&&i?.({column:s.column,direction:c==="ascending"?"descending":"ascending"});},L=f||p.length>0,V=t.length===0;return jsxRuntime.jsxs("div",{role:"region","aria-label":m,className:g(gt(),S),"data-testid":T,children:[jsxRuntime.jsx("p",{className:"sr-only",role:"status","aria-live":"polite",children:d.results(t.length)}),L&&jsxRuntime.jsxs("div",{className:vt(),children:[f?jsxRuntime.jsx(H,{label:d.selectAll,isSelected:b,isIndeterminate:N,onChange:k}):jsxRuntime.jsx("span",{}),p.length>0&&jsxRuntime.jsxs("div",{className:"flex items-end gap-2",children:[jsxRuntime.jsx(ue,{label:d.sort,placeholder:d.sortPlaceholder,value:R,onChange:_,children:p.map(u=>jsxRuntime.jsx(ue.Item,{value:u.id,children:u.label},u.id))}),jsxRuntime.jsx(U,{variant:"ghost",visualSize:"icon",isDisabled:s?.column==null,"aria-label":d.sortDirection(c),onPress:C,children:c==="ascending"?jsxRuntime.jsx(lucideReact.ArrowUp,{"aria-hidden":"true"}):jsxRuntime.jsx(lucideReact.ArrowDown,{"aria-hidden":"true"})})]})]}),V?y?jsxRuntime.jsx("div",{className:"rounded-lg border border-dashed border-[var(--border)] p-8 text-center","data-testid":"card-empty-state",children:y()}):null:jsxRuntime.jsx("ul",{className:St(),children:t.map(u=>{let x=e(u),P=E(x);return jsxRuntime.jsxs("li",{className:Tt({isSelected:P}),children:[f&&jsxRuntime.jsx("div",{className:Et(),children:jsxRuntime.jsx(H,{"aria-label":d.selectItem(u),isSelected:P,onChange:()=>O(x)})}),jsxRuntime.jsx("div",{className:ht(),children:o?jsxRuntime.jsx(reactAriaComponents.Button,{className:yt(),"data-testid":"card-action",onPress:()=>o(x),children:a(u)}):a(u)})]},String(x))})})]})}Nt.displayName="TableCardList";function Oa(t,e){let[a,r]=react.useState(false);return react.useEffect(()=>{let n=t.current;if(!n)return;let l=()=>r(n.offsetWidth<e);l();let o;return typeof ResizeObserver<"u"&&(o=new ResizeObserver(l),o.observe(n)),window.addEventListener("resize",l),()=>{window.removeEventListener("resize",l),o?.disconnect();}},[t,e]),a}exports.BulkActionBar=ot;exports.Cell=Ye;exports.Column=$e;exports.Row=Ke;exports.Table=Ge;exports.TableBody=Fe;exports.TableCardList=Nt;exports.TableFooter=je;exports.TableHeader=Ue;exports.bulkActionBarVariants=ne;exports.bulkActionHintVariants=ie;exports.bulkActionToolbarVariants=se;exports.cellVariants=ae;exports.columnVariants=ee;exports.resolveSelectedCount=oa;exports.rowVariants=te;exports.tableContainerVariants=be;exports.tableFooterVariants=ve;exports.tableHeaderVariants=ge;exports.tableVariants=xe;exports.useBulkActionShortcut=la;exports.useContainerNarrow=Oa;//# sourceMappingURL=index.js.map
2
+ 'use strict';var react=require('react'),reactAriaComponents=require('react-aria-components'),classVarianceAuthority=require('class-variance-authority'),clsx=require('clsx'),tailwindMerge=require('tailwind-merge'),jsxRuntime=require('react/jsx-runtime'),lucideReact=require('lucide-react');function g(...t){return tailwindMerge.twMerge(clsx.clsx(t))}var q="data-[focus-visible]:ring-2 data-[focus-visible]:ring-[var(--themis-ring)] data-[focus-visible]:ring-offset-2",me="data-[pressed]:scale-[0.97]";var K="hc:data-[focus-visible]:outline hc:data-[focus-visible]:outline-4 hc:data-[focus-visible]:outline-offset-2 hc:data-[focus-visible]:outline-foreground",Q="hc:data-[hovered]:outline hc:data-[hovered]:outline-2 hc:data-[hovered]:outline-foreground",J="hc:data-[pressed]:outline hc:data-[pressed]:outline-2 hc:data-[pressed]:outline-offset-1 hc:data-[pressed]:outline-foreground";var Le=classVarianceAuthority.cva(["group relative inline-flex items-center gap-2 cursor-pointer","transition-colors duration-200","rtl:flex-row-reverse",q,K].join(" "),{variants:{size:{sm:"min-h-[44px] text-sm",default:"min-h-[44px] text-sm",lg:"min-h-[48px] text-base"},isDisabled:{true:"opacity-50 cursor-not-allowed",false:""}},defaultVariants:{size:"default",isDisabled:false}}),Be=classVarianceAuthority.cva("flex-shrink-0 rounded-sm border-2 bg-[var(--content-background)] flex items-center justify-center transition-colors duration-200 motion-safe:data-[selected]:selection-pulse",{variants:{variant:{default:["border-[var(--border)]","data-[selected]:border-[var(--primary)]","data-[selected]:bg-[var(--primary)]","data-[indeterminate]:border-[var(--primary)]","data-[indeterminate]:bg-[var(--primary)]"].join(" "),destructive:["border-[var(--border)]","data-[selected]:border-[var(--destructive-background)]","data-[selected]:bg-[var(--destructive-background)]","data-[indeterminate]:border-[var(--destructive-background)]","data-[indeterminate]:bg-[var(--destructive-background)]"].join(" ")},size:{sm:"h-4 w-4",default:"h-5 w-5",lg:"h-6 w-6"},isInvalid:{true:"border-[var(--destructive-background)]",false:""}},defaultVariants:{variant:"default",size:"default",isInvalid:false}}),Pe=classVarianceAuthority.cva(["transition-transform duration-200","[transition-timing-function:cubic-bezier(0.34,1.56,0.64,1)]","motion-reduce:transition-none","scale-0 data-[selected]:scale-100 data-[indeterminate]:scale-100"].join(" "),{variants:{variant:{default:"text-[var(--primary-foreground)]",destructive:"text-[var(--destructive-foreground)]"},size:{sm:"h-3 w-3",default:"h-3.5 w-3.5",lg:"h-4 w-4"}},defaultVariants:{variant:"default",size:"default"}});function He({className:t,...e}){return jsxRuntime.jsx("svg",{className:t,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:3,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...e,children:jsxRuntime.jsx("polyline",{points:"20 6 9 17 4 12"})})}function De({className:t,...e}){return jsxRuntime.jsx("svg",{className:t,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:3,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...e,children:jsxRuntime.jsx("line",{x1:"5",y1:"12",x2:"19",y2:"12"})})}var H=react.forwardRef(({isSelected:t,defaultSelected:e,isDisabled:a,isReadOnly:r,isIndeterminate:n,isInvalid:l=false,isRequired:o=false,onChange:s,onFocusChange:i,value:p,name:y,size:d="default",variant:m="default",label:S,description:T,selectedIcon:f,className:v,id:E,"aria-label":b,"aria-labelledby":N,"aria-describedby":I,"data-testid":k,slot:O},R)=>{let c=a||void 0,_=r||void 0,C=n||void 0,L=(V,u)=>{let x=g(Pe({variant:m,size:d})),P=V||void 0,$=u||void 0;if(u)return jsxRuntime.jsx(De,{className:x,"data-selected":P,"data-indeterminate":$});if(f&&V){if(react.isValidElement(f)){let ke=f;return react.cloneElement(ke,{className:g(x,ke.props.className),"data-selected":P})}return jsxRuntime.jsx("span",{className:x,"data-selected":P,children:f})}return jsxRuntime.jsx(He,{className:x,"data-selected":P,"data-indeterminate":$})};return jsxRuntime.jsx(reactAriaComponents.Checkbox,{ref:R,id:E,isSelected:t,defaultSelected:e,isDisabled:c,isReadOnly:_,isIndeterminate:C,isInvalid:l,isRequired:o,onChange:s,onFocusChange:i,value:p,name:y,slot:O,"aria-label":b,"aria-labelledby":N,"aria-describedby":I,"data-testid":k,className:V=>g(Le({size:d,isDisabled:V.isDisabled}),v),children:V=>jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("div",{className:Be({variant:m,size:d,isInvalid:V.isInvalid}),"data-selected":V.isSelected||void 0,"data-indeterminate":V.isIndeterminate||void 0,children:L(V.isSelected,V.isIndeterminate)}),(S||T)&&jsxRuntime.jsxs("div",{className:"flex flex-col",children:[S&&jsxRuntime.jsx("span",{className:"font-medium text-[var(--content-foreground)]",children:S}),T&&jsxRuntime.jsx("span",{className:"text-sm text-[var(--menu-muted)]",children:T})]})]})})});H.displayName="Checkbox";var be=classVarianceAuthority.cva(["relative w-full overflow-auto","rounded-lg border border-[var(--border)] bg-[var(--content-background)]"]),xe=classVarianceAuthority.cva(["w-full caption-bottom text-sm","border-collapse"],{variants:{variant:{default:"",bordered:"[&_tr>*+*]:border-l [&_tr>*+*]:border-[var(--border)]"}},defaultVariants:{variant:"default"}}),ge=classVarianceAuthority.cva(["[&_tr]:border-b [&_tr]:border-[var(--border)]"],{variants:{sticky:{true:"sticky top-0 z-10 bg-[var(--content-background)]",false:""}},defaultVariants:{sticky:false}}),ve=classVarianceAuthority.cva(["border-t border-[var(--border)]","bg-[var(--accent-background)]/50","font-medium","[&>tr]:last:border-b-0"]),ee=classVarianceAuthority.cva(["h-12 px-4 text-left align-middle font-semibold","uppercase tracking-wide","bg-[var(--accent-background)] text-[var(--content-foreground)]","[&:has([role=checkbox])]:pr-0","select-none","focus-visible:outline-none focus-visible:ring-2","focus-visible:ring-[var(--ring)] focus-visible:ring-inset"],{variants:{allowsSorting:{true:"cursor-pointer hover:bg-[var(--accent)]/50",false:""},align:{start:"text-start",center:"text-center",end:"text-end"},size:{sm:"h-10 px-3 text-xs",default:"h-12 px-4 text-sm",lg:"h-14 px-5 text-base"}},defaultVariants:{allowsSorting:false,align:"start",size:"default"}}),te=classVarianceAuthority.cva(["border-b border-[var(--border)]","transition-colors","focus-visible:outline-none focus-visible:ring-2","focus-visible:ring-[var(--ring)] focus-visible:ring-inset","hover:bg-[var(--accent-background)]/50","data-[disabled]:pointer-events-none data-[disabled]:opacity-50"],{variants:{isSelected:{true:"bg-[var(--selected)] data-[selected]:bg-[var(--selected)]",false:""},zebra:{true:"even:bg-[var(--accent-background)]/30",false:""}},defaultVariants:{isSelected:false,zebra:true}}),ae=classVarianceAuthority.cva(["p-4 align-middle","[&:has([role=checkbox])]:pr-0"],{variants:{align:{start:"text-start",center:"text-center",end:"text-end"},size:{sm:"p-3 text-xs",default:"p-4 text-sm",lg:"p-5 text-base"},isRowHeader:{true:"font-medium",false:""}},defaultVariants:{align:"start",size:"default",isRowHeader:false}});var Y=react.createContext({variant:"default",size:"default",selectionMode:"none",stickyHeader:false,zebra:true}),Ge=react.forwardRef(({className:t,variant:e="default",size:a="default",stickyHeader:r=false,zebra:n=true,toolbar:l,selectionMode:o="none",selectionBehavior:s="toggle",disallowEmptySelection:i=false,disabledBehavior:p="selection",selectedKeys:y,defaultSelectedKeys:d,onSelectionChange:m,disabledKeys:S,sortDescriptor:T,onSortChange:f,onRowAction:v,children:E,...b},N)=>{process.env.NODE_ENV!=="production"&&a==="sm"&&o!=="none"&&console.warn('[Table] size="sm" with selectionMode produces rows shorter than the 44px WCAG 2.2 AAA minimum touch target. Use size="default" or size="lg" for accessible interactive tables.');let I=react.useMemo(()=>({variant:e,size:a,selectionMode:o,stickyHeader:r,zebra:n}),[e,a,o,r,n]);return jsxRuntime.jsx(Y.Provider,{value:I,children:jsxRuntime.jsxs("div",{className:g(be(),t),"data-testid":"table-container",children:[l,jsxRuntime.jsx(reactAriaComponents.Table,{ref:N,className:g(xe({variant:e})),selectionMode:o,selectionBehavior:s,disallowEmptySelection:i,disabledBehavior:p,selectedKeys:y,defaultSelectedKeys:d,onSelectionChange:m,disabledKeys:S,sortDescriptor:T,onSortChange:f,onRowAction:v,"data-testid":"table","data-variant":e,"data-size":a,"data-zebra":n,...b,children:E})]})})});Ge.displayName="Table";function Ft({className:t,children:e,columns:a,...r},n){let{size:l,selectionMode:o,stickyHeader:s}=react.useContext(Y),{allowsDragging:i}=reactAriaComponents.useTableOptions();return jsxRuntime.jsxs(reactAriaComponents.TableHeader,{ref:n,className:g(ge({sticky:s}),t),"data-testid":"table-header",...r,children:[o==="multiple"&&jsxRuntime.jsx(reactAriaComponents.Column,{className:g(ee({size:l}),"w-12"),children:jsxRuntime.jsx(H,{slot:"selection","aria-label":"Select all",size:l})}),i&&jsxRuntime.jsx(reactAriaComponents.Column,{}),a?jsxRuntime.jsx(reactAriaComponents.Collection,{items:a,children:e}):e]})}var Ue=react.forwardRef(Ft);Ue.displayName="TableHeader";function jt({className:t,children:e,items:a,renderEmptyState:r,...n},l){return jsxRuntime.jsx(reactAriaComponents.TableBody,{ref:l,className:g(t),items:a,renderEmptyState:r?()=>jsxRuntime.jsx("div",{className:"text-center p-8",children:r()}):void 0,"data-testid":"table-body",...n,children:e})}var Fe=react.forwardRef(jt);Fe.displayName="TableBody";var je=react.forwardRef(({className:t,children:e,...a},r)=>jsxRuntime.jsx("tfoot",{ref:r,className:g(ve(),t),"data-testid":"table-footer",...a,children:e}));je.displayName="TableFooter";var $e=react.forwardRef(({className:t,children:e,isRowHeader:a=false,allowsSorting:r=false,align:n="start",width:l,minWidth:o,maxWidth:s,...i},p)=>{let{size:y}=react.useContext(Y);return jsxRuntime.jsx(reactAriaComponents.Column,{ref:p,isRowHeader:a,allowsSorting:r,width:l,minWidth:o,maxWidth:s,className:g(ee({allowsSorting:r,align:n,size:y}),t),...i,children:({allowsSorting:d,sortDirection:m})=>jsxRuntime.jsxs("div",{className:"flex items-center gap-1",children:[jsxRuntime.jsx("span",{children:e}),d&&jsxRuntime.jsx("span",{"aria-hidden":"true","data-sort-direction":m??"none",className:m?"text-[var(--primary-action)]":"opacity-50",children:m==="ascending"?jsxRuntime.jsx(lucideReact.ChevronUp,{className:"h-4 w-4"}):m==="descending"?jsxRuntime.jsx(lucideReact.ChevronDown,{className:"h-4 w-4"}):jsxRuntime.jsx(lucideReact.ChevronsUpDown,{className:"h-4 w-4"})})]})})});$e.displayName="Column";function $t({className:t,children:e,columns:a,href:r,isDisabled:n,...l},o){let{size:s,selectionMode:i,zebra:p}=react.useContext(Y),{allowsDragging:y}=reactAriaComponents.useTableOptions(),d=te({isSelected:true,zebra:p}),m=te({isSelected:false,zebra:p}),S=g(ae({size:s}),"w-12");return jsxRuntime.jsxs(reactAriaComponents.Row,{ref:o,href:r,isDisabled:n,className:({isSelected:T,isDisabled:f})=>g(T?d:m,f&&"opacity-50",t),"data-testid":"table-row",...l,children:[i==="multiple"&&jsxRuntime.jsx(reactAriaComponents.Cell,{className:S,children:jsxRuntime.jsx(H,{slot:"selection","aria-label":"Select row",size:s})}),y&&jsxRuntime.jsx(reactAriaComponents.Cell,{}),a?jsxRuntime.jsx(reactAriaComponents.Collection,{items:a,children:e}):e]})}var Ke=react.forwardRef($t);Ke.displayName="Row";var Ye=react.memo(react.forwardRef(({className:t,children:e,align:a="start",colSpan:r,...n},l)=>{let{size:o}=react.useContext(Y);return jsxRuntime.jsx(reactAriaComponents.Cell,{ref:l,className:g(ae({align:a,size:o}),t),...n,children:e})}));Ye.displayName="Cell";var Ee=classVarianceAuthority.cva("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",{variants:{fullWidth:{true:"w-full",false:""},inVerticalGroup:{true:"items-stretch",false:"items-center"}},defaultVariants:{fullWidth:false,inVerticalGroup:false}}),he=classVarianceAuthority.cva("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",{variants:{variant:{default:"bg-[var(--primary-action)] text-[var(--primary-action-foreground)] shadow-md hover:bg-[var(--primary-action-hover)] hover:-translate-y-1",destructive:"bg-[var(--destructive-background)] text-[var(--destructive-foreground)] hover:bg-[var(--destructive-background-hover,var(--destructive-background))] motion-safe:hover:btn-warn-shake",outline:"border border-[var(--input-border)] bg-[var(--content-background)] hover:bg-[var(--accent-background)]/50",secondary:"bg-[var(--secondary)] text-[var(--secondary-foreground)] hover:bg-[var(--secondary-hover,var(--secondary))]",ghost:"hover:bg-[var(--accent)] hover:text-[var(--accent-foreground)]",link:"text-[var(--text-link)] underline underline-offset-4 hover:bg-[var(--accent)] hover:text-[var(--text-link-hover)]"},fullWidth:{true:"w-full",false:""},visualSize:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3 text-xs",lg:"h-11 rounded-md px-6 text-base",icon:"h-10 w-10",dot:"h-5 w-5 rounded-full p-0 min-h-0 min-w-0"},paywall:{true:"!bg-[var(--paywall)] !text-[var(--paywall-foreground)] hover:!bg-[var(--paywall)]/90 !cursor-not-allowed !border-transparent",false:""}},defaultVariants:{variant:"default",visualSize:"default",paywall:false}});var qe=react.createContext(null);qe.displayName="ButtonGroupContext";function Qe(){return react.useContext(qe)}var Je=react.createContext(null);Je.displayName="ButtonGroupItemContext";function et(){return react.useContext(Je)}classVarianceAuthority.cva("inline-flex items-center gap-0",{variants:{orientation:{horizontal:"flex-row",vertical:"flex-col w-full"}},defaultVariants:{orientation:"horizontal"}});var tt=classVarianceAuthority.cva("",{variants:{orientation:{horizontal:"min-w-[44px]",vertical:"flex min-h-[44px]"},position:{first:"",middle:"",last:"",only:""}},compoundVariants:[{orientation:"horizontal",position:"first",className:"rounded-r-none border-r-0"},{orientation:"horizontal",position:"middle",className:"rounded-none border-r-0"},{orientation:"horizontal",position:"last",className:"rounded-l-none"},{orientation:"vertical",position:"first",className:"rounded-b-none border-b-0"},{orientation:"vertical",position:"middle",className:"rounded-none border-b-0"},{orientation:"vertical",position:"last",className:"rounded-t-none"}],defaultVariants:{orientation:"horizontal",position:"only"}});classVarianceAuthority.cva("bg-[var(--border)]",{variants:{orientation:{horizontal:"w-px h-6 mx-1",vertical:"h-px w-full my-1"}},defaultVariants:{orientation:"horizontal"}});var U=react.memo(react.forwardRef(({className:t,buttonVisualClassName:e,variant:a,size:r,visualSize:n,fullWidth:l,loading:o=false,loadingText:s="Loading...",shortcut:i,children:p,isDisabled:y,paywall:d=false,paywallRedirect:m,paywallDescription:S,onPress:T,...f},v)=>{let E=react.useId(),b=Qe(),N=et(),I=a??b?.variant??"default",k=r??b?.size,O=y??b?.isDisabled??false,R=b?.orientation==="vertical",c=l||R,_=N?tt({orientation:b?.orientation??"horizontal",position:N.position}):"",C=n??k??"default";return process.env.NODE_ENV!=="production"&&(C==="dot"||C==="icon")&&!f["aria-label"]&&!p&&console.warn('[Button] visualSize="dot" or "icon" requires aria-label when no visible text is provided (WCAG 1.1.1)'),jsxRuntime.jsx(reactAriaComponents.Button,{ref:v,isDisabled:O||o||void 0,"aria-disabled":d?true:void 0,"aria-describedby":d?E:void 0,onPress:u=>{if(d){m&&window.open(m,"_blank","noopener,noreferrer");return}T?.(u);},className:g(Ee({fullWidth:c,inVerticalGroup:R}),t),...f,children:u=>jsxRuntime.jsxs("span",{className:g(he({variant:I,visualSize:C,paywall:d,fullWidth:c}),_,e,me,"",Q,J),"data-pressed":u.isPressed||void 0,children:[o&&jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(lucideReact.Loader2,{className:"motion-safe:animate-spin","aria-hidden":"true"}),jsxRuntime.jsx("span",{className:"sr-only","aria-live":"polite",children:s})]}),!o&&p,d&&jsxRuntime.jsx(lucideReact.Zap,{"data-testid":"zap-icon","aria-hidden":"true",className:"ml-1"}),d&&jsxRuntime.jsxs("span",{id:E,className:"sr-only",children:["Premium feature: ",S||"Upgrade required to access this feature"]}),u.isFocusVisible&&i&&jsxRuntime.jsx("kbd",{className:"ml-auto hidden text-xs opacity-60 lg:inline",children:i})]})})}));U.displayName="Button";var ne=classVarianceAuthority.cva(["flex items-center justify-between gap-3 flex-wrap","px-4 py-2.5","bg-[var(--selected)]"],{variants:{sticky:{true:"sticky top-0 z-[6]",false:""},framed:{true:"rounded-lg border border-[var(--border)]",false:"border-b border-[var(--border)]"}},defaultVariants:{sticky:true,framed:false}}),se=classVarianceAuthority.cva(["flex items-center gap-3 flex-wrap w-full justify-between"]),ie=classVarianceAuthority.cva(["text-sm text-[var(--content-muted)] inline-flex items-center gap-1.5"]),at=classVarianceAuthority.cva(["inline-flex items-center justify-center","min-w-[1.5rem] h-6 px-1.5 rounded","border border-[var(--primary)]/40 bg-[var(--content-background)]","font-mono text-xs font-semibold text-[var(--primary-action)]"]),rt=classVarianceAuthority.cva(["text-[var(--primary-action)] border-[var(--primary)]/30","hover:bg-[var(--content-background)]"]);function oa(t,e){typeof t=="function"?t(e):t&&(t.current=e);}var ot=react.forwardRef(({selectedCount:t,actions:e,onAction:a,onClearSelection:r,sticky:n=true,framed:l=false,showJumpHint:o=false,shortcutKey:s="A",labels:i,className:p,"data-testid":y="bulk-action-bar"},d)=>{let m=react.useRef(null),S=react.useRef(t),T=react.useRef([]),[f,v]=react.useState(0),E=e.length+1,b=Math.min(f,E-1),N=c=>{let _=(c+E)%E;v(_),T.current[_]?.focus();},I=c=>{switch(c.key){case "ArrowRight":case "ArrowDown":c.preventDefault(),N(b+1);break;case "ArrowLeft":case "ArrowUp":c.preventDefault(),N(b-1);break;case "Home":c.preventDefault(),N(0);break;case "End":c.preventDefault(),N(E-1);break;}};react.useEffect(()=>{let c=S.current;if(S.current=t,c>0&&t===0){let _=document.activeElement;(!_||_===document.body)&&m.current?.focus();}},[t]);let k=t>0,O=o&&!!i.jumpHint,R="";if(k){let c=[i.selectedCount(t)];i.actionsAvailable&&c.push(i.actionsAvailable(e.length)),o&&i.jumpAnnouncement&&c.push(i.jumpAnnouncement),R=c.join(". ");}return jsxRuntime.jsxs("div",{ref:c=>{m.current=c,oa(d,c);},tabIndex:-1,className:g("outline-none",p),"data-testid":y,children:[jsxRuntime.jsx("div",{className:"sr-only",role:"status","aria-live":"polite",children:R}),k&&jsxRuntime.jsx("div",{className:ne({sticky:n,framed:l}),children:jsxRuntime.jsxs("div",{role:"toolbar","aria-label":i.toolbarLabel(t),"aria-orientation":"horizontal",onKeyDown:I,className:se(),children:[jsxRuntime.jsxs("div",{className:"flex items-center gap-4 flex-wrap",children:[jsxRuntime.jsx("span",{className:"text-sm font-bold text-[var(--content-foreground)]",children:i.selectedCount(t)}),jsxRuntime.jsx(U,{ref:c=>{T.current[0]=c;},variant:"link",excludeFromTabOrder:b!==0,onFocus:()=>v(0),onPress:r,children:i.clear}),O&&i.jumpHint&&jsxRuntime.jsx("span",{"aria-hidden":"true",className:ie(),children:i.jumpHint(jsxRuntime.jsx("kbd",{className:at(),children:s}))})]}),jsxRuntime.jsx("div",{className:"flex items-center gap-2 flex-wrap",children:e.map((c,_)=>{let C=_+1;return jsxRuntime.jsxs(U,{ref:L=>{T.current[C]=L;},variant:c.tone==="danger"?"destructive":"outline",buttonVisualClassName:c.tone==="danger"?void 0:rt(),isDisabled:c.isDisabled,excludeFromTabOrder:b!==C,onFocus:()=>v(C),onPress:()=>a(c.id),children:[c.icon!=null&&jsxRuntime.jsx("span",{"aria-hidden":"true",className:"inline-flex",children:c.icon}),c.label]},c.id)})})]})})]})});ot.displayName="BulkActionBar";function na(t,e){if(t==="all"){let a=0;for(let r of e)a+=1;return a}return t.size}var ia=new Set(["text","search","email","url","tel","number","password"]);function la(t){if(!(t instanceof HTMLElement))return false;if(t.isContentEditable||t.closest('[contenteditable=""],[contenteditable="true"]'))return true;let e=t.tagName;if(e==="TEXTAREA"||e==="SELECT"||e==="INPUT"&&ia.has(t.type))return true;let a=t.getAttribute("role");return a==="textbox"||a==="searchbox"||a==="combobox"}function ca({scopeRef:t,toolbarRef:e,key:a="a",disabled:r=false}){react.useEffect(()=>{if(r)return;let n=t.current;if(!n)return;let l=o=>{if(o.metaKey||o.ctrlKey||o.altKey||o.key.toLowerCase()!==a.toLowerCase()||la(o.target))return;let s=e.current;if(!s)return;let i=s.querySelector('[tabindex="0"]')??s.querySelector("button:not([disabled])");i&&(o.preventDefault(),i.focus());};return n.addEventListener("keydown",l),()=>n.removeEventListener("keydown",l)},[t,e,a,r]);}var ce={sm:"h-9",default:"h-10",lg:"h-11"},M={sm:`${ce.sm} px-2 text-xs`,default:`${ce.default} px-3 text-sm`,lg:`${ce.lg} px-4 text-base`},Ie="min-h-[44px] flex items-center";function da(t){if(!(t instanceof Element))return false;let e=t;for(let n=0;e&&n<100;n++){let l=e.tagName?.toLowerCase()??"";if(l.startsWith("grammarly-")||l.startsWith("lt-")||e.hasAttribute("data-grammarly-shadow-root"))return true;if(e.parentElement)e=e.parentElement;else {let o=e.getRootNode();e=o instanceof ShadowRoot?o.host:null;}}let a=t;for(;a&&!a.tagName.includes("-");)a=a.parentElement;if(!a)return false;let r=a.parentElement;return r===document.body||r===document.documentElement}function nt(t){return e=>!da(e)&&(t?.(e)??true)}var st=classVarianceAuthority.cva(["flex","w-full","items-center","justify-between","gap-2","rounded-md","border","bg-[var(--content-background)]","text-[var(--content-foreground)]","transition-colors","duration-200","outline-none","focus-visible:ring-2","focus-visible:ring-[var(--ring)]","focus-visible:ring-offset-2","hover:bg-[var(--accent)]/10","disabled:cursor-not-allowed","disabled:opacity-50","data-[loading=true]:cursor-wait","truncate"],{variants:{size:{sm:`${M.sm} pr-1`,default:`${M.default} pr-1.5`,lg:`${M.lg} pr-2`},isInvalid:{true:"border-[var(--destructive-background)]",false:"border-[var(--input-border)] hover:border-[var(--input-border)]/80"}},defaultVariants:{size:"default",isInvalid:false}}),it=classVarianceAuthority.cva(["relative","flex","w-full","cursor-pointer","select-none","items-center","rounded-sm","outline-none","transition-colors","pl-8","pr-2","hover:bg-[var(--accent)]","hover:text-[var(--accent-foreground)]","focus:bg-[var(--accent)]","focus:text-[var(--accent-foreground)]","data-[selected=true]:bg-[var(--accent)]","data-[selected=true]:text-[var(--accent-foreground)]","data-[disabled=true]:pointer-events-none","data-[disabled=true]:opacity-50","data-[disabled=true]:text-[var(--menu-muted)]"],{variants:{size:{sm:`${M.sm} py-1`,default:`${M.default} py-2`,lg:`${M.lg} py-3`}},defaultVariants:{size:"default"}}),lt=classVarianceAuthority.cva(["z-50","w-[--trigger-width]","rounded-md","border","border-[var(--menu-border)]","bg-[var(--menu-background)]","text-[var(--menu-foreground)]","outline-none","overflow-auto","data-[entering]:animate-in","data-[entering]:fade-in-0","data-[entering]:zoom-in-95","data-[exiting]:animate-out","data-[exiting]:fade-out-0","data-[exiting]:zoom-out-95"],{variants:{size:{sm:"max-h-[200px] p-1",default:"max-h-[300px] p-1",lg:"max-h-[400px] p-1"}},defaultVariants:{size:"default"}}),ct={sm:200,default:300,lg:400},dt=classVarianceAuthority.cva(["px-2","py-1.5","text-xs","font-semibold","text-[var(--menu-muted)]","uppercase","tracking-wider"],{variants:{size:{sm:"px-2 py-1 text-[10px]",default:"px-2 py-1 text-xs",lg:"px-2 py-1.5 text-xs"}},defaultVariants:{size:"default"}}),ut=classVarianceAuthority.cva(["flex","items-center","gap-1.5","text-sm","font-medium","text-[var(--destructive-background)]","mt-1"],{variants:{size:{sm:"text-xs mt-1",default:"text-sm mt-1",lg:"text-base mt-1"}},defaultVariants:{size:"default"}});var Ca=Array.from({length:3}).map((t,e)=>jsxRuntime.jsx("div",{className:"h-11 px-4 py-2",children:jsxRuntime.jsx("div",{className:"h-4 bg-[var(--accent-background)] rounded animate-pulse"})},`skeleton-${e}`));function bt({ariaSelectProps:t,triggerContent:e,triggerRef:a,label:r,description:n,isRequired:l,isDisabled:o,isLoading:s,errorMessage:i,size:p,emptyStateMessage:y,childCount:d,children:m}){let S=react.useId(),T=react.useId(),f=react.useId(),v=!!i,{className:E,...b}=t;return jsxRuntime.jsxs(reactAriaComponents.Select,{...b,className:g("flex flex-col gap-1.5",E),isInvalid:v,children:[jsxRuntime.jsxs(reactAriaComponents.Label,{id:S,className:"text-sm font-medium text-[var(--content-foreground)]",children:[r,l&&jsxRuntime.jsx("span",{className:"text-[var(--destructive-background)] ml-1",children:"*"})]}),n&&jsxRuntime.jsx(reactAriaComponents.Text,{id:T,slot:"description",className:"text-sm text-[var(--menu-muted)]",children:n}),jsxRuntime.jsx("div",{className:Ie,children:jsxRuntime.jsxs(reactAriaComponents.Button,{ref:a,className:st({size:p,isInvalid:v}),"aria-labelledby":S,"aria-describedby":n?T:i?f:void 0,"data-loading":s,...l&&{"aria-required":"true"},...s&&{"aria-busy":"true"},...(o||s)&&{"aria-disabled":"true"},children:[e,s?jsxRuntime.jsx(lucideReact.Loader2,{className:"ml-auto h-4 w-4 shrink-0 animate-spin text-[var(--menu-muted)]","aria-hidden":"true"}):jsxRuntime.jsx(lucideReact.ChevronDown,{className:"ml-auto h-4 w-4 shrink-0 text-[var(--menu-muted)]","aria-hidden":"true"})]})}),jsxRuntime.jsx(reactAriaComponents.FieldError,{id:f,className:ut({size:p}),children:({validationErrors:N})=>{let I=i||N.join(" ");return I?jsxRuntime.jsx(jsxRuntime.Fragment,{children:I}):null}}),jsxRuntime.jsx(reactAriaComponents.Popover,{shouldCloseOnInteractOutside:nt(),maxHeight:ct[p],className:lt({size:p}),children:jsxRuntime.jsxs(reactAriaComponents.ListBox,{className:"outline-none",children:[s&&d>0&&Ca,!s&&jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[m,d===0&&jsxRuntime.jsx(reactAriaComponents.ListBoxItem,{id:"__empty__",textValue:"empty",isDisabled:true,className:"py-6 text-center text-sm text-[var(--menu-muted)] cursor-default pointer-events-none",children:jsxRuntime.jsx("span",{role:"status",children:y||"No options available"})})]})]})})]})}var xt=react.forwardRef(({label:t,placeholder:e,description:a,value:r,defaultValue:n,isOpen:l,isDisabled:o=false,isRequired:s=false,disabledKeys:i,validate:p,validationBehavior:y="aria",errorMessage:d,isLoading:m=false,emptyStateMessage:S,name:T,size:f="default",onChange:v,onOpenChange:E,className:b,children:N,...I},k)=>{let O=react.Children.count(N);return O>1e3&&console.warn("Select has >1000 items. Consider using Autocomplete component for better performance."),jsxRuntime.jsx(bt,{ariaSelectProps:{value:r,defaultValue:n,onChange:R=>{v&&v(R);},placeholder:e,disabledKeys:i,isOpen:l,onOpenChange:E,isDisabled:o||m,isRequired:s,name:T,validate:p,validationBehavior:y,className:b,...I},triggerContent:jsxRuntime.jsx(reactAriaComponents.SelectValue,{className:"flex-1 text-left truncate"}),triggerRef:k,label:t,description:a,isRequired:s,isDisabled:o,isLoading:m,errorMessage:d,size:f,emptyStateMessage:S,childCount:O,children:N})});xt.displayName="Select";var gt=react.forwardRef(({label:t,placeholder:e,description:a,value:r,defaultValue:n,selectionMode:l="multiple",isOpen:o,isDisabled:s=false,isRequired:i=false,disabledKeys:p,validate:y,validationBehavior:d="aria",errorMessage:m,isLoading:S=false,emptyStateMessage:T,name:f,size:v="default",onChange:E,onOpenChange:b,className:N,children:I,...k},O)=>{let R=react.Children.count(I);R>1e3&&console.warn("Select has >1000 items. Consider using Autocomplete component for better performance.");let c=react.useMemo(()=>{let C=new Map,L=V=>{react.Children.forEach(V,u=>{if(react.isValidElement(u)){let x=u;if(x.type===de||x.props?.value){let P=x.props.value,$=x.props.children;P&&typeof $=="string"&&C.set(P,$);}x.props?.children&&L(x.props.children);}});};return L(I),C},[I]),_=react.useMemo(()=>!r||!Array.isArray(r)||r.length===0?e||"":r.length<=2?r.map(L=>c.get(L)||L).join(", "):`${r.length} items selected`,[r,c,e]);return jsxRuntime.jsx(bt,{ariaSelectProps:{value:r,defaultValue:n,onChange:C=>{E&&E(C);},selectionMode:"multiple",disabledKeys:p,isOpen:o,onOpenChange:b,isDisabled:s||S,isRequired:i,name:f,validate:y,validationBehavior:d,className:N,...k},triggerContent:jsxRuntime.jsx("span",{className:"flex-1 text-left truncate",children:_}),triggerRef:O,label:t,description:a,isRequired:i,isDisabled:s,isLoading:S,errorMessage:m,size:v,emptyStateMessage:T,childCount:R,children:I})});gt.displayName="MultiSelect";var de=react.memo(function({children:e,textValue:a,value:r,isDisabled:n=false,className:l,...o}){if(!a&&typeof e!="string"){let s="Select.Item with custom children requires textValue prop for accessibility";if(process.env.NODE_ENV==="development")throw new Error(s);console.warn(s);}return jsxRuntime.jsx(reactAriaComponents.ListBoxItem,{id:r,textValue:a||(typeof e=="string"?e:void 0),className:`${it({size:"default"})} ${l||""}`,isDisabled:n,...o,children:({isSelected:s,selectionMode:i,isDisabled:p})=>jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[i==="multiple"?jsxRuntime.jsx(lucideReact.CheckSquare,{className:`absolute left-2 h-4 w-4 ${s?"visible":"invisible"}`,"aria-hidden":"true"}):s&&jsxRuntime.jsx(lucideReact.Check,{className:"absolute left-2 h-4 w-4","aria-hidden":"true"}),jsxRuntime.jsx("span",{className:p?"text-[var(--menu-muted)]":"",children:e})]})})});de.displayName="SelectItem";function Re({children:t,className:e,...a}){return jsxRuntime.jsx(reactAriaComponents.ListBoxSection,{className:`border-t border-[var(--border)] first:border-t-0 ${e||""}`,...a,children:t})}Re.displayName="SelectSection";function we({children:t,className:e,...a}){return jsxRuntime.jsx(reactAriaComponents.Header,{className:`${dt({size:"default"})} ${e||""}`,...a,children:t})}we.displayName="SelectHeader";var ue=Object.assign(xt,{Item:de,Section:Re,Header:we});Object.assign(gt,{Item:de,Section:Re,Header:we});var vt=classVarianceAuthority.cva(["flex flex-col gap-3"]),St=classVarianceAuthority.cva(["flex items-center justify-between gap-3 flex-wrap px-0.5"]),Tt=classVarianceAuthority.cva(["flex flex-col gap-2.5 list-none m-0 p-0"]),Et=classVarianceAuthority.cva(["flex items-start gap-2.5 p-3.5","rounded-lg border border-[var(--border)] bg-[var(--content-background)]","motion-safe:transition-colors"],{variants:{isSelected:{true:"bg-[var(--selected)] border-[var(--primary)]/40",false:""}},defaultVariants:{isSelected:false}}),ht=classVarianceAuthority.cva(["flex items-center justify-center min-w-[44px] min-h-[44px] -m-1 flex-none"]),yt=classVarianceAuthority.cva(["flex-1 min-w-0"]),Nt=classVarianceAuthority.cva(["block w-full text-left cursor-pointer rounded-md","outline-none focus-visible:ring-2 focus-visible:ring-[var(--ring)] focus-visible:ring-offset-2"]);function At({items:t,getRowId:e,renderCard:a,selectionMode:r="none",selectedKeys:n=new Set,onSelectionChange:l,onRowAction:o,sortDescriptor:s,onSortChange:i,sortColumns:p=[],renderEmptyState:y,labels:d,"aria-label":m,className:S,"data-testid":T="table-card-list"}){let f=r==="multiple",v=t.map(e),E=u=>n==="all"||n.has(u),b=v.length>0&&v.every(E),N=v.some(E)&&!b,I=()=>n==="all"?new Set(v):new Set(n),k=()=>{l?.(b?new Set:new Set(v));},O=u=>{let x=I();x.has(u)?x.delete(u):x.add(u),l?.(x);},R=s?.column!=null?String(s.column):void 0,c=s?.direction??"ascending",_=u=>{let x=Array.isArray(u)?u[0]:u;x&&i?.({column:x,direction:s?.direction??"ascending"});},C=()=>{s?.column!=null&&i?.({column:s.column,direction:c==="ascending"?"descending":"ascending"});},L=f||p.length>0,V=t.length===0;return jsxRuntime.jsxs("div",{role:"region","aria-label":m,className:g(vt(),S),"data-testid":T,children:[jsxRuntime.jsx("p",{className:"sr-only",role:"status","aria-live":"polite",children:d.results(t.length)}),L&&jsxRuntime.jsxs("div",{className:St(),children:[f?jsxRuntime.jsx(H,{label:d.selectAll,isSelected:b,isIndeterminate:N,onChange:k}):jsxRuntime.jsx("span",{}),p.length>0&&jsxRuntime.jsxs("div",{className:"flex items-end gap-2",children:[jsxRuntime.jsx(ue,{label:d.sort,placeholder:d.sortPlaceholder,value:R,onChange:_,children:p.map(u=>jsxRuntime.jsx(ue.Item,{value:u.id,children:u.label},u.id))}),jsxRuntime.jsx(U,{variant:"ghost",visualSize:"icon",isDisabled:s?.column==null,"aria-label":d.sortDirection(c),onPress:C,children:c==="ascending"?jsxRuntime.jsx(lucideReact.ArrowUp,{"aria-hidden":"true"}):jsxRuntime.jsx(lucideReact.ArrowDown,{"aria-hidden":"true"})})]})]}),V?y?jsxRuntime.jsx("div",{className:"rounded-lg border border-dashed border-[var(--border)] p-8 text-center","data-testid":"card-empty-state",children:y()}):null:jsxRuntime.jsx("ul",{className:Tt(),children:t.map(u=>{let x=e(u),P=E(x);return jsxRuntime.jsxs("li",{className:Et({isSelected:P}),children:[f&&jsxRuntime.jsx("div",{className:ht(),children:jsxRuntime.jsx(H,{"aria-label":d.selectItem(u),isSelected:P,onChange:()=>O(x)})}),jsxRuntime.jsx("div",{className:yt(),children:o?jsxRuntime.jsx(reactAriaComponents.Button,{className:Nt(),"data-testid":"card-action",onPress:()=>o(x),children:a(u)}):a(u)})]},String(x))})})]})}At.displayName="TableCardList";function La(t,e){let[a,r]=react.useState(false);return react.useEffect(()=>{let n=t.current;if(!n)return;let l=()=>r(n.offsetWidth<e);l();let o;return typeof ResizeObserver<"u"&&(o=new ResizeObserver(l),o.observe(n)),window.addEventListener("resize",l),()=>{window.removeEventListener("resize",l),o?.disconnect();}},[t,e]),a}exports.BulkActionBar=ot;exports.Cell=Ye;exports.Column=$e;exports.Row=Ke;exports.Table=Ge;exports.TableBody=Fe;exports.TableCardList=At;exports.TableFooter=je;exports.TableHeader=Ue;exports.bulkActionBarVariants=ne;exports.bulkActionHintVariants=ie;exports.bulkActionToolbarVariants=se;exports.cellVariants=ae;exports.columnVariants=ee;exports.resolveSelectedCount=na;exports.rowVariants=te;exports.tableContainerVariants=be;exports.tableFooterVariants=ve;exports.tableHeaderVariants=ge;exports.tableVariants=xe;exports.useBulkActionShortcut=ca;exports.useContainerNarrow=La;//# sourceMappingURL=index.js.map
3
3
  //# sourceMappingURL=index.js.map