@financial-times/dotcom-ui-header 9.0.0-beta.5 → 9.0.0-beta.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.
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@financial-times/dotcom-ui-header",
|
|
3
|
-
"version": "9.0.0-beta.
|
|
3
|
+
"version": "9.0.0-beta.6",
|
|
4
4
|
"description": "",
|
|
5
5
|
"browser": "browser.js",
|
|
6
6
|
"main": "component.js",
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
"author": "",
|
|
23
23
|
"license": "MIT",
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"@financial-times/dotcom-types-navigation": "^9.0.0-beta.
|
|
25
|
+
"@financial-times/dotcom-types-navigation": "^9.0.0-beta.6",
|
|
26
26
|
"n-topic-search": "^4.0.0",
|
|
27
27
|
"n-ui-foundations": "^9.0.0"
|
|
28
28
|
},
|
|
@@ -18,11 +18,12 @@ class EnhancedSearch extends TopicSearch {
|
|
|
18
18
|
document.querySelector('#o-header-drawer-search-term')
|
|
19
19
|
]
|
|
20
20
|
|
|
21
|
-
|
|
21
|
+
inputs.forEach((input, index) => {
|
|
22
|
+
input.setAttribute('placeholder', 'Search for stories, topics or securities')
|
|
23
|
+
input.parentElement.setAttribute('action', options?.enhancedSearchUrl ?? '/search')
|
|
22
24
|
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
inputs.forEach((input) => input.setAttribute('placeholder', 'Search for stories, topics or securities'))
|
|
25
|
+
if (index === 0) input.parentElement.setAttribute('data-attribute-enhanced-search', 'true')
|
|
26
|
+
})
|
|
26
27
|
|
|
27
28
|
this.hide()
|
|
28
29
|
}
|
|
@@ -3,10 +3,20 @@
|
|
|
3
3
|
@use '@financial-times/o-typography/main' as typography;
|
|
4
4
|
|
|
5
5
|
@mixin enhancedSearch {
|
|
6
|
+
// Hide search-bar on small screens
|
|
7
|
+
.o-header__search[aria-hidden='false'] {
|
|
8
|
+
display: none;
|
|
9
|
+
@include oGridRespondTo('L') {
|
|
10
|
+
display: block;
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
|
|
6
14
|
.enhanced-search {
|
|
7
15
|
&__suggestions {
|
|
8
|
-
|
|
9
|
-
|
|
16
|
+
@include oGridRespondTo('L') {
|
|
17
|
+
max-width: 540px;
|
|
18
|
+
left: calc(-1 * spacing.oSpacingByName('s3'));
|
|
19
|
+
}
|
|
10
20
|
}
|
|
11
21
|
|
|
12
22
|
&__wrapper {
|