@moontra/moonui 2.3.6 → 2.3.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +4 -1
- package/dist/index.d.ts +4 -1
- package/dist/index.global.js +1 -1
- package/dist/index.global.js.map +1 -1
- package/dist/index.js +11 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +11 -2
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/components/ui/badge.tsx +14 -2
package/dist/index.mjs
CHANGED
|
@@ -341,7 +341,9 @@ var badgeVariants = cva(
|
|
|
341
341
|
"inline-flex items-center justify-center gap-1.5",
|
|
342
342
|
"font-medium transition-colors duration-200",
|
|
343
343
|
"border focus:outline-none",
|
|
344
|
-
"focus-visible:ring-2 focus-visible:ring-offset-1"
|
|
344
|
+
"focus-visible:ring-2 focus-visible:ring-offset-1",
|
|
345
|
+
// Auto spacing between badges
|
|
346
|
+
"mr-2 mb-2 last:mr-0"
|
|
345
347
|
],
|
|
346
348
|
{
|
|
347
349
|
variants: {
|
|
@@ -433,6 +435,7 @@ function Badge({
|
|
|
433
435
|
onRemove,
|
|
434
436
|
leftIcon,
|
|
435
437
|
rightIcon,
|
|
438
|
+
noAutoSpacing,
|
|
436
439
|
children,
|
|
437
440
|
...props
|
|
438
441
|
}) {
|
|
@@ -453,7 +456,13 @@ function Badge({
|
|
|
453
456
|
return /* @__PURE__ */ jsxs(
|
|
454
457
|
"div",
|
|
455
458
|
{
|
|
456
|
-
className: cn(
|
|
459
|
+
className: cn(
|
|
460
|
+
"moonui-theme",
|
|
461
|
+
badgeVariants({ variant, size, radius }),
|
|
462
|
+
// Remove auto-spacing if noAutoSpacing is true
|
|
463
|
+
noAutoSpacing && "mr-0 mb-0",
|
|
464
|
+
className
|
|
465
|
+
),
|
|
457
466
|
"data-removable": removable ? "" : void 0,
|
|
458
467
|
...props,
|
|
459
468
|
children: [
|