UNPKG

@snowball-tech/fractal

Version:

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

3 lines 1.39 kB
'use client'; import{a as l}from"./chunk-U4NRZEUB.js";import{a as d}from"./chunk-BOTB6U3S.js";import{c as s}from"./chunk-EEZZA3BT.js";import{b as o}from"./chunk-CMFNILWJ.js";import{b as m}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 g}from"react/jsx-runtime";var c=({children:x,defaultValue:f,disabled:t=!1,fullWidth:T=!1,grouped:e=!1,label:u,multiple:G=!1,onValueChange:i,orientation:r="vertical",value:$,variant:p=s,...a})=>g(n.Root,{"aria-label":u,className:m(`${o}-${l}`,`${o}-${l}--${p}`,e?`${o}-${l}--grouped`:"",e?r==="horizontal"?"[&>button:first-child]:rounded-l-full [&>button:last-child]:rounded-r-full":"justify-stretch [&>button:first-child]:rounded-t-full [&>button:last-child]:rounded-b-full":"gap-3","flex max-w-full flex-col","data-horizontal:flex-row data-horizontal:flex-wrap sm:data-horizontal:flex-nowrap",t?`${o}-${l}--disabled`:"",T?`${o}-${l}--full-width w-full`:"w-fit",a.className),title:u,...f===void 0?{}:{defaultValue:f},disabled:t,...r===void 0?{}:{orientation:r},type:G?"multiple":"single",value:$,...R(i)?{onValueChange:h=>i(h)}:{},...w(["className"],a),children:g(d.Provider,{value:{disabled:t,grouped:e,orientation:r,variant:p},children:x})});c.displayName="ToggleGroup";var E=c;export{c as a,E as b}; //# sourceMappingURL=chunk-KYF5OKQH.js.map