@salesforcedevs/docs-components 1.3.106-alpha.3 → 1.3.106-alpha02

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/lwc.config.json CHANGED
@@ -15,6 +15,7 @@
15
15
  "doc/header",
16
16
  "doc/heading",
17
17
  "doc/headingAnchor",
18
+ "doc/overview",
18
19
  "doc/phase",
19
20
  "doc/xmlContent"
20
21
  ]
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@salesforcedevs/docs-components",
3
- "version": "1.3.106-alpha.3",
3
+ "version": "1.3.106-alpha02",
4
4
  "description": "Docs Lightning web components for DSC",
5
5
  "license": "MIT",
6
6
  "main": "index.js",
@@ -149,11 +149,6 @@ export default class ContentLayout extends LightningElement {
149
149
  this.attachInteractionObserver,
150
150
  OBSERVER_ATTACH_WAIT_TIME
151
151
  );
152
-
153
- this.adjustNavPosition();
154
- window.addEventListener("scroll", this.adjustNavPosition);
155
- window.addEventListener("resize", this.adjustNavPosition);
156
-
157
152
  if (!this.hasRendered) {
158
153
  this.hasRendered = true;
159
154
  this.restoreScroll();
@@ -166,8 +161,6 @@ export default class ContentLayout extends LightningElement {
166
161
  "highlightedtermchange",
167
162
  this.updateHighlighted
168
163
  );
169
- window.removeEventListener("scroll", this.adjustNavPosition);
170
- window.removeEventListener("resize", this.adjustNavPosition);
171
164
  this.searchSyncer.dispose();
172
165
  this.clearRenderObserverTimer();
173
166
 
@@ -185,59 +178,6 @@ export default class ContentLayout extends LightningElement {
185
178
  }
186
179
  };
187
180
 
188
- /*
189
- This is a workaround for the global nav sticky header being decoupled from the doc header & doc phase.
190
- We have to account for the global nav changing height due to animations.
191
- */
192
- adjustNavPosition = () => {
193
- const sidebarType = this.useOldSidebar
194
- ? "dx-sidebar-old"
195
- : "dx-sidebar";
196
- const sidebarEl = this.template.querySelector(sidebarType);
197
- const globalNavEl = document.querySelector(
198
- "hgf-c360nav"
199
- ) as HTMLElement;
200
- const contextNavEl = document.querySelector(
201
- "hgf-c360contextnav"
202
- ) as HTMLElement;
203
- const docHeaderEl = document.querySelector(
204
- ".sticky-doc-header"
205
- ) as HTMLElement;
206
- const docPhaseEl = document.querySelector("doc-phase") as HTMLElement;
207
-
208
- if (!sidebarEl || !globalNavEl || !contextNavEl || !docHeaderEl) {
209
- console.warn("One or more required elements are missing.");
210
- return;
211
- }
212
-
213
- const globalNavHeight =
214
- globalNavEl.offsetHeight + contextNavEl.offsetHeight;
215
- const docHeaderHeight = docHeaderEl.offsetHeight;
216
-
217
- sidebarEl.style.setProperty(
218
- "--dx-c-content-sidebar-sticky-top",
219
- `${globalNavHeight + docHeaderHeight}px`
220
- );
221
- docHeaderEl.style.setProperty(
222
- "--dx-g-global-header-height",
223
- `${globalNavHeight}px`
224
- );
225
-
226
- // If doc phase element exists, we need to account for its sticky position. Mobile should include the sidebar height (since it becomes sticky aswell).
227
- if (docPhaseEl) {
228
- docPhaseEl.style.setProperty(
229
- "--doc-c-phase-top",
230
- `${
231
- window.innerWidth <= 769
232
- ? globalNavHeight +
233
- docHeaderHeight +
234
- sidebarEl.offsetHeight
235
- : globalNavHeight + docHeaderHeight
236
- }px`
237
- );
238
- }
239
- };
240
-
241
181
  updateHighlighted = (event: Event): void =>
242
182
  highlightTerms(
243
183
  this.querySelectorAll(HIGHLIGHTABLE_SELECTOR),
@@ -84,6 +84,7 @@ header:not(.has-brand) > .header_l2 {
84
84
  }
85
85
 
86
86
  .header_l2_group-title {
87
+ height: var(--dx-g-doc-header-main-nav-height);
87
88
  margin-right: 0;
88
89
  padding: var(--dx-g-spacing-smd)
89
90
  var(--dx-g-global-header-padding-horizontal);
@@ -0,0 +1,40 @@
1
+ doc-phase {
2
+ --doc-c-phase-top: calc(
3
+ var(--dx-g-global-header-height) + var(--dx-g-doc-header-height)
4
+ );
5
+ }
6
+
7
+ dx-section {
8
+ --dx-c-section-padding-top: 0;
9
+ --dx-c-section-padding-bottom: var(--dx-g-spacing-2xl);
10
+ }
11
+
12
+ dx-section::part(content) {
13
+ max-width: 1280px;
14
+ margin: auto;
15
+ }
16
+
17
+ dx-group-text:first-of-type {
18
+ margin-top: var(--dx-g-spacing-2xl);
19
+ }
20
+
21
+ dx-group-text.features {
22
+ margin-top: var(--dx-g-spacing-xl);
23
+ margin-bottom: var(--dx-g-spacing-xl);
24
+ }
25
+
26
+ .content {
27
+ padding-right: var(--dx-g-spacing-xl);
28
+ }
29
+
30
+ @media (max-width: 1024px) {
31
+ .content {
32
+ padding-right: 0;
33
+ }
34
+ }
35
+
36
+ @media (max-width: 800px) {
37
+ dx-group-text.description {
38
+ margin-top: var(--dx-g-spacing-lg);
39
+ }
40
+ }
@@ -0,0 +1,34 @@
1
+ <template>
2
+ <div class="container">
3
+ <doc-phase
4
+ if:true={docPhaseInfo}
5
+ doc-phase-info={docPhaseInfo}
6
+ ></doc-phase>
7
+
8
+ <dx-section>
9
+ <dx-grid columns="two-slim-right">
10
+ <div class="content">
11
+ <dx-group-text
12
+ class="description"
13
+ title={title}
14
+ body={description}
15
+ size="large"
16
+ title-aria-level="1"
17
+ primary-link={primaryLink}
18
+ secondary-link={secondaryLink}
19
+ ></dx-group-text>
20
+ </div>
21
+ <div>
22
+ <dx-group-text
23
+ title={featuresListTitle}
24
+ size="medium"
25
+ class="features"
26
+ ></dx-group-text>
27
+ <dx-features-list
28
+ options={featuresListOptions}
29
+ ></dx-features-list>
30
+ </div>
31
+ </dx-grid>
32
+ </dx-section>
33
+ </div>
34
+ </template>
@@ -0,0 +1,12 @@
1
+ import { LightningElement, api } from "lwc";
2
+ import { DocPhaseInfo, FeatureItem, Link } from "typings/custom";
3
+
4
+ export default class Overview extends LightningElement {
5
+ @api docPhaseInfo!: DocPhaseInfo;
6
+ @api title!: string;
7
+ @api description!: string;
8
+ @api primaryLink!: Link;
9
+ @api secondaryLink!: Link;
10
+ @api featuresListTitle!: string;
11
+ @api featuresListOptions!: FeatureItem[];
12
+ }