@megafon/ui-shared 5.13.0 → 5.14.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/CHANGELOG.md +11 -0
- package/dist/es/components/AccordionBox/AccordionBox.d.ts +4 -0
- package/dist/es/components/AccordionBox/AccordionBox.js +3 -1
- package/dist/es/helpers/getColumnConfig.d.ts +1 -1
- package/dist/lib/components/AccordionBox/AccordionBox.d.ts +4 -0
- package/dist/lib/components/AccordionBox/AccordionBox.js +3 -1
- package/dist/lib/helpers/getColumnConfig.d.ts +1 -1
- package/package.json +3 -3
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
|
+
# [5.14.0](https://hq-gitlab.megafon.ru/site-portal/services/megafon-ui/compare/@megafon/ui-shared@5.13.0...@megafon/ui-shared@5.14.0) (2024-06-26)
|
7
|
+
|
8
|
+
|
9
|
+
### Features
|
10
|
+
|
11
|
+
* **accordion:** add new prop titleTag for change title tag, add classes.title prop" ([6f265f5](https://hq-gitlab.megafon.ru/site-portal/services/megafon-ui/commit/6f265f53bbd552957454405d8c95cbe1549c72dd))
|
12
|
+
|
13
|
+
|
14
|
+
|
15
|
+
|
16
|
+
|
6
17
|
# [5.13.0](https://hq-gitlab.megafon.ru/site-portal/services/megafon-ui/compare/@megafon/ui-shared@5.12.0...@megafon/ui-shared@5.13.0) (2024-06-17)
|
7
18
|
|
8
19
|
|
@@ -1,4 +1,5 @@
|
|
1
1
|
import * as React from 'react';
|
2
|
+
import { IHeaderProps } from '@megafon/ui-core/dist/lib/components/Header/Header';
|
2
3
|
import './AccordionBox.less';
|
3
4
|
export interface IAccordionBox {
|
4
5
|
/** Дополнительные data атрибуты к внутренним элементам */
|
@@ -19,6 +20,8 @@ export interface IAccordionBox {
|
|
19
20
|
rootRef?: React.Ref<HTMLDivElement>;
|
20
21
|
/** Заголовок аккордеона */
|
21
22
|
title: string;
|
23
|
+
/** Заголовок аккордеона */
|
24
|
+
titleTag?: IHeaderProps['as'];
|
22
25
|
/** Состояние аккордеона, заданное извне */
|
23
26
|
isOpened?: boolean;
|
24
27
|
/** Включить микроразметку */
|
@@ -35,6 +38,7 @@ export interface IAccordionBox {
|
|
35
38
|
root?: string;
|
36
39
|
collapse?: string;
|
37
40
|
titleWrap?: string;
|
41
|
+
title?: string;
|
38
42
|
};
|
39
43
|
/** Обработчик клика */
|
40
44
|
onClickAccordion?: (isOpened: boolean) => void;
|
@@ -67,6 +67,7 @@ AccordionBox.propTypes = {
|
|
67
67
|
current: PropTypes.elementType
|
68
68
|
}), PropTypes.any])]),
|
69
69
|
title: PropTypes.string.isRequired,
|
70
|
+
titleTag: PropTypes.oneOf(['h1', 'h2', 'h3', 'h5']),
|
70
71
|
isFullWidth: PropTypes.bool,
|
71
72
|
isOpened: PropTypes.bool,
|
72
73
|
hasMicrodata: PropTypes.bool,
|
@@ -76,7 +77,8 @@ AccordionBox.propTypes = {
|
|
76
77
|
openedClass: PropTypes.string,
|
77
78
|
root: PropTypes.string,
|
78
79
|
collapse: PropTypes.string,
|
79
|
-
titleWrap: PropTypes.string
|
80
|
+
titleWrap: PropTypes.string,
|
81
|
+
title: PropTypes.string
|
80
82
|
}),
|
81
83
|
onClickAccordion: PropTypes.func
|
82
84
|
};
|
@@ -1,2 +1,2 @@
|
|
1
1
|
import React from 'react';
|
2
|
-
export declare const getColumnConfig: (isFullWidth: boolean) => Pick<React.PropsWithChildren<import("
|
2
|
+
export declare const getColumnConfig: (isFullWidth: boolean) => Pick<React.PropsWithChildren<import("../../../ui-core/dist/lib/components/Grid/GridColumn").IGridColumn>, "all" | "wide" | "mobile" | "desktop" | "tablet">;
|
@@ -1,4 +1,5 @@
|
|
1
1
|
import * as React from 'react';
|
2
|
+
import { IHeaderProps } from '@megafon/ui-core/dist/lib/components/Header/Header';
|
2
3
|
import './AccordionBox.less';
|
3
4
|
export interface IAccordionBox {
|
4
5
|
/** Дополнительные data атрибуты к внутренним элементам */
|
@@ -19,6 +20,8 @@ export interface IAccordionBox {
|
|
19
20
|
rootRef?: React.Ref<HTMLDivElement>;
|
20
21
|
/** Заголовок аккордеона */
|
21
22
|
title: string;
|
23
|
+
/** Заголовок аккордеона */
|
24
|
+
titleTag?: IHeaderProps['as'];
|
22
25
|
/** Состояние аккордеона, заданное извне */
|
23
26
|
isOpened?: boolean;
|
24
27
|
/** Включить микроразметку */
|
@@ -35,6 +38,7 @@ export interface IAccordionBox {
|
|
35
38
|
root?: string;
|
36
39
|
collapse?: string;
|
37
40
|
titleWrap?: string;
|
41
|
+
title?: string;
|
38
42
|
};
|
39
43
|
/** Обработчик клика */
|
40
44
|
onClickAccordion?: (isOpened: boolean) => void;
|
@@ -88,6 +88,7 @@ AccordionBox.propTypes = {
|
|
88
88
|
current: PropTypes.elementType
|
89
89
|
}), PropTypes.any])]),
|
90
90
|
title: PropTypes.string.isRequired,
|
91
|
+
titleTag: PropTypes.oneOf(['h1', 'h2', 'h3', 'h5']),
|
91
92
|
isFullWidth: PropTypes.bool,
|
92
93
|
isOpened: PropTypes.bool,
|
93
94
|
hasMicrodata: PropTypes.bool,
|
@@ -97,7 +98,8 @@ AccordionBox.propTypes = {
|
|
97
98
|
openedClass: PropTypes.string,
|
98
99
|
root: PropTypes.string,
|
99
100
|
collapse: PropTypes.string,
|
100
|
-
titleWrap: PropTypes.string
|
101
|
+
titleWrap: PropTypes.string,
|
102
|
+
title: PropTypes.string
|
101
103
|
}),
|
102
104
|
onClickAccordion: PropTypes.func
|
103
105
|
};
|
@@ -1,2 +1,2 @@
|
|
1
1
|
import React from 'react';
|
2
|
-
export declare const getColumnConfig: (isFullWidth: boolean) => Pick<React.PropsWithChildren<import("
|
2
|
+
export declare const getColumnConfig: (isFullWidth: boolean) => Pick<React.PropsWithChildren<import("../../../ui-core/dist/lib/components/Grid/GridColumn").IGridColumn>, "all" | "wide" | "mobile" | "desktop" | "tablet">;
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@megafon/ui-shared",
|
3
|
-
"version": "5.
|
3
|
+
"version": "5.14.0",
|
4
4
|
"files": [
|
5
5
|
"dist"
|
6
6
|
],
|
@@ -82,7 +82,7 @@
|
|
82
82
|
},
|
83
83
|
"dependencies": {
|
84
84
|
"@babel/runtime": "^7.8.4",
|
85
|
-
"@megafon/ui-core": "^5.
|
85
|
+
"@megafon/ui-core": "^5.16.0",
|
86
86
|
"@megafon/ui-helpers": "^2.6.0",
|
87
87
|
"core-js": "^3.6.4",
|
88
88
|
"htmr": "^0.9.2",
|
@@ -90,5 +90,5 @@
|
|
90
90
|
"prop-types": "^15.7.2",
|
91
91
|
"swiper": "^6.5.6"
|
92
92
|
},
|
93
|
-
"gitHead": "
|
93
|
+
"gitHead": "0d4f96ecbc805db6a1b2200dd9adbb707349d474"
|
94
94
|
}
|