@spark-ui/badge 9.0.2 → 9.0.4

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/CHANGELOG.md CHANGED
@@ -3,6 +3,14 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [9.0.4](https://github.com/adevinta/spark/compare/v9.0.3...v9.0.4) (2025-02-09)
7
+
8
+ **Note:** Version bump only for package @spark-ui/badge
9
+
10
+ ## [9.0.3](https://github.com/adevinta/spark/compare/v9.0.2...v9.0.3) (2025-02-06)
11
+
12
+ **Note:** Version bump only for package @spark-ui/badge
13
+
6
14
  ## [9.0.2](https://github.com/adevinta/spark/compare/v9.0.1...v9.0.2) (2025-02-06)
7
15
 
8
16
  ### Bug Fixes
package/dist/index.js CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react"),c=require("@spark-ui/internal-utils"),p=require("class-variance-authority").cva(["inline-flex h-fit","empty:p-none","text-center font-bold","rounded-full box-content"],{variants:{intent:c.makeVariants({main:["bg-main","text-on-main","border-surface"],support:["bg-support","text-on-support","border-surface"],accent:["bg-accent","text-on-accent","border-surface"],success:["bg-success","text-on-success","border-surface"],alert:["bg-alert","text-on-alert","border-surface"],danger:["bg-error","text-on-error","border-surface"],info:["bg-info","text-on-info","border-surface"],neutral:["bg-neutral","text-on-neutral","border-surface"],surface:["bg-surface","text-on-surface","border-surface"],basic:["bg-basic","text-on-basic","border-surface"]}),size:c.makeVariants({sm:["text-small","px-[var(--spacing-sz-6)] py-[var(--spacing-sz-2)]","empty:size-sz-8"],md:["text-caption","px-md py-sm","empty:size-sz-16"]}),type:{relative:["absolute right-none border-md","translate-x-1/2 -translate-y-1/2"],standalone:[]}},defaultVariants:{intent:"danger",size:"md",type:"relative"}}),o=({intent:e="danger",size:t="md",type:l="relative",count:a,overflowCount:n=99,"aria-label":s,className:u,...d})=>{const b=a&&a>n,m={...d,"aria-label":typeof s=="function"?s({count:a,overflowCount:n}):s};return r.createElement("span",{"data-spark-component":"badge",role:"status",className:p({intent:e,size:t,type:l,className:u}),...m},b?`${n}+`:a)};o.displayName="BadgeItem";const i=({children:e,...t})=>e?r.createElement("div",{className:"relative inline-flex"},e,r.createElement(o,{...t})):r.createElement(o,{type:"standalone",...t});i.displayName="Badge",exports.Badge=i;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react"),c=require("@spark-ui/internal-utils"),p=require("class-variance-authority").cva(["inline-flex h-fit","empty:p-0","text-center font-bold","rounded-full box-content"],{variants:{intent:c.makeVariants({main:["bg-main","text-on-main","border-surface"],support:["bg-support","text-on-support","border-surface"],accent:["bg-accent","text-on-accent","border-surface"],success:["bg-success","text-on-success","border-surface"],alert:["bg-alert","text-on-alert","border-surface"],danger:["bg-error","text-on-error","border-surface"],info:["bg-info","text-on-info","border-surface"],neutral:["bg-neutral","text-on-neutral","border-surface"],surface:["bg-surface","text-on-surface","border-surface"],basic:["bg-basic","text-on-basic","border-surface"]}),size:c.makeVariants({sm:["text-small","px-[var(--spacing-sz-6)] py-[var(--spacing-sz-2)]","empty:size-sz-8"],md:["text-caption","px-md py-sm","empty:size-sz-16"]}),type:{relative:["absolute right-0 border-md","translate-x-1/2 -translate-y-1/2"],standalone:[]}},defaultVariants:{intent:"danger",size:"md",type:"relative"}}),o=({intent:e="danger",size:t="md",type:l="relative",count:a,overflowCount:n=99,"aria-label":s,className:u,...d})=>{const b=a&&a>n,m={...d,"aria-label":typeof s=="function"?s({count:a,overflowCount:n}):s};return r.createElement("span",{"data-spark-component":"badge",role:"status",className:p({intent:e,size:t,type:l,className:u}),...m},b?`${n}+`:a)};o.displayName="BadgeItem";const i=({children:e,...t})=>e?r.createElement("div",{className:"relative inline-flex"},e,r.createElement(o,{...t})):r.createElement(o,{type:"standalone",...t});i.displayName="Badge",exports.Badge=i;
package/dist/index.mjs CHANGED
@@ -1,7 +1,7 @@
1
1
  import r from "react";
