@gooddata/sdk-ui-semantic-search 10.10.0-alpha.2 → 10.10.0-alpha.21
Sign up to get free protection for your applications and to get access to all the features.
- package/esm/ResultsItem.d.ts.map +1 -1
- package/esm/ResultsItem.js +5 -13
- package/esm/ResultsItem.js.map +1 -1
- package/esm/SearchListItem.d.ts +14 -0
- package/esm/SearchListItem.d.ts.map +1 -0
- package/esm/SearchListItem.js +28 -0
- package/esm/SearchListItem.js.map +1 -0
- package/esm/SemanticSearch.d.ts.map +1 -1
- package/esm/SemanticSearch.js +1 -2
- package/esm/SemanticSearch.js.map +1 -1
- package/esm/hooks/useSearchMetrics.d.ts +43 -0
- package/esm/hooks/useSearchMetrics.d.ts.map +1 -0
- package/esm/hooks/useSearchMetrics.js +75 -0
- package/esm/hooks/useSearchMetrics.js.map +1 -0
- package/esm/internal/AnnotatedResultsItem.d.ts +4 -0
- package/esm/internal/AnnotatedResultsItem.d.ts.map +1 -1
- package/esm/internal/AnnotatedResultsItem.js +14 -22
- package/esm/internal/AnnotatedResultsItem.js.map +1 -1
- package/esm/internal/HistoryItem.d.ts +1 -1
- package/esm/internal/HistoryItem.d.ts.map +1 -1
- package/esm/internal/HistoryItem.js +7 -13
- package/esm/internal/HistoryItem.js.map +1 -1
- package/esm/internal/SearchOverlay.d.ts +20 -3
- package/esm/internal/SearchOverlay.d.ts.map +1 -1
- package/esm/internal/SearchOverlay.js +37 -17
- package/esm/internal/SearchOverlay.js.map +1 -1
- package/esm/internal.d.ts +2 -2
- package/esm/internal.d.ts.map +1 -1
- package/esm/internal.js +2 -2
- package/esm/internal.js.map +1 -1
- package/esm/utils/renderItemIcon.d.ts +2 -3
- package/esm/utils/renderItemIcon.d.ts.map +1 -1
- package/esm/utils/renderItemIcon.js +2 -1
- package/esm/utils/renderItemIcon.js.map +1 -1
- package/esm/utils/{renderLoack.d.ts → renderLock.d.ts} +1 -1
- package/esm/utils/renderLock.d.ts.map +1 -0
- package/esm/utils/{renderLoack.js → renderLock.js} +1 -1
- package/esm/utils/renderLock.js.map +1 -0
- package/package.json +7 -7
- package/styles/css/internal.css +34 -106
- package/styles/css/internal.css.map +1 -1
- package/styles/css/main.css +17 -49
- package/styles/css/main.css.map +1 -1
- package/styles/scss/internal.scss +21 -66
- package/styles/scss/main.scss +16 -43
- package/esm/internal/HeaderMobileSearch.d.ts +0 -8
- package/esm/internal/HeaderMobileSearch.d.ts.map +0 -1
- package/esm/internal/HeaderMobileSearch.js +0 -18
- package/esm/internal/HeaderMobileSearch.js.map +0 -1
- package/esm/internal/HeaderSearchButton.d.ts +0 -31
- package/esm/internal/HeaderSearchButton.d.ts.map +0 -1
- package/esm/internal/HeaderSearchButton.js +0 -50
- package/esm/internal/HeaderSearchButton.js.map +0 -1
- package/esm/utils/renderLoack.d.ts.map +0 -1
- package/esm/utils/renderLoack.js.map +0 -1
@@ -1,9 +1,8 @@
|
|
1
|
-
import { ISemanticSearchResultItem } from "@gooddata/sdk-model";
|
2
|
-
import { IIconProps } from "@gooddata/sdk-ui-kit";
|
1
|
+
import { ISemanticSearchResultItem, ITheme } from "@gooddata/sdk-model";
|
3
2
|
import React from "react";
|
4
3
|
import { ListItem } from "../types.js";
|
5
4
|
/**
|
6
5
|
* Pick an icon according to the item type.
|
7
6
|
*/
|
8
|
-
export declare const renderItemIcon: ({ item }: ListItem<ISemanticSearchResultItem>,
|
7
|
+
export declare const renderItemIcon: ({ item }: ListItem<ISemanticSearchResultItem>, theme?: ITheme) => React.JSX.Element;
|
9
8
|
//# sourceMappingURL=renderItemIcon.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"renderItemIcon.d.ts","sourceRoot":"","sources":["../../src/utils/renderItemIcon.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,yBAAyB,EAAE,MAAM,
|
1
|
+
{"version":3,"file":"renderItemIcon.d.ts","sourceRoot":"","sources":["../../src/utils/renderItemIcon.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,yBAAyB,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAExE,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAEvC;;GAEG;AACH,eAAO,MAAM,cAAc,aAAc,SAAS,yBAAyB,CAAC,UAAU,MAAM,sBAuB3F,CAAC"}
|
@@ -4,7 +4,8 @@ import React from "react";
|
|
4
4
|
/**
|
5
5
|
* Pick an icon according to the item type.
|
6
6
|
*/
|
7
|
-
export const renderItemIcon = ({ item },
|
7
|
+
export const renderItemIcon = ({ item }, theme) => {
|
8
|
+
const props = { color: theme?.palette?.complementary?.c5 ?? "#B0BECA" };
|
8
9
|
switch (item.type) {
|
9
10
|
case "dashboard":
|
10
11
|
return React.createElement(Icon.Dashboard, { ...props });
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"renderItemIcon.js","sourceRoot":"","sources":["../../src/utils/renderItemIcon.tsx"],"names":[],"mappings":"AAAA,gCAAgC;AAGhC,OAAO,EAAc,IAAI,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACrE,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B;;GAEG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,EAAE,IAAI,EAAuC,EAAE,
|
1
|
+
{"version":3,"file":"renderItemIcon.js","sourceRoot":"","sources":["../../src/utils/renderItemIcon.tsx"],"names":[],"mappings":"AAAA,gCAAgC;AAGhC,OAAO,EAAc,IAAI,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACrE,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B;;GAEG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,EAAE,IAAI,EAAuC,EAAE,KAAc,EAAE,EAAE;IAC5F,MAAM,KAAK,GAAe,EAAE,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE,aAAa,EAAE,EAAE,IAAI,SAAS,EAAE,CAAC;IAEpF,QAAQ,IAAI,CAAC,IAAI,EAAE,CAAC;QAChB,KAAK,WAAW;YACZ,OAAO,oBAAC,IAAI,CAAC,SAAS,OAAK,KAAK,GAAI,CAAC;QACzC,KAAK,eAAe;YAChB,OAAO,oBAAC,WAAW,IAAC,gBAAgB,EAAE,IAAI,CAAC,gBAAgB,EAAE,SAAS,EAAE,KAAK,GAAI,CAAC;QACtF,KAAK,SAAS;YACV,OAAO,oBAAC,IAAI,CAAC,OAAO,OAAK,KAAK,GAAI,CAAC;QACvC,KAAK,WAAW;YACZ,OAAO,oBAAC,IAAI,CAAC,SAAS,OAAK,KAAK,GAAI,CAAC;QACzC,KAAK,OAAO;YACR,OAAO,oBAAC,IAAI,CAAC,KAAK,OAAK,KAAK,GAAI,CAAC;QACrC,KAAK,MAAM;YACP,OAAO,oBAAC,IAAI,CAAC,IAAI,OAAK,KAAK,GAAI,CAAC;QACpC,KAAK,QAAQ;YACT,OAAO,oBAAC,IAAI,CAAC,MAAM,OAAK,KAAK,GAAI,CAAC;QACtC,KAAK,MAAM;YACP,OAAO,oBAAC,IAAI,CAAC,IAAI,OAAK,KAAK,GAAI,CAAC;QACpC;YACI,OAAO,eAAe,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAC1C,CAAC;AACL,CAAC,CAAC;AAEF,MAAM,eAAe,GAAG,CAAC,IAAW,EAAS,EAAE;IAC3C,MAAM,IAAI,KAAK,CAAC,sBAAsB,IAAI,EAAE,CAAC,CAAC;AAClD,CAAC,CAAC"}
|
@@ -2,4 +2,4 @@ import * as React from "react";
|
|
2
2
|
import { ISemanticSearchResultItem } from "@gooddata/sdk-model";
|
3
3
|
import { ListItem } from "../types.js";
|
4
4
|
export declare const renderLock: (listItem: ListItem<ISemanticSearchResultItem>) => React.JSX.Element | null;
|
5
|
-
//# sourceMappingURL=
|
5
|
+
//# sourceMappingURL=renderLock.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"renderLock.d.ts","sourceRoot":"","sources":["../../src/utils/renderLock.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,yBAAyB,EAAE,MAAM,qBAAqB,CAAC;AAEhE,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAEvC,eAAO,MAAM,UAAU,aAAc,SAAS,yBAAyB,CAAC,6BAIvE,CAAC"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"renderLock.js","sourceRoot":"","sources":["../../src/utils/renderLock.tsx"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAC;AAG5C,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,QAA6C,EAAE,EAAE;IACxE,IAAI,CAAC,QAAQ,CAAC,QAAQ;QAAE,OAAO,IAAI,CAAC;IAEpC,OAAO,oBAAC,IAAI,CAAC,IAAI,IAAC,SAAS,EAAC,mDAAmD,GAAG,CAAC;AACvF,CAAC,CAAC"}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@gooddata/sdk-ui-semantic-search",
|
3
|
-
"version": "10.10.0-alpha.
|
3
|
+
"version": "10.10.0-alpha.21",
|
4
4
|
"description": "GoodData SDK TypeScript & React skeleton",
|
5
5
|
"repository": {
|
6
6
|
"type": "git",
|
@@ -37,11 +37,11 @@
|
|
37
37
|
"react-intl": "^6.4.1",
|
38
38
|
"tslib": "^2.5.0",
|
39
39
|
"classnames": "^2.3.1",
|
40
|
-
"@gooddata/sdk-
|
41
|
-
"@gooddata/sdk-ui
|
42
|
-
"@gooddata/sdk-
|
43
|
-
"@gooddata/sdk-ui-theme-provider": "10.10.0-alpha.
|
44
|
-
"@gooddata/sdk-
|
40
|
+
"@gooddata/sdk-model": "10.10.0-alpha.21",
|
41
|
+
"@gooddata/sdk-ui": "10.10.0-alpha.21",
|
42
|
+
"@gooddata/sdk-ui-kit": "10.10.0-alpha.21",
|
43
|
+
"@gooddata/sdk-ui-theme-provider": "10.10.0-alpha.21",
|
44
|
+
"@gooddata/sdk-backend-spi": "10.10.0-alpha.21"
|
45
45
|
},
|
46
46
|
"peerDependencies": {
|
47
47
|
"react": "^16.10.0 || ^17.0.0 || ^18.0.0",
|
@@ -83,7 +83,7 @@
|
|
83
83
|
"stylelint": "^13.8.0",
|
84
84
|
"stylelint-checkstyle-formatter": "^0.1.2",
|
85
85
|
"stylelint-config-prettier": "^8.0.2",
|
86
|
-
"@gooddata/sdk-backend-mockingbird": "10.10.0-alpha.
|
86
|
+
"@gooddata/sdk-backend-mockingbird": "10.10.0-alpha.21"
|
87
87
|
},
|
88
88
|
"scripts": {
|
89
89
|
"clean": "rm -rf ci dist esm coverage *.log styles/css tsconfig.tsbuildinfo",
|
package/styles/css/internal.css
CHANGED
@@ -19,63 +19,38 @@
|
|
19
19
|
background: var(--gd-palette-complementary-2, #ebeff4);
|
20
20
|
}
|
21
21
|
.gd-semantic-search__results-item__icon {
|
22
|
-
width:
|
23
|
-
height:
|
22
|
+
width: 26px;
|
23
|
+
height: 26px;
|
24
24
|
display: flex;
|
25
25
|
align-items: center;
|
26
26
|
}
|
27
27
|
.gd-semantic-search__results-item__icon > svg {
|
28
|
-
width:
|
29
|
-
height:
|
30
|
-
}
|
31
|
-
.gd-semantic-search__results-item__icon--history {
|
32
|
-
width: 17px;
|
33
|
-
height: 17px;
|
34
|
-
display: flex;
|
35
|
-
align-items: center;
|
36
|
-
}
|
37
|
-
.gd-semantic-search__results-item__icon--history > svg {
|
38
|
-
width: 17px;
|
39
|
-
height: 17px;
|
28
|
+
width: 26px;
|
29
|
+
height: 26px;
|
40
30
|
}
|
41
31
|
.gd-semantic-search__results-item__text {
|
42
|
-
flex
|
43
|
-
font-weight: 400;
|
44
|
-
color: var(--gd-palette-complementary-8, #464e56);
|
45
|
-
font-size: 14px;
|
46
|
-
}
|
47
|
-
.gd-semantic-search__results-item__text--history {
|
32
|
+
flex: 1;
|
48
33
|
min-width: 0;
|
49
|
-
line-height: 1.4rem;
|
50
|
-
overflow: hidden;
|
51
|
-
text-overflow: ellipsis;
|
52
|
-
white-space: nowrap;
|
53
|
-
}
|
54
|
-
.gd-semantic-search__results-item__text--result {
|
55
34
|
display: flex;
|
56
35
|
flex-direction: column;
|
36
|
+
font-weight: 400;
|
37
|
+
color: var(--gd-palette-complementary-8, #464e56);
|
38
|
+
font-size: 14px;
|
39
|
+
line-height: 20px;
|
57
40
|
}
|
58
|
-
.gd-semantic-search__results-
|
41
|
+
.gd-semantic-search__results-item__text__row {
|
59
42
|
display: flex;
|
60
43
|
flex-direction: row;
|
61
|
-
|
62
|
-
gap: 0.3em;
|
63
|
-
min-width: 0;
|
64
|
-
line-height: 20px;
|
65
|
-
overflow: hidden;
|
66
|
-
text-overflow: ellipsis;
|
67
|
-
white-space: nowrap;
|
44
|
+
gap: 5px;
|
68
45
|
}
|
69
|
-
.gd-semantic-search__results-
|
70
|
-
min-width: 0;
|
71
|
-
line-height: 20px;
|
72
|
-
overflow: hidden;
|
73
|
-
text-overflow: ellipsis;
|
74
|
-
white-space: nowrap;
|
46
|
+
.gd-semantic-search__results-item__text__row:not(:first-child) {
|
75
47
|
color: var(--gd-palette-complementary-6, #94a1ad);
|
76
48
|
}
|
77
|
-
.gd-semantic-search__results-
|
78
|
-
|
49
|
+
.gd-semantic-search__results-item__text__ellipsis {
|
50
|
+
white-space: nowrap;
|
51
|
+
overflow: hidden;
|
52
|
+
text-overflow: ellipsis;
|
53
|
+
flex-shrink: 1;
|
79
54
|
}
|
80
55
|
.gd-semantic-search__results-item__details {
|
81
56
|
width: 16px;
|
@@ -115,12 +90,6 @@
|
|
115
90
|
text-transform: none;
|
116
91
|
font-size: 12px;
|
117
92
|
}
|
118
|
-
.gd-semantic-search__results-item__annotation:after {
|
119
|
-
content: " • ";
|
120
|
-
}
|
121
|
-
.gd-semantic-search__results-item__annotation:last-child:after {
|
122
|
-
content: "";
|
123
|
-
}
|
124
93
|
|
125
94
|
.gd-semantic-search__bubble.bubble.bubble-light {
|
126
95
|
background: var(--gd-palette-complementary-0, #fff);
|
@@ -130,10 +99,10 @@
|
|
130
99
|
background: var(--gd-palette-complementary-0, #fff);
|
131
100
|
margin: 10px 0;
|
132
101
|
}
|
133
|
-
.gd-semantic-search__overlay
|
102
|
+
.gd-header-search-dropdown .gd-semantic-search__overlay {
|
134
103
|
width: 440px;
|
135
104
|
}
|
136
|
-
.gd-semantic-search__overlay
|
105
|
+
.gd-header-menu-search .gd-semantic-search__overlay .gd-semantic-search__overlay-input {
|
137
106
|
margin-bottom: 10px;
|
138
107
|
}
|
139
108
|
.gd-semantic-search__overlay-input {
|
@@ -151,66 +120,25 @@
|
|
151
120
|
.gd-semantic-search__overlay-no-results {
|
152
121
|
height: 100px;
|
153
122
|
}
|
154
|
-
|
155
|
-
|
156
|
-
height:
|
157
|
-
|
158
|
-
|
159
|
-
opacity: 0.8;
|
160
|
-
cursor: pointer;
|
161
|
-
transition: all 0.2s;
|
162
|
-
font-size: 14px;
|
163
|
-
font-weight: 400;
|
164
|
-
position: relative;
|
165
|
-
box-sizing: border-box;
|
166
|
-
padding: 0 34px 2px 13px;
|
167
|
-
overflow: hidden;
|
168
|
-
white-space: nowrap;
|
169
|
-
text-overflow: ellipsis;
|
170
|
-
}
|
171
|
-
.gd-header-search:hover, .gd-header-search.is-open {
|
172
|
-
opacity: 1;
|
173
|
-
}
|
174
|
-
.gd-header-search::after {
|
175
|
-
content: "\e612";
|
176
|
-
position: absolute;
|
177
|
-
top: 0;
|
178
|
-
right: 11px;
|
179
|
-
margin-left: 11px;
|
180
|
-
width: 12px;
|
181
|
-
opacity: 0.5;
|
182
|
-
text-align: center;
|
183
|
-
font-family: "Indigo", sans-serif;
|
184
|
-
font-size: 18px;
|
185
|
-
font-weight: 700;
|
186
|
-
}
|
187
|
-
.gd-header-search.is-open::after {
|
188
|
-
content: "\e613";
|
189
|
-
}
|
190
|
-
.gd-header-search:hover {
|
191
|
-
background: rgba(255, 255, 255, 0.3);
|
192
|
-
}
|
193
|
-
.gd-header-search.is-open {
|
194
|
-
background-color: rgba(255, 255, 255, 0.3);
|
195
|
-
}
|
196
|
-
.gd-header-search-dropdown {
|
197
|
-
overflow: hidden;
|
123
|
+
.gd-semantic-search__results-item--history .gd-semantic-search__results-item__icon {
|
124
|
+
width: 17px;
|
125
|
+
height: 17px;
|
126
|
+
display: flex;
|
127
|
+
align-items: center;
|
198
128
|
}
|
199
|
-
.gd-
|
200
|
-
|
129
|
+
.gd-semantic-search__results-item--history .gd-semantic-search__results-item__icon > svg {
|
130
|
+
width: 17px;
|
131
|
+
height: 17px;
|
201
132
|
}
|
202
|
-
.gd-
|
203
|
-
|
204
|
-
font-weight: 400;
|
133
|
+
.gd-semantic-search__results-item__text__lock-icon {
|
134
|
+
width: 14px;
|
205
135
|
}
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
opacity: 0.8;
|
210
|
-
margin-right: 6px;
|
136
|
+
.gd-semantic-search__results-item__text__lock-icon svg {
|
137
|
+
width: 14px;
|
138
|
+
height: 14px;
|
211
139
|
}
|
212
|
-
.gd-
|
213
|
-
content: "
|
140
|
+
.gd-semantic-search__results-item__text__row:not(:first-child) :not(:first-child):before {
|
141
|
+
content: "• ";
|
214
142
|
}
|
215
143
|
|
216
144
|
/*# sourceMappingURL=internal.css.map */
|
@@ -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;AClKI;EAGI;EACA;EACA;EACA;EACA;EACA;EACA,QARc;EASd;;AAEA;EACI;;AAGJ;EACI,OCDI;EDEJ,YCuEY;;ADpEhB;EAlCJ,OAmCsB;EAlCtB,QAkCsB;EAjCtB;EACA;;AAEA;EAEI,OA4BkB;EA3BlB,QA2BkB;;AAGlB;EACI;EACA;EACA;EACA;EACA;EACA,OCrBI;EDsBJ;EACA;;AAEA;EACI;EACA;EACA;;AAEA;EACI,OCtCG;;AD0CX;EACI;EACA;EACA;EACA;;AAIR;EACI;EACA;EACA;;AAEA;EACI;;AAGJ;EACI;EACA;EACA;EACA;EACA;;AAEA;EACI;EACA;;AAGJ;EACI;;AAGJ;EACI;EACA;EACA;EACA;EACA,OChFG;;ADmFP;EACI;EACA;EACA;;AAIA;EACI;EACA;;;AAQxB;EACI,YC3Ga;;;ACRb;EACI,YDOS;ECNT;;AAGA;EACI;;AAKA;EACI;;AAKZ;EACI;;AAGJ;EAEI;EACA;EACA;EACA,ODZe;;ACenB;EACI;;AAGJ;EACI;;AAIA;EFxCJ,OEyC2B;EFxC3B,QEwC2B;EFvC3B;EACA;;AAEA;EAEI,OEkCuB;EFjCvB,QEiCuB;;AAInB;EACI;;AAEA;EACI;EACA;;AAKJ;EACI","file":"internal.css"}
|
package/styles/css/main.css
CHANGED
@@ -1,4 +1,3 @@
|
|
1
|
-
@charset "UTF-8";
|
2
1
|
.gd-semantic-search__results-item {
|
3
2
|
display: flex;
|
4
3
|
flex-direction: row;
|
@@ -17,63 +16,38 @@
|
|
17
16
|
background: var(--gd-palette-complementary-2, #ebeff4);
|
18
17
|
}
|
19
18
|
.gd-semantic-search__results-item__icon {
|
20
|
-
width:
|
21
|
-
height:
|
19
|
+
width: 26px;
|
20
|
+
height: 26px;
|
22
21
|
display: flex;
|
23
22
|
align-items: center;
|
24
23
|
}
|
25
24
|
.gd-semantic-search__results-item__icon > svg {
|
26
|
-
width:
|
27
|
-
height:
|
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;
|
25
|
+
width: 26px;
|
26
|
+
height: 26px;
|
38
27
|
}
|
39
28
|
.gd-semantic-search__results-item__text {
|
40
|
-
flex
|
41
|
-
font-weight: 400;
|
42
|
-
color: var(--gd-palette-complementary-8, #464e56);
|
43
|
-
font-size: 14px;
|
44
|
-
}
|
45
|
-
.gd-semantic-search__results-item__text--history {
|
29
|
+
flex: 1;
|
46
30
|
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
31
|
display: flex;
|
54
32
|
flex-direction: column;
|
33
|
+
font-weight: 400;
|
34
|
+
color: var(--gd-palette-complementary-8, #464e56);
|
35
|
+
font-size: 14px;
|
36
|
+
line-height: 20px;
|
55
37
|
}
|
56
|
-
.gd-semantic-search__results-
|
38
|
+
.gd-semantic-search__results-item__text__row {
|
57
39
|
display: flex;
|
58
40
|
flex-direction: row;
|
59
|
-
|
60
|
-
gap: 0.3em;
|
61
|
-
min-width: 0;
|
62
|
-
line-height: 20px;
|
63
|
-
overflow: hidden;
|
64
|
-
text-overflow: ellipsis;
|
65
|
-
white-space: nowrap;
|
41
|
+
gap: 5px;
|
66
42
|
}
|
67
|
-
.gd-semantic-search__results-
|
68
|
-
min-width: 0;
|
69
|
-
line-height: 20px;
|
70
|
-
overflow: hidden;
|
71
|
-
text-overflow: ellipsis;
|
72
|
-
white-space: nowrap;
|
43
|
+
.gd-semantic-search__results-item__text__row:not(:first-child) {
|
73
44
|
color: var(--gd-palette-complementary-6, #94a1ad);
|
74
45
|
}
|
75
|
-
.gd-semantic-search__results-
|
76
|
-
|
46
|
+
.gd-semantic-search__results-item__text__ellipsis {
|
47
|
+
white-space: nowrap;
|
48
|
+
overflow: hidden;
|
49
|
+
text-overflow: ellipsis;
|
50
|
+
flex-shrink: 1;
|
77
51
|
}
|
78
52
|
.gd-semantic-search__results-item__details {
|
79
53
|
width: 16px;
|
@@ -113,12 +87,6 @@
|
|
113
87
|
text-transform: none;
|
114
88
|
font-size: 12px;
|
115
89
|
}
|
116
|
-
.gd-semantic-search__results-item__annotation:after {
|
117
|
-
content: " • ";
|
118
|
-
}
|
119
|
-
.gd-semantic-search__results-item__annotation:last-child:after {
|
120
|
-
content: "";
|
121
|
-
}
|
122
90
|
|
123
91
|
.gd-semantic-search__bubble.bubble.bubble-light {
|
124
92
|
background: var(--gd-palette-complementary-0, #fff);
|
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":"AAoBI;EAGI;EACA;EACA;EACA;EACA;EACA;EACA,QARc;EASd;;AAEA;EACI;;AAGJ;EACI,OCDI;EDEJ,YCuEY;;ADpEhB;EAlCJ,OAmCsB;EAlCtB,QAkCsB;EAjCtB;EACA;;AAEA;EAEI,OA4BkB;EA3BlB,QA2BkB;;AAGlB;EACI;EACA;EACA;EACA;EACA;EACA,OCrBI;EDsBJ;EACA;;AAEA;EACI;EACA;EACA;;AAEA;EACI,OCtCG;;AD0CX;EACI;EACA;EACA;EACA;;AAIR;EACI;EACA;EACA;;AAEA;EACI;;AAGJ;EACI;EACA;EACA;EACA;EACA;;AAEA;EACI;EACA;;AAGJ;EACI;;AAGJ;EACI;EACA;EACA;EACA;EACA,OChFG;;ADmFP;EACI;EACA;EACA;;AAIA;EACI;EACA;;;AAQxB;EACI,YC3Ga","file":"main.css"}
|
@@ -4,18 +4,20 @@
|
|
4
4
|
@use "sass:meta";
|
5
5
|
@use "@gooddata/sdk-ui-kit/styles/scss/variables" as kit-variables;
|
6
6
|
@use "@gooddata/sdk-ui-kit/styles/scss/mixins" as kit-mixins;
|
7
|
-
@use "./main.scss";
|
7
|
+
@use "./main.scss" as main;
|
8
8
|
|
9
9
|
.gd-semantic-search {
|
10
10
|
&__overlay {
|
11
11
|
background: kit-variables.$gd-color-white;
|
12
12
|
margin: 10px 0;
|
13
13
|
|
14
|
-
|
14
|
+
// Desktop view
|
15
|
+
.gd-header-search-dropdown & {
|
15
16
|
width: 440px;
|
16
17
|
}
|
17
18
|
|
18
|
-
|
19
|
+
// Mobile view
|
20
|
+
.gd-header-menu-search & {
|
19
21
|
.gd-semantic-search__overlay-input {
|
20
22
|
margin-bottom: 10px;
|
21
23
|
}
|
@@ -41,74 +43,27 @@
|
|
41
43
|
&__overlay-no-results {
|
42
44
|
height: 100px;
|
43
45
|
}
|
44
|
-
}
|
45
|
-
|
46
|
-
.gd-header-search {
|
47
|
-
height: 100%;
|
48
|
-
margin: 0;
|
49
|
-
line-height: 42px;
|
50
|
-
opacity: 0.8;
|
51
|
-
cursor: pointer;
|
52
|
-
transition: all 0.2s;
|
53
|
-
font-size: 14px;
|
54
|
-
font-weight: 400;
|
55
|
-
position: relative;
|
56
|
-
box-sizing: border-box;
|
57
|
-
padding: 0 34px 2px 13px;
|
58
|
-
|
59
|
-
@include kit-mixins.text-overflow;
|
60
|
-
|
61
|
-
&:hover,
|
62
|
-
&.is-open {
|
63
|
-
opacity: 1;
|
64
|
-
}
|
65
|
-
|
66
|
-
&::after {
|
67
|
-
content: "\e612";
|
68
|
-
position: absolute;
|
69
|
-
top: 0;
|
70
|
-
right: 11px;
|
71
|
-
margin-left: 11px;
|
72
|
-
width: 12px;
|
73
|
-
opacity: 0.5;
|
74
|
-
text-align: center;
|
75
|
-
font-family: kit-variables.$gd-font-indigo;
|
76
|
-
font-size: 18px;
|
77
|
-
font-weight: 700;
|
78
|
-
}
|
79
|
-
|
80
|
-
&.is-open::after {
|
81
|
-
content: "\e613";
|
82
|
-
}
|
83
46
|
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
&.is-open {
|
89
|
-
background-color: rgba(255, 255, 255, 0.3);
|
90
|
-
}
|
47
|
+
&__results-item {
|
48
|
+
&--history &__icon {
|
49
|
+
@include main.icon(17px);
|
50
|
+
}
|
91
51
|
|
92
|
-
|
93
|
-
|
52
|
+
&__text {
|
53
|
+
&__lock-icon {
|
54
|
+
width: 14px;
|
94
55
|
|
95
|
-
|
96
|
-
|
56
|
+
& svg {
|
57
|
+
width: 14px;
|
58
|
+
height: 14px;
|
59
|
+
}
|
60
|
+
}
|
97
61
|
|
98
|
-
|
99
|
-
|
100
|
-
|
62
|
+
&__row:not(:first-child) {
|
63
|
+
:not(:first-child):before {
|
64
|
+
content: "•\0000a0";
|
65
|
+
}
|
101
66
|
}
|
102
67
|
}
|
103
68
|
}
|
104
69
|
}
|
105
|
-
|
106
|
-
.gd-icon-header-search-button {
|
107
|
-
vertical-align: middle;
|
108
|
-
opacity: 0.8;
|
109
|
-
margin-right: 6px;
|
110
|
-
|
111
|
-
&::before {
|
112
|
-
content: "\e62b";
|
113
|
-
}
|
114
|
-
}
|
package/styles/scss/main.scss
CHANGED
@@ -17,14 +17,6 @@
|
|
17
17
|
}
|
18
18
|
}
|
19
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
|
-
|
28
20
|
.gd-semantic-search {
|
29
21
|
&__results-item {
|
30
22
|
$line-height: 50px;
|
@@ -48,43 +40,34 @@
|
|
48
40
|
}
|
49
41
|
|
50
42
|
&__icon {
|
51
|
-
@include icon(
|
52
|
-
|
53
|
-
&--history {
|
54
|
-
@include icon(17px);
|
55
|
-
}
|
43
|
+
@include icon(26px);
|
56
44
|
}
|
57
45
|
|
58
46
|
&__text {
|
59
|
-
flex
|
47
|
+
flex: 1;
|
48
|
+
min-width: 0; // A hack to make ellipsis work in flexbox
|
49
|
+
display: flex;
|
50
|
+
flex-direction: column;
|
60
51
|
font-weight: 400;
|
61
52
|
color: kit-variables.$gd-color-text;
|
62
53
|
font-size: 14px;
|
54
|
+
line-height: 20px;
|
63
55
|
|
64
|
-
|
65
|
-
@include ellipsis(1.4rem);
|
66
|
-
}
|
67
|
-
|
68
|
-
&--result {
|
69
|
-
display: flex;
|
70
|
-
flex-direction: column;
|
71
|
-
}
|
72
|
-
|
73
|
-
&__1 {
|
56
|
+
&__row {
|
74
57
|
display: flex;
|
75
58
|
flex-direction: row;
|
76
|
-
|
77
|
-
gap: 0.3em;
|
78
|
-
@include ellipsis(20px);
|
79
|
-
}
|
59
|
+
gap: 5px;
|
80
60
|
|
81
|
-
|
82
|
-
|
83
|
-
|
61
|
+
&:not(:first-child) {
|
62
|
+
color: kit-variables.$gd-color-state-blank;
|
63
|
+
}
|
84
64
|
}
|
85
65
|
|
86
|
-
&
|
87
|
-
|
66
|
+
&__ellipsis {
|
67
|
+
white-space: nowrap;
|
68
|
+
overflow: hidden;
|
69
|
+
text-overflow: ellipsis;
|
70
|
+
flex-shrink: 1;
|
88
71
|
}
|
89
72
|
}
|
90
73
|
|
@@ -135,16 +118,6 @@
|
|
135
118
|
}
|
136
119
|
}
|
137
120
|
}
|
138
|
-
|
139
|
-
&__annotation {
|
140
|
-
&:after {
|
141
|
-
content: "\0000a0•\0000a0";
|
142
|
-
}
|
143
|
-
|
144
|
-
&:last-child:after {
|
145
|
-
content: "";
|
146
|
-
}
|
147
|
-
}
|
148
121
|
}
|
149
122
|
}
|
150
123
|
|
@@ -1,8 +0,0 @@
|
|
1
|
-
import * as React from "react";
|
2
|
-
import { HeaderSearchButtonProps } from "./HeaderSearchButton.js";
|
3
|
-
/**
|
4
|
-
* A version of the search overlay that is optimized for mobile devices.
|
5
|
-
* @internal
|
6
|
-
*/
|
7
|
-
export declare const HeaderMobileSearch: ({ locale, ...props }: HeaderSearchButtonProps) => React.JSX.Element;
|
8
|
-
//# sourceMappingURL=HeaderMobileSearch.d.ts.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"HeaderMobileSearch.d.ts","sourceRoot":"","sources":["../../src/internal/HeaderMobileSearch.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAA+B,uBAAuB,EAAE,MAAM,yBAAyB,CAAC;AAwB/F;;;GAGG;AACH,eAAO,MAAM,kBAAkB,yBAA0B,uBAAuB,sBAI/E,CAAC"}
|
@@ -1,18 +0,0 @@
|
|
1
|
-
// (C) 2007-2024 GoodData Corporation
|
2
|
-
import * as React from "react";
|
3
|
-
import { SearchOverlay } from "./SearchOverlay.js";
|
4
|
-
import { MetadataTimezoneProvider } from "./metadataTimezoneContext.js";
|
5
|
-
import { injectIntl } from "react-intl";
|
6
|
-
import { IntlWrapper } from "@gooddata/sdk-ui";
|
7
|
-
const HeaderMobileSearchCore = ({ onSelect, metadataTimezone, ...overlayProps }) => {
|
8
|
-
return (React.createElement(MetadataTimezoneProvider, { value: metadataTimezone },
|
9
|
-
React.createElement(SearchOverlay, { onSelect: onSelect, className: "gd-semantic-search__overlay--mobile", ...overlayProps })));
|
10
|
-
};
|
11
|
-
const HeaderMobileSearchWithIntl = injectIntl(HeaderMobileSearchCore);
|
12
|
-
/**
|
13
|
-
* A version of the search overlay that is optimized for mobile devices.
|
14
|
-
* @internal
|
15
|
-
*/
|
16
|
-
export const HeaderMobileSearch = ({ locale, ...props }) => (React.createElement(IntlWrapper, { locale: locale },
|
17
|
-
React.createElement(HeaderMobileSearchWithIntl, { ...props })));
|
18
|
-
//# sourceMappingURL=HeaderMobileSearch.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"HeaderMobileSearch.js","sourceRoot":"","sources":["../../src/internal/HeaderMobileSearch.tsx"],"names":[],"mappings":"AAAA,qCAAqC;AACrC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,EAAE,wBAAwB,EAAE,MAAM,8BAA8B,CAAC;AACxE,OAAO,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AACxC,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAE/C,MAAM,sBAAsB,GAA0C,CAAC,EACnE,QAAQ,EACR,gBAAgB,EAChB,GAAG,YAAY,EAClB,EAAE,EAAE;IACD,OAAO,CACH,oBAAC,wBAAwB,IAAC,KAAK,EAAE,gBAAgB;QAC7C,oBAAC,aAAa,IACV,QAAQ,EAAE,QAAQ,EAClB,SAAS,EAAC,qCAAqC,KAC3C,YAAY,GAClB,CACqB,CAC9B,CAAC;AACN,CAAC,CAAC;AAEF,MAAM,0BAA0B,GAAG,UAAU,CAAC,sBAAsB,CAAC,CAAC;AAEtE;;;GAGG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,EAAE,MAAM,EAAE,GAAG,KAAK,EAA2B,EAAE,EAAE,CAAC,CACjF,oBAAC,WAAW,IAAC,MAAM,EAAE,MAAM;IACvB,oBAAC,0BAA0B,OAAK,KAAK,GAAI,CAC/B,CACjB,CAAC"}
|