@salesforcedevs/docs-components 1.3.227-dh5-alpha → 1.3.227-dh7-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.227-dh5-alpha",
3
+ "version": "1.3.227-dh7-alpha",
4
4
  "description": "Docs Lightning web components for DSC",
5
5
  "license": "MIT",
6
6
  "main": "index.js",
@@ -40,7 +40,7 @@
40
40
  </header>
41
41
  </dx-brand-theme-provider>
42
42
  </template>
43
- <template if:false={shouldRender}>
43
+ <template if:true={showDocDivider}>
44
44
  <div class="no-header-content"></div>
45
45
  </template>
46
46
  </template>
@@ -5,7 +5,7 @@ import { HeaderBase } from "dxBaseElements/headerBase";
5
5
  import { toJson } from "dxUtils/normalizers";
6
6
 
7
7
  const TABLET_MATCH = "980px";
8
- const MOBILE_MATCH = "880px";
8
+ const MOBILE_MATCH = "768px";
9
9
 
10
10
  export default class Header extends HeaderBase {
11
11
  @api langValuePath: string = "id"; // allows to override how language property is interpreted, follows valuePath dropdown api.
@@ -23,6 +23,8 @@ export default class Header extends HeaderBase {
23
23
  private _scopedNavItems!: OptionWithNested[];
24
24
  private tablet = false;
25
25
  private tabletMatchMedia!: MediaQueryList;
26
+ private shouldRender: boolean = false;
27
+ private showDocDivider: boolean = false;
26
28
 
27
29
  protected mobileBreakpoint(): string {
28
30
  return MOBILE_MATCH;
@@ -41,16 +43,22 @@ export default class Header extends HeaderBase {
41
43
  this.tabletMatchMedia.addEventListener("change", this.onTabletChange);
42
44
 
43
45
  if (
44
- ((window.location.pathname.includes("/docs/") &&
46
+ (window.location.pathname.includes("/docs/") &&
45
47
  window.location.pathname !== "/docs/apis") ||
46
- window.location.pathname ===
47
- "/tableau/embedding-playground/overview" ||
48
- window.location.host === "localhost:6006" ||
49
- window.location.host === "dsc-components.herokuapp.com") &&
50
- (this.brand || this.mobile)
48
+ window.location.pathname ===
49
+ "/tableau/embedding-playground/overview" ||
50
+ window.location.host === "localhost:6006" ||
51
+ window.location.host === "dsc-components.herokuapp.com"
51
52
  ) {
52
53
  this.shouldRender = true;
53
54
  }
55
+
56
+ if (this.shouldRender && window.location.pathname.includes("/docs/")) {
57
+ if (!this.brand && !this.mobile) {
58
+ this.shouldRender = false;
59
+ this.showDocDivider = true;
60
+ }
61
+ }
54
62
  }
55
63
 
56
64
  disconnectedCallback(): void {
@@ -2,6 +2,8 @@
2
2
 
3
3
  /* NOTE: doc-version-picker-width width variable is used by both dx-button and dx-dropdown to maintain a consistent width. */
4
4
  :host {
5
+ --dx-c-dropdown-option-font-weight: normal;
6
+ --dx-c-dropdown-option-label-color: var(--dx-g-gray-10);
5
7
  --popover-container-open-transform: translateY(4px);
6
8
  }
7
9
 
@@ -12,11 +14,18 @@
12
14
  border-bottom: 1px solid var(--dx-g-gray-90);
13
15
  }
14
16
 
15
- dx-button {
17
+ .version-picker-button {
16
18
  display: flex;
17
19
  width: var(--doc-version-picker-width, 296px);
18
20
  }
19
21
 
22
+ .version-picker-button:hover,
23
+ .version-picker-button:active,
24
+ .version-picker-button:focus {
25
+ --dx-c-button-secondary-color-hover: var(--dx-g-cloud-blue-vibrant-95);
26
+ --dx-c-button-primary-color: var(--dx-g-blue-vibrant-40);
27
+ }
28
+
20
29
  /**
21
30
  * NOTE: This CSS ensures the span inside the button stays within the parent's width, avoiding overflow.
22
31
  * Not keeping this in common component to ensure that existing functionality works as it is.
@@ -6,6 +6,7 @@
6
6
  width="var(--doc-version-picker-width)"
7
7
  >
8
8
  <dx-button
9
+ class="version-picker-button"
9
10
  variant="tertiary"
10
11
  size="small"
11
12
  icon-symbol="chevrondown"
@@ -32,7 +32,23 @@ dx-dropdown > dx-button:hover {
32
32
  }
33
33
 
34
34
  doc-phase {
35
- --doc-c-phase-top: calc(
36
- var(--dx-g-global-header-height) + var(--dx-g-doc-header-height)
37
- );
35
+ --doc-c-phase-top: var(--dx-g-global-header-height);
36
+ }
37
+
38
+ @media screen and (max-width: 768px) {
39
+ doc-content-layout {
40
+ --dx-g-doc-header-main-nav-height: 41px;
41
+ --dx-g-doc-header-height: calc(
42
+ var(--dx-g-doc-header-main-nav-height) + 40px
43
+ );
44
+ --dx-c-content-sidebar-sticky-top: calc(
45
+ var(--dx-g-global-header-height) + var(--dx-g-doc-header-height)
46
+ );
47
+ }
48
+
49
+ doc-phase {
50
+ --doc-c-phase-top: calc(
51
+ var(--dx-g-global-header-height) + var(--dx-g-doc-header-height)
52
+ );
53
+ }
38
54
  }