@tribepad/themis 1.5.7 → 1.5.9

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 (179) hide show
  1. package/CHANGELOG.md +17 -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/Badge/index.js +1 -1
  7. package/dist/elements/Badge/index.js.map +1 -1
  8. package/dist/elements/Badge/index.mjs +1 -1
  9. package/dist/elements/Badge/index.mjs.map +1 -1
  10. package/dist/elements/Breadcrumbs/index.js +1 -1
  11. package/dist/elements/Breadcrumbs/index.js.map +1 -1
  12. package/dist/elements/Breadcrumbs/index.mjs +1 -1
  13. package/dist/elements/Breadcrumbs/index.mjs.map +1 -1
  14. package/dist/elements/Button/index.js +1 -1
  15. package/dist/elements/Button/index.js.map +1 -1
  16. package/dist/elements/Button/index.mjs +1 -1
  17. package/dist/elements/Button/index.mjs.map +1 -1
  18. package/dist/elements/Card/index.js +1 -1
  19. package/dist/elements/Card/index.js.map +1 -1
  20. package/dist/elements/Card/index.mjs +1 -1
  21. package/dist/elements/Card/index.mjs.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/Chart/index.js +1 -1
  27. package/dist/elements/Chart/index.js.map +1 -1
  28. package/dist/elements/Chart/index.mjs +1 -1
  29. package/dist/elements/Chart/index.mjs.map +1 -1
  30. package/dist/elements/ChatInterface/index.js +1 -1
  31. package/dist/elements/ChatInterface/index.js.map +1 -1
  32. package/dist/elements/ChatInterface/index.mjs +1 -1
  33. package/dist/elements/ChatInterface/index.mjs.map +1 -1
  34. package/dist/elements/Checkbox/index.js +1 -1
  35. package/dist/elements/Checkbox/index.js.map +1 -1
  36. package/dist/elements/Checkbox/index.mjs +1 -1
  37. package/dist/elements/Checkbox/index.mjs.map +1 -1
  38. package/dist/elements/CheckboxGroup/index.js +1 -1
  39. package/dist/elements/CheckboxGroup/index.js.map +1 -1
  40. package/dist/elements/CheckboxGroup/index.mjs +1 -1
  41. package/dist/elements/CheckboxGroup/index.mjs.map +1 -1
  42. package/dist/elements/ColorPicker/index.js +1 -1
  43. package/dist/elements/ColorPicker/index.js.map +1 -1
  44. package/dist/elements/ColorPicker/index.mjs +1 -1
  45. package/dist/elements/ColorPicker/index.mjs.map +1 -1
  46. package/dist/elements/Combobox/Combobox.styles.d.ts.map +1 -1
  47. package/dist/elements/Combobox/index.js +1 -1
  48. package/dist/elements/Combobox/index.js.map +1 -1
  49. package/dist/elements/Combobox/index.mjs +1 -1
  50. package/dist/elements/Combobox/index.mjs.map +1 -1
  51. package/dist/elements/DatePicker/index.js +1 -1
  52. package/dist/elements/DatePicker/index.js.map +1 -1
  53. package/dist/elements/DatePicker/index.mjs +1 -1
  54. package/dist/elements/DatePicker/index.mjs.map +1 -1
  55. package/dist/elements/Dropdown/index.js +1 -1
  56. package/dist/elements/Dropdown/index.js.map +1 -1
  57. package/dist/elements/Dropdown/index.mjs +1 -1
  58. package/dist/elements/Dropdown/index.mjs.map +1 -1
  59. package/dist/elements/FileField/index.js +1 -1
  60. package/dist/elements/FileField/index.js.map +1 -1
  61. package/dist/elements/FileField/index.mjs +1 -1
  62. package/dist/elements/FileField/index.mjs.map +1 -1
  63. package/dist/elements/Modal/Modal.styles.d.ts.map +1 -1
  64. package/dist/elements/Modal/index.js +1 -1
  65. package/dist/elements/Modal/index.js.map +1 -1
  66. package/dist/elements/Modal/index.mjs +1 -1
  67. package/dist/elements/Modal/index.mjs.map +1 -1
  68. package/dist/elements/NumberField/index.js +1 -1
  69. package/dist/elements/NumberField/index.js.map +1 -1
  70. package/dist/elements/NumberField/index.mjs +1 -1
  71. package/dist/elements/NumberField/index.mjs.map +1 -1
  72. package/dist/elements/PageTitle/PageTitle.d.ts.map +1 -1
  73. package/dist/elements/PageTitle/PageTitle.styles.d.ts.map +1 -1
  74. package/dist/elements/PageTitle/index.js +1 -1
  75. package/dist/elements/PageTitle/index.js.map +1 -1
  76. package/dist/elements/PageTitle/index.mjs +1 -1
  77. package/dist/elements/PageTitle/index.mjs.map +1 -1
  78. package/dist/elements/Pagination/index.js +1 -1
  79. package/dist/elements/Pagination/index.js.map +1 -1
  80. package/dist/elements/Pagination/index.mjs +1 -1
  81. package/dist/elements/Pagination/index.mjs.map +1 -1
  82. package/dist/elements/Panel/Panel.d.ts.map +1 -1
  83. package/dist/elements/Panel/index.js +1 -1
  84. package/dist/elements/Panel/index.js.map +1 -1
  85. package/dist/elements/Panel/index.mjs +1 -1
  86. package/dist/elements/Panel/index.mjs.map +1 -1
  87. package/dist/elements/PasswordField/index.js +1 -1
  88. package/dist/elements/PasswordField/index.js.map +1 -1
  89. package/dist/elements/PasswordField/index.mjs +1 -1
  90. package/dist/elements/PasswordField/index.mjs.map +1 -1
  91. package/dist/elements/RadioGroup/index.js +1 -1
  92. package/dist/elements/RadioGroup/index.js.map +1 -1
  93. package/dist/elements/RadioGroup/index.mjs +1 -1
  94. package/dist/elements/RadioGroup/index.mjs.map +1 -1
  95. package/dist/elements/RatingScale/RatingScale.styles.d.ts.map +1 -1
  96. package/dist/elements/RatingScale/index.js +1 -1
  97. package/dist/elements/RatingScale/index.js.map +1 -1
  98. package/dist/elements/RatingScale/index.mjs +1 -1
  99. package/dist/elements/RatingScale/index.mjs.map +1 -1
  100. package/dist/elements/Resizable/components/ResizablePopover.d.ts.map +1 -1
  101. package/dist/elements/Resizable/index.js +1 -1
  102. package/dist/elements/Resizable/index.js.map +1 -1
  103. package/dist/elements/Resizable/index.mjs +1 -1
  104. package/dist/elements/Resizable/index.mjs.map +1 -1
  105. package/dist/elements/SearchField/index.js +1 -1
  106. package/dist/elements/SearchField/index.js.map +1 -1
  107. package/dist/elements/SearchField/index.mjs +1 -1
  108. package/dist/elements/SearchField/index.mjs.map +1 -1
  109. package/dist/elements/Select/Select.styles.d.ts.map +1 -1
  110. package/dist/elements/Select/index.js +1 -1
  111. package/dist/elements/Select/index.js.map +1 -1
  112. package/dist/elements/Select/index.mjs +1 -1
  113. package/dist/elements/Select/index.mjs.map +1 -1
  114. package/dist/elements/Sidebar/Sidebar.styles.d.ts +34 -3
  115. package/dist/elements/Sidebar/Sidebar.styles.d.ts.map +1 -1
  116. package/dist/elements/Sidebar/Sidebar.types.d.ts +6 -0
  117. package/dist/elements/Sidebar/Sidebar.types.d.ts.map +1 -1
  118. package/dist/elements/Sidebar/SidebarPanel.d.ts.map +1 -1
  119. package/dist/elements/Sidebar/SidebarRail.d.ts.map +1 -1
  120. package/dist/elements/Sidebar/index.js +1 -1
  121. package/dist/elements/Sidebar/index.js.map +1 -1
  122. package/dist/elements/Sidebar/index.mjs +1 -1
  123. package/dist/elements/Sidebar/index.mjs.map +1 -1
  124. package/dist/elements/SituationalJudgement/index.js +1 -1
  125. package/dist/elements/SituationalJudgement/index.js.map +1 -1
  126. package/dist/elements/SituationalJudgement/index.mjs +1 -1
  127. package/dist/elements/SituationalJudgement/index.mjs.map +1 -1
  128. package/dist/elements/Switch/index.js +1 -1
  129. package/dist/elements/Switch/index.js.map +1 -1
  130. package/dist/elements/Switch/index.mjs +1 -1
  131. package/dist/elements/Switch/index.mjs.map +1 -1
  132. package/dist/elements/Table/index.js +1 -1
  133. package/dist/elements/Table/index.js.map +1 -1
  134. package/dist/elements/Table/index.mjs +1 -1
  135. package/dist/elements/Table/index.mjs.map +1 -1
  136. package/dist/elements/Tabs/Tabs.d.ts.map +1 -1
  137. package/dist/elements/Tabs/index.js +1 -1
  138. package/dist/elements/Tabs/index.js.map +1 -1
  139. package/dist/elements/Tabs/index.mjs +1 -1
  140. package/dist/elements/Tabs/index.mjs.map +1 -1
  141. package/dist/elements/TextField/index.js +1 -1
  142. package/dist/elements/TextField/index.js.map +1 -1
  143. package/dist/elements/TextField/index.mjs +1 -1
  144. package/dist/elements/TextField/index.mjs.map +1 -1
  145. package/dist/elements/Toast/Toast.d.ts.map +1 -1
  146. package/dist/elements/Toast/index.js +1 -1
  147. package/dist/elements/Toast/index.js.map +1 -1
  148. package/dist/elements/Toast/index.mjs +1 -1
  149. package/dist/elements/Toast/index.mjs.map +1 -1
  150. package/dist/elements/Tooltip/index.js +1 -1
  151. package/dist/elements/Tooltip/index.js.map +1 -1
  152. package/dist/elements/Tooltip/index.mjs +1 -1
  153. package/dist/elements/Tooltip/index.mjs.map +1 -1
  154. package/dist/elements/Wizard/Wizard.types.d.ts +19 -0
  155. package/dist/elements/Wizard/Wizard.types.d.ts.map +1 -1
  156. package/dist/elements/Wizard/WizardContent.d.ts +17 -8
  157. package/dist/elements/Wizard/WizardContent.d.ts.map +1 -1
  158. package/dist/elements/Wizard/index.js +1 -1
  159. package/dist/elements/Wizard/index.js.map +1 -1
  160. package/dist/elements/Wizard/index.mjs +1 -1
  161. package/dist/elements/Wizard/index.mjs.map +1 -1
  162. package/dist/elements/index.js +1 -1
  163. package/dist/elements/index.js.map +1 -1
  164. package/dist/elements/index.mjs +1 -1
  165. package/dist/elements/index.mjs.map +1 -1
  166. package/dist/index.js +2 -2
  167. package/dist/index.js.map +1 -1
  168. package/dist/index.mjs +2 -2
  169. package/dist/index.mjs.map +1 -1
  170. package/dist/styles/index.js +1 -1
  171. package/dist/styles/index.js.map +1 -1
  172. package/dist/styles/index.mjs +1 -1
  173. package/dist/styles/index.mjs.map +1 -1
  174. package/dist/styles/interaction-states.d.ts +2 -2
  175. package/dist/styles/interaction-states.d.ts.map +1 -1
  176. package/package.json +1 -1
  177. package/src/elements/PageTitle/PageTitle.stories.tsx +15 -19
  178. package/src/elements/Sidebar/Sidebar.stories.tsx +13 -2
  179. package/src/elements/Wizard/Wizard.stories.tsx +95 -0
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/utils/cn.ts","../../../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/schemas/BaseComponentProps.ts","../../../src/elements/Card/Card.types.ts","../../../src/elements/Card/Card.tsx"],"names":["cn","inputs","twMerge","clsx","buttonOuterVariants","cva","buttonVisualVariants","PRESSED_STYLES","HOVER_STYLES","HIGH_CONTRAST_HOVER","HIGH_CONTRAST_PRESSED","ButtonGroupContext","createContext","useButtonGroupContext","useContext","ButtonGroupItemContext","useButtonGroupItemContext","buttonGroupItemVariants","Button","memo","forwardRef","className","buttonVisualClassName","variant","size","visualSize","fullWidth","loading","loadingText","shortcut","children","isDisabled","paywall","paywallRedirect","paywallDescription","onPress","props","ref","paywallDescriptionId","useId","groupContext","itemContext","effectiveVariant","effectiveSize","effectiveIsDisabled","isInVerticalGroup","effectiveFullWidth","positionClassName","effectiveVisualSize","jsx","AriaButton","e","renderProps","jsxs","Fragment","Loader2","Zap","BaseComponentPropsSchema","z","FlipButtonPositionSchema","FlipButtonLabelSchema","FlipButtonIconSchema","CardPropsSchema","CardHeaderPropsSchema","CardTitlePropsSchema","CardDescriptionPropsSchema","CardContentPropsSchema","CardFooterPropsSchema","CardActionPropsSchema","flipButtonPositionVariants","DEFAULT_FLIP_ICON","RotateCcw","FlipButton","label","icon","position","FlippableCard","backContent","controlledFlipped","defaultFlipped","onFlipChange","flipButtonPosition","flipButtonLabel","flipButtonIcon","flipDuration","rest","internalFlipped","setInternalFlipped","useState","isControlled","flipped","handleFlip","useCallback","newState","showLabel","hideLabel","frontIcon","backIcon","Card","flippable","isFlipped","CardHeader","CardTitle","Comp","CardDescription","CardContent","CardFooter","CardAction"],"mappings":"kWAcO,SAASA,CAAAA,CAAAA,GAAMC,CAAAA,CAA8B,CAClD,OAAOC,OAAAA,CAAQC,KAAKF,CAAM,CAAC,CAC7B,CCLO,IAAMG,CAAAA,CAAsBC,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,IAAMC,EAAAA,CAAatF,WACxB,CAAC,CAAE,UAAAC,CAAAA,CAAW,QAAA,CAAAS,EAAU,GAAGM,CAAM,EAAGC,CAAAA,GAClCY,GAAAA,CAAC,UACC,GAAA,CAAKZ,CAAAA,CACL,SAAA,CAAWrC,CAAAA,CAAG,6BAA8BqB,CAAS,CAAA,CACpD,GAAGe,CAAAA,CAEH,QAAA,CAAAN,EACH,CAEJ,EAEA4E,EAAAA,CAAW,WAAA,CAAc,aAMlB,IAAMC,EAAAA,CAAavF,WACxB,CAAC,CAAE,UAAAC,CAAAA,CAAW,QAAA,CAAAS,CAAAA,CAAU,GAAGM,CAAM,CAAA,CAAGC,CAAAA,GAClCY,IAAC,KAAA,CAAA,CACC,GAAA,CAAKZ,EACL,SAAA,CAAWrC,CAAAA,CAAG,UAAWqB,CAAS,CAAA,CACjC,GAAGe,CAAAA,CAEH,QAAA,CAAAN,EACH,CAEJ,EAEA6E,GAAW,WAAA,CAAc,YAAA","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","import { cva } from 'class-variance-authority';\n\n/**\n * Layer 1: Transparent outer touch target (44x44px minimum)\n * Handles WCAG 2.2 AAA touch target requirement\n * Always transparent, centers the visual button inside\n * IMPORTANT: Focus ring stays on Layer 1 for AAA compliance (2.4.13)\n *\n * In vertical ButtonGroups, uses items-stretch so the visual layer (Layer 2)\n * can fill the full touch target height, eliminating gaps between buttons.\n */\nexport const buttonOuterVariants = cva(\n \"inline-flex justify-center min-h-[44px] min-w-[44px] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--ring)] focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:pointer-events-none disabled:opacity-50\",\n {\n variants: {\n fullWidth: {\n true: \"w-full\",\n false: \"\",\n },\n inVerticalGroup: {\n true: \"items-stretch\",\n false: \"items-center\",\n },\n },\n defaultVariants: {\n fullWidth: false,\n inVerticalGroup: false,\n },\n }\n);\n\n/**\n * Layer 2: Visual button appearance (adjustable size)\n * Provides the visual appearance with configurable size\n * Can be smaller than touch target for use cases like carousel dots\n * NOTE: NO focus-visible styles here - focus ring is on Layer 1\n */\nexport const buttonVisualVariants = cva(\n \"inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium ring-offset-background 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)] shadow-md 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)] shadow-md 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-8\",\n icon: \"h-10 w-10\",\n dot: \"h-5 w-5 rounded-full p-0 min-h-0 min-w-0\",\n },\n paywall: {\n true: \"!bg-[var(--paywall)] !text-[var(--paywall-foreground)] !shadow-md hover:!bg-[var(--paywall)]/90 !cursor-not-allowed !border-transparent\",\n false: \"\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n visualSize: \"default\",\n paywall: false,\n },\n }\n);\n\n/**\n * @deprecated Use buttonVisualVariants instead. This alias is kept for backward compatibility.\n */\nexport const buttonVariants = buttonVisualVariants;\n","/**\n * Global Interaction State Styles\n *\n * Consistent interaction patterns across all Themis components.\n * These styles ensure WCAG 2.2 AAA compliance and predictable UX.\n *\n * @see spec.md FR-010 (Visible focus ring for keyboard navigation)\n * @see spec.md FR-031 (Pressed state feedback)\n * @see spec.md FR-012 (High contrast mode support)\n * @see constitution.md Principle IV (Accessibility First)\n */\n\n/**\n * Focus state styles (FR-010)\n * Visible focus ring for keyboard navigation - WCAG 2.2 Level AAA\n *\n * Components can override by extending these styles:\n * @example\n * cn(FOCUS_STYLES, \"ring-4\") // Increases ring width to 4px\n */\nexport const FOCUS_STYLES = \"data-[focus-visible]:ring-2 data-[focus-visible]:ring-[var(--themis-ring)] data-[focus-visible]:ring-offset-2\";\n\n/**\n * Pressed/Active state styles (FR-031)\n * Visual feedback for press interactions\n *\n * Components can override the scale amount:\n * @example\n * cn(PRESSED_STYLES_BASE, \"data-[pressed]:scale-[0.95]\") // More pronounced scale\n */\nexport const PRESSED_STYLES = \"data-[pressed]:scale-[0.97]\";\n\n/**\n * Base pressed styles without scale (for components that need different feedback)\n */\nexport const PRESSED_STYLES_BASE = \"data-[pressed]:transition-transform data-[pressed]:duration-100\";\n\n/**\n * Hover state styles\n * Elevation change on hover for better affordance\n *\n * Components can override shadow depth:\n * @example\n * cn(HOVER_STYLES_BASE, \"data-[hovered]:shadow-lg\") // Larger shadow\n */\nexport const HOVER_STYLES = \"data-[hovered]:shadow-md\";\n\n/**\n * Base hover styles without shadow (for components that use different hover effects)\n */\nexport const HOVER_STYLES_BASE = \"data-[hovered]:transition-shadow data-[hovered]:duration-200\";\n\n/**\n * High contrast mode focus (FR-012)\n * Enhanced outlines for users requiring high contrast\n *\n * Uses 'hc:' prefix for prefers-contrast: more media query\n */\nexport const HIGH_CONTRAST_FOCUS = \"hc:data-[focus-visible]:outline hc:data-[focus-visible]:outline-4 hc:data-[focus-visible]:outline-offset-2 hc:data-[focus-visible]:outline-foreground\";\n\n/**\n * High contrast mode hover (FR-012)\n * Enhanced outlines for hover in high contrast mode\n */\nexport const HIGH_CONTRAST_HOVER = \"hc:data-[hovered]:outline hc:data-[hovered]:outline-2 hc:data-[hovered]:outline-foreground\";\n\n/**\n * High contrast mode pressed state\n * Enhanced outlines for pressed state in high contrast mode\n */\nexport const HIGH_CONTRAST_PRESSED = \"hc:data-[pressed]:outline hc:data-[pressed]:outline-2 hc:data-[pressed]:outline-offset-1 hc:data-[pressed]:outline-foreground\";\n\n/**\n * Combined high contrast styles\n * Use this for components that need all high contrast interaction states\n */\nexport const HIGH_CONTRAST_INTERACTIONS = `${HIGH_CONTRAST_FOCUS} ${HIGH_CONTRAST_HOVER} ${HIGH_CONTRAST_PRESSED}`;\n\n/**\n * Disabled state styles\n * Consistent disabled appearance across all components\n */\nexport const DISABLED_STYLES = \"disabled:pointer-events-none disabled:opacity-50\";\n\n/**\n * Default interaction bundle\n * Most common combination for interactive components\n *\n * Includes: focus ring, pressed scale, hover shadow, high contrast enhancements\n *\n * @example\n * <button className={cn(DEFAULT_INTERACTIONS, \"bg-primary\")}>Click</button>\n */\nexport const DEFAULT_INTERACTIONS = `${FOCUS_STYLES} ${PRESSED_STYLES} ${HOVER_STYLES} ${HIGH_CONTRAST_FOCUS} ${HIGH_CONTRAST_HOVER} ${HIGH_CONTRAST_PRESSED}`;\n\n/**\n * Subtle interaction bundle\n * For components that need less pronounced feedback\n *\n * Includes: focus ring and high contrast, but no hover shadow or pressed scale\n */\nexport const SUBTLE_INTERACTIONS = `${FOCUS_STYLES} ${HIGH_CONTRAST_FOCUS}`;\n\n/**\n * Non-interactive element styles\n * For elements that should indicate they are not interactive\n */\nexport const NON_INTERACTIVE = \"cursor-default select-none\";\n","\"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","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 { cva } from 'class-variance-authority';\nimport { BaseComponentPropsSchema } from '../../schemas/BaseComponentProps';\nimport type { ReactNode } from 'react';\n\n/**\n * Flip button position variants\n * Controls where the flip button appears on the card\n *\n * @see card-prd.md US-5 (Flip Button Position)\n */\nexport const FlipButtonPositionSchema = z.enum([\n 'top-right',\n 'top-left',\n 'bottom-right',\n 'bottom-left',\n]);\nexport type FlipButtonPosition = z.infer<typeof FlipButtonPositionSchema>;\n\n/**\n * Flip button label configuration\n * Custom labels for the flip button title attribute\n *\n * @see card-prd.md US-6 (Custom Labels)\n */\nexport const FlipButtonLabelSchema = z.object({\n show: z.string().optional(),\n hide: z.string().optional(),\n});\nexport type FlipButtonLabel = z.infer<typeof FlipButtonLabelSchema>;\n\n/**\n * Flip button icon configuration\n * Custom icons for the front and back flip buttons\n */\nexport const FlipButtonIconSchema = z.object({\n /** Icon to show on front side button (default: RotateCcw) */\n front: z.custom<ReactNode>().optional(),\n /** Icon to show on back side button (default: same as front or RotateCcw) */\n back: z.custom<ReactNode>().optional(),\n});\nexport type FlipButtonIcon = z.infer<typeof FlipButtonIconSchema>;\n\n/**\n * Card root component props schema\n *\n * @see card-prd.md US-1 (Basic Card Container)\n * @see card-prd.md US-2 (Flippable Card)\n * @see card-prd.md US-3 (Controlled/Uncontrolled State)\n */\nexport const CardPropsSchema = BaseComponentPropsSchema.extend({\n // Flip functionality\n /** Enable flip animation feature (defaults to false in component) */\n flippable: z.boolean().optional(),\n\n /** Content to display on the back side of the card */\n backContent: z.custom<ReactNode>().optional(),\n\n /** Controlled mode: current flip state */\n isFlipped: z.boolean().optional(),\n\n /** Uncontrolled mode: initial flip state (defaults to false in component) */\n defaultFlipped: z.boolean().optional(),\n\n /** Callback fired when flip state changes */\n onFlipChange: z.custom<(isFlipped: boolean) => void>().optional(),\n\n // Flip button configuration\n /** Position of the flip button on the card (defaults to 'top-right' in component) */\n flipButtonPosition: FlipButtonPositionSchema.optional(),\n\n /** Custom labels for the flip button title attribute */\n flipButtonLabel: FlipButtonLabelSchema.optional(),\n\n /** Custom icons for the flip button (default: RotateCcw) */\n flipButtonIcon: FlipButtonIconSchema.optional(),\n\n /** Duration of flip animation in milliseconds (0–350ms, defaults to 250 in component) */\n flipDuration: z.number().min(0).max(350).optional(),\n});\n\n/**\n * Explicit interface to avoid Zod 4 d.ts inference issues where\n * z.infer resolves optional fields as required through complex generics.\n */\nexport interface CardProps {\n className?: string;\n children?: ReactNode;\n id?: string;\n 'aria-label'?: string;\n 'aria-labelledby'?: string;\n 'aria-describedby'?: string;\n 'aria-live'?: 'off' | 'polite' | 'assertive';\n 'aria-hidden'?: boolean;\n 'data-testid'?: string;\n flippable?: boolean;\n backContent?: ReactNode;\n isFlipped?: boolean;\n defaultFlipped?: boolean;\n onFlipChange?: (isFlipped: boolean) => void;\n flipButtonPosition?: FlipButtonPosition;\n flipButtonLabel?: FlipButtonLabel;\n flipButtonIcon?: FlipButtonIcon;\n flipDuration?: number;\n}\n\n/**\n * Explicit variant for flippable cards.\n *\n * Prefer `FlippableCard` over `<Card flippable>` for clearer intent.\n * The `flippable` boolean is not needed — FlippableCard is always flippable.\n *\n * @see card-prd.md US-2 (Flippable Card)\n */\nexport interface FlippableCardProps {\n className?: string;\n /** Content for the front face */\n children?: ReactNode;\n id?: string;\n 'aria-label'?: string;\n 'aria-labelledby'?: string;\n 'aria-describedby'?: string;\n 'aria-live'?: 'off' | 'polite' | 'assertive';\n 'aria-hidden'?: boolean;\n 'data-testid'?: string;\n /** Content to display on the back side of the card */\n backContent?: ReactNode;\n /** Controlled mode: current flip state */\n isFlipped?: boolean;\n /** Uncontrolled mode: initial flip state (defaults to false) */\n defaultFlipped?: boolean;\n /** Callback fired when flip state changes */\n onFlipChange?: (isFlipped: boolean) => void;\n /** Position of the flip button (defaults to 'top-right') */\n flipButtonPosition?: FlipButtonPosition;\n /** Custom labels for the flip button aria-label */\n flipButtonLabel?: FlipButtonLabel;\n /** Custom icons for the flip button (default: RotateCcw) */\n flipButtonIcon?: FlipButtonIcon;\n /** Duration of flip animation in milliseconds (0–350ms, defaults to 250) */\n flipDuration?: number;\n}\n\n/**\n * CardHeader props schema\n *\n * @see card-prd.md US-1 (Basic Card Container)\n */\nexport const CardHeaderPropsSchema = BaseComponentPropsSchema.extend({\n children: z.custom<ReactNode>(),\n});\n\nexport interface CardHeaderProps {\n className?: string;\n children?: ReactNode;\n id?: string;\n 'aria-label'?: string;\n 'aria-labelledby'?: string;\n 'aria-describedby'?: string;\n 'data-testid'?: string;\n}\n\n/**\n * CardTitle props schema\n *\n * @see card-prd.md US-1 (Basic Card Container)\n */\nexport const CardTitlePropsSchema = BaseComponentPropsSchema.extend({\n /** Heading level (h1-h6) - defaults to h3 in component */\n as: z.enum(['h1', 'h2', 'h3', 'h4', 'h5', 'h6']).optional(),\n\n children: z.custom<ReactNode>(),\n});\n\nexport interface CardTitleProps {\n className?: string;\n children?: ReactNode;\n as?: 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6';\n id?: string;\n 'data-testid'?: string;\n}\n\n/**\n * CardDescription props schema\n *\n * @see card-prd.md US-1 (Basic Card Container)\n */\nexport const CardDescriptionPropsSchema = BaseComponentPropsSchema.extend({\n children: z.custom<ReactNode>(),\n});\n\nexport interface CardDescriptionProps {\n className?: string;\n children?: ReactNode;\n id?: string;\n 'data-testid'?: string;\n}\n\n/**\n * CardContent props schema\n *\n * @see card-prd.md US-1 (Basic Card Container)\n */\nexport const CardContentPropsSchema = BaseComponentPropsSchema.extend({\n children: z.custom<ReactNode>(),\n});\n\nexport interface CardContentProps {\n className?: string;\n children?: ReactNode;\n id?: string;\n 'data-testid'?: string;\n}\n\n/**\n * CardFooter props schema\n *\n * @see card-prd.md US-1 (Basic Card Container)\n */\nexport const CardFooterPropsSchema = BaseComponentPropsSchema.extend({\n children: z.custom<ReactNode>(),\n});\n\nexport interface CardFooterProps {\n className?: string;\n children?: ReactNode;\n id?: string;\n 'data-testid'?: string;\n}\n\n/**\n * CardAction props schema\n *\n * @see card-prd.md US-1 (Basic Card Container)\n */\nexport const CardActionPropsSchema = BaseComponentPropsSchema.extend({\n children: z.custom<ReactNode>(),\n});\n\nexport interface CardActionProps {\n className?: string;\n children?: ReactNode;\n id?: string;\n 'data-testid'?: string;\n}\n\n/**\n * CVA variants for flip button positioning\n *\n * Provides consistent positioning classes for the flip button\n * based on the flipButtonPosition prop.\n *\n * Buttons are rendered INSIDE both front and back sides so they\n * flip along with the card content for a more natural feel.\n *\n * @see card-prd.md US-5 (Flip Button Position)\n */\nexport const flipButtonPositionVariants = cva(\n [\n 'absolute z-10 min-h-[44px] min-w-[44px] p-2',\n 'flex items-center justify-center',\n 'rounded-full bg-[var(--accent-background)]',\n 'text-[var(--primary-action)] hover:text-[var(--primary-action-hover)]',\n 'transition-colors duration-200',\n 'focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--ring)]',\n ],\n {\n variants: {\n position: {\n 'top-right': 'top-2 right-2',\n 'top-left': 'top-2 left-2',\n 'bottom-right': 'bottom-2 right-2',\n 'bottom-left': 'bottom-2 left-2',\n },\n },\n defaultVariants: {\n position: 'top-right',\n },\n }\n);\n","'use client';\n\n/**\n * Card Component (TDD Stub)\n *\n * This is a minimal stub to allow tests to run during the RED phase.\n * Full implementation will be added in the GREEN phase.\n *\n * @see card-prd.md (Product Requirements)\n * @see plan.md (Implementation Plan)\n */\n\nimport { forwardRef, useState, useCallback, type HTMLAttributes, type ReactNode } from 'react';\nimport { RotateCcw } from 'lucide-react';\nimport { cn } from '../../utils/cn';\nimport { Button } from '../Button';\nimport {\n flipButtonPositionVariants,\n type CardProps,\n type FlippableCardProps,\n type CardHeaderProps,\n type CardTitleProps,\n type CardDescriptionProps,\n type CardContentProps,\n type CardFooterProps,\n type CardActionProps,\n type FlipButtonPosition,\n} from './Card.types';\n\n// Hoisted static JSX — avoids re-creation on every render\nconst DEFAULT_FLIP_ICON = <RotateCcw className=\"h-5 w-5\" aria-hidden=\"true\" />;\n\n// Extracted from Card body — prevents new component type on every render\nfunction FlipButton({\n label,\n icon,\n onPress,\n position,\n}: {\n label: string;\n icon: ReactNode;\n onPress: () => void;\n position: FlipButtonPosition;\n}) {\n return (\n <Button\n variant=\"ghost\"\n visualSize=\"icon\"\n aria-hidden={true}\n excludeFromTabOrder\n onPress={onPress}\n className={flipButtonPositionVariants({ position })}\n aria-label={label}\n >\n {icon}\n </Button>\n );\n}\n\n// ============================================================================\n// FlippableCard (Explicit Variant)\n// ============================================================================\n\n/**\n * Explicit flippable card variant.\n *\n * Prefer this over `<Card flippable>` — it's self-documenting and avoids\n * a boolean mode gate inside Card's render.\n *\n * @example\n * ```tsx\n * <FlippableCard backContent={<div>Back side</div>}>\n * <CardContent>Front side</CardContent>\n * </FlippableCard>\n * ```\n */\nexport const FlippableCard = forwardRef<HTMLElement, FlippableCardProps & HTMLAttributes<HTMLElement>>(\n (props, ref) => {\n const {\n children,\n className,\n backContent,\n isFlipped: controlledFlipped,\n defaultFlipped = false,\n onFlipChange,\n flipButtonPosition = 'top-right',\n flipButtonLabel,\n flipButtonIcon,\n flipDuration = 250,\n ...rest\n } = props;\n\n // Controlled/uncontrolled state\n const [internalFlipped, setInternalFlipped] = useState(defaultFlipped);\n const isControlled = controlledFlipped !== undefined;\n const flipped = isControlled ? controlledFlipped : internalFlipped;\n\n const handleFlip = useCallback(() => {\n const newState = !flipped;\n if (!isControlled) {\n setInternalFlipped(newState);\n }\n onFlipChange?.(newState);\n }, [flipped, isControlled, onFlipChange]);\n\n const showLabel = flipButtonLabel?.show ?? 'Show more details';\n const hideLabel = flipButtonLabel?.hide ?? 'Show less details';\n\n // Custom icons (back defaults to front if not specified)\n const frontIcon = flipButtonIcon?.front ?? DEFAULT_FLIP_ICON;\n const backIcon = flipButtonIcon?.back ?? flipButtonIcon?.front ?? DEFAULT_FLIP_ICON;\n\n return (\n <article\n ref={ref}\n className={cn('relative', className)}\n style={{ perspective: '1000px' }}\n {...rest}\n >\n {/* Flipper container - handles 3D transform */}\n <div\n className={cn(\n 'relative transition-transform',\n 'motion-reduce:transition-none'\n )}\n style={{\n transformStyle: 'preserve-3d',\n transitionDuration: `${flipDuration}ms`,\n transform: flipped ? 'rotateY(180deg)' : 'rotateY(0deg)',\n }}\n data-flipped={flipped}\n >\n {/* Front side */}\n <div\n className=\"relative rounded-lg border border-[var(--border)] bg-[var(--content-background)] text-[var(--content-foreground)] shadow-sm\"\n style={{ backfaceVisibility: 'hidden' }}\n data-side=\"front\"\n >\n {children}\n <FlipButton label={showLabel} icon={frontIcon} onPress={handleFlip} position={flipButtonPosition} />\n </div>\n\n {/* Back side - scrollable if content overflows */}\n <div\n className=\"absolute inset-0 overflow-y-auto rounded-lg border border-[var(--border)] bg-[var(--content-background)] text-[var(--content-foreground)] shadow-sm\"\n style={{\n backfaceVisibility: 'hidden',\n transform: 'rotateY(180deg)',\n }}\n data-side=\"back\"\n >\n {backContent}\n <FlipButton label={hideLabel} icon={backIcon} onPress={handleFlip} position={flipButtonPosition} />\n </div>\n </div>\n </article>\n );\n }\n);\n\nFlippableCard.displayName = 'FlippableCard';\n\n// ============================================================================\n// Card (Root Component)\n// ============================================================================\n\n/**\n * Basic card container.\n *\n * For flippable cards, prefer the explicit `<FlippableCard>` variant.\n * The `flippable` prop is supported for backward compatibility.\n */\nexport const Card = forwardRef<HTMLElement, CardProps & HTMLAttributes<HTMLElement>>(\n (props, ref) => {\n const {\n children,\n className,\n flippable = false,\n backContent,\n isFlipped,\n defaultFlipped,\n onFlipChange,\n flipButtonPosition,\n flipButtonLabel,\n flipButtonIcon,\n flipDuration,\n ...rest\n } = props;\n\n // Delegate to FlippableCard when flippable mode is enabled\n if (flippable) {\n return (\n <FlippableCard\n ref={ref}\n className={className}\n backContent={backContent}\n isFlipped={isFlipped}\n defaultFlipped={defaultFlipped}\n onFlipChange={onFlipChange}\n flipButtonPosition={flipButtonPosition}\n flipButtonLabel={flipButtonLabel}\n flipButtonIcon={flipButtonIcon}\n flipDuration={flipDuration}\n {...rest}\n >\n {children}\n </FlippableCard>\n );\n }\n\n return (\n <article\n ref={ref}\n className={cn(\n 'rounded-lg border border-[var(--border)] bg-[var(--content-background)] text-[var(--content-foreground)] shadow-sm',\n className\n )}\n {...rest}\n >\n {children}\n </article>\n );\n }\n);\n\nCard.displayName = 'Card';\n\n// ============================================================================\n// CardHeader\n// ============================================================================\n\nexport const CardHeader = forwardRef<HTMLElement, CardHeaderProps & HTMLAttributes<HTMLElement>>(\n ({ className, children, ...props }, ref) => (\n <header\n ref={ref}\n className={cn('flex flex-col space-y-1.5 p-6', className)}\n {...props}\n >\n {children}\n </header>\n )\n);\n\nCardHeader.displayName = 'CardHeader';\n\n// ============================================================================\n// CardTitle\n// ============================================================================\n\nexport const CardTitle = forwardRef<HTMLHeadingElement, CardTitleProps & HTMLAttributes<HTMLHeadingElement>>(\n ({ className, as: Comp = 'h3', children, ...props }, ref) => (\n <Comp\n ref={ref}\n className={cn('text-2xl font-semibold leading-none tracking-tight', className)}\n {...props}\n >\n {children}\n </Comp>\n )\n);\n\nCardTitle.displayName = 'CardTitle';\n\n// ============================================================================\n// CardDescription\n// ============================================================================\n\nexport const CardDescription = forwardRef<HTMLParagraphElement, CardDescriptionProps & HTMLAttributes<HTMLParagraphElement>>(\n ({ className, children, ...props }, ref) => (\n <p\n ref={ref}\n className={cn('text-sm text-[var(--content-foreground-muted)]', className)}\n {...props}\n >\n {children}\n </p>\n )\n);\n\nCardDescription.displayName = 'CardDescription';\n\n// ============================================================================\n// CardContent\n// ============================================================================\n\nexport const CardContent = forwardRef<HTMLDivElement, CardContentProps & HTMLAttributes<HTMLDivElement>>(\n ({ className, children, ...props }, ref) => (\n <div ref={ref} className={cn('p-6 pt-0', className)} {...props}>\n {children}\n </div>\n )\n);\n\nCardContent.displayName = 'CardContent';\n\n// ============================================================================\n// CardFooter\n// ============================================================================\n\nexport const CardFooter = forwardRef<HTMLElement, CardFooterProps & HTMLAttributes<HTMLElement>>(\n ({ className, children, ...props }, ref) => (\n <footer\n ref={ref}\n className={cn('flex items-center p-6 pt-0', className)}\n {...props}\n >\n {children}\n </footer>\n )\n);\n\nCardFooter.displayName = 'CardFooter';\n\n// ============================================================================\n// CardAction\n// ============================================================================\n\nexport const CardAction = forwardRef<HTMLDivElement, CardActionProps & HTMLAttributes<HTMLDivElement>>(\n ({ className, children, ...props }, ref) => (\n <div\n ref={ref}\n className={cn('ml-auto', className)}\n {...props}\n >\n {children}\n </div>\n )\n);\n\nCardAction.displayName = 'CardAction';\n"]}
1
+ {"version":3,"sources":["../../../src/utils/cn.ts","../../../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/schemas/BaseComponentProps.ts","../../../src/elements/Card/Card.types.ts","../../../src/elements/Card/Card.tsx"],"names":["cn","inputs","twMerge","clsx","buttonOuterVariants","cva","buttonVisualVariants","PRESSED_STYLES","HIGH_CONTRAST_HOVER","HIGH_CONTRAST_PRESSED","ButtonGroupContext","createContext","useButtonGroupContext","useContext","ButtonGroupItemContext","useButtonGroupItemContext","buttonGroupItemVariants","Button","memo","forwardRef","className","buttonVisualClassName","variant","size","visualSize","fullWidth","loading","loadingText","shortcut","children","isDisabled","paywall","paywallRedirect","paywallDescription","onPress","props","ref","paywallDescriptionId","useId","groupContext","itemContext","effectiveVariant","effectiveSize","effectiveIsDisabled","isInVerticalGroup","effectiveFullWidth","positionClassName","effectiveVisualSize","jsx","AriaButton","e","renderProps","jsxs","Fragment","Loader2","Zap","BaseComponentPropsSchema","z","FlipButtonPositionSchema","FlipButtonLabelSchema","FlipButtonIconSchema","CardPropsSchema","CardHeaderPropsSchema","CardTitlePropsSchema","CardDescriptionPropsSchema","CardContentPropsSchema","CardFooterPropsSchema","CardActionPropsSchema","flipButtonPositionVariants","DEFAULT_FLIP_ICON","RotateCcw","FlipButton","label","icon","position","FlippableCard","backContent","controlledFlipped","defaultFlipped","onFlipChange","flipButtonPosition","flipButtonLabel","flipButtonIcon","flipDuration","rest","internalFlipped","setInternalFlipped","useState","isControlled","flipped","handleFlip","useCallback","newState","showLabel","hideLabel","frontIcon","backIcon","Card","flippable","isFlipped","CardHeader","CardTitle","Comp","CardDescription","CardContent","CardFooter","CardAction"],"mappings":"kWAcO,SAASA,CAAAA,CAAAA,GAAMC,CAAAA,CAA8B,CAClD,OAAOC,OAAAA,CAAQC,KAAKF,CAAM,CAAC,CAC7B,CCLO,IAAMG,CAAAA,CAAsBC,GAAAA,CACjC,0PACA,CACE,QAAA,CAAU,CACR,SAAA,CAAW,CACT,KAAM,QAAA,CACN,KAAA,CAAO,EACT,CAAA,CACA,gBAAiB,CACf,IAAA,CAAM,gBACN,KAAA,CAAO,cACT,CACF,CAAA,CACA,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AAAA,CAEH,QAAA,CAAAN,EACH,CAEJ,EAEA4E,EAAAA,CAAW,WAAA,CAAc,aAMlB,IAAMC,EAAAA,CAAavF,WACxB,CAAC,CAAE,UAAAC,CAAAA,CAAW,QAAA,CAAAS,CAAAA,CAAU,GAAGM,CAAM,CAAA,CAAGC,CAAAA,GAClCY,IAAC,KAAA,CAAA,CACC,GAAA,CAAKZ,EACL,SAAA,CAAWpC,CAAAA,CAAG,UAAWoB,CAAS,CAAA,CACjC,GAAGe,CAAAA,CAEH,QAAA,CAAAN,EACH,CAEJ,EAEA6E,GAAW,WAAA,CAAc,YAAA","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","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","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 { cva } from 'class-variance-authority';\nimport { BaseComponentPropsSchema } from '../../schemas/BaseComponentProps';\nimport type { ReactNode } from 'react';\n\n/**\n * Flip button position variants\n * Controls where the flip button appears on the card\n *\n * @see card-prd.md US-5 (Flip Button Position)\n */\nexport const FlipButtonPositionSchema = z.enum([\n 'top-right',\n 'top-left',\n 'bottom-right',\n 'bottom-left',\n]);\nexport type FlipButtonPosition = z.infer<typeof FlipButtonPositionSchema>;\n\n/**\n * Flip button label configuration\n * Custom labels for the flip button title attribute\n *\n * @see card-prd.md US-6 (Custom Labels)\n */\nexport const FlipButtonLabelSchema = z.object({\n show: z.string().optional(),\n hide: z.string().optional(),\n});\nexport type FlipButtonLabel = z.infer<typeof FlipButtonLabelSchema>;\n\n/**\n * Flip button icon configuration\n * Custom icons for the front and back flip buttons\n */\nexport const FlipButtonIconSchema = z.object({\n /** Icon to show on front side button (default: RotateCcw) */\n front: z.custom<ReactNode>().optional(),\n /** Icon to show on back side button (default: same as front or RotateCcw) */\n back: z.custom<ReactNode>().optional(),\n});\nexport type FlipButtonIcon = z.infer<typeof FlipButtonIconSchema>;\n\n/**\n * Card root component props schema\n *\n * @see card-prd.md US-1 (Basic Card Container)\n * @see card-prd.md US-2 (Flippable Card)\n * @see card-prd.md US-3 (Controlled/Uncontrolled State)\n */\nexport const CardPropsSchema = BaseComponentPropsSchema.extend({\n // Flip functionality\n /** Enable flip animation feature (defaults to false in component) */\n flippable: z.boolean().optional(),\n\n /** Content to display on the back side of the card */\n backContent: z.custom<ReactNode>().optional(),\n\n /** Controlled mode: current flip state */\n isFlipped: z.boolean().optional(),\n\n /** Uncontrolled mode: initial flip state (defaults to false in component) */\n defaultFlipped: z.boolean().optional(),\n\n /** Callback fired when flip state changes */\n onFlipChange: z.custom<(isFlipped: boolean) => void>().optional(),\n\n // Flip button configuration\n /** Position of the flip button on the card (defaults to 'top-right' in component) */\n flipButtonPosition: FlipButtonPositionSchema.optional(),\n\n /** Custom labels for the flip button title attribute */\n flipButtonLabel: FlipButtonLabelSchema.optional(),\n\n /** Custom icons for the flip button (default: RotateCcw) */\n flipButtonIcon: FlipButtonIconSchema.optional(),\n\n /** Duration of flip animation in milliseconds (0–350ms, defaults to 250 in component) */\n flipDuration: z.number().min(0).max(350).optional(),\n});\n\n/**\n * Explicit interface to avoid Zod 4 d.ts inference issues where\n * z.infer resolves optional fields as required through complex generics.\n */\nexport interface CardProps {\n className?: string;\n children?: ReactNode;\n id?: string;\n 'aria-label'?: string;\n 'aria-labelledby'?: string;\n 'aria-describedby'?: string;\n 'aria-live'?: 'off' | 'polite' | 'assertive';\n 'aria-hidden'?: boolean;\n 'data-testid'?: string;\n flippable?: boolean;\n backContent?: ReactNode;\n isFlipped?: boolean;\n defaultFlipped?: boolean;\n onFlipChange?: (isFlipped: boolean) => void;\n flipButtonPosition?: FlipButtonPosition;\n flipButtonLabel?: FlipButtonLabel;\n flipButtonIcon?: FlipButtonIcon;\n flipDuration?: number;\n}\n\n/**\n * Explicit variant for flippable cards.\n *\n * Prefer `FlippableCard` over `<Card flippable>` for clearer intent.\n * The `flippable` boolean is not needed — FlippableCard is always flippable.\n *\n * @see card-prd.md US-2 (Flippable Card)\n */\nexport interface FlippableCardProps {\n className?: string;\n /** Content for the front face */\n children?: ReactNode;\n id?: string;\n 'aria-label'?: string;\n 'aria-labelledby'?: string;\n 'aria-describedby'?: string;\n 'aria-live'?: 'off' | 'polite' | 'assertive';\n 'aria-hidden'?: boolean;\n 'data-testid'?: string;\n /** Content to display on the back side of the card */\n backContent?: ReactNode;\n /** Controlled mode: current flip state */\n isFlipped?: boolean;\n /** Uncontrolled mode: initial flip state (defaults to false) */\n defaultFlipped?: boolean;\n /** Callback fired when flip state changes */\n onFlipChange?: (isFlipped: boolean) => void;\n /** Position of the flip button (defaults to 'top-right') */\n flipButtonPosition?: FlipButtonPosition;\n /** Custom labels for the flip button aria-label */\n flipButtonLabel?: FlipButtonLabel;\n /** Custom icons for the flip button (default: RotateCcw) */\n flipButtonIcon?: FlipButtonIcon;\n /** Duration of flip animation in milliseconds (0–350ms, defaults to 250) */\n flipDuration?: number;\n}\n\n/**\n * CardHeader props schema\n *\n * @see card-prd.md US-1 (Basic Card Container)\n */\nexport const CardHeaderPropsSchema = BaseComponentPropsSchema.extend({\n children: z.custom<ReactNode>(),\n});\n\nexport interface CardHeaderProps {\n className?: string;\n children?: ReactNode;\n id?: string;\n 'aria-label'?: string;\n 'aria-labelledby'?: string;\n 'aria-describedby'?: string;\n 'data-testid'?: string;\n}\n\n/**\n * CardTitle props schema\n *\n * @see card-prd.md US-1 (Basic Card Container)\n */\nexport const CardTitlePropsSchema = BaseComponentPropsSchema.extend({\n /** Heading level (h1-h6) - defaults to h3 in component */\n as: z.enum(['h1', 'h2', 'h3', 'h4', 'h5', 'h6']).optional(),\n\n children: z.custom<ReactNode>(),\n});\n\nexport interface CardTitleProps {\n className?: string;\n children?: ReactNode;\n as?: 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6';\n id?: string;\n 'data-testid'?: string;\n}\n\n/**\n * CardDescription props schema\n *\n * @see card-prd.md US-1 (Basic Card Container)\n */\nexport const CardDescriptionPropsSchema = BaseComponentPropsSchema.extend({\n children: z.custom<ReactNode>(),\n});\n\nexport interface CardDescriptionProps {\n className?: string;\n children?: ReactNode;\n id?: string;\n 'data-testid'?: string;\n}\n\n/**\n * CardContent props schema\n *\n * @see card-prd.md US-1 (Basic Card Container)\n */\nexport const CardContentPropsSchema = BaseComponentPropsSchema.extend({\n children: z.custom<ReactNode>(),\n});\n\nexport interface CardContentProps {\n className?: string;\n children?: ReactNode;\n id?: string;\n 'data-testid'?: string;\n}\n\n/**\n * CardFooter props schema\n *\n * @see card-prd.md US-1 (Basic Card Container)\n */\nexport const CardFooterPropsSchema = BaseComponentPropsSchema.extend({\n children: z.custom<ReactNode>(),\n});\n\nexport interface CardFooterProps {\n className?: string;\n children?: ReactNode;\n id?: string;\n 'data-testid'?: string;\n}\n\n/**\n * CardAction props schema\n *\n * @see card-prd.md US-1 (Basic Card Container)\n */\nexport const CardActionPropsSchema = BaseComponentPropsSchema.extend({\n children: z.custom<ReactNode>(),\n});\n\nexport interface CardActionProps {\n className?: string;\n children?: ReactNode;\n id?: string;\n 'data-testid'?: string;\n}\n\n/**\n * CVA variants for flip button positioning\n *\n * Provides consistent positioning classes for the flip button\n * based on the flipButtonPosition prop.\n *\n * Buttons are rendered INSIDE both front and back sides so they\n * flip along with the card content for a more natural feel.\n *\n * @see card-prd.md US-5 (Flip Button Position)\n */\nexport const flipButtonPositionVariants = cva(\n [\n 'absolute z-10 min-h-[44px] min-w-[44px] p-2',\n 'flex items-center justify-center',\n 'rounded-full bg-[var(--accent-background)]',\n 'text-[var(--primary-action)] hover:text-[var(--primary-action-hover)]',\n 'transition-colors duration-200',\n 'focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--ring)]',\n ],\n {\n variants: {\n position: {\n 'top-right': 'top-2 right-2',\n 'top-left': 'top-2 left-2',\n 'bottom-right': 'bottom-2 right-2',\n 'bottom-left': 'bottom-2 left-2',\n },\n },\n defaultVariants: {\n position: 'top-right',\n },\n }\n);\n","'use client';\n\n/**\n * Card Component (TDD Stub)\n *\n * This is a minimal stub to allow tests to run during the RED phase.\n * Full implementation will be added in the GREEN phase.\n *\n * @see card-prd.md (Product Requirements)\n * @see plan.md (Implementation Plan)\n */\n\nimport { forwardRef, useState, useCallback, type HTMLAttributes, type ReactNode } from 'react';\nimport { RotateCcw } from 'lucide-react';\nimport { cn } from '../../utils/cn';\nimport { Button } from '../Button';\nimport {\n flipButtonPositionVariants,\n type CardProps,\n type FlippableCardProps,\n type CardHeaderProps,\n type CardTitleProps,\n type CardDescriptionProps,\n type CardContentProps,\n type CardFooterProps,\n type CardActionProps,\n type FlipButtonPosition,\n} from './Card.types';\n\n// Hoisted static JSX — avoids re-creation on every render\nconst DEFAULT_FLIP_ICON = <RotateCcw className=\"h-5 w-5\" aria-hidden=\"true\" />;\n\n// Extracted from Card body — prevents new component type on every render\nfunction FlipButton({\n label,\n icon,\n onPress,\n position,\n}: {\n label: string;\n icon: ReactNode;\n onPress: () => void;\n position: FlipButtonPosition;\n}) {\n return (\n <Button\n variant=\"ghost\"\n visualSize=\"icon\"\n aria-hidden={true}\n excludeFromTabOrder\n onPress={onPress}\n className={flipButtonPositionVariants({ position })}\n aria-label={label}\n >\n {icon}\n </Button>\n );\n}\n\n// ============================================================================\n// FlippableCard (Explicit Variant)\n// ============================================================================\n\n/**\n * Explicit flippable card variant.\n *\n * Prefer this over `<Card flippable>` — it's self-documenting and avoids\n * a boolean mode gate inside Card's render.\n *\n * @example\n * ```tsx\n * <FlippableCard backContent={<div>Back side</div>}>\n * <CardContent>Front side</CardContent>\n * </FlippableCard>\n * ```\n */\nexport const FlippableCard = forwardRef<HTMLElement, FlippableCardProps & HTMLAttributes<HTMLElement>>(\n (props, ref) => {\n const {\n children,\n className,\n backContent,\n isFlipped: controlledFlipped,\n defaultFlipped = false,\n onFlipChange,\n flipButtonPosition = 'top-right',\n flipButtonLabel,\n flipButtonIcon,\n flipDuration = 250,\n ...rest\n } = props;\n\n // Controlled/uncontrolled state\n const [internalFlipped, setInternalFlipped] = useState(defaultFlipped);\n const isControlled = controlledFlipped !== undefined;\n const flipped = isControlled ? controlledFlipped : internalFlipped;\n\n const handleFlip = useCallback(() => {\n const newState = !flipped;\n if (!isControlled) {\n setInternalFlipped(newState);\n }\n onFlipChange?.(newState);\n }, [flipped, isControlled, onFlipChange]);\n\n const showLabel = flipButtonLabel?.show ?? 'Show more details';\n const hideLabel = flipButtonLabel?.hide ?? 'Show less details';\n\n // Custom icons (back defaults to front if not specified)\n const frontIcon = flipButtonIcon?.front ?? DEFAULT_FLIP_ICON;\n const backIcon = flipButtonIcon?.back ?? flipButtonIcon?.front ?? DEFAULT_FLIP_ICON;\n\n return (\n <article\n ref={ref}\n className={cn('relative', className)}\n style={{ perspective: '1000px' }}\n {...rest}\n >\n {/* Flipper container - handles 3D transform */}\n <div\n className={cn(\n 'relative transition-transform',\n 'motion-reduce:transition-none'\n )}\n style={{\n transformStyle: 'preserve-3d',\n transitionDuration: `${flipDuration}ms`,\n transform: flipped ? 'rotateY(180deg)' : 'rotateY(0deg)',\n }}\n data-flipped={flipped}\n >\n {/* Front side */}\n <div\n className=\"relative rounded-lg border border-[var(--border)] bg-[var(--content-background)] text-[var(--content-foreground)]\"\n style={{ backfaceVisibility: 'hidden' }}\n data-side=\"front\"\n >\n {children}\n <FlipButton label={showLabel} icon={frontIcon} onPress={handleFlip} position={flipButtonPosition} />\n </div>\n\n {/* Back side - scrollable if content overflows */}\n <div\n className=\"absolute inset-0 overflow-y-auto rounded-lg border border-[var(--border)] bg-[var(--content-background)] text-[var(--content-foreground)]\"\n style={{\n backfaceVisibility: 'hidden',\n transform: 'rotateY(180deg)',\n }}\n data-side=\"back\"\n >\n {backContent}\n <FlipButton label={hideLabel} icon={backIcon} onPress={handleFlip} position={flipButtonPosition} />\n </div>\n </div>\n </article>\n );\n }\n);\n\nFlippableCard.displayName = 'FlippableCard';\n\n// ============================================================================\n// Card (Root Component)\n// ============================================================================\n\n/**\n * Basic card container.\n *\n * For flippable cards, prefer the explicit `<FlippableCard>` variant.\n * The `flippable` prop is supported for backward compatibility.\n */\nexport const Card = forwardRef<HTMLElement, CardProps & HTMLAttributes<HTMLElement>>(\n (props, ref) => {\n const {\n children,\n className,\n flippable = false,\n backContent,\n isFlipped,\n defaultFlipped,\n onFlipChange,\n flipButtonPosition,\n flipButtonLabel,\n flipButtonIcon,\n flipDuration,\n ...rest\n } = props;\n\n // Delegate to FlippableCard when flippable mode is enabled\n if (flippable) {\n return (\n <FlippableCard\n ref={ref}\n className={className}\n backContent={backContent}\n isFlipped={isFlipped}\n defaultFlipped={defaultFlipped}\n onFlipChange={onFlipChange}\n flipButtonPosition={flipButtonPosition}\n flipButtonLabel={flipButtonLabel}\n flipButtonIcon={flipButtonIcon}\n flipDuration={flipDuration}\n {...rest}\n >\n {children}\n </FlippableCard>\n );\n }\n\n return (\n <article\n ref={ref}\n className={cn(\n 'rounded-lg border border-[var(--border)] bg-[var(--content-background)] text-[var(--content-foreground)]',\n className\n )}\n {...rest}\n >\n {children}\n </article>\n );\n }\n);\n\nCard.displayName = 'Card';\n\n// ============================================================================\n// CardHeader\n// ============================================================================\n\nexport const CardHeader = forwardRef<HTMLElement, CardHeaderProps & HTMLAttributes<HTMLElement>>(\n ({ className, children, ...props }, ref) => (\n <header\n ref={ref}\n className={cn('flex flex-col space-y-1.5 p-6', className)}\n {...props}\n >\n {children}\n </header>\n )\n);\n\nCardHeader.displayName = 'CardHeader';\n\n// ============================================================================\n// CardTitle\n// ============================================================================\n\nexport const CardTitle = forwardRef<HTMLHeadingElement, CardTitleProps & HTMLAttributes<HTMLHeadingElement>>(\n ({ className, as: Comp = 'h3', children, ...props }, ref) => (\n <Comp\n ref={ref}\n className={cn('text-2xl font-semibold leading-none tracking-tight', className)}\n {...props}\n >\n {children}\n </Comp>\n )\n);\n\nCardTitle.displayName = 'CardTitle';\n\n// ============================================================================\n// CardDescription\n// ============================================================================\n\nexport const CardDescription = forwardRef<HTMLParagraphElement, CardDescriptionProps & HTMLAttributes<HTMLParagraphElement>>(\n ({ className, children, ...props }, ref) => (\n <p\n ref={ref}\n className={cn('text-sm text-[var(--content-foreground-muted)]', className)}\n {...props}\n >\n {children}\n </p>\n )\n);\n\nCardDescription.displayName = 'CardDescription';\n\n// ============================================================================\n// CardContent\n// ============================================================================\n\nexport const CardContent = forwardRef<HTMLDivElement, CardContentProps & HTMLAttributes<HTMLDivElement>>(\n ({ className, children, ...props }, ref) => (\n <div ref={ref} className={cn('p-6 pt-0', className)} {...props}>\n {children}\n </div>\n )\n);\n\nCardContent.displayName = 'CardContent';\n\n// ============================================================================\n// CardFooter\n// ============================================================================\n\nexport const CardFooter = forwardRef<HTMLElement, CardFooterProps & HTMLAttributes<HTMLElement>>(\n ({ className, children, ...props }, ref) => (\n <footer\n ref={ref}\n className={cn('flex items-center p-6 pt-0', className)}\n {...props}\n >\n {children}\n </footer>\n )\n);\n\nCardFooter.displayName = 'CardFooter';\n\n// ============================================================================\n// CardAction\n// ============================================================================\n\nexport const CardAction = forwardRef<HTMLDivElement, CardActionProps & HTMLAttributes<HTMLDivElement>>(\n ({ className, children, ...props }, ref) => (\n <div\n ref={ref}\n className={cn('ml-auto', className)}\n {...props}\n >\n {children}\n </div>\n )\n);\n\nCardAction.displayName = 'CardAction';\n"]}
@@ -1,3 +1,3 @@
1
1
  "use client";
