UNPKG

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.41 kB
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index46.js"),r=require("react"),a=r.forwardRef((({id:a,name:t,value:s,checked:o,label:d,onChange:l,className:i="",disabled:n=!1,required:c=!1,"aria-label":m,"aria-describedby":u,...h},x)=>{const b=r.useId(),p=a||b;return e.jsxRuntimeExports.jsxs("label",{htmlFor:p,className:`relative flex cursor-pointer select-none items-center gap-3 text-sm font-medium ${n?"text-[oklch(var(--theme-muted-foreground))] cursor-not-allowed":"text-[oklch(var(--theme-foreground))]"} ${i}`,children:[e.jsxRuntimeExports.jsx("input",{ref:x,id:p,name:t,type:"radio",value:s,checked:o,onChange:()=>!n&&l(s),disabled:n,required:c,"aria-label":m||d,"aria-describedby":u,"aria-checked":o,className:"sr-only",...h}),e.jsxRuntimeExports.jsx("span",{className:`flex h-5 w-5 items-center justify-center rounded-full border-[1.25px] ${o?"border-[oklch(var(--theme-primary))] bg-[oklch(var(--theme-primary))]":"bg-transparent border-[oklch(var(--theme-border))]"} ${n?"bg-[oklch(var(--theme-muted))] border-[oklch(var(--theme-border))]":""}`,"aria-hidden":"true",children:e.jsxRuntimeExports.jsx("span",{className:"h-2 w-2 rounded-full bg-[oklch(var(--theme-primary-foreground))] "+(o?"block":"hidden"),"aria-hidden":"true"})}),e.jsxRuntimeExports.jsx("span",{className:"select-none",children:d})]})}));a.displayName="Radio",exports.Radio=a;