@stackshift-ui/badge 7.0.0-beta.0 → 7.0.0-beta.1

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/badge.d.ts CHANGED
@@ -1,7 +1,12 @@
1
- import type { ElementType, HTMLProps, ReactNode } from "react";
2
- export interface BadgeProps extends Omit<HTMLProps<HTMLElement>, "as"> {
3
- children?: ReactNode;
4
- className?: string;
5
- as?: ElementType;
1
+ import { type VariantProps } from "class-variance-authority";
2
+ import * as React from "react";
3
+ declare const badgeVariants: (props?: ({
4
+ variant?: "default" | "secondary" | "destructive" | "outline" | null | undefined;
5
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string;
6
+ export interface BadgeProps extends React.HTMLAttributes<HTMLDivElement>, VariantProps<typeof badgeVariants> {
6
7
  }
7
- export declare const Badge: React.FC<BadgeProps>;
8
+ declare function Badge({ className, variant, ...props }: BadgeProps): import("react/jsx-runtime").JSX.Element;
9
+ declare namespace Badge {
10
+ var displayName: string;
11
+ }
12
+ export { Badge, badgeVariants };
package/dist/badge.js CHANGED
@@ -1 +1 @@
1
- "use strict";var f=Object.create;var p=Object.defineProperty;var u=Object.getOwnPropertyDescriptor;var C=Object.getOwnPropertyNames;var x=Object.getPrototypeOf,y=Object.prototype.hasOwnProperty;var N=(e,t)=>{for(var o in t)p(e,o,{get:t[o],enumerable:!0})},d=(e,t,o,s)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of C(t))!y.call(e,a)&&a!==o&&p(e,a,{get:()=>t[a],enumerable:!(s=u(t,a))||s.enumerable});return e};var g=(e,t,o)=>(o=e!=null?f(x(e)):{},d(t||!e||!e.__esModule?p(o,"default",{value:e,enumerable:!0}):o,e)),T=e=>d(p({},"__esModule",{value:!0}),e);var B={};N(B,{Badge:()=>i});module.exports=T(B);var m=require("@stackshift-ui/system"),l=require("@stackshift-ui/flex"),c=g(require("classnames")),n=require("react/jsx-runtime"),r="Badge",i=({children:e,className:t,as:o,...s})=>{let{[r]:a=m.DefaultComponent}=(0,m.useStackShiftUIComponents)();return(0,n.jsx)(a,{className:t,...s,"data-testid":r,children:(0,n.jsx)(l.Flex,{children:(0,n.jsx)("div",{className:(0,c.default)("px-3 py-1 text-sm font-bold uppercase rounded-full",t),children:e})})})};i.displayName=r;0&&(module.exports={Badge});
1
+ "use strict";var s=Object.defineProperty;var u=Object.getOwnPropertyDescriptor;var g=Object.getOwnPropertyNames;var m=Object.prototype.hasOwnProperty;var l=(r,e)=>{for(var t in e)s(r,t,{get:e[t],enumerable:!0})},b=(r,e,t,a)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of g(e))!m.call(r,n)&&n!==t&&s(r,n,{get:()=>e[n],enumerable:!(a=u(e,n))||a.enumerable});return r};var v=r=>b(s({},"__esModule",{value:!0}),r);var y={};l(y,{Badge:()=>f,badgeVariants:()=>c});module.exports=v(y);var i=require("class-variance-authority"),o=require("@stackshift-ui/system"),p=require("react/jsx-runtime"),d="Badge",c=(0,i.cva)("inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground hover:bg-destructive/80",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function f({className:r,variant:e,...t}){let{[d]:a=o.DefaultComponent}=(0,o.useStackShiftUIComponents)();return(0,p.jsx)(a,{className:(0,o.cn)(c({variant:e}),r),...t})}f.displayName=d;0&&(module.exports={Badge,badgeVariants});
package/dist/badge.mjs CHANGED
@@ -1 +1 @@
1
- import{a}from"./chunk-53FTCUE2.mjs";export{a as Badge};
1
+ import{a,b}from"./chunk-QPNE64XN.mjs";export{b as Badge,a as badgeVariants};
@@ -0,0 +1 @@
1
+ import{cva as a}from"class-variance-authority";import{cn as s,DefaultComponent as i,useStackShiftUIComponents as d}from"@stackshift-ui/system";import{jsx as p}from"react/jsx-runtime";var e="Badge",c=a("inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground hover:bg-destructive/80",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function f({className:r,variant:t,...o}){let{[e]:n=i}=d();return p(n,{className:s(c({variant:t}),r),...o})}f.displayName=e;export{c as a,f as b};
package/dist/index.js CHANGED
@@ -1,2 +1,2 @@
1
1
  "use client";
2
- "use strict";var f=Object.create;var p=Object.defineProperty;var u=Object.getOwnPropertyDescriptor;var x=Object.getOwnPropertyNames;var C=Object.getPrototypeOf,y=Object.prototype.hasOwnProperty;var N=(e,t)=>{for(var o in t)p(e,o,{get:t[o],enumerable:!0})},d=(e,t,o,s)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of x(t))!y.call(e,a)&&a!==o&&p(e,a,{get:()=>t[a],enumerable:!(s=u(t,a))||s.enumerable});return e};var g=(e,t,o)=>(o=e!=null?f(C(e)):{},d(t||!e||!e.__esModule?p(o,"default",{value:e,enumerable:!0}):o,e)),T=e=>d(p({},"__esModule",{value:!0}),e);var B={};N(B,{Badge:()=>i});module.exports=T(B);var r=require("@stackshift-ui/system"),l=require("@stackshift-ui/flex"),c=g(require("classnames")),n=require("react/jsx-runtime"),m="Badge",i=({children:e,className:t,as:o,...s})=>{let{[m]:a=r.DefaultComponent}=(0,r.useStackShiftUIComponents)();return(0,n.jsx)(a,{className:t,...s,"data-testid":m,children:(0,n.jsx)(l.Flex,{children:(0,n.jsx)("div",{className:(0,c.default)("px-3 py-1 text-sm font-bold uppercase rounded-full",t),children:e})})})};i.displayName=m;0&&(module.exports={Badge});
2
+ "use strict";var s=Object.defineProperty;var u=Object.getOwnPropertyDescriptor;var g=Object.getOwnPropertyNames;var m=Object.prototype.hasOwnProperty;var l=(r,e)=>{for(var t in e)s(r,t,{get:e[t],enumerable:!0})},b=(r,e,t,a)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of g(e))!m.call(r,n)&&n!==t&&s(r,n,{get:()=>e[n],enumerable:!(a=u(e,n))||a.enumerable});return r};var v=r=>b(s({},"__esModule",{value:!0}),r);var y={};l(y,{Badge:()=>f,badgeVariants:()=>c});module.exports=v(y);var i=require("class-variance-authority"),o=require("@stackshift-ui/system"),p=require("react/jsx-runtime"),d="Badge",c=(0,i.cva)("inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground hover:bg-destructive/80",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function f({className:r,variant:e,...t}){let{[d]:a=o.DefaultComponent}=(0,o.useStackShiftUIComponents)();return(0,p.jsx)(a,{className:(0,o.cn)(c({variant:e}),r),...t})}f.displayName=d;0&&(module.exports={Badge,badgeVariants});
package/dist/index.mjs CHANGED
@@ -1,2 +1,2 @@
1
1
  "use client";
2
- "use strict";import{a as e}from"./chunk-53FTCUE2.mjs";export{e as Badge};
2
+ "use strict";import{a as e,b as o}from"./chunk-QPNE64XN.mjs";export{o as Badge,e as badgeVariants};
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@stackshift-ui/badge",
3
3
  "description": "",
4
- "version": "7.0.0-beta.0",
4
+ "version": "7.0.0-beta.1",
5
5
  "private": false,
6
6
  "sideEffects": false,
7
7
  "main": "./dist/index.js",
@@ -29,18 +29,18 @@
29
29
  "typescript": "^5.6.2",
30
30
  "vite-tsconfig-paths": "^5.0.1",
31
31
  "vitest": "^2.1.1",
32
- "@stackshift-ui/typescript-config": "6.0.10",
33
- "@stackshift-ui/eslint-config": "6.0.10"
32
+ "@stackshift-ui/eslint-config": "6.0.10",
33
+ "@stackshift-ui/typescript-config": "6.0.10"
34
34
  },
