@jetbrains/kotlin-web-site-ui 4.8.0-alpha.1 → 4.8.0-alpha.10
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/components/footer/footer.js +6 -11
- package/out/components/footer/footer.module.pcss.js +0 -2
- package/out/components/footer/index.css +28 -32
- package/out/components/footer/social-list/social-item/social-item.js +1 -1
- package/out/components/header/index.css +6 -6
- package/out/components/sidebar/index.css +108 -0
- package/out/components/sidebar/index.js +2 -0
- package/out/components/sidebar/sidebar.js +50 -0
- package/out/components/sidebar/sidebar.module.css.js +10 -0
- package/out/components/sidebar-menu/index.css +36 -0
- package/out/components/sidebar-menu/index.js +3 -0
- package/out/components/sidebar-menu/menu-header.js +30 -0
- package/out/components/sidebar-menu/menu-header.module.css.js +7 -0
- package/out/components/sidebar-menu/menu-item.js +20 -0
- package/out/components/sidebar-menu/popup.module.css.js +5 -0
- package/out/components/sidebar-menu/sidebar-menu.js +32 -0
- package/out/components/top-menu/index.css +2 -2
- package/out/components/typography/index.css +1 -1
- package/out/components/youtube-player/index.css +1 -1
- package/package.json +5 -4
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import React__default from 'react';
|
|
2
|
-
import { useTheme } from '@rescui/ui-contexts';
|
|
3
2
|
import { SocialList } from './social-list/social-list.js';
|
|
4
3
|
import { NavList } from './nav/nav-list.js';
|
|
5
4
|
import { Logo } from './logo/logo.js';
|
|
@@ -12,15 +11,11 @@ const Footer = ({
|
|
|
12
11
|
className
|
|
13
12
|
}) => {
|
|
14
13
|
const textCn = useTextStyles();
|
|
15
|
-
const theme = useTheme();
|
|
16
14
|
const linkClass = textCn('rs-link', {
|
|
17
|
-
hardness: 'hard'
|
|
18
|
-
mode: 'clear'
|
|
15
|
+
hardness: 'hard'
|
|
19
16
|
});
|
|
20
17
|
return React__default.createElement("footer", {
|
|
21
|
-
className: classNames(styles.footer, className,
|
|
22
|
-
[styles.footerDarkTheme]: theme === 'dark'
|
|
23
|
-
}),
|
|
18
|
+
className: classNames(styles.footer, className),
|
|
24
19
|
ref: forwardedRef
|
|
25
20
|
}, React__default.createElement("div", {
|
|
26
21
|
className: 'ktl-layout ktl-layout--center'
|
|
@@ -37,18 +32,18 @@ const Footer = ({
|
|
|
37
32
|
}, React__default.createElement("div", {
|
|
38
33
|
className: styles.motto
|
|
39
34
|
}, "Supported and developed by\u00A0", React__default.createElement("a", {
|
|
40
|
-
className: classNames(linkClass
|
|
35
|
+
className: classNames(linkClass),
|
|
41
36
|
href: "https://www.jetbrains.com/",
|
|
42
37
|
target: "_blank"
|
|
43
38
|
}, "JetBrains"), "."), React__default.createElement("div", {
|
|
44
39
|
className: styles.copyright
|
|
45
40
|
}, "Kotlin\u2122 is\u00A0protected under the", ' ', React__default.createElement("a", {
|
|
46
|
-
className: classNames(linkClass
|
|
41
|
+
className: classNames(linkClass),
|
|
47
42
|
href: "https://kotlinlang.org/foundation/kotlin-foundation.html"
|
|
48
43
|
}, "Kotlin\u00A0Foundation"), ' ', React__default.createElement("br", {
|
|
49
44
|
className: styles.copyrightBreakLine
|
|
50
|
-
}), "and
|
|
51
|
-
className: classNames(linkClass
|
|
45
|
+
}), "and\u00A0licensed under the", ' ', React__default.createElement("a", {
|
|
46
|
+
className: classNames(linkClass),
|
|
52
47
|
target: "_blank",
|
|
53
48
|
href: "https://github.com/JetBrains/kotlin-web-site/blob/master/LICENSE"
|
|
54
49
|
}, "Apache 2\u00A0license"), "."))));
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
var styles = {
|
|
2
2
|
"footer": "ktl-footer-module_footer_m67Up",
|
|
3
|
-
"footerDarkTheme": "ktl-footer-module_footer-dark-theme_YUAFI",
|
|
4
|
-
"underlinedLink": "ktl-footer-module_underlined-link_G0wkq",
|
|
5
3
|
"socialListArea": "ktl-footer-module_social-list-area_bS3eE",
|
|
6
4
|
"socialListTitle": "ktl-footer-module_social-list-title_HPzIP",
|
|
7
5
|
"textArea": "ktl-footer-module_text-area_flccc",
|
|
@@ -5,14 +5,14 @@
|
|
|
5
5
|
}
|
|
6
6
|
|
|
7
7
|
@media (max-width: 616px) {.ktl-social-list-module_social-list_K2Nqu {
|
|
8
|
-
-moz-column-gap:
|
|
9
|
-
column-gap:
|
|
8
|
+
-moz-column-gap: var(--ktl-box-block-l);
|
|
9
|
+
column-gap: var(--ktl-box-block-l)
|
|
10
10
|
}
|
|
11
11
|
}
|
|
12
12
|
|
|
13
13
|
@media (max-width: 472px) {.ktl-social-list-module_social-list_K2Nqu {
|
|
14
|
-
-moz-column-gap:
|
|
15
|
-
column-gap:
|
|
14
|
+
-moz-column-gap: var(--ktl-box-block-l);
|
|
15
|
+
column-gap: var(--ktl-box-block-l);
|
|
16
16
|
grid-template-columns: repeat(3, -webkit-min-content);
|
|
17
17
|
grid-template-columns: repeat(3, min-content);
|
|
18
18
|
grid-auto-flow: row
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
--ktl-mobile-dropdown-list-z-index: 907;
|
|
41
41
|
--ktl-header-height-mobile: 52px;
|
|
42
42
|
--ktl-font-family-inter: Inter, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Droid Sans', 'Helvetica Neue', Arial, sans-serif;
|
|
43
|
-
--
|
|
43
|
+
--ktl-focus-outline: rgba(107,87,255,.8) 0 0 0 4px;
|
|
44
44
|
}
|
|
45
45
|
|
|
46
46
|
:root {
|
|
@@ -71,13 +71,13 @@
|
|
|
71
71
|
}
|
|
72
72
|
|
|
73
73
|
@media (max-width: 616px) {.ktl-nav-list-module_nav-list_-k4np {
|
|
74
|
-
padding:
|
|
75
|
-
margin:
|
|
74
|
+
padding: var(--ktl-box-section-s) 0;
|
|
75
|
+
margin: var(--ktl-box-section-s) 0 0;
|
|
76
76
|
border-top: 1px solid rgba(255, 255, 255, 0.2);
|
|
77
77
|
border-bottom: 1px solid rgba(255, 255, 255, 0.2);
|
|
78
78
|
display: grid;
|
|
79
79
|
grid-template-columns: 1fr 1fr;
|
|
80
|
-
gap:
|
|
80
|
+
gap: var(--ktl-box-section-s)
|
|
81
81
|
}
|
|
82
82
|
}
|
|
83
83
|
|
|
@@ -105,7 +105,7 @@
|
|
|
105
105
|
--ktl-mobile-dropdown-list-z-index: 907;
|
|
106
106
|
--ktl-header-height-mobile: 52px;
|
|
107
107
|
--ktl-font-family-inter: Inter, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Droid Sans', 'Helvetica Neue', Arial, sans-serif;
|
|
108
|
-
--
|
|
108
|
+
--ktl-focus-outline: rgba(107,87,255,.8) 0 0 0 4px;
|
|
109
109
|
}
|
|
110
110
|
|
|
111
111
|
:root {
|
|
@@ -126,7 +126,7 @@
|
|
|
126
126
|
padding-right: 12px;
|
|
127
127
|
margin-right: 12px;
|
|
128
128
|
margin-top: 12px;
|
|
129
|
-
line-height:
|
|
129
|
+
line-height: var(--ktl-box-section-s);
|
|
130
130
|
position: relative;
|
|
131
131
|
}
|
|
132
132
|
|
|
@@ -136,9 +136,9 @@
|
|
|
136
136
|
right: 0;
|
|
137
137
|
top: 50%;
|
|
138
138
|
width: 1px;
|
|
139
|
-
height:
|
|
139
|
+
height: var(--ktl-box-section-s);
|
|
140
140
|
transform: translateY(-50%);
|
|
141
|
-
background-color: rgba(
|
|
141
|
+
background-color: rgba(255, 255, 255, 0.2);
|
|
142
142
|
}
|
|
143
143
|
|
|
144
144
|
.ktl-nav-item-module_nav-item_isoyN:last-child {
|
|
@@ -190,7 +190,7 @@
|
|
|
190
190
|
--ktl-mobile-dropdown-list-z-index: 907;
|
|
191
191
|
--ktl-header-height-mobile: 52px;
|
|
192
192
|
--ktl-font-family-inter: Inter, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Droid Sans', 'Helvetica Neue', Arial, sans-serif;
|
|
193
|
-
--
|
|
193
|
+
--ktl-focus-outline: rgba(107,87,255,.8) 0 0 0 4px;
|
|
194
194
|
}
|
|
195
195
|
|
|
196
196
|
:root {
|
|
@@ -208,22 +208,18 @@
|
|
|
208
208
|
}
|
|
209
209
|
|
|
210
210
|
.ktl-footer-module_footer_m67Up {
|
|
211
|
-
background: var(--ktl-
|
|
212
|
-
padding:
|
|
211
|
+
background: var(--ktl-dark-100);
|
|
212
|
+
padding: var(--ktl-box-page-m) 0;
|
|
213
213
|
min-width: 320px;
|
|
214
214
|
box-sizing: border-box;
|
|
215
|
-
font-family: var(--ktl-font-family-inter);
|
|
216
215
|
text-rendering:optimizeLegibility;
|
|
217
216
|
-webkit-font-smoothing:antialiased;
|
|
218
217
|
-moz-osx-font-smoothing:grayscale;
|
|
219
218
|
}
|
|
220
219
|
|
|
221
|
-
.ktl-footer-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
.ktl-footer-module_footer-dark-theme_YUAFI .ktl-footer-module_underlined-link_G0wkq {
|
|
226
|
-
border-color: inherit;
|
|
220
|
+
.ktl-footer-module_footer_m67Up :focus-visible, .ktl-footer-module_footer_m67Up :focus[data-focus-method=key] {
|
|
221
|
+
outline: none;
|
|
222
|
+
box-shadow: var(--ktl-focus-outline);
|
|
227
223
|
}
|
|
228
224
|
|
|
229
225
|
.ktl-footer-module_social-list-area_bS3eE {
|
|
@@ -232,32 +228,28 @@
|
|
|
232
228
|
}
|
|
233
229
|
|
|
234
230
|
.ktl-footer-module_social-list-title_HPzIP {
|
|
235
|
-
margin-right:
|
|
231
|
+
margin-right: var(--ktl-box-block-m);
|
|
236
232
|
}
|
|
237
233
|
|
|
238
234
|
.ktl-footer-module_text-area_flccc {
|
|
239
|
-
margin-top:
|
|
235
|
+
margin-top: var(--ktl-box-block-m);
|
|
240
236
|
}
|
|
241
237
|
|
|
242
238
|
.ktl-footer-module_logo-area_SsNTa {
|
|
243
|
-
margin-top:
|
|
239
|
+
margin-top: var(--ktl-box-page-m);
|
|
244
240
|
}
|
|
245
241
|
|
|
246
242
|
.ktl-footer-module_copyright_XjtgY {
|
|
247
243
|
display: inline;
|
|
248
244
|
}
|
|
249
245
|
|
|
250
|
-
.ktl-footer-module_underlined-link_G0wkq {
|
|
251
|
-
border-color: var(--ktl-light-dark-20);
|
|
252
|
-
}
|
|
253
|
-
|
|
254
246
|
.ktl-footer-module_copyrightBreakLine_0hI7E {
|
|
255
247
|
display: none;
|
|
256
248
|
}
|
|
257
249
|
|
|
258
250
|
@media (max-width: 808px) {
|
|
259
251
|
.ktl-footer-module_footer_m67Up {
|
|
260
|
-
padding:
|
|
252
|
+
padding: var(--ktl-box-section-l) 0;
|
|
261
253
|
}
|
|
262
254
|
}
|
|
263
255
|
|
|
@@ -267,7 +259,7 @@
|
|
|
267
259
|
}
|
|
268
260
|
|
|
269
261
|
.ktl-footer-module_logo-area_SsNTa {
|
|
270
|
-
margin-top:
|
|
262
|
+
margin-top: var(--ktl-box-section-s);
|
|
271
263
|
}
|
|
272
264
|
|
|
273
265
|
.ktl-footer-module_copyrightBreakLine_0hI7E {
|
|
@@ -277,7 +269,11 @@
|
|
|
277
269
|
|
|
278
270
|
@media (max-width: 472px) {
|
|
279
271
|
.ktl-footer-module_footer_m67Up {
|
|
280
|
-
padding:
|
|
272
|
+
padding: var(--ktl-box-section-s) 0 var(--ktl-box-section-l);
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
.ktl-footer-module_copyrightBreakLine_0hI7E {
|
|
276
|
+
display: none;
|
|
281
277
|
}
|
|
282
278
|
}
|
|
283
279
|
.ktl-layout {
|
|
@@ -2,7 +2,7 @@ import React__default from 'react';
|
|
|
2
2
|
import { useTheme } from '@rescui/ui-contexts';
|
|
3
3
|
import classNames from 'classnames';
|
|
4
4
|
import styles from './social-item.module.pcss.js';
|
|
5
|
-
import
|
|
5
|
+
import Button from '@rescui/button';
|
|
6
6
|
|
|
7
7
|
const SocialItem = ({
|
|
8
8
|
socialNetwork
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
--ktl-mobile-dropdown-list-z-index: 907;
|
|
42
42
|
--ktl-header-height-mobile: 52px;
|
|
43
43
|
--ktl-font-family-inter: Inter, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Droid Sans', 'Helvetica Neue', Arial, sans-serif;
|
|
44
|
-
--
|
|
44
|
+
--ktl-focus-outline: rgba(107,87,255,.8) 0 0 0 4px;
|
|
45
45
|
}
|
|
46
46
|
|
|
47
47
|
:root {
|
|
@@ -106,7 +106,7 @@
|
|
|
106
106
|
--ktl-mobile-dropdown-list-z-index: 907;
|
|
107
107
|
--ktl-header-height-mobile: 52px;
|
|
108
108
|
--ktl-font-family-inter: Inter, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Droid Sans', 'Helvetica Neue', Arial, sans-serif;
|
|
109
|
-
--
|
|
109
|
+
--ktl-focus-outline: rgba(107,87,255,.8) 0 0 0 4px;
|
|
110
110
|
}
|
|
111
111
|
|
|
112
112
|
:root {
|
|
@@ -270,7 +270,7 @@
|
|
|
270
270
|
--ktl-mobile-dropdown-list-z-index: 907;
|
|
271
271
|
--ktl-header-height-mobile: 52px;
|
|
272
272
|
--ktl-font-family-inter: Inter, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Droid Sans', 'Helvetica Neue', Arial, sans-serif;
|
|
273
|
-
--
|
|
273
|
+
--ktl-focus-outline: rgba(107,87,255,.8) 0 0 0 4px;
|
|
274
274
|
}
|
|
275
275
|
|
|
276
276
|
:root {
|
|
@@ -748,7 +748,7 @@
|
|
|
748
748
|
--ktl-mobile-dropdown-list-z-index: 907;
|
|
749
749
|
--ktl-header-height-mobile: 52px;
|
|
750
750
|
--ktl-font-family-inter: Inter, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Droid Sans', 'Helvetica Neue', Arial, sans-serif;
|
|
751
|
-
--
|
|
751
|
+
--ktl-focus-outline: rgba(107,87,255,.8) 0 0 0 4px;
|
|
752
752
|
}
|
|
753
753
|
|
|
754
754
|
:root {
|
|
@@ -826,7 +826,7 @@
|
|
|
826
826
|
--ktl-mobile-dropdown-list-z-index: 907;
|
|
827
827
|
--ktl-header-height-mobile: 52px;
|
|
828
828
|
--ktl-font-family-inter: Inter, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Droid Sans', 'Helvetica Neue', Arial, sans-serif;
|
|
829
|
-
--
|
|
829
|
+
--ktl-focus-outline: rgba(107,87,255,.8) 0 0 0 4px;
|
|
830
830
|
}
|
|
831
831
|
|
|
832
832
|
:root {
|
|
@@ -899,7 +899,7 @@
|
|
|
899
899
|
--ktl-mobile-dropdown-list-z-index: 907;
|
|
900
900
|
--ktl-header-height-mobile: 52px;
|
|
901
901
|
--ktl-font-family-inter: Inter, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Droid Sans', 'Helvetica Neue', Arial, sans-serif;
|
|
902
|
-
--
|
|
902
|
+
--ktl-focus-outline: rgba(107,87,255,.8) 0 0 0 4px;
|
|
903
903
|
}
|
|
904
904
|
|
|
905
905
|
:root {
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
.ktl-sidebar-module_popup_bidR1 {
|
|
2
|
+
position: fixed;
|
|
3
|
+
top: 0;
|
|
4
|
+
left: 0;
|
|
5
|
+
right: 0;
|
|
6
|
+
bottom: 0;
|
|
7
|
+
z-index: 910;
|
|
8
|
+
|
|
9
|
+
--ktf-header-animation-timing: 250ms;
|
|
10
|
+
--ktf-header-animation-function: cubic-bezier(0.4, 0, 0.2, 1);
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.ktl-sidebar-module_popup_bidR1::before {
|
|
14
|
+
display: block;
|
|
15
|
+
content: '';
|
|
16
|
+
|
|
17
|
+
position: absolute;
|
|
18
|
+
top: 0;
|
|
19
|
+
bottom: 0;
|
|
20
|
+
right: 0;
|
|
21
|
+
left: 0;
|
|
22
|
+
|
|
23
|
+
visibility: visible;
|
|
24
|
+
-webkit-backdrop-filter: blur(4px);
|
|
25
|
+
backdrop-filter: blur(4px);
|
|
26
|
+
|
|
27
|
+
transition: background-color var(--ktf-header-animation-function) var(--ktf-header-animation-timing),
|
|
28
|
+
visibility var(--ktf-header-animation-function) var(--ktf-header-animation-timing),
|
|
29
|
+
-webkit-backdrop-filter var(--ktf-header-animation-function) var(--ktf-header-animation-timing);
|
|
30
|
+
|
|
31
|
+
transition: background-color var(--ktf-header-animation-function) var(--ktf-header-animation-timing),
|
|
32
|
+
visibility var(--ktf-header-animation-function) var(--ktf-header-animation-timing),
|
|
33
|
+
backdrop-filter var(--ktf-header-animation-function) var(--ktf-header-animation-timing);
|
|
34
|
+
|
|
35
|
+
transition: background-color var(--ktf-header-animation-function) var(--ktf-header-animation-timing),
|
|
36
|
+
visibility var(--ktf-header-animation-function) var(--ktf-header-animation-timing),
|
|
37
|
+
backdrop-filter var(--ktf-header-animation-function) var(--ktf-header-animation-timing),
|
|
38
|
+
-webkit-backdrop-filter var(--ktf-header-animation-function) var(--ktf-header-animation-timing);
|
|
39
|
+
will-change: background-color, visible;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.ktl-sidebar-module_popup_bidR1.ktl-sidebar-module_tabletMode_vcf0T {
|
|
43
|
+
--ktl-sidebar-width: 320px;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.ktl-sidebar-module_popup_bidR1.ktl-sidebar-module_mobileMode_yCmFY {
|
|
47
|
+
--ktl-sidebar-width: 100%;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
@media (min-width: 473px) {
|
|
51
|
+
|
|
52
|
+
.ktl-sidebar-module_popup_bidR1:not(:is(.ktl-sidebar-module_tabletMode_vcf0T, .ktl-sidebar-module_mobileMode_yCmFY)) {
|
|
53
|
+
--ktl-sidebar-width: 320px
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
@media (max-width: 472px) {
|
|
58
|
+
|
|
59
|
+
.ktl-sidebar-module_popup_bidR1:not(:is(.ktl-sidebar-module_tabletMode_vcf0T, .ktl-sidebar-module_mobileMode_yCmFY)) {
|
|
60
|
+
--ktl-sidebar-width: 100%
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
.ktl-sidebar-module_content_SzdiT {
|
|
65
|
+
margin-left: auto;
|
|
66
|
+
height: 100%;
|
|
67
|
+
max-width: 100%;
|
|
68
|
+
width: var(--ktl-sidebar-width, auto);
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
.ktl-sidebar-module_dark_GNaUl::before {
|
|
72
|
+
background-color: rgba(0, 0, 0, 0.5);
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
.ktl-sidebar-module_dark_GNaUl > .ktl-sidebar-module_content_SzdiT {
|
|
76
|
+
background-color: var(--ktl-dark-100);
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
.ktl-sidebar-module_light_OnGcf::before {
|
|
80
|
+
background-color: rgba(0, 0, 0, 0.62);
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
.ktl-sidebar-module_light_OnGcf > .ktl-sidebar-module_content_SzdiT {
|
|
84
|
+
background-color: #fff;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
.ktl-sidebar-module_popup_bidR1 > .ktl-sidebar-module_content_SzdiT {
|
|
88
|
+
transform: translateX(0);
|
|
89
|
+
|
|
90
|
+
transition: transform var(--ktf-header-animation-function) var(--ktf-header-animation-timing),
|
|
91
|
+
visibility var(--ktf-header-animation-function) var(--ktf-header-animation-timing);
|
|
92
|
+
will-change: transform;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
.ktl-sidebar-module_close_lN33m {
|
|
96
|
+
--ktf-header-animation-timing: 300ms;
|
|
97
|
+
pointer-events: none;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
.ktl-sidebar-module_close_lN33m::before {
|
|
101
|
+
background: rgba(0, 0, 0, 0);
|
|
102
|
+
visibility: hidden;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
.ktl-sidebar-module_close_lN33m > .ktl-sidebar-module_content_SzdiT {
|
|
106
|
+
transform: translateX(100%);
|
|
107
|
+
visibility: hidden;
|
|
108
|
+
}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import React, { createContext, useContext, useRef, useCallback } from 'react';
|
|
2
|
+
import cn from 'classnames';
|
|
3
|
+
import { RemoveScrollBar } from 'react-remove-scroll-bar';
|
|
4
|
+
import { useTheme } from '@rescui/ui-contexts';
|
|
5
|
+
import styles from './sidebar.module.css.js';
|
|
6
|
+
const SidebarContext = createContext({});
|
|
7
|
+
|
|
8
|
+
function useSidebarContext() {
|
|
9
|
+
return useContext(SidebarContext);
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
function Sidebar({
|
|
13
|
+
className,
|
|
14
|
+
classNameContent,
|
|
15
|
+
mode,
|
|
16
|
+
children,
|
|
17
|
+
isOpen,
|
|
18
|
+
onClose
|
|
19
|
+
}) {
|
|
20
|
+
const ref = useRef(null);
|
|
21
|
+
const theme = useTheme();
|
|
22
|
+
const onToggleClick = useCallback(e => {
|
|
23
|
+
if (e.currentTarget == e.target) onClose();
|
|
24
|
+
}, [onClose]);
|
|
25
|
+
const classes = cn(className, styles.popup, styles[theme || 'light'], {
|
|
26
|
+
[styles.close]: !isOpen,
|
|
27
|
+
[styles[`${mode}Mode`]]: Boolean(mode && styles[`${mode}Mode`])
|
|
28
|
+
});
|
|
29
|
+
const disableProps = {};
|
|
30
|
+
|
|
31
|
+
if (!isOpen) {
|
|
32
|
+
disableProps.tabIndex = -1;
|
|
33
|
+
disableProps.role = 'none';
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
return React.createElement(SidebarContext.Provider, {
|
|
37
|
+
value: {
|
|
38
|
+
onClose
|
|
39
|
+
}
|
|
40
|
+
}, React.createElement("div", {
|
|
41
|
+
className: classes,
|
|
42
|
+
onClick: onToggleClick,
|
|
43
|
+
...disableProps
|
|
44
|
+
}, isOpen && React.createElement(RemoveScrollBar, null), React.createElement("div", {
|
|
45
|
+
ref: ref,
|
|
46
|
+
className: cn(classNameContent, styles.content)
|
|
47
|
+
}, children)));
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
export { Sidebar, SidebarContext, useSidebarContext };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
var styles = {
|
|
2
|
+
"popup": "ktl-sidebar-module_popup_bidR1",
|
|
3
|
+
"tabletMode": "ktl-sidebar-module_tabletMode_vcf0T",
|
|
4
|
+
"mobileMode": "ktl-sidebar-module_mobileMode_yCmFY",
|
|
5
|
+
"content": "ktl-sidebar-module_content_SzdiT",
|
|
6
|
+
"dark": "ktl-sidebar-module_dark_GNaUl",
|
|
7
|
+
"light": "ktl-sidebar-module_light_OnGcf",
|
|
8
|
+
"close": "ktl-sidebar-module_close_lN33m"
|
|
9
|
+
};
|
|
10
|
+
export { styles as default };
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
.ktl-popup-module_popup_b34tS {
|
|
2
|
+
display: flex;
|
|
3
|
+
flex-direction: column;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
.ktl-popup-module_menu_wZMEB {
|
|
7
|
+
padding: 0;
|
|
8
|
+
margin: 0;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.ktl-menu-header-module_header_nm8jO {
|
|
12
|
+
display: flex;
|
|
13
|
+
align-items: center;
|
|
14
|
+
justify-content: space-between;
|
|
15
|
+
padding-left: var(--ktl-box-block-l);
|
|
16
|
+
border-bottom: 1px solid transparent;
|
|
17
|
+
margin-bottom: var(--ktl-box-block-m);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.ktl-menu-header-module_light_3UtZR {
|
|
21
|
+
border-bottom-color: var(--ktl-divider-color);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.ktl-menu-header-module_dark_jdymL {
|
|
25
|
+
border-bottom-color: rgba(255, 255, 255, 0.30);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.ktl-menu-header-module_header_nm8jO > .ktl-menu-header-module_trigger_FbJ59 {
|
|
29
|
+
display: flex;
|
|
30
|
+
align-items: center;
|
|
31
|
+
justify-content: center;
|
|
32
|
+
cursor: pointer;
|
|
33
|
+
border-radius: 50%;
|
|
34
|
+
width: 52px;
|
|
35
|
+
height: 52px;
|
|
36
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import cn from 'classnames';
|
|
3
|
+
import { useTheme } from '@rescui/ui-contexts';
|
|
4
|
+
import { CloseIcon } from '@rescui/icons';
|
|
5
|
+
import { Button } from '@rescui/button';
|
|
6
|
+
import { useSidebarContext } from '@jetbrains/kotlin-web-site-ui/out/components/sidebar';
|
|
7
|
+
import styles from './menu-header.module.css.js';
|
|
8
|
+
|
|
9
|
+
function SidebarMenuHeader({
|
|
10
|
+
className,
|
|
11
|
+
children,
|
|
12
|
+
onClose
|
|
13
|
+
}) {
|
|
14
|
+
const theme = useTheme();
|
|
15
|
+
const {
|
|
16
|
+
onClose: onCloseContext
|
|
17
|
+
} = useSidebarContext();
|
|
18
|
+
const close = onClose || onCloseContext;
|
|
19
|
+
return React.createElement("div", {
|
|
20
|
+
className: cn(styles[theme || 'light'], className, styles.header)
|
|
21
|
+
}, children, React.createElement(Button, {
|
|
22
|
+
"aria-label": "close menu",
|
|
23
|
+
mode: "clear",
|
|
24
|
+
className: styles.trigger,
|
|
25
|
+
onClick: close,
|
|
26
|
+
icon: React.createElement(CloseIcon, null)
|
|
27
|
+
}));
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export { SidebarMenuHeader };
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import React, { useCallback } from 'react';
|
|
2
|
+
import { MenuItem } from '@rescui/menu';
|
|
3
|
+
|
|
4
|
+
function SidebarMenuItem({
|
|
5
|
+
index,
|
|
6
|
+
isActive,
|
|
7
|
+
onClick,
|
|
8
|
+
...props
|
|
9
|
+
}) {
|
|
10
|
+
const handleClick = useCallback(e => {
|
|
11
|
+
if (onClick) onClick(e, index);
|
|
12
|
+
}, [onClick, index]);
|
|
13
|
+
return React.createElement(MenuItem, {
|
|
14
|
+
selected: isActive,
|
|
15
|
+
...props,
|
|
16
|
+
onClick: handleClick
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export { SidebarMenuItem };
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import cn from 'classnames';
|
|
3
|
+
import { Menu } from '@rescui/menu';
|
|
4
|
+
import { Sidebar } from '@jetbrains/kotlin-web-site-ui/out/components/sidebar';
|
|
5
|
+
import { SidebarMenuItem } from './menu-item.js';
|
|
6
|
+
import styles from './popup.module.css.js';
|
|
7
|
+
import '@rescui/ui-contexts';
|
|
8
|
+
import '@rescui/icons';
|
|
9
|
+
import '@rescui/button';
|
|
10
|
+
|
|
11
|
+
function SidebarMenu({
|
|
12
|
+
className,
|
|
13
|
+
before,
|
|
14
|
+
activeIndex,
|
|
15
|
+
items,
|
|
16
|
+
onItemClick,
|
|
17
|
+
...props
|
|
18
|
+
}) {
|
|
19
|
+
return React.createElement(Sidebar, { ...props,
|
|
20
|
+
className: cn(className, styles.popup)
|
|
21
|
+
}, before, React.createElement(Menu, {
|
|
22
|
+
className: styles.menu
|
|
23
|
+
}, items.map((item, i) => React.createElement(SidebarMenuItem, {
|
|
24
|
+
key: i,
|
|
25
|
+
isActive: i === activeIndex,
|
|
26
|
+
index: i,
|
|
27
|
+
...item,
|
|
28
|
+
onClick: onItemClick
|
|
29
|
+
}))));
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export { SidebarMenu };
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
--ktl-mobile-dropdown-list-z-index: 907;
|
|
18
18
|
--ktl-header-height-mobile: 52px;
|
|
19
19
|
--ktl-font-family-inter: Inter, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Droid Sans', 'Helvetica Neue', Arial, sans-serif;
|
|
20
|
-
--
|
|
20
|
+
--ktl-focus-outline: rgba(107,87,255,.8) 0 0 0 4px;
|
|
21
21
|
}
|
|
22
22
|
|
|
23
23
|
:root {
|
|
@@ -109,7 +109,7 @@
|
|
|
109
109
|
--ktl-mobile-dropdown-list-z-index: 907;
|
|
110
110
|
--ktl-header-height-mobile: 52px;
|
|
111
111
|
--ktl-font-family-inter: Inter, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Droid Sans', 'Helvetica Neue', Arial, sans-serif;
|
|
112
|
-
--
|
|
112
|
+
--ktl-focus-outline: rgba(107,87,255,.8) 0 0 0 4px;
|
|
113
113
|
}
|
|
114
114
|
|
|
115
115
|
:root {
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
--ktl-mobile-dropdown-list-z-index: 907;
|
|
18
18
|
--ktl-header-height-mobile: 52px;
|
|
19
19
|
--ktl-font-family-inter: Inter, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Droid Sans', 'Helvetica Neue', Arial, sans-serif;
|
|
20
|
-
--
|
|
20
|
+
--ktl-focus-outline: rgba(107,87,255,.8) 0 0 0 4px;
|
|
21
21
|
}
|
|
22
22
|
|
|
23
23
|
:root {
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
--ktl-mobile-dropdown-list-z-index: 907;
|
|
18
18
|
--ktl-header-height-mobile: 52px;
|
|
19
19
|
--ktl-font-family-inter: Inter, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Droid Sans', 'Helvetica Neue', Arial, sans-serif;
|
|
20
|
-
--
|
|
20
|
+
--ktl-focus-outline: rgba(107,87,255,.8) 0 0 0 4px;
|
|
21
21
|
}
|
|
22
22
|
|
|
23
23
|
:root {
|
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.8.0-alpha.
|
|
4
|
+
"version": "4.8.0-alpha.10",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"author": "JetBrains",
|
|
7
7
|
"files": [
|
|
@@ -48,15 +48,16 @@
|
|
|
48
48
|
"@babel/preset-typescript": "^7.13.0",
|
|
49
49
|
"@babel/register": "^7.11.5",
|
|
50
50
|
"@react-hook/resize-observer": "^1.2.5",
|
|
51
|
-
"@rescui/button": "^0.
|
|
51
|
+
"@rescui/button": "^0.10.0",
|
|
52
52
|
"@rescui/checkbox": "^0.1.0",
|
|
53
53
|
"@rescui/focus-manager": "^0.1.1",
|
|
54
54
|
"@rescui/icons": "^0.12.0",
|
|
55
55
|
"@rescui/input": "^0.4.6",
|
|
56
|
+
"@rescui/menu": "^0.9.4",
|
|
56
57
|
"@rescui/switcher": "^0.2.2",
|
|
57
58
|
"@rescui/tooltip": "^0.1.2",
|
|
58
|
-
"@rescui/typography": "^0.
|
|
59
|
-
"@rescui/ui-contexts": "^0.
|
|
59
|
+
"@rescui/typography": "^0.11.0",
|
|
60
|
+
"@rescui/ui-contexts": "^0.4.3",
|
|
60
61
|
"@rollup/plugin-babel": "^5.3.1",
|
|
61
62
|
"@rollup/plugin-json": "^4.1.0",
|
|
62
63
|
"@rollup/plugin-node-resolve": "^13.1.3",
|