@gooddata/sdk-ui-semantic-search 10.8.0-alpha.9 → 10.9.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.
- package/esm/ResultsItem.d.ts +3 -33
- package/esm/ResultsItem.d.ts.map +1 -1
- package/esm/ResultsItem.js +12 -67
- package/esm/ResultsItem.js.map +1 -1
- package/esm/SearchResultsDropdownList.d.ts +4 -3
- package/esm/SearchResultsDropdownList.d.ts.map +1 -1
- package/esm/SearchResultsDropdownList.js +6 -4
- package/esm/SearchResultsDropdownList.js.map +1 -1
- package/esm/SemanticSearch.d.ts.map +1 -1
- package/esm/SemanticSearch.js +23 -7
- package/esm/SemanticSearch.js.map +1 -1
- package/esm/hooks/useListSelector.d.ts +1 -1
- package/esm/hooks/useListSelector.d.ts.map +1 -1
- package/esm/hooks/useListSelector.js +3 -3
- package/esm/hooks/useListSelector.js.map +1 -1
- package/esm/hooks/useSemanticSearch.d.ts +3 -2
- package/esm/hooks/useSemanticSearch.d.ts.map +1 -1
- package/esm/hooks/useSemanticSearch.js +4 -11
- package/esm/hooks/useSemanticSearch.js.map +1 -1
- package/esm/internal/AnnotatedResultsItem.d.ts +5 -0
- package/esm/internal/AnnotatedResultsItem.d.ts.map +1 -0
- package/esm/internal/AnnotatedResultsItem.js +30 -0
- package/esm/internal/AnnotatedResultsItem.js.map +1 -0
- package/esm/internal/HeaderSearchButton.d.ts +12 -3
- package/esm/internal/HeaderSearchButton.d.ts.map +1 -1
- package/esm/internal/HeaderSearchButton.js +5 -3
- package/esm/internal/HeaderSearchButton.js.map +1 -1
- package/esm/internal/HistoryItem.d.ts +8 -0
- package/esm/internal/HistoryItem.d.ts.map +1 -0
- package/esm/internal/HistoryItem.js +21 -0
- package/esm/internal/HistoryItem.js.map +1 -0
- package/esm/internal/SearchList.d.ts +30 -0
- package/esm/internal/SearchList.d.ts.map +1 -0
- package/esm/internal/SearchList.js +16 -0
- package/esm/internal/SearchList.js.map +1 -0
- package/esm/internal/SearchOverlay.d.ts +3 -3
- package/esm/internal/SearchOverlay.d.ts.map +1 -1
- package/esm/internal/SearchOverlay.js +68 -8
- package/esm/internal/SearchOverlay.js.map +1 -1
- package/esm/internal/UpdateDate.d.ts +10 -0
- package/esm/internal/UpdateDate.d.ts.map +1 -0
- package/esm/internal/UpdateDate.js +29 -0
- package/esm/internal/UpdateDate.js.map +1 -0
- package/esm/sdk-ui-semantic-search.d.ts +4 -3
- package/esm/types.d.ts +33 -0
- package/esm/types.d.ts.map +1 -0
- package/esm/types.js +3 -0
- package/esm/types.js.map +1 -0
- package/esm/utils/renderDetails.d.ts +8 -0
- package/esm/utils/renderDetails.d.ts.map +1 -0
- package/esm/utils/renderDetails.js +52 -0
- package/esm/utils/renderDetails.js.map +1 -0
- package/esm/utils/renderItemIcon.d.ts +9 -0
- package/esm/utils/renderItemIcon.d.ts.map +1 -0
- package/esm/utils/renderItemIcon.js +32 -0
- package/esm/utils/renderItemIcon.js.map +1 -0
- package/package.json +7 -7
- package/styles/css/internal.css +58 -16
- package/styles/css/internal.css.map +1 -1
- package/styles/css/main.css +52 -15
- package/styles/css/main.css.map +1 -1
- package/styles/scss/internal.scss +8 -1
- package/styles/scss/main.scss +61 -24
- package/esm/internal/SearchResultsList.d.ts +0 -26
- package/esm/internal/SearchResultsList.d.ts.map +0 -1
- package/esm/internal/SearchResultsList.js +0 -16
- package/esm/internal/SearchResultsList.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sourceRoot":"","sources":["../../node_modules/@gooddata/sdk-ui-kit/styles/scss/mixins.scss","../scss/main.scss","../../node_modules/@gooddata/sdk-ui-kit/styles/scss/variables.scss","../scss/internal.scss"],"names":[],"mappings":"AA0HA;AA4DA;
|
|
1
|
+
{"version":3,"sourceRoot":"","sources":["../../node_modules/@gooddata/sdk-ui-kit/styles/scss/mixins.scss","../scss/main.scss","../../node_modules/@gooddata/sdk-ui-kit/styles/scss/variables.scss","../scss/internal.scss"],"names":[],"mappings":";AA0HA;AA4DA;AC1JI;EAGI;EACA;EACA;EACA;EACA;EACA;EACA,QARc;EASd;;AAEA;EACI;;AAGJ;EACI,OCTI;EDUJ,YC+DY;;AD5DhB;EA1CJ,OA2CsB;EA1CtB,QA0CsB;EAzCtB;EACA;;AAEA;EAEI,OAoCkB;EAnClB,QAmCkB;;AAEd;EA7CR,OA8C0B;EA7C1B,QA6C0B;EA5C1B;EACA;;AAEA;EAEI,OAuCsB;EAtCtB,QAsCsB;;AAItB;EACI;EACA;EACA,OC9BI;ED+BJ;;AAEA;EA3CR;EACA,aA2C8B;EA1C9B;EACA;EACA;;AA2CQ;EACI;EACA;;AAGJ;EApDR;EACA,aAoD8B;EAnD9B;EACA;EACA;;AAoDQ;EAxDR;EACA,aAwD8B;EAvD9B;EACA;EACA;EAsDY,OCvDO;;AD2Df;EACI;EACA;EACA;;AAEA;EACI;;AAGJ;EACI;EACA;EACA;EACA;EACA;;AAEA;EACI;EACA;;AAGJ;EACI;;AAGJ;EACI;EACA;EACA;EACA;EACA,OCzFG;;AD+FX;EACI;;AAGJ;EACI;;;AAMhB;EACI,YCjHa;;;ACRb;EACI;EACA,YDMS;ECLT;;AAGJ;EACI;;AAGJ;EAEI;EACA;EACA;EACA,ODDe;;ACInB;EACI;;AAGJ;EACI;;;AAIR;EACI;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EHwEA;EACA;EACA,eAHwB;;AGnExB;EAEI;;AAGJ;EACI;;;AAIR;EACI;EACA;EACA;;AAEA;EACI;;AAGJ;EACI;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA,aDkBS;ECjBT;EACA;;AAGJ;EACI;;;AAIR;EACI;EACA;EACA;;AAEA;EACI;;;AAIR;EACI;;AAEA;EACI;;AAEA;EACI,aDVM;ECWN","file":"internal.css"}
|
package/styles/css/main.css
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
@charset "UTF-8";
|
|
1
2
|
.gd-semantic-search__results-item {
|
|
2
3
|
display: flex;
|
|
3
4
|
flex-direction: row;
|
|
@@ -5,7 +6,10 @@
|
|
|
5
6
|
cursor: pointer;
|
|
6
7
|
gap: 1em;
|
|
7
8
|
padding: 0 1em;
|
|
8
|
-
height:
|
|
9
|
+
height: 50px;
|
|
10
|
+
text-decoration: none;
|
|
11
|
+
}
|
|
12
|
+
.gd-semantic-search__results-item:hover {
|
|
9
13
|
text-decoration: none;
|
|
10
14
|
}
|
|
11
15
|
.gd-semantic-search__results-item--active {
|
|
@@ -13,32 +17,65 @@
|
|
|
13
17
|
background: var(--gd-palette-complementary-2, #ebeff4);
|
|
14
18
|
}
|
|
15
19
|
.gd-semantic-search__results-item__icon {
|
|
16
|
-
width:
|
|
17
|
-
height:
|
|
20
|
+
width: 32px;
|
|
21
|
+
height: 32px;
|
|
18
22
|
display: flex;
|
|
19
23
|
align-items: center;
|
|
20
24
|
}
|
|
21
25
|
.gd-semantic-search__results-item__icon > svg {
|
|
22
|
-
width:
|
|
23
|
-
height:
|
|
26
|
+
width: 32px;
|
|
27
|
+
height: 32px;
|
|
28
|
+
}
|
|
29
|
+
.gd-semantic-search__results-item__icon--history {
|
|
30
|
+
width: 17px;
|
|
31
|
+
height: 17px;
|
|
32
|
+
display: flex;
|
|
33
|
+
align-items: center;
|
|
34
|
+
}
|
|
35
|
+
.gd-semantic-search__results-item__icon--history > svg {
|
|
36
|
+
width: 17px;
|
|
37
|
+
height: 17px;
|
|
24
38
|
}
|
|
25
39
|
.gd-semantic-search__results-item__text {
|
|
26
40
|
flex-grow: 1;
|
|
27
|
-
min-width: 0;
|
|
28
41
|
font-weight: 400;
|
|
29
|
-
line-height: 1.4rem;
|
|
30
42
|
color: var(--gd-palette-complementary-8, #464e56);
|
|
31
43
|
font-size: 14px;
|
|
44
|
+
}
|
|
45
|
+
.gd-semantic-search__results-item__text--history {
|
|
46
|
+
min-width: 0;
|
|
47
|
+
line-height: 1.4rem;
|
|
48
|
+
overflow: hidden;
|
|
49
|
+
text-overflow: ellipsis;
|
|
50
|
+
white-space: nowrap;
|
|
51
|
+
}
|
|
52
|
+
.gd-semantic-search__results-item__text--result {
|
|
53
|
+
display: flex;
|
|
54
|
+
flex-direction: column;
|
|
55
|
+
}
|
|
56
|
+
.gd-semantic-search__results-item__text__1 {
|
|
57
|
+
min-width: 0;
|
|
58
|
+
line-height: 20px;
|
|
32
59
|
overflow: hidden;
|
|
33
60
|
text-overflow: ellipsis;
|
|
34
61
|
white-space: nowrap;
|
|
35
62
|
}
|
|
63
|
+
.gd-semantic-search__results-item__text__2 {
|
|
64
|
+
min-width: 0;
|
|
65
|
+
line-height: 20px;
|
|
66
|
+
overflow: hidden;
|
|
67
|
+
text-overflow: ellipsis;
|
|
68
|
+
white-space: nowrap;
|
|
69
|
+
color: var(--gd-palette-complementary-6, #94a1ad);
|
|
70
|
+
}
|
|
36
71
|
.gd-semantic-search__results-item__details {
|
|
37
|
-
display: none;
|
|
38
72
|
width: 16px;
|
|
39
73
|
height: 16px;
|
|
40
74
|
align-items: center;
|
|
41
75
|
}
|
|
76
|
+
.gd-semantic-search__results-item__details .gd-ellipsis-text {
|
|
77
|
+
margin: 10px 0 0;
|
|
78
|
+
}
|
|
42
79
|
.gd-semantic-search__results-item__details__contents {
|
|
43
80
|
width: 190px;
|
|
44
81
|
padding: 5px;
|
|
@@ -46,25 +83,25 @@
|
|
|
46
83
|
display: flex;
|
|
47
84
|
flex-direction: column;
|
|
48
85
|
}
|
|
49
|
-
.gd-semantic-search__results-item__details__contents > * {
|
|
50
|
-
margin-bottom: 15px;
|
|
51
|
-
}
|
|
52
86
|
.gd-semantic-search__results-item__details__contents h3 {
|
|
53
87
|
font-size: 14px;
|
|
54
|
-
margin: 0
|
|
88
|
+
margin: 0;
|
|
55
89
|
}
|
|
56
90
|
.gd-semantic-search__results-item__details__contents .gd-ellipsis-text-content {
|
|
57
91
|
font-size: 12px;
|
|
58
92
|
}
|
|
59
93
|
.gd-semantic-search__results-item__details__contents h4 {
|
|
60
|
-
margin: 0;
|
|
94
|
+
margin: 10px 0 0;
|
|
61
95
|
text-transform: uppercase;
|
|
62
96
|
font-size: 10px;
|
|
63
97
|
font-weight: 400;
|
|
64
98
|
color: var(--gd-palette-complementary-6, #94a1ad);
|
|
65
99
|
}
|
|
66
|
-
.gd-semantic-search__results-
|
|
67
|
-
|
|
100
|
+
.gd-semantic-search__results-item__annotation:after {
|
|
101
|
+
content: " • ";
|
|
102
|
+
}
|
|
103
|
+
.gd-semantic-search__results-item__annotation:last-child:after {
|
|
104
|
+
content: "";
|
|
68
105
|
}
|
|
69
106
|
|
|
70
107
|
.gd-semantic-search__bubble.bubble.bubble-light {
|
package/styles/css/main.css.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sourceRoot":"","sources":["../scss/main.scss","../../node_modules/@gooddata/sdk-ui-kit/styles/scss/variables.scss"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"sourceRoot":"","sources":["../scss/main.scss","../../node_modules/@gooddata/sdk-ui-kit/styles/scss/variables.scss"],"names":[],"mappings":";AA4BI;EAGI;EACA;EACA;EACA;EACA;EACA;EACA,QARc;EASd;;AAEA;EACI;;AAGJ;EACI,OCTI;EDUJ,YC+DY;;AD5DhB;EA1CJ,OA2CsB;EA1CtB,QA0CsB;EAzCtB;EACA;;AAEA;EAEI,OAoCkB;EAnClB,QAmCkB;;AAEd;EA7CR,OA8C0B;EA7C1B,QA6C0B;EA5C1B;EACA;;AAEA;EAEI,OAuCsB;EAtCtB,QAsCsB;;AAItB;EACI;EACA;EACA,OC9BI;ED+BJ;;AAEA;EA3CR;EACA,aA2C8B;EA1C9B;EACA;EACA;;AA2CQ;EACI;EACA;;AAGJ;EApDR;EACA,aAoD8B;EAnD9B;EACA;EACA;;AAoDQ;EAxDR;EACA,aAwD8B;EAvD9B;EACA;EACA;EAsDY,OCvDO;;AD2Df;EACI;EACA;EACA;;AAEA;EACI;;AAGJ;EACI;EACA;EACA;EACA;EACA;;AAEA;EACI;EACA;;AAGJ;EACI;;AAGJ;EACI;EACA;EACA;EACA;EACA,OCzFG;;AD+FX;EACI;;AAGJ;EACI;;;AAMhB;EACI,YCjHa","file":"main.css"}
|
|
@@ -19,12 +19,19 @@
|
|
|
19
19
|
|
|
20
20
|
&__overlay-error,
|
|
21
21
|
&__overlay-no-results {
|
|
22
|
-
height: 100px;
|
|
23
22
|
display: flex;
|
|
24
23
|
justify-content: center;
|
|
25
24
|
align-items: center;
|
|
26
25
|
color: kit-variables.$gd-color-state-blank;
|
|
27
26
|
}
|
|
27
|
+
|
|
28
|
+
&__overlay-error {
|
|
29
|
+
padding: 10px 10px 0;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
&__overlay-no-results {
|
|
33
|
+
height: 100px;
|
|
34
|
+
}
|
|
28
35
|
}
|
|
29
36
|
|
|
30
37
|
.gd-header-search {
|
package/styles/scss/main.scss
CHANGED
|
@@ -4,9 +4,30 @@
|
|
|
4
4
|
@use "sass:meta";
|
|
5
5
|
@use "@gooddata/sdk-ui-kit/styles/scss/variables" as kit-variables;
|
|
6
6
|
|
|
7
|
+
@mixin icon($icon_size) {
|
|
8
|
+
width: $icon_size;
|
|
9
|
+
height: $icon_size;
|
|
10
|
+
display: flex;
|
|
11
|
+
align-items: center;
|
|
12
|
+
|
|
13
|
+
> svg {
|
|
14
|
+
// dashboard icon needs explicit size
|
|
15
|
+
width: $icon_size;
|
|
16
|
+
height: $icon_size;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
@mixin ellipsis($line-height) {
|
|
21
|
+
min-width: 0; // A hack to make ellipsis work in flexbox
|
|
22
|
+
line-height: $line-height;
|
|
23
|
+
overflow: hidden;
|
|
24
|
+
text-overflow: ellipsis;
|
|
25
|
+
white-space: nowrap;
|
|
26
|
+
}
|
|
27
|
+
|
|
7
28
|
.gd-semantic-search {
|
|
8
29
|
&__results-item {
|
|
9
|
-
$line-height:
|
|
30
|
+
$line-height: 50px;
|
|
10
31
|
|
|
11
32
|
display: flex;
|
|
12
33
|
flex-direction: row;
|
|
@@ -17,43 +38,57 @@
|
|
|
17
38
|
height: $line-height;
|
|
18
39
|
text-decoration: none;
|
|
19
40
|
|
|
41
|
+
&:hover {
|
|
42
|
+
text-decoration: none;
|
|
43
|
+
}
|
|
44
|
+
|
|
20
45
|
&--active {
|
|
21
46
|
color: kit-variables.$is-focused-color;
|
|
22
47
|
background: kit-variables.$is-focused-background;
|
|
23
48
|
}
|
|
24
49
|
|
|
25
50
|
&__icon {
|
|
26
|
-
|
|
27
|
-
width: $icon_size;
|
|
28
|
-
height: $icon_size;
|
|
29
|
-
display: flex;
|
|
30
|
-
align-items: center;
|
|
51
|
+
@include icon(32px);
|
|
31
52
|
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
width: $icon_size;
|
|
35
|
-
height: $icon_size;
|
|
53
|
+
&--history {
|
|
54
|
+
@include icon(17px);
|
|
36
55
|
}
|
|
37
56
|
}
|
|
38
57
|
|
|
39
58
|
&__text {
|
|
40
59
|
flex-grow: 1;
|
|
41
|
-
min-width: 0; // A hack to make ellipsis work in flexbox
|
|
42
60
|
font-weight: 400;
|
|
43
|
-
line-height: 1.4rem;
|
|
44
61
|
color: kit-variables.$gd-color-text;
|
|
45
62
|
font-size: 14px;
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
63
|
+
|
|
64
|
+
&--history {
|
|
65
|
+
@include ellipsis(1.4rem);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
&--result {
|
|
69
|
+
display: flex;
|
|
70
|
+
flex-direction: column;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
&__1 {
|
|
74
|
+
@include ellipsis(20px);
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
&__2 {
|
|
78
|
+
@include ellipsis(20px);
|
|
79
|
+
color: kit-variables.$gd-color-state-blank;
|
|
80
|
+
}
|
|
49
81
|
}
|
|
50
82
|
|
|
51
83
|
&__details {
|
|
52
|
-
display: none;
|
|
53
84
|
width: 16px;
|
|
54
85
|
height: 16px;
|
|
55
86
|
align-items: center;
|
|
56
87
|
|
|
88
|
+
& .gd-ellipsis-text {
|
|
89
|
+
margin: 10px 0 0;
|
|
90
|
+
}
|
|
91
|
+
|
|
57
92
|
&__contents {
|
|
58
93
|
width: 190px;
|
|
59
94
|
padding: 5px;
|
|
@@ -61,13 +96,9 @@
|
|
|
61
96
|
display: flex;
|
|
62
97
|
flex-direction: column;
|
|
63
98
|
|
|
64
|
-
& > * {
|
|
65
|
-
margin-bottom: 15px;
|
|
66
|
-
}
|
|
67
|
-
|
|
68
99
|
h3 {
|
|
69
100
|
font-size: 14px;
|
|
70
|
-
margin: 0
|
|
101
|
+
margin: 0;
|
|
71
102
|
}
|
|
72
103
|
|
|
73
104
|
.gd-ellipsis-text-content {
|
|
@@ -75,7 +106,7 @@
|
|
|
75
106
|
}
|
|
76
107
|
|
|
77
108
|
h4 {
|
|
78
|
-
margin: 0;
|
|
109
|
+
margin: 10px 0 0;
|
|
79
110
|
text-transform: uppercase;
|
|
80
111
|
font-size: 10px;
|
|
81
112
|
font-weight: 400;
|
|
@@ -84,8 +115,14 @@
|
|
|
84
115
|
}
|
|
85
116
|
}
|
|
86
117
|
|
|
87
|
-
|
|
88
|
-
|
|
118
|
+
&__annotation {
|
|
119
|
+
&:after {
|
|
120
|
+
content: "\0000a0•\0000a0";
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
&:last-child:after {
|
|
124
|
+
content: "";
|
|
125
|
+
}
|
|
89
126
|
}
|
|
90
127
|
}
|
|
91
128
|
}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import { ISemanticSearchResultItemWithUrl } from "@gooddata/sdk-model";
|
|
3
|
-
/**
|
|
4
|
-
* Search results props.
|
|
5
|
-
* @internal
|
|
6
|
-
*/
|
|
7
|
-
export type SearchResultsListProps = {
|
|
8
|
-
/**
|
|
9
|
-
* Search result items.
|
|
10
|
-
*/
|
|
11
|
-
searchResults: ISemanticSearchResultItemWithUrl[];
|
|
12
|
-
/**
|
|
13
|
-
* Width of the list.
|
|
14
|
-
*/
|
|
15
|
-
width: number;
|
|
16
|
-
/**
|
|
17
|
-
* Callback for item selection.
|
|
18
|
-
*/
|
|
19
|
-
onSelect: (item: ISemanticSearchResultItemWithUrl) => void;
|
|
20
|
-
};
|
|
21
|
-
/**
|
|
22
|
-
* A dropdown list with the search results.
|
|
23
|
-
* @internal
|
|
24
|
-
*/
|
|
25
|
-
export declare const SearchResultsList: React.FC<SearchResultsListProps>;
|
|
26
|
-
//# sourceMappingURL=SearchResultsList.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"SearchResultsList.d.ts","sourceRoot":"","sources":["../../src/internal/SearchResultsList.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,gCAAgC,EAAE,MAAM,qBAAqB,CAAC;AAKvE;;;GAGG;AACH,MAAM,MAAM,sBAAsB,GAAG;IACjC;;OAEG;IACH,aAAa,EAAE,gCAAgC,EAAE,CAAC;IAClD;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,QAAQ,EAAE,CAAC,IAAI,EAAE,gCAAgC,KAAK,IAAI,CAAC;CAC9D,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,iBAAiB,EAAE,KAAK,CAAC,EAAE,CAAC,sBAAsB,CAuB9D,CAAC"}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
// (C) 2024 GoodData Corporation
|
|
2
|
-
import * as React from "react";
|
|
3
|
-
import { List } from "@gooddata/sdk-ui-kit";
|
|
4
|
-
import { ITEM_HEIGHT, ResultsItem } from "../ResultsItem.js";
|
|
5
|
-
import { useListSelector } from "../hooks/index.js";
|
|
6
|
-
/**
|
|
7
|
-
* A dropdown list with the search results.
|
|
8
|
-
* @internal
|
|
9
|
-
*/
|
|
10
|
-
export const SearchResultsList = ({ searchResults, width, onSelect }) => {
|
|
11
|
-
const [selected, setSelected] = useListSelector(searchResults, onSelect);
|
|
12
|
-
return (React.createElement(List, { width: width, height: ITEM_HEIGHT * searchResults.length, itemHeight: ITEM_HEIGHT, renderItem: ({ item, width, height }) => {
|
|
13
|
-
return (React.createElement(ResultsItem, { onHover: setSelected, onSelect: onSelect, active: item === selected, item: item, width: width, height: height }));
|
|
14
|
-
}, items: searchResults }));
|
|
15
|
-
};
|
|
16
|
-
//# sourceMappingURL=SearchResultsList.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"SearchResultsList.js","sourceRoot":"","sources":["../../src/internal/SearchResultsList.tsx"],"names":[],"mappings":"AAAA,gCAAgC;AAEhC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAC;AAC5C,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAC7D,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAqBpD;;;GAGG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAqC,CAAC,EAAE,aAAa,EAAE,KAAK,EAAE,QAAQ,EAAE,EAAE,EAAE;IACtG,MAAM,CAAC,QAAQ,EAAE,WAAW,CAAC,GAAG,eAAe,CAAC,aAAa,EAAE,QAAQ,CAAC,CAAC;IAEzE,OAAO,CACH,oBAAC,IAAI,IACD,KAAK,EAAE,KAAK,EACZ,MAAM,EAAE,WAAW,GAAG,aAAa,CAAC,MAAM,EAC1C,UAAU,EAAE,WAAW,EACvB,UAAU,EAAE,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,EAAE,EAAE,EAAE;YACpC,OAAO,CACH,oBAAC,WAAW,IACR,OAAO,EAAE,WAAW,EACpB,QAAQ,EAAE,QAAQ,EAClB,MAAM,EAAE,IAAI,KAAK,QAAQ,EACzB,IAAI,EAAE,IAAI,EACV,KAAK,EAAE,KAAK,EACZ,MAAM,EAAE,MAAM,GAChB,CACL,CAAC;QACN,CAAC,EACD,KAAK,EAAE,aAAa,GACtB,CACL,CAAC;AACN,CAAC,CAAC"}
|