UNPKG

@snowball-tech/fractal

Version:

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

3 lines 1.07 kB
'use client'; import{a as e}from"./chunk-PYUYB6K3.js";import{c as n}from"./chunk-LYTTDLE2.js";import{a as y}from"./chunk-AOLTZ2WJ.js";import{b as r}from"./chunk-CMFNILWJ.js";import{b as l}from"./chunk-XYM7TA65.js";import g from"lodash/fp/isEmpty";import p from"lodash/fp/isInteger";import h from"lodash/fp/isNil";import i from"lodash/fp/isNumber";import x from"lodash/fp/omit";import{jsx as w}from"react/jsx-runtime";var $=({children:t,count:m,label:d,limit:a=99,...f})=>{let o=i(m)&&p(m)?`${m}`:"";i(a)&&a>0&&!g(o)&&(m??0)>a&&(o=`+${a}`);let s=d||n(t)||o;return w(y,{"aria-label":s,className:l(`${r}-${e}`,"inline-flex shrink-0 items-center justify-center rounded-full bg-primary",(h(m)||!i(m)||!p(m))&&!t?`${r}-${e}--empty h-2 max-h-2 min-h-2 w-2 min-w-2 max-w-2 p-0`:"h-3 max-h-3 w-fit min-w-3",t?`${r}-${e}--with-children p-1`:p(m)?`${r}-${e}--with-count px-half py-0`:"",f.className),element:"div",title:s,variant:"caption-bold",...x(["className"],f),children:t??o})};$.displayName="Badge";var k=$;export{$ as a,k as b}; //# sourceMappingURL=chunk-W26G6UWK.js.map