@spark-ui/badge 0.1.0 → 0.1.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,28 @@
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
+ ## [0.1.4](https://github.com/adevinta/spark/compare/@spark-ui/badge@0.1.3...@spark-ui/badge@0.1.4) (2023-05-10)
7
+
8
+ ### Bug Fixes
9
+
10
+ - force new release to all packages ([d7f5136](https://github.com/adevinta/spark/commit/d7f513698cf48dd9c102fafaeb336096818c6b2b))
11
+
12
+ ## [0.1.3](https://github.com/adevinta/spark/compare/@spark-ui/badge@0.1.2...@spark-ui/badge@0.1.3) (2023-05-10)
13
+
14
+ **Note:** Version bump only for package @spark-ui/badge
15
+
16
+ ## [0.1.2](https://github.com/adevinta/spark/compare/@spark-ui/badge@0.1.1...@spark-ui/badge@0.1.2) (2023-05-10)
17
+
18
+ ### Bug Fixes
19
+
20
+ - packages deps ([3543766](https://github.com/adevinta/spark/commit/354376668ebb773d8efa553ce7f5ef1ecad42416))
21
+
22
+ ## [0.1.1](https://github.com/adevinta/spark/compare/@spark-ui/badge@0.1.0...@spark-ui/badge@0.1.1) (2023-05-09)
23
+
24
+ ### Bug Fixes
25
+
26
+ - **badge:** fix deps ([824d1ce](https://github.com/adevinta/spark/commit/824d1ce33ce7519c7c1dd5b49f5c55e18d58b896))
27
+
6
28
  # 0.1.0 (2023-05-09)
7
29
 
8
30
  ### Bug Fixes
package/dist/index.js CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react"),y=require("class-variance-authority");Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"})),Object.freeze(Object.defineProperty({__proto__:null,designs:["filled","outlined","tinted","ghost","contrast"],intents:["current","primary","secondary","success","error","info","alert","danger","neutral","surface"],shapes:["rounded","square","pill"],sizes:["current","sm","md","lg"]},Symbol.toStringTag,{value:"Module"}));const c="danger",d="relative",b=y.cva(["inline-flex h-fit","empty:p-none","text-center font-bold","rounded-full ring-2"],{variants:{intent:{primary:["bg-primary","text-on-primary","ring-on-primary"],secondary:["bg-secondary","text-on-secondary","ring-on-secondary"],success:["bg-success","text-on-success","ring-on-success"],alert:["bg-alert","text-on-alert","ring-on-alert"],danger:["bg-error","text-on-error","ring-on-error"],info:["bg-info","text-on-info","ring-on-info"],neutral:["bg-neutral","text-on-neutral","ring-on-neutral"],surface:["bg-surface","text-on-surface","ring-on-surface"]},size:{sm:["text-small","px-[var(--sz-6)] py-[var(--sz-2)]","empty:h-sz-12 empty:w-sz-12"],md:["text-caption","px-md py-sm","empty:h-sz-16 empty:w-sz-16"]},type:{relative:["relative -translate-x-2/4 -translate-y-2/4"],standalone:[]}},defaultVariants:{intent:c,size:"md",type:d}}),l=e.forwardRef(({intent:t=c,size:r="md",type:n=d,count:a,overflowCount:o=99,"aria-label":s,className:u,...m},f)=>{const p=a&&a>o,g={...m,"aria-label":typeof s=="function"?s({count:a,overflowCount:o}):s};return e.createElement("span",{ref:f,"data-spark-component":"badge",role:"status",className:b({intent:t,size:r,type:n,className:u}),...g},p?`${o}+`:a)});l.displayName="BadgeItem";const i=e.forwardRef(({children:t,...r},n)=>t?e.createElement("div",{className:"relative flex"},t,e.createElement(l,{ref:n,...r})):e.createElement(l,{ref:n,type:"standalone",...r}));i.displayName="Badge",exports.Badge=i;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react"),l=require("@spark-ui/internal-utils"),x=require("class-variance-authority"),m="danger",d="relative",b=x.cva(["inline-flex h-fit","empty:p-none","text-center font-bold","rounded-full ring-2"],{variants:{intent:l.makeVariants({primary:["bg-primary","text-on-primary","ring-on-primary"],secondary:["bg-secondary","text-on-secondary","ring-on-secondary"],success:["bg-success","text-on-success","ring-on-success"],alert:["bg-alert","text-on-alert","ring-on-alert"],danger:["bg-error","text-on-error","ring-on-error"],info:["bg-info","text-on-info","ring-on-info"],neutral:["bg-neutral","text-on-neutral","ring-on-neutral"],surface:["bg-surface","text-on-surface","ring-on-surface"]}),size:l.makeVariants({sm:["text-small","px-[var(--sz-6)] py-[var(--sz-2)]","empty:h-sz-12 empty:w-sz-12"],md:["text-caption","px-md py-sm","empty:h-sz-16 empty:w-sz-16"]}),type:{relative:["relative -translate-x-2/4 -translate-y-2/4"],standalone:[]}},defaultVariants:{intent:m,size:"md",type:d}}),i=e.forwardRef(({intent:t=m,size:r="md",type:n=d,count:a,overflowCount:s=99,"aria-label":o,className:u,...p},y)=>{const f=a&&a>s,g={...p,"aria-label":typeof o=="function"?o({count:a,overflowCount:s}):o};return e.createElement("span",{ref:y,"data-spark-component":"badge",role:"status",className:b({intent:t,size:r,type:n,className:u}),...g},f?`${s}+`:a)});i.displayName="BadgeItem";const c=e.forwardRef(({children:t,...r},n)=>t?e.createElement("div",{className:"relative flex"},t,e.createElement(i,{ref:n,...r})):e.createElement(i,{ref:n,type:"standalone",...r}));c.displayName="Badge",exports.Badge=c;
package/dist/index.mjs CHANGED
@@ -1,13 +1,13 @@
1
- import a, { forwardRef as i } from "react";
2
- import { cva as y } from "class-variance-authority";
3
- Object.freeze(Object.defineProperty({ __proto__: null }, Symbol.toStringTag, { value: "Module" })), Object.freeze(Object.defineProperty({ __proto__: null, designs: ["filled", "outlined", "tinted", "ghost", "contrast"], intents: ["current", "primary", "secondary", "success", "error", "info", "alert", "danger", "neutral", "surface"], shapes: ["rounded", "square", "pill"], sizes: ["current", "sm", "md", "lg"] }, Symbol.toStringTag, { value: "Module" }));
4
- const c = "danger", d = "relative", b = y(["inline-flex h-fit", "empty:p-none", "text-center font-bold", "rounded-full ring-2"], { variants: { intent: { primary: ["bg-primary", "text-on-primary", "ring-on-primary"], secondary: ["bg-secondary", "text-on-secondary", "ring-on-secondary"], success: ["bg-success", "text-on-success", "ring-on-success"], alert: ["bg-alert", "text-on-alert", "ring-on-alert"], danger: ["bg-error", "text-on-error", "ring-on-error"], info: ["bg-info", "text-on-info", "ring-on-info"], neutral: ["bg-neutral", "text-on-neutral", "ring-on-neutral"], surface: ["bg-surface", "text-on-surface", "ring-on-surface"] }, size: { sm: ["text-small", "px-[var(--sz-6)] py-[var(--sz-2)]", "empty:h-sz-12 empty:w-sz-12"], md: ["text-caption", "px-md py-sm", "empty:h-sz-16 empty:w-sz-16"] }, type: { relative: ["relative -translate-x-2/4 -translate-y-2/4"], standalone: [] } }, defaultVariants: { intent: c, size: "md", type: d } }), l = i(({ intent: e = c, size: t = "md", type: r = d, count: n, overflowCount: o = 99, "aria-label": s, className: m, ...p }, u) => {
5
- const f = n && n > o, g = { ...p, "aria-label": typeof s == "function" ? s({ count: n, overflowCount: o }) : s };
6
- return a.createElement("span", { ref: u, "data-spark-component": "badge", role: "status", className: b({ intent: e, size: t, type: r, className: m }), ...g }, f ? `${o}+` : n);
1
+ import r, { forwardRef as m } from "react";
2
+ import { makeVariants as l } from "@spark-ui/internal-utils";
3
+ import { cva as x } from "class-variance-authority";
4
+ const c = "danger", p = "relative", b = x(["inline-flex h-fit", "empty:p-none", "text-center font-bold", "rounded-full ring-2"], { variants: { intent: l({ primary: ["bg-primary", "text-on-primary", "ring-on-primary"], secondary: ["bg-secondary", "text-on-secondary", "ring-on-secondary"], success: ["bg-success", "text-on-success", "ring-on-success"], alert: ["bg-alert", "text-on-alert", "ring-on-alert"], danger: ["bg-error", "text-on-error", "ring-on-error"], info: ["bg-info", "text-on-info", "ring-on-info"], neutral: ["bg-neutral", "text-on-neutral", "ring-on-neutral"], surface: ["bg-surface", "text-on-surface", "ring-on-surface"] }), size: l({ sm: ["text-small", "px-[var(--sz-6)] py-[var(--sz-2)]", "empty:h-sz-12 empty:w-sz-12"], md: ["text-caption", "px-md py-sm", "empty:h-sz-16 empty:w-sz-16"] }), type: { relative: ["relative -translate-x-2/4 -translate-y-2/4"], standalone: [] } }, defaultVariants: { intent: c, size: "md", type: p } }), i = m(({ intent: e = c, size: t = "md", type: a = p, count: n, overflowCount: s = 99, "aria-label": o, className: d, ...f }, y) => {
5
+ const g = n && n > s, u = { ...f, "aria-label": typeof o == "function" ? o({ count: n, overflowCount: s }) : o };
6
+ return r.createElement("span", { ref: y, "data-spark-component": "badge", role: "status", className: b({ intent: e, size: t, type: a, className: d }), ...u }, g ? `${s}+` : n);
7
7
  });
8
- l.displayName = "BadgeItem";
9
- const x = i(({ children: e, ...t }, r) => e ? a.createElement("div", { className: "relative flex" }, e, a.createElement(l, { ref: r, ...t })) : a.createElement(l, { ref: r, type: "standalone", ...t }));
10
- x.displayName = "Badge";
8
+ i.displayName = "BadgeItem";
9
+ const v = m(({ children: e, ...t }, a) => e ? r.createElement("div", { className: "relative flex" }, e, r.createElement(i, { ref: a, ...t })) : r.createElement(i, { ref: a, type: "standalone", ...t }));
10
+ v.displayName = "Badge";
11
11
  export {
12
- x as Badge
12
+ v as Badge
13
13
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@spark-ui/badge",
3
- "version": "0.1.0",
3
+ "version": "0.1.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"
@@ -11,25 +11,24 @@
11
11
  "scripts": {
12
12
  "build": "vite build"
13
13
  },
14
- "peerDependencies": {
15
- "react": "^16.8 || ^17.0 || ^18.0",
16
- "react-dom": "^16.8 || ^17.0 || ^18.0",
17
- "tailwindcss": "^3.0.0"
18
- },
19
14
  "repository": {
20
15
  "type": "git",
21
16
  "url": "git@github.com:adevinta/spark.git",
22
17
  "directory": "packages/components/badge"
23
18
  },
24
- "devDependencies": {
25
- "@spark-ui/icon": "1",
26
- "@spark-ui/icons": "1",
27
- "@spark-ui/radio": "1"
19
+ "dependencies": {
20
+ "@spark-ui/internal-utils": "^1.5.4",
21
+ "class-variance-authority": "0.5.2"
22
+ },
23
+ "peerDependencies": {
24
+ "react": "^16.8 || ^17.0 || ^18.0",
25
+ "react-dom": "^16.8 || ^17.0 || ^18.0",
26
+ "tailwindcss": "^3.0.0"
28
27
  },
29
28
  "bugs": {
30
29
  "url": "https://github.com/adevinta/spark/issues"
31
30
  },
32
31
  "homepage": "https://sparkui.vercel.app",
33
32
  "license": "MIT",
34
- "gitHead": "a6d74d7b4702f93fcc9fe9bc382337ec07067699"
33
+ "gitHead": "f83534112dc0eaf1fea3b747e5570fff39397b96"
35
34
  }