@cloud-ru/ds-uikit-product-notification 2.1.18-preview-2df639a4.0 → 2.1.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.
Files changed (34) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/README.md +5 -5
  3. package/dist/cjs/components/NotificationCard/NotificationCard.js +2 -2
  4. package/dist/cjs/components/NotificationCard/NotificationCardSkeleton.js +2 -2
  5. package/dist/cjs/components/NotificationPanel/NotificationPanel.js +1 -1
  6. package/dist/cjs/components/NotificationPanel/components/NotificationCardStack/NotificationCardStack.js +2 -2
  7. package/dist/cjs/components/NotificationPanel/components/NotificationPanelGroup/NotificationPanelGroup.js +1 -1
  8. package/dist/cjs/components/NotificationPanel/components/NotificationPanelSettings/NotificationPanelSettings.js +1 -7
  9. package/dist/cjs/components/NotificationPanel/components/NotificationPanelSettings/NotificationPanelSettingsDroplist.js +1 -1
  10. package/dist/cjs/constants.d.ts +0 -11
  11. package/dist/cjs/constants.js +0 -11
  12. package/dist/cjs/helperComponents/ActionsButton/ActionsButton.js +1 -2
  13. package/dist/esm/components/NotificationCard/NotificationCard.js +2 -2
  14. package/dist/esm/components/NotificationCard/NotificationCardSkeleton.js +2 -2
  15. package/dist/esm/components/NotificationPanel/NotificationPanel.js +1 -1
  16. package/dist/esm/components/NotificationPanel/components/NotificationCardStack/NotificationCardStack.js +2 -2
  17. package/dist/esm/components/NotificationPanel/components/NotificationPanelGroup/NotificationPanelGroup.js +1 -1
  18. package/dist/esm/components/NotificationPanel/components/NotificationPanelSettings/NotificationPanelSettings.js +1 -7
  19. package/dist/esm/components/NotificationPanel/components/NotificationPanelSettings/NotificationPanelSettingsDroplist.js +1 -1
  20. package/dist/esm/constants.d.ts +0 -11
  21. package/dist/esm/constants.js +0 -11
  22. package/dist/esm/helperComponents/ActionsButton/ActionsButton.js +1 -2
  23. package/dist/tsconfig.cjs.tsbuildinfo +1 -1
  24. package/dist/tsconfig.esm.tsbuildinfo +1 -1
  25. package/package.json +19 -19
  26. package/src/components/NotificationCard/NotificationCard.tsx +3 -21
  27. package/src/components/NotificationCard/NotificationCardSkeleton.tsx +8 -40
  28. package/src/components/NotificationPanel/NotificationPanel.tsx +1 -8
  29. package/src/components/NotificationPanel/components/NotificationCardStack/NotificationCardStack.tsx +2 -3
  30. package/src/components/NotificationPanel/components/NotificationPanelGroup/NotificationPanelGroup.tsx +3 -14
  31. package/src/components/NotificationPanel/components/NotificationPanelSettings/NotificationPanelSettings.tsx +1 -9
  32. package/src/components/NotificationPanel/components/NotificationPanelSettings/NotificationPanelSettingsDroplist.tsx +1 -3
  33. package/src/constants.ts +0 -11
  34. package/src/helperComponents/ActionsButton/ActionsButton.tsx +1 -4
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
+ ## 2.1.19 (2026-11-25)
7
+
8
+ **Note:** Version bump only for package @ds/uikit-product-notification
9
+
10
+ ## 2.1.18 (2026-11-25)
11
+
12
+ **Note:** Version bump only for package @ds/uikit-product-notification
13
+
6
14
  ## 2.1.17 (2026-11-19)
7
15
 
8
16
  **Note:** Version bump only for package @ds/uikit-product-notification