2
2
  import { makeVariants as c } from "@spark-ui/internal-utils";
3
3
  import { cva as p } from "class-variance-authority";
4
- const b = p(["inline-flex h-fit", "empty:p-none", "text-center font-bold", "rounded-full box-content"], { variants: { intent: c({ main: ["bg-main", "text-on-main", "border-surface"], support: ["bg-support", "text-on-support", "border-surface"], accent: ["bg-accent", "text-on-accent", "border-surface"], success: ["bg-success", "text-on-success", "border-surface"], alert: ["bg-alert", "text-on-alert", "border-surface"], danger: ["bg-error", "text-on-error", "border-surface"], info: ["bg-info", "text-on-info", "border-surface"], neutral: ["bg-neutral", "text-on-neutral", "border-surface"], surface: ["bg-surface", "text-on-surface", "border-surface"], basic: ["bg-basic", "text-on-basic", "border-surface"] }), size: c({ sm: ["text-small", "px-[var(--spacing-sz-6)] py-[var(--spacing-sz-2)]", "empty:size-sz-8"], md: ["text-caption", "px-md py-sm", "empty:size-sz-16"] }), type: { relative: ["absolute right-none border-md", "translate-x-1/2 -translate-y-1/2"], standalone: [] } }, defaultVariants: { intent: "danger", size: "md", type: "relative" } }), o = ({ intent: e = "danger", size: t = "md", type: i = "relative", count: a, overflowCount: n = 99, "aria-label": s, className: l, ...d }) => {
4
+ const b = p(["inline-flex h-fit", "empty:p-0", "text-center font-bold", "rounded-full box-content"], { variants: { intent: c({ main: ["bg-main", "text-on-main", "border-surface"], support: ["bg-support", "text-on-support", "border-surface"], accent: ["bg-accent", "text-on-accent", "border-surface"], success: ["bg-success", "text-on-success", "border-surface"], alert: ["bg-alert", "text-on-alert", "border-surface"], danger: ["bg-error", "text-on-error", "border-surface"], info: ["bg-info", "text-on-info", "border-surface"], neutral: ["bg-neutral", "text-on-neutral", "border-surface"], surface: ["bg-surface", "text-on-surface", "border-surface"], basic: ["bg-basic", "text-on-basic", "border-surface"] }), size: c({ sm: ["text-small", "px-[var(--spacing-sz-6)] py-[var(--spacing-sz-2)]", "empty:size-sz-8"], md: ["text-caption", "px-md py-sm", "empty:size-sz-16"] }), type: { relative: ["absolute right-0 border-md", "translate-x-1/2 -translate-y-1/2"], standalone: [] } }, defaultVariants: { intent: "danger", size: "md", type: "relative" } }), o = ({ intent: e = "danger", size: t = "md", type: i = "relative", count: a, overflowCount: n = 99, "aria-label": s, className: l, ...d }) => {
5
5
  const u = a && a > n, m = { ...d, "aria-label": typeof s == "function" ? s({ count: a, overflowCount: n }) : s };
6
6
  return r.createElement("span", { "data-spark-component": "badge", role: "status", className: b({ intent: e, size: t, type: i, className: l }), ...m }, u ? `${n}+` : a);
7
7
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@spark-ui/badge",
3
- "version": "9.0.2",
3
+ "version": "9.0.4",
4
4
  "description": "Badge component is a visual indicator for numeric values such as tallies and scores.",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -35,7 +35,7 @@
35
35
  "url": "https://github.com/adevinta/spark/issues?q=is%3Aopen+is%3Aissue+label%3A%22Component%3A+badge%22"
36
36
  },
37
37
  "dependencies": {
38
- "@spark-ui/internal-utils": "^9.0.2",
38
+ "@spark-ui/internal-utils": "^9.0.4",
39
39
  "class-variance-authority": "0.7.0"
40
40
  },
41
41
  "peerDependencies": {
@@ -46,5 +46,5 @@
46
46
  },
47
47
  "homepage": "https://sparkui.vercel.app",
48
48
  "license": "MIT",
49
- "gitHead": "94f87ca3d23aabde6f729d9fb3726bbd78cad12b"
49
+ "gitHead": "a0d610b1b05ed87ae6661ddf5df9cf9b95c25f03"
50
50
  }