@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 +1 -0
- package/package.json +1 -1
- package/src/modules/doc/contentCallout/contentCallout.html +1 -1
- package/src/modules/doc/contentCallout/contentCallout.ts +1 -1
- package/src/modules/doc/contentLayout/contentLayout.html +1 -1
- package/src/modules/doc/contentLayout/contentLayout.ts +2 -4
- package/src/modules/doc/doDont/doDont.css +47 -0
- package/src/modules/doc/doDont/doDont.html +27 -0
- package/src/modules/doc/doDont/doDont.ts +17 -0
- package/src/modules/doc/heading/heading.html +4 -4
- package/src/modules/doc/heading/heading.ts +1 -1
- package/src/modules/doc/headingAnchor/headingAnchor.ts +2 -2
- package/src/modules/doc/headingContent/headingContent.html +2 -2
- package/src/modules/doc/headingContent/headingContent.ts +2 -2
- package/src/modules/doc/overview/overview.html +2 -2
- package/src/modules/doc/overview/overview.ts +1 -1
package/lwc.config.json
CHANGED
package/package.json
CHANGED
|
@@ -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
|
|
6
|
+
@api title!: string;
|
|
7
7
|
@api variant!: CalloutVariant;
|
|
8
8
|
cardVariant?: string;
|
|
9
9
|
iconName?: string;
|
|
@@ -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
|
|
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.
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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.
|
|
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}>{
|
|
2
|
+
<template if:false={hash}>{title}</template>
|
|
3
3
|
<template if:true={hash}>
|
|
4
|
-
<span class="title">{
|
|
4
|
+
<span class="title">{title} </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
|
|
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.
|
|
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
|
-
|
|
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
|
-
|
|
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
|
|
6
|
+
@api title!: string;
|
|
7
7
|
@api description!: string;
|
|
8
8
|
@api primaryLink!: Link;
|
|
9
9
|
@api secondaryLink!: Link;
|