Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@pikas-ui/badge

Package Overview
Dependencies
Maintainers
1
Versions
55
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@pikas-ui/badge - npm Package Compare versions

Comparing version 1.3.31 to 2.0.0

2

dist/badge/Badge.js

@@ -1,2 +0,2 @@

"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _jsxruntime = require('react/jsx-runtime');var _styles = require('@pikas-ui/styles');var _indexjs = require('../customBadge/index.js');const x=_styles.styled.call(void 0, _indexjs.CustomBadge,{variants:{gap:{xs:{customColumnGap:1},sm:{customColumnGap:2},md:{customColumnGap:4},lg:{customColumnGap:8},xl:{customColumnGap:16}},padding:{xs:{padding:"2px 4px"},sm:{padding:"4px 8px"},md:{padding:"8px 16px"},lg:{padding:"16px 32px"},xl:{padding:"32px 64px"}}}}),C= exports.gapPadding ={xs:!0,sm:!0,md:!0,lg:!0,xl:!0},I= exports.Badge =({children:t,fontSize:a="EM-MEDIUM",LeftIcon:o,RightIcon:p,padding:e="md",gap:m="md",leftIconProps:g,rightIconProps:n,...d})=>_jsxruntime.jsxs.call(void 0, x,{gap:m,padding:e,css:{...d.css,fontSize:`$${a}`},...d,children:[o&&_jsxruntime.jsx.call(void 0, o,{size:"1em",...g}),t,p&&_jsxruntime.jsx.call(void 0, p,{size:"1em",...n})]});exports.Badge = I; exports.gapPadding = C;
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _jsxruntime = require('react/jsx-runtime');var _styles = require('@pikas-ui/styles');var _indexjs = require('../customBadge/index.js');const x=_styles.styled.call(void 0, _indexjs.CustomBadge,{variants:{gap:{xs:{columnGap:1},sm:{columnGap:2},md:{columnGap:4},lg:{columnGap:8},xl:{columnGap:16}},padding:{xs:{padding:"2px 4px"},sm:{padding:"4px 8px"},md:{padding:"8px 16px"},lg:{padding:"16px 32px"},xl:{padding:"32px 64px"}}}}),C= exports.gapPadding ={xs:!0,sm:!0,md:!0,lg:!0,xl:!0},G= exports.Badge =({children:a,fontSize:s="em-base",LeftIcon:p,RightIcon:o,padding:t="md",gap:g="md",leftIconProps:m,rightIconProps:n,...d})=>_jsxruntime.jsxs.call(void 0, x,{gap:g,padding:t,css:{...d.css,fontSize:`$${s}`},...d,children:[p&&_jsxruntime.jsx.call(void 0, p,{size:"1em",...m}),a,o&&_jsxruntime.jsx.call(void 0, o,{size:"1em",...n})]});exports.Badge = G; exports.gapPadding = C;
//# sourceMappingURL=Badge.js.map

@@ -1,2 +0,2 @@

import { PikasColor, PikasShadow, BorderRadius, PikasCSS } from '@pikas-ui/styles';
import { PikasColor, PikasShadow, PikasRadius, PikasCSS } from '@pikas-ui/styles';
import { HTMLAttributes, ReactNode, FC } from 'react';

@@ -9,3 +9,3 @@

boxShadow?: PikasShadow | 'none';
borderRadius?: BorderRadius;
borderRadius?: PikasRadius;
css?: PikasCSS;

@@ -12,0 +12,0 @@ };

@@ -1,2 +0,2 @@

"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } }var _jsxruntime = require('react/jsx-runtime');var _styles = require('@pikas-ui/styles');var _color = require('@pikas-utils/color');const C=_styles.styled.call(void 0, "div",{display:"flex",alignItems:"center",justifyContent:"center"}),b= exports.CustomBadge =({colorName:o="PRIMARY",colorHex:r,children:t,boxShadow:s="ELEVATION_BOTTOM_1",borderRadius:a="round",css:i,...d})=>{const e=_styles.useTheme.call(void 0, );return _jsxruntime.jsx.call(void 0, C,{css:{backgroundColor:`$${o}`,boxShadow:`$${s}`,br:a,color:e&&new (0, _color.Color)(_nullishCoalesce(r, () => (e.colors[o].value))).getContrast(),...i},...d,children:t})};exports.CustomBadge = b;
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } }var _jsxruntime = require('react/jsx-runtime');var _styles = require('@pikas-ui/styles');var _color = require('@pikas-utils/color');const p=_styles.styled.call(void 0, "div",{display:"flex",alignItems:"center",justifyContent:"center"}),f= exports.CustomBadge =({colorName:o="primary",colorHex:e,children:r,boxShadow:s="bottom-sm",borderRadius:a="full",css:i,...d})=>{const t=_styles.useTheme.call(void 0, );return _jsxruntime.jsx.call(void 0, p,{css:{backgroundColor:`$${o}`,boxShadow:`$${s}`,borderRadius:`$${a}`,color:t&&new (0, _color.Color)(_nullishCoalesce(e, () => (t.colors[o].value))).getContrast(),...i},...d,children:r})};exports.CustomBadge = f;
//# sourceMappingURL=CustomBadge.js.map

@@ -1,2 +0,2 @@

