UNPKG

@snowball-tech/fractal

Version:

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

3 lines 1.13 kB
'use client'; import{a as r}from"./chunk-U4NRZEUB.js";import{a as s}from"./chunk-XU2TT2NF.js";import{c as g}from"./chunk-AXQXUWJ6.js";import{b as o}from"./chunk-CMFNILWJ.js";import{b as f}from"./chunk-XYM7TA65.js";import*as n from"@radix-ui/react-toggle-group";import R from"lodash/fp/isFunction";import w from"lodash/fp/omit";import{jsx as u}from"react/jsx-runtime";var x=({children:T,defaultValue:l,disabled:e=!1,fullWidth:d=!1,label:t,multiple:G=!1,onValueChange:p,orientation:a="vertical",value:$,variant:i=g,...m})=>u(n.Root,{"aria-label":t,className:f(`${o}-${r}`,`${o}-${r}--${i}`,"flex max-w-full flex-col gap-3","data-horizontal:flex-row data-horizontal:flex-wrap sm:data-horizontal:flex-nowrap",e?`${o}-${r}--disabled`:"",d?`${o}-${r}--full-width w-full`:"w-fit",m.className),title:t,...l===void 0?{}:{defaultValue:l},disabled:e,...a===void 0?{}:{orientation:a},type:G?"multiple":"single",value:$,...R(p)?{onValueChange:c=>p(c)}:{},...w(["className"],m),children:u(s.Provider,{value:{disabled:e,variant:i},children:T})});x.displayName="ToggleGroup";var E=x;export{x as a,E as b}; //# sourceMappingURL=chunk-KYI4NE2G.js.map