UNPKG

@vela-ui/react

Version:

Vela UI React components

3 lines (2 loc) 1.07 kB
"use client" import{a as d,b as u}from"./chunk-KGQCURRT.mjs";import{b as s}from"./chunk-SGDQ65EO.mjs";import{b as c,c as l,d as m}from"./chunk-6SBZLCH7.mjs";import{a as p}from"./chunk-JDK7ZBJY.mjs";import{a as n}from"./chunk-BFYXKOIH.mjs";import{SearchField as I,composeRenderProps as y}from"react-aria-components";import{tv as E}from"tailwind-variants";import{jsx as e,jsxs as x}from"react/jsx-runtime";var R=E({base:"group flex flex-col gap-2 data-[empty=true]:[&_button]:hidden [&_input]:[&::-webkit-search-cancel-button]:appearance-none [&_input]:[&::-webkit-search-decoration]:appearance-none"});function N({placeholder:r,label:t,description:a,errorMessage:F,size:f,className:h,startElement:P=e(p,{}),endElement:S=e(s,{variant:"ghost",shape:"circle",size:"xs",children:e(n,{})}),...o}){var i;return x(I,{"aria-label":(i=r!=null?r:o["aria-label"])!=null?i:"Search",className:y(h,b=>R({className:b})),...o,children:[t&&e(c,{children:t}),e(u,{size:f,startElement:P,endElement:S,children:e(d,{placeholder:r})}),a&&e(l,{children:a}),e(m,{children:F})]})}export{N as a};