@cloud-ru/uikit-product-utils 8.0.0 → 8.0.1

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,17 @@
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
+ ## 8.0.1 (2025-11-24)
7
+
8
+
9
+ ### Bug Fixes
10
+
11
+ * **FF-7533:** mobile layout type for small tablets ([22fc805](https://gitverse.ru/cloud-ru-tech/uikit-product/commits/22fc805273e29253c6e54f2587d121999744b1ff))
12
+
13
+
14
+
15
+
16
+
6
17
  # 8.0.0 (2025-11-24)
7
18
 
8
19
 
@@ -1,5 +1,5 @@
1
1
  import { AdaptiveQueriesTitle } from '../constants/adaptive';
2
2
  import { LayoutType, MatchMediaGeneric } from '../types/adaptive';
3
- export declare function getAdaptive({ isMobile }: MatchMediaGeneric<AdaptiveQueriesTitle>): {
3
+ export declare function getAdaptive({ isMobile, isTablet }: MatchMediaGeneric<AdaptiveQueriesTitle>): {
4
4
  layoutType: LayoutType;
5
5
  };
@@ -2,7 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.getAdaptive = getAdaptive;
4
4
  const getUserAgentInfo_1 = require("./getUserAgentInfo");
5
- function getAdaptive({ isMobile }) {
5
+ function getAdaptive({ isMobile, isTablet }) {
6
6
  const { device } = (0, getUserAgentInfo_1.getUserAgentInfo)();
7
7
  let layoutType;
8
8
  switch (device.type) {
@@ -10,7 +10,7 @@ function getAdaptive({ isMobile }) {
10
10
  layoutType = 'mobile';
11
11
  break;
12
12
  case 'tablet':
13
- layoutType = 'tablet';
13
+ layoutType = isMobile || isTablet ? 'mobile' : 'tablet';
14
14
  break;
15
15
  default:
16
16
  layoutType = isMobile ? 'desktopSmall' : 'desktop';
@@ -1,5 +1,5 @@
1
1
  import { AdaptiveQueriesTitle } from '../constants/adaptive';
2
2
  import { LayoutType, MatchMediaGeneric } from '../types/adaptive';
3
- export declare function getAdaptive({ isMobile }: MatchMediaGeneric<AdaptiveQueriesTitle>): {
3
+ export declare function getAdaptive({ isMobile, isTablet }: MatchMediaGeneric<AdaptiveQueriesTitle>): {
4
4
  layoutType: LayoutType;
5
5
  };
@@ -1,5 +1,5 @@
1
1
  import { getUserAgentInfo } from './getUserAgentInfo';
2
- export function getAdaptive({ isMobile }) {
2
+ export function getAdaptive({ isMobile, isTablet }) {
3
3
  const { device } = getUserAgentInfo();
4
4
  let layoutType;
5
5
  switch (device.type) {
@@ -7,7 +7,7 @@ export function getAdaptive({ isMobile }) {
7
7
  layoutType = 'mobile';
8
8
  break;
9
9
  case 'tablet':
10
- layoutType = 'tablet';
10
+ layoutType = isMobile || isTablet ? 'mobile' : 'tablet';
11
11
  break;
12
12
  default:
13
13
  layoutType = isMobile ? 'desktopSmall' : 'desktop';
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@cloud-ru/uikit-product-utils",
3
3
  "title": "Utils",
4
- "version": "8.0.0",
4
+ "version": "8.0.1",
5
5
  "sideEffects": [
6
6
  "*.css",
7
7
  "*.woff",
@@ -84,5 +84,5 @@
84
84
  "optional": true
85
85
  }
86
86
  },
87
- "gitHead": "46b285728ff0dfe51d89b375469a6c05d6f2dba9"
87
+ "gitHead": "8968606769e5da46db696dfa70d7ad999564388d"
88
88
  }
@@ -2,7 +2,7 @@ import { AdaptiveQueriesTitle } from '../constants/adaptive';
2
2
  import { LayoutType, MatchMediaGeneric } from '../types/adaptive';
3
3
  import { getUserAgentInfo } from './getUserAgentInfo';
4
4
 
5
- export function getAdaptive({ isMobile }: MatchMediaGeneric<AdaptiveQueriesTitle>) {
5
+ export function getAdaptive({ isMobile, isTablet }: MatchMediaGeneric<AdaptiveQueriesTitle>) {
6
6
  const { device } = getUserAgentInfo();
7
7
 
8
8
  let layoutType: LayoutType;
@@ -12,7 +12,7 @@ export function getAdaptive({ isMobile }: MatchMediaGeneric<AdaptiveQueriesTitle
12
12
  layoutType = 'mobile';
13
13
  break;
14
14
  case 'tablet':
15
- layoutType = 'tablet';
15
+ layoutType = isMobile || isTablet ? 'mobile' : 'tablet';
16
16
  break;
17
17
  default:
18
18
  layoutType = isMobile ? 'desktopSmall' : 'desktop';