@cloud-ru/ds-uikit-product-header 1.5.2-preview-0406cbd2.0 → 1.5.2-preview-43886f3e.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.
Files changed (59) hide show
  1. package/README.md +4 -2
  2. package/dist/cjs/components/HeaderButton/HeaderButton.js +1 -2
  3. package/dist/cjs/components/Logo/Logo.js +2 -1
  4. package/dist/cjs/components/Logo/constants.d.ts +2 -0
  5. package/dist/cjs/components/Logo/constants.js +7 -1
  6. package/dist/cjs/components/Logo/styles.module.css +3 -0
  7. package/dist/cjs/components/MainMenu/helperComponents/Content/helperComponents/ContentToolbar/styles.module.css +1 -1
  8. package/dist/cjs/components/MainMenu/helperComponents/Content/helperComponents/SortableGroup/styles.module.css +2 -6
  9. package/dist/cjs/components/MainMenu/helperComponents/Favorites/Favorites.js +1 -1
  10. package/dist/cjs/components/MainMenu/helperComponents/MenuHeaderBrand/styles.module.css +6 -0
  11. package/dist/cjs/components/MainMenu/helperComponents/Search/Search.js +1 -1
  12. package/dist/cjs/components/PathBreadcrumbs/styles.module.css +1 -0
  13. package/dist/cjs/components/UserMenu/UserMenu.d.ts +7 -2
  14. package/dist/cjs/components/UserMenu/UserMenu.js +6 -4
  15. package/dist/cjs/components/UserMenu/hooks/useProfileItem.js +5 -1
  16. package/dist/cjs/components/UserMenu/hooks/useUserMenuItems.d.ts +5 -76
  17. package/dist/cjs/components/UserMenu/hooks/useUserMenuItems.js +18 -14
  18. package/dist/cjs/components/UserMenu/styles.module.css +2 -2
  19. package/dist/cjs/index.d.ts +1 -0
  20. package/dist/cjs/index.js +1 -0
  21. package/dist/cjs/style.css +15 -9
  22. package/dist/esm/components/HeaderButton/HeaderButton.js +1 -2
  23. package/dist/esm/components/Logo/Logo.js +3 -2
  24. package/dist/esm/components/Logo/constants.d.ts +2 -0
  25. package/dist/esm/components/Logo/constants.js +6 -0
  26. package/dist/esm/components/Logo/styles.module.css +3 -0
  27. package/dist/esm/components/MainMenu/helperComponents/Content/helperComponents/ContentToolbar/styles.module.css +1 -1
  28. package/dist/esm/components/MainMenu/helperComponents/Content/helperComponents/SortableGroup/styles.module.css +2 -6
  29. package/dist/esm/components/MainMenu/helperComponents/Favorites/Favorites.js +1 -1
  30. package/dist/esm/components/MainMenu/helperComponents/MenuHeaderBrand/styles.module.css +6 -0
  31. package/dist/esm/components/MainMenu/helperComponents/Search/Search.js +1 -1
  32. package/dist/esm/components/PathBreadcrumbs/styles.module.css +1 -0
  33. package/dist/esm/components/UserMenu/UserMenu.d.ts +7 -2
  34. package/dist/esm/components/UserMenu/UserMenu.js +6 -4
  35. package/dist/esm/components/UserMenu/hooks/useProfileItem.js +2 -1
  36. package/dist/esm/components/UserMenu/hooks/useUserMenuItems.d.ts +5 -76
  37. package/dist/esm/components/UserMenu/hooks/useUserMenuItems.js +18 -14
  38. package/dist/esm/components/UserMenu/styles.module.css +2 -2
  39. package/dist/esm/index.d.ts +1 -0
  40. package/dist/esm/index.js +1 -0
  41. package/dist/esm/style.css +15 -9
  42. package/dist/tsconfig.cjs.tsbuildinfo +1 -1
  43. package/dist/tsconfig.esm.tsbuildinfo +1 -1
  44. package/package.json +10 -10
  45. package/src/components/HeaderButton/HeaderButton.tsx +1 -2
  46. package/src/components/Logo/Logo.tsx +11 -4
  47. package/src/components/Logo/constants.ts +7 -0
  48. package/src/components/Logo/styles.module.scss +6 -0
  49. package/src/components/MainMenu/helperComponents/Content/helperComponents/ContentToolbar/styles.module.scss +1 -1
  50. package/src/components/MainMenu/helperComponents/Content/helperComponents/SortableGroup/styles.module.scss +8 -17
  51. package/src/components/MainMenu/helperComponents/Favorites/Favorites.tsx +1 -1
  52. package/src/components/MainMenu/helperComponents/MenuHeaderBrand/styles.module.scss +12 -0
  53. package/src/components/MainMenu/helperComponents/Search/Search.tsx +1 -1
  54. package/src/components/PathBreadcrumbs/styles.module.scss +1 -0
  55. package/src/components/UserMenu/UserMenu.tsx +19 -5
  56. package/src/components/UserMenu/hooks/useProfileItem.tsx +2 -1
  57. package/src/components/UserMenu/hooks/useUserMenuItems.ts +42 -27
  58. package/src/components/UserMenu/styles.module.scss +5 -2
  59. package/src/index.ts +1 -0
package/README.md CHANGED
@@ -656,7 +656,7 @@ export function Basic() {
656
656
  profile={{ fullName: 'Ivan Petrov', email: 'ipetrov@cloud.ru', inviteCount: 1 }}
657
657
  theme={{ value: 'light' }}
658
658
  settingItems={SETTING_ITEMS}
659
- items={[{ content: { label: 'Option 1' } }, { content: { label: 'Option 2' } }]}
659
+ topItems={[{ content: { label: 'Option 1' } }, { content: { label: 'Option 2' } }]}
660
660
  data-test-id='header-user-menu-basic'
661
661
  />
662
662
  );
