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) 2.27 kB
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index46.js"),r=require("./index38.js"),s=require("react");exports.Card=({children:s,className:t,variant:a="elevated",size:i="md",clickable:l=!1,draggable:o=!1,fullWidth:d=!1,orientation:n="vertical",...c})=>e.jsxRuntimeExports.jsx("div",{className:r.cn("rounded-xl overflow-hidden",{elevated:"bg-[oklch(var(--theme-background))] shadow-md hover:shadow-lg transition-shadow",filled:"bg-[oklch(var(--theme-muted))]",outlined:"border border-[oklch(var(--theme-border))] bg-transparent"}[a],{sm:"p-3",md:"p-4",lg:"p-6"}[i],l&&"cursor-pointer hover:scale-[1.02] transition-transform",o&&"cursor-move",d&&"w-full","horizontal"===n&&"flex",t),role:l?"button":"article",tabIndex:l?0:void 0,...c,children:s}),exports.CardActions=({children:s,className:t,position:a="end",...i})=>e.jsxRuntimeExports.jsx("div",{className:r.cn("flex items-center gap-2 p-4","end"===a?"justify-end":"justify-start",t),role:"group","aria-label":"Card actions",...i,children:s}),exports.CardContent=({children:s,className:t,...a})=>e.jsxRuntimeExports.jsx("div",{className:r.cn("p-4 text-[oklch(var(--theme-muted-foreground))]",t),role:"region",...a,children:s}),exports.CardHeader=({className:t,title:a,subtitle:i,avatar:l,action:o,...d})=>{const n=s.useId();return e.jsxRuntimeExports.jsxs("div",{className:r.cn("flex items-start gap-4 p-4",t),role:"heading","aria-level":2,...d,children:[l&&e.jsxRuntimeExports.jsx("div",{className:"flex-shrink-0","aria-hidden":"true",children:l}),e.jsxRuntimeExports.jsxs("div",{className:"flex-grow",children:["// In CardHeader",a&&e.jsxRuntimeExports.jsx("div",{id:n,className:"text-lg font-semibold text-[oklch(var(--theme-foreground))]",children:a}),i&&e.jsxRuntimeExports.jsx("div",{className:"text-sm text-[oklch(var(--theme-muted-foreground))]","aria-describedby":n,children:i})]}),o&&e.jsxRuntimeExports.jsx("div",{className:"flex-shrink-0 ml-auto",children:o})]})},exports.CardMedia=({children:s,className:t,image:a,alt:i="",height:l="h-48",...o})=>e.jsxRuntimeExports.jsx("div",{className:r.cn(l,"relative overflow-hidden",t),role:"img","aria-label":i,...o,children:a?e.jsxRuntimeExports.jsx("img",{src:a,alt:i,className:"w-full h-full object-cover"}):s});