@snowball-tech/fractal
Version:
Fractal's (Snowball's design system) React component library based on RadixUI and TailwindCSS
2 lines • 1.03 kB
JavaScript
"use client";import{a as e}from"../constants-CW2-utNH.js";import{r as t}from"../helpers-DBEwVIlX.js";import{Typography as n}from"../Typography/Typography.js";import{r}from"../utils-K22C_6qC.js";import{GROUP_NAME as i}from"./Autocomplete.constants.js";import*as a from"@radix-ui/react-dropdown-menu";import o from"lodash/fp/isEmpty.js";import s from"lodash/fp/isString.js";import c from"lodash/fp/omit.js";import{jsx as l}from"react/jsx-runtime";const u=({children:u,label:d,labelElement:f,...p})=>{let m=!!u;!m&&!d&&console.warn("You must provide a `label` or `children` to the `AutocompleteEmpty` component");let h=s(d)?d:o(d)?r(u):r(d);return l(a.Item,{"aria-label":h,className:t(`${e}-${i}__empty`,`cursor-default rounded-sm p-2 outline-none`,p.className),title:h,onSelect:e=>e.preventDefault(),...c([`className`,`disabled`,`onSelect`],p),children:l(n,{element:f||s(m?u:d)?void 0:`div`,children:m?u:d})})};u.displayName=`AutocompleteEmpty`;export{u as AutocompleteEmpty,u as default};
//# sourceMappingURL=AutocompleteEmpty.js.map