/* Copyright (C) 2023-2026 QuantumNous This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see . For commercial licensing, please contact support@quantumnous.com */ import { useMemo } from 'react' import { cva, type VariantProps } from 'class-variance-authority' import { cn } from '@/lib/utils' import { Label } from '@/components/ui/label' import { Separator } from '@/components/ui/separator' function FieldSet({ className, ...props }: React.ComponentProps<'fieldset'>) { return (
[data-slot=checkbox-group]]:gap-3 has-[>[data-slot=radio-group]]:gap-3', className )} {...props} /> ) } function FieldLegend({ className, variant = 'legend', ...props }: React.ComponentProps<'legend'> & { variant?: 'legend' | 'label' }) { return ( ) } function FieldGroup({ className, ...props }: React.ComponentProps<'div'>) { return (
) } const fieldVariants = cva( 'group/field flex w-full gap-2 data-[invalid=true]:text-destructive', { variants: { orientation: { vertical: 'flex-col *:w-full [&>.sr-only]:w-auto', horizontal: 'flex-row items-center has-[>[data-slot=field-content]]:items-start *:data-[slot=field-label]:flex-auto has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px', responsive: 'flex-col *:w-full @md/field-group:flex-row @md/field-group:items-center @md/field-group:*:w-auto @md/field-group:has-[>[data-slot=field-content]]:items-start @md/field-group:*:data-[slot=field-label]:flex-auto [&>.sr-only]:w-auto @md/field-group:has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px', }, }, defaultVariants: { orientation: 'vertical', }, } ) function Field({ className, orientation = 'vertical', ...props }: React.ComponentProps<'div'> & VariantProps) { return (
) } function FieldContent({ className, ...props }: React.ComponentProps<'div'>) { return (
) } function FieldLabel({ className, ...props }: React.ComponentProps) { return (