@jetbrains/kotlin-web-site-ui 4.2.0-alpha.0 → 4.2.0-alpha.2

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.
@@ -10,14 +10,14 @@ const NavItem = ({
10
10
  const textCn = useTextStyles();
11
11
  const theme = useTheme();
12
12
  return React__default.createElement("li", {
13
- className: classNames(styles.navItem, {
13
+ className: classNames(styles.navItem, textCn('rs-text-2'), {
14
14
  [styles.navItemDarkTheme]: theme == 'dark'
15
15
  })
16
16
  }, React__default.createElement("a", {
17
17
  target: data.isTargetBlank ? '_blank' : undefined,
18
18
  href: data.url,
19
19
  title: data.title,
20
- className: classNames(textCn('rs-text-2'), textCn('rs-link', {
20
+ className: classNames(textCn('rs-link', {
21
21
  hardness: 'average',
22
22
  mode: 'clear'
23
23
  }))
@@ -87,7 +87,7 @@ const Header = forwardRef(({
87
87
  ref: headerRef,
88
88
  className: classNames(styles.headerMenu, className, {
89
89
  [styles.withMenuPopup]: menuPopupExpanded,
90
- [styles.border]: hasBorder
90
+ [styles.border]: hasBorder || menuPopupExpanded
91
91
  }),
92
92
  "data-test": 'header'
93
93
  }, isMenuPopupVisible && currentTitle && currentUrl && !menuPopupExpanded ? React__default.createElement(LogoSmall, {
@@ -106,7 +106,7 @@ const Header = forwardRef(({
106
106
  items: itemsWithoutHomeSection,
107
107
  theme: dropdownTheme,
108
108
  linkHandler: linkHandler
109
- }), React__default.createElement(SearchButton, {
109
+ }), !menuPopupExpanded && React__default.createElement(SearchButton, {
110
110
  onClick: handleSearchButtonClick,
111
111
  isActive: hasSearch
112
112
  }), isMenuPopupVisible && React__default.createElement(MenuPopup, {
@@ -61,7 +61,7 @@
61
61
 
62
62
  @media (max-width: 640px) {
63
63
  .ktl-header-module_header-menu_wh71L {
64
- padding: 0 16px;
64
+ padding: 0 0 0 16px;
65
65
  height: var(--ktl-header-height-mobile);
66
66
  }
67
67
 
@@ -267,12 +267,13 @@
267
267
  @media (max-width: 640px) {
268
268
  .ktl-search-button-module_button_YHJPv {
269
269
  display: none;
270
- margin: 0 16px 0 0;
271
270
  }
271
+ }
272
272
 
273
- .ktl-search-button-module_button_YHJPv.ktl-search-button-module_active_lUmdh {
274
- display: flex;
275
- }
273
+ @media (min-width: 641px) {
274
+ .ktl-search-button-module_mobileButton_KT2YP {
275
+ display: none;
276
+ }
276
277
  }
277
278
 
278
279
  .ktl-result-module_result_EKhUw {
@@ -708,8 +709,8 @@
708
709
  background: none;
709
710
  padding: 0;
710
711
  margin: 0;
711
- width: 24px;
712
- height: 24px;
712
+ width: var(--ktl-header-height-mobile);
713
+ height: var(--ktl-header-height-mobile);
713
714
  align-items: center;
714
715
  justify-content: center;
715
716
  transition: color var(--ktl-transition-xfast),
@@ -778,7 +779,7 @@
778
779
  .ktl-menu-list-item-module_menu-item-root_Rzcqb:not(a) {
779
780
  font-size: 13px;
780
781
  text-transform: uppercase;
781
- line-height: 28px;
782
+ line-height: 20px;
782
783
  color: rgba(255, 255, 255, 0.7);
783
784
  }
784
785
 
@@ -823,6 +824,7 @@
823
824
  .ktl-logo-small-module_link_SKXAa {
824
825
  color: rgba(255, 255, 255, 1);
825
826
  text-decoration: none;
827
+ font-size: 16px;
826
828
  }
827
829
 
828
830
  .ktl-logo-small-module_icon-wrap_6hRnO {
@@ -831,9 +833,7 @@
831
833
  align-items: center;
832
834
  justify-items: center;
833
835
  height: 100%;
834
- margin-right: 16px;
835
- padding-right: 16px;
836
- border-right: 1px solid rgba(255, 255, 255, 0.2);
836
+ margin-right: 12px;
837
837
  }
838
838
 
839
839
  .ktl-logo-small-module_icon_NyEog {
@@ -20,7 +20,7 @@ const LogoSmall = ({
20
20
  className: styles.icon
21
21
  })), React__default.createElement("a", {
22
22
  href: homeUrl,
23
- className: classNames(styles.link, textCn('rs-h3'))
23
+ className: classNames(styles.link, textCn('rs-h4'))
24
24
  }, homeTitle));
25
25
  };
26
26
 
@@ -1,20 +1,23 @@
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 SvgHamburgerIcon from './hamburger-icon.svg.js';
5
- import SvgCloseIcon from './close-icon.svg.js';
4
+ import Button from '@rescui/button';
5
+ import { CloseIcon, HamburgerIcon } from '@rescui/icons';
6
6
 
7
7
  const MenuButton = ({
8
8
  onClick,
9
9
  isExpanded
10
10
  }) => {
11
- return React__default.createElement("button", {
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
- }, isExpanded ? React__default.createElement(SvgCloseIcon, null) : React__default.createElement(SvgHamburgerIcon, null));
16
+ onClick: onClick,
17
+ size: 'l',
18
+ mode: 'clear',
19
+ icon: isExpanded ? React__default.createElement(CloseIcon, null) : React__default.createElement(HamburgerIcon, null)
20
+ });
18
21
  };
19
22
 
20
23
  export { MenuButton };
@@ -2,13 +2,15 @@ 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';
5
7
  const DATA_TEST_HEADER_SEARCH_BUTTON = 'header-search-button';
6
8
 
7
9
  const SearchButton = ({
8
10
  onClick,
9
11
  isActive
10
12
  }) => {
11
- return React__default.createElement("button", {
13
+ return React__default.createElement(React__default.Fragment, null, React__default.createElement("button", {
12
14
  type: "button",
13
15
  className: classNames(styles.button, {
14
16
  [styles.active]: isActive
@@ -16,7 +18,16 @@ const SearchButton = ({
16
18
  "data-test": DATA_TEST_HEADER_SEARCH_BUTTON,
17
19
  "aria-label": "Search",
18
20
  onClick: onClick
19
- }, React__default.createElement(SvgSearch, null));
21
+ }, React__default.createElement(SvgSearch, null)), React__default.createElement("div", {
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
+ })));
20
31
  };
21
32
 
22
33
  export { DATA_TEST_HEADER_SEARCH_BUTTON, SearchButton };
@@ -1,5 +1,6 @@
1
1
  var styles = {
2
2
  "button": "ktl-search-button-module_button_YHJPv",
3
- "active": "ktl-search-button-module_active_lUmdh"
3
+ "active": "ktl-search-button-module_active_lUmdh",
4
+ "mobileButton": "ktl-search-button-module_mobileButton_KT2YP"
4
5
  };
5
6
  export { styles as default };
@@ -60,6 +60,7 @@ const DropdownMenu = ({
60
60
  className: textCn('rs-text-2')
61
61
  }, title), React__default.createElement(Button, {
62
62
  mode: 'clear',
63
+ size: 'l',
63
64
  icon: React__default.createElement(CloseIcon, null),
64
65
  onClick: handleClick
65
66
  })), _items.map((item, index) => React__default.createElement("a", {
@@ -123,6 +123,7 @@
123
123
  height: 100%;
124
124
  justify-self: flex-start;
125
125
  white-space: nowrap;
126
+ width: 100%;
126
127
  min-width: 0;
127
128
  max-width: 100%;
128
129
  }
@@ -131,12 +132,12 @@
131
132
  border: none;
132
133
  background: none;
133
134
  height: 100%;
135
+ width: 100%;
134
136
  max-width: 100%;
135
137
  padding: 0;
136
138
  margin: 0;
137
139
  display: flex;
138
140
  align-items: center;
139
- justify-content: space-between;
140
141
  cursor: pointer;
141
142
  }
142
143
 
@@ -159,7 +160,7 @@
159
160
  color: #ffffff;
160
161
  align-items: center;
161
162
  height: var(--ktl-header-height-mobile);
162
- padding: 0 16px;
163
+ padding: 0 0 0 16px;
163
164
  border-bottom: 1px solid rgba(255, 255, 255, 0.3);
164
165
  justify-content: space-between;
165
166
  }
@@ -211,7 +212,7 @@
211
212
  }
212
213
 
213
214
  .ktl-dropdown-menu-module_dropdown-list-dark-theme_P60ol {
214
- background: var(--ktl-dark-bg-hard);
215
+ background: rgba(39, 40, 44, 1);
215
216
  }
216
217
 
217
218
  .ktl-dropdown-menu-module_dropdown-list-dark-theme_P60ol .ktl-dropdown-menu-module_dropdown-item_X3tZ-:hover {
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.2.0-alpha.0",
4
+ "version": "4.2.0-alpha.2",
5
5
  "license": "Apache-2.0",
6
6
  "author": "JetBrains",
7
7
  "files": [
@@ -47,7 +47,7 @@
47
47
  "@babel/preset-typescript": "^7.13.0",
48
48
  "@babel/register": "^7.11.5",
49
49
  "@react-hook/resize-observer": "^1.2.5",
50
- "@rescui/button": "^0.2.1",
50
+ "@rescui/button": "^0.6.9",
51
51
  "@rescui/checkbox": "^0.1.0",
52
52
  "@rescui/focus-manager": "^0.1.1",
53
53
  "@rescui/icons": "^0.8.2",
@@ -1,35 +0,0 @@
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 };
@@ -1,35 +0,0 @@
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 };