package/README.md CHANGED
@@ -193,7 +193,7 @@ export function DeployFailureCard() {
193
193
  | `actions` | `Action` | — | Дополнительные действия у карточки |
194
194
  | `appearance` | `"default"` \| `"error"` \| `"success"` \| `"warning"` | `default` | Тип уведомления |
195
195
  | `className` | `string` | — | CSS-класс |
196
- | `data-test-id` | `string` | — | Идентификатор элемента для поиска в автоматизированных тестах. |
196
+ | `data-test-id` | `string` | — | |
197
197
  | `date` | `string` | — | Дата уведомления |
198
198
  | `description` | `ReactNode` | — | Описание уведомления — вторичный текст под заголовком |
199
199
  | `groupItemRender` | `((props: GroupItemRenderProps) => ReactNode)` | — | Рендер-функция заголовка группы вместо дефолтной разметки `Separator`. <br/> Не задана — заголовок/разделитель рисуются как раньше. |
@@ -697,7 +697,7 @@ export function PanelScenario() {
697
697
  | `closeOnPopstate` | `boolean` | — | Закрывать дровер при перемещении по истории браузера |
698
698
  | `container` | `string \| HTMLElement` | — | Контейнер в котором будет рендерится Drawer. По-умолчанию - body |
699
699
  | `content` | `ReactNode` | — | Контент для отрисовки (e.g NotificationCard \| NotificationPanel.Blank) |
700
- | `data-test-id` | `string` | — | Идентификатор элемента для поиска в автоматизированных тестах. |
700
+ | `data-test-id` | `string` | — | |
701
701
  | `loading` | `boolean` | — | Состояние загрузки |
702
702
  | `onClose` | `() => void` | — | Колбэк закрытия |
703
703
  | `open` | `boolean` | — | Управление состоянием показан/не показан. |
@@ -733,7 +733,7 @@ export function PanelScenario() {
733
733
  |------|------|---------|-------------|
734
734
  | `actions` | `Action` | — | Список действий в выпадающем меню |
735
735
  | `children` | `Iterable<ReactNode>` | — | Карточки в стопке, видна первая карточка, остальные схлопываются под нее. |
736
- | `data-test-id` | `string` | — | Идентификатор элемента для поиска в автоматизированных тестах. |
736
+ | `data-test-id` | `string` | — | |
737
737
  | `defaultOpen` | `boolean` | — | Состояние открыт/закрыт по умолчанию |
738
738
  | `groupItemRender` | `((props: GroupItemRenderProps) => ReactNode)` | — | Рендер-функция заголовка группы вместо дефолтной разметки `Separator`. <br/> Не задана — заголовок/разделитель рисуются как раньше. |
739
739
  | `itemRender` | `((props: ItemRenderProps) => ReactNode)` | — | Рендер-функция оболочки строки вместо дефолтной разметки `BaseItem`. <br/> Не задана — строка рисуется как раньше. `itemWrapRender` по-прежнему оборачивает результат. |
@@ -761,7 +761,7 @@ export function PanelScenario() {
761
761
  |------|------|---------|-------------|
762
762
  | `children` | `ReactNode` | — | Содержимое группы |
763
763
  | `className` | `string` | — | CSS-класс |
764
- | `data-test-id` | `string` | — | Идентификатор элемента для поиска в автоматизированных тестах. |
764
+ | `data-test-id` | `string` | — | |
765
765
  | `title` | `string` | — | Заголовок группы |
766
766
 
767
767
  #### NotificationPanel.Blank
@@ -772,6 +772,6 @@ export function PanelScenario() {
772
772
  |------|------|---------|-------------|
773
773
  | `className` | `string` | — | Дополнительный класс |
774
774
  | `content` | `ReactNode` | — | Подзаголовок |
775
- | `data-test-id` | `string` | — | Идентификатор элемента для поиска в автоматизированных тестах. |
775
+ | `data-test-id` | `string` | — | |
776
776
  | `icon` | `IconPredefinedProps` | — | Иконка |
777
777
  | `title` | `string` | — | Заголовок |
@@ -74,7 +74,7 @@ function NotificationCard({ id, appearance = constants_1.APPEARANCE.Default, lab
74
74
  cardRef.current?.click();
75
75
  }
76
76
  };
77
- return ((0, jsx_runtime_1.jsxs)("div", { role: 'button', tabIndex: 0, ref: cardRef, onKeyDown: handleKeyDown, onClick: onClick, ...(0, utils_1.extractSupportProps)(rest), "data-appearance": appearance, "data-unread": unread || undefined, "data-clickable": Boolean(onClick) || undefined, "data-droplist-open": isDroplistOpen || undefined, className: (0, classnames_1.default)(styles_module_scss_1.default.notificationCard, className), children: [(0, jsx_runtime_1.jsx)("span", { className: styles_module_scss_1.default.stateLayer, "data-state": 'emptyNeutralOnBackground', "aria-hidden": true }), unread && (0, jsx_runtime_1.jsx)("span", { className: styles_module_scss_1.default.visuallyHidden, children: "\u041D\u0435\u043F\u0440\u043E\u0447\u0438\u0442\u0430\u043D\u043D\u043E\u0435 \u0443\u0432\u0435\u0434\u043E\u043C\u043B\u0435\u043D\u0438\u0435" }), actions?.length ? ((0, jsx_runtime_1.jsx)(ActionsButton_1.ActionsButton, { className: styles_module_scss_1.default.notificationCardFunction, actions: actions, open: isDroplistOpen, setDroplistOpen: setDroplistOpen, icon: (0, jsx_runtime_1.jsx)(system_1.KebabSVG, {}), triggerAriaLabel: '\u0414\u0435\u0439\u0441\u0442\u0432\u0438\u044F \u0441 \u0443\u0432\u0435\u0434\u043E\u043C\u043B\u0435\u043D\u0438\u0435\u043C', testIds: constants_1.TEST_IDS.card.actions, itemRender: itemRender, groupItemRender: groupItemRender })) : null, label && ((0, jsx_runtime_1.jsx)(typography_1.Typography, { "data-test-id": constants_1.TEST_IDS.notificationCardNotificationCardLabel, variant: 'body', size: 's', as: 'div', className: styles_module_scss_1.default.notificationCardLabel, children: (0, jsx_runtime_1.jsx)(truncate_string_1.TruncateString, { maxLines: 1, text: label, "data-test-id": constants_1.TEST_IDS.card.label }) })), (0, jsx_runtime_1.jsxs)("div", { className: styles_module_scss_1.default.notificationCardTitle, children: [(0, jsx_runtime_1.jsx)("div", { className: styles_module_scss_1.default.notificationCardTitleIcon, role: 'img', "aria-label": (0, helpers_1.getAppearanceLabel)(appearance), children: icon }), (0, jsx_runtime_1.jsx)(typography_1.Typography, { "data-test-id": constants_1.TEST_IDS.notificationCardNotificationCardTitleText, variant: 'label', size: 'l', as: 'div', className: styles_module_scss_1.default.notificationCardTitleText, children: (0, jsx_runtime_1.jsx)(truncate_string_1.TruncateString, { maxLines: 2, text: title, "data-test-id": constants_1.TEST_IDS.card.title }) })] }), description != null && description !== '' && ((0, jsx_runtime_1.jsx)(typography_1.Typography, { variant: 'body', size: 's', as: 'div', className: styles_module_scss_1.default.notificationCardContent, "data-test-id": constants_1.TEST_IDS.card.description, children: description })), (primaryButton || secondaryButton) && (
77
+ return ((0, jsx_runtime_1.jsxs)("div", { role: 'button', tabIndex: 0, ref: cardRef, onKeyDown: handleKeyDown, onClick: onClick, ...(0, utils_1.extractSupportProps)(rest), "data-appearance": appearance, "data-unread": unread || undefined, "data-clickable": Boolean(onClick) || undefined, "data-droplist-open": isDroplistOpen || undefined, className: (0, classnames_1.default)(styles_module_scss_1.default.notificationCard, className), children: [(0, jsx_runtime_1.jsx)("span", { className: styles_module_scss_1.default.stateLayer, "data-state": 'emptyNeutralOnBackground', "aria-hidden": true }), unread && (0, jsx_runtime_1.jsx)("span", { className: styles_module_scss_1.default.visuallyHidden, children: "\u041D\u0435\u043F\u0440\u043E\u0447\u0438\u0442\u0430\u043D\u043D\u043E\u0435 \u0443\u0432\u0435\u0434\u043E\u043C\u043B\u0435\u043D\u0438\u0435" }), actions?.length ? ((0, jsx_runtime_1.jsx)(ActionsButton_1.ActionsButton, { className: styles_module_scss_1.default.notificationCardFunction, actions: actions, open: isDroplistOpen, setDroplistOpen: setDroplistOpen, icon: (0, jsx_runtime_1.jsx)(system_1.KebabSVG, {}), triggerAriaLabel: '\u0414\u0435\u0439\u0441\u0442\u0432\u0438\u044F \u0441 \u0443\u0432\u0435\u0434\u043E\u043C\u043B\u0435\u043D\u0438\u0435\u043C', testIds: constants_1.TEST_IDS.card.actions, itemRender: itemRender, groupItemRender: groupItemRender })) : null, label && ((0, jsx_runtime_1.jsx)(typography_1.Typography, { variant: 'body', size: 's', as: 'div', className: styles_module_scss_1.default.notificationCardLabel, children: (0, jsx_runtime_1.jsx)(truncate_string_1.TruncateString, { maxLines: 1, text: label, "data-test-id": constants_1.TEST_IDS.card.label }) })), (0, jsx_runtime_1.jsxs)("div", { className: styles_module_scss_1.default.notificationCardTitle, children: [(0, jsx_runtime_1.jsx)("div", { className: styles_module_scss_1.default.notificationCardTitleIcon, role: 'img', "aria-label": (0, helpers_1.getAppearanceLabel)(appearance), children: icon }), (0, jsx_runtime_1.jsx)(typography_1.Typography, { variant: 'label', size: 'l', as: 'div', className: styles_module_scss_1.default.notificationCardTitleText, children: (0, jsx_runtime_1.jsx)(truncate_string_1.TruncateString, { maxLines: 2, text: title, "data-test-id": constants_1.TEST_IDS.card.title }) })] }), description != null && description !== '' && ((0, jsx_runtime_1.jsx)(typography_1.Typography, { variant: 'body', size: 's', as: 'div', className: styles_module_scss_1.default.notificationCardContent, "data-test-id": constants_1.TEST_IDS.card.description, children: description })), (primaryButton || secondaryButton) && (
78
78
  // eslint-disable-next-line jsx-a11y/no-static-element-interactions
79
- (0, jsx_runtime_1.jsxs)("div", { className: styles_module_scss_1.default.notificationCardButtons, onClick: utils_2.stopPropagationClick, children: [secondaryButton && ((0, jsx_runtime_1.jsx)(button_1.Button, { ...secondaryButton, view: 'simple', appearance: 'neutral', size: 'm', "data-test-id": constants_1.TEST_IDS.card.secondaryButton })), primaryButton && ((0, jsx_runtime_1.jsx)(button_1.Button, { ...primaryButton, view: 'tonal', appearance: 'neutral', size: 'm', "data-test-id": constants_1.TEST_IDS.card.primaryButton }))] })), showFooter && ((0, jsx_runtime_1.jsxs)(typography_1.Typography, { "data-test-id": constants_1.TEST_IDS.notificationCardNotificationCardFooter, variant: 'body', size: 's', as: 'div', className: styles_module_scss_1.default.notificationCardFooter, children: [link && (0, jsx_runtime_1.jsx)(link_1.Link, { ...link, onClick: handleLinkClick, appearance: 'primary', "data-test-id": constants_1.TEST_IDS.card.link }), date && ((0, jsx_runtime_1.jsx)(typography_1.Typography, { variant: 'body', size: 's', as: 'span', className: styles_module_scss_1.default.notificationCardDate, "data-test-id": constants_1.TEST_IDS.card.date, children: date }))] })), unread && ((0, jsx_runtime_1.jsx)(status_1.StatusIndicator, { className: styles_module_scss_1.default.statusIndicator, size: '3xs', appearance: 'green', "data-test-id": constants_1.TEST_IDS.card.statusIndicator }))] }));
79
+ (0, jsx_runtime_1.jsxs)("div", { className: styles_module_scss_1.default.notificationCardButtons, onClick: utils_2.stopPropagationClick, children: [secondaryButton && ((0, jsx_runtime_1.jsx)(button_1.Button, { ...secondaryButton, view: 'simple', appearance: 'neutral', size: 'm', "data-test-id": constants_1.TEST_IDS.card.secondaryButton })), primaryButton && ((0, jsx_runtime_1.jsx)(button_1.Button, { ...primaryButton, view: 'tonal', appearance: 'neutral', size: 'm', "data-test-id": constants_1.TEST_IDS.card.primaryButton }))] })), showFooter && ((0, jsx_runtime_1.jsxs)(typography_1.Typography, { variant: 'body', size: 's', as: 'div', className: styles_module_scss_1.default.notificationCardFooter, children: [link && (0, jsx_runtime_1.jsx)(link_1.Link, { ...link, onClick: handleLinkClick, appearance: 'primary', "data-test-id": constants_1.TEST_IDS.card.link }), date && ((0, jsx_runtime_1.jsx)(typography_1.Typography, { variant: 'body', size: 's', as: 'span', className: styles_module_scss_1.default.notificationCardDate, "data-test-id": constants_1.TEST_IDS.card.date, children: date }))] })), unread && ((0, jsx_runtime_1.jsx)(status_1.StatusIndicator, { className: styles_module_scss_1.default.statusIndicator, size: '3xs', appearance: 'green', "data-test-id": constants_1.TEST_IDS.card.statusIndicator }))] }));
80
80
  }
@@ -11,6 +11,6 @@ const classnames_1 = __importDefault(require("classnames"));
11
11
  const constants_1 = require("../../constants");
12
12
  const styles_module_scss_1 = __importDefault(require('./styles.module.css'));
13
13
  /** Скелетон карточки уведомления для состояния загрузки */
14
- function NotificationCardSkeleton({ className, ...rest } = { 'data-test-id': constants_1.TEST_IDS.card.skeleton }) {
15
- return ((0, jsx_runtime_1.jsxs)("div", { className: (0, classnames_1.default)(styles_module_scss_1.default.notificationCard, className), ...(0, utils_1.extractSupportProps)(rest), "data-test-id": rest['data-test-id'] ?? constants_1.TEST_IDS.card.skeleton, children: [(0, jsx_runtime_1.jsx)(skeleton_1.SkeletonText, { "data-test-id": constants_1.TEST_IDS.notificationCardSkeletonSkeletonText, width: 140, variant: 'body', size: 's', lines: 1 }), (0, jsx_runtime_1.jsxs)("div", { className: styles_module_scss_1.default.notificationCardTitle, children: [(0, jsx_runtime_1.jsx)("div", { className: styles_module_scss_1.default.notificationCardTitleIcon, children: (0, jsx_runtime_1.jsx)(skeleton_1.SkeletonText, { "data-test-id": constants_1.TEST_IDS.notificationCardSkeletonSkeletonText, width: 16, variant: 'label', size: 'l', lines: 1 }) }), (0, jsx_runtime_1.jsx)(skeleton_1.SkeletonText, { "data-test-id": constants_1.TEST_IDS.notificationCardSkeletonSkeletonText, width: 140, variant: 'label', size: 'l', lines: 1 })] }), (0, jsx_runtime_1.jsx)("div", { className: styles_module_scss_1.default.notificationCardContent, children: (0, jsx_runtime_1.jsx)(skeleton_1.SkeletonText, { "data-test-id": constants_1.TEST_IDS.notificationCardSkeletonSkeletonText, lines: 3, variant: 'body', size: 's' }) }), (0, jsx_runtime_1.jsxs)("div", { className: styles_module_scss_1.default.notificationCardFooter, children: [(0, jsx_runtime_1.jsx)(skeleton_1.SkeletonText, { "data-test-id": constants_1.TEST_IDS.notificationCardSkeletonSkeletonText, width: 140, variant: 'body', size: 's', lines: 1 }), (0, jsx_runtime_1.jsx)(skeleton_1.SkeletonText, { "data-test-id": constants_1.TEST_IDS.notificationCardSkeletonSkeletonText, width: 140, variant: 'body', size: 's', lines: 1 })] })] }));
14
+ function NotificationCardSkeleton({ className, ...rest } = {}) {
15
+ return ((0, jsx_runtime_1.jsxs)("div", { className: (0, classnames_1.default)(styles_module_scss_1.default.notificationCard, className), "data-test-id": constants_1.TEST_IDS.card.skeleton, ...(0, utils_1.extractSupportProps)(rest), children: [(0, jsx_runtime_1.jsx)(skeleton_1.SkeletonText, { width: 140, variant: 'body', size: 's', lines: 1 }), (0, jsx_runtime_1.jsxs)("div", { className: styles_module_scss_1.default.notificationCardTitle, children: [(0, jsx_runtime_1.jsx)("div", { className: styles_module_scss_1.default.notificationCardTitleIcon, children: (0, jsx_runtime_1.jsx)(skeleton_1.SkeletonText, { width: 16, variant: 'label', size: 'l', lines: 1 }) }), (0, jsx_runtime_1.jsx)(skeleton_1.SkeletonText, { width: 140, variant: 'label', size: 'l', lines: 1 })] }), (0, jsx_runtime_1.jsx)("div", { className: styles_module_scss_1.default.notificationCardContent, children: (0, jsx_runtime_1.jsx)(skeleton_1.SkeletonText, { lines: 3, variant: 'body', size: 's' }) }), (0, jsx_runtime_1.jsxs)("div", { className: styles_module_scss_1.default.notificationCardFooter, children: [(0, jsx_runtime_1.jsx)(skeleton_1.SkeletonText, { width: 140, variant: 'body', size: 's', lines: 1 }), (0, jsx_runtime_1.jsx)(skeleton_1.SkeletonText, { width: 140, variant: 'body', size: 's', lines: 1 })] })] }));
16
16
  }
@@ -41,7 +41,7 @@ function NotificationPanel({ title, settings, segments, chipToggle, readAllButto
41
41
  width: isMobile ? 'full' : segments.width, "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 }))] }));
42
42
  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,
43
43
  // Только mobile: в мастере bottomSheet панель открывается на всю высоту экрана.
44
- 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, { "data-test-id": `${constants_1.TEST_IDS.notificationPanelNotificationCardSkeleton}-${skeleton}` }) }, skeleton))) })), (0, jsx_runtime_1.jsx)("div", { className: styles_module_scss_1.default.scrollStub, ref: scrollEndRef })] }), ...rest }));
44
+ 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 }));
45
45
  }
