@cloud-ru/uikit-product-header 5.0.21 → 5.0.23

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -3,6 +3,31 @@
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
+ ## 5.0.23 (2025-11-25)
7
+
8
+
9
+ ### Bug Fixes
10
+
11
+ * **FF-7638:** mobile-header search default open if has value ([9e958ab](https://gitverse.ru/cloud-ru-tech/uikit-product/commits/9e958ab193f08eb8ee94f8602f128468ae331cb1))
12
+
13
+
14
+
15
+
16
+
17
+ ## 5.0.22 (2025-11-24)
18
+
19
+ ### Only dependencies have been changed
20
+ * [@cloud-ru/uikit-product-card-predefined@0.8.17](https://gitverse.ru/cloud-ru-tech/uikit-product/-/blob/master/packages/card-predefined/CHANGELOG.md)
21
+ * [@cloud-ru/uikit-product-icons@15.1.6](https://gitverse.ru/cloud-ru-tech/uikit-product/-/blob/master/packages/icons/CHANGELOG.md)
22
+ * [@cloud-ru/uikit-product-mobile-drawer@0.9.20](https://gitverse.ru/cloud-ru-tech/uikit-product/-/blob/master/packages/mobile-drawer/CHANGELOG.md)
23
+ * [@cloud-ru/uikit-product-mobile-modal@0.9.23](https://gitverse.ru/cloud-ru-tech/uikit-product/-/blob/master/packages/mobile-modal/CHANGELOG.md)
24
+ * [@cloud-ru/uikit-product-title-clickable@0.0.53](https://gitverse.ru/cloud-ru-tech/uikit-product/-/blob/master/packages/title-clickable/CHANGELOG.md)
25
+ * [@cloud-ru/uikit-product-utils@8.0.1](https://gitverse.ru/cloud-ru-tech/uikit-product/-/blob/master/packages/utils/CHANGELOG.md)
26
+
27
+
28
+
29
+
30
+
6
31
  ## 5.0.21 (2025-11-24)
7
32
 
8
33
  ### Only dependencies have been changed
@@ -20,7 +20,7 @@ const styles_module_scss_1 = __importDefault(require('./styles.module.css'));
20
20
  exports.SearchMobile = (0, react_1.forwardRef)(({ searchValue, searchFn, searchFunctions, onChangeSearchFn, onSearchValueChange }, ref) => {
21
21
  const { t } = (0, uikit_product_locale_1.useLocale)('Header');
22
22
  const [areSearchSettingsVisible, setAreSearchSettingsVisible] = (0, react_1.useState)(false);
23
- const { searchRef: newSearchRef, animationState, toggleSearchActive, isSearchActive, searchInputTabIndex, } = (0, hooks_1.useSearchAnimation)();
23
+ const { searchRef: newSearchRef, animationState, toggleSearchActive, isSearchActive, searchInputTabIndex, } = (0, hooks_1.useSearchAnimation)(searchValue.length > 0);
24
24
  return ((0, jsx_runtime_1.jsx)("div", { className: styles_module_scss_1.default.searchItem, ref: ref, children: (0, jsx_runtime_1.jsxs)("div", { className: styles_module_scss_1.default.searchWrap, style: {
25
25
  // eslint-disable-next-line @typescript-eslint/ban-ts-comment
26
26
  // @ts-ignore
@@ -1,4 +1,4 @@
1
- export declare function useSearchAnimation(): {
1
+ export declare function useSearchAnimation(defaultSearchActive: boolean): {
2
2
  searchRef: import("react").RefObject<HTMLInputElement>;
3
3
  toggleSearchActive: () => void;
4
4
  isSearchActive: boolean;
@@ -7,9 +7,9 @@ exports.useSearchAnimation = useSearchAnimation;
7
7
  const react_1 = require("react");
8
8
  const react_transition_state_1 = __importDefault(require("react-transition-state"));
9
9
  const constants_1 = require("./constants");
10
- function useSearchAnimation() {
10
+ function useSearchAnimation(defaultSearchActive) {
11
11
  const searchRef = (0, react_1.useRef)(null);
12
- const [isSearchActive, setIsSearchActive] = (0, react_1.useState)(false);
12
+ const [isSearchActive, setIsSearchActive] = (0, react_1.useState)(defaultSearchActive);
13
13
  const searchInputTabIndex = isSearchActive ? undefined : -1;
14
14
  const [animationState, toggle] = (0, react_transition_state_1.default)({
15
15
  mountOnEnter: true,
@@ -14,7 +14,7 @@ import styles from './styles.module.css';
14
14
  export const SearchMobile = forwardRef(({ searchValue, searchFn, searchFunctions, onChangeSearchFn, onSearchValueChange }, ref) => {
15
15
  const { t } = useLocale('Header');
16
16
  const [areSearchSettingsVisible, setAreSearchSettingsVisible] = useState(false);
17
- const { searchRef: newSearchRef, animationState, toggleSearchActive, isSearchActive, searchInputTabIndex, } = useSearchAnimation();
17
+ const { searchRef: newSearchRef, animationState, toggleSearchActive, isSearchActive, searchInputTabIndex, } = useSearchAnimation(searchValue.length > 0);
18
18
  return (_jsx("div", { className: styles.searchItem, ref: ref, children: _jsxs("div", { className: styles.searchWrap, style: {
19
19
  // eslint-disable-next-line @typescript-eslint/ban-ts-comment
20
20
  // @ts-ignore
@@ -1,4 +1,4 @@
1
- export declare function useSearchAnimation(): {
1
+ export declare function useSearchAnimation(defaultSearchActive: boolean): {
2
2
  searchRef: import("react").RefObject<HTMLInputElement>;
3
3
  toggleSearchActive: () => void;
4
4
  isSearchActive: boolean;
@@ -1,9 +1,9 @@
1
1
  import { useEffect, useRef, useState } from 'react';
2
2
  import useTransition from 'react-transition-state';
3
3
  import { SEARCH_TRANSITION_TIMEOUT } from './constants';
4
- export function useSearchAnimation() {
4
+ export function useSearchAnimation(defaultSearchActive) {
5
5
  const searchRef = useRef(null);
6
- const [isSearchActive, setIsSearchActive] = useState(false);
6
+ const [isSearchActive, setIsSearchActive] = useState(defaultSearchActive);
7
7
  const searchInputTabIndex = isSearchActive ? undefined : -1;
8
8
  const [animationState, toggle] = useTransition({
9
9
  mountOnEnter: true,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@cloud-ru/uikit-product-header",
3
3
  "title": "Header",
4
- "version": "5.0.21",
4
+ "version": "5.0.23",
5
5
  "sideEffects": [
6
6
  "*.css",
7
7
  "*.woff",
@@ -36,12 +36,12 @@
36
36
  },
37
37
  "scripts": {},
38
38
  "dependencies": {
39
- "@cloud-ru/uikit-product-card-predefined": "0.8.16",
40
- "@cloud-ru/uikit-product-icons": "15.1.5",
41
- "@cloud-ru/uikit-product-mobile-drawer": "0.9.19",
42
- "@cloud-ru/uikit-product-mobile-modal": "0.9.22",
43
- "@cloud-ru/uikit-product-title-clickable": "0.0.52",
44
- "@cloud-ru/uikit-product-utils": "8.0.0",
39
+ "@cloud-ru/uikit-product-card-predefined": "0.8.17",
40
+ "@cloud-ru/uikit-product-icons": "15.1.6",
41
+ "@cloud-ru/uikit-product-mobile-drawer": "0.9.20",
42
+ "@cloud-ru/uikit-product-mobile-modal": "0.9.23",
43
+ "@cloud-ru/uikit-product-title-clickable": "0.0.53",
44
+ "@cloud-ru/uikit-product-utils": "8.0.1",
45
45
  "@snack-uikit/avatar": "0.8.14",
46
46
  "@snack-uikit/breadcrumbs": "0.11.22",
47
47
  "@snack-uikit/button": "0.19.16",
@@ -64,5 +64,5 @@
64
64
  "peerDependencies": {
65
65
  "@cloud-ru/uikit-product-locale": "*"
66
66
  },
67
- "gitHead": "46b285728ff0dfe51d89b375469a6c05d6f2dba9"
67
+ "gitHead": "ac5d22096f6803642772dad0ca27a670aee92c1b"
68
68
  }
@@ -26,7 +26,7 @@ export const SearchMobile = forwardRef<HTMLDivElement, SearchProps>(
26
26
  toggleSearchActive,
27
27
  isSearchActive,
28
28
  searchInputTabIndex,
29
- } = useSearchAnimation();
29
+ } = useSearchAnimation(searchValue.length > 0);
30
30
 
31
31
  return (
32
32
  <div className={styles.searchItem} ref={ref}>
@@ -3,10 +3,10 @@ import useTransition from 'react-transition-state';
3
3
 
4
4
  import { SEARCH_TRANSITION_TIMEOUT } from './constants';
5
5
 
6
- export function useSearchAnimation() {
6
+ export function useSearchAnimation(defaultSearchActive: boolean) {
7
7
  const searchRef = useRef<HTMLInputElement>(null);
8
8
 
9
- const [isSearchActive, setIsSearchActive] = useState<boolean>(false);
9
+ const [isSearchActive, setIsSearchActive] = useState<boolean>(defaultSearchActive);
10
10
 
11
11
  const searchInputTabIndex = isSearchActive ? undefined : -1;
12
12