@jetbrains/kotlin-web-site-ui 4.0.0-alpha.1 → 4.0.0

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 (28) hide show
  1. package/out/blocks/formik-wrapper/input.js +3 -3
  2. package/out/blocks/formik-wrapper/privacy-checkbox.js +17 -21
  3. package/out/blocks/formik-wrapper/privacy-notice.js +19 -28
  4. package/out/blocks/formik-wrapper/submit-button.js +3 -3
  5. package/out/components/cta-block/cta-block.js +17 -33
  6. package/out/components/footer/footer.js +30 -48
  7. package/out/components/footer/logo/logo.js +3 -5
  8. package/out/components/footer/nav/nav-item.js +11 -15
  9. package/out/components/footer/nav/nav-list.js +8 -11
  10. package/out/components/footer/social-list/social-item/social-item.js +3 -5
  11. package/out/components/footer/social-list/social-list.js +6 -7
  12. package/out/components/header/header.js +27 -32
  13. package/out/components/header/horizontal-menu/horizontal-menu.js +43 -53
  14. package/out/components/header/index.css +3 -3
  15. package/out/components/header/logo-large/logo-large.js +11 -17
  16. package/out/components/header/logo-small/logo-small.js +11 -17
  17. package/out/components/header/menu-popup/menu-button/menu-button.js +4 -6
  18. package/out/components/header/menu-popup/menu-button/menu-button.module.pcss.js +4 -0
  19. package/out/components/header/menu-popup/menu-popup.js +28 -37
  20. package/out/components/header/search-button/search-button.js +6 -6
  21. package/out/components/popup/popup.js +34 -40
  22. package/out/components/quotes-slider/quites-slider.js +33 -63
  23. package/out/components/top-menu/dropdown-menu/dropdown-menu.js +28 -40
  24. package/out/components/top-menu/horizontal-menu/horizontal-menu.js +13 -17
  25. package/out/components/top-menu/top-menu.js +19 -23
  26. package/out/components/youtube-player/youtube-player.js +24 -31
  27. package/package.json +6 -7
  28. package/out/components/header/menu-popup/menu-button/menu-button.pcss.js +0 -2
@@ -347,7 +347,7 @@
347
347
  display: block;
348
348
  }
349
349
 