46
46
  (function (NotificationPanel) {
47
47
  NotificationPanel.Blank = components_1.NotificationPanelBlank;
@@ -30,7 +30,7 @@ function NotificationCardStack({ children, defaultOpen, onOpenChanged, title, ac
30
30
  return null;
31
31
  }
32
32
  if (!stack.length) {
33
- return ((0, jsx_runtime_1.jsx)("div", { ...(0, utils_1.extractSupportProps)(rest), "data-test-id": rest['data-test-id'] ?? constants_1.TEST_IDS.panel.cardStack.wrapper, children: first }));
33
+ return ((0, jsx_runtime_1.jsx)("div", { "data-test-id": constants_1.TEST_IDS.panel.cardStack.wrapper, ...(0, utils_1.extractSupportProps)(rest), children: first }));
34
34
  }
35
35
  const firstCardElement = open
36
36
  ? first
@@ -39,5 +39,5 @@ function NotificationCardStack({ children, defaultOpen, onOpenChanged, title, ac
39
39
  onClick: toggleOpen,
40
40
  unread: unread || componentProps.unread,
41
41
  }));
42
- return ((0, jsx_runtime_1.jsxs)("div", { className: styles_module_scss_1.default.container, style: { '--snack-notification-stack-animation-duration': `${ANIMATION_DURATION}s` }, ...(0, utils_1.extractSupportProps)(rest), "data-test-id": rest['data-test-id'] ?? constants_1.TEST_IDS.panel.cardStack.wrapper, children: [(0, jsx_runtime_1.jsxs)("div", { className: styles_module_scss_1.default.header, "data-test-id": constants_1.TEST_IDS.panel.cardStack.headline, children: [(0, jsx_runtime_1.jsx)(typography_1.Typography, { "data-test-id": constants_1.TEST_IDS.notificationCardStackTitle, variant: 'label', size: 'l', as: 'div', className: styles_module_scss_1.default.title, onClick: toggleOpen, "aria-expanded": open, children: (0, jsx_runtime_1.jsx)(truncate_string_1.TruncateString, { "data-test-id": constants_1.TEST_IDS.panel.cardStack.title, text: title }) }), (0, jsx_runtime_1.jsxs)("div", { className: styles_module_scss_1.default.right, children: [actions && actions.length > 0 && ((0, jsx_runtime_1.jsx)(ActionsButton_1.ActionsButton, { actions: actions, open: actionsOpen, setDroplistOpen: setActionsOpen, icon: (0, jsx_runtime_1.jsx)(system_1.KebabSVG, {}), triggerAriaLabel: '\u0414\u0435\u0439\u0441\u0442\u0432\u0438\u044F \u0441\u043E \u0441\u0442\u043E\u043F\u043A\u043E\u0439', testIds: constants_1.TEST_IDS.panel.cardStack.actions, itemRender: itemRender, groupItemRender: groupItemRender })), (0, jsx_runtime_1.jsx)(button_1.Button, { view: 'function', appearance: 'neutral', size: 'm', onClick: toggleOpen, "aria-label": open ? 'Свернуть стопку' : 'Развернуть стопку', "aria-expanded": open, "data-test-id": constants_1.TEST_IDS.panel.cardStack.openButton, icon: open ? (0, jsx_runtime_1.jsx)(system_1.ChevronUpSVG, {}) : (0, jsx_runtime_1.jsx)(system_1.ChevronDownSVG, {}) })] })] }), (0, jsx_runtime_1.jsxs)("div", { className: styles_module_scss_1.default.cards, children: [(0, jsx_runtime_1.jsxs)("div", { className: styles_module_scss_1.default.first, children: [(0, jsx_runtime_1.jsx)(StackTail_1.StackTail, { open: open, count: stack.length }), firstCardElement] }), (0, jsx_runtime_1.jsx)("div", { className: styles_module_scss_1.default.stack, "data-open": open || undefined, "data-tail-size": stack.length, children: (0, jsx_runtime_1.jsx)("div", { className: styles_module_scss_1.default.animationContainer, children: isVisible ? stack : [] }) })] })] }));
42
+ return ((0, jsx_runtime_1.jsxs)("div", { className: styles_module_scss_1.default.container, style: { '--snack-notification-stack-animation-duration': `${ANIMATION_DURATION}s` }, "data-test-id": constants_1.TEST_IDS.panel.cardStack.wrapper, ...(0, utils_1.extractSupportProps)(rest), children: [(0, jsx_runtime_1.jsxs)("div", { className: styles_module_scss_1.default.header, "data-test-id": constants_1.TEST_IDS.panel.cardStack.headline, children: [(0, jsx_runtime_1.jsx)(typography_1.Typography, { variant: 'label', size: 'l', as: 'div', className: styles_module_scss_1.default.title, onClick: toggleOpen, "aria-expanded": open, children: (0, jsx_runtime_1.jsx)(truncate_string_1.TruncateString, { "data-test-id": constants_1.TEST_IDS.panel.cardStack.title, text: title }) }), (0, jsx_runtime_1.jsxs)("div", { className: styles_module_scss_1.default.right, children: [actions && actions.length > 0 && ((0, jsx_runtime_1.jsx)(ActionsButton_1.ActionsButton, { actions: actions, open: actionsOpen, setDroplistOpen: setActionsOpen, icon: (0, jsx_runtime_1.jsx)(system_1.KebabSVG, {}), triggerAriaLabel: '\u0414\u0435\u0439\u0441\u0442\u0432\u0438\u044F \u0441\u043E \u0441\u0442\u043E\u043F\u043A\u043E\u0439', testIds: constants_1.TEST_IDS.panel.cardStack.actions, itemRender: itemRender, groupItemRender: groupItemRender })), (0, jsx_runtime_1.jsx)(button_1.Button, { view: 'function', appearance: 'neutral', size: 'm', onClick: toggleOpen, "aria-label": open ? 'Свернуть стопку' : 'Развернуть стопку', "aria-expanded": open, "data-test-id": constants_1.TEST_IDS.panel.cardStack.openButton, icon: open ? (0, jsx_runtime_1.jsx)(system_1.ChevronUpSVG, {}) : (0, jsx_runtime_1.jsx)(system_1.ChevronDownSVG, {}) })] })] }), (0, jsx_runtime_1.jsxs)("div", { className: styles_module_scss_1.default.cards, children: [(0, jsx_runtime_1.jsxs)("div", { className: styles_module_scss_1.default.first, children: [(0, jsx_runtime_1.jsx)(StackTail_1.StackTail, { open: open, count: stack.length }), firstCardElement] }), (0, jsx_runtime_1.jsx)("div", { className: styles_module_scss_1.default.stack, "data-open": open || undefined, "data-tail-size": stack.length, children: (0, jsx_runtime_1.jsx)("div", { className: styles_module_scss_1.default.animationContainer, children: isVisible ? stack : [] }) })] })] }));
43
43
  }
@@ -13,5 +13,5 @@ const constants_1 = require("../../../../constants");
13
13
  const styles_module_scss_1 = __importDefault(require('./styles.module.css'));
14
14
  /** Группа уведомлений с заголовком внутри панели */
15
15
  function NotificationPanelGroup({ title, children, className, ...rest }) {
16
- return ((0, jsx_runtime_1.jsxs)("div", { className: (0, classnames_1.default)(styles_module_scss_1.default.root, className), ...(0, utils_1.extractSupportProps)(rest), "data-test-id": rest['data-test-id'] ?? constants_1.TEST_IDS.panel.group.root, children: [(0, jsx_runtime_1.jsx)("div", { className: styles_module_scss_1.default.title, "data-test-id": constants_1.TEST_IDS.panel.group.title, children: (0, jsx_runtime_1.jsx)(typography_1.Typography, { "data-test-id": constants_1.TEST_IDS.notificationPanelGroupText, variant: 'label', size: 's', weight: 'thin', as: 'span', className: styles_module_scss_1.default.text, children: (0, jsx_runtime_1.jsx)(truncate_string_1.TruncateString, { "data-test-id": constants_1.TEST_IDS.notificationPanelGroupTitle, text: title }) }) }), (0, jsx_runtime_1.jsx)("div", { className: styles_module_scss_1.default.content, children: children })] }));
16
+ return ((0, jsx_runtime_1.jsxs)("div", { className: (0, classnames_1.default)(styles_module_scss_1.default.root, className), "data-test-id": constants_1.TEST_IDS.panel.group.root, ...(0, utils_1.extractSupportProps)(rest), children: [(0, jsx_runtime_1.jsx)("div", { className: styles_module_scss_1.default.title, "data-test-id": constants_1.TEST_IDS.panel.group.title, children: (0, jsx_runtime_1.jsx)(typography_1.Typography, { variant: 'label', size: 's', weight: 'thin', as: 'span', className: styles_module_scss_1.default.text, children: (0, jsx_runtime_1.jsx)(truncate_string_1.TruncateString, { text: title }) }) }), (0, jsx_runtime_1.jsx)("div", { className: styles_module_scss_1.default.content, children: children })] }));
17
17
  }
@@ -19,13 +19,7 @@ function NotificationPanelSettings({ actions, button, size = 'm', itemRender, gr
19
19
  'data-test-id': constants_1.TEST_IDS.panel.settings.droplistTrigger,
20
20
  };
21
21
  if (!actions?.length) {
22
- return ((0, jsx_runtime_1.jsx)(tooltip_1.WithTooltip, { tooltip: buttonProps.tooltip
23
- ? {
24
- 'data-test-id': constants_1.TEST_IDS.notificationPanelSettingsTooltip,
25
- hoverDelayOpen: constants_1.TOOLTIP_HOVER_DELAY_OPEN,
26
- ...buttonProps.tooltip,
27
- }
28
- : undefined, children: (0, jsx_runtime_1.jsx)(button_1.Button, { ...buttonProps }) }));
22
+ return ((0, jsx_runtime_1.jsx)(tooltip_1.WithTooltip, { tooltip: buttonProps.tooltip ? { hoverDelayOpen: constants_1.TOOLTIP_HOVER_DELAY_OPEN, ...buttonProps.tooltip } : undefined, children: (0, jsx_runtime_1.jsx)(button_1.Button, { ...buttonProps }) }));
29
23
  }
30
24
  return ((0, jsx_runtime_1.jsx)(NotificationPanelSettingsDroplist_1.NotificationPanelSettingsDroplist, { actions: actions, button: buttonProps, itemRender: itemRender, groupItemRender: groupItemRender }));
31
25
  }
@@ -21,7 +21,7 @@ function NotificationPanelSettingsDroplist({ actions, button, itemRender, groupI
21
21
  disabled,
22
22
  content,
23
23
  beforeContent: icon,
24
- afterContent: tagLabel ? ((0, jsx_runtime_1.jsx)(tag_1.Tag, { "data-test-id": `${constants_1.TEST_IDS.notificationPanelSettingsDroplistTag}-${index}`, label: tagLabel })) : undefined,
24
+ afterContent: tagLabel ? (0, jsx_runtime_1.jsx)(tag_1.Tag, { label: tagLabel }) : undefined,
25
25
  'data-test-id': `${constants_1.TEST_IDS.panel.settings.droplistAction}-${index}`,
26
26
  })), itemRender: itemRender, groupItemRender: groupItemRender, children: (0, jsx_runtime_1.jsx)(button_1.Button, { ...button }) }));
