UNPKG

@snowball-tech/fractal

Version:

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

3 lines 1.1 kB
'use client'; import{a}from"./chunk-JVVBSAPQ.js";import{c as r}from"./chunk-LYTTDLE2.js";import{a as s}from"./chunk-AOLTZ2WJ.js";import{b as l}from"./chunk-CMFNILWJ.js";import{b as c}from"./chunk-XYM7TA65.js";import*as t from"@radix-ui/react-select";import x from"lodash/fp/isEmpty";import y from"lodash/fp/isString";import E from"lodash/fp/omit";import{jsx as p,jsxs as R}from"react/jsx-runtime";var f=({children:o,label:e,labelElement:S,value:u="empty-value",...n})=>{let m=!!o;!m&&!e&&console.warn("You must provide a `label` or `children` to the `SelectEmpty` component");let i=y(e)?e:x(e)?r(o):r(e);return R(t.Item,{"aria-label":i,className:c(`${l}-${a}__empty`,"pointer-events-none flex cursor-default items-center gap-1 rounded-sm p-2 outline-none",n.className),title:i,value:u||"empty-value",onSelect:d=>d.preventDefault(),...E(["className","disabled","onSelect"],n),children:[p(t.ItemText,{asChild:!0,children:p(s,{element:S||(y(m?o:e)?void 0:"div"),children:m?o:e})}),p(t.ItemIndicator,{})]})};f.displayName="SelectEmpty";var C=f;export{f as a,C as b}; //# sourceMappingURL=chunk-UFSJFJ5W.js.map