@cloud-ru/ds-uikit-product-notification 2.1.2 → 2.1.4-preview-57a467a6.0

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,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
+ ## 2.1.3 (2026-10-17)
7
+
8
+ **Note:** Version bump only for package @ds/uikit-product-notification
9
+
6
10
  ## 2.1.2 (2026-10-16)
7
11
 
8
12
  **Note:** Version bump only for package @ds/uikit-product-notification
@@ -33,16 +33,16 @@ function NotificationPanel({ title, settings, segments, chipToggle, readAllButto
33
33
  const { tooltip: readAllTooltip, ...readAllButtonProps } = readAllButton ?? {};
34
34
  const buttonSize = isMobile ? 's' : 'm';
35
35
  // Figma: `slotAfterHeadline` (window) / `slotAfterTitle` (bottomSheet) — кнопки прижаты вправо.
36
- const actions = (readAllButton || settings) && ((0, jsx_runtime_1.jsxs)("span", { className: styles_module_scss_1.default.headerActions, children: [readAllButton && ((0, jsx_runtime_1.jsx)(tooltip_1.WithTooltip, { tooltip: readAllTooltip, children: (0, jsx_runtime_1.jsx)(button_1.Button, { ...readAllButtonProps, icon: readAllButtonProps.icon || (0, jsx_runtime_1.jsx)(product_1.DecorCheckedSVG, {}), view: 'function', appearance: 'neutral', size: buttonSize, disabled: readAllButtonProps.disabled || loading, "data-test-id": constants_1.TEST_IDS.panel.readAll }) })), settings && (0, jsx_runtime_1.jsx)(components_1.NotificationPanelSettings, { ...settings, size: buttonSize })] }));
36
+ const actions = (readAllButton || settings) && ((0, jsx_runtime_1.jsxs)("span", { className: styles_module_scss_1.default.headerActions, "data-mobile": isMobile || undefined, children: [readAllButton && ((0, jsx_runtime_1.jsx)(tooltip_1.WithTooltip, { tooltip: readAllTooltip, children: (0, jsx_runtime_1.jsx)(button_1.Button, { ...readAllButtonProps, icon: readAllButtonProps.icon || (0, jsx_runtime_1.jsx)(product_1.DecorCheckedSVG, {}), view: 'function', appearance: 'neutral', size: buttonSize, disabled: readAllButtonProps.disabled || loading, "data-test-id": constants_1.TEST_IDS.panel.readAll }) })), settings && (0, jsx_runtime_1.jsx)(components_1.NotificationPanelSettings, { ...settings, size: buttonSize })] }));
37
37
  // Figma: `slotSubHeadline` (window) / `slotSecondTitle` (bottomSheet). ChipToggle есть только в
38
38
  // desktop-мастере.
39
- const filters = (segments || (!isMobile && chipToggle)) && ((0, jsx_runtime_1.jsxs)("div", { className: styles_module_scss_1.default.filtersRow, "data-mobile": isMobile || undefined, children: [segments && ((0, jsx_runtime_1.jsx)(segment_control_1.SegmentControl, { ...segments, size: 's',
39
+ const filters = (segments || (!isMobile && chipToggle)) && ((0, jsx_runtime_1.jsxs)("div", { className: styles_module_scss_1.default.filtersRow, "data-mobile": isMobile || undefined, children: [segments && ((0, jsx_runtime_1.jsx)(segment_control_1.SegmentControl, { ...segments, size: buttonSize,
40
40
  // В мобильном мастере сегменты делят всю ширину sheet'а.
41
41
  width: isMobile ? 'full' : segments.width, items: segments.items.map(item => ({
42
42
  ...item,
43
43
  disabled: item.disabled || loading,
44
- })), "data-test-id": constants_1.TEST_IDS.panel.segments })), !isMobile && chipToggle && ((0, jsx_runtime_1.jsx)(chips_1.ChipToggle, { size: 's', disabled: loading, label: chipToggle.label, onChange: chipToggle.onChange, checked: chipToggle.checked, "data-test-id": constants_1.TEST_IDS.panel.chipToggle }))] }));
45
- return ((0, jsx_runtime_1.jsx)(drawer_1.Drawer, { position: position, width: width, className: (0, classnames_1.default)(styles_module_scss_1.default.panel, className), showButtonClosed: false, title: (0, jsx_runtime_1.jsx)("span", { "data-test-id": constants_1.TEST_IDS.panel.title, children: title }), slotAfterTitle: actions, slotSecondTitle: filters, withDividers: isMobile,
44
+ })), "data-test-id": constants_1.TEST_IDS.panel.segments })), !isMobile && chipToggle && ((0, jsx_runtime_1.jsx)(chips_1.ChipToggle, { size: buttonSize, disabled: loading, label: chipToggle.label, onChange: chipToggle.onChange, checked: chipToggle.checked, "data-test-id": constants_1.TEST_IDS.panel.chipToggle }))] }));
45
+ return ((0, jsx_runtime_1.jsx)(drawer_1.Drawer, { position: position, width: width, className: (0, classnames_1.default)(styles_module_scss_1.default.panel, className), showButtonClosed: true, title: (0, jsx_runtime_1.jsx)("span", { "data-test-id": constants_1.TEST_IDS.panel.title, children: title }), slotAfterTitle: actions, slotSecondTitle: filters, withDividers: isMobile,
46
46
  // Только mobile: в мастере bottomSheet панель открывается на всю высоту экрана.
47
47
  snapPoints: drawer_1.SNAP_POINTS_PRESET.full, contentRef: scrollContainerRef, content: (0, jsx_runtime_1.jsxs)("div", { className: styles_module_scss_1.default.body, "aria-busy": loading || undefined, children: [content, loading && ((0, jsx_runtime_1.jsx)(skeleton_1.SkeletonContextProvider, { loading: Boolean(loading), children: skeletons.map(skeleton => ((0, jsx_runtime_1.jsx)(skeleton_1.WithSkeleton, { skeleton: (0, jsx_runtime_1.jsx)(NotificationCardSkeleton_1.NotificationCardSkeleton, {}) }, skeleton))) })), (0, jsx_runtime_1.jsx)("div", { className: styles_module_scss_1.default.scrollStub, ref: scrollEndRef })] }), ...rest }));
48
48
  }
@@ -9,6 +9,9 @@
9
9
  align-items:center;
10
10
  justify-content:flex-end;
11
11
  }
