diff --git a/.vscode/settings.json b/.vscode/settings.json index e9d2be71..38ab1e9d 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -21,6 +21,9 @@ "changeProcessCWD": true } ], + "tailwindCSS.experimental.classRegex": [ + ["cva\\(([^)]*)\\)", "[\"'`]([^\"'`]*).*?[\"'`]"] + ], "stylelint.enable": true, "autopep8.args": [ "--max-line-length", diff --git a/rsconcept/frontend/package-lock.json b/rsconcept/frontend/package-lock.json index 96274c17..b8f9c894 100644 --- a/rsconcept/frontend/package-lock.json +++ b/rsconcept/frontend/package-lock.json @@ -11,10 +11,8 @@ "@dagrejs/dagre": "^1.1.4", "@hookform/resolvers": "^5.0.1", "@lezer/lr": "^1.4.2", - "@radix-ui/react-dialog": "^1.1.7", "@radix-ui/react-popover": "^1.1.7", "@radix-ui/react-select": "^2.1.7", - "@radix-ui/react-slot": "^1.2.0", "@tanstack/react-query": "^5.72.2", "@tanstack/react-query-devtools": "^5.72.2", "@tanstack/react-table": "^8.21.2", diff --git a/rsconcept/frontend/package.json b/rsconcept/frontend/package.json index 1a49e096..f1fe922d 100644 --- a/rsconcept/frontend/package.json +++ b/rsconcept/frontend/package.json @@ -17,10 +17,8 @@ "@dagrejs/dagre": "^1.1.4", "@hookform/resolvers": "^5.0.1", "@lezer/lr": "^1.4.2", - "@radix-ui/react-dialog": "^1.1.7", "@radix-ui/react-popover": "^1.1.7", "@radix-ui/react-select": "^2.1.7", - "@radix-ui/react-slot": "^1.2.0", "@tanstack/react-query": "^5.72.2", "@tanstack/react-query-devtools": "^5.72.2", "@tanstack/react-table": "^8.21.2", diff --git a/rsconcept/frontend/src/components/ui/button.tsx b/rsconcept/frontend/src/components/ui/button.tsx deleted file mode 100644 index 5c00bb3c..00000000 --- a/rsconcept/frontend/src/components/ui/button.tsx +++ /dev/null @@ -1,49 +0,0 @@ -import { Slot } from '@radix-ui/react-slot'; -import { cva, type VariantProps } from 'class-variance-authority'; - -import { cn } from '@/lib/utils'; - -const buttonVariants = cva( - "inline-flex items-center justify-center gap-2 cursor-pointer disabled:cursor-auto whitespace-nowrap font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive", - { - variants: { - variant: { - default: 'bg-primary text-primary-foreground shadow-xs hover:bg-primary/90', - destructive: - 'bg-destructive text-white shadow-xs hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60', - outline: - 'border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50', - secondary: 'bg-secondary text-secondary-foreground shadow-xs hover:bg-secondary/80', - ghost: 'hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50', - link: 'text-primary underline-offset-4 hover:underline' - }, - size: { - default: 'h-9 px-4 py-2 has-[>svg]:px-3', - sm: 'h-8 gap-1.5 px-3 has-[>svg]:px-2.5', - lg: 'h-10 px-6 has-[>svg]:px-4', - icon: 'size-9' - } - }, - defaultVariants: { - variant: 'default', - size: 'default' - } - } -); - -function Button({ - className, - variant, - size, - asChild = false, - ...props -}: React.ComponentProps<'button'> & - VariantProps & { - asChild?: boolean; - }) { - const Comp = asChild ? Slot : 'button'; - - return ; -} - -export { Button, buttonVariants }; diff --git a/rsconcept/frontend/src/components/ui/combo-box.tsx b/rsconcept/frontend/src/components/ui/combo-box.tsx index 4738c1c6..8635cd46 100644 --- a/rsconcept/frontend/src/components/ui/combo-box.tsx +++ b/rsconcept/frontend/src/components/ui/combo-box.tsx @@ -5,11 +5,9 @@ import { ChevronDownIcon } from 'lucide-react'; import { cn } from '@/lib/utils'; -import { MiniButton } from '../control'; import { IconRemove } from '../icons'; import { type Styling } from '../props'; -import { Button } from './button'; import { Command, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList } from './command'; import { Popover, PopoverContent, PopoverTrigger } from './popover'; @@ -64,7 +62,7 @@ export function ComboBox