feat: add distance value object and ci workflows

This commit is contained in:
Bernard Ngandu
2025-10-10 16:13:48 +02:00
parent d3338e8901
commit 2ed7a48d36
44 changed files with 4263 additions and 1370 deletions
+20 -23
View File
@@ -1,36 +1,33 @@
import * as React from 'react'
import { cva, type VariantProps } from 'class-variance-authority'
import * as React from "react";
import { cn } from '@/lib/utils'
import { cva, type VariantProps } from "class-variance-authority";
import { cn } from "@/lib/utils";
const badgeVariants = cva(
'inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2',
"inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",
{
variants: {
variant: {
default: 'border-transparent bg-primary/15 text-primary',
secondary: 'border-transparent bg-secondary text-secondary-foreground',
destructive: 'border-transparent bg-destructive/15 text-destructive',
outline: 'text-foreground',
success: 'border-transparent bg-emerald-500/15 text-emerald-300',
muted: 'border-transparent bg-muted/60 text-muted-foreground',
default: "border-transparent bg-primary/15 text-primary",
secondary: "border-transparent bg-secondary text-secondary-foreground",
destructive: "border-transparent bg-destructive/15 text-destructive",
outline: "text-foreground",
success: "border-transparent bg-emerald-500/15 text-emerald-300",
muted: "border-transparent bg-muted/60 text-muted-foreground",
},
},
defaultVariants: {
variant: 'default',
variant: "default",
},
},
)
}
);
export interface BadgeProps
extends React.HTMLAttributes<HTMLDivElement>,
VariantProps<typeof badgeVariants> {}
export interface BadgeProps extends React.HTMLAttributes<HTMLDivElement>, VariantProps<typeof badgeVariants> {}
const Badge = React.forwardRef<HTMLDivElement, BadgeProps>(
({ className, variant, ...props }, ref) => (
<div ref={ref} className={cn(badgeVariants({ variant }), className)} {...props} />
),
)
Badge.displayName = 'Badge'
const Badge = React.forwardRef<HTMLDivElement, BadgeProps>(({ className, variant, ...props }, ref) => (
<div ref={ref} className={cn(badgeVariants({ variant }), className)} {...props} />
));
Badge.displayName = "Badge";
export { Badge }
export { Badge };