UNPKG

@snowball-tech/fractal

Version:

Fractal's (Snowball's design system) React component library based on RadixUI and PandaCSS

3 lines 1.4 kB
'use client'; import{b as _}from"./chunk-WQZCE7M5.js";import{a as d}from"./chunk-HTOKQYVM.js";import{b as o}from"./chunk-CMFNILWJ.js";import{a as i,b as s}from"./chunk-XYM7TA65.js";import{a as e}from"./chunk-EHXFCPU4.js";import*as g from"@radix-ui/react-dropdown-menu";import m from"lodash/fp/isBoolean";import y from"lodash/fp/isEmpty";import w from"lodash/fp/omit";import{jsx as c,jsxs as u}from"react/jsx-runtime";var f=({children:r,icon:t=!0,label:n,spin:a=!0,...l})=>{let p=!!r;return!p&&y(n)&&console.warn("You must provide a `label` or `children` to the `AutocompleteLoading` component"),u(g.Item,{className:s(`${o}-${e}__loading`,"flex items-center gap-2 rounded-sm p-2 outline-none",t?`${o}-${e}__loadingwith-icon`:"",a&&t!==!0?`${o}-${e}__loading--spinning`:"",l.className),onSelect:$=>$.preventDefault(),...w(["className","disabled","onSelect"],l),"aria-label":n,title:n,children:[t&&u("div",{className:i(`${o}-${e}__loading__icon`,"flex items-center justify-center",m(t)?`${o}-${e}__loading__icon--loader`:`${o}-${e}__loading__icon--icon min-w-3 [&>svg]:min-w-3`,a&&!m(t)?`${o}-${e}__loading__icon--icon--spinning [&>svg]:animate-spin`:""),children:["\xA0",m(t)?c(_,{size:"m"}):t]}),c(d,{className:i(`${o}-${e}__loading__label`,"w-full flex-1"),element:"div",children:p?r:n})]})};f.displayName="AutocompleteLoading";var M=f;export{f as a,M as b}; //# sourceMappingURL=chunk-LPJGTAOL.js.map