12
+ .headerActions:not([data-mobile]){
13
+ padding-right:var(--sn-primitive-dimension-16, 16px);
14
+ }
12
15
 
13
16
  .filtersRow{
14
17
  display:flex;
@@ -20,7 +23,7 @@
20
23
  padding-top:var(--sn-primitive-dimension-12, 12px);
21
24
  }
22
25
  .filtersRow[data-mobile]{
23
- padding-inline:var(--sn-primitive-dimension-12, 12px);
26
+ padding-inline:var(--sn-primitive-dimension-6, 6px);
24
27
  }
25
28
  .filtersRow[data-mobile] > *{
26
29
  flex:1 1 auto;
@@ -393,6 +393,9 @@
393
393
  align-items:center;
394
394
  justify-content:flex-end;
395
395
  }
396
+ .headerActions:not([data-mobile]){
397
+ padding-right:var(--sn-primitive-dimension-16, 16px);
398
+ }
396
399
 
397
400
  .filtersRow{
398
401
  display:flex;
@@ -404,7 +407,7 @@
404
407
  padding-top:var(--sn-primitive-dimension-12, 12px);
405
408
  }
406
409
  .filtersRow[data-mobile]{
407
- padding-inline:var(--sn-primitive-dimension-12, 12px);
410
+ padding-inline:var(--sn-primitive-dimension-6, 6px);
408
411
  }
