@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.
- package/dist/elements/Checkbox/index.js +1 -1
- package/dist/elements/Checkbox/index.js.map +1 -1
- package/dist/elements/Checkbox/index.mjs +1 -1
- package/dist/elements/Checkbox/index.mjs.map +1 -1
- package/dist/elements/CheckboxGroup/index.js +1 -1
- package/dist/elements/CheckboxGroup/index.js.map +1 -1
- package/dist/elements/CheckboxGroup/index.mjs +1 -1
- package/dist/elements/CheckboxGroup/index.mjs.map +1 -1
- package/dist/elements/DatePicker/index.js +1 -1
- package/dist/elements/DatePicker/index.js.map +1 -1
- package/dist/elements/DatePicker/index.mjs +1 -1
- package/dist/elements/DatePicker/index.mjs.map +1 -1
- package/dist/elements/FileField/index.js +1 -1
- package/dist/elements/FileField/index.js.map +1 -1
- package/dist/elements/FileField/index.mjs +1 -1
- package/dist/elements/FileField/index.mjs.map +1 -1
- package/dist/elements/NumberField/NumberField.variants.d.ts +1 -1
- package/dist/elements/NumberField/index.js +1 -1
- package/dist/elements/NumberField/index.js.map +1 -1
- package/dist/elements/NumberField/index.mjs +1 -1
- package/dist/elements/NumberField/index.mjs.map +1 -1
- package/dist/elements/OTPInput/index.js +1 -1
- package/dist/elements/OTPInput/index.js.map +1 -1
- package/dist/elements/OTPInput/index.mjs +1 -1
- package/dist/elements/OTPInput/index.mjs.map +1 -1
- package/dist/elements/Progress/index.js +1 -1
- package/dist/elements/Progress/index.js.map +1 -1
- package/dist/elements/Progress/index.mjs +1 -1
- package/dist/elements/Progress/index.mjs.map +1 -1
- package/dist/elements/RadioGroup/index.js +1 -1
- package/dist/elements/RadioGroup/index.js.map +1 -1
- package/dist/elements/RadioGroup/index.mjs +1 -1
- package/dist/elements/RadioGroup/index.mjs.map +1 -1
- package/dist/elements/Resizable/index.js +1 -1
- package/dist/elements/Resizable/index.js.map +1 -1
- package/dist/elements/Resizable/index.mjs +1 -1
- package/dist/elements/Resizable/index.mjs.map +1 -1
- package/dist/elements/Select/index.js +1 -1
- package/dist/elements/Select/index.js.map +1 -1
- package/dist/elements/Select/index.mjs +1 -1
- package/dist/elements/Select/index.mjs.map +1 -1
- package/dist/elements/Switch/index.js +1 -1
- package/dist/elements/Switch/index.js.map +1 -1
- package/dist/elements/Switch/index.mjs +1 -1
- package/dist/elements/Switch/index.mjs.map +1 -1
- package/dist/elements/Table/index.js +1 -1
- package/dist/elements/Table/index.js.map +1 -1
- package/dist/elements/Table/index.mjs +1 -1
- package/dist/elements/Table/index.mjs.map +1 -1
- package/dist/elements/Tabs/Tabs.d.ts +5 -3
- package/dist/elements/Tabs/Tabs.d.ts.map +1 -1
- package/dist/elements/Tabs/Tabs.types.d.ts +15 -0
- package/dist/elements/Tabs/Tabs.types.d.ts.map +1 -1
- package/dist/elements/Tabs/index.js +1 -1
- package/dist/elements/Tabs/index.js.map +1 -1
- package/dist/elements/Tabs/index.mjs +1 -1
- package/dist/elements/Tabs/index.mjs.map +1 -1
- package/dist/elements/TimeField/index.js +1 -1
- package/dist/elements/TimeField/index.js.map +1 -1
- package/dist/elements/TimeField/index.mjs +1 -1
- package/dist/elements/TimeField/index.mjs.map +1 -1
- package/dist/elements/index.js +1 -1
- package/dist/elements/index.js.map +1 -1
- package/dist/elements/index.mjs +1 -1
- package/dist/elements/index.mjs.map +1 -1
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +2 -2
- package/dist/index.mjs.map +1 -1
- package/dist/styles/index.js +1 -1
- package/dist/styles/index.js.map +1 -1
- package/dist/styles/index.mjs +1 -1
- package/dist/styles/index.mjs.map +1 -1
- package/dist/styles/shared-variants.d.ts +3 -3
- package/dist/styles/shared-variants.d.ts.map +1 -1
- package/package.json +5 -5
- package/src/elements/AlertDialog/AlertDialog.stories.tsx +1 -1
- package/src/elements/CheckboxGroup/CheckboxGroup.stories.tsx +3 -3
- package/src/elements/Combobox/Combobox.stories.tsx +1 -1
- package/src/elements/FileField/FileField.stories.tsx +1 -1
- package/src/elements/Progress/Progress.stories.tsx +6 -1
- package/src/elements/RadioGroup/RadioGroup.stories.tsx +2 -2
- package/src/elements/Tabs/Tabs.stories.tsx +45 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/utils/cn.ts","../../../src/styles/interaction-states.ts","../../../src/elements/RadioGroup/RadioGroup.tsx","../../../src/schemas/BaseComponentProps.ts","../../../src/elements/RadioGroup/RadioGroup.types.ts"],"names":["cn","inputs","twMerge","clsx","FOCUS_STYLES","HIGH_CONTRAST_FOCUS","RadioGroupContext","createContext","radioGroupVariants","cva","radioItemVariants","radioIndicatorVariants","radioInnerDotVariants","RadioLabel","children","className","jsx","RadioDescription","RadioComponent","value","isDisabled","variant","size","isInvalid","useContext","AriaRadio","renderProps","jsxs","Fragment","Radio","RadioGroup","forwardRef","props","ref","label","description","errorMessage","defaultValue","isReadOnly","isRequired","orientation","name","onChange","onFocusChange","id","ariaLabel","ariaLabelledby","ariaDescribedby","dataTestId","restProps","generatedId","useId","radioGroupId","labelId","descriptionId","errorId","describedByParts","computedAriaDescribedBy","AriaRadioGroup","Label","Text","FieldError","BaseComponentPropsSchema","z","RadioGroupVariantSchema","RadioGroupSizeSchema","RadioGroupOrientationSchema","RadioGroupPropsSchema","RadioPropsSchema","RadioLabelPropsSchema","RadioDescriptionPropsSchema"],"mappings":"uTAcO,SAASA,CAAAA,CAAAA,GAAMC,CAAAA,CAA8B,CAClD,OAAOC,OAAAA,CAAQC,IAAAA,CAAKF,CAAM,CAAC,CAC7B,CCIO,IAAMG,CAAAA,CAAe,+GAAA,CAsCrB,IAAMC,CAAAA,CAAsB,uJAAA,CCCnC,IAAMC,CAAAA,CAAoBC,aAAAA,CAAsC,CAC9D,OAAA,CAAS,SAAA,CACT,IAAA,CAAM,SAAA,CACN,SAAA,CAAW,KACb,CAAC,CAAA,CAUKC,EAAAA,CAAqBC,GAAAA,CAEzB,MAAA,CACA,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vD,aAAA,CAAeA,CAAAA,CAAE,MAAA,EAAqC,CAAE,QAAA,EAAS,CAGjE,QAAA,CAAUA,CAAAA,CAAE,MAAA,EACd,CAAC,EAWYK,EAAAA,CAAmBN,CAAAA,CAAyB,MAAA,CAAO,CAE9D,KAAA,CAAOC,CAAAA,CAAE,MAAA,EAAO,CAGhB,UAAA,CAAYA,CAAAA,CAAE,OAAA,EAAQ,CAAE,QAAA,EAAS,CAAE,OAAA,CAAQ,KAAK,CAAA,CAGhD,QAAA,CAAUA,CAAAA,CAAE,MAAA,EAAkB,CAG9B,SAAA,CAAWA,CAAAA,CAAE,MAAA,EAAO,CAAE,QAAA,EACxB,CAAC,CAAA,CAYYM,EAAAA,CAAwBN,EAAE,MAAA,CAAO,CAE5C,QAAA,CAAUA,CAAAA,CAAE,MAAA,EAAkB,CAG9B,SAAA,CAAWA,CAAAA,CAAE,MAAA,EAAO,CAAE,QAAA,EACxB,CAAC,CAAA,CAWYO,EAAAA,CAA8BP,CAAAA,CAAE,MAAA,CAAO,CAElD,QAAA,CAAUA,CAAAA,CAAE,MAAA,EAAkB,CAG9B,SAAA,CAAWA,CAAAA,CAAE,MAAA,EAAO,CAAE,QAAA,EACxB,CAAC","file":"index.mjs","sourcesContent":["/**\n * Class Name Utility\n * Merges Tailwind CSS classes with conflict resolution\n *\n * Combines clsx for conditional classes and tailwind-merge for deduplication\n *\n * @example\n * cn('px-2 py-1', 'px-4') // => 'py-1 px-4' (px-4 overrides px-2)\n * cn('text-red-500', condition && 'text-blue-500') // => conditional application\n */\n\nimport { clsx, type ClassValue } from 'clsx';\nimport { twMerge } from 'tailwind-merge';\n\nexport function cn(...inputs: ClassValue[]): string {\n return twMerge(clsx(inputs));\n}\n","/**\n * Global Interaction State Styles\n *\n * Consistent interaction patterns across all Themis components.\n * These styles ensure WCAG 2.2 AAA compliance and predictable UX.\n *\n * @see spec.md FR-010 (Visible focus ring for keyboard navigation)\n * @see spec.md FR-031 (Pressed state feedback)\n * @see spec.md FR-012 (High contrast mode support)\n * @see constitution.md Principle IV (Accessibility First)\n */\n\n/**\n * Focus state styles (FR-010)\n * Visible focus ring for keyboard navigation - WCAG 2.2 Level AAA\n *\n * Components can override by extending these styles:\n * @example\n * cn(FOCUS_STYLES, \"ring-4\") // Increases ring width to 4px\n */\nexport const FOCUS_STYLES = \"data-[focus-visible]:ring-2 data-[focus-visible]:ring-[var(--themis-ring)] data-[focus-visible]:ring-offset-2\";\n\n/**\n * Pressed/Active state styles (FR-031)\n * Visual feedback for press interactions\n *\n * Components can override the scale amount:\n * @example\n * cn(PRESSED_STYLES_BASE, \"data-[pressed]:scale-[0.95]\") // More pronounced scale\n */\nexport const PRESSED_STYLES = \"data-[pressed]:scale-[0.97]\";\n\n/**\n * Base pressed styles without scale (for components that need different feedback)\n */\nexport const PRESSED_STYLES_BASE = \"data-[pressed]:transition-transform data-[pressed]:duration-100\";\n\n/**\n * Hover state styles\n * Elevation change on hover for better affordance\n *\n * Components can override shadow depth:\n * @example\n * cn(HOVER_STYLES_BASE, \"data-[hovered]:shadow-lg\") // Larger shadow\n */\nexport const HOVER_STYLES = \"data-[hovered]:shadow-md\";\n\n/**\n * Base hover styles without shadow (for components that use different hover effects)\n */\nexport const HOVER_STYLES_BASE = \"data-[hovered]:transition-shadow data-[hovered]:duration-200\";\n\n/**\n * High contrast mode focus (FR-012)\n * Enhanced outlines for users requiring high contrast\n *\n * Uses 'hc:' prefix for prefers-contrast: more media query\n */\nexport const HIGH_CONTRAST_FOCUS = \"hc:data-[focus-visible]:outline hc:data-[focus-visible]:outline-4 hc:data-[focus-visible]:outline-offset-2 hc:data-[focus-visible]:outline-foreground\";\n\n/**\n * High contrast mode hover (FR-012)\n * Enhanced outlines for hover in high contrast mode\n */\nexport const HIGH_CONTRAST_HOVER = \"hc:data-[hovered]:outline hc:data-[hovered]:outline-2 hc:data-[hovered]:outline-foreground\";\n\n/**\n * High contrast mode pressed state\n * Enhanced outlines for pressed state in high contrast mode\n */\nexport const HIGH_CONTRAST_PRESSED = \"hc:data-[pressed]:outline hc:data-[pressed]:outline-2 hc:data-[pressed]:outline-offset-1 hc:data-[pressed]:outline-foreground\";\n\n/**\n * Combined high contrast styles\n * Use this for components that need all high contrast interaction states\n */\nexport const HIGH_CONTRAST_INTERACTIONS = `${HIGH_CONTRAST_FOCUS} ${HIGH_CONTRAST_HOVER} ${HIGH_CONTRAST_PRESSED}`;\n\n/**\n * Disabled state styles\n * Consistent disabled appearance across all components\n */\nexport const DISABLED_STYLES = \"disabled:pointer-events-none disabled:opacity-50\";\n\n/**\n * Default interaction bundle\n * Most common combination for interactive components\n *\n * Includes: focus ring, pressed scale, hover shadow, high contrast enhancements\n *\n * @example\n * <button className={cn(DEFAULT_INTERACTIONS, \"bg-primary\")}>Click</button>\n */\nexport const DEFAULT_INTERACTIONS = `${FOCUS_STYLES} ${PRESSED_STYLES} ${HOVER_STYLES} ${HIGH_CONTRAST_FOCUS} ${HIGH_CONTRAST_HOVER} ${HIGH_CONTRAST_PRESSED}`;\n\n/**\n * Subtle interaction bundle\n * For components that need less pronounced feedback\n *\n * Includes: focus ring and high contrast, but no hover shadow or pressed scale\n */\nexport const SUBTLE_INTERACTIONS = `${FOCUS_STYLES} ${HIGH_CONTRAST_FOCUS}`;\n\n/**\n * Non-interactive element styles\n * For elements that should indicate they are not interactive\n */\nexport const NON_INTERACTIVE = \"cursor-default select-none\";\n","\"use client\";\n\n/**\n * RadioGroup Component\n * Accessible single-selection radio 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 * - Arrow keys move focus AND select (WAI-ARIA standard selection-follows-focus)\n * - Error styling on ALL items (cognitive accessibility)\n * - Spring animation for selection indicator\n * - RTL support (indicator auto-flips)\n * - Radio.Label and Radio.Description sub-components\n *\n * @see radiogroup-prd.md (Product Requirements)\n * @see plan.md (11 Key Clarifications)\n * @see React Aria RadioGroup: https://react-spectrum.adobe.com/react-aria/RadioGroup.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 type ReactNode,\n type ForwardedRef,\n} from 'react';\nimport {\n RadioGroup as AriaRadioGroup,\n Radio as AriaRadio,\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 RadioGroupProps,\n RadioProps,\n RadioLabelProps,\n RadioDescriptionProps,\n RadioGroupVariant,\n RadioGroupSize,\n} from './RadioGroup.types';\n\n// ============================================================================\n// Context\n// ============================================================================\n\ninterface RadioGroupContextValue {\n variant: RadioGroupVariant;\n size: RadioGroupSize;\n isInvalid: boolean;\n}\n\nconst RadioGroupContext = createContext<RadioGroupContextValue>({\n variant: 'default',\n size: 'default',\n isInvalid: false,\n});\n\n// ============================================================================\n// CVA Variants\n// ============================================================================\n\n/**\n * RadioGroup container variants\n * Controls orientation and spacing (gap-2 = 8px per clarification)\n */\nconst radioGroupVariants = 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 * Radio 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 radioItemVariants = 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 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 isInvalid: false,\n },\n }\n);\n\n/**\n * Circle indicator (outer ring) variants\n */\nconst radioIndicatorVariants = cva(\n // Base: circle with border, flex-shrink-0 to prevent squishing\n \"flex-shrink-0 rounded-full 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 ].join(\" \"),\n destructive: [\n \"border-[var(--border)]\",\n \"data-[selected]:border-[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 * Inner dot variants (appears when selected)\n * Spring animation: cubic-bezier(0.34, 1.56, 0.64, 1) with slight overshoot\n */\nconst radioInnerDotVariants = cva(\n // Base: centered dot with spring animation\n [\n \"rounded-full 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: \"bg-[var(--primary)]\",\n destructive: \"bg-[var(--destructive)]\",\n },\n size: {\n sm: \"h-2 w-2\",\n default: \"h-2.5 w-2.5\",\n lg: \"h-3 w-3\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n size: \"default\",\n },\n }\n);\n\n// ============================================================================\n// Sub-components\n// ============================================================================\n\n/**\n * Radio.Label - Styled label for radio item content\n */\nfunction RadioLabel({ children, className }: RadioLabelProps): ReactNode {\n return (\n <span className={cn(\"font-medium text-[var(--content-foreground)]\", className)}>\n {children}\n </span>\n );\n}\n\nRadioLabel.displayName = \"Radio.Label\";\n\n/**\n * Radio.Description - Styled description for radio item content (muted)\n */\nfunction RadioDescription({ children, className }: RadioDescriptionProps): ReactNode {\n return (\n <span className={cn(\"text-sm text-[var(--menu-muted)]\", className)}>\n {children}\n </span>\n );\n}\n\nRadioDescription.displayName = \"Radio.Description\";\n\n// ============================================================================\n// Radio Component\n// ============================================================================\n\n/**\n * Radio item component with bordered container design\n */\nfunction RadioComponent({ value, isDisabled, children, className }: RadioProps): ReactNode {\n const { variant, size, isInvalid } = useContext(RadioGroupContext);\n\n return (\n <AriaRadio\n value={value}\n isDisabled={isDisabled}\n className={(renderProps) =>\n cn(\n radioItemVariants({\n variant,\n size,\n isDisabled: renderProps.isDisabled,\n isInvalid,\n }),\n className\n )\n }\n >\n {(renderProps) => (\n <>\n {/* Circle indicator */}\n <div\n className={radioIndicatorVariants({ variant, size })}\n data-selected={renderProps.isSelected || undefined}\n >\n {/* Inner dot with spring animation */}\n <div\n className={radioInnerDotVariants({ variant, size })}\n data-selected={renderProps.isSelected || undefined}\n />\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 </AriaRadio>\n );\n}\n\n// Attach sub-components\nconst Radio = Object.assign(RadioComponent, {\n Label: RadioLabel,\n Description: RadioDescription,\n}) as typeof RadioComponent & {\n Label: typeof RadioLabel;\n Description: typeof RadioDescription;\n displayName: string;\n};\n\nRadio.displayName = \"Radio\";\n\n// ============================================================================\n// RadioGroup Component\n// ============================================================================\n\n/**\n * RadioGroup root component\n * Accessible single-selection control with bordered container design\n */\nconst RadioGroup = forwardRef<HTMLDivElement, RadioGroupProps>(\n function RadioGroup(props: RadioGroupProps, ref: ForwardedRef<HTMLDivElement>) {\n const {\n // Display props\n label,\n description,\n errorMessage,\n // Selection props\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 radioGroupId = id ?? generatedId;\n const labelId = `${radioGroupId}-label`;\n const descriptionId = `${radioGroupId}-description`;\n const errorId = `${radioGroupId}-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 return (\n <RadioGroupContext.Provider value={{ variant, size, isInvalid }}>\n <AriaRadioGroup\n ref={ref}\n id={radioGroupId}\n name={name}\n value={value ?? undefined}\n defaultValue={defaultValue ?? undefined}\n isDisabled={isDisabled}\n isReadOnly={isReadOnly}\n isRequired={isRequired}\n isInvalid={isInvalid}\n orientation={orientation}\n onChange={onChange}\n onFocusChange={onFocusChange}\n aria-label={ariaLabel}\n aria-labelledby={label ? labelId : ariaLabelledby}\n aria-describedby={computedAriaDescribedBy}\n data-testid={dataTestId}\n data-orientation={orientation}\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 {/* Radio items container with orientation */}\n <div className={radioGroupVariants({ 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 </AriaRadioGroup>\n </RadioGroupContext.Provider>\n );\n }\n);\n\nRadioGroup.displayName = \"RadioGroup\";\n\n// ============================================================================\n// Exports\n// ============================================================================\n\nexport {\n RadioGroup,\n Radio,\n radioGroupVariants,\n radioItemVariants,\n radioIndicatorVariants,\n radioInnerDotVariants,\n};\n","import { z } from 'zod';\n\n/**\n * Base props schema for all Themis components\n * Ensures consistent accessibility and styling APIs across the library\n *\n * @see spec.md FR-009 to FR-014 (Accessibility Requirements)\n * @see constitution.md Principle IV (Accessibility First - WCAG 2.2 AA minimum)\n */\nexport const BaseComponentPropsSchema = z.object({\n // Styling\n className: z.string().optional(),\n\n // React\n children: z.any().optional(), // ReactNode not directly supported by Zod\n id: z.string().optional(),\n\n // Accessibility (WCAG 2.2 AA requirements)\n 'aria-label': z.string().optional(),\n 'aria-labelledby': z.string().optional(),\n 'aria-describedby': z.string().optional(),\n 'aria-live': z.enum(['off', 'polite', 'assertive']).optional(),\n 'aria-hidden': z.boolean().optional(),\n\n // Testing & Development\n 'data-testid': z.string().optional(),\n});\n\nexport type BaseComponentProps = z.infer<typeof BaseComponentPropsSchema>;\n","import { z } from 'zod';\nimport { BaseComponentPropsSchema } from '../../schemas/BaseComponentProps';\nimport type { ReactNode } from 'react';\nimport type {\n RadioGroupProps as AriaRadioGroupProps,\n RadioProps as AriaRadioProps,\n} from 'react-aria-components';\n\n/**\n * RadioGroup variant schema\n * Only 2 variants: default and destructive (no outline per clarification)\n *\n * @see radiogroup-prd.md US-2 (Style Variants)\n * @see plan.md Decision 9 (2 variants only)\n */\nexport const RadioGroupVariantSchema = z.enum(['default', 'destructive']);\nexport type RadioGroupVariant = z.infer<typeof RadioGroupVariantSchema>;\n\n/**\n * RadioGroup size schema\n * All sizes maintain 44px minimum height for WCAG 2.2 AAA compliance\n *\n * @see radiogroup-prd.md US-3 (Size Variants)\n * @see constitution.md Principle IV (Accessibility First)\n */\nexport const RadioGroupSizeSchema = z.enum(['sm', 'default', 'lg']);\nexport type RadioGroupSize = z.infer<typeof RadioGroupSizeSchema>;\n\n/**\n * RadioGroup orientation schema\n *\n * @see radiogroup-prd.md US-5 (Orientation Support)\n */\nexport const RadioGroupOrientationSchema = z.enum(['vertical', 'horizontal']);\nexport type RadioGroupOrientation = z.infer<typeof RadioGroupOrientationSchema>;\n\n/**\n * RadioGroup root component props schema\n *\n * @see radiogroup-prd.md US-1 (Basic Single Selection)\n * @see radiogroup-prd.md US-4 (Labels, Descriptions, Errors)\n * @see radiogroup-prd.md US-6 (Validation States)\n * @see plan.md (All design decisions from clarification session)\n */\nexport const RadioGroupPropsSchema = 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) - nullable for no initial selection\n value: z.string().nullable().optional(),\n defaultValue: z.string().nullable().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: RadioGroupOrientationSchema.optional().default('vertical'),\n\n // Variant props (US-2, US-3) - 2 variants only\n variant: RadioGroupVariantSchema.optional().default('default'),\n size: RadioGroupSizeSchema.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 (Radio components)\n children: z.custom<ReactNode>(),\n});\n\nexport type RadioGroupProps = z.infer<typeof RadioGroupPropsSchema> &\n Omit<AriaRadioGroupProps, keyof z.infer<typeof RadioGroupPropsSchema>>;\n\n/**\n * Radio item component props schema\n *\n * @see radiogroup-prd.md US-1 (Basic Single Selection)\n * @see radiogroup-prd.md US-7 (Rich Content Support)\n */\nexport const RadioPropsSchema = 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\nexport type RadioProps = z.infer<typeof RadioPropsSchema> &\n Omit<AriaRadioProps, keyof z.infer<typeof RadioPropsSchema>>;\n\n/**\n * Radio.Label sub-component props schema\n * Helper component for styled label within Radio item\n *\n * @see radiogroup-prd.md US-7 (Rich Content Support)\n * @see plan.md Decision 1 (Sub-components)\n */\nexport const RadioLabelPropsSchema = 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 RadioLabelProps = z.infer<typeof RadioLabelPropsSchema>;\n\n/**\n * Radio.Description sub-component props schema\n * Helper component for styled description within Radio item (muted text)\n *\n * @see radiogroup-prd.md US-7 (Rich Content Support)\n * @see plan.md Decision 1 (Sub-components)\n */\nexport const RadioDescriptionPropsSchema = 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 RadioDescriptionProps = z.infer<typeof RadioDescriptionPropsSchema>;\n\n/**\n * CVA variant configuration types\n * Used for class-variance-authority integration\n */\nexport type RadioGroupVariantType = RadioGroupVariant;\nexport type RadioGroupSizeType = RadioGroupSize;\nexport type RadioGroupOrientationType = RadioGroupOrientation;\n"]}
|
|
1
|
+
{"version":3,"sources":["../../../src/utils/cn.ts","../../../src/styles/interaction-states.ts","../../../src/elements/RadioGroup/RadioGroup.tsx","../../../src/schemas/BaseComponentProps.ts","../../../src/elements/RadioGroup/RadioGroup.types.ts"],"names":["cn","inputs","twMerge","clsx","FOCUS_STYLES","HIGH_CONTRAST_FOCUS","RadioGroupContext","createContext","radioGroupVariants","cva","radioItemVariants","radioIndicatorVariants","radioInnerDotVariants","RadioLabel","children","className","jsx","RadioDescription","RadioComponent","value","isDisabled","variant","size","isInvalid","useContext","AriaRadio","renderProps","jsxs","Fragment","Radio","RadioGroup","forwardRef","props","ref","label","description","errorMessage","defaultValue","isReadOnly","isRequired","orientation","name","onChange","onFocusChange","id","ariaLabel","ariaLabelledby","ariaDescribedby","dataTestId","restProps","generatedId","useId","radioGroupId","labelId","descriptionId","errorId","describedByParts","computedAriaDescribedBy","AriaRadioGroup","Label","Text","FieldError","BaseComponentPropsSchema","z","RadioGroupVariantSchema","RadioGroupSizeSchema","RadioGroupOrientationSchema","RadioGroupPropsSchema","RadioPropsSchema","RadioLabelPropsSchema","RadioDescriptionPropsSchema"],"mappings":"uTAcO,SAASA,CAAAA,CAAAA,GAAMC,CAAAA,CAA8B,CAClD,OAAOC,OAAAA,CAAQC,IAAAA,CAAKF,CAAM,CAAC,CAC7B,CCIO,IAAMG,CAAAA,CAAe,+GAAA,CAsCrB,IAAMC,CAAAA,CAAsB,uJAAA,CCCnC,IAAMC,CAAAA,CAAoBC,aAAAA,CAAsC,CAC9D,OAAA,CAAS,SAAA,CACT,IAAA,CAAM,SAAA,CACN,SAAA,CAAW,KACb,CAAC,CAAA,CAUKC,EAAAA,CAAqBC,GAAAA,CAEzB,MAAA,CACA,CACE,QAAA,CAAU,CACR,WAAA,CAAa,CACX,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AqC,CAAE,QAAA,EAAS,CAGjE,QAAA,CAAUA,CAAAA,CAAE,MAAA,EACd,CAAC,EAWYK,EAAAA,CAAmBN,CAAAA,CAAyB,MAAA,CAAO,CAE9D,KAAA,CAAOC,CAAAA,CAAE,MAAA,EAAO,CAGhB,UAAA,CAAYA,CAAAA,CAAE,OAAA,EAAQ,CAAE,QAAA,EAAS,CAAE,OAAA,CAAQ,KAAK,CAAA,CAGhD,QAAA,CAAUA,CAAAA,CAAE,MAAA,EAAkB,CAG9B,SAAA,CAAWA,CAAAA,CAAE,MAAA,EAAO,CAAE,QAAA,EACxB,CAAC,CAAA,CAYYM,EAAAA,CAAwBN,EAAE,MAAA,CAAO,CAE5C,QAAA,CAAUA,CAAAA,CAAE,MAAA,EAAkB,CAG9B,SAAA,CAAWA,CAAAA,CAAE,MAAA,EAAO,CAAE,QAAA,EACxB,CAAC,CAAA,CAWYO,EAAAA,CAA8BP,CAAAA,CAAE,MAAA,CAAO,CAElD,QAAA,CAAUA,CAAAA,CAAE,MAAA,EAAkB,CAG9B,SAAA,CAAWA,CAAAA,CAAE,MAAA,EAAO,CAAE,QAAA,EACxB,CAAC","file":"index.mjs","sourcesContent":["/**\n * Class Name Utility\n * Merges Tailwind CSS classes with conflict resolution\n *\n * Combines clsx for conditional classes and tailwind-merge for deduplication\n *\n * @example\n * cn('px-2 py-1', 'px-4') // => 'py-1 px-4' (px-4 overrides px-2)\n * cn('text-red-500', condition && 'text-blue-500') // => conditional application\n */\n\nimport { clsx, type ClassValue } from 'clsx';\nimport { twMerge } from 'tailwind-merge';\n\nexport function cn(...inputs: ClassValue[]): string {\n return twMerge(clsx(inputs));\n}\n","/**\n * Global Interaction State Styles\n *\n * Consistent interaction patterns across all Themis components.\n * These styles ensure WCAG 2.2 AAA compliance and predictable UX.\n *\n * @see spec.md FR-010 (Visible focus ring for keyboard navigation)\n * @see spec.md FR-031 (Pressed state feedback)\n * @see spec.md FR-012 (High contrast mode support)\n * @see constitution.md Principle IV (Accessibility First)\n */\n\n/**\n * Focus state styles (FR-010)\n * Visible focus ring for keyboard navigation - WCAG 2.2 Level AAA\n *\n * Components can override by extending these styles:\n * @example\n * cn(FOCUS_STYLES, \"ring-4\") // Increases ring width to 4px\n */\nexport const FOCUS_STYLES = \"data-[focus-visible]:ring-2 data-[focus-visible]:ring-[var(--themis-ring)] data-[focus-visible]:ring-offset-2\";\n\n/**\n * Pressed/Active state styles (FR-031)\n * Visual feedback for press interactions\n *\n * Components can override the scale amount:\n * @example\n * cn(PRESSED_STYLES_BASE, \"data-[pressed]:scale-[0.95]\") // More pronounced scale\n */\nexport const PRESSED_STYLES = \"data-[pressed]:scale-[0.97]\";\n\n/**\n * Base pressed styles without scale (for components that need different feedback)\n */\nexport const PRESSED_STYLES_BASE = \"data-[pressed]:transition-transform data-[pressed]:duration-100\";\n\n/**\n * Hover state styles\n * Elevation change on hover for better affordance\n *\n * Components can override shadow depth:\n * @example\n * cn(HOVER_STYLES_BASE, \"data-[hovered]:shadow-lg\") // Larger shadow\n */\nexport const HOVER_STYLES = \"data-[hovered]:shadow-md\";\n\n/**\n * Base hover styles without shadow (for components that use different hover effects)\n */\nexport const HOVER_STYLES_BASE = \"data-[hovered]:transition-shadow data-[hovered]:duration-200\";\n\n/**\n * High contrast mode focus (FR-012)\n * Enhanced outlines for users requiring high contrast\n *\n * Uses 'hc:' prefix for prefers-contrast: more media query\n */\nexport const HIGH_CONTRAST_FOCUS = \"hc:data-[focus-visible]:outline hc:data-[focus-visible]:outline-4 hc:data-[focus-visible]:outline-offset-2 hc:data-[focus-visible]:outline-foreground\";\n\n/**\n * High contrast mode hover (FR-012)\n * Enhanced outlines for hover in high contrast mode\n */\nexport const HIGH_CONTRAST_HOVER = \"hc:data-[hovered]:outline hc:data-[hovered]:outline-2 hc:data-[hovered]:outline-foreground\";\n\n/**\n * High contrast mode pressed state\n * Enhanced outlines for pressed state in high contrast mode\n */\nexport const HIGH_CONTRAST_PRESSED = \"hc:data-[pressed]:outline hc:data-[pressed]:outline-2 hc:data-[pressed]:outline-offset-1 hc:data-[pressed]:outline-foreground\";\n\n/**\n * Combined high contrast styles\n * Use this for components that need all high contrast interaction states\n */\nexport const HIGH_CONTRAST_INTERACTIONS = `${HIGH_CONTRAST_FOCUS} ${HIGH_CONTRAST_HOVER} ${HIGH_CONTRAST_PRESSED}`;\n\n/**\n * Disabled state styles\n * Consistent disabled appearance across all components\n */\nexport const DISABLED_STYLES = \"disabled:pointer-events-none disabled:opacity-50\";\n\n/**\n * Default interaction bundle\n * Most common combination for interactive components\n *\n * Includes: focus ring, pressed scale, hover shadow, high contrast enhancements\n *\n * @example\n * <button className={cn(DEFAULT_INTERACTIONS, \"bg-primary\")}>Click</button>\n */\nexport const DEFAULT_INTERACTIONS = `${FOCUS_STYLES} ${PRESSED_STYLES} ${HOVER_STYLES} ${HIGH_CONTRAST_FOCUS} ${HIGH_CONTRAST_HOVER} ${HIGH_CONTRAST_PRESSED}`;\n\n/**\n * Subtle interaction bundle\n * For components that need less pronounced feedback\n *\n * Includes: focus ring and high contrast, but no hover shadow or pressed scale\n */\nexport const SUBTLE_INTERACTIONS = `${FOCUS_STYLES} ${HIGH_CONTRAST_FOCUS}`;\n\n/**\n * Non-interactive element styles\n * For elements that should indicate they are not interactive\n */\nexport const NON_INTERACTIVE = \"cursor-default select-none\";\n","\"use client\";\n\n/**\n * RadioGroup Component\n * Accessible single-selection radio 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 * - Arrow keys move focus AND select (WAI-ARIA standard selection-follows-focus)\n * - Error styling on ALL items (cognitive accessibility)\n * - Spring animation for selection indicator\n * - RTL support (indicator auto-flips)\n * - Radio.Label and Radio.Description sub-components\n *\n * @see radiogroup-prd.md (Product Requirements)\n * @see plan.md (11 Key Clarifications)\n * @see React Aria RadioGroup: https://react-spectrum.adobe.com/react-aria/RadioGroup.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 type ReactNode,\n type ForwardedRef,\n} from 'react';\nimport {\n RadioGroup as AriaRadioGroup,\n Radio as AriaRadio,\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 RadioGroupProps,\n RadioProps,\n RadioLabelProps,\n RadioDescriptionProps,\n RadioGroupVariant,\n RadioGroupSize,\n} from './RadioGroup.types';\n\n// ============================================================================\n// Context\n// ============================================================================\n\ninterface RadioGroupContextValue {\n variant: RadioGroupVariant;\n size: RadioGroupSize;\n isInvalid: boolean;\n}\n\nconst RadioGroupContext = createContext<RadioGroupContextValue>({\n variant: 'default',\n size: 'default',\n isInvalid: false,\n});\n\n// ============================================================================\n// CVA Variants\n// ============================================================================\n\n/**\n * RadioGroup container variants\n * Controls orientation and spacing (gap-2 = 8px per clarification)\n */\nconst radioGroupVariants = 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 * Radio 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 radioItemVariants = 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 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 isInvalid: false,\n },\n }\n);\n\n/**\n * Circle indicator (outer ring) variants\n */\nconst radioIndicatorVariants = cva(\n // Base: circle with border, flex-shrink-0 to prevent squishing\n \"flex-shrink-0 rounded-full 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 ].join(\" \"),\n destructive: [\n \"border-[var(--border)]\",\n \"data-[selected]:border-[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 * Inner dot variants (appears when selected)\n * Spring animation: cubic-bezier(0.34, 1.56, 0.64, 1) with slight overshoot\n */\nconst radioInnerDotVariants = cva(\n // Base: centered dot with spring animation\n [\n \"rounded-full 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: \"bg-[var(--primary)]\",\n destructive: \"bg-[var(--destructive-background)]\",\n },\n size: {\n sm: \"h-2 w-2\",\n default: \"h-2.5 w-2.5\",\n lg: \"h-3 w-3\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n size: \"default\",\n },\n }\n);\n\n// ============================================================================\n// Sub-components\n// ============================================================================\n\n/**\n * Radio.Label - Styled label for radio item content\n */\nfunction RadioLabel({ children, className }: RadioLabelProps): ReactNode {\n return (\n <span className={cn(\"font-medium text-[var(--content-foreground)]\", className)}>\n {children}\n </span>\n );\n}\n\nRadioLabel.displayName = \"Radio.Label\";\n\n/**\n * Radio.Description - Styled description for radio item content (muted)\n */\nfunction RadioDescription({ children, className }: RadioDescriptionProps): ReactNode {\n return (\n <span className={cn(\"text-sm text-[var(--menu-muted)]\", className)}>\n {children}\n </span>\n );\n}\n\nRadioDescription.displayName = \"Radio.Description\";\n\n// ============================================================================\n// Radio Component\n// ============================================================================\n\n/**\n * Radio item component with bordered container design\n */\nfunction RadioComponent({ value, isDisabled, children, className }: RadioProps): ReactNode {\n const { variant, size, isInvalid } = useContext(RadioGroupContext);\n\n return (\n <AriaRadio\n value={value}\n isDisabled={isDisabled}\n className={(renderProps) =>\n cn(\n radioItemVariants({\n variant,\n size,\n isDisabled: renderProps.isDisabled,\n isInvalid,\n }),\n className\n )\n }\n >\n {(renderProps) => (\n <>\n {/* Circle indicator */}\n <div\n className={radioIndicatorVariants({ variant, size })}\n data-selected={renderProps.isSelected || undefined}\n >\n {/* Inner dot with spring animation */}\n <div\n className={radioInnerDotVariants({ variant, size })}\n data-selected={renderProps.isSelected || undefined}\n />\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 </AriaRadio>\n );\n}\n\n// Attach sub-components\nconst Radio = Object.assign(RadioComponent, {\n Label: RadioLabel,\n Description: RadioDescription,\n}) as typeof RadioComponent & {\n Label: typeof RadioLabel;\n Description: typeof RadioDescription;\n displayName: string;\n};\n\nRadio.displayName = \"Radio\";\n\n// ============================================================================\n// RadioGroup Component\n// ============================================================================\n\n/**\n * RadioGroup root component\n * Accessible single-selection control with bordered container design\n */\nconst RadioGroup = forwardRef<HTMLDivElement, RadioGroupProps>(\n function RadioGroup(props: RadioGroupProps, ref: ForwardedRef<HTMLDivElement>) {\n const {\n // Display props\n label,\n description,\n errorMessage,\n // Selection props\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 radioGroupId = id ?? generatedId;\n const labelId = `${radioGroupId}-label`;\n const descriptionId = `${radioGroupId}-description`;\n const errorId = `${radioGroupId}-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 return (\n <RadioGroupContext.Provider value={{ variant, size, isInvalid }}>\n <AriaRadioGroup\n ref={ref}\n id={radioGroupId}\n name={name}\n value={value ?? undefined}\n defaultValue={defaultValue ?? undefined}\n isDisabled={isDisabled}\n isReadOnly={isReadOnly}\n isRequired={isRequired}\n isInvalid={isInvalid}\n orientation={orientation}\n onChange={onChange}\n onFocusChange={onFocusChange}\n aria-label={ariaLabel}\n aria-labelledby={label ? labelId : ariaLabelledby}\n aria-describedby={computedAriaDescribedBy}\n data-testid={dataTestId}\n data-orientation={orientation}\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 {/* Radio items container with orientation */}\n <div className={radioGroupVariants({ 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 </AriaRadioGroup>\n </RadioGroupContext.Provider>\n );\n }\n);\n\nRadioGroup.displayName = \"RadioGroup\";\n\n// ============================================================================\n// Exports\n// ============================================================================\n\nexport {\n RadioGroup,\n Radio,\n radioGroupVariants,\n radioItemVariants,\n radioIndicatorVariants,\n radioInnerDotVariants,\n};\n","import { z } from 'zod';\n\n/**\n * Base props schema for all Themis components\n * Ensures consistent accessibility and styling APIs across the library\n *\n * @see spec.md FR-009 to FR-014 (Accessibility Requirements)\n * @see constitution.md Principle IV (Accessibility First - WCAG 2.2 AA minimum)\n */\nexport const BaseComponentPropsSchema = z.object({\n // Styling\n className: z.string().optional(),\n\n // React\n children: z.any().optional(), // ReactNode not directly supported by Zod\n id: z.string().optional(),\n\n // Accessibility (WCAG 2.2 AA requirements)\n 'aria-label': z.string().optional(),\n 'aria-labelledby': z.string().optional(),\n 'aria-describedby': z.string().optional(),\n 'aria-live': z.enum(['off', 'polite', 'assertive']).optional(),\n 'aria-hidden': z.boolean().optional(),\n\n // Testing & Development\n 'data-testid': z.string().optional(),\n});\n\nexport type BaseComponentProps = z.infer<typeof BaseComponentPropsSchema>;\n","import { z } from 'zod';\nimport { BaseComponentPropsSchema } from '../../schemas/BaseComponentProps';\nimport type { ReactNode } from 'react';\nimport type {\n RadioGroupProps as AriaRadioGroupProps,\n RadioProps as AriaRadioProps,\n} from 'react-aria-components';\n\n/**\n * RadioGroup variant schema\n * Only 2 variants: default and destructive (no outline per clarification)\n *\n * @see radiogroup-prd.md US-2 (Style Variants)\n * @see plan.md Decision 9 (2 variants only)\n */\nexport const RadioGroupVariantSchema = z.enum(['default', 'destructive']);\nexport type RadioGroupVariant = z.infer<typeof RadioGroupVariantSchema>;\n\n/**\n * RadioGroup size schema\n * All sizes maintain 44px minimum height for WCAG 2.2 AAA compliance\n *\n * @see radiogroup-prd.md US-3 (Size Variants)\n * @see constitution.md Principle IV (Accessibility First)\n */\nexport const RadioGroupSizeSchema = z.enum(['sm', 'default', 'lg']);\nexport type RadioGroupSize = z.infer<typeof RadioGroupSizeSchema>;\n\n/**\n * RadioGroup orientation schema\n *\n * @see radiogroup-prd.md US-5 (Orientation Support)\n */\nexport const RadioGroupOrientationSchema = z.enum(['vertical', 'horizontal']);\nexport type RadioGroupOrientation = z.infer<typeof RadioGroupOrientationSchema>;\n\n/**\n * RadioGroup root component props schema\n *\n * @see radiogroup-prd.md US-1 (Basic Single Selection)\n * @see radiogroup-prd.md US-4 (Labels, Descriptions, Errors)\n * @see radiogroup-prd.md US-6 (Validation States)\n * @see plan.md (All design decisions from clarification session)\n */\nexport const RadioGroupPropsSchema = 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) - nullable for no initial selection\n value: z.string().nullable().optional(),\n defaultValue: z.string().nullable().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: RadioGroupOrientationSchema.optional().default('vertical'),\n\n // Variant props (US-2, US-3) - 2 variants only\n variant: RadioGroupVariantSchema.optional().default('default'),\n size: RadioGroupSizeSchema.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 (Radio components)\n children: z.custom<ReactNode>(),\n});\n\nexport type RadioGroupProps = z.infer<typeof RadioGroupPropsSchema> &\n Omit<AriaRadioGroupProps, keyof z.infer<typeof RadioGroupPropsSchema>>;\n\n/**\n * Radio item component props schema\n *\n * @see radiogroup-prd.md US-1 (Basic Single Selection)\n * @see radiogroup-prd.md US-7 (Rich Content Support)\n */\nexport const RadioPropsSchema = 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\nexport type RadioProps = z.infer<typeof RadioPropsSchema> &\n Omit<AriaRadioProps, keyof z.infer<typeof RadioPropsSchema>>;\n\n/**\n * Radio.Label sub-component props schema\n * Helper component for styled label within Radio item\n *\n * @see radiogroup-prd.md US-7 (Rich Content Support)\n * @see plan.md Decision 1 (Sub-components)\n */\nexport const RadioLabelPropsSchema = 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 RadioLabelProps = z.infer<typeof RadioLabelPropsSchema>;\n\n/**\n * Radio.Description sub-component props schema\n * Helper component for styled description within Radio item (muted text)\n *\n * @see radiogroup-prd.md US-7 (Rich Content Support)\n * @see plan.md Decision 1 (Sub-components)\n */\nexport const RadioDescriptionPropsSchema = 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 RadioDescriptionProps = z.infer<typeof RadioDescriptionPropsSchema>;\n\n/**\n * CVA variant configuration types\n * Used for class-variance-authority integration\n */\nexport type RadioGroupVariantType = RadioGroupVariant;\nexport type RadioGroupSizeType = RadioGroupSize;\nexport type RadioGroupOrientationType = RadioGroupOrientation;\n"]}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
'use strict';var react=require('react'),clsx=require('clsx'),tailwindMerge=require('tailwind-merge'),jsxRuntime=require('react/jsx-runtime'),zod=require('zod'),classVarianceAuthority=require('class-variance-authority'),lucideReact=require('lucide-react'),reactAriaComponents=require('react-aria-components');function N(...p){return tailwindMerge.twMerge(clsx.clsx(p))}var ee=react.createContext(null);ee.displayName="ResizableContext";function W(){let p=react.useContext(ee);if(!p)throw new Error("useResizableContext must be used within a ResizablePanelGroup. Make sure ResizablePanel and ResizableHandle are children of ResizablePanelGroup.");return p}function Se({direction:p,groupLabel:o,sizes:f,onSizesChange:n}){let[l,e]=react.useState([]),[a,i]=react.useState([]),t=react.useRef(null),s=react.useRef(null),v=react.useRef(null),c=react.useRef(false),P=f!==void 0,R=P?f:l,h=react.useCallback(b=>{P?n?.(b):e(b);},[P,n]),E=react.useCallback((b,r)=>{i(g=>{let w=[...g];return w[b]=r,w});},[]),L=react.useCallback(b=>{i(r=>{let g=[...r];return delete g[b],g.filter(Boolean)});},[]);react.useEffect(()=>{if(P||c.current)return;let r=a.filter(Boolean).length;if(r<2)return;if(R.length<r||R.some(w=>w===void 0)){let w=[],d=100/r;for(let u=0;u<r;u++)w[u]=d;c.current=true,e(w);}},[a,R,P]),react.useEffect(()=>()=>{v.current&&clearTimeout(v.current),s.current&&(document.body.removeChild(s.current),s.current=null);},[]);let y=react.useCallback(b=>{if(!s.current){let r=document.createElement("div");r.setAttribute("aria-live","polite"),r.setAttribute("aria-atomic","true"),r.className="sr-only",r.style.cssText="position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;",document.body.appendChild(r),s.current=r;}s.current.textContent=b,v.current&&clearTimeout(v.current),v.current=setTimeout(()=>{s.current&&(s.current.textContent="");},1e3);},[]);return {direction:p,groupLabel:o,sizes:R,setSizes:h,panels:a,registerPanel:E,unregisterPanel:L,announce:y,containerRef:t}}var ye=react.forwardRef(function({direction:o,groupLabel:f,sizes:n,onSizesChange:l,className:e,children:a},i){let t=Se({direction:o,groupLabel:f,sizes:n,onSizesChange:l});return react.useImperativeHandle(i,()=>t.containerRef.current,[t.containerRef]),jsxRuntime.jsx(ee.Provider,{value:t,children:jsxRuntime.jsx("div",{ref:t.containerRef,role:"group","aria-label":`${f}, ${o}`,"data-direction":o,className:N("flex h-full w-full",o==="horizontal"?"flex-row":"flex-col",e),children:a})})});ye.displayName="ResizablePanelGroup";var U=10,$=90,te=300,Ee=zod.z.object({label:zod.z.string().min(1),sizes:zod.z.array(zod.z.number().min(0).max(100))}),lt=zod.z.object({direction:zod.z.enum(["horizontal","vertical"]),groupLabel:zod.z.string().min(1),sizes:zod.z.array(zod.z.number().min(0).max(100)).optional(),onSizesChange:zod.z.function().optional(),className:zod.z.string().optional(),children:zod.z.custom()}),ut=zod.z.object({name:zod.z.string().min(1),defaultSize:zod.z.number().min(0).max(100).optional(),minSize:zod.z.number().min(0).max(100).optional().default(U),maxSize:zod.z.number().min(0).max(100).optional().default($),collapsible:zod.z.boolean().optional().default(false),onCollapse:zod.z.function().optional(),onExpand:zod.z.function().optional(),onResize:zod.z.function().optional(),className:zod.z.string().optional(),children:zod.z.custom()}),ct=zod.z.object({withHandle:zod.z.boolean().optional().default(true),presets:zod.z.array(Ee).optional(),disabled:zod.z.boolean().optional().default(false),className:zod.z.string().optional()}),se=classVarianceAuthority.cva(["relative flex items-center justify-center","shrink-0","bg-transparent","transition-colors duration-150","focus-visible:outline-none focus-visible:ring-2","focus-visible:ring-[var(--ring)] focus-visible:ring-offset-2","touch-none select-none"],{variants:{direction:{horizontal:["w-3 min-w-[12px]","cursor-col-resize","hover:bg-[var(--accent)]/50","before:absolute before:inset-y-0 before:-inset-x-4","before:min-w-[44px]"],vertical:["h-3 min-h-[12px]","cursor-row-resize","hover:bg-[var(--accent)]/50","before:absolute before:inset-x-0 before:-inset-y-4","before:min-h-[44px]"]},disabled:{true:"cursor-not-allowed opacity-50 pointer-events-none",false:""},isDragging:{true:"bg-[var(--accent)]",false:""}},defaultVariants:{direction:"horizontal",disabled:false,isDragging:false}}),le=classVarianceAuthority.cva(["flex items-center justify-center","rounded-full","bg-[var(--border)]","text-[var(--menu-muted)]"],{variants:{direction:{horizontal:"h-8 w-1",vertical:"h-1 w-8"}},defaultVariants:{direction:"horizontal"}});var Ve=react.forwardRef(function({name:o,defaultSize:f,minSize:n=U,maxSize:l=$,collapsible:e=false,onCollapse:a,onExpand:i,onResize:t,className:s,children:v},c){let{sizes:P,registerPanel:R,unregisterPanel:h,containerRef:E}=W(),L=react.useRef(null),[y,b]=react.useState(-1),r=react.useRef(null),g=react.useRef(false),w=react.useRef(-1);react.useEffect(()=>{let u=L.current,x=E.current;if(!u||!x)return;let V=x.querySelectorAll("[data-resizable-panel]"),T=-1;for(let F=0;F<V.length;F++)if(V[F]===u){T=F;break}if(T!==-1)return y!==T&&b(T),g.current||(g.current=true,w.current=T,R(T,{name:o,minSize:n,maxSize:l,collapsible:e})),()=>{g.current&&(h(w.current),g.current=false);}},[E,R,h,o,n,l,e,y]);let d=y>=0?P[y]??50:50;return react.useEffect(()=>{if(r.current===null){r.current=d;return}let u=r.current===0,x=d===0;!u&&x&&a?a():u&&!x&&i&&i(),t&&r.current!==d&&t(d),r.current=d;},[d,a,i,t]),jsxRuntime.jsx("div",{ref:u=>{L.current=u,typeof c=="function"?c(u):c&&(c.current=u);},role:"region","aria-label":o,"data-resizable-panel":"","data-panel-name":o,"data-panel-index":y,"data-collapsed":d===0,style:{flexBasis:`${d}%`,flexGrow:0,flexShrink:0,overflow:"hidden"},className:N("relative",s),children:v})});Ve.displayName="ResizablePanel";function Te(p,o,f){return Math.max(o,Math.min(f,p))}function Le(p,o,f,n,l){let e=[...p],a=o[f],i=o[n];if(!a||!i)return p;let t=p[f]??50,s=p[n]??50,v=t+l,c=s-l,P=a.collapsible?0:a.minSize,R=a.maxSize,h=i.collapsible?0:i.minSize,E=i.maxSize;return v=Te(v,P,R),c=t+s-v,c=Te(c,h,E),v=t+s-c,e[f]=v,e[n]=c,e}function De({direction:p,sizes:o,setSizes:f,panels:n,containerRef:l,leftPanelIndex:e,rightPanelIndex:a,disabled:i=false,announce:t,groupLabel:s,onOpenPopover:v}){let[c,P]=react.useState(false),R=react.useRef(null),h=react.useRef(null),E=react.useRef(0),L=react.useRef(false),y=react.useRef(n),b=react.useRef(o),r=react.useRef(f),g=react.useRef(()=>{}),w=react.useRef(()=>{});react.useEffect(()=>{y.current=n,b.current=o,r.current=f;},[n,o,f]);let d=react.useCallback(()=>{let S=l.current;return S?p==="horizontal"?S.offsetWidth:S.offsetHeight:0},[l,p]),u=react.useCallback(S=>{let C=d();return C===0?0:S/C*100},[d]),x=react.useCallback(S=>{g.current(S);},[]),V=react.useCallback(()=>{w.current();},[]),T=react.useCallback(S=>{if(!R.current||i)return;let I=(p==="horizontal"?S.clientX:S.clientY)-R.current.position,D=u(I),_=Le(R.current.sizes,y.current,e,a,D);r.current(_);},[p,i,e,u,a]),F=react.useCallback(()=>{if(h.current&&(clearTimeout(h.current),h.current=null),Date.now()-E.current<te&&!L.current&&v&&!i&&v(),c){P(false);let I=y.current[e],D=Math.round(b.current[e]??50);t&&I&&s&&t(`${I.name} in ${s} resized to ${D} percent`);}R.current=null,L.current=false,document.removeEventListener("pointermove",x),document.removeEventListener("pointerup",V),document.removeEventListener("pointercancel",V),document.body.style.cursor="",document.body.style.userSelect="";},[t,i,s,c,e,v,x,V]);react.useEffect(()=>{g.current=T,w.current=F;});let K=react.useCallback(S=>{if(i)return;S.preventDefault();let C=p==="horizontal"?S.clientX:S.clientY;E.current=Date.now(),L.current=false,R.current={position:C,sizes:[...o],containerSize:d()},h.current=setTimeout(()=>{L.current=true,P(true),document.body.style.cursor=p==="horizontal"?"col-resize":"row-resize",document.body.style.userSelect="none";},te),document.addEventListener("pointermove",x),document.addEventListener("pointerup",V),document.addEventListener("pointercancel",V),S.pointerType==="mouse"&&(h.current&&(clearTimeout(h.current),h.current=null),L.current=true,P(true),document.body.style.cursor=p==="horizontal"?"col-resize":"row-resize",document.body.style.userSelect="none");},[p,i,d,x,V,o]),G=react.useCallback(S=>{if(i)return;let C=S.shiftKey?10:1,I=0;switch(S.key){case "ArrowLeft":case "ArrowUp":I=-C;break;case "ArrowRight":case "ArrowDown":I=C;break;case "Home":{let D=n[e];D&&(I=(D.collapsible?0:D.minSize)-(o[e]??50));break}case "End":{let D=n[e];D&&(I=D.maxSize-(o[e]??50));break}case "Enter":case " ":S.preventDefault(),v?.();return;default:return}if(I!==0){S.preventDefault();let D=Le(o,n,e,a,I);f(D);let _=n[e],k=Math.round(D[e]??50);t&&_&&s&&t(`${_.name} in ${s} resized to ${k} percent`);}},[t,i,s,e,v,n,a,f,o]);return react.useEffect(()=>{let S=x,C=V;return ()=>{h.current&&clearTimeout(h.current),document.removeEventListener("pointermove",S),document.removeEventListener("pointerup",C),document.removeEventListener("pointercancel",C);}},[x,V]),{isDragging:c,handlePointerDown:K,handleKeyDown:G}}var ce=classVarianceAuthority.cva("inline-flex justify-center min-h-[44px] min-w-[44px] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--ring)] focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:pointer-events-none disabled:opacity-50",{variants:{fullWidth:{true:"w-full",false:""},inVerticalGroup:{true:"items-stretch",false:"items-center"}},defaultVariants:{fullWidth:false,inVerticalGroup:false}}),de=classVarianceAuthority.cva("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 relative cursor-pointer",{variants:{variant:{default:"bg-[var(--primary-action)] text-[var(--primary-action-foreground)] shadow-md hover:bg-[var(--primary-action-hover)] data-[pressed]:bg-[var(--primary-action)]/80",destructive:"bg-[var(--destructive-background)] text-[var(--destructive-foreground)] shadow-md hover:bg-[var(--destructive-background)]/90 data-[pressed]:bg-[var(--destructive-background)]/80",outline:"border border-[var(--input-border)] bg-[var(--page-background)] hover:bg-[var(--input-border)] data-[pressed]:bg-[var(--input-border)]",secondary:"bg-[var(--secondary)] text-[var(--secondary-foreground)] shadow-md hover:bg-[var(--secondary)]/80 data-[pressed]:bg-[var(--secondary)]/70",ghost:"hover:bg-[var(--accent)] hover:text-[var(--accent-foreground)] data-[pressed]:bg-[var(--accent)]",link:"text-[var(--text-link)] underline-offset-4 hover:underline data-[pressed]:text-[var(--text-link-hover)]"},fullWidth:{true:"w-full",false:""},visualSize:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3 text-xs",lg:"h-11 rounded-md px-8",icon:"h-10 w-10",dot:"h-5 w-5 rounded-full p-0 min-h-0 min-w-0"},paywall:{true:"!bg-[var(--paywall)] !text-[var(--paywall-foreground)] !shadow-md hover:!bg-[var(--paywall)]/90 !cursor-not-allowed !border-transparent",false:""}},defaultVariants:{variant:"default",visualSize:"default",paywall:false}});var me="data-[pressed]:scale-[0.97]";var pe="data-[hovered]:shadow-md";var re="hc:data-[hovered]:outline hc:data-[hovered]:outline-2 hc:data-[hovered]:outline-foreground",oe="hc:data-[pressed]:outline hc:data-[pressed]:outline-2 hc:data-[pressed]:outline-offset-1 hc:data-[pressed]:outline-foreground";var _e=react.createContext(null);_e.displayName="ButtonGroupContext";function Me(){return react.useContext(_e)}var Fe=react.createContext(null);Fe.displayName="ButtonGroupItemContext";function Ge(){return react.useContext(Fe)}classVarianceAuthority.cva("inline-flex items-center gap-0",{variants:{orientation:{horizontal:"flex-row",vertical:"flex-col w-full"}},defaultVariants:{orientation:"horizontal"}});var Be=classVarianceAuthority.cva("",{variants:{orientation:{horizontal:"min-w-[44px]",vertical:"flex min-h-[44px]"},position:{first:"",middle:"",last:"",only:""}},compoundVariants:[{orientation:"horizontal",position:"first",className:"rounded-r-none border-r-0"},{orientation:"horizontal",position:"middle",className:"rounded-none border-r-0"},{orientation:"horizontal",position:"last",className:"rounded-l-none"},{orientation:"vertical",position:"first",className:"rounded-b-none border-b-0"},{orientation:"vertical",position:"middle",className:"rounded-none border-b-0"},{orientation:"vertical",position:"last",className:"rounded-t-none"}],defaultVariants:{orientation:"horizontal",position:"only"}});classVarianceAuthority.cva("bg-[var(--border)]",{variants:{orientation:{horizontal:"w-px h-6 mx-1",vertical:"h-px w-full my-1"}},defaultVariants:{orientation:"horizontal"}});var M=react.memo(react.forwardRef(({className:p,buttonVisualClassName:o,variant:f,size:n,visualSize:l,fullWidth:e,loading:a=false,loadingText:i="Loading...",shortcut:t,children:s,isDisabled:v,paywall:c=false,paywallRedirect:P,paywallDescription:R,onPress:h,...E},L)=>{let y=react.useId(),b=Me(),r=Ge(),g=f??b?.variant??"default",w=n??b?.size,d=v??b?.isDisabled??false,u=b?.orientation==="vertical",x=e||u,V=r?Be({orientation:b?.orientation??"horizontal",position:r.position}):"",T=l??w??"default";return process.env.NODE_ENV!=="production"&&(T==="dot"||T==="icon")&&!E["aria-label"]&&!s&&console.warn('[Button] visualSize="dot" or "icon" requires aria-label when no visible text is provided (WCAG 1.1.1)'),jsxRuntime.jsx(reactAriaComponents.Button,{ref:L,isDisabled:d||a||void 0,"aria-disabled":c?true:void 0,"aria-describedby":c?y:void 0,onPress:G=>{if(c){P&&window.open(P,"_blank","noopener,noreferrer");return}h?.(G);},className:N(ce({fullWidth:x,inVerticalGroup:u}),p),...E,children:G=>jsxRuntime.jsxs("span",{className:N(de({variant:g,visualSize:T,paywall:c,fullWidth:x}),V,o,me,pe,re,oe),"data-pressed":G.isPressed||void 0,children:[a&&jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(lucideReact.Loader2,{className:"motion-safe:animate-spin","aria-hidden":"true"}),jsxRuntime.jsx("span",{className:"sr-only","aria-live":"polite",children:i})]}),!a&&s,c&&jsxRuntime.jsx(lucideReact.Zap,{"data-testid":"zap-icon","aria-hidden":"true",className:"ml-1"}),c&&jsxRuntime.jsxs("span",{id:y,className:"sr-only",children:["Premium feature: ",R||"Upgrade required to access this feature"]}),G.isFocusVisible&&t&&jsxRuntime.jsx("kbd",{className:"ml-auto hidden text-xs opacity-60 lg:inline",children:t}),G.isPressed&&jsxRuntime.jsx("span",{className:"absolute inset-0 rounded-[inherit] bg-current opacity-10 motion-safe:animate-in motion-safe:zoom-in-95","aria-hidden":"true"})]})})}));M.displayName="Button";var Oe=4294967295,ke=0,Ue=-2147483647;zod.z.object({value:zod.z.number().nullable().optional(),defaultValue:zod.z.number().optional(),minValue:zod.z.number().optional(),maxValue:zod.z.number().optional(),allowNegative:zod.z.boolean().optional(),step:zod.z.number().positive().optional(),formatOptions:zod.z.custom().optional(),isDisabled:zod.z.boolean().optional(),isReadOnly:zod.z.boolean().optional(),isRequired:zod.z.boolean().optional(),isInvalid:zod.z.boolean().optional(),isWheelDisabled: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(),stepperLayout:zod.z.enum(["sides","stacked","hidden"]).default("sides"),incrementAriaLabel:zod.z.string().optional(),decrementAriaLabel:zod.z.string().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(),autoFocus:zod.z.boolean().optional()});var $e=classVarianceAuthority.cva(["inline-flex items-center rounded-md border","bg-[var(--content-background)] text-[var(--content-foreground)]","transition-colors duration-200","focus-within:ring-2 focus-within:ring-[var(--ring)] focus-within:ring-offset-2","data-[disabled]:cursor-not-allowed data-[disabled]:opacity-50"],{variants:{size:{sm:"h-9 text-sm",default:"h-10 text-base",lg:"h-12 text-lg"},isInvalid:{true:"border-[var(--destructive)] focus-within:ring-[var(--destructive)]",false:"border-[var(--input)] hover:border-[var(--input)]/80"}},defaultVariants:{size:"default",isInvalid:false}}),je=classVarianceAuthority.cva(["flex-1 bg-transparent text-center tabular-nums","min-w-0","focus:outline-none","[appearance:textfield]","[&::-webkit-outer-spin-button]:appearance-none","[&::-webkit-inner-spin-button]:appearance-none"],{variants:{size:{sm:"px-2 text-sm",default:"px-3 text-base",lg:"px-4 text-lg"}},defaultVariants:{size:"default"}}),X=classVarianceAuthority.cva(["flex items-center justify-center","transition-colors duration-150","select-none","hover:bg-[var(--accent)] hover:text-[var(--accent-foreground)]","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--ring)]","focus-visible:ring-inset","active:bg-[var(--accent)]/80","disabled:pointer-events-none disabled:opacity-50"],{variants:{size:{sm:"min-w-8 min-h-8 text-sm",default:"min-w-10 min-h-10 text-base",lg:"min-w-12 min-h-12 text-lg"},position:{left:"rounded-l-md border-r border-[var(--input)]",right:"rounded-r-md border-l border-[var(--input)]",top:"rounded-tr-md border-b border-l border-[var(--input)] h-1/2",bottom:"rounded-br-md border-l border-[var(--input)] h-1/2"}},defaultVariants:{size:"default"}}),qe=classVarianceAuthority.cva(["block font-medium text-[var(--content-foreground)]","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"}}),Ye=classVarianceAuthority.cva(["text-[var(--menu-muted)]","mt-1"],{variants:{size:{sm:"text-xs",default:"text-sm",lg:"text-base"}},defaultVariants:{size:"default"}}),We=classVarianceAuthority.cva(["flex items-center gap-1","text-[var(--destructive)]","mt-1"],{variants:{size:{sm:"text-xs",default:"text-sm",lg:"text-base"}},defaultVariants:{size:"default"}});var ae=react.forwardRef(({label:p,description:o,errorMessage:f,size:n="default",stepperLayout:l="sides",allowNegative:e=false,incrementAriaLabel:a,decrementAriaLabel:i,minValue:t,maxValue:s,className:v,isInvalid:c,isRequired:P,isDisabled:R,isReadOnly:h,...E},L)=>{let y=t??(e?Ue:ke),b=s??Oe,r=l!=="hidden"&&!h,g=l==="stacked";return jsxRuntime.jsxs(reactAriaComponents.NumberField,{ref:L,className:N("group flex flex-col",v),minValue:y,maxValue:b,isInvalid:c,isRequired:P,isDisabled:R,isReadOnly:h,...E,children:[jsxRuntime.jsx(reactAriaComponents.Label,{className:N(qe({size:n})),"data-required":P||void 0,children:p}),jsxRuntime.jsxs(reactAriaComponents.Group,{className:N($e({size:n,isInvalid:c??false}),g&&"pr-0"),children:[r&&!g&&jsxRuntime.jsx(M,{slot:"decrement",variant:"ghost",className:"!min-h-0 !min-w-0",buttonVisualClassName:N(X({size:n,position:"left"})),"aria-label":i??"Decrease value",children:jsxRuntime.jsx(lucideReact.Minus,{className:"h-4 w-4","aria-hidden":"true"})}),jsxRuntime.jsx(reactAriaComponents.Input,{className:N(je({size:n}))}),r&&g&&jsxRuntime.jsxs("div",{className:"flex flex-col h-full",children:[jsxRuntime.jsx(M,{slot:"increment",variant:"ghost",className:"!min-h-0 !min-w-0",buttonVisualClassName:N(X({size:n,position:"top"})),"aria-label":a??"Increase value",children:jsxRuntime.jsx(lucideReact.Plus,{className:"h-3 w-3","aria-hidden":"true"})}),jsxRuntime.jsx(M,{slot:"decrement",variant:"ghost",className:"!min-h-0 !min-w-0",buttonVisualClassName:N(X({size:n,position:"bottom"})),"aria-label":i??"Decrease value",children:jsxRuntime.jsx(lucideReact.Minus,{className:"h-3 w-3","aria-hidden":"true"})})]}),r&&!g&&jsxRuntime.jsx(M,{slot:"increment",variant:"ghost",className:"!min-h-0 !min-w-0",buttonVisualClassName:N(X({size:n,position:"right"})),"aria-label":a??"Increase value",children:jsxRuntime.jsx(lucideReact.Plus,{className:"h-4 w-4","aria-hidden":"true"})})]}),o&&jsxRuntime.jsx(reactAriaComponents.Text,{slot:"description",className:N(Ye({size:n})),children:o}),jsxRuntime.jsx(reactAriaComponents.FieldError,{className:N(We({size:n})),children:f})]})});ae.displayName="NumberField";var he=react.forwardRef(function({isOpen:o,onOpenChange:f,groupLabel:n,leftPanel:l,rightPanel:e,leftSize:a,rightSize:i,onSizesChange:t,presets:s,triggerRef:v,direction:c},P){let[R,h]=react.useState({left:a,right:i}),E=react.useRef(false);react.useEffect(()=>{o&&!E.current&&h({left:a,right:i}),E.current=o;},[o,a,i]);let L=react.useCallback(d=>{if(d===null)return;let u=Math.max(l.collapsible?0:l.minSize,Math.min(l.maxSize,d)),x=100-u,V=e.collapsible?0:e.minSize,T=e.maxSize;x<V||x>T||t(u,x);},[l,e,t]),y=react.useCallback(d=>{if(d===null)return;let u=Math.max(e.collapsible?0:e.minSize,Math.min(e.maxSize,d)),x=100-u,V=l.collapsible?0:l.minSize,T=l.maxSize;x<V||x>T||t(x,u);},[l,e,t]),b=react.useCallback(d=>{let u=d.sizes[0],x=d.sizes[1];u!==void 0&&x!==void 0&&t(u,x);},[t]),r=react.useCallback(()=>{t(R.left,R.right),f(false);},[t,f,R]),g=react.useCallback(()=>{f(false);},[f]);return o?jsxRuntime.jsxs(reactAriaComponents.DialogTrigger,{isOpen:o,onOpenChange:f,children:[jsxRuntime.jsx(reactAriaComponents.Button,{className:"sr-only",children:"Open resize controls"}),jsxRuntime.jsx(reactAriaComponents.Popover,{triggerRef:v,placement:c==="horizontal"?"bottom":"right",offset:8,className:N("w-72","rounded-lg border border-[var(--border)]","bg-[var(--popover)] text-[var(--popover-foreground)]","shadow-lg","outline-none","animate-in fade-in-0 zoom-in-95","data-[exiting]:animate-out data-[exiting]:fade-out-0 data-[exiting]:zoom-out-95"),children:jsxRuntime.jsxs(reactAriaComponents.Dialog,{className:"outline-none",children:[jsxRuntime.jsxs("div",{className:"flex items-center justify-between border-b border-[var(--border)] px-4 py-3",children:[jsxRuntime.jsxs("h3",{className:"text-sm font-medium",children:["Resize: ",n]}),jsxRuntime.jsx(reactAriaComponents.Button,{onPress:g,className:N("inline-flex items-center justify-center rounded-md","min-h-[44px] min-w-[44px]","text-[var(--menu-muted)]","hover:bg-[var(--accent)] hover:text-[var(--accent-foreground)]","focus-visible:outline-none focus-visible:ring-2","focus-visible:ring-[var(--ring)] focus-visible:ring-offset-2"),"aria-label":"Close",children:jsxRuntime.jsx(lucideReact.X,{className:"h-4 w-4"})})]}),jsxRuntime.jsxs("div",{className:"space-y-4 px-4 py-4",children:[jsxRuntime.jsx("div",{children:jsxRuntime.jsx(ae,{label:`${l.name} (%)`,value:Math.round(a),onChange:L,minValue:l.collapsible?0:l.minSize,maxValue:l.maxSize,step:1,stepperLayout:"sides"})}),jsxRuntime.jsx("div",{children:jsxRuntime.jsx(ae,{label:`${e.name} (%)`,value:Math.round(i),onChange:y,minValue:e.collapsible?0:e.minSize,maxValue:e.maxSize,step:1,stepperLayout:"sides"})}),s&&s.length>0&&jsxRuntime.jsxs("div",{className:"border-t border-[var(--border)] pt-4",children:[jsxRuntime.jsx("div",{className:"mb-2 text-xs font-medium text-[var(--menu-muted)]",children:"Presets"}),jsxRuntime.jsx("div",{className:"flex flex-wrap gap-2",children:s.map((d,u)=>jsxRuntime.jsx(M,{variant:"outline",size:"sm",onPress:()=>b(d),children:d.label},u))})]})]}),jsxRuntime.jsx("div",{className:"flex justify-end border-t border-[var(--border)] px-4 py-3",children:jsxRuntime.jsx(M,{variant:"ghost",size:"sm",onPress:r,children:"Cancel"})})]})})]}):null});he.displayName="ResizablePopover";var Qe=react.forwardRef(function({withHandle:o=true,presets:f,disabled:n=false,className:l},e){let{direction:a,groupLabel:i,sizes:t,setSizes:s,panels:v,announce:c,containerRef:P}=W(),R=react.useRef(null),h=e||R,[E,L]=react.useState(0);react.useEffect(()=>{let D=h.current,_=P.current;if(!D||!_)return;let k=_.querySelectorAll('[role="slider"]'),ze=0;k.forEach((et,tt)=>{et===D&&(ze=tt);}),L(ze);},[P,h]);let y=E,b=E+1,r=v[y],g=v[b],w=t[y]??50,d=t[b]??50,[u,x]=react.useState(false),V=react.useCallback((D,_)=>{let k=[...t];k[y]=D,k[b]=_,s(k);},[t,s,y,b]),{isDragging:T,handlePointerDown:F,handleKeyDown:K}=De({direction:a,sizes:t,setSizes:s,panels:v,containerRef:P,leftPanelIndex:y,rightPanelIndex:b,disabled:n,announce:c,groupLabel:i,onOpenPopover:()=>x(true)}),G=r&&g?`Resize handle between ${r.name} and ${g.name} in ${i}`:`Resize handle in ${i}`,S=a==="horizontal"?lucideReact.GripVertical:lucideReact.GripHorizontal,C=r??{name:"Panel 1",minSize:U,maxSize:$,collapsible:false},I=g??{name:"Panel 2",minSize:U,maxSize:$,collapsible:false};return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("div",{ref:h,role:"slider",tabIndex:n?-1:0,"aria-label":G,"aria-valuenow":Math.round(w),"aria-valuemin":r?.collapsible?0:r?.minSize??0,"aria-valuemax":r?.maxSize??100,"aria-orientation":a,"aria-disabled":n,"data-direction":a,"data-dragging":T,"data-disabled":n,onPointerDown:F,onKeyDown:K,className:N(se({direction:a,disabled:n,isDragging:T}),l),children:o&&jsxRuntime.jsx("div",{className:N(le({direction:a})),"aria-hidden":"true",children:jsxRuntime.jsx(S,{className:"h-4 w-4"})})}),jsxRuntime.jsx(he,{isOpen:u,onOpenChange:x,groupLabel:i,leftPanel:C,rightPanel:I,leftSize:w,rightSize:d,onSizesChange:V,presets:f,triggerRef:h,direction:a})]})});Qe.displayName="ResizableHandle";exports.DEFAULT_MAX_SIZE=$;exports.DEFAULT_MIN_SIZE=U;exports.LONG_PRESS_THRESHOLD=te;exports.ResizableHandle=Qe;exports.ResizableHandlePropsSchema=ct;exports.ResizablePanel=Ve;exports.ResizablePanelGroup=ye;exports.ResizablePanelGroupPropsSchema=lt;exports.ResizablePanelPropsSchema=ut;exports.ResizePresetSchema=Ee;exports.resizableGripVariants=le;exports.resizableHandleVariants=se;exports.useResizableContext=W;//# sourceMappingURL=index.js.map
|
|
2
|
+
'use strict';var react=require('react'),clsx=require('clsx'),tailwindMerge=require('tailwind-merge'),jsxRuntime=require('react/jsx-runtime'),zod=require('zod'),classVarianceAuthority=require('class-variance-authority'),lucideReact=require('lucide-react'),reactAriaComponents=require('react-aria-components');function N(...p){return tailwindMerge.twMerge(clsx.clsx(p))}var ee=react.createContext(null);ee.displayName="ResizableContext";function W(){let p=react.useContext(ee);if(!p)throw new Error("useResizableContext must be used within a ResizablePanelGroup. Make sure ResizablePanel and ResizableHandle are children of ResizablePanelGroup.");return p}function Se({direction:p,groupLabel:o,sizes:f,onSizesChange:n}){let[l,e]=react.useState([]),[a,i]=react.useState([]),t=react.useRef(null),s=react.useRef(null),v=react.useRef(null),c=react.useRef(false),P=f!==void 0,R=P?f:l,g=react.useCallback(b=>{P?n?.(b):e(b);},[P,n]),E=react.useCallback((b,r)=>{i(z=>{let w=[...z];return w[b]=r,w});},[]),L=react.useCallback(b=>{i(r=>{let z=[...r];return delete z[b],z.filter(Boolean)});},[]);react.useEffect(()=>{if(P||c.current)return;let r=a.filter(Boolean).length;if(r<2)return;if(R.length<r||R.some(w=>w===void 0)){let w=[],d=100/r;for(let u=0;u<r;u++)w[u]=d;c.current=true,e(w);}},[a,R,P]),react.useEffect(()=>()=>{v.current&&clearTimeout(v.current),s.current&&(document.body.removeChild(s.current),s.current=null);},[]);let y=react.useCallback(b=>{if(!s.current){let r=document.createElement("div");r.setAttribute("aria-live","polite"),r.setAttribute("aria-atomic","true"),r.className="sr-only",r.style.cssText="position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;",document.body.appendChild(r),s.current=r;}s.current.textContent=b,v.current&&clearTimeout(v.current),v.current=setTimeout(()=>{s.current&&(s.current.textContent="");},1e3);},[]);return {direction:p,groupLabel:o,sizes:R,setSizes:g,panels:a,registerPanel:E,unregisterPanel:L,announce:y,containerRef:t}}var ye=react.forwardRef(function({direction:o,groupLabel:f,sizes:n,onSizesChange:l,className:e,children:a},i){let t=Se({direction:o,groupLabel:f,sizes:n,onSizesChange:l});return react.useImperativeHandle(i,()=>t.containerRef.current,[t.containerRef]),jsxRuntime.jsx(ee.Provider,{value:t,children:jsxRuntime.jsx("div",{ref:t.containerRef,role:"group","aria-label":`${f}, ${o}`,"data-direction":o,className:N("flex h-full w-full",o==="horizontal"?"flex-row":"flex-col",e),children:a})})});ye.displayName="ResizablePanelGroup";var U=10,$=90,te=300,Ee=zod.z.object({label:zod.z.string().min(1),sizes:zod.z.array(zod.z.number().min(0).max(100))}),lt=zod.z.object({direction:zod.z.enum(["horizontal","vertical"]),groupLabel:zod.z.string().min(1),sizes:zod.z.array(zod.z.number().min(0).max(100)).optional(),onSizesChange:zod.z.function().optional(),className:zod.z.string().optional(),children:zod.z.custom()}),ut=zod.z.object({name:zod.z.string().min(1),defaultSize:zod.z.number().min(0).max(100).optional(),minSize:zod.z.number().min(0).max(100).optional().default(U),maxSize:zod.z.number().min(0).max(100).optional().default($),collapsible:zod.z.boolean().optional().default(false),onCollapse:zod.z.function().optional(),onExpand:zod.z.function().optional(),onResize:zod.z.function().optional(),className:zod.z.string().optional(),children:zod.z.custom()}),ct=zod.z.object({withHandle:zod.z.boolean().optional().default(true),presets:zod.z.array(Ee).optional(),disabled:zod.z.boolean().optional().default(false),className:zod.z.string().optional()}),se=classVarianceAuthority.cva(["relative flex items-center justify-center","shrink-0","bg-transparent","transition-colors duration-150","focus-visible:outline-none focus-visible:ring-2","focus-visible:ring-[var(--ring)] focus-visible:ring-offset-2","touch-none select-none"],{variants:{direction:{horizontal:["w-3 min-w-[12px]","cursor-col-resize","hover:bg-[var(--accent)]/50","before:absolute before:inset-y-0 before:-inset-x-4","before:min-w-[44px]"],vertical:["h-3 min-h-[12px]","cursor-row-resize","hover:bg-[var(--accent)]/50","before:absolute before:inset-x-0 before:-inset-y-4","before:min-h-[44px]"]},disabled:{true:"cursor-not-allowed opacity-50 pointer-events-none",false:""},isDragging:{true:"bg-[var(--accent)]",false:""}},defaultVariants:{direction:"horizontal",disabled:false,isDragging:false}}),le=classVarianceAuthority.cva(["flex items-center justify-center","rounded-full","bg-[var(--border)]","text-[var(--menu-muted)]"],{variants:{direction:{horizontal:"h-8 w-1",vertical:"h-1 w-8"}},defaultVariants:{direction:"horizontal"}});var Ve=react.forwardRef(function({name:o,defaultSize:f,minSize:n=U,maxSize:l=$,collapsible:e=false,onCollapse:a,onExpand:i,onResize:t,className:s,children:v},c){let{sizes:P,registerPanel:R,unregisterPanel:g,containerRef:E}=W(),L=react.useRef(null),[y,b]=react.useState(-1),r=react.useRef(null),z=react.useRef(false),w=react.useRef(-1);react.useEffect(()=>{let u=L.current,x=E.current;if(!u||!x)return;let V=x.querySelectorAll("[data-resizable-panel]"),T=-1;for(let F=0;F<V.length;F++)if(V[F]===u){T=F;break}if(T!==-1)return y!==T&&b(T),z.current||(z.current=true,w.current=T,R(T,{name:o,minSize:n,maxSize:l,collapsible:e})),()=>{z.current&&(g(w.current),z.current=false);}},[E,R,g,o,n,l,e,y]);let d=y>=0?P[y]??50:50;return react.useEffect(()=>{if(r.current===null){r.current=d;return}let u=r.current===0,x=d===0;!u&&x&&a?a():u&&!x&&i&&i(),t&&r.current!==d&&t(d),r.current=d;},[d,a,i,t]),jsxRuntime.jsx("div",{ref:u=>{L.current=u,typeof c=="function"?c(u):c&&(c.current=u);},role:"region","aria-label":o,"data-resizable-panel":"","data-panel-name":o,"data-panel-index":y,"data-collapsed":d===0,style:{flexBasis:`${d}%`,flexGrow:0,flexShrink:0,overflow:"hidden"},className:N("relative",s),children:v})});Ve.displayName="ResizablePanel";function Te(p,o,f){return Math.max(o,Math.min(f,p))}function Le(p,o,f,n,l){let e=[...p],a=o[f],i=o[n];if(!a||!i)return p;let t=p[f]??50,s=p[n]??50,v=t+l,c=s-l,P=a.collapsible?0:a.minSize,R=a.maxSize,g=i.collapsible?0:i.minSize,E=i.maxSize;return v=Te(v,P,R),c=t+s-v,c=Te(c,g,E),v=t+s-c,e[f]=v,e[n]=c,e}function De({direction:p,sizes:o,setSizes:f,panels:n,containerRef:l,leftPanelIndex:e,rightPanelIndex:a,disabled:i=false,announce:t,groupLabel:s,onOpenPopover:v}){let[c,P]=react.useState(false),R=react.useRef(null),g=react.useRef(null),E=react.useRef(0),L=react.useRef(false),y=react.useRef(n),b=react.useRef(o),r=react.useRef(f),z=react.useRef(()=>{}),w=react.useRef(()=>{});react.useEffect(()=>{y.current=n,b.current=o,r.current=f;},[n,o,f]);let d=react.useCallback(()=>{let S=l.current;return S?p==="horizontal"?S.offsetWidth:S.offsetHeight:0},[l,p]),u=react.useCallback(S=>{let C=d();return C===0?0:S/C*100},[d]),x=react.useCallback(S=>{z.current(S);},[]),V=react.useCallback(()=>{w.current();},[]),T=react.useCallback(S=>{if(!R.current||i)return;let I=(p==="horizontal"?S.clientX:S.clientY)-R.current.position,D=u(I),_=Le(R.current.sizes,y.current,e,a,D);r.current(_);},[p,i,e,u,a]),F=react.useCallback(()=>{if(g.current&&(clearTimeout(g.current),g.current=null),Date.now()-E.current<te&&!L.current&&v&&!i&&v(),c){P(false);let I=y.current[e],D=Math.round(b.current[e]??50);t&&I&&s&&t(`${I.name} in ${s} resized to ${D} percent`);}R.current=null,L.current=false,document.removeEventListener("pointermove",x),document.removeEventListener("pointerup",V),document.removeEventListener("pointercancel",V),document.body.style.cursor="",document.body.style.userSelect="";},[t,i,s,c,e,v,x,V]);react.useEffect(()=>{z.current=T,w.current=F;});let K=react.useCallback(S=>{if(i)return;S.preventDefault();let C=p==="horizontal"?S.clientX:S.clientY;E.current=Date.now(),L.current=false,R.current={position:C,sizes:[...o],containerSize:d()},g.current=setTimeout(()=>{L.current=true,P(true),document.body.style.cursor=p==="horizontal"?"col-resize":"row-resize",document.body.style.userSelect="none";},te),document.addEventListener("pointermove",x),document.addEventListener("pointerup",V),document.addEventListener("pointercancel",V),S.pointerType==="mouse"&&(g.current&&(clearTimeout(g.current),g.current=null),L.current=true,P(true),document.body.style.cursor=p==="horizontal"?"col-resize":"row-resize",document.body.style.userSelect="none");},[p,i,d,x,V,o]),G=react.useCallback(S=>{if(i)return;let C=S.shiftKey?10:1,I=0;switch(S.key){case "ArrowLeft":case "ArrowUp":I=-C;break;case "ArrowRight":case "ArrowDown":I=C;break;case "Home":{let D=n[e];D&&(I=(D.collapsible?0:D.minSize)-(o[e]??50));break}case "End":{let D=n[e];D&&(I=D.maxSize-(o[e]??50));break}case "Enter":case " ":S.preventDefault(),v?.();return;default:return}if(I!==0){S.preventDefault();let D=Le(o,n,e,a,I);f(D);let _=n[e],k=Math.round(D[e]??50);t&&_&&s&&t(`${_.name} in ${s} resized to ${k} percent`);}},[t,i,s,e,v,n,a,f,o]);return react.useEffect(()=>{let S=x,C=V;return ()=>{g.current&&clearTimeout(g.current),document.removeEventListener("pointermove",S),document.removeEventListener("pointerup",C),document.removeEventListener("pointercancel",C);}},[x,V]),{isDragging:c,handlePointerDown:K,handleKeyDown:G}}var ce=classVarianceAuthority.cva("inline-flex justify-center min-h-[44px] min-w-[44px] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--ring)] focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:pointer-events-none disabled:opacity-50",{variants:{fullWidth:{true:"w-full",false:""},inVerticalGroup:{true:"items-stretch",false:"items-center"}},defaultVariants:{fullWidth:false,inVerticalGroup:false}}),de=classVarianceAuthority.cva("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 relative cursor-pointer",{variants:{variant:{default:"bg-[var(--primary-action)] text-[var(--primary-action-foreground)] shadow-md hover:bg-[var(--primary-action-hover)] data-[pressed]:bg-[var(--primary-action)]/80",destructive:"bg-[var(--destructive-background)] text-[var(--destructive-foreground)] shadow-md hover:bg-[var(--destructive-background)]/90 data-[pressed]:bg-[var(--destructive-background)]/80",outline:"border border-[var(--input-border)] bg-[var(--page-background)] hover:bg-[var(--input-border)] data-[pressed]:bg-[var(--input-border)]",secondary:"bg-[var(--secondary)] text-[var(--secondary-foreground)] shadow-md hover:bg-[var(--secondary)]/80 data-[pressed]:bg-[var(--secondary)]/70",ghost:"hover:bg-[var(--accent)] hover:text-[var(--accent-foreground)] data-[pressed]:bg-[var(--accent)]",link:"text-[var(--text-link)] underline-offset-4 hover:underline data-[pressed]:text-[var(--text-link-hover)]"},fullWidth:{true:"w-full",false:""},visualSize:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3 text-xs",lg:"h-11 rounded-md px-8",icon:"h-10 w-10",dot:"h-5 w-5 rounded-full p-0 min-h-0 min-w-0"},paywall:{true:"!bg-[var(--paywall)] !text-[var(--paywall-foreground)] !shadow-md hover:!bg-[var(--paywall)]/90 !cursor-not-allowed !border-transparent",false:""}},defaultVariants:{variant:"default",visualSize:"default",paywall:false}});var me="data-[pressed]:scale-[0.97]";var pe="data-[hovered]:shadow-md";var re="hc:data-[hovered]:outline hc:data-[hovered]:outline-2 hc:data-[hovered]:outline-foreground",oe="hc:data-[pressed]:outline hc:data-[pressed]:outline-2 hc:data-[pressed]:outline-offset-1 hc:data-[pressed]:outline-foreground";var _e=react.createContext(null);_e.displayName="ButtonGroupContext";function Me(){return react.useContext(_e)}var Fe=react.createContext(null);Fe.displayName="ButtonGroupItemContext";function Ge(){return react.useContext(Fe)}classVarianceAuthority.cva("inline-flex items-center gap-0",{variants:{orientation:{horizontal:"flex-row",vertical:"flex-col w-full"}},defaultVariants:{orientation:"horizontal"}});var Be=classVarianceAuthority.cva("",{variants:{orientation:{horizontal:"min-w-[44px]",vertical:"flex min-h-[44px]"},position:{first:"",middle:"",last:"",only:""}},compoundVariants:[{orientation:"horizontal",position:"first",className:"rounded-r-none border-r-0"},{orientation:"horizontal",position:"middle",className:"rounded-none border-r-0"},{orientation:"horizontal",position:"last",className:"rounded-l-none"},{orientation:"vertical",position:"first",className:"rounded-b-none border-b-0"},{orientation:"vertical",position:"middle",className:"rounded-none border-b-0"},{orientation:"vertical",position:"last",className:"rounded-t-none"}],defaultVariants:{orientation:"horizontal",position:"only"}});classVarianceAuthority.cva("bg-[var(--border)]",{variants:{orientation:{horizontal:"w-px h-6 mx-1",vertical:"h-px w-full my-1"}},defaultVariants:{orientation:"horizontal"}});var M=react.memo(react.forwardRef(({className:p,buttonVisualClassName:o,variant:f,size:n,visualSize:l,fullWidth:e,loading:a=false,loadingText:i="Loading...",shortcut:t,children:s,isDisabled:v,paywall:c=false,paywallRedirect:P,paywallDescription:R,onPress:g,...E},L)=>{let y=react.useId(),b=Me(),r=Ge(),z=f??b?.variant??"default",w=n??b?.size,d=v??b?.isDisabled??false,u=b?.orientation==="vertical",x=e||u,V=r?Be({orientation:b?.orientation??"horizontal",position:r.position}):"",T=l??w??"default";return process.env.NODE_ENV!=="production"&&(T==="dot"||T==="icon")&&!E["aria-label"]&&!s&&console.warn('[Button] visualSize="dot" or "icon" requires aria-label when no visible text is provided (WCAG 1.1.1)'),jsxRuntime.jsx(reactAriaComponents.Button,{ref:L,isDisabled:d||a||void 0,"aria-disabled":c?true:void 0,"aria-describedby":c?y:void 0,onPress:G=>{if(c){P&&window.open(P,"_blank","noopener,noreferrer");return}g?.(G);},className:N(ce({fullWidth:x,inVerticalGroup:u}),p),...E,children:G=>jsxRuntime.jsxs("span",{className:N(de({variant:z,visualSize:T,paywall:c,fullWidth:x}),V,o,me,pe,re,oe),"data-pressed":G.isPressed||void 0,children:[a&&jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(lucideReact.Loader2,{className:"motion-safe:animate-spin","aria-hidden":"true"}),jsxRuntime.jsx("span",{className:"sr-only","aria-live":"polite",children:i})]}),!a&&s,c&&jsxRuntime.jsx(lucideReact.Zap,{"data-testid":"zap-icon","aria-hidden":"true",className:"ml-1"}),c&&jsxRuntime.jsxs("span",{id:y,className:"sr-only",children:["Premium feature: ",R||"Upgrade required to access this feature"]}),G.isFocusVisible&&t&&jsxRuntime.jsx("kbd",{className:"ml-auto hidden text-xs opacity-60 lg:inline",children:t}),G.isPressed&&jsxRuntime.jsx("span",{className:"absolute inset-0 rounded-[inherit] bg-current opacity-10 motion-safe:animate-in motion-safe:zoom-in-95","aria-hidden":"true"})]})})}));M.displayName="Button";var Oe=4294967295,ke=0,Ue=-2147483647;zod.z.object({value:zod.z.number().nullable().optional(),defaultValue:zod.z.number().optional(),minValue:zod.z.number().optional(),maxValue:zod.z.number().optional(),allowNegative:zod.z.boolean().optional(),step:zod.z.number().positive().optional(),formatOptions:zod.z.custom().optional(),isDisabled:zod.z.boolean().optional(),isReadOnly:zod.z.boolean().optional(),isRequired:zod.z.boolean().optional(),isInvalid:zod.z.boolean().optional(),isWheelDisabled: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(),stepperLayout:zod.z.enum(["sides","stacked","hidden"]).default("sides"),incrementAriaLabel:zod.z.string().optional(),decrementAriaLabel:zod.z.string().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(),autoFocus:zod.z.boolean().optional()});var $e=classVarianceAuthority.cva(["inline-flex items-center rounded-md border","bg-[var(--content-background)] text-[var(--content-foreground)]","transition-colors duration-200","focus-within:ring-2 focus-within:ring-[var(--ring)] focus-within:ring-offset-2","data-[disabled]:cursor-not-allowed data-[disabled]:opacity-50"],{variants:{size:{sm:"h-9 text-sm",default:"h-10 text-base",lg:"h-12 text-lg"},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}}),je=classVarianceAuthority.cva(["flex-1 bg-transparent text-center tabular-nums","min-w-0","focus:outline-none","[appearance:textfield]","[&::-webkit-outer-spin-button]:appearance-none","[&::-webkit-inner-spin-button]:appearance-none"],{variants:{size:{sm:"px-2 text-sm",default:"px-3 text-base",lg:"px-4 text-lg"}},defaultVariants:{size:"default"}}),X=classVarianceAuthority.cva(["flex items-center justify-center","transition-colors duration-150","select-none","hover:bg-[var(--accent)] hover:text-[var(--accent-foreground)]","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--ring)]","focus-visible:ring-inset","active:bg-[var(--accent)]/80","disabled:pointer-events-none disabled:opacity-50"],{variants:{size:{sm:"min-w-8 min-h-8 text-sm",default:"min-w-10 min-h-10 text-base",lg:"min-w-12 min-h-12 text-lg"},position:{left:"rounded-l-md border-r border-[var(--input-border)]",right:"rounded-r-md border-l border-[var(--input-border)]",top:"rounded-tr-md border-b border-l border-[var(--input-border)] h-1/2",bottom:"rounded-br-md border-l border-[var(--input-border)] h-1/2"}},defaultVariants:{size:"default"}}),qe=classVarianceAuthority.cva(["block font-medium text-[var(--content-foreground)]","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"}}),Ye=classVarianceAuthority.cva(["text-[var(--menu-muted)]","mt-1"],{variants:{size:{sm:"text-xs",default:"text-sm",lg:"text-base"}},defaultVariants:{size:"default"}}),We=classVarianceAuthority.cva(["flex items-center gap-1","text-[var(--destructive-background)]","mt-1"],{variants:{size:{sm:"text-xs",default:"text-sm",lg:"text-base"}},defaultVariants:{size:"default"}});var ae=react.forwardRef(({label:p,description:o,errorMessage:f,size:n="default",stepperLayout:l="sides",allowNegative:e=false,incrementAriaLabel:a,decrementAriaLabel:i,minValue:t,maxValue:s,className:v,isInvalid:c,isRequired:P,isDisabled:R,isReadOnly:g,...E},L)=>{let y=t??(e?Ue:ke),b=s??Oe,r=l!=="hidden"&&!g,z=l==="stacked";return jsxRuntime.jsxs(reactAriaComponents.NumberField,{ref:L,className:N("group flex flex-col",v),minValue:y,maxValue:b,isInvalid:c,isRequired:P,isDisabled:R,isReadOnly:g,...E,children:[jsxRuntime.jsx(reactAriaComponents.Label,{className:N(qe({size:n})),"data-required":P||void 0,children:p}),jsxRuntime.jsxs(reactAriaComponents.Group,{className:N($e({size:n,isInvalid:c??false}),z&&"pr-0"),children:[r&&!z&&jsxRuntime.jsx(M,{slot:"decrement",variant:"ghost",className:"!min-h-0 !min-w-0",buttonVisualClassName:N(X({size:n,position:"left"})),"aria-label":i??"Decrease value",children:jsxRuntime.jsx(lucideReact.Minus,{className:"h-4 w-4","aria-hidden":"true"})}),jsxRuntime.jsx(reactAriaComponents.Input,{className:N(je({size:n}))}),r&&z&&jsxRuntime.jsxs("div",{className:"flex flex-col h-full",children:[jsxRuntime.jsx(M,{slot:"increment",variant:"ghost",className:"!min-h-0 !min-w-0",buttonVisualClassName:N(X({size:n,position:"top"})),"aria-label":a??"Increase value",children:jsxRuntime.jsx(lucideReact.Plus,{className:"h-3 w-3","aria-hidden":"true"})}),jsxRuntime.jsx(M,{slot:"decrement",variant:"ghost",className:"!min-h-0 !min-w-0",buttonVisualClassName:N(X({size:n,position:"bottom"})),"aria-label":i??"Decrease value",children:jsxRuntime.jsx(lucideReact.Minus,{className:"h-3 w-3","aria-hidden":"true"})})]}),r&&!z&&jsxRuntime.jsx(M,{slot:"increment",variant:"ghost",className:"!min-h-0 !min-w-0",buttonVisualClassName:N(X({size:n,position:"right"})),"aria-label":a??"Increase value",children:jsxRuntime.jsx(lucideReact.Plus,{className:"h-4 w-4","aria-hidden":"true"})})]}),o&&jsxRuntime.jsx(reactAriaComponents.Text,{slot:"description",className:N(Ye({size:n})),children:o}),jsxRuntime.jsx(reactAriaComponents.FieldError,{className:N(We({size:n})),children:f})]})});ae.displayName="NumberField";var ge=react.forwardRef(function({isOpen:o,onOpenChange:f,groupLabel:n,leftPanel:l,rightPanel:e,leftSize:a,rightSize:i,onSizesChange:t,presets:s,triggerRef:v,direction:c},P){let[R,g]=react.useState({left:a,right:i}),E=react.useRef(false);react.useEffect(()=>{o&&!E.current&&g({left:a,right:i}),E.current=o;},[o,a,i]);let L=react.useCallback(d=>{if(d===null)return;let u=Math.max(l.collapsible?0:l.minSize,Math.min(l.maxSize,d)),x=100-u,V=e.collapsible?0:e.minSize,T=e.maxSize;x<V||x>T||t(u,x);},[l,e,t]),y=react.useCallback(d=>{if(d===null)return;let u=Math.max(e.collapsible?0:e.minSize,Math.min(e.maxSize,d)),x=100-u,V=l.collapsible?0:l.minSize,T=l.maxSize;x<V||x>T||t(x,u);},[l,e,t]),b=react.useCallback(d=>{let u=d.sizes[0],x=d.sizes[1];u!==void 0&&x!==void 0&&t(u,x);},[t]),r=react.useCallback(()=>{t(R.left,R.right),f(false);},[t,f,R]),z=react.useCallback(()=>{f(false);},[f]);return o?jsxRuntime.jsxs(reactAriaComponents.DialogTrigger,{isOpen:o,onOpenChange:f,children:[jsxRuntime.jsx(reactAriaComponents.Button,{className:"sr-only",children:"Open resize controls"}),jsxRuntime.jsx(reactAriaComponents.Popover,{triggerRef:v,placement:c==="horizontal"?"bottom":"right",offset:8,className:N("w-72","rounded-lg border border-[var(--border)]","bg-[var(--content-background)] text-[var(--content-foreground)]","shadow-lg","outline-none","animate-in fade-in-0 zoom-in-95","data-[exiting]:animate-out data-[exiting]:fade-out-0 data-[exiting]:zoom-out-95"),children:jsxRuntime.jsxs(reactAriaComponents.Dialog,{className:"outline-none",children:[jsxRuntime.jsxs("div",{className:"flex items-center justify-between border-b border-[var(--border)] px-4 py-3",children:[jsxRuntime.jsxs("h3",{className:"text-sm font-medium",children:["Resize: ",n]}),jsxRuntime.jsx(reactAriaComponents.Button,{onPress:z,className:N("inline-flex items-center justify-center rounded-md","min-h-[44px] min-w-[44px]","text-[var(--menu-muted)]","hover:bg-[var(--accent)] hover:text-[var(--accent-foreground)]","focus-visible:outline-none focus-visible:ring-2","focus-visible:ring-[var(--ring)] focus-visible:ring-offset-2"),"aria-label":"Close",children:jsxRuntime.jsx(lucideReact.X,{className:"h-4 w-4"})})]}),jsxRuntime.jsxs("div",{className:"space-y-4 px-4 py-4",children:[jsxRuntime.jsx("div",{children:jsxRuntime.jsx(ae,{label:`${l.name} (%)`,value:Math.round(a),onChange:L,minValue:l.collapsible?0:l.minSize,maxValue:l.maxSize,step:1,stepperLayout:"sides"})}),jsxRuntime.jsx("div",{children:jsxRuntime.jsx(ae,{label:`${e.name} (%)`,value:Math.round(i),onChange:y,minValue:e.collapsible?0:e.minSize,maxValue:e.maxSize,step:1,stepperLayout:"sides"})}),s&&s.length>0&&jsxRuntime.jsxs("div",{className:"border-t border-[var(--border)] pt-4",children:[jsxRuntime.jsx("div",{className:"mb-2 text-xs font-medium text-[var(--menu-muted)]",children:"Presets"}),jsxRuntime.jsx("div",{className:"flex flex-wrap gap-2",children:s.map((d,u)=>jsxRuntime.jsx(M,{variant:"outline",size:"sm",onPress:()=>b(d),children:d.label},u))})]})]}),jsxRuntime.jsx("div",{className:"flex justify-end border-t border-[var(--border)] px-4 py-3",children:jsxRuntime.jsx(M,{variant:"ghost",size:"sm",onPress:r,children:"Cancel"})})]})})]}):null});ge.displayName="ResizablePopover";var Qe=react.forwardRef(function({withHandle:o=true,presets:f,disabled:n=false,className:l},e){let{direction:a,groupLabel:i,sizes:t,setSizes:s,panels:v,announce:c,containerRef:P}=W(),R=react.useRef(null),g=e||R,[E,L]=react.useState(0);react.useEffect(()=>{let D=g.current,_=P.current;if(!D||!_)return;let k=_.querySelectorAll('[role="slider"]'),he=0;k.forEach((et,tt)=>{et===D&&(he=tt);}),L(he);},[P,g]);let y=E,b=E+1,r=v[y],z=v[b],w=t[y]??50,d=t[b]??50,[u,x]=react.useState(false),V=react.useCallback((D,_)=>{let k=[...t];k[y]=D,k[b]=_,s(k);},[t,s,y,b]),{isDragging:T,handlePointerDown:F,handleKeyDown:K}=De({direction:a,sizes:t,setSizes:s,panels:v,containerRef:P,leftPanelIndex:y,rightPanelIndex:b,disabled:n,announce:c,groupLabel:i,onOpenPopover:()=>x(true)}),G=r&&z?`Resize handle between ${r.name} and ${z.name} in ${i}`:`Resize handle in ${i}`,S=a==="horizontal"?lucideReact.GripVertical:lucideReact.GripHorizontal,C=r??{name:"Panel 1",minSize:U,maxSize:$,collapsible:false},I=z??{name:"Panel 2",minSize:U,maxSize:$,collapsible:false};return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("div",{ref:g,role:"slider",tabIndex:n?-1:0,"aria-label":G,"aria-valuenow":Math.round(w),"aria-valuemin":r?.collapsible?0:r?.minSize??0,"aria-valuemax":r?.maxSize??100,"aria-orientation":a,"aria-disabled":n,"data-direction":a,"data-dragging":T,"data-disabled":n,onPointerDown:F,onKeyDown:K,className:N(se({direction:a,disabled:n,isDragging:T}),l),children:o&&jsxRuntime.jsx("div",{className:N(le({direction:a})),"aria-hidden":"true",children:jsxRuntime.jsx(S,{className:"h-4 w-4"})})}),jsxRuntime.jsx(ge,{isOpen:u,onOpenChange:x,groupLabel:i,leftPanel:C,rightPanel:I,leftSize:w,rightSize:d,onSizesChange:V,presets:f,triggerRef:g,direction:a})]})});Qe.displayName="ResizableHandle";exports.DEFAULT_MAX_SIZE=$;exports.DEFAULT_MIN_SIZE=U;exports.LONG_PRESS_THRESHOLD=te;exports.ResizableHandle=Qe;exports.ResizableHandlePropsSchema=ct;exports.ResizablePanel=Ve;exports.ResizablePanelGroup=ye;exports.ResizablePanelGroupPropsSchema=lt;exports.ResizablePanelPropsSchema=ut;exports.ResizePresetSchema=Ee;exports.resizableGripVariants=le;exports.resizableHandleVariants=se;exports.useResizableContext=W;//# sourceMappingURL=index.js.map
|
|
3
3
|
//# sourceMappingURL=index.js.map
|