@synerise/ds-badge 1.0.43 → 1.0.45

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
+ ## [1.0.45](https://github.com/Synerise/synerise-design/compare/@synerise/ds-badge@1.0.44...@synerise/ds-badge@1.0.45) (2026-04-01)
7
+
8
+ **Note:** Version bump only for package @synerise/ds-badge
9
+
10
+ ## [1.0.44](https://github.com/Synerise/synerise-design/compare/@synerise/ds-badge@1.0.43...@synerise/ds-badge@1.0.44) (2026-03-24)
11
+
12
+ **Note:** Version bump only for package @synerise/ds-badge
13
+
6
14
  ## [1.0.43](https://github.com/Synerise/synerise-design/compare/@synerise/ds-badge@1.0.42...@synerise/ds-badge@1.0.43) (2026-03-20)
7
15
 
8
16
  **Note:** Version bump only for package @synerise/ds-badge
package/dist/Badge.d.ts CHANGED
@@ -1,6 +1,4 @@
1
- import React from 'react';
2
- import '@synerise/ds-core/dist/js/style';
3
- import { type BadgeProps } from './Badge.types';
4
- import './style/index.less';
1
+ import { default as React } from 'react';
2
+ import { BadgeProps } from './Badge.types';
5
3
  declare const Badge: ({ dot, ...props }: BadgeProps) => React.JSX.Element;
6
4
  export default Badge;
package/dist/Badge.js CHANGED
@@ -1,17 +1,16 @@
1
- var _excluded = ["dot"];
2
- function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
3
- function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
4
- import React from 'react';
5
- import '@synerise/ds-core/dist/js/style';
6
- import StyledBadge from './Badge.styles';
1
+ import { jsx } from "react/jsx-runtime";
2
+ import StyledBadge from "./Badge.styles.js";
7
3
  import "./style/index.css";
