@jetbrains/kotlin-web-site-ui 4.1.0-alpha.5 → 4.1.0-alpha.6

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.
@@ -407,7 +407,7 @@
407
407
  transform: translateY(100%);
408
408
  }
409
409
 
410
- @media (min-width: 640px) and (max-width: 704px) {
410
+ @media (min-width: 640px) and (max-width: 768px) {
411
411
  .ktl-quick-search-module_wrapper_kkbQQ {
412
412
  bottom: 12px;
413
413
  }
@@ -551,6 +551,32 @@
551
551
  width: 408px;
552
552
  }
553
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
+
554
580
  @media (max-width: 767px) {
555
581
  .ktl-search-box-module_searchBox_0SgE9 {
556
582
  background: var(--ktl-dark-100);
@@ -564,6 +590,12 @@
564
590
  }
565
591
  }
566
592
 
593
+ @media (min-width: 768px) {
594
+ .ktl-search-box-module_searchMobileClose_fBF7e {
595
+ display: none;
596
+ }
597
+ }
598
+
567
599
  :root {
568
600
  --ktl-light-grey: #f4f4f4;
569
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.5",
4
+ "version": "4.1.0-alpha.6",
5
5
  "license": "Apache-2.0",
6
6
  "author": "JetBrains",
7
7
  "files": [