UNPKG

@snowball-tech/fractal

Version:

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

2 lines 1.38 kB
"use client";import{a as e}from"../constants-CW2-utNH.js";import{n as t,r as n,t as r}from"../helpers-DBEwVIlX.js";import{Typography as i}from"../Typography/Typography.js";import{r as a}from"../utils-K22C_6qC.js";import{GROUP_NAME as o}from"./Menu.constants.js";import{MenuContext as s}from"./MenuContext.js";import{MenuGroupContext as c}from"./MenuGroupContext.js";import{useContext as l}from"react";import u from"lodash/fp/isString.js";import d from"lodash/fp/omit.js";import{jsx as f,jsxs as p}from"react/jsx-runtime";function m({children:m,condensed:h=!1,disabled:g=!1,label:_,labelElement:v,rainbow:y=!0,...b}){let{condensed:x,disabled:S,rainbow:C}=l(s),w=g||S,T=h||x,E=y&&C,D=u(_)?_:a(_);return p(`div`,{"aria-label":D,className:n(`${e}-${o}__item-group`,`px-2`,w?`${e}-${o}__item-group--disabled`:``,b.className),title:D,...d([`className`],b),children:[f(i,{className:t(`${e}-${o}__item-group__label`,`block`,T?`py-1`:`py-2`,w?`${e}-${o}__item-group__label--disabled text-disabled`:`cursor-default text-placeholder`),element:v||(u(_)?`label`:`div`),children:_}),f(i,{className:t(`${e}-${o}__item-group__items`,w?`${e}-${o}__item-group__items--disabled`:E?r:``),element:`div`,children:f(c.Provider,{value:{condensed:T,disabled:w,rainbow:E},children:m})})]})}m.displayName=`MenuItemGroup`;export{m as MenuItemGroup,m as default}; //# sourceMappingURL=MenuItemGroup.js.map