@@ -693,14 +693,16 @@ export function ControlledTheme() {
693
693
 
694
694
  | Prop | Type | Default | Description |
695
695
  |------|------|---------|-------------|
696
- | `items` | `BaseItemWithoutNonGroup` \| `CommonGroupItem` \| `DroplistProps` \| `ScrollProps` | — | |
696
+ | `bottomItems` | `BaseItemWithoutNonGroup` \| `CommonGroupItem` \| `DroplistProps` \| `ScrollProps` | — | Пункты перед «Выйти из аккаунта». На desktop закреплены снизу |
697
697
  | `onClick` | `(() => void)` | — | |
698
698
  | `onLogout` | `(() => void)` | — | |
699
699
  | `open` | `boolean` | — | |
700
+ | `organizationItems` | `BaseItemWithoutNonGroup` \| `CommonGroupItem` \| `DroplistProps` \| `ScrollProps` | — | Список организаций. На desktop — единственная прокручиваемая часть меню |
700
701
  | `profile` | `UserProfileProps` | `{}` | |
701
702
  | `setOpen` | `((open: boolean) => void)` | — | |
702
703
  | `settingItems` | `BaseItemProps` | — | |
703
704
  | `theme` | `ThemeProps` | — | |
705
+ | `topItems` | `BaseItemWithoutNonGroup` \| `CommonGroupItem` \| `DroplistProps` \| `ScrollProps` | — | Пункты после темы. На desktop закреплены сверху вместе с профилем и темой |
704
706
  | `triggerTooltip` | `string` | — | |
705
707
 
706
708
  ##### Related types
@@ -7,7 +7,6 @@ exports.HeaderButton = HeaderButton;
7
7
  const jsx_runtime_1 = require("react/jsx-runtime");
8
8
  const button_1 = require("@cloud-ru/ds-button");
9
9
  const tooltip_1 = require("@cloud-ru/ds-tooltip");
10
- const classnames_1 = __importDefault(require("classnames"));
11
10
  const styles_module_scss_1 = __importDefault(require('./styles.module.css'));
12
11
  /**
13
12
  * HeaderButton — кнопка хедера с тултипом (лого, пользовательское меню и т.п.).
@@ -27,5 +26,5 @@ function HeaderButton({ tooltip, isMobile, className, ...rest }) {
27
26
  placement: 'bottom',
28
27
  ...tooltip,
29
28
  triggerClassName: styles_module_scss_1.default.tooltipTrigger,
30
- }, children: (0, jsx_runtime_1.jsx)(button_1.Button, { ...rest, size: 'm', appearance: 'neutral', view: 'simple', className: (0, classnames_1.default)(styles_module_scss_1.default.headerButton, className) }) }));
29
+ }, children: (0, jsx_runtime_1.jsx)(button_1.Button, { ...rest, size: 'm', appearance: 'neutral', view: 'simple', className: className }) }));
31
30
  }
@@ -29,7 +29,8 @@ function Logo({ path, loading, mode, href, onClick, className, tooltip, ...rest
29
29
  setError(true);
30
30
  } }));
31
31
  }
32
- return ((0, jsx_runtime_1.jsxs)("span", { className: styles_module_scss_1.default.logoWrap, children: [(0, jsx_runtime_1.jsxs)("span", { className: styles_module_scss_1.default.iconStack, children: [(0, jsx_runtime_1.jsx)(logos_1.CloudLogo, { size: 24, className: (0, classnames_1.default)(styles_module_scss_1.default.icon, logoThemeClassName, styles_module_scss_1.default.iconDefault) }), (0, jsx_runtime_1.jsx)(product_1.HomeFilledSVG, { size: 24, className: (0, classnames_1.default)(styles_module_scss_1.default.icon, logoThemeClassName, styles_module_scss_1.default.iconHover) })] }), mode && mode !== constants_1.HEADER_LOGO_MODE.Prod && ((0, jsx_runtime_1.jsx)(promo_tag_1.PromoTag, { as: 'span', label: mode, size: 'xs', appearance: constants_1.MAP_LOGO_MODE_TO_APPEARANCE[mode] }))] }));
32
+ const showMode = mode && mode !== constants_1.HEADER_LOGO_MODE.Prod;
33
+ return ((0, jsx_runtime_1.jsxs)("span", { className: styles_module_scss_1.default.logoWrap, "data-with-mode": showMode || undefined, children: [(0, jsx_runtime_1.jsxs)("span", { className: styles_module_scss_1.default.iconStack, children: [(0, jsx_runtime_1.jsx)(logos_1.CloudLogo, { size: 24, className: (0, classnames_1.default)(styles_module_scss_1.default.icon, logoThemeClassName, styles_module_scss_1.default.iconDefault) }), (0, jsx_runtime_1.jsx)(product_1.HomeFilledSVG, { size: 24, className: (0, classnames_1.default)(styles_module_scss_1.default.icon, logoThemeClassName, styles_module_scss_1.default.iconHover) })] }), showMode && ((0, jsx_runtime_1.jsx)(promo_tag_1.PromoTag, { as: 'span', label: constants_1.MAP_LOGO_MODE_TO_LABEL[mode], size: 'xs', appearance: constants_1.MAP_LOGO_MODE_TO_APPEARANCE[mode] }))] }));
33
34
  }, [error, mode, path, logoThemeClassName]);
34
35
  return ((0, jsx_runtime_1.jsx)(HeaderButton_1.HeaderButton, { as: 'a', tooltip: tooltip, className: (0, classnames_1.default)(styles_module_scss_1.default.logo, className), href: href, tabIndex: 0, onClick: onClick, loading: loading, icon: logo, ...(0, utils_1.extractDataTestProps)(rest) }));
35
36
  }
@@ -8,3 +8,5 @@ export declare const HEADER_LOGO_MODE: {
8
8
  };
9
9
  export type HeaderLogoMode = ValueOf<typeof HEADER_LOGO_MODE>;
10
10
  export declare const MAP_LOGO_MODE_TO_APPEARANCE: Record<Exclude<HeaderLogoMode, 'prod'>, PromoTagProps['appearance']>;
11
+ /** Подпись тега режима, как в макете `logoEvo` */
12
+ export declare const MAP_LOGO_MODE_TO_LABEL: Record<Exclude<HeaderLogoMode, 'prod'>, string>;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.MAP_LOGO_MODE_TO_APPEARANCE = exports.HEADER_LOGO_MODE = void 0;
3
+ exports.MAP_LOGO_MODE_TO_LABEL = exports.MAP_LOGO_MODE_TO_APPEARANCE = exports.HEADER_LOGO_MODE = void 0;
4
4
  exports.HEADER_LOGO_MODE = {
5
5
  Develop: 'develop',
6
6
  Stage: 'stage',
@@ -12,3 +12,9 @@ exports.MAP_LOGO_MODE_TO_APPEARANCE = {
12
12
  [exports.HEADER_LOGO_MODE.Stage]: 'orange',
13
13
  [exports.HEADER_LOGO_MODE.Hybrid]: 'violet',
14
14
  };
15
+ /** Подпись тега режима, как в макете `logoEvo` */
16
+ exports.MAP_LOGO_MODE_TO_LABEL = {
17
+ [exports.HEADER_LOGO_MODE.Develop]: 'dev',
18
+ [exports.HEADER_LOGO_MODE.Stage]: 'stage',
19
+ [exports.HEADER_LOGO_MODE.Hybrid]: 'hybrid',
20
+ };
@@ -9,6 +9,9 @@
9
9
  gap:var(--sn-primitive-dimension-4, 4px);
10
10
  align-items:center;
11
11
  }
12
+ .logoWrap[data-with-mode]{
13
+ padding:0 var(--sn-primitive-dimension-4, 4px);
14
+ }
12
15
 
13
16
  .iconStack{
14
17
  position:relative;
@@ -32,7 +32,7 @@
32
32
  .actions{
33
33
  display:flex;
34
34
  flex-shrink:0;
35
- gap:var(--sn-primitive-dimension-8, 8px);
35
+ gap:var(--sn-primitive-dimension-0, 0px);
36
36
  align-items:center;
37
37
  margin-left:auto;
38
38
  }
@@ -40,10 +40,6 @@
40
40
  min-width:0;
41
41
  color:var(--sn-theme-color-available-version-textMain, var(--sn-brand-color-text-version-main, #41424e));
42
42
  }
43
- .headerTitle:hover .headerActions, .headerTitle:focus-visible .headerActions, .headerTitle:has(:focus-visible) .headerActions{
44
- pointer-events:auto;
45
- opacity:1;
46
- }
47
43
 
48
44
  .group{
49
45
  position:relative;
@@ -110,10 +106,10 @@
110
106
  grid-template-columns:repeat(3, minmax(auto, 1fr));
111
107
  gap:var(--sn-primitive-dimension-4, 4px);
112
108
  }
113
- .groupBody:not([data-mobile]):not([data-subcategory-body]){
109
+ .groupBody:not([data-subcategory-body]){
114
110
  padding:var(--sn-primitive-dimension-4, 4px);
115
111
  }
116
- .groupBody:not([data-mobile]):not([data-show-description]){
112
+ .groupBody:not([data-show-description]){
117
113
  gap:var(--sn-primitive-dimension-0, 0px);
118
114
  }
119
115
  @container (width <= 728px){
@@ -67,5 +67,5 @@ function Favorites({ favorite, allServiceGroups, headerClassName, isMobile }) {
67
67
  onChange: favorite.onChange(service.id),
68
68
  }, ...(0, utils_3.getCommonCardProps)(service, handleFavoriteServiceClick(service)) }, service.id))), !isEmpty && !isFavoritesSegment && recentCards] }) }) })) : ((0, jsx_runtime_1.jsx)(components_1.FavoritesSortable, { favorite: favorite, favoriteItems: favoriteItems, segment: resolvedSegment, setSegment: setSegment, isEmpty: isEmpty, recentCards: recentCards, onFavoriteServiceClick: handleFavoriteServiceClick }));
