@synerise/ds-broadcast-bar 2.0.8 → 2.1.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/CHANGELOG.md +19 -0
- package/CLAUDE.md +3 -9
- package/dist/BroadcastBar.js +1 -1
- package/dist/BroadcastBar.styles.d.ts +1 -3
- package/dist/BroadcastBar.styles.js +15 -21
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,25 @@
|
|
|
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
|
+
## [2.1.1](https://github.com/Synerise/synerise-design/compare/@synerise/ds-broadcast-bar@2.1.0...@synerise/ds-broadcast-bar@2.1.1) (2026-11-03)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @synerise/ds-broadcast-bar
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
# [2.1.0](https://github.com/Synerise/synerise-design/compare/@synerise/ds-broadcast-bar@2.0.8...@synerise/ds-broadcast-bar@2.1.0) (2026-10-29)
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
### Features
|
|
18
|
+
|
|
19
|
+
* integrate Token Studio design tokens across the design system ([aabb447](https://github.com/Synerise/synerise-design/commit/aabb447edfb2d0c85e3de1f07e809ef84083453b))
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
6
25
|
## [2.0.8](https://github.com/Synerise/synerise-design/compare/@synerise/ds-broadcast-bar@2.0.7...@synerise/ds-broadcast-bar@2.0.8) (2026-10-26)
|
|
7
26
|
|
|
8
27
|
|
package/CLAUDE.md
CHANGED
|
@@ -56,16 +56,10 @@ import BroadcastBar from '@synerise/ds-broadcast-bar';
|
|
|
56
56
|
|
|
57
57
|
## Styling
|
|
58
58
|
|
|
59
|
-
Styles live in `BroadcastBar.styles.tsx`. Uses
|
|
59
|
+
Styles live in `BroadcastBar.styles.tsx`. Uses the `--ds-broadcast-bar-variant-<v>-*` module tokens exclusively.
|
|
60
60
|
|
|
61
|
-
|
|
62
|
-
- `
|
|
63
|
-
- `warning` → `yellow-600`
|
|
64
|
-
- `negative` → `red-600`
|
|
65
|
-
|
|
66
|
-
Icon / text colour per type:
|
|
67
|
-
- `warning` → `grey-800`
|
|
68
|
-
- `success` / `negative` → `white`
|
|
61
|
+
Each type maps to a token variant — `success` → `success`, `warning` → `warning`, `negative` → `error` —
|
|
62
|
+
and reads `--ds-broadcast-bar-variant-<v>-bg` (background), `-text` (text) and `-icon` (icon).
|
|
69
63
|
|
|
70
64
|
When `withClose` is `true`, the main content block (`AllContent`) switches to `position: absolute; left: 50%; transform: translateX(-50%)` to keep it visually centred while the close button sits at the far right.
|
|
71
65
|
|
package/dist/BroadcastBar.js
CHANGED
|
@@ -27,7 +27,7 @@ const BroadcastBar = ({
|
|
|
27
27
|
/* @__PURE__ */ jsxs(AllContent, { close: withClose, type, children: [
|
|
28
28
|
/* @__PURE__ */ jsx(IconWrapper, { type, children: /* @__PURE__ */ jsx(Icon, { component: renderIcon }) }),
|
|
29
29
|
renderMessage,
|
|
30
|
-
/* @__PURE__ */ jsx(ButtonWrapper, {
|
|
30
|
+
/* @__PURE__ */ jsx(ButtonWrapper, { children: button })
|
|
31
31
|
] }),
|
|
32
32
|
withClose && /* @__PURE__ */ jsx(ButtonCloseWrapper, { children: /* @__PURE__ */ jsx(IconCloseWrapper, { onClick: onCloseClick, type, children: /* @__PURE__ */ jsx(Icon, { component: /* @__PURE__ */ jsx(CloseM, {}) }) }) })
|
|
33
33
|
] }) });
|
|
@@ -11,9 +11,7 @@ export declare const IconWrapper: import('styled-components').StyledComponent<"d
|
|
|
11
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, {
|
|
15
|
-
type?: BroadcastBarType;
|
|
16
|
-
}, never>;
|
|
14
|
+
export declare const ButtonWrapper: import('styled-components').StyledComponent<"div", any, {}, never>;
|
|
17
15
|
export declare const ButtonCloseWrapper: import('styled-components').StyledComponent<"div", any, {}, never>;
|
|
18
16
|
export declare const Wrapper: import('styled-components').StyledComponent<"div", any, {
|
|
19
17
|
type?: BroadcastBarType;
|
|
@@ -1,19 +1,13 @@
|
|
|
1
1
|
import styled, { css } from "styled-components";
|
|
2
|
-
const
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
if (props.type === "negative") {
|
|
7
|
-
return props.theme.palette["red-600"];
|
|
8
|
-
}
|
|
9
|
-
return props.theme.palette[`green-600`];
|
|
10
|
-
};
|
|
11
|
-
const getColorIcon = (props) => {
|
|
12
|
-
if (props.type === "warning") {
|
|
13
|
-
return props.theme.palette["grey-800"];
|
|
14
|
-
}
|
|
15
|
-
return props.theme.palette.white;
|
|
2
|
+
const TYPE_TO_TOKEN_VARIANT = {
|
|
3
|
+
success: "success",
|
|
4
|
+
warning: "warning",
|
|
5
|
+
negative: "error"
|
|
16
6
|
};
|
|
7
|
+
const variantOf = (type) => TYPE_TO_TOKEN_VARIANT[type ?? "success"] ?? "success";
|
|
8
|
+
const getColorBackground = (type) => `var(--ds-broadcast-bar-variant-${variantOf(type)}-bg)`;
|
|
9
|
+
const getColorText = (type) => `var(--ds-broadcast-bar-variant-${variantOf(type)}-text)`;
|
|
10
|
+
const getColorIcon = (type) => `var(--ds-broadcast-bar-variant-${variantOf(type)}-icon)`;
|
|
17
11
|
const AlertContent = /* @__PURE__ */ styled.div.withConfig({
|
|
18
12
|
displayName: "BroadcastBarstyles__AlertContent",
|
|
19
13
|
componentId: "sc-1wlkvzq-0"
|
|
@@ -21,19 +15,19 @@ const AlertContent = /* @__PURE__ */ styled.div.withConfig({
|
|
|
21
15
|
const AllContent = /* @__PURE__ */ styled.div.withConfig({
|
|
22
16
|
displayName: "BroadcastBarstyles__AllContent",
|
|
23
17
|
componentId: "sc-1wlkvzq-1"
|
|
24
|
-
})(["display:flex;", ";color:", ";"], (props) => props.close && css(["position:absolute;left:50%;transform:translateX(-50%);"]), (props) =>
|
|
18
|
+
})(["display:flex;", ";color:", ";"], (props) => props.close && css(["position:absolute;left:50%;transform:translateX(-50%);"]), (props) => getColorText(props.type));
|
|
25
19
|
const IconWrapper = /* @__PURE__ */ styled.div.withConfig({
|
|
26
20
|
displayName: "BroadcastBarstyles__IconWrapper",
|
|
27
21
|
componentId: "sc-1wlkvzq-2"
|
|
28
|
-
})(["margin:8px 12px;color:", ";"], (props) => getColorIcon(props));
|
|
22
|
+
})(["margin:8px 12px;color:", ";"], (props) => getColorIcon(props.type));
|
|
29
23
|
const IconCloseWrapper = /* @__PURE__ */ styled.div.withConfig({
|
|
30
24
|
displayName: "BroadcastBarstyles__IconCloseWrapper",
|
|
31
25
|
componentId: "sc-1wlkvzq-3"
|
|
32
|
-
})(["margin:3px 5px 2px;cursor:pointer;color:", ";"], (props) => getColorIcon(props));
|
|
26
|
+
})(["margin:3px 5px 2px;cursor:pointer;color:", ";"], (props) => getColorIcon(props.type));
|
|
33
27
|
const ButtonWrapper = /* @__PURE__ */ styled.div.withConfig({
|
|
34
28
|
displayName: "BroadcastBarstyles__ButtonWrapper",
|
|
35
29
|
componentId: "sc-1wlkvzq-4"
|
|
36
|
-
})(["margin:6px 8px;
|
|
30
|
+
})(["margin:6px 8px;display:flex;"]);
|
|
37
31
|
const ButtonCloseWrapper = /* @__PURE__ */ styled.div.withConfig({
|
|
38
32
|
displayName: "BroadcastBarstyles__ButtonCloseWrapper",
|
|
39
33
|
componentId: "sc-1wlkvzq-5"
|
|
@@ -41,15 +35,15 @@ const ButtonCloseWrapper = /* @__PURE__ */ styled.div.withConfig({
|
|
|
41
35
|
const Wrapper = /* @__PURE__ */ styled.div.withConfig({
|
|
42
36
|
displayName: "BroadcastBarstyles__Wrapper",
|
|
43
37
|
componentId: "sc-1wlkvzq-6"
|
|
44
|
-
})(["margin-top:10px;color:", ";"], (props) =>
|
|
38
|
+
})(["margin-top:10px;color:", ";"], (props) => getColorText(props.type));
|
|
45
39
|
const Container = /* @__PURE__ */ styled.div.withConfig({
|
|
46
40
|
displayName: "BroadcastBarstyles__Container",
|
|
47
41
|
componentId: "sc-1wlkvzq-7"
|
|
48
|
-
})(["width:100%;display:flex;justify-content:", ";position:relative;background-color:", ";"], (props) => props.close ? "space-between" : "center", (props) => getColorBackground(props));
|
|
42
|
+
})(["width:100%;display:flex;justify-content:", ";position:relative;background-color:", ";"], (props) => props.close ? "space-between" : "center", (props) => getColorBackground(props.type));
|
|
49
43
|
const WrapperBroadcastBar = /* @__PURE__ */ styled.div.withConfig({
|
|
50
44
|
displayName: "BroadcastBarstyles__WrapperBroadcastBar",
|
|
51
45
|
componentId: "sc-1wlkvzq-8"
|
|
52
|
-
})(["font-size:13px;", ";color:", ";"], (props) => props.close && css(["margin-left:auto;"]), (props) =>
|
|
46
|
+
})(["font-size:13px;", ";color:", ";"], (props) => props.close && css(["margin-left:auto;"]), (props) => getColorText(props.type));
|
|
53
47
|
const AlertDescription = /* @__PURE__ */ styled.span.withConfig({
|
|
54
48
|
displayName: "BroadcastBarstyles__AlertDescription",
|
|
55
49
|
componentId: "sc-1wlkvzq-9"
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@synerise/ds-broadcast-bar",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.1.1",
|
|
4
4
|
"description": "BroadcastBar UI Component for the Synerise Design System",
|
|
5
5
|
"license": "ISC",
|
|
6
6
|
"repository": "Synerise/synerise-design",
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
],
|
|
42
42
|
"types": "dist/index.d.ts",
|
|
43
43
|
"dependencies": {
|
|
44
|
-
"@synerise/ds-icon": "^2.
|
|
44
|
+
"@synerise/ds-icon": "^2.3.1"
|
|
45
45
|
},
|
|
46
46
|
"devDependencies": {
|
|
47
47
|
"vitest": "4"
|
|
@@ -51,5 +51,5 @@
|
|
|
51
51
|
"react": ">=16.9.0 <= 18.3.1",
|
|
52
52
|
"styled-components": "^5.3.3"
|
|
53
53
|
},
|
|
54
|
-
"gitHead": "
|
|
54
|
+
"gitHead": "2d2a540b35fddf8855da45f0dec2f4612c6d87b6"
|
|
55
55
|
}
|