@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.
Files changed (38) hide show
  1. package/out/components/breakpoints/constants.js +19 -0
  2. package/out/components/breakpoints/index.js +1 -0
  3. package/out/components/cta-block/index.css +2 -2
  4. package/out/components/footer/index.css +3 -6
  5. package/out/components/grid/index.css +65 -65
  6. package/out/components/header/full-search/full-search.js +1 -8
  7. package/out/components/header/header.js +16 -7
  8. package/out/components/header/header.module.pcss.js +2 -1
  9. package/out/components/header/index.css +72 -118
  10. package/out/components/header/index.js +1 -1
  11. package/out/components/header/logo-small/kotlin-logo-small.svg.js +16 -18
  12. package/out/components/header/logo-small/logo-small.js +1 -1
  13. package/out/components/header/menu-popup/menu-button/close-icon.svg.js +35 -0
  14. package/out/components/header/menu-popup/menu-button/hamburger-icon.svg.js +35 -0
  15. package/out/components/header/menu-popup/menu-button/menu-button.js +5 -8
  16. package/out/components/header/menu-popup/menu-popup.js +42 -2
  17. package/out/components/header/menu-popup/menu-popup.module.pcss.js +4 -0
  18. package/out/components/header/nav-scheme.js +3 -9
  19. package/out/components/header/search-button/search-button.js +2 -13
  20. package/out/components/header/search-button/search-button.module.pcss.js +1 -2
  21. package/out/components/layout/index.css +46 -0
  22. package/out/components/layout/index.js +1 -0
  23. package/out/components/popup/index.css +1 -1
  24. package/out/components/quotes-slider/index.css +4 -4
  25. package/out/components/top-menu/{vertical-menu → dropdown-menu}/arrow-dropdown-icon.svg.js +0 -0
  26. package/out/components/top-menu/dropdown-menu/dropdown-menu.js +71 -0
  27. package/out/components/top-menu/dropdown-menu/dropdown-menu.module.pcss.js +15 -0
  28. package/out/components/top-menu/index.css +124 -91
  29. package/out/components/top-menu/top-menu.js +13 -20
  30. package/out/components/typography/index.css +5 -6
  31. package/out/components/youtube-player/index.css +1 -2
  32. package/package.json +4 -2
  33. package/out/components/header/menu-popup/menu-list/menu-list.js +0 -33
  34. package/out/components/header/menu-popup/menu-list/menu-list.module.pcss.js +0 -4
  35. package/out/components/header/menu-popup/menu-list-item/menu-list-item.js +0 -28
  36. package/out/components/header/menu-popup/menu-list-item/menu-list-item.module.pcss.js +0 -7
  37. package/out/components/top-menu/vertical-menu/vertical-menu.js +0 -123
  38. package/out/components/top-menu/vertical-menu/vertical-menu.module.pcss.js +0 -13
@@ -0,0 +1,46 @@
1
+ :root {
2
+ --ktl-layout-spacing: 48px;
3
+ --ktl-layout-width: 1144px;
4
+ }
5
+
6
+ @media screen and (max-width: 1190px) {:root {
7
+ --ktl-layout-width: 952px
8
+ }
9
+ }
10
+
11
+ @media screen and (max-width: 1000px) {:root {
12
+ --ktl-layout-width: 760px
13
+ }
14
+ }
15
+
16
+ @media screen and (max-width: 808px) {:root {
17
+ --ktl-layout-width: 568px
18
+ }
19
+ }
20
+
21
+ @media screen and (max-width: 616px) {:root {
22
+ --ktl-layout-width: 424px
23
+ }
24
+ }
25
+
26
+ @media screen and (max-width: 472px) {:root {
27
+ --ktl-layout-width: 328px
28
+ }
29
+ }
30
+
31
+ @media screen and (max-width: 376px) {:root {
32
+ --ktl-layout-width: 272px
33
+ }
34
+ }
35
+ .ktl-layout {
36
+ box-sizing: border-box;
37
+ width: var(--ktl-layout-width);
38
+ }
39
+ .ktl-layout--center {
40
+ margin-left: auto;
41
+ margin-right: auto;
42
+ }
43
+ .ktl-layout--spacing {
44
+ margin-top: var(--ktl-layout-spacing);
45
+ margin-bottom: var(--ktl-layout-spacing);
46
+ }
@@ -0,0 +1 @@
1
+ import './index.css';
@@ -12,7 +12,7 @@
12
12
  transform: translate(-50%, -50%);