409
412
  .filtersRow[data-mobile] > *{
410
413
  flex:1 1 auto;
@@ -27,16 +27,16 @@ export function NotificationPanel({ title, settings, segments, chipToggle, readA
27
27
  const { tooltip: readAllTooltip, ...readAllButtonProps } = readAllButton ?? {};
28
28
  const buttonSize = isMobile ? 's' : 'm';
29
29
  // Figma: `slotAfterHeadline` (window) / `slotAfterTitle` (bottomSheet) — кнопки прижаты вправо.
30
- const actions = (readAllButton || settings) && (_jsxs("span", { className: styles.headerActions, children: [readAllButton && (_jsx(WithTooltip, { tooltip: readAllTooltip, children: _jsx(Button, { ...readAllButtonProps, icon: readAllButtonProps.icon || _jsx(DecorCheckedSVG, {}), view: 'function', appearance: 'neutral', size: buttonSize, disabled: readAllButtonProps.disabled || loading, "data-test-id": TEST_IDS.panel.readAll }) })), settings && _jsx(NotificationPanelSettings, { ...settings, size: buttonSize })] }));
30
+ const actions = (readAllButton || settings) && (_jsxs("span", { className: styles.headerActions, "data-mobile": isMobile || undefined, children: [readAllButton && (_jsx(WithTooltip, { tooltip: readAllTooltip, children: _jsx(Button, { ...readAllButtonProps, icon: readAllButtonProps.icon || _jsx(DecorCheckedSVG, {}), view: 'function', appearance: 'neutral', size: buttonSize, disabled: readAllButtonProps.disabled || loading, "data-test-id": TEST_IDS.panel.readAll }) })), settings && _jsx(NotificationPanelSettings, { ...settings, size: buttonSize })] }));
31
31
  // Figma: `slotSubHeadline` (window) / `slotSecondTitle` (bottomSheet). ChipToggle есть только в
32
32
  // desktop-мастере.
33
- const filters = (segments || (!isMobile && chipToggle)) && (_jsxs("div", { className: styles.filtersRow, "data-mobile": isMobile || undefined, children: [segments && (_jsx(SegmentControl, { ...segments, size: 's',
33
+ const filters = (segments || (!isMobile && chipToggle)) && (_jsxs("div", { className: styles.filtersRow, "data-mobile": isMobile || undefined, children: [segments && (_jsx(SegmentControl, { ...segments, size: buttonSize,
34
34
  // В мобильном мастере сегменты делят всю ширину sheet'а.
35
35
  width: isMobile ? 'full' : segments.width, items: segments.items.map(item => ({
36
36
  ...item,
37
37
  disabled: item.disabled || loading,
38
- })), "data-test-id": TEST_IDS.panel.segments })), !isMobile && chipToggle && (_jsx(ChipToggle, { size: 's', disabled: loading, label: chipToggle.label, onChange: chipToggle.onChange, checked: chipToggle.checked, "data-test-id": TEST_IDS.panel.chipToggle }))] }));
39
- return (_jsx(Drawer, { position: position, width: width, className: cn(styles.panel, className), showButtonClosed: false, title: _jsx("span", { "data-test-id": TEST_IDS.panel.title, children: title }), slotAfterTitle: actions, slotSecondTitle: filters, withDividers: isMobile,
38
+ })), "data-test-id": TEST_IDS.panel.segments })), !isMobile && chipToggle && (_jsx(ChipToggle, { size: buttonSize, disabled: loading, label: chipToggle.label, onChange: chipToggle.onChange, checked: chipToggle.checked, "data-test-id": TEST_IDS.panel.chipToggle }))] }));
39
+ return (_jsx(Drawer, { position: position, width: width, className: cn(styles.panel, className), showButtonClosed: true, title: _jsx("span", { "data-test-id": TEST_IDS.panel.title, children: title }), slotAfterTitle: actions, slotSecondTitle: filters, withDividers: isMobile,
40
40
  // Только mobile: в мастере bottomSheet панель открывается на всю высоту экрана.
41
41
  snapPoints: SNAP_POINTS_PRESET.full, contentRef: scrollContainerRef, content: _jsxs("div", { className: styles.body, "aria-busy": loading || undefined, children: [content, loading && (_jsx(SkeletonContextProvider, { loading: Boolean(loading), children: skeletons.map(skeleton => (_jsx(WithSkeleton, { skeleton: _jsx(NotificationCardSkeleton, {}) }, skeleton))) })), _jsx("div", { className: styles.scrollStub, ref: scrollEndRef })] }), ...rest }));
42
42
  }
@@ -9,6 +9,9 @@
9
9
  align-items:center;
10
10
  justify-content:flex-end;
11
11
  }
12
+ .headerActions:not([data-mobile]){
13
+ padding-right:var(--sn-primitive-dimension-16, 16px);
14
+ }
12
15
 
13
16
  .filtersRow{
14
17
  display:flex;
@@ -20,7 +23,7 @@
20
23
  padding-top:var(--sn-primitive-dimension-12, 12px);
21
24
  }
22
25
  .filtersRow[data-mobile]{
23
- padding-inline:var(--sn-primitive-dimension-12, 12px);
26
+ padding-inline:var(--sn-primitive-dimension-6, 6px);
24
27
  }
25
28
  .filtersRow[data-mobile] > *{
26
29
  flex:1 1 auto;
@@ -393,6 +393,9 @@
393
393
  align-items:center;
394
394
  justify-content:flex-end;
395
395
  }
396
+ .headerActions:not([data-mobile]){
397
+ padding-right:var(--sn-primitive-dimension-16, 16px);
398
+ }
396
399
 
397
400
  .filtersRow{
398
401
  display:flex;
@@ -404,7 +407,7 @@
404
407
  padding-top:var(--sn-primitive-dimension-12, 12px);
405
408
  }
406
409
  .filtersRow[data-mobile]{
407
- padding-inline:var(--sn-primitive-dimension-12, 12px);
410
+ padding-inline:var(--sn-primitive-dimension-6, 6px);
408
411
  }
409
412
  .filtersRow[data-mobile] > *{
410
413
  flex:1 1 auto;