UNPKG

@snowball-tech/fractal

Version:

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

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