@jetbrains/kotlin-web-site-ui 4.1.0-alpha.4 → 4.1.0-alpha.7

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.
@@ -25,7 +25,8 @@ const FullSearch = ({
25
25
  return React__default.createElement(ThemeProvider, {
26
26
  theme: 'light'
27
27
  }, React__default.createElement("div", {
28
- className: styles.fullSearch
28
+ className: styles.fullSearch,
29
+ tabIndex: 1000
29
30
  }, React__default.createElement("div", {
30
31
  className: styles.header
31
32
  }, React__default.createElement("div", {
@@ -5,7 +5,9 @@ import styles from './loading.module.pcss.js';
5
5
  const FullSearchLoader = () => {
6
6
  return React__default.createElement("div", {
7
7
  className: styles.loader
8
- }, React__default.createElement(LoadingIcon, null));
8
+ }, React__default.createElement(LoadingIcon, {
9
+ size: 'l'
10
+ }));
9
11
  };
10
12
 
11
13
  export { FullSearchLoader };
@@ -27,7 +27,8 @@ const Header = forwardRef(({
27
27
  linkHandler,
28
28
  isPlayground,
29
29
  isUrlActive,
30
- searchConfig
30
+ searchConfig,
31
+ noScrollClassName
31
32
  }, forwardedRef) => {
32
33
  const [menuPopupExpanded, setMenuPopupExpanded] = useState(false);
33
34
  const [isMenuPopupVisible, setIsMenuPopupVisible] = useState(false);
@@ -68,6 +69,15 @@ const Header = forwardRef(({
68
69
  };
69
70
  }
70
71
  }, [fullSearchKeyHandler]);
72
+ useEffect(() => {
73
+ if (typeof document !== `undefined` && noScrollClassName) {
74
+ if (fullSearchActive) {
75
+ document.body.classList.add(noScrollClassName);
76
+ } else {
77
+ document.body.classList.remove(noScrollClassName);
78
+ }
79
+ }
80
+ }, [fullSearchActive]);
71
81
  return React__default.createElement(ThemeProvider, {
72
82
  theme: 'dark'
73
83
  }, React__default.createElement(SearchWrapper, {
@@ -407,7 +407,7 @@
407
407
  transform: translateY(100%);
408
408
  }
409
409
 
410
- @media (min-width: 880px) and (max-width: 1008px) {
410
+ @media (min-width: 640px) and (max-width: 768px) {
411
411
  .ktl-quick-search-module_wrapper_kkbQQ {
412
412
  bottom: 12px;
413
413
  }
@@ -428,7 +428,7 @@
428
428
  top: 0;
429
429
  left: 0;
430
430
  background: #ffffff;
431
- overflow: scroll;
431
+ overflow-y: auto;
432
432
  }
433
433
 
434
434
  .ktl-full-search-module_closeSearch_5vYDG {
@@ -446,7 +446,7 @@
446
446
  .ktl-full-search-module_header_Wltw0 {
447
447
  width: 100%;
448
448
  padding-top: 120px;
449
- padding-bottom: 14px;
449
+ padding-bottom: 10px;
450
450
  position: sticky;
451
451
  top: 0;
452
452
  left: 0;
@@ -463,12 +463,15 @@
463
463
  display: block;
464
464
  }
465
465
  }
466
- .ktl-loading-module_loader_B2IQl > svg {
466
+ .ktl-loading-module_loader_B2IQl {
467
+ margin-top: 4px;
468
+ }
469
+ .ktl-loading-module_loader_B2IQl > svg {
467
470
  fill: #6B57FF;
468
471
  }
469
472
  .ktl-empty-module_wrapper_cNB8Y {
470
473
  display: block;
471
- margin-top: 26px;
474
+ margin-top: 30px;
472
475
  }
473
476
 
474
477
  .ktl-empty-module_title_p2FMj {
@@ -531,6 +534,7 @@
531
534
  .ktl-hit-list-module_switcher_bt6Xx {
532
535
  display: flex;
533
536
  justify-content: flex-end;
537
+ margin-top: 4px;
534
538
  }
535
539
 
536
540
  .ktl-hit-list-module_hitList_1MP6m {
@@ -547,6 +551,32 @@
547
551
  width: 408px;
548
552
  }
549
553
 
554
+ .ktl-search-box-module_searchInput_ba2QS {
555
+ display: flex;
556
+ flex-direction: column;
557
+ width: 100%;
558
+ position: relative;
559
+ }
560
+
561
+ .ktl-search-box-module_searchMobileClose_fBF7e {
562
+ margin: 0;
563
+ padding: 0 8px;
564
+ border: 0;
565
+ background: none;
566
+ cursor: pointer;
567
+ position: absolute;
568
+ right: 0;
569
+ top: 0;
570
+ height: 100%;
571
+ display: flex;
572
+ align-items: center;
573
+ justify-content: center;
574
+ }
575
+
576
+ .ktl-search-box-module_searchMobileClose_fBF7e > svg {
577
+ fill: #ffffff;
578
+ }
579
+
550
580
  @media (max-width: 767px) {
551
581
  .ktl-search-box-module_searchBox_0SgE9 {
552
582
  background: var(--ktl-dark-100);
@@ -560,6 +590,12 @@
560
590
  }
561
591
  }
562
592
 
593
+ @media (min-width: 768px) {
594
+ .ktl-search-box-module_searchMobileClose_fBF7e {
595
+ display: none;
596
+ }
597
+ }
598
+
563
599
  :root {
564
600
  --ktl-light-grey: #f4f4f4;
565
601
  --ktl-dark-100: rgba(39, 40, 44, 1);
@@ -42,6 +42,8 @@ const SearchBox = ({
42
42
  }, [escHandler]);
43
43
  return React__default.createElement("div", {
44
44
  className: styles.searchBox
45
+ }, React__default.createElement("div", {
46
+ className: styles.searchInput
45
47
  }, React__default.createElement(Input, {
46
48
  iconType: 'left',
47
49
  value: searchInput,
@@ -50,7 +52,10 @@ const SearchBox = ({
50
52
  icon: React__default.createElement(SearchIcon, null),
51
53
  clearIcon: isMobile ? React__default.createElement(CloseIcon, null) : React__default.createElement(ErrorIcon, null),
52
54
  autoFocus: true
53
- }), searchInput && React__default.createElement(QuickSearch, {
55
+ }), isMobile && React__default.createElement("button", {
56
+ className: styles.searchMobileClose,
57
+ onClick: closeHandler
58
+ }, React__default.createElement(CloseIcon, null))), searchInput && React__default.createElement(QuickSearch, {
54
59
  results: hits,
55
60
  searchString: searchInput,
56
61
  toggleFullSearch: toggleFullSearch,
@@ -1,4 +1,6 @@
1
1
  var styles = {
2
- "searchBox": "ktl-search-box-module_searchBox_0SgE9"
2
+ "searchBox": "ktl-search-box-module_searchBox_0SgE9",
3
+ "searchInput": "ktl-search-box-module_searchInput_ba2QS",
4
+ "searchMobileClose": "ktl-search-box-module_searchMobileClose_fBF7e"
3
5
  };
4
6
  export { styles as default };
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.1.0-alpha.4",
4
+ "version": "4.1.0-alpha.7",
5
5
  "license": "Apache-2.0",
6
6
  "author": "JetBrains",
7
7
  "files": [