@synerise/ds-broadcast-bar 1.1.15 → 1.1.16
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 +4 -0
- package/dist/BroadcastBar.d.ts +2 -2
- package/dist/BroadcastBar.js +27 -36
- package/dist/BroadcastBar.styles.d.ts +12 -12
- package/dist/BroadcastBar.styles.js +39 -45
- package/dist/BroadcastBar.types.d.ts +1 -1
- package/dist/BroadcastBar.types.js +1 -1
- package/dist/constants.d.ts +2 -2
- package/dist/constants.js +11 -7
- package/dist/index.js +4 -1
- package/dist/modules.d.js +1 -1
- package/dist/modules.d.ts +0 -0
- package/package.json +5 -5
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,10 @@
|
|
|
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.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)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @synerise/ds-broadcast-bar
|
|
9
|
+
|
|
6
10
|
## [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
11
|
|
|
8
12
|
**Note:** Version bump only for package @synerise/ds-broadcast-bar
|
package/dist/BroadcastBar.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import {
|
|
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;
|
package/dist/BroadcastBar.js
CHANGED
|
@@ -1,18 +1,20 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
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
|
-
|
|
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
|
|
25
|
-
close: withClose,
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
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 {
|
|
2
|
-
import {
|
|
3
|
-
export declare const AlertContent: import(
|
|
4
|
-
export declare const AllContent: import(
|
|
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(
|
|
8
|
+
export declare const IconWrapper: import('styled-components').StyledComponent<"div", any, {
|
|
9
9
|
type?: BroadcastBarType;
|
|
10
10
|
}, never>;
|
|
11
|
-
export declare const IconCloseWrapper: import(
|
|
11
|
+
export declare const IconCloseWrapper: import('styled-components').StyledComponent<"div", any, {
|
|
12
12
|
type?: BroadcastBarType;
|
|
13
13
|
}, never>;
|
|
14
|
-
export declare const ButtonWrapper: import(
|
|
14
|
+
export declare const ButtonWrapper: import('styled-components').StyledComponent<"div", any, {
|
|
15
15
|
type?: BroadcastBarType;
|
|
16
16
|
}, never>;
|
|
17
|
-
export declare const ButtonCloseWrapper: import(
|
|
18
|
-
export declare const Wrapper: import(
|
|
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(
|
|
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(
|
|
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(
|
|
29
|
+
export declare const AlertDescription: import('styled-components').StyledComponent<"span", any, {}, never>;
|
|
@@ -1,74 +1,68 @@
|
|
|
1
|
-
import styled, { css } from
|
|
2
|
-
|
|
3
|
-
if (props.type ===
|
|
4
|
-
return props.theme.palette[
|
|
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 ===
|
|
7
|
-
return props.theme.palette[
|
|
6
|
+
if (props.type === "negative") {
|
|
7
|
+
return props.theme.palette["red-600"];
|
|
8
8
|
}
|
|
9
|
-
return props.theme.palette[
|
|
9
|
+
return props.theme.palette[`green-600`];
|
|
10
10
|
};
|
|
11
|
-
|
|
12
|
-
if (props.type ===
|
|
13
|
-
return props.theme.palette[
|
|
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
|
-
|
|
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
|
-
|
|
21
|
+
const AllContent = /* @__PURE__ */ styled.div.withConfig({
|
|
22
22
|
displayName: "BroadcastBarstyles__AllContent",
|
|
23
23
|
componentId: "sc-1wlkvzq-1"
|
|
24
|
-
})(["display:flex;", ";color:", ";"],
|
|
25
|
-
|
|
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:", ";"],
|
|
33
|
-
|
|
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:", ";"],
|
|
39
|
-
|
|
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
|
-
|
|
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
|
-
|
|
41
|
+
const Wrapper = /* @__PURE__ */ styled.div.withConfig({
|
|
50
42
|
displayName: "BroadcastBarstyles__Wrapper",
|
|
51
43
|
componentId: "sc-1wlkvzq-6"
|
|
52
|
-
})(["margin-top:10px;color:", ";"],
|
|
53
|
-
|
|
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:", ";"],
|
|
59
|
-
|
|
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:", ";"],
|
|
67
|
-
|
|
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 +1 @@
|
|
|
1
|
-
|
|
1
|
+
|
package/dist/constants.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React,
|
|
2
|
-
import {
|
|
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
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
success:
|
|
5
|
-
warning:
|
|
6
|
-
negative:
|
|
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
package/dist/modules.d.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import
|
|
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.
|
|
3
|
+
"version": "1.1.16",
|
|
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": "
|
|
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": "
|
|
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.
|
|
37
|
+
"@synerise/ds-icon": "^1.15.1"
|
|
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": "
|
|
45
|
+
"gitHead": "e4ecca8944fc9b41c1b9d59c8bcad5e5e2013225"
|
|
46
46
|
}
|