350
- .button {
350
+ .ktl-menu-button-module_button_wB9Mx {
351
351
  display: flex;
352
352
  -webkit-appearance: none;
353
353
  -moz-appearance: none;
@@ -367,8 +367,8 @@
367
367
  color: var(--ktl-color-white-light);
368
368
  }
369
369
 
370
- .button:hover,
371
- .button :focus {
370
+ .ktl-menu-button-module_button_wB9Mx:hover,
371
+ .ktl-menu-button-module_button_wB9Mx :focus {
372
372
  color: #ffffff;
373
373
  }
374
374
 
@@ -1,4 +1,4 @@
1
- import { jsxs, jsx } from 'react/jsx-runtime';
1
+ import React__default from 'react';
2
2
  import styles from './logo-large.module.pcss.js';
3
3
  import SvgKotlinLogoLarge from './kotlin-logo-large.svg.js';
4
4
  import classNames from 'classnames';
@@ -11,25 +11,19 @@ const LogoLarge = ({
11
11
  }) => {
12
12
  const version = productWebUrl ? getProductVersion(productWebUrl) : null;
13
13
  const textCn = useTextStyles();
14
- return jsxs("div", Object.assign({
14
+ return React__default.createElement("div", {
15
15
  className: classNames(styles.container, className, textCn('rs-text-3', {
16
16
  hardness: 'average'
17
17
  }))
18
- }, {
19
- children: [jsx("a", Object.assign({
20
- className: styles.link,
21
- href: KOTLINLANG_URL,
22
- "aria-label": "Kotlin Home Page"
23
- }, {
24
- children: jsx(SvgKotlinLogoLarge, {}, void 0)
25
- }), void 0), version && jsx("a", Object.assign({
26
- className: classNames(styles.versionTag),
27
- href: productWebUrl,
28
- target: "_blank"
29
- }, {
30
- children: version
31
- }), void 0)]
32
- }), void 0);
18
+ }, React__default.createElement("a", {
19
+ className: styles.link,
20
+ href: KOTLINLANG_URL,
21
+ "aria-label": "Kotlin Home Page"
22
+ }, React__default.createElement(SvgKotlinLogoLarge, null)), version && React__default.createElement("a", {
23
+ className: classNames(styles.versionTag),
24
+ href: productWebUrl,
25
+ target: "_blank"
26
+ }, version));
33
27
  };
34
28
 
35
29
  function getProductVersion(productWebUrl) {
@@ -1,4 +1,4 @@
1
- import { jsxs, jsx } from 'react/jsx-runtime';
1
+ import React__default from 'react';
2
2
  import SvgKotlinLogoSmall from './kotlin-logo-small.svg.js';
3
3
  import styles from './logo-small.module.pcss.js';
4
4
  import classNames from 'classnames';
@@ -11,23 +11,17 @@ const LogoSmall = ({
11
11
  className
12
12
  }) => {
13
13
  const textCn = useTextStyles();
14
- return jsxs("div", Object.assign({
14
+ return React__default.createElement("div", {
15
15
  className: classNames(styles.logoSmall, className)
16
- }, {
17
- children: [jsx("a", Object.assign({
18
- href: KOTLINLANG_URL,
19
- className: styles.iconWrap
20
- }, {
21
- children: jsx(SvgKotlinLogoSmall, {
22
- className: styles.icon
23
- }, void 0)
24
- }), void 0), jsx("a", Object.assign({
25
- href: homeUrl,
26
- className: classNames(styles.link, textCn('rs-h3'))
27
- }, {
28
- children: homeTitle
29
- }), void 0)]
30
- }), void 0);
16
+ }, React__default.createElement("a", {
17
+ href: KOTLINLANG_URL,
18
+ className: styles.iconWrap
19
+ }, React__default.createElement(SvgKotlinLogoSmall, {
20
+ className: styles.icon
21
+ })), React__default.createElement("a", {
22
+ href: homeUrl,
23
+ className: classNames(styles.link, textCn('rs-h3'))
24
+ }, homeTitle));
31
25
  };
32
26
 
33
27
  export { LogoSmall };
@@ -1,5 +1,5 @@
1
- import { jsx } from 'react/jsx-runtime';
2
- import styles from './menu-button.pcss.js';
1
+ import React__default from 'react';
2
+ import styles from './menu-button.module.pcss.js';
3
3
  import classNames from 'classnames';
4
4
  import SvgHamburgerIcon from './hamburger-icon.svg.js';
5
5
  import SvgCloseIcon from './close-icon.svg.js';
@@ -8,15 +8,13 @@ const MenuButton = ({
8
8
  onClick,
9
9
  isExpanded
10
10
  }) => {
11
- return jsx("button", Object.assign({
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
16
  onClick: onClick
17
- }, {
18
- children: isExpanded ? jsx(SvgCloseIcon, {}, void 0) : jsx(SvgHamburgerIcon, {}, void 0)
19
- }), void 0);
17
+ }, isExpanded ? React__default.createElement(SvgCloseIcon, null) : React__default.createElement(SvgHamburgerIcon, null));
20
18
  };
21
19
 
22
20
  export { MenuButton };
@@ -0,0 +1,4 @@
1
+ var styles = {
2
+ "button": "ktl-menu-button-module_button_wB9Mx"
3
+ };
4
+ export { styles as default };
@@ -1,5 +1,4 @@
1
- import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
2
- import { useRef, useState, useEffect, useLayoutEffect, useCallback, Fragment as Fragment$1 } from 'react';
1
+ import React__default, { useRef, useState, useEffect, useLayoutEffect, useCallback, Fragment } from 'react';
3
2
  import styles from './menu-popup.module.pcss.js';
4
3
  import classNames from 'classnames';
5
4
  import { MenuButton } from './menu-button/menu-button.js';
@@ -16,7 +15,7 @@ const MenuListItem = ({
16
15
  '--level': level
17
16
  };
18
17
  const handleClick = useCallback(event => linkHandler && item.url && linkHandler(event, item.url), []);
19
- return jsx(Tag, Object.assign({}, item.url ? {
18
+ return React__default.createElement(Tag, Object.assign({}, item.url ? {
20
19
  href: item.url,
21
20
  onClick: handleClick
22
21
  } : {}, {
@@ -26,9 +25,7 @@ const MenuListItem = ({
26
25
  [styles.activeWithChild]: item.items && item.items.length
27
26
  }),
28
27
  style: style
29
- }, {
30
- children: item.title
31
- }), void 0);
28
+ }), item.title);
32
29
  };
33
30
 
34
31
  const MenuList = ({
@@ -36,19 +33,17 @@ const MenuList = ({
36
33
  level,
37
34
  linkHandler
38
35
  }) => {
39
- return jsx(Fragment, {
40
- children: items.map((item, i) => jsxs(Fragment$1, {
41
- children: [jsx(MenuListItem, {
42
- item: item,
43
- level: level,
44
- linkHandler: linkHandler
45
- }, void 0), item.items && item.items.length > 0 && jsx(MenuList, {
46
- items: item.items,
47
- level: level + 1,
48
- linkHandler: linkHandler
49
- }, void 0)]
50
- }, i))
51
- }, void 0);
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
+ }))));
52
47
  };
