@salesforcedevs/dx-components 1.3.194-alpha.0 → 1.3.194-alpha3
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 +5 -2
- package/src/modules/dx/alert/alert.css +1 -1
- package/src/modules/dx/breadcrumbs/breadcrumbs.css +2 -2
- package/src/modules/dx/cardDocs/cardDocs.css +1 -1
- package/src/modules/dx/cardGridDocs/cardGridDocs.css +1 -0
- package/src/modules/dx/cardNews/cardNews.css +7 -7
- package/src/modules/dx/cardStep/mockProps.ts +1 -2
- package/src/modules/dx/cardTrialExpanded/cardTrialExpanded.css +2 -2
- package/src/modules/dx/checkbox/checkbox.css +2 -1
- package/src/modules/dx/checkboxNative/checkboxNative.css +3 -0
- package/src/modules/dx/codeBlock/codeBlock.ts +6 -6
- package/src/modules/dx/codeBlock/customLanguages.js +4 -2
- package/src/modules/dx/codeBlock/lightTheme.css +4 -4
- package/src/modules/dx/dropdown/dropdown.css +4 -2
- package/src/modules/dx/dropdownOption/dropdownOption.css +2 -2
- package/src/modules/dx/feature/feature.css +1 -1
- package/src/modules/dx/featuredContentHeader/featuredContentHeader.css +3 -3
- package/src/modules/dx/filterMenu/filterMenu.css +6 -2
- package/src/modules/dx/footer/footer.css +3 -4
- package/src/modules/dx/header/__benchmarks__/header.benchmark.js +45 -0
- package/src/modules/dx/header/header.css +99 -0
- package/src/modules/dx/header/header.html +132 -0
- package/src/modules/dx/header/header.ts +21 -0
- package/src/modules/dx/headerMobileNavMenu/headerMobileNavMenu.css +1 -1
- package/src/modules/dx/icon/icon.css +1 -1
- package/src/modules/dx/input/input.css +3 -0
- package/src/modules/dx/searchResults/searchResults.css +3 -2
- package/src/modules/dx/select/select.css +15 -1
- package/src/modules/dx/spinner/spinner.css +225 -28
- package/src/modules/dx/toast/toast.css +1 -1
- package/src/modules/dxHelpers/animations/animations.css +1 -1
- package/src/modules/dxHelpers/card/card.css +1 -1
- package/src/modules/dxHelpers/code/code.css +13 -5
- package/src/modules/dxHelpers/commonTreeItem/commonTreeItem.css +1 -1
- package/src/modules/dxHelpers/reset/reset.css +13 -6
- package/src/modules/dxHelpers/text/text.css +1 -1
- package/src/modules/dxUtils/prismjs/prismjs.ts +294 -168
package/lwc.config.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@salesforcedevs/dx-components",
|
|
3
|
-
"version": "1.3.194-
|
|
3
|
+
"version": "1.3.194-alpha3",
|
|
4
4
|
"description": "DX Lightning web components",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"engines": {
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
"dependencies": {
|
|
13
13
|
"@coveo/headless": "2.16.5",
|
|
14
14
|
"@floating-ui/dom": "1.5.1",
|
|
15
|
-
"@sfdocs-internal/wires": "0.6.
|
|
15
|
+
"@sfdocs-internal/wires": "0.6.90-alpha6",
|
|
16
16
|
"@types/throttle-debounce": "^5.0.0",
|
|
17
17
|
"@vimeo/player": "^2.16.4",
|
|
18
18
|
"classnames": "^2.2.6",
|
|
@@ -40,5 +40,8 @@
|
|
|
40
40
|
"@types/vimeo__player": "^2.16.2",
|
|
41
41
|
"eventsourcemock": "^2.0.0",
|
|
42
42
|
"luxon": "^3.1.0"
|
|
43
|
+
},
|
|
44
|
+
"volta": {
|
|
45
|
+
"node": "16.19.1"
|
|
43
46
|
}
|
|
44
47
|
}
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
--dx-c-alert-container-align-items: flex-start;
|
|
7
7
|
--dx-c-alert-vertical-padding: var(--dx-g-spacing-md);
|
|
8
8
|
--dx-c-alert-success-color: var(--dx-g-green-vibrant-95);
|
|
9
|
-
--dx-c-alert-warning-color: rgb(254 243 217);
|
|
9
|
+
--dx-c-alert-warning-color: rgb(254, 243, 217);
|
|
10
10
|
--dx-c-alert-danger-color: var(--dx-g-red-vibrant-95);
|
|
11
11
|
--dx-c-alert-success-accent-color: var(--dx-g-green-vibrant-80);
|
|
12
12
|
--dx-c-alert-warning-accent-color: var(--dx-g-yellow-vibrant-80);
|
|
@@ -79,7 +79,7 @@ dx-dropdown {
|
|
|
79
79
|
}
|
|
80
80
|
|
|
81
81
|
nav.state-long
|
|
82
|
-
.breadcrumb-slash:not(:nth-last-child(1)
|
|
82
|
+
.breadcrumb-slash:not(:nth-last-child(1)):not(:nth-last-child(2)) {
|
|
83
83
|
display: none;
|
|
84
84
|
}
|
|
85
85
|
|
|
@@ -101,7 +101,7 @@ dx-dropdown {
|
|
|
101
101
|
display: initial;
|
|
102
102
|
}
|
|
103
103
|
|
|
104
|
-
.breadcrumb-slash:not(:nth-last-child(1)
|
|
104
|
+
.breadcrumb-slash:not(:nth-last-child(1)):not(:nth-last-child(2)) {
|
|
105
105
|
display: none;
|
|
106
106
|
}
|
|
107
107
|
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
}
|
|
26
26
|
|
|
27
27
|
.dx-text-display-4 {
|
|
28
|
-
margin: 4px 0;
|
|
28
|
+
margin: 4px 0 4px 0;
|
|
29
29
|
color: inherit;
|
|
30
30
|
}
|
|
31
31
|
|
|
@@ -53,7 +53,7 @@ img {
|
|
|
53
53
|
font-size: 30px;
|
|
54
54
|
letter-spacing: 0.3px;
|
|
55
55
|
line-height: 40px;
|
|
56
|
-
margin: 4px 0 10px;
|
|
56
|
+
margin: 4px 0 10px 0;
|
|
57
57
|
}
|
|
58
58
|
|
|
59
59
|
.dx-card-size-large p {
|
|
@@ -126,29 +126,29 @@ img {
|
|
|
126
126
|
|
|
127
127
|
.dx-card-size-normal p {
|
|
128
128
|
letter-spacing: 0.2px;
|
|
129
|
-
margin: 12px 0 0;
|
|
129
|
+
margin: 12px 0 0 0;
|
|
130
130
|
}
|
|
131
131
|
|
|
132
132
|
.dx-card-size-normal .cta {
|
|
133
|
-
margin: 14px 0 -2px;
|
|
133
|
+
margin: 14px 0 -2px 0;
|
|
134
134
|
}
|
|
135
135
|
|
|
136
136
|
.dx-card-size-large .dx-text-display-4 {
|
|
137
137
|
font-size: var(--dx-g-text-2xl);
|
|
138
138
|
line-height: 40px;
|
|
139
139
|
letter-spacing: 0.6px;
|
|
140
|
-
margin: 10px 0 0;
|
|
140
|
+
margin: 10px 0 0 0;
|
|
141
141
|
}
|
|
142
142
|
|
|
143
143
|
.dx-card-size-large p {
|
|
144
144
|
font-size: 20px;
|
|
145
145
|
line-height: 32px;
|
|
146
|
-
margin: 10px 0 0;
|
|
146
|
+
margin: 10px 0 0 0;
|
|
147
147
|
letter-spacing: 0.72px;
|
|
148
148
|
}
|
|
149
149
|
|
|
150
150
|
.dx-card-size-large .cta {
|
|
151
|
-
margin: 24px 0 0;
|
|
151
|
+
margin: 24px 0 0 0;
|
|
152
152
|
}
|
|
153
153
|
|
|
154
154
|
.dx-card-news-img-vertical-align-middle {
|
|
@@ -21,8 +21,7 @@ export const stepsData = [
|
|
|
21
21
|
'I agree to the Journey to Salesforce Program Terms, subject to the <a href="http://www.google.com">Salesforce Program Agreement</a>.',
|
|
22
22
|
notAvailableAlertInfo: {
|
|
23
23
|
title: "Not Available",
|
|
24
|
-
body:
|
|
25
|
-
'The Journey to Salesforce program is not currently available in your country. See the <a href="https://www.google.com/">program FAQs</a> for a list of participating countries.'
|
|
24
|
+
body: 'The Journey to Salesforce program is not currently available in your country. See the <a href="https://www.google.com/">program FAQs</a> for a list of participating countries.'
|
|
26
25
|
},
|
|
27
26
|
participatingCountryCodes: ["US", "CA", "IN"]
|
|
28
27
|
},
|
|
@@ -75,7 +75,8 @@ input:disabled + .checkbox-label {
|
|
|
75
75
|
--disabled-inner-color: var(--dx-g-gray-60);
|
|
76
76
|
--size: var(--dx-g-spacing-md);
|
|
77
77
|
|
|
78
|
-
appearance: none;
|
|
78
|
+
-webkit-appearance: none;
|
|
79
|
+
-moz-appearance: none;
|
|
79
80
|
height: var(--size);
|
|
80
81
|
width: var(--size);
|
|
81
82
|
outline: none;
|
|
@@ -94,9 +94,10 @@ export default class CodeBlock extends LightningElement {
|
|
|
94
94
|
set codeBlock(value: string) {
|
|
95
95
|
this._codeBlockRendered = false;
|
|
96
96
|
let match;
|
|
97
|
-
this._codeBlock = (
|
|
98
|
-
|
|
99
|
-
|
|
97
|
+
this._codeBlock = (
|
|
98
|
+
(match = preTagRegexp.exec(value.trim())) === null
|
|
99
|
+
? value.trim()
|
|
100
|
+
: match[1]
|
|
100
101
|
).trim();
|
|
101
102
|
}
|
|
102
103
|
|
|
@@ -243,9 +244,8 @@ export default class CodeBlock extends LightningElement {
|
|
|
243
244
|
});
|
|
244
245
|
|
|
245
246
|
try {
|
|
246
|
-
const snippetContainer: HTMLElement | null =
|
|
247
|
-
".code-block-content"
|
|
248
|
-
);
|
|
247
|
+
const snippetContainer: HTMLElement | null =
|
|
248
|
+
this.template.querySelector(".code-block-content");
|
|
249
249
|
if (snippetContainer && snippetContainer.textContent) {
|
|
250
250
|
await navigator.clipboard.writeText(
|
|
251
251
|
snippetContainer.textContent
|
|
@@ -23,13 +23,15 @@ export const ampscript = {
|
|
|
23
23
|
},
|
|
24
24
|
boolean: /\b(true|false|null)\b/i,
|
|
25
25
|
number: /\b(0(x|X)[0-9a-fA-F]+|([0-9]+(\.[0-9]+)?))\b/,
|
|
26
|
-
keyword:
|
|
26
|
+
keyword:
|
|
27
|
+
/\b(do|else|elseif|for|if(?:\s+not)?|endif|next|then|to|downto|var|set)\b/i,
|
|
27
28
|
operator: /==|!=|>|<|>=|<=|=/,
|
|
28
29
|
variable: {
|
|
29
30
|
pattern: /@\w+|\[\w+\]/,
|
|
30
31
|
greedy: true
|
|
31
32
|
},
|
|
32
|
-
constant:
|
|
33
|
+
constant:
|
|
34
|
+
/\b(xtmonth|xtmonthnumeric|xtday|xtdayofweek|xtyear|xtshortdate|xtlongdate)\b/i,
|
|
33
35
|
logical: /\b(and|or|not)\b/i
|
|
34
36
|
}
|
|
35
37
|
};
|
|
@@ -39,19 +39,19 @@
|
|
|
39
39
|
}
|
|
40
40
|
|
|
41
41
|
.dx-theme-light .token.tag {
|
|
42
|
-
color: rgb(75 36 219);
|
|
42
|
+
color: rgb(75, 36, 219);
|
|
43
43
|
}
|
|
44
44
|
|
|
45
45
|
.dx-theme-light .token.attr-name {
|
|
46
|
-
color: rgb(0 107 102);
|
|
46
|
+
color: rgb(0, 107, 102);
|
|
47
47
|
}
|
|
48
48
|
|
|
49
49
|
.dx-theme-light .token.attr-value {
|
|
50
|
-
color: rgb(204 0 96);
|
|
50
|
+
color: rgb(204, 0, 96);
|
|
51
51
|
}
|
|
52
52
|
|
|
53
53
|
.dx-theme-light .token.doctype {
|
|
54
|
-
color: rgb(0 114 215);
|
|
54
|
+
color: rgb(0, 114, 215);
|
|
55
55
|
}
|
|
56
56
|
|
|
57
57
|
.dx-theme-light .token.prolog,
|
|
@@ -7,7 +7,8 @@
|
|
|
7
7
|
|
|
8
8
|
.menu_list {
|
|
9
9
|
display: flex;
|
|
10
|
-
flex-
|
|
10
|
+
flex-direction: column;
|
|
11
|
+
flex-wrap: nowrap;
|
|
11
12
|
}
|
|
12
13
|
|
|
13
14
|
.menu-hidden::part(content) {
|
|
@@ -28,7 +29,8 @@
|
|
|
28
29
|
}
|
|
29
30
|
|
|
30
31
|
.menu-nested-2-col .menu_list {
|
|
31
|
-
flex-
|
|
32
|
+
flex-direction: row;
|
|
33
|
+
flex-wrap: wrap;
|
|
32
34
|
}
|
|
33
35
|
|
|
34
36
|
.menu-nested-2-col .menu_option {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
@import "dxHelpers/reset";
|
|
2
2
|
|
|
3
3
|
.indented-shape {
|
|
4
|
-
--background: rgb(170 203 255);
|
|
4
|
+
--background: rgb(170, 203, 255);
|
|
5
5
|
--wide: 2px;
|
|
6
6
|
|
|
7
7
|
background-color: var(--background);
|
|
@@ -72,7 +72,7 @@
|
|
|
72
72
|
}
|
|
73
73
|
|
|
74
74
|
.option-indented .option_label {
|
|
75
|
-
display: box;
|
|
75
|
+
display: -webkit-box;
|
|
76
76
|
max-width: 300px;
|
|
77
77
|
overflow: hidden;
|
|
78
78
|
-webkit-line-clamp: 1;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
@import "dxHelpers/text";
|
|
3
3
|
|
|
4
4
|
:host {
|
|
5
|
-
--dx-c-feature-img-box-shadow: 0 6px 30px 0
|
|
5
|
+
--dx-c-feature-img-box-shadow: 0 6px 30px 0 rgba(0, 20, 45, 0.4);
|
|
6
6
|
--dx-c-feature-description-left-img-src: url("https://a.sfdcstatic.com/developer-website/images/feature-backdrop1.svg");
|
|
7
7
|
--dx-c-feature-description-max-width: 31.75rem;
|
|
8
8
|
--dx-c-feature-img-margin-left: auto;
|
|
@@ -322,7 +322,7 @@ img {
|
|
|
322
322
|
left: 0;
|
|
323
323
|
width: 100%;
|
|
324
324
|
height: 100%;
|
|
325
|
-
border: 1px solid
|
|
325
|
+
border: 1px solid rgba(24, 24, 24, 0.1);
|
|
326
326
|
border-radius: var(--image-radius);
|
|
327
327
|
object-fit: cover;
|
|
328
328
|
}
|
|
@@ -405,11 +405,11 @@ dx-image-and-label {
|
|
|
405
405
|
/* DARK VARIANT */
|
|
406
406
|
|
|
407
407
|
.variant_dark {
|
|
408
|
-
--label-color: rgb(190 199 246);
|
|
408
|
+
--label-color: rgb(190, 199, 246);
|
|
409
409
|
|
|
410
410
|
background: var(
|
|
411
411
|
--dx-c-featured-content-header-background-color,
|
|
412
|
-
linear-gradient(-180deg, rgb(40 23 153) 0%, rgb(46 43 182) 100%)
|
|
412
|
+
linear-gradient(-180deg, rgb(40, 23, 153) 0%, rgb(46, 43, 182) 100%)
|
|
413
413
|
);
|
|
414
414
|
}
|
|
415
415
|
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
display: flex;
|
|
13
13
|
flex-direction: column;
|
|
14
14
|
width: 100%;
|
|
15
|
-
border: 1px solid rgb(201 201 201);
|
|
15
|
+
border: 1px solid rgb(201, 201, 201);
|
|
16
16
|
border-radius: 4px;
|
|
17
17
|
padding: 15px 0;
|
|
18
18
|
position: relative;
|
|
@@ -21,6 +21,7 @@
|
|
|
21
21
|
}
|
|
22
22
|
|
|
23
23
|
.caret-down {
|
|
24
|
+
-webkit-transform: rotate(180deg); /* Safari */
|
|
24
25
|
transform: rotate(180deg);
|
|
25
26
|
}
|
|
26
27
|
|
|
@@ -52,7 +53,7 @@
|
|
|
52
53
|
font-size: 14px;
|
|
53
54
|
font-family: var(--dx-g-font-sans);
|
|
54
55
|
font-weight: bold;
|
|
55
|
-
color: rgb(24 24 24);
|
|
56
|
+
color: rgb(24, 24, 24);
|
|
56
57
|
}
|
|
57
58
|
|
|
58
59
|
.first-layer {
|
|
@@ -88,6 +89,9 @@ svg,
|
|
|
88
89
|
.filter-menu-title {
|
|
89
90
|
background: transparent;
|
|
90
91
|
cursor: pointer;
|
|
92
|
+
-webkit-user-select: none; /* Safari 3.1+ */
|
|
93
|
+
-moz-user-select: none; /* Firefox 2+ */
|
|
94
|
+
-ms-user-select: none; /* IE 10+ */
|
|
91
95
|
user-select: none;
|
|
92
96
|
}
|
|
93
97
|
|
|
@@ -152,10 +152,9 @@ footer.signup-variant-no-signup {
|
|
|
152
152
|
.content-container_middle {
|
|
153
153
|
display: grid;
|
|
154
154
|
grid-gap: var(--dx-g-spacing-xl);
|
|
155
|
-
grid-template:
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
"locales general" max-content / auto max-content;
|
|
155
|
+
grid-template-columns: auto max-content;
|
|
156
|
+
grid-template-rows: max-content;
|
|
157
|
+
grid-template-areas: "logo general" "socials general" "locales general";
|
|
159
158
|
background: var(--dx-g-cloud-blue-vibrant-95);
|
|
160
159
|
padding-top: var(--dx-g-spacing-4xl);
|
|
161
160
|
padding-bottom: var(--dx-g-spacing-3xl);
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
// import Header from "dx/header";
|
|
2
|
+
// import { createElement } from "lwc";
|
|
3
|
+
|
|
4
|
+
// const navItems = [
|
|
5
|
+
// {
|
|
6
|
+
// id: "home",
|
|
7
|
+
// label: "Home",
|
|
8
|
+
// link: {
|
|
9
|
+
// href: "/developers",
|
|
10
|
+
// target: null
|
|
11
|
+
// }
|
|
12
|
+
// },
|
|
13
|
+
// {
|
|
14
|
+
// id: "documentation",
|
|
15
|
+
// label: "Documentation",
|
|
16
|
+
// link: {
|
|
17
|
+
// href: "/docs",
|
|
18
|
+
// target: null
|
|
19
|
+
// }
|
|
20
|
+
// },
|
|
21
|
+
// {
|
|
22
|
+
// id: "notes",
|
|
23
|
+
// label: "Notes",
|
|
24
|
+
// link: {
|
|
25
|
+
// href: "/notes",
|
|
26
|
+
// target: null
|
|
27
|
+
// }
|
|
28
|
+
// }
|
|
29
|
+
// ];
|
|
30
|
+
|
|
31
|
+
describe("dx-header", () => {
|
|
32
|
+
benchmark("creates and renders", () => {
|
|
33
|
+
let element;
|
|
34
|
+
run(() => {
|
|
35
|
+
// element = createElement("dx-header", {
|
|
36
|
+
// is: Header
|
|
37
|
+
// });
|
|
38
|
+
// Object.assign(element, { navItems });
|
|
39
|
+
// document.body.appendChild(element);
|
|
40
|
+
});
|
|
41
|
+
after(() => {
|
|
42
|
+
return element && element.parentElement.removeChild(element);
|
|
43
|
+
});
|
|
44
|
+
});
|
|
45
|
+
});
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
@import "dxHelpers/commonHeader";
|
|
2
|
+
|
|
3
|
+
:host {
|
|
4
|
+
--dx-c-header-search-width: 316px;
|
|
5
|
+
--dx-g-text-xs: 14px;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
dx-header-mobile-nav-menu {
|
|
9
|
+
--dx-c-color-background: var(--dx-g-brand-current-color-background);
|
|
10
|
+
--dx-c-button-color-background-inactive: var(
|
|
11
|
+
--dx-g-brand-current-button-color-background-inactive
|
|
12
|
+
);
|
|
13
|
+
--dx-c-button-color-background-active: var(
|
|
14
|
+
--dx-g-brand-current-button-color-background-active
|
|
15
|
+
);
|
|
16
|
+
--dx-c-color: var(--dx-g-brand-current-color);
|
|
17
|
+
--dx-c-color-border: var(--dx-g-brand-current-color-border);
|
|
18
|
+
--dx-c-color-background-2: var(--dx-g-brand-current-color-background-2);
|
|
19
|
+
--dx-c-button-color-background-inactive-hover: var(
|
|
20
|
+
--dx-g-brand-current-button-color-background-inactive-hover
|
|
21
|
+
);
|
|
22
|
+
--dx-c-color-border-2: var(--dx-g-brand-current-color-border-2);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.header_l2_group-title {
|
|
26
|
+
margin-right: var(--dx-g-spacing-4xl);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.header_l2_group-nav_menu-ctas {
|
|
30
|
+
display: none;
|
|
31
|
+
position: relative;
|
|
32
|
+
justify-content: center;
|
|
33
|
+
align-items: center;
|
|
34
|
+
padding-right: var(--dx-g-spacing-sm);
|
|
35
|
+
height: 100%;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.header_l2_group-nav_menu-ctas::after {
|
|
39
|
+
content: "";
|
|
40
|
+
position: absolute;
|
|
41
|
+
right: 0;
|
|
42
|
+
top: var(--dx-g-spacing-sm);
|
|
43
|
+
height: calc(100% - var(--dx-g-spacing-md));
|
|
44
|
+
width: 1px;
|
|
45
|
+
background: transparent;
|
|
46
|
+
transition: var(--dx-g-transition-hue-1x);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
header.has-navscrollshadow .header_l2_group-nav_menu-ctas::after {
|
|
50
|
+
background: var(--dx-g-brand-current-color-border);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.header_l2_group-nav_menu-button {
|
|
54
|
+
--dx-c-button-primary-color: var(--dx-g-blue-vibrant-20);
|
|
55
|
+
--dx-c-button-secondary-color-hover: var(
|
|
56
|
+
--dx-g-brand-current-button-color-background-inactive
|
|
57
|
+
);
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
@media (max-width: 1024px) {
|
|
61
|
+
.header_l2 {
|
|
62
|
+
flex-wrap: wrap;
|
|
63
|
+
height: unset;
|
|
64
|
+
padding: 0;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
.header_l2_group-title {
|
|
68
|
+
margin-right: 0;
|
|
69
|
+
padding: 12px var(--dx-g-page-padding-horizontal);
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
.header_l2_group {
|
|
73
|
+
width: 100%;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
.header_l2_group-nav {
|
|
77
|
+
height: var(--dx-g-spacing-3xl);
|
|
78
|
+
padding: 0;
|
|
79
|
+
padding-left: var(--dx-g-spacing-sm);
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
.header_l2_group-nav_overflow {
|
|
83
|
+
margin-right: var(--dx-g-spacing-sm);
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
.header_version-dropdown {
|
|
87
|
+
margin-left: auto;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
.has-nav-items .header_l2_group-title {
|
|
91
|
+
border-bottom: 1px solid var(--dx-g-brand-current-color-border-2);
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
@media (max-width: 768px) {
|
|
96
|
+
.header_l2_group-nav > .header_l2_group-nav_menu-ctas {
|
|
97
|
+
display: flex;
|
|
98
|
+
}
|
|
99
|
+
}
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<dx-brand-theme-provider brand={brand}>
|
|
3
|
+
<header class={className}>
|
|
4
|
+
<dx-skip-nav-link></dx-skip-nav-link>
|
|
5
|
+
<dx-banner
|
|
6
|
+
if:true={showBanner}
|
|
7
|
+
banner-markup={bannerMarkup}
|
|
8
|
+
></dx-banner>
|
|
9
|
+
<div class="header_l1">
|
|
10
|
+
<dx-logo label={title}></dx-logo>
|
|
11
|
+
<div class="header-cta-container">
|
|
12
|
+
<dx-header-search
|
|
13
|
+
if:true={hasSearch}
|
|
14
|
+
coveo-organization-id={coveoOrganizationId}
|
|
15
|
+
coveo-public-access-token={coveoPublicAccessToken}
|
|
16
|
+
coveo-search-pipeline={coveoSearchPipeline}
|
|
17
|
+
coveo-search-hub={coveoSearchHub}
|
|
18
|
+
mobile={mobile}
|
|
19
|
+
onstatechange={handleStateChange}
|
|
20
|
+
></dx-header-search>
|
|
21
|
+
</div>
|
|
22
|
+
<div
|
|
23
|
+
if:true={showTbidLogin}
|
|
24
|
+
class="header-tbid-login"
|
|
25
|
+
onclick={closeMobileNavMenu}
|
|
26
|
+
>
|
|
27
|
+
<dw-tbid-login-menu
|
|
28
|
+
tbid-api-base-url={tbidApiBaseUrl}
|
|
29
|
+
tbid-base-url={tbidBaseUrl}
|
|
30
|
+
></dw-tbid-login-menu>
|
|
31
|
+
</div>
|
|
32
|
+
<div if:true={showSignup} class="header-login-signup">
|
|
33
|
+
<dx-button
|
|
34
|
+
aria-label="Browse Trials"
|
|
35
|
+
size="small"
|
|
36
|
+
href={signupLink}
|
|
37
|
+
onclick={handleSignUpClick}
|
|
38
|
+
>
|
|
39
|
+
Browse Trials
|
|
40
|
+
</dx-button>
|
|
41
|
+
</div>
|
|
42
|
+
</div>
|
|
43
|
+
<div class="header_l2">
|
|
44
|
+
<div class="header_l2_group header_l2_group-title">
|
|
45
|
+
<a href="/" class="home-link" if:true={isValidSubtitle}>
|
|
46
|
+
<dx-icon
|
|
47
|
+
class="brand-icon"
|
|
48
|
+
if:true={isValidBrand}
|
|
49
|
+
sprite="salesforcebrand"
|
|
50
|
+
symbol={brand}
|
|
51
|
+
size="xlarge"
|
|
52
|
+
></dx-icon>
|
|
53
|
+
<span class="dx-text-display-6 subtitle">
|
|
54
|
+
{subtitle}
|
|
55
|
+
</span>
|
|
56
|
+
</a>
|
|
57
|
+
<dx-dropdown
|
|
58
|
+
class="header_version-dropdown"
|
|
59
|
+
if:true={versions}
|
|
60
|
+
options={versions}
|
|
61
|
+
value={version}
|
|
62
|
+
onchange={onVersionChange}
|
|
63
|
+
small
|
|
64
|
+
>
|
|
65
|
+
<dx-button
|
|
66
|
+
aria-label="Select Version"
|
|
67
|
+
class="header_version-selector"
|
|
68
|
+
variant="tertiary"
|
|
69
|
+
icon-symbol="chevrondown"
|
|
70
|
+
>
|
|
71
|
+
{versionLabel}
|
|
72
|
+
</dx-button>
|
|
73
|
+
</dx-dropdown>
|
|
74
|
+
</div>
|
|
75
|
+
<div
|
|
76
|
+
class="header_l2_group header_l2_group-nav"
|
|
77
|
+
if:true={hasNavItems}
|
|
78
|
+
>
|
|
79
|
+
<div class="header_l2_group-nav_menu-ctas">
|
|
80
|
+
<dx-button
|
|
81
|
+
aria-label="Toggle Mobile Nav Menu"
|
|
82
|
+
class="header_l2_group-nav_menu-button"
|
|
83
|
+
icon-size="large"
|
|
84
|
+
icon-symbol={mobileMenuIconSymbol}
|
|
85
|
+
variant="tertiary"
|
|
86
|
+
onclick={toggleMobileNavMenu}
|
|
87
|
+
></dx-button>
|
|
88
|
+
</div>
|
|
89
|
+
<div
|
|
90
|
+
class="header_l2_group-nav_overflow"
|
|
91
|
+
onscroll={onNavScroll}
|
|
92
|
+
>
|
|
93
|
+
<dx-header-nav
|
|
94
|
+
nav-items={navItems}
|
|
95
|
+
onrequestopennavmenu={onRequestOpenNavMenu}
|
|
96
|
+
pathname={pathname}
|
|
97
|
+
variant="small"
|
|
98
|
+
></dx-header-nav>
|
|
99
|
+
<dx-button
|
|
100
|
+
aria-label={bailLabel}
|
|
101
|
+
if:true={hasBailLink}
|
|
102
|
+
href={bailHref}
|
|
103
|
+
variant="tertiary"
|
|
104
|
+
icon-symbol="new_window"
|
|
105
|
+
>
|
|
106
|
+
{bailLabel}
|
|
107
|
+
</dx-button>
|
|
108
|
+
</div>
|
|
109
|
+
</div>
|
|
110
|
+
</div>
|
|
111
|
+
<dx-header-mobile-nav-menu
|
|
112
|
+
nav-items={navItems}
|
|
113
|
+
onchange={onMobileNavMenuChange}
|
|
114
|
+
open={showMobileNavMenu}
|
|
115
|
+
pathname={pathname}
|
|
116
|
+
value={mobileNavMenuValue}
|
|
117
|
+
onrequestclose={closeMobileNavMenu}
|
|
118
|
+
if:true={hasNavItems}
|
|
119
|
+
>
|
|
120
|
+
<dx-button
|
|
121
|
+
aria-label={bailLabel}
|
|
122
|
+
if:true={hasBailLink}
|
|
123
|
+
href={bailHref}
|
|
124
|
+
variant="tertiary"
|
|
125
|
+
icon-symbol="new_window"
|
|
126
|
+
>
|
|
127
|
+
{bailLabel}
|
|
128
|
+
</dx-button>
|
|
129
|
+
</dx-header-mobile-nav-menu>
|
|
130
|
+
</header>
|
|
131
|
+
</dx-brand-theme-provider>
|
|
132
|
+
</template>
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { HeaderBase } from "dxBaseElements/headerBase";
|
|
2
|
+
|
|
3
|
+
export default class Header extends HeaderBase {
|
|
4
|
+
private get showTbidLogin(): boolean {
|
|
5
|
+
return this.showSignup;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
private get showSignup(): boolean {
|
|
9
|
+
return this.signupLink
|
|
10
|
+
? (this.mobile && !this.isSearchOpen) || !this.mobile
|
|
11
|
+
: false;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
protected mobileBreakpoint(): string {
|
|
15
|
+
return "768px";
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
get isValidSubtitle() {
|
|
19
|
+
return this.isValidBrand || this.subtitle;
|
|
20
|
+
}
|
|
21
|
+
}
|