nextuiq
Version:
NextUIQ is a modern, lightweight, and developer-friendly UI component library for React and Next.js. Built with TypeScript and Tailwind CSS, it offers customizable, accessible, and performance-optimized components with built-in dark mode, theme customizat
2 lines (1 loc) • 1.38 kB
JavaScript
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index46.js"),r=require("react"),a=r.forwardRef((({id:a,name:s,value:t,checked:i,label:o,onChange:l,className:n="",disabled:d=!1,required:c=!1,"aria-label":m,"aria-describedby":u,...h},x)=>{const p=r.useId(),b=a||p;return e.jsxRuntimeExports.jsxs("label",{htmlFor:b,className:`flex cursor-pointer select-none items-center text-sm text-[oklch(var(--theme-muted-foreground))] ${d?"cursor-not-allowed opacity-60":""} ${n}`,children:[e.jsxRuntimeExports.jsxs("span",{className:"relative",children:[e.jsxRuntimeExports.jsx("input",{ref:x,type:"radio",id:b,name:s,value:t,checked:i,onChange:()=>!d&&l(t),disabled:d,required:c,"aria-label":m||o,"aria-describedby":u,"aria-checked":i,className:"sr-only",...h}),e.jsxRuntimeExports.jsx("span",{className:"mr-2 flex h-4 w-4 items-center justify-center rounded-full border "+(i?"border-[oklch(var(--theme-primary))] bg-[oklch(var(--theme-primary))]":"bg-transparent border-[oklch(var(--theme-border))]"),"aria-hidden":"true",children:e.jsxRuntimeExports.jsx("span",{className:"h-1.5 w-1.5 rounded-full "+(i?"bg-[oklch(var(--theme-primary-foreground))]":"bg-[oklch(var(--theme-background))]"),"aria-hidden":"true"})})]}),e.jsxRuntimeExports.jsx("span",{className:"select-none",children:o})]})}));a.displayName="RadioSm",exports.RadioSm=a;