@cloud-ru/uikit-product-site-hero 1.8.4 → 1.11.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 +33 -0
- package/dist/cjs/components/HeroCentral/helperComponents/HeroCentralButtons/HeroCentralButtons.d.ts +3 -1
- package/dist/cjs/components/HeroCentral/helperComponents/HeroCentralButtons/HeroCentralButtons.js +2 -2
- package/dist/esm/components/HeroCentral/helperComponents/HeroCentralButtons/HeroCentralButtons.d.ts +3 -1
- package/dist/esm/components/HeroCentral/helperComponents/HeroCentralButtons/HeroCentralButtons.js +2 -2
- package/package.json +2 -2
- package/src/components/HeroCentral/helperComponents/HeroCentralButtons/HeroCentralButtons.tsx +12 -7
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,39 @@
|
|
|
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
|
+
# 1.11.0 (2026-07-21)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Features
|
|
10
|
+
|
|
11
|
+
* **SITE-11480:** update heroCentral ([f554b7c](https://github.com/cloud-ru-tech/uikit-product/commit/f554b7cf869fff88eee90b52a4f652a04b04afd0))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
# 1.10.0 (2026-07-21)
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
### Features
|
|
21
|
+
|
|
22
|
+
* **SITE-11480:** update heroCentral ([f554b7c](https://github.com/cloud-ru-tech/uikit-product/commit/f554b7cf869fff88eee90b52a4f652a04b04afd0))
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
# 1.9.0 (2026-07-21)
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
### Features
|
|
32
|
+
|
|
33
|
+
* **SITE-11480:** update heroCentral ([f554b7c](https://github.com/cloud-ru-tech/uikit-product/commit/f554b7cf869fff88eee90b52a4f652a04b04afd0))
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
|
|
6
39
|
## 1.8.4 (2026-07-21)
|
|
7
40
|
|
|
8
41
|
### Only dependencies have been changed
|
package/dist/cjs/components/HeroCentral/helperComponents/HeroCentralButtons/HeroCentralButtons.d.ts
CHANGED
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import { WithLayoutType } from '@cloud-ru/uikit-product-utils';
|
|
2
|
+
import { ButtonFilledProps } from '@snack-uikit/button';
|
|
2
3
|
export type ButtonStyle = 'filled' | 'outline';
|
|
4
|
+
type ButtonProps = Pick<ButtonFilledProps, 'label' | 'href' | 'className' | 'fullWidth' | 'size' | 'target' | 'onClick'>;
|
|
3
5
|
export type HeroCentralButton = {
|
|
4
6
|
text: string;
|
|
5
7
|
uniqueId: string;
|
|
6
8
|
link?: string;
|
|
7
9
|
style?: ButtonStyle;
|
|
8
|
-
onClick?:
|
|
10
|
+
onClick?: ButtonProps['onClick'];
|
|
9
11
|
};
|
|
10
12
|
type HeroCentralButtonsProps = WithLayoutType<{
|
|
11
13
|
buttons?: HeroCentralButton[];
|
package/dist/cjs/components/HeroCentral/helperComponents/HeroCentralButtons/HeroCentralButtons.js
CHANGED
|
@@ -12,7 +12,6 @@ function HeroCentralButtons({ buttons, layoutType }) {
|
|
|
12
12
|
return null;
|
|
13
13
|
return ((0, jsx_runtime_1.jsx)("div", { className: styles_module_scss_1.default.buttonsContainer, "data-layout-type": layoutType, children: buttons.map(button => {
|
|
14
14
|
const buttonProps = {
|
|
15
|
-
key: button.uniqueId,
|
|
16
15
|
label: button.text,
|
|
17
16
|
href: button.link,
|
|
18
17
|
className: styles_module_scss_1.default.button,
|
|
@@ -21,6 +20,7 @@ function HeroCentralButtons({ buttons, layoutType }) {
|
|
|
21
20
|
target: '_self',
|
|
22
21
|
onClick: button.onClick,
|
|
23
22
|
};
|
|
24
|
-
|
|
23
|
+
const ButtonComponent = button.style === 'outline' ? button_1.ButtonOutline : button_1.ButtonFilled;
|
|
24
|
+
return (0, jsx_runtime_1.jsx)(ButtonComponent, Object.assign({}, buttonProps), button.uniqueId);
|
|
25
25
|
}) }));
|
|
26
26
|
}
|
package/dist/esm/components/HeroCentral/helperComponents/HeroCentralButtons/HeroCentralButtons.d.ts
CHANGED
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import { WithLayoutType } from '@cloud-ru/uikit-product-utils';
|
|
2
|
+
import { ButtonFilledProps } from '@snack-uikit/button';
|
|
2
3
|
export type ButtonStyle = 'filled' | 'outline';
|
|
4
|
+
type ButtonProps = Pick<ButtonFilledProps, 'label' | 'href' | 'className' | 'fullWidth' | 'size' | 'target' | 'onClick'>;
|
|
3
5
|
export type HeroCentralButton = {
|
|
4
6
|
text: string;
|
|
5
7
|
uniqueId: string;
|
|
6
8
|
link?: string;
|
|
7
9
|
style?: ButtonStyle;
|
|
8
|
-
onClick?:
|
|
10
|
+
onClick?: ButtonProps['onClick'];
|
|
9
11
|
};
|
|
10
12
|
type HeroCentralButtonsProps = WithLayoutType<{
|
|
11
13
|
buttons?: HeroCentralButton[];
|
package/dist/esm/components/HeroCentral/helperComponents/HeroCentralButtons/HeroCentralButtons.js
CHANGED
|
@@ -6,7 +6,6 @@ export function HeroCentralButtons({ buttons, layoutType }) {
|
|
|
6
6
|
return null;
|
|
7
7
|
return (_jsx("div", { className: styles.buttonsContainer, "data-layout-type": layoutType, children: buttons.map(button => {
|
|
8
8
|
const buttonProps = {
|
|
9
|
-
key: button.uniqueId,
|
|
10
9
|
label: button.text,
|
|
11
10
|
href: button.link,
|
|
12
11
|
className: styles.button,
|
|
@@ -15,6 +14,7 @@ export function HeroCentralButtons({ buttons, layoutType }) {
|
|
|
15
14
|
target: '_self',
|
|
16
15
|
onClick: button.onClick,
|
|
17
16
|
};
|
|
18
|
-
|
|
17
|
+
const ButtonComponent = button.style === 'outline' ? ButtonOutline : ButtonFilled;
|
|
18
|
+
return _jsx(ButtonComponent, Object.assign({}, buttonProps), button.uniqueId);
|
|
19
19
|
}) }));
|
|
20
20
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cloud-ru/uikit-product-site-hero",
|
|
3
3
|
"title": "Site Hero",
|
|
4
|
-
"version": "1.
|
|
4
|
+
"version": "1.11.0",
|
|
5
5
|
"sideEffects": [
|
|
6
6
|
"*.css",
|
|
7
7
|
"*.woff",
|
|
@@ -57,5 +57,5 @@
|
|
|
57
57
|
"peerDependencies": {
|
|
58
58
|
"@cloud-ru/uikit-product-locale": "*"
|
|
59
59
|
},
|
|
60
|
-
"gitHead": "
|
|
60
|
+
"gitHead": "b3873206bbbfc1a0df5ed6bb3e30d1d1cdd1c934"
|
|
61
61
|
}
|
package/src/components/HeroCentral/helperComponents/HeroCentralButtons/HeroCentralButtons.tsx
CHANGED
|
@@ -1,16 +1,21 @@
|
|
|
1
1
|
import { WithLayoutType } from '@cloud-ru/uikit-product-utils';
|
|
2
|
-
import { ButtonFilled, ButtonOutline } from '@snack-uikit/button';
|
|
2
|
+
import { ButtonFilled, ButtonFilledProps, ButtonOutline } from '@snack-uikit/button';
|
|
3
3
|
|
|
4
4
|
import styles from './styles.module.scss';
|
|
5
5
|
|
|
6
6
|
export type ButtonStyle = 'filled' | 'outline';
|
|
7
7
|
|
|
8
|
+
type ButtonProps = Pick<
|
|
9
|
+
ButtonFilledProps,
|
|
10
|
+
'label' | 'href' | 'className' | 'fullWidth' | 'size' | 'target' | 'onClick'
|
|
11
|
+
>;
|
|
12
|
+
|
|
8
13
|
export type HeroCentralButton = {
|
|
9
14
|
text: string;
|
|
10
15
|
uniqueId: string;
|
|
11
16
|
link?: string;
|
|
12
17
|
style?: ButtonStyle;
|
|
13
|
-
onClick?:
|
|
18
|
+
onClick?: ButtonProps['onClick'];
|
|
14
19
|
};
|
|
15
20
|
|
|
16
21
|
type HeroCentralButtonsProps = WithLayoutType<{
|
|
@@ -23,18 +28,18 @@ export function HeroCentralButtons({ buttons, layoutType }: HeroCentralButtonsPr
|
|
|
23
28
|
return (
|
|
24
29
|
<div className={styles.buttonsContainer} data-layout-type={layoutType}>
|
|
25
30
|
{buttons.map(button => {
|
|
26
|
-
const buttonProps = {
|
|
27
|
-
key: button.uniqueId,
|
|
31
|
+
const buttonProps: ButtonProps = {
|
|
28
32
|
label: button.text,
|
|
29
33
|
href: button.link,
|
|
30
34
|
className: styles.button,
|
|
31
35
|
fullWidth: ['mobile', 'tablet'].includes(layoutType),
|
|
32
|
-
size: 'l'
|
|
33
|
-
target: '_self'
|
|
36
|
+
size: 'l',
|
|
37
|
+
target: '_self',
|
|
34
38
|
onClick: button.onClick,
|
|
35
39
|
};
|
|
40
|
+
const ButtonComponent = button.style === 'outline' ? ButtonOutline : ButtonFilled;
|
|
36
41
|
|
|
37
|
-
return
|
|
42
|
+
return <ButtonComponent key={button.uniqueId} {...buttonProps} />;
|
|
38
43
|
})}
|
|
39
44
|
</div>
|
|
40
45
|
);
|