@salesforcedevs/dx-components 1.3.83 → 1.3.85
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 +3 -6
- package/package.json +2 -3
- package/src/modules/dx/breadcrumbs/breadcrumbs.ts +10 -8
- package/src/modules/dx/cardCallout/cardCallout.css +2 -2
- package/src/modules/dx/cardCallout/cardCallout.html +1 -1
- package/src/modules/dx/cardContent/cardContent.html +1 -4
- package/src/modules/dx/cardDocs/cardDocs.css +3 -3
- package/src/modules/dx/cardDocs/cardDocs.html +1 -4
- package/src/modules/dx/cardEvent/cardEvent.css +1 -6
- package/src/modules/dx/cardEvent/cardEvent.html +2 -2
- package/src/modules/dx/cardNews/cardNews.css +5 -5
- package/src/modules/dx/cardNews/cardNews.html +1 -1
- package/src/modules/dx/cardTitle/cardTitle.css +2 -2
- package/src/modules/dx/cardTitle/cardTitle.html +1 -1
- package/src/modules/dx/codeBlock/codeBlock.css +7 -23
- package/src/modules/dx/codeBlock/codeBlock.html +20 -1
- package/src/modules/dx/codeBlock/codeBlock.ts +110 -70
- package/src/modules/dx/dropdown/dropdown.ts +3 -2
- package/src/modules/dx/emptyState/emptyState.html +1 -1
- package/src/modules/dx/feature/feature.html +2 -2
- package/src/modules/dx/featuredContentHeader/featuredContentHeader.css +3 -3
- package/src/modules/dx/featuredContentHeader/featuredContentHeader.html +4 -4
- package/src/modules/dx/featuresList/featuresList.css +2 -2
- package/src/modules/dx/featuresList/featuresList.html +2 -2
- package/src/modules/dx/filterMenu/filterMenu.html +2 -7
- package/src/modules/dx/filterMenu/filterMenu.ts +3 -4
- package/src/modules/dx/footer/footer.html +1 -1
- package/src/modules/dx/footer/links.ts +4 -2
- package/src/modules/dx/grid/grid.ts +1 -3
- package/src/modules/dx/groupText/groupText.css +3 -7
- package/src/modules/dx/groupText/groupText.html +2 -2
- package/src/modules/dx/groupText/groupText.ts +2 -11
- package/src/modules/dx/header/header.html +1 -1
- package/src/modules/dx/logo/logo.html +1 -1
- package/src/modules/dx/mainContentHeader/mainContentHeader.html +2 -2
- package/src/modules/dx/podcastHost/podcastHost.html +1 -1
- package/src/modules/dx/popover/popover.ts +3 -3
- package/src/modules/dx/searchResults/searchResults.ts +3 -1
- package/src/modules/dx/section/section.css +1 -1
- package/src/modules/dx/section/section.html +1 -1
- package/src/modules/dx/section/section.ts +1 -1
- package/src/modules/dx/select/select.ts +3 -2
- package/src/modules/dx/sidebar/sidebar.html +2 -2
- package/src/modules/dx/sidebar/sidebar.ts +5 -7
- package/src/modules/dx/sidebarOld/sidebarOld.html +1 -1
- package/src/modules/dx/sidebarSearch/sidebarSearch.ts +5 -2
- package/src/modules/dx/tabPanelList/tabPanelList.ts +2 -2
- package/src/modules/dx/toc/toc.css +1 -1
- package/src/modules/dx/toc/toc.ts +1 -1
- package/src/modules/dxBaseElements/matchMediaElement/matchMediaElement.ts +4 -2
- package/src/modules/dxHelpers/card/card.css +2 -6
- package/src/modules/dxHelpers/code/code.css +296 -0
- package/src/modules/dxHelpers/text/text.css +39 -41
- package/src/modules/dxUtils/prismjs/prismjs.html +3 -0
- package/src/modules/dxUtils/prismjs/prismjs.ts +167 -287
- package/src/assets/shiki/languages/amp.tmLanguage.json +0 -205
- package/src/assets/shiki/themes/codey-highnoon.json +0 -650
- package/src/assets/shiki/themes/codey-midnight.json +0 -622
- package/src/modules/dxUtils/shiki/languages.ts +0 -18
- package/src/modules/dxUtils/shiki/shiki.ts +0 -75
|
@@ -369,7 +369,7 @@ a.image-container > img {
|
|
|
369
369
|
padding-bottom: var(--dx-g-spacing-lg);
|
|
370
370
|
}
|
|
371
371
|
|
|
372
|
-
.dx-text-
|
|
372
|
+
.dx-text-display-2 {
|
|
373
373
|
padding-bottom: var(--dx-g-spacing-sm);
|
|
374
374
|
display: block;
|
|
375
375
|
}
|
|
@@ -480,11 +480,11 @@ dx-image-and-label {
|
|
|
480
480
|
margin-bottom: calc(var(--dx-c-bottom-image-height) * -0.72);
|
|
481
481
|
}
|
|
482
482
|
|
|
483
|
-
.dx-text-
|
|
483
|
+
.dx-text-display-6 {
|
|
484
484
|
font-size: var(--dx-g-text-xl);
|
|
485
485
|
}
|
|
486
486
|
|
|
487
|
-
.dx-text-
|
|
487
|
+
.dx-text-display-2 {
|
|
488
488
|
font-size: var(--dx-g-text-2xl);
|
|
489
489
|
line-height: var(--dx-g-spacing-2xl);
|
|
490
490
|
}
|
|
@@ -2,14 +2,14 @@
|
|
|
2
2
|
<div class={classname} part="container" style={style}>
|
|
3
3
|
<div class="container-layout">
|
|
4
4
|
<template if:true={labelAsPrimaryHeading}>
|
|
5
|
-
<h1 if:true={label} class="label dx-text-
|
|
5
|
+
<h1 if:true={label} class="label dx-text-display-6">{label}</h1>
|
|
6
6
|
</template>
|
|
7
7
|
<template if:false={labelAsPrimaryHeading}>
|
|
8
|
-
<p if:true={label} class="label dx-text-
|
|
8
|
+
<p if:true={label} class="label dx-text-display-6">{label}</p>
|
|
9
9
|
</template>
|
|
10
10
|
<div class="featured-content-main-content">
|
|
11
11
|
<template if:false={labelAsPrimaryHeading}>
|
|
12
|
-
<h1 class="title dx-text-
|
|
12
|
+
<h1 class="title dx-text-display-2">
|
|
13
13
|
<a
|
|
14
14
|
class="title-link"
|
|
15
15
|
if:true={href}
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
</h1>
|
|
25
25
|
</template>
|
|
26
26
|
<template if:true={labelAsPrimaryHeading}>
|
|
27
|
-
<h2 class="title dx-text-
|
|
27
|
+
<h2 class="title dx-text-display-2">
|
|
28
28
|
<a
|
|
29
29
|
class="title-link"
|
|
30
30
|
if:true={href}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="container">
|
|
3
|
-
<h2 if:true={title} class="dx-text-
|
|
3
|
+
<h2 if:true={title} class="dx-text-display-4">{title}</h2>
|
|
4
4
|
<ul>
|
|
5
5
|
<template for:each={options} for:item="option">
|
|
6
6
|
<li key={option.id} class="option">
|
|
7
|
-
<div class="dx-text-
|
|
7
|
+
<div class="dx-text-display-8">
|
|
8
8
|
<dx-icon
|
|
9
9
|
class="icon"
|
|
10
10
|
size="small"
|
|
@@ -62,10 +62,7 @@
|
|
|
62
62
|
stroke-width="2"
|
|
63
63
|
stroke-linecap="round"
|
|
64
64
|
stroke-linejoin="round"
|
|
65
|
-
class="
|
|
66
|
-
feather feather-chevron-down
|
|
67
|
-
year-caret
|
|
68
|
-
"
|
|
65
|
+
class="feather feather-chevron-down year-caret"
|
|
69
66
|
>
|
|
70
67
|
<polyline
|
|
71
68
|
points="6 9 12 15 18 9"
|
|
@@ -88,9 +85,7 @@
|
|
|
88
85
|
{month.id}
|
|
89
86
|
<span
|
|
90
87
|
if:true={filtersDatesLoading}
|
|
91
|
-
class="
|
|
92
|
-
filters-dates-loading
|
|
93
|
-
"
|
|
88
|
+
class="filters-dates-loading"
|
|
94
89
|
></span>
|
|
95
90
|
<span
|
|
96
91
|
if:false={filtersDatesLoading}
|
|
@@ -80,10 +80,9 @@ export default class FilterMenu extends LightningElement {
|
|
|
80
80
|
|
|
81
81
|
private setIntedeterminateStatus(checkbox: any, value: boolean) {
|
|
82
82
|
if ("isYear" in checkbox.value && !checkbox.value.isYear) {
|
|
83
|
-
const yearCheckBox: any =
|
|
84
|
-
checkbox
|
|
85
|
-
|
|
86
|
-
);
|
|
83
|
+
const yearCheckBox: any = checkbox.parentElement.parentElement.parentElement.querySelector(
|
|
84
|
+
".checkbox-year"
|
|
85
|
+
);
|
|
87
86
|
yearCheckBox.indeterminate = value;
|
|
88
87
|
}
|
|
89
88
|
}
|
|
@@ -81,7 +81,8 @@ export const generalLinksRaw: OptionWithRequiredNested[] = [
|
|
|
81
81
|
options: [
|
|
82
82
|
{
|
|
83
83
|
link: {
|
|
84
|
-
href:
|
|
84
|
+
href:
|
|
85
|
+
"https://trailhead.salesforce.com/trailblazer-community/feed"
|
|
85
86
|
},
|
|
86
87
|
label: "Trailblazer Community",
|
|
87
88
|
id: "Trailblazer Community"
|
|
@@ -158,7 +159,8 @@ export const termsLinks = [
|
|
|
158
159
|
label: "Legal"
|
|
159
160
|
},
|
|
160
161
|
{
|
|
161
|
-
href:
|
|
162
|
+
href:
|
|
163
|
+
"https://www.salesforce.com/company/privacy/full_privacy/#nav_info",
|
|
162
164
|
label: "Use of Cookies"
|
|
163
165
|
},
|
|
164
166
|
{ href: "https://trust.salesforce.com/en/", label: "Trust" },
|
|
@@ -67,8 +67,6 @@ export default class Grid extends LightningElement {
|
|
|
67
67
|
}
|
|
68
68
|
|
|
69
69
|
onSlotChange(e: Event) {
|
|
70
|
-
this._itemCount = (
|
|
71
|
-
e.target as LightningSlotElement
|
|
72
|
-
).assignedElements().length;
|
|
70
|
+
this._itemCount = (e.target as LightningSlotElement).assignedElements().length;
|
|
73
71
|
}
|
|
74
72
|
}
|
|
@@ -76,12 +76,12 @@
|
|
|
76
76
|
/* breakpoints tablet */
|
|
77
77
|
|
|
78
78
|
@media screen and (max-width: 1024px) {
|
|
79
|
-
.title.dx-text-
|
|
79
|
+
.title.dx-text-display-2 {
|
|
80
80
|
font-size: var(--dx-g-text-3xl);
|
|
81
81
|
line-height: var(--dx-g-spacing-2xl);
|
|
82
82
|
}
|
|
83
83
|
|
|
84
|
-
.subtitle.dx-text-
|
|
84
|
+
.subtitle.dx-text-display-8 {
|
|
85
85
|
font-size: var(--dx-g-text-sm);
|
|
86
86
|
}
|
|
87
87
|
|
|
@@ -90,15 +90,11 @@
|
|
|
90
90
|
line-height: var(--dx-g-spacing-lg);
|
|
91
91
|
}
|
|
92
92
|
|
|
93
|
-
.title.dx-text-
|
|
93
|
+
.title.dx-text-display-4 {
|
|
94
94
|
font-size: var(--dx-g-text-2xl);
|
|
95
95
|
line-height: var(--dx-g-spacing-xl);
|
|
96
96
|
}
|
|
97
97
|
|
|
98
|
-
.subtitle.dx-text-heading-7 {
|
|
99
|
-
font-size: var(--dx-g-text-xs);
|
|
100
|
-
}
|
|
101
|
-
|
|
102
98
|
.body.dx-text-body-2 {
|
|
103
99
|
font-size: var(--dx-g-text-sm);
|
|
104
100
|
line-height: var(--dx-g-spacing-lg);
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class={className}>
|
|
3
|
-
<span if:true={label} class="label dx-text-
|
|
3
|
+
<span if:true={label} class="label dx-text-display-8">{label}</span>
|
|
4
4
|
<div class={titleClassname} role="heading" aria-level={titleAriaLevel}>
|
|
5
5
|
{title}
|
|
6
6
|
</div>
|
|
7
|
-
<span class=
|
|
7
|
+
<span class="subtitle dx-text-display-8" if:true={hasSubtitle}>
|
|
8
8
|
<span if:true={owner}>{owner}</span>
|
|
9
9
|
<span if:true={attributionLink}>
|
|
10
10
|
By
|
|
@@ -11,13 +11,8 @@ const LARGE = "large";
|
|
|
11
11
|
const MEDIUM = "medium";
|
|
12
12
|
|
|
13
13
|
const titleClasses = {
|
|
14
|
-
[LARGE]: "dx-text-
|
|
15
|
-
[MEDIUM]: "dx-text-
|
|
16
|
-
};
|
|
17
|
-
|
|
18
|
-
const subtitleClasses = {
|
|
19
|
-
[LARGE]: "dx-text-heading-6",
|
|
20
|
-
[MEDIUM]: "dx-text-heading-7"
|
|
14
|
+
[LARGE]: "dx-text-display-2",
|
|
15
|
+
[MEDIUM]: "dx-text-display-4"
|
|
21
16
|
};
|
|
22
17
|
|
|
23
18
|
export default class GroupText extends LightningElement {
|
|
@@ -76,10 +71,6 @@ export default class GroupText extends LightningElement {
|
|
|
76
71
|
return cx("title", titleClasses[this.size]);
|
|
77
72
|
}
|
|
78
73
|
|
|
79
|
-
private get subtitleClassname() {
|
|
80
|
-
return cx("subtitle", subtitleClasses[this.size]);
|
|
81
|
-
}
|
|
82
|
-
|
|
83
74
|
private get hasButtonGroup(): boolean {
|
|
84
75
|
return !!(this.primaryLink || this.secondaryLink || this.tertiaryLink);
|
|
85
76
|
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="container" style={style}>
|
|
3
3
|
<div class={textStyle}>
|
|
4
|
-
<h1 class="heading dx-text-
|
|
4
|
+
<h1 class="heading dx-text-display-2">{title}</h1>
|
|
5
5
|
<span class="body dx-text-body-1">{body}</span>
|
|
6
|
-
<span if:true={subtitle} class="subtitle dx-text-
|
|
6
|
+
<span if:true={subtitle} class="subtitle dx-text-display-7">
|
|
7
7
|
{subtitle}
|
|
8
8
|
</span>
|
|
9
9
|
<div class="button-container">
|
|
@@ -246,9 +246,9 @@ export default class Popover extends LightningElement {
|
|
|
246
246
|
const elements = slot.assignedElements();
|
|
247
247
|
const slotted = elements.length === 0 ? null : elements[0];
|
|
248
248
|
// allows dropdown/select to compose popover
|
|
249
|
-
const slotElement = (
|
|
250
|
-
|
|
251
|
-
|
|
249
|
+
const slotElement = (slotted?.tagName === "SLOT"
|
|
250
|
+
? slotted.firstChild
|
|
251
|
+
: slotted) as HTMLElement | null;
|
|
252
252
|
const isWorkToDo =
|
|
253
253
|
slotElement &&
|
|
254
254
|
(!this.control || !slotElement.isSameNode(this.control));
|
|
@@ -19,7 +19,9 @@ interface CoveoSearch {
|
|
|
19
19
|
|
|
20
20
|
declare const Coveo: CoveoSearch;
|
|
21
21
|
|
|
22
|
-
function getPaginationState(
|
|
22
|
+
function getPaginationState(
|
|
23
|
+
event: CoveoSDK.IQuerySuccessEventArgs
|
|
24
|
+
): {
|
|
23
25
|
numberOfPages: number;
|
|
24
26
|
currentPage: number;
|
|
25
27
|
} {
|
|
@@ -61,7 +61,7 @@
|
|
|
61
61
|
max-width: 800px;
|
|
62
62
|
}
|
|
63
63
|
|
|
64
|
-
.dx-text-
|
|
64
|
+
.dx-text-display-custom {
|
|
65
65
|
color: var(--dx-c-section-heading-font-color, --dx-g-text-heading-color);
|
|
66
66
|
font-family: var(--dx-c-section-heading-font-family, --dx-g-font-display);
|
|
67
67
|
font-size: var(--dx-c-section-heading-font-size, --dx-g-text-3xl);
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
</svg>
|
|
28
28
|
|
|
29
29
|
<div part="text" class="text" if:true={hasText}>
|
|
30
|
-
<span class="label dx-text-
|
|
30
|
+
<span class="label dx-text-display-8" if:true={label}>{label}</span>
|
|
31
31
|
<h2 class={headingClassName} if:true={title}>{title}</h2>
|
|
32
32
|
<span class="subtitle dx-text-body-1" if:true={subtitle}>
|
|
33
33
|
{subtitle}
|
|
@@ -37,7 +37,7 @@ export default class Section extends LightningElement {
|
|
|
37
37
|
}
|
|
38
38
|
|
|
39
39
|
private get headingClassName() {
|
|
40
|
-
return cx("heading", `dx-text-
|
|
40
|
+
return cx("heading", `dx-text-display-${this.headingLevel}`);
|
|
41
41
|
}
|
|
42
42
|
|
|
43
43
|
private get hasText(): boolean {
|
|
@@ -79,8 +79,9 @@ export default class Select extends LightningElement {
|
|
|
79
79
|
|
|
80
80
|
get selectElement() {
|
|
81
81
|
if (!this._selectElement) {
|
|
82
|
-
this._selectElement =
|
|
83
|
-
|
|
82
|
+
this._selectElement = this.template.querySelector<HTMLSelectElement>(
|
|
83
|
+
"select"
|
|
84
|
+
);
|
|
84
85
|
}
|
|
85
86
|
return this._selectElement;
|
|
86
87
|
}
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
></dx-button>
|
|
30
30
|
<div class="sidebar-header padding-horizontal">
|
|
31
31
|
<div class="header" if:false={mobile}>
|
|
32
|
-
<h2 class="dx-text-
|
|
32
|
+
<h2 class="dx-text-display-6 header-title">{header}</h2>
|
|
33
33
|
<slot name="header"></slot>
|
|
34
34
|
</div>
|
|
35
35
|
<div class="search">
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
></dx-sidebar-search>
|
|
44
44
|
</div>
|
|
45
45
|
<h2
|
|
46
|
-
class="results-heading dx-text-
|
|
46
|
+
class="results-heading dx-text-display-8"
|
|
47
47
|
if:true={showResultsHeading}
|
|
48
48
|
>
|
|
49
49
|
Results
|
|
@@ -51,11 +51,9 @@ export default class Sidebar extends SidebarBase {
|
|
|
51
51
|
|
|
52
52
|
@api
|
|
53
53
|
setInputValue(searchTerm: string) {
|
|
54
|
-
(
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
) as unknown as SidebarSearch
|
|
58
|
-
)?.setInputValue(searchTerm);
|
|
54
|
+
((this.template.querySelector(
|
|
55
|
+
"dx-sidebar-search"
|
|
56
|
+
) as unknown) as SidebarSearch)?.setInputValue(searchTerm);
|
|
59
57
|
}
|
|
60
58
|
|
|
61
59
|
private expanded: boolean = true;
|
|
@@ -215,9 +213,9 @@ export default class Sidebar extends SidebarBase {
|
|
|
215
213
|
return;
|
|
216
214
|
}
|
|
217
215
|
|
|
218
|
-
const search = this.template.querySelector(
|
|
216
|
+
const search = (this.template.querySelector(
|
|
219
217
|
"dx-sidebar-search"
|
|
220
|
-
) as unknown as SidebarSearch;
|
|
218
|
+
) as unknown) as SidebarSearch;
|
|
221
219
|
|
|
222
220
|
if (
|
|
223
221
|
this.isNearBottomOfSearchResults &&
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
<template if:true={expanded}>
|
|
32
32
|
<div class="padding-horizontal">
|
|
33
33
|
<div class="header" if:false={mobile}>
|
|
34
|
-
<h2 class="dx-text-
|
|
34
|
+
<h2 class="dx-text-display-6 header-title">{header}</h2>
|
|
35
35
|
<slot name="header"></slot>
|
|
36
36
|
</div>
|
|
37
37
|
<div class="search">
|
|
@@ -247,8 +247,11 @@ export default class SidebarSearch extends LightningElement {
|
|
|
247
247
|
return;
|
|
248
248
|
}
|
|
249
249
|
|
|
250
|
-
const {
|
|
251
|
-
|
|
250
|
+
const {
|
|
251
|
+
isLoading,
|
|
252
|
+
firstSearchExecuted,
|
|
253
|
+
results
|
|
254
|
+
} = this.resultList.state;
|
|
252
255
|
|
|
253
256
|
if ((!firstSearchExecuted && !isLoading) || !this.value) {
|
|
254
257
|
// coveo search is firing off some unwanted payloads on startup
|
|
@@ -123,8 +123,8 @@ export default class TabPanelList extends LightningElement {
|
|
|
123
123
|
"dx-tab-panel-item:not(.more-btn-container)"
|
|
124
124
|
);
|
|
125
125
|
const moreBtn = this.template.querySelector(".more-btn-container")!;
|
|
126
|
-
const containerWidth =
|
|
127
|
-
|
|
126
|
+
const containerWidth = this.template.querySelector(".tablist")!
|
|
127
|
+
.offsetWidth;
|
|
128
128
|
let stopWidth = this.template.querySelector(
|
|
129
129
|
"dx-tab-panel-item.more-btn-container"
|
|
130
130
|
)!.offsetWidth;
|
|
@@ -19,8 +19,10 @@ const breakpointConfigs = [
|
|
|
19
19
|
];
|
|
20
20
|
|
|
21
21
|
export abstract class MatchMediaElement extends LightningElement {
|
|
22
|
-
private deviceType:
|
|
23
|
-
|
|
22
|
+
private deviceType:
|
|
23
|
+
| DEVICE_MOBILE
|
|
24
|
+
| DEVICE_TABLET
|
|
25
|
+
| DEVICE_DESKTOP = DEVICE_DESKTOP;
|
|
24
26
|
private matches: {
|
|
25
27
|
match: MediaQueryList;
|
|
26
28
|
callback: (e: MediaQueryListEvent | MediaQueryList) => void;
|
|
@@ -246,16 +246,12 @@ a.dx-card-base:hover dx-card-title {
|
|
|
246
246
|
line-height: 16px;
|
|
247
247
|
}
|
|
248
248
|
|
|
249
|
-
.dx-text-
|
|
249
|
+
.dx-text-display-4:not(.static-font) {
|
|
250
250
|
font-size: 24px;
|
|
251
251
|
line-height: 28px;
|
|
252
252
|
}
|
|
253
253
|
|
|
254
|
-
.dx-text-
|
|
255
|
-
font-size: 12px;
|
|
256
|
-
}
|
|
257
|
-
|
|
258
|
-
.dx-text-heading-6:not(.static-font) {
|
|
254
|
+
.dx-text-display-8:not(.static-font) {
|
|
259
255
|
font-size: var(--dx-g-text-sm);
|
|
260
256
|
}
|
|
261
257
|
}
|