53
48
 
54
49
  const MenuPopup = ({
@@ -81,24 +76,20 @@ const MenuPopup = ({
81
76
 
82
77
  setExpand(!isExpanded);
83
78
  }, [isExpanded, navRef]);
84
- return jsxs(Fragment, {
85
- children: [jsx(MenuButton, {
86
- onClick: handleClick,
87
- isExpanded: isExpanded
88
- }, void 0), jsx("nav", Object.assign({
89
- style: navStyle,
90
- ref: navRef,
91
- className: classNames(styles.menuPopup, textCn('rs-text-2'), {
92
- [styles.menuPopupExpanded]: isExpanded
93
- })
94
- }, {
95
- children: jsx(MenuList, {
96
- items: items,
97
- level: 0,
98
- linkHandler: linkHandler
99
- }, void 0)
100
- }), void 0)]
101
- }, void 0);
79
+ return React__default.createElement(React__default.Fragment, null, React__default.createElement(MenuButton, {
80
+ onClick: handleClick,
81
+ isExpanded: isExpanded
82
+ }), React__default.createElement("nav", {
83
+ style: navStyle,
84
+ ref: navRef,
85
+ className: classNames(styles.menuPopup, textCn('rs-text-2'), {
86
+ [styles.menuPopupExpanded]: isExpanded
87
+ })
88
+ }, React__default.createElement(MenuList, {
89
+ items: items,
90
+ level: 0,
91
+ linkHandler: linkHandler
92
+ })));
102
93
  };
103
94
 
104
95
  export { MenuPopup };
@@ -1,22 +1,22 @@
1
- import { jsx } from 'react/jsx-runtime';
1
+ 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
+ const DATA_TEST_HEADER_SEARCH_BUTTON = 'header-search-button';
5
6
 
6
7
  const SearchButton = ({
7
8
  onClick,
8
9
  isActive
9
10
  }) => {
10
- return jsx("button", Object.assign({
11
+ return React__default.createElement("button", {
11
12
  type: "button",
12
13
  className: classNames(styles.button, {
13
14
  [styles.active]: isActive
14
15
  }),
16
+ "data-test": DATA_TEST_HEADER_SEARCH_BUTTON,
15
17
  "aria-label": "Search",
16
18
  onClick: onClick
17
- }, {
18
- children: jsx(SvgSearch, {}, void 0)
19
- }), void 0);
19
+ }, React__default.createElement(SvgSearch, null));
20
20
  };
21
21
 
22
- export { SearchButton };
22
+ export { DATA_TEST_HEADER_SEARCH_BUTTON, SearchButton };
@@ -1,4 +1,4 @@
1
- import { jsx, jsxs } from 'react/jsx-runtime';
1
+ import React from 'react';
2
2
  import ReactModal from 'react-modal';
3
3
  import { LayeringConsumer, LayeringProvider } from '@rescui/ui-contexts';
4
4
  import { CloseIcon, LoadingIcon } from '@rescui/icons';
@@ -17,45 +17,39 @@ const Popup = ({
17
17
  ariaHideApp = false,
18
18
  ...restProps
19
19
  }) => {
20
- return jsx(LayeringConsumer, {
21
- children: ({
22
- popupZIndex
23
- }) => jsx(LayeringProvider, Object.assign({
24
- baseLayer: "popup"
25
- }, {
26
- children: jsxs(ReactModal, Object.assign({
27
- isOpen: isOpen,
28
- className: styles.popup,
29
- overlayClassName: styles.overlay,
30
- onRequestClose: onRequestClose,
31
- shouldCloseOnOverlayClick: shouldCloseOnOverlayClick,
32
- shouldCloseOnEsc: shouldCloseOnEsc
33
- }, restProps, {
34
- ariaHideApp: ariaHideApp,
35
- style: {
36
- overlay: {
37
- zIndex: popupZIndex
38
- }
39
- }
40
- }, {
41
- children: [!busy && showOuterCloseButton && jsx(Button, {
42
- mode: 'rock',
43
- theme: 'light',
44
- icon: jsx(CloseIcon, {}, void 0),
45
- className: styles.close,
46
- onClick: onRequestClose,
47
- "data-test": "close-button"
48
- }, void 0), busy ? jsx(LoadingIcon, {
49
- size: "l",
50
- theme: "dark",
51
- mode: "rock",
52
- "data-test": "loading-icon"
53
- }, void 0) : children, jsx(RemoveScrollBar, {
54
- gapMode: "margin"
55
- }, void 0)]
56
- }), void 0)
57
- }), void 0)
58
- }, void 0);
20
+ return React.createElement(LayeringConsumer, null, ({
21
+ popupZIndex
22
+ }) => React.createElement(LayeringProvider, {
23
+ baseLayer: "popup"
24
+ }, React.createElement(ReactModal, Object.assign({
25
+ isOpen: isOpen,
26
+ className: styles.popup,
27
+ overlayClassName: styles.overlay,
28
+ onRequestClose: onRequestClose,
29
+ shouldCloseOnOverlayClick: shouldCloseOnOverlayClick,
30
+ shouldCloseOnEsc: shouldCloseOnEsc
31
+ }, restProps, {
32
+ ariaHideApp: ariaHideApp,
33
+ style: {
34
+ overlay: {
35
+ zIndex: popupZIndex
36
+ }
37
+ }
38
+ }), !busy && showOuterCloseButton && React.createElement(Button, {
39
+ mode: 'rock',
40
+ theme: 'light',
41
+ icon: React.createElement(CloseIcon, null),
42
+ className: styles.close,
43
+ onClick: onRequestClose,
44
+ "data-test": "close-button"
45
+ }), busy ? React.createElement(LoadingIcon, {
46
+ size: "l",
47
+ theme: "dark",
48
+ mode: "rock",
49
+ "data-test": "loading-icon"
50
+ }) : children, React.createElement(RemoveScrollBar, {
51
+ gapMode: "margin"
52
+ }))));
59
53
  };
60
54
 
61
55
  export { Popup };
@@ -1,5 +1,4 @@
1
- import { jsx, jsxs } from 'react/jsx-runtime';
2
- import { useState, useCallback } from 'react';
1
+ import React__default, { useState, useCallback } from 'react';
3
2
  import SwipeableViews from 'react-swipeable-views';
4
3
  import cn from 'classnames';
5
4
  import SvgQuote from './quote.svg.js';
@@ -33,68 +32,39 @@ const QuotesSlider = ({
33
32
  [styles.controlActive]: index + 1 < totalSlides
34
33
  });
35
34
  const quoteTextClass = large ? 'ktl-subtitle' : 'ktl-text-1';
36
- return jsx("div", Object.assign({
35
+ return React__default.createElement("div", {
37
36
  className: styles.quotesSlider
38
- }, {
39
- children: jsxs("div", Object.assign({
40
- className: styles.content
41
- }, {
42
- children: [jsx("div", Object.assign({
43
- className: styles.iconContainer
44
- }, {
45
- children: jsx(SvgQuote, {}, void 0)
46
- }), void 0), jsxs("div", {
47
- children: [quotes.length > 1 ? jsx(SwipeableViews, Object.assign({
48
- index: index,
49
- onChangeIndex: handleChangeIndex
50
- }, {
51
- children: quotes.map((quote, i) => jsx("p", Object.assign({
52
- className: quoteTextClass
53
- }, {
54
- children: quote.text
55
- }), i))
56
- }), void 0) : jsx("p", Object.assign({
57
- className: quoteTextClass
58
- }, {
59
- children: quotes[0].text
60
- }), void 0), jsxs("div", Object.assign({
61
- className: styles.nav
62
- }, {
63
- children: [jsx("div", Object.assign({
64
- className: styles.title
65
- }, {
66
- children: jsx("p", Object.assign({
67
- className: "ktl-text-2"
68
- }, {
69
- children: slideTitle
70
- }), void 0)
71
- }), void 0), quotes.length > 1 && jsxs("div", Object.assign({
72
- className: styles.controls
73
- }, {
74
- children: [jsx("div", Object.assign({
75
- className: prevButtonClass,
76
- onClick: handlePrevSlide
77
- }, {
78
- children: jsx(SvgSliderArrow, {}, void 0)
79
- }), void 0), jsx("div", Object.assign({
80
- className: styles.slidesCount
81
- }, {
82
- children: jsxs("p", Object.assign({
83
- className: "ktl-text-2"
84
- }, {
85
- children: [index + 1, "/", totalSlides]
86
- }), void 0)
87
- }), void 0), jsx("div", Object.assign({
88
- className: nextButtonClass,
89
- onClick: handleNextSlide
90
- }, {
91
- children: jsx(SvgSliderArrow, {}, void 0)
92
- }), void 0)]
93
- }), void 0)]
94
- }), void 0)]
95
- }, void 0)]
96
- }), void 0)
97
- }), void 0);
37
+ }, React__default.createElement("div", {
38
+ className: styles.content
39
+ }, React__default.createElement("div", {
40
+ className: styles.iconContainer
41
+ }, React__default.createElement(SvgQuote, null)), React__default.createElement("div", null, quotes.length > 1 ? React__default.createElement(SwipeableViews, {
42
+ index: index,
43
+ onChangeIndex: handleChangeIndex
44
+ }, quotes.map((quote, i) => React__default.createElement("p", {
45
+ className: quoteTextClass,
46
+ key: i
47
+ }, quote.text))) : React__default.createElement("p", {
48
+ className: quoteTextClass
49
+ }, quotes[0].text), React__default.createElement("div", {
50
+ className: styles.nav
51
+ }, React__default.createElement("div", {
52
+ className: styles.title
53
+ }, React__default.createElement("p", {
54
+ className: "ktl-text-2"
55
+ }, slideTitle)), quotes.length > 1 && React__default.createElement("div", {
56
+ className: styles.controls
57
+ }, React__default.createElement("div", {
58
+ className: prevButtonClass,
59
+ onClick: handlePrevSlide
60
+ }, React__default.createElement(SvgSliderArrow, null)), React__default.createElement("div", {
61
+ className: styles.slidesCount
62
+ }, React__default.createElement("p", {
63
+ className: "ktl-text-2"
64
+ }, index + 1, "/", totalSlides)), React__default.createElement("div", {
65
+ className: nextButtonClass,
66
+ onClick: handleNextSlide
67
+ }, React__default.createElement(SvgSliderArrow, null)))))));
98
68
  };
