@fabio.caffarello/react-design-system 4.7.0 → 4.9.0
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/granular/index.js +405 -403
- package/dist/granular/index.js.map +1 -1
- package/dist/granular/ui/components/EmptyState/EmptyState.js +52 -50
- package/dist/granular/ui/components/EmptyState/EmptyState.js.map +1 -1
- package/dist/granular/ui/primitives/Avatar/Avatar.js.map +1 -1
- package/dist/granular/ui/primitives/Avatar/AvatarBase.js +122 -0
- package/dist/granular/ui/primitives/Avatar/AvatarBase.js.map +1 -0
- package/dist/granular/ui/primitives/Tooltip/Tooltip.js +140 -117
- package/dist/granular/ui/primitives/Tooltip/Tooltip.js.map +1 -1
- package/dist/index.cjs +86 -86
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +3054 -2936
- package/dist/index.js.map +1 -1
- package/dist/react-design-system.css +1 -1
- package/dist/server/index.cjs +8 -8
- package/dist/server/index.cjs.map +1 -1
- package/dist/server/index.js +534 -381
- package/dist/server/index.js.map +1 -1
- package/dist/ui/components/EmptyState/EmptyState.d.ts +24 -2
- package/dist/ui/components/EmptyState/EmptyStateBase.d.ts +52 -0
- package/dist/ui/components/EmptyState/index.d.ts +2 -0
- package/dist/ui/primitives/Avatar/Avatar.d.ts +2 -1
- package/dist/ui/primitives/Avatar/AvatarBase.d.ts +63 -0
- package/dist/ui/primitives/Avatar/index.d.ts +2 -0
- package/dist/ui/primitives/Tooltip/Tooltip.d.ts +31 -2
- package/dist/ui/server.d.ts +4 -0
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","sources":["../../src/ui/tokens/radius.ts","../../src/ui/tokens/spacing.ts","../../src/ui/tokens/typography.ts","../../src/ui/utils/cn.ts","../../src/ui/utils/cva.ts","../../src/ui/primitives/Badge/Badge.tsx","../../node_modules/@radix-ui/react-compose-refs/dist/index.mjs","../../node_modules/@radix-ui/react-slot/dist/index.mjs","../../src/ui/primitives/Spinner/Spinner.tsx","../../src/ui/primitives/Button/Button.tsx","../../src/ui/primitives/Chip/Chip.tsx","../../src/ui/primitives/DataBadge/DataBadge.tsx","../../src/ui/primitives/ErrorMessage/ErrorMessage.tsx","../../src/ui/primitives/Info/Info.tsx","../../src/ui/primitives/Input/InputBase.tsx","../../src/ui/primitives/Label/Label.tsx","../../src/ui/tokens/shadows.ts","../../src/ui/primitives/Progress/Progress.tsx","../../src/ui/primitives/Separator/Separator.tsx","../../src/ui/primitives/Skeleton/Skeleton.tsx","../../src/ui/primitives/Text/Text.tsx","../../src/ui/layouts/Container/Container.tsx","../../src/ui/layouts/Stack/Stack.tsx","../../src/ui/components/Breadcrumb/Breadcrumb.tsx","../../src/ui/components/Card/CardHeader.tsx","../../src/ui/components/Card/CardTitle.tsx","../../src/ui/components/Card/CardSubtitle.tsx","../../src/ui/components/Card/CardActions.tsx","../../src/ui/components/Card/CardBody.tsx","../../src/ui/components/Card/Card.tsx","../../src/ui/components/Dialog/DialogHeader.tsx","../../src/ui/components/Dialog/DialogFooter.tsx","../../src/ui/components/Drawer/DrawerHeader.tsx","../../src/ui/components/Drawer/DrawerFooter.tsx","../../src/ui/components/FilterChips/FilterChips.tsx","../../src/ui/components/Header/components/HeaderActions.tsx","../../src/ui/components/Header/components/HeaderNavigation.tsx","../../src/ui/components/HeroSection/HeroSection.tsx","../../src/ui/components/Menu/MenuSeparator.tsx","../../src/ui/components/SideNavbar/components/Navbar/NavbarSeparator.tsx","../../src/ui/components/PageHeader/PageHeader.tsx","../../src/ui/components/Stat/Stat.tsx","../../src/ui/components/Stat/StatGroup.tsx","../../src/ui/components/Table/TableCell.tsx","../../src/ui/components/TabsAsLinks/TabsAsLinks.tsx","../../src/ui/components/Timeline/Timeline.tsx"],"sourcesContent":["/**\n * Border Radius Tokens\n *\n * Centralized border radius system for consistent rounded corners.\n * Uses Factory Pattern for type-safe token creation.\n */\n\nexport type RadiusSize =\n | \"none\"\n | \"sm\"\n | \"md\"\n | \"lg\"\n | \"xl\"\n | \"2xl\"\n | \"3xl\"\n | \"full\";\n\nexport interface RadiusToken {\n value: number;\n rem: string;\n px: string;\n tailwind: string;\n description: string;\n}\n\n/**\n * Radius Token Factory\n * Creates radius tokens with consistent values\n */\nexport class RadiusTokenFactory {\n /**\n * Create a radius token\n */\n static create(size: RadiusSize): RadiusToken {\n const radiusMap: Record<\n RadiusSize,\n { px: number; tailwind: string; description: string }\n > = {\n none: {\n px: 0,\n tailwind: \"rounded-none\",\n description: \"No border radius\",\n },\n sm: {\n px: 2,\n tailwind: \"rounded-sm\",\n description: \"Small radius (2px) for subtle rounding\",\n },\n md: {\n px: 6,\n tailwind: \"rounded-md\",\n description: \"Medium radius (6px) for buttons and inputs\",\n },\n lg: {\n px: 8,\n tailwind: \"rounded-lg\",\n description: \"Large radius (8px) for cards and containers\",\n },\n xl: {\n px: 12,\n tailwind: \"rounded-xl\",\n description: \"Extra large radius (12px) for prominent elements\",\n },\n \"2xl\": {\n px: 16,\n tailwind: \"rounded-2xl\",\n description: \"2X large radius (16px) for large containers\",\n },\n \"3xl\": {\n px: 24,\n tailwind: \"rounded-3xl\",\n description: \"3X large radius (24px) for very large containers\",\n },\n full: {\n px: 9999,\n tailwind: \"rounded-full\",\n description: \"Full radius for circular elements\",\n },\n };\n\n const config = radiusMap[size];\n return {\n value: config.px,\n rem: `${config.px / 16}rem`,\n px: `${config.px}px`,\n tailwind: config.tailwind,\n description: config.description,\n };\n }\n}\n\n/**\n * Pre-defined radius tokens\n */\nexport const RADIUS_TOKENS = {\n none: RadiusTokenFactory.create(\"none\"),\n sm: RadiusTokenFactory.create(\"sm\"),\n md: RadiusTokenFactory.create(\"md\"),\n lg: RadiusTokenFactory.create(\"lg\"),\n xl: RadiusTokenFactory.create(\"xl\"),\n \"2xl\": RadiusTokenFactory.create(\"2xl\"),\n \"3xl\": RadiusTokenFactory.create(\"3xl\"),\n full: RadiusTokenFactory.create(\"full\"),\n} as const;\n\n/**\n * Helper function to get radius token\n */\nexport function getRadius(size: keyof typeof RADIUS_TOKENS): RadiusToken {\n return RADIUS_TOKENS[size];\n}\n\n/**\n * Helper function to get radius as Tailwind class\n */\nexport function getRadiusClass(size: keyof typeof RADIUS_TOKENS): string {\n return RADIUS_TOKENS[size].tailwind;\n}\n","/**\n * Spacing Tokens\n *\n * Centralized spacing scale based on 4px base unit.\n * Uses Factory Pattern for type-safe token creation.\n */\n\nexport type SpacingScale =\n | 0\n | 0.5\n | 1\n | 1.5\n | 2\n | 2.5\n | 3\n | 3.5\n | 4\n | 5\n | 6\n | 8\n | 10\n | 12\n | 16\n | 20\n | 24\n | 32\n | 40\n | 48\n | 64\n | 80\n | 96;\n\nexport interface SpacingToken {\n value: number;\n rem: string;\n px: string;\n tailwind: string;\n}\n\n/**\n * Spacing Token Factory\n * Creates spacing tokens with consistent naming and values\n */\nexport class SpacingTokenFactory {\n private static readonly BASE_UNIT = 4; // 4px base\n\n /**\n * Create a spacing token from scale value\n */\n static create(scale: SpacingScale): SpacingToken {\n const px = scale * this.BASE_UNIT;\n const rem = px / 16; // 16px = 1rem\n\n return {\n value: px,\n rem: `${rem}rem`,\n px: `${px}px`,\n tailwind: this.getTailwindClass(scale),\n };\n }\n\n /**\n * Get Tailwind class for spacing value\n */\n private static getTailwindClass(scale: SpacingScale): string {\n const tailwindMap: Record<SpacingScale, string> = {\n 0: \"0\",\n 0.5: \"0.5\", // 2px — half-step, used by fine UI (badges, switches, separators)\n 1: \"1\", // 4px\n 1.5: \"1.5\", // 6px — half-step\n 2: \"2\", // 8px\n 2.5: \"2.5\", // 10px — half-step\n 3: \"3\", // 12px\n 3.5: \"3.5\", // 14px — half-step\n 4: \"4\", // 16px\n 5: \"5\", // 20px\n 6: \"6\", // 24px\n 8: \"8\", // 32px\n 10: \"10\", // 40px\n 12: \"12\", // 48px\n 16: \"16\", // 64px\n 20: \"20\", // 80px\n 24: \"24\", // 96px\n 32: \"32\", // 128px\n 40: \"40\", // 160px\n 48: \"48\", // 192px\n 64: \"64\", // 256px\n 80: \"80\", // 320px\n 96: \"96\", // 384px\n };\n\n return tailwindMap[scale] || String(scale);\n }\n}\n\n/**\n * Pre-defined spacing tokens\n */\nexport const SPACING_TOKENS = {\n // Micro spacing (0-14px)\n none: SpacingTokenFactory.create(0),\n \"0.5\": SpacingTokenFactory.create(0.5), // 2px (half-step)\n xs: SpacingTokenFactory.create(1), // 4px\n \"1.5\": SpacingTokenFactory.create(1.5), // 6px (half-step)\n sm: SpacingTokenFactory.create(2), // 8px\n \"2.5\": SpacingTokenFactory.create(2.5), // 10px (half-step)\n md: SpacingTokenFactory.create(3), // 12px\n \"3.5\": SpacingTokenFactory.create(3.5), // 14px (half-step)\n\n // Standard spacing (16-32px)\n base: SpacingTokenFactory.create(4), // 16px\n lg: SpacingTokenFactory.create(6), // 24px\n xl: SpacingTokenFactory.create(8), // 32px\n\n // Large spacing (40-64px)\n \"2xl\": SpacingTokenFactory.create(10), // 40px\n \"3xl\": SpacingTokenFactory.create(12), // 48px\n \"4xl\": SpacingTokenFactory.create(16), // 64px\n\n // Extra large spacing (80px+)\n \"5xl\": SpacingTokenFactory.create(20), // 80px\n \"6xl\": SpacingTokenFactory.create(24), // 96px\n} as const;\n\n/**\n * Helper function to get spacing value\n */\nexport function getSpacing(scale: keyof typeof SPACING_TOKENS): SpacingToken {\n return SPACING_TOKENS[scale];\n}\n\n/**\n * Helper function to get spacing as Tailwind class\n */\nexport function getSpacingClass(\n scale: keyof typeof SPACING_TOKENS,\n direction:\n | \"p\"\n | \"m\"\n | \"px\"\n | \"mx\"\n | \"py\"\n | \"my\"\n | \"pt\"\n | \"mt\"\n | \"pr\"\n | \"mr\"\n | \"pb\"\n | \"mb\"\n | \"pl\"\n | \"ml\"\n | \"gap\"\n | \"gap-x\"\n | \"gap-y\"\n | \"space-x\"\n | \"space-y\" = \"p\",\n): string {\n const token = SPACING_TOKENS[scale];\n const value = token.tailwind;\n\n const prefixMap: Record<string, string> = {\n p: \"p\",\n m: \"m\",\n px: \"px\",\n mx: \"mx\",\n py: \"py\",\n my: \"my\",\n pt: \"pt\",\n mt: \"mt\",\n pr: \"pr\",\n mr: \"mr\",\n pb: \"pb\",\n mb: \"mb\",\n pl: \"pl\",\n ml: \"ml\",\n gap: \"gap\",\n \"gap-x\": \"gap-x\",\n \"gap-y\": \"gap-y\",\n \"space-x\": \"space-x\",\n \"space-y\": \"space-y\",\n };\n\n return `${prefixMap[direction]}-${value}`;\n}\n","/**\n * Typography Tokens\n *\n * Centralized typography system with font families, sizes, weights, and line heights.\n * Uses Factory Pattern for type-safe token creation.\n */\n\nexport type FontFamily = \"sans\" | \"serif\" | \"mono\";\nexport type FontWeight = \"light\" | \"normal\" | \"medium\" | \"semibold\" | \"bold\";\nexport type FontSize =\n | \"2xs\"\n | \"xs\"\n | \"sm\"\n | \"base\"\n | \"lg\"\n | \"xl\"\n | \"2xl\"\n | \"3xl\"\n | \"4xl\"\n | \"5xl\"\n | \"6xl\";\nexport type LineHeight =\n | \"none\"\n | \"tight\"\n | \"snug\"\n | \"normal\"\n | \"relaxed\"\n | \"loose\";\n\nexport interface TypographyToken {\n fontSize: {\n value: number;\n rem: string;\n px: string;\n tailwind: string;\n };\n lineHeight: {\n value: number;\n tailwind: string;\n };\n fontWeight: {\n value: number;\n tailwind: string;\n };\n}\n\nexport interface FontFamilyToken {\n name: string;\n stack: string;\n tailwind: string;\n}\n\nexport interface FontWeightToken {\n value: number;\n tailwind: string;\n}\n\n/**\n * Typography Token Factory\n * Creates typography tokens with consistent values\n */\nexport class TypographyTokenFactory {\n /**\n * Create font size token\n */\n static createFontSize(size: FontSize): TypographyToken[\"fontSize\"] {\n const sizeMap: Record<FontSize, { px: number; tailwind: string }> = {\n \"2xs\": { px: 10, tailwind: \"text-2xs\" }, // micro-text (badge counters, mini chips)\n xs: { px: 12, tailwind: \"text-xs\" },\n sm: { px: 14, tailwind: \"text-sm\" },\n base: { px: 16, tailwind: \"text-base\" },\n lg: { px: 18, tailwind: \"text-lg\" },\n xl: { px: 20, tailwind: \"text-xl\" },\n \"2xl\": { px: 24, tailwind: \"text-2xl\" },\n \"3xl\": { px: 30, tailwind: \"text-3xl\" },\n \"4xl\": { px: 36, tailwind: \"text-4xl\" },\n \"5xl\": { px: 48, tailwind: \"text-5xl\" },\n \"6xl\": { px: 60, tailwind: \"text-6xl\" },\n };\n\n const config = sizeMap[size];\n return {\n value: config.px,\n rem: `${config.px / 16}rem`,\n px: `${config.px}px`,\n tailwind: config.tailwind,\n };\n }\n\n /**\n * Create line height token\n */\n static createLineHeight(height: LineHeight): TypographyToken[\"lineHeight\"] {\n const heightMap: Record<LineHeight, { value: number; tailwind: string }> = {\n none: { value: 1, tailwind: \"leading-none\" },\n tight: { value: 1.25, tailwind: \"leading-tight\" },\n snug: { value: 1.375, tailwind: \"leading-snug\" },\n normal: { value: 1.5, tailwind: \"leading-normal\" },\n relaxed: { value: 1.625, tailwind: \"leading-relaxed\" },\n loose: { value: 2, tailwind: \"leading-loose\" },\n };\n\n const config = heightMap[height];\n return {\n value: config.value,\n tailwind: config.tailwind,\n };\n }\n\n /**\n * Create font weight token\n */\n static createFontWeight(weight: FontWeight): FontWeightToken {\n const weightMap: Record<FontWeight, { value: number; tailwind: string }> = {\n light: { value: 300, tailwind: \"font-light\" },\n normal: { value: 400, tailwind: \"font-normal\" },\n medium: { value: 500, tailwind: \"font-medium\" },\n semibold: { value: 600, tailwind: \"font-semibold\" },\n bold: { value: 700, tailwind: \"font-bold\" },\n };\n\n const config = weightMap[weight];\n return {\n value: config.value,\n tailwind: config.tailwind,\n };\n }\n\n /**\n * Create complete typography token\n */\n static create(\n size: FontSize,\n lineHeight: LineHeight = \"normal\",\n weight: FontWeight = \"normal\",\n ): TypographyToken {\n return {\n fontSize: this.createFontSize(size),\n lineHeight: this.createLineHeight(lineHeight),\n fontWeight: this.createFontWeight(weight),\n };\n }\n}\n\n/**\n * Font family tokens\n */\nexport const FONT_FAMILY_TOKENS: Record<FontFamily, FontFamilyToken> = {\n sans: {\n name: \"sans\",\n stack:\n 'ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, \"Helvetica Neue\", Arial, \"Noto Sans\", sans-serif',\n tailwind: \"font-sans\",\n },\n serif: {\n name: \"serif\",\n stack: 'ui-serif, Georgia, Cambria, \"Times New Roman\", Times, serif',\n tailwind: \"font-serif\",\n },\n mono: {\n name: \"mono\",\n stack:\n 'ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, \"Liberation Mono\", \"Courier New\", monospace',\n tailwind: \"font-mono\",\n },\n} as const;\n\n/**\n * Font weight tokens\n */\nexport const FONT_WEIGHT_TOKENS: Record<FontWeight, FontWeightToken> = {\n light: TypographyTokenFactory.createFontWeight(\"light\"),\n normal: TypographyTokenFactory.createFontWeight(\"normal\"),\n medium: TypographyTokenFactory.createFontWeight(\"medium\"),\n semibold: TypographyTokenFactory.createFontWeight(\"semibold\"),\n bold: TypographyTokenFactory.createFontWeight(\"bold\"),\n} as const;\n\n/**\n * Pre-defined typography tokens for common use cases\n */\nexport const TYPOGRAPHY_TOKENS = {\n // Headings\n h1: TypographyTokenFactory.create(\"4xl\", \"tight\", \"bold\"),\n h2: TypographyTokenFactory.create(\"3xl\", \"tight\", \"bold\"),\n h3: TypographyTokenFactory.create(\"2xl\", \"snug\", \"semibold\"),\n h4: TypographyTokenFactory.create(\"xl\", \"snug\", \"semibold\"),\n h5: TypographyTokenFactory.create(\"lg\", \"normal\", \"medium\"),\n h6: TypographyTokenFactory.create(\"base\", \"normal\", \"medium\"),\n\n // Body text\n body: TypographyTokenFactory.create(\"base\", \"relaxed\", \"normal\"),\n bodySmall: TypographyTokenFactory.create(\"sm\", \"relaxed\", \"normal\"),\n bodyLarge: TypographyTokenFactory.create(\"lg\", \"relaxed\", \"normal\"),\n\n // UI elements\n label: TypographyTokenFactory.create(\"sm\", \"normal\", \"medium\"),\n caption: TypographyTokenFactory.create(\"xs\", \"normal\", \"normal\"),\n button: TypographyTokenFactory.create(\"base\", \"normal\", \"medium\"),\n} as const;\n\n/**\n * Helper function to get typography token\n */\nexport function getTypography(\n variant: keyof typeof TYPOGRAPHY_TOKENS,\n): TypographyToken {\n return TYPOGRAPHY_TOKENS[variant];\n}\n\n/**\n * Helper function to get typography classes as string\n */\nexport function getTypographyClasses(\n variant: keyof typeof TYPOGRAPHY_TOKENS,\n): string {\n const token = TYPOGRAPHY_TOKENS[variant];\n return `${token.fontSize.tailwind} ${token.lineHeight.tailwind} ${token.fontWeight.tailwind}`;\n}\n\n/**\n * Helper function to get only font size class\n */\nexport function getTypographySize(\n variant: keyof typeof TYPOGRAPHY_TOKENS,\n): string {\n return TYPOGRAPHY_TOKENS[variant].fontSize.tailwind;\n}\n\n/**\n * Helper function to get font size class directly from FontSize\n * This is a convenience function for when you just need a size, not a full typography variant\n */\nexport function getTypographySizeFromFontSize(size: FontSize): string {\n return TypographyTokenFactory.createFontSize(size).tailwind;\n}\n\n/**\n * Helper function to get only font weight class\n */\nexport function getTypographyWeight(\n variant: keyof typeof TYPOGRAPHY_TOKENS,\n): string {\n return TYPOGRAPHY_TOKENS[variant].fontWeight.tailwind;\n}\n\n/**\n * Helper function to get font weight class directly from FontWeight\n * This is a convenience function for when you just need a weight, not a full typography variant\n */\nexport function getTypographyWeightFromFontWeight(weight: FontWeight): string {\n return TypographyTokenFactory.createFontWeight(weight).tailwind;\n}\n\n/**\n * Helper function to get only line height class\n */\nexport function getTypographyLineHeight(\n variant: keyof typeof TYPOGRAPHY_TOKENS,\n): string {\n return TYPOGRAPHY_TOKENS[variant].lineHeight.tailwind;\n}\n","/**\n * CN Utility - ClassName Merge\n *\n * Utility function for merging classNames with Tailwind conflict resolution.\n * Combines clsx for conditional classes and tailwind-merge for conflict resolution.\n *\n * @example\n * ```tsx\n * cn('base-class', condition && 'conditional-class', className)\n * cn(['class1', 'class2'], { 'class3': true })\n * ```\n */\n\nimport { type ClassValue, clsx } from \"clsx\";\nimport { twMerge } from \"tailwind-merge\";\n\n/**\n * Merges classNames and resolves Tailwind class conflicts.\n *\n * Uses clsx for conditional class handling and tailwind-merge\n * to intelligently merge Tailwind classes, resolving conflicts\n * (e.g., 'p-2' and 'p-4' -> 'p-4').\n *\n * @param inputs - Class values to merge (strings, arrays, objects)\n * @returns Merged className string with conflicts resolved\n *\n * @example\n * ```tsx\n * // Basic usage\n * cn('base-class', 'another-class') // 'base-class another-class'\n *\n * // Conditional classes\n * cn('base', isActive && 'active', className)\n *\n * // Arrays and objects\n * cn(['class1', 'class2'], { 'class3': true, 'class4': false })\n *\n * // Tailwind conflict resolution\n * cn('p-2', 'p-4') // 'p-4' (p-2 is overridden)\n * cn('text-red-500', 'text-blue-500') // 'text-blue-500'\n * ```\n */\nexport function cn(...inputs: ClassValue[]): string {\n return twMerge(clsx(inputs));\n}\n","/**\n * CVA Utility - Class Variance Authority\n *\n * Type-safe utility for creating component variants with compound variants support.\n * Based on class-variance-authority but integrated with our design system.\n *\n * @example\n * ```tsx\n * const buttonVariants = cva('base-class', {\n * variants: {\n * variant: { primary: 'bg-blue-500', secondary: 'bg-gray-500' },\n * size: { sm: 'text-sm', md: 'text-base' }\n * },\n * defaultVariants: { variant: 'primary', size: 'md' }\n * })\n * ```\n */\n\nimport { type VariantProps, cva as cvaLib } from \"class-variance-authority\";\nimport type { ClassValue } from \"clsx\";\nimport { cn } from \"./cn\";\n\n/**\n * Re-export VariantProps for type inference\n */\nexport type { VariantProps };\n\n/**\n * Creates a type-safe variant function with compound variants support.\n *\n * Integrates with our cn() utility for proper Tailwind conflict resolution.\n * This is a thin wrapper around class-variance-authority's cva function\n * that ensures cn() is used for final class merging.\n *\n * @param base - Base classes that always apply\n * @param config - Variant configuration with variants, compoundVariants, and defaultVariants\n * @returns Function that returns className based on variant props\n *\n * @example\n * ```tsx\n * // Simple variants\n * const buttonVariants = cva('base-class', {\n * variants: {\n * variant: {\n * primary: 'bg-blue-500 text-white',\n * secondary: 'bg-gray-500 text-white'\n * },\n * size: {\n * sm: 'px-2 py-1 text-sm',\n * md: 'px-4 py-2 text-base'\n * }\n * },\n * defaultVariants: {\n * variant: 'primary',\n * size: 'md'\n * }\n * });\n *\n * // Usage\n * buttonVariants({ variant: 'primary', size: 'sm' })\n *\n * // Compound variants\n * const badgeVariants = cva('base', {\n * variants: {\n * variant: { success: '', error: '' },\n * style: { solid: '', outline: '' }\n * },\n * compoundVariants: [\n * { variant: 'success', style: 'solid', class: 'bg-green-500' },\n * { variant: 'error', style: 'outline', class: 'border-red-500' }\n * ]\n * });\n * ```\n */\nexport const cva = <T extends Record<string, Record<string, ClassValue>>>(\n base?: ClassValue,\n config?: Parameters<typeof cvaLib<T>>[1],\n) => {\n const variantFn = cvaLib(base, config);\n\n // Wrap to ensure cn() is used for final merge\n return ((props?: Parameters<typeof variantFn>[0]) => {\n const variantClasses = variantFn(props);\n return cn(variantClasses);\n }) as typeof variantFn;\n};\n","import { memo, forwardRef } from \"react\";\nimport type { HTMLAttributes, ReactNode } from \"react\";\nimport { getRadiusClass } from \"../../tokens/radius\";\nimport { getSpacingClass } from \"../../tokens/spacing\";\nimport {\n getTypographySize,\n getTypographyWeight,\n} from \"../../tokens/typography\";\nimport { cn, cva } from \"../../utils\";\n\nexport type BadgeVariant =\n | \"success\"\n | \"warning\"\n | \"error\"\n | \"info\"\n | \"neutral\"\n | \"primary\"\n | \"secondary\";\nexport type BadgeSize = \"sm\" | \"md\" | \"lg\";\nexport type BadgeStyle = \"solid\" | \"outline\";\n\nexport interface BadgeProps extends Omit<\n HTMLAttributes<HTMLSpanElement>,\n \"style\"\n> {\n variant?: BadgeVariant;\n size?: BadgeSize;\n style?: BadgeStyle;\n children: ReactNode;\n \"aria-label\"?: string;\n}\n\n/**\n * Badge Component\n *\n * A versatile badge component for displaying status, priority, and other labels.\n * Uses tokens for consistent theming.\n *\n * @example\n * ```tsx\n * <Badge variant=\"success\">Active</Badge>\n * <Badge variant=\"error\" size=\"lg\">Critical</Badge>\n * <Badge variant=\"info\" style=\"outline\">New</Badge>\n * ```\n */\n// Badge variants using CVA\nconst badgeVariants = cva(\n // Base classes\n cn(\n \"inline-flex\",\n \"items-center\",\n \"justify-center\",\n getTypographyWeight(\"label\"),\n getRadiusClass(\"md\"),\n \"border\",\n ),\n {\n variants: {\n variant: {\n success: \"\",\n warning: \"\",\n error: \"\",\n info: \"\",\n neutral: \"\",\n primary: \"\",\n secondary: \"\",\n },\n size: {\n sm: cn(\n getSpacingClass(\"1.5\", \"px\"),\n getSpacingClass(\"0.5\", \"py\"),\n getTypographySize(\"caption\"),\n ),\n md: cn(\n getSpacingClass(\"sm\", \"px\"),\n getSpacingClass(\"xs\", \"py\"),\n getTypographySize(\"caption\"),\n ),\n lg: cn(\n getSpacingClass(\"sm\", \"px\"),\n getSpacingClass(\"xs\", \"py\"),\n getTypographySize(\"bodySmall\"),\n ),\n },\n style: {\n solid: \"\",\n outline: \"\",\n },\n },\n compoundVariants: [\n // Solid style variants\n {\n variant: \"success\",\n style: \"solid\",\n class: cn(\"bg-success-bg\", \"text-success-dark\", \"border-success\"),\n },\n {\n variant: \"warning\",\n style: \"solid\",\n class: cn(\"bg-warning-bg\", \"text-warning-dark\", \"border-warning\"),\n },\n {\n variant: \"error\",\n style: \"solid\",\n class: cn(\"bg-error-bg\", \"text-error-dark\", \"border-error\"),\n },\n {\n variant: \"info\",\n style: \"solid\",\n class: cn(\"bg-info-bg\", \"text-info-dark\", \"border-info\"),\n },\n {\n variant: \"neutral\",\n style: \"solid\",\n class: cn(\"bg-surface-muted\", \"text-fg-primary\", \"border-line-default\"),\n },\n {\n variant: \"primary\",\n style: \"solid\",\n class: cn(\n \"bg-surface-brand-subtle\",\n \"text-fg-brand-emphasis\",\n \"border-line-brand\",\n ),\n },\n {\n variant: \"secondary\",\n style: \"solid\",\n // bg-pink-300: secondary solid badge — no semantic equivalent\n // (would shift 2 shades to bg-surface-secondary). Kept literal until\n // secondary brand surface palette expands beyond DEFAULT.\n class: cn(\n \"bg-pink-300\",\n \"text-fg-brand-secondary-emphasis\",\n \"border-line-secondary\",\n ),\n },\n // Outline style variants\n {\n variant: \"success\",\n style: \"outline\",\n class: cn(\"bg-transparent\", \"border-success\", \"text-fg-success\"),\n },\n {\n variant: \"warning\",\n style: \"outline\",\n class: cn(\"bg-transparent\", \"border-warning\", \"text-fg-warning\"),\n },\n {\n variant: \"error\",\n style: \"outline\",\n class: cn(\"bg-transparent\", \"border-error\", \"text-fg-error\"),\n },\n {\n variant: \"info\",\n style: \"outline\",\n class: cn(\"bg-transparent\", \"border-info\", \"text-fg-info\"),\n },\n {\n variant: \"neutral\",\n style: \"outline\",\n class: cn(\"bg-transparent\", \"border-line-default\", \"text-fg-secondary\"),\n },\n {\n variant: \"primary\",\n style: \"outline\",\n class: cn(\"bg-transparent\", \"border-line-brand\", \"text-fg-brand\"),\n },\n {\n variant: \"secondary\",\n style: \"outline\",\n class: cn(\n \"bg-transparent\",\n \"border-line-secondary\",\n \"text-fg-brand-secondary\",\n ),\n },\n ],\n defaultVariants: {\n variant: \"neutral\",\n size: \"md\",\n style: \"solid\",\n },\n },\n);\n\nconst Badge = memo(\n forwardRef<HTMLSpanElement, BadgeProps>(function Badge(\n {\n variant = \"neutral\",\n size = \"md\",\n style = \"solid\",\n className = \"\",\n children,\n \"aria-label\": ariaLabel,\n ...props\n },\n ref,\n ) {\n const classes = cn(badgeVariants({ variant, size, style }), className);\n\n // Best-effort accessible name resolution: explicit aria-label wins;\n // string children become the label; single-wrapped string children\n // (e.g. <Badge><span>Active</span></Badge>) are unwrapped one level.\n // Otherwise undefined and the consumer is responsible for naming\n // the badge externally.\n let accessibleLabel: string | undefined;\n if (ariaLabel) {\n accessibleLabel = ariaLabel;\n } else if (typeof children === \"string\") {\n accessibleLabel = children;\n } else if (\n typeof children === \"object\" &&\n children !== null &&\n \"props\" in children\n ) {\n const childProps = (children as { props?: { children?: unknown } }).props;\n if (childProps?.children && typeof childProps.children === \"string\") {\n accessibleLabel = childProps.children;\n }\n }\n\n return (\n <span\n ref={ref}\n role=\"status\"\n aria-label={accessibleLabel}\n className={classes}\n {...props}\n >\n {children}\n </span>\n );\n }),\n);\n\nBadge.displayName = \"Badge\";\n\nexport default Badge;\n","// src/compose-refs.tsx\nimport * as React from \"react\";\nfunction setRef(ref, value) {\n if (typeof ref === \"function\") {\n return ref(value);\n } else if (ref !== null && ref !== void 0) {\n ref.current = value;\n }\n}\nfunction composeRefs(...refs) {\n return (node) => {\n let hasCleanup = false;\n const cleanups = refs.map((ref) => {\n const cleanup = setRef(ref, node);\n if (!hasCleanup && typeof cleanup == \"function\") {\n hasCleanup = true;\n }\n return cleanup;\n });\n if (hasCleanup) {\n return () => {\n for (let i = 0; i < cleanups.length; i++) {\n const cleanup = cleanups[i];\n if (typeof cleanup == \"function\") {\n cleanup();\n } else {\n setRef(refs[i], null);\n }\n }\n };\n }\n };\n}\nfunction useComposedRefs(...refs) {\n return React.useCallback(composeRefs(...refs), refs);\n}\nexport {\n composeRefs,\n useComposedRefs\n};\n//# sourceMappingURL=index.mjs.map\n","// src/slot.tsx\nimport * as React from \"react\";\nimport { useComposedRefs } from \"@radix-ui/react-compose-refs\";\n// @__NO_SIDE_EFFECTS__\nfunction createSlot(ownerName) {\n const Slot2 = React.forwardRef((props, forwardedRef) => {\n let { children, ...slotProps } = props;\n let slottableElement = null;\n let hasSlottable = false;\n const newChildren = [];\n if (isLazyComponent(children) && typeof use === \"function\") {\n children = use(children._payload);\n }\n React.Children.forEach(children, (maybeSlottable) => {\n if (isSlottable(maybeSlottable)) {\n hasSlottable = true;\n const slottable = maybeSlottable;\n let child = \"child\" in slottable.props ? slottable.props.child : slottable.props.children;\n if (isLazyComponent(child) && typeof use === \"function\") {\n child = use(child._payload);\n }\n slottableElement = getSlottableElementFromSlottable(slottable, child);\n newChildren.push(slottableElement?.props?.children);\n } else {\n newChildren.push(maybeSlottable);\n }\n });\n if (slottableElement) {\n slottableElement = React.cloneElement(slottableElement, void 0, newChildren);\n } else if (\n // A `Slottable` was found but it didn't resolve to a single element (e.g.\n // it wrapped multiple elements, text, or a render-prop `child` that\n // wasn't an element). Don't fall back to treating the `Slottable` wrapper\n // itself as the slot target — throw a descriptive error below instead.\n !hasSlottable && React.Children.count(children) === 1 && React.isValidElement(children)\n ) {\n slottableElement = children;\n }\n const slottableElementRef = slottableElement ? getElementRef(slottableElement) : void 0;\n const composedRef = useComposedRefs(forwardedRef, slottableElementRef);\n if (!slottableElement) {\n if (children || children === 0) {\n throw new Error(\n hasSlottable ? createSlottableError(ownerName) : createSlotError(ownerName)\n );\n }\n return children;\n }\n const mergedProps = mergeProps(slotProps, slottableElement.props ?? {});\n if (slottableElement.type !== React.Fragment) {\n mergedProps.ref = forwardedRef ? composedRef : slottableElementRef;\n }\n return React.cloneElement(slottableElement, mergedProps);\n });\n Slot2.displayName = `${ownerName}.Slot`;\n return Slot2;\n}\nvar Slot = /* @__PURE__ */ createSlot(\"Slot\");\nvar SLOTTABLE_IDENTIFIER = Symbol.for(\"radix.slottable\");\n// @__NO_SIDE_EFFECTS__\nfunction createSlottable(ownerName) {\n const Slottable2 = (props) => \"child\" in props ? props.children(props.child) : props.children;\n Slottable2.displayName = `${ownerName}.Slottable`;\n Slottable2.__radixId = SLOTTABLE_IDENTIFIER;\n return Slottable2;\n}\nvar Slottable = /* @__PURE__ */ createSlottable(\"Slottable\");\nvar getSlottableElementFromSlottable = (slottable, child) => {\n if (\"child\" in slottable.props) {\n const child2 = slottable.props.child;\n if (!React.isValidElement(child2)) return null;\n return React.cloneElement(child2, void 0, slottable.props.children(child2.props.children));\n }\n return React.isValidElement(child) ? child : null;\n};\nfunction mergeProps(slotProps, childProps) {\n const overrideProps = { ...childProps };\n for (const propName in childProps) {\n const slotPropValue = slotProps[propName];\n const childPropValue = childProps[propName];\n const isHandler = /^on[A-Z]/.test(propName);\n if (isHandler) {\n if (slotPropValue && childPropValue) {\n overrideProps[propName] = (...args) => {\n const result = childPropValue(...args);\n slotPropValue(...args);\n return result;\n };\n } else if (slotPropValue) {\n overrideProps[propName] = slotPropValue;\n }\n } else if (propName === \"style\") {\n overrideProps[propName] = { ...slotPropValue, ...childPropValue };\n } else if (propName === \"className\") {\n overrideProps[propName] = [slotPropValue, childPropValue].filter(Boolean).join(\" \");\n }\n }\n return { ...slotProps, ...overrideProps };\n}\nfunction getElementRef(element) {\n let getter = Object.getOwnPropertyDescriptor(element.props, \"ref\")?.get;\n let mayWarn = getter && \"isReactWarning\" in getter && getter.isReactWarning;\n if (mayWarn) {\n return element.ref;\n }\n getter = Object.getOwnPropertyDescriptor(element, \"ref\")?.get;\n mayWarn = getter && \"isReactWarning\" in getter && getter.isReactWarning;\n if (mayWarn) {\n return element.props.ref;\n }\n return element.props.ref || element.ref;\n}\nfunction isSlottable(child) {\n return React.isValidElement(child) && typeof child.type === \"function\" && \"__radixId\" in child.type && child.type.__radixId === SLOTTABLE_IDENTIFIER;\n}\nvar REACT_LAZY_TYPE = Symbol.for(\"react.lazy\");\nfunction isLazyComponent(element) {\n return element != null && typeof element === \"object\" && \"$$typeof\" in element && element.$$typeof === REACT_LAZY_TYPE && \"_payload\" in element && isPromiseLike(element._payload);\n}\nfunction isPromiseLike(value) {\n return typeof value === \"object\" && value !== null && \"then\" in value;\n}\nvar createSlotError = (ownerName) => {\n return `${ownerName} failed to slot onto its children. Expected a single React element child or \\`Slottable\\`.`;\n};\nvar createSlottableError = (ownerName) => {\n return `${ownerName} failed to slot onto its \\`Slottable\\`. Expected \\`Slottable\\` to receive a single React element child.`;\n};\nvar use = React[\" use \".trim().toString()];\nexport {\n Slot as Root,\n Slot,\n Slottable,\n createSlot,\n createSlottable\n};\n//# sourceMappingURL=index.mjs.map\n","\"use client\";\n\nimport { memo } from \"react\";\nimport type { HTMLAttributes } from \"react\";\nimport { Loader2 } from \"lucide-react\";\nimport { getSpacingClass } from \"../../tokens/spacing\";\nimport { getTypographySize } from \"../../tokens/typography\";\nimport { cn, cva } from \"../../utils\";\n\nexport type SpinnerSize = \"sm\" | \"md\" | \"lg\";\nexport type SpinnerVariant = \"primary\" | \"secondary\" | \"neutral\";\n\nexport interface SpinnerProps extends HTMLAttributes<HTMLDivElement> {\n size?: SpinnerSize;\n variant?: SpinnerVariant;\n label?: string;\n}\n\n/**\n * Spinner Component\n *\n * A loading spinner component for indicating loading states.\n * Uses Strategy Pattern for different size/variant combinations.\n *\n * @example\n * ```tsx\n * <Spinner size=\"md\" variant=\"primary\" label=\"Loading...\" />\n * ```\n */\n// Spinner variants using CVA\nconst spinnerVariants = cva(\"motion-safe:animate-spin\", {\n variants: {\n size: {\n sm: \"h-4 w-4\",\n md: \"h-5 w-5\",\n lg: \"h-8 w-8\",\n },\n variant: {\n primary: \"text-fg-brand\",\n secondary: \"text-fg-brand-secondary\",\n neutral: \"text-fg-secondary\",\n },\n },\n defaultVariants: {\n size: \"md\",\n variant: \"primary\",\n },\n});\n\nconst Spinner = memo(function Spinner({\n size = \"md\",\n variant = \"primary\",\n label,\n className = \"\",\n ...props\n}: SpinnerProps) {\n return (\n <div\n className={cn(\"inline-flex\", \"items-center\", className)}\n role=\"status\"\n aria-label={label || \"Loading\"}\n aria-live=\"polite\"\n {...props}\n >\n <Loader2\n className={cn(spinnerVariants({ size, variant }))}\n aria-hidden=\"true\"\n />\n {label && (\n <span\n className={cn(\n getSpacingClass(\"sm\", \"ml\"),\n getTypographySize(\"bodySmall\"),\n \"text-fg-secondary\",\n \"sr-only\",\n )}\n >\n {label}\n </span>\n )}\n </div>\n );\n});\n\nSpinner.displayName = \"Spinner\";\n\nexport default Spinner;\n","import { forwardRef, memo } from \"react\";\nimport type { ButtonHTMLAttributes, ReactNode, ElementType } from \"react\";\nimport { Slot, Slottable } from \"@radix-ui/react-slot\";\nimport { getRadiusClass } from \"../../tokens/radius\";\n\n// Ambient declaration so the dev-only warn below typechecks without\n// pulling @types/node into the app tsconfig. At runtime the consumer's\n// bundler (webpack/turbopack/etc.) replaces `process.env.NODE_ENV` with\n// a literal; the `typeof process` guard keeps the branch safe in\n// browser/edge runtimes where `process` doesn't exist.\ndeclare const process: { env: { NODE_ENV?: string } };\nimport { getSpacingClass } from \"../../tokens/spacing\";\nimport {\n getTypographyClasses,\n getTypographySize,\n} from \"../../tokens/typography\";\nimport { cn, cva } from \"../../utils\";\nimport Spinner from \"../Spinner/Spinner\";\n\nexport type ButtonVariant =\n | \"primary\"\n | \"secondary\"\n | \"error\"\n | \"outline\"\n | \"ghost\"\n | \"iconOnly\"\n | \"link\";\nexport type ButtonSize = \"sm\" | \"md\" | \"lg\";\n\nexport interface ButtonProps extends Omit<\n ButtonHTMLAttributes<HTMLButtonElement>,\n \"as\"\n> {\n variant?: ButtonVariant;\n size?: ButtonSize;\n isLoading?: boolean;\n loadingText?: string;\n loadingIcon?: ReactNode;\n leftIcon?: ReactNode;\n rightIcon?: ReactNode;\n fullWidth?: boolean;\n as?: ElementType;\n href?: string;\n target?: string;\n /**\n * When true, render via Radix `Slot`: classes, ARIA, ref and remaining\n * props are projected onto the single child element instead of an\n * intrinsic `<button>`. The child keeps its own element type and props\n * intact — including framework-native props like `<Link href prefetch>`.\n *\n * `asChild` takes precedence over `as`: if both are supplied, `as` is\n * ignored and a dev-only warning is logged.\n *\n * @example\n * ```tsx\n * <Button asChild variant=\"primary\">\n * <Link href=\"/profile\" prefetch>Open profile</Link>\n * </Button>\n * // → <a class=\"…button classes\" href=\"/profile\" data-prefetch>Open profile</a>\n * ```\n */\n asChild?: boolean;\n}\n\n/**\n * Button Variants using CVA\n * Type-safe variant system for Button component\n */\nconst buttonVariants = cva(\n // Base classes\n cn(\n \"inline-flex\",\n \"items-center\",\n \"justify-center\",\n getTypographyClasses(\"button\").split(\" \")[2] || \"font-medium\", // Extract font-medium\n getRadiusClass(\"md\"),\n \"transition-colors\",\n \"focus:outline-none\",\n \"focus:ring-2\",\n \"focus:ring-offset-2\",\n \"disabled:opacity-50\",\n \"disabled:cursor-not-allowed\",\n ),\n {\n variants: {\n variant: {\n primary: cn(\n \"bg-surface-brand-strong\",\n \"text-fg-inverse\",\n \"hover:opacity-90\",\n \"focus:ring-line-brand\",\n ),\n secondary: cn(\n \"bg-surface-secondary\",\n \"text-fg-inverse\",\n \"hover:opacity-90\",\n \"focus:ring-line-secondary\",\n ),\n error: cn(\n \"bg-error\",\n \"text-fg-inverse\",\n \"hover:opacity-90\",\n \"focus:ring-error\",\n ),\n outline: cn(\n \"border-2\",\n \"border-line-default\",\n \"bg-transparent\",\n \"text-fg-primary\",\n \"hover:bg-surface-hover\",\n \"focus:ring-line-focus\",\n ),\n ghost: cn(\n \"bg-transparent\",\n \"text-fg-primary\",\n \"hover:bg-surface-hover\",\n \"focus:ring-line-focus\",\n ),\n iconOnly: cn(\n \"bg-transparent\",\n \"text-fg-primary\",\n \"hover:bg-surface-hover\",\n \"focus:ring-line-focus\",\n getSpacingClass(\"none\", \"p\"),\n ),\n // Textual call-to-action — brand-coloured text, underline on\n // hover, no chrome (no surface, no border). Padding is zeroed\n // out per size in compoundVariants so the bounding box hugs\n // the text (height intrinsic). Issue #156.\n //\n // Focus ring: `focus:ring-line-focus` keeps the same focus\n // family the other no-chrome variants use (ghost, outline,\n // iconOnly). The base's `focus:ring-2` + `focus:ring-offset-2`\n // produce a 2px ring 2px away from the text bounding box; the\n // 2px offset is rendered in surface-base so the ring contrasts\n // against surface (≥3:1 for WCAG 2.4.11, verified) rather than\n // colliding with the brand-coloured text. The element keeps\n // `getRadiusClass(\"md\")` from the base, which is invisible\n // without chrome but rounds the focus ring corners.\n //\n // hover:underline pairs with `underline-offset-4` so the\n // underline that appears on hover sits clear of the descenders\n // (WCAG-aligned with link best practice). At rest the link\n // carries no underline — the brand colour alone signals\n // affordance, matching the shadcn convention this variant is\n // modelled on (see issue body).\n //\n // disabled: inherits opacity-50 + cursor-not-allowed from the\n // base. We do NOT special-case `disabled:no-underline` because\n // a disabled link should still receive the same visual\n // treatment as a disabled chrome variant — the opacity and\n // cursor signal the disabled state.\n link: cn(\n \"bg-transparent\",\n \"text-fg-brand\",\n \"underline-offset-4\",\n \"hover:underline\",\n \"focus:ring-line-focus\",\n ),\n },\n size: {\n sm: cn(\n getSpacingClass(\"md\", \"px\"),\n getSpacingClass(\"1.5\", \"py\"),\n getTypographySize(\"bodySmall\"),\n getSpacingClass(\"1.5\", \"gap\"),\n ),\n md: cn(\n getSpacingClass(\"base\", \"px\"),\n getSpacingClass(\"sm\", \"py\"),\n getTypographySize(\"body\"),\n getSpacingClass(\"sm\", \"gap\"),\n ),\n lg: cn(\n getSpacingClass(\"lg\", \"px\"),\n getSpacingClass(\"md\", \"py\"),\n getTypographySize(\"bodyLarge\"),\n getSpacingClass(\"2.5\", \"gap\"),\n ),\n },\n },\n compoundVariants: [\n // IconOnly variant has different sizing\n {\n variant: \"iconOnly\",\n size: \"sm\",\n class: cn(\"h-8\", \"w-8\", getSpacingClass(\"none\", \"p\")),\n },\n {\n variant: \"iconOnly\",\n size: \"md\",\n class: cn(\"h-10\", \"w-10\", getSpacingClass(\"none\", \"p\")),\n },\n {\n variant: \"iconOnly\",\n size: \"lg\",\n class: cn(\"h-12\", \"w-12\", getSpacingClass(\"none\", \"p\")),\n },\n // Link variant zeroes the size's padding via compoundVariants so\n // the override runs AFTER the size block's `px-N`/`py-N` and\n // twMerge picks the zero value (`cn` joins variant before\n // compound). The size's typography and gap survive — the link's\n // text scales with size and icons still get gap-N when present.\n // Issue #156.\n {\n variant: \"link\",\n size: \"sm\",\n class: cn(getSpacingClass(\"none\", \"px\"), getSpacingClass(\"none\", \"py\")),\n },\n {\n variant: \"link\",\n size: \"md\",\n class: cn(getSpacingClass(\"none\", \"px\"), getSpacingClass(\"none\", \"py\")),\n },\n {\n variant: \"link\",\n size: \"lg\",\n class: cn(getSpacingClass(\"none\", \"px\"), getSpacingClass(\"none\", \"py\")),\n },\n ],\n defaultVariants: {\n variant: \"primary\",\n size: \"md\",\n },\n },\n);\n\n/**\n * Icon Wrapper Component\n * Handles icon spacing and alignment consistently\n */\nfunction IconWrapper({\n children,\n position,\n}: {\n children: ReactNode;\n position: \"left\" | \"right\";\n}) {\n if (!children) return null;\n\n return (\n <span\n className={`inline-flex items-center ${position === \"left\" ? getSpacingClass(\"none\", \"mr\") : getSpacingClass(\"none\", \"ml\")}`}\n >\n {children}\n </span>\n );\n}\n\n/**\n * Button Component\n *\n * A styled button with variants, sizes, and loading states.\n *\n * Polymorphism — two APIs:\n * - `as` (legacy): swap the root element type. `<Button as={Link} href=\"…\">`.\n * - `asChild` (recommended): project Button's styling onto the single\n * child element. Idiomatic Radix Slot pattern, preserves the child's\n * own props and TS type (e.g. `<Link href prefetch>`). When `asChild`\n * is true, `as` is ignored.\n *\n * @example\n * ```tsx\n * // Basic usage\n * <Button variant=\"primary\" size=\"md\" onClick={handleClick}>Click me</Button>\n *\n * // With icons\n * <Button leftIcon={<Icon />} rightIcon={<Icon />}>Action</Button>\n *\n * // Loading state\n * <Button isLoading loadingText=\"Saving...\">Save</Button>\n *\n * // Polymorphic via asChild (preserves Next Link's TS type and native props)\n * <Button asChild variant=\"primary\">\n * <Link href=\"/page\" prefetch>Open</Link>\n * </Button>\n *\n * // Polymorphic via legacy `as`\n * <Button as=\"a\" href=\"/page\">Navigate</Button>\n * ```\n */\nconst Button = memo(\n forwardRef<HTMLButtonElement, ButtonProps>(function Button(\n {\n variant = \"primary\",\n size = \"md\",\n isLoading = false,\n loadingText,\n loadingIcon,\n leftIcon,\n rightIcon,\n fullWidth = false,\n asChild = false,\n as,\n className = \"\",\n disabled = false,\n children,\n \"aria-label\": ariaLabel,\n ...props\n },\n ref,\n ) {\n // asChild wins over `as`. Warn in dev so the precedence is observable\n // instead of being a silent override. Production builds strip this branch.\n if (\n typeof process !== \"undefined\" &&\n process.env.NODE_ENV !== \"production\" &&\n asChild &&\n as !== undefined &&\n as !== \"button\"\n ) {\n console.warn(\n \"[Button] `as` is ignored when `asChild` is true; the child element is used as the root. Drop one of the two props to silence this warning.\",\n );\n }\n\n const Component: ElementType = asChild ? Slot : (as ?? \"button\");\n\n // These were `useMemo` originally — all decorative (class-string\n // concat, small boolean/string/JSX picks), none gating render-driving\n // state. Inlined so Button carries NO React client API and qualifies\n // for the `./server` entry (issue #224), the same de-memoization\n // precedent as Badge/Label/Card in #155. `React.memo` on the\n // component is preserved and still gates re-renders at the\n // consumer-prop boundary; the inlined work is nanoseconds.\n const classes = cn(\n buttonVariants({ variant, size }),\n fullWidth && \"w-full\",\n className,\n );\n\n const isIconOnly =\n variant === \"iconOnly\" || (!children && (leftIcon || rightIcon));\n\n const finalAriaLabel =\n isIconOnly && !ariaLabel && !children\n ? \"Button\" // Fallback, but should be provided\n : ariaLabel;\n\n const spinnerVariant: \"primary\" | \"secondary\" | \"neutral\" =\n variant === \"error\"\n ? \"primary\" // Red buttons use primary spinner (white)\n : variant === \"primary\" || variant === \"secondary\"\n ? \"neutral\" // Colored buttons use neutral spinner\n : \"primary\";\n\n const spinnerSize = size === \"sm\" ? \"sm\" : size === \"lg\" ? \"lg\" : \"md\";\n\n const displayLoadingIcon = loadingIcon || (\n <Spinner size={spinnerSize} variant={spinnerVariant} />\n );\n\n // Build button props (spread props at the end to allow overrides).\n // `type=\"button\"` default applies only when rendering an intrinsic\n // <button>. asChild and `as` (custom) projections leave it off so we\n // don't paint a meaningless `type` attribute onto <a> / <Link>.\n const defaultType =\n !asChild && (as === undefined || as === \"button\") && !props.type\n ? \"button\"\n : undefined;\n const buttonProps = {\n className: classes,\n disabled: disabled || isLoading,\n \"aria-busy\": isLoading,\n \"aria-label\": finalAriaLabel,\n \"aria-disabled\": disabled || isLoading,\n ...(defaultType ? { type: defaultType } : {}),\n ...props,\n };\n\n // asChild path: render Slot with the icons and Slottable as direct\n // sibling children (NOT wrapped in a React.Fragment). Slot's\n // children-processing inspects each direct child for Slottable; if\n // the children are wrapped in a Fragment, Slot's SlotClone merges\n // the projected props into the Fragment itself (a silent no-op for\n // className / aria / ref), and nothing reaches the consumer's\n // element. Hence the two distinct branches below: same content\n // shape, different host element, different child layout.\n if (asChild) {\n return (\n <Component ref={ref} {...buttonProps}>\n {leftIcon && <IconWrapper position=\"left\">{leftIcon}</IconWrapper>}\n <Slottable>{children}</Slottable>\n {rightIcon && <IconWrapper position=\"right\">{rightIcon}</IconWrapper>}\n </Component>\n );\n }\n\n return (\n <Component ref={ref} {...buttonProps}>\n {isLoading ? (\n <>\n {displayLoadingIcon}\n {loadingText && (\n <span className={getSpacingClass(\"sm\", \"ml\")}>{loadingText}</span>\n )}\n {!loadingText && children && (\n <span className={`${getSpacingClass(\"sm\", \"ml\")} opacity-0`}>\n {children}\n </span>\n )}\n </>\n ) : (\n <>\n {leftIcon && <IconWrapper position=\"left\">{leftIcon}</IconWrapper>}\n {children}\n {rightIcon && (\n <IconWrapper position=\"right\">{rightIcon}</IconWrapper>\n )}\n </>\n )}\n </Component>\n );\n }),\n);\n\nButton.displayName = \"Button\";\n\nexport default Button;\nexport { Button };\n","\"use client\";\n\nimport { forwardRef, type ReactNode } from \"react\";\nimport { X } from \"lucide-react\";\nimport { Slot } from \"@radix-ui/react-slot\";\nimport { getRadiusClass } from \"../../tokens/radius\";\nimport { getSpacingClass } from \"../../tokens/spacing\";\nimport {\n getTypographySize,\n getTypographyWeight,\n} from \"../../tokens/typography\";\nimport { cn, cva } from \"../../utils\";\n\nexport type ChipVariant = \"default\" | \"outlined\" | \"filled\";\nexport type ChipSize = \"sm\" | \"md\" | \"lg\";\n\ninterface ChipBaseProps {\n children: ReactNode;\n variant?: ChipVariant;\n size?: ChipSize;\n selected?: boolean;\n disabled?: boolean;\n className?: string;\n \"aria-label\"?: string;\n tabIndex?: number;\n}\n\ninterface ChipStandardProps extends ChipBaseProps {\n asChild?: false;\n onRemove?: () => void;\n onClick?: () => void;\n /**\n * Optional count sub-badge rendered at the end of the chip (before the\n * remove ✕, if any) — e.g. `Casa 12`, `Tramitando 340` in a filter bar.\n *\n * The sub-badge inverts with the chip surface so it always contrasts:\n * a brand pill on neutral chips, a light pill on brand chips\n * (`selected` / `variant=\"filled\"`). The number is folded into the\n * interactive chip's accessible name (`\"Casa, 12\"`) so AT users hear\n * it; pass an explicit `aria-label` to override that phrasing.\n *\n * Forbidden in the `asChild` form (the consumer composes the node).\n * `0` is a legitimate value and renders `0`; omit the prop for \"no\n * count\".\n */\n count?: number;\n}\n\n/**\n * `asChild` collapses the chip into a single node provided by the\n * consumer (typically `<Link>`). The non-interactive frame + inner\n * label-button + X structure is intentionally NOT rendered — the child\n * IS the chip. As a consequence:\n *\n * - `onClick` and `onRemove` are forbidden at the type level. The\n * child's own click handler (and `href`) is what fires; consumers\n * who need a removable selected filter use the standard\n * (non-asChild) form.\n * - `selected` still applies the visual classes via `chipVariants`,\n * but NO `aria-pressed` is emitted. Toggle-button semantics on\n * `<a>` would lie — a link isn't a two-state control. Consumers\n * that need the selected route surfaced to AT users should pass\n * `aria-current=\"page\"` (or similar) directly on the child Link.\n *\n * @see `.claude/rules/components.md` and the inline a11y notes below.\n */\ninterface ChipAsChildProps extends ChipBaseProps {\n asChild: true;\n /**\n * `onClick` is forbidden when `asChild` is true — the child element\n * owns interaction. Pass the handler (or `href`) on the child.\n */\n onClick?: never;\n /**\n * `onRemove` is forbidden when `asChild` is true — the collapsed\n * node has no slot for an X button. Use the standard (non-asChild)\n * form when removal is required.\n */\n onRemove?: never;\n /**\n * `count` is forbidden when `asChild` is true — the collapsed node is\n * a single consumer element with no slot for the sub-badge. Render the\n * count inside the child yourself, or use the standard form.\n */\n count?: never;\n}\n\nexport type ChipProps = ChipStandardProps | ChipAsChildProps;\n\n/**\n * Chip Component\n *\n * A chip/tag for labels, filters, or selected items.\n *\n * Standard form: an outer `<div>` frame (never interactive) with an\n * inner `<button>` label (when `onClick`) and a sibling X `<button>`\n * (when `onRemove`). This shape closes two axe violations the older\n * implementation hit — `aria-required-parent` (role=option without a\n * listbox) and `nested-interactive` (clickable outer + clickable X).\n *\n * `asChild` form: a single node provided by the consumer (e.g.\n * `<Link>`), with the chip's classes projected via Radix `Slot`. See\n * the `ChipAsChildProps` JSDoc for the a11y responsibility transfer\n * — the consumer's child carries `href`, focus behavior, and any\n * route-state ARIA (`aria-current`). Forbidden in this form:\n * `onClick`, `onRemove` (TS-level).\n *\n * @example\n * ```tsx\n * <Chip>Tag</Chip>\n * <Chip onRemove={() => console.log('removed')}>Removable</Chip>\n *\n * // Navigation chip — server-rendered, zero-JS-friendly.\n * <Chip asChild variant=\"filled\">\n * <Link href=\"/filtros/ativo\" prefetch aria-current=\"page\">Active</Link>\n * </Chip>\n * ```\n */\n// Chip variants using CVA\nconst chipVariants = cva(\n // Base classes\n cn(\n \"inline-flex\",\n \"items-center\",\n \"font-medium\",\n getRadiusClass(\"full\"),\n getSpacingClass(\"xs\", \"gap\"),\n ),\n {\n variants: {\n variant: {\n default: cn(\n \"bg-surface-muted\",\n \"text-fg-primary\",\n \"border\",\n \"border-line-default\",\n ),\n outlined: cn(\n \"bg-transparent\",\n \"text-fg-primary\",\n \"border\",\n \"border-line-default\",\n ),\n filled: cn(\n \"bg-surface-brand-strong\",\n \"text-fg-inverse\",\n \"border\",\n \"border-transparent\",\n ),\n },\n size: {\n sm: cn(\n getSpacingClass(\"xs\", \"px\"),\n getSpacingClass(\"xs\", \"py\"),\n getTypographySize(\"caption\"),\n ),\n md: cn(\n getSpacingClass(\"sm\", \"px\"),\n getSpacingClass(\"xs\", \"py\"),\n getTypographySize(\"bodySmall\"),\n ),\n lg: cn(\n getSpacingClass(\"md\", \"px\"),\n getSpacingClass(\"sm\", \"py\"),\n getTypographySize(\"body\"),\n ),\n },\n selected: {\n true: cn(\n \"bg-surface-brand-strong\",\n \"text-fg-inverse\",\n \"border\",\n \"border-line-brand\",\n ),\n false: \"\",\n },\n disabled: {\n true: \"opacity-50 cursor-not-allowed\",\n false: \"\",\n },\n },\n compoundVariants: [\n {\n selected: true,\n variant: \"default\",\n class: \"\", // Override variant when selected\n },\n {\n selected: true,\n variant: \"outlined\",\n class: \"\", // Override variant when selected\n },\n {\n selected: true,\n variant: \"filled\",\n class: \"\", // Override variant when selected\n },\n ],\n defaultVariants: {\n variant: \"default\",\n size: \"md\",\n selected: false,\n disabled: false,\n },\n },\n);\n\nconst Chip = forwardRef<HTMLDivElement, ChipProps>(function Chip(props, ref) {\n const {\n children,\n variant = \"default\",\n size = \"md\",\n selected = false,\n disabled = false,\n className = \"\",\n \"aria-label\": ariaLabel,\n tabIndex,\n asChild = false,\n } = props;\n\n // Generate accessible label\n const getAccessibleLabel = (): string | undefined => {\n if (ariaLabel) return ariaLabel;\n if (typeof children === \"string\") return children;\n // For non-string children, try to extract text content\n if (\n typeof children === \"object\" &&\n children !== null &&\n \"props\" in children\n ) {\n const childProps = (children as { props?: { children?: unknown } }).props;\n if (childProps?.children && typeof childProps.children === \"string\") {\n return childProps.children;\n }\n }\n return undefined;\n };\n\n const accessibleLabel = getAccessibleLabel();\n\n // asChild path: collapse the entire chip structure (frame + label\n // button + X) into the single consumer-provided node. The frame's\n // visual classes are projected onto the child via Slot.\n //\n // A11Y RESPONSIBILITY TRANSFER. The child element owns:\n // - focus (its native focus ring, or its own focus utilities)\n // - activation (its own click handler / href for navigation)\n // - route-state semantics: `aria-current=\"page\"` on a selected\n // Link is the right tool. `aria-pressed` is intentionally NOT\n // emitted here — a link is not a toggle button.\n // - disabled semantics: `aria-disabled` is set when `disabled` is\n // true, but it does NOT block navigation. Consumers that must\n // truly disable navigation should also gate `href` upstream.\n //\n // TS forbids `onClick` / `onRemove` in this form (see ChipAsChildProps).\n if (asChild) {\n return (\n <Slot\n ref={ref}\n className={cn(\n chipVariants({ variant, size, selected, disabled }),\n className,\n )}\n aria-label={ariaLabel}\n aria-disabled={disabled || undefined}\n tabIndex={tabIndex}\n >\n {children}\n </Slot>\n );\n }\n\n // Standard form below. Narrow `props` so the union picks up\n // onClick/onRemove/count (forbidden when asChild=true at TS level).\n const { onRemove, onClick, count } = props as ChipStandardProps;\n\n // Architecture:\n // The label is a real `<button>` whenever the chip is meant to be\n // activated (`onClick` provided). The X is a sibling `<button>` when\n // `onRemove` is provided. The outer `<div>` is NEVER interactive —\n // no `role`, no `tabIndex`, no event handlers. This unifies what\n // used to be three structural variants:\n // - `onClick` only → outer `role=\"button\"` [old]\n // - `onClick` + `onRemove` (no selected) → label-button [PR68]\n // - `selected` → outer `role=\"option\"` [old, axe-flagged]\n // into one consistent shape: label is the actor, outer is the chip\n // chrome (visual frame).\n //\n // Why this matters for a11y:\n // - `role=\"option\"` outside `role=\"listbox\"` violates `aria-required-\n // parent`. The old `selected` path failed axe in every standalone\n // chip. Moving the action to a native `<button>` with\n // `aria-pressed={selected}` (toggle button pattern) communicates\n // state correctly without requiring a listbox parent.\n // - The interactive outer + inner X button produced nested-interactive\n // whenever the consumer combined `selected` (or `onClick`) with\n // `onRemove`. Outer non-interactive + sibling buttons fixes both\n // cases at once.\n //\n // `selected` with no `onClick` is decorative only — the chip CANNOT\n // toggle, so it gets no `aria-pressed` (which would lie) and no role.\n // The visual `selected` styling (chipVariants.selected) applies, but\n // AT users read it as static text. Consumers who want the state\n // communicated must also pass `onClick` to make it a real toggle.\n const useLabelButton = onClick !== undefined;\n const interactive = useLabelButton && !disabled;\n\n // Keyboard handler for the label-button. Native `<button>` activates on\n // Enter/Space in real browsers, but JSDOM does NOT simulate Enter → click,\n // so this preserves the previous test-friendly behavior AND adds explicit\n // `preventDefault` (the original outer-as-button needed it; on a native\n // button this is mostly belt-and-suspenders but harmless).\n const handleKeyDown = (e: React.KeyboardEvent<HTMLButtonElement>) => {\n if (disabled) return;\n if (e.key === \"Enter\" || e.key === \" \") {\n e.preventDefault();\n onClick?.();\n }\n };\n\n // Count sub-badge (issue #222). Rendered as a sibling of the label so\n // the outer flex's `items-center` + `gap` handle alignment/spacing.\n // The pill inverts with the chip surface so it always contrasts:\n // - brand-backed chip (selected || filled) → light pill\n // (bg-surface-base + text-fg-brand-emphasis)\n // - neutral chip (default/outlined) → brand pill\n // (bg-surface-brand-strong + text-fg-inverse, the filled-chip combo)\n // Both pairs are AA-proven elsewhere in the system.\n const hasCount = count !== undefined;\n const chipIsBrandFilled = selected || variant === \"filled\";\n const countBadge = hasCount ? (\n <span\n // Interactive chips fold the count into the label-button's\n // aria-label below, so the visible badge is hidden from AT to\n // avoid a double announce. Non-interactive chips have no\n // overriding name — the badge stays readable as inline content.\n aria-hidden={useLabelButton || undefined}\n className={cn(\n \"inline-flex\",\n \"items-center\",\n \"justify-center\",\n \"tabular-nums\",\n \"leading-none\",\n getRadiusClass(\"full\"),\n getSpacingClass(\"xs\", \"px\"),\n getSpacingClass(\"0.5\", \"py\"),\n getTypographySize(\"caption\"),\n getTypographyWeight(\"label\"),\n chipIsBrandFilled\n ? cn(\"bg-surface-base\", \"text-fg-brand-emphasis\")\n : cn(\"bg-surface-brand-strong\", \"text-fg-inverse\"),\n )}\n >\n {count}\n </span>\n ) : null;\n\n // When a count is present, fold it into the interactive chip's\n // accessible name (\"Casa, 12\") so AT users hear it. An explicit\n // consumer aria-label always wins (they own the phrasing).\n const labelWithCount =\n hasCount && accessibleLabel !== undefined\n ? `${accessibleLabel}, ${count}`\n : accessibleLabel;\n\n return (\n <div\n ref={ref}\n className={cn(\n chipVariants({ variant, size, selected, disabled }),\n onRemove && getSpacingClass(\"xs\", \"pr\"),\n className,\n )}\n aria-disabled={disabled}\n >\n {useLabelButton ? (\n <button\n type=\"button\"\n onClick={disabled ? undefined : onClick}\n onKeyDown={handleKeyDown}\n disabled={disabled}\n aria-pressed={selected ? true : undefined}\n aria-label={ariaLabel || labelWithCount}\n tabIndex={\n tabIndex !== undefined ? tabIndex : interactive ? 0 : undefined\n }\n className={cn(\n \"flex-1\",\n \"bg-transparent\",\n \"border-0\",\n getSpacingClass(\"none\", \"p\"),\n \"text-inherit\",\n \"text-left\",\n \"cursor-pointer\",\n \"focus:outline-none\",\n \"focus:ring-2\",\n \"focus:ring-line-focus\",\n \"focus:ring-offset-2\",\n getRadiusClass(\"full\"),\n )}\n >\n {children}\n </button>\n ) : (\n <span>{children}</span>\n )}\n {countBadge}\n {onRemove && !disabled && (\n <button\n type=\"button\"\n onClick={(e) => {\n e.stopPropagation();\n onRemove();\n }}\n className={cn(\n getSpacingClass(\"xs\", \"ml\"),\n \"hover:bg-tint-hover\",\n getRadiusClass(\"full\"),\n getSpacingClass(\"xs\", \"p\"),\n \"transition-colors\",\n \"focus:outline-none\",\n \"focus:ring-2\",\n \"focus:ring-line-focus\",\n \"focus:ring-offset-1\",\n )}\n aria-label={`Remove ${accessibleLabel || \"chip\"}`}\n >\n <X className=\"h-3 w-3\" aria-hidden=\"true\" />\n </button>\n )}\n </div>\n );\n});\n\nChip.displayName = \"Chip\";\n\nexport default Chip;\n","import { memo, forwardRef } from \"react\";\nimport type { HTMLAttributes, ReactNode } from \"react\";\nimport { getRadiusClass } from \"../../tokens/radius\";\nimport { getSpacingClass } from \"../../tokens/spacing\";\nimport {\n getTypographySize,\n getTypographyWeight,\n} from \"../../tokens/typography\";\nimport { cn, cva } from \"../../utils\";\n\n/**\n * Semantic tone for a {@link DataBadge}. The status/brand members mirror the\n * `Badge` vocabulary (role, not tone) so the soft-wash treatment is shared\n * and already AA-verified; `dataviz` adds a CATEGORICAL member (a\n * reddish-purple wash for \"category / analytical\" data, the badge-facing\n * counterpart to the chart palette) that is intentionally NOT a status.\n * Map a consumer's tone names onto these roles: `default → neutral`,\n * `destructive → error`, `brand → primary`, `accent → dataviz` (the\n * data-viz purple — RDS `accent` is cyan, so the category tone is `dataviz`).\n */\nexport type DataBadgeTone =\n | \"neutral\"\n | \"success\"\n | \"warning\"\n | \"error\"\n | \"info\"\n | \"primary\"\n | \"secondary\"\n | \"dataviz\";\n\nexport type DataBadgeSize = \"sm\" | \"md\";\n\nexport interface DataBadgeProps extends HTMLAttributes<HTMLSpanElement> {\n /** Primary datum — the value the badge is about (e.g. \"L2\", \"Aprovada\"). */\n label: ReactNode;\n /**\n * Provenance of the datum, rendered as a lesser-emphasis sub-label after\n * the label (e.g. \"Câmara\", \"Portal Transparência\"). Omitted when absent.\n */\n source?: ReactNode;\n /** Semantic tone (role-based color). Defaults to `neutral`. */\n tone?: DataBadgeTone;\n /** Optional decorative leading icon (rendered `aria-hidden`). */\n icon?: ReactNode;\n /** Size scale. Defaults to `md`. */\n size?: DataBadgeSize;\n}\n\n// Tone → soft-wash classes, mirroring Badge's already-AA-verified scale.\nconst dataBadgeVariants = cva(\n cn(\"inline-flex\", \"items-center\", \"border\", getRadiusClass(\"md\")),\n {\n variants: {\n tone: {\n neutral: cn(\n \"bg-surface-muted\",\n \"text-fg-primary\",\n \"border-line-default\",\n ),\n success: cn(\"bg-success-bg\", \"text-success-dark\", \"border-success\"),\n warning: cn(\"bg-warning-bg\", \"text-warning-dark\", \"border-warning\"),\n error: cn(\"bg-error-bg\", \"text-error-dark\", \"border-error\"),\n info: cn(\"bg-info-bg\", \"text-info-dark\", \"border-info\"),\n primary: cn(\n \"bg-surface-brand-subtle\",\n \"text-fg-brand-emphasis\",\n \"border-line-brand\",\n ),\n secondary: cn(\n \"bg-surface-secondary-subtle\",\n \"text-fg-brand-secondary-emphasis\",\n \"border-line-secondary\",\n ),\n // Categorical data-viz tone — fuchsia soft-wash, sibling to the\n // chart palette. Not a status; distinct from secondary (brand violet).\n dataviz: cn(\"bg-dataviz-bg\", \"text-dataviz-dark\", \"border-dataviz\"),\n },\n size: {\n sm: cn(\n getSpacingClass(\"1.5\", \"px\"),\n getSpacingClass(\"0.5\", \"py\"),\n getSpacingClass(\"0.5\", \"gap\"),\n \"[&_svg]:size-3\",\n ),\n md: cn(\n getSpacingClass(\"sm\", \"px\"),\n getSpacingClass(\"0.5\", \"py\"),\n getSpacingClass(\"xs\", \"gap\"),\n \"[&_svg]:size-3.5\",\n ),\n },\n },\n defaultVariants: { tone: \"neutral\", size: \"md\" },\n },\n);\n\n/**\n * DataBadge\n *\n * An inline metadata chip: a primary `label`, an optional lesser-emphasis\n * `source` sub-label (the datum's provenance), a semantic `tone`, and an\n * optional decorative `icon`. Built for transparency/data UIs where a value\n * must travel with where it came from (\"L2 · Portal Transparência\").\n *\n * Why a separate primitive and not `Badge`: `Badge` is a single-string\n * status label; `DataBadge` carries a value + its source as a structured\n * pair. The `source` is the differentiator — it has no slot in `Badge` /\n * `Chip` / `Info`.\n *\n * Accessibility: the visible text (label, then source) IS the accessible\n * name — the separator and any `icon` are `aria-hidden`. Hierarchy between\n * label and source is conveyed by size + weight, never by dropping the\n * source below its tone's AA-safe text color. The root is a plain inline\n * `<span>` with no live-region role (metadata is static, not announced);\n * pass `role` / `aria-label` via props if a grouping role is wanted.\n *\n * Server-safe: no hooks, no client APIs, no DOM handlers of its own — ships\n * from the `./server` entry.\n *\n * @example\n * ```tsx\n * <DataBadge label=\"L2\" source=\"Portal Transparência\" tone=\"warning\" />\n * <DataBadge label=\"Aprovada\" tone=\"success\" />\n * ```\n */\nconst DataBadge = memo(\n forwardRef<HTMLSpanElement, DataBadgeProps>(function DataBadge(\n {\n label,\n source,\n tone = \"neutral\",\n size = \"md\",\n icon,\n className = \"\",\n ...rest\n },\n ref,\n ) {\n const hasSource = source !== undefined && source !== null && source !== \"\";\n // Label is the larger/heavier tier; source is one size smaller and a\n // lighter weight. Both keep the tone's AA-safe text color — hierarchy\n // comes from size + weight, not from reducing contrast.\n const labelSize = size === \"sm\" ? \"caption\" : \"bodySmall\";\n\n return (\n <span\n ref={ref}\n className={cn(dataBadgeVariants({ tone, size }), className)}\n {...rest}\n >\n {icon ? (\n <span\n className=\"inline-flex shrink-0 items-center\"\n aria-hidden=\"true\"\n >\n {icon}\n </span>\n ) : null}\n <span\n className={cn(\n getTypographySize(labelSize),\n getTypographyWeight(\"label\"),\n )}\n >\n {label}\n </span>\n {hasSource ? (\n <>\n <span aria-hidden=\"true\" className={getTypographySize(\"caption\")}>\n ·\n </span>\n <span\n className={cn(\n getTypographySize(\"caption\"),\n getTypographyWeight(\"caption\"),\n )}\n >\n {source}\n </span>\n </>\n ) : null}\n </span>\n );\n }),\n);\n\nDataBadge.displayName = \"DataBadge\";\n\nexport default DataBadge;\n","import type { HTMLAttributes } from \"react\";\nimport { AlertCircle } from \"lucide-react\";\nimport { getTypographySize } from \"../../tokens/typography\";\nimport { getSpacingClass } from \"../../tokens/spacing\";\nimport { cn } from \"../../utils\";\n\nexport interface ErrorMessageProps extends HTMLAttributes<HTMLDivElement> {\n message: string;\n id?: string;\n}\n\n/**\n * ErrorMessage Component\n *\n * A component for displaying validation error messages.\n *\n * @example\n * ```tsx\n * <ErrorMessage message=\"This field is required\" id=\"email-error\" />\n * ```\n */\nexport default function ErrorMessage({\n message,\n id,\n className = \"\",\n ...props\n}: ErrorMessageProps) {\n const baseClasses = [\n getSpacingClass(\"xs\", \"mt\"),\n getTypographySize(\"bodySmall\"),\n \"text-fg-error\",\n \"flex\",\n \"items-center\",\n getSpacingClass(\"xs\", \"gap\"),\n ];\n\n const classes = cn(...baseClasses, className);\n\n return (\n <div role=\"alert\" id={id} className={classes} aria-live=\"polite\" {...props}>\n <AlertCircle className=\"h-4 w-4 shrink-0\" aria-hidden=\"true\" />\n <span>{message}</span>\n </div>\n );\n}\n","import type { HTMLAttributes } from \"react\";\nimport { getRadiusClass } from \"../../tokens/radius\";\nimport { getSpacingClass } from \"../../tokens/spacing\";\nimport { cn } from \"../../utils\";\n\nexport interface InfoProps extends HTMLAttributes<HTMLDivElement> {\n variant?: \"info\" | \"warning\" | \"error\";\n}\n\nexport default function Info({\n variant = \"info\",\n className,\n ...props\n}: InfoProps) {\n const variantClasses = {\n warning: cn(\"bg-warning-bg\", \"text-warning-dark\", \"border-warning\"),\n error: cn(\"bg-error-bg\", \"text-error-dark\", \"border-error\"),\n info: cn(\"bg-info-bg\", \"text-info-dark\", \"border-info\"),\n };\n\n return (\n <div\n role=\"alert\"\n className={cn(\n \"border\",\n getSpacingClass(\"base\", \"px\"),\n getSpacingClass(\"sm\", \"py\"),\n getRadiusClass(\"lg\"),\n variantClasses[variant],\n className,\n )}\n {...props}\n />\n );\n}\n","import { forwardRef } from \"react\";\nimport type { InputHTMLAttributes, ReactNode } from \"react\";\nimport {\n getTypographyClasses,\n getTypographySize,\n} from \"../../tokens/typography\";\nimport { getRadiusClass } from \"../../tokens/radius\";\nimport { getSpacingClass } from \"../../tokens/spacing\";\nimport { cn, cva } from \"../../utils\";\n\n// Ambient declaration so the dev-only warn below typechecks without\n// pulling @types/node into the app tsconfig. At runtime the consumer's\n// bundler replaces `process.env.NODE_ENV` with a literal; the\n// `typeof process` guard keeps the branch safe in browser/edge runtimes.\ndeclare const process: { env: { NODE_ENV?: string } };\n\nexport type InputSize = \"sm\" | \"md\" | \"lg\";\nexport type InputVariant = \"default\" | \"outlined\" | \"filled\";\nexport type InputState = \"default\" | \"error\" | \"success\";\n\n/**\n * Input variant tokens (issue #224). They used to live inside `Input`\n * wrapped in `useMemo`; moving them here, to the server-safe `InputBase`,\n * removes that decorative memo and makes `InputBase` the single source of\n * the input's visual surface — the interactive `Input` inherits it by\n * composing `InputBase` rather than re-declaring the cva. The focus-ring\n * colours are inlined directly (the old code derived them via\n * `.replace(\"focus:border-\", \"focus:ring-\")`, which produced exactly\n * these classes).\n */\nconst inputVariants = cva(\n cn(\n \"w-full\",\n getRadiusClass(\"md\"),\n \"transition-colors\",\n \"focus:outline-none\",\n \"focus:ring-2\",\n \"focus:ring-offset-2\",\n \"disabled:opacity-50\",\n \"disabled:cursor-not-allowed\",\n ),\n {\n variants: {\n variant: {\n default: cn(\n \"border-0\",\n \"border-b-2\",\n \"border-line-default\",\n \"focus:border-line-focus\",\n ),\n outlined: cn(\n \"border\",\n \"border-line-default\",\n \"focus:border-line-focus\",\n ),\n filled: cn(\n \"bg-surface-muted\",\n \"border-0\",\n \"focus:bg-surface-base\",\n \"focus:ring-2\",\n \"focus:ring-line-focus\",\n ),\n },\n size: {\n sm: cn(\n \"h-8\",\n getTypographySize(\"bodySmall\"),\n getSpacingClass(\"md\", \"px\"),\n ),\n md: cn(\n \"h-10\",\n getTypographySize(\"body\"),\n getSpacingClass(\"base\", \"px\"),\n ),\n lg: cn(\n \"h-12\",\n getTypographySize(\"bodyLarge\"),\n getSpacingClass(\"lg\", \"px\"),\n ),\n },\n state: {\n default: \"\",\n error: cn(\"border-error\", \"focus:border-error\", \"focus:ring-error\"),\n success: cn(\n \"border-success\",\n \"focus:border-success\",\n \"focus:ring-success\",\n ),\n },\n },\n defaultVariants: {\n variant: \"outlined\",\n size: \"md\",\n state: \"default\",\n },\n },\n);\n\n/**\n * Helper / error text. De-memoized (issue #224) — the original wrapped\n * its class string and text in `useMemo`, a decorative memo that blocked\n * server-safety. Inlined here; the work is nanoseconds.\n */\nfunction HelperText({\n error,\n success,\n helperText,\n errorId,\n helperId,\n}: {\n error: boolean;\n success: boolean;\n helperText?: string;\n errorId?: string;\n helperId?: string;\n}) {\n const helperClasses = cn(\n getSpacingClass(\"xs\", \"mt\"),\n getTypographyClasses(\"caption\"),\n error && \"text-fg-error\",\n success && \"text-fg-success\",\n !error && !success && \"text-fg-secondary\",\n );\n const text = helperText || (error ? \"Error\" : success ? \"Success\" : \"\");\n\n return (\n <div\n id={errorId || helperId}\n className={helperClasses}\n role={error || success ? \"alert\" : undefined}\n >\n {text}\n </div>\n );\n}\n\nexport interface InputBaseProps extends Omit<\n InputHTMLAttributes<HTMLInputElement>,\n \"size\"\n> {\n label?: ReactNode;\n error?: boolean;\n success?: boolean;\n helperText?: string;\n size?: InputSize;\n variant?: InputVariant;\n leftIcon?: ReactNode;\n rightIcon?: ReactNode;\n /**\n * Raw trailing-affix slot rendered inside the input's right edge with\n * full interactivity (no `pointer-events-none`). The interactive\n * `Input` injects its password-toggle / clear buttons here; consumers\n * can use it for a static suffix (a unit, a badge). When omitted,\n * `rightIcon` renders instead with the muted decorative treatment.\n */\n rightSlot?: ReactNode;\n}\n\n/**\n * InputBase\n *\n * The **presentational core** of the text input — label, the `<input>`\n * itself, decorative left/right icons, the trailing-affix slot, and the\n * helper/error line. It holds **no React client state** (no `useState`,\n * `useId`, `useCallback`), so it is server-safe and ships from the\n * `./server` entry (issue #224).\n *\n * The interactive `Input` (default export of this folder) composes\n * `InputBase`, owning the password-toggle state, the clear button, and\n * the `useId` auto-id fallback — it passes the resolved `id`, the\n * toggled `type`, and its affix buttons (`rightSlot`) down. Use\n * `InputBase` directly for server-rendered / native-form inputs where\n * none of that interactivity is needed (`<form method=\"GET\">` filters,\n * RSC pages).\n *\n * Accessible name: pass `id` when you pass `label` so the `<label\n * htmlFor>` binds — `InputBase` does NOT auto-generate an id (that needs\n * `useId`, which would make it client). A dev-only warning fires when a\n * `label` is given without an `id`.\n *\n * @example\n * ```tsx\n * // Server component / native form — zero client state.\n * <InputBase id=\"q\" name=\"q\" placeholder=\"Buscar…\" />\n * ```\n */\nconst InputBase = forwardRef<HTMLInputElement, InputBaseProps>(\n function InputBase(\n {\n id,\n label,\n error = false,\n success = false,\n helperText,\n size = \"md\",\n variant = \"outlined\",\n leftIcon,\n rightIcon,\n rightSlot,\n className = \"\",\n disabled = false,\n type = \"text\",\n ...props\n },\n ref,\n ) {\n if (\n typeof process !== \"undefined\" &&\n process.env.NODE_ENV !== \"production\" &&\n label &&\n !id\n ) {\n console.warn(\n \"[InputBase] `label` was provided without an `id`. The <label> cannot bind to the input (InputBase does not auto-generate an id — that needs a client hook). Pass an `id`, or use the interactive `Input` which auto-generates one.\",\n );\n }\n\n const state: InputState = error ? \"error\" : success ? \"success\" : \"default\";\n\n const errorId = error && id ? `${id}-error` : undefined;\n const helperId = helperText && id ? `${id}-helper` : undefined;\n\n const iconSize =\n size === \"sm\" ? \"h-4 w-4\" : size === \"lg\" ? \"h-5 w-5\" : \"h-4 w-4\";\n const iconPosition =\n size === \"sm\" ? \"top-2\" : size === \"lg\" ? \"top-3.5\" : \"top-2.5\";\n\n const inputClasses = cn(\n inputVariants({ variant, size, state }),\n // Icon padding — `pl-9` / `pr-9` aren't on the spacing scale (no\n // semantic key for 36px) so they stay raw at the `sm` size; md/lg use\n // the getter. Mirrors the original Input contract.\n leftIcon &&\n (size === \"sm\"\n ? \"pl-9\"\n : size === \"lg\"\n ? getSpacingClass(\"3xl\", \"pl\")\n : getSpacingClass(\"2xl\", \"pl\")),\n (rightIcon || rightSlot) &&\n (size === \"sm\"\n ? \"pr-9\"\n : size === \"lg\"\n ? getSpacingClass(\"3xl\", \"pr\")\n : getSpacingClass(\"2xl\", \"pr\")),\n className,\n );\n\n const labelClasses = cn(\n \"block\",\n getTypographyClasses(\"label\"),\n getSpacingClass(\"xs\", \"mb\"),\n disabled && \"opacity-50\",\n );\n\n return (\n <div className=\"w-full\">\n {label && (\n <label htmlFor={id} className={labelClasses}>\n {label}\n </label>\n )}\n <div className=\"relative\">\n {leftIcon && (\n <div\n className={`absolute left-3 ${iconPosition} text-fg-secondary opacity-60 pointer-events-none`}\n >\n <div className={iconSize}>{leftIcon}</div>\n </div>\n )}\n <input\n id={id}\n ref={ref}\n type={type}\n className={inputClasses}\n disabled={disabled}\n aria-invalid={error}\n aria-required={props.required}\n aria-describedby={errorId || helperId}\n suppressHydrationWarning\n {...props}\n />\n {(rightIcon || rightSlot) && (\n <div\n className={`absolute right-3 top-0 bottom-0 flex items-center ${getSpacingClass(\"xs\", \"gap\")}`}\n >\n {rightSlot ?? (\n <div\n className={`text-fg-secondary opacity-60 pointer-events-none ${iconSize}`}\n >\n {rightIcon}\n </div>\n )}\n </div>\n )}\n </div>\n {(error || success || helperText) && (\n <HelperText\n error={error}\n success={success}\n helperText={helperText}\n errorId={errorId}\n helperId={helperId}\n />\n )}\n </div>\n );\n },\n);\n\nInputBase.displayName = \"InputBase\";\n\nexport default InputBase;\n","import type { LabelHTMLAttributes } from \"react\";\nimport { forwardRef, memo } from \"react\";\nimport {\n getTypographySize,\n getTypographyWeight,\n} from \"../../tokens/typography\";\nimport { getSpacingClass } from \"../../tokens/spacing\";\nimport { cn } from \"../../utils\";\n\ninterface Props extends LabelHTMLAttributes<HTMLLabelElement> {\n variant?: \"default\" | \"required\" | \"optional\";\n children: React.ReactNode;\n}\n\nconst labelBaseClasses = cn(\n \"block\",\n getTypographySize(\"label\"),\n getTypographyWeight(\"label\"),\n \"text-fg-primary\",\n);\n\nconst labelVariantClasses: Record<NonNullable<Props[\"variant\"]>, string> = {\n default: \"\",\n required: cn(\n \"after:content-['*']\",\n `after:${getSpacingClass(\"0.5\", \"ml\")}`,\n \"after:text-fg-error\",\n ),\n optional: cn(\n \"after:content-['(optional)']\",\n `after:${getSpacingClass(\"xs\", \"ml\")}`,\n \"after:text-fg-tertiary\",\n \"after:font-normal\",\n ),\n};\n\n/**\n * Label Component\n *\n * A styled label component for form inputs.\n *\n * @example\n * ```tsx\n * <Label htmlFor=\"email\" variant=\"required\">\n * Email Address\n * </Label>\n * ```\n */\nconst Label = memo(\n forwardRef<HTMLLabelElement, Props>(function Label(\n { variant = \"default\", className = \"\", children, ...props },\n ref,\n ) {\n const classes = cn(\n labelBaseClasses,\n labelVariantClasses[variant],\n className,\n );\n\n return (\n <label ref={ref} className={classes} {...props}>\n {children}\n </label>\n );\n }),\n);\n\nLabel.displayName = \"Label\";\n\nexport default Label;\n","/**\n * Shadow Tokens\n *\n * Centralized shadow system for consistent elevation and depth.\n * Uses Factory Pattern for type-safe token creation.\n */\n\nexport type ShadowSize = \"none\" | \"sm\" | \"md\" | \"lg\" | \"xl\" | \"2xl\" | \"inner\";\n\nexport interface ShadowToken {\n value: string;\n tailwind: string;\n description: string;\n}\n\n/**\n * Shadow Token Factory\n * Creates shadow tokens with consistent values\n */\nexport class ShadowTokenFactory {\n /**\n * Create a shadow token\n */\n static create(size: ShadowSize): ShadowToken {\n const shadowMap: Record<\n ShadowSize,\n { value: string; tailwind: string; description: string }\n > = {\n none: {\n value: \"none\",\n tailwind: \"shadow-none\",\n description: \"No shadow\",\n },\n sm: {\n value: \"0 1px 2px 0 rgb(0 0 0 / 0.05)\",\n tailwind: \"shadow-sm\",\n description: \"Small shadow for subtle elevation\",\n },\n md: {\n value: \"0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1)\",\n tailwind: \"shadow-md\",\n description: \"Medium shadow for cards and elevated elements\",\n },\n lg: {\n value:\n \"0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1)\",\n tailwind: \"shadow-lg\",\n description: \"Large shadow for modals and dropdowns\",\n },\n xl: {\n value:\n \"0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1)\",\n tailwind: \"shadow-xl\",\n description: \"Extra large shadow for prominent modals\",\n },\n \"2xl\": {\n value:\n \"0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1)\",\n tailwind: \"shadow-2xl\",\n description: \"2X large shadow for maximum elevation\",\n },\n inner: {\n value: \"inset 0 2px 4px 0 rgb(0 0 0 / 0.05)\",\n tailwind: \"shadow-inner\",\n description: \"Inner shadow for inset elements\",\n },\n };\n\n return shadowMap[size];\n }\n}\n\n/**\n * Pre-defined shadow tokens\n */\nexport const SHADOW_TOKENS = {\n none: ShadowTokenFactory.create(\"none\"),\n sm: ShadowTokenFactory.create(\"sm\"),\n md: ShadowTokenFactory.create(\"md\"),\n lg: ShadowTokenFactory.create(\"lg\"),\n xl: ShadowTokenFactory.create(\"xl\"),\n \"2xl\": ShadowTokenFactory.create(\"2xl\"),\n inner: ShadowTokenFactory.create(\"inner\"),\n} as const;\n\n/**\n * Helper function to get shadow token\n */\nexport function getShadow(size: keyof typeof SHADOW_TOKENS): ShadowToken {\n return SHADOW_TOKENS[size];\n}\n\n/**\n * Helper function to get shadow as Tailwind class\n */\nexport function getShadowClass(size: keyof typeof SHADOW_TOKENS): string {\n return SHADOW_TOKENS[size].tailwind;\n}\n","\"use client\";\n\nimport type { HTMLAttributes } from \"react\";\nimport { forwardRef } from \"react\";\nimport { getRadiusClass } from \"../../tokens\";\nimport { getSpacingClass } from \"../../tokens/spacing\";\nimport {\n getTypographySize,\n getTypographyWeight,\n} from \"../../tokens/typography\";\nimport { cn, cva } from \"../../utils\";\nimport \"./Progress.css\";\n\nexport type ProgressVariant =\n | \"primary\"\n | \"secondary\"\n | \"success\"\n | \"error\"\n | \"warning\"\n | \"info\";\nexport type ProgressSize = \"sm\" | \"md\" | \"lg\";\n\nexport interface ProgressProps extends HTMLAttributes<HTMLDivElement> {\n value?: number; // 0-100, undefined for indeterminate\n max?: number; // Default 100\n variant?: ProgressVariant;\n size?: ProgressSize;\n showLabel?: boolean;\n label?: string;\n \"aria-label\"?: string;\n}\n\n/**\n * Progress Component\n *\n * A progress bar component for displaying progress or loading states.\n * Supports both determinate (with value) and indeterminate (without value) modes.\n * Fully accessible with ARIA attributes.\n *\n * @example\n * ```tsx\n * // Determinate progress\n * <Progress value={75} variant=\"primary\" />\n *\n * // Indeterminate progress\n * <Progress variant=\"primary\" />\n *\n * // With label\n * <Progress value={50} showLabel label=\"Uploading...\" />\n * ```\n */\n// Progress variants using CVA\nconst progressTrackVariants = cva(\"w-full\", {\n variants: {\n size: {\n sm: \"h-1\",\n md: \"h-2\",\n lg: \"h-3\",\n },\n variant: {\n primary: \"bg-surface-muted\",\n secondary: \"bg-surface-muted\",\n success: \"bg-success-bg-emphasis\",\n error: \"bg-error-bg-emphasis\",\n warning: \"bg-warning-bg-emphasis\",\n info: \"bg-info-bg-emphasis\",\n },\n },\n defaultVariants: {\n size: \"md\",\n variant: \"primary\",\n },\n});\n\nconst progressBarVariants = cva(\"transition-all\", {\n variants: {\n variant: {\n primary: \"bg-surface-brand\",\n secondary: \"bg-surface-secondary\",\n success: \"bg-success\",\n error: \"bg-error\",\n warning: \"bg-warning\",\n info: \"bg-info\",\n },\n },\n defaultVariants: {\n variant: \"primary\",\n },\n});\n\nconst Progress = forwardRef<HTMLDivElement, ProgressProps>(function Progress(\n {\n value,\n max = 100,\n variant = \"primary\",\n size = \"md\",\n showLabel = false,\n label,\n \"aria-label\": ariaLabel,\n className = \"\",\n ...props\n },\n ref,\n) {\n const isIndeterminate = value === undefined;\n const percentage = isIndeterminate\n ? undefined\n : Math.min(Math.max((value / max) * 100, 0), 100);\n\n const defaultAriaLabel =\n ariaLabel ||\n (isIndeterminate\n ? \"Loading in progress\"\n : `Progress: ${percentage?.toFixed(0)}%`);\n\n return (\n <div ref={ref} className={cn(\"w-full\", className)} {...props}>\n {showLabel && (label || !isIndeterminate) && (\n <div\n className={cn(\n \"flex\",\n \"items-center\",\n \"justify-between\",\n getSpacingClass(\"xs\", \"mb\"),\n )}\n >\n {label && (\n <span\n className={cn(\n getTypographySize(\"bodySmall\"),\n getTypographyWeight(\"label\"),\n \"text-fg-primary\",\n )}\n >\n {label}\n </span>\n )}\n {!isIndeterminate && percentage !== undefined && (\n <span\n className={cn(\n getTypographySize(\"bodySmall\"),\n \"text-fg-secondary\",\n )}\n >\n {percentage.toFixed(0)}%\n </span>\n )}\n </div>\n )}\n <div\n role=\"progressbar\"\n aria-valuemin={isIndeterminate ? undefined : 0}\n aria-valuemax={isIndeterminate ? undefined : max}\n aria-valuenow={isIndeterminate ? undefined : value}\n aria-label={defaultAriaLabel}\n aria-busy={isIndeterminate}\n className={cn(\n \"relative\",\n \"w-full\",\n \"overflow-hidden\",\n progressTrackVariants({ size, variant }),\n getRadiusClass(\"full\"),\n )}\n >\n {isIndeterminate ? (\n <div\n className={cn(\n \"absolute\",\n \"top-0\",\n \"left-0\",\n \"bottom-0\",\n progressBarVariants({ variant }),\n getRadiusClass(\"full\"),\n \"motion-reduce:animate-none\",\n )}\n style={{\n width: \"30%\",\n animation: \"progress-indeterminate 1.5s ease-in-out infinite\",\n }}\n />\n ) : (\n <div\n className={cn(\n \"h-full\",\n progressBarVariants({ variant }),\n getRadiusClass(\"full\"),\n \"transition-all\",\n \"duration-300\",\n \"ease-out\",\n )}\n style={{\n width: `${percentage}%`,\n }}\n aria-hidden=\"true\"\n />\n )}\n </div>\n </div>\n );\n});\n\nProgress.displayName = \"Progress\";\n\nexport default Progress;\n","import { memo } from \"react\";\nimport type { HTMLAttributes } from \"react\";\nimport { cn } from \"../../utils\";\n\nexport type SeparatorOrientation = \"horizontal\" | \"vertical\";\nexport type SeparatorVariant = \"solid\" | \"dashed\" | \"dotted\";\n\nexport interface SeparatorProps extends HTMLAttributes<HTMLHRElement> {\n orientation?: SeparatorOrientation;\n variant?: SeparatorVariant;\n}\n\n/**\n * Separator Component\n *\n * A visual separator component for dividing content.\n * Optimized with React.memo to prevent unnecessary re-renders.\n *\n * @example\n * ```tsx\n * <Separator />\n *\n * <Separator orientation=\"vertical\" variant=\"dashed\" />\n * ```\n */\nconst separatorOrientationClasses = {\n horizontal: \"w-full border-t\",\n vertical: \"h-full border-l self-stretch\",\n} as const;\n\nconst separatorVariantClasses = {\n solid: \"border-solid\",\n dashed: \"border-dashed\",\n dotted: \"border-dotted\",\n} as const;\n\nconst Separator = memo(function Separator({\n orientation = \"horizontal\",\n variant = \"solid\",\n className = \"\",\n ...props\n}: SeparatorProps) {\n const classes = cn(\n \"border-0\",\n \"border-line-default\",\n separatorOrientationClasses[orientation],\n separatorVariantClasses[variant],\n className,\n );\n\n if (orientation === \"vertical\") {\n return (\n <div\n className={classes}\n role=\"separator\"\n aria-orientation=\"vertical\"\n {...(props as HTMLAttributes<HTMLDivElement>)}\n />\n );\n }\n\n return (\n <hr\n className={classes}\n role=\"separator\"\n aria-orientation=\"horizontal\"\n {...props}\n />\n );\n});\n\nSeparator.displayName = \"Separator\";\n\nexport default Separator;\n","import type { HTMLAttributes } from \"react\";\nimport { getRadiusClass } from \"../../tokens/radius\";\nimport { getSpacingClass } from \"../../tokens/spacing\";\nimport { cn } from \"../../utils\";\n\nexport interface SkeletonProps extends HTMLAttributes<HTMLDivElement> {\n variant?: \"text\" | \"card\" | \"list\" | \"circle\";\n width?: string;\n height?: string;\n lines?: number;\n}\n\n/**\n * Skeleton Component\n *\n * A skeleton loader component for displaying loading states.\n *\n * @example\n * ```tsx\n * <Skeleton variant=\"card\" />\n * <Skeleton variant=\"text\" lines={3} />\n * ```\n */\nexport default function Skeleton({\n variant = \"text\",\n width,\n height,\n lines = 1,\n className = \"\",\n \"aria-label\": ariaLabel,\n ...props\n}: SkeletonProps) {\n const baseClasses = [\n \"motion-safe:animate-pulse\",\n \"bg-surface-muted\",\n getRadiusClass(\"sm\"),\n ];\n\n const variantClasses: Record<\n NonNullable<SkeletonProps[\"variant\"]>,\n string\n > = {\n text: \"h-4\",\n card: \"h-32\",\n list: \"h-12\",\n circle: getRadiusClass(\"full\"),\n };\n\n const classes = cn(...baseClasses, variantClasses[variant], className);\n\n const style: React.CSSProperties = {};\n if (width) style.width = width;\n if (height) style.height = height;\n\n const defaultAriaLabel = ariaLabel || `Loading ${variant} content`;\n\n if (variant === \"text\" && lines > 1) {\n return (\n <div\n className={getSpacingClass(\"sm\", \"space-y\")}\n role=\"status\"\n aria-busy=\"true\"\n aria-label={defaultAriaLabel}\n {...props}\n >\n {Array.from({ length: lines }).map((_, index) => (\n <div\n key={index}\n className={classes}\n style={index === lines - 1 ? { width: \"75%\" } : style}\n aria-hidden=\"true\"\n />\n ))}\n </div>\n );\n }\n\n return (\n <div\n className={classes}\n style={style}\n role=\"status\"\n aria-busy=\"true\"\n aria-label={defaultAriaLabel}\n {...props}\n />\n );\n}\n","import type {\n ComponentPropsWithoutRef,\n ElementType,\n HTMLAttributes,\n JSX,\n} from \"react\";\nimport { forwardRef } from \"react\";\nimport { getTypographyClasses } from \"../../tokens/typography\";\nimport { cn } from \"../../utils\";\n\ntype TextColorRole =\n | \"primary\"\n | \"secondary\"\n | \"success\"\n | \"warning\"\n | \"error\"\n | \"info\"\n | \"neutral\";\ntype TextColorShade = \"light\" | \"DEFAULT\" | \"dark\" | \"contrast\";\n\n// Lookup table: literal Tailwind classes so v4 can detect them at build.\n// Brand/feedback DEFAULT cells use semantic tokens; light/dark cells stay\n// primitive (no semantic equivalent for shade variants). Neutral cells\n// use the Phase 7 semantic suggestions (text-fg-{primary,secondary,...}).\nconst TEXT_COLOR_CLASSES: Record<\n TextColorRole,\n Record<TextColorShade, string>\n> = {\n primary: {\n // exception: variant color — no semantic equivalent (Principle 3, .claude/rules/colors.md)\n light: \"text-indigo-400\",\n DEFAULT: \"text-fg-brand\",\n // exception: variant color — no semantic equivalent (Principle 3, .claude/rules/colors.md)\n dark: \"text-indigo-600\",\n contrast: \"text-fg-inverse\",\n },\n secondary: {\n // exception: variant color — no semantic equivalent (Principle 3, .claude/rules/colors.md)\n light: \"text-pink-300\",\n DEFAULT: \"text-fg-brand-secondary\",\n // exception: variant color — no semantic equivalent (Principle 3, .claude/rules/colors.md)\n dark: \"text-pink-600\",\n contrast: \"text-fg-inverse\",\n },\n success: {\n // exception: variant color — no semantic equivalent (Principle 3, .claude/rules/colors.md)\n light: \"text-green-300\",\n DEFAULT: \"text-fg-success\",\n dark: \"text-success-dark\",\n contrast: \"text-fg-inverse\",\n },\n warning: {\n // exception: variant color — no semantic equivalent (Principle 3, .claude/rules/colors.md)\n light: \"text-yellow-300\",\n DEFAULT: \"text-fg-warning\",\n dark: \"text-warning-dark\",\n contrast: \"text-fg-inverse\",\n },\n error: {\n // exception: variant color — no semantic equivalent (Principle 3, .claude/rules/colors.md)\n light: \"text-red-300\",\n DEFAULT: \"text-fg-error\",\n dark: \"text-error-dark\",\n contrast: \"text-fg-inverse\",\n },\n info: {\n // exception: variant color — no semantic equivalent (Principle 3, .claude/rules/colors.md)\n light: \"text-blue-300\",\n DEFAULT: \"text-fg-info\",\n dark: \"text-info-dark\",\n contrast: \"text-fg-inverse\",\n },\n neutral: {\n light: \"text-fg-tertiary\",\n DEFAULT: \"text-fg-secondary\",\n dark: \"text-fg-primary\",\n contrast: \"text-fg-inverse\",\n },\n};\n\nexport interface TextProps<\n T extends ElementType,\n> extends HTMLAttributes<JSX.IntrinsicElements> {\n variant?:\n | \"heading\"\n | \"list\"\n | \"paragraph\"\n | \"body\"\n | \"bodySmall\"\n | \"bodyLarge\"\n | \"caption\"\n | \"label\";\n as?: T;\n bold?: boolean;\n italic?: boolean;\n colorRole?: TextColorRole;\n colorShade?: TextColorShade;\n}\n\ntype ReturnProps<P extends ElementType> = TextProps<P> &\n Omit<ComponentPropsWithoutRef<P>, keyof TextProps<P>>;\n\nfunction TextComponent<T extends ElementType = \"p\">(\n {\n variant = \"paragraph\",\n bold,\n italic,\n className,\n as,\n colorRole = \"neutral\",\n colorShade = \"dark\",\n ...rest\n }: ReturnProps<T>,\n ref: React.Ref<unknown>,\n) {\n const classNames: string[] = [];\n let Tag: ElementType;\n\n if (as) {\n Tag = as;\n } else {\n switch (variant) {\n case \"heading\":\n Tag = \"h2\";\n break;\n case \"list\":\n Tag = \"li\";\n break;\n case \"paragraph\":\n default:\n Tag = \"p\";\n break;\n }\n }\n\n // Apply typography tokens based on variant\n if (variant === \"heading\") {\n classNames.push(getTypographyClasses(\"h2\"));\n } else if (variant === \"body\" || variant === \"paragraph\") {\n classNames.push(getTypographyClasses(\"body\"));\n } else if (variant === \"bodySmall\") {\n classNames.push(getTypographyClasses(\"bodySmall\"));\n } else if (variant === \"bodyLarge\") {\n classNames.push(getTypographyClasses(\"bodyLarge\"));\n } else if (variant === \"caption\") {\n classNames.push(getTypographyClasses(\"caption\"));\n } else if (variant === \"label\") {\n classNames.push(getTypographyClasses(\"label\"));\n } else {\n // Default to body for list and other variants\n classNames.push(getTypographyClasses(\"body\"));\n }\n\n // Override font weight if bold is specified\n if (bold) {\n classNames.push(\"font-bold\");\n }\n\n if (italic) {\n classNames.push(\"italic\");\n }\n\n // Apply color via lookup table. Tailwind v4 needs literal class names\n // at build time, so role/shade resolve to a fixed entry in\n // TEXT_COLOR_CLASSES rather than constructing `text-${...}` dynamically.\n classNames.push(TEXT_COLOR_CLASSES[colorRole][colorShade]);\n\n return <Tag ref={ref} className={cn(...classNames, className)} {...rest} />;\n}\n\n// Use forwardRef with proper typing for polymorphic component\nconst Text = forwardRef(TextComponent) as <T extends ElementType = \"p\">(\n props: ReturnProps<T> & { ref?: React.Ref<HTMLElement> },\n) => JSX.Element;\n\nexport default Text;\n","import React from \"react\";\nimport { cn } from \"../../utils\";\nimport { getSpacingClass } from \"../../tokens/spacing\";\n\nexport interface ContainerProps extends React.HTMLAttributes<HTMLDivElement> {\n /**\n * Maximum width of the container\n * @default 'lg'\n */\n maxWidth?: \"sm\" | \"md\" | \"lg\" | \"xl\" | \"2xl\" | \"full\";\n /**\n * Horizontal padding\n * @default 'base'\n */\n paddingX?: \"xs\" | \"sm\" | \"md\" | \"base\" | \"lg\" | \"xl\";\n /**\n * Vertical padding\n * @default 'base'\n */\n paddingY?: \"xs\" | \"sm\" | \"md\" | \"base\" | \"lg\" | \"xl\";\n /**\n * Center the container content\n * @default true\n */\n center?: boolean;\n}\n\nconst maxWidthClasses = {\n sm: \"max-w-screen-sm\",\n md: \"max-w-screen-md\",\n lg: \"max-w-screen-lg\",\n xl: \"max-w-screen-xl\",\n \"2xl\": \"max-w-screen-2xl\",\n full: \"max-w-full\",\n};\n\n/**\n * Container component for constraining content width and providing consistent padding\n *\n * @example\n * ```tsx\n * <Container maxWidth=\"lg\" paddingX=\"base\">\n * <h1>Content</h1>\n * </Container>\n * ```\n */\nexport const Container = React.forwardRef<HTMLDivElement, ContainerProps>(\n (\n {\n className,\n maxWidth = \"lg\",\n paddingX = \"base\",\n paddingY = \"base\",\n center = true,\n children,\n ...props\n },\n ref,\n ) => {\n return (\n <div\n ref={ref}\n className={cn(\n \"w-full\",\n maxWidthClasses[maxWidth],\n getSpacingClass(paddingX, \"px\"),\n getSpacingClass(paddingY, \"py\"),\n center && \"mx-auto\",\n className,\n )}\n {...props}\n >\n {children}\n </div>\n );\n },\n);\n\nContainer.displayName = \"Container\";\n","import React from \"react\";\nimport { cn } from \"../../utils\";\nimport { getSpacingClass } from \"../../tokens/spacing\";\n\nexport interface StackProps extends React.HTMLAttributes<HTMLDivElement> {\n /**\n * Spacing between children\n * @default 'base'\n */\n spacing?: \"xs\" | \"sm\" | \"md\" | \"base\" | \"lg\" | \"xl\" | \"2xl\";\n /**\n * Alignment of children\n * @default 'stretch'\n */\n align?: \"start\" | \"center\" | \"end\" | \"stretch\";\n /**\n * Justification of children\n * @default 'start'\n */\n justify?: \"start\" | \"center\" | \"end\" | \"between\" | \"around\" | \"evenly\";\n /**\n * Direction of stack\n * @default 'column'\n */\n direction?: \"row\" | \"column\";\n}\n\n/**\n * Stack component for vertical or horizontal layout with consistent spacing\n *\n * @example\n * ```tsx\n * <Stack spacing=\"md\" align=\"center\">\n * <div>Item 1</div>\n * <div>Item 2</div>\n * </Stack>\n * ```\n */\nexport const Stack = React.forwardRef<HTMLDivElement, StackProps>(\n (\n {\n className,\n spacing = \"base\",\n align = \"stretch\",\n justify = \"start\",\n direction = \"column\",\n children,\n ...props\n },\n ref,\n ) => {\n const spacingClass =\n direction === \"column\"\n ? getSpacingClass(spacing, \"gap-y\")\n : getSpacingClass(spacing, \"gap-x\");\n\n const alignClasses = {\n start: \"items-start\",\n center: \"items-center\",\n end: \"items-end\",\n stretch: \"items-stretch\",\n };\n\n const justifyClasses = {\n start: \"justify-start\",\n center: \"justify-center\",\n end: \"justify-end\",\n between: \"justify-between\",\n around: \"justify-around\",\n evenly: \"justify-evenly\",\n };\n\n return (\n <div\n ref={ref}\n className={cn(\n \"flex\",\n direction === \"column\" ? \"flex-col\" : \"flex-row\",\n spacingClass,\n alignClasses[align],\n justifyClasses[justify],\n className,\n )}\n {...props}\n >\n {children}\n </div>\n );\n },\n);\n\nStack.displayName = \"Stack\";\n","\"use client\";\n\nimport type { HTMLAttributes } from \"react\";\nimport { cn } from \"../../utils\";\nimport {\n getSpacingClass,\n getTypographySize,\n getTypographyWeight,\n} from \"../../tokens\";\n\nexport interface BreadcrumbItem {\n label: string;\n href?: string;\n}\n\ninterface Props extends HTMLAttributes<HTMLElement> {\n items: BreadcrumbItem[];\n separator?: string;\n}\n\n/**\n * Breadcrumb Component\n *\n * A breadcrumb navigation component for hierarchical navigation.\n *\n * @example\n * ```tsx\n * <Breadcrumb\n * items={[\n * { label: \"Home\", href: \"/\" },\n * { label: \"Epics\", href: \"/epics\" },\n * { label: \"Epic Details\" }\n * ]}\n * />\n * ```\n */\nexport default function Breadcrumb({\n items,\n separator = \"/\",\n className = \"\",\n ...props\n}: Props) {\n const baseClasses = [\n \"flex\",\n \"items-center\",\n getSpacingClass(\"sm\", \"space-x\"),\n getTypographySize(\"bodySmall\"),\n ];\n\n const classes = cn(...baseClasses, className);\n\n return (\n <nav aria-label=\"Breadcrumb\" className={classes} {...props}>\n <ol\n className={cn(\"flex\", \"items-center\", getSpacingClass(\"sm\", \"space-x\"))}\n >\n {items.map((item, index) => {\n const isLast = index === items.length - 1;\n\n return (\n <li key={index} className=\"flex items-center\">\n {index > 0 && (\n <span\n className={cn(\n getSpacingClass(\"sm\", \"mx\"),\n \"text-fg-tertiary\",\n )}\n aria-hidden=\"true\"\n >\n {separator}\n </span>\n )}\n {isLast ? (\n <span\n className={cn(\n \"text-fg-primary\",\n getTypographyWeight(\"label\"),\n )}\n aria-current=\"page\"\n >\n {item.label}\n </span>\n ) : item.href ? (\n <a\n href={item.href}\n className={cn(\n \"inline-flex\",\n \"items-center\",\n getSpacingClass(\"xs\", \"px\"),\n getSpacingClass(\"xs\", \"pt\"),\n \"border-b-2\",\n \"border-transparent\",\n getTypographySize(\"bodySmall\"),\n getTypographyWeight(\"label\"),\n \"transition-colors\",\n \"text-fg-secondary\",\n \"hover:border-line-emphasis\",\n \"hover:text-fg-primary\",\n )}\n >\n {item.label}\n </a>\n ) : (\n <span className=\"text-fg-secondary\">{item.label}</span>\n )}\n </li>\n );\n })}\n </ol>\n </nav>\n );\n}\n","import { type HTMLAttributes, type ReactNode } from \"react\";\nimport { cn } from \"../../utils\";\nimport { getSpacingClass } from \"../../tokens/spacing\";\n\nexport interface CardHeaderProps extends HTMLAttributes<HTMLDivElement> {\n children: ReactNode;\n}\n\nexport function CardHeader({ children, className, ...props }: CardHeaderProps) {\n return (\n <div\n className={cn(\n \"grid items-start\",\n getSpacingClass(\"1.5\", \"gap\"),\n getSpacingClass(\"base\", \"mb\"),\n \"[&:has([data-card-actions])]:grid-cols-[1fr_auto]\",\n \"[&:has([data-card-actions])>[data-card-actions]]:row-span-full\",\n className,\n )}\n {...props}\n >\n {children}\n </div>\n );\n}\n\nexport default CardHeader;\n","import { type HTMLAttributes, type ReactNode } from \"react\";\nimport { cn } from \"../../utils\";\nimport { getSpacingClass } from \"../../tokens/spacing\";\n\nexport type CardTitleAs = \"h1\" | \"h2\" | \"h3\" | \"h4\" | \"h5\" | \"h6\";\n\nexport interface CardTitleProps extends HTMLAttributes<HTMLHeadingElement> {\n children: ReactNode;\n /**\n * Optional icon rendered before the title text.\n */\n icon?: ReactNode;\n /**\n * Optional badge rendered after the title text.\n */\n badge?: ReactNode;\n /**\n * Heading level. Default `h2` — the typical depth for a card title\n * inside a page that already has an `h1`. Use `h3` (or deeper) when\n * the card sits inside a nested section.\n * @default 'h2'\n */\n as?: CardTitleAs;\n}\n\nexport function CardTitle({\n children,\n icon,\n badge,\n as: As = \"h2\",\n className,\n ...props\n}: CardTitleProps) {\n return (\n <As\n className={cn(\n \"text-base font-semibold text-fg-primary\",\n \"flex items-center\",\n getSpacingClass(\"sm\", \"gap\"),\n className,\n )}\n {...props}\n >\n {icon ? <span className=\"shrink-0 inline-flex\">{icon}</span> : null}\n <span>{children}</span>\n {badge ? <span className=\"inline-flex\">{badge}</span> : null}\n </As>\n );\n}\n\nexport default CardTitle;\n","import { type HTMLAttributes, type ReactNode } from \"react\";\nimport { cn } from \"../../utils\";\n\nexport interface CardSubtitleProps extends HTMLAttributes<HTMLParagraphElement> {\n children: ReactNode;\n}\n\nexport function CardSubtitle({\n children,\n className,\n ...props\n}: CardSubtitleProps) {\n return (\n <p className={cn(\"text-sm text-fg-secondary\", className)} {...props}>\n {children}\n </p>\n );\n}\n\nexport default CardSubtitle;\n","import { type HTMLAttributes, type ReactNode } from \"react\";\nimport { cn } from \"../../utils\";\nimport { getSpacingClass } from \"../../tokens/spacing\";\n\nexport interface CardActionsProps extends HTMLAttributes<HTMLDivElement> {\n children: ReactNode;\n}\n\n/**\n * CardActions — wrapper that hosts consumer-supplied action buttons\n * within a `Card.Header`.\n *\n * The `data-card-actions` attribute is the structural marker `CardHeader`\n * uses (via Tailwind v4 `:has()` selectors) to switch its grid layout\n * from a single column to `[1fr auto]` when actions are present, so\n * Title/Subtitle stack in column 1 and the action row spans both rows\n * in column 2. Consumers should not override this attribute.\n *\n * This component is presentational: it emits no handlers on the DOM\n * itself. The action elements (typically `<Button>`) are consumer-supplied\n * and React's RSC boundary keeps them as client references — the\n * wrapper stays server-safe.\n */\nexport function CardActions({\n children,\n className,\n ...props\n}: CardActionsProps) {\n return (\n <div\n data-card-actions=\"\"\n className={cn(\n \"flex items-center self-start\",\n getSpacingClass(\"sm\", \"gap\"),\n className,\n )}\n {...props}\n >\n {children}\n </div>\n );\n}\n\nexport default CardActions;\n","import { type HTMLAttributes, type ReactNode } from \"react\";\nimport { cn } from \"../../utils\";\n\nexport interface CardBodyProps extends HTMLAttributes<HTMLDivElement> {\n children: ReactNode;\n}\n\nexport function CardBody({ children, className, ...props }: CardBodyProps) {\n return (\n <div className={cn(className)} {...props}>\n {children}\n </div>\n );\n}\n\nexport default CardBody;\n","import { memo, type FC, type HTMLAttributes } from \"react\";\nimport { cn, cva } from \"../../utils\";\nimport { getRadiusClass, getShadowClass, getSpacingClass } from \"../../tokens\";\nimport { CardHeader } from \"./CardHeader\";\nimport { CardTitle } from \"./CardTitle\";\nimport { CardSubtitle } from \"./CardSubtitle\";\nimport { CardActions } from \"./CardActions\";\nimport { CardBody } from \"./CardBody\";\n\n// Ambient declaration so the dev-only warn typechecks without pulling\n// @types/node into the app tsconfig. At runtime the consumer's bundler\n// replaces `process.env.NODE_ENV` with a literal; the `typeof process`\n// guard keeps the branch safe in browser/edge runtimes where `process`\n// doesn't exist. Mirrors the precedent in Button.tsx.\ndeclare const process: { env: { NODE_ENV?: string } };\n\nexport interface CardProps extends HTMLAttributes<HTMLDivElement> {\n variant?: \"default\" | \"hover\" | \"selected\";\n padding?: \"none\" | \"small\" | \"medium\" | \"large\";\n onClick?: () => void;\n \"aria-label\"?: string;\n \"aria-labelledby\"?: string;\n /**\n * Render the root as a semantic `<section>` instead of `<div>`.\n * When `true`, the Card becomes a landmark — a screen-reader-visible\n * region in the document outline — so it MUST carry an accessible\n * name (either `aria-labelledby` pointing to a `Card.Title` `id` or\n * `aria-label`). A dev-only warning is emitted when this contract\n * isn't met; an anonymous landmark hurts navigation by announcing\n * \"region\" without a name.\n * @default false\n */\n asSection?: boolean;\n}\n\n/**\n * Card — versatile container.\n *\n * Supports the compound pattern via dot-notation:\n *\n * ```tsx\n * <Card asSection aria-labelledby=\"parlamentares-title\">\n * <Card.Header>\n * <Card.Title id=\"parlamentares-title\" icon={<Users />} badge={<Badge>Beta</Badge>}>\n * Parlamentares\n * </Card.Title>\n * <Card.Subtitle>Câmara e Senado</Card.Subtitle>\n * <Card.Actions>\n * <Button variant=\"ghost\">Editar</Button>\n * </Card.Actions>\n * </Card.Header>\n * <Card.Body>{children}</Card.Body>\n * </Card>\n * ```\n *\n * Backward compat: the flat form (`<Card>{children}</Card>`) and the\n * interactive form (`<Card onClick={...}>`) are unchanged.\n *\n * Server/client boundary: every subcomponent (Card, Card.Header,\n * Card.Title, Card.Subtitle, Card.Actions, Card.Body) is presentational\n * and ships in `./server`. Interactive children (Button with onClick,\n * Link, etc.) supplied via `<Card.Actions>` cross the RSC boundary\n * naturally — the wrapper stays server-safe.\n */\nfunction CardComponent({\n variant = \"default\",\n padding = \"medium\",\n className = \"\",\n onClick,\n \"aria-label\": ariaLabel,\n \"aria-labelledby\": ariaLabelledBy,\n asSection = false,\n children,\n ...props\n}: CardProps) {\n if (\n typeof process !== \"undefined\" &&\n process.env.NODE_ENV !== \"production\" &&\n asSection &&\n !ariaLabel &&\n !ariaLabelledBy\n ) {\n console.warn(\n \"[Card] `asSection={true}` requires an accessible name. Pass `aria-labelledby` pointing to your Card.Title `id`, or `aria-label`. A <section> without a name is an anonymous landmark that hurts screen-reader navigation.\",\n );\n }\n\n const cardVariants = cva(\n cn(\n \"bg-surface-base\",\n getRadiusClass(\"lg\"),\n \"border\",\n \"border-line-default\",\n getShadowClass(\"sm\"),\n ),\n {\n variants: {\n variant: {\n default: \"\",\n hover: cn(\n `hover:${getShadowClass(\"md\")}`,\n \"transition-shadow\",\n \"cursor-pointer\",\n ),\n selected: cn(\"border-line-brand\", getShadowClass(\"md\")),\n },\n padding: {\n none: \"\",\n small: getSpacingClass(\"xs\", \"p\"),\n medium: getSpacingClass(\"base\", \"p\"),\n large: getSpacingClass(\"lg\", \"p\"),\n },\n },\n defaultVariants: {\n variant: \"default\",\n padding: \"medium\",\n },\n },\n );\n\n // ARIA interactivity is driven by `onClick` ONLY. `variant=\"hover\"` is\n // a visual style (hover shadow + cursor hint via cardVariants) — not a\n // declaration that the card is clickable. The previous coupling made\n // any `variant=\"hover\"` Card a `role=\"button\" tabindex=0` outer, which\n // triggered axe `nested-interactive` whenever the consumer composed\n // Buttons inside. Decoupling fixes that without changing the visual\n // behavior. Stories that want a clickable card already pass `onClick`.\n const isInteractive = onClick !== undefined;\n const role = isInteractive ? \"button\" : undefined;\n const tabIndex = isInteractive ? 0 : undefined;\n\n const classes = cn(cardVariants({ variant, padding }), className);\n\n const handleKeyDown = (e: React.KeyboardEvent<HTMLElement>) => {\n if (isInteractive && (e.key === \"Enter\" || e.key === \" \")) {\n e.preventDefault();\n onClick?.();\n }\n };\n\n // Polymorphic root: <section> when asSection, <div> otherwise. Both\n // accept the same HTMLAttributes via `...props` (HTMLDivElement and\n // HTMLElement attribute sets overlap on the props we use).\n const commonProps = {\n className: classes,\n role,\n tabIndex,\n onClick,\n onKeyDown: isInteractive ? handleKeyDown : undefined,\n \"aria-label\": ariaLabel,\n \"aria-labelledby\": ariaLabelledBy,\n ...props,\n } as const;\n\n if (asSection) {\n return <section {...commonProps}>{children}</section>;\n }\n return <div {...commonProps}>{children}</div>;\n}\n\nconst MemoCard = memo(CardComponent);\nMemoCard.displayName = \"Card\";\n\n// Compound components (dot-notation). Pattern follows Tabs.tsx — define\n// the function, attach subcomponents, cast to a type that exposes them.\ntype CardCompound = FC<CardProps> & {\n Header: typeof CardHeader;\n Title: typeof CardTitle;\n Subtitle: typeof CardSubtitle;\n Actions: typeof CardActions;\n Body: typeof CardBody;\n};\n\nconst Card = MemoCard as unknown as CardCompound;\nCard.Header = CardHeader;\nCard.Title = CardTitle;\nCard.Subtitle = CardSubtitle;\nCard.Actions = CardActions;\nCard.Body = CardBody;\n\nexport default Card;\n","\"use client\";\n\nimport { type HTMLAttributes, type ReactNode } from \"react\";\nimport { getSpacingClass } from \"../../tokens/spacing\";\n\nexport interface DialogHeaderProps extends HTMLAttributes<HTMLDivElement> {\n children: ReactNode;\n}\n\nexport function DialogHeader({\n children,\n className = \"\",\n ...props\n}: DialogHeaderProps) {\n return (\n <div\n className={`flex flex-col ${getSpacingClass(\"1.5\", \"space-y\")} ${getSpacingClass(\"lg\", \"p\")} ${getSpacingClass(\"base\", \"pb\")} ${className}`}\n {...props}\n >\n {children}\n </div>\n );\n}\n","\"use client\";\n\nimport { type HTMLAttributes, type ReactNode } from \"react\";\nimport { getSpacingClass } from \"../../tokens/spacing\";\n\nexport interface DialogFooterProps extends HTMLAttributes<HTMLDivElement> {\n children: ReactNode;\n}\n\nexport function DialogFooter({\n children,\n className = \"\",\n ...props\n}: DialogFooterProps) {\n return (\n <div\n className={`flex flex-col-reverse sm:flex-row sm:justify-end sm:${getSpacingClass(\"sm\", \"space-x\")} ${getSpacingClass(\"lg\", \"p\")} ${getSpacingClass(\"base\", \"pt\")} ${className}`}\n {...props}\n >\n {children}\n </div>\n );\n}\n","\"use client\";\n\nimport { type ReactNode, type HTMLAttributes } from \"react\";\nimport { getSpacingClass } from \"../../tokens/spacing\";\n\nexport interface DrawerHeaderProps extends HTMLAttributes<HTMLDivElement> {\n children: ReactNode;\n}\n\n/**\n * DrawerHeader Component\n *\n * Header section for drawer content.\n *\n * @example\n * ```tsx\n * <DrawerHeader>\n * <h2>Drawer Title</h2>\n * </DrawerHeader>\n * ```\n */\nexport default function DrawerHeader({\n children,\n className = \"\",\n ...props\n}: DrawerHeaderProps) {\n return (\n <div\n className={`\n ${getSpacingClass(\"lg\", \"p\")}\n border-b\n border-line-default\n ${className}\n `}\n {...props}\n >\n {children}\n </div>\n );\n}\n","\"use client\";\n\nimport { type ReactNode, type HTMLAttributes } from \"react\";\nimport { getSpacingClass } from \"../../tokens/spacing\";\n\nexport interface DrawerFooterProps extends HTMLAttributes<HTMLDivElement> {\n children: ReactNode;\n}\n\n/**\n * DrawerFooter Component\n *\n * Footer section for drawer content, typically contains action buttons.\n *\n * @example\n * ```tsx\n * <DrawerFooter>\n * <Button>Save</Button>\n * <Button variant=\"outline\">Cancel</Button>\n * </DrawerFooter>\n * ```\n */\nexport default function DrawerFooter({\n children,\n className = \"\",\n ...props\n}: DrawerFooterProps) {\n return (\n <div\n className={`\n ${getSpacingClass(\"lg\", \"p\")}\n border-t\n border-line-default\n flex\n justify-end\n ${getSpacingClass(\"sm\", \"gap\")}\n ${className}\n `}\n {...props}\n >\n {children}\n </div>\n );\n}\n","import type { HTMLAttributes, ReactNode } from \"react\";\nimport { getSpacingClass } from \"../../tokens/spacing\";\nimport { cn } from \"../../utils\";\n\nexport interface FilterChipsProps extends HTMLAttributes<HTMLDivElement> {\n /**\n * Optional group label rendered as neutral text at the left of the\n * chips (e.g. \"Filtros\"). Deliberately NOT a `<legend>`/`<fieldset>`\n * pair — FilterChips groups navigation/selection chips, not form\n * controls, and fieldset semantics would imply a form that isn't\n * there. When `label` is a plain string it doubles as the group's\n * accessible name (see the aria-label contract in the component\n * JSDoc).\n */\n label?: ReactNode;\n /**\n * The chips. Typically `<Chip>` elements — including the\n * `<Chip asChild><Link/></Chip>` navigation form — but any inline\n * content composes.\n */\n children: ReactNode;\n /**\n * Whether chips wrap to new lines when they overflow the container\n * width. `true` (default) applies `flex-wrap` — the responsive\n * filter-bar behavior; `false` applies `flex-nowrap` and keeps\n * everything on one line (consumer owns overflow handling).\n * @default true\n */\n wrap?: boolean;\n}\n\n/**\n * `FilterChips` — groups `Chip`s into a labeled filter bar.\n *\n * The shell of every chip-based filter row: a `role=\"group\"` container\n * with an optional neutral text label at the left and a flex run of\n * chips that wraps responsively by default. Purely presentational — the\n * interactive identity (select, navigate, remove) lives in each `Chip`\n * (`onClick`/`onRemove`, or `asChild` with a consumer `<Link>`), never\n * in this wrapper.\n *\n * ### Accessible name contract\n *\n * The container carries `role=\"group\"` so assistive technology can\n * announce the chips as one named unit. The accessible name resolves in\n * this order:\n *\n * 1. An explicit `aria-label` OR `aria-labelledby` passed by the\n * consumer always wins — when either is present, no name is derived\n * from `label`, so the consumer's attribute is the only naming on the\n * element (no redundant `aria-label` is left alongside an\n * `aria-labelledby`).\n * 2. Otherwise, when `label` is a non-empty plain string, it is reused\n * as the group's `aria-label` automatically.\n * 3. When `label` is a non-string `ReactNode` (or absent), no\n * `aria-label` is derived — supply `aria-label`/`aria-labelledby`\n * yourself if the group needs a name AT users can identify it by.\n *\n * ### Server-safe\n *\n * Pure presentation — no hooks, no event handlers on the DOM. Ships in\n * the `./server` entry. Consumer-supplied chips may themselves be\n * client components (`<Chip onRemove>`); React's RSC boundary handles\n * that normally, and the zero-JS path (`<Chip asChild><Link/></Chip>`)\n * stays fully server-rendered.\n *\n * @example\n * ```tsx\n * // Navigation filter bar — server-rendered, zero-JS-friendly.\n * <FilterChips label=\"Filtros\">\n * <Chip asChild selected>\n * <Link href=\"?uf=SP\" aria-current=\"page\">UF: SP</Link>\n * </Chip>\n * <Chip asChild>\n * <Link href=\"?partido=PT\">Partido: PT</Link>\n * </Chip>\n * </FilterChips>\n *\n * // Single-line variant (consumer owns horizontal overflow).\n * <FilterChips label=\"Período\" wrap={false}>\n * <Chip>2024</Chip>\n * <Chip>2025</Chip>\n * </FilterChips>\n * ```\n */\nexport function FilterChips({\n label,\n children,\n wrap = true,\n className,\n ...props\n}: FilterChipsProps) {\n // The string label doubles as the group's accessible name — but only\n // when the consumer supplies no naming of their own. An explicit\n // `aria-label` OR `aria-labelledby` (both spread onto the root below)\n // takes precedence; deriving a name alongside `aria-labelledby` would\n // leave a redundant `aria-label` on the element, so suppress it here\n // rather than relying on ARIA name-computation precedence to hide it.\n const hasConsumerName =\n props[\"aria-label\"] != null || props[\"aria-labelledby\"] != null;\n const derivedAriaLabel =\n !hasConsumerName && typeof label === \"string\" && label !== \"\"\n ? label\n : undefined;\n\n return (\n <div\n role=\"group\"\n aria-label={derivedAriaLabel}\n className={cn(\n \"flex items-center\",\n wrap ? \"flex-wrap\" : \"flex-nowrap\",\n getSpacingClass(\"sm\", \"gap\"),\n className,\n )}\n {...props}\n >\n {label ? (\n // shrink-0 keeps the label a stable leading unit: in the wrapping\n // flex run it must not be squeezed or mid-word-wrapped when the\n // chips overflow — it stays on one line and the chips wrap around it.\n <span className=\"shrink-0 text-fg-secondary text-sm\">{label}</span>\n ) : null}\n {children}\n </div>\n );\n}\n\nexport default FilterChips;\n","/**\n * HeaderActions Component\n *\n * Actions slot component for Header (typically buttons, user menu, etc.).\n *\n * @see EPIC-002: Header Component\n * @see RFC-003: Header Composition Pattern (APPROVED)\n */\n\n\"use client\";\n\nimport { type ReactNode } from \"react\";\nimport { cn } from \"../../../utils\";\nimport { getSpacingClass } from \"../../../tokens/spacing\";\n\nexport interface HeaderActionsProps {\n /**\n * Actions content (typically Button components)\n */\n children: ReactNode;\n\n /**\n * Additional CSS classes\n */\n className?: string;\n}\n\n/**\n * HeaderActions Component\n *\n * Actions slot for Header. Typically contains Button components or user menu.\n *\n * @example\n * ```tsx\n * <Header.Actions>\n * <Button variant=\"outline\">Sign In</Button>\n * <Button variant=\"primary\">Sign Up</Button>\n * </Header.Actions>\n * ```\n */\nexport function HeaderActions({ children, className }: HeaderActionsProps) {\n return (\n <div\n className={cn(\n \"flex-shrink-0 flex items-center\",\n getSpacingClass(\"sm\", \"gap\"),\n className,\n )}\n >\n {children}\n </div>\n );\n}\n","/**\n * HeaderNavigation Component\n *\n * Navigation slot component for Header.\n *\n * @see EPIC-002: Header Component\n * @see RFC-003: Header Composition Pattern (APPROVED)\n */\n\n\"use client\";\n\nimport { type ReactNode } from \"react\";\nimport { cn } from \"../../../utils\";\nimport { getSpacingClass } from \"../../../tokens/spacing\";\n\nexport interface HeaderNavigationProps {\n /**\n * Navigation content (typically NavLink components)\n */\n children: ReactNode;\n\n /**\n * Additional CSS classes\n */\n className?: string;\n}\n\n/**\n * HeaderNavigation Component\n *\n * Navigation slot for Header. Typically contains NavLink components.\n *\n * @example\n * ```tsx\n * <Header.Navigation>\n * <NavLink href=\"/home\">Home</NavLink>\n * <NavLink href=\"/about\">About</NavLink>\n * </Header.Navigation>\n * ```\n */\nexport function HeaderNavigation({\n children,\n className,\n}: HeaderNavigationProps) {\n return (\n <nav\n className={cn(\n \"flex-1 flex items-center justify-center\",\n getSpacingClass(\"base\", \"gap\"),\n \"hidden md:flex\", // Hidden on mobile, visible on desktop\n className,\n )}\n aria-label=\"Main navigation\"\n >\n {children}\n </nav>\n );\n}\n","import { forwardRef } from \"react\";\nimport type { HTMLAttributes, ReactNode } from \"react\";\n// Concrete-source-file import (NOT the `../../primitives` barrel): the barrel\n// re-exports client primitives like Input (useMemo), which would taint the\n// static server-safe analysis of this module and bar it from `./server`.\n// See issue #178 in `.claude/rules/server-entry.md` for the worked example.\nimport Text from \"../../primitives/Text/Text\";\nimport { cn, cva } from \"../../utils\";\nimport { getSpacingClass } from \"../../tokens/spacing\";\n\n// Ambient declaration so the dev-only warn typechecks without pulling\n// @types/node into the app tsconfig; the `typeof process` guard keeps the\n// branch safe in browser/edge runtimes where `process` doesn't exist. At\n// runtime the consumer's bundler replaces `process.env.NODE_ENV` with a\n// literal. Mirrors the precedent in Card.tsx / Button.tsx.\ndeclare const process: { env: { NODE_ENV?: string } };\n\n/**\n * Visual treatment of the hero surface.\n *\n * - `plain` — no decorative background; the hero is text + padding on\n * whatever surface it sits on.\n * - `gradient` — a soft brand→secondary wash (theme-aware, see\n * `utilities/gradients.css`).\n * - `gradient-glow` — the same wash plus a brand-colored outer glow for\n * top-of-funnel emphasis (landing / home).\n */\nexport type HeroSectionVariant = \"plain\" | \"gradient\" | \"gradient-glow\";\n\n/** Block alignment of the hero content. */\nexport type HeroSectionAlign = \"start\" | \"center\";\n\nexport interface HeroSectionProps\n // `title` is omitted from the inherited DOM attributes because the native\n // `title` attribute is typed `string`, which is incompatible with our\n // `ReactNode` title slot. Everything else (id, aria-*, data-*, className)\n // still flows through to the root <section>.\n extends Omit<HTMLAttributes<HTMLElement>, \"title\"> {\n /** Eyebrow / kicker above the title (rendered uppercase, brand-colored). */\n kicker?: ReactNode;\n /**\n * The hero title. Rendered as the section's `<h1>`. **Required.**\n *\n * When `title` is a plain string it also becomes the accessible name of\n * the hero `<section>` landmark (the FilterChips `label` pattern). When it\n * is a non-string `ReactNode`, supply `aria-label` or `aria-labelledby`\n * yourself — otherwise the landmark renders without an accessible name and\n * the component emits a dev-only warning.\n */\n title: ReactNode;\n /** Supporting copy below the title (constrained to a readable measure). */\n description?: ReactNode;\n /** Call-to-action slot — typically one or more `<Button>`s. */\n actions?: ReactNode;\n /** Metrics slot — typically a `<StatGroup>` of `<Stat>`s. Spans full width. */\n kpis?: ReactNode;\n /** A line of metadata below everything else (low emphasis). */\n meta?: ReactNode;\n /**\n * Visual treatment of the hero surface.\n * @default 'plain'\n */\n variant?: HeroSectionVariant;\n /**\n * Block alignment of the content.\n * @default 'start'\n */\n align?: HeroSectionAlign;\n /** Additional CSS classes merged onto the root `<section>`. */\n className?: string;\n}\n\n/**\n * HeroSection variants (CVA).\n *\n * The decorative `variant` axis only swaps background / shadow; the `align`\n * axis only swaps text-alignment. Per-block flex alignment (centering the\n * text column, the actions row) is handled by the lookup records below,\n * because those classes land on child elements, not the root.\n */\nconst heroSectionVariants = cva(\n cn(\n \"w-full flex flex-col\",\n getSpacingClass(\"2xl\", \"py\"), // 40px vertical breathing room\n getSpacingClass(\"lg\", \"px\"), // 24px horizontal\n getSpacingClass(\"xl\", \"gap-y\"), // 32px between major blocks\n ),\n {\n variants: {\n variant: {\n plain: \"\",\n gradient: \"hero-gradient\",\n \"gradient-glow\": cn(\"hero-gradient\", \"hero-glow\"),\n },\n align: {\n start: \"text-left\",\n center: \"text-center\",\n },\n },\n defaultVariants: {\n variant: \"plain\",\n align: \"start\",\n },\n },\n);\n\n/** Cross-axis alignment for the inner text column (kicker/title/description). */\nconst blockItems: Record<HeroSectionAlign, string> = {\n start: \"items-start\",\n center: \"items-center\",\n};\n\n/** Main-axis alignment for the actions row. */\nconst actionsJustify: Record<HeroSectionAlign, string> = {\n start: \"justify-start\",\n center: \"justify-center\",\n};\n\n/**\n * `HeroSection` — top-of-page hero: kicker + title + description + actions +\n * kpis + meta, in three visual treatments (`plain` / `gradient` /\n * `gradient-glow`) and two alignments (`start` / `center`).\n *\n * Distinct from `PageHeader` (contextual navigation: breadcrumb + title +\n * actions). The hero is a page/landing **introduction** with a visual\n * identity and slots for KPIs and metadata.\n *\n * ### Slots\n *\n * Every slot except `title` is optional and collapses cleanly when absent —\n * no empty wrapper leaks into the DOM. `kpis` is an opaque slot: pass a\n * `<StatGroup>` (or any node); the consumer chooses the metric layout.\n *\n * ### Landmark & accessible name\n *\n * Renders as a `<section>`. A `<section>` is only exposed as a navigable\n * region when it has an accessible name, so the component derives one:\n * - a string `title` becomes the `aria-label` automatically;\n * - an explicit `aria-label` / `aria-labelledby` from the consumer always\n * wins (and `aria-labelledby` suppresses the derived label to avoid a\n * redundant name);\n * - a non-string `title` with no consumer-supplied name triggers a dev-only\n * `console.warn` (dead-code-eliminated in production builds).\n *\n * ### Server-safe\n *\n * Pure presentation — no hooks, no event handlers on the DOM. Ships in the\n * `./server` entry. Interactive children supplied via `actions` (e.g.\n * `<Button onClick>`) cross the RSC boundary as client references normally.\n *\n * @example\n * ```tsx\n * <HeroSection\n * variant=\"gradient-glow\"\n * align=\"center\"\n * kicker=\"Transparência\"\n * title=\"Acompanhe o Congresso em tempo real\"\n * description=\"Proposições, votações e parlamentares — tudo em um só lugar.\"\n * actions={<Button variant=\"primary\">Começar</Button>}\n * kpis={\n * <StatGroup layout=\"strip\">\n * <Stat value=\"9,4 mil\" label=\"Parlamentares\" align=\"center\" />\n * <Stat value=\"3,2 mil\" label=\"Proposições\" align=\"center\" />\n * </StatGroup>\n * }\n * meta=\"Atualizado diariamente\"\n * />\n * ```\n */\nconst HeroSection = forwardRef<HTMLElement, HeroSectionProps>(\n function HeroSection(\n {\n kicker,\n title,\n description,\n actions,\n kpis,\n meta,\n variant = \"plain\",\n align = \"start\",\n className,\n \"aria-label\": ariaLabel,\n \"aria-labelledby\": ariaLabelledBy,\n ...rest\n },\n ref,\n ) {\n const hasExplicitName = ariaLabel != null || ariaLabelledBy != null;\n const resolvedAriaLabel =\n ariaLabel ?? (typeof title === \"string\" ? title : undefined);\n\n if (\n typeof process !== \"undefined\" &&\n process.env.NODE_ENV !== \"production\" &&\n !hasExplicitName &&\n typeof title !== \"string\"\n ) {\n console.warn(\n \"[HeroSection] A non-string `title` was provided without `aria-label` \" +\n \"or `aria-labelledby`. The hero <section> landmark will have no \" +\n \"accessible name. Pass `aria-label`, or set `aria-labelledby` to \" +\n \"your title's id.\",\n );\n }\n\n return (\n <section\n ref={ref}\n className={cn(heroSectionVariants({ variant, align }), className)}\n aria-label={resolvedAriaLabel}\n aria-labelledby={ariaLabelledBy}\n {...rest}\n >\n {/* Text column — tighter internal rhythm than the major-block gap. */}\n <div\n className={cn(\n \"flex flex-col\",\n getSpacingClass(\"md\", \"gap-y\"),\n blockItems[align],\n )}\n >\n {kicker ? (\n <Text\n as=\"span\"\n variant=\"caption\"\n colorRole=\"primary\"\n colorShade=\"DEFAULT\"\n className=\"text-sm font-semibold tracking-wide uppercase\"\n >\n {kicker}\n </Text>\n ) : null}\n\n <Text\n as=\"h1\"\n variant=\"heading\"\n className=\"text-3xl font-bold tracking-tight sm:text-4xl\"\n >\n {title}\n </Text>\n\n {description ? (\n <Text\n as=\"p\"\n variant=\"body\"\n colorRole=\"neutral\"\n colorShade=\"DEFAULT\"\n className=\"max-w-2xl text-base leading-relaxed sm:text-lg\"\n >\n {description}\n </Text>\n ) : null}\n </div>\n\n {actions ? (\n <div\n className={cn(\n \"flex flex-wrap\",\n getSpacingClass(\"sm\", \"gap\"),\n actionsJustify[align],\n )}\n >\n {actions}\n </div>\n ) : null}\n\n {kpis ? <div className=\"w-full\">{kpis}</div> : null}\n\n {meta ? (\n <Text\n as=\"p\"\n variant=\"caption\"\n colorRole=\"neutral\"\n colorShade=\"light\"\n className=\"text-sm\"\n >\n {meta}\n </Text>\n ) : null}\n </section>\n );\n },\n);\n\nHeroSection.displayName = \"HeroSection\";\n\nexport default HeroSection;\n","\"use client\";\n\nimport { type HTMLAttributes } from \"react\";\nimport { getSpacingClass } from \"../../tokens/spacing\";\n\nexport type MenuSeparatorProps = HTMLAttributes<HTMLDivElement>;\n\n/**\n * MenuSeparator Component\n *\n * A visual separator for menu items.\n *\n * @example\n * ```tsx\n * <MenuSeparator />\n * ```\n */\nexport default function MenuSeparator({\n className = \"\",\n ...props\n}: MenuSeparatorProps) {\n return (\n <div\n role=\"separator\"\n className={`\n h-px\n bg-line-default\n ${getSpacingClass(\"sm\", \"my\")}\n ${className}\n `}\n {...props}\n />\n );\n}\n","\"use client\";\n\nimport { cn } from \"../../../../utils\";\nimport { getSpacingClass } from \"../../../../tokens/spacing\";\nimport type { NavbarSeparatorProps } from \"../../types\";\n\n/**\n * Separator for the Navbar subcomponent\n *\n * Creates visual separation between groups of navigation items.\n *\n * @example\n * ```tsx\n * <SideNavbar.Navbar>\n * <SideNavbar.Navbar.Item icon={<Home />} label=\"Home\" />\n * <SideNavbar.Navbar.Separator />\n * <SideNavbar.Navbar.Item icon={<Settings />} label=\"Settings\" />\n * </SideNavbar.Navbar>\n * ```\n */\nexport default function NavbarSeparator({\n orientation = \"horizontal\",\n className = \"\",\n ...props\n}: NavbarSeparatorProps) {\n if (orientation === \"vertical\") {\n return (\n <div\n className={cn(\"w-px\", \"h-6\", \"bg-line-default\", \"mx-auto\", className)}\n role=\"separator\"\n aria-orientation=\"vertical\"\n {...props}\n />\n );\n }\n\n return (\n <div\n className={cn(\n \"w-full\",\n \"h-px\",\n \"bg-line-default\",\n getSpacingClass(\"sm\", \"my\"), // my-2 (8px) para consistência com gap-2 usado em outros lugares\n \"flex-shrink-0\", // Prevenir que separator encolha\n className,\n )}\n role=\"separator\"\n aria-orientation=\"horizontal\"\n style={{\n // Garantir que separator não seja afetado por transformações\n willChange: \"auto\",\n transform: \"none\",\n }}\n {...props}\n />\n );\n}\n","/**\n * PageHeader Component\n *\n * Page header component with title, description, breadcrumb, and actions.\n *\n * @see EPIC-004: PageHeader Component\n */\n\nimport Breadcrumb from \"../Breadcrumb/Breadcrumb\";\nimport Text from \"../../primitives/Text/Text\";\nimport type { PageHeaderProps } from \"./types\";\nimport { cn, cva } from \"../../utils\";\nimport { getSpacingClass } from \"../../tokens/spacing\";\n\n/**\n * PageHeader Variants using CVA\n * Type-safe variant system for PageHeader component\n */\nconst pageHeaderVariants = cva(\n // Base classes\n cn(\"w-full\", \"flex\", \"flex-col\", getSpacingClass(\"sm\", \"gap\")),\n {\n variants: {\n variant: {\n default: cn(getSpacingClass(\"base\", \"mb\")),\n compact: cn(getSpacingClass(\"sm\", \"mb\")),\n },\n },\n defaultVariants: {\n variant: \"default\",\n },\n },\n);\n\n/**\n * PageHeader Component\n *\n * Page header with title, description, breadcrumb, and actions.\n *\n * @example\n * ```tsx\n * <PageHeader\n * title=\"Page Title\"\n * description=\"Page description\"\n * breadcrumb={[\n * { label: 'Home', href: '/' },\n * { label: 'Page', href: '/page' },\n * ]}\n * actions={<Button>Action</Button>}\n * />\n * ```\n */\nexport function PageHeader({\n title,\n description,\n breadcrumb,\n actions,\n variant = \"default\",\n className,\n ...props\n}: PageHeaderProps) {\n return (\n <div className={cn(pageHeaderVariants({ variant }), className)} {...props}>\n {/* Breadcrumb */}\n {breadcrumb && breadcrumb.length > 0 && <Breadcrumb items={breadcrumb} />}\n\n {/* Title and Actions Row */}\n <div\n className={`flex items-start justify-between ${getSpacingClass(\"base\", \"gap\")}`}\n >\n {/* Title and Description */}\n <div className=\"flex-1 min-w-0\">\n <Text\n variant=\"heading\"\n as=\"h1\"\n className={`${getSpacingClass(\"sm\", \"mb\")} text-2xl font-bold`}\n >\n {title}\n </Text>\n {description && (\n <Text variant=\"body\" className=\"text-fg-secondary\">\n {description}\n </Text>\n )}\n </div>\n\n {/* Actions */}\n {actions && (\n <div\n className={`flex items-center ${getSpacingClass(\"sm\", \"gap\")} flex-shrink-0`}\n >\n {actions}\n </div>\n )}\n </div>\n </div>\n );\n}\n\nexport default PageHeader;\n","import { type HTMLAttributes, type ReactNode } from \"react\";\nimport { cn } from \"../../utils\";\nimport { getSpacingClass } from \"../../tokens/spacing\";\n\nexport type StatTone = \"neutral\" | \"success\" | \"warning\" | \"error\";\nexport type StatAlign = \"start\" | \"center\";\n\nexport interface StatProps extends HTMLAttributes<HTMLDivElement> {\n /**\n * The metric value to display. Strings are rendered verbatim — formatting\n * (number locale, currency, units, relative time, etc.) is the consumer's\n * responsibility, not the design system's. Pass `null` or `undefined` to\n * render the empty-state placeholder (see \"Empty state\" below).\n */\n value: ReactNode;\n /**\n * Short metric label (e.g. \"Votos\", \"Alinhamento\"). Required for screen\n * reader context — the label describes what the value means.\n */\n label: string;\n /**\n * Optional third line of context below the value (e.g. \"no banco\",\n * \"últimos 12 m\", \"+3% no mês\"). The `tone` prop styles THIS line — see\n * `tone` for the contract.\n */\n hint?: ReactNode;\n /**\n * Optional icon rendered above the value (home-style stats use icons;\n * detail-page stats typically don't).\n */\n icon?: ReactNode;\n /**\n * Block alignment. `start` left-aligns label/value/hint (detail-page\n * style); `center` centers them (home-hero style).\n * @default 'start'\n */\n align?: StatAlign;\n /**\n * Semantic tone for the metric — `neutral` for plain stats, the others\n * for classified states (good/warning/bad).\n *\n * **Scope (contract).** Tone affects ONLY the `hint`, not the `value`,\n * `label`, or `icon`. The `value` always renders in `text-fg-primary`\n * regardless of tone; the `label` in `text-fg-secondary`; the `icon` in\n * `text-icon-default`. This is deliberate — a colored value would\n * compete with the label for attention and bias the reader's\n * interpretation of the metric. If a future requirement needs the\n * `value` (or icon) to inherit tone, that becomes a new prop or a\n * semver-bound default change, not a surprise expansion of `tone`.\n *\n * Tone maps directly to the semantic foreground tokens (no new\n * vocabulary): `neutral` → `text-fg-tertiary`, `success` →\n * `text-fg-success`, `warning` → `text-fg-warning`, `error` →\n * `text-fg-error`. See `.claude/rules/colors.md`.\n *\n * @default 'neutral'\n */\n tone?: StatTone;\n}\n\nconst alignClasses: Record<StatAlign, string> = {\n start: \"items-start text-left\",\n center: \"items-center text-center\",\n};\n\nconst toneHintClasses: Record<StatTone, string> = {\n neutral: \"text-fg-tertiary\",\n success: \"text-fg-success\",\n warning: \"text-fg-warning\",\n error: \"text-fg-error\",\n};\n\n/**\n * `Stat` — a single statistic block (icon? + value + label + hint?).\n *\n * Composes with `StatGroup` (1-px-divider strip or grid) but is also\n * valid standalone — a single `Stat` outside a group is a legitimate use\n * case for a hero metric.\n *\n * ### Empty state contract\n *\n * When `value` is `null` OR `undefined`, the component renders the\n * em-dash placeholder `—` (U+2014) with `aria-label=\"No data\"` on its\n * wrapper. The label is intentionally hard-coded in English in this\n * version; a screen reader announcing \"No data\" in an otherwise\n * Portuguese app is a known inconsistency accepted for now — if i18n\n * becomes a requirement, an `emptyLabel?: string` prop will be added in\n * a follow-up PR (semver-safe addition).\n *\n * Other falsy values — `0`, `\"\"`, `false`, an empty fragment — are\n * **legitimate values** and render as-is. The empty trigger is only\n * `null`/`undefined`, because `0` (count = zero) is meaningful data that\n * the consumer would not want masked.\n *\n * ### Server-safe\n *\n * Pure presentation — no hooks, no event handlers on the DOM. Ships in\n * the `./server` entry alongside `StatGroup`. Consumer-supplied `icon`\n * may itself be a client component; React's RSC boundary handles that\n * normally.\n *\n * @example\n * ```tsx\n * // Home-style (centered, with icon)\n * <Stat\n * icon={<Users size={20} aria-hidden=\"true\" />}\n * value=\"9,4 mil\"\n * label=\"Parlamentares\"\n * align=\"center\"\n * />\n *\n * // Detail-page-style (start-aligned, with hint)\n * <Stat\n * value=\"87%\"\n * label=\"Alinhamento\"\n * hint=\"últimos 12 meses\"\n * tone=\"success\"\n * />\n * ```\n */\nexport function Stat({\n value,\n label,\n hint,\n icon,\n align = \"start\",\n tone = \"neutral\",\n className,\n ...props\n}: StatProps) {\n const isEmpty = value === null || value === undefined;\n\n return (\n <div\n className={cn(\n \"bg-surface-base flex-1 flex flex-col\",\n getSpacingClass(\"base\", \"p\"),\n getSpacingClass(\"xs\", \"gap-y\"),\n alignClasses[align],\n className,\n )}\n {...props}\n >\n {icon ? (\n <span className=\"text-icon-default inline-flex\">{icon}</span>\n ) : null}\n {isEmpty ? (\n <span\n aria-label=\"No data\"\n className=\"text-fg-tertiary text-2xl font-semibold leading-tight\"\n >\n —\n </span>\n ) : (\n <span className=\"text-fg-primary text-2xl font-semibold leading-tight\">\n {value}\n </span>\n )}\n <span className=\"text-fg-secondary text-sm\">{label}</span>\n {hint ? (\n <span className={cn(\"text-xs\", toneHintClasses[tone])}>{hint}</span>\n ) : null}\n </div>\n );\n}\n\nexport default Stat;\n","import { type HTMLAttributes, type ReactNode } from \"react\";\nimport { cn } from \"../../utils\";\nimport { getRadiusClass } from \"../../tokens/radius\";\nimport { getSpacingClass } from \"../../tokens/spacing\";\n\nexport type StatGroupLayout = \"strip\" | \"grid\";\nexport type StatGroupCols = 2 | 3 | 4;\n\nexport interface StatGroupProps extends HTMLAttributes<HTMLDivElement> {\n /**\n * `strip` — single horizontal row, no wrap. Each `Stat` shares the row\n * width via `flex-1`. Use when you guarantee the horizontal space\n * (hero areas, wide dashboards). On narrow viewports the row does NOT\n * reflow — choose `grid` if you need responsive collapse.\n *\n * `grid` — multi-column grid that reflows. Always 2-up on mobile,\n * expands to `cols` columns at the `md` breakpoint (768 px) and up.\n * Five or more children spill to a second row with the divider lines\n * preserved.\n *\n * @default 'grid'\n */\n layout?: StatGroupLayout;\n /**\n * Desktop column count (≥ 768 px). Only effective in `layout=\"grid\"`;\n * ignored in `layout=\"strip\"`. Mobile is always 2 columns regardless.\n *\n * @default 4\n */\n cols?: StatGroupCols;\n /**\n * Optional slot for a badge that floats centered over the top border of\n * the container. Use when all metrics in the group share a common\n * provenance mark (e.g. a trust badge, data-source seal, tier label).\n *\n * The slot is intentionally opaque — the consumer supplies any ReactNode\n * and owns the badge's styling and a11y. `StatGroup` provides only the\n * positioning, not the badge shape. This is the same convention as the\n * `kicker` slot in `HeroSection` or the `badge` slot in `PageHeader`.\n *\n * ### Layout\n *\n * When `floatingBadge` is supplied the outer container gains\n * `pt-4` (16 px) top padding, which creates a landing zone for the\n * badge's bottom half while keeping the first stat row clear. The badge\n * itself is absolutely centred at `top-4 left-1/2`, then shifted up by\n * `−50%` of its own height so its centre sits on the inner container's\n * top border. This calibration is accurate for badges up to ~32 px tall\n * (a standard `Badge` or small `Chip`). If a taller badge is needed,\n * pass a `className` that increases the top padding to match.\n *\n * ### Reading order\n *\n * The badge node appears in the DOM **before** the stat cells, so screen\n * readers encounter it first — \"Fonte oficial, followed by the metrics\" —\n * which is the correct contextual order.\n *\n * @example\n * ```tsx\n * import { CheckCircle2 } from \"lucide-react\";\n * import { Badge } from \"@fabio.caffarello/react-design-system\";\n *\n * <StatGroup\n * layout=\"strip\"\n * floatingBadge={\n * <Badge variant=\"success\" size=\"sm\">\n * <CheckCircle2 size={10} aria-hidden=\"true\" />\n * Fonte oficial\n * </Badge>\n * }\n * >\n * <Stat icon={<Users />} value=\"726\" label=\"Parlam.\" align=\"center\" />\n * <Stat icon={<FileText />} value=\"28,1 mil\" label=\"Proposições\" align=\"center\" />\n * </StatGroup>\n * ```\n */\n floatingBadge?: ReactNode;\n children: ReactNode;\n}\n\n// Tailwind v4 generates `md:grid-cols-N` for N ∈ {2,3,4} statically from\n// the literal class string. The map below ensures the strings exist\n// verbatim in the source so JIT picks them up.\nconst gridColsMd: Record<StatGroupCols, string> = {\n 2: \"md:grid-cols-2\",\n 3: \"md:grid-cols-3\",\n 4: \"md:grid-cols-4\",\n};\n\n/**\n * `StatGroup` — container for one or more `Stat` blocks with 1-px\n * dividers between them.\n *\n * ### Divider technique\n *\n * The inner container has `bg-line-default` and `gap-px` (1 px); each\n * child `Stat` carries its own `bg-surface-base`. The 1 px of gap exposes\n * the container's background as the divider line, while each cell masks\n * its own area with `bg-surface-base`. Works identically for the strip\n * layout (vertical dividers) and the grid layout (vertical AND horizontal\n * dividers, automatically, as the grid reflows). No separate `Divider`\n * component, no per-cell border logic.\n *\n * The inner ring is `border border-line-default` matching the gap color,\n * with `rounded-lg` and `overflow-hidden` clipping the inner cells to the\n * radius. The outer wrapper is `relative` so the optional `floatingBadge`\n * can be absolutely positioned over the inner container's top border.\n *\n * ### Server-safe\n *\n * Pure presentation — no hooks, no event handlers on the DOM. Ships in\n * `./server` alongside `Stat`.\n *\n * @example\n * ```tsx\n * <StatGroup layout=\"strip\">\n * <Stat icon={<Users />} value=\"9,4 mil\" label=\"Parlamentares\" align=\"center\" />\n * <Stat icon={<FileText />} value=\"3,2 mil\" label=\"Proposições\" align=\"center\" />\n * <Stat icon={<Vote />} value=\"1,1 mil\" label=\"Votações\" align=\"center\" />\n * <Stat icon={<Clock />} value=\"há 18 dias\" label=\"Última atualização\" align=\"center\" />\n * </StatGroup>\n *\n * <StatGroup layout=\"grid\" cols={4}>\n * <Stat value=\"87%\" label=\"Alinhamento\" hint=\"últimos 12 m\" tone=\"success\" />\n * <Stat value={null} label=\"Sem orientação\" hint=\"no período\" />\n * <Stat value=\"R$ 187.472,95\" label=\"Gastos\" hint=\"no mandato\" />\n * <Stat value=\"42\" label=\"Votações\" hint=\"no banco\" />\n * </StatGroup>\n * ```\n */\nexport function StatGroup({\n layout = \"grid\",\n cols = 4,\n floatingBadge,\n className,\n children,\n ...props\n}: StatGroupProps) {\n const isGrid = layout === \"grid\";\n\n return (\n <div\n className={cn(\n \"relative\",\n floatingBadge && getSpacingClass(\"base\", \"pt\"),\n className,\n )}\n {...props}\n >\n {floatingBadge ? (\n <div className=\"absolute top-4 left-1/2 -translate-x-1/2 -translate-y-1/2 z-10\">\n {floatingBadge}\n </div>\n ) : null}\n <div\n className={cn(\n \"bg-line-default border border-line-default overflow-hidden gap-px\",\n getRadiusClass(\"lg\"),\n isGrid ? `grid grid-cols-2 ${gridColsMd[cols]}` : \"flex\",\n )}\n >\n {children}\n </div>\n </div>\n );\n}\n\nexport default StatGroup;\n","\"use client\";\n\nimport type { HTMLAttributes } from \"react\";\nimport { getSpacingClass } from \"../../tokens/spacing\";\nimport type { TableColumn } from \"./TableTypes\";\n\nexport interface TableCellProps<\n T = unknown,\n> extends HTMLAttributes<HTMLTableCellElement> {\n column: TableColumn<T>;\n row: T;\n}\n\n/**\n * TableCell Component\n *\n * Renders a table cell (td) for a column.\n * Uses column.render if available, otherwise renders the raw value.\n * Must be used within a Table component.\n */\nexport default function TableCell<\n T extends Record<string, unknown> = Record<string, unknown>,\n>({ column, row, className = \"\", ...props }: TableCellProps<T>) {\n const value = column.key in row ? row[column.key as keyof T] : undefined;\n\n return (\n <td\n className={`${getSpacingClass(\"lg\", \"px\")} ${getSpacingClass(\"base\", \"py\")} whitespace-nowrap text-sm text-fg-primary ${\n column.hiddenOnMobile ? \"hidden md:table-cell\" : \"\"\n } ${className}`}\n {...props}\n >\n {column.render ? column.render(value, row) : String(value ?? \"\")}\n </td>\n );\n}\n","import { forwardRef } from \"react\";\nimport type { ElementType, HTMLAttributes, ReactNode } from \"react\";\nimport { cn, cva } from \"../../utils\";\nimport {\n getRadiusClass,\n getSpacingClass,\n getTypographySize,\n} from \"../../tokens\";\n\n// Ambient declaration so the dev-only warn typechecks without pulling\n// @types/node in; the `typeof process` guard keeps it safe in browser/edge\n// runtimes. Mirrors Card.tsx / HeroSection.tsx.\ndeclare const process: { env: { NODE_ENV?: string } };\n\n/** Visual hierarchy: `default` = primary tab bar, `sub` = nested sub-tabs. */\nexport type TabsAsLinksVariant = \"default\" | \"sub\";\n\n/** A single navigation tab. The active state is decided by the caller. */\nexport interface TabAsLink {\n /** Visible tab label. */\n label: ReactNode;\n /** Destination URL — pre-computed by the caller. */\n href: string;\n /**\n * Whether this tab is the current one. The caller derives it (from\n * `pathname` / `searchParams`); the component does no detection of its own.\n * @default false\n */\n active?: boolean;\n /** Optional leading icon (decorative — rendered `aria-hidden`). */\n icon?: ReactNode;\n /** Optional trailing count (e.g. number of items behind the tab). */\n count?: number;\n}\n\nexport interface TabsAsLinksProps extends HTMLAttributes<HTMLElement> {\n /** The tabs to render, in order. */\n items: TabAsLink[];\n /**\n * Visual hierarchy.\n * @default 'default'\n */\n variant?: TabsAsLinksVariant;\n /**\n * Element/component each tab renders as. Defaults to a plain `<a>` (zero\n * JS, works without hydration). Pass a router link — e.g. Next's `Link` —\n * to keep client-side navigation/prefetch: `linkComponent={Link}`. It\n * receives `href`, `className`, `aria-current`, and `children`.\n * @default 'a'\n */\n linkComponent?: ElementType;\n /** Additional CSS classes merged onto the root `<nav>`. */\n className?: string;\n}\n\n/**\n * Tab-bar container (the `<nav>` track). Only the gap and the track-line\n * weight differ between tiers; the active underline lives on each link.\n */\nconst navVariants = cva(cn(\"flex items-center\", \"border-b\"), {\n variants: {\n variant: {\n default: cn(\"border-line-default\", getSpacingClass(\"base\", \"gap-x\")),\n sub: cn(\"border-line-muted\", getSpacingClass(\"sm\", \"gap-x\")),\n },\n },\n defaultVariants: {\n variant: \"default\",\n },\n});\n\n/**\n * A single tab link. The 2px bottom border with `-mb-px` overlaps the 1px\n * `<nav>` track so the active underline visually replaces the track segment\n * (the classic tab-bar look). `active` and `variant` are independent axes.\n */\nconst tabLinkVariants = cva(\n cn(\n \"relative -mb-px inline-flex items-center\",\n getSpacingClass(\"xs\", \"gap-x\"),\n \"border-b-2 border-transparent\",\n \"transition-colors\",\n \"focus:outline-none\",\n \"focus-visible:ring-2\",\n \"focus-visible:ring-line-focus\",\n \"focus-visible:ring-offset-2\",\n getRadiusClass(\"sm\"),\n ),\n {\n variants: {\n variant: {\n default: cn(\n getSpacingClass(\"sm\", \"px\"),\n getSpacingClass(\"sm\", \"py\"),\n getTypographySize(\"body\"),\n ),\n sub: cn(\n getSpacingClass(\"sm\", \"px\"),\n getSpacingClass(\"xs\", \"py\"),\n getTypographySize(\"bodySmall\"),\n ),\n },\n active: {\n true: cn(\"border-line-brand\", \"text-fg-brand-emphasis\", \"font-medium\"),\n false: cn(\n \"text-fg-secondary\",\n \"hover:text-fg-primary\",\n \"hover:border-line-muted\",\n ),\n },\n },\n compoundVariants: [\n // Sub-tabs sit lower in the hierarchy: lighter resting foreground.\n {\n variant: \"sub\",\n active: false,\n class: cn(\"text-fg-tertiary\", \"hover:text-fg-secondary\"),\n },\n ],\n defaultVariants: {\n variant: \"default\",\n active: false,\n },\n },\n);\n\nconst countClasses = cn(\n \"inline-flex items-center justify-center\",\n getRadiusClass(\"full\"),\n getSpacingClass(\"xs\", \"px\"),\n \"bg-surface-muted text-fg-secondary text-xs\",\n);\n\n/**\n * `TabsAsLinks` — tabs rendered as **navigation links**, with the active tab\n * decided by the caller (from the URL), not by interactive state.\n *\n * This is the server-safe counterpart to the interactive `Tabs` widget. Use\n * it for tab bars whose selection lives in the URL (`?tab=`, `/section`) so\n * they work without JavaScript and survive a shared link. Because each tab is\n * a real link to a distinct destination, the component uses the **navigation**\n * pattern — a named `<nav>` landmark with `aria-current=\"page\"` on the active\n * link — NOT the `role=\"tab\"` widget pattern (which would promise arrow-key\n * semantics that links don't have).\n *\n * ### Accessible name\n *\n * Renders a `<nav>` landmark, which must be named so screen-reader users can\n * tell multiple tab bars apart. Pass `aria-label` (e.g. `\"Painel\"`) or\n * `aria-labelledby`. With neither, a dev-only warning fires (the landmark\n * still renders, just anonymously).\n *\n * ### Server-safe\n *\n * No hooks, no event handlers on the DOM — pure presentation. Ships in the\n * `./server` entry. Defaults to a plain `<a>`; pass `linkComponent={Link}` to\n * keep a router's client-side navigation, which crosses the RSC boundary as a\n * client reference.\n *\n * @example\n * ```tsx\n * // Next App Router — active derived from searchParams in a Server Component\n * <TabsAsLinks\n * aria-label=\"Painel\"\n * linkComponent={Link}\n * items={[\n * { label: \"Visão geral\", href: \"/painel?tab=overview\", active: tab === \"overview\" },\n * { label: \"Alertas\", href: \"/painel?tab=alerts\", active: tab === \"alerts\", count: 3 },\n * ]}\n * />\n * ```\n */\nconst TabsAsLinks = forwardRef<HTMLElement, TabsAsLinksProps>(\n function TabsAsLinks(\n {\n items,\n variant = \"default\",\n linkComponent,\n className,\n \"aria-label\": ariaLabel,\n \"aria-labelledby\": ariaLabelledBy,\n ...rest\n },\n ref,\n ) {\n if (\n typeof process !== \"undefined\" &&\n process.env.NODE_ENV !== \"production\" &&\n !ariaLabel &&\n !ariaLabelledBy\n ) {\n console.warn(\n \"[TabsAsLinks] renders a <nav> landmark and should have an \" +\n 'accessible name. Pass `aria-label` (e.g. \"Painel\") or ' +\n \"`aria-labelledby` — multiple unnamed navs on a page are ambiguous \" +\n \"to screen readers.\",\n );\n }\n\n const LinkComponent: ElementType = linkComponent ?? \"a\";\n\n return (\n <nav\n ref={ref}\n className={cn(navVariants({ variant }), className)}\n aria-label={ariaLabel}\n aria-labelledby={ariaLabelledBy}\n {...rest}\n >\n {items.map((item, index) => (\n <LinkComponent\n key={item.href || index}\n href={item.href}\n aria-current={item.active ? \"page\" : undefined}\n data-active={item.active ? \"true\" : undefined}\n className={tabLinkVariants({ variant, active: !!item.active })}\n >\n {item.icon ? (\n <span aria-hidden=\"true\" className=\"inline-flex shrink-0\">\n {item.icon}\n </span>\n ) : null}\n <span>{item.label}</span>\n {item.count !== undefined ? (\n <span className={countClasses}>{item.count}</span>\n ) : null}\n </LinkComponent>\n ))}\n </nav>\n );\n },\n);\n\nTabsAsLinks.displayName = \"TabsAsLinks\";\n\nexport default TabsAsLinks;\n","\"use client\";\n\nimport type { ReactNode } from \"react\";\nimport { CheckCircle2 } from \"lucide-react\";\nimport { getSpacingClass } from \"../../tokens/spacing\";\nimport { getRadiusClass } from \"../../tokens/radius\";\n\nexport type TimelineOrientation = \"horizontal\" | \"vertical\";\n\nexport interface TimelineItem {\n id: string;\n title: string;\n description?: string;\n content?: ReactNode;\n timestamp?: string;\n icon?: ReactNode;\n status?: \"default\" | \"active\" | \"completed\" | \"error\";\n}\n\nexport interface TimelineProps {\n items: TimelineItem[];\n orientation?: TimelineOrientation;\n className?: string;\n}\n\n/**\n * Timeline Component\n *\n * A timeline component for displaying events in chronological order.\n * Supports horizontal and vertical orientations.\n *\n * @example\n * ```tsx\n * <Timeline\n * items={[\n * { id: '1', title: 'Event 1', description: 'Description 1', timestamp: '2024-01-01' },\n * { id: '2', title: 'Event 2', description: 'Description 2', timestamp: '2024-01-02' },\n * ]}\n * />\n * ```\n */\nexport default function Timeline({\n items,\n orientation = \"vertical\",\n className = \"\",\n}: TimelineProps) {\n if (orientation === \"horizontal\") {\n return (\n <div className={`flex items-start ${className}`}>\n {items.map((item, index) => {\n const status =\n item.status ||\n (index === 0\n ? \"active\"\n : index < items.findIndex((i) => i.status === \"active\")\n ? \"completed\"\n : \"default\");\n const isLast = index === items.length - 1;\n\n return (\n <div key={item.id} className=\"flex items-start flex-1\">\n <div className=\"flex flex-col items-center flex-1\">\n {/* Icon/Indicator */}\n <div\n // data-marker=\"pending\" — see .claude/rules/colors.md\n // \"fg-quaternary: AA-by-construction exception\".\n {...(status === \"default\"\n ? { \"data-marker\": \"pending\" }\n : {})}\n className={`\n flex\n items-center\n justify-center\n w-10\n h-10\n ${getRadiusClass(\"full\")}\n border-2\n ${\n status === \"completed\"\n ? \"bg-success border-success text-fg-inverse\"\n : status === \"active\"\n ? \"bg-surface-brand-strong border-line-brand text-fg-inverse\"\n : status === \"error\"\n ? \"bg-error border-error text-fg-inverse\"\n : \"bg-surface-base border-line-emphasis text-fg-quaternary\"\n }\n `}\n >\n {item.icon ||\n (status === \"completed\" ? (\n <CheckCircle2 className=\"h-4 w-4\" />\n ) : (\n index + 1\n ))}\n </div>\n\n {/* Connector Line */}\n {!isLast && (\n <div\n className={`\n w-full\n h-0.5\n ${getSpacingClass(\"sm\", \"mt\")}\n ${status === \"completed\" ? \"bg-success\" : \"bg-line-emphasis\"}\n `}\n />\n )}\n\n {/* Content */}\n <div\n className={`${getSpacingClass(\"base\", \"mt\")} text-center ${getSpacingClass(\"base\", \"px\")}`}\n >\n {item.timestamp && (\n <p\n className={`text-xs text-fg-tertiary ${getSpacingClass(\"xs\", \"mb\")}`}\n >\n {item.timestamp}\n </p>\n )}\n <h3 className=\"text-sm font-semibold text-fg-primary\">\n {item.title}\n </h3>\n {item.description && (\n <p\n className={`text-xs text-fg-secondary ${getSpacingClass(\"xs\", \"mt\")}`}\n >\n {item.description}\n </p>\n )}\n {item.content && (\n <div className={getSpacingClass(\"sm\", \"mt\")}>\n {item.content}\n </div>\n )}\n </div>\n </div>\n </div>\n );\n })}\n </div>\n );\n }\n\n // Vertical orientation\n return (\n <div className={`${getSpacingClass(\"none\", \"space-y\")} ${className}`}>\n {items.map((item, index) => {\n const status =\n item.status ||\n (index === 0\n ? \"active\"\n : index < items.findIndex((i) => i.status === \"active\")\n ? \"completed\"\n : \"default\");\n const isLast = index === items.length - 1;\n\n return (\n <div\n key={item.id}\n className={`flex items-start ${getSpacingClass(\"base\", \"gap\")}`}\n >\n {/* Timeline Line & Icon */}\n <div className=\"flex flex-col items-center\">\n <div\n // data-marker=\"pending\" — see .claude/rules/colors.md\n // \"fg-quaternary: AA-by-construction exception\".\n {...(status === \"default\" ? { \"data-marker\": \"pending\" } : {})}\n className={`\n flex\n items-center\n justify-center\n w-10\n h-10\n ${getRadiusClass(\"full\")}\n border-2\n ${\n status === \"completed\"\n ? \"bg-success border-success text-fg-inverse\"\n : status === \"active\"\n ? \"bg-surface-brand-strong border-line-brand text-fg-inverse\"\n : status === \"error\"\n ? \"bg-error border-error text-fg-inverse\"\n : \"bg-surface-base border-line-emphasis text-fg-quaternary\"\n }\n `}\n >\n {item.icon ||\n (status === \"completed\" ? (\n <CheckCircle2 className=\"h-4 w-4\" />\n ) : (\n index + 1\n ))}\n </div>\n {!isLast && (\n <div\n className={`\n w-0.5\n flex-1\n min-h-16\n ${getSpacingClass(\"sm\", \"mt\")}\n ${status === \"completed\" ? \"bg-success\" : \"bg-line-emphasis\"}\n `}\n />\n )}\n </div>\n\n {/* Content */}\n <div className={`flex-1 ${getSpacingClass(\"xl\", \"pb\")}`}>\n {item.timestamp && (\n <p\n className={`text-xs text-fg-tertiary ${getSpacingClass(\"xs\", \"mb\")}`}\n >\n {item.timestamp}\n </p>\n )}\n <h3\n className={`\n text-base\n font-semibold\n ${status === \"active\" ? \"text-fg-brand-emphasis\" : \"text-fg-primary\"}\n `}\n >\n {item.title}\n </h3>\n {item.description && (\n <p\n className={`text-sm text-fg-secondary ${getSpacingClass(\"xs\", \"mt\")}`}\n >\n {item.description}\n </p>\n )}\n {item.content && (\n <div className={getSpacingClass(\"md\", \"mt\")}>\n {item.content}\n </div>\n )}\n </div>\n </div>\n );\n })}\n </div>\n );\n}\n"],"names":["RadiusTokenFactory","size","config","RADIUS_TOKENS","getRadiusClass","SpacingTokenFactory","scale","px","rem","__publicField","SPACING_TOKENS","getSpacingClass","direction","value","TypographyTokenFactory","height","weight","lineHeight","TYPOGRAPHY_TOKENS","getTypographyClasses","variant","token","getTypographySize","getTypographyWeight","cn","inputs","twMerge","clsx","cva","base","variantFn","cvaLib","props","variantClasses","badgeVariants","Badge","memo","forwardRef","_a","ref","_b","style","className","children","ariaLabel","__objRest","classes","accessibleLabel","childProps","jsx","__spreadProps","__spreadValues","setRef","composeRefs","refs","node","hasCleanup","cleanups","cleanup","i","useComposedRefs","React","createSlot","ownerName","Slot2","forwardedRef","slotProps","slottableElement","hasSlottable","newChildren","isLazyComponent","use","maybeSlottable","isSlottable","slottable","child","getSlottableElementFromSlottable","slottableElementRef","getElementRef","composedRef","createSlottableError","createSlotError","mergedProps","mergeProps","Slot","SLOTTABLE_IDENTIFIER","createSlottable","Slottable2","Slottable","child2","overrideProps","propName","slotPropValue","childPropValue","args","result","element","getter","mayWarn","REACT_LAZY_TYPE","isPromiseLike","spinnerVariants","Spinner","label","jsxs","Loader2","buttonVariants","IconWrapper","position","Button","isLoading","loadingText","loadingIcon","leftIcon","rightIcon","fullWidth","asChild","as","disabled","Component","finalAriaLabel","spinnerVariant","spinnerSize","displayLoadingIcon","defaultType","buttonProps","Fragment","chipVariants","Chip","selected","tabIndex","onRemove","onClick","count","useLabelButton","interactive","handleKeyDown","e","hasCount","chipIsBrandFilled","countBadge","labelWithCount","X","dataBadgeVariants","DataBadge","source","tone","icon","rest","hasSource","labelSize","ErrorMessage","message","id","baseClasses","AlertCircle","Info","inputVariants","HelperText","error","success","helperText","errorId","helperId","helperClasses","text","InputBase","rightSlot","type","state","iconSize","iconPosition","inputClasses","labelClasses","labelBaseClasses","labelVariantClasses","Label","ShadowTokenFactory","SHADOW_TOKENS","getShadowClass","progressTrackVariants","progressBarVariants","Progress","max","showLabel","isIndeterminate","percentage","defaultAriaLabel","separatorOrientationClasses","separatorVariantClasses","Separator","orientation","Skeleton","width","lines","_","index","TEXT_COLOR_CLASSES","TextComponent","bold","italic","colorRole","colorShade","classNames","Tag","Text","maxWidthClasses","Container","maxWidth","paddingX","paddingY","center","Stack","spacing","align","justify","spacingClass","alignClasses","justifyClasses","Breadcrumb","items","separator","item","isLast","CardHeader","CardTitle","badge","As","CardSubtitle","CardActions","CardBody","CardComponent","padding","ariaLabelledBy","asSection","cardVariants","isInteractive","role","commonProps","MemoCard","Card","DialogHeader","DialogFooter","DrawerHeader","DrawerFooter","FilterChips","wrap","derivedAriaLabel","HeaderActions","HeaderNavigation","heroSectionVariants","blockItems","actionsJustify","HeroSection","kicker","title","description","actions","kpis","meta","hasExplicitName","resolvedAriaLabel","MenuSeparator","NavbarSeparator","pageHeaderVariants","PageHeader","breadcrumb","toneHintClasses","Stat","hint","isEmpty","gridColsMd","StatGroup","layout","cols","floatingBadge","isGrid","TableCell","column","row","navVariants","tabLinkVariants","countClasses","TabsAsLinks","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W,4BAA4BtC,EAAgB,KAAM,IAAI,CAAC,GAEjE,SAAAmN,EAAK,SAAA,CAAA,EAGV7K,EAAAA,IAAC,KAAA,CACC,UAAW;AAAA;AAAA;AAAA,kBAGT8O,IAAW,SAAW,yBAA2B,iBAAiB;AAAA,gBAGnE,SAAAjE,EAAK,KAAA,CAAA,EAEPA,EAAK,aACJ7K,EAAAA,IAAC,IAAA,CACC,UAAW,6BAA6BtC,EAAgB,KAAM,IAAI,CAAC,GAElE,SAAAmN,EAAK,WAAA,CAAA,EAGTA,EAAK,SACJ7K,MAAC,MAAA,CAAI,UAAWtC,EAAgB,KAAM,IAAI,EACvC,SAAAmN,EAAK,OAAA,CACR,CAAA,CAAA,CAEJ,CAAA,CAAA,EA9EKA,EAAK,EAAA,CAiFhB,CAAC,CAAA,CACH,CAEJ","x_google_ignoreList":[6,7]}
|
|
1
|
+
{"version":3,"file":"index.cjs","sources":["../../src/ui/tokens/radius.ts","../../src/ui/utils/cn.ts","../../src/ui/utils/cva.ts","../../src/ui/primitives/Avatar/AvatarBase.tsx","../../src/ui/tokens/spacing.ts","../../src/ui/tokens/typography.ts","../../src/ui/primitives/Badge/Badge.tsx","../../node_modules/@radix-ui/react-compose-refs/dist/index.mjs","../../node_modules/@radix-ui/react-slot/dist/index.mjs","../../src/ui/primitives/Spinner/Spinner.tsx","../../src/ui/primitives/Button/Button.tsx","../../src/ui/primitives/Chip/Chip.tsx","../../src/ui/primitives/DataBadge/DataBadge.tsx","../../src/ui/primitives/ErrorMessage/ErrorMessage.tsx","../../src/ui/primitives/Info/Info.tsx","../../src/ui/primitives/Input/InputBase.tsx","../../src/ui/primitives/Label/Label.tsx","../../src/ui/tokens/shadows.ts","../../src/ui/primitives/Progress/Progress.tsx","../../src/ui/primitives/Separator/Separator.tsx","../../src/ui/primitives/Skeleton/Skeleton.tsx","../../src/ui/primitives/Text/Text.tsx","../../src/ui/layouts/Container/Container.tsx","../../src/ui/layouts/Stack/Stack.tsx","../../src/ui/components/Breadcrumb/Breadcrumb.tsx","../../src/ui/components/EmptyState/EmptyStateBase.tsx","../../src/ui/components/Card/CardHeader.tsx","../../src/ui/components/Card/CardTitle.tsx","../../src/ui/components/Card/CardSubtitle.tsx","../../src/ui/components/Card/CardActions.tsx","../../src/ui/components/Card/CardBody.tsx","../../src/ui/components/Card/Card.tsx","../../src/ui/components/Dialog/DialogHeader.tsx","../../src/ui/components/Dialog/DialogFooter.tsx","../../src/ui/components/Drawer/DrawerHeader.tsx","../../src/ui/components/Drawer/DrawerFooter.tsx","../../src/ui/components/FilterChips/FilterChips.tsx","../../src/ui/components/Header/components/HeaderActions.tsx","../../src/ui/components/Header/components/HeaderNavigation.tsx","../../src/ui/components/HeroSection/HeroSection.tsx","../../src/ui/components/Menu/MenuSeparator.tsx","../../src/ui/components/SideNavbar/components/Navbar/NavbarSeparator.tsx","../../src/ui/components/PageHeader/PageHeader.tsx","../../src/ui/components/Stat/Stat.tsx","../../src/ui/components/Stat/StatGroup.tsx","../../src/ui/components/Table/TableCell.tsx","../../src/ui/components/TabsAsLinks/TabsAsLinks.tsx","../../src/ui/components/Timeline/Timeline.tsx"],"sourcesContent":["/**\n * Border Radius Tokens\n *\n * Centralized border radius system for consistent rounded corners.\n * Uses Factory Pattern for type-safe token creation.\n */\n\nexport type RadiusSize =\n | \"none\"\n | \"sm\"\n | \"md\"\n | \"lg\"\n | \"xl\"\n | \"2xl\"\n | \"3xl\"\n | \"full\";\n\nexport interface RadiusToken {\n value: number;\n rem: string;\n px: string;\n tailwind: string;\n description: string;\n}\n\n/**\n * Radius Token Factory\n * Creates radius tokens with consistent values\n */\nexport class RadiusTokenFactory {\n /**\n * Create a radius token\n */\n static create(size: RadiusSize): RadiusToken {\n const radiusMap: Record<\n RadiusSize,\n { px: number; tailwind: string; description: string }\n > = {\n none: {\n px: 0,\n tailwind: \"rounded-none\",\n description: \"No border radius\",\n },\n sm: {\n px: 2,\n tailwind: \"rounded-sm\",\n description: \"Small radius (2px) for subtle rounding\",\n },\n md: {\n px: 6,\n tailwind: \"rounded-md\",\n description: \"Medium radius (6px) for buttons and inputs\",\n },\n lg: {\n px: 8,\n tailwind: \"rounded-lg\",\n description: \"Large radius (8px) for cards and containers\",\n },\n xl: {\n px: 12,\n tailwind: \"rounded-xl\",\n description: \"Extra large radius (12px) for prominent elements\",\n },\n \"2xl\": {\n px: 16,\n tailwind: \"rounded-2xl\",\n description: \"2X large radius (16px) for large containers\",\n },\n \"3xl\": {\n px: 24,\n tailwind: \"rounded-3xl\",\n description: \"3X large radius (24px) for very large containers\",\n },\n full: {\n px: 9999,\n tailwind: \"rounded-full\",\n description: \"Full radius for circular elements\",\n },\n };\n\n const config = radiusMap[size];\n return {\n value: config.px,\n rem: `${config.px / 16}rem`,\n px: `${config.px}px`,\n tailwind: config.tailwind,\n description: config.description,\n };\n }\n}\n\n/**\n * Pre-defined radius tokens\n */\nexport const RADIUS_TOKENS = {\n none: RadiusTokenFactory.create(\"none\"),\n sm: RadiusTokenFactory.create(\"sm\"),\n md: RadiusTokenFactory.create(\"md\"),\n lg: RadiusTokenFactory.create(\"lg\"),\n xl: RadiusTokenFactory.create(\"xl\"),\n \"2xl\": RadiusTokenFactory.create(\"2xl\"),\n \"3xl\": RadiusTokenFactory.create(\"3xl\"),\n full: RadiusTokenFactory.create(\"full\"),\n} as const;\n\n/**\n * Helper function to get radius token\n */\nexport function getRadius(size: keyof typeof RADIUS_TOKENS): RadiusToken {\n return RADIUS_TOKENS[size];\n}\n\n/**\n * Helper function to get radius as Tailwind class\n */\nexport function getRadiusClass(size: keyof typeof RADIUS_TOKENS): string {\n return RADIUS_TOKENS[size].tailwind;\n}\n","/**\n * CN Utility - ClassName Merge\n *\n * Utility function for merging classNames with Tailwind conflict resolution.\n * Combines clsx for conditional classes and tailwind-merge for conflict resolution.\n *\n * @example\n * ```tsx\n * cn('base-class', condition && 'conditional-class', className)\n * cn(['class1', 'class2'], { 'class3': true })\n * ```\n */\n\nimport { type ClassValue, clsx } from \"clsx\";\nimport { twMerge } from \"tailwind-merge\";\n\n/**\n * Merges classNames and resolves Tailwind class conflicts.\n *\n * Uses clsx for conditional class handling and tailwind-merge\n * to intelligently merge Tailwind classes, resolving conflicts\n * (e.g., 'p-2' and 'p-4' -> 'p-4').\n *\n * @param inputs - Class values to merge (strings, arrays, objects)\n * @returns Merged className string with conflicts resolved\n *\n * @example\n * ```tsx\n * // Basic usage\n * cn('base-class', 'another-class') // 'base-class another-class'\n *\n * // Conditional classes\n * cn('base', isActive && 'active', className)\n *\n * // Arrays and objects\n * cn(['class1', 'class2'], { 'class3': true, 'class4': false })\n *\n * // Tailwind conflict resolution\n * cn('p-2', 'p-4') // 'p-4' (p-2 is overridden)\n * cn('text-red-500', 'text-blue-500') // 'text-blue-500'\n * ```\n */\nexport function cn(...inputs: ClassValue[]): string {\n return twMerge(clsx(inputs));\n}\n","/**\n * CVA Utility - Class Variance Authority\n *\n * Type-safe utility for creating component variants with compound variants support.\n * Based on class-variance-authority but integrated with our design system.\n *\n * @example\n * ```tsx\n * const buttonVariants = cva('base-class', {\n * variants: {\n * variant: { primary: 'bg-blue-500', secondary: 'bg-gray-500' },\n * size: { sm: 'text-sm', md: 'text-base' }\n * },\n * defaultVariants: { variant: 'primary', size: 'md' }\n * })\n * ```\n */\n\nimport { type VariantProps, cva as cvaLib } from \"class-variance-authority\";\nimport type { ClassValue } from \"clsx\";\nimport { cn } from \"./cn\";\n\n/**\n * Re-export VariantProps for type inference\n */\nexport type { VariantProps };\n\n/**\n * Creates a type-safe variant function with compound variants support.\n *\n * Integrates with our cn() utility for proper Tailwind conflict resolution.\n * This is a thin wrapper around class-variance-authority's cva function\n * that ensures cn() is used for final class merging.\n *\n * @param base - Base classes that always apply\n * @param config - Variant configuration with variants, compoundVariants, and defaultVariants\n * @returns Function that returns className based on variant props\n *\n * @example\n * ```tsx\n * // Simple variants\n * const buttonVariants = cva('base-class', {\n * variants: {\n * variant: {\n * primary: 'bg-blue-500 text-white',\n * secondary: 'bg-gray-500 text-white'\n * },\n * size: {\n * sm: 'px-2 py-1 text-sm',\n * md: 'px-4 py-2 text-base'\n * }\n * },\n * defaultVariants: {\n * variant: 'primary',\n * size: 'md'\n * }\n * });\n *\n * // Usage\n * buttonVariants({ variant: 'primary', size: 'sm' })\n *\n * // Compound variants\n * const badgeVariants = cva('base', {\n * variants: {\n * variant: { success: '', error: '' },\n * style: { solid: '', outline: '' }\n * },\n * compoundVariants: [\n * { variant: 'success', style: 'solid', class: 'bg-green-500' },\n * { variant: 'error', style: 'outline', class: 'border-red-500' }\n * ]\n * });\n * ```\n */\nexport const cva = <T extends Record<string, Record<string, ClassValue>>>(\n base?: ClassValue,\n config?: Parameters<typeof cvaLib<T>>[1],\n) => {\n const variantFn = cvaLib(base, config);\n\n // Wrap to ensure cn() is used for final merge\n return ((props?: Parameters<typeof variantFn>[0]) => {\n const variantClasses = variantFn(props);\n return cn(variantClasses);\n }) as typeof variantFn;\n};\n","import { forwardRef, type HTMLAttributes, type ReactNode } from \"react\";\nimport { getRadiusClass } from \"../../tokens/radius\";\nimport { cn } from \"../../utils\";\n\nexport type AvatarSize = \"xs\" | \"sm\" | \"md\" | \"lg\" | \"xl\" | \"2xl\" | \"3xl\";\n\nexport interface AvatarBaseProps extends Omit<\n HTMLAttributes<HTMLDivElement>,\n \"children\"\n> {\n src?: string;\n alt?: string;\n fallback?: string | ReactNode;\n size?: AvatarSize;\n variant?: \"circle\" | \"square\" | \"rounded\";\n /**\n * Controls the browser's native lazy-loading behaviour for the avatar\n * `<img>`. Set to `\"lazy\"` to defer loading until the avatar is near the\n * viewport — strongly recommended for listings with many off-screen\n * profile images.\n *\n * Has no effect when `src` is absent (no `<img>` is rendered).\n *\n * @default 'eager'\n */\n loading?: \"lazy\" | \"eager\";\n \"aria-label\"?: string;\n}\n\n// Module-level constants so RSC can evaluate these without per-render alloc.\nconst sizeClasses: Record<AvatarSize, string> = {\n xs: \"h-6 w-6 text-xs\",\n sm: \"h-8 w-8 text-sm\",\n md: \"h-10 w-10 text-base\",\n lg: \"h-12 w-12 text-lg\",\n xl: \"h-16 w-16 text-xl\",\n \"2xl\": \"h-24 w-24 text-3xl\",\n \"3xl\": \"h-28 w-28 text-4xl\",\n};\n\nconst variantClasses = {\n circle: getRadiusClass(\"full\"),\n square: getRadiusClass(\"none\"),\n rounded: getRadiusClass(\"md\"),\n};\n\n/**\n * AvatarBase — the **server-safe presentational core** of `Avatar` (issue #250).\n *\n * It holds no React client state (`useState` / `useEffect` / hooks of any\n * kind), so it is importable from\n * `@fabio.caffarello/react-design-system/server` and renders inside React\n * Server Components and zero-JS routes.\n *\n * ### Trade-off vs `Avatar`\n *\n * | Scenario | AvatarBase behaviour |\n * |---------------------------|---------------------------------------------------|\n * | `src` absent / null | Renders initials fallback — fully server-rendered |\n * | `src` present, loads OK | Renders `<img>` — same as `Avatar` |\n * | `src` present, 404s | Browser broken-image; no graceful JS fallback |\n *\n * Use `Avatar` (main entry) when you need the graceful `onError` swap to\n * initials (requires `useState` — client island). Use `AvatarBase` in\n * Server Components and listings that are deliberately zero-JS, where `src`\n * is null for entries without a photo and a graceful 404 fallback is\n * acceptable to forgo.\n *\n * @example\n * ```tsx\n * // Server Component list — zero-JS, initials rendered on server when src is null\n * import { AvatarBase } from \"@fabio.caffarello/react-design-system/server\";\n *\n * export default function ParlamentarCard({ parlamentar }) {\n * return (\n * <AvatarBase\n * src={parlamentar.fotoUrl ?? undefined}\n * fallback={parlamentar.nome}\n * alt={parlamentar.nome}\n * size=\"md\"\n * loading=\"lazy\"\n * />\n * );\n * }\n * ```\n */\nconst AvatarBase = forwardRef<HTMLDivElement, AvatarBaseProps>(\n function AvatarBase(\n {\n src,\n alt,\n fallback,\n size = \"md\",\n variant = \"circle\",\n loading = \"eager\",\n \"aria-label\": ariaLabel,\n className = \"\",\n ...props\n },\n ref,\n ) {\n const showFallback = !src;\n const displayFallback =\n typeof fallback === \"string\"\n ? fallback.toUpperCase().slice(0, 2)\n : fallback;\n\n const defaultAriaLabel = ariaLabel || alt || \"User avatar\";\n\n return (\n <div\n ref={ref}\n className={cn(\n \"relative\",\n \"inline-flex\",\n \"items-center\",\n \"justify-center\",\n \"shrink-0\",\n \"font-medium\",\n \"overflow-hidden\",\n sizeClasses[size],\n variantClasses[variant],\n \"bg-surface-muted\",\n \"text-fg-primary\",\n className,\n )}\n role=\"img\"\n aria-label={defaultAriaLabel}\n {...props}\n >\n {!showFallback && (\n <img\n src={src}\n alt={alt || \"\"}\n loading={loading}\n className={cn(\n \"w-full\",\n \"h-full\",\n \"object-cover\",\n variantClasses[variant],\n )}\n aria-hidden=\"true\"\n />\n )}\n {showFallback && (\n <span\n className={cn(\n \"flex\",\n \"items-center\",\n \"justify-center\",\n \"w-full\",\n \"h-full\",\n variantClasses[variant],\n )}\n aria-hidden=\"true\"\n >\n {displayFallback || \"?\"}\n </span>\n )}\n </div>\n );\n },\n);\n\nAvatarBase.displayName = \"AvatarBase\";\n\nexport default AvatarBase;\n","/**\n * Spacing Tokens\n *\n * Centralized spacing scale based on 4px base unit.\n * Uses Factory Pattern for type-safe token creation.\n */\n\nexport type SpacingScale =\n | 0\n | 0.5\n | 1\n | 1.5\n | 2\n | 2.5\n | 3\n | 3.5\n | 4\n | 5\n | 6\n | 8\n | 10\n | 12\n | 16\n | 20\n | 24\n | 32\n | 40\n | 48\n | 64\n | 80\n | 96;\n\nexport interface SpacingToken {\n value: number;\n rem: string;\n px: string;\n tailwind: string;\n}\n\n/**\n * Spacing Token Factory\n * Creates spacing tokens with consistent naming and values\n */\nexport class SpacingTokenFactory {\n private static readonly BASE_UNIT = 4; // 4px base\n\n /**\n * Create a spacing token from scale value\n */\n static create(scale: SpacingScale): SpacingToken {\n const px = scale * this.BASE_UNIT;\n const rem = px / 16; // 16px = 1rem\n\n return {\n value: px,\n rem: `${rem}rem`,\n px: `${px}px`,\n tailwind: this.getTailwindClass(scale),\n };\n }\n\n /**\n * Get Tailwind class for spacing value\n */\n private static getTailwindClass(scale: SpacingScale): string {\n const tailwindMap: Record<SpacingScale, string> = {\n 0: \"0\",\n 0.5: \"0.5\", // 2px — half-step, used by fine UI (badges, switches, separators)\n 1: \"1\", // 4px\n 1.5: \"1.5\", // 6px — half-step\n 2: \"2\", // 8px\n 2.5: \"2.5\", // 10px — half-step\n 3: \"3\", // 12px\n 3.5: \"3.5\", // 14px — half-step\n 4: \"4\", // 16px\n 5: \"5\", // 20px\n 6: \"6\", // 24px\n 8: \"8\", // 32px\n 10: \"10\", // 40px\n 12: \"12\", // 48px\n 16: \"16\", // 64px\n 20: \"20\", // 80px\n 24: \"24\", // 96px\n 32: \"32\", // 128px\n 40: \"40\", // 160px\n 48: \"48\", // 192px\n 64: \"64\", // 256px\n 80: \"80\", // 320px\n 96: \"96\", // 384px\n };\n\n return tailwindMap[scale] || String(scale);\n }\n}\n\n/**\n * Pre-defined spacing tokens\n */\nexport const SPACING_TOKENS = {\n // Micro spacing (0-14px)\n none: SpacingTokenFactory.create(0),\n \"0.5\": SpacingTokenFactory.create(0.5), // 2px (half-step)\n xs: SpacingTokenFactory.create(1), // 4px\n \"1.5\": SpacingTokenFactory.create(1.5), // 6px (half-step)\n sm: SpacingTokenFactory.create(2), // 8px\n \"2.5\": SpacingTokenFactory.create(2.5), // 10px (half-step)\n md: SpacingTokenFactory.create(3), // 12px\n \"3.5\": SpacingTokenFactory.create(3.5), // 14px (half-step)\n\n // Standard spacing (16-32px)\n base: SpacingTokenFactory.create(4), // 16px\n lg: SpacingTokenFactory.create(6), // 24px\n xl: SpacingTokenFactory.create(8), // 32px\n\n // Large spacing (40-64px)\n \"2xl\": SpacingTokenFactory.create(10), // 40px\n \"3xl\": SpacingTokenFactory.create(12), // 48px\n \"4xl\": SpacingTokenFactory.create(16), // 64px\n\n // Extra large spacing (80px+)\n \"5xl\": SpacingTokenFactory.create(20), // 80px\n \"6xl\": SpacingTokenFactory.create(24), // 96px\n} as const;\n\n/**\n * Helper function to get spacing value\n */\nexport function getSpacing(scale: keyof typeof SPACING_TOKENS): SpacingToken {\n return SPACING_TOKENS[scale];\n}\n\n/**\n * Helper function to get spacing as Tailwind class\n */\nexport function getSpacingClass(\n scale: keyof typeof SPACING_TOKENS,\n direction:\n | \"p\"\n | \"m\"\n | \"px\"\n | \"mx\"\n | \"py\"\n | \"my\"\n | \"pt\"\n | \"mt\"\n | \"pr\"\n | \"mr\"\n | \"pb\"\n | \"mb\"\n | \"pl\"\n | \"ml\"\n | \"gap\"\n | \"gap-x\"\n | \"gap-y\"\n | \"space-x\"\n | \"space-y\" = \"p\",\n): string {\n const token = SPACING_TOKENS[scale];\n const value = token.tailwind;\n\n const prefixMap: Record<string, string> = {\n p: \"p\",\n m: \"m\",\n px: \"px\",\n mx: \"mx\",\n py: \"py\",\n my: \"my\",\n pt: \"pt\",\n mt: \"mt\",\n pr: \"pr\",\n mr: \"mr\",\n pb: \"pb\",\n mb: \"mb\",\n pl: \"pl\",\n ml: \"ml\",\n gap: \"gap\",\n \"gap-x\": \"gap-x\",\n \"gap-y\": \"gap-y\",\n \"space-x\": \"space-x\",\n \"space-y\": \"space-y\",\n };\n\n return `${prefixMap[direction]}-${value}`;\n}\n","/**\n * Typography Tokens\n *\n * Centralized typography system with font families, sizes, weights, and line heights.\n * Uses Factory Pattern for type-safe token creation.\n */\n\nexport type FontFamily = \"sans\" | \"serif\" | \"mono\";\nexport type FontWeight = \"light\" | \"normal\" | \"medium\" | \"semibold\" | \"bold\";\nexport type FontSize =\n | \"2xs\"\n | \"xs\"\n | \"sm\"\n | \"base\"\n | \"lg\"\n | \"xl\"\n | \"2xl\"\n | \"3xl\"\n | \"4xl\"\n | \"5xl\"\n | \"6xl\";\nexport type LineHeight =\n | \"none\"\n | \"tight\"\n | \"snug\"\n | \"normal\"\n | \"relaxed\"\n | \"loose\";\n\nexport interface TypographyToken {\n fontSize: {\n value: number;\n rem: string;\n px: string;\n tailwind: string;\n };\n lineHeight: {\n value: number;\n tailwind: string;\n };\n fontWeight: {\n value: number;\n tailwind: string;\n };\n}\n\nexport interface FontFamilyToken {\n name: string;\n stack: string;\n tailwind: string;\n}\n\nexport interface FontWeightToken {\n value: number;\n tailwind: string;\n}\n\n/**\n * Typography Token Factory\n * Creates typography tokens with consistent values\n */\nexport class TypographyTokenFactory {\n /**\n * Create font size token\n */\n static createFontSize(size: FontSize): TypographyToken[\"fontSize\"] {\n const sizeMap: Record<FontSize, { px: number; tailwind: string }> = {\n \"2xs\": { px: 10, tailwind: \"text-2xs\" }, // micro-text (badge counters, mini chips)\n xs: { px: 12, tailwind: \"text-xs\" },\n sm: { px: 14, tailwind: \"text-sm\" },\n base: { px: 16, tailwind: \"text-base\" },\n lg: { px: 18, tailwind: \"text-lg\" },\n xl: { px: 20, tailwind: \"text-xl\" },\n \"2xl\": { px: 24, tailwind: \"text-2xl\" },\n \"3xl\": { px: 30, tailwind: \"text-3xl\" },\n \"4xl\": { px: 36, tailwind: \"text-4xl\" },\n \"5xl\": { px: 48, tailwind: \"text-5xl\" },\n \"6xl\": { px: 60, tailwind: \"text-6xl\" },\n };\n\n const config = sizeMap[size];\n return {\n value: config.px,\n rem: `${config.px / 16}rem`,\n px: `${config.px}px`,\n tailwind: config.tailwind,\n };\n }\n\n /**\n * Create line height token\n */\n static createLineHeight(height: LineHeight): TypographyToken[\"lineHeight\"] {\n const heightMap: Record<LineHeight, { value: number; tailwind: string }> = {\n none: { value: 1, tailwind: \"leading-none\" },\n tight: { value: 1.25, tailwind: \"leading-tight\" },\n snug: { value: 1.375, tailwind: \"leading-snug\" },\n normal: { value: 1.5, tailwind: \"leading-normal\" },\n relaxed: { value: 1.625, tailwind: \"leading-relaxed\" },\n loose: { value: 2, tailwind: \"leading-loose\" },\n };\n\n const config = heightMap[height];\n return {\n value: config.value,\n tailwind: config.tailwind,\n };\n }\n\n /**\n * Create font weight token\n */\n static createFontWeight(weight: FontWeight): FontWeightToken {\n const weightMap: Record<FontWeight, { value: number; tailwind: string }> = {\n light: { value: 300, tailwind: \"font-light\" },\n normal: { value: 400, tailwind: \"font-normal\" },\n medium: { value: 500, tailwind: \"font-medium\" },\n semibold: { value: 600, tailwind: \"font-semibold\" },\n bold: { value: 700, tailwind: \"font-bold\" },\n };\n\n const config = weightMap[weight];\n return {\n value: config.value,\n tailwind: config.tailwind,\n };\n }\n\n /**\n * Create complete typography token\n */\n static create(\n size: FontSize,\n lineHeight: LineHeight = \"normal\",\n weight: FontWeight = \"normal\",\n ): TypographyToken {\n return {\n fontSize: this.createFontSize(size),\n lineHeight: this.createLineHeight(lineHeight),\n fontWeight: this.createFontWeight(weight),\n };\n }\n}\n\n/**\n * Font family tokens\n */\nexport const FONT_FAMILY_TOKENS: Record<FontFamily, FontFamilyToken> = {\n sans: {\n name: \"sans\",\n stack:\n 'ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, \"Helvetica Neue\", Arial, \"Noto Sans\", sans-serif',\n tailwind: \"font-sans\",\n },\n serif: {\n name: \"serif\",\n stack: 'ui-serif, Georgia, Cambria, \"Times New Roman\", Times, serif',\n tailwind: \"font-serif\",\n },\n mono: {\n name: \"mono\",\n stack:\n 'ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, \"Liberation Mono\", \"Courier New\", monospace',\n tailwind: \"font-mono\",\n },\n} as const;\n\n/**\n * Font weight tokens\n */\nexport const FONT_WEIGHT_TOKENS: Record<FontWeight, FontWeightToken> = {\n light: TypographyTokenFactory.createFontWeight(\"light\"),\n normal: TypographyTokenFactory.createFontWeight(\"normal\"),\n medium: TypographyTokenFactory.createFontWeight(\"medium\"),\n semibold: TypographyTokenFactory.createFontWeight(\"semibold\"),\n bold: TypographyTokenFactory.createFontWeight(\"bold\"),\n} as const;\n\n/**\n * Pre-defined typography tokens for common use cases\n */\nexport const TYPOGRAPHY_TOKENS = {\n // Headings\n h1: TypographyTokenFactory.create(\"4xl\", \"tight\", \"bold\"),\n h2: TypographyTokenFactory.create(\"3xl\", \"tight\", \"bold\"),\n h3: TypographyTokenFactory.create(\"2xl\", \"snug\", \"semibold\"),\n h4: TypographyTokenFactory.create(\"xl\", \"snug\", \"semibold\"),\n h5: TypographyTokenFactory.create(\"lg\", \"normal\", \"medium\"),\n h6: TypographyTokenFactory.create(\"base\", \"normal\", \"medium\"),\n\n // Body text\n body: TypographyTokenFactory.create(\"base\", \"relaxed\", \"normal\"),\n bodySmall: TypographyTokenFactory.create(\"sm\", \"relaxed\", \"normal\"),\n bodyLarge: TypographyTokenFactory.create(\"lg\", \"relaxed\", \"normal\"),\n\n // UI elements\n label: TypographyTokenFactory.create(\"sm\", \"normal\", \"medium\"),\n caption: TypographyTokenFactory.create(\"xs\", \"normal\", \"normal\"),\n button: TypographyTokenFactory.create(\"base\", \"normal\", \"medium\"),\n} as const;\n\n/**\n * Helper function to get typography token\n */\nexport function getTypography(\n variant: keyof typeof TYPOGRAPHY_TOKENS,\n): TypographyToken {\n return TYPOGRAPHY_TOKENS[variant];\n}\n\n/**\n * Helper function to get typography classes as string\n */\nexport function getTypographyClasses(\n variant: keyof typeof TYPOGRAPHY_TOKENS,\n): string {\n const token = TYPOGRAPHY_TOKENS[variant];\n return `${token.fontSize.tailwind} ${token.lineHeight.tailwind} ${token.fontWeight.tailwind}`;\n}\n\n/**\n * Helper function to get only font size class\n */\nexport function getTypographySize(\n variant: keyof typeof TYPOGRAPHY_TOKENS,\n): string {\n return TYPOGRAPHY_TOKENS[variant].fontSize.tailwind;\n}\n\n/**\n * Helper function to get font size class directly from FontSize\n * This is a convenience function for when you just need a size, not a full typography variant\n */\nexport function getTypographySizeFromFontSize(size: FontSize): string {\n return TypographyTokenFactory.createFontSize(size).tailwind;\n}\n\n/**\n * Helper function to get only font weight class\n */\nexport function getTypographyWeight(\n variant: keyof typeof TYPOGRAPHY_TOKENS,\n): string {\n return TYPOGRAPHY_TOKENS[variant].fontWeight.tailwind;\n}\n\n/**\n * Helper function to get font weight class directly from FontWeight\n * This is a convenience function for when you just need a weight, not a full typography variant\n */\nexport function getTypographyWeightFromFontWeight(weight: FontWeight): string {\n return TypographyTokenFactory.createFontWeight(weight).tailwind;\n}\n\n/**\n * Helper function to get only line height class\n */\nexport function getTypographyLineHeight(\n variant: keyof typeof TYPOGRAPHY_TOKENS,\n): string {\n return TYPOGRAPHY_TOKENS[variant].lineHeight.tailwind;\n}\n","import { memo, forwardRef } from \"react\";\nimport type { HTMLAttributes, ReactNode } from \"react\";\nimport { getRadiusClass } from \"../../tokens/radius\";\nimport { getSpacingClass } from \"../../tokens/spacing\";\nimport {\n getTypographySize,\n getTypographyWeight,\n} from \"../../tokens/typography\";\nimport { cn, cva } from \"../../utils\";\n\nexport type BadgeVariant =\n | \"success\"\n | \"warning\"\n | \"error\"\n | \"info\"\n | \"neutral\"\n | \"primary\"\n | \"secondary\";\nexport type BadgeSize = \"sm\" | \"md\" | \"lg\";\nexport type BadgeStyle = \"solid\" | \"outline\";\n\nexport interface BadgeProps extends Omit<\n HTMLAttributes<HTMLSpanElement>,\n \"style\"\n> {\n variant?: BadgeVariant;\n size?: BadgeSize;\n style?: BadgeStyle;\n children: ReactNode;\n \"aria-label\"?: string;\n}\n\n/**\n * Badge Component\n *\n * A versatile badge component for displaying status, priority, and other labels.\n * Uses tokens for consistent theming.\n *\n * @example\n * ```tsx\n * <Badge variant=\"success\">Active</Badge>\n * <Badge variant=\"error\" size=\"lg\">Critical</Badge>\n * <Badge variant=\"info\" style=\"outline\">New</Badge>\n * ```\n */\n// Badge variants using CVA\nconst badgeVariants = cva(\n // Base classes\n cn(\n \"inline-flex\",\n \"items-center\",\n \"justify-center\",\n getTypographyWeight(\"label\"),\n getRadiusClass(\"md\"),\n \"border\",\n ),\n {\n variants: {\n variant: {\n success: \"\",\n warning: \"\",\n error: \"\",\n info: \"\",\n neutral: \"\",\n primary: \"\",\n secondary: \"\",\n },\n size: {\n sm: cn(\n getSpacingClass(\"1.5\", \"px\"),\n getSpacingClass(\"0.5\", \"py\"),\n getTypographySize(\"caption\"),\n ),\n md: cn(\n getSpacingClass(\"sm\", \"px\"),\n getSpacingClass(\"xs\", \"py\"),\n getTypographySize(\"caption\"),\n ),\n lg: cn(\n getSpacingClass(\"sm\", \"px\"),\n getSpacingClass(\"xs\", \"py\"),\n getTypographySize(\"bodySmall\"),\n ),\n },\n style: {\n solid: \"\",\n outline: \"\",\n },\n },\n compoundVariants: [\n // Solid style variants\n {\n variant: \"success\",\n style: \"solid\",\n class: cn(\"bg-success-bg\", \"text-success-dark\", \"border-success\"),\n },\n {\n variant: \"warning\",\n style: \"solid\",\n class: cn(\"bg-warning-bg\", \"text-warning-dark\", \"border-warning\"),\n },\n {\n variant: \"error\",\n style: \"solid\",\n class: cn(\"bg-error-bg\", \"text-error-dark\", \"border-error\"),\n },\n {\n variant: \"info\",\n style: \"solid\",\n class: cn(\"bg-info-bg\", \"text-info-dark\", \"border-info\"),\n },\n {\n variant: \"neutral\",\n style: \"solid\",\n class: cn(\"bg-surface-muted\", \"text-fg-primary\", \"border-line-default\"),\n },\n {\n variant: \"primary\",\n style: \"solid\",\n class: cn(\n \"bg-surface-brand-subtle\",\n \"text-fg-brand-emphasis\",\n \"border-line-brand\",\n ),\n },\n {\n variant: \"secondary\",\n style: \"solid\",\n // bg-pink-300: secondary solid badge — no semantic equivalent\n // (would shift 2 shades to bg-surface-secondary). Kept literal until\n // secondary brand surface palette expands beyond DEFAULT.\n class: cn(\n \"bg-pink-300\",\n \"text-fg-brand-secondary-emphasis\",\n \"border-line-secondary\",\n ),\n },\n // Outline style variants\n {\n variant: \"success\",\n style: \"outline\",\n class: cn(\"bg-transparent\", \"border-success\", \"text-fg-success\"),\n },\n {\n variant: \"warning\",\n style: \"outline\",\n class: cn(\"bg-transparent\", \"border-warning\", \"text-fg-warning\"),\n },\n {\n variant: \"error\",\n style: \"outline\",\n class: cn(\"bg-transparent\", \"border-error\", \"text-fg-error\"),\n },\n {\n variant: \"info\",\n style: \"outline\",\n class: cn(\"bg-transparent\", \"border-info\", \"text-fg-info\"),\n },\n {\n variant: \"neutral\",\n style: \"outline\",\n class: cn(\"bg-transparent\", \"border-line-default\", \"text-fg-secondary\"),\n },\n {\n variant: \"primary\",\n style: \"outline\",\n class: cn(\"bg-transparent\", \"border-line-brand\", \"text-fg-brand\"),\n },\n {\n variant: \"secondary\",\n style: \"outline\",\n class: cn(\n \"bg-transparent\",\n \"border-line-secondary\",\n \"text-fg-brand-secondary\",\n ),\n },\n ],\n defaultVariants: {\n variant: \"neutral\",\n size: \"md\",\n style: \"solid\",\n },\n },\n);\n\nconst Badge = memo(\n forwardRef<HTMLSpanElement, BadgeProps>(function Badge(\n {\n variant = \"neutral\",\n size = \"md\",\n style = \"solid\",\n className = \"\",\n children,\n \"aria-label\": ariaLabel,\n ...props\n },\n ref,\n ) {\n const classes = cn(badgeVariants({ variant, size, style }), className);\n\n // Best-effort accessible name resolution: explicit aria-label wins;\n // string children become the label; single-wrapped string children\n // (e.g. <Badge><span>Active</span></Badge>) are unwrapped one level.\n // Otherwise undefined and the consumer is responsible for naming\n // the badge externally.\n let accessibleLabel: string | undefined;\n if (ariaLabel) {\n accessibleLabel = ariaLabel;\n } else if (typeof children === \"string\") {\n accessibleLabel = children;\n } else if (\n typeof children === \"object\" &&\n children !== null &&\n \"props\" in children\n ) {\n const childProps = (children as { props?: { children?: unknown } }).props;\n if (childProps?.children && typeof childProps.children === \"string\") {\n accessibleLabel = childProps.children;\n }\n }\n\n return (\n <span\n ref={ref}\n role=\"status\"\n aria-label={accessibleLabel}\n className={classes}\n {...props}\n >\n {children}\n </span>\n );\n }),\n);\n\nBadge.displayName = \"Badge\";\n\nexport default Badge;\n","// src/compose-refs.tsx\nimport * as React from \"react\";\nfunction setRef(ref, value) {\n if (typeof ref === \"function\") {\n return ref(value);\n } else if (ref !== null && ref !== void 0) {\n ref.current = value;\n }\n}\nfunction composeRefs(...refs) {\n return (node) => {\n let hasCleanup = false;\n const cleanups = refs.map((ref) => {\n const cleanup = setRef(ref, node);\n if (!hasCleanup && typeof cleanup == \"function\") {\n hasCleanup = true;\n }\n return cleanup;\n });\n if (hasCleanup) {\n return () => {\n for (let i = 0; i < cleanups.length; i++) {\n const cleanup = cleanups[i];\n if (typeof cleanup == \"function\") {\n cleanup();\n } else {\n setRef(refs[i], null);\n }\n }\n };\n }\n };\n}\nfunction useComposedRefs(...refs) {\n return React.useCallback(composeRefs(...refs), refs);\n}\nexport {\n composeRefs,\n useComposedRefs\n};\n//# sourceMappingURL=index.mjs.map\n","// src/slot.tsx\nimport * as React from \"react\";\nimport { useComposedRefs } from \"@radix-ui/react-compose-refs\";\n// @__NO_SIDE_EFFECTS__\nfunction createSlot(ownerName) {\n const Slot2 = React.forwardRef((props, forwardedRef) => {\n let { children, ...slotProps } = props;\n let slottableElement = null;\n let hasSlottable = false;\n const newChildren = [];\n if (isLazyComponent(children) && typeof use === \"function\") {\n children = use(children._payload);\n }\n React.Children.forEach(children, (maybeSlottable) => {\n if (isSlottable(maybeSlottable)) {\n hasSlottable = true;\n const slottable = maybeSlottable;\n let child = \"child\" in slottable.props ? slottable.props.child : slottable.props.children;\n if (isLazyComponent(child) && typeof use === \"function\") {\n child = use(child._payload);\n }\n slottableElement = getSlottableElementFromSlottable(slottable, child);\n newChildren.push(slottableElement?.props?.children);\n } else {\n newChildren.push(maybeSlottable);\n }\n });\n if (slottableElement) {\n slottableElement = React.cloneElement(slottableElement, void 0, newChildren);\n } else if (\n // A `Slottable` was found but it didn't resolve to a single element (e.g.\n // it wrapped multiple elements, text, or a render-prop `child` that\n // wasn't an element). Don't fall back to treating the `Slottable` wrapper\n // itself as the slot target — throw a descriptive error below instead.\n !hasSlottable && React.Children.count(children) === 1 && React.isValidElement(children)\n ) {\n slottableElement = children;\n }\n const slottableElementRef = slottableElement ? getElementRef(slottableElement) : void 0;\n const composedRef = useComposedRefs(forwardedRef, slottableElementRef);\n if (!slottableElement) {\n if (children || children === 0) {\n throw new Error(\n hasSlottable ? createSlottableError(ownerName) : createSlotError(ownerName)\n );\n }\n return children;\n }\n const mergedProps = mergeProps(slotProps, slottableElement.props ?? {});\n if (slottableElement.type !== React.Fragment) {\n mergedProps.ref = forwardedRef ? composedRef : slottableElementRef;\n }\n return React.cloneElement(slottableElement, mergedProps);\n });\n Slot2.displayName = `${ownerName}.Slot`;\n return Slot2;\n}\nvar Slot = /* @__PURE__ */ createSlot(\"Slot\");\nvar SLOTTABLE_IDENTIFIER = Symbol.for(\"radix.slottable\");\n// @__NO_SIDE_EFFECTS__\nfunction createSlottable(ownerName) {\n const Slottable2 = (props) => \"child\" in props ? props.children(props.child) : props.children;\n Slottable2.displayName = `${ownerName}.Slottable`;\n Slottable2.__radixId = SLOTTABLE_IDENTIFIER;\n return Slottable2;\n}\nvar Slottable = /* @__PURE__ */ createSlottable(\"Slottable\");\nvar getSlottableElementFromSlottable = (slottable, child) => {\n if (\"child\" in slottable.props) {\n const child2 = slottable.props.child;\n if (!React.isValidElement(child2)) return null;\n return React.cloneElement(child2, void 0, slottable.props.children(child2.props.children));\n }\n return React.isValidElement(child) ? child : null;\n};\nfunction mergeProps(slotProps, childProps) {\n const overrideProps = { ...childProps };\n for (const propName in childProps) {\n const slotPropValue = slotProps[propName];\n const childPropValue = childProps[propName];\n const isHandler = /^on[A-Z]/.test(propName);\n if (isHandler) {\n if (slotPropValue && childPropValue) {\n overrideProps[propName] = (...args) => {\n const result = childPropValue(...args);\n slotPropValue(...args);\n return result;\n };\n } else if (slotPropValue) {\n overrideProps[propName] = slotPropValue;\n }\n } else if (propName === \"style\") {\n overrideProps[propName] = { ...slotPropValue, ...childPropValue };\n } else if (propName === \"className\") {\n overrideProps[propName] = [slotPropValue, childPropValue].filter(Boolean).join(\" \");\n }\n }\n return { ...slotProps, ...overrideProps };\n}\nfunction getElementRef(element) {\n let getter = Object.getOwnPropertyDescriptor(element.props, \"ref\")?.get;\n let mayWarn = getter && \"isReactWarning\" in getter && getter.isReactWarning;\n if (mayWarn) {\n return element.ref;\n }\n getter = Object.getOwnPropertyDescriptor(element, \"ref\")?.get;\n mayWarn = getter && \"isReactWarning\" in getter && getter.isReactWarning;\n if (mayWarn) {\n return element.props.ref;\n }\n return element.props.ref || element.ref;\n}\nfunction isSlottable(child) {\n return React.isValidElement(child) && typeof child.type === \"function\" && \"__radixId\" in child.type && child.type.__radixId === SLOTTABLE_IDENTIFIER;\n}\nvar REACT_LAZY_TYPE = Symbol.for(\"react.lazy\");\nfunction isLazyComponent(element) {\n return element != null && typeof element === \"object\" && \"$$typeof\" in element && element.$$typeof === REACT_LAZY_TYPE && \"_payload\" in element && isPromiseLike(element._payload);\n}\nfunction isPromiseLike(value) {\n return typeof value === \"object\" && value !== null && \"then\" in value;\n}\nvar createSlotError = (ownerName) => {\n return `${ownerName} failed to slot onto its children. Expected a single React element child or \\`Slottable\\`.`;\n};\nvar createSlottableError = (ownerName) => {\n return `${ownerName} failed to slot onto its \\`Slottable\\`. Expected \\`Slottable\\` to receive a single React element child.`;\n};\nvar use = React[\" use \".trim().toString()];\nexport {\n Slot as Root,\n Slot,\n Slottable,\n createSlot,\n createSlottable\n};\n//# sourceMappingURL=index.mjs.map\n","\"use client\";\n\nimport { memo } from \"react\";\nimport type { HTMLAttributes } from \"react\";\nimport { Loader2 } from \"lucide-react\";\nimport { getSpacingClass } from \"../../tokens/spacing\";\nimport { getTypographySize } from \"../../tokens/typography\";\nimport { cn, cva } from \"../../utils\";\n\nexport type SpinnerSize = \"sm\" | \"md\" | \"lg\";\nexport type SpinnerVariant = \"primary\" | \"secondary\" | \"neutral\";\n\nexport interface SpinnerProps extends HTMLAttributes<HTMLDivElement> {\n size?: SpinnerSize;\n variant?: SpinnerVariant;\n label?: string;\n}\n\n/**\n * Spinner Component\n *\n * A loading spinner component for indicating loading states.\n * Uses Strategy Pattern for different size/variant combinations.\n *\n * @example\n * ```tsx\n * <Spinner size=\"md\" variant=\"primary\" label=\"Loading...\" />\n * ```\n */\n// Spinner variants using CVA\nconst spinnerVariants = cva(\"motion-safe:animate-spin\", {\n variants: {\n size: {\n sm: \"h-4 w-4\",\n md: \"h-5 w-5\",\n lg: \"h-8 w-8\",\n },\n variant: {\n primary: \"text-fg-brand\",\n secondary: \"text-fg-brand-secondary\",\n neutral: \"text-fg-secondary\",\n },\n },\n defaultVariants: {\n size: \"md\",\n variant: \"primary\",\n },\n});\n\nconst Spinner = memo(function Spinner({\n size = \"md\",\n variant = \"primary\",\n label,\n className = \"\",\n ...props\n}: SpinnerProps) {\n return (\n <div\n className={cn(\"inline-flex\", \"items-center\", className)}\n role=\"status\"\n aria-label={label || \"Loading\"}\n aria-live=\"polite\"\n {...props}\n >\n <Loader2\n className={cn(spinnerVariants({ size, variant }))}\n aria-hidden=\"true\"\n />\n {label && (\n <span\n className={cn(\n getSpacingClass(\"sm\", \"ml\"),\n getTypographySize(\"bodySmall\"),\n \"text-fg-secondary\",\n \"sr-only\",\n )}\n >\n {label}\n </span>\n )}\n </div>\n );\n});\n\nSpinner.displayName = \"Spinner\";\n\nexport default Spinner;\n","import { forwardRef, memo } from \"react\";\nimport type { ButtonHTMLAttributes, ReactNode, ElementType } from \"react\";\nimport { Slot, Slottable } from \"@radix-ui/react-slot\";\nimport { getRadiusClass } from \"../../tokens/radius\";\n\n// Ambient declaration so the dev-only warn below typechecks without\n// pulling @types/node into the app tsconfig. At runtime the consumer's\n// bundler (webpack/turbopack/etc.) replaces `process.env.NODE_ENV` with\n// a literal; the `typeof process` guard keeps the branch safe in\n// browser/edge runtimes where `process` doesn't exist.\ndeclare const process: { env: { NODE_ENV?: string } };\nimport { getSpacingClass } from \"../../tokens/spacing\";\nimport {\n getTypographyClasses,\n getTypographySize,\n} from \"../../tokens/typography\";\nimport { cn, cva } from \"../../utils\";\nimport Spinner from \"../Spinner/Spinner\";\n\nexport type ButtonVariant =\n | \"primary\"\n | \"secondary\"\n | \"error\"\n | \"outline\"\n | \"ghost\"\n | \"iconOnly\"\n | \"link\";\nexport type ButtonSize = \"sm\" | \"md\" | \"lg\";\n\nexport interface ButtonProps extends Omit<\n ButtonHTMLAttributes<HTMLButtonElement>,\n \"as\"\n> {\n variant?: ButtonVariant;\n size?: ButtonSize;\n isLoading?: boolean;\n loadingText?: string;\n loadingIcon?: ReactNode;\n leftIcon?: ReactNode;\n rightIcon?: ReactNode;\n fullWidth?: boolean;\n as?: ElementType;\n href?: string;\n target?: string;\n /**\n * When true, render via Radix `Slot`: classes, ARIA, ref and remaining\n * props are projected onto the single child element instead of an\n * intrinsic `<button>`. The child keeps its own element type and props\n * intact — including framework-native props like `<Link href prefetch>`.\n *\n * `asChild` takes precedence over `as`: if both are supplied, `as` is\n * ignored and a dev-only warning is logged.\n *\n * @example\n * ```tsx\n * <Button asChild variant=\"primary\">\n * <Link href=\"/profile\" prefetch>Open profile</Link>\n * </Button>\n * // → <a class=\"…button classes\" href=\"/profile\" data-prefetch>Open profile</a>\n * ```\n */\n asChild?: boolean;\n}\n\n/**\n * Button Variants using CVA\n * Type-safe variant system for Button component\n */\nconst buttonVariants = cva(\n // Base classes\n cn(\n \"inline-flex\",\n \"items-center\",\n \"justify-center\",\n getTypographyClasses(\"button\").split(\" \")[2] || \"font-medium\", // Extract font-medium\n getRadiusClass(\"md\"),\n \"transition-colors\",\n \"focus:outline-none\",\n \"focus:ring-2\",\n \"focus:ring-offset-2\",\n \"disabled:opacity-50\",\n \"disabled:cursor-not-allowed\",\n ),\n {\n variants: {\n variant: {\n primary: cn(\n \"bg-surface-brand-strong\",\n \"text-fg-inverse\",\n \"hover:opacity-90\",\n \"focus:ring-line-brand\",\n ),\n secondary: cn(\n \"bg-surface-secondary\",\n \"text-fg-inverse\",\n \"hover:opacity-90\",\n \"focus:ring-line-secondary\",\n ),\n error: cn(\n \"bg-error\",\n \"text-fg-inverse\",\n \"hover:opacity-90\",\n \"focus:ring-error\",\n ),\n outline: cn(\n \"border-2\",\n \"border-line-default\",\n \"bg-transparent\",\n \"text-fg-primary\",\n \"hover:bg-surface-hover\",\n \"focus:ring-line-focus\",\n ),\n ghost: cn(\n \"bg-transparent\",\n \"text-fg-primary\",\n \"hover:bg-surface-hover\",\n \"focus:ring-line-focus\",\n ),\n iconOnly: cn(\n \"bg-transparent\",\n \"text-fg-primary\",\n \"hover:bg-surface-hover\",\n \"focus:ring-line-focus\",\n getSpacingClass(\"none\", \"p\"),\n ),\n // Textual call-to-action — brand-coloured text, underline on\n // hover, no chrome (no surface, no border). Padding is zeroed\n // out per size in compoundVariants so the bounding box hugs\n // the text (height intrinsic). Issue #156.\n //\n // Focus ring: `focus:ring-line-focus` keeps the same focus\n // family the other no-chrome variants use (ghost, outline,\n // iconOnly). The base's `focus:ring-2` + `focus:ring-offset-2`\n // produce a 2px ring 2px away from the text bounding box; the\n // 2px offset is rendered in surface-base so the ring contrasts\n // against surface (≥3:1 for WCAG 2.4.11, verified) rather than\n // colliding with the brand-coloured text. The element keeps\n // `getRadiusClass(\"md\")` from the base, which is invisible\n // without chrome but rounds the focus ring corners.\n //\n // hover:underline pairs with `underline-offset-4` so the\n // underline that appears on hover sits clear of the descenders\n // (WCAG-aligned with link best practice). At rest the link\n // carries no underline — the brand colour alone signals\n // affordance, matching the shadcn convention this variant is\n // modelled on (see issue body).\n //\n // disabled: inherits opacity-50 + cursor-not-allowed from the\n // base. We do NOT special-case `disabled:no-underline` because\n // a disabled link should still receive the same visual\n // treatment as a disabled chrome variant — the opacity and\n // cursor signal the disabled state.\n link: cn(\n \"bg-transparent\",\n \"text-fg-brand\",\n \"underline-offset-4\",\n \"hover:underline\",\n \"focus:ring-line-focus\",\n ),\n },\n size: {\n sm: cn(\n getSpacingClass(\"md\", \"px\"),\n getSpacingClass(\"1.5\", \"py\"),\n getTypographySize(\"bodySmall\"),\n getSpacingClass(\"1.5\", \"gap\"),\n ),\n md: cn(\n getSpacingClass(\"base\", \"px\"),\n getSpacingClass(\"sm\", \"py\"),\n getTypographySize(\"body\"),\n getSpacingClass(\"sm\", \"gap\"),\n ),\n lg: cn(\n getSpacingClass(\"lg\", \"px\"),\n getSpacingClass(\"md\", \"py\"),\n getTypographySize(\"bodyLarge\"),\n getSpacingClass(\"2.5\", \"gap\"),\n ),\n },\n },\n compoundVariants: [\n // IconOnly variant has different sizing\n {\n variant: \"iconOnly\",\n size: \"sm\",\n class: cn(\"h-8\", \"w-8\", getSpacingClass(\"none\", \"p\")),\n },\n {\n variant: \"iconOnly\",\n size: \"md\",\n class: cn(\"h-10\", \"w-10\", getSpacingClass(\"none\", \"p\")),\n },\n {\n variant: \"iconOnly\",\n size: \"lg\",\n class: cn(\"h-12\", \"w-12\", getSpacingClass(\"none\", \"p\")),\n },\n // Link variant zeroes the size's padding via compoundVariants so\n // the override runs AFTER the size block's `px-N`/`py-N` and\n // twMerge picks the zero value (`cn` joins variant before\n // compound). The size's typography and gap survive — the link's\n // text scales with size and icons still get gap-N when present.\n // Issue #156.\n {\n variant: \"link\",\n size: \"sm\",\n class: cn(getSpacingClass(\"none\", \"px\"), getSpacingClass(\"none\", \"py\")),\n },\n {\n variant: \"link\",\n size: \"md\",\n class: cn(getSpacingClass(\"none\", \"px\"), getSpacingClass(\"none\", \"py\")),\n },\n {\n variant: \"link\",\n size: \"lg\",\n class: cn(getSpacingClass(\"none\", \"px\"), getSpacingClass(\"none\", \"py\")),\n },\n ],\n defaultVariants: {\n variant: \"primary\",\n size: \"md\",\n },\n },\n);\n\n/**\n * Icon Wrapper Component\n * Handles icon spacing and alignment consistently\n */\nfunction IconWrapper({\n children,\n position,\n}: {\n children: ReactNode;\n position: \"left\" | \"right\";\n}) {\n if (!children) return null;\n\n return (\n <span\n className={`inline-flex items-center ${position === \"left\" ? getSpacingClass(\"none\", \"mr\") : getSpacingClass(\"none\", \"ml\")}`}\n >\n {children}\n </span>\n );\n}\n\n/**\n * Button Component\n *\n * A styled button with variants, sizes, and loading states.\n *\n * Polymorphism — two APIs:\n * - `as` (legacy): swap the root element type. `<Button as={Link} href=\"…\">`.\n * - `asChild` (recommended): project Button's styling onto the single\n * child element. Idiomatic Radix Slot pattern, preserves the child's\n * own props and TS type (e.g. `<Link href prefetch>`). When `asChild`\n * is true, `as` is ignored.\n *\n * @example\n * ```tsx\n * // Basic usage\n * <Button variant=\"primary\" size=\"md\" onClick={handleClick}>Click me</Button>\n *\n * // With icons\n * <Button leftIcon={<Icon />} rightIcon={<Icon />}>Action</Button>\n *\n * // Loading state\n * <Button isLoading loadingText=\"Saving...\">Save</Button>\n *\n * // Polymorphic via asChild (preserves Next Link's TS type and native props)\n * <Button asChild variant=\"primary\">\n * <Link href=\"/page\" prefetch>Open</Link>\n * </Button>\n *\n * // Polymorphic via legacy `as`\n * <Button as=\"a\" href=\"/page\">Navigate</Button>\n * ```\n */\nconst Button = memo(\n forwardRef<HTMLButtonElement, ButtonProps>(function Button(\n {\n variant = \"primary\",\n size = \"md\",\n isLoading = false,\n loadingText,\n loadingIcon,\n leftIcon,\n rightIcon,\n fullWidth = false,\n asChild = false,\n as,\n className = \"\",\n disabled = false,\n children,\n \"aria-label\": ariaLabel,\n ...props\n },\n ref,\n ) {\n // asChild wins over `as`. Warn in dev so the precedence is observable\n // instead of being a silent override. Production builds strip this branch.\n if (\n typeof process !== \"undefined\" &&\n process.env.NODE_ENV !== \"production\" &&\n asChild &&\n as !== undefined &&\n as !== \"button\"\n ) {\n console.warn(\n \"[Button] `as` is ignored when `asChild` is true; the child element is used as the root. Drop one of the two props to silence this warning.\",\n );\n }\n\n const Component: ElementType = asChild ? Slot : (as ?? \"button\");\n\n // These were `useMemo` originally — all decorative (class-string\n // concat, small boolean/string/JSX picks), none gating render-driving\n // state. Inlined so Button carries NO React client API and qualifies\n // for the `./server` entry (issue #224), the same de-memoization\n // precedent as Badge/Label/Card in #155. `React.memo` on the\n // component is preserved and still gates re-renders at the\n // consumer-prop boundary; the inlined work is nanoseconds.\n const classes = cn(\n buttonVariants({ variant, size }),\n fullWidth && \"w-full\",\n className,\n );\n\n const isIconOnly =\n variant === \"iconOnly\" || (!children && (leftIcon || rightIcon));\n\n const finalAriaLabel =\n isIconOnly && !ariaLabel && !children\n ? \"Button\" // Fallback, but should be provided\n : ariaLabel;\n\n const spinnerVariant: \"primary\" | \"secondary\" | \"neutral\" =\n variant === \"error\"\n ? \"primary\" // Red buttons use primary spinner (white)\n : variant === \"primary\" || variant === \"secondary\"\n ? \"neutral\" // Colored buttons use neutral spinner\n : \"primary\";\n\n const spinnerSize = size === \"sm\" ? \"sm\" : size === \"lg\" ? \"lg\" : \"md\";\n\n const displayLoadingIcon = loadingIcon || (\n <Spinner size={spinnerSize} variant={spinnerVariant} />\n );\n\n // Build button props (spread props at the end to allow overrides).\n // `type=\"button\"` default applies only when rendering an intrinsic\n // <button>. asChild and `as` (custom) projections leave it off so we\n // don't paint a meaningless `type` attribute onto <a> / <Link>.\n const defaultType =\n !asChild && (as === undefined || as === \"button\") && !props.type\n ? \"button\"\n : undefined;\n const buttonProps = {\n className: classes,\n disabled: disabled || isLoading,\n \"aria-busy\": isLoading,\n \"aria-label\": finalAriaLabel,\n \"aria-disabled\": disabled || isLoading,\n ...(defaultType ? { type: defaultType } : {}),\n ...props,\n };\n\n // asChild path: render Slot with the icons and Slottable as direct\n // sibling children (NOT wrapped in a React.Fragment). Slot's\n // children-processing inspects each direct child for Slottable; if\n // the children are wrapped in a Fragment, Slot's SlotClone merges\n // the projected props into the Fragment itself (a silent no-op for\n // className / aria / ref), and nothing reaches the consumer's\n // element. Hence the two distinct branches below: same content\n // shape, different host element, different child layout.\n if (asChild) {\n return (\n <Component ref={ref} {...buttonProps}>\n {leftIcon && <IconWrapper position=\"left\">{leftIcon}</IconWrapper>}\n <Slottable>{children}</Slottable>\n {rightIcon && <IconWrapper position=\"right\">{rightIcon}</IconWrapper>}\n </Component>\n );\n }\n\n return (\n <Component ref={ref} {...buttonProps}>\n {isLoading ? (\n <>\n {displayLoadingIcon}\n {loadingText && (\n <span className={getSpacingClass(\"sm\", \"ml\")}>{loadingText}</span>\n )}\n {!loadingText && children && (\n <span className={`${getSpacingClass(\"sm\", \"ml\")} opacity-0`}>\n {children}\n </span>\n )}\n </>\n ) : (\n <>\n {leftIcon && <IconWrapper position=\"left\">{leftIcon}</IconWrapper>}\n {children}\n {rightIcon && (\n <IconWrapper position=\"right\">{rightIcon}</IconWrapper>\n )}\n </>\n )}\n </Component>\n );\n }),\n);\n\nButton.displayName = \"Button\";\n\nexport default Button;\nexport { Button };\n","\"use client\";\n\nimport { forwardRef, type ReactNode } from \"react\";\nimport { X } from \"lucide-react\";\nimport { Slot } from \"@radix-ui/react-slot\";\nimport { getRadiusClass } from \"../../tokens/radius\";\nimport { getSpacingClass } from \"../../tokens/spacing\";\nimport {\n getTypographySize,\n getTypographyWeight,\n} from \"../../tokens/typography\";\nimport { cn, cva } from \"../../utils\";\n\nexport type ChipVariant = \"default\" | \"outlined\" | \"filled\";\nexport type ChipSize = \"sm\" | \"md\" | \"lg\";\n\ninterface ChipBaseProps {\n children: ReactNode;\n variant?: ChipVariant;\n size?: ChipSize;\n selected?: boolean;\n disabled?: boolean;\n className?: string;\n \"aria-label\"?: string;\n tabIndex?: number;\n}\n\ninterface ChipStandardProps extends ChipBaseProps {\n asChild?: false;\n onRemove?: () => void;\n onClick?: () => void;\n /**\n * Optional count sub-badge rendered at the end of the chip (before the\n * remove ✕, if any) — e.g. `Casa 12`, `Tramitando 340` in a filter bar.\n *\n * The sub-badge inverts with the chip surface so it always contrasts:\n * a brand pill on neutral chips, a light pill on brand chips\n * (`selected` / `variant=\"filled\"`). The number is folded into the\n * interactive chip's accessible name (`\"Casa, 12\"`) so AT users hear\n * it; pass an explicit `aria-label` to override that phrasing.\n *\n * Forbidden in the `asChild` form (the consumer composes the node).\n * `0` is a legitimate value and renders `0`; omit the prop for \"no\n * count\".\n */\n count?: number;\n}\n\n/**\n * `asChild` collapses the chip into a single node provided by the\n * consumer (typically `<Link>`). The non-interactive frame + inner\n * label-button + X structure is intentionally NOT rendered — the child\n * IS the chip. As a consequence:\n *\n * - `onClick` and `onRemove` are forbidden at the type level. The\n * child's own click handler (and `href`) is what fires; consumers\n * who need a removable selected filter use the standard\n * (non-asChild) form.\n * - `selected` still applies the visual classes via `chipVariants`,\n * but NO `aria-pressed` is emitted. Toggle-button semantics on\n * `<a>` would lie — a link isn't a two-state control. Consumers\n * that need the selected route surfaced to AT users should pass\n * `aria-current=\"page\"` (or similar) directly on the child Link.\n *\n * @see `.claude/rules/components.md` and the inline a11y notes below.\n */\ninterface ChipAsChildProps extends ChipBaseProps {\n asChild: true;\n /**\n * `onClick` is forbidden when `asChild` is true — the child element\n * owns interaction. Pass the handler (or `href`) on the child.\n */\n onClick?: never;\n /**\n * `onRemove` is forbidden when `asChild` is true — the collapsed\n * node has no slot for an X button. Use the standard (non-asChild)\n * form when removal is required.\n */\n onRemove?: never;\n /**\n * `count` is forbidden when `asChild` is true — the collapsed node is\n * a single consumer element with no slot for the sub-badge. Render the\n * count inside the child yourself, or use the standard form.\n */\n count?: never;\n}\n\nexport type ChipProps = ChipStandardProps | ChipAsChildProps;\n\n/**\n * Chip Component\n *\n * A chip/tag for labels, filters, or selected items.\n *\n * Standard form: an outer `<div>` frame (never interactive) with an\n * inner `<button>` label (when `onClick`) and a sibling X `<button>`\n * (when `onRemove`). This shape closes two axe violations the older\n * implementation hit — `aria-required-parent` (role=option without a\n * listbox) and `nested-interactive` (clickable outer + clickable X).\n *\n * `asChild` form: a single node provided by the consumer (e.g.\n * `<Link>`), with the chip's classes projected via Radix `Slot`. See\n * the `ChipAsChildProps` JSDoc for the a11y responsibility transfer\n * — the consumer's child carries `href`, focus behavior, and any\n * route-state ARIA (`aria-current`). Forbidden in this form:\n * `onClick`, `onRemove` (TS-level).\n *\n * @example\n * ```tsx\n * <Chip>Tag</Chip>\n * <Chip onRemove={() => console.log('removed')}>Removable</Chip>\n *\n * // Navigation chip — server-rendered, zero-JS-friendly.\n * <Chip asChild variant=\"filled\">\n * <Link href=\"/filtros/ativo\" prefetch aria-current=\"page\">Active</Link>\n * </Chip>\n * ```\n */\n// Chip variants using CVA\nconst chipVariants = cva(\n // Base classes\n cn(\n \"inline-flex\",\n \"items-center\",\n \"font-medium\",\n getRadiusClass(\"full\"),\n getSpacingClass(\"xs\", \"gap\"),\n ),\n {\n variants: {\n variant: {\n default: cn(\n \"bg-surface-muted\",\n \"text-fg-primary\",\n \"border\",\n \"border-line-default\",\n ),\n outlined: cn(\n \"bg-transparent\",\n \"text-fg-primary\",\n \"border\",\n \"border-line-default\",\n ),\n filled: cn(\n \"bg-surface-brand-strong\",\n \"text-fg-inverse\",\n \"border\",\n \"border-transparent\",\n ),\n },\n size: {\n sm: cn(\n getSpacingClass(\"xs\", \"px\"),\n getSpacingClass(\"xs\", \"py\"),\n getTypographySize(\"caption\"),\n ),\n md: cn(\n getSpacingClass(\"sm\", \"px\"),\n getSpacingClass(\"xs\", \"py\"),\n getTypographySize(\"bodySmall\"),\n ),\n lg: cn(\n getSpacingClass(\"md\", \"px\"),\n getSpacingClass(\"sm\", \"py\"),\n getTypographySize(\"body\"),\n ),\n },\n selected: {\n true: cn(\n \"bg-surface-brand-strong\",\n \"text-fg-inverse\",\n \"border\",\n \"border-line-brand\",\n ),\n false: \"\",\n },\n disabled: {\n true: \"opacity-50 cursor-not-allowed\",\n false: \"\",\n },\n },\n compoundVariants: [\n {\n selected: true,\n variant: \"default\",\n class: \"\", // Override variant when selected\n },\n {\n selected: true,\n variant: \"outlined\",\n class: \"\", // Override variant when selected\n },\n {\n selected: true,\n variant: \"filled\",\n class: \"\", // Override variant when selected\n },\n ],\n defaultVariants: {\n variant: \"default\",\n size: \"md\",\n selected: false,\n disabled: false,\n },\n },\n);\n\nconst Chip = forwardRef<HTMLDivElement, ChipProps>(function Chip(props, ref) {\n const {\n children,\n variant = \"default\",\n size = \"md\",\n selected = false,\n disabled = false,\n className = \"\",\n \"aria-label\": ariaLabel,\n tabIndex,\n asChild = false,\n } = props;\n\n // Generate accessible label\n const getAccessibleLabel = (): string | undefined => {\n if (ariaLabel) return ariaLabel;\n if (typeof children === \"string\") return children;\n // For non-string children, try to extract text content\n if (\n typeof children === \"object\" &&\n children !== null &&\n \"props\" in children\n ) {\n const childProps = (children as { props?: { children?: unknown } }).props;\n if (childProps?.children && typeof childProps.children === \"string\") {\n return childProps.children;\n }\n }\n return undefined;\n };\n\n const accessibleLabel = getAccessibleLabel();\n\n // asChild path: collapse the entire chip structure (frame + label\n // button + X) into the single consumer-provided node. The frame's\n // visual classes are projected onto the child via Slot.\n //\n // A11Y RESPONSIBILITY TRANSFER. The child element owns:\n // - focus (its native focus ring, or its own focus utilities)\n // - activation (its own click handler / href for navigation)\n // - route-state semantics: `aria-current=\"page\"` on a selected\n // Link is the right tool. `aria-pressed` is intentionally NOT\n // emitted here — a link is not a toggle button.\n // - disabled semantics: `aria-disabled` is set when `disabled` is\n // true, but it does NOT block navigation. Consumers that must\n // truly disable navigation should also gate `href` upstream.\n //\n // TS forbids `onClick` / `onRemove` in this form (see ChipAsChildProps).\n if (asChild) {\n return (\n <Slot\n ref={ref}\n className={cn(\n chipVariants({ variant, size, selected, disabled }),\n className,\n )}\n aria-label={ariaLabel}\n aria-disabled={disabled || undefined}\n tabIndex={tabIndex}\n >\n {children}\n </Slot>\n );\n }\n\n // Standard form below. Narrow `props` so the union picks up\n // onClick/onRemove/count (forbidden when asChild=true at TS level).\n const { onRemove, onClick, count } = props as ChipStandardProps;\n\n // Architecture:\n // The label is a real `<button>` whenever the chip is meant to be\n // activated (`onClick` provided). The X is a sibling `<button>` when\n // `onRemove` is provided. The outer `<div>` is NEVER interactive —\n // no `role`, no `tabIndex`, no event handlers. This unifies what\n // used to be three structural variants:\n // - `onClick` only → outer `role=\"button\"` [old]\n // - `onClick` + `onRemove` (no selected) → label-button [PR68]\n // - `selected` → outer `role=\"option\"` [old, axe-flagged]\n // into one consistent shape: label is the actor, outer is the chip\n // chrome (visual frame).\n //\n // Why this matters for a11y:\n // - `role=\"option\"` outside `role=\"listbox\"` violates `aria-required-\n // parent`. The old `selected` path failed axe in every standalone\n // chip. Moving the action to a native `<button>` with\n // `aria-pressed={selected}` (toggle button pattern) communicates\n // state correctly without requiring a listbox parent.\n // - The interactive outer + inner X button produced nested-interactive\n // whenever the consumer combined `selected` (or `onClick`) with\n // `onRemove`. Outer non-interactive + sibling buttons fixes both\n // cases at once.\n //\n // `selected` with no `onClick` is decorative only — the chip CANNOT\n // toggle, so it gets no `aria-pressed` (which would lie) and no role.\n // The visual `selected` styling (chipVariants.selected) applies, but\n // AT users read it as static text. Consumers who want the state\n // communicated must also pass `onClick` to make it a real toggle.\n const useLabelButton = onClick !== undefined;\n const interactive = useLabelButton && !disabled;\n\n // Keyboard handler for the label-button. Native `<button>` activates on\n // Enter/Space in real browsers, but JSDOM does NOT simulate Enter → click,\n // so this preserves the previous test-friendly behavior AND adds explicit\n // `preventDefault` (the original outer-as-button needed it; on a native\n // button this is mostly belt-and-suspenders but harmless).\n const handleKeyDown = (e: React.KeyboardEvent<HTMLButtonElement>) => {\n if (disabled) return;\n if (e.key === \"Enter\" || e.key === \" \") {\n e.preventDefault();\n onClick?.();\n }\n };\n\n // Count sub-badge (issue #222). Rendered as a sibling of the label so\n // the outer flex's `items-center` + `gap` handle alignment/spacing.\n // The pill inverts with the chip surface so it always contrasts:\n // - brand-backed chip (selected || filled) → light pill\n // (bg-surface-base + text-fg-brand-emphasis)\n // - neutral chip (default/outlined) → brand pill\n // (bg-surface-brand-strong + text-fg-inverse, the filled-chip combo)\n // Both pairs are AA-proven elsewhere in the system.\n const hasCount = count !== undefined;\n const chipIsBrandFilled = selected || variant === \"filled\";\n const countBadge = hasCount ? (\n <span\n // Interactive chips fold the count into the label-button's\n // aria-label below, so the visible badge is hidden from AT to\n // avoid a double announce. Non-interactive chips have no\n // overriding name — the badge stays readable as inline content.\n aria-hidden={useLabelButton || undefined}\n className={cn(\n \"inline-flex\",\n \"items-center\",\n \"justify-center\",\n \"tabular-nums\",\n \"leading-none\",\n getRadiusClass(\"full\"),\n getSpacingClass(\"xs\", \"px\"),\n getSpacingClass(\"0.5\", \"py\"),\n getTypographySize(\"caption\"),\n getTypographyWeight(\"label\"),\n chipIsBrandFilled\n ? cn(\"bg-surface-base\", \"text-fg-brand-emphasis\")\n : cn(\"bg-surface-brand-strong\", \"text-fg-inverse\"),\n )}\n >\n {count}\n </span>\n ) : null;\n\n // When a count is present, fold it into the interactive chip's\n // accessible name (\"Casa, 12\") so AT users hear it. An explicit\n // consumer aria-label always wins (they own the phrasing).\n const labelWithCount =\n hasCount && accessibleLabel !== undefined\n ? `${accessibleLabel}, ${count}`\n : accessibleLabel;\n\n return (\n <div\n ref={ref}\n className={cn(\n chipVariants({ variant, size, selected, disabled }),\n onRemove && getSpacingClass(\"xs\", \"pr\"),\n className,\n )}\n aria-disabled={disabled}\n >\n {useLabelButton ? (\n <button\n type=\"button\"\n onClick={disabled ? undefined : onClick}\n onKeyDown={handleKeyDown}\n disabled={disabled}\n aria-pressed={selected ? true : undefined}\n aria-label={ariaLabel || labelWithCount}\n tabIndex={\n tabIndex !== undefined ? tabIndex : interactive ? 0 : undefined\n }\n className={cn(\n \"flex-1\",\n \"bg-transparent\",\n \"border-0\",\n getSpacingClass(\"none\", \"p\"),\n \"text-inherit\",\n \"text-left\",\n \"cursor-pointer\",\n \"focus:outline-none\",\n \"focus:ring-2\",\n \"focus:ring-line-focus\",\n \"focus:ring-offset-2\",\n getRadiusClass(\"full\"),\n )}\n >\n {children}\n </button>\n ) : (\n <span>{children}</span>\n )}\n {countBadge}\n {onRemove && !disabled && (\n <button\n type=\"button\"\n onClick={(e) => {\n e.stopPropagation();\n onRemove();\n }}\n className={cn(\n getSpacingClass(\"xs\", \"ml\"),\n \"hover:bg-tint-hover\",\n getRadiusClass(\"full\"),\n getSpacingClass(\"xs\", \"p\"),\n \"transition-colors\",\n \"focus:outline-none\",\n \"focus:ring-2\",\n \"focus:ring-line-focus\",\n \"focus:ring-offset-1\",\n )}\n aria-label={`Remove ${accessibleLabel || \"chip\"}`}\n >\n <X className=\"h-3 w-3\" aria-hidden=\"true\" />\n </button>\n )}\n </div>\n );\n});\n\nChip.displayName = \"Chip\";\n\nexport default Chip;\n","import { memo, forwardRef } from \"react\";\nimport type { HTMLAttributes, ReactNode } from \"react\";\nimport { getRadiusClass } from \"../../tokens/radius\";\nimport { getSpacingClass } from \"../../tokens/spacing\";\nimport {\n getTypographySize,\n getTypographyWeight,\n} from \"../../tokens/typography\";\nimport { cn, cva } from \"../../utils\";\n\n/**\n * Semantic tone for a {@link DataBadge}. The status/brand members mirror the\n * `Badge` vocabulary (role, not tone) so the soft-wash treatment is shared\n * and already AA-verified; `dataviz` adds a CATEGORICAL member (a\n * reddish-purple wash for \"category / analytical\" data, the badge-facing\n * counterpart to the chart palette) that is intentionally NOT a status.\n * Map a consumer's tone names onto these roles: `default → neutral`,\n * `destructive → error`, `brand → primary`, `accent → dataviz` (the\n * data-viz purple — RDS `accent` is cyan, so the category tone is `dataviz`).\n */\nexport type DataBadgeTone =\n | \"neutral\"\n | \"success\"\n | \"warning\"\n | \"error\"\n | \"info\"\n | \"primary\"\n | \"secondary\"\n | \"dataviz\";\n\nexport type DataBadgeSize = \"sm\" | \"md\";\n\nexport interface DataBadgeProps extends HTMLAttributes<HTMLSpanElement> {\n /** Primary datum — the value the badge is about (e.g. \"L2\", \"Aprovada\"). */\n label: ReactNode;\n /**\n * Provenance of the datum, rendered as a lesser-emphasis sub-label after\n * the label (e.g. \"Câmara\", \"Portal Transparência\"). Omitted when absent.\n */\n source?: ReactNode;\n /** Semantic tone (role-based color). Defaults to `neutral`. */\n tone?: DataBadgeTone;\n /** Optional decorative leading icon (rendered `aria-hidden`). */\n icon?: ReactNode;\n /** Size scale. Defaults to `md`. */\n size?: DataBadgeSize;\n}\n\n// Tone → soft-wash classes, mirroring Badge's already-AA-verified scale.\nconst dataBadgeVariants = cva(\n cn(\"inline-flex\", \"items-center\", \"border\", getRadiusClass(\"md\")),\n {\n variants: {\n tone: {\n neutral: cn(\n \"bg-surface-muted\",\n \"text-fg-primary\",\n \"border-line-default\",\n ),\n success: cn(\"bg-success-bg\", \"text-success-dark\", \"border-success\"),\n warning: cn(\"bg-warning-bg\", \"text-warning-dark\", \"border-warning\"),\n error: cn(\"bg-error-bg\", \"text-error-dark\", \"border-error\"),\n info: cn(\"bg-info-bg\", \"text-info-dark\", \"border-info\"),\n primary: cn(\n \"bg-surface-brand-subtle\",\n \"text-fg-brand-emphasis\",\n \"border-line-brand\",\n ),\n secondary: cn(\n \"bg-surface-secondary-subtle\",\n \"text-fg-brand-secondary-emphasis\",\n \"border-line-secondary\",\n ),\n // Categorical data-viz tone — fuchsia soft-wash, sibling to the\n // chart palette. Not a status; distinct from secondary (brand violet).\n dataviz: cn(\"bg-dataviz-bg\", \"text-dataviz-dark\", \"border-dataviz\"),\n },\n size: {\n sm: cn(\n getSpacingClass(\"1.5\", \"px\"),\n getSpacingClass(\"0.5\", \"py\"),\n getSpacingClass(\"0.5\", \"gap\"),\n \"[&_svg]:size-3\",\n ),\n md: cn(\n getSpacingClass(\"sm\", \"px\"),\n getSpacingClass(\"0.5\", \"py\"),\n getSpacingClass(\"xs\", \"gap\"),\n \"[&_svg]:size-3.5\",\n ),\n },\n },\n defaultVariants: { tone: \"neutral\", size: \"md\" },\n },\n);\n\n/**\n * DataBadge\n *\n * An inline metadata chip: a primary `label`, an optional lesser-emphasis\n * `source` sub-label (the datum's provenance), a semantic `tone`, and an\n * optional decorative `icon`. Built for transparency/data UIs where a value\n * must travel with where it came from (\"L2 · Portal Transparência\").\n *\n * Why a separate primitive and not `Badge`: `Badge` is a single-string\n * status label; `DataBadge` carries a value + its source as a structured\n * pair. The `source` is the differentiator — it has no slot in `Badge` /\n * `Chip` / `Info`.\n *\n * Accessibility: the visible text (label, then source) IS the accessible\n * name — the separator and any `icon` are `aria-hidden`. Hierarchy between\n * label and source is conveyed by size + weight, never by dropping the\n * source below its tone's AA-safe text color. The root is a plain inline\n * `<span>` with no live-region role (metadata is static, not announced);\n * pass `role` / `aria-label` via props if a grouping role is wanted.\n *\n * Server-safe: no hooks, no client APIs, no DOM handlers of its own — ships\n * from the `./server` entry.\n *\n * @example\n * ```tsx\n * <DataBadge label=\"L2\" source=\"Portal Transparência\" tone=\"warning\" />\n * <DataBadge label=\"Aprovada\" tone=\"success\" />\n * ```\n */\nconst DataBadge = memo(\n forwardRef<HTMLSpanElement, DataBadgeProps>(function DataBadge(\n {\n label,\n source,\n tone = \"neutral\",\n size = \"md\",\n icon,\n className = \"\",\n ...rest\n },\n ref,\n ) {\n const hasSource = source !== undefined && source !== null && source !== \"\";\n // Label is the larger/heavier tier; source is one size smaller and a\n // lighter weight. Both keep the tone's AA-safe text color — hierarchy\n // comes from size + weight, not from reducing contrast.\n const labelSize = size === \"sm\" ? \"caption\" : \"bodySmall\";\n\n return (\n <span\n ref={ref}\n className={cn(dataBadgeVariants({ tone, size }), className)}\n {...rest}\n >\n {icon ? (\n <span\n className=\"inline-flex shrink-0 items-center\"\n aria-hidden=\"true\"\n >\n {icon}\n </span>\n ) : null}\n <span\n className={cn(\n getTypographySize(labelSize),\n getTypographyWeight(\"label\"),\n )}\n >\n {label}\n </span>\n {hasSource ? (\n <>\n <span aria-hidden=\"true\" className={getTypographySize(\"caption\")}>\n ·\n </span>\n <span\n className={cn(\n getTypographySize(\"caption\"),\n getTypographyWeight(\"caption\"),\n )}\n >\n {source}\n </span>\n </>\n ) : null}\n </span>\n );\n }),\n);\n\nDataBadge.displayName = \"DataBadge\";\n\nexport default DataBadge;\n","import type { HTMLAttributes } from \"react\";\nimport { AlertCircle } from \"lucide-react\";\nimport { getTypographySize } from \"../../tokens/typography\";\nimport { getSpacingClass } from \"../../tokens/spacing\";\nimport { cn } from \"../../utils\";\n\nexport interface ErrorMessageProps extends HTMLAttributes<HTMLDivElement> {\n message: string;\n id?: string;\n}\n\n/**\n * ErrorMessage Component\n *\n * A component for displaying validation error messages.\n *\n * @example\n * ```tsx\n * <ErrorMessage message=\"This field is required\" id=\"email-error\" />\n * ```\n */\nexport default function ErrorMessage({\n message,\n id,\n className = \"\",\n ...props\n}: ErrorMessageProps) {\n const baseClasses = [\n getSpacingClass(\"xs\", \"mt\"),\n getTypographySize(\"bodySmall\"),\n \"text-fg-error\",\n \"flex\",\n \"items-center\",\n getSpacingClass(\"xs\", \"gap\"),\n ];\n\n const classes = cn(...baseClasses, className);\n\n return (\n <div role=\"alert\" id={id} className={classes} aria-live=\"polite\" {...props}>\n <AlertCircle className=\"h-4 w-4 shrink-0\" aria-hidden=\"true\" />\n <span>{message}</span>\n </div>\n );\n}\n","import type { HTMLAttributes } from \"react\";\nimport { getRadiusClass } from \"../../tokens/radius\";\nimport { getSpacingClass } from \"../../tokens/spacing\";\nimport { cn } from \"../../utils\";\n\nexport interface InfoProps extends HTMLAttributes<HTMLDivElement> {\n variant?: \"info\" | \"warning\" | \"error\";\n}\n\nexport default function Info({\n variant = \"info\",\n className,\n ...props\n}: InfoProps) {\n const variantClasses = {\n warning: cn(\"bg-warning-bg\", \"text-warning-dark\", \"border-warning\"),\n error: cn(\"bg-error-bg\", \"text-error-dark\", \"border-error\"),\n info: cn(\"bg-info-bg\", \"text-info-dark\", \"border-info\"),\n };\n\n return (\n <div\n role=\"alert\"\n className={cn(\n \"border\",\n getSpacingClass(\"base\", \"px\"),\n getSpacingClass(\"sm\", \"py\"),\n getRadiusClass(\"lg\"),\n variantClasses[variant],\n className,\n )}\n {...props}\n />\n );\n}\n","import { forwardRef } from \"react\";\nimport type { InputHTMLAttributes, ReactNode } from \"react\";\nimport {\n getTypographyClasses,\n getTypographySize,\n} from \"../../tokens/typography\";\nimport { getRadiusClass } from \"../../tokens/radius\";\nimport { getSpacingClass } from \"../../tokens/spacing\";\nimport { cn, cva } from \"../../utils\";\n\n// Ambient declaration so the dev-only warn below typechecks without\n// pulling @types/node into the app tsconfig. At runtime the consumer's\n// bundler replaces `process.env.NODE_ENV` with a literal; the\n// `typeof process` guard keeps the branch safe in browser/edge runtimes.\ndeclare const process: { env: { NODE_ENV?: string } };\n\nexport type InputSize = \"sm\" | \"md\" | \"lg\";\nexport type InputVariant = \"default\" | \"outlined\" | \"filled\";\nexport type InputState = \"default\" | \"error\" | \"success\";\n\n/**\n * Input variant tokens (issue #224). They used to live inside `Input`\n * wrapped in `useMemo`; moving them here, to the server-safe `InputBase`,\n * removes that decorative memo and makes `InputBase` the single source of\n * the input's visual surface — the interactive `Input` inherits it by\n * composing `InputBase` rather than re-declaring the cva. The focus-ring\n * colours are inlined directly (the old code derived them via\n * `.replace(\"focus:border-\", \"focus:ring-\")`, which produced exactly\n * these classes).\n */\nconst inputVariants = cva(\n cn(\n \"w-full\",\n getRadiusClass(\"md\"),\n \"transition-colors\",\n \"focus:outline-none\",\n \"focus:ring-2\",\n \"focus:ring-offset-2\",\n \"disabled:opacity-50\",\n \"disabled:cursor-not-allowed\",\n ),\n {\n variants: {\n variant: {\n default: cn(\n \"border-0\",\n \"border-b-2\",\n \"border-line-default\",\n \"focus:border-line-focus\",\n ),\n outlined: cn(\n \"border\",\n \"border-line-default\",\n \"focus:border-line-focus\",\n ),\n filled: cn(\n \"bg-surface-muted\",\n \"border-0\",\n \"focus:bg-surface-base\",\n \"focus:ring-2\",\n \"focus:ring-line-focus\",\n ),\n },\n size: {\n sm: cn(\n \"h-8\",\n getTypographySize(\"bodySmall\"),\n getSpacingClass(\"md\", \"px\"),\n ),\n md: cn(\n \"h-10\",\n getTypographySize(\"body\"),\n getSpacingClass(\"base\", \"px\"),\n ),\n lg: cn(\n \"h-12\",\n getTypographySize(\"bodyLarge\"),\n getSpacingClass(\"lg\", \"px\"),\n ),\n },\n state: {\n default: \"\",\n error: cn(\"border-error\", \"focus:border-error\", \"focus:ring-error\"),\n success: cn(\n \"border-success\",\n \"focus:border-success\",\n \"focus:ring-success\",\n ),\n },\n },\n defaultVariants: {\n variant: \"outlined\",\n size: \"md\",\n state: \"default\",\n },\n },\n);\n\n/**\n * Helper / error text. De-memoized (issue #224) — the original wrapped\n * its class string and text in `useMemo`, a decorative memo that blocked\n * server-safety. Inlined here; the work is nanoseconds.\n */\nfunction HelperText({\n error,\n success,\n helperText,\n errorId,\n helperId,\n}: {\n error: boolean;\n success: boolean;\n helperText?: string;\n errorId?: string;\n helperId?: string;\n}) {\n const helperClasses = cn(\n getSpacingClass(\"xs\", \"mt\"),\n getTypographyClasses(\"caption\"),\n error && \"text-fg-error\",\n success && \"text-fg-success\",\n !error && !success && \"text-fg-secondary\",\n );\n const text = helperText || (error ? \"Error\" : success ? \"Success\" : \"\");\n\n return (\n <div\n id={errorId || helperId}\n className={helperClasses}\n role={error || success ? \"alert\" : undefined}\n >\n {text}\n </div>\n );\n}\n\nexport interface InputBaseProps extends Omit<\n InputHTMLAttributes<HTMLInputElement>,\n \"size\"\n> {\n label?: ReactNode;\n error?: boolean;\n success?: boolean;\n helperText?: string;\n size?: InputSize;\n variant?: InputVariant;\n leftIcon?: ReactNode;\n rightIcon?: ReactNode;\n /**\n * Raw trailing-affix slot rendered inside the input's right edge with\n * full interactivity (no `pointer-events-none`). The interactive\n * `Input` injects its password-toggle / clear buttons here; consumers\n * can use it for a static suffix (a unit, a badge). When omitted,\n * `rightIcon` renders instead with the muted decorative treatment.\n */\n rightSlot?: ReactNode;\n}\n\n/**\n * InputBase\n *\n * The **presentational core** of the text input — label, the `<input>`\n * itself, decorative left/right icons, the trailing-affix slot, and the\n * helper/error line. It holds **no React client state** (no `useState`,\n * `useId`, `useCallback`), so it is server-safe and ships from the\n * `./server` entry (issue #224).\n *\n * The interactive `Input` (default export of this folder) composes\n * `InputBase`, owning the password-toggle state, the clear button, and\n * the `useId` auto-id fallback — it passes the resolved `id`, the\n * toggled `type`, and its affix buttons (`rightSlot`) down. Use\n * `InputBase` directly for server-rendered / native-form inputs where\n * none of that interactivity is needed (`<form method=\"GET\">` filters,\n * RSC pages).\n *\n * Accessible name: pass `id` when you pass `label` so the `<label\n * htmlFor>` binds — `InputBase` does NOT auto-generate an id (that needs\n * `useId`, which would make it client). A dev-only warning fires when a\n * `label` is given without an `id`.\n *\n * @example\n * ```tsx\n * // Server component / native form — zero client state.\n * <InputBase id=\"q\" name=\"q\" placeholder=\"Buscar…\" />\n * ```\n */\nconst InputBase = forwardRef<HTMLInputElement, InputBaseProps>(\n function InputBase(\n {\n id,\n label,\n error = false,\n success = false,\n helperText,\n size = \"md\",\n variant = \"outlined\",\n leftIcon,\n rightIcon,\n rightSlot,\n className = \"\",\n disabled = false,\n type = \"text\",\n ...props\n },\n ref,\n ) {\n if (\n typeof process !== \"undefined\" &&\n process.env.NODE_ENV !== \"production\" &&\n label &&\n !id\n ) {\n console.warn(\n \"[InputBase] `label` was provided without an `id`. The <label> cannot bind to the input (InputBase does not auto-generate an id — that needs a client hook). Pass an `id`, or use the interactive `Input` which auto-generates one.\",\n );\n }\n\n const state: InputState = error ? \"error\" : success ? \"success\" : \"default\";\n\n const errorId = error && id ? `${id}-error` : undefined;\n const helperId = helperText && id ? `${id}-helper` : undefined;\n\n const iconSize =\n size === \"sm\" ? \"h-4 w-4\" : size === \"lg\" ? \"h-5 w-5\" : \"h-4 w-4\";\n const iconPosition =\n size === \"sm\" ? \"top-2\" : size === \"lg\" ? \"top-3.5\" : \"top-2.5\";\n\n const inputClasses = cn(\n inputVariants({ variant, size, state }),\n // Icon padding — `pl-9` / `pr-9` aren't on the spacing scale (no\n // semantic key for 36px) so they stay raw at the `sm` size; md/lg use\n // the getter. Mirrors the original Input contract.\n leftIcon &&\n (size === \"sm\"\n ? \"pl-9\"\n : size === \"lg\"\n ? getSpacingClass(\"3xl\", \"pl\")\n : getSpacingClass(\"2xl\", \"pl\")),\n (rightIcon || rightSlot) &&\n (size === \"sm\"\n ? \"pr-9\"\n : size === \"lg\"\n ? getSpacingClass(\"3xl\", \"pr\")\n : getSpacingClass(\"2xl\", \"pr\")),\n className,\n );\n\n const labelClasses = cn(\n \"block\",\n getTypographyClasses(\"label\"),\n getSpacingClass(\"xs\", \"mb\"),\n disabled && \"opacity-50\",\n );\n\n return (\n <div className=\"w-full\">\n {label && (\n <label htmlFor={id} className={labelClasses}>\n {label}\n </label>\n )}\n <div className=\"relative\">\n {leftIcon && (\n <div\n className={`absolute left-3 ${iconPosition} text-fg-secondary opacity-60 pointer-events-none`}\n >\n <div className={iconSize}>{leftIcon}</div>\n </div>\n )}\n <input\n id={id}\n ref={ref}\n type={type}\n className={inputClasses}\n disabled={disabled}\n aria-invalid={error}\n aria-required={props.required}\n aria-describedby={errorId || helperId}\n suppressHydrationWarning\n {...props}\n />\n {(rightIcon || rightSlot) && (\n <div\n className={`absolute right-3 top-0 bottom-0 flex items-center ${getSpacingClass(\"xs\", \"gap\")}`}\n >\n {rightSlot ?? (\n <div\n className={`text-fg-secondary opacity-60 pointer-events-none ${iconSize}`}\n >\n {rightIcon}\n </div>\n )}\n </div>\n )}\n </div>\n {(error || success || helperText) && (\n <HelperText\n error={error}\n success={success}\n helperText={helperText}\n errorId={errorId}\n helperId={helperId}\n />\n )}\n </div>\n );\n },\n);\n\nInputBase.displayName = \"InputBase\";\n\nexport default InputBase;\n","import type { LabelHTMLAttributes } from \"react\";\nimport { forwardRef, memo } from \"react\";\nimport {\n getTypographySize,\n getTypographyWeight,\n} from \"../../tokens/typography\";\nimport { getSpacingClass } from \"../../tokens/spacing\";\nimport { cn } from \"../../utils\";\n\ninterface Props extends LabelHTMLAttributes<HTMLLabelElement> {\n variant?: \"default\" | \"required\" | \"optional\";\n children: React.ReactNode;\n}\n\nconst labelBaseClasses = cn(\n \"block\",\n getTypographySize(\"label\"),\n getTypographyWeight(\"label\"),\n \"text-fg-primary\",\n);\n\nconst labelVariantClasses: Record<NonNullable<Props[\"variant\"]>, string> = {\n default: \"\",\n required: cn(\n \"after:content-['*']\",\n `after:${getSpacingClass(\"0.5\", \"ml\")}`,\n \"after:text-fg-error\",\n ),\n optional: cn(\n \"after:content-['(optional)']\",\n `after:${getSpacingClass(\"xs\", \"ml\")}`,\n \"after:text-fg-tertiary\",\n \"after:font-normal\",\n ),\n};\n\n/**\n * Label Component\n *\n * A styled label component for form inputs.\n *\n * @example\n * ```tsx\n * <Label htmlFor=\"email\" variant=\"required\">\n * Email Address\n * </Label>\n * ```\n */\nconst Label = memo(\n forwardRef<HTMLLabelElement, Props>(function Label(\n { variant = \"default\", className = \"\", children, ...props },\n ref,\n ) {\n const classes = cn(\n labelBaseClasses,\n labelVariantClasses[variant],\n className,\n );\n\n return (\n <label ref={ref} className={classes} {...props}>\n {children}\n </label>\n );\n }),\n);\n\nLabel.displayName = \"Label\";\n\nexport default Label;\n","/**\n * Shadow Tokens\n *\n * Centralized shadow system for consistent elevation and depth.\n * Uses Factory Pattern for type-safe token creation.\n */\n\nexport type ShadowSize = \"none\" | \"sm\" | \"md\" | \"lg\" | \"xl\" | \"2xl\" | \"inner\";\n\nexport interface ShadowToken {\n value: string;\n tailwind: string;\n description: string;\n}\n\n/**\n * Shadow Token Factory\n * Creates shadow tokens with consistent values\n */\nexport class ShadowTokenFactory {\n /**\n * Create a shadow token\n */\n static create(size: ShadowSize): ShadowToken {\n const shadowMap: Record<\n ShadowSize,\n { value: string; tailwind: string; description: string }\n > = {\n none: {\n value: \"none\",\n tailwind: \"shadow-none\",\n description: \"No shadow\",\n },\n sm: {\n value: \"0 1px 2px 0 rgb(0 0 0 / 0.05)\",\n tailwind: \"shadow-sm\",\n description: \"Small shadow for subtle elevation\",\n },\n md: {\n value: \"0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1)\",\n tailwind: \"shadow-md\",\n description: \"Medium shadow for cards and elevated elements\",\n },\n lg: {\n value:\n \"0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1)\",\n tailwind: \"shadow-lg\",\n description: \"Large shadow for modals and dropdowns\",\n },\n xl: {\n value:\n \"0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1)\",\n tailwind: \"shadow-xl\",\n description: \"Extra large shadow for prominent modals\",\n },\n \"2xl\": {\n value:\n \"0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1)\",\n tailwind: \"shadow-2xl\",\n description: \"2X large shadow for maximum elevation\",\n },\n inner: {\n value: \"inset 0 2px 4px 0 rgb(0 0 0 / 0.05)\",\n tailwind: \"shadow-inner\",\n description: \"Inner shadow for inset elements\",\n },\n };\n\n return shadowMap[size];\n }\n}\n\n/**\n * Pre-defined shadow tokens\n */\nexport const SHADOW_TOKENS = {\n none: ShadowTokenFactory.create(\"none\"),\n sm: ShadowTokenFactory.create(\"sm\"),\n md: ShadowTokenFactory.create(\"md\"),\n lg: ShadowTokenFactory.create(\"lg\"),\n xl: ShadowTokenFactory.create(\"xl\"),\n \"2xl\": ShadowTokenFactory.create(\"2xl\"),\n inner: ShadowTokenFactory.create(\"inner\"),\n} as const;\n\n/**\n * Helper function to get shadow token\n */\nexport function getShadow(size: keyof typeof SHADOW_TOKENS): ShadowToken {\n return SHADOW_TOKENS[size];\n}\n\n/**\n * Helper function to get shadow as Tailwind class\n */\nexport function getShadowClass(size: keyof typeof SHADOW_TOKENS): string {\n return SHADOW_TOKENS[size].tailwind;\n}\n","\"use client\";\n\nimport type { HTMLAttributes } from \"react\";\nimport { forwardRef } from \"react\";\nimport { getRadiusClass } from \"../../tokens\";\nimport { getSpacingClass } from \"../../tokens/spacing\";\nimport {\n getTypographySize,\n getTypographyWeight,\n} from \"../../tokens/typography\";\nimport { cn, cva } from \"../../utils\";\nimport \"./Progress.css\";\n\nexport type ProgressVariant =\n | \"primary\"\n | \"secondary\"\n | \"success\"\n | \"error\"\n | \"warning\"\n | \"info\";\nexport type ProgressSize = \"sm\" | \"md\" | \"lg\";\n\nexport interface ProgressProps extends HTMLAttributes<HTMLDivElement> {\n value?: number; // 0-100, undefined for indeterminate\n max?: number; // Default 100\n variant?: ProgressVariant;\n size?: ProgressSize;\n showLabel?: boolean;\n label?: string;\n \"aria-label\"?: string;\n}\n\n/**\n * Progress Component\n *\n * A progress bar component for displaying progress or loading states.\n * Supports both determinate (with value) and indeterminate (without value) modes.\n * Fully accessible with ARIA attributes.\n *\n * @example\n * ```tsx\n * // Determinate progress\n * <Progress value={75} variant=\"primary\" />\n *\n * // Indeterminate progress\n * <Progress variant=\"primary\" />\n *\n * // With label\n * <Progress value={50} showLabel label=\"Uploading...\" />\n * ```\n */\n// Progress variants using CVA\nconst progressTrackVariants = cva(\"w-full\", {\n variants: {\n size: {\n sm: \"h-1\",\n md: \"h-2\",\n lg: \"h-3\",\n },\n variant: {\n primary: \"bg-surface-muted\",\n secondary: \"bg-surface-muted\",\n success: \"bg-success-bg-emphasis\",\n error: \"bg-error-bg-emphasis\",\n warning: \"bg-warning-bg-emphasis\",\n info: \"bg-info-bg-emphasis\",\n },\n },\n defaultVariants: {\n size: \"md\",\n variant: \"primary\",\n },\n});\n\nconst progressBarVariants = cva(\"transition-all\", {\n variants: {\n variant: {\n primary: \"bg-surface-brand\",\n secondary: \"bg-surface-secondary\",\n success: \"bg-success\",\n error: \"bg-error\",\n warning: \"bg-warning\",\n info: \"bg-info\",\n },\n },\n defaultVariants: {\n variant: \"primary\",\n },\n});\n\nconst Progress = forwardRef<HTMLDivElement, ProgressProps>(function Progress(\n {\n value,\n max = 100,\n variant = \"primary\",\n size = \"md\",\n showLabel = false,\n label,\n \"aria-label\": ariaLabel,\n className = \"\",\n ...props\n },\n ref,\n) {\n const isIndeterminate = value === undefined;\n const percentage = isIndeterminate\n ? undefined\n : Math.min(Math.max((value / max) * 100, 0), 100);\n\n const defaultAriaLabel =\n ariaLabel ||\n (isIndeterminate\n ? \"Loading in progress\"\n : `Progress: ${percentage?.toFixed(0)}%`);\n\n return (\n <div ref={ref} className={cn(\"w-full\", className)} {...props}>\n {showLabel && (label || !isIndeterminate) && (\n <div\n className={cn(\n \"flex\",\n \"items-center\",\n \"justify-between\",\n getSpacingClass(\"xs\", \"mb\"),\n )}\n >\n {label && (\n <span\n className={cn(\n getTypographySize(\"bodySmall\"),\n getTypographyWeight(\"label\"),\n \"text-fg-primary\",\n )}\n >\n {label}\n </span>\n )}\n {!isIndeterminate && percentage !== undefined && (\n <span\n className={cn(\n getTypographySize(\"bodySmall\"),\n \"text-fg-secondary\",\n )}\n >\n {percentage.toFixed(0)}%\n </span>\n )}\n </div>\n )}\n <div\n role=\"progressbar\"\n aria-valuemin={isIndeterminate ? undefined : 0}\n aria-valuemax={isIndeterminate ? undefined : max}\n aria-valuenow={isIndeterminate ? undefined : value}\n aria-label={defaultAriaLabel}\n aria-busy={isIndeterminate}\n className={cn(\n \"relative\",\n \"w-full\",\n \"overflow-hidden\",\n progressTrackVariants({ size, variant }),\n getRadiusClass(\"full\"),\n )}\n >\n {isIndeterminate ? (\n <div\n className={cn(\n \"absolute\",\n \"top-0\",\n \"left-0\",\n \"bottom-0\",\n progressBarVariants({ variant }),\n getRadiusClass(\"full\"),\n \"motion-reduce:animate-none\",\n )}\n style={{\n width: \"30%\",\n animation: \"progress-indeterminate 1.5s ease-in-out infinite\",\n }}\n />\n ) : (\n <div\n className={cn(\n \"h-full\",\n progressBarVariants({ variant }),\n getRadiusClass(\"full\"),\n \"transition-all\",\n \"duration-300\",\n \"ease-out\",\n )}\n style={{\n width: `${percentage}%`,\n }}\n aria-hidden=\"true\"\n />\n )}\n </div>\n </div>\n );\n});\n\nProgress.displayName = \"Progress\";\n\nexport default Progress;\n","import { memo } from \"react\";\nimport type { HTMLAttributes } from \"react\";\nimport { cn } from \"../../utils\";\n\nexport type SeparatorOrientation = \"horizontal\" | \"vertical\";\nexport type SeparatorVariant = \"solid\" | \"dashed\" | \"dotted\";\n\nexport interface SeparatorProps extends HTMLAttributes<HTMLHRElement> {\n orientation?: SeparatorOrientation;\n variant?: SeparatorVariant;\n}\n\n/**\n * Separator Component\n *\n * A visual separator component for dividing content.\n * Optimized with React.memo to prevent unnecessary re-renders.\n *\n * @example\n * ```tsx\n * <Separator />\n *\n * <Separator orientation=\"vertical\" variant=\"dashed\" />\n * ```\n */\nconst separatorOrientationClasses = {\n horizontal: \"w-full border-t\",\n vertical: \"h-full border-l self-stretch\",\n} as const;\n\nconst separatorVariantClasses = {\n solid: \"border-solid\",\n dashed: \"border-dashed\",\n dotted: \"border-dotted\",\n} as const;\n\nconst Separator = memo(function Separator({\n orientation = \"horizontal\",\n variant = \"solid\",\n className = \"\",\n ...props\n}: SeparatorProps) {\n const classes = cn(\n \"border-0\",\n \"border-line-default\",\n separatorOrientationClasses[orientation],\n separatorVariantClasses[variant],\n className,\n );\n\n if (orientation === \"vertical\") {\n return (\n <div\n className={classes}\n role=\"separator\"\n aria-orientation=\"vertical\"\n {...(props as HTMLAttributes<HTMLDivElement>)}\n />\n );\n }\n\n return (\n <hr\n className={classes}\n role=\"separator\"\n aria-orientation=\"horizontal\"\n {...props}\n />\n );\n});\n\nSeparator.displayName = \"Separator\";\n\nexport default Separator;\n","import type { HTMLAttributes } from \"react\";\nimport { getRadiusClass } from \"../../tokens/radius\";\nimport { getSpacingClass } from \"../../tokens/spacing\";\nimport { cn } from \"../../utils\";\n\nexport interface SkeletonProps extends HTMLAttributes<HTMLDivElement> {\n variant?: \"text\" | \"card\" | \"list\" | \"circle\";\n width?: string;\n height?: string;\n lines?: number;\n}\n\n/**\n * Skeleton Component\n *\n * A skeleton loader component for displaying loading states.\n *\n * @example\n * ```tsx\n * <Skeleton variant=\"card\" />\n * <Skeleton variant=\"text\" lines={3} />\n * ```\n */\nexport default function Skeleton({\n variant = \"text\",\n width,\n height,\n lines = 1,\n className = \"\",\n \"aria-label\": ariaLabel,\n ...props\n}: SkeletonProps) {\n const baseClasses = [\n \"motion-safe:animate-pulse\",\n \"bg-surface-muted\",\n getRadiusClass(\"sm\"),\n ];\n\n const variantClasses: Record<\n NonNullable<SkeletonProps[\"variant\"]>,\n string\n > = {\n text: \"h-4\",\n card: \"h-32\",\n list: \"h-12\",\n circle: getRadiusClass(\"full\"),\n };\n\n const classes = cn(...baseClasses, variantClasses[variant], className);\n\n const style: React.CSSProperties = {};\n if (width) style.width = width;\n if (height) style.height = height;\n\n const defaultAriaLabel = ariaLabel || `Loading ${variant} content`;\n\n if (variant === \"text\" && lines > 1) {\n return (\n <div\n className={getSpacingClass(\"sm\", \"space-y\")}\n role=\"status\"\n aria-busy=\"true\"\n aria-label={defaultAriaLabel}\n {...props}\n >\n {Array.from({ length: lines }).map((_, index) => (\n <div\n key={index}\n className={classes}\n style={index === lines - 1 ? { width: \"75%\" } : style}\n aria-hidden=\"true\"\n />\n ))}\n </div>\n );\n }\n\n return (\n <div\n className={classes}\n style={style}\n role=\"status\"\n aria-busy=\"true\"\n aria-label={defaultAriaLabel}\n {...props}\n />\n );\n}\n","import type {\n ComponentPropsWithoutRef,\n ElementType,\n HTMLAttributes,\n JSX,\n} from \"react\";\nimport { forwardRef } from \"react\";\nimport { getTypographyClasses } from \"../../tokens/typography\";\nimport { cn } from \"../../utils\";\n\ntype TextColorRole =\n | \"primary\"\n | \"secondary\"\n | \"success\"\n | \"warning\"\n | \"error\"\n | \"info\"\n | \"neutral\";\ntype TextColorShade = \"light\" | \"DEFAULT\" | \"dark\" | \"contrast\";\n\n// Lookup table: literal Tailwind classes so v4 can detect them at build.\n// Brand/feedback DEFAULT cells use semantic tokens; light/dark cells stay\n// primitive (no semantic equivalent for shade variants). Neutral cells\n// use the Phase 7 semantic suggestions (text-fg-{primary,secondary,...}).\nconst TEXT_COLOR_CLASSES: Record<\n TextColorRole,\n Record<TextColorShade, string>\n> = {\n primary: {\n // exception: variant color — no semantic equivalent (Principle 3, .claude/rules/colors.md)\n light: \"text-indigo-400\",\n DEFAULT: \"text-fg-brand\",\n // exception: variant color — no semantic equivalent (Principle 3, .claude/rules/colors.md)\n dark: \"text-indigo-600\",\n contrast: \"text-fg-inverse\",\n },\n secondary: {\n // exception: variant color — no semantic equivalent (Principle 3, .claude/rules/colors.md)\n light: \"text-pink-300\",\n DEFAULT: \"text-fg-brand-secondary\",\n // exception: variant color — no semantic equivalent (Principle 3, .claude/rules/colors.md)\n dark: \"text-pink-600\",\n contrast: \"text-fg-inverse\",\n },\n success: {\n // exception: variant color — no semantic equivalent (Principle 3, .claude/rules/colors.md)\n light: \"text-green-300\",\n DEFAULT: \"text-fg-success\",\n dark: \"text-success-dark\",\n contrast: \"text-fg-inverse\",\n },\n warning: {\n // exception: variant color — no semantic equivalent (Principle 3, .claude/rules/colors.md)\n light: \"text-yellow-300\",\n DEFAULT: \"text-fg-warning\",\n dark: \"text-warning-dark\",\n contrast: \"text-fg-inverse\",\n },\n error: {\n // exception: variant color — no semantic equivalent (Principle 3, .claude/rules/colors.md)\n light: \"text-red-300\",\n DEFAULT: \"text-fg-error\",\n dark: \"text-error-dark\",\n contrast: \"text-fg-inverse\",\n },\n info: {\n // exception: variant color — no semantic equivalent (Principle 3, .claude/rules/colors.md)\n light: \"text-blue-300\",\n DEFAULT: \"text-fg-info\",\n dark: \"text-info-dark\",\n contrast: \"text-fg-inverse\",\n },\n neutral: {\n light: \"text-fg-tertiary\",\n DEFAULT: \"text-fg-secondary\",\n dark: \"text-fg-primary\",\n contrast: \"text-fg-inverse\",\n },\n};\n\nexport interface TextProps<\n T extends ElementType,\n> extends HTMLAttributes<JSX.IntrinsicElements> {\n variant?:\n | \"heading\"\n | \"list\"\n | \"paragraph\"\n | \"body\"\n | \"bodySmall\"\n | \"bodyLarge\"\n | \"caption\"\n | \"label\";\n as?: T;\n bold?: boolean;\n italic?: boolean;\n colorRole?: TextColorRole;\n colorShade?: TextColorShade;\n}\n\ntype ReturnProps<P extends ElementType> = TextProps<P> &\n Omit<ComponentPropsWithoutRef<P>, keyof TextProps<P>>;\n\nfunction TextComponent<T extends ElementType = \"p\">(\n {\n variant = \"paragraph\",\n bold,\n italic,\n className,\n as,\n colorRole = \"neutral\",\n colorShade = \"dark\",\n ...rest\n }: ReturnProps<T>,\n ref: React.Ref<unknown>,\n) {\n const classNames: string[] = [];\n let Tag: ElementType;\n\n if (as) {\n Tag = as;\n } else {\n switch (variant) {\n case \"heading\":\n Tag = \"h2\";\n break;\n case \"list\":\n Tag = \"li\";\n break;\n case \"paragraph\":\n default:\n Tag = \"p\";\n break;\n }\n }\n\n // Apply typography tokens based on variant\n if (variant === \"heading\") {\n classNames.push(getTypographyClasses(\"h2\"));\n } else if (variant === \"body\" || variant === \"paragraph\") {\n classNames.push(getTypographyClasses(\"body\"));\n } else if (variant === \"bodySmall\") {\n classNames.push(getTypographyClasses(\"bodySmall\"));\n } else if (variant === \"bodyLarge\") {\n classNames.push(getTypographyClasses(\"bodyLarge\"));\n } else if (variant === \"caption\") {\n classNames.push(getTypographyClasses(\"caption\"));\n } else if (variant === \"label\") {\n classNames.push(getTypographyClasses(\"label\"));\n } else {\n // Default to body for list and other variants\n classNames.push(getTypographyClasses(\"body\"));\n }\n\n // Override font weight if bold is specified\n if (bold) {\n classNames.push(\"font-bold\");\n }\n\n if (italic) {\n classNames.push(\"italic\");\n }\n\n // Apply color via lookup table. Tailwind v4 needs literal class names\n // at build time, so role/shade resolve to a fixed entry in\n // TEXT_COLOR_CLASSES rather than constructing `text-${...}` dynamically.\n classNames.push(TEXT_COLOR_CLASSES[colorRole][colorShade]);\n\n return <Tag ref={ref} className={cn(...classNames, className)} {...rest} />;\n}\n\n// Use forwardRef with proper typing for polymorphic component\nconst Text = forwardRef(TextComponent) as <T extends ElementType = \"p\">(\n props: ReturnProps<T> & { ref?: React.Ref<HTMLElement> },\n) => JSX.Element;\n\nexport default Text;\n","import React from \"react\";\nimport { cn } from \"../../utils\";\nimport { getSpacingClass } from \"../../tokens/spacing\";\n\nexport interface ContainerProps extends React.HTMLAttributes<HTMLDivElement> {\n /**\n * Maximum width of the container\n * @default 'lg'\n */\n maxWidth?: \"sm\" | \"md\" | \"lg\" | \"xl\" | \"2xl\" | \"full\";\n /**\n * Horizontal padding\n * @default 'base'\n */\n paddingX?: \"xs\" | \"sm\" | \"md\" | \"base\" | \"lg\" | \"xl\";\n /**\n * Vertical padding\n * @default 'base'\n */\n paddingY?: \"xs\" | \"sm\" | \"md\" | \"base\" | \"lg\" | \"xl\";\n /**\n * Center the container content\n * @default true\n */\n center?: boolean;\n}\n\nconst maxWidthClasses = {\n sm: \"max-w-screen-sm\",\n md: \"max-w-screen-md\",\n lg: \"max-w-screen-lg\",\n xl: \"max-w-screen-xl\",\n \"2xl\": \"max-w-screen-2xl\",\n full: \"max-w-full\",\n};\n\n/**\n * Container component for constraining content width and providing consistent padding\n *\n * @example\n * ```tsx\n * <Container maxWidth=\"lg\" paddingX=\"base\">\n * <h1>Content</h1>\n * </Container>\n * ```\n */\nexport const Container = React.forwardRef<HTMLDivElement, ContainerProps>(\n (\n {\n className,\n maxWidth = \"lg\",\n paddingX = \"base\",\n paddingY = \"base\",\n center = true,\n children,\n ...props\n },\n ref,\n ) => {\n return (\n <div\n ref={ref}\n className={cn(\n \"w-full\",\n maxWidthClasses[maxWidth],\n getSpacingClass(paddingX, \"px\"),\n getSpacingClass(paddingY, \"py\"),\n center && \"mx-auto\",\n className,\n )}\n {...props}\n >\n {children}\n </div>\n );\n },\n);\n\nContainer.displayName = \"Container\";\n","import React from \"react\";\nimport { cn } from \"../../utils\";\nimport { getSpacingClass } from \"../../tokens/spacing\";\n\nexport interface StackProps extends React.HTMLAttributes<HTMLDivElement> {\n /**\n * Spacing between children\n * @default 'base'\n */\n spacing?: \"xs\" | \"sm\" | \"md\" | \"base\" | \"lg\" | \"xl\" | \"2xl\";\n /**\n * Alignment of children\n * @default 'stretch'\n */\n align?: \"start\" | \"center\" | \"end\" | \"stretch\";\n /**\n * Justification of children\n * @default 'start'\n */\n justify?: \"start\" | \"center\" | \"end\" | \"between\" | \"around\" | \"evenly\";\n /**\n * Direction of stack\n * @default 'column'\n */\n direction?: \"row\" | \"column\";\n}\n\n/**\n * Stack component for vertical or horizontal layout with consistent spacing\n *\n * @example\n * ```tsx\n * <Stack spacing=\"md\" align=\"center\">\n * <div>Item 1</div>\n * <div>Item 2</div>\n * </Stack>\n * ```\n */\nexport const Stack = React.forwardRef<HTMLDivElement, StackProps>(\n (\n {\n className,\n spacing = \"base\",\n align = \"stretch\",\n justify = \"start\",\n direction = \"column\",\n children,\n ...props\n },\n ref,\n ) => {\n const spacingClass =\n direction === \"column\"\n ? getSpacingClass(spacing, \"gap-y\")\n : getSpacingClass(spacing, \"gap-x\");\n\n const alignClasses = {\n start: \"items-start\",\n center: \"items-center\",\n end: \"items-end\",\n stretch: \"items-stretch\",\n };\n\n const justifyClasses = {\n start: \"justify-start\",\n center: \"justify-center\",\n end: \"justify-end\",\n between: \"justify-between\",\n around: \"justify-around\",\n evenly: \"justify-evenly\",\n };\n\n return (\n <div\n ref={ref}\n className={cn(\n \"flex\",\n direction === \"column\" ? \"flex-col\" : \"flex-row\",\n spacingClass,\n alignClasses[align],\n justifyClasses[justify],\n className,\n )}\n {...props}\n >\n {children}\n </div>\n );\n },\n);\n\nStack.displayName = \"Stack\";\n","\"use client\";\n\nimport type { HTMLAttributes } from \"react\";\nimport { cn } from \"../../utils\";\nimport {\n getSpacingClass,\n getTypographySize,\n getTypographyWeight,\n} from \"../../tokens\";\n\nexport interface BreadcrumbItem {\n label: string;\n href?: string;\n}\n\ninterface Props extends HTMLAttributes<HTMLElement> {\n items: BreadcrumbItem[];\n separator?: string;\n}\n\n/**\n * Breadcrumb Component\n *\n * A breadcrumb navigation component for hierarchical navigation.\n *\n * @example\n * ```tsx\n * <Breadcrumb\n * items={[\n * { label: \"Home\", href: \"/\" },\n * { label: \"Epics\", href: \"/epics\" },\n * { label: \"Epic Details\" }\n * ]}\n * />\n * ```\n */\nexport default function Breadcrumb({\n items,\n separator = \"/\",\n className = \"\",\n ...props\n}: Props) {\n const baseClasses = [\n \"flex\",\n \"items-center\",\n getSpacingClass(\"sm\", \"space-x\"),\n getTypographySize(\"bodySmall\"),\n ];\n\n const classes = cn(...baseClasses, className);\n\n return (\n <nav aria-label=\"Breadcrumb\" className={classes} {...props}>\n <ol\n className={cn(\"flex\", \"items-center\", getSpacingClass(\"sm\", \"space-x\"))}\n >\n {items.map((item, index) => {\n const isLast = index === items.length - 1;\n\n return (\n <li key={index} className=\"flex items-center\">\n {index > 0 && (\n <span\n className={cn(\n getSpacingClass(\"sm\", \"mx\"),\n \"text-fg-tertiary\",\n )}\n aria-hidden=\"true\"\n >\n {separator}\n </span>\n )}\n {isLast ? (\n <span\n className={cn(\n \"text-fg-primary\",\n getTypographyWeight(\"label\"),\n )}\n aria-current=\"page\"\n >\n {item.label}\n </span>\n ) : item.href ? (\n <a\n href={item.href}\n className={cn(\n \"inline-flex\",\n \"items-center\",\n getSpacingClass(\"xs\", \"px\"),\n getSpacingClass(\"xs\", \"pt\"),\n \"border-b-2\",\n \"border-transparent\",\n getTypographySize(\"bodySmall\"),\n getTypographyWeight(\"label\"),\n \"transition-colors\",\n \"text-fg-secondary\",\n \"hover:border-line-emphasis\",\n \"hover:text-fg-primary\",\n )}\n >\n {item.label}\n </a>\n ) : (\n <span className=\"text-fg-secondary\">{item.label}</span>\n )}\n </li>\n );\n })}\n </ol>\n </nav>\n );\n}\n","import { forwardRef, type HTMLAttributes, type ReactNode } from \"react\";\n// Concrete source-file imports so the server analyser walk stays clean\n// (the barrel ../../primitives transitively imports Input.tsx → useId()).\nimport Text from \"../../primitives/Text/Text\";\nimport { getSpacingClass } from \"../../tokens/spacing\";\nimport {\n getTypographySize,\n getTypographyWeightFromFontWeight,\n} from \"../../tokens/typography\";\nimport { cn } from \"../../utils\";\n\nexport interface EmptyStateBaseProps extends Omit<\n HTMLAttributes<HTMLDivElement>,\n \"children\"\n> {\n title: string;\n /**\n * Descriptive message below the title. Optional — several empty states\n * have only a title. When absent, `aria-label` is just the title and no\n * `<p>` element is rendered.\n */\n message?: string;\n /**\n * Optional decorative illustration (icon, SVG, image). Rendered\n * `aria-hidden` above the title.\n */\n illustration?: ReactNode;\n /**\n * Action slot — any ReactNode (link, button, custom CTA). Rendered\n * below the message (or title when message is absent).\n *\n * Use a plain `<a href>` or `next/link` here to keep the component\n * zero-JS in Server Components; the slot is passed through with no\n * wrapper or event handler added.\n *\n * @example\n * // Zero-JS link — Server Component safe\n * <EmptyStateBase\n * title=\"Sem resultados\"\n * action={<a href=\"/\">Limpar filtros</a>}\n * />\n */\n action?: ReactNode;\n}\n\n/**\n * EmptyStateBase — the **server-safe presentational core** of `EmptyState`\n * (issue #252 follow-up).\n *\n * It holds no React client state (no hooks, no `\"use client\"` directive), so\n * it can be imported from `@fabio.caffarello/react-design-system/server` and\n * rendered inside React Server Components and zero-JS routes.\n *\n * ### Trade-off vs `EmptyState`\n *\n * | Feature | EmptyStateBase | EmptyState |\n * |------------------------------|----------------------|-----------------------------|\n * | `action` ReactNode slot | ✅ | ✅ |\n * | `onAction` callback button | ❌ (needs client JS) | ✅ |\n * | `./server` exportable | ✅ | ❌ (barrel pulls Input/useId)|\n *\n * Use `EmptyState` when you need a client-driven callback button (`onAction`).\n * Use `EmptyStateBase` in Server Components where the CTA is a zero-JS link.\n */\nconst EmptyStateBase = forwardRef<HTMLDivElement, EmptyStateBaseProps>(\n function EmptyStateBase(\n { title, message, illustration, action, className = \"\", ...props },\n ref,\n ) {\n return (\n <div\n ref={ref}\n className={cn(\n \"flex\",\n \"flex-col\",\n \"items-center\",\n \"justify-center\",\n \"text-center\",\n getSpacingClass(\"xl\", \"py\"),\n getSpacingClass(\"base\", \"px\"),\n className,\n )}\n role=\"status\"\n aria-live=\"polite\"\n aria-label={message ? `${title}. ${message}` : title}\n {...props}\n >\n {illustration && (\n <div className={cn(getSpacingClass(\"base\", \"mb\"))} aria-hidden=\"true\">\n {illustration}\n </div>\n )}\n\n <Text\n as=\"h3\"\n className={cn(\n getTypographySize(\"h4\"),\n getTypographyWeightFromFontWeight(\"semibold\"),\n \"text-fg-primary\",\n getSpacingClass(\"sm\", \"mb\"),\n )}\n >\n {title}\n </Text>\n\n {message && (\n <Text\n as=\"p\"\n className={cn(\n getTypographySize(\"bodySmall\"),\n \"text-fg-secondary\",\n getSpacingClass(\"md\", \"mb\"),\n \"max-w-sm\",\n )}\n >\n {message}\n </Text>\n )}\n\n {action}\n </div>\n );\n },\n);\n\nEmptyStateBase.displayName = \"EmptyStateBase\";\n\nexport default EmptyStateBase;\n","import { type HTMLAttributes, type ReactNode } from \"react\";\nimport { cn } from \"../../utils\";\nimport { getSpacingClass } from \"../../tokens/spacing\";\n\nexport interface CardHeaderProps extends HTMLAttributes<HTMLDivElement> {\n children: ReactNode;\n}\n\nexport function CardHeader({ children, className, ...props }: CardHeaderProps) {\n return (\n <div\n className={cn(\n \"grid items-start\",\n getSpacingClass(\"1.5\", \"gap\"),\n getSpacingClass(\"base\", \"mb\"),\n \"[&:has([data-card-actions])]:grid-cols-[1fr_auto]\",\n \"[&:has([data-card-actions])>[data-card-actions]]:row-span-full\",\n className,\n )}\n {...props}\n >\n {children}\n </div>\n );\n}\n\nexport default CardHeader;\n","import { type HTMLAttributes, type ReactNode } from \"react\";\nimport { cn } from \"../../utils\";\nimport { getSpacingClass } from \"../../tokens/spacing\";\n\nexport type CardTitleAs = \"h1\" | \"h2\" | \"h3\" | \"h4\" | \"h5\" | \"h6\";\n\nexport interface CardTitleProps extends HTMLAttributes<HTMLHeadingElement> {\n children: ReactNode;\n /**\n * Optional icon rendered before the title text.\n */\n icon?: ReactNode;\n /**\n * Optional badge rendered after the title text.\n */\n badge?: ReactNode;\n /**\n * Heading level. Default `h2` — the typical depth for a card title\n * inside a page that already has an `h1`. Use `h3` (or deeper) when\n * the card sits inside a nested section.\n * @default 'h2'\n */\n as?: CardTitleAs;\n}\n\nexport function CardTitle({\n children,\n icon,\n badge,\n as: As = \"h2\",\n className,\n ...props\n}: CardTitleProps) {\n return (\n <As\n className={cn(\n \"text-base font-semibold text-fg-primary\",\n \"flex items-center\",\n getSpacingClass(\"sm\", \"gap\"),\n className,\n )}\n {...props}\n >\n {icon ? <span className=\"shrink-0 inline-flex\">{icon}</span> : null}\n <span>{children}</span>\n {badge ? <span className=\"inline-flex\">{badge}</span> : null}\n </As>\n );\n}\n\nexport default CardTitle;\n","import { type HTMLAttributes, type ReactNode } from \"react\";\nimport { cn } from \"../../utils\";\n\nexport interface CardSubtitleProps extends HTMLAttributes<HTMLParagraphElement> {\n children: ReactNode;\n}\n\nexport function CardSubtitle({\n children,\n className,\n ...props\n}: CardSubtitleProps) {\n return (\n <p className={cn(\"text-sm text-fg-secondary\", className)} {...props}>\n {children}\n </p>\n );\n}\n\nexport default CardSubtitle;\n","import { type HTMLAttributes, type ReactNode } from \"react\";\nimport { cn } from \"../../utils\";\nimport { getSpacingClass } from \"../../tokens/spacing\";\n\nexport interface CardActionsProps extends HTMLAttributes<HTMLDivElement> {\n children: ReactNode;\n}\n\n/**\n * CardActions — wrapper that hosts consumer-supplied action buttons\n * within a `Card.Header`.\n *\n * The `data-card-actions` attribute is the structural marker `CardHeader`\n * uses (via Tailwind v4 `:has()` selectors) to switch its grid layout\n * from a single column to `[1fr auto]` when actions are present, so\n * Title/Subtitle stack in column 1 and the action row spans both rows\n * in column 2. Consumers should not override this attribute.\n *\n * This component is presentational: it emits no handlers on the DOM\n * itself. The action elements (typically `<Button>`) are consumer-supplied\n * and React's RSC boundary keeps them as client references — the\n * wrapper stays server-safe.\n */\nexport function CardActions({\n children,\n className,\n ...props\n}: CardActionsProps) {\n return (\n <div\n data-card-actions=\"\"\n className={cn(\n \"flex items-center self-start\",\n getSpacingClass(\"sm\", \"gap\"),\n className,\n )}\n {...props}\n >\n {children}\n </div>\n );\n}\n\nexport default CardActions;\n","import { type HTMLAttributes, type ReactNode } from \"react\";\nimport { cn } from \"../../utils\";\n\nexport interface CardBodyProps extends HTMLAttributes<HTMLDivElement> {\n children: ReactNode;\n}\n\nexport function CardBody({ children, className, ...props }: CardBodyProps) {\n return (\n <div className={cn(className)} {...props}>\n {children}\n </div>\n );\n}\n\nexport default CardBody;\n","import { memo, type FC, type HTMLAttributes } from \"react\";\nimport { cn, cva } from \"../../utils\";\nimport { getRadiusClass, getShadowClass, getSpacingClass } from \"../../tokens\";\nimport { CardHeader } from \"./CardHeader\";\nimport { CardTitle } from \"./CardTitle\";\nimport { CardSubtitle } from \"./CardSubtitle\";\nimport { CardActions } from \"./CardActions\";\nimport { CardBody } from \"./CardBody\";\n\n// Ambient declaration so the dev-only warn typechecks without pulling\n// @types/node into the app tsconfig. At runtime the consumer's bundler\n// replaces `process.env.NODE_ENV` with a literal; the `typeof process`\n// guard keeps the branch safe in browser/edge runtimes where `process`\n// doesn't exist. Mirrors the precedent in Button.tsx.\ndeclare const process: { env: { NODE_ENV?: string } };\n\nexport interface CardProps extends HTMLAttributes<HTMLDivElement> {\n variant?: \"default\" | \"hover\" | \"selected\";\n padding?: \"none\" | \"small\" | \"medium\" | \"large\";\n onClick?: () => void;\n \"aria-label\"?: string;\n \"aria-labelledby\"?: string;\n /**\n * Render the root as a semantic `<section>` instead of `<div>`.\n * When `true`, the Card becomes a landmark — a screen-reader-visible\n * region in the document outline — so it MUST carry an accessible\n * name (either `aria-labelledby` pointing to a `Card.Title` `id` or\n * `aria-label`). A dev-only warning is emitted when this contract\n * isn't met; an anonymous landmark hurts navigation by announcing\n * \"region\" without a name.\n * @default false\n */\n asSection?: boolean;\n}\n\n/**\n * Card — versatile container.\n *\n * Supports the compound pattern via dot-notation:\n *\n * ```tsx\n * <Card asSection aria-labelledby=\"parlamentares-title\">\n * <Card.Header>\n * <Card.Title id=\"parlamentares-title\" icon={<Users />} badge={<Badge>Beta</Badge>}>\n * Parlamentares\n * </Card.Title>\n * <Card.Subtitle>Câmara e Senado</Card.Subtitle>\n * <Card.Actions>\n * <Button variant=\"ghost\">Editar</Button>\n * </Card.Actions>\n * </Card.Header>\n * <Card.Body>{children}</Card.Body>\n * </Card>\n * ```\n *\n * Backward compat: the flat form (`<Card>{children}</Card>`) and the\n * interactive form (`<Card onClick={...}>`) are unchanged.\n *\n * Server/client boundary: every subcomponent (Card, Card.Header,\n * Card.Title, Card.Subtitle, Card.Actions, Card.Body) is presentational\n * and ships in `./server`. Interactive children (Button with onClick,\n * Link, etc.) supplied via `<Card.Actions>` cross the RSC boundary\n * naturally — the wrapper stays server-safe.\n */\nfunction CardComponent({\n variant = \"default\",\n padding = \"medium\",\n className = \"\",\n onClick,\n \"aria-label\": ariaLabel,\n \"aria-labelledby\": ariaLabelledBy,\n asSection = false,\n children,\n ...props\n}: CardProps) {\n if (\n typeof process !== \"undefined\" &&\n process.env.NODE_ENV !== \"production\" &&\n asSection &&\n !ariaLabel &&\n !ariaLabelledBy\n ) {\n console.warn(\n \"[Card] `asSection={true}` requires an accessible name. Pass `aria-labelledby` pointing to your Card.Title `id`, or `aria-label`. A <section> without a name is an anonymous landmark that hurts screen-reader navigation.\",\n );\n }\n\n const cardVariants = cva(\n cn(\n \"bg-surface-base\",\n getRadiusClass(\"lg\"),\n \"border\",\n \"border-line-default\",\n getShadowClass(\"sm\"),\n ),\n {\n variants: {\n variant: {\n default: \"\",\n hover: cn(\n `hover:${getShadowClass(\"md\")}`,\n \"transition-shadow\",\n \"cursor-pointer\",\n ),\n selected: cn(\"border-line-brand\", getShadowClass(\"md\")),\n },\n padding: {\n none: \"\",\n small: getSpacingClass(\"xs\", \"p\"),\n medium: getSpacingClass(\"base\", \"p\"),\n large: getSpacingClass(\"lg\", \"p\"),\n },\n },\n defaultVariants: {\n variant: \"default\",\n padding: \"medium\",\n },\n },\n );\n\n // ARIA interactivity is driven by `onClick` ONLY. `variant=\"hover\"` is\n // a visual style (hover shadow + cursor hint via cardVariants) — not a\n // declaration that the card is clickable. The previous coupling made\n // any `variant=\"hover\"` Card a `role=\"button\" tabindex=0` outer, which\n // triggered axe `nested-interactive` whenever the consumer composed\n // Buttons inside. Decoupling fixes that without changing the visual\n // behavior. Stories that want a clickable card already pass `onClick`.\n const isInteractive = onClick !== undefined;\n const role = isInteractive ? \"button\" : undefined;\n const tabIndex = isInteractive ? 0 : undefined;\n\n const classes = cn(cardVariants({ variant, padding }), className);\n\n const handleKeyDown = (e: React.KeyboardEvent<HTMLElement>) => {\n if (isInteractive && (e.key === \"Enter\" || e.key === \" \")) {\n e.preventDefault();\n onClick?.();\n }\n };\n\n // Polymorphic root: <section> when asSection, <div> otherwise. Both\n // accept the same HTMLAttributes via `...props` (HTMLDivElement and\n // HTMLElement attribute sets overlap on the props we use).\n const commonProps = {\n className: classes,\n role,\n tabIndex,\n onClick,\n onKeyDown: isInteractive ? handleKeyDown : undefined,\n \"aria-label\": ariaLabel,\n \"aria-labelledby\": ariaLabelledBy,\n ...props,\n } as const;\n\n if (asSection) {\n return <section {...commonProps}>{children}</section>;\n }\n return <div {...commonProps}>{children}</div>;\n}\n\nconst MemoCard = memo(CardComponent);\nMemoCard.displayName = \"Card\";\n\n// Compound components (dot-notation). Pattern follows Tabs.tsx — define\n// the function, attach subcomponents, cast to a type that exposes them.\ntype CardCompound = FC<CardProps> & {\n Header: typeof CardHeader;\n Title: typeof CardTitle;\n Subtitle: typeof CardSubtitle;\n Actions: typeof CardActions;\n Body: typeof CardBody;\n};\n\nconst Card = MemoCard as unknown as CardCompound;\nCard.Header = CardHeader;\nCard.Title = CardTitle;\nCard.Subtitle = CardSubtitle;\nCard.Actions = CardActions;\nCard.Body = CardBody;\n\nexport default Card;\n","\"use client\";\n\nimport { type HTMLAttributes, type ReactNode } from \"react\";\nimport { getSpacingClass } from \"../../tokens/spacing\";\n\nexport interface DialogHeaderProps extends HTMLAttributes<HTMLDivElement> {\n children: ReactNode;\n}\n\nexport function DialogHeader({\n children,\n className = \"\",\n ...props\n}: DialogHeaderProps) {\n return (\n <div\n className={`flex flex-col ${getSpacingClass(\"1.5\", \"space-y\")} ${getSpacingClass(\"lg\", \"p\")} ${getSpacingClass(\"base\", \"pb\")} ${className}`}\n {...props}\n >\n {children}\n </div>\n );\n}\n","\"use client\";\n\nimport { type HTMLAttributes, type ReactNode } from \"react\";\nimport { getSpacingClass } from \"../../tokens/spacing\";\n\nexport interface DialogFooterProps extends HTMLAttributes<HTMLDivElement> {\n children: ReactNode;\n}\n\nexport function DialogFooter({\n children,\n className = \"\",\n ...props\n}: DialogFooterProps) {\n return (\n <div\n className={`flex flex-col-reverse sm:flex-row sm:justify-end sm:${getSpacingClass(\"sm\", \"space-x\")} ${getSpacingClass(\"lg\", \"p\")} ${getSpacingClass(\"base\", \"pt\")} ${className}`}\n {...props}\n >\n {children}\n </div>\n );\n}\n","\"use client\";\n\nimport { type ReactNode, type HTMLAttributes } from \"react\";\nimport { getSpacingClass } from \"../../tokens/spacing\";\n\nexport interface DrawerHeaderProps extends HTMLAttributes<HTMLDivElement> {\n children: ReactNode;\n}\n\n/**\n * DrawerHeader Component\n *\n * Header section for drawer content.\n *\n * @example\n * ```tsx\n * <DrawerHeader>\n * <h2>Drawer Title</h2>\n * </DrawerHeader>\n * ```\n */\nexport default function DrawerHeader({\n children,\n className = \"\",\n ...props\n}: DrawerHeaderProps) {\n return (\n <div\n className={`\n ${getSpacingClass(\"lg\", \"p\")}\n border-b\n border-line-default\n ${className}\n `}\n {...props}\n >\n {children}\n </div>\n );\n}\n","\"use client\";\n\nimport { type ReactNode, type HTMLAttributes } from \"react\";\nimport { getSpacingClass } from \"../../tokens/spacing\";\n\nexport interface DrawerFooterProps extends HTMLAttributes<HTMLDivElement> {\n children: ReactNode;\n}\n\n/**\n * DrawerFooter Component\n *\n * Footer section for drawer content, typically contains action buttons.\n *\n * @example\n * ```tsx\n * <DrawerFooter>\n * <Button>Save</Button>\n * <Button variant=\"outline\">Cancel</Button>\n * </DrawerFooter>\n * ```\n */\nexport default function DrawerFooter({\n children,\n className = \"\",\n ...props\n}: DrawerFooterProps) {\n return (\n <div\n className={`\n ${getSpacingClass(\"lg\", \"p\")}\n border-t\n border-line-default\n flex\n justify-end\n ${getSpacingClass(\"sm\", \"gap\")}\n ${className}\n `}\n {...props}\n >\n {children}\n </div>\n );\n}\n","import type { HTMLAttributes, ReactNode } from \"react\";\nimport { getSpacingClass } from \"../../tokens/spacing\";\nimport { cn } from \"../../utils\";\n\nexport interface FilterChipsProps extends HTMLAttributes<HTMLDivElement> {\n /**\n * Optional group label rendered as neutral text at the left of the\n * chips (e.g. \"Filtros\"). Deliberately NOT a `<legend>`/`<fieldset>`\n * pair — FilterChips groups navigation/selection chips, not form\n * controls, and fieldset semantics would imply a form that isn't\n * there. When `label` is a plain string it doubles as the group's\n * accessible name (see the aria-label contract in the component\n * JSDoc).\n */\n label?: ReactNode;\n /**\n * The chips. Typically `<Chip>` elements — including the\n * `<Chip asChild><Link/></Chip>` navigation form — but any inline\n * content composes.\n */\n children: ReactNode;\n /**\n * Whether chips wrap to new lines when they overflow the container\n * width. `true` (default) applies `flex-wrap` — the responsive\n * filter-bar behavior; `false` applies `flex-nowrap` and keeps\n * everything on one line (consumer owns overflow handling).\n * @default true\n */\n wrap?: boolean;\n}\n\n/**\n * `FilterChips` — groups `Chip`s into a labeled filter bar.\n *\n * The shell of every chip-based filter row: a `role=\"group\"` container\n * with an optional neutral text label at the left and a flex run of\n * chips that wraps responsively by default. Purely presentational — the\n * interactive identity (select, navigate, remove) lives in each `Chip`\n * (`onClick`/`onRemove`, or `asChild` with a consumer `<Link>`), never\n * in this wrapper.\n *\n * ### Accessible name contract\n *\n * The container carries `role=\"group\"` so assistive technology can\n * announce the chips as one named unit. The accessible name resolves in\n * this order:\n *\n * 1. An explicit `aria-label` OR `aria-labelledby` passed by the\n * consumer always wins — when either is present, no name is derived\n * from `label`, so the consumer's attribute is the only naming on the\n * element (no redundant `aria-label` is left alongside an\n * `aria-labelledby`).\n * 2. Otherwise, when `label` is a non-empty plain string, it is reused\n * as the group's `aria-label` automatically.\n * 3. When `label` is a non-string `ReactNode` (or absent), no\n * `aria-label` is derived — supply `aria-label`/`aria-labelledby`\n * yourself if the group needs a name AT users can identify it by.\n *\n * ### Server-safe\n *\n * Pure presentation — no hooks, no event handlers on the DOM. Ships in\n * the `./server` entry. Consumer-supplied chips may themselves be\n * client components (`<Chip onRemove>`); React's RSC boundary handles\n * that normally, and the zero-JS path (`<Chip asChild><Link/></Chip>`)\n * stays fully server-rendered.\n *\n * @example\n * ```tsx\n * // Navigation filter bar — server-rendered, zero-JS-friendly.\n * <FilterChips label=\"Filtros\">\n * <Chip asChild selected>\n * <Link href=\"?uf=SP\" aria-current=\"page\">UF: SP</Link>\n * </Chip>\n * <Chip asChild>\n * <Link href=\"?partido=PT\">Partido: PT</Link>\n * </Chip>\n * </FilterChips>\n *\n * // Single-line variant (consumer owns horizontal overflow).\n * <FilterChips label=\"Período\" wrap={false}>\n * <Chip>2024</Chip>\n * <Chip>2025</Chip>\n * </FilterChips>\n * ```\n */\nexport function FilterChips({\n label,\n children,\n wrap = true,\n className,\n ...props\n}: FilterChipsProps) {\n // The string label doubles as the group's accessible name — but only\n // when the consumer supplies no naming of their own. An explicit\n // `aria-label` OR `aria-labelledby` (both spread onto the root below)\n // takes precedence; deriving a name alongside `aria-labelledby` would\n // leave a redundant `aria-label` on the element, so suppress it here\n // rather than relying on ARIA name-computation precedence to hide it.\n const hasConsumerName =\n props[\"aria-label\"] != null || props[\"aria-labelledby\"] != null;\n const derivedAriaLabel =\n !hasConsumerName && typeof label === \"string\" && label !== \"\"\n ? label\n : undefined;\n\n return (\n <div\n role=\"group\"\n aria-label={derivedAriaLabel}\n className={cn(\n \"flex items-center\",\n wrap ? \"flex-wrap\" : \"flex-nowrap\",\n getSpacingClass(\"sm\", \"gap\"),\n className,\n )}\n {...props}\n >\n {label ? (\n // shrink-0 keeps the label a stable leading unit: in the wrapping\n // flex run it must not be squeezed or mid-word-wrapped when the\n // chips overflow — it stays on one line and the chips wrap around it.\n <span className=\"shrink-0 text-fg-secondary text-sm\">{label}</span>\n ) : null}\n {children}\n </div>\n );\n}\n\nexport default FilterChips;\n","/**\n * HeaderActions Component\n *\n * Actions slot component for Header (typically buttons, user menu, etc.).\n *\n * @see EPIC-002: Header Component\n * @see RFC-003: Header Composition Pattern (APPROVED)\n */\n\n\"use client\";\n\nimport { type ReactNode } from \"react\";\nimport { cn } from \"../../../utils\";\nimport { getSpacingClass } from \"../../../tokens/spacing\";\n\nexport interface HeaderActionsProps {\n /**\n * Actions content (typically Button components)\n */\n children: ReactNode;\n\n /**\n * Additional CSS classes\n */\n className?: string;\n}\n\n/**\n * HeaderActions Component\n *\n * Actions slot for Header. Typically contains Button components or user menu.\n *\n * @example\n * ```tsx\n * <Header.Actions>\n * <Button variant=\"outline\">Sign In</Button>\n * <Button variant=\"primary\">Sign Up</Button>\n * </Header.Actions>\n * ```\n */\nexport function HeaderActions({ children, className }: HeaderActionsProps) {\n return (\n <div\n className={cn(\n \"flex-shrink-0 flex items-center\",\n getSpacingClass(\"sm\", \"gap\"),\n className,\n )}\n >\n {children}\n </div>\n );\n}\n","/**\n * HeaderNavigation Component\n *\n * Navigation slot component for Header.\n *\n * @see EPIC-002: Header Component\n * @see RFC-003: Header Composition Pattern (APPROVED)\n */\n\n\"use client\";\n\nimport { type ReactNode } from \"react\";\nimport { cn } from \"../../../utils\";\nimport { getSpacingClass } from \"../../../tokens/spacing\";\n\nexport interface HeaderNavigationProps {\n /**\n * Navigation content (typically NavLink components)\n */\n children: ReactNode;\n\n /**\n * Additional CSS classes\n */\n className?: string;\n}\n\n/**\n * HeaderNavigation Component\n *\n * Navigation slot for Header. Typically contains NavLink components.\n *\n * @example\n * ```tsx\n * <Header.Navigation>\n * <NavLink href=\"/home\">Home</NavLink>\n * <NavLink href=\"/about\">About</NavLink>\n * </Header.Navigation>\n * ```\n */\nexport function HeaderNavigation({\n children,\n className,\n}: HeaderNavigationProps) {\n return (\n <nav\n className={cn(\n \"flex-1 flex items-center justify-center\",\n getSpacingClass(\"base\", \"gap\"),\n \"hidden md:flex\", // Hidden on mobile, visible on desktop\n className,\n )}\n aria-label=\"Main navigation\"\n >\n {children}\n </nav>\n );\n}\n","import { forwardRef } from \"react\";\nimport type { HTMLAttributes, ReactNode } from \"react\";\n// Concrete-source-file import (NOT the `../../primitives` barrel): the barrel\n// re-exports client primitives like Input (useMemo), which would taint the\n// static server-safe analysis of this module and bar it from `./server`.\n// See issue #178 in `.claude/rules/server-entry.md` for the worked example.\nimport Text from \"../../primitives/Text/Text\";\nimport { cn, cva } from \"../../utils\";\nimport { getSpacingClass } from \"../../tokens/spacing\";\n\n// Ambient declaration so the dev-only warn typechecks without pulling\n// @types/node into the app tsconfig; the `typeof process` guard keeps the\n// branch safe in browser/edge runtimes where `process` doesn't exist. At\n// runtime the consumer's bundler replaces `process.env.NODE_ENV` with a\n// literal. Mirrors the precedent in Card.tsx / Button.tsx.\ndeclare const process: { env: { NODE_ENV?: string } };\n\n/**\n * Visual treatment of the hero surface.\n *\n * - `plain` — no decorative background; the hero is text + padding on\n * whatever surface it sits on.\n * - `gradient` — a soft brand→secondary wash (theme-aware, see\n * `utilities/gradients.css`).\n * - `gradient-glow` — the same wash plus a brand-colored outer glow for\n * top-of-funnel emphasis (landing / home).\n */\nexport type HeroSectionVariant = \"plain\" | \"gradient\" | \"gradient-glow\";\n\n/** Block alignment of the hero content. */\nexport type HeroSectionAlign = \"start\" | \"center\";\n\nexport interface HeroSectionProps\n // `title` is omitted from the inherited DOM attributes because the native\n // `title` attribute is typed `string`, which is incompatible with our\n // `ReactNode` title slot. Everything else (id, aria-*, data-*, className)\n // still flows through to the root <section>.\n extends Omit<HTMLAttributes<HTMLElement>, \"title\"> {\n /** Eyebrow / kicker above the title (rendered uppercase, brand-colored). */\n kicker?: ReactNode;\n /**\n * The hero title. Rendered as the section's `<h1>`. **Required.**\n *\n * When `title` is a plain string it also becomes the accessible name of\n * the hero `<section>` landmark (the FilterChips `label` pattern). When it\n * is a non-string `ReactNode`, supply `aria-label` or `aria-labelledby`\n * yourself — otherwise the landmark renders without an accessible name and\n * the component emits a dev-only warning.\n */\n title: ReactNode;\n /** Supporting copy below the title (constrained to a readable measure). */\n description?: ReactNode;\n /** Call-to-action slot — typically one or more `<Button>`s. */\n actions?: ReactNode;\n /** Metrics slot — typically a `<StatGroup>` of `<Stat>`s. Spans full width. */\n kpis?: ReactNode;\n /** A line of metadata below everything else (low emphasis). */\n meta?: ReactNode;\n /**\n * Visual treatment of the hero surface.\n * @default 'plain'\n */\n variant?: HeroSectionVariant;\n /**\n * Block alignment of the content.\n * @default 'start'\n */\n align?: HeroSectionAlign;\n /** Additional CSS classes merged onto the root `<section>`. */\n className?: string;\n}\n\n/**\n * HeroSection variants (CVA).\n *\n * The decorative `variant` axis only swaps background / shadow; the `align`\n * axis only swaps text-alignment. Per-block flex alignment (centering the\n * text column, the actions row) is handled by the lookup records below,\n * because those classes land on child elements, not the root.\n */\nconst heroSectionVariants = cva(\n cn(\n \"w-full flex flex-col\",\n getSpacingClass(\"2xl\", \"py\"), // 40px vertical breathing room\n getSpacingClass(\"lg\", \"px\"), // 24px horizontal\n getSpacingClass(\"xl\", \"gap-y\"), // 32px between major blocks\n ),\n {\n variants: {\n variant: {\n plain: \"\",\n gradient: \"hero-gradient\",\n \"gradient-glow\": cn(\"hero-gradient\", \"hero-glow\"),\n },\n align: {\n start: \"text-left\",\n center: \"text-center\",\n },\n },\n defaultVariants: {\n variant: \"plain\",\n align: \"start\",\n },\n },\n);\n\n/** Cross-axis alignment for the inner text column (kicker/title/description). */\nconst blockItems: Record<HeroSectionAlign, string> = {\n start: \"items-start\",\n center: \"items-center\",\n};\n\n/** Main-axis alignment for the actions row. */\nconst actionsJustify: Record<HeroSectionAlign, string> = {\n start: \"justify-start\",\n center: \"justify-center\",\n};\n\n/**\n * `HeroSection` — top-of-page hero: kicker + title + description + actions +\n * kpis + meta, in three visual treatments (`plain` / `gradient` /\n * `gradient-glow`) and two alignments (`start` / `center`).\n *\n * Distinct from `PageHeader` (contextual navigation: breadcrumb + title +\n * actions). The hero is a page/landing **introduction** with a visual\n * identity and slots for KPIs and metadata.\n *\n * ### Slots\n *\n * Every slot except `title` is optional and collapses cleanly when absent —\n * no empty wrapper leaks into the DOM. `kpis` is an opaque slot: pass a\n * `<StatGroup>` (or any node); the consumer chooses the metric layout.\n *\n * ### Landmark & accessible name\n *\n * Renders as a `<section>`. A `<section>` is only exposed as a navigable\n * region when it has an accessible name, so the component derives one:\n * - a string `title` becomes the `aria-label` automatically;\n * - an explicit `aria-label` / `aria-labelledby` from the consumer always\n * wins (and `aria-labelledby` suppresses the derived label to avoid a\n * redundant name);\n * - a non-string `title` with no consumer-supplied name triggers a dev-only\n * `console.warn` (dead-code-eliminated in production builds).\n *\n * ### Server-safe\n *\n * Pure presentation — no hooks, no event handlers on the DOM. Ships in the\n * `./server` entry. Interactive children supplied via `actions` (e.g.\n * `<Button onClick>`) cross the RSC boundary as client references normally.\n *\n * @example\n * ```tsx\n * <HeroSection\n * variant=\"gradient-glow\"\n * align=\"center\"\n * kicker=\"Transparência\"\n * title=\"Acompanhe o Congresso em tempo real\"\n * description=\"Proposições, votações e parlamentares — tudo em um só lugar.\"\n * actions={<Button variant=\"primary\">Começar</Button>}\n * kpis={\n * <StatGroup layout=\"strip\">\n * <Stat value=\"9,4 mil\" label=\"Parlamentares\" align=\"center\" />\n * <Stat value=\"3,2 mil\" label=\"Proposições\" align=\"center\" />\n * </StatGroup>\n * }\n * meta=\"Atualizado diariamente\"\n * />\n * ```\n */\nconst HeroSection = forwardRef<HTMLElement, HeroSectionProps>(\n function HeroSection(\n {\n kicker,\n title,\n description,\n actions,\n kpis,\n meta,\n variant = \"plain\",\n align = \"start\",\n className,\n \"aria-label\": ariaLabel,\n \"aria-labelledby\": ariaLabelledBy,\n ...rest\n },\n ref,\n ) {\n const hasExplicitName = ariaLabel != null || ariaLabelledBy != null;\n const resolvedAriaLabel =\n ariaLabel ?? (typeof title === \"string\" ? title : undefined);\n\n if (\n typeof process !== \"undefined\" &&\n process.env.NODE_ENV !== \"production\" &&\n !hasExplicitName &&\n typeof title !== \"string\"\n ) {\n console.warn(\n \"[HeroSection] A non-string `title` was provided without `aria-label` \" +\n \"or `aria-labelledby`. The hero <section> landmark will have no \" +\n \"accessible name. Pass `aria-label`, or set `aria-labelledby` to \" +\n \"your title's id.\",\n );\n }\n\n return (\n <section\n ref={ref}\n className={cn(heroSectionVariants({ variant, align }), className)}\n aria-label={resolvedAriaLabel}\n aria-labelledby={ariaLabelledBy}\n {...rest}\n >\n {/* Text column — tighter internal rhythm than the major-block gap. */}\n <div\n className={cn(\n \"flex flex-col\",\n getSpacingClass(\"md\", \"gap-y\"),\n blockItems[align],\n )}\n >\n {kicker ? (\n <Text\n as=\"span\"\n variant=\"caption\"\n colorRole=\"primary\"\n colorShade=\"DEFAULT\"\n className=\"text-sm font-semibold tracking-wide uppercase\"\n >\n {kicker}\n </Text>\n ) : null}\n\n <Text\n as=\"h1\"\n variant=\"heading\"\n className=\"text-3xl font-bold tracking-tight sm:text-4xl\"\n >\n {title}\n </Text>\n\n {description ? (\n <Text\n as=\"p\"\n variant=\"body\"\n colorRole=\"neutral\"\n colorShade=\"DEFAULT\"\n className=\"max-w-2xl text-base leading-relaxed sm:text-lg\"\n >\n {description}\n </Text>\n ) : null}\n </div>\n\n {actions ? (\n <div\n className={cn(\n \"flex flex-wrap\",\n getSpacingClass(\"sm\", \"gap\"),\n actionsJustify[align],\n )}\n >\n {actions}\n </div>\n ) : null}\n\n {kpis ? <div className=\"w-full\">{kpis}</div> : null}\n\n {meta ? (\n <Text\n as=\"p\"\n variant=\"caption\"\n colorRole=\"neutral\"\n colorShade=\"light\"\n className=\"text-sm\"\n >\n {meta}\n </Text>\n ) : null}\n </section>\n );\n },\n);\n\nHeroSection.displayName = \"HeroSection\";\n\nexport default HeroSection;\n","\"use client\";\n\nimport { type HTMLAttributes } from \"react\";\nimport { getSpacingClass } from \"../../tokens/spacing\";\n\nexport type MenuSeparatorProps = HTMLAttributes<HTMLDivElement>;\n\n/**\n * MenuSeparator Component\n *\n * A visual separator for menu items.\n *\n * @example\n * ```tsx\n * <MenuSeparator />\n * ```\n */\nexport default function MenuSeparator({\n className = \"\",\n ...props\n}: MenuSeparatorProps) {\n return (\n <div\n role=\"separator\"\n className={`\n h-px\n bg-line-default\n ${getSpacingClass(\"sm\", \"my\")}\n ${className}\n `}\n {...props}\n />\n );\n}\n","\"use client\";\n\nimport { cn } from \"../../../../utils\";\nimport { getSpacingClass } from \"../../../../tokens/spacing\";\nimport type { NavbarSeparatorProps } from \"../../types\";\n\n/**\n * Separator for the Navbar subcomponent\n *\n * Creates visual separation between groups of navigation items.\n *\n * @example\n * ```tsx\n * <SideNavbar.Navbar>\n * <SideNavbar.Navbar.Item icon={<Home />} label=\"Home\" />\n * <SideNavbar.Navbar.Separator />\n * <SideNavbar.Navbar.Item icon={<Settings />} label=\"Settings\" />\n * </SideNavbar.Navbar>\n * ```\n */\nexport default function NavbarSeparator({\n orientation = \"horizontal\",\n className = \"\",\n ...props\n}: NavbarSeparatorProps) {\n if (orientation === \"vertical\") {\n return (\n <div\n className={cn(\"w-px\", \"h-6\", \"bg-line-default\", \"mx-auto\", className)}\n role=\"separator\"\n aria-orientation=\"vertical\"\n {...props}\n />\n );\n }\n\n return (\n <div\n className={cn(\n \"w-full\",\n \"h-px\",\n \"bg-line-default\",\n getSpacingClass(\"sm\", \"my\"), // my-2 (8px) para consistência com gap-2 usado em outros lugares\n \"flex-shrink-0\", // Prevenir que separator encolha\n className,\n )}\n role=\"separator\"\n aria-orientation=\"horizontal\"\n style={{\n // Garantir que separator não seja afetado por transformações\n willChange: \"auto\",\n transform: \"none\",\n }}\n {...props}\n />\n );\n}\n","/**\n * PageHeader Component\n *\n * Page header component with title, description, breadcrumb, and actions.\n *\n * @see EPIC-004: PageHeader Component\n */\n\nimport Breadcrumb from \"../Breadcrumb/Breadcrumb\";\nimport Text from \"../../primitives/Text/Text\";\nimport type { PageHeaderProps } from \"./types\";\nimport { cn, cva } from \"../../utils\";\nimport { getSpacingClass } from \"../../tokens/spacing\";\n\n/**\n * PageHeader Variants using CVA\n * Type-safe variant system for PageHeader component\n */\nconst pageHeaderVariants = cva(\n // Base classes\n cn(\"w-full\", \"flex\", \"flex-col\", getSpacingClass(\"sm\", \"gap\")),\n {\n variants: {\n variant: {\n default: cn(getSpacingClass(\"base\", \"mb\")),\n compact: cn(getSpacingClass(\"sm\", \"mb\")),\n },\n },\n defaultVariants: {\n variant: \"default\",\n },\n },\n);\n\n/**\n * PageHeader Component\n *\n * Page header with title, description, breadcrumb, and actions.\n *\n * @example\n * ```tsx\n * <PageHeader\n * title=\"Page Title\"\n * description=\"Page description\"\n * breadcrumb={[\n * { label: 'Home', href: '/' },\n * { label: 'Page', href: '/page' },\n * ]}\n * actions={<Button>Action</Button>}\n * />\n * ```\n */\nexport function PageHeader({\n title,\n description,\n breadcrumb,\n actions,\n variant = \"default\",\n className,\n ...props\n}: PageHeaderProps) {\n return (\n <div className={cn(pageHeaderVariants({ variant }), className)} {...props}>\n {/* Breadcrumb */}\n {breadcrumb && breadcrumb.length > 0 && <Breadcrumb items={breadcrumb} />}\n\n {/* Title and Actions Row */}\n <div\n className={`flex items-start justify-between ${getSpacingClass(\"base\", \"gap\")}`}\n >\n {/* Title and Description */}\n <div className=\"flex-1 min-w-0\">\n <Text\n variant=\"heading\"\n as=\"h1\"\n className={`${getSpacingClass(\"sm\", \"mb\")} text-2xl font-bold`}\n >\n {title}\n </Text>\n {description && (\n <Text variant=\"body\" className=\"text-fg-secondary\">\n {description}\n </Text>\n )}\n </div>\n\n {/* Actions */}\n {actions && (\n <div\n className={`flex items-center ${getSpacingClass(\"sm\", \"gap\")} flex-shrink-0`}\n >\n {actions}\n </div>\n )}\n </div>\n </div>\n );\n}\n\nexport default PageHeader;\n","import { type HTMLAttributes, type ReactNode } from \"react\";\nimport { cn } from \"../../utils\";\nimport { getSpacingClass } from \"../../tokens/spacing\";\n\nexport type StatTone = \"neutral\" | \"success\" | \"warning\" | \"error\";\nexport type StatAlign = \"start\" | \"center\";\n\nexport interface StatProps extends HTMLAttributes<HTMLDivElement> {\n /**\n * The metric value to display. Strings are rendered verbatim — formatting\n * (number locale, currency, units, relative time, etc.) is the consumer's\n * responsibility, not the design system's. Pass `null` or `undefined` to\n * render the empty-state placeholder (see \"Empty state\" below).\n */\n value: ReactNode;\n /**\n * Short metric label (e.g. \"Votos\", \"Alinhamento\"). Required for screen\n * reader context — the label describes what the value means.\n */\n label: string;\n /**\n * Optional third line of context below the value (e.g. \"no banco\",\n * \"últimos 12 m\", \"+3% no mês\"). The `tone` prop styles THIS line — see\n * `tone` for the contract.\n */\n hint?: ReactNode;\n /**\n * Optional icon rendered above the value (home-style stats use icons;\n * detail-page stats typically don't).\n */\n icon?: ReactNode;\n /**\n * Block alignment. `start` left-aligns label/value/hint (detail-page\n * style); `center` centers them (home-hero style).\n * @default 'start'\n */\n align?: StatAlign;\n /**\n * Semantic tone for the metric — `neutral` for plain stats, the others\n * for classified states (good/warning/bad).\n *\n * **Scope (contract).** Tone affects ONLY the `hint`, not the `value`,\n * `label`, or `icon`. The `value` always renders in `text-fg-primary`\n * regardless of tone; the `label` in `text-fg-secondary`; the `icon` in\n * `text-icon-default`. This is deliberate — a colored value would\n * compete with the label for attention and bias the reader's\n * interpretation of the metric. If a future requirement needs the\n * `value` (or icon) to inherit tone, that becomes a new prop or a\n * semver-bound default change, not a surprise expansion of `tone`.\n *\n * Tone maps directly to the semantic foreground tokens (no new\n * vocabulary): `neutral` → `text-fg-tertiary`, `success` →\n * `text-fg-success`, `warning` → `text-fg-warning`, `error` →\n * `text-fg-error`. See `.claude/rules/colors.md`.\n *\n * @default 'neutral'\n */\n tone?: StatTone;\n}\n\nconst alignClasses: Record<StatAlign, string> = {\n start: \"items-start text-left\",\n center: \"items-center text-center\",\n};\n\nconst toneHintClasses: Record<StatTone, string> = {\n neutral: \"text-fg-tertiary\",\n success: \"text-fg-success\",\n warning: \"text-fg-warning\",\n error: \"text-fg-error\",\n};\n\n/**\n * `Stat` — a single statistic block (icon? + value + label + hint?).\n *\n * Composes with `StatGroup` (1-px-divider strip or grid) but is also\n * valid standalone — a single `Stat` outside a group is a legitimate use\n * case for a hero metric.\n *\n * ### Empty state contract\n *\n * When `value` is `null` OR `undefined`, the component renders the\n * em-dash placeholder `—` (U+2014) with `aria-label=\"No data\"` on its\n * wrapper. The label is intentionally hard-coded in English in this\n * version; a screen reader announcing \"No data\" in an otherwise\n * Portuguese app is a known inconsistency accepted for now — if i18n\n * becomes a requirement, an `emptyLabel?: string` prop will be added in\n * a follow-up PR (semver-safe addition).\n *\n * Other falsy values — `0`, `\"\"`, `false`, an empty fragment — are\n * **legitimate values** and render as-is. The empty trigger is only\n * `null`/`undefined`, because `0` (count = zero) is meaningful data that\n * the consumer would not want masked.\n *\n * ### Server-safe\n *\n * Pure presentation — no hooks, no event handlers on the DOM. Ships in\n * the `./server` entry alongside `StatGroup`. Consumer-supplied `icon`\n * may itself be a client component; React's RSC boundary handles that\n * normally.\n *\n * @example\n * ```tsx\n * // Home-style (centered, with icon)\n * <Stat\n * icon={<Users size={20} aria-hidden=\"true\" />}\n * value=\"9,4 mil\"\n * label=\"Parlamentares\"\n * align=\"center\"\n * />\n *\n * // Detail-page-style (start-aligned, with hint)\n * <Stat\n * value=\"87%\"\n * label=\"Alinhamento\"\n * hint=\"últimos 12 meses\"\n * tone=\"success\"\n * />\n * ```\n */\nexport function Stat({\n value,\n label,\n hint,\n icon,\n align = \"start\",\n tone = \"neutral\",\n className,\n ...props\n}: StatProps) {\n const isEmpty = value === null || value === undefined;\n\n return (\n <div\n className={cn(\n \"bg-surface-base flex-1 flex flex-col\",\n getSpacingClass(\"base\", \"p\"),\n getSpacingClass(\"xs\", \"gap-y\"),\n alignClasses[align],\n className,\n )}\n {...props}\n >\n {icon ? (\n <span className=\"text-icon-default inline-flex\">{icon}</span>\n ) : null}\n {isEmpty ? (\n <span\n aria-label=\"No data\"\n className=\"text-fg-tertiary text-2xl font-semibold leading-tight\"\n >\n —\n </span>\n ) : (\n <span className=\"text-fg-primary text-2xl font-semibold leading-tight\">\n {value}\n </span>\n )}\n <span className=\"text-fg-secondary text-sm\">{label}</span>\n {hint ? (\n <span className={cn(\"text-xs\", toneHintClasses[tone])}>{hint}</span>\n ) : null}\n </div>\n );\n}\n\nexport default Stat;\n","import { type HTMLAttributes, type ReactNode } from \"react\";\nimport { cn } from \"../../utils\";\nimport { getRadiusClass } from \"../../tokens/radius\";\nimport { getSpacingClass } from \"../../tokens/spacing\";\n\nexport type StatGroupLayout = \"strip\" | \"grid\";\nexport type StatGroupCols = 2 | 3 | 4;\n\nexport interface StatGroupProps extends HTMLAttributes<HTMLDivElement> {\n /**\n * `strip` — single horizontal row, no wrap. Each `Stat` shares the row\n * width via `flex-1`. Use when you guarantee the horizontal space\n * (hero areas, wide dashboards). On narrow viewports the row does NOT\n * reflow — choose `grid` if you need responsive collapse.\n *\n * `grid` — multi-column grid that reflows. Always 2-up on mobile,\n * expands to `cols` columns at the `md` breakpoint (768 px) and up.\n * Five or more children spill to a second row with the divider lines\n * preserved.\n *\n * @default 'grid'\n */\n layout?: StatGroupLayout;\n /**\n * Desktop column count (≥ 768 px). Only effective in `layout=\"grid\"`;\n * ignored in `layout=\"strip\"`. Mobile is always 2 columns regardless.\n *\n * @default 4\n */\n cols?: StatGroupCols;\n /**\n * Optional slot for a badge that floats centered over the top border of\n * the container. Use when all metrics in the group share a common\n * provenance mark (e.g. a trust badge, data-source seal, tier label).\n *\n * The slot is intentionally opaque — the consumer supplies any ReactNode\n * and owns the badge's styling and a11y. `StatGroup` provides only the\n * positioning, not the badge shape. This is the same convention as the\n * `kicker` slot in `HeroSection` or the `badge` slot in `PageHeader`.\n *\n * ### Layout\n *\n * When `floatingBadge` is supplied the outer container gains\n * `pt-4` (16 px) top padding, which creates a landing zone for the\n * badge's bottom half while keeping the first stat row clear. The badge\n * itself is absolutely centred at `top-4 left-1/2`, then shifted up by\n * `−50%` of its own height so its centre sits on the inner container's\n * top border. This calibration is accurate for badges up to ~32 px tall\n * (a standard `Badge` or small `Chip`). If a taller badge is needed,\n * pass a `className` that increases the top padding to match.\n *\n * ### Reading order\n *\n * The badge node appears in the DOM **before** the stat cells, so screen\n * readers encounter it first — \"Fonte oficial, followed by the metrics\" —\n * which is the correct contextual order.\n *\n * @example\n * ```tsx\n * import { CheckCircle2 } from \"lucide-react\";\n * import { Badge } from \"@fabio.caffarello/react-design-system\";\n *\n * <StatGroup\n * layout=\"strip\"\n * floatingBadge={\n * <Badge variant=\"success\" size=\"sm\">\n * <CheckCircle2 size={10} aria-hidden=\"true\" />\n * Fonte oficial\n * </Badge>\n * }\n * >\n * <Stat icon={<Users />} value=\"726\" label=\"Parlam.\" align=\"center\" />\n * <Stat icon={<FileText />} value=\"28,1 mil\" label=\"Proposições\" align=\"center\" />\n * </StatGroup>\n * ```\n */\n floatingBadge?: ReactNode;\n children: ReactNode;\n}\n\n// Tailwind v4 generates `md:grid-cols-N` for N ∈ {2,3,4} statically from\n// the literal class string. The map below ensures the strings exist\n// verbatim in the source so JIT picks them up.\nconst gridColsMd: Record<StatGroupCols, string> = {\n 2: \"md:grid-cols-2\",\n 3: \"md:grid-cols-3\",\n 4: \"md:grid-cols-4\",\n};\n\n/**\n * `StatGroup` — container for one or more `Stat` blocks with 1-px\n * dividers between them.\n *\n * ### Divider technique\n *\n * The inner container has `bg-line-default` and `gap-px` (1 px); each\n * child `Stat` carries its own `bg-surface-base`. The 1 px of gap exposes\n * the container's background as the divider line, while each cell masks\n * its own area with `bg-surface-base`. Works identically for the strip\n * layout (vertical dividers) and the grid layout (vertical AND horizontal\n * dividers, automatically, as the grid reflows). No separate `Divider`\n * component, no per-cell border logic.\n *\n * The inner ring is `border border-line-default` matching the gap color,\n * with `rounded-lg` and `overflow-hidden` clipping the inner cells to the\n * radius. The outer wrapper is `relative` so the optional `floatingBadge`\n * can be absolutely positioned over the inner container's top border.\n *\n * ### Server-safe\n *\n * Pure presentation — no hooks, no event handlers on the DOM. Ships in\n * `./server` alongside `Stat`.\n *\n * @example\n * ```tsx\n * <StatGroup layout=\"strip\">\n * <Stat icon={<Users />} value=\"9,4 mil\" label=\"Parlamentares\" align=\"center\" />\n * <Stat icon={<FileText />} value=\"3,2 mil\" label=\"Proposições\" align=\"center\" />\n * <Stat icon={<Vote />} value=\"1,1 mil\" label=\"Votações\" align=\"center\" />\n * <Stat icon={<Clock />} value=\"há 18 dias\" label=\"Última atualização\" align=\"center\" />\n * </StatGroup>\n *\n * <StatGroup layout=\"grid\" cols={4}>\n * <Stat value=\"87%\" label=\"Alinhamento\" hint=\"últimos 12 m\" tone=\"success\" />\n * <Stat value={null} label=\"Sem orientação\" hint=\"no período\" />\n * <Stat value=\"R$ 187.472,95\" label=\"Gastos\" hint=\"no mandato\" />\n * <Stat value=\"42\" label=\"Votações\" hint=\"no banco\" />\n * </StatGroup>\n * ```\n */\nexport function StatGroup({\n layout = \"grid\",\n cols = 4,\n floatingBadge,\n className,\n children,\n ...props\n}: StatGroupProps) {\n const isGrid = layout === \"grid\";\n\n return (\n <div\n className={cn(\n \"relative\",\n floatingBadge && getSpacingClass(\"base\", \"pt\"),\n className,\n )}\n {...props}\n >\n {floatingBadge ? (\n <div className=\"absolute top-4 left-1/2 -translate-x-1/2 -translate-y-1/2 z-10\">\n {floatingBadge}\n </div>\n ) : null}\n <div\n className={cn(\n \"bg-line-default border border-line-default overflow-hidden gap-px\",\n getRadiusClass(\"lg\"),\n isGrid ? `grid grid-cols-2 ${gridColsMd[cols]}` : \"flex\",\n )}\n >\n {children}\n </div>\n </div>\n );\n}\n\nexport default StatGroup;\n","\"use client\";\n\nimport type { HTMLAttributes } from \"react\";\nimport { getSpacingClass } from \"../../tokens/spacing\";\nimport type { TableColumn } from \"./TableTypes\";\n\nexport interface TableCellProps<\n T = unknown,\n> extends HTMLAttributes<HTMLTableCellElement> {\n column: TableColumn<T>;\n row: T;\n}\n\n/**\n * TableCell Component\n *\n * Renders a table cell (td) for a column.\n * Uses column.render if available, otherwise renders the raw value.\n * Must be used within a Table component.\n */\nexport default function TableCell<\n T extends Record<string, unknown> = Record<string, unknown>,\n>({ column, row, className = \"\", ...props }: TableCellProps<T>) {\n const value = column.key in row ? row[column.key as keyof T] : undefined;\n\n return (\n <td\n className={`${getSpacingClass(\"lg\", \"px\")} ${getSpacingClass(\"base\", \"py\")} whitespace-nowrap text-sm text-fg-primary ${\n column.hiddenOnMobile ? \"hidden md:table-cell\" : \"\"\n } ${className}`}\n {...props}\n >\n {column.render ? column.render(value, row) : String(value ?? \"\")}\n </td>\n );\n}\n","import { forwardRef } from \"react\";\nimport type { ElementType, HTMLAttributes, ReactNode } from \"react\";\nimport { cn, cva } from \"../../utils\";\nimport {\n getRadiusClass,\n getSpacingClass,\n getTypographySize,\n} from \"../../tokens\";\n\n// Ambient declaration so the dev-only warn typechecks without pulling\n// @types/node in; the `typeof process` guard keeps it safe in browser/edge\n// runtimes. Mirrors Card.tsx / HeroSection.tsx.\ndeclare const process: { env: { NODE_ENV?: string } };\n\n/** Visual hierarchy: `default` = primary tab bar, `sub` = nested sub-tabs. */\nexport type TabsAsLinksVariant = \"default\" | \"sub\";\n\n/** A single navigation tab. The active state is decided by the caller. */\nexport interface TabAsLink {\n /** Visible tab label. */\n label: ReactNode;\n /** Destination URL — pre-computed by the caller. */\n href: string;\n /**\n * Whether this tab is the current one. The caller derives it (from\n * `pathname` / `searchParams`); the component does no detection of its own.\n * @default false\n */\n active?: boolean;\n /** Optional leading icon (decorative — rendered `aria-hidden`). */\n icon?: ReactNode;\n /** Optional trailing count (e.g. number of items behind the tab). */\n count?: number;\n}\n\nexport interface TabsAsLinksProps extends HTMLAttributes<HTMLElement> {\n /** The tabs to render, in order. */\n items: TabAsLink[];\n /**\n * Visual hierarchy.\n * @default 'default'\n */\n variant?: TabsAsLinksVariant;\n /**\n * Element/component each tab renders as. Defaults to a plain `<a>` (zero\n * JS, works without hydration). Pass a router link — e.g. Next's `Link` —\n * to keep client-side navigation/prefetch: `linkComponent={Link}`. It\n * receives `href`, `className`, `aria-current`, and `children`.\n * @default 'a'\n */\n linkComponent?: ElementType;\n /** Additional CSS classes merged onto the root `<nav>`. */\n className?: string;\n}\n\n/**\n * Tab-bar container (the `<nav>` track). Only the gap and the track-line\n * weight differ between tiers; the active underline lives on each link.\n */\nconst navVariants = cva(cn(\"flex items-center\", \"border-b\"), {\n variants: {\n variant: {\n default: cn(\"border-line-default\", getSpacingClass(\"base\", \"gap-x\")),\n sub: cn(\"border-line-muted\", getSpacingClass(\"sm\", \"gap-x\")),\n },\n },\n defaultVariants: {\n variant: \"default\",\n },\n});\n\n/**\n * A single tab link. The 2px bottom border with `-mb-px` overlaps the 1px\n * `<nav>` track so the active underline visually replaces the track segment\n * (the classic tab-bar look). `active` and `variant` are independent axes.\n */\nconst tabLinkVariants = cva(\n cn(\n \"relative -mb-px inline-flex items-center\",\n getSpacingClass(\"xs\", \"gap-x\"),\n \"border-b-2 border-transparent\",\n \"transition-colors\",\n \"focus:outline-none\",\n \"focus-visible:ring-2\",\n \"focus-visible:ring-line-focus\",\n \"focus-visible:ring-offset-2\",\n getRadiusClass(\"sm\"),\n ),\n {\n variants: {\n variant: {\n default: cn(\n getSpacingClass(\"sm\", \"px\"),\n getSpacingClass(\"sm\", \"py\"),\n getTypographySize(\"body\"),\n ),\n sub: cn(\n getSpacingClass(\"sm\", \"px\"),\n getSpacingClass(\"xs\", \"py\"),\n getTypographySize(\"bodySmall\"),\n ),\n },\n active: {\n true: cn(\"border-line-brand\", \"text-fg-brand-emphasis\", \"font-medium\"),\n false: cn(\n \"text-fg-secondary\",\n \"hover:text-fg-primary\",\n \"hover:border-line-muted\",\n ),\n },\n },\n compoundVariants: [\n // Sub-tabs sit lower in the hierarchy: lighter resting foreground.\n {\n variant: \"sub\",\n active: false,\n class: cn(\"text-fg-tertiary\", \"hover:text-fg-secondary\"),\n },\n ],\n defaultVariants: {\n variant: \"default\",\n active: false,\n },\n },\n);\n\nconst countClasses = cn(\n \"inline-flex items-center justify-center\",\n getRadiusClass(\"full\"),\n getSpacingClass(\"xs\", \"px\"),\n \"bg-surface-muted text-fg-secondary text-xs\",\n);\n\n/**\n * `TabsAsLinks` — tabs rendered as **navigation links**, with the active tab\n * decided by the caller (from the URL), not by interactive state.\n *\n * This is the server-safe counterpart to the interactive `Tabs` widget. Use\n * it for tab bars whose selection lives in the URL (`?tab=`, `/section`) so\n * they work without JavaScript and survive a shared link. Because each tab is\n * a real link to a distinct destination, the component uses the **navigation**\n * pattern — a named `<nav>` landmark with `aria-current=\"page\"` on the active\n * link — NOT the `role=\"tab\"` widget pattern (which would promise arrow-key\n * semantics that links don't have).\n *\n * ### Accessible name\n *\n * Renders a `<nav>` landmark, which must be named so screen-reader users can\n * tell multiple tab bars apart. Pass `aria-label` (e.g. `\"Painel\"`) or\n * `aria-labelledby`. With neither, a dev-only warning fires (the landmark\n * still renders, just anonymously).\n *\n * ### Server-safe\n *\n * No hooks, no event handlers on the DOM — pure presentation. Ships in the\n * `./server` entry. Defaults to a plain `<a>`; pass `linkComponent={Link}` to\n * keep a router's client-side navigation, which crosses the RSC boundary as a\n * client reference.\n *\n * @example\n * ```tsx\n * // Next App Router — active derived from searchParams in a Server Component\n * <TabsAsLinks\n * aria-label=\"Painel\"\n * linkComponent={Link}\n * items={[\n * { label: \"Visão geral\", href: \"/painel?tab=overview\", active: tab === \"overview\" },\n * { label: \"Alertas\", href: \"/painel?tab=alerts\", active: tab === \"alerts\", count: 3 },\n * ]}\n * />\n * ```\n */\nconst TabsAsLinks = forwardRef<HTMLElement, TabsAsLinksProps>(\n function TabsAsLinks(\n {\n items,\n variant = \"default\",\n linkComponent,\n className,\n \"aria-label\": ariaLabel,\n \"aria-labelledby\": ariaLabelledBy,\n ...rest\n },\n ref,\n ) {\n if (\n typeof process !== \"undefined\" &&\n process.env.NODE_ENV !== \"production\" &&\n !ariaLabel &&\n !ariaLabelledBy\n ) {\n console.warn(\n \"[TabsAsLinks] renders a <nav> landmark and should have an \" +\n 'accessible name. Pass `aria-label` (e.g. \"Painel\") or ' +\n \"`aria-labelledby` — multiple unnamed navs on a page are ambiguous \" +\n \"to screen readers.\",\n );\n }\n\n const LinkComponent: ElementType = linkComponent ?? \"a\";\n\n return (\n <nav\n ref={ref}\n className={cn(navVariants({ variant }), className)}\n aria-label={ariaLabel}\n aria-labelledby={ariaLabelledBy}\n {...rest}\n >\n {items.map((item, index) => (\n <LinkComponent\n key={item.href || index}\n href={item.href}\n aria-current={item.active ? \"page\" : undefined}\n data-active={item.active ? \"true\" : undefined}\n className={tabLinkVariants({ variant, active: !!item.active })}\n >\n {item.icon ? (\n <span aria-hidden=\"true\" className=\"inline-flex shrink-0\">\n {item.icon}\n </span>\n ) : null}\n <span>{item.label}</span>\n {item.count !== undefined ? (\n <span className={countClasses}>{item.count}</span>\n ) : null}\n </LinkComponent>\n ))}\n </nav>\n );\n },\n);\n\nTabsAsLinks.displayName = \"TabsAsLinks\";\n\nexport default TabsAsLinks;\n","\"use client\";\n\nimport type { ReactNode } from \"react\";\nimport { CheckCircle2 } from \"lucide-react\";\nimport { getSpacingClass } from \"../../tokens/spacing\";\nimport { getRadiusClass } from \"../../tokens/radius\";\n\nexport type TimelineOrientation = \"horizontal\" | \"vertical\";\n\nexport interface TimelineItem {\n id: string;\n title: string;\n description?: string;\n content?: ReactNode;\n timestamp?: string;\n icon?: ReactNode;\n status?: \"default\" | \"active\" | \"completed\" | \"error\";\n}\n\nexport interface TimelineProps {\n items: TimelineItem[];\n orientation?: TimelineOrientation;\n className?: string;\n}\n\n/**\n * Timeline Component\n *\n * A timeline component for displaying events in chronological order.\n * Supports horizontal and vertical orientations.\n *\n * @example\n * ```tsx\n * <Timeline\n * items={[\n * { id: '1', title: 'Event 1', description: 'Description 1', timestamp: '2024-01-01' },\n * { id: '2', title: 'Event 2', description: 'Description 2', timestamp: '2024-01-02' },\n * ]}\n * />\n * ```\n */\nexport default function Timeline({\n items,\n orientation = \"vertical\",\n className = \"\",\n}: TimelineProps) {\n if (orientation === \"horizontal\") {\n return (\n <div className={`flex items-start ${className}`}>\n {items.map((item, index) => {\n const status =\n item.status ||\n (index === 0\n ? \"active\"\n : index < items.findIndex((i) => i.status === \"active\")\n ? \"completed\"\n : \"default\");\n const isLast = index === items.length - 1;\n\n return (\n <div key={item.id} className=\"flex items-start flex-1\">\n <div className=\"flex flex-col items-center flex-1\">\n {/* Icon/Indicator */}\n <div\n // data-marker=\"pending\" — see .claude/rules/colors.md\n // \"fg-quaternary: AA-by-construction exception\".\n {...(status === \"default\"\n ? { \"data-marker\": \"pending\" }\n : {})}\n className={`\n flex\n items-center\n justify-center\n w-10\n h-10\n ${getRadiusClass(\"full\")}\n border-2\n ${\n status === \"completed\"\n ? \"bg-success border-success text-fg-inverse\"\n : status === \"active\"\n ? \"bg-surface-brand-strong border-line-brand text-fg-inverse\"\n : status === \"error\"\n ? \"bg-error border-error text-fg-inverse\"\n : \"bg-surface-base border-line-emphasis text-fg-quaternary\"\n }\n `}\n >\n {item.icon ||\n (status === \"completed\" ? (\n <CheckCircle2 className=\"h-4 w-4\" />\n ) : (\n index + 1\n ))}\n </div>\n\n {/* Connector Line */}\n {!isLast && (\n <div\n className={`\n w-full\n h-0.5\n ${getSpacingClass(\"sm\", \"mt\")}\n ${status === \"completed\" ? \"bg-success\" : \"bg-line-emphasis\"}\n `}\n />\n )}\n\n {/* Content */}\n <div\n className={`${getSpacingClass(\"base\", \"mt\")} text-center ${getSpacingClass(\"base\", \"px\")}`}\n >\n {item.timestamp && (\n <p\n className={`text-xs text-fg-tertiary ${getSpacingClass(\"xs\", \"mb\")}`}\n >\n {item.timestamp}\n </p>\n )}\n <h3 className=\"text-sm font-semibold text-fg-primary\">\n {item.title}\n </h3>\n {item.description && (\n <p\n className={`text-xs text-fg-secondary ${getSpacingClass(\"xs\", \"mt\")}`}\n >\n {item.description}\n </p>\n )}\n {item.content && (\n <div className={getSpacingClass(\"sm\", \"mt\")}>\n {item.content}\n </div>\n )}\n </div>\n </div>\n </div>\n );\n })}\n </div>\n );\n }\n\n // Vertical orientation\n return (\n <div className={`${getSpacingClass(\"none\", \"space-y\")} ${className}`}>\n {items.map((item, index) => {\n const status =\n item.status ||\n (index === 0\n ? \"active\"\n : index < items.findIndex((i) => i.status === \"active\")\n ? \"completed\"\n : \"default\");\n const isLast = index === items.length - 1;\n\n return (\n <div\n key={item.id}\n className={`flex items-start ${getSpacingClass(\"base\", \"gap\")}`}\n >\n {/* Timeline Line & Icon */}\n <div className=\"flex flex-col items-center\">\n <div\n // data-marker=\"pending\" — see .claude/rules/colors.md\n // \"fg-quaternary: AA-by-construction exception\".\n {...(status === \"default\" ? { \"data-marker\": \"pending\" } : {})}\n className={`\n flex\n items-center\n justify-center\n w-10\n h-10\n ${getRadiusClass(\"full\")}\n border-2\n ${\n status === \"completed\"\n ? \"bg-success border-success text-fg-inverse\"\n : status === \"active\"\n ? \"bg-surface-brand-strong border-line-brand text-fg-inverse\"\n : status === \"error\"\n ? \"bg-error border-error text-fg-inverse\"\n : \"bg-surface-base border-line-emphasis text-fg-quaternary\"\n }\n `}\n >\n {item.icon ||\n (status === \"completed\" ? (\n <CheckCircle2 className=\"h-4 w-4\" />\n ) : (\n index + 1\n ))}\n </div>\n {!isLast && (\n <div\n className={`\n w-0.5\n flex-1\n min-h-16\n ${getSpacingClass(\"sm\", \"mt\")}\n ${status === \"completed\" ? \"bg-success\" : \"bg-line-emphasis\"}\n `}\n />\n )}\n </div>\n\n {/* Content */}\n <div className={`flex-1 ${getSpacingClass(\"xl\", \"pb\")}`}>\n {item.timestamp && (\n <p\n className={`text-xs text-fg-tertiary ${getSpacingClass(\"xs\", \"mb\")}`}\n >\n {item.timestamp}\n </p>\n )}\n <h3\n className={`\n text-base\n font-semibold\n ${status === \"active\" ? \"text-fg-brand-emphasis\" : \"text-fg-primary\"}\n `}\n >\n {item.title}\n </h3>\n {item.description && (\n <p\n className={`text-sm text-fg-secondary ${getSpacingClass(\"xs\", \"mt\")}`}\n >\n {item.description}\n </p>\n )}\n {item.content && (\n <div className={getSpacingClass(\"md\", \"mt\")}>\n {item.content}\n </div>\n )}\n </div>\n </div>\n );\n })}\n </div>\n );\n}\n"],"names":["RadiusTokenFactory","size","config","RADIUS_TOKENS","getRadiusClass","cn","inputs","twMerge","clsx","cva","base","variantFn","cvaLib","props","variantClasses","sizeClasses","AvatarBase","forwardRef","_a","ref","_b","src","alt","fallback","variant","loading","ariaLabel","className","__objRest","showFallback","displayFallback","defaultAriaLabel","jsxs","__spreadProps","__spreadValues","jsx","SpacingTokenFactory","scale","px","rem","__publicField","SPACING_TOKENS","getSpacingClass","direction","value","TypographyTokenFactory","height","weight","lineHeight","TYPOGRAPHY_TOKENS","getTypographyClasses","token","getTypographySize","getTypographyWeight","getTypographyWeightFromFontWeight","badgeVariants","Badge","memo","style","children","classes","accessibleLabel","childProps","setRef","composeRefs","refs","node","hasCleanup","cleanups","cleanup","i","useComposedRefs","React","createSlot","ownerName","Slot2","forwardedRef","slotProps","slottableElement","hasSlottable","newChildren","isLazyComponent","use","maybeSlottable","isSlottable","slottable","child","getSlottableElementFromSlottable","slottableElementRef","getElementRef","composedRef","createSlottableError","createSlotError","mergedProps","mergeProps","Slot","SLOTTABLE_IDENTIFIER","createSlottable","Slottable2","Slottable","child2","overrideProps","propName","slotPropValue","childPropValue","args","result","element","getter","mayWarn","REACT_LAZY_TYPE","isPromiseLike","spinnerVariants","Spinner","label","Loader2","buttonVariants","IconWrapper","position","Button","isLoading","loadingText","loadingIcon","leftIcon","rightIcon","fullWidth","asChild","as","disabled","Component","finalAriaLabel","spinnerVariant","spinnerSize","displayLoadingIcon","defaultType","buttonProps","Fragment","chipVariants","Chip","selected","tabIndex","onRemove","onClick","count","useLabelButton","interactive","handleKeyDown","e","hasCount","chipIsBrandFilled","countBadge","labelWithCount","X","dataBadgeVariants","DataBadge","source","tone","icon","rest","hasSource","labelSize","ErrorMessage","message","id","baseClasses","AlertCircle","Info","inputVariants","HelperText","error","success","helperText","errorId","helperId","helperClasses","text","InputBase","rightSlot","type","state","iconSize","iconPosition","inputClasses","labelClasses","labelBaseClasses","labelVariantClasses","Label","ShadowTokenFactory","SHADOW_TOKENS","getShadowClass","progressTrackVariants","progressBarVariants","Progress","max","showLabel","isIndeterminate","percentage","separatorOrientationClasses","separatorVariantClasses","Separator","orientation","Skeleton","width","lines","_","index","TEXT_COLOR_CLASSES","TextComponent","bold","italic","colorRole","colorShade","classNames","Tag","Text","maxWidthClasses","Container","maxWidth","paddingX","paddingY","center","Stack","spacing","align","justify","spacingClass","alignClasses","justifyClasses","Breadcrumb","items","separator","item","isLast","EmptyStateBase","title","illustration","action","CardHeader","CardTitle","badge","As","CardSubtitle","CardActions","CardBody","CardComponent","padding","ariaLabelledBy","asSection","cardVariants","isInteractive","role","commonProps","MemoCard","Card","DialogHeader","DialogFooter","DrawerHeader","DrawerFooter","FilterChips","wrap","derivedAriaLabel","HeaderActions","HeaderNavigation","heroSectionVariants","blockItems","actionsJustify","HeroSection","kicker","description","actions","kpis","meta","hasExplicitName","resolvedAriaLabel","MenuSeparator","NavbarSeparator","pageHeaderVariants","PageHeader","breadcrumb","toneHintClasses","Stat","hint","isEmpty","gridColsMd","StatGroup","layout","cols","floatingBadge","isGrid","TableCell","column","row","navVariants","tabLinkVariants","countClasses","TabsAsLinks","linkComponent","LinkComponent","Timeline","status","CheckCircle2"],"mappings":"iqCA6BO,MAAMA,CAAmB,CAI9B,OAAO,OAAOC,EAA+B,CA+C3C,MAAMC,EA3CF,CACF,KAAM,CACJ,GAAI,EACJ,SAAU,eACV,YAAa,kBAAA,EAEf,GAAI,CACF,GAAI,EACJ,SAAU,aACV,YAAa,wCAAA,EAEf,GAAI,CACF,GAAI,EACJ,SAAU,aACV,YAAa,4CAAA,EAEf,GAAI,CACF,GAAI,EACJ,SAAU,aACV,YAAa,6CAAA,EAEf,GAAI,CACF,GAAI,GACJ,SAAU,aACV,YAAa,kDAAA,EAEf,MAAO,CACL,GAAI,GACJ,SAAU,cACV,YAAa,6CAAA,EAEf,MAAO,CACL,GAAI,GACJ,SAAU,cACV,YAAa,kDAAA,EAEf,KAAM,CACJ,GAAI,KACJ,SAAU,eACV,YAAa,mCAAA,CACf,EAGuBD,CAAI,EAC7B,MAAO,CACL,MAAOC,EAAO,GACd,IAAK,GAAGA,EAAO,GAAK,EAAE,MACtB,GAAI,GAAGA,EAAO,EAAE,KAChB,SAAUA,EAAO,SACjB,YAAaA,EAAO,WAAA,CAExB,CACF,CAKO,MAAMC,GAAgB,CAC3B,KAAMH,EAAmB,OAAO,MAAM,EACtC,GAAIA,EAAmB,OAAO,IAAI,EAClC,GAAIA,EAAmB,OAAO,IAAI,EAClC,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