@salesforcedevs/docs-components 1.3.319-alpha.0 → 1.3.319-do-dont-1

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
@@ -9,6 +9,7 @@
9
9
  "doc/breadcrumbs",
10
10
  "doc/content",
11
11
  "doc/contentCallout",
12
+ "doc/doDont",
12
13
  "doc/contentLayout",
13
14
  "doc/contentMedia",
14
15
  "doc/docXmlContent",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@salesforcedevs/docs-components",
3
- "version": "1.3.319-alpha.0",
3
+ "version": "1.3.319-do-dont-1",
4
4
  "description": "Docs Lightning web components for DSC",
5
5
  "license": "MIT",
6
6
  "main": "index.js",
@@ -12,7 +12,7 @@
12
12
 
13
13
  <div class="dx-callout-content">
14
14
  <p class="doc-status-title dx-callout-title dx-text-body-3">
15
- {header}
15
+ {title}
16
16
  </p>
17
17
  <span class="dx-callout-body dx-text-body-3">
18
18
  <slot onslotchange={onSlotChange}></slot>
@@ -3,7 +3,7 @@ import cx from "classnames";
3
3
  import { CalloutVariant, LightningSlotElement } from "typings/custom";
4
4
 
5
5
  export default class ContentCallout extends LightningElement {
6
- @api header!: string;
6
+ @api title!: string;
7
7
  @api variant!: CalloutVariant;
8
8
  cardVariant?: string;
9
9
  iconName?: string;
@@ -50,7 +50,7 @@
50
50
  </div>
51
51
  <div lwc:if={showToc} class="right-nav-bar is-sticky">
52
52
  <dx-toc
53
- header={tocTitle}
53
+ title={tocTitle}
54
54
  options={tocOptions}
55
55
  value={tocValue}
56
56
  ></dx-toc>
@@ -343,10 +343,8 @@ export default class ContentLayout extends LightningElement {
343
343
  );
344
344
 
345
345
  for (const headingElement of headingElements as any) {
346
- // Sometimes elements hash and header is not being set when slot content is wrapped with div
346
+ // Sometimes elements hash is not being set when slot content is wrapped with div
347
347
  headingElement.hash = headingElement.attributes.hash?.nodeValue;
348
- headingElement.header =
349
- headingElement.attributes.header?.nodeValue;
350
348
  }
351
349
 
352
350
  const tocOptions = [];
@@ -363,7 +361,7 @@ export default class ContentLayout extends LightningElement {
363
361
  const tocItem = {
364
362
  anchor: `#${headingElement.hash}`,
365
363
  id: headingElement.id,
366
- label: headingElement.header
364
+ label: headingElement.title
367
365
  };
368
366
  tocOptions.push(tocItem);
369
367
  this.tocOptionIdsSet.add(headingElement.id);
@@ -0,0 +1,47 @@
1
+ @import "dxHelpers/reset";
2
+ @import "dxHelpers/text";
3
+
4
+ .container {
5
+ display: flex;
6
+ flex-direction: column;
7
+ gap: var(--dx-g-spacing-md);
8
+ flex: 1;
9
+ }
10
+
11
+ .doc-do-dont-header {
12
+ display: flex;
13
+ align-items: center;
14
+ gap: var(--dx-g-spacing-sm);
15
+ }
16
+
17
+ .doc-do-dont-label {
18
+ font-family: var(--dx-g-font-display);
19
+ font-size: var(--dx-g-spacing-md);
20
+ font-weight: var(--dx-g-font-demi);
21
+ line-height: var(--dx-g-spacing-lg);
22
+ }
23
+
24
+ .doc-do-color {
25
+ color: var(--dx-g-green-vibrant-50);
26
+ }
27
+
28
+ .doc-dont-color {
29
+ color: var(--dx-g-red-vibrant-30);
30
+ }
31
+
32
+ .do-dont-image-container {
33
+ display: flex;
34
+ max-height: 480px;
35
+ min-height: 140px;
36
+ padding: var(--dx-g-spacing-3xl) var(--dx-g-spacing-2xl);
37
+ flex-direction: column;
38
+ justify-content: center;
39
+ align-items: center;
40
+ flex: 1;
41
+ border-radius: var(--dx-g-spacing-sm);
42
+ border: 1px solid var(--dx-g-brand-default-color-border-2);
43
+ }
44
+
45
+ .doc-do-dont-img {
46
+ object-fit: contain;
47
+ }
@@ -0,0 +1,27 @@
1
+ <template>
2
+ <div class="container">
3
+ <div class="doc-do-dont-header">
4
+ <template lwc:if={isDo}>
5
+ <dx-icon
6
+ symbol="success"
7
+ size="large"
8
+ color="green-vibrant-50"
9
+ ></dx-icon>
10
+ <div class="doc-do-dont-label doc-do-color">Do</div>
11
+ </template>
12
+ <template lwc:else>
13
+ <dx-icon
14
+ symbol="clear"
15
+ size="large"
16
+ color="red-vibrant-30"
17
+ class="doc-do-dont-icon"
18
+ ></dx-icon>
19
+ <div class="doc-do-dont-label doc-dont-color">Don't</div>
20
+ </template>
21
+ </div>
22
+ <div class="do-dont-image-container">
23
+ <img class="doc-do-dont-img" src={src} alt={caption} />
24
+ </div>
25
+ <div class="dx-text-body-4">{caption}</div>
26
+ </div>
27
+ </template>
@@ -0,0 +1,17 @@
1
+ import { LightningElement, api } from "lwc";
2
+ import { normalizeBoolean } from "dxUtils/normalizers";
3
+
4
+ export default class DoDont extends LightningElement {
5
+ @api caption: string = "";
6
+ @api src!: string;
7
+ _isDo: boolean = false;
8
+
9
+ @api
10
+ get isDo(): boolean {
11
+ return this._isDo;
12
+ }
13
+
14
+ set isDo(value) {
15
+ this._isDo = normalizeBoolean(value);
16
+ }
17
+ }
@@ -1,14 +1,14 @@
1
1
  <template>
2
2
  <h1 class={className} if:true={isAriaLevelOne}>
3
- <doc-heading-content header={header} hash={hash}></doc-heading-content>
3
+ <doc-heading-content title={title} hash={hash}></doc-heading-content>
4
4
  </h1>
5
5
  <h2 class={className} if:true={isAriaLevelTwo}>
6
- <doc-heading-content header={header} hash={hash}></doc-heading-content>
6
+ <doc-heading-content title={title} hash={hash}></doc-heading-content>
7
7
  </h2>
8
8
  <h3 class={className} if:true={isAriaLevelThree}>
9
- <doc-heading-content header={header} hash={hash}></doc-heading-content>
9
+ <doc-heading-content title={title} hash={hash}></doc-heading-content>
10
10
  </h3>
11
11
  <h4 class={className} if:true={isAriaLevelFour}>
12
- <doc-heading-content header={header} hash={hash}></doc-heading-content>
12
+ <doc-heading-content title={title} hash={hash}></doc-heading-content>
13
13
  </h4>
14
14
  </template>
@@ -13,7 +13,7 @@ export const displayLevels = Object.values(ariaDisplayLevels);
13
13
 
14
14
  // @ts-ignore: Really Dark Magic (TM) to do with ariaLevel needing explicit getter/setters
15
15
  export default class Heading extends LightningElement {
16
- @api header: string = "";
16
+ @api title: string = "";
17
17
  @api hash: string | null = null;
18
18
 
19
19
  @api
@@ -6,7 +6,7 @@ export default class HeadingAnchor extends LightningElement {
6
6
  @api iconSize?: IconSize = "override";
7
7
  @api iconSprite?: IconSprite = "utility";
8
8
  @api iconSymbol?: IconSymbol;
9
- @api header: string = "";
9
+ @api title: string = "";
10
10
  @api urlText: string = "";
11
11
 
12
12
  label: string = "Copy link to clipboard";
@@ -22,7 +22,7 @@ export default class HeadingAnchor extends LightningElement {
22
22
  }, 2000);
23
23
 
24
24
  try {
25
- if (this.header && this.urlText) {
25
+ if (this.title && this.urlText) {
26
26
  const [hostUrl] = window.location.href.split("#");
27
27
  const url = `${hostUrl}#${this.urlText}`;
28
28
  await navigator.clipboard.writeText(url);
@@ -1,7 +1,7 @@
1
1
  <template>
2
- <template if:false={hash}>{header}</template>
2
+ <template if:false={hash}>{title}</template>
3
3
  <template if:true={hash}>
4
- <span class="title">{header}&nbsp;</span>
4
+ <span class="title">{title}&nbsp;</span>
5
5
  <dx-tooltip placement="top" label={label}>
6
6
  <span class="button-container">
7
7
  <button onclick={copy} aria-label="copy">
@@ -1,7 +1,7 @@
1
1
  import { LightningElement, api } from "lwc";
2
2
 
3
3
  export default class HeadingContent extends LightningElement {
4
- @api header: string = "";
4
+ @api title: string = "";
5
5
  @api hash: string | null = null;
6
6
 
7
7
  label: string = "Copy link to clipboard";
@@ -18,7 +18,7 @@ export default class HeadingContent extends LightningElement {
18
18
  }, 2000);
19
19
 
20
20
  try {
21
- if (this.header && this.hash) {
21
+ if (this.title && this.hash) {
22
22
  const [hostUrl] = window.location.href.split("#");
23
23
  const url = `${hostUrl}#${this.hash}`;
24
24
  await navigator.clipboard.writeText(url);
@@ -10,7 +10,7 @@
10
10
  <div class="content">
11
11
  <dx-group-text
12
12
  class="description"
13
- header={header}
13
+ title={title}
14
14
  body={description}
15
15
  size="large"
16
16
  title-aria-level="1"
@@ -20,7 +20,7 @@
20
20
  </div>
21
21
  <div>
22
22
  <dx-group-text
23
- header={featuresListTitle}
23
+ title={featuresListTitle}
24
24
  size="medium"
25
25
  class="features"
26
26
  ></dx-group-text>
@@ -3,7 +3,7 @@ import { DocPhaseInfo, FeatureItem, Link } from "typings/custom";
3
3
 
4
4
  export default class Overview extends LightningElement {
5
5
  @api docPhaseInfo!: DocPhaseInfo;
6
- @api header!: string;
6
+ @api title!: string;
7
7
  @api description!: string;
8
8
  @api primaryLink!: Link;
9
9
  @api secondaryLink!: Link;