27
27
  }
@@ -5,17 +5,6 @@ export declare const APPEARANCE: {
5
5
  readonly Success: "success";
6
6
  };
7
7
  export declare const TEST_IDS: {
8
- readonly notificationPanelSettingsTooltip: "notification-panel-settings__tooltip";
9
- readonly notificationPanelGroupTitle: "notification-panel-group__title";
10
- readonly notificationCardNotificationCardLabel: "notification-card__notification-card-label";
11
- readonly notificationCardNotificationCardTitleText: "notification-card__notification-card-title-text";
12
- readonly notificationCardNotificationCardFooter: "notification-card__notification-card-footer";
13
- readonly notificationCardSkeletonSkeletonText: "notification-card-skeleton__skeleton-text";
14
- readonly notificationCardStackTitle: "notification-card-stack__title";
15
- readonly notificationPanelGroupText: "notification-panel-group__text";
16
- readonly notificationPanelSettingsDroplistTag: "notification-panel-settings-droplist__tag";
17
- readonly notificationPanelNotificationCardSkeleton: "notification-panel__notification-card-skeleton";
18
- readonly actionsButtonTag: "actions-button__tag";
19
8
  readonly card: {
20
9
  readonly root: "notification-card";
21
10
  readonly label: "notification-card__label";
@@ -8,17 +8,6 @@ exports.APPEARANCE = {
8
8
  Success: 'success',
9
9
  };
10
10
  exports.TEST_IDS = {
11
- notificationPanelSettingsTooltip: 'notification-panel-settings__tooltip',
12
- notificationPanelGroupTitle: 'notification-panel-group__title',
13
- notificationCardNotificationCardLabel: 'notification-card__notification-card-label',
14
- notificationCardNotificationCardTitleText: 'notification-card__notification-card-title-text',
15
- notificationCardNotificationCardFooter: 'notification-card__notification-card-footer',
16
- notificationCardSkeletonSkeletonText: 'notification-card-skeleton__skeleton-text',
17
- notificationCardStackTitle: 'notification-card-stack__title',
18
- notificationPanelGroupText: 'notification-panel-group__text',
19
- notificationPanelSettingsDroplistTag: 'notification-panel-settings-droplist__tag',
20
- notificationPanelNotificationCardSkeleton: 'notification-panel__notification-card-skeleton',
21
- actionsButtonTag: 'actions-button__tag',
22
11
  card: {
23
12
  root: 'notification-card',
24
13
  label: 'notification-card__label',
@@ -9,7 +9,6 @@ const button_1 = require("@cloud-ru/ds-button");
9
9
  const list_1 = require("@cloud-ru/ds-list");
10
10
  const tag_1 = require("@cloud-ru/ds-tag");
11
11
  const classnames_1 = __importDefault(require("classnames"));
12
- const constants_1 = require("../../constants");
13
12
  const utils_1 = require("../../utils");
14
13
  const styles_module_scss_1 = __importDefault(require('./styles.module.css'));
15
14
  function ActionsButton({ actions, open, setDroplistOpen, icon, triggerAriaLabel, testIds, className, itemRender, groupItemRender, }) {
@@ -23,7 +22,7 @@ function ActionsButton({ actions, open, setDroplistOpen, icon, triggerAriaLabel,
23
22
  disabled,
24
23
  content,
25
24
  beforeContent: itemIcon,
26
- afterContent: tagLabel ? ((0, jsx_runtime_1.jsx)(tag_1.Tag, { "data-test-id": `${constants_1.TEST_IDS.actionsButtonTag}-${index}`, label: tagLabel })) : undefined,
25
+ afterContent: tagLabel ? (0, jsx_runtime_1.jsx)(tag_1.Tag, { label: tagLabel }) : undefined,
27
26
  'data-test-id': `${testIds.droplistAction}-${index}`,
28
27
  })), triggerClassName: styles_module_scss_1.default.inlineFlex, itemRender: itemRender, groupItemRender: groupItemRender, children: (0, jsx_runtime_1.jsx)(button_1.Button, { view: 'function', appearance: 'neutral', size: 'm', icon: icon, "aria-label": triggerAriaLabel, "data-test-id": testIds.droplistTrigger }) }) }));
29
28
  }
@@ -68,7 +68,7 @@ export function NotificationCard({ id, appearance = APPEARANCE.Default, label, u
68
68
  cardRef.current?.click();
69
69
  }
70
70
  };
71
- return (_jsxs("div", { role: 'button', tabIndex: 0, ref: cardRef, onKeyDown: handleKeyDown, onClick: onClick, ...extractSupportProps(rest), "data-appearance": appearance, "data-unread": unread || undefined, "data-clickable": Boolean(onClick) || undefined, "data-droplist-open": isDroplistOpen || undefined, className: cn(styles.notificationCard, className), children: [_jsx("span", { className: styles.stateLayer, "data-state": 'emptyNeutralOnBackground', "aria-hidden": true }), unread && _jsx("span", { className: styles.visuallyHidden, children: "\u041D\u0435\u043F\u0440\u043E\u0447\u0438\u0442\u0430\u043D\u043D\u043E\u0435 \u0443\u0432\u0435\u0434\u043E\u043C\u043B\u0435\u043D\u0438\u0435" }), actions?.length ? (_jsx(ActionsButton, { className: styles.notificationCardFunction, actions: actions, open: isDroplistOpen, setDroplistOpen: setDroplistOpen, icon: _jsx(KebabSVG, {}), triggerAriaLabel: '\u0414\u0435\u0439\u0441\u0442\u0432\u0438\u044F \u0441 \u0443\u0432\u0435\u0434\u043E\u043C\u043B\u0435\u043D\u0438\u0435\u043C', testIds: TEST_IDS.card.actions, itemRender: itemRender, groupItemRender: groupItemRender })) : null, label && (_jsx(Typography, { "data-test-id": TEST_IDS.notificationCardNotificationCardLabel, variant: 'body', size: 's', as: 'div', className: styles.notificationCardLabel, children: _jsx(TruncateString, { maxLines: 1, text: label, "data-test-id": TEST_IDS.card.label }) })), _jsxs("div", { className: styles.notificationCardTitle, children: [_jsx("div", { className: styles.notificationCardTitleIcon, role: 'img', "aria-label": getAppearanceLabel(appearance), children: icon }), _jsx(Typography, { "data-test-id": TEST_IDS.notificationCardNotificationCardTitleText, variant: 'label', size: 'l', as: 'div', className: styles.notificationCardTitleText, children: _jsx(TruncateString, { maxLines: 2, text: title, "data-test-id": TEST_IDS.card.title }) })] }), description != null && description !== '' && (_jsx(Typography, { variant: 'body', size: 's', as: 'div', className: styles.notificationCardContent, "data-test-id": TEST_IDS.card.description, children: description })), (primaryButton || secondaryButton) && (
71
+ return (_jsxs("div", { role: 'button', tabIndex: 0, ref: cardRef, onKeyDown: handleKeyDown, onClick: onClick, ...extractSupportProps(rest), "data-appearance": appearance, "data-unread": unread || undefined, "data-clickable": Boolean(onClick) || undefined, "data-droplist-open": isDroplistOpen || undefined, className: cn(styles.notificationCard, className), children: [_jsx("span", { className: styles.stateLayer, "data-state": 'emptyNeutralOnBackground', "aria-hidden": true }), unread && _jsx("span", { className: styles.visuallyHidden, children: "\u041D\u0435\u043F\u0440\u043E\u0447\u0438\u0442\u0430\u043D\u043D\u043E\u0435 \u0443\u0432\u0435\u0434\u043E\u043C\u043B\u0435\u043D\u0438\u0435" }), actions?.length ? (_jsx(ActionsButton, { className: styles.notificationCardFunction, actions: actions, open: isDroplistOpen, setDroplistOpen: setDroplistOpen, icon: _jsx(KebabSVG, {}), triggerAriaLabel: '\u0414\u0435\u0439\u0441\u0442\u0432\u0438\u044F \u0441 \u0443\u0432\u0435\u0434\u043E\u043C\u043B\u0435\u043D\u0438\u0435\u043C', testIds: TEST_IDS.card.actions, itemRender: itemRender, groupItemRender: groupItemRender })) : null, label && (_jsx(Typography, { variant: 'body', size: 's', as: 'div', className: styles.notificationCardLabel, children: _jsx(TruncateString, { maxLines: 1, text: label, "data-test-id": TEST_IDS.card.label }) })), _jsxs("div", { className: styles.notificationCardTitle, children: [_jsx("div", { className: styles.notificationCardTitleIcon, role: 'img', "aria-label": getAppearanceLabel(appearance), children: icon }), _jsx(Typography, { variant: 'label', size: 'l', as: 'div', className: styles.notificationCardTitleText, children: _jsx(TruncateString, { maxLines: 2, text: title, "data-test-id": TEST_IDS.card.title }) })] }), description != null && description !== '' && (_jsx(Typography, { variant: 'body', size: 's', as: 'div', className: styles.notificationCardContent, "data-test-id": TEST_IDS.card.description, children: description })), (primaryButton || secondaryButton) && (
72
72
  // eslint-disable-next-line jsx-a11y/no-static-element-interactions
73
- _jsxs("div", { className: styles.notificationCardButtons, onClick: stopPropagationClick, children: [secondaryButton && (_jsx(Button, { ...secondaryButton, view: 'simple', appearance: 'neutral', size: 'm', "data-test-id": TEST_IDS.card.secondaryButton })), primaryButton && (_jsx(Button, { ...primaryButton, view: 'tonal', appearance: 'neutral', size: 'm', "data-test-id": TEST_IDS.card.primaryButton }))] })), showFooter && (_jsxs(Typography, { "data-test-id": TEST_IDS.notificationCardNotificationCardFooter, variant: 'body', size: 's', as: 'div', className: styles.notificationCardFooter, children: [link && _jsx(Link, { ...link, onClick: handleLinkClick, appearance: 'primary', "data-test-id": TEST_IDS.card.link }), date && (_jsx(Typography, { variant: 'body', size: 's', as: 'span', className: styles.notificationCardDate, "data-test-id": TEST_IDS.card.date, children: date }))] })), unread && (_jsx(StatusIndicator, { className: styles.statusIndicator, size: '3xs', appearance: 'green', "data-test-id": TEST_IDS.card.statusIndicator }))] }));
73
+ _jsxs("div", { className: styles.notificationCardButtons, onClick: stopPropagationClick, children: [secondaryButton && (_jsx(Button, { ...secondaryButton, view: 'simple', appearance: 'neutral', size: 'm', "data-test-id": TEST_IDS.card.secondaryButton })), primaryButton && (_jsx(Button, { ...primaryButton, view: 'tonal', appearance: 'neutral', size: 'm', "data-test-id": TEST_IDS.card.primaryButton }))] })), showFooter && (_jsxs(Typography, { variant: 'body', size: 's', as: 'div', className: styles.notificationCardFooter, children: [link && _jsx(Link, { ...link, onClick: handleLinkClick, appearance: 'primary', "data-test-id": TEST_IDS.card.link }), date && (_jsx(Typography, { variant: 'body', size: 's', as: 'span', className: styles.notificationCardDate, "data-test-id": TEST_IDS.card.date, children: date }))] })), unread && (_jsx(StatusIndicator, { className: styles.statusIndicator, size: '3xs', appearance: 'green', "data-test-id": TEST_IDS.card.statusIndicator }))] }));
74
74
  }
@@ -5,6 +5,6 @@ import cn from 'classnames';
5
5
  import { TEST_IDS } from '../../constants.js';
6
6
  import styles from './styles.module.css';
7
7
  /** Скелетон карточки уведомления для состояния загрузки */
8
- export function NotificationCardSkeleton({ className, ...rest } = { 'data-test-id': TEST_IDS.card.skeleton }) {
9
- return (_jsxs("div", { className: cn(styles.notificationCard, className), ...extractSupportProps(rest), "data-test-id": rest['data-test-id'] ?? TEST_IDS.card.skeleton, children: [_jsx(SkeletonText, { "data-test-id": TEST_IDS.notificationCardSkeletonSkeletonText, width: 140, variant: 'body', size: 's', lines: 1 }), _jsxs("div", { className: styles.notificationCardTitle, children: [_jsx("div", { className: styles.notificationCardTitleIcon, children: _jsx(SkeletonText, { "data-test-id": TEST_IDS.notificationCardSkeletonSkeletonText, width: 16, variant: 'label', size: 'l', lines: 1 }) }), _jsx(SkeletonText, { "data-test-id": TEST_IDS.notificationCardSkeletonSkeletonText, width: 140, variant: 'label', size: 'l', lines: 1 })] }), _jsx("div", { className: styles.notificationCardContent, children: _jsx(SkeletonText, { "data-test-id": TEST_IDS.notificationCardSkeletonSkeletonText, lines: 3, variant: 'body', size: 's' }) }), _jsxs("div", { className: styles.notificationCardFooter, children: [_jsx(SkeletonText, { "data-test-id": TEST_IDS.notificationCardSkeletonSkeletonText, width: 140, variant: 'body', size: 's', lines: 1 }), _jsx(SkeletonText, { "data-test-id": TEST_IDS.notificationCardSkeletonSkeletonText, width: 140, variant: 'body', size: 's', lines: 1 })] })] }));
8
+ export function NotificationCardSkeleton({ className, ...rest } = {}) {
9
+ return (_jsxs("div", { className: cn(styles.notificationCard, className), "data-test-id": TEST_IDS.card.skeleton, ...extractSupportProps(rest), children: [_jsx(SkeletonText, { width: 140, variant: 'body', size: 's', lines: 1 }), _jsxs("div", { className: styles.notificationCardTitle, children: [_jsx("div", { className: styles.notificationCardTitleIcon, children: _jsx(SkeletonText, { width: 16, variant: 'label', size: 'l', lines: 1 }) }), _jsx(SkeletonText, { width: 140, variant: 'label', size: 'l', lines: 1 })] }), _jsx("div", { className: styles.notificationCardContent, children: _jsx(SkeletonText, { lines: 3, variant: 'body', size: 's' }) }), _jsxs("div", { className: styles.notificationCardFooter, children: [_jsx(SkeletonText, { width: 140, variant: 'body', size: 's', lines: 1 }), _jsx(SkeletonText, { width: 140, variant: 'body', size: 's', lines: 1 })] })] }));
10
10
  }
@@ -35,7 +35,7 @@ export function NotificationPanel({ title, settings, segments, chipToggle, readA
35
35
  width: isMobile ? 'full' : segments.width, "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 }))] }));
36
36
  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,
37
37
  // Только mobile: в мастере bottomSheet панель открывается на всю высоту экрана.
38
- 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, { "data-test-id": `${TEST_IDS.notificationPanelNotificationCardSkeleton}-${skeleton}` }) }, skeleton))) })), _jsx("div", { className: styles.scrollStub, ref: scrollEndRef })] }), ...rest }));
38
+ 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 }));
39
39
  }
