UNPKG

@snowball-tech/fractal

Version:

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

3 lines 1.32 kB
'use client'; import{a as _}from"./chunk-YWWK6PZ5.js";import{a as t}from"./chunk-JVVBSAPQ.js";import{a as b}from"./chunk-LAEC4JYL.js";import{c as u}from"./chunk-LYTTDLE2.js";import{a}from"./chunk-AOLTZ2WJ.js";import{b as e}from"./chunk-CMFNILWJ.js";import{a as m,b as d,c as n}from"./chunk-XYM7TA65.js";import*as i from"@radix-ui/react-select";import{useContext as N}from"react";import f from"lodash/fp/isString";import C from"lodash/fp/omit";import{jsx as l,jsxs as h}from"react/jsx-runtime";var x=({children:S,disabled:g=!1,label:o,labelElement:y,rainbow:$=!0,...p})=>{let{disabled:G,rainbow:R}=N(_),r=g||G,s=$&&R,c=f(o)?o:u(o);return h(i.Group,{"aria-label":c,className:d(`${e}-${t}__item-group`,"p-2 py-0",r?`${e}-${t}__item-group--disabled`:"",p.className),title:c,...C(["className"],p),children:[l(i.Label,{asChild:!0,className:m(`${e}-${t}__item-group__label`,"block py-2",r?`${e}-${t}__item-group__label--disabled text-disabled`:"cursor-default text-placeholder"),children:l(a,{element:y||(f(o)?"label":"div"),children:o})}),l(a,{className:m(`${e}-${t}__item-group__items`,r?`${e}-${t}__item-group__items--disabled`:s?n:""),element:"div",children:l(b.Provider,{value:{disabled:r,rainbow:s},children:S})})]})};x.displayName="SelectItemGroup";var B=x;export{x as a,B as b}; //# sourceMappingURL=chunk-Q2SBZRE6.js.map