69
69
  })();
70
- return ((0, jsx_runtime_1.jsxs)("div", { className: styles_module_scss_1.default.root, "data-test-id": constants_1.FAVORITES_TEST_IDS.root, children: [(0, jsx_runtime_1.jsxs)("div", { className: (0, classnames_1.default)(styles_module_scss_1.default.header, headerClassName), "data-test-id": constants_1.FAVORITES_TEST_IDS.header, children: [(0, jsx_runtime_1.jsx)(segment_control_1.SegmentControl, { size: 'm', width: segment_control_1.WIDTH.Full, value: loading ? undefined : segment, onChange: setSegment, className: styles_module_scss_1.default.segmentControl, "data-test-id": constants_1.FAVORITES_TEST_IDS.segmentControl, items: segmentControlItems }), favorite.actions && ((0, jsx_runtime_1.jsx)(list_1.Droplist, { size: 'm', ...favorite.actions, className: comfortClassName, closeDroplistOnItemClick: true, children: (0, jsx_runtime_1.jsx)(button_1.Button, { view: 'function', size: 'm', appearance: 'neutral', icon: (0, jsx_runtime_1.jsx)(system_1.KebabSVG, { size: 24 }), "data-test-id": constants_1.FAVORITES_TEST_IDS.settingsButton, disabled: loading }) }))] }), content] }));
70
+ return ((0, jsx_runtime_1.jsxs)("div", { className: styles_module_scss_1.default.root, "data-test-id": constants_1.FAVORITES_TEST_IDS.root, children: [(0, jsx_runtime_1.jsxs)("div", { className: (0, classnames_1.default)(styles_module_scss_1.default.header, headerClassName), "data-test-id": constants_1.FAVORITES_TEST_IDS.header, children: [(0, jsx_runtime_1.jsx)(segment_control_1.SegmentControl, { size: 'm', width: segment_control_1.WIDTH.Full, value: loading ? undefined : segment, onChange: setSegment, className: styles_module_scss_1.default.segmentControl, "data-test-id": constants_1.FAVORITES_TEST_IDS.segmentControl, items: segmentControlItems }), favorite.actions && ((0, jsx_runtime_1.jsx)(list_1.Droplist, { size: 'm', ...favorite.actions, className: comfortClassName, closeDroplistOnItemClick: true, children: (0, jsx_runtime_1.jsx)(button_1.Button, { view: 'simple', size: 'm', appearance: 'neutral', icon: (0, jsx_runtime_1.jsx)(system_1.KebabSVG, { size: 24 }), "data-test-id": constants_1.FAVORITES_TEST_IDS.settingsButton, disabled: loading }) }))] }), content] }));
71
71
  }
@@ -13,4 +13,10 @@
13
13
  flex-grow:1;
14
14
  flex-shrink:1;
15
15
  justify-content:flex-start;
16
+ }
17
+ .closeButton.closeButton[data-view=simple][data-appearance=neutral] [data-text-opacity]{
18
+ color:var(--sn-theme-color-available-version-textSecondary, var(--sn-brand-color-text-version-secondary, rgba(65, 66, 78, 0.8)));
19
+ }
20
+ .closeButton.closeButton[data-view=simple][data-appearance=neutral] [aria-hidden][data-text-opacity]{
21
+ color:var(--sn-theme-color-available-version-textTertiary, var(--sn-brand-color-text-version-tertiary, rgba(65, 66, 78, 0.5490196078)));
16
22
  }
@@ -12,5 +12,5 @@ const locale_1 = require("../../../../locale");
12
12
  const styles_module_scss_1 = __importDefault(require('./styles.module.css'));