8
- var Badge = function Badge(_ref) {
9
- var dot = _ref.dot,
10
- props = _objectWithoutPropertiesLoose(_ref, _excluded);
11
- var status = props.status;
12
- var isDot = dot !== undefined ? dot : status !== undefined;
13
- return /*#__PURE__*/React.createElement(StyledBadge, _extends({}, props, {
14
- dot: isDot
15
- }));
4
+ const Badge = ({
5
+ dot,
6
+ ...props
7
+ }) => {
8
+ const {
9
+ status
10
+ } = props;
11
+ const isDot = dot !== void 0 ? dot : status !== void 0;
12
+ return /* @__PURE__ */ jsx(StyledBadge, { ...props, dot: isDot });
13
+ };
14
+ export {
15
+ Badge as default
16
16
  };
17
- export default Badge;
@@ -1,5 +1,5 @@
1
- import React from 'react';
2
- export declare const afterElementAnimation: import("styled-components").Keyframes;
3
- export declare const beforeElementAnimation: import("styled-components").Keyframes;
4
- declare const _default: import("styled-components").StyledComponent<({ flag, outlined, backgroundColor, textColor, backgroundColorHue, textColorHue, pulsing, customColor, ...rest }: any) => React.JSX.Element, any, {}, never>;
1
+ import { default as React } from 'react';
2
+ export declare const afterElementAnimation: import('styled-components').Keyframes;
3
+ export declare const beforeElementAnimation: import('styled-components').Keyframes;
4
+ declare const _default: import('styled-components').StyledComponent<({ flag, outlined, backgroundColor, textColor, backgroundColorHue, textColorHue, pulsing, customColor, ...rest }: any) => React.JSX.Element, any, {}, never>;
5
5
  export default _default;
@@ -1,38 +1,34 @@
1
- var _excluded = ["flag", "outlined", "backgroundColor", "textColor", "backgroundColorHue", "textColorHue", "pulsing", "customColor"];
2
- function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
3
- import Badge from 'antd/lib/badge';
4
- import React from 'react';
5
- import styled, { css, keyframes } from 'styled-components';
6
- import { macro } from '@synerise/ds-typography';
7
- var getBackgroundColor = function getBackgroundColor(props) {
8
- if (props.backgroundColor === 'transparent') {
9
- return 'transparent';
1
+ import { jsx } from "react/jsx-runtime";
2
+ import Badge from "antd/lib/badge";
3
+ import styled, { css, keyframes } from "styled-components";
4
+ import { macro } from "@synerise/ds-typography";
5
+ const getBackgroundColor = (props) => {
6
+ if (props.backgroundColor === "transparent") {
7
+ return "transparent";
10
8
  }
11
- if (props.backgroundColor === 'white') {
9
+ if (props.backgroundColor === "white") {
12
10
  return props.theme.palette.white;
13
11
  }
14
- return props.theme.palette[props.backgroundColor + "-" + props.backgroundColorHue];
12
+ return props.theme.palette[`${props.backgroundColor}-${props.backgroundColorHue}`];
15
13
  };
16
- export var afterElementAnimation = keyframes(["0%{transform:translate3d(-5px,-5px,0) scale(0.3);opacity:0.9;}100%{transform:translate3d(-5px,-5px,0) scale(1.5);opacity:0;}"]);
17
- export var beforeElementAnimation = keyframes(["0%{transform:translate3d(-2px,-2px,0) scale(0.5);opacity:0.9;}100%{transform:translate3d(-2px,-2px,0) scale(1.5);opacity:0;}"]);
18
- export default styled(function (_ref) {
19
- var flag = _ref.flag,
20
- outlined = _ref.outlined,
21
- backgroundColor = _ref.backgroundColor,
22
- textColor = _ref.textColor,
23
- backgroundColorHue = _ref.backgroundColorHue,
24
- textColorHue = _ref.textColorHue,
25
- pulsing = _ref.pulsing,
26
- customColor = _ref.customColor,
27
- rest = _objectWithoutPropertiesLoose(_ref, _excluded);
28
- return /*#__PURE__*/React.createElement(Badge, rest);
29
- }).withConfig({
14
+ const afterElementAnimation = /* @__PURE__ */ keyframes(["0%{transform:translate3d(-5px,-5px,0) scale(0.3);opacity:0.9;}100%{transform:translate3d(-5px,-5px,0) scale(1.5);opacity:0;}"]);
15
+ const beforeElementAnimation = /* @__PURE__ */ keyframes(["0%{transform:translate3d(-2px,-2px,0) scale(0.5);opacity:0.9;}100%{transform:translate3d(-2px,-2px,0) scale(1.5);opacity:0;}"]);
16
+ const StyledBadge = styled(({
17
+ flag,
18
+ outlined,
19
+ backgroundColor,
20
+ textColor,
21
+ backgroundColorHue,
22
+ textColorHue,
23
+ pulsing,
24
+ customColor,
25
+ ...rest
26
+ }) => /* @__PURE__ */ jsx(Badge, { ...rest })).withConfig({
30
27
  displayName: "Badgestyles",
31
28
  componentId: "sc-1ci72bj-0"
32
- })(["&&{.ant-scroll-number-only{height:16px;&:last-of-type:not(:first-of-type) > p{padding-right:1px;}& > p{", ";color:inherit;line-height:16px;height:16px;font-weight:400;}}.ant-badge-count{box-shadow:none;height:16px;padding:0 3px;line-height:16px;min-width:16px;font-size:13px;background-color:", ";color:", ";}", ""], macro.h200, function (props) {
33
- return getBackgroundColor(props);
34
- }, function (props) {
35
- return props.theme.palette[props.textColor + "-" + props.textColorHue];
36
- }, function (props) {
37
- return css(["", " ", " ", " ", " ", " ", " ", ";"], props.customColor && css([".ant-badge-dot,.ant-badge-status-dot{background-color:", ";}"], props.customColor.indexOf('-') >= 0 ? props.theme.palette[props.customColor] : props.theme.palette[props.customColor + "-600"]), props.status === 'active' && !props.customColor && css([".ant-badge-status-active{background-color:", ";}"], props.theme.palette['green-600']), props.status === 'inactive' && !props.customColor && css([".ant-badge-status-inactive{background-color:", ";}"], props.theme.palette['grey-400']), props.status === 'blocked' && !props.customColor && css([".ant-badge-status-blocked{background-color:", ";}"], props.theme.palette['red-600']), props.status === 'processing' && !props.customColor && css([".ant-badge-status-processing{background-color:", ";}"], props.theme.palette['blue-600']), props.outlined && css([".ant-badge-count{box-shadow:0 0 0 1px ", ";}"], props.theme.palette.white), (!!props.flag || !!props.status) && css([".ant-badge-dot{box-shadow:none;&.ant-badge-status-processing{display:inline-block;position:absolute;}}.ant-badge-dot,.ant-badge-status-dot{overflow:visible;border:2px solid ", ";width:10px;height:10px;&::before{display:flex;content:", ";transform:translate3d(-2px,-2px,0);", " transform-origin:center;}&::after{display:flex;content:", ";transform:translate3d(-5px,-5px,0);", " transform-origin:center;}}"], props.theme.palette.white, props.flag ? '""' : 'none', props.pulsing && css(["animation:", " 2s infinite;position:absolute;top:0;left:0;width:10px;height:10px;background-color:inherit;border-radius:50%;"], beforeElementAnimation), props.flag ? '""' : 'none', props.pulsing && css(["animation:", " 2s infinite;position:absolute;top:0;left:0;width:16px;height:16px;background-color:inherit;border-radius:50%;"], afterElementAnimation)));
38
- });
29
+ })(["&&{.ant-scroll-number-only{height:16px;&:last-of-type:not(:first-of-type) > p{padding-right:1px;}& > p{", ";color:inherit;line-height:16px;height:16px;font-weight:400;}}.ant-badge-count{box-shadow:none;height:16px;padding:0 3px;line-height:16px;min-width:16px;font-size:13px;background-color:", ";color:", ";}", ""], macro.h200, (props) => getBackgroundColor(props), (props) => props.theme.palette[`${props.textColor}-${props.textColorHue}`], (props) => css(["", " ", " ", " ", " ", " ", " ", ";"], props.customColor && css([".ant-badge-dot,.ant-badge-status-dot{background-color:", ";}"], props.customColor.indexOf("-") >= 0 ? props.theme.palette[props.customColor] : props.theme.palette[`${props.customColor}-600`]), props.status === "active" && !props.customColor && css([".ant-badge-status-active{background-color:", ";}"], props.theme.palette["green-600"]), props.status === "inactive" && !props.customColor && css([".ant-badge-status-inactive{background-color:", ";}"], props.theme.palette["grey-400"]), props.status === "blocked" && !props.customColor && css([".ant-badge-status-blocked{background-color:", ";}"], props.theme.palette["red-600"]), props.status === "processing" && !props.customColor && css([".ant-badge-status-processing{background-color:", ";}"], props.theme.palette["blue-600"]), props.outlined && css([".ant-badge-count{box-shadow:0 0 0 1px ", ";}"], props.theme.palette.white), (!!props.flag || !!props.status) && css([".ant-badge-dot{box-shadow:none;&.ant-badge-status-processing{display:inline-block;position:absolute;}}.ant-badge-dot,.ant-badge-status-dot{overflow:visible;border:2px solid ", ";width:10px;height:10px;&::before{display:flex;content:", ";transform:translate3d(-2px,-2px,0);", " transform-origin:center;}&::after{display:flex;content:", ";transform:translate3d(-5px,-5px,0);", " transform-origin:center;}}"], props.theme.palette.white, props.flag ? '""' : "none", props.pulsing && css(["animation:", " 2s infinite;position:absolute;top:0;left:0;width:10px;height:10px;background-color:inherit;border-radius:50%;"], beforeElementAnimation), props.flag ? '""' : "none", props.pulsing && css(["animation:", " 2s infinite;position:absolute;top:0;left:0;width:16px;height:16px;background-color:inherit;border-radius:50%;"], afterElementAnimation))));
30
+ export {
31
+ afterElementAnimation,
32
+ beforeElementAnimation,
33
+ StyledBadge as default
34
+ };
@@ -1,5 +1,5 @@
1
- import { type BadgeProps as AntBadgeProps } from 'antd/lib/badge';
2
- import { type DefaultColor } from '@synerise/ds-core';
1
+ import { BadgeProps as AntBadgeProps } from 'antd/lib/badge';
2
+ import { DefaultColor } from '@synerise/ds-core';
3
3
  export declare const color: readonly ["red", "green", "grey", "yellow", "blue", "pink", "mars", "orange", "fern", "cyan", "purple", "violet", "white", "transparent"];
4
4
  export type Color = (typeof color)[number];
5
5
  export type ColorHue = '900' | '800' | '700' | '600' | '500' | '400' | '300' | '200' | '100' | '050';
@@ -1 +1,4 @@
1
- export var color = ['red', 'green', 'grey', 'yellow', 'blue', 'pink', 'mars', 'orange', 'fern', 'cyan', 'purple', 'violet', 'white', 'transparent'];
1
+ const color = ["red", "green", "grey", "yellow", "blue", "pink", "mars", "orange", "fern", "cyan", "purple", "violet", "white", "transparent"];
2
+ export {
3
+ color
4
+ };
File without changes
package/dist/index.js CHANGED
@@ -1 +1,4 @@
1
- export { default } from './Badge';
1
+ import { default as default2 } from "./Badge.js";
2
+ export {
3
+ default2 as default
4
+ };
package/dist/modules.d.js CHANGED
@@ -1 +1 @@
1
- import '@testing-library/jest-dom';
1
+ import "@testing-library/jest-dom";
File without changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@synerise/ds-badge",
3
- "version": "1.0.43",
3
+ "version": "1.0.45",
4
4
  "description": "Badge UI Component for the Synerise Design System",
5
5
  "license": "ISC",
6
6
  "repository": "Synerise/synerise-design",
@@ -16,10 +16,10 @@
16
16
  "access": "public"
17
17
  },
18
18
  "scripts": {
19
- "build": "pnpm run build:js && pnpm run build:css && pnpm run defs",
19
+ "build": "vite build",
20
20
  "build:css": "node ../../../scripts/style/less.js",
21
21
  "build:js": "babel --delete-dir-on-start --root-mode upward src --out-dir dist --extensions '.js,.ts,.tsx'",
22
- "build:watch": "pnpm run build:js -- --watch",
22
+ "build:watch": "vite build --watch",
23
23
  "defs": "tsc --declaration --outDir dist/ --emitDeclarationOnly",
24
24
  "pack:ci": "pnpm pack --pack-destination ../../storybook/storybook-static/static",
25
25
  "prepublish": "pnpm run build",
@@ -35,8 +35,8 @@
35
35
  ],
36
36
  "types": "dist/index.d.ts",
37
37
  "dependencies": {
38
- "@synerise/ds-icon": "^1.15.0",
39
- "@synerise/ds-typography": "^1.1.12"
38
+ "@synerise/ds-icon": "^1.15.2",
39
+ "@synerise/ds-typography": "^1.1.14"
40
40
  },
41
41
  "peerDependencies": {
42
42
  "@synerise/ds-core": "*",
@@ -45,5 +45,5 @@
45
45
  "styled-components": "^5.3.3",
46
46
  "vitest": "4"
47
47
  },
48
- "gitHead": "8efc031fa688c0b87c7b3915bae93546bb63bcac"
48
+ "gitHead": "c2384982c3533a31eb5e5e0408f8dcecb2b0f399"
49
49
  }