@salesforcedevs/dx-components 0.56.1 → 0.56.2-example
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 +18 -3
- package/package.json +18 -6
- package/src/assets/icons/salesforcebrand-sprite/svg/symbols.svg +492 -111
- package/src/assets/svg/big-moon.svg +1 -0
- package/src/assets/svg/blue-circle.svg +3 -0
- package/src/assets/svg/login-widget-bg.png +0 -0
- package/src/assets/svg/subscribe-background-left.svg +14 -0
- package/src/assets/svg/subscribe-background-right.svg +11 -0
- package/src/assets/svg/trial-left.svg +6 -0
- package/src/assets/svg/trial-right.svg +26 -0
- package/src/modules/dx/banner/banner (1).ts +12 -0
- package/src/modules/dx/banner/banner.ts +3 -5
- package/src/modules/dx/button/button.css +10 -9
- package/src/modules/dx/buttonToggle/buttonToggle.css +50 -0
- package/src/modules/dx/buttonToggle/buttonToggle.html +17 -0
- package/src/modules/dx/buttonToggle/buttonToggle.ts +75 -0
- package/src/modules/dx/cardCallout/cardCallout.ts +8 -4
- package/src/modules/dx/cardContent/cardContent.html +4 -1
- package/src/modules/dx/cardDocs/cardDocs.html +4 -1
- package/src/modules/dx/cardEvent/cardEvent.html +1 -2
- package/src/modules/dx/cardEvent/cardEvent.ts +1 -1
- package/src/modules/dx/cardExpanded/cardExpanded.html +1 -6
- package/src/modules/dx/cardExpanded/cardExpanded.ts +2 -2
- package/src/modules/dx/cardMinimal/cardMinimal.html +1 -6
- package/src/modules/dx/cardTrial/cardTrial.css +63 -4
- package/src/modules/dx/cardTrial/cardTrial.html +96 -12
- package/src/modules/dx/cardTrial/cardTrial.ts +70 -2
- package/src/modules/dx/cardTrialExpanded/cardTrialExpanded.css +149 -0
- package/src/modules/dx/cardTrialExpanded/cardTrialExpanded.html +85 -0
- package/src/modules/dx/cardTrialExpanded/cardTrialExpanded.ts +67 -0
- package/src/modules/dx/checkbox/checkbox.css +4 -0
- package/src/modules/dx/codeBlock/codeBlock.ts +5 -1
- package/src/modules/dx/dropdown/dropdown.html +5 -1
- package/src/modules/dx/dropdown/dropdown.ts +13 -3
- package/src/modules/dx/dropdownOption/dropdownOption.css +119 -1
- package/src/modules/dx/dropdownOption/dropdownOption.html +4 -0
- package/src/modules/dx/dropdownOption/dropdownOption.ts +20 -7
- package/src/modules/dx/feature/feature.ts +3 -3
- package/src/modules/dx/featuredContentHeader/featuredContentHeader.css +84 -18
- package/src/modules/dx/featuredContentHeader/featuredContentHeader.html +109 -99
- package/src/modules/dx/featuredContentHeader/featuredContentHeader.ts +27 -7
- package/src/modules/dx/featuresList/featuresList.css +1 -1
- package/src/modules/dx/filterMenu/filterMenu.css +26 -8
- package/src/modules/dx/filterMenu/filterMenu.html +24 -8
- package/src/modules/dx/filterMenu/filterMenu.ts +1 -0
- package/src/modules/dx/footer/footer.css +1 -1
- package/src/modules/dx/footer/footer.html +25 -20
- package/src/modules/dx/footer/footer.ts +19 -15
- package/src/modules/dx/footer/links.ts +115 -39
- package/src/modules/dx/formattedDateTime/formattedDateTime.ts +8 -3
- package/src/modules/dx/header/header.html +10 -3
- package/src/modules/dx/header/header.ts +4 -0
- package/src/modules/dx/headerMobileNavMenu/headerMobileNavMenu.css +1 -0
- package/src/modules/dx/headerSearch/headerSearch.html +0 -1
- package/src/modules/dx/hr/hr.css +2 -4
- package/src/modules/dx/iconBadge/iconBadge.css +12 -0
- package/src/modules/dx/iconBadge/iconBadge.html +2 -7
- package/src/modules/dx/iconBadge/iconBadge.ts +15 -5
- package/src/modules/dx/imageAndLabel/imageAndLabel.css +0 -1
- package/src/modules/dx/input/input.css +17 -1
- package/src/modules/dx/input/input.html +5 -1
- package/src/modules/dx/input/input.ts +8 -0
- package/src/modules/dx/interactiveImage/interactiveImage.css +59 -0
- package/src/modules/dx/interactiveImage/interactiveImage.html +32 -0
- package/src/modules/dx/interactiveImage/interactiveImage.ts +71 -0
- package/src/modules/dx/logo/logo.css +0 -1
- package/src/modules/dx/logo/logo.ts +1 -1
- package/src/modules/dx/metadataBadge/metadataBadge.css +41 -0
- package/src/modules/dx/metadataBadge/metadataBadge.html +5 -0
- package/src/modules/dx/metadataBadge/metadataBadge.ts +24 -0
- package/src/modules/dx/modal/modal.css +40 -0
- package/src/modules/dx/modal/modal.html +10 -0
- package/src/modules/dx/modal/modal.ts +50 -0
- package/src/modules/dx/modalDrawer/modalDrawer.html +2 -2
- package/src/modules/dx/modalDrawer/modalDrawer.ts +7 -1
- package/src/modules/dx/pagination/pagination.css +1 -2
- package/src/modules/dx/popover/popover.css +28 -3
- package/src/modules/dx/popover/popover.html +1 -0
- package/src/modules/dx/popover/popover.ts +83 -44
- package/src/modules/dx/searchResults/coveo.css +18989 -0
- package/src/modules/dx/searchResults/searchResults.css +387 -0
- package/src/modules/dx/searchResults/searchResults.html +104 -0
- package/src/modules/dx/searchResults/searchResults.ts +187 -0
- package/src/modules/dx/section/section.css +10 -1
- package/src/modules/dx/section/section.ts +1 -1
- package/src/modules/dx/select/select.css +7 -3
- package/src/modules/dx/sidebar/sidebar.css +1 -145
- package/src/modules/dx/sidebar/sidebar.ts +2 -0
- package/src/modules/dx/sidebarOld/sidebarOld.css +1 -145
- package/src/modules/dx/sidebarOld/sidebarOld.ts +2 -0
- package/src/modules/dx/sidebarSearch/sidebarSearch.ts +23 -3
- package/src/modules/dx/sidebarSearchResult/sidebarSearchResult.css +1 -1
- package/src/modules/dx/tab/tab.css +0 -4
- package/src/modules/dx/tabPanel/tabPanel.css +20 -0
- package/src/modules/dx/tabPanel/tabPanel.html +13 -0
- package/src/modules/dx/tabPanel/tabPanel.ts +27 -0
- package/src/modules/dx/tabPanelItem/tabPanelItem.css +39 -0
- package/src/modules/dx/tabPanelItem/tabPanelItem.html +15 -0
- package/src/modules/dx/tabPanelItem/tabPanelItem.ts +39 -0
- package/src/modules/dx/tabPanelList/tabPanelList.css +35 -0
- package/src/modules/dx/tabPanelList/tabPanelList.html +47 -0
- package/src/modules/dx/tabPanelList/tabPanelList.ts +164 -0
- package/src/modules/dx/tabPanelList/uniqueId.ts +6 -0
- package/src/modules/dx/tbidAvatarButton/tbidAvatarButton.css +33 -0
- package/src/modules/dx/tbidAvatarButton/tbidAvatarButton.html +53 -0
- package/src/modules/dx/tbidAvatarButton/tbidAvatarButton.ts +440 -0
- package/src/modules/dx/toc/toc.css +1 -0
- package/src/modules/dx/toc/toc.ts +13 -0
- package/src/modules/dx/treeItem/treeItem.html +2 -0
- package/src/modules/dx/treeItem/treeItem.ts +8 -6
- package/src/modules/dx/treeTile/treeTile.css +18 -18
- package/src/modules/dx/treeTile/treeTile.html +5 -4
- package/src/modules/dx/treeTile/treeTile.ts +17 -3
- package/src/modules/dx/typeBadge/typeBadge.css +15 -56
- package/src/modules/dx/typeBadge/typeBadge.html +6 -0
- package/src/modules/dx/typeBadge/typeBadge.ts +149 -46
- package/src/modules/dxBaseElements/archiveCard/archiveCard.ts +2 -6
- package/src/modules/dxBaseElements/headerBase/headerBase.ts +11 -1
- package/src/modules/dxConstants/brands/brands.ts +14 -0
- package/src/modules/dxConstants/colors/colors.ts +14 -0
- package/src/modules/dxConstants/contentTypes/contentTypes.ts +10 -0
- package/src/modules/dxHelpers/card/card.css +1 -1
- package/src/modules/dxHelpers/commonHeader/commonHeader.css +4 -3
- package/src/modules/dxHelpers/commonSidebar/commonSidebar.css +145 -0
- package/src/modules/dxHelpers/{sidebar/sidebar.css → commonTreeItem/commonTreeItem.css} +0 -0
- package/src/modules/dxUtils/async/async.ts +45 -0
- package/src/modules/dxUtils/constants/constants.ts +0 -13
- package/src/modules/dxUtils/css/css.ts +10 -0
- package/src/modules/dxUtils/lwc/lwc.ts +9 -0
- package/src/modules/dxUtils/prismjs/prismjs.ts +347 -9
- package/src/modules/dxUtils/queryCoordinator/queryCoordinator.ts +37 -11
- package/LICENSE +0 -12
- package/src/modules/dx/typeBadgeGroup/typeBadgeGroup.css +0 -12
- package/src/modules/dx/typeBadgeGroup/typeBadgeGroup.html +0 -11
- package/src/modules/dx/typeBadgeGroup/typeBadgeGroup.ts +0 -18
|
@@ -1,21 +1,105 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
2
|
+
<dx-modal
|
|
3
|
+
if:true={hasTwoButtons}
|
|
4
|
+
open={_modalOpen}
|
|
5
|
+
ontogglemodal={toggleModal}
|
|
6
|
+
>
|
|
7
|
+
<dx-card-trial-expanded
|
|
8
|
+
badge-background-color={badgeBackgroundColor}
|
|
9
|
+
badge-sprite={badgeSprite}
|
|
10
|
+
badge-symbol={badgeSymbol}
|
|
11
|
+
body={body}
|
|
12
|
+
button-cta={buttonOneCta}
|
|
13
|
+
button-href={buttonOneHref}
|
|
14
|
+
button-icon={buttonOneIcon}
|
|
15
|
+
button-icon-size={buttonOneIconSize}
|
|
16
|
+
details={details}
|
|
17
|
+
href={href}
|
|
18
|
+
label={label}
|
|
19
|
+
col-two-title={modalTitle}
|
|
20
|
+
col-two-details={modalDetails}
|
|
21
|
+
target={target}
|
|
22
|
+
terms={terms}
|
|
23
|
+
title={title}
|
|
24
|
+
ontogglemodal={toggleModal}
|
|
25
|
+
></dx-card-trial-expanded>
|
|
26
|
+
</dx-modal>
|
|
27
|
+
<div class="recommended-container" if:true={recommended}>
|
|
28
|
+
<span class="recommended-label">Recommended</span>
|
|
29
|
+
</div>
|
|
30
|
+
<div
|
|
31
|
+
class={className}
|
|
32
|
+
role={ariaRole}
|
|
33
|
+
href={href}
|
|
34
|
+
target={target}
|
|
35
|
+
onclick={handleClick}
|
|
36
|
+
>
|
|
37
|
+
<template if:true={topText}>
|
|
38
|
+
<span class="top-text dx-text-body-4">{topText}</span>
|
|
39
|
+
<dx-hr spacing="md"></dx-hr>
|
|
40
|
+
</template>
|
|
41
|
+
<div class="badge-container">
|
|
42
|
+
<dx-icon-badge
|
|
43
|
+
class="badge-main"
|
|
44
|
+
background-color={badgeBackgroundColor}
|
|
45
|
+
symbol={badgeSymbol}
|
|
46
|
+
sprite={badgeSprite}
|
|
47
|
+
></dx-icon-badge>
|
|
48
|
+
<dx-type-badge
|
|
49
|
+
if:true={typeBadgeValue}
|
|
50
|
+
value={typeBadgeValue}
|
|
51
|
+
color={typeBadgeColor}
|
|
52
|
+
size={typeBadgeSize}
|
|
53
|
+
dark={typeBadgeDark}
|
|
54
|
+
variant={typeBadgeVariant}
|
|
55
|
+
></dx-type-badge>
|
|
56
|
+
</div>
|
|
10
57
|
<dx-card-title
|
|
11
58
|
href={href}
|
|
12
59
|
target={target}
|
|
13
60
|
title={title}
|
|
14
61
|
></dx-card-title>
|
|
15
|
-
<
|
|
62
|
+
<span class="label dx-text-body-3">{label}</span>
|
|
63
|
+
<p class="body dx-text-body-2 static-font">{body}</p>
|
|
16
64
|
<span class="terms dx-text-body-3 static-font">{terms}</span>
|
|
17
|
-
<dx-hr spacing="
|
|
18
|
-
<
|
|
65
|
+
<dx-hr if:false={hasButtons} spacing="lg"></dx-hr>
|
|
66
|
+
<dx-button
|
|
67
|
+
if:true={hasOneButton}
|
|
68
|
+
class="button-one"
|
|
69
|
+
size="large"
|
|
70
|
+
href={buttonOneHref}
|
|
71
|
+
variant="primary"
|
|
72
|
+
font="sans"
|
|
73
|
+
icon-symbol={buttonOneIcon}
|
|
74
|
+
icon-size={buttonOneIconSize}
|
|
75
|
+
>
|
|
76
|
+
{buttonOneCta}
|
|
77
|
+
</dx-button>
|
|
78
|
+
<div if:true={hasTwoButtons} class="button-container">
|
|
79
|
+
<dx-button
|
|
80
|
+
class="button-one"
|
|
81
|
+
size="large"
|
|
82
|
+
href={buttonOneHref}
|
|
83
|
+
variant="primary"
|
|
84
|
+
font="sans"
|
|
85
|
+
icon-symbol={buttonOneIcon}
|
|
86
|
+
icon-size={buttonOneIconSize}
|
|
87
|
+
>
|
|
88
|
+
{buttonOneCta}
|
|
89
|
+
</dx-button>
|
|
90
|
+
<dx-button
|
|
91
|
+
class="button-two"
|
|
92
|
+
size="large"
|
|
93
|
+
onclick={toggleModal}
|
|
94
|
+
variant="secondary"
|
|
95
|
+
font="sans"
|
|
96
|
+
icon-symbol={buttonTwoIcon}
|
|
97
|
+
icon-size={buttonTwoIconSize}
|
|
98
|
+
>
|
|
99
|
+
{buttonTwoCta}
|
|
100
|
+
</dx-button>
|
|
101
|
+
</div>
|
|
102
|
+
<ul class={detailsClassName} if:true={hasDetails}>
|
|
19
103
|
<template for:each={details} for:item="detail">
|
|
20
104
|
<li class="detail" key={detail}>
|
|
21
105
|
<dx-icon-badge
|
|
@@ -27,5 +111,5 @@
|
|
|
27
111
|
</template>
|
|
28
112
|
</ul>
|
|
29
113
|
<img if:true={imgSrc} src={imgSrc} alt="" />
|
|
30
|
-
</
|
|
114
|
+
</div>
|
|
31
115
|
</template>
|
|
@@ -7,12 +7,34 @@ export default class CardTrial extends LightningElement {
|
|
|
7
7
|
@api badgeSprite?: string = "salesforcebrand";
|
|
8
8
|
@api badgeSymbol!: string;
|
|
9
9
|
@api body!: string;
|
|
10
|
+
@api buttonOneCta?: string;
|
|
11
|
+
@api buttonOneHref?: string;
|
|
12
|
+
@api buttonOneIcon?: string;
|
|
13
|
+
@api buttonOneIconSize?: string = "large";
|
|
14
|
+
@api buttonTwoCta?: string;
|
|
15
|
+
@api buttonTwoHref?: string;
|
|
16
|
+
@api buttonTwoIcon?: string;
|
|
17
|
+
@api buttonTwoIconSize?: string = "large";
|
|
18
|
+
@api hideCardDetails?: boolean = false;
|
|
10
19
|
@api href!: string;
|
|
11
|
-
@api label!: string;
|
|
12
20
|
@api imgSrc?: string;
|
|
21
|
+
@api label!: string;
|
|
22
|
+
@api recommended?: boolean = false;
|
|
13
23
|
@api target?: string;
|
|
14
24
|
@api terms!: string;
|
|
15
25
|
@api title!: string;
|
|
26
|
+
@api topText?: string;
|
|
27
|
+
@api modalTitle?: string;
|
|
28
|
+
|
|
29
|
+
@api twoColTitle?: string;
|
|
30
|
+
@api twoColTarget?: string;
|
|
31
|
+
@api twoColHref!: string;
|
|
32
|
+
@api typeBadgeValue?: string;
|
|
33
|
+
@api typeBadgeVariant?: string;
|
|
34
|
+
@api typeBadgeColor?: string;
|
|
35
|
+
@api typeBadgeSize?: string = "default";
|
|
36
|
+
@api typeBadgeDark?: boolean = false;
|
|
37
|
+
|
|
16
38
|
@api
|
|
17
39
|
get details() {
|
|
18
40
|
return this._details;
|
|
@@ -21,14 +43,60 @@ export default class CardTrial extends LightningElement {
|
|
|
21
43
|
this._details = toJson(value);
|
|
22
44
|
}
|
|
23
45
|
|
|
46
|
+
@api
|
|
47
|
+
get modalDetails() {
|
|
48
|
+
return this._modalDetails;
|
|
49
|
+
}
|
|
50
|
+
set modalDetails(value) {
|
|
51
|
+
this._modalDetails = toJson(value);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
get hasDetails() {
|
|
55
|
+
return this.details?.length > 0 && !this.hideCardDetails;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
get hasOneButton() {
|
|
59
|
+
return !!(this.buttonOneCta && !this.buttonTwoCta);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
get hasTwoButtons() {
|
|
63
|
+
return !!(this.buttonOneCta && this.buttonTwoCta);
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
get hasButtons() {
|
|
67
|
+
return !!(this.buttonOneCta || this.buttonTwoCta);
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
get ariaRole() {
|
|
71
|
+
return this.hasButtons ? "menu" : "link";
|
|
72
|
+
}
|
|
73
|
+
|
|
24
74
|
private _details!: string[];
|
|
75
|
+
private _modalDetails!: [{ title: string; subtitle: string }];
|
|
76
|
+
private _modalOpen = false;
|
|
25
77
|
|
|
26
78
|
private get className() {
|
|
27
79
|
return cx(
|
|
28
80
|
"card-trial",
|
|
29
81
|
"dx-card-base",
|
|
30
82
|
"dx-card-base_section-vertical",
|
|
31
|
-
this.imgSrc && "has-image"
|
|
83
|
+
this.imgSrc && "has-image",
|
|
84
|
+
this.recommended && "recommended-border"
|
|
32
85
|
);
|
|
33
86
|
}
|
|
87
|
+
|
|
88
|
+
private get detailsClassName() {
|
|
89
|
+
return cx("details", this.hasButtons && "details_top-margin");
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
private toggleModal() {
|
|
93
|
+
this._modalOpen = !this._modalOpen;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
private handleClick() {
|
|
97
|
+
// card is clickable only if it doesn't contain buttons (for accessibility reasons)
|
|
98
|
+
if (!this.hasButtons) {
|
|
99
|
+
window.location.assign(this.href);
|
|
100
|
+
}
|
|
101
|
+
}
|
|
34
102
|
}
|
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
@import "dxHelpers/reset";
|
|
2
|
+
@import "dxHelpers/text";
|
|
3
|
+
|
|
4
|
+
:host {
|
|
5
|
+
display: block;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
.container {
|
|
9
|
+
max-width: 976px;
|
|
10
|
+
margin: 0 var(--dx-g-spacing-lg);
|
|
11
|
+
overflow: auto;
|
|
12
|
+
max-height: 100vh;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.content-container {
|
|
16
|
+
display: flex;
|
|
17
|
+
border-radius: var(--dx-g-spacing-md);
|
|
18
|
+
overflow: hidden;
|
|
19
|
+
pointer-events: all;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.badge-main {
|
|
23
|
+
--dx-c-icon-badge-icon-size: var(--dx-g-spacing-mlg);
|
|
24
|
+
--dx-c-icon-badge-size: var(--dx-g-spacing-2xl);
|
|
25
|
+
|
|
26
|
+
margin-bottom: var(--dx-g-spacing-md);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.title-main {
|
|
30
|
+
margin-bottom: var(--dx-g-spacing-xs);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.button-cta {
|
|
34
|
+
--dx-c-button-font-size: var(--dx-g-text-base);
|
|
35
|
+
--dx-c-button-font-weight: var(--dx-g-font-bold);
|
|
36
|
+
|
|
37
|
+
margin-top: 15px;
|
|
38
|
+
width: 100%;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.button-container {
|
|
42
|
+
margin-bottom: var(--dx-g-spacing-smd);
|
|
43
|
+
position: sticky;
|
|
44
|
+
top: -1px;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.is-sticky {
|
|
48
|
+
background-color: var(--dx-g-gray-95);
|
|
49
|
+
border-bottom: 1px solid var(--dx-g-gray-80);
|
|
50
|
+
margin-bottom: 0;
|
|
51
|
+
padding: 10px 10px 10px 0;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
.button-close {
|
|
55
|
+
--dx-c-button-background-color: white;
|
|
56
|
+
|
|
57
|
+
margin-left: auto;
|
|
58
|
+
pointer-events: all;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
.label {
|
|
62
|
+
color: var(--dx-g-gray-30);
|
|
63
|
+
margin-top: 5px;
|
|
64
|
+
margin-bottom: var(--dx-g-spacing-md);
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
.terms {
|
|
68
|
+
margin-top: var(--dx-g-spacing-md);
|
|
69
|
+
font-weight: var(--dx-g-font-bold);
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
.label,
|
|
73
|
+
.terms,
|
|
74
|
+
dx-button {
|
|
75
|
+
display: block;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
.details {
|
|
79
|
+
display: flex;
|
|
80
|
+
flex-direction: column;
|
|
81
|
+
margin-top: var(--dx-g-spacing-lg);
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
.detail {
|
|
85
|
+
display: flex;
|
|
86
|
+
flex-direction: row;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
.detail:not(:last-of-type) {
|
|
90
|
+
margin-bottom: var(--dx-g-spacing-smd);
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
.badge-detail {
|
|
94
|
+
--dx-c-icon-badge-icon-size: 10px;
|
|
95
|
+
--dx-c-icon-badge-size: 18px;
|
|
96
|
+
--dx-c-icon-badge-color: var(--dx-g-blue-vibrant-40);
|
|
97
|
+
|
|
98
|
+
padding-right: var(--dx-g-spacing-sm);
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
.col-one {
|
|
102
|
+
background-color: white;
|
|
103
|
+
padding: var(--dx-g-spacing-mlg);
|
|
104
|
+
flex: 0 0 388px;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
.col-two {
|
|
108
|
+
background-color: var(--dx-g-indigo-vibrant-15);
|
|
109
|
+
padding: var(--dx-g-spacing-2xl);
|
|
110
|
+
flex: 1;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
.title-secondary {
|
|
114
|
+
--dx-c-card-title-color: white;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
.col-two-detail-title {
|
|
118
|
+
font-family: var(--dx-g-font-display);
|
|
119
|
+
font-size: var(--dx-g-text-base);
|
|
120
|
+
font-weight: var(--dx-g-font-demi);
|
|
121
|
+
margin-top: var(--dx-g-spacing-mlg);
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
.col-two-detail-subtitle,
|
|
125
|
+
.bullet-list {
|
|
126
|
+
font-family: var(--dx-g-font-sans);
|
|
127
|
+
font-size: var(--dx-g-text-sm);
|
|
128
|
+
font-weight: var(--dx-g-font-normal);
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
.bullet-list {
|
|
132
|
+
list-style: inside;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
.col-two-detail-title,
|
|
136
|
+
.col-two-detail-subtitle,
|
|
137
|
+
.bullet-list {
|
|
138
|
+
color: white;
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
@media screen and (max-width: 768px) {
|
|
142
|
+
.container {
|
|
143
|
+
max-width: 550px;
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
.content-container {
|
|
147
|
+
flex-direction: column;
|
|
148
|
+
}
|
|
149
|
+
}
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="container">
|
|
3
|
+
<div class="button-container">
|
|
4
|
+
<dx-button
|
|
5
|
+
class="button-close"
|
|
6
|
+
variant="secondary"
|
|
7
|
+
icon-symbol="close"
|
|
8
|
+
onclick={handleModalClose}
|
|
9
|
+
>
|
|
10
|
+
Close
|
|
11
|
+
</dx-button>
|
|
12
|
+
</div>
|
|
13
|
+
<div class="content-container">
|
|
14
|
+
<div class="col-one">
|
|
15
|
+
<dx-icon-badge
|
|
16
|
+
class="badge-main"
|
|
17
|
+
background-color={badgeBackgroundColor}
|
|
18
|
+
symbol={badgeSymbol}
|
|
19
|
+
sprite={badgeSprite}
|
|
20
|
+
></dx-icon-badge>
|
|
21
|
+
<dx-card-title
|
|
22
|
+
class="title-main"
|
|
23
|
+
href={href}
|
|
24
|
+
target={target}
|
|
25
|
+
title={title}
|
|
26
|
+
></dx-card-title>
|
|
27
|
+
<span class="label dx-text-body-3">{label}</span>
|
|
28
|
+
<p class="body dx-text-body-2 static-font">{body}</p>
|
|
29
|
+
<span class="terms dx-text-body-3 static-font">{terms}</span>
|
|
30
|
+
<dx-button
|
|
31
|
+
class="button-cta"
|
|
32
|
+
size="large"
|
|
33
|
+
href={href}
|
|
34
|
+
variant="primary"
|
|
35
|
+
font="sans"
|
|
36
|
+
icon-symbol={buttonIcon}
|
|
37
|
+
icon-size={buttonIconSize}
|
|
38
|
+
>
|
|
39
|
+
{buttonCta}
|
|
40
|
+
</dx-button>
|
|
41
|
+
<ul class="details">
|
|
42
|
+
<template for:each={details} for:item="item">
|
|
43
|
+
<li class="detail" key={item}>
|
|
44
|
+
<dx-icon-badge
|
|
45
|
+
class="badge-detail"
|
|
46
|
+
background-color="indigo-vibrant-90"
|
|
47
|
+
symbol="check"
|
|
48
|
+
></dx-icon-badge>
|
|
49
|
+
<span class="detail-text dx-text-body-4">
|
|
50
|
+
{item}
|
|
51
|
+
</span>
|
|
52
|
+
</li>
|
|
53
|
+
</template>
|
|
54
|
+
</ul>
|
|
55
|
+
</div>
|
|
56
|
+
<div class="col-two">
|
|
57
|
+
<dx-card-title
|
|
58
|
+
class="title-secondary"
|
|
59
|
+
title={colTwoTitle}
|
|
60
|
+
></dx-card-title>
|
|
61
|
+
<template for:each={colTwoDetails} for:item="colTwoItem">
|
|
62
|
+
<div key={colTwoItem.title}>
|
|
63
|
+
<p class="col-two-detail-title">{colTwoItem.title}</p>
|
|
64
|
+
<p
|
|
65
|
+
if:true={colTwoItem.subtitle}
|
|
66
|
+
class="col-two-detail-subtitle"
|
|
67
|
+
>
|
|
68
|
+
{colTwoItem.subtitle}
|
|
69
|
+
</p>
|
|
70
|
+
<ul if:true={colTwoItem.bullets} class="bullet-list">
|
|
71
|
+
<template
|
|
72
|
+
for:each={colTwoItem.bullets}
|
|
73
|
+
for:item="bullet"
|
|
74
|
+
>
|
|
75
|
+
<li key={colTwoItem.bullet} class="bullet">
|
|
76
|
+
{bullet}
|
|
77
|
+
</li>
|
|
78
|
+
</template>
|
|
79
|
+
</ul>
|
|
80
|
+
</div>
|
|
81
|
+
</template>
|
|
82
|
+
</div>
|
|
83
|
+
</div>
|
|
84
|
+
</div>
|
|
85
|
+
</template>
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { LightningElement, api } from "lwc";
|
|
2
|
+
import { toJson } from "dxUtils/normalizers";
|
|
3
|
+
|
|
4
|
+
export default class CardTrial extends LightningElement {
|
|
5
|
+
@api badgeBackgroundColor?: string = "indigo-vibrant-90";
|
|
6
|
+
@api badgeSprite?: string = "salesforcebrand";
|
|
7
|
+
@api badgeSymbol!: string;
|
|
8
|
+
@api body!: string;
|
|
9
|
+
@api buttonCta?: string;
|
|
10
|
+
@api buttonHref?: string;
|
|
11
|
+
@api buttonIcon?: string;
|
|
12
|
+
@api buttonIconSize?: string = "large";
|
|
13
|
+
@api colTwoTitle!: string;
|
|
14
|
+
@api href!: string;
|
|
15
|
+
@api label!: string;
|
|
16
|
+
@api target?: string;
|
|
17
|
+
@api terms!: string;
|
|
18
|
+
@api title!: string;
|
|
19
|
+
|
|
20
|
+
@api
|
|
21
|
+
get details() {
|
|
22
|
+
return this._details;
|
|
23
|
+
}
|
|
24
|
+
set details(value) {
|
|
25
|
+
this._details = toJson(value);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
@api
|
|
29
|
+
get colTwoDetails() {
|
|
30
|
+
return this._colTwoDetails;
|
|
31
|
+
}
|
|
32
|
+
set colTwoDetails(value) {
|
|
33
|
+
this._colTwoDetails = toJson(value);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
private _details!: [{ title: string; subtitle: string }];
|
|
37
|
+
private _colTwoDetails!: string[];
|
|
38
|
+
private stickyCloseObserver!: IntersectionObserver;
|
|
39
|
+
|
|
40
|
+
renderedCallback(): void {
|
|
41
|
+
this.observeStickyClose();
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
disconnectedCallback(): void {
|
|
45
|
+
this.stickyCloseObserver.disconnect();
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
private observeStickyClose() {
|
|
49
|
+
const el = this.template.querySelector(".button-container");
|
|
50
|
+
if (el && !this.stickyCloseObserver) {
|
|
51
|
+
this.stickyCloseObserver = new IntersectionObserver(
|
|
52
|
+
([e]) => {
|
|
53
|
+
e.target.classList.toggle(
|
|
54
|
+
"is-sticky",
|
|
55
|
+
e.intersectionRatio < 1
|
|
56
|
+
);
|
|
57
|
+
},
|
|
58
|
+
{ threshold: [0.99] }
|
|
59
|
+
);
|
|
60
|
+
this.stickyCloseObserver.observe(el);
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
private handleModalClose() {
|
|
65
|
+
this.dispatchEvent(new CustomEvent("togglemodal"));
|
|
66
|
+
}
|
|
67
|
+
}
|
|
@@ -45,7 +45,11 @@ export default class CodeBlock extends LightningElement {
|
|
|
45
45
|
{ label: "PHP", id: "php" },
|
|
46
46
|
{ label: "JSON", id: "json" },
|
|
47
47
|
{ label: "Swift", id: "swift" },
|
|
48
|
-
{ label: "Kotlin", id: "kotlin" }
|
|
48
|
+
{ label: "Kotlin", id: "kotlin" },
|
|
49
|
+
{ label: "Python", id: "python" },
|
|
50
|
+
{ label: "Bash", id: "bash" },
|
|
51
|
+
{ label: "SQL", id: "sql" },
|
|
52
|
+
{ label: "YAML", id: "yaml" }
|
|
49
53
|
];
|
|
50
54
|
|
|
51
55
|
connectedCallback() {
|
|
@@ -19,18 +19,21 @@
|
|
|
19
19
|
role={role}
|
|
20
20
|
slot="content"
|
|
21
21
|
>
|
|
22
|
-
<template for:each={options} for:item="option">
|
|
22
|
+
<template for:each={options} for:item="option" for:index="index">
|
|
23
23
|
<dx-dropdown-option
|
|
24
24
|
suppress-gtm-nav-headings={suppressGtmNavHeadings}
|
|
25
25
|
analytics-event={analyticsEvent}
|
|
26
|
+
analytics-base-payload={analyticsBasePayload}
|
|
26
27
|
active={option.active}
|
|
27
28
|
key-value={option.keyValue}
|
|
28
29
|
if:false={option.options}
|
|
29
30
|
key={option.id}
|
|
31
|
+
index-position={index}
|
|
30
32
|
onfocus={onOptionFocus}
|
|
31
33
|
onselect={onOptionClick}
|
|
32
34
|
option={option}
|
|
33
35
|
nav-item-label={navItemLabel}
|
|
36
|
+
variant={variant}
|
|
34
37
|
></dx-dropdown-option>
|
|
35
38
|
<div
|
|
36
39
|
key={option.id}
|
|
@@ -43,6 +46,7 @@
|
|
|
43
46
|
<dx-dropdown-option
|
|
44
47
|
suppress-gtm-nav-headings={suppressGTMNavHeadings}
|
|
45
48
|
analytics-event={analyticsEvent}
|
|
49
|
+
analytics-base-payload={analyticsBasePayload}
|
|
46
50
|
active={suboption.active}
|
|
47
51
|
key={suboption.id}
|
|
48
52
|
key-value={suboption.keyValue}
|
|
@@ -1,4 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {
|
|
2
|
+
AnalyticsPayload,
|
|
3
|
+
OptionWithNested,
|
|
4
|
+
PopperPlacement,
|
|
5
|
+
DropdownVariant
|
|
6
|
+
} from "typings/custom";
|
|
2
7
|
import { LightningElement, api, track } from "lwc";
|
|
3
8
|
import cx from "classnames";
|
|
4
9
|
import get from "lodash.get";
|
|
@@ -18,8 +23,6 @@ export default class Dropdown extends LightningElement {
|
|
|
18
23
|
@api value: string | null = null; // "active option" id
|
|
19
24
|
@api valuePath: string = "id"; // path to match for the active value (useful for url matching)
|
|
20
25
|
@api stayOpenAfterChange?: boolean = false;
|
|
21
|
-
@api suppressGtmNavHeadings?: boolean = false;
|
|
22
|
-
|
|
23
26
|
// props forwarded to popover:
|
|
24
27
|
@api ariaLabel: string | null = null;
|
|
25
28
|
@api tempId: string | null = null;
|
|
@@ -32,9 +35,16 @@ export default class Dropdown extends LightningElement {
|
|
|
32
35
|
@api width?: string | null = null;
|
|
33
36
|
@api fullWidth?: boolean | null;
|
|
34
37
|
@api navItemLabel: string | null = null;
|
|
38
|
+
@api variant: DropdownVariant = "base";
|
|
35
39
|
|
|
36
40
|
// props forwarded to dropdown option
|
|
37
41
|
@api analyticsEvent: string | null = null;
|
|
42
|
+
@api analyticsBasePayload: AnalyticsPayload = {
|
|
43
|
+
elementType: "dropdown",
|
|
44
|
+
destinationType: "internal",
|
|
45
|
+
ctaClick: true
|
|
46
|
+
};
|
|
47
|
+
@api suppressGtmNavHeadings?: boolean = false;
|
|
38
48
|
|
|
39
49
|
@api
|
|
40
50
|
get options() {
|