@tribepad/themis 1.9.3 → 1.9.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (133) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/dist/elements/AlertDialog/index.js +1 -1
  3. package/dist/elements/AlertDialog/index.js.map +1 -1
  4. package/dist/elements/AlertDialog/index.mjs +1 -1
  5. package/dist/elements/AlertDialog/index.mjs.map +1 -1
  6. package/dist/elements/Breadcrumbs/index.js +1 -1
  7. package/dist/elements/Breadcrumbs/index.js.map +1 -1
  8. package/dist/elements/Breadcrumbs/index.mjs +1 -1
  9. package/dist/elements/Breadcrumbs/index.mjs.map +1 -1
  10. package/dist/elements/Button/index.js +1 -1
  11. package/dist/elements/Button/index.js.map +1 -1
  12. package/dist/elements/Button/index.mjs +1 -1
  13. package/dist/elements/Button/index.mjs.map +1 -1
  14. package/dist/elements/Card/index.js +1 -1
  15. package/dist/elements/Card/index.js.map +1 -1
  16. package/dist/elements/Card/index.mjs +1 -1
  17. package/dist/elements/Card/index.mjs.map +1 -1
  18. package/dist/elements/Carousel/Carousel.d.ts +8 -1
  19. package/dist/elements/Carousel/Carousel.d.ts.map +1 -1
  20. package/dist/elements/Carousel/LazyCarousel.d.ts +1 -1
  21. package/dist/elements/Carousel/LazyCarousel.d.ts.map +1 -1
  22. package/dist/elements/Carousel/index.js +1 -1
  23. package/dist/elements/Carousel/index.js.map +1 -1
  24. package/dist/elements/Carousel/index.mjs +1 -1
  25. package/dist/elements/Carousel/index.mjs.map +1 -1
  26. package/dist/elements/ChatInterface/ChatLiveRegions.d.ts +2 -2
  27. package/dist/elements/ChatInterface/ChatLiveRegions.d.ts.map +1 -1
  28. package/dist/elements/ChatInterface/ChatMessageBubble.d.ts +1 -1
  29. package/dist/elements/ChatInterface/ChatMessageBubble.d.ts.map +1 -1
  30. package/dist/elements/ChatInterface/ChatThinkingDisplay.d.ts +2 -2
  31. package/dist/elements/ChatInterface/ChatThinkingDisplay.d.ts.map +1 -1
  32. package/dist/elements/ChatInterface/ChatTypingIndicator.d.ts +2 -2
  33. package/dist/elements/ChatInterface/ChatTypingIndicator.d.ts.map +1 -1
  34. package/dist/elements/ChatInterface/index.js +1 -1
  35. package/dist/elements/ChatInterface/index.js.map +1 -1
  36. package/dist/elements/ChatInterface/index.mjs +1 -1
  37. package/dist/elements/ChatInterface/index.mjs.map +1 -1
  38. package/dist/elements/FeatureIcon/FeatureIcon.d.ts +3 -0
  39. package/dist/elements/FeatureIcon/FeatureIcon.d.ts.map +1 -0
  40. package/dist/elements/FeatureIcon/FeatureIcon.styles.d.ts +17 -0
  41. package/dist/elements/FeatureIcon/FeatureIcon.styles.d.ts.map +1 -0
  42. package/dist/elements/FeatureIcon/FeatureIcon.types.d.ts +137 -0
  43. package/dist/elements/FeatureIcon/FeatureIcon.types.d.ts.map +1 -0
  44. package/dist/elements/FeatureIcon/index.d.ts +25 -0
  45. package/dist/elements/FeatureIcon/index.d.ts.map +1 -0
  46. package/dist/elements/FeatureIcon/index.js +3 -0
  47. package/dist/elements/FeatureIcon/index.js.map +1 -0
  48. package/dist/elements/FeatureIcon/index.mjs +3 -0
  49. package/dist/elements/FeatureIcon/index.mjs.map +1 -0
  50. package/dist/elements/FileField/index.js +1 -1
  51. package/dist/elements/FileField/index.js.map +1 -1
  52. package/dist/elements/FileField/index.mjs +1 -1
  53. package/dist/elements/FileField/index.mjs.map +1 -1
  54. package/dist/elements/Filters/index.js +1 -1
  55. package/dist/elements/Filters/index.js.map +1 -1
  56. package/dist/elements/Filters/index.mjs +1 -1
  57. package/dist/elements/Filters/index.mjs.map +1 -1
  58. package/dist/elements/Modal/Modal.styles.d.ts +2 -2
  59. package/dist/elements/Modal/Modal.types.d.ts +2 -2
  60. package/dist/elements/NumberField/index.js +1 -1
  61. package/dist/elements/NumberField/index.js.map +1 -1
  62. package/dist/elements/NumberField/index.mjs +1 -1
  63. package/dist/elements/NumberField/index.mjs.map +1 -1
  64. package/dist/elements/PageTitle/index.js +1 -1
  65. package/dist/elements/PageTitle/index.js.map +1 -1
  66. package/dist/elements/PageTitle/index.mjs +1 -1
  67. package/dist/elements/PageTitle/index.mjs.map +1 -1
  68. package/dist/elements/Pagination/index.js +1 -1
  69. package/dist/elements/Pagination/index.js.map +1 -1
  70. package/dist/elements/Pagination/index.mjs +1 -1
  71. package/dist/elements/Pagination/index.mjs.map +1 -1
  72. package/dist/elements/Panel/Panel.d.ts +1 -1
  73. package/dist/elements/Panel/Panel.types.d.ts +2 -2
  74. package/dist/elements/PasswordField/index.js +1 -1
  75. package/dist/elements/PasswordField/index.js.map +1 -1
  76. package/dist/elements/PasswordField/index.mjs +1 -1
  77. package/dist/elements/PasswordField/index.mjs.map +1 -1
  78. package/dist/elements/RatingScale/RatingScale.d.ts.map +1 -1
  79. package/dist/elements/RatingScale/index.js +1 -1
  80. package/dist/elements/RatingScale/index.js.map +1 -1
  81. package/dist/elements/RatingScale/index.mjs +1 -1
  82. package/dist/elements/RatingScale/index.mjs.map +1 -1
  83. package/dist/elements/Resizable/index.js +1 -1
  84. package/dist/elements/Resizable/index.js.map +1 -1
  85. package/dist/elements/Resizable/index.mjs +1 -1
  86. package/dist/elements/Resizable/index.mjs.map +1 -1
  87. package/dist/elements/SearchField/index.js +1 -1
  88. package/dist/elements/SearchField/index.js.map +1 -1
  89. package/dist/elements/SearchField/index.mjs +1 -1
  90. package/dist/elements/SearchField/index.mjs.map +1 -1
  91. package/dist/elements/Select/Select.d.ts +3 -3
  92. package/dist/elements/Select/Select.d.ts.map +1 -1
  93. package/dist/elements/Sidebar/Sidebar.styles.d.ts +1 -1
  94. package/dist/elements/Sidebar/Sidebar.styles.d.ts.map +1 -1
  95. package/dist/elements/Sidebar/Sidebar.types.d.ts +2 -2
  96. package/dist/elements/Sidebar/SidebarRail.d.ts.map +1 -1
  97. package/dist/elements/Sidebar/index.js +1 -1
  98. package/dist/elements/Sidebar/index.js.map +1 -1
  99. package/dist/elements/Sidebar/index.mjs +1 -1
  100. package/dist/elements/Sidebar/index.mjs.map +1 -1
  101. package/dist/elements/Table/index.js +1 -1
  102. package/dist/elements/Table/index.js.map +1 -1
  103. package/dist/elements/Table/index.mjs +1 -1
  104. package/dist/elements/Table/index.mjs.map +1 -1
  105. package/dist/elements/TextField/index.js +1 -1
  106. package/dist/elements/TextField/index.js.map +1 -1
  107. package/dist/elements/TextField/index.mjs +1 -1
  108. package/dist/elements/TextField/index.mjs.map +1 -1
  109. package/dist/elements/Timeline/index.js +1 -1
  110. package/dist/elements/Timeline/index.js.map +1 -1
  111. package/dist/elements/Timeline/index.mjs +1 -1
  112. package/dist/elements/Timeline/index.mjs.map +1 -1
  113. package/dist/elements/Toast/index.js +1 -1
  114. package/dist/elements/Toast/index.js.map +1 -1
  115. package/dist/elements/Toast/index.mjs +1 -1
  116. package/dist/elements/Toast/index.mjs.map +1 -1
  117. package/dist/elements/Wizard/index.js +1 -1
  118. package/dist/elements/Wizard/index.js.map +1 -1
  119. package/dist/elements/Wizard/index.mjs +1 -1
  120. package/dist/elements/Wizard/index.mjs.map +1 -1
  121. package/dist/elements/index.d.ts +2 -0
  122. package/dist/elements/index.d.ts.map +1 -1
  123. package/dist/elements/index.js +1 -1
  124. package/dist/elements/index.js.map +1 -1
  125. package/dist/elements/index.mjs +1 -1
  126. package/dist/elements/index.mjs.map +1 -1
  127. package/dist/index.js +2 -2
  128. package/dist/index.js.map +1 -1
  129. package/dist/index.mjs +2 -2
  130. package/dist/index.mjs.map +1 -1
  131. package/dist/styles/animations.css +15 -0
  132. package/package.json +16 -14
  133. package/src/elements/FeatureIcon/FeatureIcon.stories.tsx +164 -0
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/utils/cn.ts","../../../src/elements/Wizard/WizardContext.tsx","../../../src/styles/shared-variants.ts","../../../src/elements/Wizard/Wizard.styles.ts","../../../src/elements/Wizard/WizardLayout.tsx","../../../src/elements/Button/Button.styles.ts","../../../src/styles/interaction-states.ts","../../../src/elements/ButtonGroup/ButtonGroupContext.tsx","../../../src/elements/ButtonGroup/ButtonGroup.variants.ts","../../../src/elements/Button/Button.tsx","../../../src/elements/Wizard/WizardStepper.tsx","../../../src/elements/Wizard/WizardContent.tsx","../../../src/elements/Wizard/WizardStep.tsx","../../../src/elements/Wizard/WizardNavigation.tsx","../../../src/elements/Wizard/WizardMobileProgress.tsx","../../../src/elements/Wizard/Wizard.tsx","../../../src/schemas/BaseComponentProps.ts","../../../src/elements/Wizard/Wizard.types.ts"],"names":["cn","inputs","twMerge","clsx","WizardContext","createContext","useWizardContext","ctx","useContext","REDUCED_MOTION","TRANSITION_COLORS","combineStyles","styles","s","wizardRootVariants","cva","wizardLayoutVariants","wizardLayoutMainVariants","wizardLayoutStepperSlotVariants","wizardLayoutContentSlotVariants","wizardLayoutHelpTextVariants","wizardLayoutPreviewVariants","wizardStepperContainerVariants","wizardStepperSectionLabelVariants","wizardStepperSectionHeadingVariants","wizardStepperListVariants","wizardStepperItemVariants","wizardStepperIndicatorColumnVariants","wizardStepperCircleVariants","wizardStepperConnectorVariants","wizardStepperLabelColumnVariants","wizardStepperLabelVariants","wizardStepperLabelTextVariants","wizardStepperCurrentSubtitleVariants","wizardStepContainerVariants","wizardStepHeaderRowVariants","wizardStepIconVariants","wizardStepHeadingVariants","wizardStepDescriptionVariants","wizardContentCardVariants","wizardNavigationVariants","wizardNavigationLeftVariants","wizardNavigationRightVariants","wizardMobileProgressContainerVariants","wizardMobileProgressDotRowVariants","wizardMobileProgressDotVariants","wizardMobileProgressCaptionVariants","wizardMobileProgressCaptionTitleVariants","wizardLiveRegionVariants","WizardLayout","forwardRef","children","stepper","preview","helpText","className","testId","ref","jsxs","jsx","buttonOuterVariants","buttonVisualVariants","PRESSED_STYLES","HIGH_CONTRAST_HOVER","HIGH_CONTRAST_PRESSED","ButtonGroupContext","useButtonGroupContext","ButtonGroupItemContext","useButtonGroupItemContext","buttonGroupItemVariants","Button","memo","buttonVisualClassName","variant","size","visualSize","fullWidth","loading","loadingText","shortcut","isDisabled","paywall","paywallRedirect","paywallDescription","onPress","props","paywallDescriptionId","useId","groupContext","itemContext","effectiveVariant","effectiveSize","effectiveIsDisabled","isInVerticalGroup","effectiveFullWidth","positionClassName","effectiveVisualSize","AriaButton","e","renderProps","Fragment","Loader2","Zap","WizardStepper","sectionLabel","sectionNumber","totalSections","allowClickOnCompleted","ariaLabel","currentStepIndex","steps","onStepChange","isLoading","step","index","isCompleted","isCurrent","stateKey","isClickable","isLast","circleClass","circle","Check","Activity","ReactActivity","mode","isWizardStepElement","child","isValidElement","type","WizardContent","preserveState","currentStepId","stepChildren","Children","childIds","c","descriptorIds","missing","id","extra","active","WizardStep","stepId","icon","registerStepHeading","stepHeadingLevel","descriptor","label","description","headingId","descriptionId","effectiveTestId","Heading","DEFAULT_LABELS","resolveLabel","WizardNavigation","labels","showSkip","onBack","onNext","onSkip","totalSteps","resolved","isFirstStep","isLastStep","isLastContentStep","showBack","showNext","showSkipResolved","nextLabel","handleBack","target","handleNext","handleSkip","ArrowLeft","ArrowRight","WizardMobileProgress","currentLabel","valueText","state","defaultAnnounceTemplate","total","WizardRoot","currentStep","errors","announceTemplate","ariaLabelledBy","clampedIndex","current","currentStepLabel","politeMessage","setPoliteMessage","useState","useEffect","assertiveMessage","setAssertiveMessage","headingRef","useRef","skipFocusOnMountRef","useCallback","node","contextValue","useMemo","Wizard","BaseComponentPropsSchema","z","WizardChangeReasonSchema","WizardStepDescriptorSchema","WizardHeadingLevelSchema","WizardPropsSchema","WizardLayoutPropsSchema","WizardStepperPropsSchema","WizardStepPropsSchema","WizardContentPropsSchema","WizardNavigationPropsSchema","WizardMobileProgressPropsSchema"],"mappings":"6aAcO,SAASA,CAAAA,CAAAA,GAAMC,EAA8B,CAClD,OAAOC,QAAQC,IAAAA,CAAKF,CAAM,CAAC,CAC7B,CCSO,IAAMG,EAAAA,CAAgBC,aAAAA,CAAyC,IAAI,CAAA,CAEnE,SAASC,CAAAA,EAAuC,CACrD,IAAMC,CAAAA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AA,CA8BYS,GAA8BV,CAAAA,CAAyB,MAAA,CAAO,CACzE,MAAA,CAAQC,CAAAA,CAAE,QAA+B,CAAE,QAAA,GAC3C,QAAA,CAAUA,CAAAA,CAAE,SAAQ,CAAE,QAAA,GAAW,OAAA,CAAQ,KAAK,EAC9C,MAAA,CAAQA,CAAAA,CAAE,QAAmB,CAAE,QAAA,GAC/B,MAAA,CAAQA,CAAAA,CAAE,QAAmB,CAAE,QAAA,GAC/B,MAAA,CAAQA,CAAAA,CAAE,QAAmB,CAAE,QAAA,EACjC,CAAC,CAAA,CAgBYU,GAAkCX,CAAAA,CAAyB,MAAA,CAAO,EAAE","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","'use client';\n\nimport { createContext, useContext } from 'react';\nimport type {\n WizardStepChangeEvent,\n WizardStepDescriptor,\n WizardAnnounceTemplate,\n WizardHeadingLevel,\n} from './Wizard.types';\n\nexport interface WizardContextValue {\n currentStepIndex: number;\n currentStepId: string;\n steps: WizardStepDescriptor[];\n totalSteps: number;\n isLoading: boolean;\n errors: string[];\n announceTemplate: WizardAnnounceTemplate;\n /** Heading level for each step's title. Defaults to `'h3'` at the root. */\n stepHeadingLevel: WizardHeadingLevel;\n onStepChange: (event: WizardStepChangeEvent) => void;\n /** Callback invoked by Wizard.Content after a step change to hand the heading node to the root for focus-on-change. */\n registerStepHeading: (node: HTMLHeadingElement | null) => void;\n}\n\nexport const WizardContext = createContext<WizardContextValue | null>(null);\n\nexport function useWizardContext(): WizardContextValue {\n const ctx = useContext(WizardContext);\n if (!ctx) {\n throw new Error('Wizard compound components must be used within <Wizard>');\n }\n return ctx;\n}\n","/**\n * Shared CVA Variant Utilities\n *\n * Common patterns extracted from component variants for consistency and reduced bundle size.\n * Use these constants in CVA definitions to ensure consistent styling across Themis.\n *\n * @see interaction-states.ts for interaction-specific styles (focus, hover, pressed)\n */\n\n// =============================================================================\n// Focus Ring Patterns\n// =============================================================================\n\n/**\n * Focus-within ring (for container elements with focusable children)\n * Use when the container should show focus when any child is focused\n */\nexport const FOCUS_WITHIN_RING = [\n 'focus-within:outline-none',\n 'focus-within:ring-2',\n 'focus-within:ring-[var(--ring)]',\n 'focus-within:ring-offset-2',\n] as const;\n\n/**\n * Focus-visible ring (for directly focusable elements)\n * Use for buttons, inputs, and other interactive elements\n */\nexport const FOCUS_VISIBLE_RING = [\n 'focus-visible:outline-none',\n 'focus-visible:ring-2',\n 'focus-visible:ring-[var(--ring)]',\n 'focus-visible:ring-offset-2',\n] as const;\n\n/**\n * Standard focus ring (for elements using :focus pseudo-class)\n * Prefer focus-visible when possible for better UX\n */\nexport const FOCUS_RING = [\n 'focus:outline-none',\n 'focus:ring-2',\n 'focus:ring-[var(--ring)]',\n] as const;\n\n/**\n * Focus with background change (for segments, cells, menu items)\n */\nexport const FOCUS_HIGHLIGHT = [\n 'focus:outline-none',\n 'focus:bg-[var(--accent)]',\n 'focus:text-[var(--accent-foreground)]',\n] as const;\n\n// =============================================================================\n// Disabled State Patterns\n// =============================================================================\n\n/**\n * Standard disabled state using disabled attribute\n */\nexport const DISABLED_STANDARD = [\n 'disabled:pointer-events-none',\n 'disabled:opacity-50',\n] as const;\n\n/**\n * Disabled state using data attribute (React Aria pattern)\n */\nexport const DISABLED_DATA_ATTR = [\n 'data-[disabled]:pointer-events-none',\n 'data-[disabled]:opacity-50',\n 'data-[disabled]:cursor-not-allowed',\n] as const;\n\n// =============================================================================\n// Size-Based Text Variants\n// =============================================================================\n\n/**\n * Small text size scale (xs -> sm -> base)\n */\nexport const TEXT_SIZE_SMALL_SCALE = {\n sm: 'text-xs',\n default: 'text-sm',\n lg: 'text-base',\n} as const;\n\n/**\n * Medium text size scale (sm -> base -> lg)\n */\nexport const TEXT_SIZE_MEDIUM_SCALE = {\n sm: 'text-sm',\n default: 'text-base',\n lg: 'text-lg',\n} as const;\n\n// =============================================================================\n// Touch Target Utilities\n// =============================================================================\n\n/**\n * WCAG 2.2 AAA minimum touch target (44x44px)\n */\nexport const TOUCH_TARGET_MIN = [\n 'min-h-[44px]',\n 'min-w-[44px]',\n] as const;\n\n/**\n * Common button/cell sizes with touch target compliance\n */\nexport const INTERACTIVE_SIZES = {\n sm: 'h-9 w-9', // 36px - desktop only, NOT AAA compliant\n default: 'h-11 w-11', // 44px - AAA compliant\n lg: 'h-14 w-14', // 56px - AAA compliant, enhanced\n} as const;\n\n/**\n * Height-only sizes for fields and inputs\n */\nexport const FIELD_HEIGHTS = {\n sm: 'h-9', // 36px\n default: 'h-10', // 40px\n lg: 'h-11', // 44px\n} as const;\n\n/**\n * Layer 2: Visual sizing for form field inputs (height + padding + font).\n * Use on the <input>, <select>, or trigger element itself.\n *\n * Components may append additional classes (e.g. gap-* for segmented fields, py-* for text inputs).\n */\nexport const FIELD_INPUT_SIZES = {\n sm: `${FIELD_HEIGHTS.sm} px-2 text-xs`,\n default: `${FIELD_HEIGHTS.default} px-3 text-sm`,\n lg: `${FIELD_HEIGHTS.lg} px-4 text-base`,\n} as const;\n\n/**\n * Layer 1: Invisible touch target wrapper for form fields.\n * Apply to a <label> (or wrapper div) around the input element.\n * The <label> natively routes clicks/taps to the contained input\n * without JavaScript — achieving a 44px touch target while the\n * input stays at its visual height (h-9/h-10/h-11).\n */\nexport const FIELD_TOUCH_TARGET = 'min-h-[44px] flex items-center' as const;\n\n// =============================================================================\n// Message/Feedback Patterns\n// =============================================================================\n\n/**\n * Error message styling\n */\nexport const ERROR_MESSAGE_BASE = [\n 'flex',\n 'items-center',\n 'gap-1.5',\n 'text-[var(--destructive-background)]',\n] as const;\n\n/**\n * Success message styling\n */\nexport const SUCCESS_MESSAGE_BASE = [\n 'flex',\n 'items-center',\n 'gap-1.5',\n 'text-[var(--success-background)]',\n] as const;\n\n/**\n * Description/helper text styling\n */\nexport const DESCRIPTION_BASE = [\n 'text-[var(--menu-muted)]',\n] as const;\n\n/**\n * Label base styling\n */\nexport const LABEL_BASE = [\n 'font-medium',\n 'text-[var(--content-foreground)]',\n] as const;\n\n/**\n * Required indicator pattern\n */\nexport const REQUIRED_INDICATOR = \"after:content-['*'] after:ml-0.5 after:text-[var(--destructive-background)]\";\n\n// =============================================================================\n// Animation Patterns\n// =============================================================================\n\n/**\n * Popover/dropdown entry animation\n */\nexport const POPOVER_ANIMATION_IN = [\n 'data-[entering]:animate-in',\n 'data-[entering]:fade-in-0',\n 'data-[entering]:zoom-in-95',\n] as const;\n\n/**\n * Popover/dropdown exit animation\n */\nexport const POPOVER_ANIMATION_OUT = [\n 'data-[exiting]:animate-out',\n 'data-[exiting]:fade-out-0',\n 'data-[exiting]:zoom-out-95',\n] as const;\n\n/**\n * Modal content enter animation (fade + zoom)\n * Uses React Aria data-[entering]/data-[exiting] attributes\n */\nexport const MODAL_ANIMATION_IN = [\n 'data-[entering]:animate-in',\n 'data-[entering]:fade-in-0',\n 'data-[entering]:zoom-in-95',\n 'data-[entering]:duration-200',\n 'data-[entering]:ease-out',\n] as const;\n\n/**\n * Modal content exit animation (fade + zoom)\n * Uses React Aria data-[entering]/data-[exiting] attributes\n */\nexport const MODAL_ANIMATION_OUT = [\n 'data-[exiting]:animate-out',\n 'data-[exiting]:fade-out-0',\n 'data-[exiting]:zoom-out-95',\n 'data-[exiting]:duration-150',\n 'data-[exiting]:ease-in',\n] as const;\n\n/**\n * Modal slide enter animation (fade + slide up)\n */\nexport const MODAL_SLIDE_IN = [\n 'data-[entering]:animate-in',\n 'data-[entering]:fade-in-0',\n 'data-[entering]:slide-in-from-bottom-4',\n 'data-[entering]:duration-200',\n 'data-[entering]:ease-out',\n] as const;\n\n/**\n * Modal slide exit animation (fade + slide down)\n */\nexport const MODAL_SLIDE_OUT = [\n 'data-[exiting]:animate-out',\n 'data-[exiting]:fade-out-0',\n 'data-[exiting]:slide-out-to-bottom-4',\n 'data-[exiting]:duration-150',\n 'data-[exiting]:ease-in',\n] as const;\n\n/**\n * Directional slide animations for edge-anchored drawers (Modal `position` variant).\n *\n * Unitless `slide-in-from-*` / `slide-out-to-*` translate the full extent of the\n * element (100%), so the drawer slides all the way in from / out to its anchored\n * edge — distinct from `MODAL_SLIDE_*` above, which is the small 1rem nudge used by\n * the centred `slide` animation. No `fade` is paired here: a drawer slides, it\n * does not fade. Honour `prefers-reduced-motion` via REDUCED_MOTION on the element.\n */\nexport const MODAL_SLIDE_IN_LEFT = [\n 'data-[entering]:animate-in',\n 'data-[entering]:slide-in-from-left',\n 'data-[entering]:duration-200',\n 'data-[entering]:ease-out',\n] as const;\n\nexport const MODAL_SLIDE_OUT_LEFT = [\n 'data-[exiting]:animate-out',\n 'data-[exiting]:slide-out-to-left',\n 'data-[exiting]:duration-150',\n 'data-[exiting]:ease-in',\n] as const;\n\nexport const MODAL_SLIDE_IN_RIGHT = [\n 'data-[entering]:animate-in',\n 'data-[entering]:slide-in-from-right',\n 'data-[entering]:duration-200',\n 'data-[entering]:ease-out',\n] as const;\n\nexport const MODAL_SLIDE_OUT_RIGHT = [\n 'data-[exiting]:animate-out',\n 'data-[exiting]:slide-out-to-right',\n 'data-[exiting]:duration-150',\n 'data-[exiting]:ease-in',\n] as const;\n\nexport const MODAL_SLIDE_IN_TOP = [\n 'data-[entering]:animate-in',\n 'data-[entering]:slide-in-from-top',\n 'data-[entering]:duration-200',\n 'data-[entering]:ease-out',\n] as const;\n\nexport const MODAL_SLIDE_OUT_TOP = [\n 'data-[exiting]:animate-out',\n 'data-[exiting]:slide-out-to-top',\n 'data-[exiting]:duration-150',\n 'data-[exiting]:ease-in',\n] as const;\n\nexport const MODAL_SLIDE_IN_BOTTOM = [\n 'data-[entering]:animate-in',\n 'data-[entering]:slide-in-from-bottom',\n 'data-[entering]:duration-200',\n 'data-[entering]:ease-out',\n] as const;\n\nexport const MODAL_SLIDE_OUT_BOTTOM = [\n 'data-[exiting]:animate-out',\n 'data-[exiting]:slide-out-to-bottom',\n 'data-[exiting]:duration-150',\n 'data-[exiting]:ease-in',\n] as const;\n\n/**\n * Modal overlay enter/exit animation (fade only)\n */\nexport const MODAL_OVERLAY_IN = [\n 'data-[entering]:animate-in',\n 'data-[entering]:fade-in-0',\n 'data-[entering]:duration-200',\n] as const;\n\nexport const MODAL_OVERLAY_OUT = [\n 'data-[exiting]:animate-out',\n 'data-[exiting]:fade-out-0',\n 'data-[exiting]:duration-150',\n] as const;\n\n/**\n * Reduced motion support (WCAG 2.2)\n */\nexport const REDUCED_MOTION = [\n 'motion-reduce:transition-none',\n 'motion-reduce:animate-none',\n] as const;\n\n/**\n * Standard transition for colors\n */\nexport const TRANSITION_COLORS = [\n 'transition-colors',\n 'duration-200',\n] as const;\n\n/**\n * Fast transition for interactions\n */\nexport const TRANSITION_FAST = [\n 'transition-colors',\n 'duration-150',\n] as const;\n\n// =============================================================================\n// Hover State Patterns\n// =============================================================================\n\n/**\n * Accent background on hover (for interactive items)\n */\nexport const HOVER_ACCENT = [\n 'hover:bg-[var(--accent)]',\n 'hover:text-[var(--accent-foreground)]',\n] as const;\n\n// =============================================================================\n// Helper Functions\n// =============================================================================\n\n/**\n * Combines multiple style arrays into a flat array for CVA base styles\n */\nexport function combineStyles(...styles: (readonly string[] | string)[]): string[] {\n return styles.flatMap(s => Array.isArray(s) ? [...s] : [s]);\n}\n","import { cva } from 'class-variance-authority';\nimport { combineStyles, REDUCED_MOTION, TRANSITION_COLORS } from '../../styles/shared-variants';\n\n// =============================================================================\n// Root — Outer wrapper; holds live regions and step-change effect host\n// =============================================================================\n\nexport const wizardRootVariants = cva(\n 'flex min-h-0 flex-1 flex-col',\n);\n\n// =============================================================================\n// Layout — 3-column grid helper (stepper | content+nav | preview aside)\n// =============================================================================\n\nexport const wizardLayoutVariants = cva(\n 'flex min-h-0 flex-1 flex-col lg:flex-row',\n);\n\nexport const wizardLayoutMainVariants = cva(\n 'flex min-w-0 flex-1 justify-center gap-8 overflow-y-auto bg-[var(--page-background)] p-6',\n);\n\nexport const wizardLayoutStepperSlotVariants = cva(\n 'hidden w-56 shrink-0 pt-2 lg:block',\n);\n\nexport const wizardLayoutContentSlotVariants = cva(\n 'flex w-full max-w-2xl flex-col',\n);\n\nexport const wizardLayoutHelpTextVariants = cva(\n 'mt-3 text-center text-xs text-[var(--menu-muted)]',\n);\n\nexport const wizardLayoutPreviewVariants = cva(\n 'hidden w-80 shrink-0 border-l border-[var(--border)] bg-[var(--accent-background)] p-6 xl:block',\n);\n\n// =============================================================================\n// Stepper — <ol>/<li> list; flex lives on an inner div (NOT the <ol>/<li>)\n// so implicit list semantics survive Safari's flexbox list-role stripping.\n// =============================================================================\n\nexport const wizardStepperContainerVariants = cva(\n 'flex flex-col gap-2',\n);\n\nexport const wizardStepperSectionLabelVariants = cva(\n 'text-xs font-semibold uppercase tracking-wide text-[var(--primary)]',\n);\n\nexport const wizardStepperSectionHeadingVariants = cva(\n 'text-sm font-bold text-[var(--content-foreground)]',\n);\n\nexport const wizardStepperListVariants = cva(\n 'mt-6 flex flex-col',\n);\n\nexport const wizardStepperItemVariants = cva(\n 'flex items-start',\n);\n\nexport const wizardStepperIndicatorColumnVariants = cva(\n 'flex w-11 shrink-0 flex-col items-center',\n);\n\nexport const wizardStepperCircleVariants = cva(\n combineStyles(\n 'flex h-9 w-9 shrink-0 items-center justify-center rounded-full text-sm font-semibold',\n TRANSITION_COLORS,\n REDUCED_MOTION,\n ),\n {\n variants: {\n state: {\n completed:\n 'bg-[var(--primary)] text-[var(--primary-foreground)] ring-4 ring-[var(--primary)]/25',\n current:\n 'bg-[var(--primary)] text-[var(--primary-foreground)] ring-4 ring-[var(--primary)]/25',\n upcoming:\n 'border border-[var(--border)] bg-[var(--content-background)] text-[var(--menu-muted)]',\n },\n },\n defaultVariants: {\n state: 'upcoming',\n },\n },\n);\n\nexport const wizardStepperConnectorVariants = cva(\n combineStyles('my-0.5 h-5 w-0.5', TRANSITION_COLORS, REDUCED_MOTION),\n {\n variants: {\n completed: {\n true: 'bg-[var(--primary)]',\n false: 'bg-[var(--border)]',\n },\n },\n defaultVariants: {\n completed: false,\n },\n },\n);\n\nexport const wizardStepperLabelColumnVariants = cva(\n 'flex min-h-11 items-center pl-3',\n);\n\nexport const wizardStepperLabelVariants = cva(\n 'flex flex-col justify-center',\n);\n\nexport const wizardStepperLabelTextVariants = cva(\n 'text-sm',\n {\n variants: {\n state: {\n completed: 'font-medium text-[var(--content-foreground)]',\n current: 'font-semibold text-[var(--content-foreground)]',\n upcoming: 'text-[var(--menu-muted)]',\n },\n },\n defaultVariants: {\n state: 'upcoming',\n },\n },\n);\n\nexport const wizardStepperCurrentSubtitleVariants = cva(\n 'text-xs text-[var(--content-foreground)]',\n);\n\n// =============================================================================\n// Step — wraps step heading + description + children\n// =============================================================================\n\nexport const wizardStepContainerVariants = cva(\n 'flex flex-col gap-6',\n);\n\nexport const wizardStepHeaderRowVariants = cva(\n 'flex items-start gap-4',\n);\n\nexport const wizardStepIconVariants = cva(\n 'flex h-12 w-12 shrink-0 items-center justify-center rounded-full bg-[var(--accent-background)] text-[var(--primary)]',\n);\n\nexport const wizardStepHeadingVariants = cva(\n // outline-none safe here because focus-visible ring still shows on :focus-visible;\n // we only remove default outline on programmatic focus (tabIndex={-1}).\n 'text-lg font-bold text-[var(--content-foreground)] focus:outline-none',\n);\n\nexport const wizardStepDescriptionVariants = cva(\n 'mt-1 text-sm text-[var(--menu-muted)]',\n);\n\n// =============================================================================\n// Content — wraps the active step panel\n// =============================================================================\n\nexport const wizardContentCardVariants = cva(\n 'rounded-lg border border-[var(--border)] bg-[var(--content-background)] p-6 text-[var(--content-foreground)]',\n);\n\n// =============================================================================\n// Navigation — Back / Skip / Next footer\n// =============================================================================\n\nexport const wizardNavigationVariants = cva(\n 'mt-4 flex items-center justify-between border-t border-[var(--border)] pt-4',\n);\n\nexport const wizardNavigationLeftVariants = cva('');\n\nexport const wizardNavigationRightVariants = cva(\n 'flex items-center gap-3',\n);\n\n// =============================================================================\n// Mobile progress — role=\"progressbar\" dot indicator\n// =============================================================================\n\nexport const wizardMobileProgressContainerVariants = cva(\n 'flex flex-col items-center gap-1.5 py-3 lg:hidden',\n);\n\nexport const wizardMobileProgressDotRowVariants = cva(\n 'flex items-center justify-center gap-2',\n);\n\nexport const wizardMobileProgressDotVariants = cva(\n combineStyles('h-2 rounded-full transition-all duration-200', REDUCED_MOTION),\n {\n variants: {\n state: {\n completed: 'w-2 bg-[var(--primary)] opacity-60',\n current: 'w-8 bg-[var(--primary)]',\n upcoming: 'w-2 bg-[var(--border)]',\n },\n },\n defaultVariants: {\n state: 'upcoming',\n },\n },\n);\n\nexport const wizardMobileProgressCaptionVariants = cva(\n 'text-xs font-medium text-[var(--menu-muted)]',\n);\n\nexport const wizardMobileProgressCaptionTitleVariants = cva(\n 'text-[var(--content-foreground)]',\n);\n\n// =============================================================================\n// Live regions — visually hidden\n// =============================================================================\n\nexport const wizardLiveRegionVariants = cva(\n 'sr-only',\n);\n","'use client';\n\nimport { forwardRef, type ReactElement, type ReactNode } from 'react';\nimport { cn } from '../../utils/cn';\nimport {\n wizardLayoutContentSlotVariants,\n wizardLayoutHelpTextVariants,\n wizardLayoutMainVariants,\n wizardLayoutPreviewVariants,\n wizardLayoutStepperSlotVariants,\n wizardLayoutVariants,\n} from './Wizard.styles';\nimport type { WizardLayoutProps as BaseWizardLayoutProps } from './Wizard.types';\n\n/**\n * 3-column layout helper.\n *\n * - `stepper` renders in a <nav> on the left, hidden below lg.\n * - `children` render in the centre column (intended for Wizard.MobileProgress,\n * Wizard.Content, Wizard.Navigation, in that order).\n * - `preview` renders in an <aside aria-hidden> on the right, hidden below xl.\n *\n * Wizard.Layout is opinionated. Consumers who need a different arrangement can\n * skip it entirely and compose sub-components themselves — the root (<Wizard>)\n * handles all the a11y plumbing regardless.\n */\n\nexport interface WizardLayoutProps extends BaseWizardLayoutProps {\n stepper?: ReactNode;\n}\n\nexport const WizardLayout = forwardRef<HTMLDivElement, WizardLayoutProps>(\n function WizardLayoutImpl(\n {\n children,\n stepper,\n preview,\n helpText,\n className,\n 'data-testid': testId = 'wizard-layout',\n },\n ref,\n ): ReactElement {\n return (\n <div\n ref={ref}\n className={cn(wizardLayoutVariants(), className)}\n data-testid={testId}\n >\n <div className={wizardLayoutMainVariants()}>\n {stepper ? (\n <nav\n className={wizardLayoutStepperSlotVariants()}\n aria-label=\"Wizard steps\"\n data-testid={`${testId}-stepper-slot`}\n >\n {stepper}\n </nav>\n ) : null}\n <div className={wizardLayoutContentSlotVariants()}>\n {children}\n {helpText ? (\n <p className={wizardLayoutHelpTextVariants()}>{helpText}</p>\n ) : null}\n </div>\n </div>\n {preview ? (\n <aside\n className={wizardLayoutPreviewVariants()}\n aria-hidden=\"true\"\n data-testid={`${testId}-preview`}\n >\n {preview}\n </aside>\n ) : null}\n </div>\n );\n },\n);\n\nWizardLayout.displayName = 'Wizard.Layout';\n","import { cva } from 'class-variance-authority';\n\n/**\n * Layer 1: Transparent outer touch target (44x44px minimum)\n * Handles WCAG 2.2 AAA touch target requirement\n * Always transparent, centers the visual button inside\n * IMPORTANT: Focus ring stays on Layer 1 for AAA compliance (2.4.13)\n *\n * In vertical ButtonGroups, uses items-stretch so the visual layer (Layer 2)\n * can fill the full touch target height, eliminating gaps between buttons.\n */\nexport const buttonOuterVariants = cva(\n \"inline-flex justify-center min-h-[44px] min-w-[44px] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--ring)] focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:pointer-events-none disabled:opacity-50\",\n {\n variants: {\n fullWidth: {\n true: \"w-full\",\n false: \"\",\n },\n inVerticalGroup: {\n true: \"items-stretch\",\n false: \"items-center\",\n },\n },\n defaultVariants: {\n fullWidth: false,\n inVerticalGroup: false,\n },\n }\n);\n\n/**\n * Layer 2: Visual button appearance (adjustable size)\n * Provides the visual appearance with configurable size\n * Can be smaller than touch target for use cases like carousel dots\n * NOTE: NO focus-visible styles here - focus ring is on Layer 1\n */\nexport const buttonVisualVariants = cva(\n \"inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-normal ring-offset-background motion-safe:transition-transform motion-safe:duration-200 motion-safe:[transition-timing-function:cubic-bezier(0.34,1.56,0.64,1)] motion-reduce:transition-none [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 relative cursor-pointer\",\n {\n variants: {\n variant: {\n default:\n \"bg-[var(--primary-action)] text-[var(--primary-action-foreground)] shadow-md hover:bg-[var(--primary-action-hover)] hover:-translate-y-1\",\n destructive:\n \"bg-[var(--destructive-background)] text-[var(--destructive-foreground)] hover:bg-[var(--destructive-background-hover,var(--destructive-background))] motion-safe:hover:btn-warn-shake\",\n outline:\n \"border border-[var(--input-border)] bg-[var(--page-background)] hover:bg-[var(--input-border)]\",\n secondary:\n \"bg-[var(--secondary)] text-[var(--secondary-foreground)] hover:bg-[var(--secondary-hover,var(--secondary))]\",\n ghost:\n \"hover:bg-[var(--accent)] hover:text-[var(--accent-foreground)]\",\n link: \"text-[var(--text-link)] underline underline-offset-4 hover:bg-[var(--accent)] hover:text-[var(--text-link-hover)]\",\n },\n fullWidth: {\n true: \"w-full\",\n false: \"\",\n },\n visualSize: {\n default: \"h-10 px-4 py-2\",\n sm: \"h-9 rounded-md px-3 text-xs\",\n lg: \"h-11 rounded-md px-6 text-base\",\n icon: \"h-10 w-10\",\n dot: \"h-5 w-5 rounded-full p-0 min-h-0 min-w-0\",\n },\n paywall: {\n true: \"!bg-[var(--paywall)] !text-[var(--paywall-foreground)] hover:!bg-[var(--paywall)]/90 !cursor-not-allowed !border-transparent\",\n false: \"\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n visualSize: \"default\",\n paywall: false,\n },\n }\n);\n\n/**\n * @deprecated Use buttonVisualVariants instead. This alias is kept for backward compatibility.\n */\nexport const buttonVariants = buttonVisualVariants;\n","/**\n * Global Interaction State Styles\n *\n * Consistent interaction patterns across all Themis components.\n * These styles ensure WCAG 2.2 AAA compliance and predictable UX.\n *\n * @see spec.md FR-010 (Visible focus ring for keyboard navigation)\n * @see spec.md FR-031 (Pressed state feedback)\n * @see spec.md FR-012 (High contrast mode support)\n * @see constitution.md Principle IV (Accessibility First)\n */\n\n/**\n * Focus state styles (FR-010)\n * Visible focus ring for keyboard navigation - WCAG 2.2 Level AAA\n *\n * Components can override by extending these styles:\n * @example\n * cn(FOCUS_STYLES, \"ring-4\") // Increases ring width to 4px\n */\nexport const FOCUS_STYLES = \"data-[focus-visible]:ring-2 data-[focus-visible]:ring-[var(--themis-ring)] data-[focus-visible]:ring-offset-2\";\n\n/**\n * Pressed/Active state styles (FR-031)\n * Visual feedback for press interactions\n *\n * Components can override the scale amount:\n * @example\n * cn(PRESSED_STYLES_BASE, \"data-[pressed]:scale-[0.95]\") // More pronounced scale\n */\nexport const PRESSED_STYLES = \"data-[pressed]:scale-[0.97]\";\n\n/**\n * Base pressed styles without scale (for components that need different feedback)\n */\nexport const PRESSED_STYLES_BASE = \"data-[pressed]:transition-transform data-[pressed]:duration-100\";\n\n/**\n * Hover state styles\n * Elevation change on hover for better affordance\n *\n * Components can override shadow depth:\n * @example\n * cn(HOVER_STYLES_BASE, \"data-[hovered]:shadow-lg\") // Larger shadow\n */\nexport const HOVER_STYLES = \"\";\n\n/**\n * Base hover styles without shadow (for components that use different hover effects)\n */\nexport const HOVER_STYLES_BASE = \"data-[hovered]:transition-shadow data-[hovered]:duration-200\";\n\n/**\n * High contrast mode focus (FR-012)\n * Enhanced outlines for users requiring high contrast\n *\n * Uses 'hc:' prefix for prefers-contrast: more media query\n */\nexport const HIGH_CONTRAST_FOCUS = \"hc:data-[focus-visible]:outline hc:data-[focus-visible]:outline-4 hc:data-[focus-visible]:outline-offset-2 hc:data-[focus-visible]:outline-foreground\";\n\n/**\n * High contrast mode hover (FR-012)\n * Enhanced outlines for hover in high contrast mode\n */\nexport const HIGH_CONTRAST_HOVER = \"hc:data-[hovered]:outline hc:data-[hovered]:outline-2 hc:data-[hovered]:outline-foreground\";\n\n/**\n * High contrast mode pressed state\n * Enhanced outlines for pressed state in high contrast mode\n */\nexport const HIGH_CONTRAST_PRESSED = \"hc:data-[pressed]:outline hc:data-[pressed]:outline-2 hc:data-[pressed]:outline-offset-1 hc:data-[pressed]:outline-foreground\";\n\n/**\n * Combined high contrast styles\n * Use this for components that need all high contrast interaction states\n */\nexport const HIGH_CONTRAST_INTERACTIONS = `${HIGH_CONTRAST_FOCUS} ${HIGH_CONTRAST_HOVER} ${HIGH_CONTRAST_PRESSED}`;\n\n/**\n * Disabled state styles\n * Consistent disabled appearance across all components\n */\nexport const DISABLED_STYLES = \"disabled:pointer-events-none disabled:opacity-50\";\n\n/**\n * Default interaction bundle\n * Most common combination for interactive components\n *\n * Includes: focus ring, pressed scale, hover shadow, high contrast enhancements\n *\n * @example\n * <button className={cn(DEFAULT_INTERACTIONS, \"bg-primary\")}>Click</button>\n */\nexport const DEFAULT_INTERACTIONS = `${FOCUS_STYLES} ${PRESSED_STYLES} ${HOVER_STYLES} ${HIGH_CONTRAST_FOCUS} ${HIGH_CONTRAST_HOVER} ${HIGH_CONTRAST_PRESSED}`;\n\n/**\n * Subtle interaction bundle\n * For components that need less pronounced feedback\n *\n * Includes: focus ring and high contrast, but no hover shadow or pressed scale\n */\nexport const SUBTLE_INTERACTIONS = `${FOCUS_STYLES} ${HIGH_CONTRAST_FOCUS}`;\n\n/**\n * Non-interactive element styles\n * For elements that should indicate they are not interactive\n */\nexport const NON_INTERACTIVE = \"cursor-default select-none\";\n","\"use client\";\n\nimport { createContext, useContext } from 'react';\nimport type {\n ButtonGroupContextValue,\n ButtonGroupItemContextValue,\n} from './ButtonGroup.types';\n\n/**\n * ButtonGroup Context System (Two-Level)\n *\n * Provides a two-level context pattern for ButtonGroup:\n *\n * 1. ButtonGroupContext (group-level):\n * - Provides: orientation, variant, size, isDisabled\n * - Consumed by: Button (for prop inheritance), Separator (for orientation)\n *\n * 2. ButtonGroupItemContext (item-level):\n * - Provides: position ('first' | 'middle' | 'last' | 'only')\n * - Consumed by: Button (for border-radius styling)\n *\n * Both contexts return null when not in a provider, allowing Button\n * to work standalone without any group context.\n *\n * @see plan.md for architecture details\n * @see ButtonGroup.tsx for Provider implementation\n */\n\n// =============================================================================\n// Group-Level Context\n// =============================================================================\n\n/**\n * Context for group-level props (orientation, variant, size, isDisabled)\n * Default value is null to indicate \"not in a group\"\n */\nconst ButtonGroupContext = createContext<ButtonGroupContextValue | null>(null);\n\nButtonGroupContext.displayName = 'ButtonGroupContext';\n\n/**\n * Hook to access group-level context\n * @returns ButtonGroupContextValue if inside a ButtonGroup, null otherwise\n */\nexport function useButtonGroupContext(): ButtonGroupContextValue | null {\n return useContext(ButtonGroupContext);\n}\n\n// =============================================================================\n// Item-Level Context\n// =============================================================================\n\n/**\n * Context for per-button position information\n * Default value is null to indicate \"not wrapped with position context\"\n */\nconst ButtonGroupItemContext =\n createContext<ButtonGroupItemContextValue | null>(null);\n\nButtonGroupItemContext.displayName = 'ButtonGroupItemContext';\n\n/**\n * Hook to access item-level context (position)\n * @returns ButtonGroupItemContextValue if wrapped with position context, null otherwise\n */\nexport function useButtonGroupItemContext(): ButtonGroupItemContextValue | null {\n return useContext(ButtonGroupItemContext);\n}\n\n// =============================================================================\n// Exports\n// =============================================================================\n\nexport { ButtonGroupContext, ButtonGroupItemContext };\n","import { cva } from 'class-variance-authority';\n\n/**\n * ButtonGroup CVA Variants\n *\n * Defines Class Variance Authority (CVA) variants for:\n * - ButtonGroup container (orientation-based layout)\n * - ButtonGroupItem (position-based border-radius)\n * - ButtonGroupSeparator (orientation-based styling)\n *\n * @see plan.md Phase 1: Design & Contracts - CVA Variants\n * @see constitution.md Principle V (Component Quality Standards)\n */\n\n// =============================================================================\n// Container Variants\n// =============================================================================\n\n/**\n * ButtonGroup container variants\n * Controls the layout direction based on orientation\n * Uses gap-0 to ensure buttons are connected (share borders)\n */\nexport const buttonGroupVariants = cva('inline-flex items-center gap-0', {\n variants: {\n orientation: {\n horizontal: 'flex-row',\n vertical: 'flex-col w-full',\n },\n },\n defaultVariants: {\n orientation: 'horizontal',\n },\n});\n\n// =============================================================================\n// Item Position Variants\n// =============================================================================\n\n/**\n * ButtonGroupItem position variants\n * Applied to Button's visual layer (Layer 2) for position-aware border-radius\n *\n * Compound variants handle both orientation and position combinations:\n * - Horizontal: left/right borders and radii\n * - Vertical: top/bottom borders and radii\n */\nexport const buttonGroupItemVariants = cva('', {\n variants: {\n orientation: {\n // min-w-[44px] ensures visual layer fills touch target width (for icon buttons)\n horizontal: 'min-w-[44px]',\n // flex (overrides inline-flex) + min-h-[44px] makes visual layer fill touch target,\n // eliminating gaps between stacked buttons in vertical orientation\n vertical: 'flex min-h-[44px]',\n },\n position: {\n first: '',\n middle: '',\n last: '',\n only: '', // Single button - no modifications needed\n },\n },\n compoundVariants: [\n // ==========================================================================\n // Horizontal Orientation\n // ==========================================================================\n {\n orientation: 'horizontal',\n position: 'first',\n className: 'rounded-r-none border-r-0',\n },\n {\n orientation: 'horizontal',\n position: 'middle',\n className: 'rounded-none border-r-0',\n },\n {\n orientation: 'horizontal',\n position: 'last',\n className: 'rounded-l-none',\n },\n // ==========================================================================\n // Vertical Orientation\n // Note: w-full is handled by Button's effectiveFullWidth for both layers\n // ==========================================================================\n {\n orientation: 'vertical',\n position: 'first',\n className: 'rounded-b-none border-b-0',\n },\n {\n orientation: 'vertical',\n position: 'middle',\n className: 'rounded-none border-b-0',\n },\n {\n orientation: 'vertical',\n position: 'last',\n className: 'rounded-t-none',\n },\n ],\n defaultVariants: {\n orientation: 'horizontal',\n position: 'only',\n },\n});\n\n// =============================================================================\n// Separator Variants\n// =============================================================================\n\n/**\n * ButtonGroupSeparator variants\n * Orientation-aware visual divider between button groups\n */\nexport const buttonGroupSeparatorVariants = cva('bg-[var(--border)]', {\n variants: {\n orientation: {\n horizontal: 'w-px h-6 mx-1',\n vertical: 'h-px w-full my-1',\n },\n },\n defaultVariants: {\n orientation: 'horizontal',\n },\n});\n","\"use client\";\n\n/**\n * Button Component - 3-Layer Architecture\n * Accessible button with React Aria primitives and CVA styling\n *\n * Architecture:\n * - Layer 1: Touch Target (44x44px WCAG AAA compliant, transparent)\n * - Layer 2: Visual Button (configurable size, colors, borders)\n * - Layer 3: Content & Effects (text, icons, ripple, loading spinner)\n *\n * @see 3layer-plan.md for architecture details\n * @see spec.md FR-029 to FR-037 (Button Component Requirements)\n * @see spec.md FR-009 (WCAG 2.2 AAA - 7:1 contrast ratio)\n * @see spec.md FR-014 (44x44px minimum touch targets)\n * @see constitution.md Principle IV (Accessibility First)\n */\n\nimport { forwardRef, memo, useId } from 'react';\nimport {\n Button as AriaButton,\n type ButtonProps as AriaButtonProps,\n} from 'react-aria-components';\nimport { Loader2, Zap } from 'lucide-react';\nimport { cn } from '../../utils/cn';\nimport type { ButtonProps } from './Button.types';\nimport { buttonOuterVariants, buttonVisualVariants, buttonVariants } from './Button.styles';\nimport { PRESSED_STYLES, HOVER_STYLES, HIGH_CONTRAST_HOVER, HIGH_CONTRAST_PRESSED } from '../../styles/interaction-states';\nimport {\n useButtonGroupContext,\n useButtonGroupItemContext,\n} from '../ButtonGroup/ButtonGroupContext';\nimport { buttonGroupItemVariants } from '../ButtonGroup/ButtonGroup.variants';\n\n/**\n * Button Component - 3-Layer Architecture\n * Fully accessible button with React Aria and themed styling\n *\n * Layer 1: Touch Target (AriaButton) - 44x44px WCAG AAA compliant\n * Layer 2: Visual Button (span) - configurable appearance\n * Layer 3: Content (children) - text, icons, effects\n */\nconst Button = memo(forwardRef<HTMLButtonElement, ButtonProps>(\n (\n {\n className,\n buttonVisualClassName,\n variant,\n size,\n visualSize,\n fullWidth,\n loading = false,\n loadingText = \"Loading...\",\n shortcut,\n children,\n isDisabled,\n paywall = false,\n paywallRedirect,\n paywallDescription,\n onPress,\n ...props\n },\n ref\n ) => {\n const paywallDescriptionId = useId();\n\n // ==========================================================================\n // ButtonGroup Context Integration\n // ==========================================================================\n\n // Consume group-level context (variant, size, isDisabled, orientation)\n const groupContext = useButtonGroupContext();\n\n // Consume item-level context (position for border-radius styling)\n const itemContext = useButtonGroupItemContext();\n\n // Merge context values with props (props take precedence)\n const effectiveVariant = variant ?? groupContext?.variant ?? 'default';\n const effectiveSize = size ?? groupContext?.size;\n const effectiveIsDisabled = isDisabled ?? groupContext?.isDisabled ?? false;\n\n // In vertical groups, buttons should be full width automatically\n const isInVerticalGroup = groupContext?.orientation === 'vertical';\n const effectiveFullWidth = fullWidth || isInVerticalGroup;\n\n // Position styling for ButtonGroup (only applied when in a group)\n const positionClassName = itemContext\n ? buttonGroupItemVariants({\n orientation: groupContext?.orientation ?? 'horizontal',\n position: itemContext.position,\n })\n : '';\n\n // Default visualSize to size for backward compatibility\n const effectiveVisualSize = visualSize ?? effectiveSize ?? 'default';\n\n // AAA Accessibility: Warn in dev/test if icon/dot variant lacks accessible name\n if (process.env.NODE_ENV !== 'production') {\n if (\n (effectiveVisualSize === 'dot' || effectiveVisualSize === 'icon') &&\n !props['aria-label'] &&\n !children\n ) {\n console.warn(\n '[Button] visualSize=\"dot\" or \"icon\" requires aria-label when no visible text is provided (WCAG 1.1.1)'\n );\n }\n }\n\n /**\n * Handle button press - intercepts action when paywalled\n * If paywalled with redirect URL, opens in new tab\n * Otherwise, calls the normal onPress handler\n */\n const handlePress = (e: Parameters<NonNullable<AriaButtonProps['onPress']>>[0]): void => {\n if (paywall) {\n if (paywallRedirect) {\n window.open(paywallRedirect, '_blank', 'noopener,noreferrer');\n }\n // Don't call onPress when paywalled\n return;\n }\n onPress?.(e);\n };\n\n // Only set isDisabled when we have a reason to disable\n // Otherwise, let slot system control disabled state (e.g., in NumberField)\n const computedIsDisabled = effectiveIsDisabled || loading || undefined;\n\n return (\n <AriaButton\n ref={ref}\n isDisabled={computedIsDisabled}\n aria-disabled={paywall ? true : undefined}\n aria-describedby={paywall ? paywallDescriptionId : undefined}\n onPress={handlePress}\n className={cn(buttonOuterVariants({ fullWidth: effectiveFullWidth, inVerticalGroup: isInVerticalGroup }), className)}\n {...props}\n >\n {(renderProps) => (\n /* Layer 2: Visual Button */\n <span\n className={cn(\n buttonVisualVariants({\n variant: effectiveVariant,\n visualSize: effectiveVisualSize,\n paywall,\n fullWidth: effectiveFullWidth,\n }),\n // Position styling from ButtonGroup context (border-radius adjustments)\n positionClassName,\n buttonVisualClassName,\n // Layer 2 interaction styles (no focus - focus ring is on Layer 1)\n PRESSED_STYLES,\n HOVER_STYLES,\n HIGH_CONTRAST_HOVER,\n HIGH_CONTRAST_PRESSED\n )}\n data-pressed={renderProps.isPressed || undefined}\n >\n {/* Layer 3: Content & Effects */}\n\n {/* FR-033: Loading spinner with screen reader announcement */}\n {/* Uses motion-safe: for WCAG 2.3.3 AAA (Animation from Interactions) */}\n {loading && (\n <>\n <Loader2 className=\"motion-safe:animate-spin\" aria-hidden=\"true\" />\n <span className=\"sr-only\" aria-live=\"polite\">\n {loadingText}\n </span>\n </>\n )}\n\n {/* Hide children during loading */}\n {!loading && children}\n\n {/* Paywall: Lightning bolt icon */}\n {paywall && (\n <Zap\n data-testid=\"zap-icon\"\n aria-hidden=\"true\"\n className=\"ml-1\"\n />\n )}\n\n {/* Paywall: Screen reader description */}\n {paywall && (\n <span id={paywallDescriptionId} className=\"sr-only\">\n Premium feature: {paywallDescription || \"Upgrade required to access this feature\"}\n </span>\n )}\n\n {/* FR-034: Keyboard shortcut display on focus */}\n {renderProps.isFocusVisible && shortcut && (\n <kbd className=\"ml-auto hidden text-xs opacity-60 lg:inline\">\n {shortcut}\n </kbd>\n )}\n\n </span>\n )}\n </AriaButton>\n );\n }\n));\n\nButton.displayName = \"Button\";\n\nexport { Button, buttonVariants, buttonOuterVariants, buttonVisualVariants };\nexport type { ButtonProps } from './Button.types';\n","'use client';\n\nimport { forwardRef, type ReactElement } from 'react';\nimport { Check } from 'lucide-react';\nimport { Button } from '../Button/Button';\nimport { cn } from '../../utils/cn';\nimport { useWizardContext } from './WizardContext';\nimport {\n wizardStepperCircleVariants,\n wizardStepperConnectorVariants,\n wizardStepperContainerVariants,\n wizardStepperCurrentSubtitleVariants,\n wizardStepperIndicatorColumnVariants,\n wizardStepperItemVariants,\n wizardStepperLabelColumnVariants,\n wizardStepperLabelTextVariants,\n wizardStepperLabelVariants,\n wizardStepperListVariants,\n wizardStepperSectionHeadingVariants,\n wizardStepperSectionLabelVariants,\n} from './Wizard.styles';\nimport type { WizardStepperProps } from './Wizard.types';\n\n/**\n * Vertical stepper. Semantic <ol> + `aria-current=\"step\"` — NOT role=\"tablist\".\n *\n * The flex layout lives on an inner <div>, not on the <ol>/<li>, so Safari's\n * flexbox list-role stripping doesn't kill the list semantics.\n *\n * Completed steps are clickable when `allowClickOnCompleted` is true and the\n * context exposes `onStepChange`. Current and upcoming steps are not clickable.\n */\nexport const WizardStepper = forwardRef<HTMLDivElement, WizardStepperProps>(\n function WizardStepperImpl(\n {\n sectionLabel,\n sectionNumber,\n totalSections,\n allowClickOnCompleted = true,\n className,\n 'aria-label': ariaLabel,\n 'data-testid': testId = 'wizard-stepper',\n },\n ref,\n ): ReactElement {\n const { currentStepIndex, steps, onStepChange, isLoading } = useWizardContext();\n\n return (\n <div\n ref={ref}\n className={cn(wizardStepperContainerVariants(), className)}\n aria-label={ariaLabel}\n data-testid={testId}\n >\n {sectionLabel && sectionNumber !== undefined && totalSections !== undefined ? (\n <>\n <p className={wizardStepperSectionLabelVariants()}>\n Section {sectionNumber} of {totalSections}\n </p>\n <h2 className={wizardStepperSectionHeadingVariants()}>{sectionLabel}</h2>\n </>\n ) : null}\n\n <ol className={wizardStepperListVariants()}>\n {steps.map((step, index) => {\n const isCompleted = index < currentStepIndex;\n const isCurrent = index === currentStepIndex;\n const stateKey: 'completed' | 'current' | 'upcoming' = isCompleted\n ? 'completed'\n : isCurrent\n ? 'current'\n : 'upcoming';\n const isClickable = isCompleted && allowClickOnCompleted && !isLoading;\n const isLast = index === steps.length - 1;\n\n const circleClass = wizardStepperCircleVariants({ state: stateKey });\n const circle = (\n <span className={circleClass} aria-hidden=\"true\">\n {isCompleted ? <Check className=\"h-4 w-4\" /> : <span>{index + 1}</span>}\n </span>\n );\n\n return (\n <li\n key={step.id}\n data-testid={`${testId}-item-${step.id}`}\n aria-current={isCurrent ? 'step' : undefined}\n >\n <div className={wizardStepperItemVariants()}>\n <div className={wizardStepperIndicatorColumnVariants()}>\n {isClickable ? (\n <Button\n variant=\"ghost\"\n visualSize=\"icon\"\n buttonVisualClassName=\"rounded-full\"\n aria-label={`Go back to ${step.label}`}\n onPress={() =>\n onStepChange({\n index,\n id: step.id,\n label: step.label,\n reason: 'jump',\n })\n }\n data-testid={`${testId}-button-${step.id}`}\n >\n {circle}\n </Button>\n ) : (\n <span className=\"flex h-11 w-11 items-center justify-center\">\n {circle}\n </span>\n )}\n {!isLast ? (\n <span\n className={wizardStepperConnectorVariants({ completed: isCompleted })}\n aria-hidden=\"true\"\n />\n ) : null}\n </div>\n\n <div className={wizardStepperLabelColumnVariants()}>\n <span className={wizardStepperLabelVariants()}>\n <span className={wizardStepperLabelTextVariants({ state: stateKey })}>\n {step.label}\n </span>\n {isCurrent ? (\n <span className={wizardStepperCurrentSubtitleVariants()}>\n Current step\n </span>\n ) : null}\n </span>\n {/* SR orientation for non-current rows; `aria-current=\"step\"` covers current. */}\n {!isCurrent ? (\n <span className=\"sr-only\">\n {isCompleted ? '(completed)' : '(upcoming)'}\n </span>\n ) : null}\n </div>\n </div>\n </li>\n );\n })}\n </ol>\n </div>\n );\n },\n);\n\nWizardStepper.displayName = 'Wizard.Stepper';\n","'use client';\n\nimport {\n Activity as ReactActivity,\n Children,\n forwardRef,\n isValidElement,\n type ReactElement,\n type ReactNode,\n} from 'react';\nimport { cn } from '../../utils/cn';\nimport { useWizardContext } from './WizardContext';\nimport { wizardContentCardVariants } from './Wizard.styles';\nimport type { WizardContentProps, WizardStepProps } from './Wizard.types';\n\n// React 19.2 Activity API — may not be available in every consumer build\n// (pre-19.2 React, or pre-canary chunks). Mirror the `Tabs.tsx` fallback so\n// the component degrades to a plain render rather than crashing the build.\n// The fallback simply renders children directly; the `preserveState` opt-in\n// becomes a no-op in that environment (inactive step state isn't preserved\n// when Activity is unavailable, matching pre-`preserveState` behaviour).\nconst Activity = ReactActivity ?? function ActivityFallback({\n children,\n mode,\n}: {\n children: ReactNode;\n mode: 'visible' | 'hidden';\n}): ReactElement {\n return <div data-activity-mode={mode}>{children}</div>;\n};\n\nfunction isWizardStepElement(\n child: ReactNode,\n): child is ReactElement<WizardStepProps> {\n if (!isValidElement(child)) return false;\n const type = child.type as { displayName?: string } | string;\n if (typeof type === 'string') return false;\n return type?.displayName === 'Wizard.Step';\n}\n\n/**\n * Renders the currently-selected `Wizard.Step`'s subtree.\n *\n * Default mode (legacy, `preserveState={false}`): only the active step is\n * mounted. Inactive steps are unmounted on step change — fast and lean, but\n * any step-local state (Formik values, typed-but-not-yet-saved inputs,\n * autosave timers) is destroyed on every navigation and re-initialised on\n * remount. This preserves the pre-1.5.8 behaviour for existing consumers.\n *\n * Opt-in mode (`preserveState={true}`): ALL `Wizard.Step` children stay\n * mounted across step transitions; only the active one is visible (every\n * step is wrapped in React 19.2's `<Activity mode=\"visible|hidden\">`, which\n * mounts the subtree but pauses effects for the hidden ones). Use this\n * when the candidate's draft state needs to survive back/forward navigation.\n * Mirrors the `Tabs.Panel` `preserveState` pattern.\n *\n * Trade-off: enabling `preserveState` mounts every step on first render, so\n * keep it off for wizards with heavy per-step boot cost (multiple\n * file-upload fields, etc.). The legacy default exists for that case.\n */\nexport const WizardContent = forwardRef<HTMLDivElement, WizardContentProps>(\n function WizardContentImpl(\n {\n children,\n className,\n 'data-testid': testId = 'wizard-content',\n preserveState = false,\n },\n ref,\n ): ReactElement {\n const { currentStepId, steps } = useWizardContext();\n\n const stepChildren = Children.toArray(children).filter(isWizardStepElement);\n\n if (process.env.NODE_ENV !== 'production') {\n const childIds = stepChildren.map((c) => c.props.id);\n const descriptorIds = steps.map((s) => s.id);\n const missing = descriptorIds.filter((id) => !childIds.includes(id));\n const extra = childIds.filter((id) => !descriptorIds.includes(id));\n if (missing.length > 0 || extra.length > 0) {\n console.warn(\n '[Wizard] Wizard.Step children do not match `steps` descriptors. ' +\n (missing.length ? `Missing steps: ${missing.join(', ')}. ` : '') +\n (extra.length ? `Unknown step ids: ${extra.join(', ')}.` : ''),\n );\n }\n }\n\n if (preserveState) {\n // Mount every step; wrap each in Activity so inactive subtrees stay\n // alive but pause their effects. The active step is `mode=\"visible\"`,\n // all others `mode=\"hidden\"`. Children are keyed by step id so React\n // never re-mounts a step subtree when the active index moves.\n return (\n <div\n ref={ref}\n className={cn(wizardContentCardVariants(), className)}\n data-testid={testId}\n >\n {stepChildren.map((child) => (\n <Activity\n key={child.props.id}\n mode={child.props.id === currentStepId ? 'visible' : 'hidden'}\n >\n {child}\n </Activity>\n ))}\n </div>\n );\n }\n\n const active = stepChildren.find((c) => c.props.id === currentStepId) ?? null;\n\n return (\n <div\n ref={ref}\n className={cn(wizardContentCardVariants(), className)}\n data-testid={testId}\n >\n {active}\n </div>\n );\n },\n);\n\nWizardContent.displayName = 'Wizard.Content';\n","'use client';\n\nimport { forwardRef, useId, type ReactElement } from 'react';\nimport { cn } from '../../utils/cn';\nimport { useWizardContext } from './WizardContext';\nimport {\n wizardStepContainerVariants,\n wizardStepDescriptionVariants,\n wizardStepHeaderRowVariants,\n wizardStepHeadingVariants,\n wizardStepIconVariants,\n} from './Wizard.styles';\nimport type { WizardStepProps } from './Wizard.types';\n\n/**\n * A single step panel. Rendered only when it's the active step (Wizard.Content\n * filters). The heading is the focus target after step changes — receives\n * `tabIndex={-1}` so it can be programmatically focused without landing in\n * the tab order.\n *\n * Each step gets its own `useId` for heading + description, then links them\n * via `aria-labelledby` / `aria-describedby` on the <section>.\n */\nexport const WizardStep = forwardRef<HTMLElement, WizardStepProps>(\n function WizardStepImpl(\n { id: stepId, icon, children, className, 'data-testid': testId },\n ref,\n ): ReactElement {\n const { steps, currentStepIndex, registerStepHeading, stepHeadingLevel } =\n useWizardContext();\n const descriptor = steps.find((s) => s.id === stepId);\n const label = descriptor?.label ?? stepId;\n const description = descriptor?.description;\n\n const headingId = useId();\n const descriptionId = useId();\n\n const effectiveTestId = testId ?? `wizard-step-${stepId}`;\n\n // Heading level is consumer-configurable (defaults to `h3` at the root) so\n // the step title nests correctly under the surrounding page hierarchy\n // without skipping a level. The element is still always an HTMLHeadingElement,\n // so the focus-target ref contract is unchanged.\n const Heading = stepHeadingLevel;\n\n return (\n <section\n ref={ref}\n className={cn(wizardStepContainerVariants(), className)}\n aria-labelledby={headingId}\n aria-describedby={description ? descriptionId : undefined}\n data-testid={effectiveTestId}\n data-wizard-step-id={stepId}\n data-wizard-step-index={currentStepIndex}\n >\n <div className={wizardStepHeaderRowVariants()}>\n {icon ? (\n <span className={wizardStepIconVariants()} aria-hidden=\"true\">\n {icon}\n </span>\n ) : null}\n <div>\n <Heading\n id={headingId}\n ref={registerStepHeading}\n tabIndex={-1}\n className={wizardStepHeadingVariants()}\n >\n {label}\n </Heading>\n {description ? (\n <p id={descriptionId} className={wizardStepDescriptionVariants()}>\n {description}\n </p>\n ) : null}\n </div>\n </div>\n <div>{children}</div>\n </section>\n );\n },\n);\n\nWizardStep.displayName = 'Wizard.Step';\n","'use client';\n\nimport { forwardRef, type ReactElement } from 'react';\nimport { ArrowLeft, ArrowRight } from 'lucide-react';\nimport { Button } from '../Button/Button';\nimport { cn } from '../../utils/cn';\nimport { useWizardContext } from './WizardContext';\nimport {\n wizardNavigationLeftVariants,\n wizardNavigationRightVariants,\n wizardNavigationVariants,\n} from './Wizard.styles';\nimport type {\n WizardNavigationLabel,\n WizardNavigationLabels,\n WizardNavigationProps,\n} from './Wizard.types';\n\nconst DEFAULT_LABELS: Required<\n Pick<WizardNavigationLabels, 'back' | 'skip' | 'next' | 'start' | 'finish'>\n> = {\n back: 'Back',\n skip: 'Skip for now',\n next: 'Next',\n start: 'Next',\n finish: 'Finish',\n};\n\nfunction resolveLabel(\n label: WizardNavigationLabel,\n ctx: { index: number; total: number; id: string },\n): string {\n return typeof label === 'function' ? label(ctx) : label;\n}\n\n/**\n * Back / Skip / Next footer.\n *\n * Next label resolves from context:\n * - `labels.start` when currentStepIndex === 0\n * - `labels.finish` when currentStepIndex === totalSteps - 2 (last content step)\n * - `labels.next` otherwise\n *\n * Omit `showSkip` to hide Skip entirely. Skip is also hidden on the first\n * and last-content steps by default (where it's semantically meaningless).\n */\nexport const WizardNavigation = forwardRef<HTMLDivElement, WizardNavigationProps>(\n function WizardNavigationImpl(\n {\n labels,\n showSkip = false,\n onBack,\n onNext,\n onSkip,\n className,\n 'data-testid': testId = 'wizard-navigation',\n },\n ref,\n ): ReactElement {\n const { currentStepIndex, currentStepId, totalSteps, steps, isLoading, onStepChange } =\n useWizardContext();\n\n const ctx = { index: currentStepIndex, total: totalSteps, id: currentStepId };\n const resolved = {\n back: resolveLabel(labels?.back ?? DEFAULT_LABELS.back, ctx),\n skip: resolveLabel(labels?.skip ?? DEFAULT_LABELS.skip, ctx),\n next: resolveLabel(labels?.next ?? DEFAULT_LABELS.next, ctx),\n start: resolveLabel(labels?.start ?? labels?.next ?? DEFAULT_LABELS.start, ctx),\n finish: resolveLabel(labels?.finish ?? DEFAULT_LABELS.finish, ctx),\n };\n\n const isFirstStep = currentStepIndex === 0;\n const isLastStep = currentStepIndex === totalSteps - 1;\n const isLastContentStep = currentStepIndex === totalSteps - 2;\n const showBack = !isFirstStep && !isLastStep;\n const showNext = !isLastStep;\n const showSkipResolved = showSkip && !isFirstStep && !isLastStep && !isLastContentStep;\n\n const nextLabel = isFirstStep\n ? resolved.start\n : isLastContentStep\n ? resolved.finish\n : resolved.next;\n\n const handleBack = (): void => {\n const target = Math.max(0, currentStepIndex - 1);\n onStepChange({\n index: target,\n id: steps[target]?.id ?? '',\n label: steps[target]?.label ?? '',\n reason: 'back',\n });\n onBack?.();\n };\n\n const handleNext = (): void => {\n const target = Math.min(totalSteps - 1, currentStepIndex + 1);\n onStepChange({\n index: target,\n id: steps[target]?.id ?? '',\n label: steps[target]?.label ?? '',\n reason: 'next',\n });\n onNext?.();\n };\n\n const handleSkip = (): void => {\n const target = Math.min(totalSteps - 1, currentStepIndex + 1);\n onStepChange({\n index: target,\n id: steps[target]?.id ?? '',\n label: steps[target]?.label ?? '',\n reason: 'skip',\n });\n onSkip?.();\n };\n\n return (\n <div\n ref={ref}\n className={cn(wizardNavigationVariants(), className)}\n data-testid={testId}\n >\n <div className={wizardNavigationLeftVariants()}>\n {showBack ? (\n <Button\n variant=\"secondary\"\n onPress={handleBack}\n isDisabled={isLoading}\n data-testid={`${testId}-back`}\n >\n <ArrowLeft className=\"mr-1 h-4 w-4 rtl:rotate-180\" aria-hidden=\"true\" />\n {resolved.back}\n </Button>\n ) : null}\n </div>\n <div className={wizardNavigationRightVariants()}>\n {showSkipResolved ? (\n <Button\n variant=\"ghost\"\n onPress={handleSkip}\n isDisabled={isLoading}\n data-testid={`${testId}-skip`}\n >\n {resolved.skip}\n </Button>\n ) : null}\n {showNext ? (\n <Button\n variant=\"default\"\n onPress={handleNext}\n isDisabled={isLoading}\n loading={isLoading}\n data-testid={`${testId}-next`}\n >\n {nextLabel}\n {!isLastContentStep ? (\n <ArrowRight className=\"ml-1 h-4 w-4 rtl:rotate-180\" aria-hidden=\"true\" />\n ) : null}\n </Button>\n ) : null}\n </div>\n </div>\n );\n },\n);\n\nWizardNavigation.displayName = 'Wizard.Navigation';\n","'use client';\n\nimport { forwardRef, type ReactElement } from 'react';\nimport { cn } from '../../utils/cn';\nimport { useWizardContext } from './WizardContext';\nimport {\n wizardMobileProgressCaptionTitleVariants,\n wizardMobileProgressCaptionVariants,\n wizardMobileProgressContainerVariants,\n wizardMobileProgressDotRowVariants,\n wizardMobileProgressDotVariants,\n} from './Wizard.styles';\nimport type { WizardMobileProgressProps } from './Wizard.types';\n\n/**\n * Horizontal dot progress for narrow viewports, with a visible caption below\n * the dots (\"Step N of M · Title\"). Hidden on lg+ where `Wizard.Stepper` is the\n * primary indicator.\n *\n * Accessibility:\n * - `role=\"progressbar\"` on the container.\n * - `aria-label=\"Wizard progress\"` names the widget.\n * - `aria-valuetext` carries the \"Step N of M: Title\" state.\n * - The visible caption is redundant with `aria-valuetext` — that's intentional\n * so sighted users also see the orientation; `aria-valuetext` already speaks\n * it, so the caption is marked `aria-hidden` to avoid double-announcement.\n */\nexport const WizardMobileProgress = forwardRef<HTMLDivElement, WizardMobileProgressProps>(\n function WizardMobileProgressImpl(\n { className, 'data-testid': testId = 'wizard-mobile-progress' },\n ref,\n ): ReactElement {\n const { currentStepIndex, steps, totalSteps } = useWizardContext();\n const currentLabel = steps[currentStepIndex]?.label;\n const valueText = currentLabel\n ? `Step ${currentStepIndex + 1} of ${totalSteps}: ${currentLabel}`\n : `Step ${currentStepIndex + 1} of ${totalSteps}`;\n\n return (\n <div\n ref={ref}\n className={cn(wizardMobileProgressContainerVariants(), className)}\n role=\"progressbar\"\n aria-label=\"Wizard progress\"\n aria-valuemin={1}\n aria-valuemax={totalSteps}\n aria-valuenow={currentStepIndex + 1}\n aria-valuetext={valueText}\n data-testid={testId}\n >\n <div className={wizardMobileProgressDotRowVariants()}>\n {steps.map((step, index) => {\n const state: 'completed' | 'current' | 'upcoming' =\n index < currentStepIndex\n ? 'completed'\n : index === currentStepIndex\n ? 'current'\n : 'upcoming';\n return (\n <span\n key={step.id}\n className={wizardMobileProgressDotVariants({ state })}\n aria-hidden=\"true\"\n data-testid={`${testId}-dot-${step.id}`}\n />\n );\n })}\n </div>\n {currentLabel ? (\n <p\n className={wizardMobileProgressCaptionVariants()}\n aria-hidden=\"true\"\n data-testid={`${testId}-caption`}\n >\n Step {currentStepIndex + 1} of {totalSteps}\n {' · '}\n <span className={wizardMobileProgressCaptionTitleVariants()}>{currentLabel}</span>\n </p>\n ) : null}\n </div>\n );\n },\n);\n\nWizardMobileProgress.displayName = 'Wizard.MobileProgress';\n","'use client';\n\n/**\n * Wizard - Compound Root\n *\n * Accessible multi-step wizard for linear flows. WCAG 2.2 AAA.\n *\n * ARIA pattern:\n * - Stepper uses <ol> + `aria-current=\"step\"` (NOT role=\"tablist\" — wizards are linear, not parallel).\n * - Polite live region announces \"Step N of M\" on every step change (title is spoken by the focused heading).\n * - Assertive live region announces errors when the `errors` prop changes.\n * - Focus lands on the active step's heading via `tabIndex={-1}` after advance — NOT on the first form field.\n *\n * @see USWDS Step Indicator https://designsystem.digital.gov/components/step-indicator/\n * @see GOV.UK multi-page forms https://www.w3.org/WAI/tutorials/forms/multi-page/\n */\n\nimport {\n forwardRef,\n useCallback,\n useEffect,\n useMemo,\n useRef,\n useState,\n type ReactElement,\n} from 'react';\nimport { cn } from '../../utils/cn';\nimport { WizardContext, type WizardContextValue } from './WizardContext';\nimport { WizardLayout } from './WizardLayout';\nimport { WizardStepper } from './WizardStepper';\nimport { WizardContent } from './WizardContent';\nimport { WizardStep } from './WizardStep';\nimport { WizardNavigation } from './WizardNavigation';\nimport { WizardMobileProgress } from './WizardMobileProgress';\nimport {\n wizardLiveRegionVariants,\n wizardRootVariants,\n} from './Wizard.styles';\nimport type { WizardProps } from './Wizard.types';\n\nconst defaultAnnounceTemplate = (\n index: number,\n total: number,\n): string => `Step ${index} of ${total}`;\n\nconst WizardRoot = forwardRef<HTMLDivElement, WizardProps>(function WizardRoot(\n {\n children,\n currentStep,\n steps,\n onStepChange,\n isLoading = false,\n errors,\n announceTemplate = defaultAnnounceTemplate,\n stepHeadingLevel = 'h3',\n className,\n id,\n 'aria-label': ariaLabel,\n 'aria-labelledby': ariaLabelledBy,\n 'data-testid': testId = 'wizard',\n },\n ref,\n): ReactElement {\n // Clamp currentStep into valid range so off-by-one bugs in consumers don't break announcements.\n const clampedIndex = Math.min(Math.max(currentStep, 0), Math.max(steps.length - 1, 0));\n const current = steps[clampedIndex];\n const currentStepId = current?.id ?? '';\n const currentStepLabel = current?.label ?? '';\n\n // Polite announcement (step progress) — root-owned, never remounts.\n const [politeMessage, setPoliteMessage] = useState<string>('');\n useEffect(() => {\n if (steps.length === 0) return;\n setPoliteMessage(announceTemplate(clampedIndex + 1, steps.length, currentStepLabel));\n }, [clampedIndex, steps.length, currentStepLabel, announceTemplate]);\n\n // Assertive error announcement — fires on errors change.\n const [assertiveMessage, setAssertiveMessage] = useState<string>('');\n useEffect(() => {\n if (!errors || errors.length === 0) {\n setAssertiveMessage('');\n return;\n }\n setAssertiveMessage(errors.join('. '));\n }, [errors]);\n\n // Focus-on-change: the active step's heading registers upward; after each step change, we focus it.\n const headingRef = useRef<HTMLHeadingElement | null>(null);\n const skipFocusOnMountRef = useRef(true);\n const registerStepHeading = useCallback((node: HTMLHeadingElement | null) => {\n headingRef.current = node;\n }, []);\n\n useEffect(() => {\n // Don't steal focus on initial mount — only on subsequent step changes.\n if (skipFocusOnMountRef.current) {\n skipFocusOnMountRef.current = false;\n return;\n }\n // Schedule after paint so the new step has mounted and registered its heading.\n const id = requestAnimationFrame(() => {\n headingRef.current?.focus();\n });\n return (): void => cancelAnimationFrame(id);\n }, [clampedIndex]);\n\n const contextValue = useMemo<WizardContextValue>(\n () => ({\n currentStepIndex: clampedIndex,\n currentStepId,\n steps,\n totalSteps: steps.length,\n isLoading,\n errors: errors ?? [],\n announceTemplate,\n stepHeadingLevel,\n onStepChange,\n registerStepHeading,\n }),\n [\n clampedIndex,\n currentStepId,\n steps,\n isLoading,\n errors,\n announceTemplate,\n stepHeadingLevel,\n onStepChange,\n registerStepHeading,\n ],\n );\n\n return (\n <WizardContext.Provider value={contextValue}>\n <div\n ref={ref}\n id={id}\n className={cn(wizardRootVariants(), className)}\n aria-label={ariaLabel}\n aria-labelledby={ariaLabelledBy}\n data-testid={testId}\n data-wizard-step={clampedIndex}\n >\n {children}\n {/* Polite live region: step progress. Rendered once, never remounts. */}\n <div\n role=\"status\"\n aria-live=\"polite\"\n aria-atomic=\"true\"\n className={wizardLiveRegionVariants()}\n data-testid={`${testId}-live-polite`}\n >\n {politeMessage}\n </div>\n {/* Assertive live region: errors. Separate node. */}\n <div\n role=\"alert\"\n aria-live=\"assertive\"\n aria-atomic=\"true\"\n className={wizardLiveRegionVariants()}\n data-testid={`${testId}-live-assertive`}\n >\n {assertiveMessage}\n </div>\n </div>\n </WizardContext.Provider>\n );\n});\n\nWizardRoot.displayName = 'Wizard';\n\n/**\n * Wizard compound component with dot-syntax sub-components.\n *\n * @example\n * ```tsx\n * <Wizard\n * currentStep={step}\n * steps={[\n * { id: 'welcome', label: 'Welcome' },\n * { id: 'logo', label: 'Logo' },\n * ]}\n * onStepChange={(ev) => setStep(ev.index)}\n * >\n * <Wizard.Layout preview={<BrandingPreview />}>\n * <Wizard.Stepper sectionLabel=\"Branding\" sectionNumber={1} totalSections={3} />\n * <Wizard.MobileProgress />\n * <Wizard.Content>\n * <Wizard.Step id=\"welcome\"><WelcomeForm /></Wizard.Step>\n * <Wizard.Step id=\"logo\"><LogoForm /></Wizard.Step>\n * </Wizard.Content>\n * <Wizard.Navigation showSkip />\n * </Wizard.Layout>\n * </Wizard>\n * ```\n */\nexport const Wizard = Object.assign(WizardRoot, {\n Layout: WizardLayout,\n Stepper: WizardStepper,\n Content: WizardContent,\n Step: WizardStep,\n Navigation: WizardNavigation,\n MobileProgress: WizardMobileProgress,\n});\n","import { z } from 'zod';\n\n/**\n * Base props schema for all Themis components\n * Ensures consistent accessibility and styling APIs across the library\n *\n * @see spec.md FR-009 to FR-014 (Accessibility Requirements)\n * @see constitution.md Principle IV (Accessibility First - WCAG 2.2 AA minimum)\n */\nexport const BaseComponentPropsSchema = z.object({\n // Styling\n className: z.string().optional(),\n\n // React\n children: z.any().optional(), // ReactNode not directly supported by Zod\n id: z.string().optional(),\n\n // Accessibility (WCAG 2.2 AA requirements)\n 'aria-label': z.string().optional(),\n 'aria-labelledby': z.string().optional(),\n 'aria-describedby': z.string().optional(),\n 'aria-live': z.enum(['off', 'polite', 'assertive']).optional(),\n 'aria-hidden': z.boolean().optional(),\n\n // Testing & Development\n 'data-testid': z.string().optional(),\n});\n\nexport type BaseComponentProps = z.infer<typeof BaseComponentPropsSchema>;\n","import { z } from 'zod';\nimport { BaseComponentPropsSchema } from '../../schemas/BaseComponentProps';\nimport type { ReactNode, ReactElement } from 'react';\n\n// =============================================================================\n// Step change reasons — drives the `reason` field in onStepChange events\n// =============================================================================\n\nexport const WizardChangeReasonSchema = z.enum(['next', 'back', 'skip', 'jump']);\nexport type WizardChangeReason = z.infer<typeof WizardChangeReasonSchema>;\n\n// =============================================================================\n// Step descriptor\n// =============================================================================\n\nexport const WizardStepDescriptorSchema = z.object({\n id: z.string().min(1),\n label: z.string().min(1),\n description: z.string().optional(),\n});\n\nexport interface WizardStepDescriptor {\n id: string;\n label: string;\n description?: string;\n}\n\n// =============================================================================\n// Step change event\n// =============================================================================\n\nexport interface WizardStepChangeEvent {\n index: number;\n id: string;\n label: string;\n reason: WizardChangeReason;\n}\n\n// =============================================================================\n// Navigation labels\n// =============================================================================\n\nexport interface WizardNavigationLabelContext {\n index: number;\n total: number;\n id: string;\n}\n\nexport type WizardNavigationLabel =\n | string\n | ((ctx: WizardNavigationLabelContext) => string);\n\nexport interface WizardNavigationLabels {\n back?: WizardNavigationLabel;\n skip?: WizardNavigationLabel;\n next?: WizardNavigationLabel;\n start?: WizardNavigationLabel;\n finish?: WizardNavigationLabel;\n}\n\n// =============================================================================\n// Announce template\n// =============================================================================\n\nexport type WizardAnnounceTemplate = (\n index: number,\n total: number,\n label: string,\n) => string;\n\n// =============================================================================\n// Step heading level\n// =============================================================================\n\n/**\n * Heading level for each step's title (the focus target on step change).\n *\n * Defaults to `h3`. Set this so the step heading sits one level below the\n * consumer's surrounding page hierarchy — e.g. a page with an `<h1>` page\n * title and an `<h2>` section should pass `stepHeadingLevel=\"h3\"` (the\n * default), whereas a page whose wizard sits directly under the `<h1>`\n * should pass `\"h2\"` to avoid a skipped heading level (WCAG 1.3.1 / 2.4.10).\n */\nexport const WizardHeadingLevelSchema = z.enum(['h2', 'h3', 'h4', 'h5', 'h6']);\nexport type WizardHeadingLevel = z.infer<typeof WizardHeadingLevelSchema>;\n\n// =============================================================================\n// Wizard Root\n// =============================================================================\n\nexport const WizardPropsSchema = BaseComponentPropsSchema.extend({\n children: z.custom<ReactNode>(),\n currentStep: z.number().int().min(0),\n steps: z.array(WizardStepDescriptorSchema).min(1),\n onStepChange: z.custom<(event: WizardStepChangeEvent) => void>(),\n isLoading: z.boolean().optional().default(false),\n errors: z.array(z.string()).optional(),\n announceTemplate: z.custom<WizardAnnounceTemplate>().optional(),\n stepHeadingLevel: WizardHeadingLevelSchema.optional().default('h3'),\n});\n\nexport interface WizardProps {\n children: ReactNode;\n currentStep: number;\n steps: WizardStepDescriptor[];\n onStepChange: (event: WizardStepChangeEvent) => void;\n isLoading?: boolean;\n errors?: string[];\n announceTemplate?: WizardAnnounceTemplate;\n /**\n * Heading level for each step's title. Defaults to `'h3'`. See\n * {@link WizardHeadingLevel} for how to pick a level that keeps the\n * consumer's heading hierarchy unbroken.\n */\n stepHeadingLevel?: WizardHeadingLevel;\n className?: string;\n id?: string;\n 'aria-label'?: string;\n 'aria-labelledby'?: string;\n 'data-testid'?: string;\n}\n\n// =============================================================================\n// Wizard.Layout\n// =============================================================================\n\nexport const WizardLayoutPropsSchema = BaseComponentPropsSchema.extend({\n children: z.custom<ReactNode>(),\n preview: z.custom<ReactNode>().optional(),\n helpText: z.string().optional(),\n});\n\nexport interface WizardLayoutProps {\n children: ReactNode;\n preview?: ReactNode;\n helpText?: string;\n className?: string;\n 'data-testid'?: string;\n}\n\n// =============================================================================\n// Wizard.Stepper\n// =============================================================================\n\nexport const WizardStepperPropsSchema = BaseComponentPropsSchema.extend({\n sectionLabel: z.string().optional(),\n sectionNumber: z.number().int().min(1).optional(),\n totalSections: z.number().int().min(1).optional(),\n allowClickOnCompleted: z.boolean().optional().default(true),\n});\n\nexport interface WizardStepperProps {\n sectionLabel?: string;\n sectionNumber?: number;\n totalSections?: number;\n allowClickOnCompleted?: boolean;\n className?: string;\n 'aria-label'?: string;\n 'data-testid'?: string;\n}\n\n// =============================================================================\n// Wizard.Step\n// =============================================================================\n\nexport const WizardStepPropsSchema = BaseComponentPropsSchema.extend({\n id: z.string().min(1),\n children: z.custom<ReactNode>(),\n icon: z.custom<ReactElement>().optional(),\n});\n\nexport interface WizardStepProps {\n id: string;\n children: ReactNode;\n icon?: ReactElement;\n className?: string;\n 'data-testid'?: string;\n}\n\n// =============================================================================\n// Wizard.Content\n// =============================================================================\n\nexport const WizardContentPropsSchema = BaseComponentPropsSchema.extend({\n children: z.custom<ReactNode>(),\n preserveState: z.boolean().optional().default(false),\n});\n\nexport interface WizardContentProps {\n children: ReactNode;\n className?: string;\n 'data-testid'?: string;\n /**\n * When `true`, ALL `Wizard.Step` children stay mounted across step\n * transitions; only the currently-selected step is visible (uses React\n * 19.2's `<Activity>` API so inactive steps' effects pause and their\n * in-memory state survives). This is the same opt-in `preserveState`\n * pattern `Tabs.Panel` uses (see `Tabs.tsx`).\n *\n * Defaults to `false` — preserves the legacy \"render only the active\n * step\" behaviour, so existing consumers see no change.\n *\n * Use this when the step subtrees own non-trivial local state that must\n * survive back/forward navigation (e.g. an autosaving form whose\n * typed-but-not-yet-saved values would otherwise be lost on remount).\n * Memory note: every step is mounted, so don't enable for wizards with\n * heavy per-step initialisation (multiple file uploaders, etc.) — the\n * legacy default exists for that case.\n */\n preserveState?: boolean;\n}\n\n// =============================================================================\n// Wizard.Navigation\n// =============================================================================\n\nexport const WizardNavigationPropsSchema = BaseComponentPropsSchema.extend({\n labels: z.custom<WizardNavigationLabels>().optional(),\n showSkip: z.boolean().optional().default(false),\n onBack: z.custom<() => void>().optional(),\n onNext: z.custom<() => void>().optional(),\n onSkip: z.custom<() => void>().optional(),\n});\n\nexport interface WizardNavigationProps {\n labels?: WizardNavigationLabels;\n showSkip?: boolean;\n onBack?: () => void;\n onNext?: () => void;\n onSkip?: () => void;\n className?: string;\n 'data-testid'?: string;\n}\n\n// =============================================================================\n// Wizard.MobileProgress\n// =============================================================================\n\nexport const WizardMobileProgressPropsSchema = BaseComponentPropsSchema.extend({});\n\nexport interface WizardMobileProgressProps {\n className?: string;\n 'data-testid'?: string;\n}\n"]}
1
+ {"version":3,"sources":["../../../src/utils/cn.ts","../../../src/elements/Wizard/WizardContext.tsx","../../../src/styles/shared-variants.ts","../../../src/elements/Wizard/Wizard.styles.ts","../../../src/elements/Wizard/WizardLayout.tsx","../../../src/elements/Button/Button.styles.ts","../../../src/styles/interaction-states.ts","../../../src/elements/ButtonGroup/ButtonGroupContext.tsx","../../../src/elements/ButtonGroup/ButtonGroup.variants.ts","../../../src/elements/Button/Button.tsx","../../../src/elements/Wizard/WizardStepper.tsx","../../../src/elements/Wizard/WizardContent.tsx","../../../src/elements/Wizard/WizardStep.tsx","../../../src/elements/Wizard/WizardNavigation.tsx","../../../src/elements/Wizard/WizardMobileProgress.tsx","../../../src/elements/Wizard/Wizard.tsx","../../../src/schemas/BaseComponentProps.ts","../../../src/elements/Wizard/Wizard.types.ts"],"names":["cn","inputs","twMerge","clsx","WizardContext","createContext","useWizardContext","ctx","useContext","REDUCED_MOTION","TRANSITION_COLORS","combineStyles","styles","s","wizardRootVariants","cva","wizardLayoutVariants","wizardLayoutMainVariants","wizardLayoutStepperSlotVariants","wizardLayoutContentSlotVariants","wizardLayoutHelpTextVariants","wizardLayoutPreviewVariants","wizardStepperContainerVariants","wizardStepperSectionLabelVariants","wizardStepperSectionHeadingVariants","wizardStepperListVariants","wizardStepperItemVariants","wizardStepperIndicatorColumnVariants","wizardStepperCircleVariants","wizardStepperConnectorVariants","wizardStepperLabelColumnVariants","wizardStepperLabelVariants","wizardStepperLabelTextVariants","wizardStepperCurrentSubtitleVariants","wizardStepContainerVariants","wizardStepHeaderRowVariants","wizardStepIconVariants","wizardStepHeadingVariants","wizardStepDescriptionVariants","wizardContentCardVariants","wizardNavigationVariants","wizardNavigationLeftVariants","wizardNavigationRightVariants","wizardMobileProgressContainerVariants","wizardMobileProgressDotRowVariants","wizardMobileProgressDotVariants","wizardMobileProgressCaptionVariants","wizardMobileProgressCaptionTitleVariants","wizardLiveRegionVariants","WizardLayout","forwardRef","children","stepper","preview","helpText","className","testId","ref","jsxs","jsx","buttonOuterVariants","buttonVisualVariants","PRESSED_STYLES","HIGH_CONTRAST_HOVER","HIGH_CONTRAST_PRESSED","ButtonGroupContext","useButtonGroupContext","ButtonGroupItemContext","useButtonGroupItemContext","buttonGroupItemVariants","Button","memo","buttonVisualClassName","variant","size","visualSize","fullWidth","loading","loadingText","shortcut","isDisabled","paywall","paywallRedirect","paywallDescription","onPress","props","paywallDescriptionId","useId","groupContext","itemContext","effectiveVariant","effectiveSize","effectiveIsDisabled","isInVerticalGroup","effectiveFullWidth","positionClassName","effectiveVisualSize","AriaButton","e","renderProps","Fragment","Loader2","Zap","WizardStepper","sectionLabel","sectionNumber","totalSections","allowClickOnCompleted","ariaLabel","currentStepIndex","steps","onStepChange","isLoading","step","index","isCompleted","isCurrent","stateKey","isClickable","isLast","circleClass","circle","Check","Activity","ReactActivity","mode","isWizardStepElement","child","isValidElement","type","WizardContent","preserveState","currentStepId","stepChildren","Children","childIds","c","descriptorIds","missing","id","extra","active","WizardStep","stepId","icon","registerStepHeading","stepHeadingLevel","descriptor","label","description","headingId","descriptionId","effectiveTestId","Heading","DEFAULT_LABELS","resolveLabel","WizardNavigation","labels","showSkip","onBack","onNext","onSkip","totalSteps","resolved","isFirstStep","isLastStep","isLastContentStep","showBack","showNext","showSkipResolved","nextLabel","handleBack","target","handleNext","handleSkip","ArrowLeft","ArrowRight","WizardMobileProgress","currentLabel","valueText","state","defaultAnnounceTemplate","total","WizardRoot","currentStep","errors","announceTemplate","ariaLabelledBy","clampedIndex","current","currentStepLabel","politeMessage","setPoliteMessage","useState","useEffect","assertiveMessage","setAssertiveMessage","headingRef","useRef","skipFocusOnMountRef","useCallback","node","contextValue","useMemo","Wizard","BaseComponentPropsSchema","z","WizardChangeReasonSchema","WizardStepDescriptorSchema","WizardHeadingLevelSchema","WizardPropsSchema","WizardLayoutPropsSchema","WizardStepperPropsSchema","WizardStepPropsSchema","WizardContentPropsSchema","WizardNavigationPropsSchema","WizardMobileProgressPropsSchema"],"mappings":"6aAcO,SAASA,CAAAA,CAAAA,GAAMC,EAA8B,CAClD,OAAOC,QAAQC,IAAAA,CAAKF,CAAM,CAAC,CAC7B,CCSO,IAAMG,EAAAA,CAAgBC,aAAAA,CAAyC,IAAI,CAAA,CAEnE,SAASC,CAAAA,EAAuC,CACrD,IAAMC,CAAAA,CAAMC,UAAAA,CAAWJ,EAAa,CAAA,CACpC,GAAI,CAACG,CAAAA,CACH,MAAM,IAAI,KAAA,CAAM,yDAAyD,EAE3E,OAAOA,CACT,CCsTO,IAAME,CAAAA,CAAiB,CAC5B,gCACA,4BACF,CAAA,CAKaC,GAAoB,CAC/B,mBAAA,CACA,cACF,CAAA,CA6BO,SAASC,KAAiBC,CAAAA,CAAkD,CACjF,OAAOA,CAAAA,CAAO,QAAQC,CAAAA,EAAK,KAAA,CAAM,QAAQA,CAAC,CAAA,CAAI,CAAC,GAAGA,CAAC,EAAI,CAACA,CAAC,CAAC,CAC5D,KC1XaC,EAAAA,CAAqBC,GAAAA,CAChC,8BACF,CAAA,CAMaC,EAAAA,CAAuBD,GAAAA,CAClC,0CACF,EAEaE,EAAAA,CAA2BF,GAAAA,CACtC,0FACF,CAAA,CAEaG,EAAAA,CAAkCH,IAC7C,oCACF,CAAA,CAEaI,GAAkCJ,GAAAA,CAC7C,gCACF,EAEaK,EAAAA,CAA+BL,GAAAA,CAC1C,mDACF,CAAA,CAEaM,EAAAA,CAA8BN,IACzC,iGACF,CAAA,CAOaO,GAAiCP,GAAAA,CAC5C,qBACF,EAEaQ,EAAAA,CAAoCR,GAAAA,CAC/C,qEACF,CAAA,CAEaS,EAAAA,CAAsCT,IACjD,oDACF,CAAA,CAEaU,GAA4BV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AQ,IAAI,CAC5D,CAAC,EAgBYO,EAAAA,CAAwBR,CAAAA,CAAyB,OAAO,CACnE,EAAA,CAAIC,EAAE,MAAA,EAAO,CAAE,IAAI,CAAC,CAAA,CACpB,SAAUA,CAAAA,CAAE,MAAA,GACZ,IAAA,CAAMA,CAAAA,CAAE,MAAA,EAAqB,CAAE,UACjC,CAAC,EAcYQ,EAAAA,CAA2BT,CAAAA,CAAyB,OAAO,CACtE,QAAA,CAAUC,EAAE,MAAA,EAAkB,CAC9B,cAAeA,CAAAA,CAAE,OAAA,GAAU,QAAA,EAAS,CAAE,QAAQ,KAAK,CACrD,CAAC,CAAA,CA8BYS,GAA8BV,CAAAA,CAAyB,MAAA,CAAO,CACzE,MAAA,CAAQC,CAAAA,CAAE,QAA+B,CAAE,QAAA,GAC3C,QAAA,CAAUA,CAAAA,CAAE,SAAQ,CAAE,QAAA,GAAW,OAAA,CAAQ,KAAK,EAC9C,MAAA,CAAQA,CAAAA,CAAE,QAAmB,CAAE,QAAA,GAC/B,MAAA,CAAQA,CAAAA,CAAE,QAAmB,CAAE,QAAA,GAC/B,MAAA,CAAQA,CAAAA,CAAE,QAAmB,CAAE,QAAA,EACjC,CAAC,CAAA,CAgBYU,GAAkCX,CAAAA,CAAyB,MAAA,CAAO,EAAE","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","'use client';\n\nimport { createContext, useContext } from 'react';\nimport type {\n WizardStepChangeEvent,\n WizardStepDescriptor,\n WizardAnnounceTemplate,\n WizardHeadingLevel,\n} from './Wizard.types';\n\nexport interface WizardContextValue {\n currentStepIndex: number;\n currentStepId: string;\n steps: WizardStepDescriptor[];\n totalSteps: number;\n isLoading: boolean;\n errors: string[];\n announceTemplate: WizardAnnounceTemplate;\n /** Heading level for each step's title. Defaults to `'h3'` at the root. */\n stepHeadingLevel: WizardHeadingLevel;\n onStepChange: (event: WizardStepChangeEvent) => void;\n /** Callback invoked by Wizard.Content after a step change to hand the heading node to the root for focus-on-change. */\n registerStepHeading: (node: HTMLHeadingElement | null) => void;\n}\n\nexport const WizardContext = createContext<WizardContextValue | null>(null);\n\nexport function useWizardContext(): WizardContextValue {\n const ctx = useContext(WizardContext);\n if (!ctx) {\n throw new Error('Wizard compound components must be used within <Wizard>');\n }\n return ctx;\n}\n","/**\n * Shared CVA Variant Utilities\n *\n * Common patterns extracted from component variants for consistency and reduced bundle size.\n * Use these constants in CVA definitions to ensure consistent styling across Themis.\n *\n * @see interaction-states.ts for interaction-specific styles (focus, hover, pressed)\n */\n\n// =============================================================================\n// Focus Ring Patterns\n// =============================================================================\n\n/**\n * Focus-within ring (for container elements with focusable children)\n * Use when the container should show focus when any child is focused\n */\nexport const FOCUS_WITHIN_RING = [\n 'focus-within:outline-none',\n 'focus-within:ring-2',\n 'focus-within:ring-[var(--ring)]',\n 'focus-within:ring-offset-2',\n] as const;\n\n/**\n * Focus-visible ring (for directly focusable elements)\n * Use for buttons, inputs, and other interactive elements\n */\nexport const FOCUS_VISIBLE_RING = [\n 'focus-visible:outline-none',\n 'focus-visible:ring-2',\n 'focus-visible:ring-[var(--ring)]',\n 'focus-visible:ring-offset-2',\n] as const;\n\n/**\n * Standard focus ring (for elements using :focus pseudo-class)\n * Prefer focus-visible when possible for better UX\n */\nexport const FOCUS_RING = [\n 'focus:outline-none',\n 'focus:ring-2',\n 'focus:ring-[var(--ring)]',\n] as const;\n\n/**\n * Focus with background change (for segments, cells, menu items)\n */\nexport const FOCUS_HIGHLIGHT = [\n 'focus:outline-none',\n 'focus:bg-[var(--accent)]',\n 'focus:text-[var(--accent-foreground)]',\n] as const;\n\n// =============================================================================\n// Disabled State Patterns\n// =============================================================================\n\n/**\n * Standard disabled state using disabled attribute\n */\nexport const DISABLED_STANDARD = [\n 'disabled:pointer-events-none',\n 'disabled:opacity-50',\n] as const;\n\n/**\n * Disabled state using data attribute (React Aria pattern)\n */\nexport const DISABLED_DATA_ATTR = [\n 'data-[disabled]:pointer-events-none',\n 'data-[disabled]:opacity-50',\n 'data-[disabled]:cursor-not-allowed',\n] as const;\n\n// =============================================================================\n// Size-Based Text Variants\n// =============================================================================\n\n/**\n * Small text size scale (xs -> sm -> base)\n */\nexport const TEXT_SIZE_SMALL_SCALE = {\n sm: 'text-xs',\n default: 'text-sm',\n lg: 'text-base',\n} as const;\n\n/**\n * Medium text size scale (sm -> base -> lg)\n */\nexport const TEXT_SIZE_MEDIUM_SCALE = {\n sm: 'text-sm',\n default: 'text-base',\n lg: 'text-lg',\n} as const;\n\n// =============================================================================\n// Touch Target Utilities\n// =============================================================================\n\n/**\n * WCAG 2.2 AAA minimum touch target (44x44px)\n */\nexport const TOUCH_TARGET_MIN = [\n 'min-h-[44px]',\n 'min-w-[44px]',\n] as const;\n\n/**\n * Common button/cell sizes with touch target compliance\n */\nexport const INTERACTIVE_SIZES = {\n sm: 'h-9 w-9', // 36px - desktop only, NOT AAA compliant\n default: 'h-11 w-11', // 44px - AAA compliant\n lg: 'h-14 w-14', // 56px - AAA compliant, enhanced\n} as const;\n\n/**\n * Height-only sizes for fields and inputs\n */\nexport const FIELD_HEIGHTS = {\n sm: 'h-9', // 36px\n default: 'h-10', // 40px\n lg: 'h-11', // 44px\n} as const;\n\n/**\n * Layer 2: Visual sizing for form field inputs (height + padding + font).\n * Use on the <input>, <select>, or trigger element itself.\n *\n * Components may append additional classes (e.g. gap-* for segmented fields, py-* for text inputs).\n */\nexport const FIELD_INPUT_SIZES = {\n sm: `${FIELD_HEIGHTS.sm} px-2 text-xs`,\n default: `${FIELD_HEIGHTS.default} px-3 text-sm`,\n lg: `${FIELD_HEIGHTS.lg} px-4 text-base`,\n} as const;\n\n/**\n * Layer 1: Invisible touch target wrapper for form fields.\n * Apply to a <label> (or wrapper div) around the input element.\n * The <label> natively routes clicks/taps to the contained input\n * without JavaScript — achieving a 44px touch target while the\n * input stays at its visual height (h-9/h-10/h-11).\n */\nexport const FIELD_TOUCH_TARGET = 'min-h-[44px] flex items-center' as const;\n\n// =============================================================================\n// Message/Feedback Patterns\n// =============================================================================\n\n/**\n * Error message styling\n */\nexport const ERROR_MESSAGE_BASE = [\n 'flex',\n 'items-center',\n 'gap-1.5',\n 'text-[var(--destructive-background)]',\n] as const;\n\n/**\n * Success message styling\n */\nexport const SUCCESS_MESSAGE_BASE = [\n 'flex',\n 'items-center',\n 'gap-1.5',\n 'text-[var(--success-background)]',\n] as const;\n\n/**\n * Description/helper text styling\n */\nexport const DESCRIPTION_BASE = [\n 'text-[var(--menu-muted)]',\n] as const;\n\n/**\n * Label base styling\n */\nexport const LABEL_BASE = [\n 'font-medium',\n 'text-[var(--content-foreground)]',\n] as const;\n\n/**\n * Required indicator pattern\n */\nexport const REQUIRED_INDICATOR = \"after:content-['*'] after:ml-0.5 after:text-[var(--destructive-background)]\";\n\n// =============================================================================\n// Animation Patterns\n// =============================================================================\n\n/**\n * Popover/dropdown entry animation\n */\nexport const POPOVER_ANIMATION_IN = [\n 'data-[entering]:animate-in',\n 'data-[entering]:fade-in-0',\n 'data-[entering]:zoom-in-95',\n] as const;\n\n/**\n * Popover/dropdown exit animation\n */\nexport const POPOVER_ANIMATION_OUT = [\n 'data-[exiting]:animate-out',\n 'data-[exiting]:fade-out-0',\n 'data-[exiting]:zoom-out-95',\n] as const;\n\n/**\n * Modal content enter animation (fade + zoom)\n * Uses React Aria data-[entering]/data-[exiting] attributes\n */\nexport const MODAL_ANIMATION_IN = [\n 'data-[entering]:animate-in',\n 'data-[entering]:fade-in-0',\n 'data-[entering]:zoom-in-95',\n 'data-[entering]:duration-200',\n 'data-[entering]:ease-out',\n] as const;\n\n/**\n * Modal content exit animation (fade + zoom)\n * Uses React Aria data-[entering]/data-[exiting] attributes\n */\nexport const MODAL_ANIMATION_OUT = [\n 'data-[exiting]:animate-out',\n 'data-[exiting]:fade-out-0',\n 'data-[exiting]:zoom-out-95',\n 'data-[exiting]:duration-150',\n 'data-[exiting]:ease-in',\n] as const;\n\n/**\n * Modal slide enter animation (fade + slide up)\n */\nexport const MODAL_SLIDE_IN = [\n 'data-[entering]:animate-in',\n 'data-[entering]:fade-in-0',\n 'data-[entering]:slide-in-from-bottom-4',\n 'data-[entering]:duration-200',\n 'data-[entering]:ease-out',\n] as const;\n\n/**\n * Modal slide exit animation (fade + slide down)\n */\nexport const MODAL_SLIDE_OUT = [\n 'data-[exiting]:animate-out',\n 'data-[exiting]:fade-out-0',\n 'data-[exiting]:slide-out-to-bottom-4',\n 'data-[exiting]:duration-150',\n 'data-[exiting]:ease-in',\n] as const;\n\n/**\n * Directional slide animations for edge-anchored drawers (Modal `position` variant).\n *\n * Unitless `slide-in-from-*` / `slide-out-to-*` translate the full extent of the\n * element (100%), so the drawer slides all the way in from / out to its anchored\n * edge — distinct from `MODAL_SLIDE_*` above, which is the small 1rem nudge used by\n * the centred `slide` animation. No `fade` is paired here: a drawer slides, it\n * does not fade. Honour `prefers-reduced-motion` via REDUCED_MOTION on the element.\n */\nexport const MODAL_SLIDE_IN_LEFT = [\n 'data-[entering]:animate-in',\n 'data-[entering]:slide-in-from-left',\n 'data-[entering]:duration-200',\n 'data-[entering]:ease-out',\n] as const;\n\nexport const MODAL_SLIDE_OUT_LEFT = [\n 'data-[exiting]:animate-out',\n 'data-[exiting]:slide-out-to-left',\n 'data-[exiting]:duration-150',\n 'data-[exiting]:ease-in',\n] as const;\n\nexport const MODAL_SLIDE_IN_RIGHT = [\n 'data-[entering]:animate-in',\n 'data-[entering]:slide-in-from-right',\n 'data-[entering]:duration-200',\n 'data-[entering]:ease-out',\n] as const;\n\nexport const MODAL_SLIDE_OUT_RIGHT = [\n 'data-[exiting]:animate-out',\n 'data-[exiting]:slide-out-to-right',\n 'data-[exiting]:duration-150',\n 'data-[exiting]:ease-in',\n] as const;\n\nexport const MODAL_SLIDE_IN_TOP = [\n 'data-[entering]:animate-in',\n 'data-[entering]:slide-in-from-top',\n 'data-[entering]:duration-200',\n 'data-[entering]:ease-out',\n] as const;\n\nexport const MODAL_SLIDE_OUT_TOP = [\n 'data-[exiting]:animate-out',\n 'data-[exiting]:slide-out-to-top',\n 'data-[exiting]:duration-150',\n 'data-[exiting]:ease-in',\n] as const;\n\nexport const MODAL_SLIDE_IN_BOTTOM = [\n 'data-[entering]:animate-in',\n 'data-[entering]:slide-in-from-bottom',\n 'data-[entering]:duration-200',\n 'data-[entering]:ease-out',\n] as const;\n\nexport const MODAL_SLIDE_OUT_BOTTOM = [\n 'data-[exiting]:animate-out',\n 'data-[exiting]:slide-out-to-bottom',\n 'data-[exiting]:duration-150',\n 'data-[exiting]:ease-in',\n] as const;\n\n/**\n * Modal overlay enter/exit animation (fade only)\n */\nexport const MODAL_OVERLAY_IN = [\n 'data-[entering]:animate-in',\n 'data-[entering]:fade-in-0',\n 'data-[entering]:duration-200',\n] as const;\n\nexport const MODAL_OVERLAY_OUT = [\n 'data-[exiting]:animate-out',\n 'data-[exiting]:fade-out-0',\n 'data-[exiting]:duration-150',\n] as const;\n\n/**\n * Reduced motion support (WCAG 2.2)\n */\nexport const REDUCED_MOTION = [\n 'motion-reduce:transition-none',\n 'motion-reduce:animate-none',\n] as const;\n\n/**\n * Standard transition for colors\n */\nexport const TRANSITION_COLORS = [\n 'transition-colors',\n 'duration-200',\n] as const;\n\n/**\n * Fast transition for interactions\n */\nexport const TRANSITION_FAST = [\n 'transition-colors',\n 'duration-150',\n] as const;\n\n// =============================================================================\n// Hover State Patterns\n// =============================================================================\n\n/**\n * Accent background on hover (for interactive items)\n */\nexport const HOVER_ACCENT = [\n 'hover:bg-[var(--accent)]',\n 'hover:text-[var(--accent-foreground)]',\n] as const;\n\n// =============================================================================\n// Helper Functions\n// =============================================================================\n\n/**\n * Combines multiple style arrays into a flat array for CVA base styles\n */\nexport function combineStyles(...styles: (readonly string[] | string)[]): string[] {\n return styles.flatMap(s => Array.isArray(s) ? [...s] : [s]);\n}\n","import { cva } from 'class-variance-authority';\nimport { combineStyles, REDUCED_MOTION, TRANSITION_COLORS } from '../../styles/shared-variants';\n\n// =============================================================================\n// Root — Outer wrapper; holds live regions and step-change effect host\n// =============================================================================\n\nexport const wizardRootVariants = cva(\n 'flex min-h-0 flex-1 flex-col',\n);\n\n// =============================================================================\n// Layout — 3-column grid helper (stepper | content+nav | preview aside)\n// =============================================================================\n\nexport const wizardLayoutVariants = cva(\n 'flex min-h-0 flex-1 flex-col lg:flex-row',\n);\n\nexport const wizardLayoutMainVariants = cva(\n 'flex min-w-0 flex-1 justify-center gap-8 overflow-y-auto bg-[var(--page-background)] p-6',\n);\n\nexport const wizardLayoutStepperSlotVariants = cva(\n 'hidden w-56 shrink-0 pt-2 lg:block',\n);\n\nexport const wizardLayoutContentSlotVariants = cva(\n 'flex w-full max-w-2xl flex-col',\n);\n\nexport const wizardLayoutHelpTextVariants = cva(\n 'mt-3 text-center text-xs text-[var(--menu-muted)]',\n);\n\nexport const wizardLayoutPreviewVariants = cva(\n 'hidden w-80 shrink-0 border-l border-[var(--border)] bg-[var(--accent-background)] p-6 xl:block',\n);\n\n// =============================================================================\n// Stepper — <ol>/<li> list; flex lives on an inner div (NOT the <ol>/<li>)\n// so implicit list semantics survive Safari's flexbox list-role stripping.\n// =============================================================================\n\nexport const wizardStepperContainerVariants = cva(\n 'flex flex-col gap-2',\n);\n\nexport const wizardStepperSectionLabelVariants = cva(\n 'text-xs font-semibold uppercase tracking-wide text-[var(--primary)]',\n);\n\nexport const wizardStepperSectionHeadingVariants = cva(\n 'text-sm font-bold text-[var(--content-foreground)]',\n);\n\nexport const wizardStepperListVariants = cva(\n 'mt-6 flex flex-col',\n);\n\nexport const wizardStepperItemVariants = cva(\n 'flex items-start',\n);\n\nexport const wizardStepperIndicatorColumnVariants = cva(\n 'flex w-11 shrink-0 flex-col items-center',\n);\n\nexport const wizardStepperCircleVariants = cva(\n combineStyles(\n 'flex h-9 w-9 shrink-0 items-center justify-center rounded-full text-sm font-semibold',\n TRANSITION_COLORS,\n REDUCED_MOTION,\n ),\n {\n variants: {\n state: {\n completed:\n 'bg-[var(--primary)] text-[var(--primary-foreground)] ring-4 ring-[var(--primary)]/25',\n current:\n 'bg-[var(--primary)] text-[var(--primary-foreground)] ring-4 ring-[var(--primary)]/25',\n upcoming:\n 'border border-[var(--border)] bg-[var(--content-background)] text-[var(--menu-muted)]',\n },\n },\n defaultVariants: {\n state: 'upcoming',\n },\n },\n);\n\nexport const wizardStepperConnectorVariants = cva(\n combineStyles('my-0.5 h-5 w-0.5', TRANSITION_COLORS, REDUCED_MOTION),\n {\n variants: {\n completed: {\n true: 'bg-[var(--primary)]',\n false: 'bg-[var(--border)]',\n },\n },\n defaultVariants: {\n completed: false,\n },\n },\n);\n\nexport const wizardStepperLabelColumnVariants = cva(\n 'flex min-h-11 items-center pl-3',\n);\n\nexport const wizardStepperLabelVariants = cva(\n 'flex flex-col justify-center',\n);\n\nexport const wizardStepperLabelTextVariants = cva(\n 'text-sm',\n {\n variants: {\n state: {\n completed: 'font-medium text-[var(--content-foreground)]',\n current: 'font-semibold text-[var(--content-foreground)]',\n upcoming: 'text-[var(--menu-muted)]',\n },\n },\n defaultVariants: {\n state: 'upcoming',\n },\n },\n);\n\nexport const wizardStepperCurrentSubtitleVariants = cva(\n 'text-xs text-[var(--content-foreground)]',\n);\n\n// =============================================================================\n// Step — wraps step heading + description + children\n// =============================================================================\n\nexport const wizardStepContainerVariants = cva(\n 'flex flex-col gap-6',\n);\n\nexport const wizardStepHeaderRowVariants = cva(\n 'flex items-start gap-4',\n);\n\nexport const wizardStepIconVariants = cva(\n 'flex h-12 w-12 shrink-0 items-center justify-center rounded-full bg-[var(--accent-background)] text-[var(--primary)]',\n);\n\nexport const wizardStepHeadingVariants = cva(\n // outline-none safe here because focus-visible ring still shows on :focus-visible;\n // we only remove default outline on programmatic focus (tabIndex={-1}).\n 'text-lg font-bold text-[var(--content-foreground)] focus:outline-none',\n);\n\nexport const wizardStepDescriptionVariants = cva(\n 'mt-1 text-sm text-[var(--menu-muted)]',\n);\n\n// =============================================================================\n// Content — wraps the active step panel\n// =============================================================================\n\nexport const wizardContentCardVariants = cva(\n 'rounded-lg border border-[var(--border)] bg-[var(--content-background)] p-6 text-[var(--content-foreground)]',\n);\n\n// =============================================================================\n// Navigation — Back / Skip / Next footer\n// =============================================================================\n\nexport const wizardNavigationVariants = cva(\n 'mt-4 flex items-center justify-between border-t border-[var(--border)] pt-4',\n);\n\nexport const wizardNavigationLeftVariants = cva('');\n\nexport const wizardNavigationRightVariants = cva(\n 'flex items-center gap-3',\n);\n\n// =============================================================================\n// Mobile progress — role=\"progressbar\" dot indicator\n// =============================================================================\n\nexport const wizardMobileProgressContainerVariants = cva(\n 'flex flex-col items-center gap-1.5 py-3 lg:hidden',\n);\n\nexport const wizardMobileProgressDotRowVariants = cva(\n 'flex items-center justify-center gap-2',\n);\n\nexport const wizardMobileProgressDotVariants = cva(\n combineStyles('h-2 rounded-full transition-all duration-200', REDUCED_MOTION),\n {\n variants: {\n state: {\n completed: 'w-2 bg-[var(--primary)] opacity-60',\n current: 'w-8 bg-[var(--primary)]',\n upcoming: 'w-2 bg-[var(--border)]',\n },\n },\n defaultVariants: {\n state: 'upcoming',\n },\n },\n);\n\nexport const wizardMobileProgressCaptionVariants = cva(\n 'text-xs font-medium text-[var(--menu-muted)]',\n);\n\nexport const wizardMobileProgressCaptionTitleVariants = cva(\n 'text-[var(--content-foreground)]',\n);\n\n// =============================================================================\n// Live regions — visually hidden\n// =============================================================================\n\nexport const wizardLiveRegionVariants = cva(\n 'sr-only',\n);\n","'use client';\n\nimport { forwardRef, type ReactElement, type ReactNode } from 'react';\nimport { cn } from '../../utils/cn';\nimport {\n wizardLayoutContentSlotVariants,\n wizardLayoutHelpTextVariants,\n wizardLayoutMainVariants,\n wizardLayoutPreviewVariants,\n wizardLayoutStepperSlotVariants,\n wizardLayoutVariants,\n} from './Wizard.styles';\nimport type { WizardLayoutProps as BaseWizardLayoutProps } from './Wizard.types';\n\n/**\n * 3-column layout helper.\n *\n * - `stepper` renders in a <nav> on the left, hidden below lg.\n * - `children` render in the centre column (intended for Wizard.MobileProgress,\n * Wizard.Content, Wizard.Navigation, in that order).\n * - `preview` renders in an <aside aria-hidden> on the right, hidden below xl.\n *\n * Wizard.Layout is opinionated. Consumers who need a different arrangement can\n * skip it entirely and compose sub-components themselves — the root (<Wizard>)\n * handles all the a11y plumbing regardless.\n */\n\nexport interface WizardLayoutProps extends BaseWizardLayoutProps {\n stepper?: ReactNode;\n}\n\nexport const WizardLayout = forwardRef<HTMLDivElement, WizardLayoutProps>(\n function WizardLayoutImpl(\n {\n children,\n stepper,\n preview,\n helpText,\n className,\n 'data-testid': testId = 'wizard-layout',\n },\n ref,\n ): ReactElement {\n return (\n <div\n ref={ref}\n className={cn(wizardLayoutVariants(), className)}\n data-testid={testId}\n >\n <div className={wizardLayoutMainVariants()}>\n {stepper ? (\n <nav\n className={wizardLayoutStepperSlotVariants()}\n aria-label=\"Wizard steps\"\n data-testid={`${testId}-stepper-slot`}\n >\n {stepper}\n </nav>\n ) : null}\n <div className={wizardLayoutContentSlotVariants()}>\n {children}\n {helpText ? (\n <p className={wizardLayoutHelpTextVariants()}>{helpText}</p>\n ) : null}\n </div>\n </div>\n {preview ? (\n <aside\n className={wizardLayoutPreviewVariants()}\n aria-hidden=\"true\"\n data-testid={`${testId}-preview`}\n >\n {preview}\n </aside>\n ) : null}\n </div>\n );\n },\n);\n\nWizardLayout.displayName = 'Wizard.Layout';\n","import { cva } from 'class-variance-authority';\n\n/**\n * Layer 1: Transparent outer touch target (44x44px minimum)\n * Handles WCAG 2.2 AAA touch target requirement\n * Always transparent, centers the visual button inside\n * IMPORTANT: Focus ring stays on Layer 1 for AAA compliance (2.4.13)\n *\n * In vertical ButtonGroups, uses items-stretch so the visual layer (Layer 2)\n * can fill the full touch target height, eliminating gaps between buttons.\n */\nexport const buttonOuterVariants = cva(\n \"inline-flex justify-center min-h-[44px] min-w-[44px] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--ring)] focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:pointer-events-none disabled:opacity-50\",\n {\n variants: {\n fullWidth: {\n true: \"w-full\",\n false: \"\",\n },\n inVerticalGroup: {\n true: \"items-stretch\",\n false: \"items-center\",\n },\n },\n defaultVariants: {\n fullWidth: false,\n inVerticalGroup: false,\n },\n }\n);\n\n/**\n * Layer 2: Visual button appearance (adjustable size)\n * Provides the visual appearance with configurable size\n * Can be smaller than touch target for use cases like carousel dots\n * NOTE: NO focus-visible styles here - focus ring is on Layer 1\n */\nexport const buttonVisualVariants = cva(\n \"inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-normal ring-offset-background motion-safe:transition-transform motion-safe:duration-200 motion-safe:[transition-timing-function:cubic-bezier(0.34,1.56,0.64,1)] motion-reduce:transition-none [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 relative cursor-pointer\",\n {\n variants: {\n variant: {\n default:\n \"bg-[var(--primary-action)] text-[var(--primary-action-foreground)] shadow-md hover:bg-[var(--primary-action-hover)] hover:-translate-y-1\",\n destructive:\n \"bg-[var(--destructive-background)] text-[var(--destructive-foreground)] hover:bg-[var(--destructive-background-hover,var(--destructive-background))] motion-safe:hover:btn-warn-shake\",\n outline:\n \"border border-[var(--input-border)] bg-[var(--content-background)] hover:bg-[var(--accent-background)]/50\",\n secondary:\n \"bg-[var(--secondary)] text-[var(--secondary-foreground)] hover:bg-[var(--secondary-hover,var(--secondary))]\",\n ghost:\n \"hover:bg-[var(--accent)] hover:text-[var(--accent-foreground)]\",\n link: \"text-[var(--text-link)] underline underline-offset-4 hover:bg-[var(--accent)] hover:text-[var(--text-link-hover)]\",\n },\n fullWidth: {\n true: \"w-full\",\n false: \"\",\n },\n visualSize: {\n default: \"h-10 px-4 py-2\",\n sm: \"h-9 rounded-md px-3 text-xs\",\n lg: \"h-11 rounded-md px-6 text-base\",\n icon: \"h-10 w-10\",\n dot: \"h-5 w-5 rounded-full p-0 min-h-0 min-w-0\",\n },\n paywall: {\n true: \"!bg-[var(--paywall)] !text-[var(--paywall-foreground)] hover:!bg-[var(--paywall)]/90 !cursor-not-allowed !border-transparent\",\n false: \"\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n visualSize: \"default\",\n paywall: false,\n },\n }\n);\n\n/**\n * @deprecated Use buttonVisualVariants instead. This alias is kept for backward compatibility.\n */\nexport const buttonVariants = buttonVisualVariants;\n","/**\n * Global Interaction State Styles\n *\n * Consistent interaction patterns across all Themis components.\n * These styles ensure WCAG 2.2 AAA compliance and predictable UX.\n *\n * @see spec.md FR-010 (Visible focus ring for keyboard navigation)\n * @see spec.md FR-031 (Pressed state feedback)\n * @see spec.md FR-012 (High contrast mode support)\n * @see constitution.md Principle IV (Accessibility First)\n */\n\n/**\n * Focus state styles (FR-010)\n * Visible focus ring for keyboard navigation - WCAG 2.2 Level AAA\n *\n * Components can override by extending these styles:\n * @example\n * cn(FOCUS_STYLES, \"ring-4\") // Increases ring width to 4px\n */\nexport const FOCUS_STYLES = \"data-[focus-visible]:ring-2 data-[focus-visible]:ring-[var(--themis-ring)] data-[focus-visible]:ring-offset-2\";\n\n/**\n * Pressed/Active state styles (FR-031)\n * Visual feedback for press interactions\n *\n * Components can override the scale amount:\n * @example\n * cn(PRESSED_STYLES_BASE, \"data-[pressed]:scale-[0.95]\") // More pronounced scale\n */\nexport const PRESSED_STYLES = \"data-[pressed]:scale-[0.97]\";\n\n/**\n * Base pressed styles without scale (for components that need different feedback)\n */\nexport const PRESSED_STYLES_BASE = \"data-[pressed]:transition-transform data-[pressed]:duration-100\";\n\n/**\n * Hover state styles\n * Elevation change on hover for better affordance\n *\n * Components can override shadow depth:\n * @example\n * cn(HOVER_STYLES_BASE, \"data-[hovered]:shadow-lg\") // Larger shadow\n */\nexport const HOVER_STYLES = \"\";\n\n/**\n * Base hover styles without shadow (for components that use different hover effects)\n */\nexport const HOVER_STYLES_BASE = \"data-[hovered]:transition-shadow data-[hovered]:duration-200\";\n\n/**\n * High contrast mode focus (FR-012)\n * Enhanced outlines for users requiring high contrast\n *\n * Uses 'hc:' prefix for prefers-contrast: more media query\n */\nexport const HIGH_CONTRAST_FOCUS = \"hc:data-[focus-visible]:outline hc:data-[focus-visible]:outline-4 hc:data-[focus-visible]:outline-offset-2 hc:data-[focus-visible]:outline-foreground\";\n\n/**\n * High contrast mode hover (FR-012)\n * Enhanced outlines for hover in high contrast mode\n */\nexport const HIGH_CONTRAST_HOVER = \"hc:data-[hovered]:outline hc:data-[hovered]:outline-2 hc:data-[hovered]:outline-foreground\";\n\n/**\n * High contrast mode pressed state\n * Enhanced outlines for pressed state in high contrast mode\n */\nexport const HIGH_CONTRAST_PRESSED = \"hc:data-[pressed]:outline hc:data-[pressed]:outline-2 hc:data-[pressed]:outline-offset-1 hc:data-[pressed]:outline-foreground\";\n\n/**\n * Combined high contrast styles\n * Use this for components that need all high contrast interaction states\n */\nexport const HIGH_CONTRAST_INTERACTIONS = `${HIGH_CONTRAST_FOCUS} ${HIGH_CONTRAST_HOVER} ${HIGH_CONTRAST_PRESSED}`;\n\n/**\n * Disabled state styles\n * Consistent disabled appearance across all components\n */\nexport const DISABLED_STYLES = \"disabled:pointer-events-none disabled:opacity-50\";\n\n/**\n * Default interaction bundle\n * Most common combination for interactive components\n *\n * Includes: focus ring, pressed scale, hover shadow, high contrast enhancements\n *\n * @example\n * <button className={cn(DEFAULT_INTERACTIONS, \"bg-primary\")}>Click</button>\n */\nexport const DEFAULT_INTERACTIONS = `${FOCUS_STYLES} ${PRESSED_STYLES} ${HOVER_STYLES} ${HIGH_CONTRAST_FOCUS} ${HIGH_CONTRAST_HOVER} ${HIGH_CONTRAST_PRESSED}`;\n\n/**\n * Subtle interaction bundle\n * For components that need less pronounced feedback\n *\n * Includes: focus ring and high contrast, but no hover shadow or pressed scale\n */\nexport const SUBTLE_INTERACTIONS = `${FOCUS_STYLES} ${HIGH_CONTRAST_FOCUS}`;\n\n/**\n * Non-interactive element styles\n * For elements that should indicate they are not interactive\n */\nexport const NON_INTERACTIVE = \"cursor-default select-none\";\n","\"use client\";\n\nimport { createContext, useContext } from 'react';\nimport type {\n ButtonGroupContextValue,\n ButtonGroupItemContextValue,\n} from './ButtonGroup.types';\n\n/**\n * ButtonGroup Context System (Two-Level)\n *\n * Provides a two-level context pattern for ButtonGroup:\n *\n * 1. ButtonGroupContext (group-level):\n * - Provides: orientation, variant, size, isDisabled\n * - Consumed by: Button (for prop inheritance), Separator (for orientation)\n *\n * 2. ButtonGroupItemContext (item-level):\n * - Provides: position ('first' | 'middle' | 'last' | 'only')\n * - Consumed by: Button (for border-radius styling)\n *\n * Both contexts return null when not in a provider, allowing Button\n * to work standalone without any group context.\n *\n * @see plan.md for architecture details\n * @see ButtonGroup.tsx for Provider implementation\n */\n\n// =============================================================================\n// Group-Level Context\n// =============================================================================\n\n/**\n * Context for group-level props (orientation, variant, size, isDisabled)\n * Default value is null to indicate \"not in a group\"\n */\nconst ButtonGroupContext = createContext<ButtonGroupContextValue | null>(null);\n\nButtonGroupContext.displayName = 'ButtonGroupContext';\n\n/**\n * Hook to access group-level context\n * @returns ButtonGroupContextValue if inside a ButtonGroup, null otherwise\n */\nexport function useButtonGroupContext(): ButtonGroupContextValue | null {\n return useContext(ButtonGroupContext);\n}\n\n// =============================================================================\n// Item-Level Context\n// =============================================================================\n\n/**\n * Context for per-button position information\n * Default value is null to indicate \"not wrapped with position context\"\n */\nconst ButtonGroupItemContext =\n createContext<ButtonGroupItemContextValue | null>(null);\n\nButtonGroupItemContext.displayName = 'ButtonGroupItemContext';\n\n/**\n * Hook to access item-level context (position)\n * @returns ButtonGroupItemContextValue if wrapped with position context, null otherwise\n */\nexport function useButtonGroupItemContext(): ButtonGroupItemContextValue | null {\n return useContext(ButtonGroupItemContext);\n}\n\n// =============================================================================\n// Exports\n// =============================================================================\n\nexport { ButtonGroupContext, ButtonGroupItemContext };\n","import { cva } from 'class-variance-authority';\n\n/**\n * ButtonGroup CVA Variants\n *\n * Defines Class Variance Authority (CVA) variants for:\n * - ButtonGroup container (orientation-based layout)\n * - ButtonGroupItem (position-based border-radius)\n * - ButtonGroupSeparator (orientation-based styling)\n *\n * @see plan.md Phase 1: Design & Contracts - CVA Variants\n * @see constitution.md Principle V (Component Quality Standards)\n */\n\n// =============================================================================\n// Container Variants\n// =============================================================================\n\n/**\n * ButtonGroup container variants\n * Controls the layout direction based on orientation\n * Uses gap-0 to ensure buttons are connected (share borders)\n */\nexport const buttonGroupVariants = cva('inline-flex items-center gap-0', {\n variants: {\n orientation: {\n horizontal: 'flex-row',\n vertical: 'flex-col w-full',\n },\n },\n defaultVariants: {\n orientation: 'horizontal',\n },\n});\n\n// =============================================================================\n// Item Position Variants\n// =============================================================================\n\n/**\n * ButtonGroupItem position variants\n * Applied to Button's visual layer (Layer 2) for position-aware border-radius\n *\n * Compound variants handle both orientation and position combinations:\n * - Horizontal: left/right borders and radii\n * - Vertical: top/bottom borders and radii\n */\nexport const buttonGroupItemVariants = cva('', {\n variants: {\n orientation: {\n // min-w-[44px] ensures visual layer fills touch target width (for icon buttons)\n horizontal: 'min-w-[44px]',\n // flex (overrides inline-flex) + min-h-[44px] makes visual layer fill touch target,\n // eliminating gaps between stacked buttons in vertical orientation\n vertical: 'flex min-h-[44px]',\n },\n position: {\n first: '',\n middle: '',\n last: '',\n only: '', // Single button - no modifications needed\n },\n },\n compoundVariants: [\n // ==========================================================================\n // Horizontal Orientation\n // ==========================================================================\n {\n orientation: 'horizontal',\n position: 'first',\n className: 'rounded-r-none border-r-0',\n },\n {\n orientation: 'horizontal',\n position: 'middle',\n className: 'rounded-none border-r-0',\n },\n {\n orientation: 'horizontal',\n position: 'last',\n className: 'rounded-l-none',\n },\n // ==========================================================================\n // Vertical Orientation\n // Note: w-full is handled by Button's effectiveFullWidth for both layers\n // ==========================================================================\n {\n orientation: 'vertical',\n position: 'first',\n className: 'rounded-b-none border-b-0',\n },\n {\n orientation: 'vertical',\n position: 'middle',\n className: 'rounded-none border-b-0',\n },\n {\n orientation: 'vertical',\n position: 'last',\n className: 'rounded-t-none',\n },\n ],\n defaultVariants: {\n orientation: 'horizontal',\n position: 'only',\n },\n});\n\n// =============================================================================\n// Separator Variants\n// =============================================================================\n\n/**\n * ButtonGroupSeparator variants\n * Orientation-aware visual divider between button groups\n */\nexport const buttonGroupSeparatorVariants = cva('bg-[var(--border)]', {\n variants: {\n orientation: {\n horizontal: 'w-px h-6 mx-1',\n vertical: 'h-px w-full my-1',\n },\n },\n defaultVariants: {\n orientation: 'horizontal',\n },\n});\n","\"use client\";\n\n/**\n * Button Component - 3-Layer Architecture\n * Accessible button with React Aria primitives and CVA styling\n *\n * Architecture:\n * - Layer 1: Touch Target (44x44px WCAG AAA compliant, transparent)\n * - Layer 2: Visual Button (configurable size, colors, borders)\n * - Layer 3: Content & Effects (text, icons, ripple, loading spinner)\n *\n * @see 3layer-plan.md for architecture details\n * @see spec.md FR-029 to FR-037 (Button Component Requirements)\n * @see spec.md FR-009 (WCAG 2.2 AAA - 7:1 contrast ratio)\n * @see spec.md FR-014 (44x44px minimum touch targets)\n * @see constitution.md Principle IV (Accessibility First)\n */\n\nimport { forwardRef, memo, useId } from 'react';\nimport {\n Button as AriaButton,\n type ButtonProps as AriaButtonProps,\n} from 'react-aria-components';\nimport { Loader2, Zap } from 'lucide-react';\nimport { cn } from '../../utils/cn';\nimport type { ButtonProps } from './Button.types';\nimport { buttonOuterVariants, buttonVisualVariants, buttonVariants } from './Button.styles';\nimport { PRESSED_STYLES, HOVER_STYLES, HIGH_CONTRAST_HOVER, HIGH_CONTRAST_PRESSED } from '../../styles/interaction-states';\nimport {\n useButtonGroupContext,\n useButtonGroupItemContext,\n} from '../ButtonGroup/ButtonGroupContext';\nimport { buttonGroupItemVariants } from '../ButtonGroup/ButtonGroup.variants';\n\n/**\n * Button Component - 3-Layer Architecture\n * Fully accessible button with React Aria and themed styling\n *\n * Layer 1: Touch Target (AriaButton) - 44x44px WCAG AAA compliant\n * Layer 2: Visual Button (span) - configurable appearance\n * Layer 3: Content (children) - text, icons, effects\n */\nconst Button = memo(forwardRef<HTMLButtonElement, ButtonProps>(\n (\n {\n className,\n buttonVisualClassName,\n variant,\n size,\n visualSize,\n fullWidth,\n loading = false,\n loadingText = \"Loading...\",\n shortcut,\n children,\n isDisabled,\n paywall = false,\n paywallRedirect,\n paywallDescription,\n onPress,\n ...props\n },\n ref\n ) => {\n const paywallDescriptionId = useId();\n\n // ==========================================================================\n // ButtonGroup Context Integration\n // ==========================================================================\n\n // Consume group-level context (variant, size, isDisabled, orientation)\n const groupContext = useButtonGroupContext();\n\n // Consume item-level context (position for border-radius styling)\n const itemContext = useButtonGroupItemContext();\n\n // Merge context values with props (props take precedence)\n const effectiveVariant = variant ?? groupContext?.variant ?? 'default';\n const effectiveSize = size ?? groupContext?.size;\n const effectiveIsDisabled = isDisabled ?? groupContext?.isDisabled ?? false;\n\n // In vertical groups, buttons should be full width automatically\n const isInVerticalGroup = groupContext?.orientation === 'vertical';\n const effectiveFullWidth = fullWidth || isInVerticalGroup;\n\n // Position styling for ButtonGroup (only applied when in a group)\n const positionClassName = itemContext\n ? buttonGroupItemVariants({\n orientation: groupContext?.orientation ?? 'horizontal',\n position: itemContext.position,\n })\n : '';\n\n // Default visualSize to size for backward compatibility\n const effectiveVisualSize = visualSize ?? effectiveSize ?? 'default';\n\n // AAA Accessibility: Warn in dev/test if icon/dot variant lacks accessible name\n if (process.env.NODE_ENV !== 'production') {\n if (\n (effectiveVisualSize === 'dot' || effectiveVisualSize === 'icon') &&\n !props['aria-label'] &&\n !children\n ) {\n console.warn(\n '[Button] visualSize=\"dot\" or \"icon\" requires aria-label when no visible text is provided (WCAG 1.1.1)'\n );\n }\n }\n\n /**\n * Handle button press - intercepts action when paywalled\n * If paywalled with redirect URL, opens in new tab\n * Otherwise, calls the normal onPress handler\n */\n const handlePress = (e: Parameters<NonNullable<AriaButtonProps['onPress']>>[0]): void => {\n if (paywall) {\n if (paywallRedirect) {\n window.open(paywallRedirect, '_blank', 'noopener,noreferrer');\n }\n // Don't call onPress when paywalled\n return;\n }\n onPress?.(e);\n };\n\n // Only set isDisabled when we have a reason to disable\n // Otherwise, let slot system control disabled state (e.g., in NumberField)\n const computedIsDisabled = effectiveIsDisabled || loading || undefined;\n\n return (\n <AriaButton\n ref={ref}\n isDisabled={computedIsDisabled}\n aria-disabled={paywall ? true : undefined}\n aria-describedby={paywall ? paywallDescriptionId : undefined}\n onPress={handlePress}\n className={cn(buttonOuterVariants({ fullWidth: effectiveFullWidth, inVerticalGroup: isInVerticalGroup }), className)}\n {...props}\n >\n {(renderProps) => (\n /* Layer 2: Visual Button */\n <span\n className={cn(\n buttonVisualVariants({\n variant: effectiveVariant,\n visualSize: effectiveVisualSize,\n paywall,\n fullWidth: effectiveFullWidth,\n }),\n // Position styling from ButtonGroup context (border-radius adjustments)\n positionClassName,\n buttonVisualClassName,\n // Layer 2 interaction styles (no focus - focus ring is on Layer 1)\n PRESSED_STYLES,\n HOVER_STYLES,\n HIGH_CONTRAST_HOVER,\n HIGH_CONTRAST_PRESSED\n )}\n data-pressed={renderProps.isPressed || undefined}\n >\n {/* Layer 3: Content & Effects */}\n\n {/* FR-033: Loading spinner with screen reader announcement */}\n {/* Uses motion-safe: for WCAG 2.3.3 AAA (Animation from Interactions) */}\n {loading && (\n <>\n <Loader2 className=\"motion-safe:animate-spin\" aria-hidden=\"true\" />\n <span className=\"sr-only\" aria-live=\"polite\">\n {loadingText}\n </span>\n </>\n )}\n\n {/* Hide children during loading */}\n {!loading && children}\n\n {/* Paywall: Lightning bolt icon */}\n {paywall && (\n <Zap\n data-testid=\"zap-icon\"\n aria-hidden=\"true\"\n className=\"ml-1\"\n />\n )}\n\n {/* Paywall: Screen reader description */}\n {paywall && (\n <span id={paywallDescriptionId} className=\"sr-only\">\n Premium feature: {paywallDescription || \"Upgrade required to access this feature\"}\n </span>\n )}\n\n {/* FR-034: Keyboard shortcut display on focus */}\n {renderProps.isFocusVisible && shortcut && (\n <kbd className=\"ml-auto hidden text-xs opacity-60 lg:inline\">\n {shortcut}\n </kbd>\n )}\n\n </span>\n )}\n </AriaButton>\n );\n }\n));\n\nButton.displayName = \"Button\";\n\nexport { Button, buttonVariants, buttonOuterVariants, buttonVisualVariants };\nexport type { ButtonProps } from './Button.types';\n","'use client';\n\nimport { forwardRef, type ReactElement } from 'react';\nimport { Check } from 'lucide-react';\nimport { Button } from '../Button/Button';\nimport { cn } from '../../utils/cn';\nimport { useWizardContext } from './WizardContext';\nimport {\n wizardStepperCircleVariants,\n wizardStepperConnectorVariants,\n wizardStepperContainerVariants,\n wizardStepperCurrentSubtitleVariants,\n wizardStepperIndicatorColumnVariants,\n wizardStepperItemVariants,\n wizardStepperLabelColumnVariants,\n wizardStepperLabelTextVariants,\n wizardStepperLabelVariants,\n wizardStepperListVariants,\n wizardStepperSectionHeadingVariants,\n wizardStepperSectionLabelVariants,\n} from './Wizard.styles';\nimport type { WizardStepperProps } from './Wizard.types';\n\n/**\n * Vertical stepper. Semantic <ol> + `aria-current=\"step\"` — NOT role=\"tablist\".\n *\n * The flex layout lives on an inner <div>, not on the <ol>/<li>, so Safari's\n * flexbox list-role stripping doesn't kill the list semantics.\n *\n * Completed steps are clickable when `allowClickOnCompleted` is true and the\n * context exposes `onStepChange`. Current and upcoming steps are not clickable.\n */\nexport const WizardStepper = forwardRef<HTMLDivElement, WizardStepperProps>(\n function WizardStepperImpl(\n {\n sectionLabel,\n sectionNumber,\n totalSections,\n allowClickOnCompleted = true,\n className,\n 'aria-label': ariaLabel,\n 'data-testid': testId = 'wizard-stepper',\n },\n ref,\n ): ReactElement {\n const { currentStepIndex, steps, onStepChange, isLoading } = useWizardContext();\n\n return (\n <div\n ref={ref}\n className={cn(wizardStepperContainerVariants(), className)}\n aria-label={ariaLabel}\n data-testid={testId}\n >\n {sectionLabel && sectionNumber !== undefined && totalSections !== undefined ? (\n <>\n <p className={wizardStepperSectionLabelVariants()}>\n Section {sectionNumber} of {totalSections}\n </p>\n <h2 className={wizardStepperSectionHeadingVariants()}>{sectionLabel}</h2>\n </>\n ) : null}\n\n <ol className={wizardStepperListVariants()}>\n {steps.map((step, index) => {\n const isCompleted = index < currentStepIndex;\n const isCurrent = index === currentStepIndex;\n const stateKey: 'completed' | 'current' | 'upcoming' = isCompleted\n ? 'completed'\n : isCurrent\n ? 'current'\n : 'upcoming';\n const isClickable = isCompleted && allowClickOnCompleted && !isLoading;\n const isLast = index === steps.length - 1;\n\n const circleClass = wizardStepperCircleVariants({ state: stateKey });\n const circle = (\n <span className={circleClass} aria-hidden=\"true\">\n {isCompleted ? <Check className=\"h-4 w-4\" /> : <span>{index + 1}</span>}\n </span>\n );\n\n return (\n <li\n key={step.id}\n data-testid={`${testId}-item-${step.id}`}\n aria-current={isCurrent ? 'step' : undefined}\n >\n <div className={wizardStepperItemVariants()}>\n <div className={wizardStepperIndicatorColumnVariants()}>\n {isClickable ? (\n <Button\n variant=\"ghost\"\n visualSize=\"icon\"\n buttonVisualClassName=\"rounded-full\"\n aria-label={`Go back to ${step.label}`}\n onPress={() =>\n onStepChange({\n index,\n id: step.id,\n label: step.label,\n reason: 'jump',\n })\n }\n data-testid={`${testId}-button-${step.id}`}\n >\n {circle}\n </Button>\n ) : (\n <span className=\"flex h-11 w-11 items-center justify-center\">\n {circle}\n </span>\n )}\n {!isLast ? (\n <span\n className={wizardStepperConnectorVariants({ completed: isCompleted })}\n aria-hidden=\"true\"\n />\n ) : null}\n </div>\n\n <div className={wizardStepperLabelColumnVariants()}>\n <span className={wizardStepperLabelVariants()}>\n <span className={wizardStepperLabelTextVariants({ state: stateKey })}>\n {step.label}\n </span>\n {isCurrent ? (\n <span className={wizardStepperCurrentSubtitleVariants()}>\n Current step\n </span>\n ) : null}\n </span>\n {/* SR orientation for non-current rows; `aria-current=\"step\"` covers current. */}\n {!isCurrent ? (\n <span className=\"sr-only\">\n {isCompleted ? '(completed)' : '(upcoming)'}\n </span>\n ) : null}\n </div>\n </div>\n </li>\n );\n })}\n </ol>\n </div>\n );\n },\n);\n\nWizardStepper.displayName = 'Wizard.Stepper';\n","'use client';\n\nimport {\n Activity as ReactActivity,\n Children,\n forwardRef,\n isValidElement,\n type ReactElement,\n type ReactNode,\n} from 'react';\nimport { cn } from '../../utils/cn';\nimport { useWizardContext } from './WizardContext';\nimport { wizardContentCardVariants } from './Wizard.styles';\nimport type { WizardContentProps, WizardStepProps } from './Wizard.types';\n\n// React 19.2 Activity API — may not be available in every consumer build\n// (pre-19.2 React, or pre-canary chunks). Mirror the `Tabs.tsx` fallback so\n// the component degrades to a plain render rather than crashing the build.\n// The fallback simply renders children directly; the `preserveState` opt-in\n// becomes a no-op in that environment (inactive step state isn't preserved\n// when Activity is unavailable, matching pre-`preserveState` behaviour).\nconst Activity = ReactActivity ?? function ActivityFallback({\n children,\n mode,\n}: {\n children: ReactNode;\n mode: 'visible' | 'hidden';\n}): ReactElement {\n return <div data-activity-mode={mode}>{children}</div>;\n};\n\nfunction isWizardStepElement(\n child: ReactNode,\n): child is ReactElement<WizardStepProps> {\n if (!isValidElement(child)) return false;\n const type = child.type as { displayName?: string } | string;\n if (typeof type === 'string') return false;\n return type?.displayName === 'Wizard.Step';\n}\n\n/**\n * Renders the currently-selected `Wizard.Step`'s subtree.\n *\n * Default mode (legacy, `preserveState={false}`): only the active step is\n * mounted. Inactive steps are unmounted on step change — fast and lean, but\n * any step-local state (Formik values, typed-but-not-yet-saved inputs,\n * autosave timers) is destroyed on every navigation and re-initialised on\n * remount. This preserves the pre-1.5.8 behaviour for existing consumers.\n *\n * Opt-in mode (`preserveState={true}`): ALL `Wizard.Step` children stay\n * mounted across step transitions; only the active one is visible (every\n * step is wrapped in React 19.2's `<Activity mode=\"visible|hidden\">`, which\n * mounts the subtree but pauses effects for the hidden ones). Use this\n * when the candidate's draft state needs to survive back/forward navigation.\n * Mirrors the `Tabs.Panel` `preserveState` pattern.\n *\n * Trade-off: enabling `preserveState` mounts every step on first render, so\n * keep it off for wizards with heavy per-step boot cost (multiple\n * file-upload fields, etc.). The legacy default exists for that case.\n */\nexport const WizardContent = forwardRef<HTMLDivElement, WizardContentProps>(\n function WizardContentImpl(\n {\n children,\n className,\n 'data-testid': testId = 'wizard-content',\n preserveState = false,\n },\n ref,\n ): ReactElement {\n const { currentStepId, steps } = useWizardContext();\n\n const stepChildren = Children.toArray(children).filter(isWizardStepElement);\n\n if (process.env.NODE_ENV !== 'production') {\n const childIds = stepChildren.map((c) => c.props.id);\n const descriptorIds = steps.map((s) => s.id);\n const missing = descriptorIds.filter((id) => !childIds.includes(id));\n const extra = childIds.filter((id) => !descriptorIds.includes(id));\n if (missing.length > 0 || extra.length > 0) {\n console.warn(\n '[Wizard] Wizard.Step children do not match `steps` descriptors. ' +\n (missing.length ? `Missing steps: ${missing.join(', ')}. ` : '') +\n (extra.length ? `Unknown step ids: ${extra.join(', ')}.` : ''),\n );\n }\n }\n\n if (preserveState) {\n // Mount every step; wrap each in Activity so inactive subtrees stay\n // alive but pause their effects. The active step is `mode=\"visible\"`,\n // all others `mode=\"hidden\"`. Children are keyed by step id so React\n // never re-mounts a step subtree when the active index moves.\n return (\n <div\n ref={ref}\n className={cn(wizardContentCardVariants(), className)}\n data-testid={testId}\n >\n {stepChildren.map((child) => (\n <Activity\n key={child.props.id}\n mode={child.props.id === currentStepId ? 'visible' : 'hidden'}\n >\n {child}\n </Activity>\n ))}\n </div>\n );\n }\n\n const active = stepChildren.find((c) => c.props.id === currentStepId) ?? null;\n\n return (\n <div\n ref={ref}\n className={cn(wizardContentCardVariants(), className)}\n data-testid={testId}\n >\n {active}\n </div>\n );\n },\n);\n\nWizardContent.displayName = 'Wizard.Content';\n","'use client';\n\nimport { forwardRef, useId, type ReactElement } from 'react';\nimport { cn } from '../../utils/cn';\nimport { useWizardContext } from './WizardContext';\nimport {\n wizardStepContainerVariants,\n wizardStepDescriptionVariants,\n wizardStepHeaderRowVariants,\n wizardStepHeadingVariants,\n wizardStepIconVariants,\n} from './Wizard.styles';\nimport type { WizardStepProps } from './Wizard.types';\n\n/**\n * A single step panel. Rendered only when it's the active step (Wizard.Content\n * filters). The heading is the focus target after step changes — receives\n * `tabIndex={-1}` so it can be programmatically focused without landing in\n * the tab order.\n *\n * Each step gets its own `useId` for heading + description, then links them\n * via `aria-labelledby` / `aria-describedby` on the <section>.\n */\nexport const WizardStep = forwardRef<HTMLElement, WizardStepProps>(\n function WizardStepImpl(\n { id: stepId, icon, children, className, 'data-testid': testId },\n ref,\n ): ReactElement {\n const { steps, currentStepIndex, registerStepHeading, stepHeadingLevel } =\n useWizardContext();\n const descriptor = steps.find((s) => s.id === stepId);\n const label = descriptor?.label ?? stepId;\n const description = descriptor?.description;\n\n const headingId = useId();\n const descriptionId = useId();\n\n const effectiveTestId = testId ?? `wizard-step-${stepId}`;\n\n // Heading level is consumer-configurable (defaults to `h3` at the root) so\n // the step title nests correctly under the surrounding page hierarchy\n // without skipping a level. The element is still always an HTMLHeadingElement,\n // so the focus-target ref contract is unchanged.\n const Heading = stepHeadingLevel;\n\n return (\n <section\n ref={ref}\n className={cn(wizardStepContainerVariants(), className)}\n aria-labelledby={headingId}\n aria-describedby={description ? descriptionId : undefined}\n data-testid={effectiveTestId}\n data-wizard-step-id={stepId}\n data-wizard-step-index={currentStepIndex}\n >\n <div className={wizardStepHeaderRowVariants()}>\n {icon ? (\n <span className={wizardStepIconVariants()} aria-hidden=\"true\">\n {icon}\n </span>\n ) : null}\n <div>\n <Heading\n id={headingId}\n ref={registerStepHeading}\n tabIndex={-1}\n className={wizardStepHeadingVariants()}\n >\n {label}\n </Heading>\n {description ? (\n <p id={descriptionId} className={wizardStepDescriptionVariants()}>\n {description}\n </p>\n ) : null}\n </div>\n </div>\n <div>{children}</div>\n </section>\n );\n },\n);\n\nWizardStep.displayName = 'Wizard.Step';\n","'use client';\n\nimport { forwardRef, type ReactElement } from 'react';\nimport { ArrowLeft, ArrowRight } from 'lucide-react';\nimport { Button } from '../Button/Button';\nimport { cn } from '../../utils/cn';\nimport { useWizardContext } from './WizardContext';\nimport {\n wizardNavigationLeftVariants,\n wizardNavigationRightVariants,\n wizardNavigationVariants,\n} from './Wizard.styles';\nimport type {\n WizardNavigationLabel,\n WizardNavigationLabels,\n WizardNavigationProps,\n} from './Wizard.types';\n\nconst DEFAULT_LABELS: Required<\n Pick<WizardNavigationLabels, 'back' | 'skip' | 'next' | 'start' | 'finish'>\n> = {\n back: 'Back',\n skip: 'Skip for now',\n next: 'Next',\n start: 'Next',\n finish: 'Finish',\n};\n\nfunction resolveLabel(\n label: WizardNavigationLabel,\n ctx: { index: number; total: number; id: string },\n): string {\n return typeof label === 'function' ? label(ctx) : label;\n}\n\n/**\n * Back / Skip / Next footer.\n *\n * Next label resolves from context:\n * - `labels.start` when currentStepIndex === 0\n * - `labels.finish` when currentStepIndex === totalSteps - 2 (last content step)\n * - `labels.next` otherwise\n *\n * Omit `showSkip` to hide Skip entirely. Skip is also hidden on the first\n * and last-content steps by default (where it's semantically meaningless).\n */\nexport const WizardNavigation = forwardRef<HTMLDivElement, WizardNavigationProps>(\n function WizardNavigationImpl(\n {\n labels,\n showSkip = false,\n onBack,\n onNext,\n onSkip,\n className,\n 'data-testid': testId = 'wizard-navigation',\n },\n ref,\n ): ReactElement {\n const { currentStepIndex, currentStepId, totalSteps, steps, isLoading, onStepChange } =\n useWizardContext();\n\n const ctx = { index: currentStepIndex, total: totalSteps, id: currentStepId };\n const resolved = {\n back: resolveLabel(labels?.back ?? DEFAULT_LABELS.back, ctx),\n skip: resolveLabel(labels?.skip ?? DEFAULT_LABELS.skip, ctx),\n next: resolveLabel(labels?.next ?? DEFAULT_LABELS.next, ctx),\n start: resolveLabel(labels?.start ?? labels?.next ?? DEFAULT_LABELS.start, ctx),\n finish: resolveLabel(labels?.finish ?? DEFAULT_LABELS.finish, ctx),\n };\n\n const isFirstStep = currentStepIndex === 0;\n const isLastStep = currentStepIndex === totalSteps - 1;\n const isLastContentStep = currentStepIndex === totalSteps - 2;\n const showBack = !isFirstStep && !isLastStep;\n const showNext = !isLastStep;\n const showSkipResolved = showSkip && !isFirstStep && !isLastStep && !isLastContentStep;\n\n const nextLabel = isFirstStep\n ? resolved.start\n : isLastContentStep\n ? resolved.finish\n : resolved.next;\n\n const handleBack = (): void => {\n const target = Math.max(0, currentStepIndex - 1);\n onStepChange({\n index: target,\n id: steps[target]?.id ?? '',\n label: steps[target]?.label ?? '',\n reason: 'back',\n });\n onBack?.();\n };\n\n const handleNext = (): void => {\n const target = Math.min(totalSteps - 1, currentStepIndex + 1);\n onStepChange({\n index: target,\n id: steps[target]?.id ?? '',\n label: steps[target]?.label ?? '',\n reason: 'next',\n });\n onNext?.();\n };\n\n const handleSkip = (): void => {\n const target = Math.min(totalSteps - 1, currentStepIndex + 1);\n onStepChange({\n index: target,\n id: steps[target]?.id ?? '',\n label: steps[target]?.label ?? '',\n reason: 'skip',\n });\n onSkip?.();\n };\n\n return (\n <div\n ref={ref}\n className={cn(wizardNavigationVariants(), className)}\n data-testid={testId}\n >\n <div className={wizardNavigationLeftVariants()}>\n {showBack ? (\n <Button\n variant=\"secondary\"\n onPress={handleBack}\n isDisabled={isLoading}\n data-testid={`${testId}-back`}\n >\n <ArrowLeft className=\"mr-1 h-4 w-4 rtl:rotate-180\" aria-hidden=\"true\" />\n {resolved.back}\n </Button>\n ) : null}\n </div>\n <div className={wizardNavigationRightVariants()}>\n {showSkipResolved ? (\n <Button\n variant=\"ghost\"\n onPress={handleSkip}\n isDisabled={isLoading}\n data-testid={`${testId}-skip`}\n >\n {resolved.skip}\n </Button>\n ) : null}\n {showNext ? (\n <Button\n variant=\"default\"\n onPress={handleNext}\n isDisabled={isLoading}\n loading={isLoading}\n data-testid={`${testId}-next`}\n >\n {nextLabel}\n {!isLastContentStep ? (\n <ArrowRight className=\"ml-1 h-4 w-4 rtl:rotate-180\" aria-hidden=\"true\" />\n ) : null}\n </Button>\n ) : null}\n </div>\n </div>\n );\n },\n);\n\nWizardNavigation.displayName = 'Wizard.Navigation';\n","'use client';\n\nimport { forwardRef, type ReactElement } from 'react';\nimport { cn } from '../../utils/cn';\nimport { useWizardContext } from './WizardContext';\nimport {\n wizardMobileProgressCaptionTitleVariants,\n wizardMobileProgressCaptionVariants,\n wizardMobileProgressContainerVariants,\n wizardMobileProgressDotRowVariants,\n wizardMobileProgressDotVariants,\n} from './Wizard.styles';\nimport type { WizardMobileProgressProps } from './Wizard.types';\n\n/**\n * Horizontal dot progress for narrow viewports, with a visible caption below\n * the dots (\"Step N of M · Title\"). Hidden on lg+ where `Wizard.Stepper` is the\n * primary indicator.\n *\n * Accessibility:\n * - `role=\"progressbar\"` on the container.\n * - `aria-label=\"Wizard progress\"` names the widget.\n * - `aria-valuetext` carries the \"Step N of M: Title\" state.\n * - The visible caption is redundant with `aria-valuetext` — that's intentional\n * so sighted users also see the orientation; `aria-valuetext` already speaks\n * it, so the caption is marked `aria-hidden` to avoid double-announcement.\n */\nexport const WizardMobileProgress = forwardRef<HTMLDivElement, WizardMobileProgressProps>(\n function WizardMobileProgressImpl(\n { className, 'data-testid': testId = 'wizard-mobile-progress' },\n ref,\n ): ReactElement {\n const { currentStepIndex, steps, totalSteps } = useWizardContext();\n const currentLabel = steps[currentStepIndex]?.label;\n const valueText = currentLabel\n ? `Step ${currentStepIndex + 1} of ${totalSteps}: ${currentLabel}`\n : `Step ${currentStepIndex + 1} of ${totalSteps}`;\n\n return (\n <div\n ref={ref}\n className={cn(wizardMobileProgressContainerVariants(), className)}\n role=\"progressbar\"\n aria-label=\"Wizard progress\"\n aria-valuemin={1}\n aria-valuemax={totalSteps}\n aria-valuenow={currentStepIndex + 1}\n aria-valuetext={valueText}\n data-testid={testId}\n >\n <div className={wizardMobileProgressDotRowVariants()}>\n {steps.map((step, index) => {\n const state: 'completed' | 'current' | 'upcoming' =\n index < currentStepIndex\n ? 'completed'\n : index === currentStepIndex\n ? 'current'\n : 'upcoming';\n return (\n <span\n key={step.id}\n className={wizardMobileProgressDotVariants({ state })}\n aria-hidden=\"true\"\n data-testid={`${testId}-dot-${step.id}`}\n />\n );\n })}\n </div>\n {currentLabel ? (\n <p\n className={wizardMobileProgressCaptionVariants()}\n aria-hidden=\"true\"\n data-testid={`${testId}-caption`}\n >\n Step {currentStepIndex + 1} of {totalSteps}\n {' · '}\n <span className={wizardMobileProgressCaptionTitleVariants()}>{currentLabel}</span>\n </p>\n ) : null}\n </div>\n );\n },\n);\n\nWizardMobileProgress.displayName = 'Wizard.MobileProgress';\n","'use client';\n\n/**\n * Wizard - Compound Root\n *\n * Accessible multi-step wizard for linear flows. WCAG 2.2 AAA.\n *\n * ARIA pattern:\n * - Stepper uses <ol> + `aria-current=\"step\"` (NOT role=\"tablist\" — wizards are linear, not parallel).\n * - Polite live region announces \"Step N of M\" on every step change (title is spoken by the focused heading).\n * - Assertive live region announces errors when the `errors` prop changes.\n * - Focus lands on the active step's heading via `tabIndex={-1}` after advance — NOT on the first form field.\n *\n * @see USWDS Step Indicator https://designsystem.digital.gov/components/step-indicator/\n * @see GOV.UK multi-page forms https://www.w3.org/WAI/tutorials/forms/multi-page/\n */\n\nimport {\n forwardRef,\n useCallback,\n useEffect,\n useMemo,\n useRef,\n useState,\n type ReactElement,\n} from 'react';\nimport { cn } from '../../utils/cn';\nimport { WizardContext, type WizardContextValue } from './WizardContext';\nimport { WizardLayout } from './WizardLayout';\nimport { WizardStepper } from './WizardStepper';\nimport { WizardContent } from './WizardContent';\nimport { WizardStep } from './WizardStep';\nimport { WizardNavigation } from './WizardNavigation';\nimport { WizardMobileProgress } from './WizardMobileProgress';\nimport {\n wizardLiveRegionVariants,\n wizardRootVariants,\n} from './Wizard.styles';\nimport type { WizardProps } from './Wizard.types';\n\nconst defaultAnnounceTemplate = (\n index: number,\n total: number,\n): string => `Step ${index} of ${total}`;\n\nconst WizardRoot = forwardRef<HTMLDivElement, WizardProps>(function WizardRoot(\n {\n children,\n currentStep,\n steps,\n onStepChange,\n isLoading = false,\n errors,\n announceTemplate = defaultAnnounceTemplate,\n stepHeadingLevel = 'h3',\n className,\n id,\n 'aria-label': ariaLabel,\n 'aria-labelledby': ariaLabelledBy,\n 'data-testid': testId = 'wizard',\n },\n ref,\n): ReactElement {\n // Clamp currentStep into valid range so off-by-one bugs in consumers don't break announcements.\n const clampedIndex = Math.min(Math.max(currentStep, 0), Math.max(steps.length - 1, 0));\n const current = steps[clampedIndex];\n const currentStepId = current?.id ?? '';\n const currentStepLabel = current?.label ?? '';\n\n // Polite announcement (step progress) — root-owned, never remounts.\n const [politeMessage, setPoliteMessage] = useState<string>('');\n useEffect(() => {\n if (steps.length === 0) return;\n setPoliteMessage(announceTemplate(clampedIndex + 1, steps.length, currentStepLabel));\n }, [clampedIndex, steps.length, currentStepLabel, announceTemplate]);\n\n // Assertive error announcement — fires on errors change.\n const [assertiveMessage, setAssertiveMessage] = useState<string>('');\n useEffect(() => {\n if (!errors || errors.length === 0) {\n setAssertiveMessage('');\n return;\n }\n setAssertiveMessage(errors.join('. '));\n }, [errors]);\n\n // Focus-on-change: the active step's heading registers upward; after each step change, we focus it.\n const headingRef = useRef<HTMLHeadingElement | null>(null);\n const skipFocusOnMountRef = useRef(true);\n const registerStepHeading = useCallback((node: HTMLHeadingElement | null) => {\n headingRef.current = node;\n }, []);\n\n useEffect(() => {\n // Don't steal focus on initial mount — only on subsequent step changes.\n if (skipFocusOnMountRef.current) {\n skipFocusOnMountRef.current = false;\n return;\n }\n // Schedule after paint so the new step has mounted and registered its heading.\n const id = requestAnimationFrame(() => {\n headingRef.current?.focus();\n });\n return (): void => cancelAnimationFrame(id);\n }, [clampedIndex]);\n\n const contextValue = useMemo<WizardContextValue>(\n () => ({\n currentStepIndex: clampedIndex,\n currentStepId,\n steps,\n totalSteps: steps.length,\n isLoading,\n errors: errors ?? [],\n announceTemplate,\n stepHeadingLevel,\n onStepChange,\n registerStepHeading,\n }),\n [\n clampedIndex,\n currentStepId,\n steps,\n isLoading,\n errors,\n announceTemplate,\n stepHeadingLevel,\n onStepChange,\n registerStepHeading,\n ],\n );\n\n return (\n <WizardContext.Provider value={contextValue}>\n <div\n ref={ref}\n id={id}\n className={cn(wizardRootVariants(), className)}\n aria-label={ariaLabel}\n aria-labelledby={ariaLabelledBy}\n data-testid={testId}\n data-wizard-step={clampedIndex}\n >\n {children}\n {/* Polite live region: step progress. Rendered once, never remounts. */}\n <div\n role=\"status\"\n aria-live=\"polite\"\n aria-atomic=\"true\"\n className={wizardLiveRegionVariants()}\n data-testid={`${testId}-live-polite`}\n >\n {politeMessage}\n </div>\n {/* Assertive live region: errors. Separate node. */}\n <div\n role=\"alert\"\n aria-live=\"assertive\"\n aria-atomic=\"true\"\n className={wizardLiveRegionVariants()}\n data-testid={`${testId}-live-assertive`}\n >\n {assertiveMessage}\n </div>\n </div>\n </WizardContext.Provider>\n );\n});\n\nWizardRoot.displayName = 'Wizard';\n\n/**\n * Wizard compound component with dot-syntax sub-components.\n *\n * @example\n * ```tsx\n * <Wizard\n * currentStep={step}\n * steps={[\n * { id: 'welcome', label: 'Welcome' },\n * { id: 'logo', label: 'Logo' },\n * ]}\n * onStepChange={(ev) => setStep(ev.index)}\n * >\n * <Wizard.Layout preview={<BrandingPreview />}>\n * <Wizard.Stepper sectionLabel=\"Branding\" sectionNumber={1} totalSections={3} />\n * <Wizard.MobileProgress />\n * <Wizard.Content>\n * <Wizard.Step id=\"welcome\"><WelcomeForm /></Wizard.Step>\n * <Wizard.Step id=\"logo\"><LogoForm /></Wizard.Step>\n * </Wizard.Content>\n * <Wizard.Navigation showSkip />\n * </Wizard.Layout>\n * </Wizard>\n * ```\n */\nexport const Wizard = Object.assign(WizardRoot, {\n Layout: WizardLayout,\n Stepper: WizardStepper,\n Content: WizardContent,\n Step: WizardStep,\n Navigation: WizardNavigation,\n MobileProgress: WizardMobileProgress,\n});\n","import { z } from 'zod';\n\n/**\n * Base props schema for all Themis components\n * Ensures consistent accessibility and styling APIs across the library\n *\n * @see spec.md FR-009 to FR-014 (Accessibility Requirements)\n * @see constitution.md Principle IV (Accessibility First - WCAG 2.2 AA minimum)\n */\nexport const BaseComponentPropsSchema = z.object({\n // Styling\n className: z.string().optional(),\n\n // React\n children: z.any().optional(), // ReactNode not directly supported by Zod\n id: z.string().optional(),\n\n // Accessibility (WCAG 2.2 AA requirements)\n 'aria-label': z.string().optional(),\n 'aria-labelledby': z.string().optional(),\n 'aria-describedby': z.string().optional(),\n 'aria-live': z.enum(['off', 'polite', 'assertive']).optional(),\n 'aria-hidden': z.boolean().optional(),\n\n // Testing & Development\n 'data-testid': z.string().optional(),\n});\n\nexport type BaseComponentProps = z.infer<typeof BaseComponentPropsSchema>;\n","import { z } from 'zod';\nimport { BaseComponentPropsSchema } from '../../schemas/BaseComponentProps';\nimport type { ReactNode, ReactElement } from 'react';\n\n// =============================================================================\n// Step change reasons — drives the `reason` field in onStepChange events\n// =============================================================================\n\nexport const WizardChangeReasonSchema = z.enum(['next', 'back', 'skip', 'jump']);\nexport type WizardChangeReason = z.infer<typeof WizardChangeReasonSchema>;\n\n// =============================================================================\n// Step descriptor\n// =============================================================================\n\nexport const WizardStepDescriptorSchema = z.object({\n id: z.string().min(1),\n label: z.string().min(1),\n description: z.string().optional(),\n});\n\nexport interface WizardStepDescriptor {\n id: string;\n label: string;\n description?: string;\n}\n\n// =============================================================================\n// Step change event\n// =============================================================================\n\nexport interface WizardStepChangeEvent {\n index: number;\n id: string;\n label: string;\n reason: WizardChangeReason;\n}\n\n// =============================================================================\n// Navigation labels\n// =============================================================================\n\nexport interface WizardNavigationLabelContext {\n index: number;\n total: number;\n id: string;\n}\n\nexport type WizardNavigationLabel =\n | string\n | ((ctx: WizardNavigationLabelContext) => string);\n\nexport interface WizardNavigationLabels {\n back?: WizardNavigationLabel;\n skip?: WizardNavigationLabel;\n next?: WizardNavigationLabel;\n start?: WizardNavigationLabel;\n finish?: WizardNavigationLabel;\n}\n\n// =============================================================================\n// Announce template\n// =============================================================================\n\nexport type WizardAnnounceTemplate = (\n index: number,\n total: number,\n label: string,\n) => string;\n\n// =============================================================================\n// Step heading level\n// =============================================================================\n\n/**\n * Heading level for each step's title (the focus target on step change).\n *\n * Defaults to `h3`. Set this so the step heading sits one level below the\n * consumer's surrounding page hierarchy — e.g. a page with an `<h1>` page\n * title and an `<h2>` section should pass `stepHeadingLevel=\"h3\"` (the\n * default), whereas a page whose wizard sits directly under the `<h1>`\n * should pass `\"h2\"` to avoid a skipped heading level (WCAG 1.3.1 / 2.4.10).\n */\nexport const WizardHeadingLevelSchema = z.enum(['h2', 'h3', 'h4', 'h5', 'h6']);\nexport type WizardHeadingLevel = z.infer<typeof WizardHeadingLevelSchema>;\n\n// =============================================================================\n// Wizard Root\n// =============================================================================\n\nexport const WizardPropsSchema = BaseComponentPropsSchema.extend({\n children: z.custom<ReactNode>(),\n currentStep: z.number().int().min(0),\n steps: z.array(WizardStepDescriptorSchema).min(1),\n onStepChange: z.custom<(event: WizardStepChangeEvent) => void>(),\n isLoading: z.boolean().optional().default(false),\n errors: z.array(z.string()).optional(),\n announceTemplate: z.custom<WizardAnnounceTemplate>().optional(),\n stepHeadingLevel: WizardHeadingLevelSchema.optional().default('h3'),\n});\n\nexport interface WizardProps {\n children: ReactNode;\n currentStep: number;\n steps: WizardStepDescriptor[];\n onStepChange: (event: WizardStepChangeEvent) => void;\n isLoading?: boolean;\n errors?: string[];\n announceTemplate?: WizardAnnounceTemplate;\n /**\n * Heading level for each step's title. Defaults to `'h3'`. See\n * {@link WizardHeadingLevel} for how to pick a level that keeps the\n * consumer's heading hierarchy unbroken.\n */\n stepHeadingLevel?: WizardHeadingLevel;\n className?: string;\n id?: string;\n 'aria-label'?: string;\n 'aria-labelledby'?: string;\n 'data-testid'?: string;\n}\n\n// =============================================================================\n// Wizard.Layout\n// =============================================================================\n\nexport const WizardLayoutPropsSchema = BaseComponentPropsSchema.extend({\n children: z.custom<ReactNode>(),\n preview: z.custom<ReactNode>().optional(),\n helpText: z.string().optional(),\n});\n\nexport interface WizardLayoutProps {\n children: ReactNode;\n preview?: ReactNode;\n helpText?: string;\n className?: string;\n 'data-testid'?: string;\n}\n\n// =============================================================================\n// Wizard.Stepper\n// =============================================================================\n\nexport const WizardStepperPropsSchema = BaseComponentPropsSchema.extend({\n sectionLabel: z.string().optional(),\n sectionNumber: z.number().int().min(1).optional(),\n totalSections: z.number().int().min(1).optional(),\n allowClickOnCompleted: z.boolean().optional().default(true),\n});\n\nexport interface WizardStepperProps {\n sectionLabel?: string;\n sectionNumber?: number;\n totalSections?: number;\n allowClickOnCompleted?: boolean;\n className?: string;\n 'aria-label'?: string;\n 'data-testid'?: string;\n}\n\n// =============================================================================\n// Wizard.Step\n// =============================================================================\n\nexport const WizardStepPropsSchema = BaseComponentPropsSchema.extend({\n id: z.string().min(1),\n children: z.custom<ReactNode>(),\n icon: z.custom<ReactElement>().optional(),\n});\n\nexport interface WizardStepProps {\n id: string;\n children: ReactNode;\n icon?: ReactElement;\n className?: string;\n 'data-testid'?: string;\n}\n\n// =============================================================================\n// Wizard.Content\n// =============================================================================\n\nexport const WizardContentPropsSchema = BaseComponentPropsSchema.extend({\n children: z.custom<ReactNode>(),\n preserveState: z.boolean().optional().default(false),\n});\n\nexport interface WizardContentProps {\n children: ReactNode;\n className?: string;\n 'data-testid'?: string;\n /**\n * When `true`, ALL `Wizard.Step` children stay mounted across step\n * transitions; only the currently-selected step is visible (uses React\n * 19.2's `<Activity>` API so inactive steps' effects pause and their\n * in-memory state survives). This is the same opt-in `preserveState`\n * pattern `Tabs.Panel` uses (see `Tabs.tsx`).\n *\n * Defaults to `false` — preserves the legacy \"render only the active\n * step\" behaviour, so existing consumers see no change.\n *\n * Use this when the step subtrees own non-trivial local state that must\n * survive back/forward navigation (e.g. an autosaving form whose\n * typed-but-not-yet-saved values would otherwise be lost on remount).\n * Memory note: every step is mounted, so don't enable for wizards with\n * heavy per-step initialisation (multiple file uploaders, etc.) — the\n * legacy default exists for that case.\n */\n preserveState?: boolean;\n}\n\n// =============================================================================\n// Wizard.Navigation\n// =============================================================================\n\nexport const WizardNavigationPropsSchema = BaseComponentPropsSchema.extend({\n labels: z.custom<WizardNavigationLabels>().optional(),\n showSkip: z.boolean().optional().default(false),\n onBack: z.custom<() => void>().optional(),\n onNext: z.custom<() => void>().optional(),\n onSkip: z.custom<() => void>().optional(),\n});\n\nexport interface WizardNavigationProps {\n labels?: WizardNavigationLabels;\n showSkip?: boolean;\n onBack?: () => void;\n onNext?: () => void;\n onSkip?: () => void;\n className?: string;\n 'data-testid'?: string;\n}\n\n// =============================================================================\n// Wizard.MobileProgress\n// =============================================================================\n\nexport const WizardMobileProgressPropsSchema = BaseComponentPropsSchema.extend({});\n\nexport interface WizardMobileProgressProps {\n className?: string;\n 'data-testid'?: string;\n}\n"]}
@@ -22,6 +22,8 @@ export type { ChartProps, DataPoint, DataSeries, ChartType, ChartVariant, LinePa
22
22
  export { DatePicker, DateRangePicker, DateField, Calendar, dateFieldVariants, dateSegmentVariants, calendarCellVariants, calendarHeaderVariants, calendarNavButtonVariants, calendarGridVariants, calendarGridHeaderCellVariants, datePickerPopoverVariants, datePickerTriggerVariants, datePickerDescriptionVariants, datePickerErrorVariants, datePickerLabelVariants, parseDate, parseDateTime, parseZonedDateTime, today, now, getLocalTimeZone, isWeekend, } from './DatePicker';
23
23
  export { Dropdown, DropdownTrigger, DropdownMenu, DropdownItem, DropdownSeparator, DropdownLabel, menuVariants, menuItemVariants, } from './Dropdown';
24
24
  export type { DropdownProps, DropdownTriggerProps, DropdownMenuProps, DropdownItemProps, DropdownSeparatorProps, DropdownLabelProps, DropdownMenuAlign, DropdownMenuSide, MenuVariantProps, MenuItemVariantProps, } from './Dropdown';
25
+ export { FeatureIcon, featureIconVariants, FeatureIconPropsSchema, FeatureIconSizeSchema, FeatureIconBackgroundSchema, FeatureIconCornersSchema, FeatureIconSectionSchema, } from './FeatureIcon';
26
+ export type { FeatureIconProps, FeatureIconSize, FeatureIconBackground, FeatureIconCorners, FeatureIconSection, } from './FeatureIcon';
25
27
  export { FileField, FilePreview, useFilePreview, FileFieldPropsSchema, formatFileSize, truncateFileName, isFileTypeAccepted, getFileIcon, deduplicateFiles, formatAcceptedTypes, fileFieldContainerVariants, fileFieldDropZoneVariants, fileFieldTriggerVariants, fileFieldItemVariants, fileFieldErrorVariants, } from './FileField';
26
28
  export type { FileFieldProps, FileFieldSize, ValidationResult, } from './FileField';
27
29
  export { Filters, FilterSearch, FilterSelect, FilterMulti, FilterToggle, FilterWithin, FilterCombobox, FilterChips, AppliedFilters, FilterPopover, useFiltersContext, filtersBarVariants, filterPillVariants, filterPopoverVariants, filterPopoverHeaderVariants, appliedFiltersVariants, filterChipVariants, FilterOptionSchema, } from './Filters';