99
69
 
100
70
  export { QuotesSlider };
@@ -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 jsxs(Fragment, {
41
- children: [jsxs("div", Object.assign({
42
- className: classNames(styles.dropdownMenu, {
43
- [styles.dropdownMenuExpanded]: isExpanded
44
- }),
45
- onClick: handleClick
46
- }, {
47
- children: [jsxs("button", Object.assign({
48
- className: classNames(styles.button, textCn('rs-text-2')),
49
- "aria-haspopup": "true"
50
- }, {
51
- children: [jsx("span", {
52
- children: activeItem.title
53
- }, void 0), jsx(SvgArrowDropdownIcon, {
54
- className: styles.icon
55
- }, void 0)]
56
- }), void 0), jsx("nav", Object.assign({
57
- className: classNames(styles.dropdownList, {
58
- [styles.dropdownListDarkTheme]: theme === 'dark'
59
- })
60
- }, {
61
- children: _items.map((item, index) => jsx("a", Object.assign({
62
- href: item.url,
63
- className: classNames(styles.dropdownItem, textCn('rs-text-2'), {
64
- [styles.dropdownItemActive]: index === _activeIndex
65
- }),
66
- onClick: event => linkHandler?.(event, item.url),
67
- target: item.isExternal ? '_blank' : undefined
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 { jsx } from 'react/jsx-runtime';
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 ? jsx("span", Object.assign({
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 jsx("nav", Object.assign({
34
+ return React__default.createElement("nav", {
38
35
  className: classNames(styles.horizontalMenu, textCn('rs-text-2'))
39
- }, {
40
- children: items.map((item, index) => jsx(HorizontalMenuItem, {
41
- isActive: index === activeIndex,
42
- item: item,
43
- linkHandler: linkHandler
44
- }, item.url))
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 { jsxs, jsx } from 'react/jsx-runtime';
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 jsxs("div", Object.assign({
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
- children: [jsx("a", Object.assign({
30
- href: homeUrl,
31
- className: classNames(styles.logo, textCn('rs-h3')),
32
- onClick: event => linkHandler(event, homeUrl)
33
- }, {
34
- children: title
35
- }), void 0), jsx(DropdownMenu, {
36
- items: items,
37
- activeIndex: activeIndex,
38
- linkHandler: linkHandler,
39
- title: title,
40
- mobileTitle: mobileTitle,
41
- homeUrl: homeUrl,
42
- mobileOverview: mobileOverview
43
- }, void 0), jsx(HorizontalMenu, {
44
- items: items,
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 };