@salesforcedevs/docs-components 1.3.194-9-cssalpha → 1.3.194-search-alpha

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": "@salesforcedevs/docs-components",
3
- "version": "1.3.194-9-cssalpha",
3
+ "version": "1.3.194-search-alpha",
4
4
  "description": "Docs Lightning web components for DSC",
5
5
  "license": "MIT",
6
6
  "main": "index.js",
@@ -1161,7 +1161,7 @@ export default class AmfReference extends LightningElement {
1161
1161
  selectedItemMetaData.parentReferencePath,
1162
1162
  selectedItemMetaData.meta
1163
1163
  );
1164
- this.updateNavTitleMetaTag(selectedItemMetaData.navTitle);
1164
+ this.updateTags(selectedItemMetaData.navTitle);
1165
1165
  }
1166
1166
  });
1167
1167
  } else {
@@ -1276,7 +1276,7 @@ export default class AmfReference extends LightningElement {
1276
1276
  referenceMeta
1277
1277
  );
1278
1278
  if (referenceDetails) {
1279
- this.updateNavTitleMetaTag(referenceDetails.topicTitle);
1279
+ this.updateTags(referenceDetails.topicTitle);
1280
1280
  }
1281
1281
 
1282
1282
  this.versions = this.getVersions();
@@ -1304,13 +1304,33 @@ export default class AmfReference extends LightningElement {
1304
1304
  this.showVersionBanner = false;
1305
1305
  }
1306
1306
 
1307
- private updateNavTitleMetaTag(navTitle = ""): void {
1307
+ private updateTags(navTitle = ""): void {
1308
+ if (!navTitle) {
1309
+ return;
1310
+ }
1311
+
1308
1312
  // this is required to update the nav title meta tag.
1309
1313
  // eslint-disable-next-line @lwc/lwc/no-document-query
1310
1314
  const metaNavTitle = document.querySelector('meta[name="nav-title"]');
1311
- if (metaNavTitle && navTitle) {
1315
+ // eslint-disable-next-line @lwc/lwc/no-document-query
1316
+ const titleTag = document.querySelector("title");
1317
+ if (metaNavTitle) {
1312
1318
  metaNavTitle.setAttribute("content", navTitle);
1313
1319
  }
1320
+
1321
+ if (titleTag) {
1322
+ let titleTagValue = titleTag.textContent;
1323
+ const tagValues: string[] = titleTagValue?.split(" | ");
1324
+ if (tagValues) {
1325
+ if (tagValues.length <= 3) {
1326
+ titleTagValue = navTitle + " | " + titleTagValue;
1327
+ } else {
1328
+ tagValues[0] = navTitle;
1329
+ titleTagValue = tagValues.join(" | ");
1330
+ }
1331
+ }
1332
+ titleTag.textContent = titleTagValue;
1333
+ }
1314
1334
  }
1315
1335
 
1316
1336
  onNavSelect(event: CustomEvent): void {
@@ -1353,7 +1373,7 @@ export default class AmfReference extends LightningElement {
1353
1373
  this.coveoAnalyticsToken
1354
1374
  );
1355
1375
  this.updateUrlWithSelected(parentReferencePath, metaVal);
1356
- this.updateNavTitleMetaTag(metadata.navTitle);
1376
+ this.updateTags(metadata.navTitle);
1357
1377
  } else {
1358
1378
  if (this.isParentReferencePath(name)) {
1359
1379
  this.loadNewReferenceItem(name);
@@ -8,8 +8,6 @@ dx-logo {
8
8
  .header_l2 {
9
9
  justify-content: space-between;
10
10
  height: var(--dx-g-doc-header-main-nav-height);
11
- padding-bottom: var(--dx-g-spacing-xs);
12
- background: white;
13
11
  }
14
12
 
15
13
  .nav_menu-button {
@@ -19,24 +17,16 @@ dx-logo {
19
17
  );
20
18
  }
21
19
 
22
- .has-brand.has-scoped-nav-items {
23
- border-bottom: 1px solid var(--dx-g-gray-90);
24
- border-top: 1px solid var(--dx-g-gray-90);
25
- }
26
-
27
20
  .nav_menu-ctas {
28
21
  margin-right: var(--dx-g-spacing-sm);
29
22
  }
30
23
 
31
24
  header:not(.has-brand) > .header_l1 {
32
- background: white;
33
- border-bottom: 1px solid var(--dx-g-gray-90);
25
+ background: var(--dx-g-brand-current-color-background);
34
26
  }
35
27
 
36
28
  header:not(.has-brand) > .header_l2 {
37
- border-bottom: 1px solid var(--dx-g-gray-90);
38
- border-top: 1px solid var(--dx-g-gray-90);
39
- padding-bottom: var(--dx-g-spacing-lg);
29
+ background: var(--dx-g-brand-current-color-background-2);
40
30
  }
41
31
 
42
32
  .header_l2_group.header_l2_group-right-ctas {
@@ -113,11 +103,6 @@ header:not(.has-brand) > .header_l2 {
113
103
  }
114
104
 
115
105
  .has-scoped-nav-items .header_l2_group-title {
116
- border-bottom: 1px solid var(--dx-g-gray-90);
117
- padding-bottom: calc(var(--dx-g-spacing-md) + 2px);
118
- }
119
-
120
- header:not(.has-brand) > .header_l2 {
121
- padding-bottom: 0;
106
+ border-bottom: 1px solid var(--dx-g-brand-current-color-border-2);
122
107
  }
123
108
  }
@@ -14,9 +14,9 @@
14
14
  if:true={isValidBrand}
15
15
  sprite="salesforcebrand"
16
16
  symbol={brand}
17
- size="large"
17
+ size="xlarge"
18
18
  ></dx-icon>
19
- <span class="subtitle dx-text-display-7">
19
+ <span class="subtitle dx-text-display-6">
20
20
  {subtitle}
21
21
  </span>
22
22
  </a>