@snack-uikit/notification 0.13.18 → 0.13.19
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 +8 -0
- package/dist/cjs/components/NotificationPanel/NotificationPanel.js +7 -11
- package/dist/cjs/components/NotificationPanel/styles.module.css +0 -6
- package/dist/esm/components/NotificationPanel/NotificationPanel.js +1 -1
- package/dist/esm/components/NotificationPanel/styles.module.css +0 -6
- package/package.json +3 -3
- package/src/components/NotificationPanel/NotificationPanel.tsx +10 -12
- package/src/components/NotificationPanel/styles.module.scss +0 -7
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
|
+
## <small>0.13.19 (2025-10-29)</small>
|
|
7
|
+
|
|
8
|
+
* fix(PDS-2914): removed extra div ([636b983](https://github.com/cloud-ru-tech/snack-uikit/commit/636b983))
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
6
14
|
## <small>0.13.18 (2025-10-29)</small>
|
|
7
15
|
|
|
8
16
|
* feat(PDS-2914): chips changed to segments ([833f610](https://github.com/cloud-ru-tech/snack-uikit/commit/833f610))
|
|
@@ -78,17 +78,13 @@ function NotificationPanel(_a) {
|
|
|
78
78
|
}), settings && (0, jsx_runtime_1.jsx)(components_2.NotificationPanelSettings, Object.assign({}, settings))]
|
|
79
79
|
})]
|
|
80
80
|
}), (0, jsx_runtime_1.jsx)("div", {
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
})),
|
|
89
|
-
"data-test-id": constants_1.TEST_IDS.segments
|
|
90
|
-
}))
|
|
91
|
-
})
|
|
81
|
+
children: segments && (0, jsx_runtime_1.jsx)(segmented_control_1.SegmentedControl, Object.assign({}, segments, {
|
|
82
|
+
size: 's',
|
|
83
|
+
items: segments.items.map(item => Object.assign(Object.assign({}, item), {
|
|
84
|
+
disabled: item.disabled || loading
|
|
85
|
+
})),
|
|
86
|
+
"data-test-id": constants_1.TEST_IDS.segments
|
|
87
|
+
}))
|
|
92
88
|
})]
|
|
93
89
|
}), (0, jsx_runtime_1.jsxs)(scroll_1.Scroll, {
|
|
94
90
|
size: 'm',
|
|
@@ -19,12 +19,6 @@
|
|
|
19
19
|
align-items:center;
|
|
20
20
|
}
|
|
21
21
|
|
|
22
|
-
.notificationPanelHeaderFunctions{
|
|
23
|
-
display:flex;
|
|
24
|
-
align-items:center;
|
|
25
|
-
justify-content:space-between;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
22
|
.notificationPanelHeadline{
|
|
29
23
|
gap:var(--space-notification-panel-header-headline-gap, 16px);
|
|
30
24
|
display:flex;
|
|
@@ -29,7 +29,7 @@ import styles from './styles.module.css';
|
|
|
29
29
|
export function NotificationPanel(_a) {
|
|
30
30
|
var { title, settings, segments, readAllButton, footerButton, content, loading, skeletonsAmount = 2, scrollEndRef, scrollContainerRef, className } = _a, rest = __rest(_a, ["title", "settings", "segments", "readAllButton", "footerButton", "content", "loading", "skeletonsAmount", "scrollEndRef", "scrollContainerRef", "className"]);
|
|
31
31
|
const skeletons = useMemo(() => Array.from({ length: skeletonsAmount }, (_, i) => i), [skeletonsAmount]);
|
|
32
|
-
return (_jsxs("div", Object.assign({ className: cn(styles.wrapper, className) }, extractSupportProps(rest), { children: [_jsxs("div", { className: styles.notificationPanelHeader, children: [_jsxs("div", { className: styles.notificationPanelHeadline, children: [_jsx(Typography.SansHeadlineS, { className: styles.notificationPanelTitle, children: _jsx(TruncateString, { text: title, "data-test-id": TEST_IDS.title }) }), _jsxs("div", { className: styles.notificationPanelHeaderActions, children: [readAllButton && (_jsx(WithTooltip, { tooltip: readAllButton.tooltip, children: _jsx(ButtonFunction, Object.assign({}, readAllButton, { onClick: readAllButton.onClick, size: 'xs', disabled: readAllButton.disabled || loading, "data-test-id": TEST_IDS.readAll })) })), settings && _jsx(NotificationPanelSettings, Object.assign({}, settings))] })] }), _jsx("div", {
|
|
32
|
+
return (_jsxs("div", Object.assign({ className: cn(styles.wrapper, className) }, extractSupportProps(rest), { children: [_jsxs("div", { className: styles.notificationPanelHeader, children: [_jsxs("div", { className: styles.notificationPanelHeadline, children: [_jsx(Typography.SansHeadlineS, { className: styles.notificationPanelTitle, children: _jsx(TruncateString, { text: title, "data-test-id": TEST_IDS.title }) }), _jsxs("div", { className: styles.notificationPanelHeaderActions, children: [readAllButton && (_jsx(WithTooltip, { tooltip: readAllButton.tooltip, children: _jsx(ButtonFunction, Object.assign({}, readAllButton, { onClick: readAllButton.onClick, size: 'xs', disabled: readAllButton.disabled || loading, "data-test-id": TEST_IDS.readAll })) })), settings && _jsx(NotificationPanelSettings, Object.assign({}, settings))] })] }), _jsx("div", { children: segments && (_jsx(SegmentedControl, Object.assign({}, segments, { size: 's', items: segments.items.map(item => (Object.assign(Object.assign({}, item), { disabled: item.disabled || loading }))), "data-test-id": TEST_IDS.segments }))) })] }), _jsxs(Scroll, { size: 'm', className: styles.notificationPanelBody, ref: scrollContainerRef, children: [content, loading && (_jsx(SkeletonContextProvider, { loading: loading || false, children: skeletons.map(skeleton => (_jsx(WithSkeleton, { skeleton: _jsx(NotificationCardSkeleton, {}) }, skeleton))) })), _jsx("div", { className: styles.scrollStub, ref: scrollEndRef })] }), footerButton && (_jsx("button", { type: 'button', onClick: footerButton.onClick, className: styles.notificationPanelFooterButton, "data-test-id": TEST_IDS.footerButton, children: _jsx(Typography.SansLabelS, { children: footerButton.label }) }))] })));
|
|
33
33
|
}
|
|
34
34
|
(function (NotificationPanel) {
|
|
35
35
|
NotificationPanel.Blank = NotificationPanelBlank;
|
|
@@ -19,12 +19,6 @@
|
|
|
19
19
|
align-items:center;
|
|
20
20
|
}
|
|
21
21
|
|
|
22
|
-
.notificationPanelHeaderFunctions{
|
|
23
|
-
display:flex;
|
|
24
|
-
align-items:center;
|
|
25
|
-
justify-content:space-between;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
22
|
.notificationPanelHeadline{
|
|
29
23
|
gap:var(--space-notification-panel-header-headline-gap, 16px);
|
|
30
24
|
display:flex;
|
package/package.json
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"access": "public"
|
|
5
5
|
},
|
|
6
6
|
"title": "Notification",
|
|
7
|
-
"version": "0.13.
|
|
7
|
+
"version": "0.13.19",
|
|
8
8
|
"sideEffects": [
|
|
9
9
|
"*.css",
|
|
10
10
|
"*.woff",
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
"@snack-uikit/list": "0.32.6",
|
|
44
44
|
"@snack-uikit/popover-private": "0.15.3",
|
|
45
45
|
"@snack-uikit/scroll": "0.10.5",
|
|
46
|
-
"@snack-uikit/segmented-control": "0.6.
|
|
46
|
+
"@snack-uikit/segmented-control": "0.6.12",
|
|
47
47
|
"@snack-uikit/skeleton": "0.6.9",
|
|
48
48
|
"@snack-uikit/tag": "0.15.10",
|
|
49
49
|
"@snack-uikit/tooltip": "0.18.5",
|
|
@@ -52,5 +52,5 @@
|
|
|
52
52
|
"@snack-uikit/utils": "4.0.0",
|
|
53
53
|
"classnames": "2.5.1"
|
|
54
54
|
},
|
|
55
|
-
"gitHead": "
|
|
55
|
+
"gitHead": "aa80f463fc1e5e9412d766dbfe5d09b1350b9e71"
|
|
56
56
|
}
|
|
@@ -95,19 +95,17 @@ export function NotificationPanel({
|
|
|
95
95
|
</div>
|
|
96
96
|
</div>
|
|
97
97
|
|
|
98
|
-
<div
|
|
98
|
+
<div>
|
|
99
99
|
{segments && (
|
|
100
|
-
<
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
/>
|
|
110
|
-
</div>
|
|
100
|
+
<SegmentedControl
|
|
101
|
+
{...segments}
|
|
102
|
+
size='s'
|
|
103
|
+
items={segments.items.map(item => ({
|
|
104
|
+
...item,
|
|
105
|
+
disabled: item.disabled || loading,
|
|
106
|
+
}))}
|
|
107
|
+
data-test-id={TEST_IDS.segments}
|
|
108
|
+
/>
|
|
111
109
|
)}
|
|
112
110
|
</div>
|
|
113
111
|
</div>
|
|
@@ -20,13 +20,6 @@
|
|
|
20
20
|
align-items: center;
|
|
21
21
|
}
|
|
22
22
|
|
|
23
|
-
.notificationPanelHeaderFunctions {
|
|
24
|
-
display: flex;
|
|
25
|
-
align-items: center;
|
|
26
|
-
justify-content: space-between;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
|
|
30
23
|
.notificationPanelHeadline {
|
|
31
24
|
@include styles-tokens-notification-notificationPanel.composite-var(styles-tokens-notification-notificationPanel.$notification-panel-header-headline);
|
|
32
25
|
|