@snowball-tech/fractal
Version:
Fractal's (Snowball's design system) React component library based on RadixUI and PandaCSS
3 lines • 1.43 kB
JavaScript
'use client';
import{a as f}from"./chunk-V46VJOI6.js";import{a as c}from"./chunk-IU2UNORC.js";import{a as e}from"./chunk-WB7Y43TN.js";import{c as w}from"./chunk-LYTTDLE2.js";import{a as m}from"./chunk-AOLTZ2WJ.js";import{b as o}from"./chunk-CMFNILWJ.js";import{a as i,b as u,c as _}from"./chunk-XYM7TA65.js";import*as n from"@radix-ui/react-dropdown-menu";import{useContext as h}from"react";import b from"lodash/fp/isString";import M from"lodash/fp/omit";import{jsx as p,jsxs as P}from"react/jsx-runtime";function x({children:D,condensed:g=!1,disabled:$=!1,label:r,labelElement:y,rainbow:C=!0,...s}){let{condensed:G,disabled:R,rainbow:N}=h(c),t=$||R,d=g||G,a=C&&N,l=b(r)?r:w(r);return P(n.Group,{"aria-label":l,className:u(`${o}-${e}__item-group`,d?`${o}-${e}__item-group--condensed`:"","px-2",t?`${o}-${e}__item-group--disabled`:"",s.className),title:l,...M(["className"],s),children:[p(n.Label,{asChild:!0,className:i(`${o}-${e}__item-group__label`,"block",d?"py-1":"py-2",t?`${o}-${e}__item-group__label--disabled text-disabled`:"cursor-default text-placeholder"),children:p(m,{element:y||(b(r)?"label":"div"),children:r})}),p(m,{className:i(`${o}-${e}__item-group__items`,t?`${o}-${e}__item-group__items--disabled`:a?_:""),element:"div",children:p(f.Provider,{value:{condensed:d,disabled:t,rainbow:a},children:D})})]})}x.displayName="DropdownItemGroup";var S=x;export{x as a,S as b};
//# sourceMappingURL=chunk-HATMD4YD.js.map