@tribepad/themis 1.0.15 → 1.0.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/elements/PasswordField/index.js +1 -1
- package/dist/elements/PasswordField/index.js.map +1 -1
- package/dist/elements/PasswordField/index.mjs +1 -1
- package/dist/elements/PasswordField/index.mjs.map +1 -1
- package/dist/elements/SearchField/index.js +1 -1
- package/dist/elements/SearchField/index.js.map +1 -1
- package/dist/elements/SearchField/index.mjs +1 -1
- package/dist/elements/SearchField/index.mjs.map +1 -1
- package/dist/elements/TextField/TextField.d.ts.map +1 -1
- package/dist/elements/TextField/TextField.types.d.ts +2 -0
- package/dist/elements/TextField/TextField.types.d.ts.map +1 -1
- package/dist/elements/TextField/index.js +1 -1
- package/dist/elements/TextField/index.js.map +1 -1
- package/dist/elements/TextField/index.mjs +1 -1
- package/dist/elements/TextField/index.mjs.map +1 -1
- package/dist/elements/index.js +1 -1
- package/dist/elements/index.js.map +1 -1
- package/dist/elements/index.mjs +1 -1
- package/dist/elements/index.mjs.map +1 -1
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +2 -2
- package/dist/index.mjs.map +1 -1
- package/package.json +9 -7
- package/src/elements/Combobox/Combobox.stories.tsx +1 -1
- package/src/elements/MatrixGrid/MatrixGrid.stories.tsx +1 -1
- package/src/elements/RatingScale/RatingScale.stories.tsx +1 -1
- package/src/elements/SituationalJudgement/SituationalJudgement.stories.tsx +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/utils/cn.ts","../../../src/styles/interaction-states.ts","../../../src/elements/Button/Button.styles.ts","../../../src/elements/ButtonGroup/ButtonGroupContext.tsx","../../../src/elements/ButtonGroup/ButtonGroup.variants.ts","../../../src/elements/Button/Button.tsx","../../../src/elements/TextField/TextField.icons.tsx","../../../src/elements/TextField/TextField.styles.ts","../../../src/elements/TextField/TextField.hooks.ts","../../../src/elements/TextField/TextField.tsx","../../../src/elements/SearchField/SearchField.tsx","../../../src/schemas/BaseComponentProps.ts","../../../src/elements/SearchField/SearchField.types.ts","../../../src/elements/SearchField/SearchField.styles.ts"],"names":["cn","inputs","twMerge","clsx","PRESSED_STYLES","HOVER_STYLES","HIGH_CONTRAST_HOVER","HIGH_CONTRAST_PRESSED","DISABLED_STYLES","buttonOuterVariants","cva","buttonVisualVariants","ButtonGroupContext","createContext","useButtonGroupContext","useContext","ButtonGroupItemContext","useButtonGroupItemContext","buttonGroupItemVariants","Button","memo","forwardRef","className","buttonVisualClassName","variant","size","visualSize","fullWidth","loading","loadingText","shortcut","children","isDisabled","paywall","paywallRedirect","paywallDescription","onPress","props","ref","paywallDescriptionId","useId","groupContext","itemContext","effectiveVariant","effectiveSize","effectiveIsDisabled","isInVerticalGroup","effectiveFullWidth","positionClassName","effectiveVisualSize","jsx","AriaButton","e","renderProps","jsxs","Fragment","Loader2","Zap","EyeIcon","EyeOffIcon","inputVariants","labelVariants","descriptionVariants","errorMessageVariants","successMessageVariants","useExpandOnFocus","expandOnFocus","collapsedWidth","value","defaultValue","userOnFocus","userOnBlur","isFocused","setIsFocused","useState","handleFocus","useCallback","handleBlur","inputWidth","useMemo","useCopyPasteProtection","disableCopyPaste","isShaking","setIsShaking","screenReaderMessage","setScreenReaderMessage","useEffect","handlePaste","usePasswordToggle","type","showPasswordToggle","showPassword","setShowPassword","handlePasswordToggle","prev","actualType","TextFieldLabel","state","AriaLabel","TextFieldInput","AriaInput","TextFieldDescription","AriaText","TextFieldError","AriaFieldError","CircleAlert","TextFieldSuccess","TextField","label","description","errorMessage","successMessage","isRequired","isReadOnly","isInvalid","isValid","id","autoComplete","pattern","patternDescription","prefix","suffix","prefixSize","suffixSize","isIconHidden","onSubmit","onClear","errorId","generatedId","fieldId","isSearch","searchValue","setSearchValue","isControlledSearch","currentSearchValue","handleSearchChange","newValue","handleSearchClear","handleSearchKeyDown","inputState","labelState","combinedDescription","actualPrefix","Search","inputPadding","basePadding","prefixWidth","suffixWidth","actualSuffix","X","hasInteractiveSuffix","AriaTextField","SearchField","ariaLabel","ariaLabelledBy","BaseComponentPropsSchema","z","SearchFieldPropsSchema","searchFieldVariants","searchFieldLabelVariants","searchFieldDescriptionVariants","searchFieldErrorVariants"],"mappings":"qaAcO,SAASA,CAAAA,CAAAA,GAAMC,CAAAA,CAA8B,CAClD,OAAOC,QAAQC,IAAAA,CAAKF,CAAM,CAAC,CAC7B,CCIO,IAUMG,GAAiB,8BAevB,IAAMC,EAAAA,CAAe,0BAAA,CAarB,IAMMC,CAAAA,CAAsB,6FAMtBC,CAAAA,CAAwB,+HAAA,CAYxBC,EAAAA,CAAkB,kDAAA,CCvExB,IAAMC,EAAAA,CAAsBC,GAAAA,CACjC,yPAAA,CACA,CACE,QAAA,CAAU,CACR,SAAA,CAAW,CACT,KAAM,QAAA,CACN,KAAA,CAAO,EACT,CAAA,CACA,gBAAiB,CACf,IAAA,CAAM,eAAA,CACN,KAAA,CAAO,cACT,CACF,CAAA,CACA,eAAA,CAAiB,CACf,SAAA,CAAW,KAAA,CACX,eAAA,CAAiB,KACnB,CACF,CACF,CAAA,CAQaC,EAAAA,CAAuBD,GAAAA,CAClC,6NAAA,CACA,CACE,QAAA,CAAU,CACR,QAAS,CACP,OAAA,CACE,kKAAA,CACF,WAAA,CACE,oLAAA,CACF,OAAA,CACE,wIAAA,CACF,SAAA,CACE,4IACF,KAAA,CACE,kGAAA,CACF,IAAA,CAAM,yGACR,CAAA,CACA,SAAA,CAAW,CACT,IAAA,CAAM,SACN,KAAA,CAAO,EACT,CAAA,CACA,UAAA,CAAY,CACV,OAAA,CAAS,gBAAA,CACT,EAAA,CAAI,8BACJ,EAAA,CAAI,sBAAA,CACJ,IAAA,CAAM,WAAA,CACN,GAAA,CAAK,0CACP,CAAA,CACA,OAAA,CAAS,CACP,IAAA,CAAM,yIAAA,CACN,KAAA,CAAO,EACT,CACF,CAAA,CACA,eAAA,CAAiB,CACf,QAAS,SAAA,CACT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SAAA,CACT,EAAA,CAAI,SACN,CACF,EACA,eAAA,CAAiB,CAAE,IAAA,CAAM,SAAU,CACrC,CACF,CAAA,CAKauJ,EAAAA,CAA2BvJ,IACtC,sCAAA,CACA,CACE,QAAA,CAAU,CACR,IAAA,CAAM,CACJ,EAAA,CAAI,SAAA,CACJ,QAAS,SAAA,CACT,EAAA,CAAI,SACN,CACF,EACA,eAAA,CAAiB,CAAE,IAAA,CAAM,SAAU,CACrC,CACF","file":"index.mjs","sourcesContent":["/**\n * Class Name Utility\n * Merges Tailwind CSS classes with conflict resolution\n *\n * Combines clsx for conditional classes and tailwind-merge for deduplication\n *\n * @example\n * cn('px-2 py-1', 'px-4') // => 'py-1 px-4' (px-4 overrides px-2)\n * cn('text-red-500', condition && 'text-blue-500') // => conditional application\n */\n\nimport { clsx, type ClassValue } from 'clsx';\nimport { twMerge } from 'tailwind-merge';\n\nexport function cn(...inputs: ClassValue[]): string {\n return twMerge(clsx(inputs));\n}\n","/**\n * Global Interaction State Styles\n *\n * Consistent interaction patterns across all Themis components.\n * These styles ensure WCAG 2.2 AAA compliance and predictable UX.\n *\n * @see spec.md FR-010 (Visible focus ring for keyboard navigation)\n * @see spec.md FR-031 (Pressed state feedback)\n * @see spec.md FR-012 (High contrast mode support)\n * @see constitution.md Principle IV (Accessibility First)\n */\n\n/**\n * Focus state styles (FR-010)\n * Visible focus ring for keyboard navigation - WCAG 2.2 Level AAA\n *\n * Components can override by extending these styles:\n * @example\n * cn(FOCUS_STYLES, \"ring-4\") // Increases ring width to 4px\n */\nexport const FOCUS_STYLES = \"data-[focus-visible]:ring-2 data-[focus-visible]:ring-[var(--themis-ring)] data-[focus-visible]:ring-offset-2\";\n\n/**\n * Pressed/Active state styles (FR-031)\n * Visual feedback for press interactions\n *\n * Components can override the scale amount:\n * @example\n * cn(PRESSED_STYLES_BASE, \"data-[pressed]:scale-[0.95]\") // More pronounced scale\n */\nexport const PRESSED_STYLES = \"data-[pressed]:scale-[0.97]\";\n\n/**\n * Base pressed styles without scale (for components that need different feedback)\n */\nexport const PRESSED_STYLES_BASE = \"data-[pressed]:transition-transform data-[pressed]:duration-100\";\n\n/**\n * Hover state styles\n * Elevation change on hover for better affordance\n *\n * Components can override shadow depth:\n * @example\n * cn(HOVER_STYLES_BASE, \"data-[hovered]:shadow-lg\") // Larger shadow\n */\nexport const HOVER_STYLES = \"data-[hovered]:shadow-md\";\n\n/**\n * Base hover styles without shadow (for components that use different hover effects)\n */\nexport const HOVER_STYLES_BASE = \"data-[hovered]:transition-shadow data-[hovered]:duration-200\";\n\n/**\n * High contrast mode focus (FR-012)\n * Enhanced outlines for users requiring high contrast\n *\n * Uses 'hc:' prefix for prefers-contrast: more media query\n */\nexport const HIGH_CONTRAST_FOCUS = \"hc:data-[focus-visible]:outline hc:data-[focus-visible]:outline-4 hc:data-[focus-visible]:outline-offset-2 hc:data-[focus-visible]:outline-foreground\";\n\n/**\n * High contrast mode hover (FR-012)\n * Enhanced outlines for hover in high contrast mode\n */\nexport const HIGH_CONTRAST_HOVER = \"hc:data-[hovered]:outline hc:data-[hovered]:outline-2 hc:data-[hovered]:outline-foreground\";\n\n/**\n * High contrast mode pressed state\n * Enhanced outlines for pressed state in high contrast mode\n */\nexport const HIGH_CONTRAST_PRESSED = \"hc:data-[pressed]:outline hc:data-[pressed]:outline-2 hc:data-[pressed]:outline-offset-1 hc:data-[pressed]:outline-foreground\";\n\n/**\n * Combined high contrast styles\n * Use this for components that need all high contrast interaction states\n */\nexport const HIGH_CONTRAST_INTERACTIONS = `${HIGH_CONTRAST_FOCUS} ${HIGH_CONTRAST_HOVER} ${HIGH_CONTRAST_PRESSED}`;\n\n/**\n * Disabled state styles\n * Consistent disabled appearance across all components\n */\nexport const DISABLED_STYLES = \"disabled:pointer-events-none disabled:opacity-50\";\n\n/**\n * Default interaction bundle\n * Most common combination for interactive components\n *\n * Includes: focus ring, pressed scale, hover shadow, high contrast enhancements\n *\n * @example\n * <button className={cn(DEFAULT_INTERACTIONS, \"bg-primary\")}>Click</button>\n */\nexport const DEFAULT_INTERACTIONS = `${FOCUS_STYLES} ${PRESSED_STYLES} ${HOVER_STYLES} ${HIGH_CONTRAST_FOCUS} ${HIGH_CONTRAST_HOVER} ${HIGH_CONTRAST_PRESSED}`;\n\n/**\n * Subtle interaction bundle\n * For components that need less pronounced feedback\n *\n * Includes: focus ring and high contrast, but no hover shadow or pressed scale\n */\nexport const SUBTLE_INTERACTIONS = `${FOCUS_STYLES} ${HIGH_CONTRAST_FOCUS}`;\n\n/**\n * Non-interactive element styles\n * For elements that should indicate they are not interactive\n */\nexport const NON_INTERACTIVE = \"cursor-default select-none\";\n","import { cva } from 'class-variance-authority';\n\n/**\n * Layer 1: Transparent outer touch target (44x44px minimum)\n * Handles WCAG 2.2 AAA touch target requirement\n * Always transparent, centers the visual button inside\n * IMPORTANT: Focus ring stays on Layer 1 for AAA compliance (2.4.13)\n *\n * In vertical ButtonGroups, uses items-stretch so the visual layer (Layer 2)\n * can fill the full touch target height, eliminating gaps between buttons.\n */\nexport const buttonOuterVariants = cva(\n \"inline-flex justify-center min-h-[44px] min-w-[44px] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--ring)] focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:pointer-events-none disabled:opacity-50\",\n {\n variants: {\n fullWidth: {\n true: \"w-full\",\n false: \"\",\n },\n inVerticalGroup: {\n true: \"items-stretch\",\n false: \"items-center\",\n },\n },\n defaultVariants: {\n fullWidth: false,\n inVerticalGroup: false,\n },\n }\n);\n\n/**\n * Layer 2: Visual button appearance (adjustable size)\n * Provides the visual appearance with configurable size\n * Can be smaller than touch target for use cases like carousel dots\n * NOTE: NO focus-visible styles here - focus ring is on Layer 1\n */\nexport const buttonVisualVariants = cva(\n \"inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 relative cursor-pointer\",\n {\n variants: {\n variant: {\n default:\n \"bg-[var(--primary-action)] text-[var(--primary-action-foreground)] shadow-md hover:bg-[var(--primary-action-hover)] data-[pressed]:bg-[var(--primary-action)]/80\",\n destructive:\n \"bg-[var(--destructive-background)] text-[var(--destructive-foreground)] shadow-md hover:bg-[var(--destructive-background)]/90 data-[pressed]:bg-[var(--destructive-background)]/80\",\n outline:\n \"border border-[var(--input-border)] bg-[var(--page-background)] hover:bg-[var(--input-border)] data-[pressed]:bg-[var(--input-border)]\",\n secondary:\n \"bg-[var(--secondary)] text-[var(--secondary-foreground)] shadow-md hover:bg-[var(--secondary)]/80 data-[pressed]:bg-[var(--secondary)]/70\",\n ghost:\n \"hover:bg-[var(--accent)] hover:text-[var(--accent-foreground)] data-[pressed]:bg-[var(--accent)]\",\n link: \"text-[var(--text-link)] underline-offset-4 hover:underline data-[pressed]:text-[var(--text-link-hover)]\",\n },\n fullWidth: {\n true: \"w-full\",\n false: \"\",\n },\n visualSize: {\n default: \"h-10 px-4 py-2\",\n sm: \"h-9 rounded-md px-3 text-xs\",\n lg: \"h-11 rounded-md px-8\",\n icon: \"h-10 w-10\",\n dot: \"h-5 w-5 rounded-full p-0 min-h-0 min-w-0\",\n },\n paywall: {\n true: \"!bg-[var(--paywall)] !text-[var(--paywall-foreground)] !shadow-md hover:!bg-[var(--paywall)]/90 !cursor-not-allowed !border-transparent\",\n false: \"\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n visualSize: \"default\",\n paywall: false,\n },\n }\n);\n\n/**\n * @deprecated Use buttonVisualVariants instead. This alias is kept for backward compatibility.\n */\nexport const buttonVariants = buttonVisualVariants;\n","\"use client\";\n\nimport { createContext, useContext } from 'react';\nimport type {\n ButtonGroupContextValue,\n ButtonGroupItemContextValue,\n} from './ButtonGroup.types';\n\n/**\n * ButtonGroup Context System (Two-Level)\n *\n * Provides a two-level context pattern for ButtonGroup:\n *\n * 1. ButtonGroupContext (group-level):\n * - Provides: orientation, variant, size, isDisabled\n * - Consumed by: Button (for prop inheritance), Separator (for orientation)\n *\n * 2. ButtonGroupItemContext (item-level):\n * - Provides: position ('first' | 'middle' | 'last' | 'only')\n * - Consumed by: Button (for border-radius styling)\n *\n * Both contexts return null when not in a provider, allowing Button\n * to work standalone without any group context.\n *\n * @see plan.md for architecture details\n * @see ButtonGroup.tsx for Provider implementation\n */\n\n// =============================================================================\n// Group-Level Context\n// =============================================================================\n\n/**\n * Context for group-level props (orientation, variant, size, isDisabled)\n * Default value is null to indicate \"not in a group\"\n */\nconst ButtonGroupContext = createContext<ButtonGroupContextValue | null>(null);\n\nButtonGroupContext.displayName = 'ButtonGroupContext';\n\n/**\n * Hook to access group-level context\n * @returns ButtonGroupContextValue if inside a ButtonGroup, null otherwise\n */\nexport function useButtonGroupContext(): ButtonGroupContextValue | null {\n return useContext(ButtonGroupContext);\n}\n\n// =============================================================================\n// Item-Level Context\n// =============================================================================\n\n/**\n * Context for per-button position information\n * Default value is null to indicate \"not wrapped with position context\"\n */\nconst ButtonGroupItemContext =\n createContext<ButtonGroupItemContextValue | null>(null);\n\nButtonGroupItemContext.displayName = 'ButtonGroupItemContext';\n\n/**\n * Hook to access item-level context (position)\n * @returns ButtonGroupItemContextValue if wrapped with position context, null otherwise\n */\nexport function useButtonGroupItemContext(): ButtonGroupItemContextValue | null {\n return useContext(ButtonGroupItemContext);\n}\n\n// =============================================================================\n// Exports\n// =============================================================================\n\nexport { ButtonGroupContext, ButtonGroupItemContext };\n","import { cva } from 'class-variance-authority';\n\n/**\n * ButtonGroup CVA Variants\n *\n * Defines Class Variance Authority (CVA) variants for:\n * - ButtonGroup container (orientation-based layout)\n * - ButtonGroupItem (position-based border-radius)\n * - ButtonGroupSeparator (orientation-based styling)\n *\n * @see plan.md Phase 1: Design & Contracts - CVA Variants\n * @see constitution.md Principle V (Component Quality Standards)\n */\n\n// =============================================================================\n// Container Variants\n// =============================================================================\n\n/**\n * ButtonGroup container variants\n * Controls the layout direction based on orientation\n * Uses gap-0 to ensure buttons are connected (share borders)\n */\nexport const buttonGroupVariants = cva('inline-flex items-center gap-0', {\n variants: {\n orientation: {\n horizontal: 'flex-row',\n vertical: 'flex-col w-full',\n },\n },\n defaultVariants: {\n orientation: 'horizontal',\n },\n});\n\n// =============================================================================\n// Item Position Variants\n// =============================================================================\n\n/**\n * ButtonGroupItem position variants\n * Applied to Button's visual layer (Layer 2) for position-aware border-radius\n *\n * Compound variants handle both orientation and position combinations:\n * - Horizontal: left/right borders and radii\n * - Vertical: top/bottom borders and radii\n */\nexport const buttonGroupItemVariants = cva('', {\n variants: {\n orientation: {\n // min-w-[44px] ensures visual layer fills touch target width (for icon buttons)\n horizontal: 'min-w-[44px]',\n // flex (overrides inline-flex) + min-h-[44px] makes visual layer fill touch target,\n // eliminating gaps between stacked buttons in vertical orientation\n vertical: 'flex min-h-[44px]',\n },\n position: {\n first: '',\n middle: '',\n last: '',\n only: '', // Single button - no modifications needed\n },\n },\n compoundVariants: [\n // ==========================================================================\n // Horizontal Orientation\n // ==========================================================================\n {\n orientation: 'horizontal',\n position: 'first',\n className: 'rounded-r-none border-r-0',\n },\n {\n orientation: 'horizontal',\n position: 'middle',\n className: 'rounded-none border-r-0',\n },\n {\n orientation: 'horizontal',\n position: 'last',\n className: 'rounded-l-none',\n },\n // ==========================================================================\n // Vertical Orientation\n // Note: w-full is handled by Button's effectiveFullWidth for both layers\n // ==========================================================================\n {\n orientation: 'vertical',\n position: 'first',\n className: 'rounded-b-none border-b-0',\n },\n {\n orientation: 'vertical',\n position: 'middle',\n className: 'rounded-none border-b-0',\n },\n {\n orientation: 'vertical',\n position: 'last',\n className: 'rounded-t-none',\n },\n ],\n defaultVariants: {\n orientation: 'horizontal',\n position: 'only',\n },\n});\n\n// =============================================================================\n// Separator Variants\n// =============================================================================\n\n/**\n * ButtonGroupSeparator variants\n * Orientation-aware visual divider between button groups\n */\nexport const buttonGroupSeparatorVariants = cva('bg-[var(--border)]', {\n variants: {\n orientation: {\n horizontal: 'w-px h-6 mx-1',\n vertical: 'h-px w-full my-1',\n },\n },\n defaultVariants: {\n orientation: 'horizontal',\n },\n});\n","\"use client\";\n\n/**\n * Button Component - 3-Layer Architecture\n * Accessible button with React Aria primitives and CVA styling\n *\n * Architecture:\n * - Layer 1: Touch Target (44x44px WCAG AAA compliant, transparent)\n * - Layer 2: Visual Button (configurable size, colors, borders)\n * - Layer 3: Content & Effects (text, icons, ripple, loading spinner)\n *\n * @see 3layer-plan.md for architecture details\n * @see spec.md FR-029 to FR-037 (Button Component Requirements)\n * @see spec.md FR-009 (WCAG 2.2 AAA - 7:1 contrast ratio)\n * @see spec.md FR-014 (44x44px minimum touch targets)\n * @see constitution.md Principle IV (Accessibility First)\n */\n\nimport { forwardRef, memo, useId } from 'react';\nimport {\n Button as AriaButton,\n type ButtonProps as AriaButtonProps,\n} from 'react-aria-components';\nimport { Loader2, Zap } from 'lucide-react';\nimport { cn } from '../../utils/cn';\nimport type { ButtonProps } from './Button.types';\nimport { buttonOuterVariants, buttonVisualVariants, buttonVariants } from './Button.styles';\nimport { PRESSED_STYLES, HOVER_STYLES, HIGH_CONTRAST_HOVER, HIGH_CONTRAST_PRESSED } from '../../styles/interaction-states';\nimport {\n useButtonGroupContext,\n useButtonGroupItemContext,\n} from '../ButtonGroup/ButtonGroupContext';\nimport { buttonGroupItemVariants } from '../ButtonGroup/ButtonGroup.variants';\n\n/**\n * Button Component - 3-Layer Architecture\n * Fully accessible button with React Aria and themed styling\n *\n * Layer 1: Touch Target (AriaButton) - 44x44px WCAG AAA compliant\n * Layer 2: Visual Button (span) - configurable appearance\n * Layer 3: Content (children) - text, icons, effects\n */\nconst Button = memo(forwardRef<HTMLButtonElement, ButtonProps>(\n (\n {\n className,\n buttonVisualClassName,\n variant,\n size,\n visualSize,\n fullWidth,\n loading = false,\n loadingText = \"Loading...\",\n shortcut,\n children,\n isDisabled,\n paywall = false,\n paywallRedirect,\n paywallDescription,\n onPress,\n ...props\n },\n ref\n ) => {\n const paywallDescriptionId = useId();\n\n // ==========================================================================\n // ButtonGroup Context Integration\n // ==========================================================================\n\n // Consume group-level context (variant, size, isDisabled, orientation)\n const groupContext = useButtonGroupContext();\n\n // Consume item-level context (position for border-radius styling)\n const itemContext = useButtonGroupItemContext();\n\n // Merge context values with props (props take precedence)\n const effectiveVariant = variant ?? groupContext?.variant ?? 'default';\n const effectiveSize = size ?? groupContext?.size;\n const effectiveIsDisabled = isDisabled ?? groupContext?.isDisabled ?? false;\n\n // In vertical groups, buttons should be full width automatically\n const isInVerticalGroup = groupContext?.orientation === 'vertical';\n const effectiveFullWidth = fullWidth || isInVerticalGroup;\n\n // Position styling for ButtonGroup (only applied when in a group)\n const positionClassName = itemContext\n ? buttonGroupItemVariants({\n orientation: groupContext?.orientation ?? 'horizontal',\n position: itemContext.position,\n })\n : '';\n\n // Default visualSize to size for backward compatibility\n const effectiveVisualSize = visualSize ?? effectiveSize ?? 'default';\n\n // AAA Accessibility: Warn in dev/test if icon/dot variant lacks accessible name\n if (process.env.NODE_ENV !== 'production') {\n if (\n (effectiveVisualSize === 'dot' || effectiveVisualSize === 'icon') &&\n !props['aria-label'] &&\n !children\n ) {\n console.warn(\n '[Button] visualSize=\"dot\" or \"icon\" requires aria-label when no visible text is provided (WCAG 1.1.1)'\n );\n }\n }\n\n /**\n * Handle button press - intercepts action when paywalled\n * If paywalled with redirect URL, opens in new tab\n * Otherwise, calls the normal onPress handler\n */\n const handlePress = (e: Parameters<NonNullable<AriaButtonProps['onPress']>>[0]): void => {\n if (paywall) {\n if (paywallRedirect) {\n window.open(paywallRedirect, '_blank', 'noopener,noreferrer');\n }\n // Don't call onPress when paywalled\n return;\n }\n onPress?.(e);\n };\n\n // Only set isDisabled when we have a reason to disable\n // Otherwise, let slot system control disabled state (e.g., in NumberField)\n const computedIsDisabled = effectiveIsDisabled || loading || undefined;\n\n return (\n <AriaButton\n ref={ref}\n isDisabled={computedIsDisabled}\n aria-disabled={paywall ? true : undefined}\n aria-describedby={paywall ? paywallDescriptionId : undefined}\n onPress={handlePress}\n className={cn(buttonOuterVariants({ fullWidth: effectiveFullWidth, inVerticalGroup: isInVerticalGroup }), className)}\n {...props}\n >\n {(renderProps) => (\n /* Layer 2: Visual Button */\n <span\n className={cn(\n buttonVisualVariants({\n variant: effectiveVariant,\n visualSize: effectiveVisualSize,\n paywall,\n fullWidth: effectiveFullWidth,\n }),\n // Position styling from ButtonGroup context (border-radius adjustments)\n positionClassName,\n buttonVisualClassName,\n // Layer 2 interaction styles (no focus - focus ring is on Layer 1)\n PRESSED_STYLES,\n HOVER_STYLES,\n HIGH_CONTRAST_HOVER,\n HIGH_CONTRAST_PRESSED\n )}\n data-pressed={renderProps.isPressed || undefined}\n >\n {/* Layer 3: Content & Effects */}\n\n {/* FR-033: Loading spinner with screen reader announcement */}\n {/* Uses motion-safe: for WCAG 2.3.3 AAA (Animation from Interactions) */}\n {loading && (\n <>\n <Loader2 className=\"motion-safe:animate-spin\" aria-hidden=\"true\" />\n <span className=\"sr-only\" aria-live=\"polite\">\n {loadingText}\n </span>\n </>\n )}\n\n {/* Hide children during loading */}\n {!loading && children}\n\n {/* Paywall: Lightning bolt icon */}\n {paywall && (\n <Zap\n data-testid=\"zap-icon\"\n aria-hidden=\"true\"\n className=\"ml-1\"\n />\n )}\n\n {/* Paywall: Screen reader description */}\n {paywall && (\n <span id={paywallDescriptionId} className=\"sr-only\">\n Premium feature: {paywallDescription || \"Upgrade required to access this feature\"}\n </span>\n )}\n\n {/* FR-034: Keyboard shortcut display on focus */}\n {renderProps.isFocusVisible && shortcut && (\n <kbd className=\"ml-auto hidden text-xs opacity-60 lg:inline\">\n {shortcut}\n </kbd>\n )}\n\n {/* Touch/press ripple effect - FR-031: Pressed state feedback */}\n {/* Uses motion-safe: for WCAG 2.3.3 AAA (Animation from Interactions) */}\n {renderProps.isPressed && (\n <span\n className=\"absolute inset-0 rounded-[inherit] bg-current opacity-10 motion-safe:animate-in motion-safe:zoom-in-95\"\n aria-hidden=\"true\"\n />\n )}\n </span>\n )}\n </AriaButton>\n );\n }\n));\n\nButton.displayName = \"Button\";\n\nexport { Button, buttonVariants, buttonOuterVariants, buttonVisualVariants };\nexport type { ButtonProps } from './Button.types';\n","/**\n * TextField Icon Components\n * SVG icons for password toggle functionality\n *\n * Extracted from TextField.tsx to keep the main component file focused.\n * These are module-level components to avoid re-creating on every render.\n */\n\nimport type { ReactElement } from 'react';\n\n/**\n * Eye icon for \"show password\" state\n * Rendered when the password is currently hidden\n */\nexport const EyeIcon = (): ReactElement => (\n <svg\n data-testid=\"password-toggle-icon-show\"\n width=\"16\"\n height=\"16\"\n viewBox=\"0 0 16 16\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n >\n <path d=\"M1 8s3-5 7-5 7 5 7 5-3 5-7 5-7-5-7-5z\" />\n <circle cx=\"8\" cy=\"8\" r=\"2\" />\n </svg>\n);\n\n/**\n * Eye-off icon for \"hide password\" state\n * Rendered when the password is currently visible\n */\nexport const EyeOffIcon = (): ReactElement => (\n <svg\n data-testid=\"password-toggle-icon-hide\"\n width=\"16\"\n height=\"16\"\n viewBox=\"0 0 16 16\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n >\n <path d=\"M10.5 5.5l-5 5\" />\n <path d=\"M1 8s3-5 7-5c1.5 0 2.8.6 4 1.5M15 8s-1.5 2.5-4 4\" />\n <path d=\"M3 13l2-2m7-7l2-2\" />\n <circle cx=\"8\" cy=\"8\" r=\"2\" />\n </svg>\n);\n","/**\n * TextField CVA Variant Styles\n * Extracted from TextField.tsx for separation of concerns\n *\n * @see spec.md FR-009 to FR-014 (Accessibility Requirements - WCAG 2.2 AAA)\n * @see React Aria TextField: https://react-spectrum.adobe.com/react-aria/TextField.html\n * @see ShadCN Input: https://ui.shadcn.com/docs/components/input\n * @see ShadCN Label: https://ui.shadcn.com/docs/components/label\n */\n\nimport { cva } from 'class-variance-authority';\n\n/**\n * Input variant styles using CVA\n * Adapts ShadCN Input styling with Themis semantic tokens\n */\nexport const inputVariants = cva(\n // Base styles - FR-014: Proper input styling with focus states\n \"flex w-full rounded-md border bg-[var(--content-background)] shadow-xs px-3 py-2 text-sm ring-offset-[var(--content-background)] file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-[var(--content-foreground)] placeholder:text-[var(--menu-muted)] transition-all duration-200\",\n {\n variants: {\n // Size variants (matching Button sizes)\n size: {\n sm: \"h-9 text-xs px-2 py-1\",\n default: \"h-10 px-3 py-2\",\n lg: \"h-11 px-4 py-3 text-base\"\n },\n // State variants\n state: {\n default: \"border-[var(--input-border)] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--ring)] focus-visible:ring-offset-2\",\n error: \"border-[var(--destructive-background)] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--destructive-background)] focus-visible:ring-offset-2\",\n success: \"border-[var(--success-background)] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--success-ring)] focus-visible:ring-offset-2\",\n disabled: \"cursor-not-allowed opacity-50\",\n readonly: \"cursor-default bg-[var(--content-background)] opacity-70\"\n }\n },\n defaultVariants: {\n size: \"default\",\n state: \"default\"\n }\n }\n);\n\n/**\n * Label variant styles using CVA\n * Adapts ShadCN Label styling with Themis semantic tokens\n */\nexport const labelVariants = cva(\n // Base styles - FR-009: WCAG 2.2 AAA compliance\n \"text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70\",\n {\n variants: {\n state: {\n default: \"text-[var(--content-foreground)]\",\n error: \"text-[var(--destructive-foreground)]\",\n disabled: \"opacity-50 cursor-not-allowed\"\n }\n },\n defaultVariants: {\n state: \"default\"\n }\n }\n);\n\n/**\n * Description text variant styles\n */\nexport const descriptionVariants = cva(\n \"text-sm text-[var(--content-foreground)]\"\n);\n\n/**\n * Error message variant styles\n */\nexport const errorMessageVariants = cva(\n \"text-sm text-[var(--destructive-foreground)] font-medium mt-1.5\"\n);\n\n/**\n * Success message variant styles\n */\nexport const successMessageVariants = cva(\n \"text-sm text-[var(--success-foreground)] font-medium mt-1.5\"\n);\n","/**\n * TextField Custom Hooks\n * Extracted from TextField.tsx for separation of concerns\n *\n * These hooks encapsulate the behavioral logic for:\n * - Expand on focus\n * - Copy/paste protection\n * - Password visibility toggle\n */\n\nimport { useState, useEffect, useCallback, useMemo } from 'react';\nimport type { FocusEvent, ClipboardEvent } from 'react';\n\n/**\n * Hook: useExpandOnFocus\n * Manages the expand-on-focus behavior where an input starts narrow\n * and expands to full width when focused or when it has a value.\n *\n * @param expandOnFocus - Whether expand-on-focus is enabled\n * @param collapsedWidth - CSS width when collapsed (e.g., '200px')\n * @param value - Controlled value (if any)\n * @param defaultValue - Default value (if any)\n * @param userOnFocus - User-provided onFocus handler to call through\n * @param userOnBlur - User-provided onBlur handler to call through\n */\nexport function useExpandOnFocus({\n expandOnFocus,\n collapsedWidth,\n value,\n defaultValue,\n userOnFocus,\n userOnBlur,\n}: {\n expandOnFocus: boolean;\n collapsedWidth: string;\n value: string | undefined;\n defaultValue: string | undefined;\n userOnFocus: ((e: FocusEvent<HTMLInputElement>) => void) | undefined;\n userOnBlur: ((e: FocusEvent<HTMLInputElement>) => void) | undefined;\n}) {\n const [isFocused, setIsFocused] = useState(false);\n\n const handleFocus = useCallback((e: FocusEvent<HTMLInputElement>) => {\n if (expandOnFocus) {\n setIsFocused(true);\n }\n userOnFocus?.(e);\n }, [expandOnFocus, userOnFocus]);\n\n const handleBlur = useCallback((e: FocusEvent<HTMLInputElement>) => {\n if (expandOnFocus) {\n const isEmpty = e.target.value === '';\n if (isEmpty) {\n setIsFocused(false);\n }\n }\n userOnBlur?.(e);\n }, [expandOnFocus, userOnBlur]);\n\n const inputWidth = useMemo(() => {\n if (!expandOnFocus) return undefined;\n\n const hasValue = value !== undefined ? value !== '' : defaultValue !== undefined && defaultValue !== '';\n\n if (isFocused || hasValue) {\n return '100%';\n }\n\n return collapsedWidth;\n }, [expandOnFocus, isFocused, value, defaultValue, collapsedWidth]);\n\n return { handleFocus, handleBlur, inputWidth };\n}\n\n/**\n * Hook: useCopyPasteProtection\n * Manages copy/paste prevention with shake animation and screen reader announcements.\n *\n * @param disableCopyPaste - Whether copy/paste should be disabled\n */\nexport function useCopyPasteProtection({\n disableCopyPaste,\n}: {\n disableCopyPaste: boolean;\n}) {\n const [isShaking, setIsShaking] = useState(false);\n const [screenReaderMessage, setScreenReaderMessage] = useState('');\n\n // Development mode warning for disableCopyPaste\n useEffect(() => {\n if (disableCopyPaste && typeof process !== 'undefined' && process.env.NODE_ENV === 'development') {\n console.warn(\n '[TextField] Copy/paste prevention should only be used for security-critical fields like password confirmation. ' +\n 'This feature can break assistive technology workflows and password managers.'\n );\n }\n }, [disableCopyPaste]);\n\n const handlePaste = useCallback((e: ClipboardEvent<HTMLInputElement>) => {\n if (disableCopyPaste) {\n e.preventDefault();\n\n // Trigger shake animation\n setIsShaking(true);\n\n // Announce to screen readers\n setScreenReaderMessage('Pasting is not allowed in this field. Please type your entry.');\n\n // Remove shake animation and clear message after 400ms\n setTimeout(() => {\n setIsShaking(false);\n setScreenReaderMessage('');\n }, 400);\n }\n }, [disableCopyPaste]);\n\n return { isShaking, screenReaderMessage, handlePaste };\n}\n\n/**\n * Hook: usePasswordToggle\n * Manages password show/hide toggle state and determines the actual input type.\n *\n * @param type - The input type ('text', 'email', 'password', etc.)\n * @param showPasswordToggle - Whether the toggle button should be shown\n */\nexport function usePasswordToggle({\n type,\n showPasswordToggle,\n}: {\n type: string;\n showPasswordToggle: boolean | undefined;\n}) {\n const [showPassword, setShowPassword] = useState(false);\n\n const handlePasswordToggle = useCallback(() => {\n setShowPassword(prev => !prev);\n }, []);\n\n const actualType = useMemo(() => {\n if (type === 'password' && showPasswordToggle && showPassword) {\n return 'text';\n }\n return type;\n }, [type, showPasswordToggle, showPassword]);\n\n return { showPassword, actualType, handlePasswordToggle };\n}\n","\"use client\";\n\n/**\n * TextField Component\n * Accessible text input with React Aria primitives and CVA styling\n *\n * @see spec.md FR-009 to FR-014 (Accessibility Requirements - WCAG 2.2 AAA)\n * @see React Aria TextField: https://react-spectrum.adobe.com/react-aria/TextField.html\n * @see ShadCN Input: https://ui.shadcn.com/docs/components/input\n * @see ShadCN Label: https://ui.shadcn.com/docs/components/label\n * @see constitution.md Principle IV (Accessibility First)\n */\n\nimport './TextField.css';\nimport { forwardRef, useId, useMemo, useState, useCallback } from 'react';\nimport {\n TextField as AriaTextField,\n Label as AriaLabel,\n Input as AriaInput,\n Text as AriaText,\n FieldError as AriaFieldError,\n} from 'react-aria-components';\nimport { cn } from '../../utils/cn';\nimport { DISABLED_STYLES } from '../../styles/interaction-states';\nimport type {\n TextFieldProps,\n TextFieldLabelProps,\n TextFieldInputProps,\n TextFieldDescriptionProps,\n TextFieldErrorProps,\n} from './TextField.types';\nimport { CircleAlert, Search, X } from 'lucide-react';\nimport { Button } from '../Button';\nimport { EyeIcon, EyeOffIcon } from './TextField.icons';\nimport {\n inputVariants,\n labelVariants,\n descriptionVariants,\n errorMessageVariants,\n successMessageVariants,\n} from './TextField.styles';\nimport { useExpandOnFocus, useCopyPasteProtection, usePasswordToggle } from './TextField.hooks';\n\n// Re-export CVA variants so existing imports from './TextField' continue to work\nexport {\n inputVariants,\n labelVariants,\n descriptionVariants,\n errorMessageVariants,\n successMessageVariants,\n};\n\n/**\n * TextFieldLabel Sub-component\n * Styled label with optional required indicator\n */\nexport const TextFieldLabel = forwardRef<HTMLLabelElement, TextFieldLabelProps>(\n ({ className, state = 'default', children, ...props }, ref) => {\n return (\n <AriaLabel\n ref={ref}\n className={cn(labelVariants({ state }), className)}\n {...props}\n >\n {children}\n </AriaLabel>\n );\n }\n);\n\nTextFieldLabel.displayName = \"TextFieldLabel\";\n\n/**\n * TextFieldInput Sub-component\n * Styled input with size and state variants\n */\nexport const TextFieldInput = forwardRef<HTMLInputElement, TextFieldInputProps>(\n ({ className, size = 'default', state = 'default', ...props }, ref) => {\n return (\n <AriaInput\n ref={ref}\n className={cn(inputVariants({ size, state }), DISABLED_STYLES, className)}\n {...props}\n />\n );\n }\n);\n\nTextFieldInput.displayName = \"TextFieldInput\";\n\n/**\n * TextFieldDescription Sub-component\n * Helper text displayed below the input\n */\nexport const TextFieldDescription = forwardRef<HTMLDivElement, TextFieldDescriptionProps>(\n ({ className, children, ...props }, ref) => {\n return (\n <AriaText\n ref={ref}\n slot=\"description\"\n className={cn(descriptionVariants(), className)}\n {...props}\n >\n {children}\n </AriaText>\n );\n }\n);\n\nTextFieldDescription.displayName = \"TextFieldDescription\";\n\n/**\n * TextFieldError Sub-component\n * Error message displayed when field is invalid\n * Note: We use AriaFieldError with explicit role=\"alert\" for screen reader announcements\n */\nexport const TextFieldError = forwardRef<HTMLDivElement, TextFieldErrorProps>(\n ({ className, children, ...props }, ref) => {\n return (\n <AriaFieldError\n ref={ref}\n {...props}\n className={cn(errorMessageVariants(), className)}\n >\n <span className=\"flex items-center gap-2\" role=\"alert\"><CircleAlert className=\"h-4 w-4\" />{children}</span>\n </AriaFieldError>\n );\n }\n);\n\nTextFieldError.displayName = \"TextFieldError\";\n\n/**\n * TextFieldSuccess Sub-component\n * Success message displayed when field is valid\n */\nexport const TextFieldSuccess = forwardRef<HTMLDivElement, TextFieldDescriptionProps>(\n ({ className, children, ...props }, ref) => {\n return (\n <AriaText\n ref={ref}\n slot=\"description\"\n className={cn(successMessageVariants(), className)}\n {...props}\n >\n {children}\n </AriaText>\n );\n }\n);\n\nTextFieldSuccess.displayName = \"TextFieldSuccess\";\n\n/**\n * TextField Component\n * Fully accessible text input with React Aria and themed styling\n *\n * @example\n * <TextField\n * label=\"Email\"\n * description=\"We'll never share your email\"\n * isRequired\n * type=\"email\"\n * />\n */\nexport const TextField = forwardRef<HTMLDivElement, TextFieldProps>(\n (\n {\n className,\n size = 'default',\n label,\n description,\n errorMessage,\n successMessage,\n type = 'text',\n isRequired = false,\n isReadOnly = false,\n isDisabled = false,\n isInvalid = false,\n isValid = false,\n id,\n autoComplete,\n disableCopyPaste = false,\n pattern,\n patternDescription,\n expandOnFocus = false,\n collapsedWidth = '200px',\n prefix,\n suffix,\n prefixSize = 16,\n suffixSize = 16,\n showPasswordToggle,\n isIconHidden = false,\n onSubmit,\n onClear,\n value,\n defaultValue,\n onFocus: userOnFocus,\n onBlur: userOnBlur,\n ...props\n },\n ref\n ) => {\n // Generate unique IDs for error message linking\n const errorId = useId();\n const generatedId = useId();\n const fieldId = id || generatedId;\n\n // Custom hooks for behavioral logic\n const { handleFocus, handleBlur, inputWidth } = useExpandOnFocus({\n expandOnFocus,\n collapsedWidth,\n value,\n defaultValue,\n userOnFocus,\n userOnBlur,\n });\n\n const { isShaking, screenReaderMessage, handlePaste } = useCopyPasteProtection({\n disableCopyPaste,\n });\n\n const { showPassword, actualType, handlePasswordToggle } = usePasswordToggle({\n type,\n showPasswordToggle,\n });\n\n // ==========================================================================\n // Search functionality (type=\"search\")\n // ==========================================================================\n const isSearch = type === 'search';\n const [searchValue, setSearchValue] = useState(defaultValue ?? '');\n const isControlledSearch = value !== undefined;\n const currentSearchValue = isControlledSearch ? value : searchValue;\n\n const handleSearchChange = useCallback(\n (newValue: string) => {\n if (!isControlledSearch) {\n setSearchValue(newValue);\n }\n (props as { onChange?: (v: string) => void }).onChange?.(newValue);\n },\n [isControlledSearch, props]\n );\n\n const handleSearchClear = useCallback(() => {\n if (!isControlledSearch) {\n setSearchValue('');\n }\n (props as { onChange?: (v: string) => void }).onChange?.('');\n onClear?.();\n }, [isControlledSearch, props, onClear]);\n\n const handleSearchKeyDown = useCallback(\n (e: React.KeyboardEvent<HTMLInputElement>) => {\n if (e.key === 'Enter' && onSubmit) {\n onSubmit(currentSearchValue);\n }\n if (e.key === 'Escape' && currentSearchValue) {\n e.preventDefault();\n handleSearchClear();\n }\n },\n [currentSearchValue, onSubmit, handleSearchClear]\n );\n\n // Determine input state based on props\n const inputState = useMemo(() => {\n if (isDisabled) return 'disabled';\n if (isReadOnly) return 'readonly';\n if (isInvalid) return 'error';\n if (isValid) return 'success';\n return 'default';\n }, [isDisabled, isReadOnly, isInvalid, isValid]);\n\n // Determine label state\n const labelState = useMemo(() => {\n if (isDisabled) return 'disabled';\n if (isInvalid) return 'error';\n return 'default';\n }, [isDisabled, isInvalid]);\n\n // Combine description and patternDescription\n const combinedDescription = useMemo(() => {\n if (description && patternDescription) {\n return `${description} ${patternDescription}`;\n }\n return description || patternDescription;\n }, [description, patternDescription]);\n\n // Determine actual prefix (search icon auto-added for type=\"search\")\n const actualPrefix = useMemo(() => {\n if (isSearch && !isIconHidden && !prefix) {\n const iconSize = size === 'sm' ? 'h-3.5 w-3.5' : size === 'lg' ? 'h-5 w-5' : 'h-4 w-4';\n return <Search className={iconSize} />;\n }\n return prefix;\n }, [isSearch, isIconHidden, prefix, size]);\n\n // Calculate dynamic padding for prefix/suffix\n const inputPadding = useMemo(() => {\n const basePadding = { left: 12, right: 12 }; // Default px-3 = 12px\n\n if (actualPrefix) {\n const prefixWidth = typeof actualPrefix === 'string'\n ? actualPrefix.length * 8 + 16\n : prefixSize + 16;\n basePadding.left = prefixWidth;\n }\n\n if (type === 'password' && showPasswordToggle) {\n basePadding.right = 16 + 16;\n } else if (isSearch && currentSearchValue) {\n basePadding.right = 44; // Space for clear button\n } else if (suffix) {\n const suffixWidth = typeof suffix === 'string'\n ? suffix.length * 8 + 16\n : suffixSize + 16;\n basePadding.right = suffixWidth;\n }\n\n return basePadding;\n }, [actualPrefix, prefix, suffix, prefixSize, suffixSize, type, showPasswordToggle, isSearch, currentSearchValue]);\n\n // Determine actual suffix (password toggle / search clear / custom suffix)\n const actualSuffix = useMemo(() => {\n if (type === 'password' && showPasswordToggle) {\n return (\n <Button\n variant=\"ghost\"\n visualSize=\"icon\"\n onPress={handlePasswordToggle}\n aria-label={showPassword ? 'Hide password' : 'Show password'}\n className=\"!min-h-0 !min-w-0 h-8 w-8\"\n >\n {showPassword ? <EyeOffIcon /> : <EyeIcon />}\n </Button>\n );\n }\n if (isSearch && currentSearchValue) {\n const iconSize = size === 'sm' ? 'h-3 w-3' : size === 'lg' ? 'h-5 w-5' : 'h-4 w-4';\n return (\n <Button\n variant=\"ghost\"\n visualSize=\"icon\"\n onPress={handleSearchClear}\n aria-label=\"Clear search\"\n className=\"!min-h-0 !min-w-0 h-8 w-8\"\n >\n <X className={iconSize} />\n </Button>\n );\n }\n return suffix;\n }, [type, showPasswordToggle, showPassword, suffix, handlePasswordToggle, isSearch, currentSearchValue, size, handleSearchClear]);\n\n // Whether the suffix is an interactive button (password toggle or search clear)\n const hasInteractiveSuffix = (type === 'password' && showPasswordToggle) || (isSearch && !!currentSearchValue);\n\n return (\n <AriaTextField\n ref={ref}\n className={cn(\"flex flex-col gap-1.5\", className)}\n isRequired={isRequired}\n isReadOnly={isReadOnly}\n isDisabled={isDisabled}\n isInvalid={isInvalid}\n value={isSearch ? currentSearchValue : value}\n defaultValue={isSearch ? undefined : defaultValue}\n onChange={isSearch ? handleSearchChange : undefined}\n {...props}\n >\n {/* Label with required indicator */}\n {label && (\n <AriaLabel className={cn(labelVariants({ state: labelState }))}>\n {label}\n {isRequired && (\n <span className=\"ml-1 text-[var(--destructive-background)]\" aria-hidden=\"true\">\n <strong>*</strong>\n </span>\n )}\n </AriaLabel>\n )}\n\n {/* Description text (helper text) */}\n {combinedDescription && (\n <AriaText slot=\"description\" className={cn(descriptionVariants())}>\n {combinedDescription}\n </AriaText>\n )}\n\n {/* Input field with prefix/suffix */}\n <div\n className=\"relative flex items-center motion-safe:transition-all motion-safe:duration-200\"\n style={{\n width: inputWidth,\n }}\n >\n {/* Prefix */}\n {actualPrefix && (\n <div\n data-testid=\"textfield-prefix\"\n className=\"absolute left-3 flex items-center justify-center pointer-events-none text-[var(--content-foreground)]\"\n aria-hidden=\"true\"\n >\n {actualPrefix}\n </div>\n )}\n\n {/* Input */}\n <AriaInput\n type={actualType}\n id={fieldId}\n className={cn(\n inputVariants({ size, state: inputState }),\n DISABLED_STYLES,\n isShaking && 'shake'\n )}\n style={{\n width: '100%',\n paddingLeft: `${inputPadding.left}px`,\n paddingRight: `${inputPadding.right}px`,\n }}\n autoComplete={autoComplete}\n pattern={pattern}\n onPaste={handlePaste}\n onFocus={handleFocus}\n onBlur={handleBlur}\n onKeyDown={isSearch ? handleSearchKeyDown : undefined}\n aria-required={isRequired ? 'true' : undefined}\n aria-readonly={isReadOnly ? 'true' : undefined}\n aria-errormessage={isInvalid && errorMessage ? errorId : undefined}\n />\n\n {/* Suffix */}\n {actualSuffix && (\n <div\n data-testid=\"textfield-suffix\"\n className={cn(\n \"absolute right-3 flex items-center justify-center text-[var(--content-foreground)]\",\n hasInteractiveSuffix ? \"\" : \"pointer-events-none\"\n )}\n aria-hidden={hasInteractiveSuffix ? undefined : \"true\"}\n >\n {actualSuffix}\n </div>\n )}\n </div>\n\n {/* Success message (shown when valid) */}\n {isValid && successMessage && !isInvalid && (\n <AriaText slot=\"description\" className={cn(successMessageVariants())}>\n {successMessage}\n </AriaText>\n )}\n\n {/* Error message (shown when invalid) - takes precedence over success */}\n {isInvalid && errorMessage && (\n <TextFieldError id={errorId}>\n {errorMessage}\n </TextFieldError>\n )}\n\n {/* Screen reader announcement for paste prevention */}\n {screenReaderMessage && (\n <div className=\"sr-only\" role=\"status\" aria-live=\"polite\" aria-atomic=\"true\">\n {screenReaderMessage}\n </div>\n )}\n </AriaTextField>\n );\n }\n);\n\nTextField.displayName = \"TextField\";\n\nexport { inputVariants as textFieldInputVariants, labelVariants as textFieldLabelVariants };\n","'use client';\n\n/**\n * SearchField Component\n *\n * A specialized search input built on the Themis TextField component.\n * Delegates all rendering and behavior to TextField with type=\"search\",\n * which provides search icon, clear button (Themis Button), and keyboard support.\n *\n * WCAG 2.2 AAA compliant:\n * - 44x44px touch targets on all interactive elements (via Themis Button)\n * - Clear button uses Themis Button three-layer architecture\n * - Escape key clears input\n * - Enter key submits search\n * - role=\"searchbox\" via type=\"search\"\n *\n * @example\n * ```tsx\n * <SearchField\n * label=\"Search\"\n * placeholder=\"Search items...\"\n * onSubmit={(value) => console.log('Search:', value)}\n * />\n * ```\n */\n\nimport { forwardRef } from 'react';\nimport { TextField } from '../TextField/TextField';\nimport type { SearchFieldProps } from './SearchField.types';\n\nexport const SearchField = forwardRef<HTMLDivElement, SearchFieldProps>(\n (\n {\n label,\n description,\n errorMessage,\n 'aria-label': ariaLabel,\n 'aria-labelledby': ariaLabelledBy,\n ...props\n },\n ref\n ) => {\n // Warn if no accessible label is provided\n if (process.env.NODE_ENV !== 'production') {\n if (!label && !ariaLabel && !ariaLabelledBy) {\n console.warn(\n '[SearchField] Either label, aria-label, or aria-labelledby is required for accessibility (WCAG 1.1.1)'\n );\n }\n }\n\n return (\n <TextField\n ref={ref}\n type=\"search\"\n label={label}\n description={errorMessage ? undefined : description}\n errorMessage={errorMessage}\n isInvalid={!!errorMessage}\n aria-label={!label ? ariaLabel : undefined}\n aria-labelledby={ariaLabelledBy}\n {...props}\n />\n );\n }\n);\n\nSearchField.displayName = 'SearchField';\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 type { ReactNode } from 'react';\nimport { BaseComponentPropsSchema } from '../../schemas/BaseComponentProps';\n\n/**\n * SearchField props schema extending BaseComponentProps\n *\n * A specialized search input built on the Themis TextField component.\n * Uses Themis Button for the clear action (three-layer architecture,\n * 44x44px touch targets).\n */\nexport const SearchFieldPropsSchema = BaseComponentPropsSchema.extend({\n // Size variants matching other form components\n size: z.enum(['sm', 'default', 'lg']).optional().default('default'),\n\n // Text content\n label: z.string().optional(),\n description: z.string().optional(),\n errorMessage: z.string().optional(),\n\n // State props\n isRequired: z.boolean().optional(),\n isReadOnly: z.boolean().optional(),\n isDisabled: z.boolean().optional(),\n\n // Input attributes\n placeholder: z.string().optional(),\n value: z.string().optional(),\n defaultValue: z.string().optional(),\n name: z.string().optional(),\n\n // Search-specific\n /** Called when the search is submitted (Enter key) */\n onSubmit: z.custom<(value: string) => void>().optional(),\n\n /** Called when the clear button is pressed */\n onClear: z.custom<() => void>().optional(),\n\n /** Called when the input value changes */\n onChange: z.custom<(value: string) => void>().optional(),\n\n /** Hide the search icon */\n isIconHidden: z.boolean().optional().default(false),\n});\n\nexport interface SearchFieldProps {\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 size?: 'sm' | 'default' | 'lg';\n label?: string;\n description?: string;\n errorMessage?: string;\n isRequired?: boolean;\n isReadOnly?: boolean;\n isDisabled?: boolean;\n placeholder?: string;\n value?: string;\n defaultValue?: string;\n name?: string;\n onSubmit?: (value: string) => void;\n onClear?: () => void;\n onChange?: (value: string) => void;\n isIconHidden?: boolean;\n}\n\nexport type SearchFieldSize = SearchFieldProps['size'];\n","/**\n * SearchField CVA Variant Styles\n *\n * Note: Most styling is delegated to the underlying TextField component.\n * These variants are kept for consumers who need direct access to\n * SearchField-specific style tokens.\n */\n\nimport { cva } from 'class-variance-authority';\n\n/**\n * Root wrapper variant styles\n */\nexport const searchFieldVariants = cva(\n 'group flex flex-col gap-1.5 w-full',\n {\n variants: {\n size: {\n sm: '',\n default: '',\n lg: '',\n },\n },\n defaultVariants: { size: 'default' },\n }\n);\n\n/**\n * Label variant styles\n */\nexport const searchFieldLabelVariants = cva(\n 'text-[var(--text-primary)] font-medium',\n {\n variants: {\n size: {\n sm: 'text-xs',\n default: 'text-sm',\n lg: 'text-base',\n },\n },\n defaultVariants: { size: 'default' },\n }\n);\n\n/**\n * Description text variant styles\n */\nexport const searchFieldDescriptionVariants = cva(\n 'text-[var(--muted-foreground)]',\n {\n variants: {\n size: {\n sm: 'text-xs',\n default: 'text-xs',\n lg: 'text-sm',\n },\n },\n defaultVariants: { size: 'default' },\n }\n);\n\n/**\n * Error message variant styles\n */\nexport const searchFieldErrorVariants = cva(\n 'text-[var(--destructive-background)]',\n {\n variants: {\n size: {\n sm: 'text-xs',\n default: 'text-xs',\n lg: 'text-sm',\n },\n },\n defaultVariants: { size: 'default' },\n }\n);\n"]}
|
|
1
|
+
{"version":3,"sources":["../../../src/utils/cn.ts","../../../src/styles/interaction-states.ts","../../../src/elements/Button/Button.styles.ts","../../../src/elements/ButtonGroup/ButtonGroupContext.tsx","../../../src/elements/ButtonGroup/ButtonGroup.variants.ts","../../../src/elements/Button/Button.tsx","../../../src/elements/TextField/TextField.icons.tsx","../../../src/elements/TextField/TextField.styles.ts","../../../src/elements/TextField/TextField.hooks.ts","../../../src/elements/TextField/TextField.tsx","../../../src/elements/SearchField/SearchField.tsx","../../../src/schemas/BaseComponentProps.ts","../../../src/elements/SearchField/SearchField.types.ts","../../../src/elements/SearchField/SearchField.styles.ts"],"names":["cn","inputs","twMerge","clsx","PRESSED_STYLES","HOVER_STYLES","HIGH_CONTRAST_HOVER","HIGH_CONTRAST_PRESSED","DISABLED_STYLES","buttonOuterVariants","cva","buttonVisualVariants","ButtonGroupContext","createContext","useButtonGroupContext","useContext","ButtonGroupItemContext","useButtonGroupItemContext","buttonGroupItemVariants","Button","memo","forwardRef","className","buttonVisualClassName","variant","size","visualSize","fullWidth","loading","loadingText","shortcut","children","isDisabled","paywall","paywallRedirect","paywallDescription","onPress","props","ref","paywallDescriptionId","useId","groupContext","itemContext","effectiveVariant","effectiveSize","effectiveIsDisabled","isInVerticalGroup","effectiveFullWidth","positionClassName","effectiveVisualSize","jsx","AriaButton","e","renderProps","jsxs","Fragment","Loader2","Zap","EyeIcon","EyeOffIcon","inputVariants","labelVariants","descriptionVariants","errorMessageVariants","successMessageVariants","useExpandOnFocus","expandOnFocus","collapsedWidth","value","defaultValue","userOnFocus","userOnBlur","isFocused","setIsFocused","useState","handleFocus","useCallback","handleBlur","inputWidth","useMemo","useCopyPasteProtection","disableCopyPaste","isShaking","setIsShaking","screenReaderMessage","setScreenReaderMessage","useEffect","handlePaste","usePasswordToggle","type","showPasswordToggle","showPassword","setShowPassword","handlePasswordToggle","prev","actualType","TextFieldLabel","state","AriaLabel","TextFieldInput","AriaInput","TextFieldDescription","AriaText","TextFieldError","AriaFieldError","CircleAlert","TextFieldSuccess","TextField","label","labelHint","description","errorMessage","successMessage","isRequired","isReadOnly","isInvalid","isValid","id","autoComplete","pattern","patternDescription","prefix","suffix","prefixSize","suffixSize","isIconHidden","onSubmit","onClear","errorId","generatedId","fieldId","isSearch","searchValue","setSearchValue","isControlledSearch","currentSearchValue","handleSearchChange","newValue","handleSearchClear","handleSearchKeyDown","inputState","labelState","combinedDescription","actualPrefix","Search","inputPadding","basePadding","prefixWidth","suffixWidth","actualSuffix","X","hasInteractiveSuffix","AriaTextField","SearchField","ariaLabel","ariaLabelledBy","BaseComponentPropsSchema","z","SearchFieldPropsSchema","searchFieldVariants","searchFieldLabelVariants","searchFieldDescriptionVariants","searchFieldErrorVariants"],"mappings":"qaAcO,SAASA,CAAAA,CAAAA,GAAMC,CAAAA,CAA8B,CAClD,OAAOC,QAAQC,IAAAA,CAAKF,CAAM,CAAC,CAC7B,CCIO,IAUMG,GAAiB,8BAevB,IAAMC,EAAAA,CAAe,0BAAA,CAarB,IAMMC,CAAAA,CAAsB,6FAMtBC,CAAAA,CAAwB,+HAAA,CAYxBC,EAAAA,CAAkB,kDAAA,CCvExB,IAAMC,GAA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A,eAAA,CAAiB,CAAE,IAAA,CAAM,SAAU,CACrC,CACF","file":"index.mjs","sourcesContent":["/**\n * Class Name Utility\n * Merges Tailwind CSS classes with conflict resolution\n *\n * Combines clsx for conditional classes and tailwind-merge for deduplication\n *\n * @example\n * cn('px-2 py-1', 'px-4') // => 'py-1 px-4' (px-4 overrides px-2)\n * cn('text-red-500', condition && 'text-blue-500') // => conditional application\n */\n\nimport { clsx, type ClassValue } from 'clsx';\nimport { twMerge } from 'tailwind-merge';\n\nexport function cn(...inputs: ClassValue[]): string {\n return twMerge(clsx(inputs));\n}\n","/**\n * Global Interaction State Styles\n *\n * Consistent interaction patterns across all Themis components.\n * These styles ensure WCAG 2.2 AAA compliance and predictable UX.\n *\n * @see spec.md FR-010 (Visible focus ring for keyboard navigation)\n * @see spec.md FR-031 (Pressed state feedback)\n * @see spec.md FR-012 (High contrast mode support)\n * @see constitution.md Principle IV (Accessibility First)\n */\n\n/**\n * Focus state styles (FR-010)\n * Visible focus ring for keyboard navigation - WCAG 2.2 Level AAA\n *\n * Components can override by extending these styles:\n * @example\n * cn(FOCUS_STYLES, \"ring-4\") // Increases ring width to 4px\n */\nexport const FOCUS_STYLES = \"data-[focus-visible]:ring-2 data-[focus-visible]:ring-[var(--themis-ring)] data-[focus-visible]:ring-offset-2\";\n\n/**\n * Pressed/Active state styles (FR-031)\n * Visual feedback for press interactions\n *\n * Components can override the scale amount:\n * @example\n * cn(PRESSED_STYLES_BASE, \"data-[pressed]:scale-[0.95]\") // More pronounced scale\n */\nexport const PRESSED_STYLES = \"data-[pressed]:scale-[0.97]\";\n\n/**\n * Base pressed styles without scale (for components that need different feedback)\n */\nexport const PRESSED_STYLES_BASE = \"data-[pressed]:transition-transform data-[pressed]:duration-100\";\n\n/**\n * Hover state styles\n * Elevation change on hover for better affordance\n *\n * Components can override shadow depth:\n * @example\n * cn(HOVER_STYLES_BASE, \"data-[hovered]:shadow-lg\") // Larger shadow\n */\nexport const HOVER_STYLES = \"data-[hovered]:shadow-md\";\n\n/**\n * Base hover styles without shadow (for components that use different hover effects)\n */\nexport const HOVER_STYLES_BASE = \"data-[hovered]:transition-shadow data-[hovered]:duration-200\";\n\n/**\n * High contrast mode focus (FR-012)\n * Enhanced outlines for users requiring high contrast\n *\n * Uses 'hc:' prefix for prefers-contrast: more media query\n */\nexport const HIGH_CONTRAST_FOCUS = \"hc:data-[focus-visible]:outline hc:data-[focus-visible]:outline-4 hc:data-[focus-visible]:outline-offset-2 hc:data-[focus-visible]:outline-foreground\";\n\n/**\n * High contrast mode hover (FR-012)\n * Enhanced outlines for hover in high contrast mode\n */\nexport const HIGH_CONTRAST_HOVER = \"hc:data-[hovered]:outline hc:data-[hovered]:outline-2 hc:data-[hovered]:outline-foreground\";\n\n/**\n * High contrast mode pressed state\n * Enhanced outlines for pressed state in high contrast mode\n */\nexport const HIGH_CONTRAST_PRESSED = \"hc:data-[pressed]:outline hc:data-[pressed]:outline-2 hc:data-[pressed]:outline-offset-1 hc:data-[pressed]:outline-foreground\";\n\n/**\n * Combined high contrast styles\n * Use this for components that need all high contrast interaction states\n */\nexport const HIGH_CONTRAST_INTERACTIONS = `${HIGH_CONTRAST_FOCUS} ${HIGH_CONTRAST_HOVER} ${HIGH_CONTRAST_PRESSED}`;\n\n/**\n * Disabled state styles\n * Consistent disabled appearance across all components\n */\nexport const DISABLED_STYLES = \"disabled:pointer-events-none disabled:opacity-50\";\n\n/**\n * Default interaction bundle\n * Most common combination for interactive components\n *\n * Includes: focus ring, pressed scale, hover shadow, high contrast enhancements\n *\n * @example\n * <button className={cn(DEFAULT_INTERACTIONS, \"bg-primary\")}>Click</button>\n */\nexport const DEFAULT_INTERACTIONS = `${FOCUS_STYLES} ${PRESSED_STYLES} ${HOVER_STYLES} ${HIGH_CONTRAST_FOCUS} ${HIGH_CONTRAST_HOVER} ${HIGH_CONTRAST_PRESSED}`;\n\n/**\n * Subtle interaction bundle\n * For components that need less pronounced feedback\n *\n * Includes: focus ring and high contrast, but no hover shadow or pressed scale\n */\nexport const SUBTLE_INTERACTIONS = `${FOCUS_STYLES} ${HIGH_CONTRAST_FOCUS}`;\n\n/**\n * Non-interactive element styles\n * For elements that should indicate they are not interactive\n */\nexport const NON_INTERACTIVE = \"cursor-default select-none\";\n","import { cva } from 'class-variance-authority';\n\n/**\n * Layer 1: Transparent outer touch target (44x44px minimum)\n * Handles WCAG 2.2 AAA touch target requirement\n * Always transparent, centers the visual button inside\n * IMPORTANT: Focus ring stays on Layer 1 for AAA compliance (2.4.13)\n *\n * In vertical ButtonGroups, uses items-stretch so the visual layer (Layer 2)\n * can fill the full touch target height, eliminating gaps between buttons.\n */\nexport const buttonOuterVariants = cva(\n \"inline-flex justify-center min-h-[44px] min-w-[44px] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--ring)] focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:pointer-events-none disabled:opacity-50\",\n {\n variants: {\n fullWidth: {\n true: \"w-full\",\n false: \"\",\n },\n inVerticalGroup: {\n true: \"items-stretch\",\n false: \"items-center\",\n },\n },\n defaultVariants: {\n fullWidth: false,\n inVerticalGroup: false,\n },\n }\n);\n\n/**\n * Layer 2: Visual button appearance (adjustable size)\n * Provides the visual appearance with configurable size\n * Can be smaller than touch target for use cases like carousel dots\n * NOTE: NO focus-visible styles here - focus ring is on Layer 1\n */\nexport const buttonVisualVariants = cva(\n \"inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 relative cursor-pointer\",\n {\n variants: {\n variant: {\n default:\n \"bg-[var(--primary-action)] text-[var(--primary-action-foreground)] shadow-md hover:bg-[var(--primary-action-hover)] data-[pressed]:bg-[var(--primary-action)]/80\",\n destructive:\n \"bg-[var(--destructive-background)] text-[var(--destructive-foreground)] shadow-md hover:bg-[var(--destructive-background)]/90 data-[pressed]:bg-[var(--destructive-background)]/80\",\n outline:\n \"border border-[var(--input-border)] bg-[var(--page-background)] hover:bg-[var(--input-border)] data-[pressed]:bg-[var(--input-border)]\",\n secondary:\n \"bg-[var(--secondary)] text-[var(--secondary-foreground)] shadow-md hover:bg-[var(--secondary)]/80 data-[pressed]:bg-[var(--secondary)]/70\",\n ghost:\n \"hover:bg-[var(--accent)] hover:text-[var(--accent-foreground)] data-[pressed]:bg-[var(--accent)]\",\n link: \"text-[var(--text-link)] underline-offset-4 hover:underline data-[pressed]:text-[var(--text-link-hover)]\",\n },\n fullWidth: {\n true: \"w-full\",\n false: \"\",\n },\n visualSize: {\n default: \"h-10 px-4 py-2\",\n sm: \"h-9 rounded-md px-3 text-xs\",\n lg: \"h-11 rounded-md px-8\",\n icon: \"h-10 w-10\",\n dot: \"h-5 w-5 rounded-full p-0 min-h-0 min-w-0\",\n },\n paywall: {\n true: \"!bg-[var(--paywall)] !text-[var(--paywall-foreground)] !shadow-md hover:!bg-[var(--paywall)]/90 !cursor-not-allowed !border-transparent\",\n false: \"\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n visualSize: \"default\",\n paywall: false,\n },\n }\n);\n\n/**\n * @deprecated Use buttonVisualVariants instead. This alias is kept for backward compatibility.\n */\nexport const buttonVariants = buttonVisualVariants;\n","\"use client\";\n\nimport { createContext, useContext } from 'react';\nimport type {\n ButtonGroupContextValue,\n ButtonGroupItemContextValue,\n} from './ButtonGroup.types';\n\n/**\n * ButtonGroup Context System (Two-Level)\n *\n * Provides a two-level context pattern for ButtonGroup:\n *\n * 1. ButtonGroupContext (group-level):\n * - Provides: orientation, variant, size, isDisabled\n * - Consumed by: Button (for prop inheritance), Separator (for orientation)\n *\n * 2. ButtonGroupItemContext (item-level):\n * - Provides: position ('first' | 'middle' | 'last' | 'only')\n * - Consumed by: Button (for border-radius styling)\n *\n * Both contexts return null when not in a provider, allowing Button\n * to work standalone without any group context.\n *\n * @see plan.md for architecture details\n * @see ButtonGroup.tsx for Provider implementation\n */\n\n// =============================================================================\n// Group-Level Context\n// =============================================================================\n\n/**\n * Context for group-level props (orientation, variant, size, isDisabled)\n * Default value is null to indicate \"not in a group\"\n */\nconst ButtonGroupContext = createContext<ButtonGroupContextValue | null>(null);\n\nButtonGroupContext.displayName = 'ButtonGroupContext';\n\n/**\n * Hook to access group-level context\n * @returns ButtonGroupContextValue if inside a ButtonGroup, null otherwise\n */\nexport function useButtonGroupContext(): ButtonGroupContextValue | null {\n return useContext(ButtonGroupContext);\n}\n\n// =============================================================================\n// Item-Level Context\n// =============================================================================\n\n/**\n * Context for per-button position information\n * Default value is null to indicate \"not wrapped with position context\"\n */\nconst ButtonGroupItemContext =\n createContext<ButtonGroupItemContextValue | null>(null);\n\nButtonGroupItemContext.displayName = 'ButtonGroupItemContext';\n\n/**\n * Hook to access item-level context (position)\n * @returns ButtonGroupItemContextValue if wrapped with position context, null otherwise\n */\nexport function useButtonGroupItemContext(): ButtonGroupItemContextValue | null {\n return useContext(ButtonGroupItemContext);\n}\n\n// =============================================================================\n// Exports\n// =============================================================================\n\nexport { ButtonGroupContext, ButtonGroupItemContext };\n","import { cva } from 'class-variance-authority';\n\n/**\n * ButtonGroup CVA Variants\n *\n * Defines Class Variance Authority (CVA) variants for:\n * - ButtonGroup container (orientation-based layout)\n * - ButtonGroupItem (position-based border-radius)\n * - ButtonGroupSeparator (orientation-based styling)\n *\n * @see plan.md Phase 1: Design & Contracts - CVA Variants\n * @see constitution.md Principle V (Component Quality Standards)\n */\n\n// =============================================================================\n// Container Variants\n// =============================================================================\n\n/**\n * ButtonGroup container variants\n * Controls the layout direction based on orientation\n * Uses gap-0 to ensure buttons are connected (share borders)\n */\nexport const buttonGroupVariants = cva('inline-flex items-center gap-0', {\n variants: {\n orientation: {\n horizontal: 'flex-row',\n vertical: 'flex-col w-full',\n },\n },\n defaultVariants: {\n orientation: 'horizontal',\n },\n});\n\n// =============================================================================\n// Item Position Variants\n// =============================================================================\n\n/**\n * ButtonGroupItem position variants\n * Applied to Button's visual layer (Layer 2) for position-aware border-radius\n *\n * Compound variants handle both orientation and position combinations:\n * - Horizontal: left/right borders and radii\n * - Vertical: top/bottom borders and radii\n */\nexport const buttonGroupItemVariants = cva('', {\n variants: {\n orientation: {\n // min-w-[44px] ensures visual layer fills touch target width (for icon buttons)\n horizontal: 'min-w-[44px]',\n // flex (overrides inline-flex) + min-h-[44px] makes visual layer fill touch target,\n // eliminating gaps between stacked buttons in vertical orientation\n vertical: 'flex min-h-[44px]',\n },\n position: {\n first: '',\n middle: '',\n last: '',\n only: '', // Single button - no modifications needed\n },\n },\n compoundVariants: [\n // ==========================================================================\n // Horizontal Orientation\n // ==========================================================================\n {\n orientation: 'horizontal',\n position: 'first',\n className: 'rounded-r-none border-r-0',\n },\n {\n orientation: 'horizontal',\n position: 'middle',\n className: 'rounded-none border-r-0',\n },\n {\n orientation: 'horizontal',\n position: 'last',\n className: 'rounded-l-none',\n },\n // ==========================================================================\n // Vertical Orientation\n // Note: w-full is handled by Button's effectiveFullWidth for both layers\n // ==========================================================================\n {\n orientation: 'vertical',\n position: 'first',\n className: 'rounded-b-none border-b-0',\n },\n {\n orientation: 'vertical',\n position: 'middle',\n className: 'rounded-none border-b-0',\n },\n {\n orientation: 'vertical',\n position: 'last',\n className: 'rounded-t-none',\n },\n ],\n defaultVariants: {\n orientation: 'horizontal',\n position: 'only',\n },\n});\n\n// =============================================================================\n// Separator Variants\n// =============================================================================\n\n/**\n * ButtonGroupSeparator variants\n * Orientation-aware visual divider between button groups\n */\nexport const buttonGroupSeparatorVariants = cva('bg-[var(--border)]', {\n variants: {\n orientation: {\n horizontal: 'w-px h-6 mx-1',\n vertical: 'h-px w-full my-1',\n },\n },\n defaultVariants: {\n orientation: 'horizontal',\n },\n});\n","\"use client\";\n\n/**\n * Button Component - 3-Layer Architecture\n * Accessible button with React Aria primitives and CVA styling\n *\n * Architecture:\n * - Layer 1: Touch Target (44x44px WCAG AAA compliant, transparent)\n * - Layer 2: Visual Button (configurable size, colors, borders)\n * - Layer 3: Content & Effects (text, icons, ripple, loading spinner)\n *\n * @see 3layer-plan.md for architecture details\n * @see spec.md FR-029 to FR-037 (Button Component Requirements)\n * @see spec.md FR-009 (WCAG 2.2 AAA - 7:1 contrast ratio)\n * @see spec.md FR-014 (44x44px minimum touch targets)\n * @see constitution.md Principle IV (Accessibility First)\n */\n\nimport { forwardRef, memo, useId } from 'react';\nimport {\n Button as AriaButton,\n type ButtonProps as AriaButtonProps,\n} from 'react-aria-components';\nimport { Loader2, Zap } from 'lucide-react';\nimport { cn } from '../../utils/cn';\nimport type { ButtonProps } from './Button.types';\nimport { buttonOuterVariants, buttonVisualVariants, buttonVariants } from './Button.styles';\nimport { PRESSED_STYLES, HOVER_STYLES, HIGH_CONTRAST_HOVER, HIGH_CONTRAST_PRESSED } from '../../styles/interaction-states';\nimport {\n useButtonGroupContext,\n useButtonGroupItemContext,\n} from '../ButtonGroup/ButtonGroupContext';\nimport { buttonGroupItemVariants } from '../ButtonGroup/ButtonGroup.variants';\n\n/**\n * Button Component - 3-Layer Architecture\n * Fully accessible button with React Aria and themed styling\n *\n * Layer 1: Touch Target (AriaButton) - 44x44px WCAG AAA compliant\n * Layer 2: Visual Button (span) - configurable appearance\n * Layer 3: Content (children) - text, icons, effects\n */\nconst Button = memo(forwardRef<HTMLButtonElement, ButtonProps>(\n (\n {\n className,\n buttonVisualClassName,\n variant,\n size,\n visualSize,\n fullWidth,\n loading = false,\n loadingText = \"Loading...\",\n shortcut,\n children,\n isDisabled,\n paywall = false,\n paywallRedirect,\n paywallDescription,\n onPress,\n ...props\n },\n ref\n ) => {\n const paywallDescriptionId = useId();\n\n // ==========================================================================\n // ButtonGroup Context Integration\n // ==========================================================================\n\n // Consume group-level context (variant, size, isDisabled, orientation)\n const groupContext = useButtonGroupContext();\n\n // Consume item-level context (position for border-radius styling)\n const itemContext = useButtonGroupItemContext();\n\n // Merge context values with props (props take precedence)\n const effectiveVariant = variant ?? groupContext?.variant ?? 'default';\n const effectiveSize = size ?? groupContext?.size;\n const effectiveIsDisabled = isDisabled ?? groupContext?.isDisabled ?? false;\n\n // In vertical groups, buttons should be full width automatically\n const isInVerticalGroup = groupContext?.orientation === 'vertical';\n const effectiveFullWidth = fullWidth || isInVerticalGroup;\n\n // Position styling for ButtonGroup (only applied when in a group)\n const positionClassName = itemContext\n ? buttonGroupItemVariants({\n orientation: groupContext?.orientation ?? 'horizontal',\n position: itemContext.position,\n })\n : '';\n\n // Default visualSize to size for backward compatibility\n const effectiveVisualSize = visualSize ?? effectiveSize ?? 'default';\n\n // AAA Accessibility: Warn in dev/test if icon/dot variant lacks accessible name\n if (process.env.NODE_ENV !== 'production') {\n if (\n (effectiveVisualSize === 'dot' || effectiveVisualSize === 'icon') &&\n !props['aria-label'] &&\n !children\n ) {\n console.warn(\n '[Button] visualSize=\"dot\" or \"icon\" requires aria-label when no visible text is provided (WCAG 1.1.1)'\n );\n }\n }\n\n /**\n * Handle button press - intercepts action when paywalled\n * If paywalled with redirect URL, opens in new tab\n * Otherwise, calls the normal onPress handler\n */\n const handlePress = (e: Parameters<NonNullable<AriaButtonProps['onPress']>>[0]): void => {\n if (paywall) {\n if (paywallRedirect) {\n window.open(paywallRedirect, '_blank', 'noopener,noreferrer');\n }\n // Don't call onPress when paywalled\n return;\n }\n onPress?.(e);\n };\n\n // Only set isDisabled when we have a reason to disable\n // Otherwise, let slot system control disabled state (e.g., in NumberField)\n const computedIsDisabled = effectiveIsDisabled || loading || undefined;\n\n return (\n <AriaButton\n ref={ref}\n isDisabled={computedIsDisabled}\n aria-disabled={paywall ? true : undefined}\n aria-describedby={paywall ? paywallDescriptionId : undefined}\n onPress={handlePress}\n className={cn(buttonOuterVariants({ fullWidth: effectiveFullWidth, inVerticalGroup: isInVerticalGroup }), className)}\n {...props}\n >\n {(renderProps) => (\n /* Layer 2: Visual Button */\n <span\n className={cn(\n buttonVisualVariants({\n variant: effectiveVariant,\n visualSize: effectiveVisualSize,\n paywall,\n fullWidth: effectiveFullWidth,\n }),\n // Position styling from ButtonGroup context (border-radius adjustments)\n positionClassName,\n buttonVisualClassName,\n // Layer 2 interaction styles (no focus - focus ring is on Layer 1)\n PRESSED_STYLES,\n HOVER_STYLES,\n HIGH_CONTRAST_HOVER,\n HIGH_CONTRAST_PRESSED\n )}\n data-pressed={renderProps.isPressed || undefined}\n >\n {/* Layer 3: Content & Effects */}\n\n {/* FR-033: Loading spinner with screen reader announcement */}\n {/* Uses motion-safe: for WCAG 2.3.3 AAA (Animation from Interactions) */}\n {loading && (\n <>\n <Loader2 className=\"motion-safe:animate-spin\" aria-hidden=\"true\" />\n <span className=\"sr-only\" aria-live=\"polite\">\n {loadingText}\n </span>\n </>\n )}\n\n {/* Hide children during loading */}\n {!loading && children}\n\n {/* Paywall: Lightning bolt icon */}\n {paywall && (\n <Zap\n data-testid=\"zap-icon\"\n aria-hidden=\"true\"\n className=\"ml-1\"\n />\n )}\n\n {/* Paywall: Screen reader description */}\n {paywall && (\n <span id={paywallDescriptionId} className=\"sr-only\">\n Premium feature: {paywallDescription || \"Upgrade required to access this feature\"}\n </span>\n )}\n\n {/* FR-034: Keyboard shortcut display on focus */}\n {renderProps.isFocusVisible && shortcut && (\n <kbd className=\"ml-auto hidden text-xs opacity-60 lg:inline\">\n {shortcut}\n </kbd>\n )}\n\n {/* Touch/press ripple effect - FR-031: Pressed state feedback */}\n {/* Uses motion-safe: for WCAG 2.3.3 AAA (Animation from Interactions) */}\n {renderProps.isPressed && (\n <span\n className=\"absolute inset-0 rounded-[inherit] bg-current opacity-10 motion-safe:animate-in motion-safe:zoom-in-95\"\n aria-hidden=\"true\"\n />\n )}\n </span>\n )}\n </AriaButton>\n );\n }\n));\n\nButton.displayName = \"Button\";\n\nexport { Button, buttonVariants, buttonOuterVariants, buttonVisualVariants };\nexport type { ButtonProps } from './Button.types';\n","/**\n * TextField Icon Components\n * SVG icons for password toggle functionality\n *\n * Extracted from TextField.tsx to keep the main component file focused.\n * These are module-level components to avoid re-creating on every render.\n */\n\nimport type { ReactElement } from 'react';\n\n/**\n * Eye icon for \"show password\" state\n * Rendered when the password is currently hidden\n */\nexport const EyeIcon = (): ReactElement => (\n <svg\n data-testid=\"password-toggle-icon-show\"\n width=\"16\"\n height=\"16\"\n viewBox=\"0 0 16 16\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n >\n <path d=\"M1 8s3-5 7-5 7 5 7 5-3 5-7 5-7-5-7-5z\" />\n <circle cx=\"8\" cy=\"8\" r=\"2\" />\n </svg>\n);\n\n/**\n * Eye-off icon for \"hide password\" state\n * Rendered when the password is currently visible\n */\nexport const EyeOffIcon = (): ReactElement => (\n <svg\n data-testid=\"password-toggle-icon-hide\"\n width=\"16\"\n height=\"16\"\n viewBox=\"0 0 16 16\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n >\n <path d=\"M10.5 5.5l-5 5\" />\n <path d=\"M1 8s3-5 7-5c1.5 0 2.8.6 4 1.5M15 8s-1.5 2.5-4 4\" />\n <path d=\"M3 13l2-2m7-7l2-2\" />\n <circle cx=\"8\" cy=\"8\" r=\"2\" />\n </svg>\n);\n","/**\n * TextField CVA Variant Styles\n * Extracted from TextField.tsx for separation of concerns\n *\n * @see spec.md FR-009 to FR-014 (Accessibility Requirements - WCAG 2.2 AAA)\n * @see React Aria TextField: https://react-spectrum.adobe.com/react-aria/TextField.html\n * @see ShadCN Input: https://ui.shadcn.com/docs/components/input\n * @see ShadCN Label: https://ui.shadcn.com/docs/components/label\n */\n\nimport { cva } from 'class-variance-authority';\n\n/**\n * Input variant styles using CVA\n * Adapts ShadCN Input styling with Themis semantic tokens\n */\nexport const inputVariants = cva(\n // Base styles - FR-014: Proper input styling with focus states\n \"flex w-full rounded-md border bg-[var(--content-background)] shadow-xs px-3 py-2 text-sm ring-offset-[var(--content-background)] file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-[var(--content-foreground)] placeholder:text-[var(--menu-muted)] transition-all duration-200\",\n {\n variants: {\n // Size variants (matching Button sizes)\n size: {\n sm: \"h-9 text-xs px-2 py-1\",\n default: \"h-10 px-3 py-2\",\n lg: \"h-11 px-4 py-3 text-base\"\n },\n // State variants\n state: {\n default: \"border-[var(--input-border)] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--ring)] focus-visible:ring-offset-2\",\n error: \"border-[var(--destructive-background)] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--destructive-background)] focus-visible:ring-offset-2\",\n success: \"border-[var(--success-background)] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--success-ring)] focus-visible:ring-offset-2\",\n disabled: \"cursor-not-allowed opacity-50\",\n readonly: \"cursor-default bg-[var(--content-background)] opacity-70\"\n }\n },\n defaultVariants: {\n size: \"default\",\n state: \"default\"\n }\n }\n);\n\n/**\n * Label variant styles using CVA\n * Adapts ShadCN Label styling with Themis semantic tokens\n */\nexport const labelVariants = cva(\n // Base styles - FR-009: WCAG 2.2 AAA compliance\n \"text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70\",\n {\n variants: {\n state: {\n default: \"text-[var(--content-foreground)]\",\n error: \"text-[var(--destructive-foreground)]\",\n disabled: \"opacity-50 cursor-not-allowed\"\n }\n },\n defaultVariants: {\n state: \"default\"\n }\n }\n);\n\n/**\n * Description text variant styles\n */\nexport const descriptionVariants = cva(\n \"text-sm text-[var(--content-foreground)]\"\n);\n\n/**\n * Error message variant styles\n */\nexport const errorMessageVariants = cva(\n \"text-sm text-[var(--destructive-foreground)] font-medium mt-1.5\"\n);\n\n/**\n * Success message variant styles\n */\nexport const successMessageVariants = cva(\n \"text-sm text-[var(--success-foreground)] font-medium mt-1.5\"\n);\n","/**\n * TextField Custom Hooks\n * Extracted from TextField.tsx for separation of concerns\n *\n * These hooks encapsulate the behavioral logic for:\n * - Expand on focus\n * - Copy/paste protection\n * - Password visibility toggle\n */\n\nimport { useState, useEffect, useCallback, useMemo } from 'react';\nimport type { FocusEvent, ClipboardEvent } from 'react';\n\n/**\n * Hook: useExpandOnFocus\n * Manages the expand-on-focus behavior where an input starts narrow\n * and expands to full width when focused or when it has a value.\n *\n * @param expandOnFocus - Whether expand-on-focus is enabled\n * @param collapsedWidth - CSS width when collapsed (e.g., '200px')\n * @param value - Controlled value (if any)\n * @param defaultValue - Default value (if any)\n * @param userOnFocus - User-provided onFocus handler to call through\n * @param userOnBlur - User-provided onBlur handler to call through\n */\nexport function useExpandOnFocus({\n expandOnFocus,\n collapsedWidth,\n value,\n defaultValue,\n userOnFocus,\n userOnBlur,\n}: {\n expandOnFocus: boolean;\n collapsedWidth: string;\n value: string | undefined;\n defaultValue: string | undefined;\n userOnFocus: ((e: FocusEvent<HTMLInputElement>) => void) | undefined;\n userOnBlur: ((e: FocusEvent<HTMLInputElement>) => void) | undefined;\n}) {\n const [isFocused, setIsFocused] = useState(false);\n\n const handleFocus = useCallback((e: FocusEvent<HTMLInputElement>) => {\n if (expandOnFocus) {\n setIsFocused(true);\n }\n userOnFocus?.(e);\n }, [expandOnFocus, userOnFocus]);\n\n const handleBlur = useCallback((e: FocusEvent<HTMLInputElement>) => {\n if (expandOnFocus) {\n const isEmpty = e.target.value === '';\n if (isEmpty) {\n setIsFocused(false);\n }\n }\n userOnBlur?.(e);\n }, [expandOnFocus, userOnBlur]);\n\n const inputWidth = useMemo(() => {\n if (!expandOnFocus) return undefined;\n\n const hasValue = value !== undefined ? value !== '' : defaultValue !== undefined && defaultValue !== '';\n\n if (isFocused || hasValue) {\n return '100%';\n }\n\n return collapsedWidth;\n }, [expandOnFocus, isFocused, value, defaultValue, collapsedWidth]);\n\n return { handleFocus, handleBlur, inputWidth };\n}\n\n/**\n * Hook: useCopyPasteProtection\n * Manages copy/paste prevention with shake animation and screen reader announcements.\n *\n * @param disableCopyPaste - Whether copy/paste should be disabled\n */\nexport function useCopyPasteProtection({\n disableCopyPaste,\n}: {\n disableCopyPaste: boolean;\n}) {\n const [isShaking, setIsShaking] = useState(false);\n const [screenReaderMessage, setScreenReaderMessage] = useState('');\n\n // Development mode warning for disableCopyPaste\n useEffect(() => {\n if (disableCopyPaste && typeof process !== 'undefined' && process.env.NODE_ENV === 'development') {\n console.warn(\n '[TextField] Copy/paste prevention should only be used for security-critical fields like password confirmation. ' +\n 'This feature can break assistive technology workflows and password managers.'\n );\n }\n }, [disableCopyPaste]);\n\n const handlePaste = useCallback((e: ClipboardEvent<HTMLInputElement>) => {\n if (disableCopyPaste) {\n e.preventDefault();\n\n // Trigger shake animation\n setIsShaking(true);\n\n // Announce to screen readers\n setScreenReaderMessage('Pasting is not allowed in this field. Please type your entry.');\n\n // Remove shake animation and clear message after 400ms\n setTimeout(() => {\n setIsShaking(false);\n setScreenReaderMessage('');\n }, 400);\n }\n }, [disableCopyPaste]);\n\n return { isShaking, screenReaderMessage, handlePaste };\n}\n\n/**\n * Hook: usePasswordToggle\n * Manages password show/hide toggle state and determines the actual input type.\n *\n * @param type - The input type ('text', 'email', 'password', etc.)\n * @param showPasswordToggle - Whether the toggle button should be shown\n */\nexport function usePasswordToggle({\n type,\n showPasswordToggle,\n}: {\n type: string;\n showPasswordToggle: boolean | undefined;\n}) {\n const [showPassword, setShowPassword] = useState(false);\n\n const handlePasswordToggle = useCallback(() => {\n setShowPassword(prev => !prev);\n }, []);\n\n const actualType = useMemo(() => {\n if (type === 'password' && showPasswordToggle && showPassword) {\n return 'text';\n }\n return type;\n }, [type, showPasswordToggle, showPassword]);\n\n return { showPassword, actualType, handlePasswordToggle };\n}\n","\"use client\";\n\n/**\n * TextField Component\n * Accessible text input with React Aria primitives and CVA styling\n *\n * @see spec.md FR-009 to FR-014 (Accessibility Requirements - WCAG 2.2 AAA)\n * @see React Aria TextField: https://react-spectrum.adobe.com/react-aria/TextField.html\n * @see ShadCN Input: https://ui.shadcn.com/docs/components/input\n * @see ShadCN Label: https://ui.shadcn.com/docs/components/label\n * @see constitution.md Principle IV (Accessibility First)\n */\n\nimport './TextField.css';\nimport { forwardRef, useId, useMemo, useState, useCallback } from 'react';\nimport {\n TextField as AriaTextField,\n Label as AriaLabel,\n Input as AriaInput,\n Text as AriaText,\n FieldError as AriaFieldError,\n} from 'react-aria-components';\nimport { cn } from '../../utils/cn';\nimport { DISABLED_STYLES } from '../../styles/interaction-states';\nimport type {\n TextFieldProps,\n TextFieldLabelProps,\n TextFieldInputProps,\n TextFieldDescriptionProps,\n TextFieldErrorProps,\n} from './TextField.types';\nimport { CircleAlert, Search, X } from 'lucide-react';\nimport { Button } from '../Button';\nimport { EyeIcon, EyeOffIcon } from './TextField.icons';\nimport {\n inputVariants,\n labelVariants,\n descriptionVariants,\n errorMessageVariants,\n successMessageVariants,\n} from './TextField.styles';\nimport { useExpandOnFocus, useCopyPasteProtection, usePasswordToggle } from './TextField.hooks';\n\n// Re-export CVA variants so existing imports from './TextField' continue to work\nexport {\n inputVariants,\n labelVariants,\n descriptionVariants,\n errorMessageVariants,\n successMessageVariants,\n};\n\n/**\n * TextFieldLabel Sub-component\n * Styled label with optional required indicator\n */\nexport const TextFieldLabel = forwardRef<HTMLLabelElement, TextFieldLabelProps>(\n ({ className, state = 'default', children, ...props }, ref) => {\n return (\n <AriaLabel\n ref={ref}\n className={cn(labelVariants({ state }), className)}\n {...props}\n >\n {children}\n </AriaLabel>\n );\n }\n);\n\nTextFieldLabel.displayName = \"TextFieldLabel\";\n\n/**\n * TextFieldInput Sub-component\n * Styled input with size and state variants\n */\nexport const TextFieldInput = forwardRef<HTMLInputElement, TextFieldInputProps>(\n ({ className, size = 'default', state = 'default', ...props }, ref) => {\n return (\n <AriaInput\n ref={ref}\n className={cn(inputVariants({ size, state }), DISABLED_STYLES, className)}\n {...props}\n />\n );\n }\n);\n\nTextFieldInput.displayName = \"TextFieldInput\";\n\n/**\n * TextFieldDescription Sub-component\n * Helper text displayed below the input\n */\nexport const TextFieldDescription = forwardRef<HTMLDivElement, TextFieldDescriptionProps>(\n ({ className, children, ...props }, ref) => {\n return (\n <AriaText\n ref={ref}\n slot=\"description\"\n className={cn(descriptionVariants(), className)}\n {...props}\n >\n {children}\n </AriaText>\n );\n }\n);\n\nTextFieldDescription.displayName = \"TextFieldDescription\";\n\n/**\n * TextFieldError Sub-component\n * Error message displayed when field is invalid\n * Note: We use AriaFieldError with explicit role=\"alert\" for screen reader announcements\n */\nexport const TextFieldError = forwardRef<HTMLDivElement, TextFieldErrorProps>(\n ({ className, children, ...props }, ref) => {\n return (\n <AriaFieldError\n ref={ref}\n {...props}\n className={cn(errorMessageVariants(), className)}\n >\n <span className=\"flex items-center gap-2\" role=\"alert\"><CircleAlert className=\"h-4 w-4\" />{children}</span>\n </AriaFieldError>\n );\n }\n);\n\nTextFieldError.displayName = \"TextFieldError\";\n\n/**\n * TextFieldSuccess Sub-component\n * Success message displayed when field is valid\n */\nexport const TextFieldSuccess = forwardRef<HTMLDivElement, TextFieldDescriptionProps>(\n ({ className, children, ...props }, ref) => {\n return (\n <AriaText\n ref={ref}\n slot=\"description\"\n className={cn(successMessageVariants(), className)}\n {...props}\n >\n {children}\n </AriaText>\n );\n }\n);\n\nTextFieldSuccess.displayName = \"TextFieldSuccess\";\n\n/**\n * TextField Component\n * Fully accessible text input with React Aria and themed styling\n *\n * @example\n * <TextField\n * label=\"Email\"\n * description=\"We'll never share your email\"\n * isRequired\n * type=\"email\"\n * />\n */\nexport const TextField = forwardRef<HTMLDivElement, TextFieldProps>(\n (\n {\n className,\n size = 'default',\n label,\n labelHint,\n description,\n errorMessage,\n successMessage,\n type = 'text',\n isRequired = false,\n isReadOnly = false,\n isDisabled = false,\n isInvalid = false,\n isValid = false,\n id,\n autoComplete,\n disableCopyPaste = false,\n pattern,\n patternDescription,\n expandOnFocus = false,\n collapsedWidth = '200px',\n prefix,\n suffix,\n prefixSize = 16,\n suffixSize = 16,\n showPasswordToggle,\n isIconHidden = false,\n onSubmit,\n onClear,\n value,\n defaultValue,\n onFocus: userOnFocus,\n onBlur: userOnBlur,\n ...props\n },\n ref\n ) => {\n // Generate unique IDs for error message linking\n const errorId = useId();\n const generatedId = useId();\n const fieldId = id || generatedId;\n\n // Custom hooks for behavioral logic\n const { handleFocus, handleBlur, inputWidth } = useExpandOnFocus({\n expandOnFocus,\n collapsedWidth,\n value,\n defaultValue,\n userOnFocus,\n userOnBlur,\n });\n\n const { isShaking, screenReaderMessage, handlePaste } = useCopyPasteProtection({\n disableCopyPaste,\n });\n\n const { showPassword, actualType, handlePasswordToggle } = usePasswordToggle({\n type,\n showPasswordToggle,\n });\n\n // ==========================================================================\n // Search functionality (type=\"search\")\n // ==========================================================================\n const isSearch = type === 'search';\n const [searchValue, setSearchValue] = useState(defaultValue ?? '');\n const isControlledSearch = value !== undefined;\n const currentSearchValue = isControlledSearch ? value : searchValue;\n\n const handleSearchChange = useCallback(\n (newValue: string) => {\n if (!isControlledSearch) {\n setSearchValue(newValue);\n }\n (props as { onChange?: (v: string) => void }).onChange?.(newValue);\n },\n [isControlledSearch, props]\n );\n\n const handleSearchClear = useCallback(() => {\n if (!isControlledSearch) {\n setSearchValue('');\n }\n (props as { onChange?: (v: string) => void }).onChange?.('');\n onClear?.();\n }, [isControlledSearch, props, onClear]);\n\n const handleSearchKeyDown = useCallback(\n (e: React.KeyboardEvent<HTMLInputElement>) => {\n if (e.key === 'Enter' && onSubmit) {\n onSubmit(currentSearchValue);\n }\n if (e.key === 'Escape' && currentSearchValue) {\n e.preventDefault();\n handleSearchClear();\n }\n },\n [currentSearchValue, onSubmit, handleSearchClear]\n );\n\n // Determine input state based on props\n const inputState = useMemo(() => {\n if (isDisabled) return 'disabled';\n if (isReadOnly) return 'readonly';\n if (isInvalid) return 'error';\n if (isValid) return 'success';\n return 'default';\n }, [isDisabled, isReadOnly, isInvalid, isValid]);\n\n // Determine label state\n const labelState = useMemo(() => {\n if (isDisabled) return 'disabled';\n if (isInvalid) return 'error';\n return 'default';\n }, [isDisabled, isInvalid]);\n\n // Combine description and patternDescription\n const combinedDescription = useMemo(() => {\n if (description && patternDescription) {\n return `${description} ${patternDescription}`;\n }\n return description || patternDescription;\n }, [description, patternDescription]);\n\n // Determine actual prefix (search icon auto-added for type=\"search\")\n const actualPrefix = useMemo(() => {\n if (isSearch && !isIconHidden && !prefix) {\n const iconSize = size === 'sm' ? 'h-3.5 w-3.5' : size === 'lg' ? 'h-5 w-5' : 'h-4 w-4';\n return <Search className={iconSize} />;\n }\n return prefix;\n }, [isSearch, isIconHidden, prefix, size]);\n\n // Calculate dynamic padding for prefix/suffix\n const inputPadding = useMemo(() => {\n const basePadding = { left: 12, right: 12 }; // Default px-3 = 12px\n\n if (actualPrefix) {\n const prefixWidth = typeof actualPrefix === 'string'\n ? actualPrefix.length * 8 + 16\n : prefixSize + 16;\n basePadding.left = prefixWidth;\n }\n\n if (type === 'password' && showPasswordToggle) {\n basePadding.right = 16 + 16;\n } else if (isSearch && currentSearchValue) {\n basePadding.right = 44; // Space for clear button\n } else if (suffix) {\n const suffixWidth = typeof suffix === 'string'\n ? suffix.length * 8 + 16\n : suffixSize + 16;\n basePadding.right = suffixWidth;\n }\n\n return basePadding;\n }, [actualPrefix, prefix, suffix, prefixSize, suffixSize, type, showPasswordToggle, isSearch, currentSearchValue]);\n\n // Determine actual suffix (password toggle / search clear / custom suffix)\n const actualSuffix = useMemo(() => {\n if (type === 'password' && showPasswordToggle) {\n return (\n <Button\n variant=\"ghost\"\n visualSize=\"icon\"\n onPress={handlePasswordToggle}\n aria-label={showPassword ? 'Hide password' : 'Show password'}\n className=\"!min-h-0 !min-w-0 h-8 w-8\"\n >\n {showPassword ? <EyeOffIcon /> : <EyeIcon />}\n </Button>\n );\n }\n if (isSearch && currentSearchValue) {\n const iconSize = size === 'sm' ? 'h-3 w-3' : size === 'lg' ? 'h-5 w-5' : 'h-4 w-4';\n return (\n <Button\n variant=\"ghost\"\n visualSize=\"icon\"\n onPress={handleSearchClear}\n aria-label=\"Clear search\"\n className=\"!min-h-0 !min-w-0 h-8 w-8\"\n >\n <X className={iconSize} />\n </Button>\n );\n }\n return suffix;\n }, [type, showPasswordToggle, showPassword, suffix, handlePasswordToggle, isSearch, currentSearchValue, size, handleSearchClear]);\n\n // Whether the suffix is an interactive button (password toggle or search clear)\n const hasInteractiveSuffix = (type === 'password' && showPasswordToggle) || (isSearch && !!currentSearchValue);\n\n return (\n <AriaTextField\n ref={ref}\n className={cn(\"flex flex-col gap-1.5\", className)}\n isRequired={isRequired}\n isReadOnly={isReadOnly}\n isDisabled={isDisabled}\n isInvalid={isInvalid}\n value={isSearch ? currentSearchValue : value}\n defaultValue={isSearch ? undefined : defaultValue}\n onChange={isSearch ? handleSearchChange : undefined}\n {...props}\n >\n {/* Label with optional hint and required indicator */}\n {label && (\n <AriaLabel className={cn(labelVariants({ state: labelState }), labelHint && \"flex items-baseline justify-between\")}>\n <span>\n {label}\n {isRequired && (\n <span className=\"ml-1 text-[var(--destructive-background)]\" aria-hidden=\"true\">\n <strong>*</strong>\n </span>\n )}\n </span>\n {labelHint && (\n <span className=\"text-xs font-normal text-[var(--muted-foreground)]\">{labelHint}</span>\n )}\n </AriaLabel>\n )}\n\n {/* Description text (helper text) */}\n {combinedDescription && (\n <AriaText slot=\"description\" className={cn(descriptionVariants())}>\n {combinedDescription}\n </AriaText>\n )}\n\n {/* Input field with prefix/suffix */}\n <div\n className=\"relative flex items-center motion-safe:transition-all motion-safe:duration-200\"\n style={{\n width: inputWidth,\n }}\n >\n {/* Prefix */}\n {actualPrefix && (\n <div\n data-testid=\"textfield-prefix\"\n className=\"absolute left-3 flex items-center justify-center pointer-events-none text-[var(--content-foreground)]\"\n aria-hidden=\"true\"\n >\n {actualPrefix}\n </div>\n )}\n\n {/* Input */}\n <AriaInput\n type={actualType}\n id={fieldId}\n className={cn(\n inputVariants({ size, state: inputState }),\n DISABLED_STYLES,\n isShaking && 'shake'\n )}\n style={{\n width: '100%',\n paddingLeft: `${inputPadding.left}px`,\n paddingRight: `${inputPadding.right}px`,\n }}\n autoComplete={autoComplete}\n pattern={pattern}\n onPaste={handlePaste}\n onFocus={handleFocus}\n onBlur={handleBlur}\n onKeyDown={isSearch ? handleSearchKeyDown : undefined}\n aria-required={isRequired ? 'true' : undefined}\n aria-readonly={isReadOnly ? 'true' : undefined}\n aria-errormessage={isInvalid && errorMessage ? errorId : undefined}\n />\n\n {/* Suffix */}\n {actualSuffix && (\n <div\n data-testid=\"textfield-suffix\"\n className={cn(\n \"absolute right-3 flex items-center justify-center text-[var(--content-foreground)]\",\n hasInteractiveSuffix ? \"\" : \"pointer-events-none\"\n )}\n aria-hidden={hasInteractiveSuffix ? undefined : \"true\"}\n >\n {actualSuffix}\n </div>\n )}\n </div>\n\n {/* Success message (shown when valid) */}\n {isValid && successMessage && !isInvalid && (\n <AriaText slot=\"description\" className={cn(successMessageVariants())}>\n {successMessage}\n </AriaText>\n )}\n\n {/* Error message (shown when invalid) - takes precedence over success */}\n {isInvalid && errorMessage && (\n <TextFieldError id={errorId}>\n {errorMessage}\n </TextFieldError>\n )}\n\n {/* Screen reader announcement for paste prevention */}\n {screenReaderMessage && (\n <div className=\"sr-only\" role=\"status\" aria-live=\"polite\" aria-atomic=\"true\">\n {screenReaderMessage}\n </div>\n )}\n </AriaTextField>\n );\n }\n);\n\nTextField.displayName = \"TextField\";\n\nexport { inputVariants as textFieldInputVariants, labelVariants as textFieldLabelVariants };\n","'use client';\n\n/**\n * SearchField Component\n *\n * A specialized search input built on the Themis TextField component.\n * Delegates all rendering and behavior to TextField with type=\"search\",\n * which provides search icon, clear button (Themis Button), and keyboard support.\n *\n * WCAG 2.2 AAA compliant:\n * - 44x44px touch targets on all interactive elements (via Themis Button)\n * - Clear button uses Themis Button three-layer architecture\n * - Escape key clears input\n * - Enter key submits search\n * - role=\"searchbox\" via type=\"search\"\n *\n * @example\n * ```tsx\n * <SearchField\n * label=\"Search\"\n * placeholder=\"Search items...\"\n * onSubmit={(value) => console.log('Search:', value)}\n * />\n * ```\n */\n\nimport { forwardRef } from 'react';\nimport { TextField } from '../TextField/TextField';\nimport type { SearchFieldProps } from './SearchField.types';\n\nexport const SearchField = forwardRef<HTMLDivElement, SearchFieldProps>(\n (\n {\n label,\n description,\n errorMessage,\n 'aria-label': ariaLabel,\n 'aria-labelledby': ariaLabelledBy,\n ...props\n },\n ref\n ) => {\n // Warn if no accessible label is provided\n if (process.env.NODE_ENV !== 'production') {\n if (!label && !ariaLabel && !ariaLabelledBy) {\n console.warn(\n '[SearchField] Either label, aria-label, or aria-labelledby is required for accessibility (WCAG 1.1.1)'\n );\n }\n }\n\n return (\n <TextField\n ref={ref}\n type=\"search\"\n label={label}\n description={errorMessage ? undefined : description}\n errorMessage={errorMessage}\n isInvalid={!!errorMessage}\n aria-label={!label ? ariaLabel : undefined}\n aria-labelledby={ariaLabelledBy}\n {...props}\n />\n );\n }\n);\n\nSearchField.displayName = 'SearchField';\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 type { ReactNode } from 'react';\nimport { BaseComponentPropsSchema } from '../../schemas/BaseComponentProps';\n\n/**\n * SearchField props schema extending BaseComponentProps\n *\n * A specialized search input built on the Themis TextField component.\n * Uses Themis Button for the clear action (three-layer architecture,\n * 44x44px touch targets).\n */\nexport const SearchFieldPropsSchema = BaseComponentPropsSchema.extend({\n // Size variants matching other form components\n size: z.enum(['sm', 'default', 'lg']).optional().default('default'),\n\n // Text content\n label: z.string().optional(),\n description: z.string().optional(),\n errorMessage: z.string().optional(),\n\n // State props\n isRequired: z.boolean().optional(),\n isReadOnly: z.boolean().optional(),\n isDisabled: z.boolean().optional(),\n\n // Input attributes\n placeholder: z.string().optional(),\n value: z.string().optional(),\n defaultValue: z.string().optional(),\n name: z.string().optional(),\n\n // Search-specific\n /** Called when the search is submitted (Enter key) */\n onSubmit: z.custom<(value: string) => void>().optional(),\n\n /** Called when the clear button is pressed */\n onClear: z.custom<() => void>().optional(),\n\n /** Called when the input value changes */\n onChange: z.custom<(value: string) => void>().optional(),\n\n /** Hide the search icon */\n isIconHidden: z.boolean().optional().default(false),\n});\n\nexport interface SearchFieldProps {\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 size?: 'sm' | 'default' | 'lg';\n label?: string;\n description?: string;\n errorMessage?: string;\n isRequired?: boolean;\n isReadOnly?: boolean;\n isDisabled?: boolean;\n placeholder?: string;\n value?: string;\n defaultValue?: string;\n name?: string;\n onSubmit?: (value: string) => void;\n onClear?: () => void;\n onChange?: (value: string) => void;\n isIconHidden?: boolean;\n}\n\nexport type SearchFieldSize = SearchFieldProps['size'];\n","/**\n * SearchField CVA Variant Styles\n *\n * Note: Most styling is delegated to the underlying TextField component.\n * These variants are kept for consumers who need direct access to\n * SearchField-specific style tokens.\n */\n\nimport { cva } from 'class-variance-authority';\n\n/**\n * Root wrapper variant styles\n */\nexport const searchFieldVariants = cva(\n 'group flex flex-col gap-1.5 w-full',\n {\n variants: {\n size: {\n sm: '',\n default: '',\n lg: '',\n },\n },\n defaultVariants: { size: 'default' },\n }\n);\n\n/**\n * Label variant styles\n */\nexport const searchFieldLabelVariants = cva(\n 'text-[var(--text-primary)] font-medium',\n {\n variants: {\n size: {\n sm: 'text-xs',\n default: 'text-sm',\n lg: 'text-base',\n },\n },\n defaultVariants: { size: 'default' },\n }\n);\n\n/**\n * Description text variant styles\n */\nexport const searchFieldDescriptionVariants = cva(\n 'text-[var(--muted-foreground)]',\n {\n variants: {\n size: {\n sm: 'text-xs',\n default: 'text-xs',\n lg: 'text-sm',\n },\n },\n defaultVariants: { size: 'default' },\n }\n);\n\n/**\n * Error message variant styles\n */\nexport const searchFieldErrorVariants = cva(\n 'text-[var(--destructive-background)]',\n {\n variants: {\n size: {\n sm: 'text-xs',\n default: 'text-xs',\n lg: 'text-sm',\n },\n },\n defaultVariants: { size: 'default' },\n }\n);\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextField.d.ts","sourceRoot":"","sources":["../../../src/elements/TextField/TextField.tsx"],"names":[],"mappings":"AAEA;;;;;;;;;GASG;AAEH,OAAO,iBAAiB,CAAC;AAqBzB,OAAO,EACL,aAAa,EACb,aAAa,EACb,mBAAmB,EACnB,oBAAoB,EACpB,sBAAsB,EACvB,MAAM,oBAAoB,CAAC;AAI5B,OAAO,EACL,aAAa,EACb,aAAa,EACb,mBAAmB,EACnB,oBAAoB,EACpB,sBAAsB,GACvB,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,cAAc,8PAY1B,CAAC;AAIF;;;GAGG;AACH,eAAO,MAAM,cAAc,8PAU1B,CAAC;AAIF;;;GAGG;AACH,eAAO,MAAM,oBAAoB,uQAahC,CAAC;AAIF;;;;GAIG;AACH,eAAO,MAAM,cAAc,2PAY1B,CAAC;AAIF;;;GAGG;AACH,eAAO,MAAM,gBAAgB,uQAa5B,CAAC;AAIF;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,SAAS,
|
|
1
|
+
{"version":3,"file":"TextField.d.ts","sourceRoot":"","sources":["../../../src/elements/TextField/TextField.tsx"],"names":[],"mappings":"AAEA;;;;;;;;;GASG;AAEH,OAAO,iBAAiB,CAAC;AAqBzB,OAAO,EACL,aAAa,EACb,aAAa,EACb,mBAAmB,EACnB,oBAAoB,EACpB,sBAAsB,EACvB,MAAM,oBAAoB,CAAC;AAI5B,OAAO,EACL,aAAa,EACb,aAAa,EACb,mBAAmB,EACnB,oBAAoB,EACpB,sBAAsB,GACvB,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,cAAc,8PAY1B,CAAC;AAIF;;;GAGG;AACH,eAAO,MAAM,cAAc,8PAU1B,CAAC;AAIF;;;GAGG;AACH,eAAO,MAAM,oBAAoB,uQAahC,CAAC;AAIF;;;;GAIG;AACH,eAAO,MAAM,cAAc,2PAY1B,CAAC;AAIF;;;GAGG;AACH,eAAO,MAAM,gBAAgB,uQAa5B,CAAC;AAIF;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,SAAS,sPAyTrB,CAAC;AAIF,OAAO,EAAE,aAAa,IAAI,sBAAsB,EAAE,aAAa,IAAI,sBAAsB,EAAE,CAAC"}
|
|
@@ -96,6 +96,7 @@ export declare const TextFieldPropsSchema: z.ZodObject<{
|
|
|
96
96
|
lg: "lg";
|
|
97
97
|
}>>>;
|
|
98
98
|
label: z.ZodOptional<z.ZodString>;
|
|
99
|
+
labelHint: z.ZodOptional<z.ZodString>;
|
|
99
100
|
description: z.ZodOptional<z.ZodString>;
|
|
100
101
|
errorMessage: z.ZodOptional<z.ZodString>;
|
|
101
102
|
successMessage: z.ZodOptional<z.ZodString>;
|
|
@@ -200,6 +201,7 @@ export interface TextFieldPropsOwn {
|
|
|
200
201
|
'data-testid'?: string;
|
|
201
202
|
size?: 'sm' | 'default' | 'lg';
|
|
202
203
|
label?: string;
|
|
204
|
+
labelHint?: string;
|
|
203
205
|
description?: string;
|
|
204
206
|
errorMessage?: string;
|
|
205
207
|
successMessage?: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextField.types.d.ts","sourceRoot":"","sources":["../../../src/elements/TextField/TextField.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,KAAK,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B,GAAG,wBAAwB,GAC1D,IAAI,CAAC,aAAa,EAAE,MAAM,wBAAwB,CAAC,CAAC;AAEtD;;GAEG;AACH,MAAM,MAAM,aAAa,GAAG,iBAAiB,CAAC,MAAM,CAAC,CAAC;AACtD,MAAM,MAAM,UAAU,GAAG,sBAAsB,CAAC,OAAO,CAAC,CAAC;AACzD,MAAM,MAAM,UAAU,GAAG,sBAAsB,CAAC,OAAO,CAAC,CAAC"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
'use strict';var react=require('react'),reactAriaComponents=require('react-aria-components'),clsx=require('clsx'),tailwindMerge=require('tailwind-merge'),lucideReact=require('lucide-react'),classVarianceAuthority=require('class-variance-authority'),jsxRuntime=require('react/jsx-runtime'),zod=require('zod');function d(...t){return tailwindMerge.twMerge(clsx.clsx(t))}var ae="data-[pressed]:scale-[0.97]";var ne="data-[hovered]:shadow-md";var q="hc:data-[hovered]:outline hc:data-[hovered]:outline-2 hc:data-[hovered]:outline-foreground",U="hc:data-[pressed]:outline hc:data-[pressed]:outline-2 hc:data-[pressed]:outline-offset-1 hc:data-[pressed]:outline-foreground",se="disabled:pointer-events-none disabled:opacity-50";var le=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}}),de=classVarianceAuthority.cva("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors [&_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)] data-[pressed]:bg-[var(--primary-action)]/80",destructive:"bg-[var(--destructive-background)] text-[var(--destructive-foreground)] shadow-md hover:bg-[var(--destructive-background)]/90 data-[pressed]:bg-[var(--destructive-background)]/80",outline:"border border-[var(--input-border)] bg-[var(--page-background)] hover:bg-[var(--input-border)] data-[pressed]:bg-[var(--input-border)]",secondary:"bg-[var(--secondary)] text-[var(--secondary-foreground)] shadow-md hover:bg-[var(--secondary)]/80 data-[pressed]:bg-[var(--secondary)]/70",ghost:"hover:bg-[var(--accent)] hover:text-[var(--accent-foreground)] data-[pressed]:bg-[var(--accent)]",link:"text-[var(--text-link)] underline-offset-4 hover:underline data-[pressed]: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-8",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)] !shadow-md hover:!bg-[var(--paywall)]/90 !cursor-not-allowed !border-transparent",false:""}},defaultVariants:{variant:"default",visualSize:"default",paywall:false}});var Ne=react.createContext(null);Ne.displayName="ButtonGroupContext";function Ve(){return react.useContext(Ne)}var Ce=react.createContext(null);Ce.displayName="ButtonGroupItemContext";function Ie(){return react.useContext(Ce)}classVarianceAuthority.cva("inline-flex items-center gap-0",{variants:{orientation:{horizontal:"flex-row",vertical:"flex-col w-full"}},defaultVariants:{orientation:"horizontal"}});var Le=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 R=react.memo(react.forwardRef(({className:t,buttonVisualClassName:o,variant:r,size:a,visualSize:s,fullWidth:p,loading:i=false,loadingText:v="Loading...",shortcut:g,children:m,isDisabled:c,paywall:l=false,paywallRedirect:L,paywallDescription:ee,onPress:te,...G},P)=>{let H=react.useId(),y=Ve(),S=Ie(),T=r??y?.variant??"default",W=a??y?.size,$=c??y?.isDisabled??false,b=y?.orientation==="vertical",A=p||b,k=S?Le({orientation:y?.orientation??"horizontal",position:S.position}):"",w=s??W??"default";return process.env.NODE_ENV!=="production"&&(w==="dot"||w==="icon")&&!G["aria-label"]&&!m&&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:P,isDisabled:$||i||void 0,"aria-disabled":l?true:void 0,"aria-describedby":l?H:void 0,onPress:F=>{if(l){L&&window.open(L,"_blank","noopener,noreferrer");return}te?.(F);},className:d(le({fullWidth:A,inVerticalGroup:b}),t),...G,children:F=>jsxRuntime.jsxs("span",{className:d(de({variant:T,visualSize:w,paywall:l,fullWidth:A}),k,o,ae,ne,q,U),"data-pressed":F.isPressed||void 0,children:[i&&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:v})]}),!i&&m,l&&jsxRuntime.jsx(lucideReact.Zap,{"data-testid":"zap-icon","aria-hidden":"true",className:"ml-1"}),l&&jsxRuntime.jsxs("span",{id:H,className:"sr-only",children:["Premium feature: ",ee||"Upgrade required to access this feature"]}),F.isFocusVisible&&g&&jsxRuntime.jsx("kbd",{className:"ml-auto hidden text-xs opacity-60 lg:inline",children:g}),F.isPressed&&jsxRuntime.jsx("span",{className:"absolute inset-0 rounded-[inherit] bg-current opacity-10 motion-safe:animate-in motion-safe:zoom-in-95","aria-hidden":"true"})]})})}));R.displayName="Button";var Ae=()=>jsxRuntime.jsxs("svg",{"data-testid":"password-toggle-icon-show",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[jsxRuntime.jsx("path",{d:"M1 8s3-5 7-5 7 5 7 5-3 5-7 5-7-5-7-5z"}),jsxRuntime.jsx("circle",{cx:"8",cy:"8",r:"2"})]}),ke=()=>jsxRuntime.jsxs("svg",{"data-testid":"password-toggle-icon-hide",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[jsxRuntime.jsx("path",{d:"M10.5 5.5l-5 5"}),jsxRuntime.jsx("path",{d:"M1 8s3-5 7-5c1.5 0 2.8.6 4 1.5M15 8s-1.5 2.5-4 4"}),jsxRuntime.jsx("path",{d:"M3 13l2-2m7-7l2-2"}),jsxRuntime.jsx("circle",{cx:"8",cy:"8",r:"2"})]});var M=classVarianceAuthority.cva("flex w-full rounded-md border bg-[var(--content-background)] shadow-xs px-3 py-2 text-sm ring-offset-[var(--content-background)] file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-[var(--content-foreground)] placeholder:text-[var(--menu-muted)] transition-all duration-200",{variants:{size:{sm:"h-9 text-xs px-2 py-1",default:"h-10 px-3 py-2",lg:"h-11 px-4 py-3 text-base"},state:{default:"border-[var(--input-border)] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--ring)] focus-visible:ring-offset-2",error:"border-[var(--destructive-background)] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--destructive-background)] focus-visible:ring-offset-2",success:"border-[var(--success-background)] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--success-ring)] focus-visible:ring-offset-2",disabled:"cursor-not-allowed opacity-50",readonly:"cursor-default bg-[var(--content-background)] opacity-70"}},defaultVariants:{size:"default",state:"default"}}),_=classVarianceAuthority.cva("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",{variants:{state:{default:"text-[var(--content-foreground)]",error:"text-[var(--destructive-foreground)]",disabled:"opacity-50 cursor-not-allowed"}},defaultVariants:{state:"default"}}),pe=classVarianceAuthority.cva("text-sm text-[var(--content-foreground)]"),Be=classVarianceAuthority.cva("text-sm text-[var(--destructive-foreground)] font-medium mt-1.5"),X=classVarianceAuthority.cva("text-sm text-[var(--success-foreground)] font-medium mt-1.5");function Re({expandOnFocus:t,collapsedWidth:o,value:r,defaultValue:a,userOnFocus:s,userOnBlur:p}){let[i,v]=react.useState(false),g=react.useCallback(l=>{t&&v(true),s?.(l);},[t,s]),m=react.useCallback(l=>{t&&l.target.value===""&&v(false),p?.(l);},[t,p]),c=react.useMemo(()=>t?i||(r!==void 0?r!=="":a!==void 0&&a!=="")?"100%":o:void 0,[t,i,r,a,o]);return {handleFocus:g,handleBlur:m,inputWidth:c}}function ze({disableCopyPaste:t}){let[o,r]=react.useState(false),[a,s]=react.useState("");react.useEffect(()=>{t&&typeof process<"u"&&process.env.NODE_ENV==="development"&&console.warn("[TextField] Copy/paste prevention should only be used for security-critical fields like password confirmation. This feature can break assistive technology workflows and password managers.");},[t]);let p=react.useCallback(i=>{t&&(i.preventDefault(),r(true),s("Pasting is not allowed in this field. Please type your entry."),setTimeout(()=>{r(false),s("");},400));},[t]);return {isShaking:o,screenReaderMessage:a,handlePaste:p}}function Me({type:t,showPasswordToggle:o}){let[r,a]=react.useState(false),s=react.useCallback(()=>{a(i=>!i);},[]),p=react.useMemo(()=>t==="password"&&o&&r?"text":t,[t,o,r]);return {showPassword:r,actualType:p,handlePasswordToggle:s}}var We=react.forwardRef(({className:t,state:o="default",children:r,...a},s)=>jsxRuntime.jsx(reactAriaComponents.Label,{ref:s,className:d(_({state:o}),t),...a,children:r}));We.displayName="TextFieldLabel";var $e=react.forwardRef(({className:t,size:o="default",state:r="default",...a},s)=>jsxRuntime.jsx(reactAriaComponents.Input,{ref:s,className:d(M({size:o,state:r}),se,t),...a}));$e.displayName="TextFieldInput";var je=react.forwardRef(({className:t,children:o,...r},a)=>jsxRuntime.jsx(reactAriaComponents.Text,{ref:a,slot:"description",className:d(pe(),t),...r,children:o}));je.displayName="TextFieldDescription";var me=react.forwardRef(({className:t,children:o,...r},a)=>jsxRuntime.jsx(reactAriaComponents.FieldError,{ref:a,...r,className:d(Be(),t),children:jsxRuntime.jsxs("span",{className:"flex items-center gap-2",role:"alert",children:[jsxRuntime.jsx(lucideReact.CircleAlert,{className:"h-4 w-4"}),o]})}));me.displayName="TextFieldError";var Ye=react.forwardRef(({className:t,children:o,...r},a)=>jsxRuntime.jsx(reactAriaComponents.Text,{ref:a,slot:"description",className:d(X(),t),...r,children:o}));Ye.displayName="TextFieldSuccess";var qe=react.forwardRef(({className:t,size:o="default",label:r,description:a,errorMessage:s,successMessage:p,type:i="text",isRequired:v=false,isReadOnly:g=false,isDisabled:m=false,isInvalid:c=false,isValid:l=false,id:L,autoComplete:ee,disableCopyPaste:te=false,pattern:G,patternDescription:P,expandOnFocus:H=false,collapsedWidth:y="200px",prefix:S,suffix:T,prefixSize:W=16,suffixSize:$=16,showPasswordToggle:b,isIconHidden:A=false,onSubmit:k,onClear:w,value:O,defaultValue:j,onFocus:F,onBlur:Ze,...B},Je)=>{let xe=react.useId(),Qe=react.useId(),et=L||Qe,{handleFocus:tt,handleBlur:ot,inputWidth:rt}=Re({expandOnFocus:H,collapsedWidth:y,value:O,defaultValue:j,userOnFocus:F,userOnBlur:Ze}),{isShaking:at,screenReaderMessage:ge,handlePaste:nt}=ze({disableCopyPaste:te}),{showPassword:oe,actualType:it,handlePasswordToggle:be}=Me({type:i,showPasswordToggle:b}),f=i==="search",[st,he]=react.useState(j??""),D=O!==void 0,h=D?O:st,lt=react.useCallback(u=>{D||he(u),B.onChange?.(u);},[D,B]),Y=react.useCallback(()=>{D||he(""),B.onChange?.(""),w?.();},[D,B,w]),dt=react.useCallback(u=>{u.key==="Enter"&&k&&k(h),u.key==="Escape"&&h&&(u.preventDefault(),Y());},[h,k,Y]),ut=react.useMemo(()=>m?"disabled":g?"readonly":c?"error":l?"success":"default",[m,g,c,l]),ct=react.useMemo(()=>m?"disabled":c?"error":"default",[m,c]),ve=react.useMemo(()=>a&&P?`${a} ${P}`:a||P,[a,P]),E=react.useMemo(()=>f&&!A&&!S?jsxRuntime.jsx(lucideReact.Search,{className:o==="sm"?"h-3.5 w-3.5":o==="lg"?"h-5 w-5":"h-4 w-4"}):S,[f,A,S,o]),Te=react.useMemo(()=>{let u={left:12,right:12};if(E){let re=typeof E=="string"?E.length*8+16:W+16;u.left=re;}if(i==="password"&&b)u.right=32;else if(f&&h)u.right=44;else if(T){let re=typeof T=="string"?T.length*8+16:$+16;u.right=re;}return u},[E,S,T,W,$,i,b,f,h]),ye=react.useMemo(()=>i==="password"&&b?jsxRuntime.jsx(R,{variant:"ghost",visualSize:"icon",onPress:be,"aria-label":oe?"Hide password":"Show password",className:"!min-h-0 !min-w-0 h-8 w-8",children:oe?jsxRuntime.jsx(ke,{}):jsxRuntime.jsx(Ae,{})}):f&&h?jsxRuntime.jsx(R,{variant:"ghost",visualSize:"icon",onPress:Y,"aria-label":"Clear search",className:"!min-h-0 !min-w-0 h-8 w-8",children:jsxRuntime.jsx(lucideReact.X,{className:o==="sm"?"h-3 w-3":o==="lg"?"h-5 w-5":"h-4 w-4"})}):T,[i,b,oe,T,be,f,h,o,Y]),Se=i==="password"&&b||f&&!!h;return jsxRuntime.jsxs(reactAriaComponents.TextField,{ref:Je,className:d("flex flex-col gap-1.5",t),isRequired:v,isReadOnly:g,isDisabled:m,isInvalid:c,value:f?h:O,defaultValue:f?void 0:j,onChange:f?lt:void 0,...B,children:[r&&jsxRuntime.jsxs(reactAriaComponents.Label,{className:d(_({state:ct})),children:[r,v&&jsxRuntime.jsx("span",{className:"ml-1 text-[var(--destructive-background)]","aria-hidden":"true",children:jsxRuntime.jsx("strong",{children:"*"})})]}),ve&&jsxRuntime.jsx(reactAriaComponents.Text,{slot:"description",className:d(pe()),children:ve}),jsxRuntime.jsxs("div",{className:"relative flex items-center motion-safe:transition-all motion-safe:duration-200",style:{width:rt},children:[E&&jsxRuntime.jsx("div",{"data-testid":"textfield-prefix",className:"absolute left-3 flex items-center justify-center pointer-events-none text-[var(--content-foreground)]","aria-hidden":"true",children:E}),jsxRuntime.jsx(reactAriaComponents.Input,{type:it,id:et,className:d(M({size:o,state:ut}),se,at&&"shake"),style:{width:"100%",paddingLeft:`${Te.left}px`,paddingRight:`${Te.right}px`},autoComplete:ee,pattern:G,onPaste:nt,onFocus:tt,onBlur:ot,onKeyDown:f?dt:void 0,"aria-required":v?"true":void 0,"aria-readonly":g?"true":void 0,"aria-errormessage":c&&s?xe:void 0}),ye&&jsxRuntime.jsx("div",{"data-testid":"textfield-suffix",className:d("absolute right-3 flex items-center justify-center text-[var(--content-foreground)]",Se?"":"pointer-events-none"),"aria-hidden":Se?void 0:"true",children:ye})]}),l&&p&&!c&&jsxRuntime.jsx(reactAriaComponents.Text,{slot:"description",className:d(X()),children:p}),c&&s&&jsxRuntime.jsx(me,{id:xe,children:s}),ge&&jsxRuntime.jsx("div",{className:"sr-only",role:"status","aria-live":"polite","aria-atomic":"true",children:ge})]})});qe.displayName="TextField";var Ue=zod.z.object({className:zod.z.string().optional(),children:zod.z.any().optional(),id:zod.z.string().optional(),"aria-label":zod.z.string().optional(),"aria-labelledby":zod.z.string().optional(),"aria-describedby":zod.z.string().optional(),"aria-live":zod.z.enum(["off","polite","assertive"]).optional(),"aria-hidden":zod.z.boolean().optional(),"data-testid":zod.z.string().optional()});var Xe=zod.z.enum(["off","on","name","honorific-prefix","given-name","additional-name","family-name","honorific-suffix","nickname","email","username","new-password","current-password","one-time-code","organization-title","organization","street-address","address-line1","address-line2","address-line3","address-level4","address-level3","address-level2","address-level1","country","country-name","postal-code","cc-name","cc-given-name","cc-additional-name","cc-family-name","cc-number","cc-exp","cc-exp-month","cc-exp-year","cc-csc","cc-type","transaction-currency","transaction-amount","language","bday","bday-day","bday-month","bday-year","sex","tel","tel-country-code","tel-national","tel-area-code","tel-local","tel-extension","impp","url","photo"]),Ct=[/\(\.\*\)\+/,/\(\.\+\)\+/,/\([^)]*\)\{.*,.*\}/,/\(\?!\)/,/\(\?<=\)/],Ke=t=>{for(let r of Ct)if(r.test(t))return false;return !((t.match(/[*+{}]/g)||[]).length>5)},It=Ue.extend({size:zod.z.enum(["sm","default","lg"]).optional().default("default"),label:zod.z.string().optional(),description:zod.z.string().optional(),errorMessage:zod.z.string().optional(),successMessage:zod.z.string().optional(),type:zod.z.enum(["text","email","password","url","search"]).optional().default("text"),isRequired:zod.z.boolean().optional(),isReadOnly:zod.z.boolean().optional(),isDisabled:zod.z.boolean().optional(),isInvalid:zod.z.boolean().optional(),isValid:zod.z.boolean().optional(),placeholder:zod.z.string().optional(),value:zod.z.string().optional(),defaultValue:zod.z.string().optional(),name:zod.z.string().optional(),autoFocus:zod.z.boolean().optional(),autoComplete:Xe.optional(),maxLength:zod.z.number().optional(),minLength:zod.z.number().optional(),pattern:zod.z.string().optional(),patternDescription:zod.z.string().optional(),disableCopyPaste:zod.z.boolean().optional().default(false),prefix:zod.z.any().optional(),suffix:zod.z.any().optional(),prefixSize:zod.z.number().optional().default(16),suffixSize:zod.z.number().optional().default(16),expandOnFocus:zod.z.boolean().optional().default(false),collapsedWidth:zod.z.string().optional().default("200px"),showPasswordToggle:zod.z.boolean().optional(),isIconHidden:zod.z.boolean().optional().default(false),onSubmit:zod.z.custom().optional(),onClear:zod.z.custom().optional()}).refine(t=>!t.pattern||t.patternDescription,{message:"patternDescription is required when pattern is provided",path:["patternDescription"]}).refine(t=>!t.pattern||Ke(t.pattern),{message:"Unsafe regex pattern detected. Pattern may cause ReDoS vulnerability. Avoid patterns like (.*)+, (.+)+, or excessive quantifiers.",path:["pattern"]}).refine(t=>!(t.successMessage&&t.errorMessage),{message:"Cannot provide both successMessage and errorMessage. Use one based on validation state.",path:["successMessage"]}).refine(t=>(typeof process<"u"&&process.env.NODE_ENV==="development"&&t.isValid&&t.isInvalid&&console.error("[TextField] Both isValid and isInvalid are true. isInvalid takes precedence."),true)),Lt=zod.z.object({children:zod.z.any().optional(),className:zod.z.string().optional(),htmlFor:zod.z.string().optional(),state:zod.z.enum(["default","error","disabled"]).optional().default("default")}),At=zod.z.object({className:zod.z.string().optional(),size:zod.z.enum(["sm","default","lg"]).optional().default("default"),state:zod.z.enum(["default","error","success","disabled","readonly"]).optional().default("default")}),kt=zod.z.object({children:zod.z.any().optional(),className:zod.z.string().optional()}),Ot=zod.z.object({children:zod.z.any().optional(),className:zod.z.string().optional()}),Bt=zod.z.object({children:zod.z.any().optional(),className:zod.z.string().optional()});exports.AutoCompleteValueSchema=Xe;exports.TextField=qe;exports.TextFieldDescription=je;exports.TextFieldDescriptionPropsSchema=kt;exports.TextFieldError=me;exports.TextFieldErrorPropsSchema=Ot;exports.TextFieldInput=$e;exports.TextFieldInputPropsSchema=At;exports.TextFieldLabel=We;exports.TextFieldLabelPropsSchema=Lt;exports.TextFieldPropsSchema=It;exports.TextFieldSuccess=Ye;exports.TextFieldSuccessPropsSchema=Bt;exports.inputVariants=M;exports.labelVariants=_;exports.successMessageVariants=X;exports.textFieldInputVariants=M;exports.textFieldLabelVariants=_;exports.validatePatternSafety=Ke;//# sourceMappingURL=index.js.map
|
|
2
|
+
'use strict';var react=require('react'),reactAriaComponents=require('react-aria-components'),clsx=require('clsx'),tailwindMerge=require('tailwind-merge'),lucideReact=require('lucide-react'),classVarianceAuthority=require('class-variance-authority'),jsxRuntime=require('react/jsx-runtime'),zod=require('zod');function l(...t){return tailwindMerge.twMerge(clsx.clsx(t))}var ne="data-[pressed]:scale-[0.97]";var ae="data-[hovered]:shadow-md";var Y="hc:data-[hovered]:outline hc:data-[hovered]:outline-2 hc:data-[hovered]:outline-foreground",q="hc:data-[pressed]:outline hc:data-[pressed]:outline-2 hc:data-[pressed]:outline-offset-1 hc:data-[pressed]:outline-foreground",ie="disabled:pointer-events-none disabled:opacity-50";var le=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}}),de=classVarianceAuthority.cva("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors [&_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)] data-[pressed]:bg-[var(--primary-action)]/80",destructive:"bg-[var(--destructive-background)] text-[var(--destructive-foreground)] shadow-md hover:bg-[var(--destructive-background)]/90 data-[pressed]:bg-[var(--destructive-background)]/80",outline:"border border-[var(--input-border)] bg-[var(--page-background)] hover:bg-[var(--input-border)] data-[pressed]:bg-[var(--input-border)]",secondary:"bg-[var(--secondary)] text-[var(--secondary-foreground)] shadow-md hover:bg-[var(--secondary)]/80 data-[pressed]:bg-[var(--secondary)]/70",ghost:"hover:bg-[var(--accent)] hover:text-[var(--accent-foreground)] data-[pressed]:bg-[var(--accent)]",link:"text-[var(--text-link)] underline-offset-4 hover:underline data-[pressed]: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-8",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)] !shadow-md hover:!bg-[var(--paywall)]/90 !cursor-not-allowed !border-transparent",false:""}},defaultVariants:{variant:"default",visualSize:"default",paywall:false}});var Ne=react.createContext(null);Ne.displayName="ButtonGroupContext";function Ve(){return react.useContext(Ne)}var Ce=react.createContext(null);Ce.displayName="ButtonGroupItemContext";function Ie(){return react.useContext(Ce)}classVarianceAuthority.cva("inline-flex items-center gap-0",{variants:{orientation:{horizontal:"flex-row",vertical:"flex-col w-full"}},defaultVariants:{orientation:"horizontal"}});var Le=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 D=react.memo(react.forwardRef(({className:t,buttonVisualClassName:o,variant:r,size:n,visualSize:i,fullWidth:c,loading:u=false,loadingText:p="Loading...",shortcut:T,children:x,isDisabled:g,paywall:s=false,paywallRedirect:S,paywallDescription:J,onPress:Q,...G},ee)=>{let F=react.useId(),P=Ve(),H=Ie(),E=r??P?.variant??"default",y=n??P?.size,W=g??P?.isDisabled??false,A=P?.orientation==="vertical",b=c||A,$=H?Le({orientation:P?.orientation??"horizontal",position:H.position}):"",w=i??y??"default";return process.env.NODE_ENV!=="production"&&(w==="dot"||w==="icon")&&!G["aria-label"]&&!x&&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:ee,isDisabled:W||u||void 0,"aria-disabled":s?true:void 0,"aria-describedby":s?F:void 0,onPress:h=>{if(s){S&&window.open(S,"_blank","noopener,noreferrer");return}Q?.(h);},className:l(le({fullWidth:b,inVerticalGroup:A}),t),...G,children:h=>jsxRuntime.jsxs("span",{className:l(de({variant:E,visualSize:w,paywall:s,fullWidth:b}),$,o,ne,ae,Y,q),"data-pressed":h.isPressed||void 0,children:[u&&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:p})]}),!u&&x,s&&jsxRuntime.jsx(lucideReact.Zap,{"data-testid":"zap-icon","aria-hidden":"true",className:"ml-1"}),s&&jsxRuntime.jsxs("span",{id:F,className:"sr-only",children:["Premium feature: ",J||"Upgrade required to access this feature"]}),h.isFocusVisible&&T&&jsxRuntime.jsx("kbd",{className:"ml-auto hidden text-xs opacity-60 lg:inline",children:T}),h.isPressed&&jsxRuntime.jsx("span",{className:"absolute inset-0 rounded-[inherit] bg-current opacity-10 motion-safe:animate-in motion-safe:zoom-in-95","aria-hidden":"true"})]})})}));D.displayName="Button";var Ae=()=>jsxRuntime.jsxs("svg",{"data-testid":"password-toggle-icon-show",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[jsxRuntime.jsx("path",{d:"M1 8s3-5 7-5 7 5 7 5-3 5-7 5-7-5-7-5z"}),jsxRuntime.jsx("circle",{cx:"8",cy:"8",r:"2"})]}),ke=()=>jsxRuntime.jsxs("svg",{"data-testid":"password-toggle-icon-hide",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[jsxRuntime.jsx("path",{d:"M10.5 5.5l-5 5"}),jsxRuntime.jsx("path",{d:"M1 8s3-5 7-5c1.5 0 2.8.6 4 1.5M15 8s-1.5 2.5-4 4"}),jsxRuntime.jsx("path",{d:"M3 13l2-2m7-7l2-2"}),jsxRuntime.jsx("circle",{cx:"8",cy:"8",r:"2"})]});var z=classVarianceAuthority.cva("flex w-full rounded-md border bg-[var(--content-background)] shadow-xs px-3 py-2 text-sm ring-offset-[var(--content-background)] file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-[var(--content-foreground)] placeholder:text-[var(--menu-muted)] transition-all duration-200",{variants:{size:{sm:"h-9 text-xs px-2 py-1",default:"h-10 px-3 py-2",lg:"h-11 px-4 py-3 text-base"},state:{default:"border-[var(--input-border)] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--ring)] focus-visible:ring-offset-2",error:"border-[var(--destructive-background)] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--destructive-background)] focus-visible:ring-offset-2",success:"border-[var(--success-background)] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--success-ring)] focus-visible:ring-offset-2",disabled:"cursor-not-allowed opacity-50",readonly:"cursor-default bg-[var(--content-background)] opacity-70"}},defaultVariants:{size:"default",state:"default"}}),M=classVarianceAuthority.cva("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",{variants:{state:{default:"text-[var(--content-foreground)]",error:"text-[var(--destructive-foreground)]",disabled:"opacity-50 cursor-not-allowed"}},defaultVariants:{state:"default"}}),pe=classVarianceAuthority.cva("text-sm text-[var(--content-foreground)]"),Be=classVarianceAuthority.cva("text-sm text-[var(--destructive-foreground)] font-medium mt-1.5"),U=classVarianceAuthority.cva("text-sm text-[var(--success-foreground)] font-medium mt-1.5");function Re({expandOnFocus:t,collapsedWidth:o,value:r,defaultValue:n,userOnFocus:i,userOnBlur:c}){let[u,p]=react.useState(false),T=react.useCallback(s=>{t&&p(true),i?.(s);},[t,i]),x=react.useCallback(s=>{t&&s.target.value===""&&p(false),c?.(s);},[t,c]),g=react.useMemo(()=>t?u||(r!==void 0?r!=="":n!==void 0&&n!=="")?"100%":o:void 0,[t,u,r,n,o]);return {handleFocus:T,handleBlur:x,inputWidth:g}}function ze({disableCopyPaste:t}){let[o,r]=react.useState(false),[n,i]=react.useState("");react.useEffect(()=>{t&&typeof process<"u"&&process.env.NODE_ENV==="development"&&console.warn("[TextField] Copy/paste prevention should only be used for security-critical fields like password confirmation. This feature can break assistive technology workflows and password managers.");},[t]);let c=react.useCallback(u=>{t&&(u.preventDefault(),r(true),i("Pasting is not allowed in this field. Please type your entry."),setTimeout(()=>{r(false),i("");},400));},[t]);return {isShaking:o,screenReaderMessage:n,handlePaste:c}}function Me({type:t,showPasswordToggle:o}){let[r,n]=react.useState(false),i=react.useCallback(()=>{n(u=>!u);},[]),c=react.useMemo(()=>t==="password"&&o&&r?"text":t,[t,o,r]);return {showPassword:r,actualType:c,handlePasswordToggle:i}}var We=react.forwardRef(({className:t,state:o="default",children:r,...n},i)=>jsxRuntime.jsx(reactAriaComponents.Label,{ref:i,className:l(M({state:o}),t),...n,children:r}));We.displayName="TextFieldLabel";var $e=react.forwardRef(({className:t,size:o="default",state:r="default",...n},i)=>jsxRuntime.jsx(reactAriaComponents.Input,{ref:i,className:l(z({size:o,state:r}),ie,t),...n}));$e.displayName="TextFieldInput";var je=react.forwardRef(({className:t,children:o,...r},n)=>jsxRuntime.jsx(reactAriaComponents.Text,{ref:n,slot:"description",className:l(pe(),t),...r,children:o}));je.displayName="TextFieldDescription";var me=react.forwardRef(({className:t,children:o,...r},n)=>jsxRuntime.jsx(reactAriaComponents.FieldError,{ref:n,...r,className:l(Be(),t),children:jsxRuntime.jsxs("span",{className:"flex items-center gap-2",role:"alert",children:[jsxRuntime.jsx(lucideReact.CircleAlert,{className:"h-4 w-4"}),o]})}));me.displayName="TextFieldError";var Ye=react.forwardRef(({className:t,children:o,...r},n)=>jsxRuntime.jsx(reactAriaComponents.Text,{ref:n,slot:"description",className:l(U(),t),...r,children:o}));Ye.displayName="TextFieldSuccess";var qe=react.forwardRef(({className:t,size:o="default",label:r,labelHint:n,description:i,errorMessage:c,successMessage:u,type:p="text",isRequired:T=false,isReadOnly:x=false,isDisabled:g=false,isInvalid:s=false,isValid:S=false,id:J,autoComplete:Q,disableCopyPaste:G=false,pattern:ee,patternDescription:F,expandOnFocus:P=false,collapsedWidth:H="200px",prefix:E,suffix:y,prefixSize:W=16,suffixSize:A=16,showPasswordToggle:b,isIconHidden:$=false,onSubmit:w,onClear:te,value:k,defaultValue:h,onFocus:Ze,onBlur:Je,...O},Qe)=>{let xe=react.useId(),et=react.useId(),tt=J||et,{handleFocus:ot,handleBlur:rt,inputWidth:nt}=Re({expandOnFocus:P,collapsedWidth:H,value:k,defaultValue:h,userOnFocus:Ze,userOnBlur:Je}),{isShaking:at,screenReaderMessage:ge,handlePaste:st}=ze({disableCopyPaste:G}),{showPassword:oe,actualType:it,handlePasswordToggle:be}=Me({type:p,showPasswordToggle:b}),f=p==="search",[lt,he]=react.useState(h??""),B=k!==void 0,v=B?k:lt,dt=react.useCallback(d=>{B||he(d),O.onChange?.(d);},[B,O]),j=react.useCallback(()=>{B||he(""),O.onChange?.(""),te?.();},[B,O,te]),ut=react.useCallback(d=>{d.key==="Enter"&&w&&w(v),d.key==="Escape"&&v&&(d.preventDefault(),j());},[v,w,j]),ct=react.useMemo(()=>g?"disabled":x?"readonly":s?"error":S?"success":"default",[g,x,s,S]),pt=react.useMemo(()=>g?"disabled":s?"error":"default",[g,s]),ve=react.useMemo(()=>i&&F?`${i} ${F}`:i||F,[i,F]),N=react.useMemo(()=>f&&!$&&!E?jsxRuntime.jsx(lucideReact.Search,{className:o==="sm"?"h-3.5 w-3.5":o==="lg"?"h-5 w-5":"h-4 w-4"}):E,[f,$,E,o]),Te=react.useMemo(()=>{let d={left:12,right:12};if(N){let re=typeof N=="string"?N.length*8+16:W+16;d.left=re;}if(p==="password"&&b)d.right=32;else if(f&&v)d.right=44;else if(y){let re=typeof y=="string"?y.length*8+16:A+16;d.right=re;}return d},[N,E,y,W,A,p,b,f,v]),ye=react.useMemo(()=>p==="password"&&b?jsxRuntime.jsx(D,{variant:"ghost",visualSize:"icon",onPress:be,"aria-label":oe?"Hide password":"Show password",className:"!min-h-0 !min-w-0 h-8 w-8",children:oe?jsxRuntime.jsx(ke,{}):jsxRuntime.jsx(Ae,{})}):f&&v?jsxRuntime.jsx(D,{variant:"ghost",visualSize:"icon",onPress:j,"aria-label":"Clear search",className:"!min-h-0 !min-w-0 h-8 w-8",children:jsxRuntime.jsx(lucideReact.X,{className:o==="sm"?"h-3 w-3":o==="lg"?"h-5 w-5":"h-4 w-4"})}):y,[p,b,oe,y,be,f,v,o,j]),Se=p==="password"&&b||f&&!!v;return jsxRuntime.jsxs(reactAriaComponents.TextField,{ref:Qe,className:l("flex flex-col gap-1.5",t),isRequired:T,isReadOnly:x,isDisabled:g,isInvalid:s,value:f?v:k,defaultValue:f?void 0:h,onChange:f?dt:void 0,...O,children:[r&&jsxRuntime.jsxs(reactAriaComponents.Label,{className:l(M({state:pt}),n&&"flex items-baseline justify-between"),children:[jsxRuntime.jsxs("span",{children:[r,T&&jsxRuntime.jsx("span",{className:"ml-1 text-[var(--destructive-background)]","aria-hidden":"true",children:jsxRuntime.jsx("strong",{children:"*"})})]}),n&&jsxRuntime.jsx("span",{className:"text-xs font-normal text-[var(--muted-foreground)]",children:n})]}),ve&&jsxRuntime.jsx(reactAriaComponents.Text,{slot:"description",className:l(pe()),children:ve}),jsxRuntime.jsxs("div",{className:"relative flex items-center motion-safe:transition-all motion-safe:duration-200",style:{width:nt},children:[N&&jsxRuntime.jsx("div",{"data-testid":"textfield-prefix",className:"absolute left-3 flex items-center justify-center pointer-events-none text-[var(--content-foreground)]","aria-hidden":"true",children:N}),jsxRuntime.jsx(reactAriaComponents.Input,{type:it,id:tt,className:l(z({size:o,state:ct}),ie,at&&"shake"),style:{width:"100%",paddingLeft:`${Te.left}px`,paddingRight:`${Te.right}px`},autoComplete:Q,pattern:ee,onPaste:st,onFocus:ot,onBlur:rt,onKeyDown:f?ut:void 0,"aria-required":T?"true":void 0,"aria-readonly":x?"true":void 0,"aria-errormessage":s&&c?xe:void 0}),ye&&jsxRuntime.jsx("div",{"data-testid":"textfield-suffix",className:l("absolute right-3 flex items-center justify-center text-[var(--content-foreground)]",Se?"":"pointer-events-none"),"aria-hidden":Se?void 0:"true",children:ye})]}),S&&u&&!s&&jsxRuntime.jsx(reactAriaComponents.Text,{slot:"description",className:l(U()),children:u}),s&&c&&jsxRuntime.jsx(me,{id:xe,children:c}),ge&&jsxRuntime.jsx("div",{className:"sr-only",role:"status","aria-live":"polite","aria-atomic":"true",children:ge})]})});qe.displayName="TextField";var Ue=zod.z.object({className:zod.z.string().optional(),children:zod.z.any().optional(),id:zod.z.string().optional(),"aria-label":zod.z.string().optional(),"aria-labelledby":zod.z.string().optional(),"aria-describedby":zod.z.string().optional(),"aria-live":zod.z.enum(["off","polite","assertive"]).optional(),"aria-hidden":zod.z.boolean().optional(),"data-testid":zod.z.string().optional()});var Xe=zod.z.enum(["off","on","name","honorific-prefix","given-name","additional-name","family-name","honorific-suffix","nickname","email","username","new-password","current-password","one-time-code","organization-title","organization","street-address","address-line1","address-line2","address-line3","address-level4","address-level3","address-level2","address-level1","country","country-name","postal-code","cc-name","cc-given-name","cc-additional-name","cc-family-name","cc-number","cc-exp","cc-exp-month","cc-exp-year","cc-csc","cc-type","transaction-currency","transaction-amount","language","bday","bday-day","bday-month","bday-year","sex","tel","tel-country-code","tel-national","tel-area-code","tel-local","tel-extension","impp","url","photo"]),It=[/\(\.\*\)\+/,/\(\.\+\)\+/,/\([^)]*\)\{.*,.*\}/,/\(\?!\)/,/\(\?<=\)/],Ke=t=>{for(let r of It)if(r.test(t))return false;return !((t.match(/[*+{}]/g)||[]).length>5)},Lt=Ue.extend({size:zod.z.enum(["sm","default","lg"]).optional().default("default"),label:zod.z.string().optional(),labelHint:zod.z.string().optional(),description:zod.z.string().optional(),errorMessage:zod.z.string().optional(),successMessage:zod.z.string().optional(),type:zod.z.enum(["text","email","password","url","search"]).optional().default("text"),isRequired:zod.z.boolean().optional(),isReadOnly:zod.z.boolean().optional(),isDisabled:zod.z.boolean().optional(),isInvalid:zod.z.boolean().optional(),isValid:zod.z.boolean().optional(),placeholder:zod.z.string().optional(),value:zod.z.string().optional(),defaultValue:zod.z.string().optional(),name:zod.z.string().optional(),autoFocus:zod.z.boolean().optional(),autoComplete:Xe.optional(),maxLength:zod.z.number().optional(),minLength:zod.z.number().optional(),pattern:zod.z.string().optional(),patternDescription:zod.z.string().optional(),disableCopyPaste:zod.z.boolean().optional().default(false),prefix:zod.z.any().optional(),suffix:zod.z.any().optional(),prefixSize:zod.z.number().optional().default(16),suffixSize:zod.z.number().optional().default(16),expandOnFocus:zod.z.boolean().optional().default(false),collapsedWidth:zod.z.string().optional().default("200px"),showPasswordToggle:zod.z.boolean().optional(),isIconHidden:zod.z.boolean().optional().default(false),onSubmit:zod.z.custom().optional(),onClear:zod.z.custom().optional()}).refine(t=>!t.pattern||t.patternDescription,{message:"patternDescription is required when pattern is provided",path:["patternDescription"]}).refine(t=>!t.pattern||Ke(t.pattern),{message:"Unsafe regex pattern detected. Pattern may cause ReDoS vulnerability. Avoid patterns like (.*)+, (.+)+, or excessive quantifiers.",path:["pattern"]}).refine(t=>!(t.successMessage&&t.errorMessage),{message:"Cannot provide both successMessage and errorMessage. Use one based on validation state.",path:["successMessage"]}).refine(t=>(typeof process<"u"&&process.env.NODE_ENV==="development"&&t.isValid&&t.isInvalid&&console.error("[TextField] Both isValid and isInvalid are true. isInvalid takes precedence."),true)),At=zod.z.object({children:zod.z.any().optional(),className:zod.z.string().optional(),htmlFor:zod.z.string().optional(),state:zod.z.enum(["default","error","disabled"]).optional().default("default")}),kt=zod.z.object({className:zod.z.string().optional(),size:zod.z.enum(["sm","default","lg"]).optional().default("default"),state:zod.z.enum(["default","error","success","disabled","readonly"]).optional().default("default")}),Ot=zod.z.object({children:zod.z.any().optional(),className:zod.z.string().optional()}),Bt=zod.z.object({children:zod.z.any().optional(),className:zod.z.string().optional()}),Dt=zod.z.object({children:zod.z.any().optional(),className:zod.z.string().optional()});exports.AutoCompleteValueSchema=Xe;exports.TextField=qe;exports.TextFieldDescription=je;exports.TextFieldDescriptionPropsSchema=Ot;exports.TextFieldError=me;exports.TextFieldErrorPropsSchema=Bt;exports.TextFieldInput=$e;exports.TextFieldInputPropsSchema=kt;exports.TextFieldLabel=We;exports.TextFieldLabelPropsSchema=At;exports.TextFieldPropsSchema=Lt;exports.TextFieldSuccess=Ye;exports.TextFieldSuccessPropsSchema=Dt;exports.inputVariants=z;exports.labelVariants=M;exports.successMessageVariants=U;exports.textFieldInputVariants=z;exports.textFieldLabelVariants=M;exports.validatePatternSafety=Ke;//# sourceMappingURL=index.js.map
|
|
3
3
|
//# sourceMappingURL=index.js.map
|