feat: add Radix UI label component and update dependencies

This commit is contained in:
Maximilian Liebmann 2025-05-11 13:46:31 +02:00 committed by SomeCodecat
parent cd643c3c4f
commit b87a761808
3 changed files with 45 additions and 0 deletions

View file

@ -16,6 +16,7 @@
"@fortawesome/free-solid-svg-icons": "^6.7.2",
"@fortawesome/react-fontawesome": "^0.2.2",
"@radix-ui/react-hover-card": "^1.1.13",
"@radix-ui/react-label": "^2.1.6",
"@radix-ui/react-slot": "^1.2.2",
"class-variance-authority": "^0.7.1",
"clsx": "^2.1.1",

View file

@ -0,0 +1,24 @@
'use client';
import * as React from 'react';
import * as LabelPrimitive from '@radix-ui/react-label';
import { cn } from '@/lib/utils';
function Label({
className,
...props
}: React.ComponentProps<typeof LabelPrimitive.Root>) {
return (
<LabelPrimitive.Root
data-slot='label'
className={cn(
'flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50',
className,
)}
{...props}
/>
);
}
export { Label };

View file

@ -1042,6 +1042,25 @@ __metadata:
languageName: node
linkType: hard
"@radix-ui/react-label@npm:^2.1.6":
version: 2.1.6
resolution: "@radix-ui/react-label@npm:2.1.6"
dependencies:
"@radix-ui/react-primitive": "npm:2.1.2"
peerDependencies:
"@types/react": "*"
"@types/react-dom": "*"
react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc
react-dom: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc
peerDependenciesMeta:
"@types/react":
optional: true
"@types/react-dom":
optional: true
checksum: 10c0/1c94bd363b965aeeb6010539399da4bb894c29bcb777d11f6e9a0ab22c43621be59529f1a23cfbda1f3c0ba3d8a6fdd2a50200b6e9b5839a3fbf0c2299de163e
languageName: node
linkType: hard
"@radix-ui/react-popper@npm:1.2.6":
version: 1.2.6
resolution: "@radix-ui/react-popper@npm:1.2.6"
@ -4191,6 +4210,7 @@ __metadata:
"@fortawesome/free-solid-svg-icons": "npm:^6.7.2"
"@fortawesome/react-fontawesome": "npm:^0.2.2"
"@radix-ui/react-hover-card": "npm:^1.1.13"
"@radix-ui/react-label": "npm:^2.1.6"
"@radix-ui/react-slot": "npm:^1.2.2"
"@tailwindcss/postcss": "npm:4.1.6"
"@types/node": "npm:22.15.17"