@jetbrains/kotlin-web-site-ui 4.0.0-alpha.2 → 4.0.1
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/header/header.js +27 -32
- package/out/components/header/horizontal-menu/horizontal-menu.js +43 -53
- 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 +3 -5
- package/out/components/header/menu-popup/menu-popup.js +28 -37
- package/out/components/header/search-button/search-button.js +6 -6
- 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 +30 -40
- package/out/components/top-menu/dropdown-menu/dropdown-menu.module.pcss.js +1 -0
- package/out/components/top-menu/horizontal-menu/horizontal-menu.js +13 -17
- package/out/components/top-menu/index.css +11 -0
- package/out/components/top-menu/top-menu.js +19 -23
- package/out/components/youtube-player/youtube-player.js +24 -31
- package/package.json +6 -7
|
@@ -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 };
|
|
@@ -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.
|
|
4
|
+
"version": "4.0.1",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"author": "JetBrains",
|
|
7
7
|
"files": [
|
|
@@ -17,12 +17,10 @@
|
|
|
17
17
|
"scripts": {
|
|
18
18
|
"codegeneration": "node ./scripts/build.js && yarn run copy-static",
|
|
19
19
|
"copy-static": "copyfiles -f src/svg/*.svg out/svg",
|
|
20
|
-
"build": "webpack --mode production --devtool source-map",
|
|
21
|
-
"watch": "webpack --mode development --watch",
|
|
22
20
|
"storybook": "yarn & start-storybook -p 6006",
|
|
23
21
|
"build-storybook": "build-storybook",
|
|
24
22
|
"storybook-docs": "start-storybook --docs --no-manager-cache",
|
|
25
|
-
"release:ci": "npm run
|
|
23
|
+
"release:ci": "npm run codegeneration && standard-version && git push --follow-tags origin master && npm publish"
|
|
26
24
|
},
|
|
27
25
|
"peerDependencies": {
|
|
28
26
|
"@rescui/checkbox": "0.x",
|
|
@@ -33,10 +31,13 @@
|
|
|
33
31
|
"@rescui/ui-contexts": "0.x",
|
|
34
32
|
"formik": "2.x",
|
|
35
33
|
"react": ">= 16.8.6 < 18",
|
|
36
|
-
"react-dom": ">= 16.8.6 < 18"
|
|
34
|
+
"react-dom": ">= 16.8.6 < 18",
|
|
35
|
+
"react-swipeable-views": "0.x",
|
|
36
|
+
"sha.js": "2.x"
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
39
39
|
"@babel/core": "^7.11.6",
|
|
40
|
+
"@babel/plugin-transform-runtime": "^7.17.0",
|
|
40
41
|
"@babel/preset-env": "^7.11.5",
|
|
41
42
|
"@babel/preset-react": "^7.13.13",
|
|
42
43
|
"@babel/preset-typescript": "^7.13.0",
|
|
@@ -80,7 +81,6 @@
|
|
|
80
81
|
"copyfiles": "^2.4.1",
|
|
81
82
|
"core-js": "^3.10.0",
|
|
82
83
|
"css-loader": "^5.2.0",
|
|
83
|
-
"csso-webpack-plugin": "^2.0.0-beta.3",
|
|
84
84
|
"eslint": "^7.24.0",
|
|
85
85
|
"eslint-config-prettier": "^8.2.0",
|
|
86
86
|
"eslint-plugin-import": "^2.22.1",
|
|
@@ -112,7 +112,6 @@
|
|
|
112
112
|
"sha.js": "^2.4.11",
|
|
113
113
|
"standard-version": "^9.2.0",
|
|
114
114
|
"svgo-loader": "^3.0.0",
|
|
115
|
-
"terser-webpack-plugin": "^5.1.1",
|
|
116
115
|
"typescript": "^4.2.4",
|
|
117
116
|
"webpack": "^5.30.0",
|
|
118
117
|
"webpack-cli": "^4.6.0",
|