@salesforcedevs/docs-components 1.3.252 → 1.3.262-scroll-alpha1

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.252",
3
+ "version": "1.3.262-scroll-alpha1",
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": "8379eb747571af22dfdfc3c440e8c23c85d1fe8b"
27
+ "gitHead": "4629fdd9ca18a13480044ad43515b91945d16aad"
28
28
  }
@@ -1,6 +1,7 @@
1
1
  doc-phase {
2
2
  --doc-c-phase-top: calc(
3
- var(--dx-g-global-header-height) + var(--dx-g-doc-header-height)
3
+ var(--dx-g-global-header-height) + var(--dx-g-doc-header-height) +
4
+ var(--dx-g-spacing-xl)
4
5
  );
5
6
  }
6
7
 
@@ -10,8 +10,6 @@ import {
10
10
  import type { TopicModel } from "./types";
11
11
  import { Json } from "typings/custom";
12
12
 
13
- const TABLE_SIZE_MATCH = "769px";
14
-
15
13
  export default class AmfTopic extends LightningElement {
16
14
  private _model: TopicModel | undefined;
17
15
  private amf: Json;
@@ -88,21 +86,7 @@ export default class AmfTopic extends LightningElement {
88
86
  }
89
87
  container?.appendChild(element as Node);
90
88
 
91
- this.scrollToTop(container);
92
- }
93
-
94
- scrollToTop(container: Element) {
95
- const isTabletOrDesktop = window.matchMedia(
96
- `(min-width: ${TABLE_SIZE_MATCH})`
97
- ).matches;
98
-
99
- // We need to scroll to top from the tablet size as side nav bar and content in side by side from tablet size
100
- if (isTabletOrDesktop) {
101
- // Sync with the browser to account for any reflows that may have happened
102
- requestAnimationFrame(() => {
103
- container?.scrollIntoView(true);
104
- });
105
- }
89
+ window.scrollTo(0, 0);
106
90
  }
107
91
 
108
92
  renderedCallback(): void {
@@ -4,11 +4,39 @@ dx-logo {
4
4
  min-width: fit-content;
5
5
  }
6
6
 
7
+ .dev-center-link {
8
+ display: inline-block;
9
+ padding: var(--dx-g-spacing-smd) var(--dx-g-spacing-lg) 0
10
+ var(--dx-g-global-header-padding-horizontal);
11
+ height: var(--dx-g-spacing-xl);
12
+ }
13
+
14
+ .dev-center-content {
15
+ display: flex;
16
+ align-items: center;
17
+ text-decoration: none;
18
+ color: inherit;
19
+ font-weight: var(--dx-g-font-bold);
20
+ }
21
+
22
+ dx-icon {
23
+ --dx-c-icon-size: var(--dx-g-icon-size-xs);
24
+ --dx-c-icon-color: var(--dx-g-blue-vibrant-20);
25
+ }
26
+
27
+ .dev-center-content > * + * {
28
+ margin-left: 8px; /* Adjust this value to your desired spacing */
29
+ }
30
+
7
31
  .header_l2 {
8
32
  justify-content: space-between;
9
33
  height: var(--dx-g-doc-header-main-nav-height);
10
34
  }
11
35
 
36
+ .has-brand .header_l2 {
37
+ height: var(--dx-g-spacing-3xl);
38
+ }
39
+
12
40
  .nav_menu-button {
13
41
  --dx-c-button-primary-color: var(--dx-g-blue-vibrant-20);
14
42
  --dx-c-button-secondary-color-hover: var(
@@ -40,7 +68,7 @@ header:not(.has-brand) > .header_l2 {
40
68
  }
41
69
 
42
70
  .has-brand .header_l2_group-title {
43
- padding: var(--dx-g-spacing-smd) var(--dx-g-spacing-xl)
71
+ padding: var(--dx-g-spacing-sm) var(--dx-g-spacing-xl)
44
72
  calc(var(--dx-g-spacing-smd) - 1px) 0;
45
73
  min-width: 320px;
46
74
  }
@@ -6,16 +6,24 @@
6
6
  lwc:if={showBanner}
7
7
  banner-markup={bannerMarkup}
8
8
  ></dx-banner>
9
+ <div lwc:if={devCenter} class="dev-center-link">
10
+ <a href={devCenter.link} class="dev-center-content">
11
+ <dx-icon symbol="back"></dx-icon>
12
+ <dx-icon
13
+ class="brand-icon"
14
+ lwc:if={devCenter.icon}
15
+ sprite="salesforcebrand"
16
+ symbol={brand}
17
+ size="large"
18
+ ></dx-icon>
19
+ <span class="subtitle dx-text-body-4">
20
+ {devCenter.title}
21
+ </span>
22
+ </a>
23
+ </div>
9
24
  <div class="header_l2">
10
25
  <div class="header_l2_group header_l2_group-title">
11
26
  <a href={headerHref} class="home-link">
12
- <dx-icon
13
- class="brand-icon"
14
- lwc:if={isValidBrand}
15
- sprite="salesforcebrand"
16
- symbol={brand}
17
- size="large"
18
- ></dx-icon>
19
27
  <span class="subtitle dx-text-display-7">
20
28
  {subtitle}
21
29
  </span>
@@ -20,11 +20,21 @@ export default class Header extends HeaderBase {
20
20
  this._scopedNavItems = toJson(value);
21
21
  }
22
22
 
23
+ @api
24
+ get devCenter() {
25
+ return this._devCenter;
26
+ }
27
+
28
+ set devCenter(value) {
29
+ this._devCenter = toJson(value);
30
+ }
31
+
23
32
  private _scopedNavItems!: OptionWithNested[];
24
33
  private tablet = false;
25
34
  private tabletMatchMedia!: MediaQueryList;
26
35
  private shouldRender: boolean = false;
27
36
  private showDocDivider: boolean = false;
37
+ private _devCenter: any;
28
38
 
29
39
  protected mobileBreakpoint(): string {
30
40
  return MOBILE_MATCH;
package/LICENSE DELETED
@@ -1,12 +0,0 @@
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.