@salesforcedevs/docs-components 1.3.96-alpha.2 → 1.3.103

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/LICENSE ADDED
@@ -0,0 +1,12 @@
1
+ Copyright (c) 2020, Salesforce.com, Inc.
2
+ All rights reserved.
3
+
4
+ Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
5
+
6
+ * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
7
+
8
+ * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
9
+
10
+ * Neither the name of Salesforce.com nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
11
+
12
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@salesforcedevs/docs-components",
3
- "version": "1.3.96-alpha.2",
3
+ "version": "1.3.103",
4
4
  "description": "Docs Lightning web components for DSC",
5
5
  "license": "MIT",
6
6
  "main": "index.js",
@@ -24,5 +24,5 @@
24
24
  "@types/lodash.orderby": "^4.6.7",
25
25
  "@types/lodash.uniqby": "^4.7.7"
26
26
  },
27
- "gitHead": "4629fdd9ca18a13480044ad43515b91945d16aad"
27
+ "gitHead": "1595697b3a469a6a1723fdc4066617092739b112"
28
28
  }
@@ -56,7 +56,7 @@ dx-toc {
56
56
  .is-sticky {
57
57
  height: 100vh;
58
58
  position: sticky;
59
- top: 135px;
59
+ top: 0;
60
60
  }
61
61
 
62
62
  .right-nav-bar {
@@ -6,6 +6,77 @@
6
6
  if:true={showBanner}
7
7
  banner-markup={bannerMarkup}
8
8
  ></dx-banner>
9
+ <div class="header_l1">
10
+ <div if:true={showMenuButton} class="nav_menu-ctas">
11
+ <dx-button
12
+ aria-label="Menu Button"
13
+ class="nav_menu-button"
14
+ icon-size="large"
15
+ icon-symbol={mobileMenuIconSymbol}
16
+ variant="tertiary"
17
+ onclick={toggleMobileNavMenu}
18
+ ></dx-button>
19
+ </div>
20
+ <dx-logo label={title}></dx-logo>
21
+ <dx-header-nav
22
+ if:true={showDesktopNavItems}
23
+ aria-label="Global Navigation Bar"
24
+ nav-items={navItems}
25
+ onrequestopennavmenu={onRequestOpenNavMenu}
26
+ pathname={pathname}
27
+ variant="small"
28
+ ></dx-header-nav>
29
+ <div class="header-cta-container">
30
+ <dx-header-search
31
+ if:true={hasSearch}
32
+ coveo-organization-id={coveoOrganizationId}
33
+ coveo-public-access-token={coveoPublicAccessToken}
34
+ coveo-search-pipeline={coveoSearchPipeline}
35
+ coveo-search-hub={coveoSearchHub}
36
+ mobile={tablet}
37
+ onstatechange={handleStateChange}
38
+ ></dx-header-search>
39
+ </div>
40
+ <div
41
+ if:true={showTbidLogin}
42
+ class="header-tbid-login"
43
+ onclick={closeMobileNavMenu}
44
+ >
45
+ <dw-tbid-login-menu
46
+ tbid-api-base-url={tbidApiBaseUrl}
47
+ tbid-base-url={tbidBaseUrl}
48
+ ></dw-tbid-login-menu>
49
+ </div>
50
+ <div if:true={showSignup} class="header-login-signup">
51
+ <dx-button
52
+ aria-label="Browse Trials"
53
+ size="small"
54
+ href={signupLink}
55
+ onclick={handleSignUpClick}
56
+ >
57
+ Browse Trials
58
+ </dx-button>
59
+ </div>
60
+ <dx-header-mobile-nav-menu
61
+ if:true={hasNavItems}
62
+ nav-items={navItems}
63
+ open={showMobileNavMenu}
64
+ pathname={pathname}
65
+ value={mobileNavMenuValue}
66
+ onchange={onMobileNavMenuChange}
67
+ onrequestclose={closeMobileNavMenu}
68
+ >
69
+ <dx-button
70
+ aria-label={bailLabel}
71
+ if:true={hasBailLink}
72
+ href={bailHref}
73
+ variant="tertiary"
74
+ icon-symbol="new_window"
75
+ >
76
+ {bailLabel}
77
+ </dx-button>
78
+ </dx-header-mobile-nav-menu>
79
+ </div>
9
80
  <div class="header_l2">
10
81
  <div class="header_l2_group header_l2_group-title">
11
82
  <a href={headerHref} class="home-link">
@@ -59,6 +59,20 @@ export default class Header extends HeaderBase {
59
59
  return this.scopedNavItems && this.scopedNavItems.length > 0;
60
60
  }
61
61
 
62
+ private get showDesktopNavItems(): boolean {
63
+ return !this.mobile && this.hasNavItems;
64
+ }
65
+
66
+ private get showTbidLogin(): boolean {
67
+ return this.showSignup;
68
+ }
69
+
70
+ private get showSignup(): boolean {
71
+ return this.signupLink
72
+ ? (this.tablet && !this.isSearchOpen) || !this.tablet
73
+ : false;
74
+ }
75
+
62
76
  private get hasLanguages(): boolean {
63
77
  return !!(this.languages && this.languages.length);
64
78
  }
@@ -77,6 +91,10 @@ export default class Header extends HeaderBase {
77
91
  );
78
92
  }
79
93
 
94
+ private get showMenuButton(): boolean {
95
+ return this.mobile && this.hasNavItems;
96
+ }
97
+
80
98
  connectedCallback(): void {
81
99
  super.connectedCallback();
82
100
  this.tabletMatchMedia = window.matchMedia(