@cloud-ru/uikit-product-site-hero 1.1.0 → 1.1.2
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 +27 -0
- package/dist/cjs/components/HeroSlider/HeroSlider.js +1 -1
- package/dist/cjs/components/HeroSlider/components/TabHeroSlider/TabHeroSlider.d.ts +1 -0
- package/dist/cjs/components/HeroSlider/components/TabHeroSlider/TabHeroSlider.js +2 -2
- package/dist/cjs/components/HeroSlider/components/TabHeroSlider/styles.module.css +7 -4
- package/dist/cjs/components/HeroSlider/components/TabsRowHeroSlider/TabsRowHeroSlider.d.ts +1 -0
- package/dist/cjs/components/HeroSlider/components/TabsRowHeroSlider/TabsRowHeroSlider.js +2 -2
- package/dist/esm/components/HeroSlider/HeroSlider.js +1 -1
- package/dist/esm/components/HeroSlider/components/TabHeroSlider/TabHeroSlider.d.ts +1 -0
- package/dist/esm/components/HeroSlider/components/TabHeroSlider/TabHeroSlider.js +2 -2
- package/dist/esm/components/HeroSlider/components/TabHeroSlider/styles.module.css +7 -4
- package/dist/esm/components/HeroSlider/components/TabsRowHeroSlider/TabsRowHeroSlider.d.ts +1 -0
- package/dist/esm/components/HeroSlider/components/TabsRowHeroSlider/TabsRowHeroSlider.js +2 -2
- package/package.json +10 -10
- package/src/components/HeroSlider/HeroSlider.tsx +1 -0
- package/src/components/HeroSlider/components/TabHeroSlider/TabHeroSlider.tsx +3 -2
- package/src/components/HeroSlider/components/TabHeroSlider/styles.module.scss +8 -2
- package/src/components/HeroSlider/components/TabsRowHeroSlider/TabsRowHeroSlider.tsx +3 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,33 @@
|
|
|
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.1.2 (2025-12-17)
|
|
7
|
+
|
|
8
|
+
### Only dependencies have been changed
|
|
9
|
+
* [@cloud-ru/uikit-product-button-predefined@0.7.15](https://gitverse.ru/cloud-ru-tech/uikit-product/-/blob/master/packages/button-predefined/CHANGELOG.md)
|
|
10
|
+
* [@cloud-ru/uikit-product-icons@16.1.1](https://gitverse.ru/cloud-ru-tech/uikit-product/-/blob/master/packages/icons/CHANGELOG.md)
|
|
11
|
+
* [@cloud-ru/uikit-product-site-layout@0.5.2](https://gitverse.ru/cloud-ru-tech/uikit-product/-/blob/master/packages/site-layout/CHANGELOG.md)
|
|
12
|
+
* [@cloud-ru/uikit-product-site-media@0.2.1](https://gitverse.ru/cloud-ru-tech/uikit-product/-/blob/master/packages/site-media/CHANGELOG.md)
|
|
13
|
+
* [@cloud-ru/uikit-product-site-navbar@0.3.2](https://gitverse.ru/cloud-ru-tech/uikit-product/-/blob/master/packages/site-navbar/CHANGELOG.md)
|
|
14
|
+
* [@cloud-ru/uikit-product-site-rich-text@0.2.17](https://gitverse.ru/cloud-ru-tech/uikit-product/-/blob/master/packages/site-rich-text/CHANGELOG.md)
|
|
15
|
+
* [@cloud-ru/uikit-product-site-tag@0.4.1](https://gitverse.ru/cloud-ru-tech/uikit-product/-/blob/master/packages/site-tag/CHANGELOG.md)
|
|
16
|
+
* [@cloud-ru/uikit-product-utils@8.1.0](https://gitverse.ru/cloud-ru-tech/uikit-product/-/blob/master/packages/utils/CHANGELOG.md)
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
## 1.1.1 (2025-12-15)
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
### Bug Fixes
|
|
26
|
+
|
|
27
|
+
* **SITE-10411:** add missing HeroSlider styles ([fdc9edf](https://gitverse.ru/cloud-ru-tech/uikit-product/commits/fdc9edf140c657c6857ba9496fafe81e8ae0e32e))
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
|
|
6
33
|
# 1.1.0 (2025-12-15)
|
|
7
34
|
|
|
8
35
|
|
|
@@ -50,5 +50,5 @@ function HeroSlider(_a) {
|
|
|
50
50
|
return ((0, jsx_runtime_1.jsxs)("section", { className: (0, classnames_1.default)(styles_module_scss_1.default.root, className), id: id, "data-appearance": currentAppearance, "data-color": currentColor, "data-layout-type": layoutType, children: [(0, jsx_runtime_1.jsx)(carousel_1.Carousel, Object.assign({ className: styles_module_scss_1.default.heroCarousel, arrows: false, pagination: false, infiniteScroll: true, autoSwipe: autoSwipe, state: {
|
|
51
51
|
page: currentPage,
|
|
52
52
|
onChange: setCurrentPage,
|
|
53
|
-
}, gap: '0' }, (0, uikit_product_utils_1.extractSupportProps)(rest), { children: items.map((item, i) => ((0, jsx_runtime_1.jsx)("div", { className: styles_module_scss_1.default.carouselItemWrapper, "data-layout-type": layoutType, children: (0, jsx_runtime_1.jsx)(components_1.HeroSlide, Object.assign({}, item, { className: styles_module_scss_1.default.heroSlide, layoutType: layoutType })) }, `${item.title}${i}`))) })), (0, jsx_runtime_1.jsx)("div", { className: (0, classnames_1.default)(styles_module_scss_1.default.tabsWrapper), "data-layout-type": layoutType, children: (0, jsx_runtime_1.jsx)(components_1.TabsRowHeroSlider, { className: styles_module_scss_1.default.tabs, appearance: currentAppearance, active: currentTab, items: tabs, onTabClick: handleTabClick }) }), (0, jsx_runtime_1.jsx)(components_1.Control, { className: styles_module_scss_1.default.control, variant: 'prev', onClick: handleLeftClick }), (0, jsx_runtime_1.jsx)(components_1.Control, { className: styles_module_scss_1.default.control, variant: 'next', onClick: handleRightClick })] }));
|
|
53
|
+
}, gap: '0' }, (0, uikit_product_utils_1.extractSupportProps)(rest), { children: items.map((item, i) => ((0, jsx_runtime_1.jsx)("div", { className: styles_module_scss_1.default.carouselItemWrapper, "data-layout-type": layoutType, children: (0, jsx_runtime_1.jsx)(components_1.HeroSlide, Object.assign({}, item, { className: styles_module_scss_1.default.heroSlide, layoutType: layoutType })) }, `${item.title}${i}`))) })), (0, jsx_runtime_1.jsx)("div", { className: (0, classnames_1.default)(styles_module_scss_1.default.tabsWrapper), "data-layout-type": layoutType, children: (0, jsx_runtime_1.jsx)(components_1.TabsRowHeroSlider, { className: styles_module_scss_1.default.tabs, appearance: currentAppearance, active: currentTab, items: tabs, animationEnabled: autoSwipe === AUTO_SWIPE, onTabClick: handleTabClick }) }), (0, jsx_runtime_1.jsx)(components_1.Control, { className: styles_module_scss_1.default.control, variant: 'prev', onClick: handleLeftClick }), (0, jsx_runtime_1.jsx)(components_1.Control, { className: styles_module_scss_1.default.control, variant: 'next', onClick: handleRightClick })] }));
|
|
54
54
|
}
|
|
@@ -5,6 +5,7 @@ export type TabHeroSliderBase = {
|
|
|
5
5
|
type TabHeroSliderProps = TabHeroSliderBase & {
|
|
6
6
|
active: boolean;
|
|
7
7
|
appearance: AppearanceType;
|
|
8
|
+
animationEnabled: boolean;
|
|
8
9
|
onClick: () => void;
|
|
9
10
|
};
|
|
10
11
|
export declare function TabHeroSlider(props: TabHeroSliderProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -9,6 +9,6 @@ const uikit_product_site_rich_text_1 = require("@cloud-ru/uikit-product-site-ric
|
|
|
9
9
|
const typography_1 = require("@snack-uikit/typography");
|
|
10
10
|
const styles_module_scss_1 = __importDefault(require('./styles.module.css'));
|
|
11
11
|
function TabHeroSlider(props) {
|
|
12
|
-
const { title, appearance, active, onClick } = props;
|
|
13
|
-
return ((0, jsx_runtime_1.jsxs)("button", { className: styles_module_scss_1.default.tab, type: 'button', role: 'tab', onClick: onClick, "data-appearance": appearance, "data-active": active, children: [(0, jsx_runtime_1.jsx)(typography_1.Typography.SansBodyS, { children: (0, jsx_runtime_1.jsx)(uikit_product_site_rich_text_1.RichText, { richText: title }) }), active && (0, jsx_runtime_1.jsx)("div", { className: styles_module_scss_1.default.timeline })] }));
|
|
12
|
+
const { title, appearance, active, animationEnabled, onClick } = props;
|
|
13
|
+
return ((0, jsx_runtime_1.jsxs)("button", { className: styles_module_scss_1.default.tab, type: 'button', role: 'tab', onClick: onClick, "data-appearance": appearance, "data-active": active, children: [(0, jsx_runtime_1.jsx)(typography_1.Typography.SansBodyS, { children: (0, jsx_runtime_1.jsx)(uikit_product_site_rich_text_1.RichText, { richText: title }) }), active && (0, jsx_runtime_1.jsx)("div", { className: styles_module_scss_1.default.timeline, "data-animation-enabled": animationEnabled })] }));
|
|
14
14
|
}
|
|
@@ -19,14 +19,14 @@
|
|
|
19
19
|
color:var(--sys-graphite-text-disabled, #a3a3a3);
|
|
20
20
|
border-color:var(--sys-graphite-accent-pressed, #4e4e4e);
|
|
21
21
|
}
|
|
22
|
-
.tab[data-appearance=graphite][data-active=true]{
|
|
22
|
+
.tab[data-appearance=graphite]:hover, .tab[data-appearance=graphite][data-active=true]{
|
|
23
23
|
color:var(--sys-graphite-on-accent, #ffffff);
|
|
24
24
|
}
|
|
25
25
|
.tab[data-appearance=decor]{
|
|
26
26
|
color:var(--sys-neutral-text-support, #656774);
|
|
27
27
|
border-color:var(--sys-invert-neutral-decor-activated, #6d707f);
|
|
28
28
|
}
|
|
29
|
-
.tab[data-appearance=decor][data-active=true]{
|
|
29
|
+
.tab[data-appearance=decor]:hover, .tab[data-appearance=decor][data-active=true]{
|
|
30
30
|
color:var(--sys-neutral-text-main, #41424e);
|
|
31
31
|
}
|
|
32
32
|
.tab[data-appearance=brand]{
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
.tab[data-appearance=brand] .timeline{
|
|
37
37
|
border-color:var(--sys-fluorescent-yellow-accent-default, #cff500);
|
|
38
38
|
}
|
|
39
|
-
.tab[data-appearance=brand][data-active=true]{
|
|
39
|
+
.tab[data-appearance=brand]:hover, .tab[data-appearance=brand][data-active=true]{
|
|
40
40
|
color:var(--sys-primary-text-main, #0d402b);
|
|
41
41
|
}
|
|
42
42
|
|
|
@@ -45,8 +45,11 @@
|
|
|
45
45
|
top:-1px;
|
|
46
46
|
left:0px;
|
|
47
47
|
z-index:1;
|
|
48
|
-
width:
|
|
48
|
+
width:100%;
|
|
49
49
|
border-top:3px solid var(--sys-primary-accent-default, #26d07c);
|
|
50
|
+
}
|
|
51
|
+
.timeline[data-animation-enabled=true]{
|
|
52
|
+
width:0;
|
|
50
53
|
animation:growTimeline 5s linear forwards;
|
|
51
54
|
}
|
|
52
55
|
|
|
@@ -5,6 +5,7 @@ type TabsRowHeroSliderProps = {
|
|
|
5
5
|
appearance: AppearanceType;
|
|
6
6
|
active: TabHeroSliderBase;
|
|
7
7
|
items: TabHeroSliderBase[];
|
|
8
|
+
animationEnabled: boolean;
|
|
8
9
|
onTabClick: (page: TabHeroSliderBase) => void;
|
|
9
10
|
};
|
|
10
11
|
export declare function TabsRowHeroSlider(props: TabsRowHeroSliderProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -10,7 +10,7 @@ const react_1 = require("react");
|
|
|
10
10
|
const TabHeroSlider_1 = require("../TabHeroSlider");
|
|
11
11
|
const styles_module_scss_1 = __importDefault(require('./styles.module.css'));
|
|
12
12
|
function TabsRowHeroSlider(props) {
|
|
13
|
-
const { className, items, appearance, active, onTabClick } = props;
|
|
13
|
+
const { className, items, appearance, active, animationEnabled, onTabClick } = props;
|
|
14
14
|
const containerRef = (0, react_1.useRef)(null);
|
|
15
15
|
(0, react_1.useEffect)(() => {
|
|
16
16
|
const container = containerRef.current;
|
|
@@ -31,5 +31,5 @@ function TabsRowHeroSlider(props) {
|
|
|
31
31
|
const handleTabClick = (tab) => () => {
|
|
32
32
|
onTabClick(tab);
|
|
33
33
|
};
|
|
34
|
-
return ((0, jsx_runtime_1.jsx)("div", { className: (0, classnames_1.default)(styles_module_scss_1.default.tabs, className), ref: containerRef, children: items.map((tab, i) => ((0, jsx_runtime_1.jsx)(TabHeroSlider_1.TabHeroSlider, Object.assign({ appearance: appearance, active: tab === active, onClick: handleTabClick(tab) }, tab), `tab-${i}-${tab.title}`))) }));
|
|
34
|
+
return ((0, jsx_runtime_1.jsx)("div", { className: (0, classnames_1.default)(styles_module_scss_1.default.tabs, className), ref: containerRef, children: items.map((tab, i) => ((0, jsx_runtime_1.jsx)(TabHeroSlider_1.TabHeroSlider, Object.assign({ appearance: appearance, active: tab === active, animationEnabled: animationEnabled, onClick: handleTabClick(tab) }, tab), `tab-${i}-${tab.title}`))) }));
|
|
35
35
|
}
|
|
@@ -44,5 +44,5 @@ export function HeroSlider(_a) {
|
|
|
44
44
|
return (_jsxs("section", { className: cn(styles.root, className), id: id, "data-appearance": currentAppearance, "data-color": currentColor, "data-layout-type": layoutType, children: [_jsx(Carousel, Object.assign({ className: styles.heroCarousel, arrows: false, pagination: false, infiniteScroll: true, autoSwipe: autoSwipe, state: {
|
|
45
45
|
page: currentPage,
|
|
46
46
|
onChange: setCurrentPage,
|
|
47
|
-
}, gap: '0' }, extractSupportProps(rest), { children: items.map((item, i) => (_jsx("div", { className: styles.carouselItemWrapper, "data-layout-type": layoutType, children: _jsx(HeroSlide, Object.assign({}, item, { className: styles.heroSlide, layoutType: layoutType })) }, `${item.title}${i}`))) })), _jsx("div", { className: cn(styles.tabsWrapper), "data-layout-type": layoutType, children: _jsx(TabsRowHeroSlider, { className: styles.tabs, appearance: currentAppearance, active: currentTab, items: tabs, onTabClick: handleTabClick }) }), _jsx(Control, { className: styles.control, variant: 'prev', onClick: handleLeftClick }), _jsx(Control, { className: styles.control, variant: 'next', onClick: handleRightClick })] }));
|
|
47
|
+
}, gap: '0' }, extractSupportProps(rest), { children: items.map((item, i) => (_jsx("div", { className: styles.carouselItemWrapper, "data-layout-type": layoutType, children: _jsx(HeroSlide, Object.assign({}, item, { className: styles.heroSlide, layoutType: layoutType })) }, `${item.title}${i}`))) })), _jsx("div", { className: cn(styles.tabsWrapper), "data-layout-type": layoutType, children: _jsx(TabsRowHeroSlider, { className: styles.tabs, appearance: currentAppearance, active: currentTab, items: tabs, animationEnabled: autoSwipe === AUTO_SWIPE, onTabClick: handleTabClick }) }), _jsx(Control, { className: styles.control, variant: 'prev', onClick: handleLeftClick }), _jsx(Control, { className: styles.control, variant: 'next', onClick: handleRightClick })] }));
|
|
48
48
|
}
|
|
@@ -5,6 +5,7 @@ export type TabHeroSliderBase = {
|
|
|
5
5
|
type TabHeroSliderProps = TabHeroSliderBase & {
|
|
6
6
|
active: boolean;
|
|
7
7
|
appearance: AppearanceType;
|
|
8
|
+
animationEnabled: boolean;
|
|
8
9
|
onClick: () => void;
|
|
9
10
|
};
|
|
10
11
|
export declare function TabHeroSlider(props: TabHeroSliderProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -3,6 +3,6 @@ import { RichText } from '@cloud-ru/uikit-product-site-rich-text';
|
|
|
3
3
|
import { Typography } from '@snack-uikit/typography';
|
|
4
4
|
import styles from './styles.module.css';
|
|
5
5
|
export function TabHeroSlider(props) {
|
|
6
|
-
const { title, appearance, active, onClick } = props;
|
|
7
|
-
return (_jsxs("button", { className: styles.tab, type: 'button', role: 'tab', onClick: onClick, "data-appearance": appearance, "data-active": active, children: [_jsx(Typography.SansBodyS, { children: _jsx(RichText, { richText: title }) }), active && _jsx("div", { className: styles.timeline })] }));
|
|
6
|
+
const { title, appearance, active, animationEnabled, onClick } = props;
|
|
7
|
+
return (_jsxs("button", { className: styles.tab, type: 'button', role: 'tab', onClick: onClick, "data-appearance": appearance, "data-active": active, children: [_jsx(Typography.SansBodyS, { children: _jsx(RichText, { richText: title }) }), active && _jsx("div", { className: styles.timeline, "data-animation-enabled": animationEnabled })] }));
|
|
8
8
|
}
|
|
@@ -19,14 +19,14 @@
|
|
|
19
19
|
color:var(--sys-graphite-text-disabled, #a3a3a3);
|
|
20
20
|
border-color:var(--sys-graphite-accent-pressed, #4e4e4e);
|
|
21
21
|
}
|
|
22
|
-
.tab[data-appearance=graphite][data-active=true]{
|
|
22
|
+
.tab[data-appearance=graphite]:hover, .tab[data-appearance=graphite][data-active=true]{
|
|
23
23
|
color:var(--sys-graphite-on-accent, #ffffff);
|
|
24
24
|
}
|
|
25
25
|
.tab[data-appearance=decor]{
|
|
26
26
|
color:var(--sys-neutral-text-support, #656774);
|
|
27
27
|
border-color:var(--sys-invert-neutral-decor-activated, #6d707f);
|
|
28
28
|
}
|
|
29
|
-
.tab[data-appearance=decor][data-active=true]{
|
|
29
|
+
.tab[data-appearance=decor]:hover, .tab[data-appearance=decor][data-active=true]{
|
|
30
30
|
color:var(--sys-neutral-text-main, #41424e);
|
|
31
31
|
}
|
|
32
32
|
.tab[data-appearance=brand]{
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
.tab[data-appearance=brand] .timeline{
|
|
37
37
|
border-color:var(--sys-fluorescent-yellow-accent-default, #cff500);
|
|
38
38
|
}
|
|
39
|
-
.tab[data-appearance=brand][data-active=true]{
|
|
39
|
+
.tab[data-appearance=brand]:hover, .tab[data-appearance=brand][data-active=true]{
|
|
40
40
|
color:var(--sys-primary-text-main, #0d402b);
|
|
41
41
|
}
|
|
42
42
|
|
|
@@ -45,8 +45,11 @@
|
|
|
45
45
|
top:-1px;
|
|
46
46
|
left:0px;
|
|
47
47
|
z-index:1;
|
|
48
|
-
width:
|
|
48
|
+
width:100%;
|
|
49
49
|
border-top:3px solid var(--sys-primary-accent-default, #26d07c);
|
|
50
|
+
}
|
|
51
|
+
.timeline[data-animation-enabled=true]{
|
|
52
|
+
width:0;
|
|
50
53
|
animation:growTimeline 5s linear forwards;
|
|
51
54
|
}
|
|
52
55
|
|
|
@@ -5,6 +5,7 @@ type TabsRowHeroSliderProps = {
|
|
|
5
5
|
appearance: AppearanceType;
|
|
6
6
|
active: TabHeroSliderBase;
|
|
7
7
|
items: TabHeroSliderBase[];
|
|
8
|
+
animationEnabled: boolean;
|
|
8
9
|
onTabClick: (page: TabHeroSliderBase) => void;
|
|
9
10
|
};
|
|
10
11
|
export declare function TabsRowHeroSlider(props: TabsRowHeroSliderProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -4,7 +4,7 @@ import { useEffect, useRef } from 'react';
|
|
|
4
4
|
import { TabHeroSlider } from '../TabHeroSlider';
|
|
5
5
|
import styles from './styles.module.css';
|
|
6
6
|
export function TabsRowHeroSlider(props) {
|
|
7
|
-
const { className, items, appearance, active, onTabClick } = props;
|
|
7
|
+
const { className, items, appearance, active, animationEnabled, onTabClick } = props;
|
|
8
8
|
const containerRef = useRef(null);
|
|
9
9
|
useEffect(() => {
|
|
10
10
|
const container = containerRef.current;
|
|
@@ -25,5 +25,5 @@ export function TabsRowHeroSlider(props) {
|
|
|
25
25
|
const handleTabClick = (tab) => () => {
|
|
26
26
|
onTabClick(tab);
|
|
27
27
|
};
|
|
28
|
-
return (_jsx("div", { className: cn(styles.tabs, className), ref: containerRef, children: items.map((tab, i) => (_jsx(TabHeroSlider, Object.assign({ appearance: appearance, active: tab === active, onClick: handleTabClick(tab) }, tab), `tab-${i}-${tab.title}`))) }));
|
|
28
|
+
return (_jsx("div", { className: cn(styles.tabs, className), ref: containerRef, children: items.map((tab, i) => (_jsx(TabHeroSlider, Object.assign({ appearance: appearance, active: tab === active, animationEnabled: animationEnabled, onClick: handleTabClick(tab) }, tab), `tab-${i}-${tab.title}`))) }));
|
|
29
29
|
}
|
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.1.
|
|
4
|
+
"version": "1.1.2",
|
|
5
5
|
"sideEffects": [
|
|
6
6
|
"*.css",
|
|
7
7
|
"*.woff",
|
|
@@ -36,14 +36,14 @@
|
|
|
36
36
|
},
|
|
37
37
|
"scripts": {},
|
|
38
38
|
"dependencies": {
|
|
39
|
-
"@cloud-ru/uikit-product-button-predefined": "0.7.
|
|
40
|
-
"@cloud-ru/uikit-product-icons": "16.1.
|
|
41
|
-
"@cloud-ru/uikit-product-site-layout": "0.5.
|
|
42
|
-
"@cloud-ru/uikit-product-site-media": "0.2.
|
|
43
|
-
"@cloud-ru/uikit-product-site-navbar": "0.3.
|
|
44
|
-
"@cloud-ru/uikit-product-site-rich-text": "0.2.
|
|
45
|
-
"@cloud-ru/uikit-product-site-tag": "0.4.
|
|
46
|
-
"@cloud-ru/uikit-product-utils": "8.0
|
|
39
|
+
"@cloud-ru/uikit-product-button-predefined": "0.7.15",
|
|
40
|
+
"@cloud-ru/uikit-product-icons": "16.1.1",
|
|
41
|
+
"@cloud-ru/uikit-product-site-layout": "0.5.2",
|
|
42
|
+
"@cloud-ru/uikit-product-site-media": "0.2.1",
|
|
43
|
+
"@cloud-ru/uikit-product-site-navbar": "0.3.2",
|
|
44
|
+
"@cloud-ru/uikit-product-site-rich-text": "0.2.17",
|
|
45
|
+
"@cloud-ru/uikit-product-site-tag": "0.4.1",
|
|
46
|
+
"@cloud-ru/uikit-product-utils": "8.1.0",
|
|
47
47
|
"@snack-uikit/breadcrumbs": "0.10.24",
|
|
48
48
|
"@snack-uikit/button": "0.19.7",
|
|
49
49
|
"@snack-uikit/carousel": "0.6.0",
|
|
@@ -56,5 +56,5 @@
|
|
|
56
56
|
"peerDependencies": {
|
|
57
57
|
"@cloud-ru/uikit-product-locale": "*"
|
|
58
58
|
},
|
|
59
|
-
"gitHead": "
|
|
59
|
+
"gitHead": "1a98d6d9bff32edcbb3f9b0be0a14dce3f2abe5d"
|
|
60
60
|
}
|
|
@@ -11,11 +11,12 @@ export type TabHeroSliderBase = {
|
|
|
11
11
|
type TabHeroSliderProps = TabHeroSliderBase & {
|
|
12
12
|
active: boolean;
|
|
13
13
|
appearance: AppearanceType;
|
|
14
|
+
animationEnabled: boolean;
|
|
14
15
|
onClick: () => void;
|
|
15
16
|
};
|
|
16
17
|
|
|
17
18
|
export function TabHeroSlider(props: TabHeroSliderProps) {
|
|
18
|
-
const { title, appearance, active, onClick } = props;
|
|
19
|
+
const { title, appearance, active, animationEnabled, onClick } = props;
|
|
19
20
|
|
|
20
21
|
return (
|
|
21
22
|
<button
|
|
@@ -29,7 +30,7 @@ export function TabHeroSlider(props: TabHeroSliderProps) {
|
|
|
29
30
|
<Typography.SansBodyS>
|
|
30
31
|
<RichText richText={title} />
|
|
31
32
|
</Typography.SansBodyS>
|
|
32
|
-
{active && <div className={styles.timeline} />}
|
|
33
|
+
{active && <div className={styles.timeline} data-animation-enabled={animationEnabled} />}
|
|
33
34
|
</button>
|
|
34
35
|
);
|
|
35
36
|
}
|
|
@@ -32,6 +32,7 @@ $brand: 'brand';
|
|
|
32
32
|
color: var.$sys-graphite-text-disabled;
|
|
33
33
|
border-color: var.$sys-graphite-accent-pressed;
|
|
34
34
|
|
|
35
|
+
&:hover,
|
|
35
36
|
&[data-active='true'] {
|
|
36
37
|
color: var.$sys-graphite-on-accent;
|
|
37
38
|
}
|
|
@@ -41,6 +42,7 @@ $brand: 'brand';
|
|
|
41
42
|
color: var.$sys-neutral-text-support;
|
|
42
43
|
border-color: var.$sys-invert-neutral-decor-activated;
|
|
43
44
|
|
|
45
|
+
&:hover,
|
|
44
46
|
&[data-active='true'] {
|
|
45
47
|
color: var.$sys-neutral-text-main;
|
|
46
48
|
}
|
|
@@ -54,6 +56,7 @@ $brand: 'brand';
|
|
|
54
56
|
border-color: var.$sys-fluorescent-yellow-accent-default;
|
|
55
57
|
}
|
|
56
58
|
|
|
59
|
+
&:hover,
|
|
57
60
|
&[data-active='true'] {
|
|
58
61
|
color: var.$sys-primary-text-main;
|
|
59
62
|
}
|
|
@@ -69,11 +72,14 @@ $brand: 'brand';
|
|
|
69
72
|
/* stylelint-disable-next-line declaration-property-value-allowed-list */
|
|
70
73
|
z-index: 1;
|
|
71
74
|
|
|
72
|
-
width:
|
|
75
|
+
width: 100%;
|
|
73
76
|
|
|
74
77
|
border-top: 3px solid var.$sys-primary-accent-default;
|
|
75
78
|
|
|
76
|
-
animation
|
|
79
|
+
&[data-animation-enabled='true'] {
|
|
80
|
+
width: 0;
|
|
81
|
+
animation: growTimeline 5s linear forwards;
|
|
82
|
+
}
|
|
77
83
|
}
|
|
78
84
|
|
|
79
85
|
@keyframes growTimeline {
|
|
@@ -10,11 +10,12 @@ type TabsRowHeroSliderProps = {
|
|
|
10
10
|
appearance: AppearanceType;
|
|
11
11
|
active: TabHeroSliderBase;
|
|
12
12
|
items: TabHeroSliderBase[];
|
|
13
|
+
animationEnabled: boolean;
|
|
13
14
|
onTabClick: (page: TabHeroSliderBase) => void;
|
|
14
15
|
};
|
|
15
16
|
|
|
16
17
|
export function TabsRowHeroSlider(props: TabsRowHeroSliderProps) {
|
|
17
|
-
const { className, items, appearance, active, onTabClick } = props;
|
|
18
|
+
const { className, items, appearance, active, animationEnabled, onTabClick } = props;
|
|
18
19
|
|
|
19
20
|
const containerRef = useRef<HTMLDivElement>(null);
|
|
20
21
|
|
|
@@ -49,6 +50,7 @@ export function TabsRowHeroSlider(props: TabsRowHeroSliderProps) {
|
|
|
49
50
|
key={`tab-${i}-${tab.title}`}
|
|
50
51
|
appearance={appearance}
|
|
51
52
|
active={tab === active}
|
|
53
|
+
animationEnabled={animationEnabled}
|
|
52
54
|
onClick={handleTabClick(tab)}
|
|
53
55
|
{...tab}
|
|
54
56
|
/>
|