@tribepad/themis 1.0.2 → 1.0.3

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 (83) hide show
  1. package/dist/elements/Checkbox/index.js +1 -1
  2. package/dist/elements/Checkbox/index.js.map +1 -1
  3. package/dist/elements/Checkbox/index.mjs +1 -1
  4. package/dist/elements/Checkbox/index.mjs.map +1 -1
  5. package/dist/elements/CheckboxGroup/index.js +1 -1
  6. package/dist/elements/CheckboxGroup/index.js.map +1 -1
  7. package/dist/elements/CheckboxGroup/index.mjs +1 -1
  8. package/dist/elements/CheckboxGroup/index.mjs.map +1 -1
  9. package/dist/elements/DatePicker/index.js +1 -1
  10. package/dist/elements/DatePicker/index.js.map +1 -1
  11. package/dist/elements/DatePicker/index.mjs +1 -1
  12. package/dist/elements/DatePicker/index.mjs.map +1 -1
  13. package/dist/elements/FileField/index.js +1 -1
  14. package/dist/elements/FileField/index.js.map +1 -1
  15. package/dist/elements/FileField/index.mjs +1 -1
  16. package/dist/elements/FileField/index.mjs.map +1 -1
  17. package/dist/elements/NumberField/NumberField.variants.d.ts +1 -1
  18. package/dist/elements/NumberField/index.js +1 -1
  19. package/dist/elements/NumberField/index.js.map +1 -1
  20. package/dist/elements/NumberField/index.mjs +1 -1
  21. package/dist/elements/NumberField/index.mjs.map +1 -1
  22. package/dist/elements/OTPInput/index.js +1 -1
  23. package/dist/elements/OTPInput/index.js.map +1 -1
  24. package/dist/elements/OTPInput/index.mjs +1 -1
  25. package/dist/elements/OTPInput/index.mjs.map +1 -1
  26. package/dist/elements/Progress/index.js +1 -1
  27. package/dist/elements/Progress/index.js.map +1 -1
  28. package/dist/elements/Progress/index.mjs +1 -1
  29. package/dist/elements/Progress/index.mjs.map +1 -1
  30. package/dist/elements/RadioGroup/index.js +1 -1
  31. package/dist/elements/RadioGroup/index.js.map +1 -1
  32. package/dist/elements/RadioGroup/index.mjs +1 -1
  33. package/dist/elements/RadioGroup/index.mjs.map +1 -1
  34. package/dist/elements/Resizable/index.js +1 -1
  35. package/dist/elements/Resizable/index.js.map +1 -1
  36. package/dist/elements/Resizable/index.mjs +1 -1
  37. package/dist/elements/Resizable/index.mjs.map +1 -1
  38. package/dist/elements/Select/index.js +1 -1
  39. package/dist/elements/Select/index.js.map +1 -1
  40. package/dist/elements/Select/index.mjs +1 -1
  41. package/dist/elements/Select/index.mjs.map +1 -1
  42. package/dist/elements/Switch/index.js +1 -1
  43. package/dist/elements/Switch/index.js.map +1 -1
  44. package/dist/elements/Switch/index.mjs +1 -1
  45. package/dist/elements/Switch/index.mjs.map +1 -1
  46. package/dist/elements/Table/index.js +1 -1
  47. package/dist/elements/Table/index.js.map +1 -1
  48. package/dist/elements/Table/index.mjs +1 -1
  49. package/dist/elements/Table/index.mjs.map +1 -1
  50. package/dist/elements/Tabs/Tabs.d.ts +5 -3
  51. package/dist/elements/Tabs/Tabs.d.ts.map +1 -1
  52. package/dist/elements/Tabs/Tabs.types.d.ts +15 -0
  53. package/dist/elements/Tabs/Tabs.types.d.ts.map +1 -1
  54. package/dist/elements/Tabs/index.js +1 -1
  55. package/dist/elements/Tabs/index.js.map +1 -1
  56. package/dist/elements/Tabs/index.mjs +1 -1
  57. package/dist/elements/Tabs/index.mjs.map +1 -1
  58. package/dist/elements/TimeField/index.js +1 -1
  59. package/dist/elements/TimeField/index.js.map +1 -1
  60. package/dist/elements/TimeField/index.mjs +1 -1
  61. package/dist/elements/TimeField/index.mjs.map +1 -1
  62. package/dist/elements/index.js +1 -1
  63. package/dist/elements/index.js.map +1 -1
  64. package/dist/elements/index.mjs +1 -1
  65. package/dist/elements/index.mjs.map +1 -1
  66. package/dist/index.js +2 -2
  67. package/dist/index.js.map +1 -1
  68. package/dist/index.mjs +2 -2
  69. package/dist/index.mjs.map +1 -1
  70. package/dist/styles/index.js +1 -1
  71. package/dist/styles/index.js.map +1 -1
  72. package/dist/styles/index.mjs +1 -1
  73. package/dist/styles/index.mjs.map +1 -1
  74. package/dist/styles/shared-variants.d.ts +3 -3
  75. package/dist/styles/shared-variants.d.ts.map +1 -1
  76. package/package.json +5 -5
  77. package/src/elements/AlertDialog/AlertDialog.stories.tsx +1 -1
  78. package/src/elements/CheckboxGroup/CheckboxGroup.stories.tsx +3 -3
  79. package/src/elements/Combobox/Combobox.stories.tsx +1 -1
  80. package/src/elements/FileField/FileField.stories.tsx +1 -1
  81. package/src/elements/Progress/Progress.stories.tsx +6 -1
  82. package/src/elements/RadioGroup/RadioGroup.stories.tsx +2 -2
  83. package/src/elements/Tabs/Tabs.stories.tsx +45 -1
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/schemas/BaseComponentProps.ts","../../../src/elements/CheckboxGroup/CheckboxGroup.types.ts","../../../src/utils/cn.ts","../../../src/styles/interaction-states.ts","../../../src/elements/CheckboxGroup/CheckboxGroup.tsx"],"names":["BaseComponentPropsSchema","z","CheckboxGroupVariantSchema","CheckboxGroupSizeSchema","CheckboxGroupOrientationSchema","CheckboxGroupPropsSchema","CheckboxPropsSchema","CheckboxLabelPropsSchema","CheckboxDescriptionPropsSchema","cn","inputs","twMerge","clsx","FOCUS_STYLES","HIGH_CONTRAST_FOCUS","CheckboxGroupContext","createContext","checkboxGroupVariants","cva","checkboxItemVariants","checkboxIndicatorVariants","checkmarkVariants","CheckmarkIcon","className","props","jsx","TimesIcon","jsxs","CheckboxLabel","children","CheckboxDescription","CheckboxComponent","value","isDisabled","selectedIcon","variant","size","isInvalid","groupDisabled","isReadOnly","useContext","effectiveDisabled","renderSelectedIcon","isSelected","iconClassName","dataSelected","isValidElement","iconElement","cloneElement","AriaCheckbox","renderProps","Fragment","Checkbox","dedupeWithWarning","values","componentName","uniqueValues","CheckboxGroup","forwardRef","ref","label","description","errorMessage","defaultValue","isRequired","orientation","name","onChange","onFocusChange","id","ariaLabel","ariaLabelledby","ariaDescribedby","dataTestId","restProps","generatedId","useId","checkboxGroupId","labelId","descriptionId","errorId","describedByParts","computedAriaDescribedBy","dedupedValue","ded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M,GAAIR,CAAAA,CAAS,SAAA,CAAU,sDAAA,CAC3B,QAAA,CAAA,CAAAlB,EACAI,CAAAA,EACCvC,cAAAA,CAAC,MAAA,CAAA,CAAK,SAAA,CAAU,gCAAA,CAAiC,aAAA,CAAY,MAAA,CAAO,QAAA,CAAA,GAAA,CAEpE,GAEJ,CAAA,CAIDoC,CAAAA,EACCpC,cAAAA,CAAC8D,wBAAAA,CAAA,CACC,EAAA,CAAIR,CAAAA,CACJ,IAAA,CAAK,aAAA,CACL,UAAU,kCAAA,CAET,QAAA,CAAAlB,CAAAA,CACH,CAAA,CAIFpC,cAAAA,CAAC,KAAA,CAAA,CAAI,SAAA,CAAWR,CAAAA,CAAsB,CAAE,WAAA,CAAAgD,CAAY,CAAC,CAAA,CAClD,SAAApC,CAAAA,CACH,CAAA,CAGCQ,CAAAA,EAAayB,CAAAA,EACZrC,eAAC+D,8BAAAA,CAAA,CACC,EAAA,CAAIR,CAAAA,CACJ,UAAU,mCAAA,CAEV,QAAA,CAAAvD,cAAAA,CAAC,MAAA,CAAA,CAAK,KAAK,OAAA,CAAS,QAAA,CAAAqC,CAAAA,CAAa,CAAA,CACnC,GAEJ,CAAA,CACF,CAEJ,CACF,EAEAL,EAAc,WAAA,CAAc,eAAA","file":"index.js","sourcesContent":["import { z } from 'zod';\n\n/**\n * Base props schema for all Themis components\n * Ensures consistent accessibility and styling APIs across the library\n *\n * @see spec.md FR-009 to FR-014 (Accessibility Requirements)\n * @see constitution.md Principle IV (Accessibility First - WCAG 2.2 AA minimum)\n */\nexport const BaseComponentPropsSchema = z.object({\n // Styling\n className: z.string().optional(),\n\n // React\n children: z.any().optional(), // ReactNode not directly supported by Zod\n id: z.string().optional(),\n\n // Accessibility (WCAG 2.2 AA requirements)\n 'aria-label': z.string().optional(),\n 'aria-labelledby': z.string().optional(),\n 'aria-describedby': z.string().optional(),\n 'aria-live': z.enum(['off', 'polite', 'assertive']).optional(),\n 'aria-hidden': z.boolean().optional(),\n\n // Testing & Development\n 'data-testid': z.string().optional(),\n});\n\nexport type BaseComponentProps = z.infer<typeof BaseComponentPropsSchema>;\n","import { z } from 'zod';\nimport { BaseComponentPropsSchema } from '../../schemas/BaseComponentProps';\nimport type { ReactNode } from 'react';\nimport type {\n CheckboxGroupProps as AriaCheckboxGroupProps,\n CheckboxProps as AriaCheckboxProps,\n} from 'react-aria-components';\n\n/**\n * CheckboxGroup variant schema\n * Only 2 variants: default and destructive (matching RadioGroup)\n *\n * @see checkboxgroup-prd.md US-2 (Style Variants)\n */\nexport const CheckboxGroupVariantSchema = z.enum(['default', 'destructive']);\nexport type CheckboxGroupVariant = z.infer<typeof CheckboxGroupVariantSchema>;\n\n/**\n * CheckboxGroup size schema\n * All sizes maintain 44px minimum height for WCAG 2.2 AAA compliance\n *\n * @see checkboxgroup-prd.md US-3 (Size Variants)\n * @see constitution.md Principle IV (Accessibility First)\n */\nexport const CheckboxGroupSizeSchema = z.enum(['sm', 'default', 'lg']);\nexport type CheckboxGroupSize = z.infer<typeof CheckboxGroupSizeSchema>;\n\n/**\n * CheckboxGroup orientation schema\n *\n * @see checkboxgroup-prd.md US-5 (Orientation Support)\n */\nexport const CheckboxGroupOrientationSchema = z.enum(['vertical', 'horizontal']);\nexport type CheckboxGroupOrientation = z.infer<typeof CheckboxGroupOrientationSchema>;\n\n/**\n * CheckboxGroup root component props schema\n *\n * Key difference from RadioGroup: value is string[] (multi-select)\n *\n * @see checkboxgroup-prd.md US-1 (Basic Multi-Selection)\n * @see checkboxgroup-prd.md US-4 (Labels, Descriptions, Errors)\n * @see checkboxgroup-prd.md US-6 (Validation States)\n */\nexport const CheckboxGroupPropsSchema = BaseComponentPropsSchema.extend({\n // Display props (US-4)\n label: z.string().optional(),\n description: z.string().optional(),\n errorMessage: z.string().optional(),\n\n // Selection props (US-1) - array for multi-select (key difference from RadioGroup)\n value: z.array(z.string()).optional(),\n defaultValue: z.array(z.string()).optional(),\n\n // State props (US-6)\n isDisabled: z.boolean().optional().default(false),\n isReadOnly: z.boolean().optional().default(false),\n isRequired: z.boolean().optional().default(false),\n isInvalid: z.boolean().optional().default(false),\n\n // Layout props (US-5)\n orientation: CheckboxGroupOrientationSchema.optional().default('vertical'),\n\n // Variant props (US-2, US-3)\n variant: CheckboxGroupVariantSchema.optional().default('default'),\n size: CheckboxGroupSizeSchema.optional().default('default'),\n\n // Form props (US-6)\n name: z.string().optional(),\n\n // Event handlers\n onChange: z.custom<(value: string[]) => void>().optional(),\n onFocusChange: z.custom<(isFocused: boolean) => void>().optional(),\n\n // Children (Checkbox components)\n children: z.custom<ReactNode>(),\n});\n\nexport type CheckboxGroupProps = z.infer<typeof CheckboxGroupPropsSchema> &\n Omit<AriaCheckboxGroupProps, keyof z.infer<typeof CheckboxGroupPropsSchema>>;\n\n/**\n * Checkbox item component props schema\n *\n * @see checkboxgroup-prd.md US-1 (Basic Multi-Selection)\n * @see checkboxgroup-prd.md US-7 (Rich Content Support)\n */\nexport const CheckboxPropsSchema = BaseComponentPropsSchema.extend({\n // Item value (required)\n value: z.string(),\n\n // Disabled state (individual item)\n isDisabled: z.boolean().optional().default(false),\n\n // Item content - accepts any ReactNode for flexible children\n children: z.custom<ReactNode>(),\n\n // Optional className for custom styling\n className: z.string().optional(),\n\n // Custom icon to display when selected (defaults to checkmark)\n // Useful for destructive variants where an X icon may be more appropriate\n selectedIcon: z.custom<ReactNode>().optional(),\n});\n\nexport type CheckboxProps = z.infer<typeof CheckboxPropsSchema> &\n Omit<AriaCheckboxProps, keyof z.infer<typeof CheckboxPropsSchema>>;\n\n/**\n * Checkbox.Label sub-component props schema\n * Helper component for styled label within Checkbox item\n *\n * @see checkboxgroup-prd.md US-7 (Rich Content Support)\n */\nexport const CheckboxLabelPropsSchema = z.object({\n // Label content\n children: z.custom<ReactNode>(),\n\n // Optional className for custom styling\n className: z.string().optional(),\n});\n\nexport type CheckboxLabelProps = z.infer<typeof CheckboxLabelPropsSchema>;\n\n/**\n * Checkbox.Description sub-component props schema\n * Helper component for styled description within Checkbox item (muted text)\n *\n * @see checkboxgroup-prd.md US-7 (Rich Content Support)\n */\nexport const CheckboxDescriptionPropsSchema = z.object({\n // Description content\n children: z.custom<ReactNode>(),\n\n // Optional className for custom styling\n className: z.string().optional(),\n});\n\nexport type CheckboxDescriptionProps = z.infer<typeof CheckboxDescriptionPropsSchema>;\n\n/**\n * CVA variant configuration types\n * Used for class-variance-authority integration\n */\nexport type CheckboxGroupVariantType = CheckboxGroupVariant;\nexport type CheckboxGroupSizeType = CheckboxGroupSize;\nexport type CheckboxGroupOrientationType = CheckboxGroupOrientation;\n","/**\n * Class Name Utility\n * Merges Tailwind CSS classes with conflict resolution\n *\n * Combines clsx for conditional classes and tailwind-merge for deduplication\n *\n * @example\n * cn('px-2 py-1', 'px-4') // => 'py-1 px-4' (px-4 overrides px-2)\n * cn('text-red-500', condition && 'text-blue-500') // => conditional application\n */\n\nimport { clsx, type ClassValue } from 'clsx';\nimport { twMerge } from 'tailwind-merge';\n\nexport function cn(...inputs: ClassValue[]): string {\n return twMerge(clsx(inputs));\n}\n","/**\n * 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\n/**\n * CheckboxGroup Component\n * Accessible multi-selection checkbox group with React Aria primitives and CVA styling\n *\n * Key Features:\n * - Bordered container design with explicit 44px+ touch targets\n * - 2 variants: default, destructive (no outline per clarification)\n * - 3 sizes: sm (44px), default (48px), lg (56px)\n * - Tab moves focus between checkboxes, Space toggles (standard checkbox behavior)\n * - Error styling on ALL items (cognitive accessibility)\n * - Spring animation for checkmark indicator\n * - RTL support (indicator auto-flips)\n * - Checkbox.Label and Checkbox.Description sub-components\n * - value: string[] for multi-select (key difference from RadioGroup)\n *\n * @see checkboxgroup-prd.md (Product Requirements)\n * @see plan.md (12 Key Clarifications)\n * @see React Aria CheckboxGroup: https://react-spectrum.adobe.com/react-aria/CheckboxGroup.html\n * @see constitution.md Principle IV (Accessibility First - WCAG 2.2 AAA)\n */\n\nimport {\n forwardRef,\n createContext,\n useContext,\n useId,\n cloneElement,\n isValidElement,\n type ReactNode,\n type ForwardedRef,\n type ReactElement,\n} from 'react';\nimport {\n CheckboxGroup as AriaCheckboxGroup,\n Checkbox as AriaCheckbox,\n Label,\n Text,\n FieldError,\n} from 'react-aria-components';\nimport { cva } from 'class-variance-authority';\nimport { cn } from '../../utils/cn';\nimport { FOCUS_STYLES, HIGH_CONTRAST_FOCUS } from '../../styles/interaction-states';\nimport type {\n CheckboxGroupProps,\n CheckboxProps,\n CheckboxLabelProps,\n CheckboxDescriptionProps,\n CheckboxGroupVariant,\n CheckboxGroupSize,\n} from './CheckboxGroup.types';\n\n// ============================================================================\n// Context\n// ============================================================================\n\n/**\n * CheckboxGroup context value\n * Includes isDisabled and isReadOnly per clarification (plan.md #10)\n */\ninterface CheckboxGroupContextValue {\n variant: CheckboxGroupVariant;\n size: CheckboxGroupSize;\n isInvalid: boolean;\n isDisabled: boolean;\n isReadOnly: boolean;\n}\n\nconst CheckboxGroupContext = createContext<CheckboxGroupContextValue>({\n variant: 'default',\n size: 'default',\n isInvalid: false,\n isDisabled: false,\n isReadOnly: false,\n});\n\n// ============================================================================\n// CVA Variants\n// ============================================================================\n\n/**\n * CheckboxGroup container variants\n * Controls orientation and spacing (gap-2 = 8px per clarification)\n */\nconst checkboxGroupVariants = cva(\n // Base: flex container\n \"flex\",\n {\n variants: {\n orientation: {\n vertical: \"flex-col gap-2\",\n horizontal: \"flex-row flex-wrap gap-2\",\n },\n },\n defaultVariants: {\n orientation: \"vertical\",\n },\n }\n);\n\n/**\n * Checkbox item bordered container variants\n * Bordered container design with explicit touch targets\n * All sizes maintain 44px minimum height (WCAG 2.2 AAA)\n * All sizes use rounded-md (6px) per clarification\n */\nconst checkboxItemVariants = cva(\n // Base: bordered container with flex layout, RTL support\n [\n \"flex items-center gap-3 rounded-md border cursor-pointer\",\n \"transition-colors duration-200\",\n \"rtl:flex-row-reverse\", // RTL: indicator flips to right\n // Focus ring on entire container\n FOCUS_STYLES,\n HIGH_CONTRAST_FOCUS,\n ].join(\" \"),\n {\n variants: {\n variant: {\n default: [\n \"border-[var(--border)]\",\n \"data-[hovered]:bg-[var(--accent)]/10\",\n \"data-[selected]:border-[var(--primary)]\",\n \"data-[selected]:bg-[var(--primary)]/10\",\n ].join(\" \"),\n destructive: [\n \"border-[var(--border)]\",\n \"data-[hovered]:bg-[var(--destructive)]/10\",\n \"data-[selected]:border-[var(--destructive)]\",\n \"data-[selected]:bg-[var(--destructive)]/10\",\n ].join(\" \"),\n },\n size: {\n sm: \"min-h-[44px] py-2 px-3 text-sm\",\n default: \"min-h-[48px] py-3 px-4 text-sm\",\n lg: \"min-h-[56px] py-4 px-5 text-base\",\n },\n isDisabled: {\n true: \"opacity-50 cursor-not-allowed\",\n false: \"\",\n },\n isReadOnly: {\n // Subtle visual cue per clarification\n true: \"cursor-default\",\n false: \"\",\n },\n isInvalid: {\n // Error: ALL items get destructive border (cognitive accessibility)\n true: \"border-[var(--destructive)]\",\n false: \"\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n size: \"default\",\n isDisabled: false,\n isReadOnly: false,\n isInvalid: false,\n },\n }\n);\n\n/**\n * Square indicator (checkbox box) variants\n * Uses rounded-sm (2px) for square appearance (unlike RadioGroup's circle)\n */\nconst checkboxIndicatorVariants = cva(\n // Base: square with border, flex-shrink-0 to prevent squishing\n \"flex-shrink-0 rounded-sm border-2 flex items-center justify-center transition-colors duration-200\",\n {\n variants: {\n variant: {\n default: [\n \"border-[var(--border)]\",\n \"data-[selected]:border-[var(--primary)]\",\n \"data-[selected]:bg-[var(--primary)]\",\n ].join(\" \"),\n destructive: [\n \"border-[var(--border)]\",\n \"data-[selected]:border-[var(--destructive)]\",\n \"data-[selected]:bg-[var(--destructive)]\",\n ].join(\" \"),\n },\n size: {\n sm: \"h-4 w-4\",\n default: \"h-5 w-5\",\n lg: \"h-6 w-6\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n size: \"default\",\n },\n }\n);\n\n/**\n * Checkmark SVG variants\n * Spring animation: cubic-bezier(0.34, 1.56, 0.64, 1) with slight overshoot\n */\nconst checkmarkVariants = cva(\n // Base: centered checkmark with spring animation\n [\n \"transition-transform duration-200\",\n // Spring animation with overshoot\n \"[transition-timing-function:cubic-bezier(0.34,1.56,0.64,1)]\",\n // Respect reduced motion preference\n \"motion-reduce:transition-none\",\n // Scale from 0 to 1 on selection\n \"scale-0 data-[selected]:scale-100\",\n ].join(\" \"),\n {\n variants: {\n variant: {\n default: \"text-[var(--primary-foreground)]\",\n destructive: \"text-[var(--destructive-foreground)]\",\n },\n size: {\n sm: \"h-3 w-3\",\n default: \"h-3.5 w-3.5\",\n lg: \"h-4 w-4\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n size: \"default\",\n },\n }\n);\n\n// ============================================================================\n// Icon Components\n// ============================================================================\n\n/**\n * Checkmark SVG icon (default)\n * Used inside the checkbox indicator when selected\n */\nfunction CheckmarkIcon({ className, ...props }: { className?: string; 'data-selected'?: boolean }): ReactNode {\n return (\n <svg\n className={className}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth={3}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n aria-hidden=\"true\"\n {...props}\n >\n <polyline points=\"20 6 9 17 4 12\" />\n </svg>\n );\n}\n\n/**\n * Times (X) SVG icon\n * Alternative icon for destructive or exclusion selections\n * @example <Checkbox value=\"exclude\" selectedIcon={<TimesIcon />}>Exclude this item</Checkbox>\n */\nfunction TimesIcon({ className, ...props }: { className?: string; 'data-selected'?: boolean }): ReactNode {\n return (\n <svg\n className={className}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth={3}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n aria-hidden=\"true\"\n {...props}\n >\n <line x1=\"18\" y1=\"6\" x2=\"6\" y2=\"18\" />\n <line x1=\"6\" y1=\"6\" x2=\"18\" y2=\"18\" />\n </svg>\n );\n}\n\n// ============================================================================\n// Sub-components\n// ============================================================================\n\n/**\n * Checkbox.Label - Styled label for checkbox item content\n */\nfunction CheckboxLabel({ children, className }: CheckboxLabelProps): ReactNode {\n return (\n <span className={cn(\"font-medium text-[var(--content-foreground)]\", className)}>\n {children}\n </span>\n );\n}\n\nCheckboxLabel.displayName = \"Checkbox.Label\";\n\n/**\n * Checkbox.Description - Styled description for checkbox item content (muted)\n */\nfunction CheckboxDescription({ children, className }: CheckboxDescriptionProps): ReactNode {\n return (\n <span className={cn(\"text-sm text-[var(--menu-muted)]\", className)}>\n {children}\n </span>\n );\n}\n\nCheckboxDescription.displayName = \"Checkbox.Description\";\n\n// ============================================================================\n// Checkbox Component\n// ============================================================================\n\n/**\n * Checkbox item component with bordered container design\n */\nfunction CheckboxComponent({ value, isDisabled, children, className, selectedIcon }: CheckboxProps): ReactNode {\n const { variant, size, isInvalid, isDisabled: groupDisabled, isReadOnly } = useContext(CheckboxGroupContext);\n\n // Individual isDisabled OR group isDisabled\n const effectiveDisabled = isDisabled || groupDisabled;\n\n // Render the selected icon - use custom icon if provided, otherwise default CheckmarkIcon\n const renderSelectedIcon = (isSelected: boolean) => {\n const iconClassName = cn(checkmarkVariants({ variant, size }));\n const dataSelected = isSelected || undefined;\n\n if (selectedIcon) {\n // Clone the custom icon element to add our styling classes\n if (isValidElement(selectedIcon)) {\n const iconElement = selectedIcon as ReactElement<{ className?: string; 'data-selected'?: boolean }>;\n return cloneElement(iconElement, {\n className: cn(iconClassName, iconElement.props.className),\n 'data-selected': dataSelected,\n });\n }\n // If it's not a valid element (e.g., just text), wrap it\n return <span className={iconClassName} data-selected={dataSelected}>{selectedIcon}</span>;\n }\n\n // Default: CheckmarkIcon\n return (\n <CheckmarkIcon\n className={iconClassName}\n data-selected={dataSelected}\n />\n );\n };\n\n return (\n <AriaCheckbox\n value={value}\n isDisabled={effectiveDisabled}\n className={(renderProps) =>\n cn(\n checkboxItemVariants({\n variant,\n size,\n isDisabled: renderProps.isDisabled,\n isReadOnly,\n isInvalid,\n }),\n className\n )\n }\n >\n {(renderProps) => (\n <>\n {/* Square indicator */}\n <div\n className={checkboxIndicatorVariants({ variant, size })}\n data-selected={renderProps.isSelected || undefined}\n >\n {/* Icon with spring animation */}\n {renderSelectedIcon(renderProps.isSelected)}\n </div>\n\n {/* Children content (flexible - text, icons, complex layouts) */}\n <div className=\"flex-1 flex flex-col\">\n {children}\n </div>\n </>\n )}\n </AriaCheckbox>\n );\n}\n\n// Attach sub-components\nconst Checkbox = Object.assign(CheckboxComponent, {\n Label: CheckboxLabel,\n Description: CheckboxDescription,\n}) as typeof CheckboxComponent & {\n Label: typeof CheckboxLabel;\n Description: typeof CheckboxDescription;\n displayName: string;\n};\n\nCheckbox.displayName = \"Checkbox\";\n\n// ============================================================================\n// Duplicate Value Warning\n// ============================================================================\n\n/**\n * Deduplicates array and warns in development mode\n * Per clarification: dedupe internally + console.warn in development\n */\nfunction dedupeWithWarning(values: string[] | undefined, componentName: string): string[] | undefined {\n if (!values) return values;\n\n const uniqueValues = [...new Set(values)];\n\n if (process.env.NODE_ENV !== 'production' && uniqueValues.length !== values.length) {\n console.warn(\n `[${componentName}] Received duplicate values in value/defaultValue prop. ` +\n `Original: [${values.join(', ')}], Deduplicated: [${uniqueValues.join(', ')}]. ` +\n `Duplicate values are automatically removed.`\n );\n }\n\n return uniqueValues;\n}\n\n// ============================================================================\n// CheckboxGroup Component\n// ============================================================================\n\n/**\n * CheckboxGroup root component\n * Accessible multi-selection control with bordered container design\n */\nconst CheckboxGroup = forwardRef<HTMLDivElement, CheckboxGroupProps>(\n function CheckboxGroup(props: CheckboxGroupProps, ref: ForwardedRef<HTMLDivElement>) {\n const {\n // Display props\n label,\n description,\n errorMessage,\n // Selection props (string[] for multi-select)\n value,\n defaultValue,\n // State props\n isDisabled = false,\n isReadOnly = false,\n isRequired = false,\n isInvalid = false,\n // Layout props\n orientation = 'vertical',\n // Variant props\n variant = 'default',\n size = 'default',\n // Form props\n name,\n // Event handlers\n onChange,\n onFocusChange,\n // Standard props\n className,\n children,\n id,\n 'aria-label': ariaLabel,\n 'aria-labelledby': ariaLabelledby,\n 'aria-describedby': ariaDescribedby,\n 'data-testid': dataTestId,\n ...restProps\n } = props;\n\n // Generate unique IDs for accessibility\n const generatedId = useId();\n const checkboxGroupId = id ?? generatedId;\n const labelId = `${checkboxGroupId}-label`;\n const descriptionId = `${checkboxGroupId}-description`;\n const errorId = `${checkboxGroupId}-error`;\n\n // Build aria-describedby from description and error\n const describedByParts: string[] = [];\n if (ariaDescribedby) describedByParts.push(ariaDescribedby);\n if (description) describedByParts.push(descriptionId);\n if (isInvalid && errorMessage) describedByParts.push(errorId);\n const computedAriaDescribedBy = describedByParts.length > 0\n ? describedByParts.join(' ')\n : undefined;\n\n // Dedupe values with warning in development\n const dedupedValue = dedupeWithWarning(value, 'CheckboxGroup');\n const dedupedDefaultValue = dedupeWithWarning(defaultValue, 'CheckboxGroup');\n\n return (\n <CheckboxGroupContext.Provider value={{ variant, size, isInvalid, isDisabled, isReadOnly }}>\n <AriaCheckboxGroup\n ref={ref}\n id={checkboxGroupId}\n name={name}\n value={dedupedValue}\n defaultValue={dedupedDefaultValue}\n isDisabled={isDisabled}\n isReadOnly={isReadOnly}\n isRequired={isRequired}\n isInvalid={isInvalid}\n onChange={onChange}\n onFocusChange={onFocusChange}\n aria-label={ariaLabel}\n aria-labelledby={label ? labelId : ariaLabelledby}\n aria-describedby={computedAriaDescribedBy}\n aria-orientation={orientation}\n aria-required={isRequired || undefined}\n aria-invalid={isInvalid || undefined}\n data-testid={dataTestId}\n className={cn(\"flex flex-col gap-1.5\", className)}\n {...restProps}\n >\n {/* Label with optional required asterisk */}\n {label && (\n <Label id={labelId} className=\"text-sm font-medium text-[var(--content-foreground)]\">\n {label}\n {isRequired && (\n <span className=\"ml-1 text-[var(--destructive)]\" aria-hidden=\"true\">\n *\n </span>\n )}\n </Label>\n )}\n\n {/* Description */}\n {description && (\n <Text\n id={descriptionId}\n slot=\"description\"\n className=\"text-sm text-[var(--menu-muted)]\"\n >\n {description}\n </Text>\n )}\n\n {/* Checkbox items container with orientation */}\n <div className={checkboxGroupVariants({ orientation })}>\n {children}\n </div>\n\n {/* Error message with role=\"alert\" for screen reader announcements */}\n {isInvalid && errorMessage && (\n <FieldError\n id={errorId}\n className=\"text-sm text-[var(--destructive)]\"\n >\n <span role=\"alert\">{errorMessage}</span>\n </FieldError>\n )}\n </AriaCheckboxGroup>\n </CheckboxGroupContext.Provider>\n );\n }\n);\n\nCheckboxGroup.displayName = \"CheckboxGroup\";\n\n// ============================================================================\n// Exports\n// ============================================================================\n\nexport {\n CheckboxGroup,\n Checkbox,\n checkboxGroupVariants,\n checkboxItemVariants,\n checkboxIndicatorVariants,\n checkmarkVariants,\n // Icon exports for custom selectedIcon usage\n CheckmarkIcon,\n TimesIcon,\n};\n"]}
1
+ {"version":3,"sources":["../../../src/schemas/BaseComponentProps.ts","../../../src/elements/CheckboxGroup/CheckboxGroup.types.ts","../../../src/utils/cn.ts","../../../src/styles/interaction-states.ts","../../../src/elements/CheckboxGroup/CheckboxGroup.tsx"],"names":["BaseComponentPropsSchema","z","CheckboxGroupVariantSchema","CheckboxGroupSizeSchema","CheckboxGroupOrientationSchema","CheckboxGroupPropsSchema","CheckboxPropsSchema","CheckboxLabelPropsSchema","CheckboxDescriptionPropsSchema","cn","inputs","twMerge","clsx","FOCUS_STYLES","HIGH_CONTRAST_FOCUS","CheckboxGroupContext","createContext","checkboxGroupVariants","cva","checkboxItemVariants","checkboxIndicatorVariants","checkmarkVariants","CheckmarkIcon","className","props","jsx","TimesIcon","jsxs","CheckboxLabel","children","CheckboxDescription","CheckboxComponent","value","isDisabled","selectedIcon","variant","size","isInvalid","groupDisabled","isReadOnly","useContext","effectiveDisabled","renderSelectedIcon","isSelected","iconClassName","dataSelected","isValidElement","iconElement","cloneElement","AriaCheckbox","renderProps","Fragment","Checkbox","dedupeWithWarning","values","componentName","uniqueValues","CheckboxGroup","forwardRef","ref","label","description","errorMessage","defaultValue","isRequired","orientation","name","onChange","onFocusChange","id","ariaLabel","ariaLabelledby","ariaDescribedby","dataTestId","restProps","generatedId","useId","checkboxGroupId","labelId","descriptionId","errorId","describedByParts","computedAriaDescribedBy","dedupedValue","dedupedDefaultValue","AriaCheckboxGroup","Label","Text","FieldError"],"mappings":"gRASO,IAAMA,CAAAA,CAA2BC,MAAE,MAAA,CAAO,CAE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CAAC,MAAA,CAAA,CAAK,SAAA,CAAU,2CAAA,CAA4C,aAAA,CAAY,MAAA,CAAO,QAAA,CAAA,GAAA,CAE/E,GAEJ,CAAA,CAIDoC,CAAAA,EACCpC,cAAAA,CAAC8D,wBAAAA,CAAA,CACC,EAAA,CAAIR,CAAAA,CACJ,IAAA,CAAK,aAAA,CACL,UAAU,kCAAA,CAET,QAAA,CAAAlB,CAAAA,CACH,CAAA,CAIFpC,cAAAA,CAAC,KAAA,CAAA,CAAI,SAAA,CAAWR,CAAAA,CAAsB,CAAE,WAAA,CAAAgD,CAAY,CAAC,CAAA,CAClD,SAAApC,CAAAA,CACH,CAAA,CAGCQ,CAAAA,EAAayB,CAAAA,EACZrC,eAAC+D,8BAAAA,CAAA,CACC,EAAA,CAAIR,CAAAA,CACJ,UAAU,8CAAA,CAEV,QAAA,CAAAvD,cAAAA,CAAC,MAAA,CAAA,CAAK,KAAK,OAAA,CAAS,QAAA,CAAAqC,CAAAA,CAAa,CAAA,CACnC,GAEJ,CAAA,CACF,CAEJ,CACF,EAEAL,EAAc,WAAA,CAAc,eAAA","file":"index.js","sourcesContent":["import { z } from 'zod';\n\n/**\n * Base props schema for all Themis components\n * Ensures consistent accessibility and styling APIs across the library\n *\n * @see spec.md FR-009 to FR-014 (Accessibility Requirements)\n * @see constitution.md Principle IV (Accessibility First - WCAG 2.2 AA minimum)\n */\nexport const BaseComponentPropsSchema = z.object({\n // Styling\n className: z.string().optional(),\n\n // React\n children: z.any().optional(), // ReactNode not directly supported by Zod\n id: z.string().optional(),\n\n // Accessibility (WCAG 2.2 AA requirements)\n 'aria-label': z.string().optional(),\n 'aria-labelledby': z.string().optional(),\n 'aria-describedby': z.string().optional(),\n 'aria-live': z.enum(['off', 'polite', 'assertive']).optional(),\n 'aria-hidden': z.boolean().optional(),\n\n // Testing & Development\n 'data-testid': z.string().optional(),\n});\n\nexport type BaseComponentProps = z.infer<typeof BaseComponentPropsSchema>;\n","import { z } from 'zod';\nimport { BaseComponentPropsSchema } from '../../schemas/BaseComponentProps';\nimport type { ReactNode } from 'react';\nimport type {\n CheckboxGroupProps as AriaCheckboxGroupProps,\n CheckboxProps as AriaCheckboxProps,\n} from 'react-aria-components';\n\n/**\n * CheckboxGroup variant schema\n * Only 2 variants: default and destructive (matching RadioGroup)\n *\n * @see checkboxgroup-prd.md US-2 (Style Variants)\n */\nexport const CheckboxGroupVariantSchema = z.enum(['default', 'destructive']);\nexport type CheckboxGroupVariant = z.infer<typeof CheckboxGroupVariantSchema>;\n\n/**\n * CheckboxGroup size schema\n * All sizes maintain 44px minimum height for WCAG 2.2 AAA compliance\n *\n * @see checkboxgroup-prd.md US-3 (Size Variants)\n * @see constitution.md Principle IV (Accessibility First)\n */\nexport const CheckboxGroupSizeSchema = z.enum(['sm', 'default', 'lg']);\nexport type CheckboxGroupSize = z.infer<typeof CheckboxGroupSizeSchema>;\n\n/**\n * CheckboxGroup orientation schema\n *\n * @see checkboxgroup-prd.md US-5 (Orientation Support)\n */\nexport const CheckboxGroupOrientationSchema = z.enum(['vertical', 'horizontal']);\nexport type CheckboxGroupOrientation = z.infer<typeof CheckboxGroupOrientationSchema>;\n\n/**\n * CheckboxGroup root component props schema\n *\n * Key difference from RadioGroup: value is string[] (multi-select)\n *\n * @see checkboxgroup-prd.md US-1 (Basic Multi-Selection)\n * @see checkboxgroup-prd.md US-4 (Labels, Descriptions, Errors)\n * @see checkboxgroup-prd.md US-6 (Validation States)\n */\nexport const CheckboxGroupPropsSchema = BaseComponentPropsSchema.extend({\n // Display props (US-4)\n label: z.string().optional(),\n description: z.string().optional(),\n errorMessage: z.string().optional(),\n\n // Selection props (US-1) - array for multi-select (key difference from RadioGroup)\n value: z.array(z.string()).optional(),\n defaultValue: z.array(z.string()).optional(),\n\n // State props (US-6)\n isDisabled: z.boolean().optional().default(false),\n isReadOnly: z.boolean().optional().default(false),\n isRequired: z.boolean().optional().default(false),\n isInvalid: z.boolean().optional().default(false),\n\n // Layout props (US-5)\n orientation: CheckboxGroupOrientationSchema.optional().default('vertical'),\n\n // Variant props (US-2, US-3)\n variant: CheckboxGroupVariantSchema.optional().default('default'),\n size: CheckboxGroupSizeSchema.optional().default('default'),\n\n // Form props (US-6)\n name: z.string().optional(),\n\n // Event handlers\n onChange: z.custom<(value: string[]) => void>().optional(),\n onFocusChange: z.custom<(isFocused: boolean) => void>().optional(),\n\n // Children (Checkbox components)\n children: z.custom<ReactNode>(),\n});\n\nexport type CheckboxGroupProps = z.infer<typeof CheckboxGroupPropsSchema> &\n Omit<AriaCheckboxGroupProps, keyof z.infer<typeof CheckboxGroupPropsSchema>>;\n\n/**\n * Checkbox item component props schema\n *\n * @see checkboxgroup-prd.md US-1 (Basic Multi-Selection)\n * @see checkboxgroup-prd.md US-7 (Rich Content Support)\n */\nexport const CheckboxPropsSchema = BaseComponentPropsSchema.extend({\n // Item value (required)\n value: z.string(),\n\n // Disabled state (individual item)\n isDisabled: z.boolean().optional().default(false),\n\n // Item content - accepts any ReactNode for flexible children\n children: z.custom<ReactNode>(),\n\n // Optional className for custom styling\n className: z.string().optional(),\n\n // Custom icon to display when selected (defaults to checkmark)\n // Useful for destructive variants where an X icon may be more appropriate\n selectedIcon: z.custom<ReactNode>().optional(),\n});\n\nexport type CheckboxProps = z.infer<typeof CheckboxPropsSchema> &\n Omit<AriaCheckboxProps, keyof z.infer<typeof CheckboxPropsSchema>>;\n\n/**\n * Checkbox.Label sub-component props schema\n * Helper component for styled label within Checkbox item\n *\n * @see checkboxgroup-prd.md US-7 (Rich Content Support)\n */\nexport const CheckboxLabelPropsSchema = z.object({\n // Label content\n children: z.custom<ReactNode>(),\n\n // Optional className for custom styling\n className: z.string().optional(),\n});\n\nexport type CheckboxLabelProps = z.infer<typeof CheckboxLabelPropsSchema>;\n\n/**\n * Checkbox.Description sub-component props schema\n * Helper component for styled description within Checkbox item (muted text)\n *\n * @see checkboxgroup-prd.md US-7 (Rich Content Support)\n */\nexport const CheckboxDescriptionPropsSchema = z.object({\n // Description content\n children: z.custom<ReactNode>(),\n\n // Optional className for custom styling\n className: z.string().optional(),\n});\n\nexport type CheckboxDescriptionProps = z.infer<typeof CheckboxDescriptionPropsSchema>;\n\n/**\n * CVA variant configuration types\n * Used for class-variance-authority integration\n */\nexport type CheckboxGroupVariantType = CheckboxGroupVariant;\nexport type CheckboxGroupSizeType = CheckboxGroupSize;\nexport type CheckboxGroupOrientationType = CheckboxGroupOrientation;\n","/**\n * Class Name Utility\n * Merges Tailwind CSS classes with conflict resolution\n *\n * Combines clsx for conditional classes and tailwind-merge for deduplication\n *\n * @example\n * cn('px-2 py-1', 'px-4') // => 'py-1 px-4' (px-4 overrides px-2)\n * cn('text-red-500', condition && 'text-blue-500') // => conditional application\n */\n\nimport { clsx, type ClassValue } from 'clsx';\nimport { twMerge } from 'tailwind-merge';\n\nexport function cn(...inputs: ClassValue[]): string {\n return twMerge(clsx(inputs));\n}\n","/**\n * 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\n/**\n * CheckboxGroup Component\n * Accessible multi-selection checkbox group with React Aria primitives and CVA styling\n *\n * Key Features:\n * - Bordered container design with explicit 44px+ touch targets\n * - 2 variants: default, destructive (no outline per clarification)\n * - 3 sizes: sm (44px), default (48px), lg (56px)\n * - Tab moves focus between checkboxes, Space toggles (standard checkbox behavior)\n * - Error styling on ALL items (cognitive accessibility)\n * - Spring animation for checkmark indicator\n * - RTL support (indicator auto-flips)\n * - Checkbox.Label and Checkbox.Description sub-components\n * - value: string[] for multi-select (key difference from RadioGroup)\n *\n * @see checkboxgroup-prd.md (Product Requirements)\n * @see plan.md (12 Key Clarifications)\n * @see React Aria CheckboxGroup: https://react-spectrum.adobe.com/react-aria/CheckboxGroup.html\n * @see constitution.md Principle IV (Accessibility First - WCAG 2.2 AAA)\n */\n\nimport {\n forwardRef,\n createContext,\n useContext,\n useId,\n cloneElement,\n isValidElement,\n type ReactNode,\n type ForwardedRef,\n type ReactElement,\n} from 'react';\nimport {\n CheckboxGroup as AriaCheckboxGroup,\n Checkbox as AriaCheckbox,\n Label,\n Text,\n FieldError,\n} from 'react-aria-components';\nimport { cva } from 'class-variance-authority';\nimport { cn } from '../../utils/cn';\nimport { FOCUS_STYLES, HIGH_CONTRAST_FOCUS } from '../../styles/interaction-states';\nimport type {\n CheckboxGroupProps,\n CheckboxProps,\n CheckboxLabelProps,\n CheckboxDescriptionProps,\n CheckboxGroupVariant,\n CheckboxGroupSize,\n} from './CheckboxGroup.types';\n\n// ============================================================================\n// Context\n// ============================================================================\n\n/**\n * CheckboxGroup context value\n * Includes isDisabled and isReadOnly per clarification (plan.md #10)\n */\ninterface CheckboxGroupContextValue {\n variant: CheckboxGroupVariant;\n size: CheckboxGroupSize;\n isInvalid: boolean;\n isDisabled: boolean;\n isReadOnly: boolean;\n}\n\nconst CheckboxGroupContext = createContext<CheckboxGroupContextValue>({\n variant: 'default',\n size: 'default',\n isInvalid: false,\n isDisabled: false,\n isReadOnly: false,\n});\n\n// ============================================================================\n// CVA Variants\n// ============================================================================\n\n/**\n * CheckboxGroup container variants\n * Controls orientation and spacing (gap-2 = 8px per clarification)\n */\nconst checkboxGroupVariants = cva(\n // Base: flex container\n \"flex\",\n {\n variants: {\n orientation: {\n vertical: \"flex-col gap-2\",\n horizontal: \"flex-row flex-wrap gap-2\",\n },\n },\n defaultVariants: {\n orientation: \"vertical\",\n },\n }\n);\n\n/**\n * Checkbox item bordered container variants\n * Bordered container design with explicit touch targets\n * All sizes maintain 44px minimum height (WCAG 2.2 AAA)\n * All sizes use rounded-md (6px) per clarification\n */\nconst checkboxItemVariants = cva(\n // Base: bordered container with flex layout, RTL support\n [\n \"flex items-center gap-3 rounded-md border cursor-pointer\",\n \"transition-colors duration-200\",\n \"rtl:flex-row-reverse\", // RTL: indicator flips to right\n // Focus ring on entire container\n FOCUS_STYLES,\n HIGH_CONTRAST_FOCUS,\n ].join(\" \"),\n {\n variants: {\n variant: {\n default: [\n \"border-[var(--border)]\",\n \"data-[hovered]:bg-[var(--accent)]/10\",\n \"data-[selected]:border-[var(--primary)]\",\n \"data-[selected]:bg-[var(--primary)]/10\",\n ].join(\" \"),\n destructive: [\n \"border-[var(--border)]\",\n \"data-[hovered]:bg-[var(--destructive-background)]/10\",\n \"data-[selected]:border-[var(--destructive-background)]\",\n \"data-[selected]:bg-[var(--destructive-background)]/10\",\n ].join(\" \"),\n },\n size: {\n sm: \"min-h-[44px] py-2 px-3 text-sm\",\n default: \"min-h-[48px] py-3 px-4 text-sm\",\n lg: \"min-h-[56px] py-4 px-5 text-base\",\n },\n isDisabled: {\n true: \"opacity-50 cursor-not-allowed\",\n false: \"\",\n },\n isReadOnly: {\n // Subtle visual cue per clarification\n true: \"cursor-default\",\n false: \"\",\n },\n isInvalid: {\n // Error: ALL items get destructive border (cognitive accessibility)\n true: \"border-[var(--destructive-background)]\",\n false: \"\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n size: \"default\",\n isDisabled: false,\n isReadOnly: false,\n isInvalid: false,\n },\n }\n);\n\n/**\n * Square indicator (checkbox box) variants\n * Uses rounded-sm (2px) for square appearance (unlike RadioGroup's circle)\n */\nconst checkboxIndicatorVariants = cva(\n // Base: square with border, flex-shrink-0 to prevent squishing\n \"flex-shrink-0 rounded-sm border-2 flex items-center justify-center transition-colors duration-200\",\n {\n variants: {\n variant: {\n default: [\n \"border-[var(--border)]\",\n \"data-[selected]:border-[var(--primary)]\",\n \"data-[selected]:bg-[var(--primary)]\",\n ].join(\" \"),\n destructive: [\n \"border-[var(--border)]\",\n \"data-[selected]:border-[var(--destructive-background)]\",\n \"data-[selected]:bg-[var(--destructive-background)]\",\n ].join(\" \"),\n },\n size: {\n sm: \"h-4 w-4\",\n default: \"h-5 w-5\",\n lg: \"h-6 w-6\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n size: \"default\",\n },\n }\n);\n\n/**\n * Checkmark SVG variants\n * Spring animation: cubic-bezier(0.34, 1.56, 0.64, 1) with slight overshoot\n */\nconst checkmarkVariants = cva(\n // Base: centered checkmark with spring animation\n [\n \"transition-transform duration-200\",\n // Spring animation with overshoot\n \"[transition-timing-function:cubic-bezier(0.34,1.56,0.64,1)]\",\n // Respect reduced motion preference\n \"motion-reduce:transition-none\",\n // Scale from 0 to 1 on selection\n \"scale-0 data-[selected]:scale-100\",\n ].join(\" \"),\n {\n variants: {\n variant: {\n default: \"text-[var(--primary-foreground)]\",\n destructive: \"text-[var(--destructive-foreground)]\",\n },\n size: {\n sm: \"h-3 w-3\",\n default: \"h-3.5 w-3.5\",\n lg: \"h-4 w-4\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n size: \"default\",\n },\n }\n);\n\n// ============================================================================\n// Icon Components\n// ============================================================================\n\n/**\n * Checkmark SVG icon (default)\n * Used inside the checkbox indicator when selected\n */\nfunction CheckmarkIcon({ className, ...props }: { className?: string; 'data-selected'?: boolean }): ReactNode {\n return (\n <svg\n className={className}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth={3}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n aria-hidden=\"true\"\n {...props}\n >\n <polyline points=\"20 6 9 17 4 12\" />\n </svg>\n );\n}\n\n/**\n * Times (X) SVG icon\n * Alternative icon for destructive or exclusion selections\n * @example <Checkbox value=\"exclude\" selectedIcon={<TimesIcon />}>Exclude this item</Checkbox>\n */\nfunction TimesIcon({ className, ...props }: { className?: string; 'data-selected'?: boolean }): ReactNode {\n return (\n <svg\n className={className}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth={3}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n aria-hidden=\"true\"\n {...props}\n >\n <line x1=\"18\" y1=\"6\" x2=\"6\" y2=\"18\" />\n <line x1=\"6\" y1=\"6\" x2=\"18\" y2=\"18\" />\n </svg>\n );\n}\n\n// ============================================================================\n// Sub-components\n// ============================================================================\n\n/**\n * Checkbox.Label - Styled label for checkbox item content\n */\nfunction CheckboxLabel({ children, className }: CheckboxLabelProps): ReactNode {\n return (\n <span className={cn(\"font-medium text-[var(--content-foreground)]\", className)}>\n {children}\n </span>\n );\n}\n\nCheckboxLabel.displayName = \"Checkbox.Label\";\n\n/**\n * Checkbox.Description - Styled description for checkbox item content (muted)\n */\nfunction CheckboxDescription({ children, className }: CheckboxDescriptionProps): ReactNode {\n return (\n <span className={cn(\"text-sm text-[var(--menu-muted)]\", className)}>\n {children}\n </span>\n );\n}\n\nCheckboxDescription.displayName = \"Checkbox.Description\";\n\n// ============================================================================\n// Checkbox Component\n// ============================================================================\n\n/**\n * Checkbox item component with bordered container design\n */\nfunction CheckboxComponent({ value, isDisabled, children, className, selectedIcon }: CheckboxProps): ReactNode {\n const { variant, size, isInvalid, isDisabled: groupDisabled, isReadOnly } = useContext(CheckboxGroupContext);\n\n // Individual isDisabled OR group isDisabled\n const effectiveDisabled = isDisabled || groupDisabled;\n\n // Render the selected icon - use custom icon if provided, otherwise default CheckmarkIcon\n const renderSelectedIcon = (isSelected: boolean) => {\n const iconClassName = cn(checkmarkVariants({ variant, size }));\n const dataSelected = isSelected || undefined;\n\n if (selectedIcon) {\n // Clone the custom icon element to add our styling classes\n if (isValidElement(selectedIcon)) {\n const iconElement = selectedIcon as ReactElement<{ className?: string; 'data-selected'?: boolean }>;\n return cloneElement(iconElement, {\n className: cn(iconClassName, iconElement.props.className),\n 'data-selected': dataSelected,\n });\n }\n // If it's not a valid element (e.g., just text), wrap it\n return <span className={iconClassName} data-selected={dataSelected}>{selectedIcon}</span>;\n }\n\n // Default: CheckmarkIcon\n return (\n <CheckmarkIcon\n className={iconClassName}\n data-selected={dataSelected}\n />\n );\n };\n\n return (\n <AriaCheckbox\n value={value}\n isDisabled={effectiveDisabled}\n className={(renderProps) =>\n cn(\n checkboxItemVariants({\n variant,\n size,\n isDisabled: renderProps.isDisabled,\n isReadOnly,\n isInvalid,\n }),\n className\n )\n }\n >\n {(renderProps) => (\n <>\n {/* Square indicator */}\n <div\n className={checkboxIndicatorVariants({ variant, size })}\n data-selected={renderProps.isSelected || undefined}\n >\n {/* Icon with spring animation */}\n {renderSelectedIcon(renderProps.isSelected)}\n </div>\n\n {/* Children content (flexible - text, icons, complex layouts) */}\n <div className=\"flex-1 flex flex-col\">\n {children}\n </div>\n </>\n )}\n </AriaCheckbox>\n );\n}\n\n// Attach sub-components\nconst Checkbox = Object.assign(CheckboxComponent, {\n Label: CheckboxLabel,\n Description: CheckboxDescription,\n}) as typeof CheckboxComponent & {\n Label: typeof CheckboxLabel;\n Description: typeof CheckboxDescription;\n displayName: string;\n};\n\nCheckbox.displayName = \"Checkbox\";\n\n// ============================================================================\n// Duplicate Value Warning\n// ============================================================================\n\n/**\n * Deduplicates array and warns in development mode\n * Per clarification: dedupe internally + console.warn in development\n */\nfunction dedupeWithWarning(values: string[] | undefined, componentName: string): string[] | undefined {\n if (!values) return values;\n\n const uniqueValues = [...new Set(values)];\n\n if (process.env.NODE_ENV !== 'production' && uniqueValues.length !== values.length) {\n console.warn(\n `[${componentName}] Received duplicate values in value/defaultValue prop. ` +\n `Original: [${values.join(', ')}], Deduplicated: [${uniqueValues.join(', ')}]. ` +\n `Duplicate values are automatically removed.`\n );\n }\n\n return uniqueValues;\n}\n\n// ============================================================================\n// CheckboxGroup Component\n// ============================================================================\n\n/**\n * CheckboxGroup root component\n * Accessible multi-selection control with bordered container design\n */\nconst CheckboxGroup = forwardRef<HTMLDivElement, CheckboxGroupProps>(\n function CheckboxGroup(props: CheckboxGroupProps, ref: ForwardedRef<HTMLDivElement>) {\n const {\n // Display props\n label,\n description,\n errorMessage,\n // Selection props (string[] for multi-select)\n value,\n defaultValue,\n // State props\n isDisabled = false,\n isReadOnly = false,\n isRequired = false,\n isInvalid = false,\n // Layout props\n orientation = 'vertical',\n // Variant props\n variant = 'default',\n size = 'default',\n // Form props\n name,\n // Event handlers\n onChange,\n onFocusChange,\n // Standard props\n className,\n children,\n id,\n 'aria-label': ariaLabel,\n 'aria-labelledby': ariaLabelledby,\n 'aria-describedby': ariaDescribedby,\n 'data-testid': dataTestId,\n ...restProps\n } = props;\n\n // Generate unique IDs for accessibility\n const generatedId = useId();\n const checkboxGroupId = id ?? generatedId;\n const labelId = `${checkboxGroupId}-label`;\n const descriptionId = `${checkboxGroupId}-description`;\n const errorId = `${checkboxGroupId}-error`;\n\n // Build aria-describedby from description and error\n const describedByParts: string[] = [];\n if (ariaDescribedby) describedByParts.push(ariaDescribedby);\n if (description) describedByParts.push(descriptionId);\n if (isInvalid && errorMessage) describedByParts.push(errorId);\n const computedAriaDescribedBy = describedByParts.length > 0\n ? describedByParts.join(' ')\n : undefined;\n\n // Dedupe values with warning in development\n const dedupedValue = dedupeWithWarning(value, 'CheckboxGroup');\n const dedupedDefaultValue = dedupeWithWarning(defaultValue, 'CheckboxGroup');\n\n return (\n <CheckboxGroupContext.Provider value={{ variant, size, isInvalid, isDisabled, isReadOnly }}>\n <AriaCheckboxGroup\n ref={ref}\n id={checkboxGroupId}\n name={name}\n value={dedupedValue}\n defaultValue={dedupedDefaultValue}\n isDisabled={isDisabled}\n isReadOnly={isReadOnly}\n isRequired={isRequired}\n isInvalid={isInvalid}\n onChange={onChange}\n onFocusChange={onFocusChange}\n aria-label={ariaLabel}\n aria-labelledby={label ? labelId : ariaLabelledby}\n aria-describedby={computedAriaDescribedBy}\n aria-orientation={orientation}\n aria-required={isRequired || undefined}\n aria-invalid={isInvalid || undefined}\n data-testid={dataTestId}\n className={cn(\"flex flex-col gap-1.5\", className)}\n {...restProps}\n >\n {/* Label with optional required asterisk */}\n {label && (\n <Label id={labelId} className=\"text-sm font-medium text-[var(--content-foreground)]\">\n {label}\n {isRequired && (\n <span className=\"ml-1 text-[var(--destructive-background)]\" aria-hidden=\"true\">\n *\n </span>\n )}\n </Label>\n )}\n\n {/* Description */}\n {description && (\n <Text\n id={descriptionId}\n slot=\"description\"\n className=\"text-sm text-[var(--menu-muted)]\"\n >\n {description}\n </Text>\n )}\n\n {/* Checkbox items container with orientation */}\n <div className={checkboxGroupVariants({ orientation })}>\n {children}\n </div>\n\n {/* Error message with role=\"alert\" for screen reader announcements */}\n {isInvalid && errorMessage && (\n <FieldError\n id={errorId}\n className=\"text-sm text-[var(--destructive-background)]\"\n >\n <span role=\"alert\">{errorMessage}</span>\n </FieldError>\n )}\n </AriaCheckboxGroup>\n </CheckboxGroupContext.Provider>\n );\n }\n);\n\nCheckboxGroup.displayName = \"CheckboxGroup\";\n\n// ============================================================================\n// Exports\n// ============================================================================\n\nexport {\n CheckboxGroup,\n Checkbox,\n checkboxGroupVariants,\n checkboxItemVariants,\n checkboxIndicatorVariants,\n checkmarkVariants,\n // Icon exports for custom selectedIcon usage\n CheckmarkIcon,\n TimesIcon,\n};\n"]}
@@ -1,3 +1,3 @@
1
1
  "use client";
2
- import {z}from'zod';import {createContext,forwardRef,useId,useContext,isValidElement,cloneElement}from'react';import {CheckboxGroup,Label,Text,FieldError,Checkbox}from'react-aria-components';import {cva}from'class-variance-authority';import {clsx}from'clsx';import {twMerge}from'tailwind-merge';import {jsx,jsxs,Fragment}from'react/jsx-runtime';var P=z.object({className:z.string().optional(),children:z.any().optional(),id:z.string().optional(),"aria-label":z.string().optional(),"aria-labelledby":z.string().optional(),"aria-describedby":z.string().optional(),"aria-live":z.enum(["off","polite","assertive"]).optional(),"aria-hidden":z.boolean().optional(),"data-testid":z.string().optional()});var T=z.enum(["default","destructive"]),I=z.enum(["sm","default","lg"]),O=z.enum(["vertical","horizontal"]),se=P.extend({label:z.string().optional(),description:z.string().optional(),errorMessage:z.string().optional(),value:z.array(z.string()).optional(),defaultValue:z.array(z.string()).optional(),isDisabled:z.boolean().optional().default(false),isReadOnly:z.boolean().optional().default(false),isRequired:z.boolean().optional().default(false),isInvalid:z.boolean().optional().default(false),orientation:O.optional().default("vertical"),variant:T.optional().default("default"),size:I.optional().default("default"),name:z.string().optional(),onChange:z.custom().optional(),onFocusChange:z.custom().optional(),children:z.custom()}),ne=P.extend({value:z.string(),isDisabled:z.boolean().optional().default(false),children:z.custom(),className:z.string().optional(),selectedIcon:z.custom().optional()}),ce=z.object({children:z.custom(),className:z.string().optional()}),le=z.object({children:z.custom(),className:z.string().optional()});function d(...o){return twMerge(clsx(o))}var S="data-[focus-visible]:ring-2 data-[focus-visible]:ring-[var(--themis-ring)] data-[focus-visible]:ring-offset-2";var m="hc:data-[focus-visible]:outline hc:data-[focus-visible]:outline-4 hc:data-[focus-visible]:outline-offset-2 hc:data-[focus-visible]:outline-foreground";var A=createContext({variant:"default",size:"default",isInvalid:false,isDisabled:false,isReadOnly:false}),w=cva("flex",{variants:{orientation:{vertical:"flex-col gap-2",horizontal:"flex-row flex-wrap gap-2"}},defaultVariants:{orientation:"vertical"}}),$=cva(["flex items-center gap-3 rounded-md border cursor-pointer","transition-colors duration-200","rtl:flex-row-reverse",S,m].join(" "),{variants:{variant:{default:["border-[var(--border)]","data-[hovered]:bg-[var(--accent)]/10","data-[selected]:border-[var(--primary)]","data-[selected]:bg-[var(--primary)]/10"].join(" "),destructive:["border-[var(--border)]","data-[hovered]:bg-[var(--destructive)]/10","data-[selected]:border-[var(--destructive)]","data-[selected]:bg-[var(--destructive)]/10"].join(" ")},size:{sm:"min-h-[44px] py-2 px-3 text-sm",default:"min-h-[48px] py-3 px-4 text-sm",lg:"min-h-[56px] py-4 px-5 text-base"},isDisabled:{true:"opacity-50 cursor-not-allowed",false:""},isReadOnly:{true:"cursor-default",false:""},isInvalid:{true:"border-[var(--destructive)]",false:""}},defaultVariants:{variant:"default",size:"default",isDisabled:false,isReadOnly:false,isInvalid:false}}),j=cva("flex-shrink-0 rounded-sm border-2 flex items-center justify-center transition-colors duration-200",{variants:{variant:{default:["border-[var(--border)]","data-[selected]:border-[var(--primary)]","data-[selected]:bg-[var(--primary)]"].join(" "),destructive:["border-[var(--border)]","data-[selected]:border-[var(--destructive)]","data-[selected]:bg-[var(--destructive)]"].join(" ")},size:{sm:"h-4 w-4",default:"h-5 w-5",lg:"h-6 w-6"}},defaultVariants:{variant:"default",size:"default"}}),H=cva(["transition-transform duration-200","[transition-timing-function:cubic-bezier(0.34,1.56,0.64,1)]","motion-reduce:transition-none","scale-0 data-[selected]:scale-100"].join(" "),{variants:{variant:{default:"text-[var(--primary-foreground)]",destructive:"text-[var(--destructive-foreground)]"},size:{sm:"h-3 w-3",default:"h-3.5 w-3.5",lg:"h-4 w-4"}},defaultVariants:{variant:"default",size:"default"}});function F({className:o,...t}){return jsx("svg",{className:o,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:3,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...t,children:jsx("polyline",{points:"20 6 9 17 4 12"})})}function Ne({className:o,...t}){return jsxs("svg",{className:o,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:3,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...t,children:[jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})}function B({children:o,className:t}){return jsx("span",{className:d("font-medium text-[var(--content-foreground)]",t),children:o})}B.displayName="Checkbox.Label";function Y({children:o,className:t}){return jsx("span",{className:d("text-sm text-[var(--menu-muted)]",t),children:o})}Y.displayName="Checkbox.Description";function Pe({value:o,isDisabled:t,children:n,className:p,selectedIcon:s}){let{variant:c,size:u,isInvalid:N,isDisabled:C,isReadOnly:k}=useContext(A),b=t||C,l=i=>{let h=d(H({variant:c,size:u})),x=i||void 0;if(s){if(isValidElement(s)){let v=s;return cloneElement(v,{className:d(h,v.props.className),"data-selected":x})}return jsx("span",{className:h,"data-selected":x,children:s})}return jsx(F,{className:h,"data-selected":x})};return jsx(Checkbox,{value:o,isDisabled:b,className:i=>d($({variant:c,size:u,isDisabled:i.isDisabled,isReadOnly:k,isInvalid:N}),p),children:i=>jsxs(Fragment,{children:[jsx("div",{className:j({variant:c,size:u}),"data-selected":i.isSelected||void 0,children:l(i.isSelected)}),jsx("div",{className:"flex-1 flex flex-col",children:n})]})})}var U=Object.assign(Pe,{Label:B,Description:Y});U.displayName="Checkbox";function _(o,t){if(!o)return o;let n=[...new Set(o)];return process.env.NODE_ENV!=="production"&&n.length!==o.length&&console.warn(`[${t}] Received duplicate values in value/defaultValue prop. Original: [${o.join(", ")}], Deduplicated: [${n.join(", ")}]. Duplicate values are automatically removed.`),n}var q=forwardRef(function(t,n){let{label:p,description:s,errorMessage:c,value:u,defaultValue:N,isDisabled:C=false,isReadOnly:k=false,isRequired:b=false,isInvalid:l=false,orientation:i="vertical",variant:h="default",size:x="default",name:v,onChange:M,onFocusChange:W,className:J,children:K,id:Q,"aria-label":X,"aria-labelledby":Z,"aria-describedby":R,"data-testid":ee,...oe}=t,ae=useId(),y=Q??ae,D=`${y}-label`,V=`${y}-description`,E=`${y}-error`,f=[];R&&f.push(R),s&&f.push(V),l&&c&&f.push(E);let te=f.length>0?f.join(" "):void 0,re=_(u,"CheckboxGroup"),ie=_(N,"CheckboxGroup");return jsx(A.Provider,{value:{variant:h,size:x,isInvalid:l,isDisabled:C,isReadOnly:k},children:jsxs(CheckboxGroup,{ref:n,id:y,name:v,value:re,defaultValue:ie,isDisabled:C,isReadOnly:k,isRequired:b,isInvalid:l,onChange:M,onFocusChange:W,"aria-label":X,"aria-labelledby":p?D:Z,"aria-describedby":te,"aria-orientation":i,"aria-required":b||void 0,"aria-invalid":l||void 0,"data-testid":ee,className:d("flex flex-col gap-1.5",J),...oe,children:[p&&jsxs(Label,{id:D,className:"text-sm font-medium text-[var(--content-foreground)]",children:[p,b&&jsx("span",{className:"ml-1 text-[var(--destructive)]","aria-hidden":"true",children:"*"})]}),s&&jsx(Text,{id:V,slot:"description",className:"text-sm text-[var(--menu-muted)]",children:s}),jsx("div",{className:w({orientation:i}),children:K}),l&&c&&jsx(FieldError,{id:E,className:"text-sm text-[var(--destructive)]",children:jsx("span",{role:"alert",children:c})})]})})});q.displayName="CheckboxGroup";export{U as Checkbox,le as CheckboxDescriptionPropsSchema,q as CheckboxGroup,O as CheckboxGroupOrientationSchema,se as CheckboxGroupPropsSchema,I as CheckboxGroupSizeSchema,T as CheckboxGroupVariantSchema,ce as CheckboxLabelPropsSchema,ne as CheckboxPropsSchema,F as CheckmarkIcon,Ne as TimesIcon,w as checkboxGroupVariants,j as checkboxIndicatorVariants,$ as checkboxItemVariants,H as checkmarkVariants};//# sourceMappingURL=index.mjs.map
2
+ import {z}from'zod';import {createContext,forwardRef,useId,useContext,isValidElement,cloneElement}from'react';import {CheckboxGroup,Label,Text,FieldError,Checkbox}from'react-aria-components';import {cva}from'class-variance-authority';import {clsx}from'clsx';import {twMerge}from'tailwind-merge';import {jsx,jsxs,Fragment}from'react/jsx-runtime';var P=z.object({className:z.string().optional(),children:z.any().optional(),id:z.string().optional(),"aria-label":z.string().optional(),"aria-labelledby":z.string().optional(),"aria-describedby":z.string().optional(),"aria-live":z.enum(["off","polite","assertive"]).optional(),"aria-hidden":z.boolean().optional(),"data-testid":z.string().optional()});var T=z.enum(["default","destructive"]),I=z.enum(["sm","default","lg"]),O=z.enum(["vertical","horizontal"]),ne=P.extend({label:z.string().optional(),description:z.string().optional(),errorMessage:z.string().optional(),value:z.array(z.string()).optional(),defaultValue:z.array(z.string()).optional(),isDisabled:z.boolean().optional().default(false),isReadOnly:z.boolean().optional().default(false),isRequired:z.boolean().optional().default(false),isInvalid:z.boolean().optional().default(false),orientation:O.optional().default("vertical"),variant:T.optional().default("default"),size:I.optional().default("default"),name:z.string().optional(),onChange:z.custom().optional(),onFocusChange:z.custom().optional(),children:z.custom()}),se=P.extend({value:z.string(),isDisabled:z.boolean().optional().default(false),children:z.custom(),className:z.string().optional(),selectedIcon:z.custom().optional()}),ce=z.object({children:z.custom(),className:z.string().optional()}),de=z.object({children:z.custom(),className:z.string().optional()});function l(...o){return twMerge(clsx(o))}var g="data-[focus-visible]:ring-2 data-[focus-visible]:ring-[var(--themis-ring)] data-[focus-visible]:ring-offset-2";var m="hc:data-[focus-visible]:outline hc:data-[focus-visible]:outline-4 hc:data-[focus-visible]:outline-offset-2 hc:data-[focus-visible]:outline-foreground";var A=createContext({variant:"default",size:"default",isInvalid:false,isDisabled:false,isReadOnly:false}),w=cva("flex",{variants:{orientation:{vertical:"flex-col gap-2",horizontal:"flex-row flex-wrap gap-2"}},defaultVariants:{orientation:"vertical"}}),$=cva(["flex items-center gap-3 rounded-md border cursor-pointer","transition-colors duration-200","rtl:flex-row-reverse",g,m].join(" "),{variants:{variant:{default:["border-[var(--border)]","data-[hovered]:bg-[var(--accent)]/10","data-[selected]:border-[var(--primary)]","data-[selected]:bg-[var(--primary)]/10"].join(" "),destructive:["border-[var(--border)]","data-[hovered]:bg-[var(--destructive-background)]/10","data-[selected]:border-[var(--destructive-background)]","data-[selected]:bg-[var(--destructive-background)]/10"].join(" ")},size:{sm:"min-h-[44px] py-2 px-3 text-sm",default:"min-h-[48px] py-3 px-4 text-sm",lg:"min-h-[56px] py-4 px-5 text-base"},isDisabled:{true:"opacity-50 cursor-not-allowed",false:""},isReadOnly:{true:"cursor-default",false:""},isInvalid:{true:"border-[var(--destructive-background)]",false:""}},defaultVariants:{variant:"default",size:"default",isDisabled:false,isReadOnly:false,isInvalid:false}}),j=cva("flex-shrink-0 rounded-sm border-2 flex items-center justify-center transition-colors duration-200",{variants:{variant:{default:["border-[var(--border)]","data-[selected]:border-[var(--primary)]","data-[selected]:bg-[var(--primary)]"].join(" "),destructive:["border-[var(--border)]","data-[selected]:border-[var(--destructive-background)]","data-[selected]:bg-[var(--destructive-background)]"].join(" ")},size:{sm:"h-4 w-4",default:"h-5 w-5",lg:"h-6 w-6"}},defaultVariants:{variant:"default",size:"default"}}),H=cva(["transition-transform duration-200","[transition-timing-function:cubic-bezier(0.34,1.56,0.64,1)]","motion-reduce:transition-none","scale-0 data-[selected]:scale-100"].join(" "),{variants:{variant:{default:"text-[var(--primary-foreground)]",destructive:"text-[var(--destructive-foreground)]"},size:{sm:"h-3 w-3",default:"h-3.5 w-3.5",lg:"h-4 w-4"}},defaultVariants:{variant:"default",size:"default"}});function F({className:o,...t}){return jsx("svg",{className:o,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:3,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...t,children:jsx("polyline",{points:"20 6 9 17 4 12"})})}function Ne({className:o,...t}){return jsxs("svg",{className:o,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:3,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...t,children:[jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})}function B({children:o,className:t}){return jsx("span",{className:l("font-medium text-[var(--content-foreground)]",t),children:o})}B.displayName="Checkbox.Label";function Y({children:o,className:t}){return jsx("span",{className:l("text-sm text-[var(--menu-muted)]",t),children:o})}Y.displayName="Checkbox.Description";function Pe({value:o,isDisabled:t,children:s,className:p,selectedIcon:n}){let{variant:c,size:u,isInvalid:N,isDisabled:C,isReadOnly:k}=useContext(A),b=t||C,d=i=>{let h=l(H({variant:c,size:u})),x=i||void 0;if(n){if(isValidElement(n)){let v=n;return cloneElement(v,{className:l(h,v.props.className),"data-selected":x})}return jsx("span",{className:h,"data-selected":x,children:n})}return jsx(F,{className:h,"data-selected":x})};return jsx(Checkbox,{value:o,isDisabled:b,className:i=>l($({variant:c,size:u,isDisabled:i.isDisabled,isReadOnly:k,isInvalid:N}),p),children:i=>jsxs(Fragment,{children:[jsx("div",{className:j({variant:c,size:u}),"data-selected":i.isSelected||void 0,children:d(i.isSelected)}),jsx("div",{className:"flex-1 flex flex-col",children:s})]})})}var U=Object.assign(Pe,{Label:B,Description:Y});U.displayName="Checkbox";function _(o,t){if(!o)return o;let s=[...new Set(o)];return process.env.NODE_ENV!=="production"&&s.length!==o.length&&console.warn(`[${t}] Received duplicate values in value/defaultValue prop. Original: [${o.join(", ")}], Deduplicated: [${s.join(", ")}]. Duplicate values are automatically removed.`),s}var q=forwardRef(function(t,s){let{label:p,description:n,errorMessage:c,value:u,defaultValue:N,isDisabled:C=false,isReadOnly:k=false,isRequired:b=false,isInvalid:d=false,orientation:i="vertical",variant:h="default",size:x="default",name:v,onChange:M,onFocusChange:W,className:J,children:K,id:Q,"aria-label":X,"aria-labelledby":Z,"aria-describedby":R,"data-testid":ee,...oe}=t,ae=useId(),y=Q??ae,D=`${y}-label`,V=`${y}-description`,E=`${y}-error`,f=[];R&&f.push(R),n&&f.push(V),d&&c&&f.push(E);let te=f.length>0?f.join(" "):void 0,re=_(u,"CheckboxGroup"),ie=_(N,"CheckboxGroup");return jsx(A.Provider,{value:{variant:h,size:x,isInvalid:d,isDisabled:C,isReadOnly:k},children:jsxs(CheckboxGroup,{ref:s,id:y,name:v,value:re,defaultValue:ie,isDisabled:C,isReadOnly:k,isRequired:b,isInvalid:d,onChange:M,onFocusChange:W,"aria-label":X,"aria-labelledby":p?D:Z,"aria-describedby":te,"aria-orientation":i,"aria-required":b||void 0,"aria-invalid":d||void 0,"data-testid":ee,className:l("flex flex-col gap-1.5",J),...oe,children:[p&&jsxs(Label,{id:D,className:"text-sm font-medium text-[var(--content-foreground)]",children:[p,b&&jsx("span",{className:"ml-1 text-[var(--destructive-background)]","aria-hidden":"true",children:"*"})]}),n&&jsx(Text,{id:V,slot:"description",className:"text-sm text-[var(--menu-muted)]",children:n}),jsx("div",{className:w({orientation:i}),children:K}),d&&c&&jsx(FieldError,{id:E,className:"text-sm text-[var(--destructive-background)]",children:jsx("span",{role:"alert",children:c})})]})})});q.displayName="CheckboxGroup";export{U as Checkbox,de as CheckboxDescriptionPropsSchema,q as CheckboxGroup,O as CheckboxGroupOrientationSchema,ne as CheckboxGroupPropsSchema,I as CheckboxGroupSizeSchema,T as CheckboxGroupVariantSchema,ce as CheckboxLabelPropsSchema,se as CheckboxPropsSchema,F as CheckmarkIcon,Ne as TimesIcon,w as checkboxGroupVariants,j as checkboxIndicatorVariants,$ as checkboxItemVariants,H as checkmarkVariants};//# sourceMappingURL=index.mjs.map
3
3
  //# sourceMappingURL=index.mjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/schemas/BaseComponentProps.ts","../../../src/elements/CheckboxGroup/CheckboxGroup.types.ts","../../../src/utils/cn.ts","../../../src/styles/interaction-states.ts","../../../src/elements/CheckboxGroup/CheckboxGroup.tsx"],"names":["BaseComponentPropsSchema","z","CheckboxGroupVariantSchema","CheckboxGroupSizeSchema","CheckboxGroupOrientationSchema","CheckboxGroupPropsSchema","CheckboxPropsSchema","CheckboxLabelPropsSchema","CheckboxDescriptionPropsSchema","cn","inputs","twMerge","clsx","FOCUS_STYLES","HIGH_CONTRAST_FOCUS","CheckboxGroupContext","createContext","checkboxGroupVariants","cva","checkboxItemVariants","checkboxIndicatorVariants","checkmarkVariants","CheckmarkIcon","className","props","jsx","TimesIcon","jsxs","CheckboxLabel","children","CheckboxDescription","CheckboxComponent","value","isDisabled","selectedIcon","variant","size","isInvalid","groupDisabled","isReadOnly","useContext","effectiveDisabled","renderSelectedIcon","isSelected","iconClassName","dataSelected","isValidElement","iconElement","cloneElement","AriaCheckbox","renderProps","Fragment","Checkbox","dedupeWithWarning","values","componentName","uniqueValues","CheckboxGroup","forwardRef","ref","label","description","errorMessage","defaultValue","isRequired","orientation","name","onChange","onFocusChange","id","ariaLabel","ariaLabelledby","ariaDescribedby","dataTestId","restProps","generatedId","useId","checkboxGroupId","labelId","descriptionId","errorId","describedByParts","computedAriaDescribedBy","dedupedValue","dedupedDefaultValue","AriaCheckboxGroup","Label","Text","FieldError"],"mappings":"yVASO,IAAMA,CAAAA,CAA2BC,EAAE,MAAA,CAAO,CAE/C,SAAA,CAAWA,CAAAA,CAAE,QAAO,CAAE,QAAA,EAAS,CAG/B,QAAA,CAAUA,CAAAA,CAAE,GAAA,EAAI,CAAE,QAAA,GAClB,EAAA,CAAIA,CAAAA,CAAE,MAAA,EAAO,CAAE,UAAS,CAGxB,YAAA,CAAcA,CAAAA,CAAE,MAAA,GAAS,QAAA,EAAS,CAClC,iBAAA,CAAmBA,CAAAA,CAAE,MAAA,EAAO,CAAE,QAAA,EAAS,CACvC,mBAAoBA,CAAAA,CAAE,MAAA,EAAO,CAAE,QAAA,GAC/B,WAAA,CAAaA,CAAAA,CAAE,IAAA,CAAK,CAAC,MAAO,QAAA,CAAU,WAAW,CAAC,CAAA,CAAE,QAAA,EAAS,CAC7D,aAAA,CAAeA,CAAAA,CAAE,SAAQ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AA,CAEV,QAAA,CAAAvD,GAAAA,CAAC,MAAA,CAAA,CAAK,KAAK,OAAA,CAAS,QAAA,CAAAqC,CAAAA,CAAa,CAAA,CACnC,GAEJ,CAAA,CACF,CAEJ,CACF,EAEAL,EAAc,WAAA,CAAc,eAAA","file":"index.mjs","sourcesContent":["import { z } from 'zod';\n\n/**\n * Base props schema for all Themis components\n * Ensures consistent accessibility and styling APIs across the library\n *\n * @see spec.md FR-009 to FR-014 (Accessibility Requirements)\n * @see constitution.md Principle IV (Accessibility First - WCAG 2.2 AA minimum)\n */\nexport const BaseComponentPropsSchema = z.object({\n // Styling\n className: z.string().optional(),\n\n // React\n children: z.any().optional(), // ReactNode not directly supported by Zod\n id: z.string().optional(),\n\n // Accessibility (WCAG 2.2 AA requirements)\n 'aria-label': z.string().optional(),\n 'aria-labelledby': z.string().optional(),\n 'aria-describedby': z.string().optional(),\n 'aria-live': z.enum(['off', 'polite', 'assertive']).optional(),\n 'aria-hidden': z.boolean().optional(),\n\n // Testing & Development\n 'data-testid': z.string().optional(),\n});\n\nexport type BaseComponentProps = z.infer<typeof BaseComponentPropsSchema>;\n","import { z } from 'zod';\nimport { BaseComponentPropsSchema } from '../../schemas/BaseComponentProps';\nimport type { ReactNode } from 'react';\nimport type {\n CheckboxGroupProps as AriaCheckboxGroupProps,\n CheckboxProps as AriaCheckboxProps,\n} from 'react-aria-components';\n\n/**\n * CheckboxGroup variant schema\n * Only 2 variants: default and destructive (matching RadioGroup)\n *\n * @see checkboxgroup-prd.md US-2 (Style Variants)\n */\nexport const CheckboxGroupVariantSchema = z.enum(['default', 'destructive']);\nexport type CheckboxGroupVariant = z.infer<typeof CheckboxGroupVariantSchema>;\n\n/**\n * CheckboxGroup size schema\n * All sizes maintain 44px minimum height for WCAG 2.2 AAA compliance\n *\n * @see checkboxgroup-prd.md US-3 (Size Variants)\n * @see constitution.md Principle IV (Accessibility First)\n */\nexport const CheckboxGroupSizeSchema = z.enum(['sm', 'default', 'lg']);\nexport type CheckboxGroupSize = z.infer<typeof CheckboxGroupSizeSchema>;\n\n/**\n * CheckboxGroup orientation schema\n *\n * @see checkboxgroup-prd.md US-5 (Orientation Support)\n */\nexport const CheckboxGroupOrientationSchema = z.enum(['vertical', 'horizontal']);\nexport type CheckboxGroupOrientation = z.infer<typeof CheckboxGroupOrientationSchema>;\n\n/**\n * CheckboxGroup root component props schema\n *\n * Key difference from RadioGroup: value is string[] (multi-select)\n *\n * @see checkboxgroup-prd.md US-1 (Basic Multi-Selection)\n * @see checkboxgroup-prd.md US-4 (Labels, Descriptions, Errors)\n * @see checkboxgroup-prd.md US-6 (Validation States)\n */\nexport const CheckboxGroupPropsSchema = BaseComponentPropsSchema.extend({\n // Display props (US-4)\n label: z.string().optional(),\n description: z.string().optional(),\n errorMessage: z.string().optional(),\n\n // Selection props (US-1) - array for multi-select (key difference from RadioGroup)\n value: z.array(z.string()).optional(),\n defaultValue: z.array(z.string()).optional(),\n\n // State props (US-6)\n isDisabled: z.boolean().optional().default(false),\n isReadOnly: z.boolean().optional().default(false),\n isRequired: z.boolean().optional().default(false),\n isInvalid: z.boolean().optional().default(false),\n\n // Layout props (US-5)\n orientation: CheckboxGroupOrientationSchema.optional().default('vertical'),\n\n // Variant props (US-2, US-3)\n variant: CheckboxGroupVariantSchema.optional().default('default'),\n size: CheckboxGroupSizeSchema.optional().default('default'),\n\n // Form props (US-6)\n name: z.string().optional(),\n\n // Event handlers\n onChange: z.custom<(value: string[]) => void>().optional(),\n onFocusChange: z.custom<(isFocused: boolean) => void>().optional(),\n\n // Children (Checkbox components)\n children: z.custom<ReactNode>(),\n});\n\nexport type CheckboxGroupProps = z.infer<typeof CheckboxGroupPropsSchema> &\n Omit<AriaCheckboxGroupProps, keyof z.infer<typeof CheckboxGroupPropsSchema>>;\n\n/**\n * Checkbox item component props schema\n *\n * @see checkboxgroup-prd.md US-1 (Basic Multi-Selection)\n * @see checkboxgroup-prd.md US-7 (Rich Content Support)\n */\nexport const CheckboxPropsSchema = BaseComponentPropsSchema.extend({\n // Item value (required)\n value: z.string(),\n\n // Disabled state (individual item)\n isDisabled: z.boolean().optional().default(false),\n\n // Item content - accepts any ReactNode for flexible children\n children: z.custom<ReactNode>(),\n\n // Optional className for custom styling\n className: z.string().optional(),\n\n // Custom icon to display when selected (defaults to checkmark)\n // Useful for destructive variants where an X icon may be more appropriate\n selectedIcon: z.custom<ReactNode>().optional(),\n});\n\nexport type CheckboxProps = z.infer<typeof CheckboxPropsSchema> &\n Omit<AriaCheckboxProps, keyof z.infer<typeof CheckboxPropsSchema>>;\n\n/**\n * Checkbox.Label sub-component props schema\n * Helper component for styled label within Checkbox item\n *\n * @see checkboxgroup-prd.md US-7 (Rich Content Support)\n */\nexport const CheckboxLabelPropsSchema = z.object({\n // Label content\n children: z.custom<ReactNode>(),\n\n // Optional className for custom styling\n className: z.string().optional(),\n});\n\nexport type CheckboxLabelProps = z.infer<typeof CheckboxLabelPropsSchema>;\n\n/**\n * Checkbox.Description sub-component props schema\n * Helper component for styled description within Checkbox item (muted text)\n *\n * @see checkboxgroup-prd.md US-7 (Rich Content Support)\n */\nexport const CheckboxDescriptionPropsSchema = z.object({\n // Description content\n children: z.custom<ReactNode>(),\n\n // Optional className for custom styling\n className: z.string().optional(),\n});\n\nexport type CheckboxDescriptionProps = z.infer<typeof CheckboxDescriptionPropsSchema>;\n\n/**\n * CVA variant configuration types\n * Used for class-variance-authority integration\n */\nexport type CheckboxGroupVariantType = CheckboxGroupVariant;\nexport type CheckboxGroupSizeType = CheckboxGroupSize;\nexport type CheckboxGroupOrientationType = CheckboxGroupOrientation;\n","/**\n * Class Name Utility\n * Merges Tailwind CSS classes with conflict resolution\n *\n * Combines clsx for conditional classes and tailwind-merge for deduplication\n *\n * @example\n * cn('px-2 py-1', 'px-4') // => 'py-1 px-4' (px-4 overrides px-2)\n * cn('text-red-500', condition && 'text-blue-500') // => conditional application\n */\n\nimport { clsx, type ClassValue } from 'clsx';\nimport { twMerge } from 'tailwind-merge';\n\nexport function cn(...inputs: ClassValue[]): string {\n return twMerge(clsx(inputs));\n}\n","/**\n * 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\n/**\n * CheckboxGroup Component\n * Accessible multi-selection checkbox group with React Aria primitives and CVA styling\n *\n * Key Features:\n * - Bordered container design with explicit 44px+ touch targets\n * - 2 variants: default, destructive (no outline per clarification)\n * - 3 sizes: sm (44px), default (48px), lg (56px)\n * - Tab moves focus between checkboxes, Space toggles (standard checkbox behavior)\n * - Error styling on ALL items (cognitive accessibility)\n * - Spring animation for checkmark indicator\n * - RTL support (indicator auto-flips)\n * - Checkbox.Label and Checkbox.Description sub-components\n * - value: string[] for multi-select (key difference from RadioGroup)\n *\n * @see checkboxgroup-prd.md (Product Requirements)\n * @see plan.md (12 Key Clarifications)\n * @see React Aria CheckboxGroup: https://react-spectrum.adobe.com/react-aria/CheckboxGroup.html\n * @see constitution.md Principle IV (Accessibility First - WCAG 2.2 AAA)\n */\n\nimport {\n forwardRef,\n createContext,\n useContext,\n useId,\n cloneElement,\n isValidElement,\n type ReactNode,\n type ForwardedRef,\n type ReactElement,\n} from 'react';\nimport {\n CheckboxGroup as AriaCheckboxGroup,\n Checkbox as AriaCheckbox,\n Label,\n Text,\n FieldError,\n} from 'react-aria-components';\nimport { cva } from 'class-variance-authority';\nimport { cn } from '../../utils/cn';\nimport { FOCUS_STYLES, HIGH_CONTRAST_FOCUS } from '../../styles/interaction-states';\nimport type {\n CheckboxGroupProps,\n CheckboxProps,\n CheckboxLabelProps,\n CheckboxDescriptionProps,\n CheckboxGroupVariant,\n CheckboxGroupSize,\n} from './CheckboxGroup.types';\n\n// ============================================================================\n// Context\n// ============================================================================\n\n/**\n * CheckboxGroup context value\n * Includes isDisabled and isReadOnly per clarification (plan.md #10)\n */\ninterface CheckboxGroupContextValue {\n variant: CheckboxGroupVariant;\n size: CheckboxGroupSize;\n isInvalid: boolean;\n isDisabled: boolean;\n isReadOnly: boolean;\n}\n\nconst CheckboxGroupContext = createContext<CheckboxGroupContextValue>({\n variant: 'default',\n size: 'default',\n isInvalid: false,\n isDisabled: false,\n isReadOnly: false,\n});\n\n// ============================================================================\n// CVA Variants\n// ============================================================================\n\n/**\n * CheckboxGroup container variants\n * Controls orientation and spacing (gap-2 = 8px per clarification)\n */\nconst checkboxGroupVariants = cva(\n // Base: flex container\n \"flex\",\n {\n variants: {\n orientation: {\n vertical: \"flex-col gap-2\",\n horizontal: \"flex-row flex-wrap gap-2\",\n },\n },\n defaultVariants: {\n orientation: \"vertical\",\n },\n }\n);\n\n/**\n * Checkbox item bordered container variants\n * Bordered container design with explicit touch targets\n * All sizes maintain 44px minimum height (WCAG 2.2 AAA)\n * All sizes use rounded-md (6px) per clarification\n */\nconst checkboxItemVariants = cva(\n // Base: bordered container with flex layout, RTL support\n [\n \"flex items-center gap-3 rounded-md border cursor-pointer\",\n \"transition-colors duration-200\",\n \"rtl:flex-row-reverse\", // RTL: indicator flips to right\n // Focus ring on entire container\n FOCUS_STYLES,\n HIGH_CONTRAST_FOCUS,\n ].join(\" \"),\n {\n variants: {\n variant: {\n default: [\n \"border-[var(--border)]\",\n \"data-[hovered]:bg-[var(--accent)]/10\",\n \"data-[selected]:border-[var(--primary)]\",\n \"data-[selected]:bg-[var(--primary)]/10\",\n ].join(\" \"),\n destructive: [\n \"border-[var(--border)]\",\n \"data-[hovered]:bg-[var(--destructive)]/10\",\n \"data-[selected]:border-[var(--destructive)]\",\n \"data-[selected]:bg-[var(--destructive)]/10\",\n ].join(\" \"),\n },\n size: {\n sm: \"min-h-[44px] py-2 px-3 text-sm\",\n default: \"min-h-[48px] py-3 px-4 text-sm\",\n lg: \"min-h-[56px] py-4 px-5 text-base\",\n },\n isDisabled: {\n true: \"opacity-50 cursor-not-allowed\",\n false: \"\",\n },\n isReadOnly: {\n // Subtle visual cue per clarification\n true: \"cursor-default\",\n false: \"\",\n },\n isInvalid: {\n // Error: ALL items get destructive border (cognitive accessibility)\n true: \"border-[var(--destructive)]\",\n false: \"\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n size: \"default\",\n isDisabled: false,\n isReadOnly: false,\n isInvalid: false,\n },\n }\n);\n\n/**\n * Square indicator (checkbox box) variants\n * Uses rounded-sm (2px) for square appearance (unlike RadioGroup's circle)\n */\nconst checkboxIndicatorVariants = cva(\n // Base: square with border, flex-shrink-0 to prevent squishing\n \"flex-shrink-0 rounded-sm border-2 flex items-center justify-center transition-colors duration-200\",\n {\n variants: {\n variant: {\n default: [\n \"border-[var(--border)]\",\n \"data-[selected]:border-[var(--primary)]\",\n \"data-[selected]:bg-[var(--primary)]\",\n ].join(\" \"),\n destructive: [\n \"border-[var(--border)]\",\n \"data-[selected]:border-[var(--destructive)]\",\n \"data-[selected]:bg-[var(--destructive)]\",\n ].join(\" \"),\n },\n size: {\n sm: \"h-4 w-4\",\n default: \"h-5 w-5\",\n lg: \"h-6 w-6\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n size: \"default\",\n },\n }\n);\n\n/**\n * Checkmark SVG variants\n * Spring animation: cubic-bezier(0.34, 1.56, 0.64, 1) with slight overshoot\n */\nconst checkmarkVariants = cva(\n // Base: centered checkmark with spring animation\n [\n \"transition-transform duration-200\",\n // Spring animation with overshoot\n \"[transition-timing-function:cubic-bezier(0.34,1.56,0.64,1)]\",\n // Respect reduced motion preference\n \"motion-reduce:transition-none\",\n // Scale from 0 to 1 on selection\n \"scale-0 data-[selected]:scale-100\",\n ].join(\" \"),\n {\n variants: {\n variant: {\n default: \"text-[var(--primary-foreground)]\",\n destructive: \"text-[var(--destructive-foreground)]\",\n },\n size: {\n sm: \"h-3 w-3\",\n default: \"h-3.5 w-3.5\",\n lg: \"h-4 w-4\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n size: \"default\",\n },\n }\n);\n\n// ============================================================================\n// Icon Components\n// ============================================================================\n\n/**\n * Checkmark SVG icon (default)\n * Used inside the checkbox indicator when selected\n */\nfunction CheckmarkIcon({ className, ...props }: { className?: string; 'data-selected'?: boolean }): ReactNode {\n return (\n <svg\n className={className}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth={3}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n aria-hidden=\"true\"\n {...props}\n >\n <polyline points=\"20 6 9 17 4 12\" />\n </svg>\n );\n}\n\n/**\n * Times (X) SVG icon\n * Alternative icon for destructive or exclusion selections\n * @example <Checkbox value=\"exclude\" selectedIcon={<TimesIcon />}>Exclude this item</Checkbox>\n */\nfunction TimesIcon({ className, ...props }: { className?: string; 'data-selected'?: boolean }): ReactNode {\n return (\n <svg\n className={className}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth={3}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n aria-hidden=\"true\"\n {...props}\n >\n <line x1=\"18\" y1=\"6\" x2=\"6\" y2=\"18\" />\n <line x1=\"6\" y1=\"6\" x2=\"18\" y2=\"18\" />\n </svg>\n );\n}\n\n// ============================================================================\n// Sub-components\n// ============================================================================\n\n/**\n * Checkbox.Label - Styled label for checkbox item content\n */\nfunction CheckboxLabel({ children, className }: CheckboxLabelProps): ReactNode {\n return (\n <span className={cn(\"font-medium text-[var(--content-foreground)]\", className)}>\n {children}\n </span>\n );\n}\n\nCheckboxLabel.displayName = \"Checkbox.Label\";\n\n/**\n * Checkbox.Description - Styled description for checkbox item content (muted)\n */\nfunction CheckboxDescription({ children, className }: CheckboxDescriptionProps): ReactNode {\n return (\n <span className={cn(\"text-sm text-[var(--menu-muted)]\", className)}>\n {children}\n </span>\n );\n}\n\nCheckboxDescription.displayName = \"Checkbox.Description\";\n\n// ============================================================================\n// Checkbox Component\n// ============================================================================\n\n/**\n * Checkbox item component with bordered container design\n */\nfunction CheckboxComponent({ value, isDisabled, children, className, selectedIcon }: CheckboxProps): ReactNode {\n const { variant, size, isInvalid, isDisabled: groupDisabled, isReadOnly } = useContext(CheckboxGroupContext);\n\n // Individual isDisabled OR group isDisabled\n const effectiveDisabled = isDisabled || groupDisabled;\n\n // Render the selected icon - use custom icon if provided, otherwise default CheckmarkIcon\n const renderSelectedIcon = (isSelected: boolean) => {\n const iconClassName = cn(checkmarkVariants({ variant, size }));\n const dataSelected = isSelected || undefined;\n\n if (selectedIcon) {\n // Clone the custom icon element to add our styling classes\n if (isValidElement(selectedIcon)) {\n const iconElement = selectedIcon as ReactElement<{ className?: string; 'data-selected'?: boolean }>;\n return cloneElement(iconElement, {\n className: cn(iconClassName, iconElement.props.className),\n 'data-selected': dataSelected,\n });\n }\n // If it's not a valid element (e.g., just text), wrap it\n return <span className={iconClassName} data-selected={dataSelected}>{selectedIcon}</span>;\n }\n\n // Default: CheckmarkIcon\n return (\n <CheckmarkIcon\n className={iconClassName}\n data-selected={dataSelected}\n />\n );\n };\n\n return (\n <AriaCheckbox\n value={value}\n isDisabled={effectiveDisabled}\n className={(renderProps) =>\n cn(\n checkboxItemVariants({\n variant,\n size,\n isDisabled: renderProps.isDisabled,\n isReadOnly,\n isInvalid,\n }),\n className\n )\n }\n >\n {(renderProps) => (\n <>\n {/* Square indicator */}\n <div\n className={checkboxIndicatorVariants({ variant, size })}\n data-selected={renderProps.isSelected || undefined}\n >\n {/* Icon with spring animation */}\n {renderSelectedIcon(renderProps.isSelected)}\n </div>\n\n {/* Children content (flexible - text, icons, complex layouts) */}\n <div className=\"flex-1 flex flex-col\">\n {children}\n </div>\n </>\n )}\n </AriaCheckbox>\n );\n}\n\n// Attach sub-components\nconst Checkbox = Object.assign(CheckboxComponent, {\n Label: CheckboxLabel,\n Description: CheckboxDescription,\n}) as typeof CheckboxComponent & {\n Label: typeof CheckboxLabel;\n Description: typeof CheckboxDescription;\n displayName: string;\n};\n\nCheckbox.displayName = \"Checkbox\";\n\n// ============================================================================\n// Duplicate Value Warning\n// ============================================================================\n\n/**\n * Deduplicates array and warns in development mode\n * Per clarification: dedupe internally + console.warn in development\n */\nfunction dedupeWithWarning(values: string[] | undefined, componentName: string): string[] | undefined {\n if (!values) return values;\n\n const uniqueValues = [...new Set(values)];\n\n if (process.env.NODE_ENV !== 'production' && uniqueValues.length !== values.length) {\n console.warn(\n `[${componentName}] Received duplicate values in value/defaultValue prop. ` +\n `Original: [${values.join(', ')}], Deduplicated: [${uniqueValues.join(', ')}]. ` +\n `Duplicate values are automatically removed.`\n );\n }\n\n return uniqueValues;\n}\n\n// ============================================================================\n// CheckboxGroup Component\n// ============================================================================\n\n/**\n * CheckboxGroup root component\n * Accessible multi-selection control with bordered container design\n */\nconst CheckboxGroup = forwardRef<HTMLDivElement, CheckboxGroupProps>(\n function CheckboxGroup(props: CheckboxGroupProps, ref: ForwardedRef<HTMLDivElement>) {\n const {\n // Display props\n label,\n description,\n errorMessage,\n // Selection props (string[] for multi-select)\n value,\n defaultValue,\n // State props\n isDisabled = false,\n isReadOnly = false,\n isRequired = false,\n isInvalid = false,\n // Layout props\n orientation = 'vertical',\n // Variant props\n variant = 'default',\n size = 'default',\n // Form props\n name,\n // Event handlers\n onChange,\n onFocusChange,\n // Standard props\n className,\n children,\n id,\n 'aria-label': ariaLabel,\n 'aria-labelledby': ariaLabelledby,\n 'aria-describedby': ariaDescribedby,\n 'data-testid': dataTestId,\n ...restProps\n } = props;\n\n // Generate unique IDs for accessibility\n const generatedId = useId();\n const checkboxGroupId = id ?? generatedId;\n const labelId = `${checkboxGroupId}-label`;\n const descriptionId = `${checkboxGroupId}-description`;\n const errorId = `${checkboxGroupId}-error`;\n\n // Build aria-describedby from description and error\n const describedByParts: string[] = [];\n if (ariaDescribedby) describedByParts.push(ariaDescribedby);\n if (description) describedByParts.push(descriptionId);\n if (isInvalid && errorMessage) describedByParts.push(errorId);\n const computedAriaDescribedBy = describedByParts.length > 0\n ? describedByParts.join(' ')\n : undefined;\n\n // Dedupe values with warning in development\n const dedupedValue = dedupeWithWarning(value, 'CheckboxGroup');\n const dedupedDefaultValue = dedupeWithWarning(defaultValue, 'CheckboxGroup');\n\n return (\n <CheckboxGroupContext.Provider value={{ variant, size, isInvalid, isDisabled, isReadOnly }}>\n <AriaCheckboxGroup\n ref={ref}\n id={checkboxGroupId}\n name={name}\n value={dedupedValue}\n defaultValue={dedupedDefaultValue}\n isDisabled={isDisabled}\n isReadOnly={isReadOnly}\n isRequired={isRequired}\n isInvalid={isInvalid}\n onChange={onChange}\n onFocusChange={onFocusChange}\n aria-label={ariaLabel}\n aria-labelledby={label ? labelId : ariaLabelledby}\n aria-describedby={computedAriaDescribedBy}\n aria-orientation={orientation}\n aria-required={isRequired || undefined}\n aria-invalid={isInvalid || undefined}\n data-testid={dataTestId}\n className={cn(\"flex flex-col gap-1.5\", className)}\n {...restProps}\n >\n {/* Label with optional required asterisk */}\n {label && (\n <Label id={labelId} className=\"text-sm font-medium text-[var(--content-foreground)]\">\n {label}\n {isRequired && (\n <span className=\"ml-1 text-[var(--destructive)]\" aria-hidden=\"true\">\n *\n </span>\n )}\n </Label>\n )}\n\n {/* Description */}\n {description && (\n <Text\n id={descriptionId}\n slot=\"description\"\n className=\"text-sm text-[var(--menu-muted)]\"\n >\n {description}\n </Text>\n )}\n\n {/* Checkbox items container with orientation */}\n <div className={checkboxGroupVariants({ orientation })}>\n {children}\n </div>\n\n {/* Error message with role=\"alert\" for screen reader announcements */}\n {isInvalid && errorMessage && (\n <FieldError\n id={errorId}\n className=\"text-sm text-[var(--destructive)]\"\n >\n <span role=\"alert\">{errorMessage}</span>\n </FieldError>\n )}\n </AriaCheckboxGroup>\n </CheckboxGroupContext.Provider>\n );\n }\n);\n\nCheckboxGroup.displayName = \"CheckboxGroup\";\n\n// ============================================================================\n// Exports\n// ============================================================================\n\nexport {\n CheckboxGroup,\n Checkbox,\n checkboxGroupVariants,\n checkboxItemVariants,\n checkboxIndicatorVariants,\n checkmarkVariants,\n // Icon exports for custom selectedIcon usage\n CheckmarkIcon,\n TimesIcon,\n};\n"]}
1
+ {"version":3,"sources":["../../../src/schemas/BaseComponentProps.ts","../../../src/elements/CheckboxGroup/CheckboxGroup.types.ts","../../../src/utils/cn.ts","../../../src/styles/interaction-states.ts","../../../src/elements/CheckboxGroup/CheckboxGroup.tsx"],"names":["BaseComponentPropsSchema","z","CheckboxGroupVariantSchema","CheckboxGroupSizeSchema","CheckboxGroupOrientationSchema","CheckboxGroupPropsSchema","CheckboxPropsSchema","CheckboxLabelPropsSchema","CheckboxDescriptionPropsSchema","cn","inputs","twMerge","clsx","FOCUS_STYLES","HIGH_CONTRAST_FOCUS","CheckboxGroupContext","createContext","checkboxGroupVariants","cva","checkboxItemVariants","checkboxIndicatorVariants","checkmarkVariants","CheckmarkIcon","className","props","jsx","TimesIcon","jsxs","CheckboxLabel","children","CheckboxDescription","CheckboxComponent","value","isDisabled","selectedIcon","variant","size","isInvalid","groupDisabled","isReadOnly","useContext","effectiveDisabled","renderSelectedIcon","isSelected","iconClassName","dataSelected","isValidElement","iconElement","cloneElement","AriaCheckbox","renderProps","Fragment","Checkbox","dedupeWithWarning","values","componentName","uniqueValues","CheckboxGroup","forwardRef","ref","label","description","errorMessage","defaultValue","isRequired","orientation","name","onChange","onFocusChange","id","ariaLabel","ariaLabelledby","ariaDescribedby","dataTestId","restProps","generatedId","useId","checkboxGroupId","labelId","descriptionId","errorId","describedByParts","computedAriaDescribedBy","dedupedValue","dedupedDefaultValue","AriaCheckboxGroup","Label","Text","FieldError"],"mappings":"yVASO,IAAMA,CAAAA,CAA2BC,EAAE,MAAA,CAAO,CAE/C,SAAA,CAAWA,CAAAA,CAAE,QAAO,CAAE,QAAA,EAAS,CAG/B,QAAA,CAAUA,CAAAA,CAAE,GAAA,EAAI,CAAE,QAAA,GAClB,EAAA,CAAIA,CAAAA,CAAE,MAAA,EAAO,CAAE,UAAS,CAGxB,YAAA,CAAcA,CAAAA,CAAE,MAAA,GAAS,QAAA,EAAS,CAClC,iBAAA,CAAmBA,CAAAA,CAAE,MAAA,EAAO,CAAE,QAAA,EAAS,CACvC,mBAAoBA,CAAAA,CAAE,MAAA,EAAO,CAAE,QAAA,GAC/B,WAAA,CAAaA,CAAAA,CAAE,IAAA,CAAK,CAAC,MAAO,QAAA,CAAU,WAAW,CAAC,CAAA,CAAE,QAAA,EAAS,CAC7D,aAAA,CAAeA,CAAAA,CAAE,SAAQ,CAAE,QAAA,EAAS,CAGpC,aAAA,CAAeA,EAAE,MAAA,EAAO,CAAE,QAAA,EAC5B,CAAC,CAAA,CCZM,IAAMC,CAAAA,CAA6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AEJ,CAAA,CACF,CAEJ,CACF,EAEAL,EAAc,WAAA,CAAc,eAAA","file":"index.mjs","sourcesContent":["import { z } from 'zod';\n\n/**\n * Base props schema for all Themis components\n * Ensures consistent accessibility and styling APIs across the library\n *\n * @see spec.md FR-009 to FR-014 (Accessibility Requirements)\n * @see constitution.md Principle IV (Accessibility First - WCAG 2.2 AA minimum)\n */\nexport const BaseComponentPropsSchema = z.object({\n // Styling\n className: z.string().optional(),\n\n // React\n children: z.any().optional(), // ReactNode not directly supported by Zod\n id: z.string().optional(),\n\n // Accessibility (WCAG 2.2 AA requirements)\n 'aria-label': z.string().optional(),\n 'aria-labelledby': z.string().optional(),\n 'aria-describedby': z.string().optional(),\n 'aria-live': z.enum(['off', 'polite', 'assertive']).optional(),\n 'aria-hidden': z.boolean().optional(),\n\n // Testing & Development\n 'data-testid': z.string().optional(),\n});\n\nexport type BaseComponentProps = z.infer<typeof BaseComponentPropsSchema>;\n","import { z } from 'zod';\nimport { BaseComponentPropsSchema } from '../../schemas/BaseComponentProps';\nimport type { ReactNode } from 'react';\nimport type {\n CheckboxGroupProps as AriaCheckboxGroupProps,\n CheckboxProps as AriaCheckboxProps,\n} from 'react-aria-components';\n\n/**\n * CheckboxGroup variant schema\n * Only 2 variants: default and destructive (matching RadioGroup)\n *\n * @see checkboxgroup-prd.md US-2 (Style Variants)\n */\nexport const CheckboxGroupVariantSchema = z.enum(['default', 'destructive']);\nexport type CheckboxGroupVariant = z.infer<typeof CheckboxGroupVariantSchema>;\n\n/**\n * CheckboxGroup size schema\n * All sizes maintain 44px minimum height for WCAG 2.2 AAA compliance\n *\n * @see checkboxgroup-prd.md US-3 (Size Variants)\n * @see constitution.md Principle IV (Accessibility First)\n */\nexport const CheckboxGroupSizeSchema = z.enum(['sm', 'default', 'lg']);\nexport type CheckboxGroupSize = z.infer<typeof CheckboxGroupSizeSchema>;\n\n/**\n * CheckboxGroup orientation schema\n *\n * @see checkboxgroup-prd.md US-5 (Orientation Support)\n */\nexport const CheckboxGroupOrientationSchema = z.enum(['vertical', 'horizontal']);\nexport type CheckboxGroupOrientation = z.infer<typeof CheckboxGroupOrientationSchema>;\n\n/**\n * CheckboxGroup root component props schema\n *\n * Key difference from RadioGroup: value is string[] (multi-select)\n *\n * @see checkboxgroup-prd.md US-1 (Basic Multi-Selection)\n * @see checkboxgroup-prd.md US-4 (Labels, Descriptions, Errors)\n * @see checkboxgroup-prd.md US-6 (Validation States)\n */\nexport const CheckboxGroupPropsSchema = BaseComponentPropsSchema.extend({\n // Display props (US-4)\n label: z.string().optional(),\n description: z.string().optional(),\n errorMessage: z.string().optional(),\n\n // Selection props (US-1) - array for multi-select (key difference from RadioGroup)\n value: z.array(z.string()).optional(),\n defaultValue: z.array(z.string()).optional(),\n\n // State props (US-6)\n isDisabled: z.boolean().optional().default(false),\n isReadOnly: z.boolean().optional().default(false),\n isRequired: z.boolean().optional().default(false),\n isInvalid: z.boolean().optional().default(false),\n\n // Layout props (US-5)\n orientation: CheckboxGroupOrientationSchema.optional().default('vertical'),\n\n // Variant props (US-2, US-3)\n variant: CheckboxGroupVariantSchema.optional().default('default'),\n size: CheckboxGroupSizeSchema.optional().default('default'),\n\n // Form props (US-6)\n name: z.string().optional(),\n\n // Event handlers\n onChange: z.custom<(value: string[]) => void>().optional(),\n onFocusChange: z.custom<(isFocused: boolean) => void>().optional(),\n\n // Children (Checkbox components)\n children: z.custom<ReactNode>(),\n});\n\nexport type CheckboxGroupProps = z.infer<typeof CheckboxGroupPropsSchema> &\n Omit<AriaCheckboxGroupProps, keyof z.infer<typeof CheckboxGroupPropsSchema>>;\n\n/**\n * Checkbox item component props schema\n *\n * @see checkboxgroup-prd.md US-1 (Basic Multi-Selection)\n * @see checkboxgroup-prd.md US-7 (Rich Content Support)\n */\nexport const CheckboxPropsSchema = BaseComponentPropsSchema.extend({\n // Item value (required)\n value: z.string(),\n\n // Disabled state (individual item)\n isDisabled: z.boolean().optional().default(false),\n\n // Item content - accepts any ReactNode for flexible children\n children: z.custom<ReactNode>(),\n\n // Optional className for custom styling\n className: z.string().optional(),\n\n // Custom icon to display when selected (defaults to checkmark)\n // Useful for destructive variants where an X icon may be more appropriate\n selectedIcon: z.custom<ReactNode>().optional(),\n});\n\nexport type CheckboxProps = z.infer<typeof CheckboxPropsSchema> &\n Omit<AriaCheckboxProps, keyof z.infer<typeof CheckboxPropsSchema>>;\n\n/**\n * Checkbox.Label sub-component props schema\n * Helper component for styled label within Checkbox item\n *\n * @see checkboxgroup-prd.md US-7 (Rich Content Support)\n */\nexport const CheckboxLabelPropsSchema = z.object({\n // Label content\n children: z.custom<ReactNode>(),\n\n // Optional className for custom styling\n className: z.string().optional(),\n});\n\nexport type CheckboxLabelProps = z.infer<typeof CheckboxLabelPropsSchema>;\n\n/**\n * Checkbox.Description sub-component props schema\n * Helper component for styled description within Checkbox item (muted text)\n *\n * @see checkboxgroup-prd.md US-7 (Rich Content Support)\n */\nexport const CheckboxDescriptionPropsSchema = z.object({\n // Description content\n children: z.custom<ReactNode>(),\n\n // Optional className for custom styling\n className: z.string().optional(),\n});\n\nexport type CheckboxDescriptionProps = z.infer<typeof CheckboxDescriptionPropsSchema>;\n\n/**\n * CVA variant configuration types\n * Used for class-variance-authority integration\n */\nexport type CheckboxGroupVariantType = CheckboxGroupVariant;\nexport type CheckboxGroupSizeType = CheckboxGroupSize;\nexport type CheckboxGroupOrientationType = CheckboxGroupOrientation;\n","/**\n * Class Name Utility\n * Merges Tailwind CSS classes with conflict resolution\n *\n * Combines clsx for conditional classes and tailwind-merge for deduplication\n *\n * @example\n * cn('px-2 py-1', 'px-4') // => 'py-1 px-4' (px-4 overrides px-2)\n * cn('text-red-500', condition && 'text-blue-500') // => conditional application\n */\n\nimport { clsx, type ClassValue } from 'clsx';\nimport { twMerge } from 'tailwind-merge';\n\nexport function cn(...inputs: ClassValue[]): string {\n return twMerge(clsx(inputs));\n}\n","/**\n * 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\n/**\n * CheckboxGroup Component\n * Accessible multi-selection checkbox group with React Aria primitives and CVA styling\n *\n * Key Features:\n * - Bordered container design with explicit 44px+ touch targets\n * - 2 variants: default, destructive (no outline per clarification)\n * - 3 sizes: sm (44px), default (48px), lg (56px)\n * - Tab moves focus between checkboxes, Space toggles (standard checkbox behavior)\n * - Error styling on ALL items (cognitive accessibility)\n * - Spring animation for checkmark indicator\n * - RTL support (indicator auto-flips)\n * - Checkbox.Label and Checkbox.Description sub-components\n * - value: string[] for multi-select (key difference from RadioGroup)\n *\n * @see checkboxgroup-prd.md (Product Requirements)\n * @see plan.md (12 Key Clarifications)\n * @see React Aria CheckboxGroup: https://react-spectrum.adobe.com/react-aria/CheckboxGroup.html\n * @see constitution.md Principle IV (Accessibility First - WCAG 2.2 AAA)\n */\n\nimport {\n forwardRef,\n createContext,\n useContext,\n useId,\n cloneElement,\n isValidElement,\n type ReactNode,\n type ForwardedRef,\n type ReactElement,\n} from 'react';\nimport {\n CheckboxGroup as AriaCheckboxGroup,\n Checkbox as AriaCheckbox,\n Label,\n Text,\n FieldError,\n} from 'react-aria-components';\nimport { cva } from 'class-variance-authority';\nimport { cn } from '../../utils/cn';\nimport { FOCUS_STYLES, HIGH_CONTRAST_FOCUS } from '../../styles/interaction-states';\nimport type {\n CheckboxGroupProps,\n CheckboxProps,\n CheckboxLabelProps,\n CheckboxDescriptionProps,\n CheckboxGroupVariant,\n CheckboxGroupSize,\n} from './CheckboxGroup.types';\n\n// ============================================================================\n// Context\n// ============================================================================\n\n/**\n * CheckboxGroup context value\n * Includes isDisabled and isReadOnly per clarification (plan.md #10)\n */\ninterface CheckboxGroupContextValue {\n variant: CheckboxGroupVariant;\n size: CheckboxGroupSize;\n isInvalid: boolean;\n isDisabled: boolean;\n isReadOnly: boolean;\n}\n\nconst CheckboxGroupContext = createContext<CheckboxGroupContextValue>({\n variant: 'default',\n size: 'default',\n isInvalid: false,\n isDisabled: false,\n isReadOnly: false,\n});\n\n// ============================================================================\n// CVA Variants\n// ============================================================================\n\n/**\n * CheckboxGroup container variants\n * Controls orientation and spacing (gap-2 = 8px per clarification)\n */\nconst checkboxGroupVariants = cva(\n // Base: flex container\n \"flex\",\n {\n variants: {\n orientation: {\n vertical: \"flex-col gap-2\",\n horizontal: \"flex-row flex-wrap gap-2\",\n },\n },\n defaultVariants: {\n orientation: \"vertical\",\n },\n }\n);\n\n/**\n * Checkbox item bordered container variants\n * Bordered container design with explicit touch targets\n * All sizes maintain 44px minimum height (WCAG 2.2 AAA)\n * All sizes use rounded-md (6px) per clarification\n */\nconst checkboxItemVariants = cva(\n // Base: bordered container with flex layout, RTL support\n [\n \"flex items-center gap-3 rounded-md border cursor-pointer\",\n \"transition-colors duration-200\",\n \"rtl:flex-row-reverse\", // RTL: indicator flips to right\n // Focus ring on entire container\n FOCUS_STYLES,\n HIGH_CONTRAST_FOCUS,\n ].join(\" \"),\n {\n variants: {\n variant: {\n default: [\n \"border-[var(--border)]\",\n \"data-[hovered]:bg-[var(--accent)]/10\",\n \"data-[selected]:border-[var(--primary)]\",\n \"data-[selected]:bg-[var(--primary)]/10\",\n ].join(\" \"),\n destructive: [\n \"border-[var(--border)]\",\n \"data-[hovered]:bg-[var(--destructive-background)]/10\",\n \"data-[selected]:border-[var(--destructive-background)]\",\n \"data-[selected]:bg-[var(--destructive-background)]/10\",\n ].join(\" \"),\n },\n size: {\n sm: \"min-h-[44px] py-2 px-3 text-sm\",\n default: \"min-h-[48px] py-3 px-4 text-sm\",\n lg: \"min-h-[56px] py-4 px-5 text-base\",\n },\n isDisabled: {\n true: \"opacity-50 cursor-not-allowed\",\n false: \"\",\n },\n isReadOnly: {\n // Subtle visual cue per clarification\n true: \"cursor-default\",\n false: \"\",\n },\n isInvalid: {\n // Error: ALL items get destructive border (cognitive accessibility)\n true: \"border-[var(--destructive-background)]\",\n false: \"\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n size: \"default\",\n isDisabled: false,\n isReadOnly: false,\n isInvalid: false,\n },\n }\n);\n\n/**\n * Square indicator (checkbox box) variants\n * Uses rounded-sm (2px) for square appearance (unlike RadioGroup's circle)\n */\nconst checkboxIndicatorVariants = cva(\n // Base: square with border, flex-shrink-0 to prevent squishing\n \"flex-shrink-0 rounded-sm border-2 flex items-center justify-center transition-colors duration-200\",\n {\n variants: {\n variant: {\n default: [\n \"border-[var(--border)]\",\n \"data-[selected]:border-[var(--primary)]\",\n \"data-[selected]:bg-[var(--primary)]\",\n ].join(\" \"),\n destructive: [\n \"border-[var(--border)]\",\n \"data-[selected]:border-[var(--destructive-background)]\",\n \"data-[selected]:bg-[var(--destructive-background)]\",\n ].join(\" \"),\n },\n size: {\n sm: \"h-4 w-4\",\n default: \"h-5 w-5\",\n lg: \"h-6 w-6\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n size: \"default\",\n },\n }\n);\n\n/**\n * Checkmark SVG variants\n * Spring animation: cubic-bezier(0.34, 1.56, 0.64, 1) with slight overshoot\n */\nconst checkmarkVariants = cva(\n // Base: centered checkmark with spring animation\n [\n \"transition-transform duration-200\",\n // Spring animation with overshoot\n \"[transition-timing-function:cubic-bezier(0.34,1.56,0.64,1)]\",\n // Respect reduced motion preference\n \"motion-reduce:transition-none\",\n // Scale from 0 to 1 on selection\n \"scale-0 data-[selected]:scale-100\",\n ].join(\" \"),\n {\n variants: {\n variant: {\n default: \"text-[var(--primary-foreground)]\",\n destructive: \"text-[var(--destructive-foreground)]\",\n },\n size: {\n sm: \"h-3 w-3\",\n default: \"h-3.5 w-3.5\",\n lg: \"h-4 w-4\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n size: \"default\",\n },\n }\n);\n\n// ============================================================================\n// Icon Components\n// ============================================================================\n\n/**\n * Checkmark SVG icon (default)\n * Used inside the checkbox indicator when selected\n */\nfunction CheckmarkIcon({ className, ...props }: { className?: string; 'data-selected'?: boolean }): ReactNode {\n return (\n <svg\n className={className}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth={3}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n aria-hidden=\"true\"\n {...props}\n >\n <polyline points=\"20 6 9 17 4 12\" />\n </svg>\n );\n}\n\n/**\n * Times (X) SVG icon\n * Alternative icon for destructive or exclusion selections\n * @example <Checkbox value=\"exclude\" selectedIcon={<TimesIcon />}>Exclude this item</Checkbox>\n */\nfunction TimesIcon({ className, ...props }: { className?: string; 'data-selected'?: boolean }): ReactNode {\n return (\n <svg\n className={className}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth={3}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n aria-hidden=\"true\"\n {...props}\n >\n <line x1=\"18\" y1=\"6\" x2=\"6\" y2=\"18\" />\n <line x1=\"6\" y1=\"6\" x2=\"18\" y2=\"18\" />\n </svg>\n );\n}\n\n// ============================================================================\n// Sub-components\n// ============================================================================\n\n/**\n * Checkbox.Label - Styled label for checkbox item content\n */\nfunction CheckboxLabel({ children, className }: CheckboxLabelProps): ReactNode {\n return (\n <span className={cn(\"font-medium text-[var(--content-foreground)]\", className)}>\n {children}\n </span>\n );\n}\n\nCheckboxLabel.displayName = \"Checkbox.Label\";\n\n/**\n * Checkbox.Description - Styled description for checkbox item content (muted)\n */\nfunction CheckboxDescription({ children, className }: CheckboxDescriptionProps): ReactNode {\n return (\n <span className={cn(\"text-sm text-[var(--menu-muted)]\", className)}>\n {children}\n </span>\n );\n}\n\nCheckboxDescription.displayName = \"Checkbox.Description\";\n\n// ============================================================================\n// Checkbox Component\n// ============================================================================\n\n/**\n * Checkbox item component with bordered container design\n */\nfunction CheckboxComponent({ value, isDisabled, children, className, selectedIcon }: CheckboxProps): ReactNode {\n const { variant, size, isInvalid, isDisabled: groupDisabled, isReadOnly } = useContext(CheckboxGroupContext);\n\n // Individual isDisabled OR group isDisabled\n const effectiveDisabled = isDisabled || groupDisabled;\n\n // Render the selected icon - use custom icon if provided, otherwise default CheckmarkIcon\n const renderSelectedIcon = (isSelected: boolean) => {\n const iconClassName = cn(checkmarkVariants({ variant, size }));\n const dataSelected = isSelected || undefined;\n\n if (selectedIcon) {\n // Clone the custom icon element to add our styling classes\n if (isValidElement(selectedIcon)) {\n const iconElement = selectedIcon as ReactElement<{ className?: string; 'data-selected'?: boolean }>;\n return cloneElement(iconElement, {\n className: cn(iconClassName, iconElement.props.className),\n 'data-selected': dataSelected,\n });\n }\n // If it's not a valid element (e.g., just text), wrap it\n return <span className={iconClassName} data-selected={dataSelected}>{selectedIcon}</span>;\n }\n\n // Default: CheckmarkIcon\n return (\n <CheckmarkIcon\n className={iconClassName}\n data-selected={dataSelected}\n />\n );\n };\n\n return (\n <AriaCheckbox\n value={value}\n isDisabled={effectiveDisabled}\n className={(renderProps) =>\n cn(\n checkboxItemVariants({\n variant,\n size,\n isDisabled: renderProps.isDisabled,\n isReadOnly,\n isInvalid,\n }),\n className\n )\n }\n >\n {(renderProps) => (\n <>\n {/* Square indicator */}\n <div\n className={checkboxIndicatorVariants({ variant, size })}\n data-selected={renderProps.isSelected || undefined}\n >\n {/* Icon with spring animation */}\n {renderSelectedIcon(renderProps.isSelected)}\n </div>\n\n {/* Children content (flexible - text, icons, complex layouts) */}\n <div className=\"flex-1 flex flex-col\">\n {children}\n </div>\n </>\n )}\n </AriaCheckbox>\n );\n}\n\n// Attach sub-components\nconst Checkbox = Object.assign(CheckboxComponent, {\n Label: CheckboxLabel,\n Description: CheckboxDescription,\n}) as typeof CheckboxComponent & {\n Label: typeof CheckboxLabel;\n Description: typeof CheckboxDescription;\n displayName: string;\n};\n\nCheckbox.displayName = \"Checkbox\";\n\n// ============================================================================\n// Duplicate Value Warning\n// ============================================================================\n\n/**\n * Deduplicates array and warns in development mode\n * Per clarification: dedupe internally + console.warn in development\n */\nfunction dedupeWithWarning(values: string[] | undefined, componentName: string): string[] | undefined {\n if (!values) return values;\n\n const uniqueValues = [...new Set(values)];\n\n if (process.env.NODE_ENV !== 'production' && uniqueValues.length !== values.length) {\n console.warn(\n `[${componentName}] Received duplicate values in value/defaultValue prop. ` +\n `Original: [${values.join(', ')}], Deduplicated: [${uniqueValues.join(', ')}]. ` +\n `Duplicate values are automatically removed.`\n );\n }\n\n return uniqueValues;\n}\n\n// ============================================================================\n// CheckboxGroup Component\n// ============================================================================\n\n/**\n * CheckboxGroup root component\n * Accessible multi-selection control with bordered container design\n */\nconst CheckboxGroup = forwardRef<HTMLDivElement, CheckboxGroupProps>(\n function CheckboxGroup(props: CheckboxGroupProps, ref: ForwardedRef<HTMLDivElement>) {\n const {\n // Display props\n label,\n description,\n errorMessage,\n // Selection props (string[] for multi-select)\n value,\n defaultValue,\n // State props\n isDisabled = false,\n isReadOnly = false,\n isRequired = false,\n isInvalid = false,\n // Layout props\n orientation = 'vertical',\n // Variant props\n variant = 'default',\n size = 'default',\n // Form props\n name,\n // Event handlers\n onChange,\n onFocusChange,\n // Standard props\n className,\n children,\n id,\n 'aria-label': ariaLabel,\n 'aria-labelledby': ariaLabelledby,\n 'aria-describedby': ariaDescribedby,\n 'data-testid': dataTestId,\n ...restProps\n } = props;\n\n // Generate unique IDs for accessibility\n const generatedId = useId();\n const checkboxGroupId = id ?? generatedId;\n const labelId = `${checkboxGroupId}-label`;\n const descriptionId = `${checkboxGroupId}-description`;\n const errorId = `${checkboxGroupId}-error`;\n\n // Build aria-describedby from description and error\n const describedByParts: string[] = [];\n if (ariaDescribedby) describedByParts.push(ariaDescribedby);\n if (description) describedByParts.push(descriptionId);\n if (isInvalid && errorMessage) describedByParts.push(errorId);\n const computedAriaDescribedBy = describedByParts.length > 0\n ? describedByParts.join(' ')\n : undefined;\n\n // Dedupe values with warning in development\n const dedupedValue = dedupeWithWarning(value, 'CheckboxGroup');\n const dedupedDefaultValue = dedupeWithWarning(defaultValue, 'CheckboxGroup');\n\n return (\n <CheckboxGroupContext.Provider value={{ variant, size, isInvalid, isDisabled, isReadOnly }}>\n <AriaCheckboxGroup\n ref={ref}\n id={checkboxGroupId}\n name={name}\n value={dedupedValue}\n defaultValue={dedupedDefaultValue}\n isDisabled={isDisabled}\n isReadOnly={isReadOnly}\n isRequired={isRequired}\n isInvalid={isInvalid}\n onChange={onChange}\n onFocusChange={onFocusChange}\n aria-label={ariaLabel}\n aria-labelledby={label ? labelId : ariaLabelledby}\n aria-describedby={computedAriaDescribedBy}\n aria-orientation={orientation}\n aria-required={isRequired || undefined}\n aria-invalid={isInvalid || undefined}\n data-testid={dataTestId}\n className={cn(\"flex flex-col gap-1.5\", className)}\n {...restProps}\n >\n {/* Label with optional required asterisk */}\n {label && (\n <Label id={labelId} className=\"text-sm font-medium text-[var(--content-foreground)]\">\n {label}\n {isRequired && (\n <span className=\"ml-1 text-[var(--destructive-background)]\" aria-hidden=\"true\">\n *\n </span>\n )}\n </Label>\n )}\n\n {/* Description */}\n {description && (\n <Text\n id={descriptionId}\n slot=\"description\"\n className=\"text-sm text-[var(--menu-muted)]\"\n >\n {description}\n </Text>\n )}\n\n {/* Checkbox items container with orientation */}\n <div className={checkboxGroupVariants({ orientation })}>\n {children}\n </div>\n\n {/* Error message with role=\"alert\" for screen reader announcements */}\n {isInvalid && errorMessage && (\n <FieldError\n id={errorId}\n className=\"text-sm text-[var(--destructive-background)]\"\n >\n <span role=\"alert\">{errorMessage}</span>\n </FieldError>\n )}\n </AriaCheckboxGroup>\n </CheckboxGroupContext.Provider>\n );\n }\n);\n\nCheckboxGroup.displayName = \"CheckboxGroup\";\n\n// ============================================================================\n// Exports\n// ============================================================================\n\nexport {\n CheckboxGroup,\n Checkbox,\n checkboxGroupVariants,\n checkboxItemVariants,\n checkboxIndicatorVariants,\n checkmarkVariants,\n // Icon exports for custom selectedIcon usage\n CheckmarkIcon,\n TimesIcon,\n};\n"]}
@@ -1,3 +1,3 @@
1
1
  "use client";
2
- 'use strict';var react=require('react'),reactAriaComponents=require('react-aria-components'),lucideReact=require('lucide-react'),clsx=require('clsx'),tailwindMerge=require('tailwind-merge'),classVarianceAuthority=require('class-variance-authority'),jsxRuntime=require('react/jsx-runtime'),zod=require('zod'),date=require('@internationalized/date');function e(...o){return tailwindMerge.twMerge(clsx.clsx(o))}var w=["focus-within:outline-none","focus-within:ring-2","focus-within:ring-[var(--ring)]","focus-within:ring-offset-2"];var b=["focus:outline-none","focus:ring-2","focus:ring-[var(--ring)]"],M=["focus:outline-none","focus:bg-[var(--accent)]","focus:text-[var(--accent-foreground)]"],U=["disabled:pointer-events-none","disabled:opacity-50"],F=["data-[disabled]:pointer-events-none","data-[disabled]:opacity-50","data-[disabled]:cursor-not-allowed"],B={sm:"text-xs",default:"text-sm",lg:"text-base"},R={sm:"text-sm",default:"text-base",lg:"text-lg"};var _={sm:"h-9",default:"h-11",lg:"h-14"},Z=["flex","items-center","gap-1.5","text-[var(--destructive)]"];var q=["text-[var(--menu-muted)]"],j=["font-medium","text-[var(--content-foreground)]"];var z=["data-[entering]:animate-in","data-[entering]:fade-in-0","data-[entering]:zoom-in-95"],W=["data-[exiting]:animate-out","data-[exiting]:fade-out-0","data-[exiting]:zoom-out-95"],X=["motion-reduce:transition-none","motion-reduce:animate-none"];var h=["transition-colors","duration-150"],y=["hover:bg-[var(--accent)]","hover:text-[var(--accent-foreground)]"];function d(...o){return o.flatMap(i=>Array.isArray(i)?[...i]:[i])}var x=classVarianceAuthority.cva(d("flex items-center rounded-md border","bg-[var(--content-background)] text-[var(--content-foreground)]","transition-colors duration-200",w,F),{variants:{size:{sm:`${_.sm} px-3 text-sm gap-0.5`,default:`${_.default} px-4 text-base gap-1`,lg:`${_.lg} px-5 text-lg gap-1.5`},isInvalid:{true:"border-[var(--destructive)] focus-within:ring-[var(--destructive)]",false:"border-[var(--input)] hover:border-[var(--input)]/80"}},defaultVariants:{size:"default",isInvalid:false}}),p=classVarianceAuthority.cva(d("tabular-nums rounded px-0.5",M,"data-[placeholder]:text-[var(--menu-muted)]","data-[type=literal]:text-[var(--menu-muted)]"),{variants:{size:R},defaultVariants:{size:"default"}}),g=classVarianceAuthority.cva(d("flex items-center justify-center rounded-md cursor-pointer",h,y,b,"data-[selected]:bg-[var(--primary)] data-[selected]:text-[var(--primary-foreground)]","data-[selected]:hover:bg-[var(--primary)]/90 data-[selected]:font-semibold","data-[today]:border data-[today]:border-[var(--primary)]","data-[selection-start]:rounded-l-md data-[selection-start]:rounded-r-none","data-[selection-end]:rounded-r-md data-[selection-end]:rounded-l-none","data-[selected]:data-[selection-start]:rounded-l-md","data-[selected]:data-[selection-end]:rounded-r-md","data-[unavailable]:text-[var(--menu-muted)] data-[unavailable]:pointer-events-none data-[unavailable]:opacity-50 data-[unavailable]:line-through","data-[outside-month]:text-[var(--menu-muted)] data-[outside-month]:opacity-50","data-[disabled]:text-[var(--menu-muted)] data-[disabled]:pointer-events-none data-[disabled]:opacity-50"),{variants:{size:{sm:"h-9 w-9 text-sm",default:"h-11 w-11 text-base",lg:"h-14 w-14 text-lg"}},defaultVariants:{size:"default"}}),P=classVarianceAuthority.cva("flex items-center justify-between px-1 pb-4",{variants:{size:R},defaultVariants:{size:"default"}}),c=classVarianceAuthority.cva(d("inline-flex items-center justify-center rounded-md text-[var(--menu-muted)]",h,y,b,U),{variants:{size:{sm:"h-7 w-7",default:"h-9 w-9",lg:"h-11 w-11"}},defaultVariants:{size:"default"}}),V=classVarianceAuthority.cva("w-full border-collapse",{variants:{size:R},defaultVariants:{size:"default"}}),v=classVarianceAuthority.cva("text-center font-medium text-[var(--menu-muted)] pb-2",{variants:{size:{sm:"text-xs w-9",default:"text-sm w-11",lg:"text-base w-14"}},defaultVariants:{size:"default"}}),O=classVarianceAuthority.cva(d("z-50 rounded-md border p-3 shadow-md outline-none","bg-[var(--menu-background)] text-[var(--menu-foreground)]",z,W,X),{variants:{size:{sm:"w-[260px]",default:"w-[320px]",lg:"w-[380px]"}},defaultVariants:{size:"default"}}),k=classVarianceAuthority.cva(d("inline-flex items-center justify-center rounded-md text-[var(--menu-muted)]",h,y,b,F),{variants:{size:{sm:"h-7 w-7",default:"h-9 w-9",lg:"h-11 w-11"}},defaultVariants:{size:"default"}}),E=classVarianceAuthority.cva(d(q,"mt-1"),{variants:{size:B},defaultVariants:{size:"default"}}),N=classVarianceAuthority.cva(d(Z,"mt-1"),{variants:{size:B},defaultVariants:{size:"default"}}),S=classVarianceAuthority.cva(d(j,"block mb-1.5",'data-[required]:after:content-["*"] data-[required]:after:ml-0.5 data-[required]:after:text-[var(--destructive)]'),{variants:{size:{sm:"text-sm",default:"text-sm",lg:"text-base"}},defaultVariants:{size:"default"}});var ya=react.createContext({size:"default"});var J=react.memo(react.forwardRef(({label:o,description:i,errorMessage:f,size:t="default",className:u,placement:D="bottom",...s},I)=>{let T=react.useMemo(()=>({size:t,isInvalid:s.isInvalid,isDisabled:s.isDisabled}),[t,s.isInvalid,s.isDisabled]);return jsxRuntime.jsx(ya.Provider,{value:T,children:jsxRuntime.jsxs(reactAriaComponents.DatePicker,{ref:I,className:e("group flex flex-col gap-1",u),...s,children:[jsxRuntime.jsx(reactAriaComponents.Label,{className:e(S({size:t})),"data-required":s.isRequired||void 0,children:o}),jsxRuntime.jsxs(reactAriaComponents.Group,{className:e(x({size:t,isInvalid:s.isInvalid})),children:[jsxRuntime.jsx(reactAriaComponents.DateInput,{className:"flex flex-1 items-center",children:A=>jsxRuntime.jsx(reactAriaComponents.DateSegment,{segment:A,className:e(p({size:t}))})}),jsxRuntime.jsx(reactAriaComponents.Button,{className:e(k({size:t})),"aria-label":"Open calendar",children:jsxRuntime.jsx(lucideReact.Calendar,{className:"h-4 w-4"})})]}),i&&jsxRuntime.jsx(reactAriaComponents.Text,{slot:"description",className:e(E({size:t})),children:i}),jsxRuntime.jsx(reactAriaComponents.FieldError,{className:e(N({size:t})),children:f}),jsxRuntime.jsx(reactAriaComponents.Popover,{placement:D,className:e(O({size:t})),children:jsxRuntime.jsx(reactAriaComponents.Dialog,{className:"outline-none",children:jsxRuntime.jsxs(reactAriaComponents.Calendar,{className:"w-full",children:[jsxRuntime.jsxs("div",{className:e(P({size:t})),children:[jsxRuntime.jsx(reactAriaComponents.Button,{slot:"previous",className:e(c({size:t})),"aria-label":"Previous month",children:jsxRuntime.jsx(lucideReact.ChevronLeft,{className:"h-4 w-4"})}),jsxRuntime.jsx(reactAriaComponents.Heading,{className:"flex-1 text-center font-semibold"}),jsxRuntime.jsx(reactAriaComponents.Button,{slot:"next",className:e(c({size:t})),"aria-label":"Next month",children:jsxRuntime.jsx(lucideReact.ChevronRight,{className:"h-4 w-4"})})]}),jsxRuntime.jsxs(reactAriaComponents.CalendarGrid,{className:e(V({size:t})),children:[jsxRuntime.jsx(reactAriaComponents.CalendarGridHeader,{children:A=>jsxRuntime.jsx(reactAriaComponents.CalendarHeaderCell,{className:e(v({size:t})),children:A})}),jsxRuntime.jsx(reactAriaComponents.CalendarGridBody,{children:A=>jsxRuntime.jsx(reactAriaComponents.CalendarCell,{date:A,className:e(g({size:t}))})})]})]})})})]})})}));J.displayName="DatePicker";var ea=react.forwardRef(({label:o,description:i,errorMessage:f,size:t="default",className:u,placement:D="bottom",startName:s,endName:I,...T},A)=>jsxRuntime.jsxs(reactAriaComponents.DateRangePicker,{ref:A,className:e("group flex flex-col gap-1",u),startName:s,endName:I,...T,children:[jsxRuntime.jsx(reactAriaComponents.Label,{className:e(S({size:t})),"data-required":T.isRequired||void 0,children:o}),jsxRuntime.jsxs(reactAriaComponents.Group,{className:e(x({size:t,isInvalid:T.isInvalid})),children:[jsxRuntime.jsx(reactAriaComponents.DateInput,{slot:"start",className:"flex items-center",children:C=>jsxRuntime.jsx(reactAriaComponents.DateSegment,{segment:C,className:e(p({size:t}))})}),jsxRuntime.jsx("span",{"aria-hidden":"true",className:"px-2 text-[var(--menu-muted)]",children:"\u2013"}),jsxRuntime.jsx(reactAriaComponents.DateInput,{slot:"end",className:"flex items-center",children:C=>jsxRuntime.jsx(reactAriaComponents.DateSegment,{segment:C,className:e(p({size:t}))})}),jsxRuntime.jsx(reactAriaComponents.Button,{className:e(k({size:t})),"aria-label":"Open calendar",children:jsxRuntime.jsx(lucideReact.Calendar,{className:"h-4 w-4"})})]}),i&&jsxRuntime.jsx(reactAriaComponents.Text,{slot:"description",className:e(E({size:t})),children:i}),jsxRuntime.jsx(reactAriaComponents.FieldError,{className:e(N({size:t})),children:f}),jsxRuntime.jsx(reactAriaComponents.Popover,{placement:D,className:e(O({size:t})),children:jsxRuntime.jsx(reactAriaComponents.Dialog,{className:"outline-none",children:jsxRuntime.jsxs(reactAriaComponents.RangeCalendar,{className:"w-full",children:[jsxRuntime.jsxs("div",{className:e(P({size:t})),children:[jsxRuntime.jsx(reactAriaComponents.Button,{slot:"previous",className:e(c({size:t})),"aria-label":"Previous month",children:jsxRuntime.jsx(lucideReact.ChevronLeft,{className:"h-4 w-4"})}),jsxRuntime.jsx(reactAriaComponents.Heading,{className:"flex-1 text-center font-semibold"}),jsxRuntime.jsx(reactAriaComponents.Button,{slot:"next",className:e(c({size:t})),"aria-label":"Next month",children:jsxRuntime.jsx(lucideReact.ChevronRight,{className:"h-4 w-4"})})]}),jsxRuntime.jsxs(reactAriaComponents.CalendarGrid,{className:e(V({size:t})),children:[jsxRuntime.jsx(reactAriaComponents.CalendarGridHeader,{children:C=>jsxRuntime.jsx(reactAriaComponents.CalendarHeaderCell,{className:e(v({size:t})),children:C})}),jsxRuntime.jsx(reactAriaComponents.CalendarGridBody,{children:C=>jsxRuntime.jsx(reactAriaComponents.CalendarCell,{date:C,className:e(g({size:t}))})})]})]})})})]}));ea.displayName="DateRangePicker";var ta=react.forwardRef(({label:o,description:i,errorMessage:f,size:t="default",className:u,...D},s)=>jsxRuntime.jsxs(reactAriaComponents.DateField,{ref:s,className:e("group flex flex-col gap-1",u),...D,children:[jsxRuntime.jsx(reactAriaComponents.Label,{className:e(S({size:t})),"data-required":D.isRequired||void 0,children:o}),jsxRuntime.jsx(reactAriaComponents.DateInput,{className:e(x({size:t,isInvalid:D.isInvalid}),"w-fit"),children:I=>jsxRuntime.jsx(reactAriaComponents.DateSegment,{segment:I,className:e(p({size:t}))})}),i&&jsxRuntime.jsx(reactAriaComponents.Text,{slot:"description",className:e(E({size:t})),children:i}),jsxRuntime.jsx(reactAriaComponents.FieldError,{className:e(N({size:t})),children:f})]}));ta.displayName="DateField";var na=react.forwardRef(({size:o="default",className:i,...f},t)=>jsxRuntime.jsxs(reactAriaComponents.Calendar,{ref:t,className:e("w-fit",i),...f,children:[jsxRuntime.jsxs("div",{className:e(P({size:o})),children:[jsxRuntime.jsx(reactAriaComponents.Button,{slot:"previous",className:e(c({size:o})),"aria-label":"Previous month",children:jsxRuntime.jsx(lucideReact.ChevronLeft,{className:"h-4 w-4"})}),jsxRuntime.jsx(reactAriaComponents.Heading,{className:"flex-1 text-center font-semibold"}),jsxRuntime.jsx(reactAriaComponents.Button,{slot:"next",className:e(c({size:o})),"aria-label":"Next month",children:jsxRuntime.jsx(lucideReact.ChevronRight,{className:"h-4 w-4"})})]}),jsxRuntime.jsxs(reactAriaComponents.CalendarGrid,{className:e(V({size:o})),children:[jsxRuntime.jsx(reactAriaComponents.CalendarGridHeader,{children:u=>jsxRuntime.jsx(reactAriaComponents.CalendarHeaderCell,{className:e(v({size:o})),children:u})}),jsxRuntime.jsx(reactAriaComponents.CalendarGridBody,{children:u=>jsxRuntime.jsx(reactAriaComponents.CalendarCell,{date:u,className:e(g({size:o}))})})]})]}));na.displayName="Calendar";var oa=zod.z.object({value:zod.z.custom().optional(),defaultValue:zod.z.custom().optional(),placeholderValue:zod.z.custom().optional(),granularity:zod.z.enum(["day","hour","minute","second"]).default("day"),hourCycle:zod.z.union([zod.z.literal(12),zod.z.literal(24)]).optional(),hideTimeZone:zod.z.boolean().optional(),shouldForceLeadingZeros:zod.z.boolean().optional(),minValue:zod.z.custom().optional(),maxValue:zod.z.custom().optional(),isDateUnavailable:zod.z.function().optional(),isOpen:zod.z.boolean().optional(),defaultOpen:zod.z.boolean().optional(),isDisabled:zod.z.boolean().optional(),isReadOnly:zod.z.boolean().optional(),isRequired:zod.z.boolean().optional(),isInvalid:zod.z.boolean().optional(),validate:zod.z.function().optional(),validationBehavior:zod.z.enum(["native","aria"]).default("native"),label:zod.z.string(),description:zod.z.string().optional(),errorMessage:zod.z.union([zod.z.string(),zod.z.function()]).optional(),firstDayOfWeek:zod.z.enum(["sun","mon","tue","wed","thu","fri","sat"]).optional(),pageBehavior:zod.z.enum(["single","visible"]).optional(),name:zod.z.string().optional(),placement:zod.z.enum(["bottom","top","left","right"]).optional(),visibleDuration:zod.z.object({months:zod.z.number()}).optional(),size:zod.z.enum(["sm","default","lg"]).default("default"),onChange:zod.z.function().optional(),onOpenChange:zod.z.function().optional(),onFocus:zod.z.function().optional(),onBlur:zod.z.function().optional(),onFocusChange:zod.z.function().optional(),className:zod.z.string().optional(),children:zod.z.any().optional()}),De=oa.omit({value:true,defaultValue:true,onChange:true}).extend({value:zod.z.object({start:zod.z.custom(),end:zod.z.custom()}).optional(),defaultValue:zod.z.object({start:zod.z.custom(),end:zod.z.custom()}).optional(),startName:zod.z.string().optional(),endName:zod.z.string().optional(),onChange:zod.z.function().optional()}),Ae=zod.z.object({value:zod.z.custom().optional(),defaultValue:zod.z.custom().optional(),placeholderValue:zod.z.custom().optional(),granularity:zod.z.enum(["day","hour","minute","second"]).default("day"),hourCycle:zod.z.union([zod.z.literal(12),zod.z.literal(24)]).optional(),hideTimeZone:zod.z.boolean().optional(),shouldForceLeadingZeros:zod.z.boolean().optional(),minValue:zod.z.custom().optional(),maxValue:zod.z.custom().optional(),isDisabled:zod.z.boolean().optional(),isReadOnly:zod.z.boolean().optional(),isRequired:zod.z.boolean().optional(),isInvalid:zod.z.boolean().optional(),validate:zod.z.function().optional(),validationBehavior:zod.z.enum(["native","aria"]).default("native"),label:zod.z.string(),description:zod.z.string().optional(),errorMessage:zod.z.union([zod.z.string(),zod.z.function()]).optional(),name:zod.z.string().optional(),size:zod.z.enum(["sm","default","lg"]).default("default"),onChange:zod.z.function().optional(),onFocus:zod.z.function().optional(),onBlur:zod.z.function().optional(),onFocusChange:zod.z.function().optional(),className:zod.z.string().optional()}),ia=zod.z.object({value:zod.z.custom().optional(),defaultValue:zod.z.custom().optional(),focusedValue:zod.z.custom().optional(),defaultFocusedValue:zod.z.custom().optional(),minValue:zod.z.custom().optional(),maxValue:zod.z.custom().optional(),isDateUnavailable:zod.z.function().optional(),isDisabled:zod.z.boolean().optional(),isReadOnly:zod.z.boolean().optional(),firstDayOfWeek:zod.z.enum(["sun","mon","tue","wed","thu","fri","sat"]).optional(),pageBehavior:zod.z.enum(["single","visible"]).optional(),visibleDuration:zod.z.object({months:zod.z.number()}).optional(),size:zod.z.enum(["sm","default","lg"]).default("default"),onChange:zod.z.function().optional(),onFocusChange:zod.z.function().optional(),className:zod.z.string().optional()}),Ce=ia.omit({value:true,defaultValue:true,onChange:true}).extend({value:zod.z.object({start:zod.z.custom(),end:zod.z.custom()}).optional(),defaultValue:zod.z.object({start:zod.z.custom(),end:zod.z.custom()}).optional(),onChange:zod.z.function().optional()});Object.defineProperty(exports,"getLocalTimeZone",{enumerable:true,get:function(){return date.getLocalTimeZone}});Object.defineProperty(exports,"isWeekend",{enumerable:true,get:function(){return date.isWeekend}});Object.defineProperty(exports,"now",{enumerable:true,get:function(){return date.now}});Object.defineProperty(exports,"parseDate",{enumerable:true,get:function(){return date.parseDate}});Object.defineProperty(exports,"parseDateTime",{enumerable:true,get:function(){return date.parseDateTime}});Object.defineProperty(exports,"parseZonedDateTime",{enumerable:true,get:function(){return date.parseZonedDateTime}});Object.defineProperty(exports,"today",{enumerable:true,get:function(){return date.today}});exports.Calendar=na;exports.CalendarPropsSchema=ia;exports.DateField=ta;exports.DateFieldPropsSchema=Ae;exports.DatePicker=J;exports.DatePickerPropsSchema=oa;exports.DateRangePicker=ea;exports.DateRangePickerPropsSchema=De;exports.RangeCalendarPropsSchema=Ce;exports.calendarCellVariants=g;exports.calendarGridHeaderCellVariants=v;exports.calendarGridVariants=V;exports.calendarHeaderVariants=P;exports.calendarNavButtonVariants=c;exports.dateFieldVariants=x;exports.datePickerDescriptionVariants=E;exports.datePickerErrorVariants=N;exports.datePickerLabelVariants=S;exports.datePickerPopoverVariants=O;exports.datePickerTriggerVariants=k;exports.dateSegmentVariants=p;//# sourceMappingURL=index.js.map
2
+ 'use strict';var react=require('react'),reactAriaComponents=require('react-aria-components'),lucideReact=require('lucide-react'),clsx=require('clsx'),tailwindMerge=require('tailwind-merge'),classVarianceAuthority=require('class-variance-authority'),jsxRuntime=require('react/jsx-runtime'),zod=require('zod'),date=require('@internationalized/date');function e(...o){return tailwindMerge.twMerge(clsx.clsx(o))}var w=["focus-within:outline-none","focus-within:ring-2","focus-within:ring-[var(--ring)]","focus-within:ring-offset-2"];var T=["focus:outline-none","focus:ring-2","focus:ring-[var(--ring)]"],M=["focus:outline-none","focus:bg-[var(--accent)]","focus:text-[var(--accent-foreground)]"],U=["disabled:pointer-events-none","disabled:opacity-50"],F=["data-[disabled]:pointer-events-none","data-[disabled]:opacity-50","data-[disabled]:cursor-not-allowed"],B={sm:"text-xs",default:"text-sm",lg:"text-base"},R={sm:"text-sm",default:"text-base",lg:"text-lg"};var _={sm:"h-9",default:"h-11",lg:"h-14"},Z=["flex","items-center","gap-1.5","text-[var(--destructive-background)]"];var q=["text-[var(--menu-muted)]"],j=["font-medium","text-[var(--content-foreground)]"];var z=["data-[entering]:animate-in","data-[entering]:fade-in-0","data-[entering]:zoom-in-95"],W=["data-[exiting]:animate-out","data-[exiting]:fade-out-0","data-[exiting]:zoom-out-95"],X=["motion-reduce:transition-none","motion-reduce:animate-none"];var h=["transition-colors","duration-150"],y=["hover:bg-[var(--accent)]","hover:text-[var(--accent-foreground)]"];function d(...o){return o.flatMap(i=>Array.isArray(i)?[...i]:[i])}var g=classVarianceAuthority.cva(d("flex items-center rounded-md border","bg-[var(--content-background)] text-[var(--content-foreground)]","transition-colors duration-200",w,F),{variants:{size:{sm:`${_.sm} px-3 text-sm gap-0.5`,default:`${_.default} px-4 text-base gap-1`,lg:`${_.lg} px-5 text-lg gap-1.5`},isInvalid:{true:"border-[var(--destructive-background)] focus-within:ring-[var(--destructive-background)]",false:"border-[var(--input-border)] hover:border-[var(--input-border)]/80"}},defaultVariants:{size:"default",isInvalid:false}}),p=classVarianceAuthority.cva(d("tabular-nums rounded px-0.5",M,"data-[placeholder]:text-[var(--menu-muted)]","data-[type=literal]:text-[var(--menu-muted)]"),{variants:{size:R},defaultVariants:{size:"default"}}),x=classVarianceAuthority.cva(d("flex items-center justify-center rounded-md cursor-pointer",h,y,T,"data-[selected]:bg-[var(--primary)] data-[selected]:text-[var(--primary-foreground)]","data-[selected]:hover:bg-[var(--primary)]/90 data-[selected]:font-semibold","data-[today]:border data-[today]:border-[var(--primary)]","data-[selection-start]:rounded-l-md data-[selection-start]:rounded-r-none","data-[selection-end]:rounded-r-md data-[selection-end]:rounded-l-none","data-[selected]:data-[selection-start]:rounded-l-md","data-[selected]:data-[selection-end]:rounded-r-md","data-[unavailable]:text-[var(--menu-muted)] data-[unavailable]:pointer-events-none data-[unavailable]:opacity-50 data-[unavailable]:line-through","data-[outside-month]:text-[var(--menu-muted)] data-[outside-month]:opacity-50","data-[disabled]:text-[var(--menu-muted)] data-[disabled]:pointer-events-none data-[disabled]:opacity-50"),{variants:{size:{sm:"h-9 w-9 text-sm",default:"h-11 w-11 text-base",lg:"h-14 w-14 text-lg"}},defaultVariants:{size:"default"}}),P=classVarianceAuthority.cva("flex items-center justify-between px-1 pb-4",{variants:{size:R},defaultVariants:{size:"default"}}),c=classVarianceAuthority.cva(d("inline-flex items-center justify-center rounded-md text-[var(--menu-muted)]",h,y,T,U),{variants:{size:{sm:"h-7 w-7",default:"h-9 w-9",lg:"h-11 w-11"}},defaultVariants:{size:"default"}}),V=classVarianceAuthority.cva("w-full border-collapse",{variants:{size:R},defaultVariants:{size:"default"}}),v=classVarianceAuthority.cva("text-center font-medium text-[var(--menu-muted)] pb-2",{variants:{size:{sm:"text-xs w-9",default:"text-sm w-11",lg:"text-base w-14"}},defaultVariants:{size:"default"}}),k=classVarianceAuthority.cva(d("z-50 rounded-md border p-3 shadow-md outline-none","bg-[var(--menu-background)] text-[var(--menu-foreground)]",z,W,X),{variants:{size:{sm:"w-[260px]",default:"w-[320px]",lg:"w-[380px]"}},defaultVariants:{size:"default"}}),O=classVarianceAuthority.cva(d("inline-flex items-center justify-center rounded-md text-[var(--menu-muted)]",h,y,T,F),{variants:{size:{sm:"h-7 w-7",default:"h-9 w-9",lg:"h-11 w-11"}},defaultVariants:{size:"default"}}),E=classVarianceAuthority.cva(d(q,"mt-1"),{variants:{size:B},defaultVariants:{size:"default"}}),N=classVarianceAuthority.cva(d(Z,"mt-1"),{variants:{size:B},defaultVariants:{size:"default"}}),S=classVarianceAuthority.cva(d(j,"block mb-1.5",'data-[required]:after:content-["*"] data-[required]:after:ml-0.5 data-[required]:after:text-[var(--destructive-background)]'),{variants:{size:{sm:"text-sm",default:"text-sm",lg:"text-base"}},defaultVariants:{size:"default"}});var ya=react.createContext({size:"default"});var J=react.memo(react.forwardRef(({label:o,description:i,errorMessage:f,size:t="default",className:u,placement:D="bottom",...s},b)=>{let I=react.useMemo(()=>({size:t,isInvalid:s.isInvalid,isDisabled:s.isDisabled}),[t,s.isInvalid,s.isDisabled]);return jsxRuntime.jsx(ya.Provider,{value:I,children:jsxRuntime.jsxs(reactAriaComponents.DatePicker,{ref:b,className:e("group flex flex-col gap-1",u),...s,children:[jsxRuntime.jsx(reactAriaComponents.Label,{className:e(S({size:t})),"data-required":s.isRequired||void 0,children:o}),jsxRuntime.jsxs(reactAriaComponents.Group,{className:e(g({size:t,isInvalid:s.isInvalid})),children:[jsxRuntime.jsx(reactAriaComponents.DateInput,{className:"flex flex-1 items-center",children:A=>jsxRuntime.jsx(reactAriaComponents.DateSegment,{segment:A,className:e(p({size:t}))})}),jsxRuntime.jsx(reactAriaComponents.Button,{className:e(O({size:t})),"aria-label":"Open calendar",children:jsxRuntime.jsx(lucideReact.Calendar,{className:"h-4 w-4"})})]}),i&&jsxRuntime.jsx(reactAriaComponents.Text,{slot:"description",className:e(E({size:t})),children:i}),jsxRuntime.jsx(reactAriaComponents.FieldError,{className:e(N({size:t})),children:f}),jsxRuntime.jsx(reactAriaComponents.Popover,{placement:D,className:e(k({size:t})),children:jsxRuntime.jsx(reactAriaComponents.Dialog,{className:"outline-none",children:jsxRuntime.jsxs(reactAriaComponents.Calendar,{className:"w-full",children:[jsxRuntime.jsxs("div",{className:e(P({size:t})),children:[jsxRuntime.jsx(reactAriaComponents.Button,{slot:"previous",className:e(c({size:t})),"aria-label":"Previous month",children:jsxRuntime.jsx(lucideReact.ChevronLeft,{className:"h-4 w-4"})}),jsxRuntime.jsx(reactAriaComponents.Heading,{className:"flex-1 text-center font-semibold"}),jsxRuntime.jsx(reactAriaComponents.Button,{slot:"next",className:e(c({size:t})),"aria-label":"Next month",children:jsxRuntime.jsx(lucideReact.ChevronRight,{className:"h-4 w-4"})})]}),jsxRuntime.jsxs(reactAriaComponents.CalendarGrid,{className:e(V({size:t})),children:[jsxRuntime.jsx(reactAriaComponents.CalendarGridHeader,{children:A=>jsxRuntime.jsx(reactAriaComponents.CalendarHeaderCell,{className:e(v({size:t})),children:A})}),jsxRuntime.jsx(reactAriaComponents.CalendarGridBody,{children:A=>jsxRuntime.jsx(reactAriaComponents.CalendarCell,{date:A,className:e(x({size:t}))})})]})]})})})]})})}));J.displayName="DatePicker";var ea=react.forwardRef(({label:o,description:i,errorMessage:f,size:t="default",className:u,placement:D="bottom",startName:s,endName:b,...I},A)=>jsxRuntime.jsxs(reactAriaComponents.DateRangePicker,{ref:A,className:e("group flex flex-col gap-1",u),startName:s,endName:b,...I,children:[jsxRuntime.jsx(reactAriaComponents.Label,{className:e(S({size:t})),"data-required":I.isRequired||void 0,children:o}),jsxRuntime.jsxs(reactAriaComponents.Group,{className:e(g({size:t,isInvalid:I.isInvalid})),children:[jsxRuntime.jsx(reactAriaComponents.DateInput,{slot:"start",className:"flex items-center",children:C=>jsxRuntime.jsx(reactAriaComponents.DateSegment,{segment:C,className:e(p({size:t}))})}),jsxRuntime.jsx("span",{"aria-hidden":"true",className:"px-2 text-[var(--menu-muted)]",children:"\u2013"}),jsxRuntime.jsx(reactAriaComponents.DateInput,{slot:"end",className:"flex items-center",children:C=>jsxRuntime.jsx(reactAriaComponents.DateSegment,{segment:C,className:e(p({size:t}))})}),jsxRuntime.jsx(reactAriaComponents.Button,{className:e(O({size:t})),"aria-label":"Open calendar",children:jsxRuntime.jsx(lucideReact.Calendar,{className:"h-4 w-4"})})]}),i&&jsxRuntime.jsx(reactAriaComponents.Text,{slot:"description",className:e(E({size:t})),children:i}),jsxRuntime.jsx(reactAriaComponents.FieldError,{className:e(N({size:t})),children:f}),jsxRuntime.jsx(reactAriaComponents.Popover,{placement:D,className:e(k({size:t})),children:jsxRuntime.jsx(reactAriaComponents.Dialog,{className:"outline-none",children:jsxRuntime.jsxs(reactAriaComponents.RangeCalendar,{className:"w-full",children:[jsxRuntime.jsxs("div",{className:e(P({size:t})),children:[jsxRuntime.jsx(reactAriaComponents.Button,{slot:"previous",className:e(c({size:t})),"aria-label":"Previous month",children:jsxRuntime.jsx(lucideReact.ChevronLeft,{className:"h-4 w-4"})}),jsxRuntime.jsx(reactAriaComponents.Heading,{className:"flex-1 text-center font-semibold"}),jsxRuntime.jsx(reactAriaComponents.Button,{slot:"next",className:e(c({size:t})),"aria-label":"Next month",children:jsxRuntime.jsx(lucideReact.ChevronRight,{className:"h-4 w-4"})})]}),jsxRuntime.jsxs(reactAriaComponents.CalendarGrid,{className:e(V({size:t})),children:[jsxRuntime.jsx(reactAriaComponents.CalendarGridHeader,{children:C=>jsxRuntime.jsx(reactAriaComponents.CalendarHeaderCell,{className:e(v({size:t})),children:C})}),jsxRuntime.jsx(reactAriaComponents.CalendarGridBody,{children:C=>jsxRuntime.jsx(reactAriaComponents.CalendarCell,{date:C,className:e(x({size:t}))})})]})]})})})]}));ea.displayName="DateRangePicker";var ta=react.forwardRef(({label:o,description:i,errorMessage:f,size:t="default",className:u,...D},s)=>jsxRuntime.jsxs(reactAriaComponents.DateField,{ref:s,className:e("group flex flex-col gap-1",u),...D,children:[jsxRuntime.jsx(reactAriaComponents.Label,{className:e(S({size:t})),"data-required":D.isRequired||void 0,children:o}),jsxRuntime.jsx(reactAriaComponents.DateInput,{className:e(g({size:t,isInvalid:D.isInvalid}),"w-fit"),children:b=>jsxRuntime.jsx(reactAriaComponents.DateSegment,{segment:b,className:e(p({size:t}))})}),i&&jsxRuntime.jsx(reactAriaComponents.Text,{slot:"description",className:e(E({size:t})),children:i}),jsxRuntime.jsx(reactAriaComponents.FieldError,{className:e(N({size:t})),children:f})]}));ta.displayName="DateField";var na=react.forwardRef(({size:o="default",className:i,...f},t)=>jsxRuntime.jsxs(reactAriaComponents.Calendar,{ref:t,className:e("w-fit",i),...f,children:[jsxRuntime.jsxs("div",{className:e(P({size:o})),children:[jsxRuntime.jsx(reactAriaComponents.Button,{slot:"previous",className:e(c({size:o})),"aria-label":"Previous month",children:jsxRuntime.jsx(lucideReact.ChevronLeft,{className:"h-4 w-4"})}),jsxRuntime.jsx(reactAriaComponents.Heading,{className:"flex-1 text-center font-semibold"}),jsxRuntime.jsx(reactAriaComponents.Button,{slot:"next",className:e(c({size:o})),"aria-label":"Next month",children:jsxRuntime.jsx(lucideReact.ChevronRight,{className:"h-4 w-4"})})]}),jsxRuntime.jsxs(reactAriaComponents.CalendarGrid,{className:e(V({size:o})),children:[jsxRuntime.jsx(reactAriaComponents.CalendarGridHeader,{children:u=>jsxRuntime.jsx(reactAriaComponents.CalendarHeaderCell,{className:e(v({size:o})),children:u})}),jsxRuntime.jsx(reactAriaComponents.CalendarGridBody,{children:u=>jsxRuntime.jsx(reactAriaComponents.CalendarCell,{date:u,className:e(x({size:o}))})})]})]}));na.displayName="Calendar";var oa=zod.z.object({value:zod.z.custom().optional(),defaultValue:zod.z.custom().optional(),placeholderValue:zod.z.custom().optional(),granularity:zod.z.enum(["day","hour","minute","second"]).default("day"),hourCycle:zod.z.union([zod.z.literal(12),zod.z.literal(24)]).optional(),hideTimeZone:zod.z.boolean().optional(),shouldForceLeadingZeros:zod.z.boolean().optional(),minValue:zod.z.custom().optional(),maxValue:zod.z.custom().optional(),isDateUnavailable:zod.z.function().optional(),isOpen:zod.z.boolean().optional(),defaultOpen:zod.z.boolean().optional(),isDisabled:zod.z.boolean().optional(),isReadOnly:zod.z.boolean().optional(),isRequired:zod.z.boolean().optional(),isInvalid:zod.z.boolean().optional(),validate:zod.z.function().optional(),validationBehavior:zod.z.enum(["native","aria"]).default("native"),label:zod.z.string(),description:zod.z.string().optional(),errorMessage:zod.z.union([zod.z.string(),zod.z.function()]).optional(),firstDayOfWeek:zod.z.enum(["sun","mon","tue","wed","thu","fri","sat"]).optional(),pageBehavior:zod.z.enum(["single","visible"]).optional(),name:zod.z.string().optional(),placement:zod.z.enum(["bottom","top","left","right"]).optional(),visibleDuration:zod.z.object({months:zod.z.number()}).optional(),size:zod.z.enum(["sm","default","lg"]).default("default"),onChange:zod.z.function().optional(),onOpenChange:zod.z.function().optional(),onFocus:zod.z.function().optional(),onBlur:zod.z.function().optional(),onFocusChange:zod.z.function().optional(),className:zod.z.string().optional(),children:zod.z.any().optional()}),De=oa.omit({value:true,defaultValue:true,onChange:true}).extend({value:zod.z.object({start:zod.z.custom(),end:zod.z.custom()}).optional(),defaultValue:zod.z.object({start:zod.z.custom(),end:zod.z.custom()}).optional(),startName:zod.z.string().optional(),endName:zod.z.string().optional(),onChange:zod.z.function().optional()}),Ae=zod.z.object({value:zod.z.custom().optional(),defaultValue:zod.z.custom().optional(),placeholderValue:zod.z.custom().optional(),granularity:zod.z.enum(["day","hour","minute","second"]).default("day"),hourCycle:zod.z.union([zod.z.literal(12),zod.z.literal(24)]).optional(),hideTimeZone:zod.z.boolean().optional(),shouldForceLeadingZeros:zod.z.boolean().optional(),minValue:zod.z.custom().optional(),maxValue:zod.z.custom().optional(),isDisabled:zod.z.boolean().optional(),isReadOnly:zod.z.boolean().optional(),isRequired:zod.z.boolean().optional(),isInvalid:zod.z.boolean().optional(),validate:zod.z.function().optional(),validationBehavior:zod.z.enum(["native","aria"]).default("native"),label:zod.z.string(),description:zod.z.string().optional(),errorMessage:zod.z.union([zod.z.string(),zod.z.function()]).optional(),name:zod.z.string().optional(),size:zod.z.enum(["sm","default","lg"]).default("default"),onChange:zod.z.function().optional(),onFocus:zod.z.function().optional(),onBlur:zod.z.function().optional(),onFocusChange:zod.z.function().optional(),className:zod.z.string().optional()}),ia=zod.z.object({value:zod.z.custom().optional(),defaultValue:zod.z.custom().optional(),focusedValue:zod.z.custom().optional(),defaultFocusedValue:zod.z.custom().optional(),minValue:zod.z.custom().optional(),maxValue:zod.z.custom().optional(),isDateUnavailable:zod.z.function().optional(),isDisabled:zod.z.boolean().optional(),isReadOnly:zod.z.boolean().optional(),firstDayOfWeek:zod.z.enum(["sun","mon","tue","wed","thu","fri","sat"]).optional(),pageBehavior:zod.z.enum(["single","visible"]).optional(),visibleDuration:zod.z.object({months:zod.z.number()}).optional(),size:zod.z.enum(["sm","default","lg"]).default("default"),onChange:zod.z.function().optional(),onFocusChange:zod.z.function().optional(),className:zod.z.string().optional()}),Ce=ia.omit({value:true,defaultValue:true,onChange:true}).extend({value:zod.z.object({start:zod.z.custom(),end:zod.z.custom()}).optional(),defaultValue:zod.z.object({start:zod.z.custom(),end:zod.z.custom()}).optional(),onChange:zod.z.function().optional()});Object.defineProperty(exports,"getLocalTimeZone",{enumerable:true,get:function(){return date.getLocalTimeZone}});Object.defineProperty(exports,"isWeekend",{enumerable:true,get:function(){return date.isWeekend}});Object.defineProperty(exports,"now",{enumerable:true,get:function(){return date.now}});Object.defineProperty(exports,"parseDate",{enumerable:true,get:function(){return date.parseDate}});Object.defineProperty(exports,"parseDateTime",{enumerable:true,get:function(){return date.parseDateTime}});Object.defineProperty(exports,"parseZonedDateTime",{enumerable:true,get:function(){return date.parseZonedDateTime}});Object.defineProperty(exports,"today",{enumerable:true,get:function(){return date.today}});exports.Calendar=na;exports.CalendarPropsSchema=ia;exports.DateField=ta;exports.DateFieldPropsSchema=Ae;exports.DatePicker=J;exports.DatePickerPropsSchema=oa;exports.DateRangePicker=ea;exports.DateRangePickerPropsSchema=De;exports.RangeCalendarPropsSchema=Ce;exports.calendarCellVariants=x;exports.calendarGridHeaderCellVariants=v;exports.calendarGridVariants=V;exports.calendarHeaderVariants=P;exports.calendarNavButtonVariants=c;exports.dateFieldVariants=g;exports.datePickerDescriptionVariants=E;exports.datePickerErrorVariants=N;exports.datePickerLabelVariants=S;exports.datePickerPopoverVariants=k;exports.datePickerTriggerVariants=O;exports.dateSegmentVariants=p;//# sourceMappingURL=index.js.map
3
3
  //# sourceMappingURL=index.js.map