@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,4 +1,3 @@
|
|
|
1
|
-
import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
|
|
2
1
|
import React__default, { useState } from 'react';
|
|
3
2
|
import ReactDOM from 'react-dom';
|
|
4
3
|
import classNames from 'classnames';
|
|
@@ -37,45 +36,34 @@ const DropdownMenu = ({
|
|
|
37
36
|
|
|
38
37
|
const handleClick = () => setIsExpanded(!isExpanded);
|
|
39
38
|
|
|
40
|
-
return
|
|
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: item.title
|
|
70
|
-
}), item.url))
|
|
71
|
-
}), void 0)]
|
|
72
|
-
}), void 0), !!portalRoot && ReactDOM.createPortal(jsx("div", {
|
|
73
|
-
className: classNames(styles.overlay, {
|
|
74
|
-
[styles.overlayVisible]: isExpanded
|
|
75
|
-
}),
|
|
76
|
-
onClick: handleClick
|
|
77
|
-
}, void 0), portalRoot)]
|
|
78
|
-
}, void 0);
|
|
39
|
+
return React__default.createElement(React__default.Fragment, null, React__default.createElement("div", {
|
|
40
|
+
className: classNames(styles.dropdownMenu, {
|
|
41
|
+
[styles.dropdownMenuExpanded]: isExpanded
|
|
42
|
+
}),
|
|
43
|
+
onClick: handleClick
|
|
44
|
+
}, React__default.createElement("button", {
|
|
45
|
+
className: classNames(styles.button, textCn('rs-text-2')),
|
|
46
|
+
"aria-haspopup": "true"
|
|
47
|
+
}, React__default.createElement("span", null, activeItem.title), React__default.createElement(SvgArrowDropdownIcon, {
|
|
48
|
+
className: styles.icon
|
|
49
|
+
})), React__default.createElement("nav", {
|
|
50
|
+
className: classNames(styles.dropdownList, {
|
|
51
|
+
[styles.dropdownListDarkTheme]: theme === 'dark'
|
|
52
|
+
})
|
|
53
|
+
}, _items.map((item, index) => React__default.createElement("a", {
|
|
54
|
+
key: item.url,
|
|
55
|
+
href: item.url,
|
|
56
|
+
className: classNames(styles.dropdownItem, textCn('rs-text-2'), {
|
|
57
|
+
[styles.dropdownItemActive]: index === _activeIndex
|
|
58
|
+
}),
|
|
59
|
+
onClick: event => linkHandler?.(event, item.url),
|
|
60
|
+
target: item.isExternal ? '_blank' : undefined
|
|
61
|
+
}, item.title)))), !!portalRoot && ReactDOM.createPortal(React__default.createElement("div", {
|
|
62
|
+
className: classNames(styles.overlay, {
|
|
63
|
+
[styles.overlayVisible]: isExpanded
|
|
64
|
+
}),
|
|
65
|
+
onClick: handleClick
|
|
66
|
+
}), portalRoot));
|
|
79
67
|
};
|
|
80
68
|
|
|
81
69
|
export { DropdownMenu };
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { useCallback } from 'react';
|
|
1
|
+
import React__default, { useCallback } from 'react';
|
|
3
2
|
import classNames from 'classnames';
|
|
4
3
|
import styles from './horizontal-menu.module.pcss.js';
|
|
5
4
|
import { useTextStyles } from '@rescui/typography';
|
|
@@ -11,21 +10,19 @@ const HorizontalMenuItem = ({
|
|
|
11
10
|
}) => {
|
|
12
11
|
const textCn = useTextStyles();
|
|
13
12
|
const handleLink = useCallback(event => linkHandler(event, item.url), [item]);
|
|
14
|
-
return isActive ?
|
|
13
|
+
return isActive ? React__default.createElement("span", {
|
|
14
|
+
key: item.url,
|
|
15
15
|
className: styles.itemActive
|
|
16
|
-
}, {
|
|
17
|
-
children: item.title
|
|
18
|
-
}), item.url) : jsx("a", Object.assign({
|
|
16
|
+
}, item.title) : React__default.createElement("a", {
|
|
19
17
|
href: item.url,
|
|
18
|
+
key: item.url,
|
|
20
19
|
className: classNames(styles.item, textCn('rs-link', {
|
|
21
20
|
hardness: 'average',
|
|
22
21
|
mode: 'clear'
|
|
23
22
|
})),
|
|
24
23
|
onClick: handleLink,
|
|
25
24
|
target: item.isExternal ? '_blank' : undefined
|
|
26
|
-
},
|
|
27
|
-
children: item.title
|
|
28
|
-
}), item.url);
|
|
25
|
+
}, item.title);
|
|
29
26
|
};
|
|
30
27
|
|
|
31
28
|
const HorizontalMenu = ({
|
|
@@ -34,15 +31,14 @@ const HorizontalMenu = ({
|
|
|
34
31
|
linkHandler
|
|
35
32
|
}) => {
|
|
36
33
|
const textCn = useTextStyles();
|
|
37
|
-
return
|
|
34
|
+
return React__default.createElement("nav", {
|
|
38
35
|
className: classNames(styles.horizontalMenu, textCn('rs-text-2'))
|
|
39
|
-
}, {
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
}), void 0);
|
|
36
|
+
}, items.map((item, index) => React__default.createElement(HorizontalMenuItem, {
|
|
37
|
+
key: item.url,
|
|
38
|
+
isActive: index === activeIndex,
|
|
39
|
+
item: item,
|
|
40
|
+
linkHandler: linkHandler
|
|
41
|
+
})));
|
|
46
42
|
};
|
|
47
43
|
|
|
48
44
|
export { HorizontalMenu };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import React__default from 'react';
|
|
2
2
|
import { useTheme } from '@rescui/ui-contexts';
|
|
3
3
|
import classNames from 'classnames';
|
|
4
4
|
import styles from './top-menu.module.pcss.js';
|
|
@@ -20,32 +20,28 @@ const TopMenu = ({
|
|
|
20
20
|
}) => {
|
|
21
21
|
const theme = useTheme();
|
|
22
22
|
const textCn = useTextStyles();
|
|
23
|
-
return
|
|
23
|
+
return React__default.createElement("div", {
|
|
24
24
|
className: classNames(styles.topMenu, className, {
|
|
25
25
|
[styles.topMenuDarkTheme]: theme === 'dark'
|
|
26
26
|
}),
|
|
27
27
|
ref: forwardedRef
|
|
28
|
-
}, {
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
activeIndex: activeIndex,
|
|
46
|
-
linkHandler: linkHandler
|
|
47
|
-
}, void 0), children]
|
|
48
|
-
}), void 0);
|
|
28
|
+
}, React__default.createElement("a", {
|
|
29
|
+
href: homeUrl,
|
|
30
|
+
className: classNames(styles.logo, textCn('rs-h3')),
|
|
31
|
+
onClick: event => linkHandler(event, homeUrl)
|
|
32
|
+
}, title), React__default.createElement(DropdownMenu, {
|
|
33
|
+
items: items,
|
|
34
|
+
activeIndex: activeIndex,
|
|
35
|
+
linkHandler: linkHandler,
|
|
36
|
+
title: title,
|
|
37
|
+
mobileTitle: mobileTitle,
|
|
38
|
+
homeUrl: homeUrl,
|
|
39
|
+
mobileOverview: mobileOverview
|
|
40
|
+
}), React__default.createElement(HorizontalMenu, {
|
|
41
|
+
items: items,
|
|
42
|
+
activeIndex: activeIndex,
|
|
43
|
+
linkHandler: linkHandler
|
|
44
|
+
}), children);
|
|
49
45
|
};
|
|
50
46
|
|
|
51
47
|
export { TopMenu };
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
--rs-font-family-ui: var(--ktl-font-family-inter);
|
|
19
19
|
}
|
|
20
20
|
|
|
21
|
-
|
|
21
|
+
.ktl-hero {
|
|
22
22
|
font-family: var(--ktl-font-family-inter);
|
|
23
23
|
color: var(--ktl-light-text-hard);
|
|
24
24
|
font-weight: normal;
|
|
@@ -28,20 +28,20 @@
|
|
|
28
28
|
margin: 0;
|
|
29
29
|
}
|
|
30
30
|
|
|
31
|
-
|
|
31
|
+
.ktl-hero_theme_dark {
|
|
32
32
|
color: #fff;
|
|
33
33
|
}
|
|
34
34
|
|
|
35
35
|
@media (min-width: 1200px) {
|
|
36
36
|
|
|
37
|
-
|
|
37
|
+
.ktl-hero {
|
|
38
38
|
font-size: 64px;
|
|
39
39
|
line-height: 72px;
|
|
40
40
|
letter-spacing: -3px
|
|
41
41
|
}
|
|
42
42
|
}
|
|
43
43
|
|
|
44
|
-
|
|
44
|
+
.ktl-h1 {
|
|
45
45
|
font-family: var(--ktl-font-family-inter);
|
|
46
46
|
color: var(--ktl-light-text-hard);
|
|
47
47
|
font-weight: normal;
|
|
@@ -51,20 +51,20 @@
|
|
|
51
51
|
margin: 0;
|
|
52
52
|
}
|
|
53
53
|
|
|
54
|
-
|
|
54
|
+
.ktl-h1_theme_dark {
|
|
55
55
|
color: #fff;
|
|
56
56
|
}
|
|
57
57
|
|
|
58
58
|
@media (min-width: 1200px) {
|
|
59
59
|
|
|
60
|
-
|
|
60
|
+
.ktl-h1 {
|
|
61
61
|
font-size: 43px;
|
|
62
62
|
line-height: 48px
|
|
63
63
|
}
|
|
64
64
|
|
|
65
65
|
}
|
|
66
66
|
|
|
67
|
-
|
|
67
|
+
.ktl-h2 {
|
|
68
68
|
font-family: var(--ktl-font-family-inter);
|
|
69
69
|
color: var(--ktl-light-text-hard);
|
|
70
70
|
font-weight: 500;
|
|
@@ -75,13 +75,13 @@
|
|
|
75
75
|
|
|
76
76
|
}
|
|
77
77
|
|
|
78
|
-
|
|
78
|
+
.ktl-h2_theme_dark {
|
|
79
79
|
color: #fff;
|
|
80
80
|
}
|
|
81
81
|
|
|
82
82
|
@media (min-width: 1200px) {
|
|
83
83
|
|
|
84
|
-
|
|
84
|
+
.ktl-h2 {
|
|
85
85
|
font-size: 31px;
|
|
86
86
|
line-height: 40px
|
|
87
87
|
|
|
@@ -89,7 +89,7 @@
|
|
|
89
89
|
|
|
90
90
|
}
|
|
91
91
|
|
|
92
|
-
|
|
92
|
+
.ktl-subtitle {
|
|
93
93
|
font-family: var(--ktl-font-family-inter);
|
|
94
94
|
color: var(--ktl-light-text-hard);
|
|
95
95
|
font-weight: normal;
|
|
@@ -98,19 +98,19 @@
|
|
|
98
98
|
margin: 0;
|
|
99
99
|
}
|
|
100
100
|
|
|
101
|
-
|
|
101
|
+
.ktl-subtitle_theme_dark {
|
|
102
102
|
color: #fff;
|
|
103
103
|
}
|
|
104
104
|
|
|
105
105
|
@media (min-width: 1200px) {
|
|
106
106
|
|
|
107
|
-
|
|
107
|
+
.ktl-subtitle {
|
|
108
108
|
font-size: 31px;
|
|
109
109
|
line-height: 40px
|
|
110
110
|
}
|
|
111
111
|
}
|
|
112
112
|
|
|
113
|
-
|
|
113
|
+
.ktl-h3 {
|
|
114
114
|
font-family: var(--ktl-font-family-inter);
|
|
115
115
|
color: var(--ktl-light-text-hard);
|
|
116
116
|
font-weight: 600;
|
|
@@ -119,11 +119,11 @@
|
|
|
119
119
|
margin: 0;
|
|
120
120
|
}
|
|
121
121
|
|
|
122
|
-
|
|
122
|
+
.ktl-h3_theme_dark {
|
|
123
123
|
color: #fff;
|
|
124
124
|
}
|
|
125
125
|
|
|
126
|
-
|
|
126
|
+
.ktl-h4 {
|
|
127
127
|
font-family: var(--ktl-font-family-inter);
|
|
128
128
|
color: var(--ktl-light-text-hard);
|
|
129
129
|
font-weight: 600;
|
|
@@ -132,11 +132,11 @@
|
|
|
132
132
|
margin: 0;
|
|
133
133
|
}
|
|
134
134
|
|
|
135
|
-
|
|
135
|
+
.ktl-h4_theme_dark {
|
|
136
136
|
color: #fff;
|
|
137
137
|
}
|
|
138
138
|
|
|
139
|
-
|
|
139
|
+
.ktl-text-1 {
|
|
140
140
|
font-family: var(--ktl-font-family-inter);
|
|
141
141
|
color: var(--ktl-light-text-hard);
|
|
142
142
|
font-weight: normal;
|
|
@@ -145,11 +145,11 @@
|
|
|
145
145
|
margin: 0;
|
|
146
146
|
}
|
|
147
147
|
|
|
148
|
-
|
|
148
|
+
.ktl-text-1_theme_dark {
|
|
149
149
|
color: #fff;
|
|
150
150
|
}
|
|
151
151
|
|
|
152
|
-
|
|
152
|
+
.ktl-text-2 {
|
|
153
153
|
font-family: var(--ktl-font-family-inter);
|
|
154
154
|
color: var(--ktl-light-text-hard);
|
|
155
155
|
font-weight: normal;
|
|
@@ -158,11 +158,11 @@
|
|
|
158
158
|
margin: 0;
|
|
159
159
|
}
|
|
160
160
|
|
|
161
|
-
|
|
161
|
+
.ktl-text-2_theme_dark {
|
|
162
162
|
color: #fff;
|
|
163
163
|
}
|
|
164
164
|
|
|
165
|
-
|
|
165
|
+
.ktl-text-3 {
|
|
166
166
|
font-family: var(--ktl-font-family-inter);
|
|
167
167
|
color: var(--ktl-light-text-hard);
|
|
168
168
|
font-weight: normal;
|
|
@@ -171,6 +171,6 @@
|
|
|
171
171
|
margin: 0;
|
|
172
172
|
}
|
|
173
173
|
|
|
174
|
-
|
|
174
|
+
.ktl-text-3_theme_dark {
|
|
175
175
|
color: #fff;
|
|
176
176
|
}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { useState, useRef, useEffect } from 'react';
|
|
1
|
+
import React__default, { useState, useRef, useEffect } from 'react';
|
|
3
2
|
import classNames from 'classnames';
|
|
4
3
|
import styles from './youtube-player.module.pcss.js';
|
|
5
4
|
import SvgPlay24 from './play_24.svg.js';
|
|
@@ -108,7 +107,7 @@ const YoutubePlayer = ({
|
|
|
108
107
|
}
|
|
109
108
|
};
|
|
110
109
|
}, [isAPILoaded, showVideo, startTime, id, mode]);
|
|
111
|
-
return
|
|
110
|
+
return React__default.createElement("div", {
|
|
112
111
|
ref: playerWrapperDivRef,
|
|
113
112
|
onClick: e => {
|
|
114
113
|
e.preventDefault();
|
|
@@ -119,34 +118,28 @@ const YoutubePlayer = ({
|
|
|
119
118
|
[styles.showVideo]: showVideo
|
|
120
119
|
}),
|
|
121
120
|
style: wrapperStyles
|
|
122
|
-
}, {
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
}), void 0)]
|
|
145
|
-
}), void 0), jsx("div", {
|
|
146
|
-
className: styles.player,
|
|
147
|
-
ref: playerDivRef
|
|
148
|
-
}, void 0)]
|
|
149
|
-
}), void 0);
|
|
121
|
+
}, React__default.createElement("div", {
|
|
122
|
+
className: classNames(styles.preview, {
|
|
123
|
+
[styles.previewPlaylist]: !preview && !imgPreview && mode === YoutubePlayerMode.Playlist
|
|
124
|
+
})
|
|
125
|
+
}, preview ? preview : imgPreview && React__default.createElement("img", {
|
|
126
|
+
src: imgPreview,
|
|
127
|
+
alt: previewImgAlt ? previewImgAlt : '',
|
|
128
|
+
className: styles.imagePreview
|
|
129
|
+
}), React__default.createElement("button", {
|
|
130
|
+
type: "button",
|
|
131
|
+
className: classNames(styles.playButton, {
|
|
132
|
+
[styles.hide]: showVideo && !videoLoading,
|
|
133
|
+
[styles.playButtonWhite]: playButtonMode === YoutubePlayButtonMode.White,
|
|
134
|
+
[styles.playButtonBlack]: playButtonMode === YoutubePlayButtonMode.Black,
|
|
135
|
+
[styles.playButtonPrimary]: playButtonMode === YoutubePlayButtonMode.Primary
|
|
136
|
+
})
|
|
137
|
+
}, videoLoading ? React__default.createElement(SvgLoading24, {
|
|
138
|
+
className: styles.iconLoading
|
|
139
|
+
}) : React__default.createElement(SvgPlay24, null))), React__default.createElement("div", {
|
|
140
|
+
className: styles.player,
|
|
141
|
+
ref: playerDivRef
|
|
142
|
+
}));
|
|
150
143
|
};
|
|
151
144
|
|
|
152
145
|
export { YoutubePlayButtonMode, YoutubePlayer, YoutubePlayerMode };
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jetbrains/kotlin-web-site-ui",
|
|
3
3
|
"description": "UI components for Kotlin web sites development",
|
|
4
|
-
"version": "4.0.0-alpha.
|
|
4
|
+
"version": "4.0.0-alpha.3",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"author": "JetBrains",
|
|
7
7
|
"files": [
|
|
@@ -33,10 +33,13 @@
|
|
|
33
33
|
"@rescui/ui-contexts": "0.x",
|
|
34
34
|
"formik": "2.x",
|
|
35
35
|
"react": ">= 16.8.6 < 18",
|
|
36
|
-
"react-dom": ">= 16.8.6 < 18"
|
|
36
|
+
"react-dom": ">= 16.8.6 < 18",
|
|
37
|
+
"react-swipeable-views": "0.x",
|
|
38
|
+
"sha.js": "2.x"
|
|
37
39
|
},
|
|
38
40
|
"devDependencies": {
|
|
39
41
|
"@babel/core": "^7.11.6",
|
|
42
|
+
"@babel/plugin-transform-runtime": "^7.17.0",
|
|
40
43
|
"@babel/preset-env": "^7.11.5",
|
|
41
44
|
"@babel/preset-react": "^7.13.13",
|
|
42
45
|
"@babel/preset-typescript": "^7.13.0",
|
|
@@ -97,6 +100,7 @@
|
|
|
97
100
|
"postcss-loader": "^5.2.0",
|
|
98
101
|
"postcss-mixins": "^7.0.3",
|
|
99
102
|
"postcss-nested": "^5.0.5",
|
|
103
|
+
"postcss-remove-global": "^0.1.1",
|
|
100
104
|
"prettier": "2.2.1",
|
|
101
105
|
"query-string": "^7.0.1",
|
|
102
106
|
"react": "^16.8.6",
|