35
35
  "dependencies": {
36
36
  "class-variance-authority": "^0.7.1",
37
37
  "classnames": "^2.5.1",
38
38
  "@stackshift-ui/scripts": "6.1.0-beta.0",
39
- "@stackshift-ui/system": "6.1.0-beta.0",
40
- "@stackshift-ui/flex": "7.0.0-beta.0"
39
+ "@stackshift-ui/flex": "7.0.0-beta.1",
40
+ "@stackshift-ui/system": "6.1.0-beta.1"
41
41
  },
42
42
  "peerDependencies": {
43
- "@stackshift-ui/system": ">=6.1.0-beta.0",
43
+ "@stackshift-ui/system": ">=6.1.0-beta.1",
44
44
  "@types/react": "16.8 - 19",
45
45
  "next": "10 - 14",
46
46
  "react": "16.8 - 19",
@@ -1 +0,0 @@
1
- import{DefaultComponent as n,useStackShiftUIComponents as m}from"@stackshift-ui/system";import{Flex as r}from"@stackshift-ui/flex";import d from"classnames";import{jsx as e}from"react/jsx-runtime";var t="Badge",l=({children:a,className:o,as:c,...s})=>{let{[t]:p=n}=m();return e(p,{className:o,...s,"data-testid":t,children:e(r,{children:e("div",{className:d("px-3 py-1 text-sm font-bold uppercase rounded-full",o),children:a})})})};l.displayName=t;export{l as a};