UNPKG

@snowball-tech/fractal

Version:

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

3 lines 1.3 kB
'use client'; import{a as s}from"./chunk-KLG6EM6H.js";import{a as t,c as f}from"./chunk-I3RVF3DK.js";import{b as o}from"./chunk-CMFNILWJ.js";import{b as n}from"./chunk-XYM7TA65.js";import*as x from"@radix-ui/react-radio-group";import{useId as P}from"react";import h from"lodash/fp/isFunction";import v from"lodash/fp/omit";import{jsx as R}from"react/jsx-runtime";var I=({children:_,condensed:c=!1,defaultValue:e,disabled:a=!1,fullWidth:$=!1,name:g,onValueChange:p,orientation:d="vertical",required:r=!1,value:w,variant:l=f,...i})=>{let u=P(),m=(i.id??u)||u;return R(x.Root,{id:m,className:n(`${o}-${t}__group`,`${o}-${t}__group--${l}`,"flex max-w-full flex-col gap-3","data-horizontal:flex-row data-horizontal:flex-wrap data-horizontal:items-start data-vertical:justify-start sm:data-horizontal:flex-nowrap",a?`${o}-${t}__group--disabled`:"",$?`${o}-${t}__group--full-width w-full`:"w-fit",r?`${o}-${t}__group--required`:"",i.className),...e===void 0?{}:{defaultValue:e},disabled:a,name:g||m,...d===void 0?{}:{orientation:d},required:r,value:w,...h(p)?{onValueChange:N=>p(N)}:{},...v(["className"],i),children:R(s.Provider,{value:{condensed:c,disabled:a,required:r,variant:l},children:_})})};I.displayName="InputRadioGroup";var T=I;export{I as a,T as b}; //# sourceMappingURL=chunk-HEO4K6RZ.js.map