13
13
  }
14
14
 
15
- @media (min-width: 1024px) {.ktl-popup-module_popup_kH56U {
15
+ @media (--ktl-md) {.ktl-popup-module_popup_kH56U {
16
16
  width: auto;
17
17
  min-width: 70%;
18
18
  max-width: calc(100% - 32px)
@@ -2,7 +2,7 @@
2
2
  display: block;
3
3
  }
4
4
 
5
- @media (min-width: 768px) {
5
+ @media (--ktl-sm) {
6
6
 
7
7
  .ktl-quotes-slider-module_content_ycgWG {
8
8
  display: flex
@@ -14,7 +14,7 @@
14
14
  margin-right: 32px;
15
15
  }
16
16
 
17
- @media (max-width: 767px) {
17
+ @media (--ktl-xs) {
18
18
 
19
19
  .ktl-quotes-slider-module_icon-container_tRSxF {
20
20
  margin-bottom: 16px
@@ -25,7 +25,7 @@
25
25
  margin-top: 16px;
26
26
  }
27
27
 
28
- @media (min-width: 768px) {
28
+ @media (--ktl-sm) {
29
29
 
30
30
  .ktl-quotes-slider-module_nav_0aZMC {
31
31
  margin-top: 20px;
@@ -45,7 +45,7 @@
45
45
  color: var(--ktl-icon-color-dark);
46
46
  }
47
47
 
48
- @media (max-width: 767px) {
48
+ @media (--ktl-xs) {
49
49
 
50
50
  .ktl-quotes-slider-module_controls_OuyQ8 {
51
51
  margin-top: 20px
@@ -0,0 +1,71 @@
1
+ import React__default, { useState } from 'react';
2
+ import ReactDOM from 'react-dom';
3
+ import classNames from 'classnames';
4
+ import styles from './dropdown-menu.module.pcss.js';
5
+ import { useTextStyles } from '@rescui/typography';
6
+ import SvgArrowDropdownIcon from './arrow-dropdown-icon.svg.js';
7
+ import { useTheme } from '@rescui/ui-contexts';
8
+
9
+ const DropdownMenu = ({
10
+ homeUrl,
11
+ title,
12
+ mobileTitle = 'Overview',
13
+ items,
14
+ activeIndex,
15
+ linkHandler,
16
+ mobileOverview = true
17
+ }) => {
18
+ const theme = useTheme();
19
+ const textCn = useTextStyles();
20
+ const [portalRoot, setPortalRoot] = React__default.useState(null);
21
+ React__default.useEffect(() => {
22
+ if (typeof document !== `undefined`) {
23
+ setPortalRoot(document.body);
24
+ }
25
+ }, []);
26
+
27
+ let _items = (mobileOverview ? [{
28
+ title: mobileTitle,
29
+ url: homeUrl
30
+ }] : []).concat(items);
31
+
32
+ const _activeIndex = mobileOverview ? activeIndex + 1 : activeIndex;
33
+
34
+ const activeItem = _items[_activeIndex];
35
+ const [isExpanded, setIsExpanded] = useState(false);
36
+
37
+ const handleClick = () => setIsExpanded(!isExpanded);
38
+
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", {
48
+ className: styles.buttonText
49
+ }, activeItem.title), React__default.createElement(SvgArrowDropdownIcon, {
50
+ className: styles.icon
51
+ })), React__default.createElement("nav", {
52
+ className: classNames(styles.dropdownList, {
53
+ [styles.dropdownListDarkTheme]: theme === 'dark'
54
+ })
55
+ }, _items.map((item, index) => React__default.createElement("a", {
56
+ key: item.url,
57
+ href: item.url,
58
+ className: classNames(styles.dropdownItem, textCn('rs-text-2'), {
59
+ [styles.dropdownItemActive]: index === _activeIndex
60
+ }),
61
+ onClick: event => linkHandler?.(event, item.url),
62
+ target: item.isExternal ? '_blank' : undefined
63
+ }, item.title)))), !!portalRoot && ReactDOM.createPortal(React__default.createElement("div", {
64
+ className: classNames(styles.overlay, {
65
+ [styles.overlayVisible]: isExpanded
66
+ }),
67
+ onClick: handleClick
68
+ }), portalRoot));
69
+ };
70
+
71
+ export { DropdownMenu };
@@ -0,0 +1,15 @@
1
+ var styles = {
2
+ "dropdownMenu": "ktl-dropdown-menu-module_dropdown-menu_tq2uU",
3
+ "button": "ktl-dropdown-menu-module_button_OYsuv",
4
+ "buttonText": "ktl-dropdown-menu-module_button-text_SJmh-",
5
+ "icon": "ktl-dropdown-menu-module_icon_GGhMI",
6
+ "dropdownList": "ktl-dropdown-menu-module_dropdown-list_Ylkvt",
7
+ "fadein": "ktl-dropdown-menu-module_fadein_MySnq",
8
+ "dropdownItem": "ktl-dropdown-menu-module_dropdown-item_X3tZ-",
9
+ "dropdownItemActive": "ktl-dropdown-menu-module_dropdown-item-active_99q9X",
10
+ "overlay": "ktl-dropdown-menu-module_overlay_segRo",
11
+ "overlayVisible": "ktl-dropdown-menu-module_overlay-visible_MjwEF",
12
+ "dropdownMenuExpanded": "ktl-dropdown-menu-module_dropdown-menu-expanded_EQefy",
13
+ "dropdownListDarkTheme": "ktl-dropdown-menu-module_dropdown-list-dark-theme_P60ol"
14
+ };
15
+ export { styles as default };
@@ -13,8 +13,7 @@
13
13
  --ktl-overlay-z-index: 900;
14
14
  --ktl-top-menu-z-index: 905;
15
15
  --ktl-header-z-index: 906;
16
- --ktl-mobile-dropdown-list-z-index: 907;
17
- --ktl-header-height-mobile: 52px;
16
+ --ktl-header-height-mobile: 48px;
18
17
  --ktl-font-family-inter: Inter, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Droid Sans', 'Helvetica Neue', Arial, sans-serif;
19
18
  --rs-font-family-ui: var(--ktl-font-family-inter);
20
19
  }
@@ -30,14 +29,15 @@
30
29
  height: 64px;
31
30
  background: #ffffff;
32
31
  padding: 0 32px;
33
- box-shadow: inset 0 -1px 0 0 rgba(255, 255, 255, 0.3);
32
+ z-index: var(--ktl-top-menu-z-index);
33
+ box-shadow: inset 0 -1px 0 0 var(--ktl-light-dark-20);
34
34
  transition: color var(--ktl-transition-fast),
35
35
  background-color var(--ktl-transition-fast);
36
36
  }
37
37
 
38
38
  .ktl-top-menu-module_top-menu-dark-theme_aNBxr {
39
39
  background: #1b1b1b;
40
- box-shadow: inset 0 -1px 0 0 rgba(255, 255, 255, 0.3);
40
+ box-shadow: inset 0 -1px 0 0 rgba(255, 255, 255, 0.2);
41
41
  }
42
42
 
43
43
  .ktl-top-menu-module_logo_CNH2W {
@@ -48,7 +48,7 @@
48
48
 
49
49
  @media (max-width: 640px) {
50
50
  .ktl-top-menu-module_top-menu_PRX9X {
51
- height: var(--ktl-header-height-mobile);
51
+ height: 48px;
52
52
  padding: 0 16px;
53
53
  grid-gap: 16px;
54
54
  grid-template-columns: 1fr auto;
@@ -75,6 +75,12 @@
75
75
  color: var(--ktl-color-primary-light-theme);
76
76
  }
77
77
 
78
+ @media (max-width: 640px) {
79
+ .ktl-horizontal-menu-module_horizontal-menu_pB2-S {
80
+ display: none;
81
+ }
82
+ }
83
+
78
84
  :root {
79
85
  --ktl-light-grey: #f4f4f4;
80
86
  --ktl-dark-100: rgba(39, 40, 44, 1);
@@ -90,113 +96,140 @@
90
96
  --ktl-overlay-z-index: 900;
91
97
  --ktl-top-menu-z-index: 905;
92
98
  --ktl-header-z-index: 906;
93
- --ktl-mobile-dropdown-list-z-index: 907;
94
- --ktl-header-height-mobile: 52px;
99
+ --ktl-header-height-mobile: 48px;
95
100
  --ktl-font-family-inter: Inter, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Droid Sans', 'Helvetica Neue', Arial, sans-serif;
96
101
  --rs-font-family-ui: var(--ktl-font-family-inter);
97
102
  }
98
103
 
99
- .ktl-vertical-menu-module_vertical-menu_aLIbw {
100
- display: block;
101
- height: 100%;
102
- justify-self: flex-start;
103
- white-space: nowrap;
104
- width: 100%;
105
- min-width: 0;
106
- max-width: 100%;
107
- }
108
-
109
- .ktl-vertical-menu-module_button_zqr20 {
110
- border: none;
111
- background: none;
112
- height: 52px;
113
- width: 100%;
114
- max-width: 100%;
115
- padding: 0;
116
- margin: 0;
117
- display: flex;
118
- align-items: center;
119
- cursor: pointer;
120
- color: #fff;
104
+ .ktl-dropdown-menu-module_dropdown-menu_tq2uU {
105
+ display: none;
106
+ height: 100%;
107
+ justify-self: flex-start;
108
+ white-space: nowrap;
109
+ min-width: 0;
110
+ max-width: 100%;
111
+ }
112
+
113
+ .ktl-dropdown-menu-module_button_OYsuv {
114
+ border: none;
115
+ background: none;
116
+ height: 100%;
117
+ max-width: 100%;
118
+ padding: 0;
119
+ margin: 0;
120
+ display: flex;
121
+ align-items: center;
122
+ justify-content: space-between;
123
+ cursor: pointer;
121
124
  }
122
125
 
123
- .ktl-vertical-menu-module_button-text_aXith {
124
- overflow: hidden;
125
- text-overflow: ellipsis;
126
- flex: 0 1 auto;
126
+ .ktl-dropdown-menu-module_button-text_SJmh- {
127
+ overflow: hidden;
128
+ text-overflow: ellipsis;
129
+ flex: 0 1 auto;
127
130
  }
128
131
 
129
- .ktl-vertical-menu-module_icon_-Ieat {
130
- width: 14px;
131
- height: 8px;
132
- margin-left: 13px;
133
- transition: transform ease-in-out var(--ktl-transition-xfast);
134
- flex: 0 0 auto;
132
+ .ktl-dropdown-menu-module_icon_GGhMI {
133
+ width: 12px;
134
+ height: 6px;
135
+ margin-left: 6px;
136
+ transition: transform ease-in-out var(--ktl-transition-xfast);
137
+ flex: 0 0 auto;
135
138
  }
136
139
 
137
- .ktl-vertical-menu-module_dropdown-header_77lTy {
138
- /* workaround */
139
- margin-top: calc(var(--ktl-header-height-mobile) * -1);
140
- display: flex;
141
- color: #ffffff;
142
- align-items: center;
143
- height: var(--ktl-header-height-mobile);
144
- padding: 0 0 0 16px;
145
- border-bottom: 1px solid rgba(255, 255, 255, 0.3);
146
- justify-content: space-between;
147
- background: #ffffff;
148
- margin-bottom: 8px;
140
+ .ktl-dropdown-menu-module_dropdown-list_Ylkvt {
141
+ display: none;
142
+ position: absolute;
143
+ left: 0;
144
+ right: 0;
145
+ background: #ffffff;
146
+ opacity: 0;
147
+ -webkit-animation: ktl-dropdown-menu-module_fadein_MySnq ease-out var(--ktl-transition-fast) forwards;
148
+ animation: ktl-dropdown-menu-module_fadein_MySnq ease-out var(--ktl-transition-fast) forwards;
149
149
  }
150
150
 
151
- .ktl-vertical-menu-module_dropdown-list_N3KWV {
152
- display: flex;
153
- flex-direction: column;
154
- opacity: 1;
155
- position: fixed;
156
- top: 0;
157
- left: 0;
158
- right: 0;
159
- bottom: 0;
160
- background: #ffffff;
161
- z-index: var(--ktl-mobile-dropdown-list-z-index);
162
- }
163
-
164
- .ktl-vertical-menu-module_dropdown-item_XLfp4 {
165
- padding: 12px 16px;
166
- text-decoration: none;
167
- transition: color var(--ktl-transition-xfast),
151
+ .ktl-dropdown-menu-module_dropdown-item_X3tZ- {
152
+ padding: 8px 16px;
153
+ text-decoration: none;
154
+ transition: color var(--ktl-transition-xfast),
168
155
  background-color var(--ktl-transition-xfast);
169
156
  }
170
157
 
171
- .ktl-vertical-menu-module_dropdown-item_XLfp4:hover {
172
- background: rgba(39, 40, 44, 0.1);
173
- color: #27282c;
174
- }
158
+ .ktl-dropdown-menu-module_dropdown-item_X3tZ-:hover {
159
+ background: rgba(39, 40, 44, 0.1);
160
+ color: #27282c;
161
+ }
175
162
 
176
- .ktl-vertical-menu-module_dropdown-item_XLfp4.ktl-vertical-menu-module_dropdown-item-active_iBUbj {
177
- background: var(--ktl-dark-100);
178
- color: #ffffff;
179
- }
163
+ .ktl-dropdown-menu-module_dropdown-item_X3tZ-.ktl-dropdown-menu-module_dropdown-item-active_99q9X {
164
+ background: var(--ktl-dark-100);
165
+ color: #ffffff;
166
+ }
180
167
 
181
- .ktl-vertical-menu-module_vertical-menu-expanded_kFaaI .ktl-vertical-menu-module_icon_-Ieat {
182
- transform: scale(1, -1);
183
- }
168
+ .ktl-dropdown-menu-module_overlay_segRo {
169
+ display: none;
170
+ position: fixed;
171
+ top: 0;
172
+ right: 0;
173
+ bottom: 0;
174
+ left: 0;
175
+ width: 100%;
176
+ height: 100%;
177
+ opacity: 0;
178
+ background-color: var(--ktl-color-dark-40);
179
+ z-index: var(--ktl-overlay-z-index);
180
+ -webkit-animation: ktl-dropdown-menu-module_fadein_MySnq ease-out var(--ktl-transition-fast) forwards;
181
+ animation: ktl-dropdown-menu-module_fadein_MySnq ease-out var(--ktl-transition-fast) forwards;
182
+ }
183
+
184
+ .ktl-dropdown-menu-module_overlay-visible_MjwEF {
185
+ display: block;
186
+ opacity: 1;
187
+ }
188
+
189
+ .ktl-dropdown-menu-module_dropdown-menu-expanded_EQefy .ktl-dropdown-menu-module_icon_GGhMI {
190
+ transform: scale(1, -1);
191
+ }
184
192
 
185
- .ktl-vertical-menu-module_dropdown-list-dark-theme_A1-Bw {
186
- background: rgba(39, 40, 44, 1);
193
+ .ktl-dropdown-menu-module_dropdown-menu-expanded_EQefy .ktl-dropdown-menu-module_dropdown-list_Ylkvt {
194
+ display: flex;
195
+ flex-direction: column;
196
+ opacity: 1;
197
+ }
198
+
199
+ .ktl-dropdown-menu-module_dropdown-list-dark-theme_P60ol {
200
+ background: var(--ktl-dark-bg-hard);
187
201
  }
188
202
 
189
- .ktl-vertical-menu-module_dropdown-list-dark-theme_A1-Bw .ktl-vertical-menu-module_dropdown-header_77lTy {
190
- background: rgba(39, 40, 44, 1);
203
+ .ktl-dropdown-menu-module_dropdown-list-dark-theme_P60ol .ktl-dropdown-menu-module_dropdown-item_X3tZ-:hover {
204
+ background: rgba(255, 255, 255, 0.1);
205
+ color: #ffffff;
191
206
  }
192
207
 
193
- .ktl-vertical-menu-module_dropdown-list-dark-theme_A1-Bw .ktl-vertical-menu-module_dropdown-item_XLfp4:hover {
194
- background: rgba(255, 255, 255, 0.1);
195
- color: #ffffff;
196
- }
208
+ .ktl-dropdown-menu-module_dropdown-list-dark-theme_P60ol .ktl-dropdown-menu-module_dropdown-item_X3tZ-.ktl-dropdown-menu-module_dropdown-item-active_99q9X {
209
+ color: var(--ktl-light-text-hard);
210
+ background: #ffffff;
211
+ }
197
212
 
198
- .ktl-vertical-menu-module_dropdown-list-dark-theme_A1-Bw .ktl-vertical-menu-module_dropdown-item_XLfp4.ktl-vertical-menu-module_dropdown-item-active_iBUbj {
199
- color: var(--ktl-light-text-hard);
200
- background: #ffffff;
201
- }
213
+ @media (max-width: 640px) {
214
+ .ktl-dropdown-menu-module_dropdown-menu_tq2uU {
215
+ display: block;
216
+ }
217
+ }
218
+
219
+ @-webkit-keyframes ktl-dropdown-menu-module_fadein_MySnq {
220
+ 0% {
221
+ opacity: 0;
222
+ }
223
+ 100% {
224
+ opacity: 1;
225
+ }
226
+ }
202
227
 
228
+ @keyframes ktl-dropdown-menu-module_fadein_MySnq {
229
+ 0% {
230
+ opacity: 0;
231
+ }
232
+ 100% {
233
+ opacity: 1;
234
+ }
235
+ }
@@ -1,13 +1,12 @@
1
- import React__default, { forwardRef, useRef, useImperativeHandle, useState, useLayoutEffect } from 'react';
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';
5
5
  import { useTextStyles } from '@rescui/typography';
6
6
  import { HorizontalMenu } from './horizontal-menu/horizontal-menu.js';
7
- import { VerticalMenu } from './vertical-menu/vertical-menu.js';
8
- import useResizeObserver from '@react-hook/resize-observer';
9
- const BREAKPOINT_XS = 640;
10
- const TopMenu = forwardRef(({
7
+ import { DropdownMenu } from './dropdown-menu/dropdown-menu.js';
8
+
9
+ const TopMenu = ({
11
10
  homeUrl,
12
11
  title,
13
12
  mobileTitle,
@@ -16,39 +15,33 @@ const TopMenu = forwardRef(({
16
15
  linkHandler = () => {},
17
16
  className,
18
17
  children,
18
+ forwardedRef,
19
19
  mobileOverview
20
- }, forwardedRef) => {
20
+ }) => {
21
21
  const theme = useTheme();
22
22
  const textCn = useTextStyles();
23
- const menuRef = useRef(null);
24
- useImperativeHandle(forwardedRef, () => menuRef.current);
25
- const [isMobileMenuVisible, setMobileMenuVisible] = useState(false);
26
- useLayoutEffect(() => {
27
- setMobileMenuVisible((menuRef.current?.getBoundingClientRect?.().width ?? 0) <= BREAKPOINT_XS);
28
- }, [menuRef]);
29
- useResizeObserver(menuRef, entry => setMobileMenuVisible(entry.contentRect.width <= BREAKPOINT_XS));
30
23
  return React__default.createElement("div", {
31
- ref: menuRef,
32
24
  className: classNames(styles.topMenu, className, {
33
25
  [styles.topMenuDarkTheme]: theme === 'dark'
34
- })
26
+ }),
27
+ ref: forwardedRef
35
28
  }, React__default.createElement("a", {
36
29
  href: homeUrl,
37
30
  className: classNames(styles.logo, textCn('rs-h3')),
38
31
  onClick: event => linkHandler(event, homeUrl)
39
- }, title), isMobileMenuVisible ? React__default.createElement(VerticalMenu, {
32
+ }, title), React__default.createElement(DropdownMenu, {
40
33
  items: items,
41
34
  activeIndex: activeIndex,
42
35
  linkHandler: linkHandler,
43
36
  title: title,
44
37
  mobileTitle: mobileTitle,
45
38
  homeUrl: homeUrl,
46
- mobileOverview: mobileOverview,
47
- topMenuRef: menuRef
48
- }) : React__default.createElement(HorizontalMenu, {
39
+ mobileOverview: mobileOverview
40
+ }), React__default.createElement(HorizontalMenu, {
49
41
  items: items,
50
42
  activeIndex: activeIndex,
51
43
  linkHandler: linkHandler
52
44
  }), children);
53
- });
45
+ };
46
+
54
47
  export { TopMenu };
@@ -13,8 +13,7 @@
13
13
  --ktl-overlay-z-index: 900;
14
14
  --ktl-top-menu-z-index: 905;
15
15
  --ktl-header-z-index: 906;
16
- --ktl-mobile-dropdown-list-z-index: 907;
17
- --ktl-header-height-mobile: 52px;
16
+ --ktl-header-height-mobile: 48px;
18
17
  --ktl-font-family-inter: Inter, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Droid Sans', 'Helvetica Neue', Arial, sans-serif;
19
18
  --rs-font-family-ui: var(--ktl-font-family-inter);
20
19
  }
@@ -33,7 +32,7 @@
33
32
  color: #fff;
34
33
  }
35
34
 
36
- @media (min-width: 1200px) {
35
+ @media (--ktl-lg) {
37
36
 
38
37
  .ktl-hero {
39
38
  font-size: 64px;
@@ -56,7 +55,7 @@
56
55
  color: #fff;
57
56
  }
58
57
 
59
- @media (min-width: 1200px) {
58
+ @media (--ktl-lg) {
60
59
 
61
60
  .ktl-h1 {
62
61
  font-size: 43px;
@@ -80,7 +79,7 @@
80
79
  color: #fff;
81
80
  }
82
81
 
83
- @media (min-width: 1200px) {
82
+ @media (--ktl-lg) {
84
83
 
85
84
  .ktl-h2 {
86
85
  font-size: 31px;
@@ -103,7 +102,7 @@
103
102
  color: #fff;
104
103
  }
105
104
 
106
- @media (min-width: 1200px) {
105
+ @media (--ktl-lg) {
107
106
 
108
107
  .ktl-subtitle {
109
108
  font-size: 31px;
@@ -13,8 +13,7 @@
13
13
  --ktl-overlay-z-index: 900;
14
14
  --ktl-top-menu-z-index: 905;
15
15
  --ktl-header-z-index: 906;
16
- --ktl-mobile-dropdown-list-z-index: 907;
17
- --ktl-header-height-mobile: 52px;
16
+ --ktl-header-height-mobile: 48px;
18
17
  --ktl-font-family-inter: Inter, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Droid Sans', 'Helvetica Neue', Arial, sans-serif;
19
18
  --rs-font-family-ui: var(--ktl-font-family-inter);
20
19
  }
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.3.0-alpha.1",
4
+ "version": "4.3.0-next-layout",
5
5
  "license": "Apache-2.0",
6
6
  "author": "JetBrains",
7
7
  "files": [
@@ -15,7 +15,7 @@
15
15
  "defaults, not ie > 0, edge > 18"
16
16
  ],
17
17
  "scripts": {
18
- "codegeneration": "node ./scripts/build.js && yarn run copy-static",
18
+ "codegeneration": "ts-node scripts/build.ts && yarn run copy-static",
19
19
  "copy-static": "copyfiles -f src/svg/*.svg out/svg",
20
20
  "storybook": "yarn & start-storybook -p 6006",
21
21
  "build-storybook": "build-storybook",
@@ -68,6 +68,7 @@
68
68
  "@svgr/webpack": "^5.5.0",
69
69
  "@types/body-scroll-lock": "^3.1.0",
70
70
  "@types/cookie": "^0.4.1",
71
+ "@types/fs-extra": "^9.0.13",
71
72
  "@types/react": "^17.0.0",
72
73
  "@types/react-dom": "^17.0.0",
73
74
  "@types/react-modal": "^3.13.1",
@@ -122,6 +123,7 @@
122
123
  "sha.js": "^2.4.11",
123
124
  "standard-version": "^9.2.0",
124
125
  "svgo-loader": "^3.0.0",
126
+ "ts-node": "^10.9.1",
125
127
  "typescript": "^4.2.4",
126
128
  "webpack": "^5.30.0",
127
129
  "webpack-cli": "^4.6.0",
@@ -1,33 +0,0 @@
1
- import React__default, { Fragment } from 'react';
2
- import { MenuListItem } from '../menu-list-item/menu-list-item.js';
3
- import styles from './menu-list.module.pcss.js';
4
-
5
- const MenuList = ({
6
- items,
7
- level,
8
- linkHandler
9
- }) => {
10
- return React__default.createElement(React__default.Fragment, null, items.map((item, i) => React__default.createElement(Fragment, {
11
- key: i
12
- }, item.items && item.items.length > 0 ? React__default.createElement("div", {
13
- className: styles.menuItemGroup
14
- }, React__default.createElement(MenuListItem, {
15
- item: item,
16
- level: level,
17
- linkHandler: linkHandler
18
- }), item.items && item.items.length > 0 && React__default.createElement(MenuList, {
19
- items: item.items,
20
- level: level + 1,
21
- linkHandler: linkHandler
22
- })) : React__default.createElement(React__default.Fragment, null, React__default.createElement(MenuListItem, {
23
- item: item,
24
- level: level,
25
- linkHandler: linkHandler
26
- }), item.items && React__default.createElement(MenuList, {
27
- items: item.items,
28
- level: level + 1,
29
- linkHandler: linkHandler
30
- })))));
31
- };
32
-
33
- export { MenuList };
@@ -1,4 +0,0 @@
1
- var styles = {
2
- "menuItemGroup": "ktl-menu-list-module_menu-item-group_mFvUE"
3
- };
4
- export { styles as default };