13
13
  exports.Search = (0, react_1.forwardRef)(({ value, onChange, onBlur, onFocus, isMobile = false }, ref) => {
14
14
  const { t } = locale_1.headerLocale.useTranslations();
15
- return ((0, jsx_runtime_1.jsx)("div", { className: styles_module_scss_1.default.searchWrap, "data-mobile": isMobile || undefined, children: (0, jsx_runtime_1.jsx)(search_1.Search, { ref: ref, size: 'm', outline: !isMobile, placeholder: t('searchByServices'), value: value, onChange: onChange, onBlur: onBlur, onFocus: onFocus, "data-test-id": constants_1.TEST_IDS.mainMenu.search, className: styles_module_scss_1.default.search, background: isMobile }) }));
15
+ return ((0, jsx_runtime_1.jsx)("div", { className: styles_module_scss_1.default.searchWrap, "data-mobile": isMobile || undefined, children: (0, jsx_runtime_1.jsx)(search_1.Search, { ref: ref, size: 'm', outline: false, placeholder: t('searchByServices'), value: value, onChange: onChange, onBlur: onBlur, onFocus: onFocus, "data-test-id": constants_1.TEST_IDS.mainMenu.search, className: styles_module_scss_1.default.search, background: isMobile }) }));
16
16
  });