2
- 'use strict';var clsx=require('clsx'),tailwindMerge=require('tailwind-merge'),classVarianceAuthority=require('class-variance-authority'),react=require('react'),reactAriaComponents=require('react-aria-components'),lucideReact=require('lucide-react'),jsxRuntime=require('react/jsx-runtime');var qe=Object.defineProperty;var C=(t,e)=>()=>(t&&(e=t(t=0)),e);var Ke=(t,e)=>{for(var r in e)qe(t,r,{get:e[r],enumerable:true});};function b(...t){return tailwindMerge.twMerge(clsx.clsx(t))}var W=C(()=>{});var oe,ne,ge=C(()=>{oe=classVarianceAuthority.cva("inline-flex justify-center min-h-[44px] min-w-[44px] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--ring)] focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:pointer-events-none disabled:opacity-50",{variants:{fullWidth:{true:"w-full",false:""},inVerticalGroup:{true:"items-stretch",false:"items-center"}},defaultVariants:{fullWidth:false,inVerticalGroup:false}}),ne=classVarianceAuthority.cva("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium ring-offset-background motion-safe:transition-transform motion-safe:duration-200 motion-safe:[transition-timing-function:cubic-bezier(0.34,1.56,0.64,1)] motion-reduce:transition-none [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 relative cursor-pointer",{variants:{variant:{default:"bg-[var(--primary-action)] text-[var(--primary-action-foreground)] shadow-md hover:bg-[var(--primary-action-hover)] hover:-translate-y-1",destructive:"bg-[var(--destructive-background)] text-[var(--destructive-foreground)] shadow-md hover:bg-[var(--destructive-background-hover,var(--destructive-background))] motion-safe:hover:btn-warn-shake",outline:"border border-[var(--input-border)] bg-[var(--page-background)] hover:bg-[var(--input-border)]",secondary:"bg-[var(--secondary)] text-[var(--secondary-foreground)] shadow-md hover:bg-[var(--secondary-hover,var(--secondary))]",ghost:"hover:bg-[var(--accent)] hover:text-[var(--accent-foreground)]",link:"text-[var(--text-link)] underline underline-offset-4 hover:bg-[var(--accent)] hover:text-[var(--text-link-hover)]"},fullWidth:{true:"w-full",false:""},visualSize:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3 text-xs",lg:"h-11 rounded-md px-8",icon:"h-10 w-10",dot:"h-5 w-5 rounded-full p-0 min-h-0 min-w-0"},paywall:{true:"!bg-[var(--paywall)] !text-[var(--paywall-foreground)] !shadow-md hover:!bg-[var(--paywall)]/90 !cursor-not-allowed !border-transparent",false:""}},defaultVariants:{variant:"default",visualSize:"default",paywall:false}});});var ae,ie,Y,F,Se=C(()=>{ae="data-[pressed]:scale-[0.97]",ie="data-[hovered]:shadow-md",Y="hc:data-[hovered]:outline hc:data-[hovered]:outline-2 hc:data-[hovered]:outline-foreground",F="hc:data-[pressed]:outline hc:data-[pressed]:outline-2 hc:data-[pressed]:outline-offset-1 hc:data-[pressed]:outline-foreground";});function Ce(){return react.useContext(Ve)}function Ie(){return react.useContext(Ee)}var Ve,Ee,Te=C(()=>{"use client";Ve=react.createContext(null);Ve.displayName="ButtonGroupContext";Ee=react.createContext(null);Ee.displayName="ButtonGroupItemContext";});var Pe,Be=C(()=>{classVarianceAuthority.cva("inline-flex items-center gap-0",{variants:{orientation:{horizontal:"flex-row",vertical:"flex-col w-full"}},defaultVariants:{orientation:"horizontal"}}),Pe=classVarianceAuthority.cva("",{variants:{orientation:{horizontal:"min-w-[44px]",vertical:"flex min-h-[44px]"},position:{first:"",middle:"",last:"",only:""}},compoundVariants:[{orientation:"horizontal",position:"first",className:"rounded-r-none border-r-0"},{orientation:"horizontal",position:"middle",className:"rounded-none border-r-0"},{orientation:"horizontal",position:"last",className:"rounded-l-none"},{orientation:"vertical",position:"first",className:"rounded-b-none border-b-0"},{orientation:"vertical",position:"middle",className:"rounded-none border-b-0"},{orientation:"vertical",position:"last",className:"rounded-t-none"}],defaultVariants:{orientation:"horizontal",position:"only"}}),classVarianceAuthority.cva("bg-[var(--border)]",{variants:{orientation:{horizontal:"w-px h-6 mx-1",vertical:"h-px w-full my-1"}},defaultVariants:{orientation:"horizontal"}});});var P,ze=C(()=>{"use client";W();ge();Se();Te();Be();P=react.memo(react.forwardRef(({className:t,buttonVisualClassName:e,variant:r,size:a,visualSize:x,fullWidth:n,loading:N=false,loadingText:s="Loading...",shortcut:E,children:w,isDisabled:I,paywall:g=false,paywallRedirect:k,paywallDescription:Z,onPress:H,...O},j)=>{let G=react.useId(),T=Ce(),D=Ie(),J=r??T?.variant??"default",Q=a??T?.size,X=I??T?.isDisabled??false,d=T?.orientation==="vertical",B=n||d,z=D?Pe({orientation:T?.orientation??"horizontal",position:D.position}):"",L=x??Q??"default";return process.env.NODE_ENV!=="production"&&(L==="dot"||L==="icon")&&!O["aria-label"]&&!w&&console.warn('[Button] visualSize="dot" or "icon" requires aria-label when no visible text is provided (WCAG 1.1.1)'),jsxRuntime.jsx(reactAriaComponents.Button,{ref:j,isDisabled:X||N||void 0,"aria-disabled":g?true:void 0,"aria-describedby":g?G:void 0,onPress:V=>{if(g){k&&window.open(k,"_blank","noopener,noreferrer");return}H?.(V);},className:b(oe({fullWidth:B,inVerticalGroup:d}),t),...O,children:V=>jsxRuntime.jsxs("span",{className:b(ne({variant:J,visualSize:L,paywall:g,fullWidth:B}),z,e,ae,ie,Y,F),"data-pressed":V.isPressed||void 0,children:[N&&jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(lucideReact.Loader2,{className:"motion-safe:animate-spin","aria-hidden":"true"}),jsxRuntime.jsx("span",{className:"sr-only","aria-live":"polite",children:s})]}),!N&&w,g&&jsxRuntime.jsx(lucideReact.Zap,{"data-testid":"zap-icon","aria-hidden":"true",className:"ml-1"}),g&&jsxRuntime.jsxs("span",{id:G,className:"sr-only",children:["Premium feature: ",Z||"Upgrade required to access this feature"]}),V.isFocusVisible&&E&&jsxRuntime.jsx("kbd",{className:"ml-auto hidden text-xs opacity-60 lg:inline",children:E})]})})}));P.displayName="Button";});var _e=C(()=>{ze();});var Ae={};Ke(Ae,{Carousel:()=>exports.Carousel});function Le(t){let e=0;return t.map((r,a)=>{let x=e,n=Math.max(r,ct);return e+=n,{index:a,startTime:x,endTime:e}})}function Me(t,e){if(t.length===0)return 0;let r=t[t.length-1]?.endTime??0;if(r===0)return 0;let a=e%r;return t.find(n=>a>=n.startTime&&a<n.endTime)?.index??0}function ft(t,e,r){return r===0||!e||e.length===0?false:e.length!==t?(console.warn("Carousel: itemDurations length does not match items length. Falling back to autoRotateInterval."),false):true}var ct,Ge;exports.Carousel=void 0;var fe=C(()=>{"use client";_e();W();ct=1e3,Ge=1e3;exports.Carousel=react.memo(function({items:e,autoRotateInterval:r=5e3,defaultIndex:a=0,currentIndex:x,onIndexChange:n,isPaused:N,onPauseChange:s,collapsible:E=false,defaultMinimized:w=false,isMinimized:I,onMinimizeChange:g,minimizedLabel:k="Carousel (minimized)",label:Z="Carousel",slideLabel:H,showNavigation:O=true,showPlayPause:j=true,respectReducedMotion:G=true,className:T,slideClassName:D,navigationClassName:J,"aria-label":Q,"aria-labelledby":X,itemDurations:d,elapsedTime:B,onElapsedTimeChange:z,...L}){let f=x!==void 0,p=N!==void 0,V=I!==void 0,_=B!==void 0,[De,$]=react.useState(a),[$e,U]=react.useState(false),[Ue,We]=react.useState(w),[Vt,me]=react.useState(()=>!d||d.length===0||d.length!==e.length||a===0?0:Le(d)[a]?.startTime??0),ee=react.useRef(false),l=f?x:De,c=p?N:$e,y=V?I:Ue,m=ft(e.length,d,r),v=react.useMemo(()=>!m||!d?[]:Le(d),[m,d]),te=v.length===0?0:v[v.length-1]?.endTime??0,Ye=react.useCallback(o=>{if(f?n?.(o):$(o),m&&v[o]){let i=v[o].startTime;_||me(i),z?.(i);}p?s?.(true):U(true);},[f,p,_,n,s,z,m,v]),Fe=react.useCallback(()=>{let o=!c;p?s?.(o):U(o);},[c,p,s]),ve=react.useCallback(()=>{let o=!y;o?ee.current=!c:(ee.current&&c&&(p?s?.(false):U(false)),ee.current=false),V?g?.(o):We(o);},[y,V,g,c,p,s]);react.useEffect(()=>{r!==0&&G&&typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-reduced-motion: reduce)").matches&&(p?s?.(true):U(true));},[r,G,p,s]);let be=react.useRef(l);be.current=l,react.useEffect(()=>{if(!m||r===0||c||y||_)return;let o=setInterval(()=>{me(i=>{let M=i+Ge;te>0&&M>=te&&(M=0),z?.(M);let re=Me(v,M);return re!==be.current&&(f?n?.(re):$(re)),M});},Ge);return ()=>clearInterval(o)},[m,r,c,y,_,te,v,f,n,z]),react.useEffect(()=>{if(m||r===0||c||y)return;let o=setInterval(()=>{let i=(l+1)%e.length;f?n?.(i):$(i);},r);return ()=>clearInterval(o)},[m,r,l,c,y,e.length,f,n]),react.useEffect(()=>{if(!m||!_)return;let o=Me(v,B);o!==l&&(f?n?.(o):$(o));},[m,_,B,v,l,f,n]);let he=H?H(l,e.length):`Slide ${l+1} of ${e.length}`;return jsxRuntime.jsx("div",{className:b("flex flex-col mb-4 transition-[gap,margin] duration-300",!y&&"space-y-4",T),role:"region","aria-roledescription":"carousel","aria-label":y?k:Q||Z,"aria-labelledby":X,...L,children:y&&E?jsxRuntime.jsxs("div",{className:b("bg-[var(--primary)] rounded-lg px-4 py-2 shadow-md","flex items-center justify-between gap-4"),children:[jsxRuntime.jsxs("span",{className:"text-[var(--primary-foreground)] text-sm",children:[k," - ",he]}),jsxRuntime.jsx(P,{variant:"outline",visualSize:"icon",onPress:ve,"aria-label":"Expand carousel","aria-expanded":false,children:jsxRuntime.jsx(lucideReact.ChevronUpIcon,{className:"w-5 h-5"})})]}):jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("div",{className:b("bg-[var(--primary)] rounded-lg p-4 overflow-hidden shadow-md","slide-in-animation",D),role:"group","aria-roledescription":"slide","aria-label":he,"aria-live":"polite","aria-atomic":"true",children:jsxRuntime.jsx("div",{className:"text-[var(--primary-foreground)] min-h-[2rem] flex items-center",children:e[l]})},l),jsxRuntime.jsxs("div",{className:"flex items-center justify-between gap-4",children:[O&&jsxRuntime.jsx("div",{className:b("flex items-center",J),role:"group","aria-label":"Slide navigation",children:e.map((o,i)=>jsxRuntime.jsx(P,{variant:i===l?"default":"outline",visualSize:"dot",onPress:()=>Ye(i),"aria-label":`Go to slide ${i+1}`,"aria-current":i===l?true:void 0},i))}),jsxRuntime.jsxs("div",{className:"flex items-center gap-2",children:[E&&jsxRuntime.jsx(P,{variant:"default",visualSize:"icon",onPress:ve,"aria-label":"Minimize carousel","aria-expanded":true,children:jsxRuntime.jsx(lucideReact.ChevronDownIcon,{className:"w-5 h-5"})}),j&&r>0&&jsxRuntime.jsx(P,{variant:"default",visualSize:"icon",onPress:Fe,"aria-label":c?"Play carousel":"Pause carousel",children:c?jsxRuntime.jsx(lucideReact.PlayIcon,{className:"w-5 h-5"}):jsxRuntime.jsx(lucideReact.PauseIcon,{className:"w-5 h-5"})})]})]})]})})});exports.Carousel.displayName="Carousel";});fe();W();var He=classVarianceAuthority.cva("animate-pulse bg-[var(--accent-background)] relative",{variants:{variant:{rectangle:"rounded-md",circle:"rounded-full",text:"rounded-sm h-4"}},defaultVariants:{variant:"rectangle"}}),S=react.memo(react.forwardRef(({className:t,variant:e,...r},a)=>jsxRuntime.jsx("div",{ref:a,role:"status","aria-live":"polite","aria-busy":"true",className:b(He({variant:e}),t),...r,children:jsxRuntime.jsx("span",{className:"sr-only",children:"Loading..."})})));S.displayName="Skeleton";var St=react.lazy(()=>Promise.resolve().then(()=>(fe(),Ae)).then(t=>({default:t.Carousel})));function Nt(){return jsxRuntime.jsxs("div",{className:"flex flex-col gap-4 p-4",children:[jsxRuntime.jsx(S,{className:"h-8 w-3/4"}),jsxRuntime.jsx(S,{className:"h-4 w-full"}),jsxRuntime.jsx(S,{className:"h-4 w-5/6"}),jsxRuntime.jsxs("div",{className:"flex gap-2 mt-4",children:[jsxRuntime.jsx(S,{className:"h-3 w-3 rounded-full"}),jsxRuntime.jsx(S,{className:"h-3 w-3 rounded-full"}),jsxRuntime.jsx(S,{className:"h-3 w-3 rounded-full"})]})]})}function wt({minWidth:t=1024,preserveState:e=true,...r}){let[a,x]=react.useState(false),[n,N]=react.useState(false),[s,E]=react.useState(false);return react.useEffect(()=>{E(true);let w=()=>{let I=window.innerWidth>=t;x(I),I&&N(true);};return w(),window.addEventListener("resize",w),()=>window.removeEventListener("resize",w)},[t]),!s||!n&&!a?null:jsxRuntime.jsx(react.Activity,{mode:e&&!a?"hidden":"visible",children:jsxRuntime.jsx(react.Suspense,{fallback:jsxRuntime.jsx(Nt,{}),children:jsxRuntime.jsx(St,{...r})})})}exports.LazyCarousel=wt;//# sourceMappingURL=index.js.map
2
+ 'use strict';var clsx=require('clsx'),tailwindMerge=require('tailwind-merge'),classVarianceAuthority=require('class-variance-authority'),react=require('react'),reactAriaComponents=require('react-aria-components'),lucideReact=require('lucide-react'),jsxRuntime=require('react/jsx-runtime');var Fe=Object.defineProperty;var C=(t,e)=>()=>(t&&(e=t(t=0)),e);var qe=(t,e)=>{for(var r in e)Fe(t,r,{get:e[r],enumerable:true});};function b(...t){return tailwindMerge.twMerge(clsx.clsx(t))}var U=C(()=>{});var oe,ne,he=C(()=>{oe=classVarianceAuthority.cva("inline-flex justify-center min-h-[44px] min-w-[44px] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--ring)] focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:pointer-events-none disabled:opacity-50",{variants:{fullWidth:{true:"w-full",false:""},inVerticalGroup:{true:"items-stretch",false:"items-center"}},defaultVariants:{fullWidth:false,inVerticalGroup:false}}),ne=classVarianceAuthority.cva("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-normal ring-offset-background motion-safe:transition-transform motion-safe:duration-200 motion-safe:[transition-timing-function:cubic-bezier(0.34,1.56,0.64,1)] motion-reduce:transition-none [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 relative cursor-pointer",{variants:{variant:{default:"bg-[var(--primary-action)] text-[var(--primary-action-foreground)] shadow-md hover:bg-[var(--primary-action-hover)] hover:-translate-y-1",destructive:"bg-[var(--destructive-background)] text-[var(--destructive-foreground)] hover:bg-[var(--destructive-background-hover,var(--destructive-background))] motion-safe:hover:btn-warn-shake",outline:"border border-[var(--input-border)] bg-[var(--page-background)] hover:bg-[var(--input-border)]",secondary:"bg-[var(--secondary)] text-[var(--secondary-foreground)] hover:bg-[var(--secondary-hover,var(--secondary))]",ghost:"hover:bg-[var(--accent)] hover:text-[var(--accent-foreground)]",link:"text-[var(--text-link)] underline underline-offset-4 hover:bg-[var(--accent)] hover:text-[var(--text-link-hover)]"},fullWidth:{true:"w-full",false:""},visualSize:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3 text-xs",lg:"h-11 rounded-md px-6 text-base",icon:"h-10 w-10",dot:"h-5 w-5 rounded-full p-0 min-h-0 min-w-0"},paywall:{true:"!bg-[var(--paywall)] !text-[var(--paywall-foreground)] hover:!bg-[var(--paywall)]/90 !cursor-not-allowed !border-transparent",false:""}},defaultVariants:{variant:"default",visualSize:"default",paywall:false}});});var ae,W,F,Se=C(()=>{ae="data-[pressed]:scale-[0.97]",W="hc:data-[hovered]:outline hc:data-[hovered]:outline-2 hc:data-[hovered]:outline-foreground",F="hc:data-[pressed]:outline hc:data-[pressed]:outline-2 hc:data-[pressed]:outline-offset-1 hc:data-[pressed]:outline-foreground";});function Ve(){return react.useContext(we)}function Ee(){return react.useContext(Ce)}var we,Ce,Te=C(()=>{"use client";we=react.createContext(null);we.displayName="ButtonGroupContext";Ce=react.createContext(null);Ce.displayName="ButtonGroupItemContext";});var Ie,Pe=C(()=>{classVarianceAuthority.cva("inline-flex items-center gap-0",{variants:{orientation:{horizontal:"flex-row",vertical:"flex-col w-full"}},defaultVariants:{orientation:"horizontal"}}),Ie=classVarianceAuthority.cva("",{variants:{orientation:{horizontal:"min-w-[44px]",vertical:"flex min-h-[44px]"},position:{first:"",middle:"",last:"",only:""}},compoundVariants:[{orientation:"horizontal",position:"first",className:"rounded-r-none border-r-0"},{orientation:"horizontal",position:"middle",className:"rounded-none border-r-0"},{orientation:"horizontal",position:"last",className:"rounded-l-none"},{orientation:"vertical",position:"first",className:"rounded-b-none border-b-0"},{orientation:"vertical",position:"middle",className:"rounded-none border-b-0"},{orientation:"vertical",position:"last",className:"rounded-t-none"}],defaultVariants:{orientation:"horizontal",position:"only"}}),classVarianceAuthority.cva("bg-[var(--border)]",{variants:{orientation:{horizontal:"w-px h-6 mx-1",vertical:"h-px w-full my-1"}},defaultVariants:{orientation:"horizontal"}});});var P,Be=C(()=>{"use client";U();he();Se();Te();Pe();P=react.memo(react.forwardRef(({className:t,buttonVisualClassName:e,variant:r,size:a,visualSize:h,fullWidth:n,loading:N=false,loadingText:s="Loading...",shortcut:E,children:w,isDisabled:T,paywall:g=false,paywallRedirect:k,paywallDescription:Z,onPress:H,...O},j)=>{let G=react.useId(),I=Ve(),D=Ee(),J=r??I?.variant??"default",Q=a??I?.size,X=T??I?.isDisabled??false,d=I?.orientation==="vertical",B=n||d,z=D?Ie({orientation:I?.orientation??"horizontal",position:D.position}):"",L=h??Q??"default";return process.env.NODE_ENV!=="production"&&(L==="dot"||L==="icon")&&!O["aria-label"]&&!w&&console.warn('[Button] visualSize="dot" or "icon" requires aria-label when no visible text is provided (WCAG 1.1.1)'),jsxRuntime.jsx(reactAriaComponents.Button,{ref:j,isDisabled:X||N||void 0,"aria-disabled":g?true:void 0,"aria-describedby":g?G:void 0,onPress:V=>{if(g){k&&window.open(k,"_blank","noopener,noreferrer");return}H?.(V);},className:b(oe({fullWidth:B,inVerticalGroup:d}),t),...O,children:V=>jsxRuntime.jsxs("span",{className:b(ne({variant:J,visualSize:L,paywall:g,fullWidth:B}),z,e,ae,"",W,F),"data-pressed":V.isPressed||void 0,children:[N&&jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(lucideReact.Loader2,{className:"motion-safe:animate-spin","aria-hidden":"true"}),jsxRuntime.jsx("span",{className:"sr-only","aria-live":"polite",children:s})]}),!N&&w,g&&jsxRuntime.jsx(lucideReact.Zap,{"data-testid":"zap-icon","aria-hidden":"true",className:"ml-1"}),g&&jsxRuntime.jsxs("span",{id:G,className:"sr-only",children:["Premium feature: ",Z||"Upgrade required to access this feature"]}),V.isFocusVisible&&E&&jsxRuntime.jsx("kbd",{className:"ml-auto hidden text-xs opacity-60 lg:inline",children:E})]})})}));P.displayName="Button";});var ze=C(()=>{Be();});var Me={};qe(Me,{Carousel:()=>exports.Carousel});function Ge(t){let e=0;return t.map((r,a)=>{let h=e,n=Math.max(r,ct);return e+=n,{index:a,startTime:h,endTime:e}})}function Le(t,e){if(t.length===0)return 0;let r=t[t.length-1]?.endTime??0;if(r===0)return 0;let a=e%r;return t.find(n=>a>=n.startTime&&a<n.endTime)?.index??0}function ft(t,e,r){return r===0||!e||e.length===0?false:e.length!==t?(console.warn("Carousel: itemDurations length does not match items length. Falling back to autoRotateInterval."),false):true}var ct,ke;exports.Carousel=void 0;var ce=C(()=>{"use client";ze();U();ct=1e3,ke=1e3;exports.Carousel=react.memo(function({items:e,autoRotateInterval:r=5e3,defaultIndex:a=0,currentIndex:h,onIndexChange:n,isPaused:N,onPauseChange:s,collapsible:E=false,defaultMinimized:w=false,isMinimized:T,onMinimizeChange:g,minimizedLabel:k="Carousel (minimized)",label:Z="Carousel",slideLabel:H,showNavigation:O=true,showPlayPause:j=true,respectReducedMotion:G=true,className:I,slideClassName:D,navigationClassName:J,"aria-label":Q,"aria-labelledby":X,itemDurations:d,elapsedTime:B,onElapsedTimeChange:z,...L}){let f=h!==void 0,p=N!==void 0,V=T!==void 0,_=B!==void 0,[Oe,$]=react.useState(a),[De,Y]=react.useState(false),[$e,Ye]=react.useState(w),[Vt,pe]=react.useState(()=>!d||d.length===0||d.length!==e.length||a===0?0:Ge(d)[a]?.startTime??0),ee=react.useRef(false),l=f?h:Oe,c=p?N:De,S=V?T:$e,m=ft(e.length,d,r),v=react.useMemo(()=>!m||!d?[]:Ge(d),[m,d]),te=v.length===0?0:v[v.length-1]?.endTime??0,Ue=react.useCallback(o=>{if(f?n?.(o):$(o),m&&v[o]){let i=v[o].startTime;_||pe(i),z?.(i);}p?s?.(true):Y(true);},[f,p,_,n,s,z,m,v]),We=react.useCallback(()=>{let o=!c;p?s?.(o):Y(o);},[c,p,s]),me=react.useCallback(()=>{let o=!S;o?ee.current=!c:(ee.current&&c&&(p?s?.(false):Y(false)),ee.current=false),V?g?.(o):Ye(o);},[S,V,g,c,p,s]);react.useEffect(()=>{r!==0&&G&&typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-reduced-motion: reduce)").matches&&(p?s?.(true):Y(true));},[r,G,p,s]);let ve=react.useRef(l);ve.current=l,react.useEffect(()=>{if(!m||r===0||c||S||_)return;let o=setInterval(()=>{pe(i=>{let M=i+ke;te>0&&M>=te&&(M=0),z?.(M);let re=Le(v,M);return re!==ve.current&&(f?n?.(re):$(re)),M});},ke);return ()=>clearInterval(o)},[m,r,c,S,_,te,v,f,n,z]),react.useEffect(()=>{if(m||r===0||c||S)return;let o=setInterval(()=>{let i=(l+1)%e.length;f?n?.(i):$(i);},r);return ()=>clearInterval(o)},[m,r,l,c,S,e.length,f,n]),react.useEffect(()=>{if(!m||!_)return;let o=Le(v,B);o!==l&&(f?n?.(o):$(o));},[m,_,B,v,l,f,n]);let be=H?H(l,e.length):`Slide ${l+1} of ${e.length}`;return jsxRuntime.jsx("div",{className:b("flex flex-col mb-4 transition-[gap,margin] duration-300",!S&&"space-y-4",I),role:"region","aria-roledescription":"carousel","aria-label":S?k:Q||Z,"aria-labelledby":X,...L,children:S&&E?jsxRuntime.jsxs("div",{className:b("bg-[var(--primary)] rounded-lg px-4 py-2","flex items-center justify-between gap-4"),children:[jsxRuntime.jsxs("span",{className:"text-[var(--primary-foreground)] text-sm",children:[k," - ",be]}),jsxRuntime.jsx(P,{variant:"outline",visualSize:"icon",onPress:me,"aria-label":"Expand carousel","aria-expanded":false,children:jsxRuntime.jsx(lucideReact.ChevronUpIcon,{className:"w-5 h-5"})})]}):jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("div",{className:b("bg-[var(--primary)] rounded-lg p-4 overflow-hidden","slide-in-animation",D),role:"group","aria-roledescription":"slide","aria-label":be,"aria-live":"polite","aria-atomic":"true",children:jsxRuntime.jsx("div",{className:"text-[var(--primary-foreground)] min-h-[2rem] flex items-center",children:e[l]})},l),jsxRuntime.jsxs("div",{className:"flex items-center justify-between gap-4",children:[O&&jsxRuntime.jsx("div",{className:b("flex items-center",J),role:"group","aria-label":"Slide navigation",children:e.map((o,i)=>jsxRuntime.jsx(P,{variant:i===l?"default":"outline",visualSize:"dot",onPress:()=>Ue(i),"aria-label":`Go to slide ${i+1}`,"aria-current":i===l?true:void 0},i))}),jsxRuntime.jsxs("div",{className:"flex items-center gap-2",children:[E&&jsxRuntime.jsx(P,{variant:"default",visualSize:"icon",onPress:me,"aria-label":"Minimize carousel","aria-expanded":true,children:jsxRuntime.jsx(lucideReact.ChevronDownIcon,{className:"w-5 h-5"})}),j&&r>0&&jsxRuntime.jsx(P,{variant:"default",visualSize:"icon",onPress:We,"aria-label":c?"Play carousel":"Pause carousel",children:c?jsxRuntime.jsx(lucideReact.PlayIcon,{className:"w-5 h-5"}):jsxRuntime.jsx(lucideReact.PauseIcon,{className:"w-5 h-5"})})]})]})]})})});exports.Carousel.displayName="Carousel";});ce();U();var Ae=classVarianceAuthority.cva("animate-pulse bg-[var(--accent-background)] relative",{variants:{variant:{rectangle:"rounded-md",circle:"rounded-full",text:"rounded-sm h-4"}},defaultVariants:{variant:"rectangle"}}),y=react.memo(react.forwardRef(({className:t,variant:e,...r},a)=>jsxRuntime.jsx("div",{ref:a,role:"status","aria-live":"polite","aria-busy":"true",className:b(Ae({variant:e}),t),...r,children:jsxRuntime.jsx("span",{className:"sr-only",children:"Loading..."})})));y.displayName="Skeleton";var yt=react.lazy(()=>Promise.resolve().then(()=>(ce(),Me)).then(t=>({default:t.Carousel})));function Nt(){return jsxRuntime.jsxs("div",{className:"flex flex-col gap-4 p-4",children:[jsxRuntime.jsx(y,{className:"h-8 w-3/4"}),jsxRuntime.jsx(y,{className:"h-4 w-full"}),jsxRuntime.jsx(y,{className:"h-4 w-5/6"}),jsxRuntime.jsxs("div",{className:"flex gap-2 mt-4",children:[jsxRuntime.jsx(y,{className:"h-3 w-3 rounded-full"}),jsxRuntime.jsx(y,{className:"h-3 w-3 rounded-full"}),jsxRuntime.jsx(y,{className:"h-3 w-3 rounded-full"})]})]})}function wt({minWidth:t=1024,preserveState:e=true,...r}){let[a,h]=react.useState(false),[n,N]=react.useState(false),[s,E]=react.useState(false);return react.useEffect(()=>{E(true);let w=()=>{let T=window.innerWidth>=t;h(T),T&&N(true);};return w(),window.addEventListener("resize",w),()=>window.removeEventListener("resize",w)},[t]),!s||!n&&!a?null:jsxRuntime.jsx(react.Activity,{mode:e&&!a?"hidden":"visible",children:jsxRuntime.jsx(react.Suspense,{fallback:jsxRuntime.jsx(Nt,{}),children:jsxRuntime.jsx(yt,{...r})})})}exports.LazyCarousel=wt;//# sourceMappingURL=index.js.map
3
3
  //# sourceMappingURL=index.js.map