@jetbrains/kotlin-web-site-ui 4.0.0-alpha.0 → 4.0.0-alpha.3
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/out/blocks/formik-wrapper/input.js +3 -3
- package/out/blocks/formik-wrapper/privacy-checkbox.js +17 -21
- package/out/blocks/formik-wrapper/privacy-notice.js +19 -28
- package/out/blocks/formik-wrapper/submit-button.js +3 -3
- package/out/components/cta-block/cta-block.js +17 -33
- package/out/components/footer/footer.js +30 -48
- package/out/components/footer/logo/logo.js +3 -5
- package/out/components/footer/nav/nav-item.js +11 -15
- package/out/components/footer/nav/nav-list.js +8 -11
- package/out/components/footer/social-list/social-item/social-item.js +3 -5
- package/out/components/footer/social-list/social-list.js +6 -7
- package/out/components/grid/index.css +294 -294
- package/out/components/header/header.js +27 -32
- package/out/components/header/horizontal-menu/horizontal-menu.js +43 -53
- package/out/components/header/index.css +3 -3
- package/out/components/header/logo-large/logo-large.js +11 -17
- package/out/components/header/logo-small/logo-small.js +11 -17
- package/out/components/header/menu-popup/menu-button/menu-button.js +4 -6
- package/out/components/header/menu-popup/menu-button/menu-button.module.pcss.js +4 -0
- package/out/components/header/menu-popup/menu-popup.js +28 -37
- package/out/components/header/search-button/search-button.js +3 -5
- package/out/components/popup/popup.js +34 -40
- package/out/components/quotes-slider/quites-slider.js +33 -63
- package/out/components/top-menu/dropdown-menu/dropdown-menu.js +28 -40
- package/out/components/top-menu/horizontal-menu/horizontal-menu.js +13 -17
- package/out/components/top-menu/top-menu.js +19 -23
- package/out/components/typography/index.css +22 -22
- package/out/components/youtube-player/youtube-player.js +24 -31
- package/package.json +6 -2
- package/out/components/header/menu-popup/menu-button/menu-button.pcss.js +0 -2
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { forwardRef, useState, useMemo, useRef, useImperativeHandle, useLayoutEffect } from 'react';
|
|
1
|
+
import React__default, { forwardRef, useState, useMemo, useRef, useImperativeHandle, useLayoutEffect } from 'react';
|
|
3
2
|
import { ThemeProvider } from '@rescui/ui-contexts';
|
|
4
3
|
import useResizeObserver from '@react-hook/resize-observer';
|
|
5
4
|
import { LogoLarge } from './logo-large/logo-large.js';
|
|
@@ -33,36 +32,32 @@ const Header = forwardRef(({
|
|
|
33
32
|
setIsMenuPopupVisible((headerRef.current?.getBoundingClientRect?.().width ?? 0) <= MENU_POPUP_BREAKPOINT);
|
|
34
33
|
}, [headerRef]);
|
|
35
34
|
useResizeObserver(headerRef, entry => setIsMenuPopupVisible(entry.contentRect.width <= MENU_POPUP_BREAKPOINT));
|
|
36
|
-
return
|
|
35
|
+
return React__default.createElement(ThemeProvider, {
|
|
37
36
|
theme: 'dark'
|
|
38
|
-
}, {
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
linkHandler: linkHandler
|
|
64
|
-
}, void 0)]
|
|
65
|
-
}), void 0)
|
|
66
|
-
}), void 0);
|
|
37
|
+
}, React__default.createElement("header", {
|
|
38
|
+
ref: headerRef,
|
|
39
|
+
className: classNames(styles.headerMenu, className, {
|
|
40
|
+
[styles.withMenuPopup]: menuPopupExpanded,
|
|
41
|
+
[styles.border]: hasBorder
|
|
42
|
+
})
|
|
43
|
+
}, isMenuPopupVisible && currentTitle && currentUrl && !menuPopupExpanded ? React__default.createElement(LogoSmall, {
|
|
44
|
+
homeTitle: currentTitle,
|
|
45
|
+
homeUrl: currentUrl
|
|
46
|
+
}) : React__default.createElement(LogoLarge, {
|
|
47
|
+
productWebUrl: productWebUrl
|
|
48
|
+
}), !isMenuPopupVisible && React__default.createElement(HorizontalMenu, {
|
|
49
|
+
items: items,
|
|
50
|
+
theme: dropdownTheme,
|
|
51
|
+
linkHandler: linkHandler
|
|
52
|
+
}), React__default.createElement(SearchButton, {
|
|
53
|
+
onClick: onSearchClick,
|
|
54
|
+
isActive: hasSearch && !!onSearchClick
|
|
55
|
+
}), isMenuPopupVisible && React__default.createElement(MenuPopup, {
|
|
56
|
+
items: items,
|
|
57
|
+
setExpand: setMenuPopupExpanded,
|
|
58
|
+
isExpanded: menuPopupExpanded,
|
|
59
|
+
headerRef: headerRef,
|
|
60
|
+
linkHandler: linkHandler
|
|
61
|
+
})));
|
|
67
62
|
});
|
|
68
63
|
export { Header };
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { useState, useEffect, createElement } from 'react';
|
|
2
|
-
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
3
1
|
import classNames from 'classnames';
|
|
2
|
+
import React__default, { useState, useEffect } from 'react';
|
|
4
3
|
import styles from './horizontal-menu.module.pcss.js';
|
|
5
4
|
import { useTextStyles } from '@rescui/typography';
|
|
6
5
|
|
|
@@ -11,28 +10,24 @@ const DropdownMenu = ({
|
|
|
11
10
|
linkHandler
|
|
12
11
|
}) => {
|
|
13
12
|
const textCn = useTextStyles();
|
|
14
|
-
return
|
|
13
|
+
return React__default.createElement("ul", {
|
|
15
14
|
className: classNames(styles.dropdownMenu, textCn('rs-text-2'), {
|
|
16
15
|
[styles.dropdownMenuExpanded]: isExpanded,
|
|
17
16
|
[styles.dropdownMenuAlignRight]: alignRight
|
|
18
17
|
})
|
|
19
|
-
}, {
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
}), void 0)
|
|
33
|
-
}, key);
|
|
34
|
-
})
|
|
35
|
-
}), void 0);
|
|
18
|
+
}, items.map((item, key) => {
|
|
19
|
+
const Tag = !item.isActive && item.url ? 'a' : 'span';
|
|
20
|
+
return React__default.createElement("li", {
|
|
21
|
+
key: key
|
|
22
|
+
}, React__default.createElement(Tag, Object.assign({
|
|
23
|
+
className: classNames(styles.dropdownMenuItem, {
|
|
24
|
+
[styles.active]: item.isActive
|
|
25
|
+
})
|
|
26
|
+
}, item.url ? {
|
|
27
|
+
href: item.url,
|
|
28
|
+
onClick: linkHandler ? event => item.url && linkHandler(event, item.url) : undefined
|
|
29
|
+
} : {}), item.title));
|
|
30
|
+
}));
|
|
36
31
|
};
|
|
37
32
|
|
|
38
33
|
const HorizontalMenuItem = ({
|
|
@@ -48,27 +43,25 @@ const HorizontalMenuItem = ({
|
|
|
48
43
|
|
|
49
44
|
const handleEnter = () => onMouseEnter(item);
|
|
50
45
|
|
|
51
|
-
return
|
|
46
|
+
return React__default.createElement("li", {
|
|
52
47
|
className: styles.menuItemWrap,
|
|
53
48
|
onMouseEnter: handleEnter,
|
|
54
49
|
onMouseLeave: onMouseLeave
|
|
55
|
-
}, {
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
}, void 0)]
|
|
71
|
-
}), void 0);
|
|
50
|
+
}, React__default.createElement(Tag, Object.assign({}, item.url ? {
|
|
51
|
+
href: item.url,
|
|
52
|
+
onClick: linkHandler ? event => item.url && linkHandler(event, item.url) : undefined
|
|
53
|
+
} : {}, {
|
|
54
|
+
key: item.title,
|
|
55
|
+
className: classNames(styles.menuItem, textCn('rs-text-2'), {
|
|
56
|
+
[styles.itemActive]: item.isActive,
|
|
57
|
+
[styles.expanded]: isExpanded && !!item.items?.length
|
|
58
|
+
})
|
|
59
|
+
}), item.title), !!item.items?.length && React__default.createElement(DropdownMenu, {
|
|
60
|
+
items: item.items,
|
|
61
|
+
isExpanded: isExpanded,
|
|
62
|
+
alignRight: isLast,
|
|
63
|
+
linkHandler: linkHandler
|
|
64
|
+
}));
|
|
72
65
|
};
|
|
73
66
|
|
|
74
67
|
const HorizontalMenu = ({
|
|
@@ -87,24 +80,21 @@ const HorizontalMenu = ({
|
|
|
87
80
|
|
|
88
81
|
const handleLeave = () => setActiveIndex(-1);
|
|
89
82
|
|
|
90
|
-
return
|
|
83
|
+
return React__default.createElement("nav", {
|
|
91
84
|
className: classNames(styles.nav, {
|
|
92
85
|
[styles.darkTheme]: theme === 'dark'
|
|
93
86
|
})
|
|
94
|
-
}, {
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
}, index))
|
|
106
|
-
}), void 0)
|
|
107
|
-
}), void 0);
|
|
87
|
+
}, React__default.createElement("ul", {
|
|
88
|
+
className: styles.menuList
|
|
89
|
+
}, items.map((item, index) => React__default.createElement(HorizontalMenuItem, {
|
|
90
|
+
item: item,
|
|
91
|
+
onMouseEnter: handleEnter,
|
|
92
|
+
onMouseLeave: handleLeave,
|
|
93
|
+
isExpanded: index === debouncedActiveIndex,
|
|
94
|
+
isLast: index === items.length - 1,
|
|
95
|
+
key: index,
|
|
96
|
+
linkHandler: linkHandler
|
|
97
|
+
}))));
|
|
108
98
|
};
|
|
109
99
|
|
|
110
100
|
export { HorizontalMenu };
|
|
@@ -347,7 +347,7 @@
|
|
|
347
347
|
display: block;
|
|
348
348
|
}
|
|
349
349
|
|
|
350
|
-
.button {
|
|
350
|
+
.ktl-menu-button-module_button_wB9Mx {
|
|
351
351
|
display: flex;
|
|
352
352
|
-webkit-appearance: none;
|
|
353
353
|
-moz-appearance: none;
|
|
@@ -367,8 +367,8 @@
|
|
|
367
367
|
color: var(--ktl-color-white-light);
|
|
368
368
|
}
|
|
369
369
|
|
|
370
|
-
.button:hover,
|
|
371
|
-
.button :focus {
|
|
370
|
+
.ktl-menu-button-module_button_wB9Mx:hover,
|
|
371
|
+
.ktl-menu-button-module_button_wB9Mx :focus {
|
|
372
372
|
color: #ffffff;
|
|
373
373
|
}
|
|
374
374
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import React__default from 'react';
|
|
2
2
|
import styles from './logo-large.module.pcss.js';
|
|
3
3
|
import SvgKotlinLogoLarge from './kotlin-logo-large.svg.js';
|
|
4
4
|
import classNames from 'classnames';
|
|
@@ -11,25 +11,19 @@ const LogoLarge = ({
|
|
|
11
11
|
}) => {
|
|
12
12
|
const version = productWebUrl ? getProductVersion(productWebUrl) : null;
|
|
13
13
|
const textCn = useTextStyles();
|
|
14
|
-
return
|
|
14
|
+
return React__default.createElement("div", {
|
|
15
15
|
className: classNames(styles.container, className, textCn('rs-text-3', {
|
|
16
16
|
hardness: 'average'
|
|
17
17
|
}))
|
|
18
|
-
}, {
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
href: productWebUrl,
|
|
28
|
-
target: "_blank"
|
|
29
|
-
}, {
|
|
30
|
-
children: version
|
|
31
|
-
}), void 0)]
|
|
32
|
-
}), void 0);
|
|
18
|
+
}, React__default.createElement("a", {
|
|
19
|
+
className: styles.link,
|
|
20
|
+
href: KOTLINLANG_URL,
|
|
21
|
+
"aria-label": "Kotlin Home Page"
|
|
22
|
+
}, React__default.createElement(SvgKotlinLogoLarge, null)), version && React__default.createElement("a", {
|
|
23
|
+
className: classNames(styles.versionTag),
|
|
24
|
+
href: productWebUrl,
|
|
25
|
+
target: "_blank"
|
|
26
|
+
}, version));
|
|
33
27
|
};
|
|
34
28
|
|
|
35
29
|
function getProductVersion(productWebUrl) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import React__default from 'react';
|
|
2
2
|
import SvgKotlinLogoSmall from './kotlin-logo-small.svg.js';
|
|
3
3
|
import styles from './logo-small.module.pcss.js';
|
|
4
4
|
import classNames from 'classnames';
|
|
@@ -11,23 +11,17 @@ const LogoSmall = ({
|
|
|
11
11
|
className
|
|
12
12
|
}) => {
|
|
13
13
|
const textCn = useTextStyles();
|
|
14
|
-
return
|
|
14
|
+
return React__default.createElement("div", {
|
|
15
15
|
className: classNames(styles.logoSmall, className)
|
|
16
|
-
}, {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
href: homeUrl,
|
|
26
|
-
className: classNames(styles.link, textCn('rs-h3'))
|
|
27
|
-
}, {
|
|
28
|
-
children: homeTitle
|
|
29
|
-
}), void 0)]
|
|
30
|
-
}), void 0);
|
|
16
|
+
}, React__default.createElement("a", {
|
|
17
|
+
href: KOTLINLANG_URL,
|
|
18
|
+
className: styles.iconWrap
|
|
19
|
+
}, React__default.createElement(SvgKotlinLogoSmall, {
|
|
20
|
+
className: styles.icon
|
|
21
|
+
})), React__default.createElement("a", {
|
|
22
|
+
href: homeUrl,
|
|
23
|
+
className: classNames(styles.link, textCn('rs-h3'))
|
|
24
|
+
}, homeTitle));
|
|
31
25
|
};
|
|
32
26
|
|
|
33
27
|
export { LogoSmall };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
import styles from './menu-button.pcss.js';
|
|
1
|
+
import React__default from 'react';
|
|
2
|
+
import styles from './menu-button.module.pcss.js';
|
|
3
3
|
import classNames from 'classnames';
|
|
4
4
|
import SvgHamburgerIcon from './hamburger-icon.svg.js';
|
|
5
5
|
import SvgCloseIcon from './close-icon.svg.js';
|
|
@@ -8,15 +8,13 @@ const MenuButton = ({
|
|
|
8
8
|
onClick,
|
|
9
9
|
isExpanded
|
|
10
10
|
}) => {
|
|
11
|
-
return
|
|
11
|
+
return React__default.createElement("button", {
|
|
12
12
|
type: "button",
|
|
13
13
|
className: classNames(styles.button),
|
|
14
14
|
"aria-haspopup": "true",
|
|
15
15
|
"aria-label": "Open the navigation",
|
|
16
16
|
onClick: onClick
|
|
17
|
-
},
|
|
18
|
-
children: isExpanded ? jsx(SvgCloseIcon, {}, void 0) : jsx(SvgHamburgerIcon, {}, void 0)
|
|
19
|
-
}), void 0);
|
|
17
|
+
}, isExpanded ? React__default.createElement(SvgCloseIcon, null) : React__default.createElement(SvgHamburgerIcon, null));
|
|
20
18
|
};
|
|
21
19
|
|
|
22
20
|
export { MenuButton };
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { useRef, useState, useEffect, useLayoutEffect, useCallback, Fragment as Fragment$1 } from 'react';
|
|
1
|
+
import React__default, { useRef, useState, useEffect, useLayoutEffect, useCallback, Fragment } from 'react';
|
|
3
2
|
import styles from './menu-popup.module.pcss.js';
|
|
4
3
|
import classNames from 'classnames';
|
|
5
4
|
import { MenuButton } from './menu-button/menu-button.js';
|
|
@@ -16,7 +15,7 @@ const MenuListItem = ({
|
|
|
16
15
|
'--level': level
|
|
17
16
|
};
|
|
18
17
|
const handleClick = useCallback(event => linkHandler && item.url && linkHandler(event, item.url), []);
|
|
19
|
-
return
|
|
18
|
+
return React__default.createElement(Tag, Object.assign({}, item.url ? {
|
|
20
19
|
href: item.url,
|
|
21
20
|
onClick: handleClick
|
|
22
21
|
} : {}, {
|
|
@@ -26,9 +25,7 @@ const MenuListItem = ({
|
|
|
26
25
|
[styles.activeWithChild]: item.items && item.items.length
|
|
27
26
|
}),
|
|
28
27
|
style: style
|
|
29
|
-
},
|
|
30
|
-
children: item.title
|
|
31
|
-
}), void 0);
|
|
28
|
+
}), item.title);
|
|
32
29
|
};
|
|
33
30
|
|
|
34
31
|
const MenuList = ({
|
|
@@ -36,19 +33,17 @@ const MenuList = ({
|
|
|
36
33
|
level,
|
|
37
34
|
linkHandler
|
|
38
35
|
}) => {
|
|
39
|
-
return
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
}, i))
|
|
51
|
-
}, void 0);
|
|
36
|
+
return React__default.createElement(React__default.Fragment, null, items.map((item, i) => React__default.createElement(Fragment, {
|
|
37
|
+
key: i
|
|
38
|
+
}, React__default.createElement(MenuListItem, {
|
|
39
|
+
item: item,
|
|
40
|
+
level: level,
|
|
41
|
+
linkHandler: linkHandler
|
|
42
|
+
}), item.items && item.items.length > 0 && React__default.createElement(MenuList, {
|
|
43
|
+
items: item.items,
|
|
44
|
+
level: level + 1,
|
|
45
|
+
linkHandler: linkHandler
|
|
46
|
+
}))));
|
|
52
47
|
};
|
|
53
48
|
|
|
54
49
|
const MenuPopup = ({
|
|
@@ -81,24 +76,20 @@ const MenuPopup = ({
|
|
|
81
76
|
|
|
82
77
|
setExpand(!isExpanded);
|
|
83
78
|
}, [isExpanded, navRef]);
|
|
84
|
-
return
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
linkHandler: linkHandler
|
|
99
|
-
}, void 0)
|
|
100
|
-
}), void 0)]
|
|
101
|
-
}, void 0);
|
|
79
|
+
return React__default.createElement(React__default.Fragment, null, React__default.createElement(MenuButton, {
|
|
80
|
+
onClick: handleClick,
|
|
81
|
+
isExpanded: isExpanded
|
|
82
|
+
}), React__default.createElement("nav", {
|
|
83
|
+
style: navStyle,
|
|
84
|
+
ref: navRef,
|
|
85
|
+
className: classNames(styles.menuPopup, textCn('rs-text-2'), {
|
|
86
|
+
[styles.menuPopupExpanded]: isExpanded
|
|
87
|
+
})
|
|
88
|
+
}, React__default.createElement(MenuList, {
|
|
89
|
+
items: items,
|
|
90
|
+
level: 0,
|
|
91
|
+
linkHandler: linkHandler
|
|
92
|
+
})));
|
|
102
93
|
};
|
|
103
94
|
|
|
104
95
|
export { MenuPopup };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import React__default from 'react';
|
|
2
2
|
import styles from './search-button.module.pcss.js';
|
|
3
3
|
import classNames from 'classnames';
|
|
4
4
|
import SvgSearch from './search.svg.js';
|
|
@@ -7,16 +7,14 @@ const SearchButton = ({
|
|
|
7
7
|
onClick,
|
|
8
8
|
isActive
|
|
9
9
|
}) => {
|
|
10
|
-
return
|
|
10
|
+
return React__default.createElement("button", {
|
|
11
11
|
type: "button",
|
|
12
12
|
className: classNames(styles.button, {
|
|
13
13
|
[styles.active]: isActive
|
|
14
14
|
}),
|
|
15
15
|
"aria-label": "Search",
|
|
16
16
|
onClick: onClick
|
|
17
|
-
},
|
|
18
|
-
children: jsx(SvgSearch, {}, void 0)
|
|
19
|
-
}), void 0);
|
|
17
|
+
}, React__default.createElement(SvgSearch, null));
|
|
20
18
|
};
|
|
21
19
|
|
|
22
20
|
export { SearchButton };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import React from 'react';
|
|
2
2
|
import ReactModal from 'react-modal';
|
|
3
3
|
import { LayeringConsumer, LayeringProvider } from '@rescui/ui-contexts';
|
|
4
4
|
import { CloseIcon, LoadingIcon } from '@rescui/icons';
|
|
@@ -17,45 +17,39 @@ const Popup = ({
|
|
|
17
17
|
ariaHideApp = false,
|
|
18
18
|
...restProps
|
|
19
19
|
}) => {
|
|
20
|
-
return
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
}, void 0) : children, jsx(RemoveScrollBar, {
|
|
54
|
-
gapMode: "margin"
|
|
55
|
-
}, void 0)]
|
|
56
|
-
}), void 0)
|
|
57
|
-
}), void 0)
|
|
58
|
-
}, void 0);
|
|
20
|
+
return React.createElement(LayeringConsumer, null, ({
|
|
21
|
+
popupZIndex
|
|
22
|
+
}) => React.createElement(LayeringProvider, {
|
|
23
|
+
baseLayer: "popup"
|
|
24
|
+
}, React.createElement(ReactModal, Object.assign({
|
|
25
|
+
isOpen: isOpen,
|
|
26
|
+
className: styles.popup,
|
|
27
|
+
overlayClassName: styles.overlay,
|
|
28
|
+
onRequestClose: onRequestClose,
|
|
29
|
+
shouldCloseOnOverlayClick: shouldCloseOnOverlayClick,
|
|
30
|
+
shouldCloseOnEsc: shouldCloseOnEsc
|
|
31
|
+
}, restProps, {
|
|
32
|
+
ariaHideApp: ariaHideApp,
|
|
33
|
+
style: {
|
|
34
|
+
overlay: {
|
|
35
|
+
zIndex: popupZIndex
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
}), !busy && showOuterCloseButton && React.createElement(Button, {
|
|
39
|
+
mode: 'rock',
|
|
40
|
+
theme: 'light',
|
|
41
|
+
icon: React.createElement(CloseIcon, null),
|
|
42
|
+
className: styles.close,
|
|
43
|
+
onClick: onRequestClose,
|
|
44
|
+
"data-test": "close-button"
|
|
45
|
+
}), busy ? React.createElement(LoadingIcon, {
|
|
46
|
+
size: "l",
|
|
47
|
+
theme: "dark",
|
|
48
|
+
mode: "rock",
|
|
49
|
+
"data-test": "loading-icon"
|
|
50
|
+
}) : children, React.createElement(RemoveScrollBar, {
|
|
51
|
+
gapMode: "margin"
|
|
52
|
+
}))));
|
|
59
53
|
};
|
|
60
54
|
|
|
61
55
|
export { Popup };
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { useState, useCallback } from 'react';
|
|
1
|
+
import React__default, { useState, useCallback } from 'react';
|
|
3
2
|
import SwipeableViews from 'react-swipeable-views';
|
|
4
3
|
import cn from 'classnames';
|
|
5
4
|
import SvgQuote from './quote.svg.js';
|
|
@@ -33,68 +32,39 @@ const QuotesSlider = ({
|
|
|
33
32
|
[styles.controlActive]: index + 1 < totalSlides
|
|
34
33
|
});
|
|
35
34
|
const quoteTextClass = large ? 'ktl-subtitle' : 'ktl-text-1';
|
|
36
|
-
return
|
|
35
|
+
return React__default.createElement("div", {
|
|
37
36
|
className: styles.quotesSlider
|
|
38
|
-
}, {
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
children: slideTitle
|
|
70
|
-
}), void 0)
|
|
71
|
-
}), void 0), quotes.length > 1 && jsxs("div", Object.assign({
|
|
72
|
-
className: styles.controls
|
|
73
|
-
}, {
|
|
74
|
-
children: [jsx("div", Object.assign({
|
|
75
|
-
className: prevButtonClass,
|
|
76
|
-
onClick: handlePrevSlide
|
|
77
|
-
}, {
|
|
78
|
-
children: jsx(SvgSliderArrow, {}, void 0)
|
|
79
|
-
}), void 0), jsx("div", Object.assign({
|
|
80
|
-
className: styles.slidesCount
|
|
81
|
-
}, {
|
|
82
|
-
children: jsxs("p", Object.assign({
|
|
83
|
-
className: "ktl-text-2"
|
|
84
|
-
}, {
|
|
85
|
-
children: [index + 1, "/", totalSlides]
|
|
86
|
-
}), void 0)
|
|
87
|
-
}), void 0), jsx("div", Object.assign({
|
|
88
|
-
className: nextButtonClass,
|
|
89
|
-
onClick: handleNextSlide
|
|
90
|
-
}, {
|
|
91
|
-
children: jsx(SvgSliderArrow, {}, void 0)
|
|
92
|
-
}), void 0)]
|
|
93
|
-
}), void 0)]
|
|
94
|
-
}), void 0)]
|
|
95
|
-
}, void 0)]
|
|
96
|
-
}), void 0)
|
|
97
|
-
}), void 0);
|
|
37
|
+
}, React__default.createElement("div", {
|
|
38
|
+
className: styles.content
|
|
39
|
+
}, React__default.createElement("div", {
|
|
40
|
+
className: styles.iconContainer
|
|
41
|
+
}, React__default.createElement(SvgQuote, null)), React__default.createElement("div", null, quotes.length > 1 ? React__default.createElement(SwipeableViews, {
|
|
42
|
+
index: index,
|
|
43
|
+
onChangeIndex: handleChangeIndex
|
|
44
|
+
}, quotes.map((quote, i) => React__default.createElement("p", {
|
|
45
|
+
className: quoteTextClass,
|
|
46
|
+
key: i
|
|
47
|
+
}, quote.text))) : React__default.createElement("p", {
|
|
48
|
+
className: quoteTextClass
|
|
49
|
+
}, quotes[0].text), React__default.createElement("div", {
|
|
50
|
+
className: styles.nav
|
|
51
|
+
}, React__default.createElement("div", {
|
|
52
|
+
className: styles.title
|
|
53
|
+
}, React__default.createElement("p", {
|
|
54
|
+
className: "ktl-text-2"
|
|
55
|
+
}, slideTitle)), quotes.length > 1 && React__default.createElement("div", {
|
|
56
|
+
className: styles.controls
|
|
57
|
+
}, React__default.createElement("div", {
|
|
58
|
+
className: prevButtonClass,
|
|
59
|
+
onClick: handlePrevSlide
|
|
60
|
+
}, React__default.createElement(SvgSliderArrow, null)), React__default.createElement("div", {
|
|
61
|
+
className: styles.slidesCount
|
|
62
|
+
}, React__default.createElement("p", {
|
|
63
|
+
className: "ktl-text-2"
|
|
64
|
+
}, index + 1, "/", totalSlides)), React__default.createElement("div", {
|
|
65
|
+
className: nextButtonClass,
|
|
66
|
+
onClick: handleNextSlide
|
|
67
|
+
}, React__default.createElement(SvgSliderArrow, null)))))));
|
|
98
68
|
};
|
|
99
69
|
|
|
100
70
|
export { QuotesSlider };
|