UNPKG

@llamaindex/ui

Version:

A comprehensive UI component library built with React, TypeScript, and Tailwind CSS for LlamaIndex applications

36 lines (33 loc) 950 B
import { cn } from './chunk-MG2ARK3A.mjs'; import { __objRest, __spreadProps, __spreadValues } from './chunk-FWCSY2DS.mjs'; import * as ProgressPrimitive from '@radix-ui/react-progress'; import { jsx } from 'react/jsx-runtime'; function Progress(_a) { var _b = _a, { className, value } = _b, props = __objRest(_b, [ "className", "value" ]); return /* @__PURE__ */ jsx( ProgressPrimitive.Root, __spreadProps(__spreadValues({ "data-slot": "progress", className: cn( "bg-primary/20 relative h-2 w-full overflow-hidden rounded-full", className ) }, props), { children: /* @__PURE__ */ jsx( ProgressPrimitive.Indicator, { "data-slot": "progress-indicator", className: "bg-primary h-full w-full flex-1 transition-all", style: { transform: `translateX(-${100 - (value || 0)}%)` } } ) }) ); } export { Progress };