UNPKG

@snowball-tech/fractal

Version:

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

3 lines 1.38 kB
'use client'; import{a as E}from"./chunk-XEYPM4AT.js";import{a as r,c,d as R}from"./chunk-UO7KBUEN.js";import{a as v}from"./chunk-HTOKQYVM.js";import{b as e}from"./chunk-CMFNILWJ.js";import{b as f,c as p}from"./chunk-XYM7TA65.js";import{forwardRef as b,useImperativeHandle as w,useRef as M}from"react";import P from"lodash/fp/omit";import{jsx as o}from"react/jsx-runtime";var N=b(({children:t,condensed:$=!1,disabled:n=!1,elevation:a=R,embedded:s=!1,fullWidth:h=!1,menu:y={},orientation:m=c,rainbow:l=!0,...i},g)=>{let u=M(null),d=M(null);w(g,()=>({get container(){return u?.current??null},get menu(){return d?.current??null}}));let C=!!t,T={"1":"rounded-sm shadow-none","2":"rounded-sm shadow-subtle ml-quarter","3":"rounded-sm shadow-brutal ml-quarter"};return o("div",{ref:u,className:f(`${e}-${r}`,`${e}-${r}--${a}`,n?`${e}-${r}--disabled`:"",h?`${e}-${r}--full-width`:"sm:w-fit","pointer-events-auto relative z-50",s?"":"rounded-sm border-1 border-normal bg-white p-1",C?"":`${e}-${r}__menu--empty invisible`,s?"":T[a],i.className),...P(["className"],i),children:o("div",{ref:d,"aria-orientation":m,role:"menu",...y,children:o(E.Provider,{value:{condensed:$,disabled:n,orientation:m,rainbow:l},children:o(v,{className:l?p:"",element:"div",variant:"body-1",children:t})})})})});N.displayName="Menu";var O=N;export{N as a,O as b}; //# sourceMappingURL=chunk-LIRW3RPR.js.map