@jetbrains/kotlin-web-site-ui 4.3.0-alpha.1 → 4.3.0-next-layout
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/breakpoints/constants.js +19 -0
- package/out/components/breakpoints/index.js +1 -0
- package/out/components/cta-block/index.css +2 -2
- package/out/components/footer/index.css +3 -6
- package/out/components/grid/index.css +65 -65
- package/out/components/header/full-search/full-search.js +1 -8
- package/out/components/header/header.js +16 -7
- package/out/components/header/header.module.pcss.js +2 -1
- package/out/components/header/index.css +72 -118
- package/out/components/header/index.js +1 -1
- package/out/components/header/logo-small/kotlin-logo-small.svg.js +16 -18
- package/out/components/header/logo-small/logo-small.js +1 -1
- package/out/components/header/menu-popup/menu-button/close-icon.svg.js +35 -0
- package/out/components/header/menu-popup/menu-button/hamburger-icon.svg.js +35 -0
- package/out/components/header/menu-popup/menu-button/menu-button.js +5 -8
- package/out/components/header/menu-popup/menu-popup.js +42 -2
- package/out/components/header/menu-popup/menu-popup.module.pcss.js +4 -0
- package/out/components/header/nav-scheme.js +3 -9
- package/out/components/header/search-button/search-button.js +2 -13
- package/out/components/header/search-button/search-button.module.pcss.js +1 -2
- package/out/components/layout/index.css +46 -0
- package/out/components/layout/index.js +1 -0
- package/out/components/popup/index.css +1 -1
- package/out/components/quotes-slider/index.css +4 -4
- package/out/components/top-menu/{vertical-menu → dropdown-menu}/arrow-dropdown-icon.svg.js +0 -0
- package/out/components/top-menu/dropdown-menu/dropdown-menu.js +71 -0
- package/out/components/top-menu/dropdown-menu/dropdown-menu.module.pcss.js +15 -0
- package/out/components/top-menu/index.css +124 -91
- package/out/components/top-menu/top-menu.js +13 -20
- package/out/components/typography/index.css +5 -6
- package/out/components/youtube-player/index.css +1 -2
- package/package.json +4 -2
- package/out/components/header/menu-popup/menu-list/menu-list.js +0 -33
- package/out/components/header/menu-popup/menu-list/menu-list.module.pcss.js +0 -4
- package/out/components/header/menu-popup/menu-list-item/menu-list-item.js +0 -28
- package/out/components/header/menu-popup/menu-list-item/menu-list-item.module.pcss.js +0 -7
- package/out/components/top-menu/vertical-menu/vertical-menu.js +0 -123
- package/out/components/top-menu/vertical-menu/vertical-menu.module.pcss.js +0 -13
|
@@ -35,20 +35,20 @@ const Header = forwardRef(({
|
|
|
35
35
|
isPlayground,
|
|
36
36
|
isUrlActive,
|
|
37
37
|
searchConfig,
|
|
38
|
+
noScrollClassName,
|
|
38
39
|
resultViewType = SearchResultView.Narrow
|
|
39
40
|
}, forwardedRef) => {
|
|
40
41
|
const [menuPopupExpanded, setMenuPopupExpanded] = useState(false);
|
|
42
|
+
const [isMenuPopupVisible, setIsMenuPopupVisible] = useState(false);
|
|
41
43
|
const [isSearchBoxVisible, setSearchBoxVisible] = useState(false);
|
|
42
44
|
const [fullSearchActive, setFullSearchActive] = useState(false);
|
|
43
45
|
const items = useMemo(() => getNavScheme(isUrlActive, currentUrl, isPlayground), [isUrlActive, currentUrl, isPlayground]);
|
|
44
|
-
const itemsWithoutHomeSection = useMemo(() => items.slice(1), [items]);
|
|
45
46
|
const headerRef = useRef(null);
|
|
46
47
|
useImperativeHandle(forwardedRef, () => headerRef.current);
|
|
47
|
-
const [isMenuPopupVisible, setMenuPopupVisible] = useState(false);
|
|
48
48
|
useLayoutEffect(() => {
|
|
49
|
-
|
|
49
|
+
setIsMenuPopupVisible((headerRef.current?.getBoundingClientRect?.().width ?? 0) <= MENU_POPUP_BREAKPOINT);
|
|
50
50
|
}, [headerRef]);
|
|
51
|
-
useResizeObserver(headerRef, entry =>
|
|
51
|
+
useResizeObserver(headerRef, entry => setIsMenuPopupVisible(entry.contentRect.width <= MENU_POPUP_BREAKPOINT));
|
|
52
52
|
const handleSearchButtonClick = useCallback(() => {
|
|
53
53
|
setSearchBoxVisible(!isSearchBoxVisible);
|
|
54
54
|
}, []);
|
|
@@ -77,6 +77,15 @@ const Header = forwardRef(({
|
|
|
77
77
|
};
|
|
78
78
|
}
|
|
79
79
|
}, [fullSearchKeyHandler]);
|
|
80
|
+
useEffect(() => {
|
|
81
|
+
if (typeof document !== `undefined` && noScrollClassName) {
|
|
82
|
+
if (fullSearchActive) {
|
|
83
|
+
document.body.classList.add(noScrollClassName);
|
|
84
|
+
} else {
|
|
85
|
+
document.body.classList.remove(noScrollClassName);
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
}, [fullSearchActive]);
|
|
80
89
|
return React__default.createElement(ThemeProvider, {
|
|
81
90
|
theme: 'dark'
|
|
82
91
|
}, React__default.createElement(SearchWrapper, {
|
|
@@ -85,7 +94,7 @@ const Header = forwardRef(({
|
|
|
85
94
|
ref: headerRef,
|
|
86
95
|
className: classNames(styles.headerMenu, className, {
|
|
87
96
|
[styles.withMenuPopup]: menuPopupExpanded,
|
|
88
|
-
[styles.border]: hasBorder
|
|
97
|
+
[styles.border]: hasBorder
|
|
89
98
|
}),
|
|
90
99
|
"data-test": 'header'
|
|
91
100
|
}, isMenuPopupVisible && currentTitle && currentUrl && !menuPopupExpanded ? React__default.createElement(LogoSmall, {
|
|
@@ -102,10 +111,10 @@ const Header = forwardRef(({
|
|
|
102
111
|
setFullSearchActive: setFullSearchActive,
|
|
103
112
|
searchBoxViewType: resultViewType
|
|
104
113
|
})) : React__default.createElement(React__default.Fragment, null, !isMenuPopupVisible && React__default.createElement(HorizontalMenu, {
|
|
105
|
-
items:
|
|
114
|
+
items: items,
|
|
106
115
|
theme: dropdownTheme,
|
|
107
116
|
linkHandler: linkHandler
|
|
108
|
-
}),
|
|
117
|
+
}), React__default.createElement(SearchButton, {
|
|
109
118
|
onClick: handleSearchButtonClick,
|
|
110
119
|
isActive: hasSearch
|
|
111
120
|
}), isMenuPopupVisible && React__default.createElement(MenuPopup, {
|
|
@@ -38,8 +38,7 @@
|
|
|
38
38
|
--ktl-overlay-z-index: 900;
|
|
39
39
|
--ktl-top-menu-z-index: 905;
|
|
40
40
|
--ktl-header-z-index: 906;
|
|
41
|
-
--ktl-
|
|
42
|
-
--ktl-header-height-mobile: 52px;
|
|
41
|
+
--ktl-header-height-mobile: 48px;
|
|
43
42
|
--ktl-font-family-inter: Inter, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Droid Sans', 'Helvetica Neue', Arial, sans-serif;
|
|
44
43
|
--rs-font-family-ui: var(--ktl-font-family-inter);
|
|
45
44
|
}
|
|
@@ -56,14 +55,18 @@
|
|
|
56
55
|
}
|
|
57
56
|
|
|
58
57
|
.ktl-header-module_border_paN11 {
|
|
59
|
-
box-shadow: inset 0 -1px rgba(255, 255, 255, 0.
|
|
58
|
+
box-shadow: inset 0 -1px rgba(255, 255, 255, 0.2);
|
|
60
59
|
}
|
|
61
60
|
|
|
62
61
|
@media (max-width: 640px) {
|
|
63
62
|
.ktl-header-module_header-menu_wh71L {
|
|
64
|
-
padding: 0
|
|
63
|
+
padding: 0 16px;
|
|
65
64
|
height: var(--ktl-header-height-mobile);
|
|
66
65
|
}
|
|
66
|
+
|
|
67
|
+
.ktl-header-module_header-menu_wh71L:not(.ktl-header-module_with-menu-popup_Bcffw) {
|
|
68
|
+
box-shadow: none;
|
|
69
|
+
}
|
|
67
70
|
}
|
|
68
71
|
|
|
69
72
|
:root {
|
|
@@ -81,8 +84,7 @@
|
|
|
81
84
|
--ktl-overlay-z-index: 900;
|
|
82
85
|
--ktl-top-menu-z-index: 905;
|
|
83
86
|
--ktl-header-z-index: 906;
|
|
84
|
-
--ktl-
|
|
85
|
-
--ktl-header-height-mobile: 52px;
|
|
87
|
+
--ktl-header-height-mobile: 48px;
|
|
86
88
|
--ktl-font-family-inter: Inter, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Droid Sans', 'Helvetica Neue', Arial, sans-serif;
|
|
87
89
|
--rs-font-family-ui: var(--ktl-font-family-inter);
|
|
88
90
|
}
|
|
@@ -224,8 +226,7 @@
|
|
|
224
226
|
--ktl-overlay-z-index: 900;
|
|
225
227
|
--ktl-top-menu-z-index: 905;
|
|
226
228
|
--ktl-header-z-index: 906;
|
|
227
|
-
--ktl-
|
|
228
|
-
--ktl-header-height-mobile: 52px;
|
|
229
|
+
--ktl-header-height-mobile: 48px;
|
|
229
230
|
--ktl-font-family-inter: Inter, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Droid Sans', 'Helvetica Neue', Arial, sans-serif;
|
|
230
231
|
--rs-font-family-ui: var(--ktl-font-family-inter);
|
|
231
232
|
}
|
|
@@ -263,13 +264,12 @@
|
|
|
263
264
|
@media (max-width: 640px) {
|
|
264
265
|
.ktl-search-button-module_button_YHJPv {
|
|
265
266
|
display: none;
|
|
267
|
+
margin: 0 16px 0 0;
|
|
266
268
|
}
|
|
267
|
-
}
|
|
268
269
|
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
}
|
|
270
|
+
.ktl-search-button-module_button_YHJPv.ktl-search-button-module_active_lUmdh {
|
|
271
|
+
display: flex;
|
|
272
|
+
}
|
|
273
273
|
}
|
|
274
274
|
|
|
275
275
|
.ktl-result-module_result_EKhUw {
|
|
@@ -658,7 +658,7 @@
|
|
|
658
658
|
opacity: 1;
|
|
659
659
|
}
|
|
660
660
|
|
|
661
|
-
@media (
|
|
661
|
+
@media (--ktl-xs) {
|
|
662
662
|
.ktl-search-box-module_searchBox_0SgE9 {
|
|
663
663
|
background: var(--ktl-dark-100);
|
|
664
664
|
width: auto;
|
|
@@ -692,27 +692,64 @@
|
|
|
692
692
|
--ktl-overlay-z-index: 900;
|
|
693
693
|
--ktl-top-menu-z-index: 905;
|
|
694
694
|
--ktl-header-z-index: 906;
|
|
695
|
-
--ktl-
|
|
696
|
-
--ktl-header-height-mobile: 52px;
|
|
695
|
+
--ktl-header-height-mobile: 48px;
|
|
697
696
|
--ktl-font-family-inter: Inter, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Droid Sans', 'Helvetica Neue', Arial, sans-serif;
|
|
698
697
|
--rs-font-family-ui: var(--ktl-font-family-inter);
|
|
699
698
|
}
|
|
700
699
|
|
|
701
700
|
.ktl-menu-popup-module_menu-popup_Q68IE {
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
701
|
+
display: none;
|
|
702
|
+
padding: 8px 0;
|
|
703
|
+
background: var(--ktl-dark-100);
|
|
704
|
+
position: fixed;
|
|
705
|
+
top: var(--ktl-header-height-mobile);
|
|
706
|
+
bottom: 0;
|
|
707
|
+
left: 0;
|
|
708
|
+
right: 0;
|
|
709
|
+
overflow: auto;
|
|
710
|
+
z-index: var(--ktl-top-menu-z-index);
|
|
711
|
+
}
|
|
712
|
+
|
|
713
|
+
.ktl-menu-popup-module_menu-item_fPvF- {
|
|
714
|
+
--level: 0;
|
|
715
|
+
display: flex;
|
|
716
|
+
align-items: center;
|
|
717
|
+
font-size: 16px;
|
|
718
|
+
line-height: 24px;
|
|
719
|
+
font-weight: 400;
|
|
720
|
+
color: rgba(255, 255, 255, 0.75);
|
|
721
|
+
text-decoration: none;
|
|
722
|
+
padding: 8px 16px 8px calc(16px + (var(--level) * 24px));
|
|
723
|
+
transition: color var(--ktl-transition-xfast),
|
|
724
|
+
background-color var(--ktl-transition-xfast);
|
|
725
|
+
}
|
|
726
|
+
|
|
727
|
+
.ktl-menu-popup-module_menu-item_fPvF-:hover {
|
|
728
|
+
color: rgba(255, 255, 255, 1);
|
|
729
|
+
background: rgba(255, 255, 255, 0.1);
|
|
730
|
+
text-decoration: none;
|
|
731
|
+
}
|
|
732
|
+
|
|
733
|
+
.ktl-menu-popup-module_menu-item_fPvF-.ktl-menu-popup-module_active_iqTAj {
|
|
734
|
+
color: var(--ktl-light-text-hard);
|
|
735
|
+
background: rgba(255, 255, 255, 1);
|
|
736
|
+
cursor: default;
|
|
737
|
+
text-decoration: none;
|
|
738
|
+
}
|
|
739
|
+
|
|
740
|
+
.ktl-menu-popup-module_menu-item_fPvF-.ktl-menu-popup-module_active-with-child_tAzCG {
|
|
741
|
+
background: none;
|
|
742
|
+
color: rgba(255, 255, 255, 1);
|
|
743
|
+
}
|
|
744
|
+
|
|
745
|
+
.ktl-menu-popup-module_menu-item-root_gA9d2 {
|
|
746
|
+
font-size: 20px;
|
|
747
|
+
line-height: 32px;
|
|
748
|
+
font-weight: 600;
|
|
712
749
|
}
|
|
713
750
|
|
|
714
751
|
.ktl-menu-popup-module_menu-popup-expanded_ggrp9 {
|
|
715
|
-
|
|
752
|
+
display: block;
|
|
716
753
|
}
|
|
717
754
|
|
|
718
755
|
.ktl-menu-button-module_button_wB9Mx {
|
|
@@ -726,8 +763,8 @@
|
|
|
726
763
|
background: none;
|
|
727
764
|
padding: 0;
|
|
728
765
|
margin: 0;
|
|
729
|
-
width:
|
|
730
|
-
height:
|
|
766
|
+
width: 24px;
|
|
767
|
+
height: 24px;
|
|
731
768
|
align-items: center;
|
|
732
769
|
justify-content: center;
|
|
733
770
|
transition: color var(--ktl-transition-xfast),
|
|
@@ -740,91 +777,6 @@
|
|
|
740
777
|
color: #ffffff;
|
|
741
778
|
}
|
|
742
779
|
|
|
743
|
-
:root {
|
|
744
|
-
--ktl-light-grey: #f4f4f4;
|
|
745
|
-
--ktl-dark-100: rgba(39, 40, 44, 1);
|
|
746
|
-
--ktl-dark-bg-hard: rgba(27, 27, 27, 1);
|
|
747
|
-
--ktl-icon-color-dark: rgba(39, 40, 44, 0.75);
|
|
748
|
-
--ktl-color-white-light: rgba(255, 255, 255, 0.75);
|
|
749
|
-
--ktl-transition-xfast: 100ms;
|
|
750
|
-
--ktl-transition-fast: 300ms;
|
|
751
|
-
--ktl-color-primary-light-theme: #7f52ff;
|
|
752
|
-
--ktl-color-dark-40: rgba(39, 40, 44, 0.4);
|
|
753
|
-
--ktl-light-text-hard: rgba(39, 40, 44, 1);
|
|
754
|
-
--ktl-light-dark-20: rgba(39, 40, 44, 0.2);
|
|
755
|
-
--ktl-overlay-z-index: 900;
|
|
756
|
-
--ktl-top-menu-z-index: 905;
|
|
757
|
-
--ktl-header-z-index: 906;
|
|
758
|
-
--ktl-mobile-dropdown-list-z-index: 907;
|
|
759
|
-
--ktl-header-height-mobile: 52px;
|
|
760
|
-
--ktl-font-family-inter: Inter, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Droid Sans', 'Helvetica Neue', Arial, sans-serif;
|
|
761
|
-
--rs-font-family-ui: var(--ktl-font-family-inter);
|
|
762
|
-
}
|
|
763
|
-
|
|
764
|
-
.ktl-menu-list-item-module_menu-item_Aruue {
|
|
765
|
-
--level: 0;
|
|
766
|
-
display: flex;
|
|
767
|
-
align-items: center;
|
|
768
|
-
font-size: 19px;
|
|
769
|
-
line-height: 28px;
|
|
770
|
-
font-weight: 400;
|
|
771
|
-
color: #ffffff;
|
|
772
|
-
text-decoration: none;
|
|
773
|
-
padding: 12px 7px 12px 16px;
|
|
774
|
-
transition: color var(--ktl-transition-xfast),
|
|
775
|
-
background-color var(--ktl-transition-xfast);
|
|
776
|
-
}
|
|
777
|
-
|
|
778
|
-
.ktl-menu-list-item-module_menu-item_Aruue.ktl-menu-list-item-module_active_jHfJR {
|
|
779
|
-
color: var(--ktl-light-text-hard);
|
|
780
|
-
background: rgba(255, 255, 255, 1);
|
|
781
|
-
cursor: default;
|
|
782
|
-
text-decoration: none;
|
|
783
|
-
}
|
|
784
|
-
|
|
785
|
-
.ktl-menu-list-item-module_menu-item_Aruue.ktl-menu-list-item-module_active-with-child_ier2a {
|
|
786
|
-
background: none;
|
|
787
|
-
color: rgba(255, 255, 255, 0.7);
|
|
788
|
-
}
|
|
789
|
-
|
|
790
|
-
.ktl-menu-list-item-module_menu-item-root_Rzcqb:not(a) {
|
|
791
|
-
font-size: 13px;
|
|
792
|
-
text-transform: uppercase;
|
|
793
|
-
line-height: 20px;
|
|
794
|
-
color: rgba(255, 255, 255, 0.7);
|
|
795
|
-
}
|
|
796
|
-
|
|
797
|
-
:root {
|
|
798
|
-
--ktl-light-grey: #f4f4f4;
|
|
799
|
-
--ktl-dark-100: rgba(39, 40, 44, 1);
|
|
800
|
-
--ktl-dark-bg-hard: rgba(27, 27, 27, 1);
|
|
801
|
-
--ktl-icon-color-dark: rgba(39, 40, 44, 0.75);
|
|
802
|
-
--ktl-color-white-light: rgba(255, 255, 255, 0.75);
|
|
803
|
-
--ktl-transition-xfast: 100ms;
|
|
804
|
-
--ktl-transition-fast: 300ms;
|
|
805
|
-
--ktl-color-primary-light-theme: #7f52ff;
|
|
806
|
-
--ktl-color-dark-40: rgba(39, 40, 44, 0.4);
|
|
807
|
-
--ktl-light-text-hard: rgba(39, 40, 44, 1);
|
|
808
|
-
--ktl-light-dark-20: rgba(39, 40, 44, 0.2);
|
|
809
|
-
--ktl-overlay-z-index: 900;
|
|
810
|
-
--ktl-top-menu-z-index: 905;
|
|
811
|
-
--ktl-header-z-index: 906;
|
|
812
|
-
--ktl-mobile-dropdown-list-z-index: 907;
|
|
813
|
-
--ktl-header-height-mobile: 52px;
|
|
814
|
-
--ktl-font-family-inter: Inter, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Droid Sans', 'Helvetica Neue', Arial, sans-serif;
|
|
815
|
-
--rs-font-family-ui: var(--ktl-font-family-inter);
|
|
816
|
-
}
|
|
817
|
-
|
|
818
|
-
.ktl-menu-list-module_menu-item-group_mFvUE {
|
|
819
|
-
margin: 8px 0 8px 0;
|
|
820
|
-
padding: 4px 0 8px 0;
|
|
821
|
-
border-top: 1px solid rgba(255, 255, 255, 0.3);
|
|
822
|
-
}
|
|
823
|
-
|
|
824
|
-
.ktl-menu-list-module_menu-item-group_mFvUE:not(:last-child) {
|
|
825
|
-
border-bottom: 1px solid rgba(255, 255, 255, 0.3);
|
|
826
|
-
}
|
|
827
|
-
|
|
828
780
|
.ktl-logo-small-module_logo-small_iGY12 {
|
|
829
781
|
flex-grow: 1;
|
|
830
782
|
display: flex;
|
|
@@ -835,7 +787,6 @@
|
|
|
835
787
|
.ktl-logo-small-module_link_SKXAa {
|
|
836
788
|
color: rgba(255, 255, 255, 1);
|
|
837
789
|
text-decoration: none;
|
|
838
|
-
font-size: 16px;
|
|
839
790
|
}
|
|
840
791
|
|
|
841
792
|
.ktl-logo-small-module_icon-wrap_6hRnO {
|
|
@@ -844,10 +795,13 @@
|
|
|
844
795
|
align-items: center;
|
|
845
796
|
justify-items: center;
|
|
846
797
|
height: 100%;
|
|
847
|
-
margin-right:
|
|
798
|
+
margin-right: 16px;
|
|
799
|
+
padding-right: 16px;
|
|
800
|
+
border-right: 1px solid rgba(255, 255, 255, 0.2);
|
|
848
801
|
}
|
|
849
802
|
|
|
850
803
|
.ktl-logo-small-module_icon_NyEog {
|
|
851
|
-
width:
|
|
852
|
-
height:
|
|
804
|
+
width: 24px;
|
|
805
|
+
height: 24px;
|
|
806
|
+
margin-left: -4px;
|
|
853
807
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import './index.css';
|
|
2
2
|
import { Header } from './header.js';
|
|
3
3
|
export { Header as default } from './header.js';
|
|
4
|
-
export { ANDROID_TITLE, ANDROID_URL, COMMUNITY_TITLE, COMMUNITY_URL, DATA_SCIENCE_TITLE, DATA_SCIENCE_URL, DOCS_TITLE, DOCS_URL,
|
|
4
|
+
export { ANDROID_TITLE, ANDROID_URL, COMMUNITY_TITLE, COMMUNITY_URL, DATA_SCIENCE_TITLE, DATA_SCIENCE_URL, DOCS_TITLE, DOCS_URL, KMM_DOCS_TITLE, KMM_DOCS_URL, KOTLIN_DOCS_TITLE, KOTLIN_DOCS_URL, MULTIPLATFORM_MOBILE_TITLE, MULTIPLATFORM_MOBILE_URL, MULTIPLATFORM_OTHERS_TITLE, MULTIPLATFORM_OTHERS_URL, PLAY_EXAMPLES_TITLE, PLAY_EXAMPLES_URL, PLAY_HANDSON_TITLE, PLAY_HANDSON_URL, PLAY_KOANS_TITLE, PLAY_KOANS_URL, PLAY_TITLE, PLAY_TITLE_FULL, PLAY_URL, SERVER_SIDE_TITLE, SERVER_SIDE_URL, SOLUTIONS_TITLE, TEACH_TITLE, TEACH_URL, WEB_FRONTEND_TITLE, WEB_FRONTEND_URL, getNavScheme } from './nav-scheme.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _radialGradient, _path;
|
|
4
4
|
|
|
5
5
|
function _extends() {
|
|
6
6
|
_extends = Object.assign || function (target) {
|
|
@@ -21,29 +21,27 @@ function _extends() {
|
|
|
21
21
|
}
|
|
22
22
|
|
|
23
23
|
const SvgKotlinLogoSmall = props => /*#__PURE__*/React.createElement("svg", _extends({
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
xmlns: "http://www.w3.org/2000/svg"
|
|
28
|
-
}, props), _path || (_path = /*#__PURE__*/React.createElement("path", {
|
|
29
|
-
d: "M20 20H0V0h20L9.793 9.855 20 20Z",
|
|
30
|
-
fill: "url(#kotlin-logo-small_svg__a)"
|
|
31
|
-
})), _defs || (_defs = /*#__PURE__*/React.createElement("defs", null, /*#__PURE__*/React.createElement("radialGradient", {
|
|
24
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
25
|
+
viewBox: "0 0 24 24"
|
|
26
|
+
}, props), _radialGradient || (_radialGradient = /*#__PURE__*/React.createElement("radialGradient", {
|
|
32
27
|
id: "kotlin-logo-small_svg__a",
|
|
33
|
-
cx:
|
|
34
|
-
cy:
|
|
35
|
-
r:
|
|
36
|
-
|
|
37
|
-
|
|
28
|
+
cx: 22.432,
|
|
29
|
+
cy: 3.493,
|
|
30
|
+
r: 21.679,
|
|
31
|
+
gradientTransform: "translate(-.19 .042) scale(.9998)",
|
|
32
|
+
gradientUnits: "userSpaceOnUse"
|
|
38
33
|
}, /*#__PURE__*/React.createElement("stop", {
|
|
39
34
|
offset: 0.003,
|
|
40
|
-
stopColor: "#
|
|
35
|
+
stopColor: "#e44857"
|
|
41
36
|
}), /*#__PURE__*/React.createElement("stop", {
|
|
42
37
|
offset: 0.469,
|
|
43
|
-
stopColor: "#
|
|
38
|
+
stopColor: "#c711e1"
|
|
44
39
|
}), /*#__PURE__*/React.createElement("stop", {
|
|
45
40
|
offset: 1,
|
|
46
|
-
stopColor: "#
|
|
47
|
-
})))
|
|
41
|
+
stopColor: "#7f52ff"
|
|
42
|
+
}))), _path || (_path = /*#__PURE__*/React.createElement("path", {
|
|
43
|
+
fill: "url(#kotlin-logo-small_svg__a)",
|
|
44
|
+
d: "M22.87 21.68H3.94V2.76h18.93l-9.66 9.32z"
|
|
45
|
+
})));
|
|
48
46
|
|
|
49
47
|
export { SvgKotlinLogoSmall as default };
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
|
|
3
|
+
var _path;
|
|
4
|
+
|
|
5
|
+
function _extends() {
|
|
6
|
+
_extends = Object.assign || function (target) {
|
|
7
|
+
for (var i = 1; i < arguments.length; i++) {
|
|
8
|
+
var source = arguments[i];
|
|
9
|
+
|
|
10
|
+
for (var key in source) {
|
|
11
|
+
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
12
|
+
target[key] = source[key];
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
return target;
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
return _extends.apply(this, arguments);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
const SvgCloseIcon = props => /*#__PURE__*/React.createElement("svg", _extends({
|
|
24
|
+
width: 16,
|
|
25
|
+
height: 16,
|
|
26
|
+
fill: "none",
|
|
27
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
28
|
+
}, props), _path || (_path = /*#__PURE__*/React.createElement("path", {
|
|
29
|
+
fillRule: "evenodd",
|
|
30
|
+
clipRule: "evenodd",
|
|
31
|
+
d: "M15.707 1.707 14.293.293 8 6.586 1.707.293.293 1.707 6.586 8 .293 14.293l1.414 1.414L8 9.414l6.293 6.293 1.414-1.414L9.414 8l6.293-6.293Z",
|
|
32
|
+
fill: "currentColor"
|
|
33
|
+
})));
|
|
34
|
+
|
|
35
|
+
export { SvgCloseIcon as default };
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
|
|
3
|
+
var _path;
|
|
4
|
+
|
|
5
|
+
function _extends() {
|
|
6
|
+
_extends = Object.assign || function (target) {
|
|
7
|
+
for (var i = 1; i < arguments.length; i++) {
|
|
8
|
+
var source = arguments[i];
|
|
9
|
+
|
|
10
|
+
for (var key in source) {
|
|
11
|
+
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
12
|
+
target[key] = source[key];
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
return target;
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
return _extends.apply(this, arguments);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
const SvgHamburgerIcon = props => /*#__PURE__*/React.createElement("svg", _extends({
|
|
24
|
+
width: 24,
|
|
25
|
+
height: 24,
|
|
26
|
+
fill: "none",
|
|
27
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
28
|
+
}, props), _path || (_path = /*#__PURE__*/React.createElement("path", {
|
|
29
|
+
fillRule: "evenodd",
|
|
30
|
+
clipRule: "evenodd",
|
|
31
|
+
d: "M4 5h16v2H4V5Zm0 6h16v2H4v-2Zm16 6H4v2h16v-2Z",
|
|
32
|
+
fill: "currentColor"
|
|
33
|
+
})));
|
|
34
|
+
|
|
35
|
+
export { SvgHamburgerIcon as default };
|
|
@@ -1,23 +1,20 @@
|
|
|
1
1
|
import React__default from 'react';
|
|
2
2
|
import styles from './menu-button.module.pcss.js';
|
|
3
3
|
import classNames from 'classnames';
|
|
4
|
-
import
|
|
5
|
-
import
|
|
4
|
+
import SvgHamburgerIcon from './hamburger-icon.svg.js';
|
|
5
|
+
import SvgCloseIcon from './close-icon.svg.js';
|
|
6
6
|
|
|
7
7
|
const MenuButton = ({
|
|
8
8
|
onClick,
|
|
9
9
|
isExpanded
|
|
10
10
|
}) => {
|
|
11
|
-
return React__default.createElement(
|
|
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
|
-
onClick: onClick
|
|
17
|
-
|
|
18
|
-
mode: 'clear',
|
|
19
|
-
icon: isExpanded ? React__default.createElement(CloseIcon, null) : React__default.createElement(HamburgerIcon, null)
|
|
20
|
-
});
|
|
16
|
+
onClick: onClick
|
|
17
|
+
}, isExpanded ? React__default.createElement(SvgCloseIcon, null) : React__default.createElement(SvgHamburgerIcon, null));
|
|
21
18
|
};
|
|
22
19
|
|
|
23
20
|
export { MenuButton };
|
|
@@ -1,11 +1,51 @@
|
|
|
1
|
-
import React__default, { useRef, useState, useEffect, useLayoutEffect, useCallback } from 'react';
|
|
1
|
+
import React__default, { useRef, useState, useEffect, useLayoutEffect, useCallback, Fragment } from 'react';
|
|
2
2
|
import styles from './menu-popup.module.pcss.js';
|
|
3
3
|
import classNames from 'classnames';
|
|
4
4
|
import { MenuButton } from './menu-button/menu-button.js';
|
|
5
|
-
import { MenuList } from './menu-list/menu-list.js';
|
|
6
5
|
import { useTextStyles } from '@rescui/typography';
|
|
7
6
|
import { clearAllBodyScrollLocks, enableBodyScroll, disableBodyScroll } from 'body-scroll-lock';
|
|
8
7
|
|
|
8
|
+
const MenuListItem = ({
|
|
9
|
+
item,
|
|
10
|
+
level,
|
|
11
|
+
linkHandler
|
|
12
|
+
}) => {
|
|
13
|
+
const Tag = item.url ? 'a' : 'span';
|
|
14
|
+
const style = {
|
|
15
|
+
'--level': level
|
|
16
|
+
};
|
|
17
|
+
const handleClick = useCallback(event => linkHandler && item.url && linkHandler(event, item.url), []);
|
|
18
|
+
return React__default.createElement(Tag, Object.assign({}, item.url ? {
|
|
19
|
+
href: item.url,
|
|
20
|
+
onClick: handleClick
|
|
21
|
+
} : {}, {
|
|
22
|
+
className: classNames(styles.menuItem, {
|
|
23
|
+
[styles.menuItemRoot]: level === 0,
|
|
24
|
+
[styles.active]: item.isActive,
|
|
25
|
+
[styles.activeWithChild]: item.items && item.items.length
|
|
26
|
+
}),
|
|
27
|
+
style: style
|
|
28
|
+
}), item.title);
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
const MenuList = ({
|
|
32
|
+
items,
|
|
33
|
+
level,
|
|
34
|
+
linkHandler
|
|
35
|
+
}) => {
|
|
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
|
+
}))));
|
|
47
|
+
};
|
|
48
|
+
|
|
9
49
|
const MenuPopup = ({
|
|
10
50
|
items,
|
|
11
51
|
isExpanded,
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
var styles = {
|
|
2
2
|
"menuPopup": "ktl-menu-popup-module_menu-popup_Q68IE",
|
|
3
|
+
"menuItem": "ktl-menu-popup-module_menu-item_fPvF-",
|
|
4
|
+
"active": "ktl-menu-popup-module_active_iqTAj",
|
|
5
|
+
"activeWithChild": "ktl-menu-popup-module_active-with-child_tAzCG",
|
|
6
|
+
"menuItemRoot": "ktl-menu-popup-module_menu-item-root_gA9d2",
|
|
3
7
|
"menuPopupExpanded": "ktl-menu-popup-module_menu-popup-expanded_ggrp9"
|
|
4
8
|
};
|
|
5
9
|
export { styles as default };
|
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
import { PLAYGROUND_URL, KOTLINLANG_URL } from './consts.js';
|
|
2
|
-
const HOME_TITLE = 'Home';
|
|
3
|
-
const HOME_URL = '/';
|
|
4
2
|
const SOLUTIONS_TITLE = 'Solutions';
|
|
5
3
|
const MULTIPLATFORM_MOBILE_TITLE = 'Multiplatform Mobile';
|
|
6
4
|
const MULTIPLATFORM_MOBILE_URL = `/lp/mobile/`;
|
|
@@ -34,9 +32,6 @@ const KOTLIN_DOCS_URL = `/docs/home.html`;
|
|
|
34
32
|
const KMM_DOCS_TITLE = 'KMM';
|
|
35
33
|
const KMM_DOCS_URL = `/docs/mobile/home.html`;
|
|
36
34
|
const navScheme = [{
|
|
37
|
-
title: HOME_TITLE,
|
|
38
|
-
url: HOME_URL
|
|
39
|
-
}, {
|
|
40
35
|
title: SOLUTIONS_TITLE,
|
|
41
36
|
url: null,
|
|
42
37
|
items: [{
|
|
@@ -85,9 +80,8 @@ const navScheme = [{
|
|
|
85
80
|
}]
|
|
86
81
|
}];
|
|
87
82
|
|
|
88
|
-
function getNavScheme(isUrlActive = (url, currentUrl) => url === currentUrl, currentUrl, isPlayground
|
|
89
|
-
|
|
90
|
-
return controlledNavScheme.map(({
|
|
83
|
+
function getNavScheme(isUrlActive = (url, currentUrl) => url === currentUrl, currentUrl, isPlayground) {
|
|
84
|
+
return navScheme.map(({
|
|
91
85
|
title,
|
|
92
86
|
url,
|
|
93
87
|
items
|
|
@@ -138,4 +132,4 @@ function makeExternalUrl(url, currentUrl, isPlayground) {
|
|
|
138
132
|
return url;
|
|
139
133
|
}
|
|
140
134
|
|
|
141
|
-
export { ANDROID_TITLE, ANDROID_URL, COMMUNITY_TITLE, COMMUNITY_URL, DATA_SCIENCE_TITLE, DATA_SCIENCE_URL, DOCS_TITLE, DOCS_URL,
|
|
135
|
+
export { ANDROID_TITLE, ANDROID_URL, COMMUNITY_TITLE, COMMUNITY_URL, DATA_SCIENCE_TITLE, DATA_SCIENCE_URL, DOCS_TITLE, DOCS_URL, KMM_DOCS_TITLE, KMM_DOCS_URL, KOTLIN_DOCS_TITLE, KOTLIN_DOCS_URL, MULTIPLATFORM_MOBILE_TITLE, MULTIPLATFORM_MOBILE_URL, MULTIPLATFORM_OTHERS_TITLE, MULTIPLATFORM_OTHERS_URL, PLAY_EXAMPLES_TITLE, PLAY_EXAMPLES_URL, PLAY_HANDSON_TITLE, PLAY_HANDSON_URL, PLAY_KOANS_TITLE, PLAY_KOANS_URL, PLAY_TITLE, PLAY_TITLE_FULL, PLAY_URL, SERVER_SIDE_TITLE, SERVER_SIDE_URL, SOLUTIONS_TITLE, TEACH_TITLE, TEACH_URL, WEB_FRONTEND_TITLE, WEB_FRONTEND_URL, getNavScheme };
|
|
@@ -2,15 +2,13 @@ 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';
|
|
5
|
-
import { SearchIcon } from '@rescui/icons';
|
|
6
|
-
import Button from '@rescui/button';
|
|
7
5
|
const DATA_TEST_HEADER_SEARCH_BUTTON = 'header-search-button';
|
|
8
6
|
|
|
9
7
|
const SearchButton = ({
|
|
10
8
|
onClick,
|
|
11
9
|
isActive
|
|
12
10
|
}) => {
|
|
13
|
-
return React__default.createElement(
|
|
11
|
+
return React__default.createElement("button", {
|
|
14
12
|
type: "button",
|
|
15
13
|
className: classNames(styles.button, {
|
|
16
14
|
[styles.active]: isActive
|
|
@@ -18,16 +16,7 @@ const SearchButton = ({
|
|
|
18
16
|
"data-test": DATA_TEST_HEADER_SEARCH_BUTTON,
|
|
19
17
|
"aria-label": "Search",
|
|
20
18
|
onClick: onClick
|
|
21
|
-
}, React__default.createElement(SvgSearch, null))
|
|
22
|
-
className: styles.mobileButton
|
|
23
|
-
}, React__default.createElement(Button, {
|
|
24
|
-
"data-test": DATA_TEST_HEADER_SEARCH_BUTTON,
|
|
25
|
-
"aria-label": "Search",
|
|
26
|
-
onClick: onClick,
|
|
27
|
-
mode: 'clear',
|
|
28
|
-
size: 'l',
|
|
29
|
-
icon: React__default.createElement(SearchIcon, null)
|
|
30
|
-
})));
|
|
19
|
+
}, React__default.createElement(SvgSearch, null));
|
|
31
20
|
};
|
|
32
21
|
|
|
33
22
|
export { DATA_TEST_HEADER_SEARCH_BUTTON, SearchButton };
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
var styles = {
|
|
2
2
|
"button": "ktl-search-button-module_button_YHJPv",
|
|
3
|
-
"active": "ktl-search-button-module_active_lUmdh"
|
|
4
|
-
"mobileButton": "ktl-search-button-module_mobileButton_KT2YP"
|
|
3
|
+
"active": "ktl-search-button-module_active_lUmdh"
|
|
5
4
|
};
|
|
6
5
|
export { styles as default };
|