@synerise/ds-broadcast-bar 1.1.15 → 1.1.17

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.1.17](https://github.com/Synerise/synerise-design/compare/@synerise/ds-broadcast-bar@1.1.16...@synerise/ds-broadcast-bar@1.1.17) (2026-04-01)
7
+
8
+ **Note:** Version bump only for package @synerise/ds-broadcast-bar
9
+
10
+ ## [1.1.16](https://github.com/Synerise/synerise-design/compare/@synerise/ds-broadcast-bar@1.1.15...@synerise/ds-broadcast-bar@1.1.16) (2026-03-24)
11
+
12
+ **Note:** Version bump only for package @synerise/ds-broadcast-bar
13
+
6
14
  ## [1.1.15](https://github.com/Synerise/synerise-design/compare/@synerise/ds-broadcast-bar@1.1.14...@synerise/ds-broadcast-bar@1.1.15) (2026-03-20)
7
15
 
8
16
  **Note:** Version bump only for package @synerise/ds-broadcast-bar
@@ -1,4 +1,4 @@
1
- import React from 'react';
2
- import { type BroadcastBarProps } from './BroadcastBar.types';
1
+ import { default as React } from 'react';
2
+ import { BroadcastBarProps } from './BroadcastBar.types';
3
3
  declare const BroadcastBar: ({ customIcon, type, description, button, withClose, onCloseClick, }: BroadcastBarProps) => React.JSX.Element;
4
4
  export default BroadcastBar;
@@ -1,18 +1,20 @@
1
- import React, { useMemo } from 'react';
2
- import Icon, { CloseM } from '@synerise/ds-icon';
3
- import * as S from './BroadcastBar.styles';
4
- import { DEFAULT_ICON, ICONS } from './constants';
5
- var BroadcastBar = function BroadcastBar(_ref) {
6
- var customIcon = _ref.customIcon,
7
- type = _ref.type,
8
- description = _ref.description,
9
- button = _ref.button,
10
- withClose = _ref.withClose,
11
- onCloseClick = _ref.onCloseClick;
12
- var renderMessage = useMemo(function () {
13
- return /*#__PURE__*/React.createElement(S.AlertContent, null, description && /*#__PURE__*/React.createElement(S.AlertDescription, null, description));
1
+ import { jsx, jsxs } from "react/jsx-runtime";
2
+ import { useMemo } from "react";
3
+ import Icon, { CloseM } from "@synerise/ds-icon";
4
+ import { AlertContent, AlertDescription, Container, WrapperBroadcastBar, AllContent, IconWrapper, ButtonWrapper, ButtonCloseWrapper, IconCloseWrapper } from "./BroadcastBar.styles.js";
5
+ import { ICONS, DEFAULT_ICON } from "./constants.js";
6
+ const BroadcastBar = ({
7
+ customIcon,
8
+ type,
9
+ description,
10
+ button,
11
+ withClose,
12
+ onCloseClick
13
+ }) => {
14
+ const renderMessage = useMemo(() => {
15
+ return /* @__PURE__ */ jsx(AlertContent, { children: description && /* @__PURE__ */ jsx(AlertDescription, { children: description }) });
14
16
  }, [description]);
15
- var renderIcon = useMemo(function () {
17
+ const renderIcon = useMemo(() => {
16
18
  if (customIcon) {
17
19
  return customIcon;
18
20
  }
@@ -21,26 +23,15 @@ var BroadcastBar = function BroadcastBar(_ref) {
21
23
  }
22
24
  return DEFAULT_ICON;
23
25
  }, [customIcon, type]);
24
- return /*#__PURE__*/React.createElement(S.Container, {
25
- close: withClose,
26
- type: type
27
- }, /*#__PURE__*/React.createElement(S.WrapperBroadcastBar, {
28
- close: withClose,
29
- type: type
30
- }, /*#__PURE__*/React.createElement(S.AllContent, {
31
- close: withClose,
32
- type: type
33
- }, /*#__PURE__*/React.createElement(S.IconWrapper, {
34
- type: type
35
- }, /*#__PURE__*/React.createElement(Icon, {
36
- component: renderIcon
37
- })), renderMessage, /*#__PURE__*/React.createElement(S.ButtonWrapper, {
38
- type: type
39
- }, button)), withClose && /*#__PURE__*/React.createElement(S.ButtonCloseWrapper, null, /*#__PURE__*/React.createElement(S.IconCloseWrapper, {
40
- onClick: onCloseClick,
41
- type: type
42
- }, /*#__PURE__*/React.createElement(Icon, {
43
- component: /*#__PURE__*/React.createElement(CloseM, null)
44
- })))));
26
+ return /* @__PURE__ */ jsx(Container, { close: withClose, type, children: /* @__PURE__ */ jsxs(WrapperBroadcastBar, { close: withClose, type, children: [
27
+ /* @__PURE__ */ jsxs(AllContent, { close: withClose, type, children: [
28
+ /* @__PURE__ */ jsx(IconWrapper, { type, children: /* @__PURE__ */ jsx(Icon, { component: renderIcon }) }),
29
+ renderMessage,
30
+ /* @__PURE__ */ jsx(ButtonWrapper, { type, children: button })
31
+ ] }),
32
+ withClose && /* @__PURE__ */ jsx(ButtonCloseWrapper, { children: /* @__PURE__ */ jsx(IconCloseWrapper, { onClick: onCloseClick, type, children: /* @__PURE__ */ jsx(Icon, { component: /* @__PURE__ */ jsx(CloseM, {}) }) }) })
33
+ ] }) });
34
+ };
35
+ export {
36
+ BroadcastBar as default
45
37
  };
46
- export default BroadcastBar;
@@ -1,29 +1,29 @@
1
- import { type ReactNode } from 'react';
2
- import { type BroadcastBarType } from './BroadcastBar.types';
3
- export declare const AlertContent: import("styled-components").StyledComponent<"div", any, {}, never>;
4
- export declare const AllContent: import("styled-components").StyledComponent<"div", any, {
1
+ import { ReactNode } from 'react';
2
+ import { BroadcastBarType } from './BroadcastBar.types';
3
+ export declare const AlertContent: import('styled-components').StyledComponent<"div", any, {}, never>;
4
+ export declare const AllContent: import('styled-components').StyledComponent<"div", any, {
5
5
  type?: BroadcastBarType;
6
6
  close?: boolean | ReactNode;
7
7
  }, never>;
8
- export declare const IconWrapper: import("styled-components").StyledComponent<"div", any, {
8
+ export declare const IconWrapper: import('styled-components').StyledComponent<"div", any, {
9
9
  type?: BroadcastBarType;
10
10
  }, never>;
11
- export declare const IconCloseWrapper: import("styled-components").StyledComponent<"div", any, {
11
+ export declare const IconCloseWrapper: import('styled-components').StyledComponent<"div", any, {
12
12
  type?: BroadcastBarType;
13
13
  }, never>;
14
- export declare const ButtonWrapper: import("styled-components").StyledComponent<"div", any, {
14
+ export declare const ButtonWrapper: import('styled-components').StyledComponent<"div", any, {
15
15
  type?: BroadcastBarType;
16
16
  }, never>;
17
- export declare const ButtonCloseWrapper: import("styled-components").StyledComponent<"div", any, {}, never>;
18
- export declare const Wrapper: import("styled-components").StyledComponent<"div", any, {
17
+ export declare const ButtonCloseWrapper: import('styled-components').StyledComponent<"div", any, {}, never>;
18
+ export declare const Wrapper: import('styled-components').StyledComponent<"div", any, {
19
19
  type?: BroadcastBarType;
20
20
  }, never>;
21
- export declare const Container: import("styled-components").StyledComponent<"div", any, {
21
+ export declare const Container: import('styled-components').StyledComponent<"div", any, {
22
22
  type?: BroadcastBarType;
23
23
  close?: boolean;
24
24
  }, never>;
25
- export declare const WrapperBroadcastBar: import("styled-components").StyledComponent<"div", any, {
25
+ export declare const WrapperBroadcastBar: import('styled-components').StyledComponent<"div", any, {
26
26
  type?: BroadcastBarType;
27
27
  close?: boolean;
28
28
  }, never>;
29
- export declare const AlertDescription: import("styled-components").StyledComponent<"span", any, {}, never>;
29
+ export declare const AlertDescription: import('styled-components').StyledComponent<"span", any, {}, never>;
@@ -1,74 +1,68 @@
1
- import styled, { css } from 'styled-components';
2
- var getColorBackground = function getColorBackground(props) {
3
- if (props.type === 'warning') {
4
- return props.theme.palette['yellow-600'];
1
+ import styled, { css } from "styled-components";
2
+ const getColorBackground = (props) => {
3
+ if (props.type === "warning") {
4
+ return props.theme.palette["yellow-600"];
5
5
  }
6
- if (props.type === 'negative') {
7
- return props.theme.palette['red-600'];
6
+ if (props.type === "negative") {
7
+ return props.theme.palette["red-600"];
8
8
  }
9
- return props.theme.palette["green-600"];
9
+ return props.theme.palette[`green-600`];
10
10
  };
11
- var getColorIcon = function getColorIcon(props) {
12
- if (props.type === 'warning') {
13
- return props.theme.palette['grey-800'];
11
+ const getColorIcon = (props) => {
12
+ if (props.type === "warning") {
13
+ return props.theme.palette["grey-800"];
14
14
  }
15
15
  return props.theme.palette.white;
16
16
  };
17
- export var AlertContent = styled.div.withConfig({
17
+ const AlertContent = /* @__PURE__ */ styled.div.withConfig({
18
18
  displayName: "BroadcastBarstyles__AlertContent",
19
19
  componentId: "sc-1wlkvzq-0"
20
20
  })(["display:flex;flex-direction:column;align-items:center;justify-content:center;padding:12px 0;color:inherit;"]);
21
- export var AllContent = styled.div.withConfig({
21
+ const AllContent = /* @__PURE__ */ styled.div.withConfig({
22
22
  displayName: "BroadcastBarstyles__AllContent",
23
23
  componentId: "sc-1wlkvzq-1"
24
- })(["display:flex;", ";color:", ";"], function (props) {
25
- return props.close && css(["position:absolute;left:50%;transform:translateX(-50%);"]);
26
- }, function (props) {
27
- return getColorIcon(props);
28
- });
29
- export var IconWrapper = styled.div.withConfig({
24
+ })(["display:flex;", ";color:", ";"], (props) => props.close && css(["position:absolute;left:50%;transform:translateX(-50%);"]), (props) => getColorIcon(props));
25
+ const IconWrapper = /* @__PURE__ */ styled.div.withConfig({
30
26
  displayName: "BroadcastBarstyles__IconWrapper",
31
27
  componentId: "sc-1wlkvzq-2"
32
- })(["margin:8px 12px;color:", ";"], function (props) {
33
- return getColorIcon(props);
34
- });
35
- export var IconCloseWrapper = styled.div.withConfig({
28
+ })(["margin:8px 12px;color:", ";"], (props) => getColorIcon(props));
29
+ const IconCloseWrapper = /* @__PURE__ */ styled.div.withConfig({
36
30
  displayName: "BroadcastBarstyles__IconCloseWrapper",
37
31
  componentId: "sc-1wlkvzq-3"
38
- })(["margin:3px 5px 2px;cursor:pointer;color:", ";"], function (props) {
39
- return getColorIcon(props);
40
- });
41
- export var ButtonWrapper = styled.div.withConfig({
32
+ })(["margin:3px 5px 2px;cursor:pointer;color:", ";"], (props) => getColorIcon(props));
33
+ const ButtonWrapper = /* @__PURE__ */ styled.div.withConfig({
42
34
  displayName: "BroadcastBarstyles__ButtonWrapper",
43
35
  componentId: "sc-1wlkvzq-4"
44
36
  })(["margin:6px 8px;border-radius:3px;display:flex;background-color:rgba(255,255,255,0.2);"]);
45
- export var ButtonCloseWrapper = styled.div.withConfig({
37
+ const ButtonCloseWrapper = /* @__PURE__ */ styled.div.withConfig({
46
38
  displayName: "BroadcastBarstyles__ButtonCloseWrapper",
47
39
  componentId: "sc-1wlkvzq-5"
48
40
  })(["margin:6px 8px;display:flex;"]);
49
- export var Wrapper = styled.div.withConfig({
41
+ const Wrapper = /* @__PURE__ */ styled.div.withConfig({
50
42
  displayName: "BroadcastBarstyles__Wrapper",
51
43
  componentId: "sc-1wlkvzq-6"
52
- })(["margin-top:10px;color:", ";"], function (props) {
53
- return getColorIcon(props);
54
- });
55
- export var Container = styled.div.withConfig({
44
+ })(["margin-top:10px;color:", ";"], (props) => getColorIcon(props));
45
+ const Container = /* @__PURE__ */ styled.div.withConfig({
56
46
  displayName: "BroadcastBarstyles__Container",
57
47
  componentId: "sc-1wlkvzq-7"
58
- })(["width:100%;display:flex;justify-content:", ";position:relative;background-color:", ";"], function (props) {
59
- return props.close ? 'space-between' : 'center';
60
- }, function (props) {
61
- return getColorBackground(props);
62
- });
63
- export var WrapperBroadcastBar = styled.div.withConfig({
48
+ })(["width:100%;display:flex;justify-content:", ";position:relative;background-color:", ";"], (props) => props.close ? "space-between" : "center", (props) => getColorBackground(props));
49
+ const WrapperBroadcastBar = /* @__PURE__ */ styled.div.withConfig({
64
50
  displayName: "BroadcastBarstyles__WrapperBroadcastBar",
65
51
  componentId: "sc-1wlkvzq-8"
66
- })(["font-size:13px;", ";color:", ";"], function (props) {
67
- return props.close && css(["margin-left:auto;"]);
68
- }, function (props) {
69
- return getColorIcon(props);
70
- });
71
- export var AlertDescription = styled.span.withConfig({
52
+ })(["font-size:13px;", ";color:", ";"], (props) => props.close && css(["margin-left:auto;"]), (props) => getColorIcon(props));
53
+ const AlertDescription = /* @__PURE__ */ styled.span.withConfig({
72
54
  displayName: "BroadcastBarstyles__AlertDescription",
73
55
  componentId: "sc-1wlkvzq-9"
74
- })(["display:flex;max-width:800px;white-space:normal;font-size:13px;line-height:1.39;font-weight:500;color:inherit;"]);
56
+ })(["display:flex;max-width:800px;white-space:normal;font-size:13px;line-height:1.39;font-weight:500;color:inherit;"]);
57
+ export {
58
+ AlertContent,
59
+ AlertDescription,
60
+ AllContent,
61
+ ButtonCloseWrapper,
62
+ ButtonWrapper,
63
+ Container,
64
+ IconCloseWrapper,
65
+ IconWrapper,
66
+ Wrapper,
67
+ WrapperBroadcastBar
68
+ };
@@ -1,4 +1,4 @@
1
- import { type ReactNode } from 'react';
1
+ import { ReactNode } from 'react';
2
2
  export type BroadcastBarType = 'success' | 'warning' | 'negative';
3
3
  export type BroadcastBarProps = {
4
4
  type: BroadcastBarType;
@@ -1 +1 @@
1
- export {};
1
+
@@ -1,4 +1,4 @@
1
- import React, { type ReactNode } from 'react';
2
- import { type BroadcastBarType } from './BroadcastBar.types';
1
+ import { default as React, ReactNode } from 'react';
2
+ import { BroadcastBarType } from './BroadcastBar.types';
3
3
  export declare const ICONS: Record<BroadcastBarType, ReactNode>;
4
4
  export declare const DEFAULT_ICON: React.JSX.Element;
package/dist/constants.js CHANGED
@@ -1,8 +1,12 @@
1
- import React from 'react';
2
- import { Check3M, ErrorFillM, WarningFillM } from '@synerise/ds-icon';
3
- export var ICONS = {
4
- success: /*#__PURE__*/React.createElement(Check3M, null),
5
- warning: /*#__PURE__*/React.createElement(WarningFillM, null),
6
- negative: /*#__PURE__*/React.createElement(ErrorFillM, null)
1
+ import { jsx } from "react/jsx-runtime";
2
+ import { WarningFillM, ErrorFillM, Check3M } from "@synerise/ds-icon";
3
+ const ICONS = {
4
+ success: /* @__PURE__ */ jsx(Check3M, {}),
5
+ warning: /* @__PURE__ */ jsx(WarningFillM, {}),
6
+ negative: /* @__PURE__ */ jsx(ErrorFillM, {})
7
+ };
8
+ const DEFAULT_ICON = /* @__PURE__ */ jsx(WarningFillM, {});
9
+ export {
10
+ DEFAULT_ICON,
11
+ ICONS
7
12
  };
8
- export var DEFAULT_ICON = /*#__PURE__*/React.createElement(WarningFillM, null);
package/dist/index.js CHANGED
@@ -1 +1,4 @@
1
- export { default } from './BroadcastBar';
1
+ import { default as default2 } from "./BroadcastBar.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-broadcast-bar",
3
- "version": "1.1.15",
3
+ "version": "1.1.17",
4
4
  "description": "BroadcastBar 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",
@@ -34,7 +34,7 @@
34
34
  ],
35
35
  "types": "dist/index.d.ts",
36
36
  "dependencies": {
37
- "@synerise/ds-icon": "^1.15.0"
37
+ "@synerise/ds-icon": "^1.15.2"
38
38
  },
39
39
  "peerDependencies": {
40
40
  "@synerise/ds-core": "*",
@@ -42,5 +42,5 @@
42
42
  "styled-components": "^5.3.3",
43
43
  "vitest": "4"
44
44
  },
45
- "gitHead": "8efc031fa688c0b87c7b3915bae93546bb63bcac"
45
+ "gitHead": "c2384982c3533a31eb5e5e0408f8dcecb2b0f399"
46
46
  }