@jetbrains/kotlin-web-site-ui 3.1.0 → 4.0.0-alpha.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 (151) hide show
  1. package/out/blocks/formik-wrapper/index.css +8 -0
  2. package/out/blocks/formik-wrapper/index.js +4 -0
  3. package/out/blocks/formik-wrapper/input.js +38 -0
  4. package/out/blocks/formik-wrapper/privacy-checkbox.js +52 -0
  5. package/out/blocks/formik-wrapper/privacy-notice.js +49 -0
  6. package/out/blocks/formik-wrapper/privacy-notice.module.pcss.js +6 -0
  7. package/out/blocks/formik-wrapper/submit-button.js +21 -0
  8. package/out/components/cta-block/cta-block.js +45 -0
  9. package/out/components/cta-block/cta-block.module.pcss.js +8 -0
  10. package/out/components/cta-block/index.css +36 -0
  11. package/out/components/cta-block/index.js +3 -0
  12. package/out/components/footer/footer.js +73 -0
  13. package/out/components/footer/footer.module.pcss.js +13 -0
  14. package/out/components/footer/index.css +242 -0
  15. package/out/components/footer/index.js +3 -0
  16. package/out/components/footer/logo/jetbrains-logo.svg.js +38 -0
  17. package/out/components/footer/logo/logo.js +14 -0
  18. package/out/components/footer/logo/logo.module.pcss.js +4 -0
  19. package/out/components/footer/nav/nav-data.js +30 -0
  20. package/out/components/footer/nav/nav-item.js +31 -0
  21. package/out/components/footer/nav/nav-item.module.pcss.js +5 -0
  22. package/out/components/footer/nav/nav-list.js +18 -0
  23. package/out/components/footer/nav/nav-list.module.pcss.js +4 -0
  24. package/out/components/footer/social-list/social-data.js +38 -0
  25. package/out/components/footer/social-list/social-item/social-item.js +23 -0
  26. package/out/components/footer/social-list/social-item/social-item.module.pcss.js +5 -0
  27. package/out/components/footer/social-list/social-list.js +14 -0
  28. package/out/components/footer/social-list/social-list.module.pcss.js +4 -0
  29. package/out/components/footer/social-list/svg/github-logo.svg.js +35 -0
  30. package/out/components/footer/social-list/svg/reddit-logo.svg.js +33 -0
  31. package/out/components/footer/social-list/svg/slack-logo.svg.js +33 -0
  32. package/out/components/footer/social-list/svg/stackoverflow-logo.svg.js +36 -0
  33. package/out/components/footer/social-list/svg/twitter-logo.svg.js +33 -0
  34. package/out/components/footer/social-list/svg/youtube-logo.svg.js +35 -0
  35. package/out/components/grid/index.css +1081 -0
  36. package/out/components/grid/index.js +1 -0
  37. package/out/components/header/consts.js +3 -0
  38. package/out/components/header/header.js +68 -0
  39. package/out/components/header/header.module.pcss.js +6 -0
  40. package/out/components/header/horizontal-menu/horizontal-menu.js +110 -0
  41. package/out/components/header/horizontal-menu/horizontal-menu.module.pcss.js +16 -0
  42. package/out/components/header/index.css +402 -0
  43. package/out/components/header/index.js +4 -0
  44. package/out/components/header/logo-large/kotlin-logo-large.svg.js +53 -0
  45. package/out/components/header/logo-large/logo-large.js +40 -0
  46. package/out/components/header/logo-large/logo-large.module.pcss.js +6 -0
  47. package/out/components/header/logo-small/kotlin-logo-small.svg.js +47 -0
  48. package/out/components/header/logo-small/logo-small.js +33 -0
  49. package/out/components/header/logo-small/logo-small.module.pcss.js +7 -0
  50. package/out/components/header/menu-popup/menu-button/close-icon.svg.js +35 -0
  51. package/out/components/header/menu-popup/menu-button/hamburger-icon.svg.js +35 -0
  52. package/out/components/header/menu-popup/menu-button/menu-button.js +22 -0
  53. package/out/components/header/menu-popup/menu-button/menu-button.pcss.js +2 -0
  54. package/out/components/header/menu-popup/menu-popup.js +104 -0
  55. package/out/components/header/menu-popup/menu-popup.module.pcss.js +9 -0
  56. package/out/components/header/nav-scheme.js +135 -0
  57. package/out/components/header/search-button/search-button.js +22 -0
  58. package/out/components/header/search-button/search-button.module.pcss.js +5 -0
  59. package/out/components/header/search-button/search.svg.js +34 -0
  60. package/out/components/popup/index.css +35 -0
  61. package/out/components/popup/index.js +3 -0
  62. package/out/components/popup/popup.js +61 -0
  63. package/out/components/popup/popup.module.pcss.js +6 -0
  64. package/out/components/quotes-slider/index.css +86 -0
  65. package/out/components/quotes-slider/index.js +3 -0
  66. package/out/components/quotes-slider/quites-slider.js +100 -0
  67. package/out/components/quotes-slider/quote.svg.js +33 -0
  68. package/out/components/quotes-slider/quotes-slider.module.pcss.js +13 -0
  69. package/out/components/quotes-slider/slider-arrow.svg.js +33 -0
  70. package/out/components/top-menu/dropdown-menu/arrow-dropdown-icon.svg.js +34 -0
  71. package/out/components/top-menu/dropdown-menu/dropdown-menu.js +81 -0
  72. package/out/components/top-menu/dropdown-menu/dropdown-menu.module.pcss.js +14 -0
  73. package/out/components/top-menu/horizontal-menu/horizontal-menu.js +48 -0
  74. package/out/components/top-menu/horizontal-menu/horizontal-menu.module.pcss.js +6 -0
  75. package/out/components/top-menu/index.css +224 -0
  76. package/out/components/top-menu/index.js +3 -0
  77. package/out/components/top-menu/top-menu.js +51 -0
  78. package/out/components/top-menu/top-menu.module.pcss.js +6 -0
  79. package/out/components/typography/create-text-cn.js +26 -0
  80. package/out/components/typography/hooks.js +6 -0
  81. package/out/components/typography/index.css +176 -0
  82. package/out/components/typography/index.js +3 -0
  83. package/out/components/youtube-player/index.css +119 -0
  84. package/out/components/youtube-player/index.js +3 -0
  85. package/out/components/youtube-player/loading_24.svg.js +31 -0
  86. package/out/components/youtube-player/play_24.svg.js +31 -0
  87. package/out/components/youtube-player/utils.js +28 -0
  88. package/out/components/youtube-player/youtube-player.js +152 -0
  89. package/out/components/youtube-player/youtube-player.module.pcss.js +16 -0
  90. package/out/packages/data-services/index.js +9 -0
  91. package/out/packages/data-services/marketo-submiter.js +62 -0
  92. package/out/packages/data-services/privacy-consent-ids.json.js +5 -0
  93. package/out/packages/data-services/privacy-consent-service.js +44 -0
  94. package/out/packages/data-services/urls.js +4 -0
  95. package/{dist → out}/svg/kotlin_64.svg +0 -0
  96. package/package.json +18 -2
  97. package/dist/ctaBlock.css +0 -2
  98. package/dist/ctaBlock.css.map +0 -1
  99. package/dist/ctaBlock.js +0 -3
  100. package/dist/ctaBlock.js.LICENSE.txt +0 -8
  101. package/dist/ctaBlock.js.map +0 -1
  102. package/dist/dataServices.js +0 -3
  103. package/dist/dataServices.js.LICENSE.txt +0 -17
  104. package/dist/dataServices.js.map +0 -1
  105. package/dist/footer.css +0 -2
  106. package/dist/footer.css.map +0 -1
  107. package/dist/footer.js +0 -3
  108. package/dist/footer.js.LICENSE.txt +0 -14
  109. package/dist/footer.js.map +0 -1
  110. package/dist/formikWrappers.css +0 -2
  111. package/dist/formikWrappers.css.map +0 -1
  112. package/dist/formikWrappers.js +0 -3
  113. package/dist/formikWrappers.js.LICENSE.txt +0 -14
  114. package/dist/formikWrappers.js.map +0 -1
  115. package/dist/grid.css +0 -2
  116. package/dist/grid.css.map +0 -1
  117. package/dist/grid.js +0 -2
  118. package/dist/grid.js.map +0 -1
  119. package/dist/header.css +0 -2
  120. package/dist/header.css.map +0 -1
  121. package/dist/header.js +0 -3
  122. package/dist/header.js.LICENSE.txt +0 -14
  123. package/dist/header.js.map +0 -1
  124. package/dist/popup.css +0 -2
  125. package/dist/popup.css.map +0 -1
  126. package/dist/popup.js +0 -3
  127. package/dist/popup.js.LICENSE.txt +0 -26
  128. package/dist/popup.js.map +0 -1
  129. package/dist/quotesSlider.css +0 -2
  130. package/dist/quotesSlider.css.map +0 -1
  131. package/dist/quotesSlider.js +0 -3
  132. package/dist/quotesSlider.js.LICENSE.txt +0 -14
  133. package/dist/quotesSlider.js.map +0 -1
  134. package/dist/svg/loading_24.svg +0 -1
  135. package/dist/svg/play_24.svg +0 -1
  136. package/dist/svg/quote.svg +0 -3
  137. package/dist/svg/slider-arrow.svg +0 -3
  138. package/dist/topMenu.css +0 -2
  139. package/dist/topMenu.css.map +0 -1
  140. package/dist/topMenu.js +0 -3
  141. package/dist/topMenu.js.LICENSE.txt +0 -14
  142. package/dist/topMenu.js.map +0 -1
  143. package/dist/typography.css +0 -2
  144. package/dist/typography.css.map +0 -1
  145. package/dist/typography.js +0 -2
  146. package/dist/typography.js.map +0 -1
  147. package/dist/youtubePlayer.css +0 -2
  148. package/dist/youtubePlayer.css.map +0 -1
  149. package/dist/youtubePlayer.js +0 -3
  150. package/dist/youtubePlayer.js.LICENSE.txt +0 -14
  151. package/dist/youtubePlayer.js.map +0 -1