import{jsx as s,jsxs as u}from"react/jsx-runtime";import{styled as r}from"@pikas-ui/styles";import{CustomBadge as i}from"../customBadge/index.js";const x=r(i,{variants:{gap:{xs:{customColumnGap:1},sm:{customColumnGap:2},md:{customColumnGap:4},lg:{customColumnGap:8},xl:{customColumnGap:16}},padding:{xs:{padding:"2px 4px"},sm:{padding:"4px 8px"},md:{padding:"8px 16px"},lg:{padding:"16px 32px"},xl:{padding:"32px 64px"}}}}),C={xs:!0,sm:!0,md:!0,lg:!0,xl:!0},I=({children:t,fontSize:a="EM-MEDIUM",LeftIcon:o,RightIcon:p,padding:e="md",gap:m="md",leftIconProps:g,rightIconProps:n,...d})=>u(x,{gap:m,padding:e,css:{...d.css,fontSize:`$${a}`},...d,children:[o&&s(o,{size:"1em",...g}),t,p&&s(p,{size:"1em",...n})]});export{I as Badge,C as gapPadding};
import{jsx as e,jsxs as c}from"react/jsx-runtime";import{styled as r}from"@pikas-ui/styles";import{CustomBadge as i}from"../customBadge/index.js";const x=r(i,{variants:{gap:{xs:{columnGap:1},sm:{columnGap:2},md:{columnGap:4},lg:{columnGap:8},xl:{columnGap:16}},padding:{xs:{padding:"2px 4px"},sm:{padding:"4px 8px"},md:{padding:"8px 16px"},lg:{padding:"16px 32px"},xl:{padding:"32px 64px"}}}}),C={xs:!0,sm:!0,md:!0,lg:!0,xl:!0},G=({children:a,fontSize:s="em-base",LeftIcon:p,RightIcon:o,padding:t="md",gap:g="md",leftIconProps:m,rightIconProps:n,...d})=>c(x,{gap:g,padding:t,css:{...d.css,fontSize:`$${s}`},...d,children:[p&&e(p,{size:"1em",...m}),a,o&&e(o,{size:"1em",...n})]});export{G as Badge,C as gapPadding};
//# sourceMappingURL=Badge.js.map

@@ -1,2 +0,2 @@

import{jsx as c}from"react/jsx-runtime";import{useTheme as n,styled as m}from"@pikas-ui/styles";import{Color as l}from"@pikas-utils/color";const C=m("div",{display:"flex",alignItems:"center",justifyContent:"center"}),b=({colorName:o="PRIMARY",colorHex:r,children:t,boxShadow:s="ELEVATION_BOTTOM_1",borderRadius:a="round",css:i,...d})=>{const e=n();return c(C,{css:{backgroundColor:`$${o}`,boxShadow:`$${s}`,br:a,color:e&&new l(r??e.colors[o].value).getContrast(),...i},...d,children:t})};export{b as CustomBadge};
import{jsx as u}from"react/jsx-runtime";import{useTheme as n,styled as m}from"@pikas-ui/styles";import{Color as l}from"@pikas-utils/color";const p=m("div",{display:"flex",alignItems:"center",justifyContent:"center"}),f=({colorName:o="primary",colorHex:e,children:r,boxShadow:s="bottom-sm",borderRadius:a="full",css:i,...d})=>{const t=n();return u(p,{css:{backgroundColor:`$${o}`,boxShadow:`$${s}`,borderRadius:`$${a}`,color:t&&new l(e??t.colors[o].value).getContrast(),...i},...d,children:r})};export{f as CustomBadge};
//# sourceMappingURL=CustomBadge.js.map
{
"name": "@pikas-ui/badge",
"version": "1.3.31",
"version": "2.0.0",
"private": false,

@@ -10,3 +10,3 @@ "keywords": [

],
"description": "Components for creating badge",
"description": "A UI library that offers a badge components for React.",
"license": "MIT",

@@ -39,5 +39,5 @@ "type": "module",

"dependencies": {
"@pikas-ui/icons": "3.3.30",
"@pikas-ui/styles": "3.5.30",
"@pikas-utils/color": "1.0.13"
"@pikas-ui/icons": "4.0.0",
"@pikas-ui/styles": "4.0.0",
"@pikas-utils/color": "2.0.0"
},

@@ -51,3 +51,3 @@ "peerDependencies": {

"@pikas/tsconfig": "1.0.0",
"@types/node": "18.11.18",
"@types/node": "18.11.19",
"@types/react": "18.0.27",

@@ -61,3 +61,3 @@ "@types/react-dom": "18.0.10",

"tsup": "6.5.0",
"typescript": "4.9.4"
"typescript": "4.9.5"
},

@@ -64,0 +64,0 @@ "node": "12.20.0 || 14.13.1 || >=16.0.0",

# @pikas-ui/badge
This package contains a badge component.
A UI library that offers a badge components for React.
## Getting Started
## Requirements
You need to install the <a href={stylesLink}>@pikas-ui/styles</a> package to use this package.
To use this package, you must install the [@pikas-ui/styles](https://pikas-ui.vercel.app/utilities/styles) package.
### Installation
## Installation
With npm:
You can install this package using npm, yarn, or pnpm.

@@ -17,4 +17,2 @@ ```

With yarn:
```

@@ -24,4 +22,2 @@ yarn add @pikas-ui/badge

With pnpm:
```

@@ -28,0 +24,0 @@ pnpm add @pikas-ui/badge

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc