@cloud-ru/ds-uikit-product-header 1.1.4 → 1.1.5-preview-98332145.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/dist/cjs/components/MainMenu/helperComponents/Content/helperComponents/SortableGroup/components/SubCategory/SubCategoryTitle.js +1 -1
- package/dist/cjs/components/MainMenu/helperComponents/Favorites/Favorites.js +1 -1
- package/dist/cjs/components/MainMenu/helperComponents/ServiceCard/ServiceCard.js +1 -2
- package/dist/esm/components/MainMenu/helperComponents/Content/helperComponents/SortableGroup/components/SubCategory/SubCategoryTitle.js +1 -1
- package/dist/esm/components/MainMenu/helperComponents/Favorites/Favorites.js +1 -1
- package/dist/esm/components/MainMenu/helperComponents/ServiceCard/ServiceCard.js +2 -3
- package/dist/tsconfig.cjs.tsbuildinfo +1 -1
- package/dist/tsconfig.esm.tsbuildinfo +1 -1
- package/package.json +26 -26
- package/src/components/MainMenu/helperComponents/Content/helperComponents/SortableGroup/components/SubCategory/SubCategoryTitle.tsx +1 -1
- package/src/components/MainMenu/helperComponents/Favorites/Favorites.tsx +0 -1
- package/src/components/MainMenu/helperComponents/ServiceCard/ServiceCard.tsx +3 -9
|
@@ -39,7 +39,7 @@ function SubCategoryTitle({ groupId, service, showDescription: showDescriptionPr
|
|
|
39
39
|
],
|
|
40
40
|
});
|
|
41
41
|
if (expandable?.value) {
|
|
42
|
-
return ((0, jsx_runtime_1.jsxs)("div", { className: styles_module_scss_1.default.subcategoryTitle, children: [(0, jsx_runtime_1.jsxs)("div", { className: styles_module_scss_1.default.subcategoryTitleRow, onKeyDown: handleKeyDown, children: [(0, jsx_runtime_1.jsx)(uikit_product_title_clickable_1.TitleClickable, { as: 'a', href: service.href, onClick: handleServiceClick, innerRef: titleRef, title: service.label,
|
|
42
|
+
return ((0, jsx_runtime_1.jsxs)("div", { className: styles_module_scss_1.default.subcategoryTitle, children: [(0, jsx_runtime_1.jsxs)("div", { className: styles_module_scss_1.default.subcategoryTitleRow, onKeyDown: handleKeyDown, children: [(0, jsx_runtime_1.jsx)(uikit_product_title_clickable_1.TitleClickable, { as: 'a', href: service.href, onClick: handleServiceClick, innerRef: titleRef, title: service.label, icon: (0, utils_2.getLinkEmblem)(service), className: styles_module_scss_1.default.subcategoryTitleClickable, "data-test-id": titleTestId }), (0, jsx_runtime_1.jsx)(uikit_product_card_predefined_1.CardActionsSurface, { className: styles_module_scss_1.default.subcategoryTitleActions, actionsVisibility: 'always', tooltip: hasTooltip
|
|
43
43
|
? {
|
|
44
44
|
tip: service.description,
|
|
45
45
|
buttonRef: tooltipTriggerRef,
|
|
@@ -59,7 +59,7 @@ function Favorites({ favorite, allServiceGroups, headerClassName, isMobile }) {
|
|
|
59
59
|
избранного идёт через звёздочку на карточке. */
|
|
60
60
|
return isMobile ? ((0, jsx_runtime_1.jsx)("div", { className: styles_module_scss_1.default.listScroll, children: (0, jsx_runtime_1.jsx)(scroll_1.Scroll, { className: styles_module_scss_1.default.listScrollInner, overflow: { x: 'hidden' }, children: (0, jsx_runtime_1.jsxs)("div", { className: styles_module_scss_1.default.list, "data-test-id": constants_1.FAVORITES_TEST_IDS.list, children: [isEmpty && (0, jsx_runtime_1.jsx)(components_1.EmptyState, { isFavoritesSegment: isFavoritesSegment, isMobile: true }), !isEmpty &&
|
|
61
61
|
isFavoritesSegment &&
|
|
62
|
-
favoriteItems.map(service => ((0, jsx_runtime_1.jsx)(uikit_product_card_predefined_1.CardServiceLight, { as: 'a', className: styles_module_scss_1.default.card, actionsVisibility: 'always',
|
|
62
|
+
favoriteItems.map(service => ((0, jsx_runtime_1.jsx)(uikit_product_card_predefined_1.CardServiceLight, { as: 'a', className: styles_module_scss_1.default.card, actionsVisibility: 'always', favorite: {
|
|
63
63
|
enabled: true,
|
|
64
64
|
checked: true,
|
|
65
65
|
onChange: favorite.onChange(service.id),
|
|
@@ -30,13 +30,12 @@ function ServiceCard({ service, favorite, isMobile, onServiceClick, showDescript
|
|
|
30
30
|
onClick: (event) => onServiceClick?.(service, event),
|
|
31
31
|
favorite: favoriteProps,
|
|
32
32
|
actionsVisibility: isMobile ? 'always' : 'hover',
|
|
33
|
-
actionsSize: isMobile ? 's' : 'm',
|
|
34
33
|
promoTag: service.badge,
|
|
35
34
|
className: (0, classnames_1.default)(styles_module_scss_1.default.card, className),
|
|
36
35
|
tabIndex,
|
|
37
36
|
expandable,
|
|
38
37
|
};
|
|
39
|
-
const card = showDescription ? ((0, jsx_runtime_1.jsx)(uikit_product_card_predefined_1.CardServiceInfo, { ...commonProps, description: service.description ?? '' })) : ((0, jsx_runtime_1.jsx)(uikit_product_card_predefined_1.CardServiceLight, { ...commonProps, tooltip: !dragPreview && service.description
|
|
38
|
+
const card = showDescription ? ((0, jsx_runtime_1.jsx)(uikit_product_card_predefined_1.CardServiceInfo, { ...commonProps, description: service.description ?? '', actionsSize: isMobile ? 's' : 'm' })) : ((0, jsx_runtime_1.jsx)(uikit_product_card_predefined_1.CardServiceLight, { ...commonProps, tooltip: !dragPreview && service.description
|
|
40
39
|
? {
|
|
41
40
|
tip: service.description,
|
|
42
41
|
}
|
|
@@ -33,7 +33,7 @@ export function SubCategoryTitle({ groupId, service, showDescription: showDescri
|
|
|
33
33
|
],
|
|
34
34
|
});
|
|
35
35
|
if (expandable?.value) {
|
|
36
|
-
return (_jsxs("div", { className: styles.subcategoryTitle, children: [_jsxs("div", { className: styles.subcategoryTitleRow, onKeyDown: handleKeyDown, children: [_jsx(TitleClickable, { as: 'a', href: service.href, onClick: handleServiceClick, innerRef: titleRef, title: service.label,
|
|
36
|
+
return (_jsxs("div", { className: styles.subcategoryTitle, children: [_jsxs("div", { className: styles.subcategoryTitleRow, onKeyDown: handleKeyDown, children: [_jsx(TitleClickable, { as: 'a', href: service.href, onClick: handleServiceClick, innerRef: titleRef, title: service.label, icon: getLinkEmblem(service), className: styles.subcategoryTitleClickable, "data-test-id": titleTestId }), _jsx(CardActionsSurface, { className: styles.subcategoryTitleActions, actionsVisibility: 'always', tooltip: hasTooltip
|
|
37
37
|
? {
|
|
38
38
|
tip: service.description,
|
|
39
39
|
buttonRef: tooltipTriggerRef,
|
|
@@ -53,7 +53,7 @@ export function Favorites({ favorite, allServiceGroups, headerClassName, isMobil
|
|
|
53
53
|
избранного идёт через звёздочку на карточке. */
|
|
54
54
|
return isMobile ? (_jsx("div", { className: styles.listScroll, children: _jsx(Scroll, { className: styles.listScrollInner, overflow: { x: 'hidden' }, children: _jsxs("div", { className: styles.list, "data-test-id": FAVORITES_TEST_IDS.list, children: [isEmpty && _jsx(EmptyState, { isFavoritesSegment: isFavoritesSegment, isMobile: true }), !isEmpty &&
|
|
55
55
|
isFavoritesSegment &&
|
|
56
|
-
favoriteItems.map(service => (_jsx(CardServiceLight, { as: 'a', className: styles.card, actionsVisibility: 'always',
|
|
56
|
+
favoriteItems.map(service => (_jsx(CardServiceLight, { as: 'a', className: styles.card, actionsVisibility: 'always', favorite: {
|
|
57
57
|
enabled: true,
|
|
58
58
|
checked: true,
|
|
59
59
|
onChange: favorite.onChange(service.id),
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { useDraggable } from '@dnd-kit/core';
|
|
3
3
|
import { DRAG_MODE, DragGhost, DragPreview } from '@cloud-ru/ds-drag-and-drop';
|
|
4
|
-
import { CardServiceInfo, CardServiceLight
|
|
4
|
+
import { CardServiceInfo, CardServiceLight } from '@cloud-ru/ds-uikit-product-card-predefined';
|
|
5
5
|
import cn from 'classnames';
|
|
6
6
|
import { getLinkEmblem, getServiceSourceDragId } from '../../utils/index.js';
|
|
7
7
|
import styles from './styles.module.css';
|
|
@@ -23,13 +23,12 @@ export function ServiceCard({ service, favorite, isMobile, onServiceClick, showD
|
|
|
23
23
|
onClick: (event) => onServiceClick?.(service, event),
|
|
24
24
|
favorite: favoriteProps,
|
|
25
25
|
actionsVisibility: isMobile ? 'always' : 'hover',
|
|
26
|
-
actionsSize: isMobile ? 's' : 'm',
|
|
27
26
|
promoTag: service.badge,
|
|
28
27
|
className: cn(styles.card, className),
|
|
29
28
|
tabIndex,
|
|
30
29
|
expandable,
|
|
31
30
|
};
|
|
32
|
-
const card = showDescription ? (_jsx(CardServiceInfo, { ...commonProps, description: service.description ?? '' })) : (_jsx(CardServiceLight, { ...commonProps, tooltip: !dragPreview && service.description
|
|
31
|
+
const card = showDescription ? (_jsx(CardServiceInfo, { ...commonProps, description: service.description ?? '', actionsSize: isMobile ? 's' : 'm' })) : (_jsx(CardServiceLight, { ...commonProps, tooltip: !dragPreview && service.description
|
|
33
32
|
? {
|
|
34
33
|
tip: service.description,
|
|
35
34
|
}
|