@@ -1,6 +1,7 @@
1
1
  .breadcrumbs{
2
2
  display:flex;
3
3
  align-items:center;
4
+ box-sizing:border-box;
4
5
  min-width:0;
5
6
  height:100%;
6
7
  padding:0 var(--sn-primitive-dimension-8, 8px) !important;
@@ -3,7 +3,12 @@ import { ThemeProps, UserProfileProps } from './types';
3
3
  export type UserMenuProps = {
4
4
  profile?: UserProfileProps;
5
5
  theme?: ThemeProps;
6
- items?: DroplistProps['items'];
6
+ /** Пункты после темы. На desktop закреплены сверху вместе с профилем и темой */
7
+ topItems?: DroplistProps['items'];
8
+ /** Список организаций. На desktop — единственная прокручиваемая часть меню */
9
+ organizationItems?: DroplistProps['items'];
10
+ /** Пункты перед «Выйти из аккаунта». На desktop закреплены снизу */
11
+ bottomItems?: DroplistProps['items'];
7
12
  settingItems?: BaseItemProps[];
8
13
  onLogout?(): void;
9
14
  open?: boolean;
@@ -11,4 +16,4 @@ export type UserMenuProps = {
11
16
  triggerTooltip?: string;
12
17
  onClick?(): void;
13
18
  };
14
- export declare function UserMenu({ profile, open: openProp, setOpen: setOpenProp, onLogout, items, settingItems, theme, onClick, triggerTooltip, }: UserMenuProps): import("react/jsx-runtime").JSX.Element;
19
+ export declare function UserMenu({ profile, open: openProp, setOpen: setOpenProp, onLogout, topItems, organizationItems, bottomItems, settingItems, theme, onClick, triggerTooltip, }: UserMenuProps): import("react/jsx-runtime").JSX.Element;
@@ -22,17 +22,19 @@ const styles_module_scss_1 = __importDefault(require('./styles.module.css'));
22
22
  // пунктам меню (профиль, организации, выход) состояние выбора не меняют — подсвечена
23
23
  // всегда только текущая тема и ветка `Тема` над ней.
24
24
  const SELECTION_STUB = { mode: 'single', value: '__empty_stub__', onChange: () => { } };
25
- function UserMenu({ profile = {}, open: openProp, setOpen: setOpenProp, onLogout, items, settingItems, theme, onClick, triggerTooltip, }) {
25
+ function UserMenu({ profile = {}, open: openProp, setOpen: setOpenProp, onLogout, topItems, organizationItems, bottomItems, settingItems, theme, onClick, triggerTooltip, }) {
26
26
  const { t } = locale_1.headerLocale.useTranslations();
27
27
  const isMobile = (0, useMobileLayout_1.useMobileLayout)();
28
28
  const comfortClassName = (0, useDesktopComfortClassName_1.useDesktopComfortClassName)();
29
29
  const [open = false, setOpen] = (0, utils_1.useValueControl)({ value: openProp, onChange: setOpenProp });
30
30
  const { fullName = '', inviteCount } = profile;
31
- const userMenuItems = (0, useUserMenuItems_1.useUserMenuItems)({
31
+ const { pinTop, items: menuItems, pinBottom } = (0, useUserMenuItems_1.useUserMenuItems)({
32
32
  isMobile,
33
33
  profile,
34
34
  theme,
35
- items,
35
+ topItems,
36
+ organizationItems,
37
+ bottomItems,
36
38
  settingItems,
37
39
  onClose: () => {
38
40
  setOpen(false);
@@ -48,5 +50,5 @@ function UserMenu({ profile = {}, open: openProp, setOpen: setOpenProp, onLogout
48
50
  appearance: 'primary',
49
51
  }
50
52
  : undefined, "data-test-id": constants_1.TEST_IDS.userMenu.button, icon: (0, jsx_runtime_1.jsx)(avatar_1.Avatar, { appearance: 'red', size: 's', name: fullName, showTwoSymbols: true }), "data-pressed": open })), [fullName, inviteCount, onClick, open, setOpen, isMobile, triggerTooltip]);
51
- return ((0, jsx_runtime_1.jsx)(list_1.Droplist, { open: open, onOpenChange: setOpen, size: 'm', selection: SELECTION_STUB, items: userMenuItems, trigger: 'click', placement: 'bottom-end', className: (0, classnames_1.default)(styles_module_scss_1.default.userMenuDroplist, comfortClassName), closeOnPopstate: true, "data-test-id": constants_1.TEST_IDS.userMenu.root, label: t('user'), snapPoints: constants_1.BOTTOM_SHEET_FULLSCREEN_SNAP_POINTS, children: trigger }));
53
+ return ((0, jsx_runtime_1.jsx)(list_1.Droplist, { open: open, onOpenChange: setOpen, size: 'm', selection: SELECTION_STUB, pinTop: pinTop, items: menuItems, pinBottom: pinBottom, scroll: !isMobile, trigger: 'click', placement: 'bottom-end', className: (0, classnames_1.default)(styles_module_scss_1.default.userMenuDroplist, comfortClassName), closeOnPopstate: true, "data-test-id": constants_1.TEST_IDS.userMenu.root, label: t('user'), snapPoints: constants_1.BOTTOM_SHEET_FULLSCREEN_SNAP_POINTS, children: trigger }));
52
54
  }
@@ -1,10 +1,14 @@
1
1
  "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
2
5
  Object.defineProperty(exports, "__esModule", { value: true });
3
6
  exports.useProfileItem = useProfileItem;
4
7
  const jsx_runtime_1 = require("react/jsx-runtime");
5
8
  const avatar_1 = require("@cloud-ru/ds-avatar");
6
9
  const system_1 = require("@cloud-ru/ds-icons/interface/system");
7
10
  const react_1 = require("react");
11
+ const styles_module_scss_1 = __importDefault(require('../styles.module.css'));
8
12
  function useProfileItem({ fullName = '', email = '', itemWrapRender, onClick, }) {
9
13
  return (0, react_1.useMemo)(() => ({
10
14
  content: {
@@ -16,7 +20,7 @@ function useProfileItem({ fullName = '', email = '', itemWrapRender, onClick, })
16
20
  },
17
21
  onClick,
18
22
  beforeContent: (0, jsx_runtime_1.jsx)(avatar_1.Avatar, { appearance: 'red', size: 's', name: fullName, showTwoSymbols: true }),
19
- afterContent: (0, jsx_runtime_1.jsx)(system_1.SettingsSVG, {}),
23
+ afterContent: (0, jsx_runtime_1.jsx)(system_1.SettingsSVG, { className: styles_module_scss_1.default.profileSettingsIcon }),
20
24
  itemWrapRender,
21
25
  id: 'header__user-menu__button',
22
26
  'data-test-id': 'header__user-menu__manage-profile',
@@ -1,87 +1,16 @@
1
1
  import { BaseItemProps, ListProps } from '@cloud-ru/ds-list';
2
- import { MouseEvent } from 'react';
3
2
  import { ThemeProps, UserProfileProps } from '../types';
4
3
  type UseMenuItems = {
5
4
  profile: UserProfileProps;
6
5
  theme?: ThemeProps;
7
- items?: ListProps['items'];
6
+ topItems?: ListProps['items'];
7
+ organizationItems?: ListProps['items'];
8
+ bottomItems?: ListProps['items'];
8
9
  settingItems?: BaseItemProps[];
9
10
  onLogout?(): void;
10
11
  onClose?(): void;
11
12
  isMobile?: boolean;
12
13
  };
13
- export declare function useUserMenuItems({ profile, theme, onLogout, items: itemsProp, isMobile, onClose, settingItems, }: UseMenuItems): (import("@cloud-ru/ds-list").AccordionItem | import("@cloud-ru/ds-list").NextListItem | import("@cloud-ru/ds-list").GroupItem | import("@cloud-ru/ds-list").GroupSelectItem | {
14
- onClick: (e: MouseEvent<HTMLElement>) => void;
15
- 'data-test-id'?: string;
16
- "aria-activedescendant"?: string | undefined;
17
- "aria-atomic"?: (boolean | "true" | "false") | undefined;
18
- "aria-autocomplete"?: "none" | "inline" | "list" | "both" | undefined;
19
- "aria-braillelabel"?: string | undefined;
20
- "aria-brailleroledescription"?: string | undefined;
21
- "aria-busy"?: (boolean | "true" | "false") | undefined;
22
- "aria-checked"?: boolean | "false" | "mixed" | "true" | undefined;
23
- "aria-colcount"?: number | undefined;
24
- "aria-colindex"?: number | undefined;
25
- "aria-colindextext"?: string | undefined;
26
- "aria-colspan"?: number | undefined;
27
- "aria-controls"?: string | undefined;
28
- "aria-current"?: boolean | "false" | "true" | "page" | "step" | "location" | "date" | "time" | undefined;
29
- "aria-describedby"?: string | undefined;
30
- "aria-description"?: string | undefined;
31
- "aria-details"?: string | undefined;
32
- "aria-disabled"?: (boolean | "true" | "false") | undefined;
33
- "aria-dropeffect"?: "none" | "copy" | "execute" | "link" | "move" | "popup" | undefined;
34
- "aria-errormessage"?: string | undefined;
35
- "aria-expanded"?: (boolean | "true" | "false") | undefined;
36
- "aria-flowto"?: string | undefined;
37
- "aria-grabbed"?: (boolean | "true" | "false") | undefined;
38
- "aria-haspopup"?: boolean | "false" | "true" | "menu" | "listbox" | "tree" | "grid" | "dialog" | undefined;
39
- "aria-hidden"?: (boolean | "true" | "false") | undefined;
40
- "aria-invalid"?: boolean | "false" | "true" | "grammar" | "spelling" | undefined;
41
- "aria-keyshortcuts"?: string | undefined;
42
- "aria-label"?: string | undefined;
43
- "aria-labelledby"?: string | undefined;
44
- "aria-level"?: number | undefined;
45
- "aria-live"?: "off" | "assertive" | "polite" | undefined;
46
- "aria-modal"?: (boolean | "true" | "false") | undefined;
47
- "aria-multiline"?: (boolean | "true" | "false") | undefined;
48
- "aria-multiselectable"?: (boolean | "true" | "false") | undefined;
49
- "aria-orientation"?: "horizontal" | "vertical" | undefined;
50
- "aria-owns"?: string | undefined;
51
- "aria-placeholder"?: string | undefined;
52
- "aria-posinset"?: number | undefined;
53
- "aria-pressed"?: boolean | "false" | "mixed" | "true" | undefined;
54
- "aria-readonly"?: (boolean | "true" | "false") | undefined;
55
- "aria-relevant"?: "additions" | "additions removals" | "additions text" | "all" | "removals" | "removals additions" | "removals text" | "text" | "text additions" | "text removals" | undefined;
56
- "aria-required"?: (boolean | "true" | "false") | undefined;
57
- "aria-roledescription"?: string | undefined;
58
- "aria-rowcount"?: number | undefined;
59
- "aria-rowindex"?: number | undefined;
60
- "aria-rowindextext"?: string | undefined;
61
- "aria-rowspan"?: number | undefined;
62
- "aria-selected"?: (boolean | "true" | "false") | undefined;
63
- "aria-setsize"?: number | undefined;
64
- "aria-sort"?: "none" | "ascending" | "descending" | "other" | undefined;
65
- "aria-valuemax"?: number | undefined;
66
- "aria-valuemin"?: number | undefined;
67
- "aria-valuenow"?: number | undefined;
68
- "aria-valuetext"?: string | undefined;
69
- beforeContent?: import("react").ReactNode;
70
- afterContent?: import("react").ReactNode;
71
- content?: import("@cloud-ru/ds-list").ItemContentProps | import("react").ReactNode;
72
- onMouseDown?(e: MouseEvent<HTMLElement>): void;
73
- onKeyDown?(e: import("react").KeyboardEvent<HTMLElement>): void;
74
- onFocus?(e: import("react").FocusEvent<HTMLElement>): void;
75
- onBlur?(e: import("react").FocusEvent<HTMLElement>): void;
76
- id?: import("@cloud-ru/ds-list").ItemId;
77
- disabled?: boolean;
78
- hidden?: boolean;
79
- itemRef?: import("react").RefObject<HTMLElement>;
80
- className?: string;
81
- inactive?: boolean;
82
- switch?: boolean;
83
- showSwitchIcon?: boolean;
84
- itemWrapRender?(item: import("react").ReactNode): import("react").ReactNode;
85
- checked?: boolean;
86
- })[];
14
+ type UserMenuSections = Required<Pick<ListProps, 'pinTop' | 'items' | 'pinBottom'>>;
15
+ export declare function useUserMenuItems({ profile, theme, onLogout, topItems, organizationItems, bottomItems, isMobile, onClose, settingItems, }: UseMenuItems): UserMenuSections;
87
16
  export {};
@@ -12,21 +12,12 @@ const DIVIDER_ITEM = {
12
12
  divider: true,
13
13
  items: [],
14
14
  };
15
- function useUserMenuItems({ profile, theme, onLogout, items: itemsProp = [], isMobile, onClose, settingItems = [], }) {
15
+ function useUserMenuItems({ profile, theme, onLogout, topItems = [], organizationItems = [], bottomItems = [], isMobile, onClose, settingItems = [], }) {
16
16
  const profileItem = (0, useProfileItem_1.useProfileItem)(profile);
17
17
  const themeItem = (0, useThemeItem_1.useThemeItem)({ ...(theme || {}), isMobile, onClose });
18
18
  const logoutItem = (0, useLogoutItem_1.useLogoutItem)({ onLogout });
19
- const items = (0, react_1.useMemo)(() => {
20
- let items = [profileItem];
21
- if (themeItem) {
22
- items = items.concat([DIVIDER_ITEM, themeItem]);
23
- }
24
- items = items.concat(itemsProp);
25
- items = items.concat(logoutItem);
26
- if (isMobile && Boolean(settingItems?.length)) {
27
- items = items.concat([DIVIDER_ITEM, ...settingItems]);
28
- }
29
- return items.map(item => {
19
+ return (0, react_1.useMemo)(() => {
20
+ const withClose = (list) => list.map(item => {
30
21
  if ((0, list_1.isBaseItemProps)(item)) {
31
22
  return {
32
23
  ...item,
@@ -40,6 +31,19 @@ function useUserMenuItems({ profile, theme, onLogout, items: itemsProp = [], isM
40
31
  }
41
32
  return item;
42
33
  });
43
- }, [isMobile, itemsProp, logoutItem, onClose, profileItem, settingItems, themeItem]);
44
- return items;
34
+ let pinTop = [profileItem];
35
+ if (themeItem) {
36
+ pinTop = pinTop.concat([DIVIDER_ITEM, themeItem]);
37
+ }
38
+ pinTop = pinTop.concat(topItems);
39
+ let pinBottom = bottomItems.concat(logoutItem);
40
+ if (isMobile && Boolean(settingItems?.length)) {
41
+ pinBottom = pinBottom.concat([DIVIDER_ITEM, ...settingItems]);
42
+ }
43
+ // В шторке прокручивается всё меню, закреплять части незачем; разделитель над организациями добавляем сами
44
+ if (isMobile) {
45
+ return { pinTop: [], items: withClose([...pinTop, DIVIDER_ITEM, ...organizationItems, ...pinBottom]), pinBottom: [] };
46
+ }
47
+ return { pinTop: withClose(pinTop), items: withClose(organizationItems), pinBottom: withClose(pinBottom) };
48
+ }, [bottomItems, isMobile, logoutItem, onClose, organizationItems, profileItem, settingItems, themeItem, topItems]);
45
49
  }
@@ -2,6 +2,6 @@
2
2
  width:256px;
3
3
  }
4
4
 
5
- .userMenuTrigger{
6
- display:block;
5
+ .profileSettingsIcon{
6
+ color:var(--sn-theme-color-neutral-text, var(--sn-brand-color-neutral-40, var(--sn-brand-palette-gray-40, #81869c)));
7
7
  }
@@ -1,4 +1,5 @@
1
1
  export * from './components';
2
2
  export * from './constants';
3
+ export * from './hooks/useDesktopComfortClassName';
3
4
  export * from './locale';
4
5
  export { useLocalStorage } from '@cloud-ru/ds-utils';
package/dist/cjs/index.js CHANGED
@@ -17,6 +17,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
17
17
  exports.useLocalStorage = void 0;
18
18
  __exportStar(require("./components"), exports);
19
19
  __exportStar(require("./constants"), exports);
20
+ __exportStar(require("./hooks/useDesktopComfortClassName"), exports);
20
21
  __exportStar(require("./locale"), exports);
21
22
  var utils_1 = require("@cloud-ru/ds-utils");
22
23
  Object.defineProperty(exports, "useLocalStorage", { enumerable: true, get: function () { return utils_1.useLocalStorage; } });
@@ -56,6 +56,9 @@
56
56
  gap:var(--sn-primitive-dimension-4, 4px);
57
57
  align-items:center;
58
58
  }
59
+ .logoWrap[data-with-mode]{
60
+ padding:0 var(--sn-primitive-dimension-4, 4px);
61
+ }
59
62
 
60
63
  .iconStack{
61
64
  position:relative;
@@ -196,7 +199,7 @@
196
199
  .actions{
197
200
  display:flex;
198
201
  flex-shrink:0;
199
- gap:var(--sn-primitive-dimension-8, 8px);
202
+ gap:var(--sn-primitive-dimension-0, 0px);
200
203
  align-items:center;
201
204
  margin-left:auto;
202
205
  }
@@ -324,10 +327,6 @@
324
327
  min-width:0;
325
328
  color:var(--sn-theme-color-available-version-textMain, var(--sn-brand-color-text-version-main, #41424e));
326
329
  }
327
- .headerTitle:hover .headerActions, .headerTitle:focus-visible .headerActions, .headerTitle:has(:focus-visible) .headerActions{
328
- pointer-events:auto;
329
- opacity:1;
330
- }
331
330
 
332
331
  .group{
333
332
  position:relative;
@@ -394,10 +393,10 @@
394
393
  grid-template-columns:repeat(3, minmax(auto, 1fr));
395
394
  gap:var(--sn-primitive-dimension-4, 4px);
396
395
  }
397
- .groupBody:not([data-mobile]):not([data-subcategory-body]){
396
+ .groupBody:not([data-subcategory-body]){
398
397
  padding:var(--sn-primitive-dimension-4, 4px);
399
398
  }
400
- .groupBody:not([data-mobile]):not([data-show-description]){
399
+ .groupBody:not([data-show-description]){
401
400
  gap:var(--sn-primitive-dimension-0, 0px);
402
401
  }
403
402
  @container (width <= 728px){
@@ -773,6 +772,12 @@
773
772
  flex-shrink:1;
774
773
  justify-content:flex-start;
775
774
  }
775
+ .closeButton.closeButton[data-view=simple][data-appearance=neutral] [data-text-opacity]{
776
+ color:var(--sn-theme-color-available-version-textSecondary, var(--sn-brand-color-text-version-secondary, rgba(65, 66, 78, 0.8)));
777
+ }
778
+ .closeButton.closeButton[data-view=simple][data-appearance=neutral] [aria-hidden][data-text-opacity]{
779
+ color:var(--sn-theme-color-available-version-textTertiary, var(--sn-brand-color-text-version-tertiary, rgba(65, 66, 78, 0.5490196078)));
780
+ }
776
781
  .menuHeader{
777
782
  height:var(--sn-primitive-dimension-40, 40px);
778
783
  }
@@ -895,6 +900,7 @@
895
900
  .breadcrumbs{
896
901
  display:flex;
897
902
  align-items:center;
903
+ box-sizing:border-box;
898
904
  min-width:0;
899
905
  height:100%;
900
906
  padding:0 var(--sn-primitive-dimension-8, 8px) !important;
@@ -914,6 +920,6 @@
914
920
  width:256px;
915
921
  }
916
922
 
917
- .userMenuTrigger{
918
- display:block;
923
+ .profileSettingsIcon{
924
+ color:var(--sn-theme-color-neutral-text, var(--sn-brand-color-neutral-40, var(--sn-brand-palette-gray-40, #81869c)));
919
925
  }
@@ -1,7 +1,6 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { Button } from '@cloud-ru/ds-button';
3
3
  import { WithTooltip } from '@cloud-ru/ds-tooltip';
4
- import cn from 'classnames';
5
4
  import styles from './styles.module.css';
6
5
  /**
7
6
  * HeaderButton — кнопка хедера с тултипом (лого, пользовательское меню и т.п.).
@@ -21,5 +20,5 @@ export function HeaderButton({ tooltip, isMobile, className, ...rest }) {
21
20
  placement: 'bottom',
22
21
  ...tooltip,
23
22
  triggerClassName: styles.tooltipTrigger,
24
- }, children: _jsx(Button, { ...rest, size: 'm', appearance: 'neutral', view: 'simple', className: cn(styles.headerButton, className) }) }));
23
+ }, children: _jsx(Button, { ...rest, size: 'm', appearance: 'neutral', view: 'simple', className: className }) }));
25
24
  }
@@ -7,7 +7,7 @@ import { extractDataTestProps } from '@cloud-ru/ds-utils';
7
7
  import cn from 'classnames';
8
8
  import { useEffect, useMemo, useState } from 'react';
9
9
  import { HeaderButton } from '../HeaderButton/index.js';
10
- import { HEADER_LOGO_MODE, MAP_LOGO_MODE_TO_APPEARANCE } from './constants.js';
10
+ import { HEADER_LOGO_MODE, MAP_LOGO_MODE_TO_APPEARANCE, MAP_LOGO_MODE_TO_LABEL } from './constants.js';
11
11
  import styles from './styles.module.css';
12
12
  export function Logo({ path, loading, mode, href, onClick, className, tooltip, ...rest }) {
13
13
  const [error, setError] = useState(false);
@@ -23,7 +23,8 @@ export function Logo({ path, loading, mode, href, onClick, className, tooltip, .
23
23
  setError(true);
24
24
  } }));
25
25
  }
26
- return (_jsxs("span", { className: styles.logoWrap, children: [_jsxs("span", { className: styles.iconStack, children: [_jsx(CloudLogo, { size: 24, className: cn(styles.icon, logoThemeClassName, styles.iconDefault) }), _jsx(HomeFilledSVG, { size: 24, className: cn(styles.icon, logoThemeClassName, styles.iconHover) })] }), mode && mode !== HEADER_LOGO_MODE.Prod && (_jsx(PromoTag, { as: 'span', label: mode, size: 'xs', appearance: MAP_LOGO_MODE_TO_APPEARANCE[mode] }))] }));
26
+ const showMode = mode && mode !== HEADER_LOGO_MODE.Prod;
27
+ return (_jsxs("span", { className: styles.logoWrap, "data-with-mode": showMode || undefined, children: [_jsxs("span", { className: styles.iconStack, children: [_jsx(CloudLogo, { size: 24, className: cn(styles.icon, logoThemeClassName, styles.iconDefault) }), _jsx(HomeFilledSVG, { size: 24, className: cn(styles.icon, logoThemeClassName, styles.iconHover) })] }), showMode && (_jsx(PromoTag, { as: 'span', label: MAP_LOGO_MODE_TO_LABEL[mode], size: 'xs', appearance: MAP_LOGO_MODE_TO_APPEARANCE[mode] }))] }));
27
28
  }, [error, mode, path, logoThemeClassName]);
28
29
  return (_jsx(HeaderButton, { as: 'a', tooltip: tooltip, className: cn(styles.logo, className), href: href, tabIndex: 0, onClick: onClick, loading: loading, icon: logo, ...extractDataTestProps(rest) }));
29
30
  }
@@ -8,3 +8,5 @@ export declare const HEADER_LOGO_MODE: {
8
8
  };
9
9
  export type HeaderLogoMode = ValueOf<typeof HEADER_LOGO_MODE>;
10
10
  export declare const MAP_LOGO_MODE_TO_APPEARANCE: Record<Exclude<HeaderLogoMode, 'prod'>, PromoTagProps['appearance']>;
11
+ /** Подпись тега режима, как в макете `logoEvo` */
12
+ export declare const MAP_LOGO_MODE_TO_LABEL: Record<Exclude<HeaderLogoMode, 'prod'>, string>;
@@ -9,3 +9,9 @@ export const MAP_LOGO_MODE_TO_APPEARANCE = {
9
9
  [HEADER_LOGO_MODE.Stage]: 'orange',
10
10
  [HEADER_LOGO_MODE.Hybrid]: 'violet',
11
11
  };
12
+ /** Подпись тега режима, как в макете `logoEvo` */
13
+ export const MAP_LOGO_MODE_TO_LABEL = {
14
+ [HEADER_LOGO_MODE.Develop]: 'dev',
15
+ [HEADER_LOGO_MODE.Stage]: 'stage',
16
+ [HEADER_LOGO_MODE.Hybrid]: 'hybrid',
17
+ };
@@ -9,6 +9,9 @@
9
9
  gap:var(--sn-primitive-dimension-4, 4px);
10
10
  align-items:center;
11
11
  }
12
+ .logoWrap[data-with-mode]{
13
+ padding:0 var(--sn-primitive-dimension-4, 4px);
14
+ }
12
15
 
13
16
  .iconStack{
14
17
  position:relative;
@@ -32,7 +32,7 @@
32
32
  .actions{
33
33
  display:flex;
34
34
  flex-shrink:0;
35
- gap:var(--sn-primitive-dimension-8, 8px);
35
+ gap:var(--sn-primitive-dimension-0, 0px);
36
36
  align-items:center;
37
37
  margin-left:auto;
38
38
  }
@@ -40,10 +40,6 @@
40
40
  min-width:0;
41
41
  color:var(--sn-theme-color-available-version-textMain, var(--sn-brand-color-text-version-main, #41424e));
42
42
  }
43
- .headerTitle:hover .headerActions, .headerTitle:focus-visible .headerActions, .headerTitle:has(:focus-visible) .headerActions{
44
- pointer-events:auto;
45
- opacity:1;
46
- }
47
43
 
48
44
  .group{
49
45
  position:relative;
@@ -110,10 +106,10 @@
110
106
  grid-template-columns:repeat(3, minmax(auto, 1fr));
111
107
  gap:var(--sn-primitive-dimension-4, 4px);
112
108
  }
113
- .groupBody:not([data-mobile]):not([data-subcategory-body]){
109
+ .groupBody:not([data-subcategory-body]){
114
110
  padding:var(--sn-primitive-dimension-4, 4px);
115
111
  }
116
- .groupBody:not([data-mobile]):not([data-show-description]){
112
+ .groupBody:not([data-show-description]){
117
113
  gap:var(--sn-primitive-dimension-0, 0px);
118
114
  }
119
115
  @container (width <= 728px){
@@ -61,5 +61,5 @@ export function Favorites({ favorite, allServiceGroups, headerClassName, isMobil
61
61
  onChange: favorite.onChange(service.id),
62
62
  }, ...getCommonCardProps(service, handleFavoriteServiceClick(service)) }, service.id))), !isEmpty && !isFavoritesSegment && recentCards] }) }) })) : (_jsx(FavoritesSortable, { favorite: favorite, favoriteItems: favoriteItems, segment: resolvedSegment, setSegment: setSegment, isEmpty: isEmpty, recentCards: recentCards, onFavoriteServiceClick: handleFavoriteServiceClick }));
63
63
  })();
64
- return (_jsxs("div", { className: styles.root, "data-test-id": FAVORITES_TEST_IDS.root, children: [_jsxs("div", { className: cn(styles.header, headerClassName), "data-test-id": FAVORITES_TEST_IDS.header, children: [_jsx(SegmentControl, { size: 'm', width: WIDTH.Full, value: loading ? undefined : segment, onChange: setSegment, className: styles.segmentControl, "data-test-id": FAVORITES_TEST_IDS.segmentControl, items: segmentControlItems }), favorite.actions && (_jsx(Droplist, { size: 'm', ...favorite.actions, className: comfortClassName, closeDroplistOnItemClick: true, children: _jsx(Button, { view: 'function', size: 'm', appearance: 'neutral', icon: _jsx(KebabSVG, { size: 24 }), "data-test-id": FAVORITES_TEST_IDS.settingsButton, disabled: loading }) }))] }), content] }));
64
+ return (_jsxs("div", { className: styles.root, "data-test-id": FAVORITES_TEST_IDS.root, children: [_jsxs("div", { className: cn(styles.header, headerClassName), "data-test-id": FAVORITES_TEST_IDS.header, children: [_jsx(SegmentControl, { size: 'm', width: WIDTH.Full, value: loading ? undefined : segment, onChange: setSegment, className: styles.segmentControl, "data-test-id": FAVORITES_TEST_IDS.segmentControl, items: segmentControlItems }), favorite.actions && (_jsx(Droplist, { size: 'm', ...favorite.actions, className: comfortClassName, closeDroplistOnItemClick: true, children: _jsx(Button, { view: 'simple', size: 'm', appearance: 'neutral', icon: _jsx(KebabSVG, { size: 24 }), "data-test-id": FAVORITES_TEST_IDS.settingsButton, disabled: loading }) }))] }), content] }));
65
65
  }
@@ -13,4 +13,10 @@
13
13
  flex-grow:1;
14
14
  flex-shrink:1;
15
15
  justify-content:flex-start;
16
+ }
17
+ .closeButton.closeButton[data-view=simple][data-appearance=neutral] [data-text-opacity]{
18
+ color:var(--sn-theme-color-available-version-textSecondary, var(--sn-brand-color-text-version-secondary, rgba(65, 66, 78, 0.8)));
19
+ }
20
+ .closeButton.closeButton[data-view=simple][data-appearance=neutral] [aria-hidden][data-text-opacity]{
21
+ color:var(--sn-theme-color-available-version-textTertiary, var(--sn-brand-color-text-version-tertiary, rgba(65, 66, 78, 0.5490196078)));
16
22
  }
@@ -6,5 +6,5 @@ import { headerLocale } from '../../../../locale/index.js';
6
6
  import styles from './styles.module.css';
7
7
  export const Search = forwardRef(({ value, onChange, onBlur, onFocus, isMobile = false }, ref) => {
8
8
  const { t } = headerLocale.useTranslations();
9
- return (_jsx("div", { className: styles.searchWrap, "data-mobile": isMobile || undefined, children: _jsx(SearchSnack, { ref: ref, size: 'm', outline: !isMobile, placeholder: t('searchByServices'), value: value, onChange: onChange, onBlur: onBlur, onFocus: onFocus, "data-test-id": TEST_IDS.mainMenu.search, className: styles.search, background: isMobile }) }));
9
+ return (_jsx("div", { className: styles.searchWrap, "data-mobile": isMobile || undefined, children: _jsx(SearchSnack, { ref: ref, size: 'm', outline: false, placeholder: t('searchByServices'), value: value, onChange: onChange, onBlur: onBlur, onFocus: onFocus, "data-test-id": TEST_IDS.mainMenu.search, className: styles.search, background: isMobile }) }));
10
10
  });