@snowball-tech/fractal
Version:
Fractal's (Snowball's design system) React component library based on RadixUI and PandaCSS
3 lines • 1.16 kB
JavaScript
'use client';
import{a as r}from"./chunk-JVVBSAPQ.js";import{a as p}from"./chunk-HMBBR6D3.js";import{a as c}from"./chunk-HTOKQYVM.js";import{b as o}from"./chunk-CMFNILWJ.js";import{b as n}from"./chunk-XYM7TA65.js";import*as e from"@radix-ui/react-select";import{useContext as S}from"react";import I from"lodash/fp/isEmpty";import y from"lodash/fp/omit";import{jsx as m,jsxs as R}from"react/jsx-runtime";var d=({children:l,disabled:u=!1,label:t,value:f,...a})=>{let i=!!l;!i&&I(t)&&console.warn("You must provide a `label` or `children` to the `SelectItem` component");let{disabled:x}=S(p),s=u||x;return R(e.Item,{"aria-label":t,className:n(`${o}-${r}__item alternatee`,"flex select-none items-center gap-1 rounded-sm p-2 outline-none transition-background-color duration-300 ease-out",s?`${o}-${r}__item--disabled cursor-not-allowed !bg-transparent text-disabled`:"cursor-pointer text-dark",a.className),disabled:s,title:t,value:f,...y(["className"],a),children:[m(e.ItemText,{asChild:!0,children:m(c,{element:"div",children:i?l:t})}),m(e.ItemIndicator,{})]})};d.displayName="SelectItem";var $=d;export{d as a,$ as b};
//# sourceMappingURL=chunk-7D4UGA2P.js.map