40
40
  (function (NotificationPanel) {
41
41
  NotificationPanel.Blank = NotificationPanelBlank;
@@ -24,7 +24,7 @@ export function NotificationCardStack({ children, defaultOpen, onOpenChanged, ti
24
24
  return null;
25
25
  }
26
26
  if (!stack.length) {
27
- return (_jsx("div", { ...extractSupportProps(rest), "data-test-id": rest['data-test-id'] ?? TEST_IDS.panel.cardStack.wrapper, children: first }));
27
+ return (_jsx("div", { "data-test-id": TEST_IDS.panel.cardStack.wrapper, ...extractSupportProps(rest), children: first }));
28
28
  }
29
29
  const firstCardElement = open
30
30
  ? first
@@ -33,5 +33,5 @@ export function NotificationCardStack({ children, defaultOpen, onOpenChanged, ti
33
33
  onClick: toggleOpen,
34
34
  unread: unread || componentProps.unread,
35
35
  }));
36
- return (_jsxs("div", { className: styles.container, style: { '--snack-notification-stack-animation-duration': `${ANIMATION_DURATION}s` }, ...extractSupportProps(rest), "data-test-id": rest['data-test-id'] ?? TEST_IDS.panel.cardStack.wrapper, children: [_jsxs("div", { className: styles.header, "data-test-id": TEST_IDS.panel.cardStack.headline, children: [_jsx(Typography, { "data-test-id": TEST_IDS.notificationCardStackTitle, variant: 'label', size: 'l', as: 'div', className: styles.title, onClick: toggleOpen, "aria-expanded": open, children: _jsx(TruncateString, { "data-test-id": TEST_IDS.panel.cardStack.title, text: title }) }), _jsxs("div", { className: styles.right, children: [actions && actions.length > 0 && (_jsx(ActionsButton, { actions: actions, open: actionsOpen, setDroplistOpen: setActionsOpen, icon: _jsx(KebabSVG, {}), triggerAriaLabel: '\u0414\u0435\u0439\u0441\u0442\u0432\u0438\u044F \u0441\u043E \u0441\u0442\u043E\u043F\u043A\u043E\u0439', testIds: TEST_IDS.panel.cardStack.actions, itemRender: itemRender, groupItemRender: groupItemRender })), _jsx(Button, { view: 'function', appearance: 'neutral', size: 'm', onClick: toggleOpen, "aria-label": open ? 'Свернуть стопку' : 'Развернуть стопку', "aria-expanded": open, "data-test-id": TEST_IDS.panel.cardStack.openButton, icon: open ? _jsx(ChevronUpSVG, {}) : _jsx(ChevronDownSVG, {}) })] })] }), _jsxs("div", { className: styles.cards, children: [_jsxs("div", { className: styles.first, children: [_jsx(StackTail, { open: open, count: stack.length }), firstCardElement] }), _jsx("div", { className: styles.stack, "data-open": open || undefined, "data-tail-size": stack.length, children: _jsx("div", { className: styles.animationContainer, children: isVisible ? stack : [] }) })] })] }));
36
+ return (_jsxs("div", { className: styles.container, style: { '--snack-notification-stack-animation-duration': `${ANIMATION_DURATION}s` }, "data-test-id": TEST_IDS.panel.cardStack.wrapper, ...extractSupportProps(rest), children: [_jsxs("div", { className: styles.header, "data-test-id": TEST_IDS.panel.cardStack.headline, children: [_jsx(Typography, { variant: 'label', size: 'l', as: 'div', className: styles.title, onClick: toggleOpen, "aria-expanded": open, children: _jsx(TruncateString, { "data-test-id": TEST_IDS.panel.cardStack.title, text: title }) }), _jsxs("div", { className: styles.right, children: [actions && actions.length > 0 && (_jsx(ActionsButton, { actions: actions, open: actionsOpen, setDroplistOpen: setActionsOpen, icon: _jsx(KebabSVG, {}), triggerAriaLabel: '\u0414\u0435\u0439\u0441\u0442\u0432\u0438\u044F \u0441\u043E \u0441\u0442\u043E\u043F\u043A\u043E\u0439', testIds: TEST_IDS.panel.cardStack.actions, itemRender: itemRender, groupItemRender: groupItemRender })), _jsx(Button, { view: 'function', appearance: 'neutral', size: 'm', onClick: toggleOpen, "aria-label": open ? 'Свернуть стопку' : 'Развернуть стопку', "aria-expanded": open, "data-test-id": TEST_IDS.panel.cardStack.openButton, icon: open ? _jsx(ChevronUpSVG, {}) : _jsx(ChevronDownSVG, {}) })] })] }), _jsxs("div", { className: styles.cards, children: [_jsxs("div", { className: styles.first, children: [_jsx(StackTail, { open: open, count: stack.length }), firstCardElement] }), _jsx("div", { className: styles.stack, "data-open": open || undefined, "data-tail-size": stack.length, children: _jsx("div", { className: styles.animationContainer, children: isVisible ? stack : [] }) })] })] }));
37
37
  }
@@ -7,5 +7,5 @@ import { TEST_IDS } from '../../../../constants.js';
7
7
  import styles from './styles.module.css';
8
8
  /** Группа уведомлений с заголовком внутри панели */
9
9
  export function NotificationPanelGroup({ title, children, className, ...rest }) {
10
- return (_jsxs("div", { className: cn(styles.root, className), ...extractSupportProps(rest), "data-test-id": rest['data-test-id'] ?? TEST_IDS.panel.group.root, children: [_jsx("div", { className: styles.title, "data-test-id": TEST_IDS.panel.group.title, children: _jsx(Typography, { "data-test-id": TEST_IDS.notificationPanelGroupText, variant: 'label', size: 's', weight: 'thin', as: 'span', className: styles.text, children: _jsx(TruncateString, { "data-test-id": TEST_IDS.notificationPanelGroupTitle, text: title }) }) }), _jsx("div", { className: styles.content, children: children })] }));
10
+ return (_jsxs("div", { className: cn(styles.root, className), "data-test-id": TEST_IDS.panel.group.root, ...extractSupportProps(rest), children: [_jsx("div", { className: styles.title, "data-test-id": TEST_IDS.panel.group.title, children: _jsx(Typography, { variant: 'label', size: 's', weight: 'thin', as: 'span', className: styles.text, children: _jsx(TruncateString, { text: title }) }) }), _jsx("div", { className: styles.content, children: children })] }));
11
11
  }
@@ -16,13 +16,7 @@ export function NotificationPanelSettings({ actions, button, size = 'm', itemRen
16
16
  'data-test-id': TEST_IDS.panel.settings.droplistTrigger,
17
17
  };
18
18
  if (!actions?.length) {
19
- return (_jsx(WithTooltip, { tooltip: buttonProps.tooltip
20
- ? {
21
- 'data-test-id': TEST_IDS.notificationPanelSettingsTooltip,
22
- hoverDelayOpen: TOOLTIP_HOVER_DELAY_OPEN,
23
- ...buttonProps.tooltip,
24
- }
25
- : undefined, children: _jsx(Button, { ...buttonProps }) }));
19
+ return (_jsx(WithTooltip, { tooltip: buttonProps.tooltip ? { hoverDelayOpen: TOOLTIP_HOVER_DELAY_OPEN, ...buttonProps.tooltip } : undefined, children: _jsx(Button, { ...buttonProps }) }));
26
20
  }
27
21
  return (_jsx(NotificationPanelSettingsDroplist, { actions: actions, button: buttonProps, itemRender: itemRender, groupItemRender: groupItemRender }));
28
22
  }
@@ -15,7 +15,7 @@ export function NotificationPanelSettingsDroplist({ actions, button, itemRender,
15
15
  disabled,
16
16
  content,
17
17
  beforeContent: icon,
18
- afterContent: tagLabel ? (_jsx(Tag, { "data-test-id": `${TEST_IDS.notificationPanelSettingsDroplistTag}-${index}`, label: tagLabel })) : undefined,
18
+ afterContent: tagLabel ? _jsx(Tag, { label: tagLabel }) : undefined,
19
19
  'data-test-id': `${TEST_IDS.panel.settings.droplistAction}-${index}`,
20
20
  })), itemRender: itemRender, groupItemRender: groupItemRender, children: _jsx(Button, { ...button }) }));
