UNPKG

@snowball-tech/fractal

Version:

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

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