@@ -0,0 +1,86 @@
1
+ .ktl-quotes-slider-module_quotes-slider_y2xdf {
2
+ display: block;
3
+ }
4
+
5
+ @media (min-width: 768px) {
6
+
7
+ .ktl-quotes-slider-module_content_ycgWG {
8
+ display: flex
9
+ }
10
+ }
11
+
12
+ .ktl-quotes-slider-module_icon-container_tRSxF {
13
+ display: flex;
14
+ margin-right: 32px;
15
+ }
16
+
17
+ @media (max-width: 767px) {
18
+
19
+ .ktl-quotes-slider-module_icon-container_tRSxF {
20
+ margin-bottom: 16px
21
+ }
22
+ }
23
+
24
+ .ktl-quotes-slider-module_nav_0aZMC {
25
+ margin-top: 16px;
26
+ }
27
+
28
+ @media (min-width: 768px) {
29
+
30
+ .ktl-quotes-slider-module_nav_0aZMC {
31
+ margin-top: 20px;
32
+ display: flex;
33
+ justify-content: space-between;
34
+ align-items: center
35
+ }
36
+ }
37
+
38
+ .ktl-quotes-slider-module_title_wOsKl p {
39
+ color: var(--ktl-icon-color-dark);
40
+ }
41
+
42
+ .ktl-quotes-slider-module_controls_OuyQ8 {
43
+ display: flex;
44
+ align-items: center;
45
+ color: var(--ktl-icon-color-dark);
46
+ }
47
+
48
+ @media (max-width: 767px) {
49
+
50
+ .ktl-quotes-slider-module_controls_OuyQ8 {
51
+ margin-top: 20px
52
+ }
53
+ }
54
+
55
+ .ktl-quotes-slider-module_control_eN3Tf {
56
+ opacity: 0.5;
57
+ display: flex;
58
+ cursor: pointer;
59
+ transition: opacity .3s;
60
+ color: var(--ktl-dark-100);
61
+ }
62
+
63
+ .ktl-quotes-slider-module_control-active_sE-QK {
64
+ opacity: 0.75;
65
+ }
66
+
67
+ .ktl-quotes-slider-module_control-active_sE-QK:hover {
68
+ opacity: 1;
69
+ }
70
+
71
+ .ktl-quotes-slider-module_control-prev_9eMAN {
72
+ transform: scale(-1);
73
+ }
74
+
75
+ .ktl-quotes-slider-module_slides-count_T0-Ln {
76
+ margin: 0 30px;
77
+ -webkit-user-select: none;
78
+ -moz-user-select: none;
79
+ user-select: none;
80
+ min-width: 40px;
81
+ text-align: center;
82
+ }
83
+
84
+ .ktl-quotes-slider-module_slides-count_T0-Ln p {
85
+ color: var(--ktl-icon-color-dark);
86
+ }
@@ -0,0 +1,3 @@
1
+ import './index.css';
2
+ import { QuotesSlider } from './quites-slider.js';
3
+ export { QuotesSlider as default } from './quites-slider.js';
@@ -0,0 +1,100 @@
1
+ import { jsx, jsxs } from 'react/jsx-runtime';
2
+ import { useState, useCallback } from 'react';
3
+ import SwipeableViews from 'react-swipeable-views';
4
+ import cn from 'classnames';
5
+ import SvgQuote from './quote.svg.js';
6
+ import SvgSliderArrow from './slider-arrow.svg.js';
7
+ import styles from './quotes-slider.module.pcss.js';
8
+
9
+ const QuotesSlider = ({
10
+ quotes,
11
+ large
12
+ }) => {
13
+ const [index, setIndex] = useState(0);
14
+ const totalSlides = quotes.length;
15
+ const handleNextSlide = useCallback(() => {
16
+ if (index + 1 < totalSlides) {
17
+ setIndex(index + 1);
18
+ }
19
+ }, [index]);
20
+ const handlePrevSlide = useCallback(() => {
21
+ if (index > 0) {
22
+ setIndex(index - 1);
23
+ }
24
+ }, [index]);
25
+ const handleChangeIndex = useCallback(i => {
26
+ setIndex(i);
27
+ }, [index]);
28
+ const slideTitle = quotes[index].title;
29
+ const prevButtonClass = cn([styles.control, styles.controlPrev], {
30
+ [styles.controlActive]: index > 0
31
+ });
32
+ const nextButtonClass = cn(styles.control, {
33
+ [styles.controlActive]: index + 1 < totalSlides
34
+ });
35
+ const quoteTextClass = large ? 'ktl-subtitle' : 'ktl-text-1';
36
+ return jsx("div", Object.assign({
37
+ 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);
98
+ };
99
+
100
+ export { QuotesSlider };
@@ -0,0 +1,33 @@
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 SvgQuote = props => /*#__PURE__*/React.createElement("svg", _extends({
24
+ width: 51,
25
+ height: 40,
26
+ fill: "none",
27
+ xmlns: "http://www.w3.org/2000/svg"
28
+ }, props), _path || (_path = /*#__PURE__*/React.createElement("path", {
29
+ d: "M51 27.693C51 34.49 45.468 40 38.644 40s-12.356-5.51-12.356-12.307a12.23 12.23 0 0 1 3.457-8.524L49.75 0l1.105 1.144-15.289 14.643c.986-.252 2.013-.4 3.078-.4 6.824 0 12.356 5.51 12.356 12.306ZM12.356 15.386c-1.065 0-2.092.149-3.078.4L24.567 1.145 23.462 0 3.457 19.169A12.23 12.23 0 0 0 0 27.693C0 34.49 5.532 40 12.356 40s12.356-5.51 12.356-12.307c0-6.797-5.532-12.307-12.356-12.307Z",
30
+ fill: "#27282C"
31
+ })));
32
+
33
+ export { SvgQuote as default };
@@ -0,0 +1,13 @@
1
+ var styles = {
2
+ "quotesSlider": "ktl-quotes-slider-module_quotes-slider_y2xdf",
3
+ "content": "ktl-quotes-slider-module_content_ycgWG",
4
+ "iconContainer": "ktl-quotes-slider-module_icon-container_tRSxF",
5
+ "nav": "ktl-quotes-slider-module_nav_0aZMC",
6
+ "title": "ktl-quotes-slider-module_title_wOsKl",
7
+ "controls": "ktl-quotes-slider-module_controls_OuyQ8",
8
+ "control": "ktl-quotes-slider-module_control_eN3Tf",
9
+ "controlActive": "ktl-quotes-slider-module_control-active_sE-QK",
10
+ "controlPrev": "ktl-quotes-slider-module_control-prev_9eMAN",
11
+ "slidesCount": "ktl-quotes-slider-module_slides-count_T0-Ln"
12
+ };
13
+ export { styles as default };
@@ -0,0 +1,33 @@
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 SvgSliderArrow = props => /*#__PURE__*/React.createElement("svg", _extends({
24
+ width: 19,
25
+ height: 14,
26
+ fill: "none",
27
+ xmlns: "http://www.w3.org/2000/svg"
28
+ }, props), _path || (_path = /*#__PURE__*/React.createElement("path", {
29
+ d: "M19 7.1 11 14V8.1H0v-2h11V.3l8 6.8Z",
30
+ fill: "currentColor"
31
+ })));
32
+
33
+ export { SvgSliderArrow as default };
@@ -0,0 +1,34 @@
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 SvgArrowDropdownIcon = props => /*#__PURE__*/React.createElement("svg", _extends({
24
+ viewBox: "0 0 12 6",
25
+ fill: "none",
26
+ xmlns: "http://www.w3.org/2000/svg"
27
+ }, props), _path || (_path = /*#__PURE__*/React.createElement("path", {
28
+ fillRule: "evenodd",
29
+ clipRule: "evenodd",
30
+ d: "m6 6 5.25-6H.75L6 6Z",
31
+ fill: "currentColor"
32
+ })));
33
+
34
+ export { SvgArrowDropdownIcon as default };
@@ -0,0 +1,81 @@
1
+ import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
2
+ import React__default, { useState } from 'react';
3
+ import ReactDOM from 'react-dom';
4
+ import classNames from 'classnames';
5
+ import styles from './dropdown-menu.module.pcss.js';
6
+ import { useTextStyles } from '@rescui/typography';
7
+ import SvgArrowDropdownIcon from './arrow-dropdown-icon.svg.js';
8
+ import { useTheme } from '@rescui/ui-contexts';
9
+
10
+ const DropdownMenu = ({
11
+ homeUrl,
12
+ title,
13
+ mobileTitle = 'Overview',
14
+ items,
15
+ activeIndex,
16
+ linkHandler,
17
+ mobileOverview = true
18
+ }) => {
19
+ const theme = useTheme();
20
+ const textCn = useTextStyles();
21
+ const [portalRoot, setPortalRoot] = React__default.useState(null);
22
+ React__default.useEffect(() => {
23
+ if (typeof document !== `undefined`) {
24
+ setPortalRoot(document.body);
25
+ }
26
+ }, []);
27
+
28
+ let _items = (mobileOverview ? [{
29
+ title: mobileTitle,
30
+ url: homeUrl
31
+ }] : []).concat(items);
32
+
33
+ const _activeIndex = mobileOverview ? activeIndex + 1 : activeIndex;
34
+
35
+ const activeItem = _items[_activeIndex];
36
+ const [isExpanded, setIsExpanded] = useState(false);
37
+
38
+ const handleClick = () => setIsExpanded(!isExpanded);
39
+
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);
79
+ };
80
+
81
+ export { DropdownMenu };
@@ -0,0 +1,14 @@
1
+ var styles = {
2
+ "dropdownMenu": "ktl-dropdown-menu-module_dropdown-menu_tq2uU",
3
+ "button": "ktl-dropdown-menu-module_button_OYsuv",
4
+ "icon": "ktl-dropdown-menu-module_icon_GGhMI",
5
+ "dropdownList": "ktl-dropdown-menu-module_dropdown-list_Ylkvt",
6
+ "fadein": "ktl-dropdown-menu-module_fadein_MySnq",
7
+ "dropdownItem": "ktl-dropdown-menu-module_dropdown-item_X3tZ-",
8
+ "dropdownItemActive": "ktl-dropdown-menu-module_dropdown-item-active_99q9X",
9
+ "overlay": "ktl-dropdown-menu-module_overlay_segRo",
10
+ "overlayVisible": "ktl-dropdown-menu-module_overlay-visible_MjwEF",
11
+ "dropdownMenuExpanded": "ktl-dropdown-menu-module_dropdown-menu-expanded_EQefy",
12
+ "dropdownListDarkTheme": "ktl-dropdown-menu-module_dropdown-list-dark-theme_P60ol"
13
+ };
14
+ export { styles as default };
@@ -0,0 +1,48 @@
1
+ import { jsx } from 'react/jsx-runtime';
2
+ import { useCallback } from 'react';
3
+ import classNames from 'classnames';
4
+ import styles from './horizontal-menu.module.pcss.js';
5
+ import { useTextStyles } from '@rescui/typography';
6
+
7
+ const HorizontalMenuItem = ({
8
+ item,
9
+ isActive,
10
+ linkHandler
11
+ }) => {
12
+ const textCn = useTextStyles();
13
+ const handleLink = useCallback(event => linkHandler(event, item.url), [item]);
14
+ return isActive ? jsx("span", Object.assign({
15
+ className: styles.itemActive
16
+ }, {
17
+ children: item.title
18
+ }), item.url) : jsx("a", Object.assign({
19
+ href: item.url,
20
+ className: classNames(styles.item, textCn('rs-link', {
21
+ hardness: 'average',
22
+ mode: 'clear'
23
+ })),
24
+ onClick: handleLink,
25
+ target: item.isExternal ? '_blank' : undefined
26
+ }, {
27
+ children: item.title
28
+ }), item.url);
29
+ };
30
+
31
+ const HorizontalMenu = ({
32
+ items,
33
+ activeIndex,
34
+ linkHandler
35
+ }) => {
36
+ const textCn = useTextStyles();
37
+ return jsx("nav", Object.assign({
38
+ 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);
46
+ };
47
+
48
+ export { HorizontalMenu };
@@ -0,0 +1,6 @@
1
+ var styles = {
2
+ "horizontalMenu": "ktl-horizontal-menu-module_horizontal-menu_pB2-S",
3
+ "item": "ktl-horizontal-menu-module_item_yv0RR",
4
+ "itemActive": "ktl-horizontal-menu-module_item-active_Dot-8"
5
+ };
6
+ export { styles as default };
@@ -0,0 +1,224 @@
1
+ :root {
2
+ --ktl-light-grey: #f4f4f4;
3
+ --ktl-dark-100: rgba(39, 40, 44, 1);
4
+ --ktl-dark-bg-hard: rgba(27, 27, 27, 1);
5
+ --ktl-icon-color-dark: rgba(39, 40, 44, 0.75);
6
+ --ktl-color-white-light: rgba(255, 255, 255, 0.75);
7
+ --ktl-transition-xfast: 100ms;
8
+ --ktl-transition-fast: 300ms;
9
+ --ktl-color-primary-light-theme: #7f52ff;
10
+ --ktl-color-dark-40: rgba(39, 40, 44, 0.4);
11
+ --ktl-light-text-hard: rgba(39, 40, 44, 1);
12
+ --ktl-light-dark-20: rgba(39, 40, 44, 0.2);
13
+ --ktl-overlay-z-index: 900;
14
+ --ktl-top-menu-z-index: 905;
15
+ --ktl-header-z-index: 906;
16
+ --ktl-header-height-mobile: 48px;
17
+ --ktl-font-family-inter: Inter, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Droid Sans', 'Helvetica Neue', Arial, sans-serif;
18
+ --rs-font-family-ui: var(--ktl-font-family-inter);
19
+ }
20
+
21
+ .ktl-top-menu-module_top-menu_PRX9X {
22
+ position: relative;
23
+ display: grid;
24
+ grid-template-columns: 1fr;
25
+ grid-auto-flow: column;
26
+ justify-items: stretch;
27
+ align-items: center;
28
+ grid-gap: 32px;
29
+ height: 64px;
30
+ background: #ffffff;
31
+ padding: 0 32px;
32
+ z-index: var(--ktl-top-menu-z-index);
33
+ box-shadow: inset 0 -1px 0 0 var(--ktl-light-dark-20);
34
+ transition: color var(--ktl-transition-fast),
35
+ background-color var(--ktl-transition-fast);
36
+ }
37
+
38
+ .ktl-top-menu-module_top-menu-dark-theme_aNBxr {
39
+ background: #1b1b1b;
40
+ box-shadow: inset 0 -1px 0 0 rgba(255, 255, 255, 0.2);
41
+ }
42
+
43
+ .ktl-top-menu-module_logo_CNH2W {
44
+ text-decoration: none;
45
+ white-space: nowrap;
46
+ justify-self: flex-start;
47
+ }
48
+
49
+ @media (max-width: 640px) {
50
+ .ktl-top-menu-module_top-menu_PRX9X {
51
+ height: 48px;
52
+ padding: 0 16px;
53
+ grid-gap: 16px;
54
+ }
55
+
56
+ .ktl-top-menu-module_logo_CNH2W {
57
+ display: none;
58
+ }
59
+ }
60
+
61
+ .ktl-horizontal-menu-module_horizontal-menu_pB2-S {
62
+ display: grid;
63
+ grid-auto-flow: column;
64
+ gap: 32px;
65
+ }
66
+
67
+ .ktl-horizontal-menu-module_item_yv0RR, .ktl-horizontal-menu-module_item_yv0RR:hover {
68
+ border-bottom: none;
69
+ padding-bottom: 0;
70
+ }
71
+
72
+ .ktl-horizontal-menu-module_item-active_Dot-8 {
73
+ cursor: default;
74
+ color: var(--ktl-color-primary-light-theme);
75
+ }
76
+
77
+ @media (max-width: 640px) {
78
+ .ktl-horizontal-menu-module_horizontal-menu_pB2-S {
79
+ display: none;
80
+ }
81
+ }
82
+
83
+ :root {
84
+ --ktl-light-grey: #f4f4f4;
85
+ --ktl-dark-100: rgba(39, 40, 44, 1);
86
+ --ktl-dark-bg-hard: rgba(27, 27, 27, 1);
87
+ --ktl-icon-color-dark: rgba(39, 40, 44, 0.75);
88
+ --ktl-color-white-light: rgba(255, 255, 255, 0.75);
89
+ --ktl-transition-xfast: 100ms;
90
+ --ktl-transition-fast: 300ms;
91
+ --ktl-color-primary-light-theme: #7f52ff;
92
+ --ktl-color-dark-40: rgba(39, 40, 44, 0.4);
93
+ --ktl-light-text-hard: rgba(39, 40, 44, 1);
94
+ --ktl-light-dark-20: rgba(39, 40, 44, 0.2);
95
+ --ktl-overlay-z-index: 900;
96
+ --ktl-top-menu-z-index: 905;
97
+ --ktl-header-z-index: 906;
98
+ --ktl-header-height-mobile: 48px;
99
+ --ktl-font-family-inter: Inter, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Droid Sans', 'Helvetica Neue', Arial, sans-serif;
100
+ --rs-font-family-ui: var(--ktl-font-family-inter);
101
+ }
102
+
103
+ .ktl-dropdown-menu-module_dropdown-menu_tq2uU {
104
+ display: none;
105
+ height: 100%;
106
+ justify-self: flex-start;
107
+ white-space: nowrap;
108
+ }
109
+
110
+ .ktl-dropdown-menu-module_button_OYsuv {
111
+ border: none;
112
+ background: none;
113
+ height: 100%;
114
+ padding: 0;
115
+ margin: 0;
116
+ display: flex;
117
+ align-items: center;
118
+ justify-content: space-between;
119
+ cursor: pointer;
120
+ }
121
+
122
+ .ktl-dropdown-menu-module_icon_GGhMI {
123
+ width: 12px;
124
+ height: 6px;
125
+ margin-left: 6px;
126
+ transition: transform ease-in-out var(--ktl-transition-xfast);
127
+ }
128
+
129
+ .ktl-dropdown-menu-module_dropdown-list_Ylkvt {
130
+ display: none;
131
+ position: absolute;
132
+ left: 0;
133
+ right: 0;
134
+ background: #ffffff;
135
+ opacity: 0;
136
+ -webkit-animation: ktl-dropdown-menu-module_fadein_MySnq ease-out var(--ktl-transition-fast) forwards;
137
+ animation: ktl-dropdown-menu-module_fadein_MySnq ease-out var(--ktl-transition-fast) forwards;
138
+ }
139
+
140
+ .ktl-dropdown-menu-module_dropdown-item_X3tZ- {
141
+ padding: 8px 16px;
142
+ text-decoration: none;
143
+ transition: color var(--ktl-transition-xfast),
144
+ background-color var(--ktl-transition-xfast);
145
+ }
146
+
147
+ .ktl-dropdown-menu-module_dropdown-item_X3tZ-:hover {
148
+ background: rgba(39, 40, 44, 0.1);
149
+ color: #27282c;
150
+ }
151
+
152
+ .ktl-dropdown-menu-module_dropdown-item_X3tZ-.ktl-dropdown-menu-module_dropdown-item-active_99q9X {
153
+ background: var(--ktl-dark-100);
154
+ color: #ffffff;
155
+ }
156
+
157
+ .ktl-dropdown-menu-module_overlay_segRo {
158
+ display: none;
159
+ position: fixed;
160
+ top: 0;
161
+ right: 0;
162
+ bottom: 0;
163
+ left: 0;
164
+ width: 100%;
165
+ height: 100%;
166
+ opacity: 0;
167
+ background-color: var(--ktl-color-dark-40);
168
+ z-index: var(--ktl-overlay-z-index);
169
+ -webkit-animation: ktl-dropdown-menu-module_fadein_MySnq ease-out var(--ktl-transition-fast) forwards;
170
+ animation: ktl-dropdown-menu-module_fadein_MySnq ease-out var(--ktl-transition-fast) forwards;
171
+ }
172
+
173
+ .ktl-dropdown-menu-module_overlay-visible_MjwEF {
174
+ display: block;
175
+ opacity: 1;
176
+ }
177
+
178
+ .ktl-dropdown-menu-module_dropdown-menu-expanded_EQefy .ktl-dropdown-menu-module_icon_GGhMI {
179
+ transform: scale(1, -1);
180
+ }
181
+
182
+ .ktl-dropdown-menu-module_dropdown-menu-expanded_EQefy .ktl-dropdown-menu-module_dropdown-list_Ylkvt {
183
+ display: flex;
184
+ flex-direction: column;
185
+ opacity: 1;
186
+ }
187
+
188
+ .ktl-dropdown-menu-module_dropdown-list-dark-theme_P60ol {
189
+ background: var(--ktl-dark-bg-hard);
190
+ }
191
+
192
+ .ktl-dropdown-menu-module_dropdown-list-dark-theme_P60ol .ktl-dropdown-menu-module_dropdown-item_X3tZ-:hover {
193
+ background: rgba(255, 255, 255, 0.1);
194
+ color: #ffffff;
195
+ }
196
+
197
+ .ktl-dropdown-menu-module_dropdown-list-dark-theme_P60ol .ktl-dropdown-menu-module_dropdown-item_X3tZ-.ktl-dropdown-menu-module_dropdown-item-active_99q9X {
198
+ color: var(--ktl-light-text-hard);
199
+ background: #ffffff;
200
+ }
201
+
202
+ @media (max-width: 640px) {
203
+ .ktl-dropdown-menu-module_dropdown-menu_tq2uU {
204
+ display: block;
205
+ }
206
+ }
207
+
208
+ @-webkit-keyframes ktl-dropdown-menu-module_fadein_MySnq {
209
+ 0% {
210
+ opacity: 0;
211
+ }
212
+ 100% {
213
+ opacity: 1;
214
+ }
215
+ }
216
+
217
+ @keyframes ktl-dropdown-menu-module_fadein_MySnq {
218
+ 0% {
219
+ opacity: 0;
220
+ }
221
+ 100% {
222
+ opacity: 1;
223
+ }
224
+ }
@@ -0,0 +1,3 @@
1
+ import './index.css';
2
+ import { TopMenu } from './top-menu.js';
3
+ export { TopMenu as default } from './top-menu.js';