21
21
  }
@@ -5,17 +5,6 @@ export declare const APPEARANCE: {
5
5
  readonly Success: "success";
6
6
  };
7
7
  export declare const TEST_IDS: {
8
- readonly notificationPanelSettingsTooltip: "notification-panel-settings__tooltip";
9
- readonly notificationPanelGroupTitle: "notification-panel-group__title";
10
- readonly notificationCardNotificationCardLabel: "notification-card__notification-card-label";
11
- readonly notificationCardNotificationCardTitleText: "notification-card__notification-card-title-text";
12
- readonly notificationCardNotificationCardFooter: "notification-card__notification-card-footer";
13
- readonly notificationCardSkeletonSkeletonText: "notification-card-skeleton__skeleton-text";
14
- readonly notificationCardStackTitle: "notification-card-stack__title";
15
- readonly notificationPanelGroupText: "notification-panel-group__text";
16
- readonly notificationPanelSettingsDroplistTag: "notification-panel-settings-droplist__tag";
17
- readonly notificationPanelNotificationCardSkeleton: "notification-panel__notification-card-skeleton";
18
- readonly actionsButtonTag: "actions-button__tag";
19
8
  readonly card: {
20
9
  readonly root: "notification-card";
21
10
  readonly label: "notification-card__label";
@@ -5,17 +5,6 @@ export const APPEARANCE = {
5
5
  Success: 'success',
6
6
  };
7
7
  export const TEST_IDS = {
8
- notificationPanelSettingsTooltip: 'notification-panel-settings__tooltip',
9
- notificationPanelGroupTitle: 'notification-panel-group__title',
10
- notificationCardNotificationCardLabel: 'notification-card__notification-card-label',
11
- notificationCardNotificationCardTitleText: 'notification-card__notification-card-title-text',
12
- notificationCardNotificationCardFooter: 'notification-card__notification-card-footer',
13
- notificationCardSkeletonSkeletonText: 'notification-card-skeleton__skeleton-text',
14
- notificationCardStackTitle: 'notification-card-stack__title',
15
- notificationPanelGroupText: 'notification-panel-group__text',
16
- notificationPanelSettingsDroplistTag: 'notification-panel-settings-droplist__tag',
17
- notificationPanelNotificationCardSkeleton: 'notification-panel__notification-card-skeleton',
18
- actionsButtonTag: 'actions-button__tag',
19
8
  card: {
20
9
  root: 'notification-card',
21
10
  label: 'notification-card__label',
@@ -3,7 +3,6 @@ import { Button } from '@cloud-ru/ds-button';
3
3
  import { Droplist } from '@cloud-ru/ds-list';
4
4
  import { Tag } from '@cloud-ru/ds-tag';
5
5
  import cn from 'classnames';
6
- import { TEST_IDS } from '../../constants.js';
7
6
  import { stopPropagationClick } from '../../utils.js';
8
7
  import styles from './styles.module.css';
9
8
  export function ActionsButton({ actions, open, setDroplistOpen, icon, triggerAriaLabel, testIds, className, itemRender, groupItemRender, }) {
@@ -17,7 +16,7 @@ export function ActionsButton({ actions, open, setDroplistOpen, icon, triggerAri
17
16
  disabled,
18
17
  content,
19
18
  beforeContent: itemIcon,
20
- afterContent: tagLabel ? (_jsx(Tag, { "data-test-id": `${TEST_IDS.actionsButtonTag}-${index}`, label: tagLabel })) : undefined,
19
+ afterContent: tagLabel ? _jsx(Tag, { label: tagLabel }) : undefined,
21
20
  'data-test-id': `${testIds.droplistAction}-${index}`,
22
21
  })), triggerClassName: styles.inlineFlex, itemRender: itemRender, groupItemRender: groupItemRender, children: _jsx(Button, { view: 'function', appearance: 'neutral', size: 'm', icon: icon, "aria-label": triggerAriaLabel, "data-test-id": testIds.droplistTrigger }) }) }));
23
22
  }