@salesforcedevs/dx-components 1.2.18-lightdom → 1.2.18-lightdom-4
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/package.json +1 -1
- package/src/modules/dx/banner/banner.css +33 -1
- package/src/modules/dx/banner/banner.html +2 -5
- package/src/modules/dx/banner/banner.ts +1 -3
- package/src/modules/dx/brandThemeProvider/brandThemeProvider.html +1 -1
- package/src/modules/dx/brandThemeProvider/brandThemeProvider.ts +4 -4
- package/src/modules/dx/button/button.html +5 -5
- package/src/modules/dx/button/{button.css → button.scoped.css} +1 -16
- package/src/modules/dx/button/button.ts +11 -9
- package/src/modules/dx/cardPodcastEpisode/{cardPodcastEpisode.scoped.css → cardPodcastEpisode.css} +4 -0
- package/src/modules/dx/cardPodcastEpisode/cardPodcastEpisode.html +1 -1
- package/src/modules/dx/cardPodcastEpisode/cardPodcastEpisode.ts +0 -2
- package/src/modules/dx/cardTitle/cardTitle.css +24 -2
- package/src/modules/dx/cardTitle/cardTitle.html +4 -4
- package/src/modules/dx/cardTitle/cardTitle.ts +0 -1
- package/src/modules/dx/dropdown/dropdown.css +6 -12
- package/src/modules/dx/dropdown/dropdown.html +3 -2
- package/src/modules/dx/dropdown/dropdown.ts +1 -1
- package/src/modules/dx/featuredContentHeader/featuredContentHeader.css +8 -8
- package/src/modules/dx/header/header.css +0 -10
- package/src/modules/dx/header/header.html +1 -1
- package/src/modules/dx/header/header.scoped.css +5 -0
- package/src/modules/dx/header/header.ts +2 -2
- package/src/modules/dx/headerMobileNavMenu/headerMobileNavMenu.css +147 -2
- package/src/modules/dx/headerMobileNavMenu/headerMobileNavMenu.html +5 -6
- package/src/modules/dx/headerMobileNavMenu/headerMobileNavMenu.ts +3 -5
- package/src/modules/dx/headerNav/{headerNav.scoped.css → headerNav.css} +3 -1
- package/src/modules/dx/headerNav/headerNav.html +2 -2
- package/src/modules/dx/headerNav/headerNav.ts +0 -2
- package/src/modules/dx/headerSearch/headerSearch.css +61 -2
- package/src/modules/dx/headerSearch/headerSearch.html +3 -3
- package/src/modules/dx/headerSearch/headerSearch.ts +0 -2
- package/src/modules/dx/icon/icon.css +4 -1
- package/src/modules/dx/icon/icon.html +1 -1
- package/src/modules/dx/icon/icon.scoped.css +5 -0
- package/src/modules/dx/icon/icon.ts +0 -2
- package/src/modules/dx/logo/{logo.scoped.css → logo.css} +3 -0
- package/src/modules/dx/logo/logo.html +1 -1
- package/src/modules/dx/logo/logo.ts +0 -2
- package/src/modules/dx/popover/popover.html +2 -2
- package/src/modules/dx/popover/{popover.css → popover.scoped.css} +0 -2
- package/src/modules/dx/popover/popover.ts +33 -19
- package/src/modules/dx/relativeDateTime/relativeDateTime.html +1 -1
- package/src/modules/dx/relativeDateTime/relativeDateTime.ts +0 -1
- package/src/modules/dx/skipNavLink/{skipNavLink.scoped.css → skipNavLink.css} +2 -0
- package/src/modules/dx/skipNavLink/skipNavLink.html +1 -1
- package/src/modules/dx/skipNavLink/skipNavLink.ts +1 -4
- package/src/modules/dx/tooltip/microtip.css +105 -101
- package/src/modules/dxHelpers/card/card.css +1 -11
- package/src/modules/dxHelpers/commonSidebar/commonSidebar.css +2 -2
- package/src/modules/dx/banner/banner.scoped.css +0 -28
- package/src/modules/dx/cardTitle/cardTitle.scoped.css +0 -25
- package/src/modules/dx/headerMobileNavMenu/headerMobileNavMenu.scoped.css +0 -142
- package/src/modules/dx/headerSearch/headerSearch.scoped.css +0 -56
- package/src/modules/dx/relativeDateTime/relativeDateTime.scoped.css +0 -3
package/package.json
CHANGED
|
@@ -1,3 +1,35 @@
|
|
|
1
|
+
@import "dxHelpers/reset";
|
|
2
|
+
@import "dxHelpers/text";
|
|
3
|
+
|
|
4
|
+
.container {
|
|
5
|
+
--primary-color: var(--dx-g-cloud-blue-vibrant-50);
|
|
6
|
+
--secondary-color: var(--dx-g-cloud-blue-vibrant-40);
|
|
7
|
+
|
|
8
|
+
width: 100%;
|
|
9
|
+
display: flex;
|
|
10
|
+
flex-direction: row;
|
|
11
|
+
align-items: center;
|
|
12
|
+
justify-content: center;
|
|
13
|
+
min-height: 24px;
|
|
14
|
+
padding: 0 var(--dx-g-page-padding-horizontal);
|
|
15
|
+
background: repeating-linear-gradient(
|
|
16
|
+
45deg,
|
|
17
|
+
var(--primary-color),
|
|
18
|
+
var(--primary-color) 20px,
|
|
19
|
+
var(--secondary-color) 20px,
|
|
20
|
+
var(--secondary-color) 40px
|
|
21
|
+
);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.container_inner {
|
|
25
|
+
height: 100%;
|
|
26
|
+
display: flex;
|
|
27
|
+
background: var(--primary-color);
|
|
28
|
+
padding: var(--dx-g-spacing-xs) var(--dx-g-spacing-sm);
|
|
29
|
+
color: white;
|
|
30
|
+
font-weight: bold;
|
|
31
|
+
}
|
|
32
|
+
|
|
1
33
|
.container a {
|
|
2
34
|
text-decoration: underline;
|
|
3
35
|
transition: var(--dx-g-transition-hue-1x);
|
|
@@ -11,4 +43,4 @@
|
|
|
11
43
|
.container dx-icon {
|
|
12
44
|
margin-right: var(--dx-g-spacing-sm);
|
|
13
45
|
margin-top: var(--dx-g-spacing-2xs);
|
|
14
|
-
}
|
|
46
|
+
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
<template
|
|
1
|
+
<template>
|
|
2
2
|
<div class="container">
|
|
3
3
|
<div class="container_inner dx-text-body-4">
|
|
4
4
|
<dx-icon symbol="announcement"></dx-icon>
|
|
@@ -7,10 +7,7 @@
|
|
|
7
7
|
option instead of slots because the html markup will come as a
|
|
8
8
|
property to the component from a configuration
|
|
9
9
|
-->
|
|
10
|
-
<div
|
|
11
|
-
class="info-container"
|
|
12
|
-
lwc:inner-html={content}
|
|
13
|
-
></div>
|
|
10
|
+
<div lwc:dom="manual" class="info-container"></div>
|
|
14
11
|
</div>
|
|
15
12
|
</div>
|
|
16
13
|
</template>
|
|
@@ -2,13 +2,11 @@ import { LightningElement, api } from "lwc";
|
|
|
2
2
|
import { setContainerInnerHtml } from "dxUtils/lwc";
|
|
3
3
|
|
|
4
4
|
export default class Banner extends LightningElement {
|
|
5
|
-
static renderMode = 'light';
|
|
6
|
-
|
|
7
5
|
@api bannerMarkup =
|
|
8
6
|
'Thank you for visiting the Salesforce Developers website! <span><a href="https://forms.gle/oWYTbH9RvGyt9uxx7" target="blank">We value your feedback</a></span>';
|
|
9
7
|
|
|
10
8
|
renderedCallback() {
|
|
11
|
-
const container = this.querySelector(".info-container");
|
|
9
|
+
const container = this.template.querySelector(".info-container");
|
|
12
10
|
setContainerInnerHtml(container, this.bannerMarkup);
|
|
13
11
|
}
|
|
14
12
|
}
|
|
@@ -3,7 +3,7 @@ import brandCssVars from "./brandCssVars";
|
|
|
3
3
|
import { Brand } from "typings/custom";
|
|
4
4
|
|
|
5
5
|
export const toCss = (brand: Brand | null) => `
|
|
6
|
-
|
|
6
|
+
body, header, dx-card-small {
|
|
7
7
|
${brandCssVars.reduce(
|
|
8
8
|
(acc, v) => `
|
|
9
9
|
${acc}
|
|
@@ -15,8 +15,8 @@ export const toCss = (brand: Brand | null) => `
|
|
|
15
15
|
`;
|
|
16
16
|
|
|
17
17
|
export default class BrandThemeProvider extends LightningElement {
|
|
18
|
-
static renderMode =
|
|
19
|
-
|
|
18
|
+
static renderMode = "light";
|
|
19
|
+
|
|
20
20
|
@api brand: Brand | null = null;
|
|
21
21
|
|
|
22
22
|
private get css() {
|
|
@@ -34,7 +34,7 @@ export default class BrandThemeProvider extends LightningElement {
|
|
|
34
34
|
setBrandVars() {
|
|
35
35
|
let style = this.querySelector("style");
|
|
36
36
|
|
|
37
|
-
if(!style) {
|
|
37
|
+
if (!style) {
|
|
38
38
|
style = document.createElement("style");
|
|
39
39
|
this.querySelector("#extra_brand_styles")?.appendChild(style);
|
|
40
40
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
<template>
|
|
1
|
+
<template lwc:render-mode="light">
|
|
2
2
|
<button
|
|
3
3
|
if:false={href}
|
|
4
4
|
class={className}
|
|
@@ -7,8 +7,8 @@
|
|
|
7
7
|
aria-label={ariaLabel}
|
|
8
8
|
part="container"
|
|
9
9
|
>
|
|
10
|
-
<span if:false={loading}>
|
|
11
|
-
<slot
|
|
10
|
+
<span if:false={loading} class="button_content">
|
|
11
|
+
<slot></slot>
|
|
12
12
|
</span>
|
|
13
13
|
<dx-icon
|
|
14
14
|
if:true={showIcon}
|
|
@@ -29,8 +29,8 @@
|
|
|
29
29
|
aria-label={ariaLabel}
|
|
30
30
|
part="container"
|
|
31
31
|
>
|
|
32
|
-
<span if:false={loading}>
|
|
33
|
-
<slot
|
|
32
|
+
<span if:false={loading} class="button-content">
|
|
33
|
+
<slot></slot>
|
|
34
34
|
</span>
|
|
35
35
|
<dx-icon
|
|
36
36
|
if:true={showIcon}
|
|
@@ -1,19 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
:host { /* TODO: remove this after it has been completely supplanted by .base-button */
|
|
4
|
-
width: min-content;
|
|
5
|
-
font-size: inherit;
|
|
6
|
-
|
|
7
|
-
--dx-c-button-primary-color: var(--dx-g-blue-vibrant-50);
|
|
8
|
-
--dx-c-button-primary-color-hover: var(--dx-g-blue-vibrant-40);
|
|
9
|
-
--dx-c-button-secondary-color-hover: var(--dx-g-cloud-blue-vibrant-90);
|
|
10
|
-
--dx-c-button-inline-color-hover: var(--dx-g-blue-vibrant-30);
|
|
11
|
-
--dx-c-button-justify-content: center;
|
|
12
|
-
--dx-c-button-opacity: 1;
|
|
13
|
-
--dx-c-button-font-size: var(--dx-g-text-sm);
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
.base-button { /* TODO: remove this after it has been completely supplanted by .base-button */
|
|
1
|
+
:host {
|
|
17
2
|
width: min-content;
|
|
18
3
|
font-size: inherit;
|
|
19
4
|
|
|
@@ -5,11 +5,12 @@ import {
|
|
|
5
5
|
ButtonVariant,
|
|
6
6
|
IconSprite,
|
|
7
7
|
IconSize,
|
|
8
|
-
IconSymbol
|
|
9
|
-
LightningSlotElement
|
|
8
|
+
IconSymbol
|
|
10
9
|
} from "typings/custom";
|
|
11
10
|
|
|
12
11
|
export default class Button extends LightningElement {
|
|
12
|
+
static renderMode = "light";
|
|
13
|
+
|
|
13
14
|
@api ariaLabel: string = "";
|
|
14
15
|
@api disabled: boolean | null = null;
|
|
15
16
|
@api iconSize?: IconSize = "small";
|
|
@@ -34,14 +35,12 @@ export default class Button extends LightningElement {
|
|
|
34
35
|
@api rel: string | null = null;
|
|
35
36
|
|
|
36
37
|
@api focus() {
|
|
37
|
-
const button = this.
|
|
38
|
+
const button = this.querySelector(".button");
|
|
38
39
|
if (button) {
|
|
39
40
|
button.focus();
|
|
40
41
|
}
|
|
41
42
|
}
|
|
42
43
|
|
|
43
|
-
private isSlotEmpty: boolean = true;
|
|
44
|
-
|
|
45
44
|
private get showIcon(): boolean {
|
|
46
45
|
return !!this.iconSymbol && !this.loading;
|
|
47
46
|
}
|
|
@@ -55,14 +54,17 @@ export default class Button extends LightningElement {
|
|
|
55
54
|
this.loading && "state-loading",
|
|
56
55
|
`size-${this.size}`,
|
|
57
56
|
!!this.iconSymbol && "style-icon",
|
|
58
|
-
this.isSlotEmpty && "slot-empty",
|
|
57
|
+
this.isSlotEmpty() && "slot-empty",
|
|
59
58
|
`font-${this.font}`,
|
|
60
59
|
this.iconPosition === "right" ? "icon-right" : "icon-left"
|
|
61
60
|
);
|
|
62
61
|
}
|
|
63
62
|
|
|
64
|
-
private
|
|
65
|
-
|
|
66
|
-
|
|
63
|
+
private isSlotEmpty() {
|
|
64
|
+
return (
|
|
65
|
+
this.querySelector('[name="button_content"]')?.childElementCount ===
|
|
66
|
+
0 &&
|
|
67
|
+
this.querySelector('[name="button_content"]')?.textContent === null
|
|
68
|
+
);
|
|
67
69
|
}
|
|
68
70
|
}
|
|
@@ -2,7 +2,6 @@ import { LightningElement, api } from "lwc";
|
|
|
2
2
|
import cx from "classnames";
|
|
3
3
|
|
|
4
4
|
export default class CardPodcastEpisode extends LightningElement {
|
|
5
|
-
static renderMode = 'light';
|
|
6
5
|
@api body!: string;
|
|
7
6
|
@api datetime!: string;
|
|
8
7
|
@api dateTime?: string | null = null;
|
|
@@ -22,7 +21,6 @@ export default class CardPodcastEpisode extends LightningElement {
|
|
|
22
21
|
private get className() {
|
|
23
22
|
return cx(
|
|
24
23
|
"card-podcast-episode",
|
|
25
|
-
"base-card",
|
|
26
24
|
"dx-card-base_borderless",
|
|
27
25
|
this.isLinkHovered && "dx-card-base_link-hovered"
|
|
28
26
|
);
|
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
|
|
1
|
+
@import "dxHelpers/reset";
|
|
2
|
+
@import "dxHelpers/text";
|
|
3
|
+
|
|
4
|
+
:host {
|
|
2
5
|
--dx-c-card-title-color: var(--dx-g-text-heading-color);
|
|
3
6
|
--dx-c-card-title-font-size: var(--dx-g-text-xl);
|
|
4
7
|
--dx-c-card-title-line-height: 28px;
|
|
@@ -6,6 +9,20 @@ dx-card-title {
|
|
|
6
9
|
--dx-c-card-title-icon-size: 22px;
|
|
7
10
|
}
|
|
8
11
|
|
|
12
|
+
h3.dx-text-heading-4 {
|
|
13
|
+
color: var(--dx-c-card-title-color);
|
|
14
|
+
transition: var(--dx-g-transition-hue-1x);
|
|
15
|
+
font-size: var(--dx-c-card-title-font-size);
|
|
16
|
+
line-height: var(--dx-c-card-title-line-height);
|
|
17
|
+
letter-spacing: var(--dx-c-card-title-letter-spacing);
|
|
18
|
+
word-break: break-word;
|
|
19
|
+
hyphens: auto;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.nowrap {
|
|
23
|
+
white-space: nowrap;
|
|
24
|
+
}
|
|
25
|
+
|
|
9
26
|
dx-icon {
|
|
10
27
|
--dx-c-icon-size: var(--dx-c-card-title-icon-size);
|
|
11
28
|
|
|
@@ -15,7 +32,12 @@ dx-icon {
|
|
|
15
32
|
}
|
|
16
33
|
|
|
17
34
|
@media screen and (max-width: 1024px) {
|
|
35
|
+
.dx-text-heading-4 {
|
|
36
|
+
font-size: 20px;
|
|
37
|
+
line-height: 24px;
|
|
38
|
+
}
|
|
39
|
+
|
|
18
40
|
dx-icon {
|
|
19
41
|
--dx-c-card-title-icon-size: 20px;
|
|
20
42
|
}
|
|
21
|
-
}
|
|
43
|
+
}
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
<template
|
|
1
|
+
<template>
|
|
2
2
|
<h3 class="dx-text-heading-4">
|
|
3
3
|
<a if:true={href} href={href} target={target}>
|
|
4
4
|
{titleToWrap}
|
|
5
|
-
<template if:true={needsSpace}
|
|
5
|
+
<template if:true={needsSpace}> </template>
|
|
6
6
|
<span class="nowrap" if:true={isExternal}>
|
|
7
7
|
{titleNoWrap}
|
|
8
8
|
<dx-icon symbol="new_window" size="override"></dx-icon>
|
|
9
9
|
</span>
|
|
10
10
|
</a>
|
|
11
|
-
<template if:false={href}
|
|
11
|
+
<template if:false={href}>
|
|
12
12
|
{titleToWrap}
|
|
13
|
-
<template if:true={needsSpace}
|
|
13
|
+
<template if:true={needsSpace}> </template>
|
|
14
14
|
<span class="nowrap" if:true={isExternal}>
|
|
15
15
|
{titleNoWrap}
|
|
16
16
|
<dx-icon symbol="new_window" size="override"></dx-icon>
|
|
@@ -1,13 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
--dx-c-button-primary-color: var(--button-primary-color);
|
|
4
|
-
--dx-c-button-primary-color-hover: var(--button-primary-color-hover);
|
|
5
|
-
--border-color: var(--button-primary-color);
|
|
6
|
-
|
|
7
|
-
border-bottom: 1px dashed var(--border-color);
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
.menu-nested::part(content) {
|
|
1
|
+
.menu-nested::part(content),
|
|
2
|
+
.menu-nested .popover.popover-content {
|
|
11
3
|
padding-top: var(--dx-g-spacing-sm);
|
|
12
4
|
width: 354px;
|
|
13
5
|
}
|
|
@@ -18,7 +10,8 @@ dx-dropdown dx-button {
|
|
|
18
10
|
flex-wrap: nowrap;
|
|
19
11
|
}
|
|
20
12
|
|
|
21
|
-
.menu-hidden::part(content)
|
|
13
|
+
.menu-hidden::part(content),
|
|
14
|
+
.menu-hidden .popover.popover-content {
|
|
22
15
|
display: none;
|
|
23
16
|
}
|
|
24
17
|
|
|
@@ -31,7 +24,8 @@ dx-dropdown dx-button {
|
|
|
31
24
|
}
|
|
32
25
|
|
|
33
26
|
@media screen and (min-width: 1000px) {
|
|
34
|
-
.menu-nested-2-col::part(content)
|
|
27
|
+
.menu-nested-2-col::part(content),
|
|
28
|
+
.menu-nested-2-col .popover.popover-content {
|
|
35
29
|
width: 592px;
|
|
36
30
|
}
|
|
37
31
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
<template lwc:render-mode=
|
|
1
|
+
<template lwc:render-mode="light">
|
|
2
2
|
<dx-popover
|
|
3
3
|
aria-label={ariaLabel}
|
|
4
4
|
class={className}
|
|
@@ -13,8 +13,9 @@
|
|
|
13
13
|
width={width}
|
|
14
14
|
>
|
|
15
15
|
<div slot="control">
|
|
16
|
-
<slot></slot>
|
|
16
|
+
<slot></slot>
|
|
17
17
|
</div>
|
|
18
|
+
|
|
18
19
|
<div
|
|
19
20
|
class="menu_list"
|
|
20
21
|
if:false={areOptionsEmpty}
|
|
@@ -20,7 +20,7 @@ interface DropdownOption extends OptionWithNested {
|
|
|
20
20
|
}
|
|
21
21
|
|
|
22
22
|
export default class Dropdown extends LightningElement {
|
|
23
|
-
static renderMode =
|
|
23
|
+
static renderMode = "light";
|
|
24
24
|
|
|
25
25
|
@api value: string | null = null; // "active option" id
|
|
26
26
|
@api valuePath: string = "id"; // path to match for the active value (useful for url matching)
|
|
@@ -6,9 +6,7 @@
|
|
|
6
6
|
:host {
|
|
7
7
|
width: 100%;
|
|
8
8
|
|
|
9
|
-
--dx-c-featured-content-header-background-color
|
|
10
|
-
--dx-g-indigo-vibrant-90
|
|
11
|
-
);
|
|
9
|
+
/* --dx-c-featured-content-header-background-color */
|
|
12
10
|
--dx-c-tree-graphic-color: var(--dx-g-indigo-vibrant-40);
|
|
13
11
|
--dx-c-featured-content-header-padding-horizontal: var(
|
|
14
12
|
--dx-g-page-padding-horizontal
|
|
@@ -42,7 +40,10 @@
|
|
|
42
40
|
position: relative;
|
|
43
41
|
padding: var(--dx-c-featured-content-header-padding-vertical)
|
|
44
42
|
var(--dx-c-featured-content-header-padding-horizontal);
|
|
45
|
-
background-color: var(
|
|
43
|
+
background-color: var(
|
|
44
|
+
--dx-c-featured-content-header-background-color,
|
|
45
|
+
--dx-g-indigo-vibrant-90
|
|
46
|
+
);
|
|
46
47
|
}
|
|
47
48
|
|
|
48
49
|
/* LAYOUTS */
|
|
@@ -380,10 +381,9 @@ dx-image-and-label {
|
|
|
380
381
|
|
|
381
382
|
/* DARK VARIANT */
|
|
382
383
|
.variant_dark {
|
|
383
|
-
background:
|
|
384
|
-
-
|
|
385
|
-
rgb(40, 23, 153) 0%,
|
|
386
|
-
rgb(46, 43, 182) 100%
|
|
384
|
+
background: var(
|
|
385
|
+
--dx-c-featured-content-header-background-color,
|
|
386
|
+
linear-gradient(-180deg, rgb(40, 23, 153) 0%, rgb(46, 43, 182) 100%)
|
|
387
387
|
);
|
|
388
388
|
}
|
|
389
389
|
|
|
@@ -1,11 +1 @@
|
|
|
1
1
|
@import "dxHelpers/commonHeader";
|
|
2
|
-
@import "dxHelpers/text";
|
|
3
|
-
@import "dxHelpers/reset";
|
|
4
|
-
@import "dxHelpers/card";
|
|
5
|
-
|
|
6
|
-
dx-header { /* TODO: these variables definitely aren't getting picked up correctly */
|
|
7
|
-
z-index: var(--dx-g-z-index-500);
|
|
8
|
-
|
|
9
|
-
--dx-c-header-search-width: 316px;
|
|
10
|
-
--dx-g-text-xs: 14px;
|
|
11
|
-
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { HeaderBase } from "dxBaseElements/headerBase";
|
|
2
2
|
|
|
3
3
|
export default class Header extends HeaderBase {
|
|
4
|
-
static renderMode =
|
|
5
|
-
|
|
4
|
+
static renderMode = "light";
|
|
5
|
+
|
|
6
6
|
private get showSignup(): boolean {
|
|
7
7
|
return this.signupLink
|
|
8
8
|
? (this.mobile && !this.isSearchOpen) || !this.mobile
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
@import "dxHelpers/reset";
|
|
2
|
+
|
|
3
|
+
:host {
|
|
2
4
|
--dx-c-color-background: var(--dx-g-brand-default-color-background);
|
|
3
5
|
--dx-c-button-color-background-inactive: var(
|
|
4
6
|
--dx-g-brand-default-button-color-background-inactive
|
|
@@ -13,4 +15,147 @@ header-mobile-nav-menu {
|
|
|
13
15
|
--dx-g-brand-default-button-color-background-inactive-hover
|
|
14
16
|
);
|
|
15
17
|
--dx-c-color-border-2: var(--dx-g-brand-default-color-border-2);
|
|
16
|
-
}
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.nav-menu {
|
|
21
|
+
position: absolute;
|
|
22
|
+
top: 100%;
|
|
23
|
+
left: 0;
|
|
24
|
+
width: 100%;
|
|
25
|
+
max-height: 56vh;
|
|
26
|
+
overflow-y: auto;
|
|
27
|
+
padding: 0 var(--dx-g-spacing-sm) var(--dx-g-spacing-sm)
|
|
28
|
+
var(--dx-g-spacing-sm);
|
|
29
|
+
background: var(--dx-c-color-background);
|
|
30
|
+
box-shadow: 0 20px 28px 0 rgba(0, 20, 45, 0.08);
|
|
31
|
+
transform: translateY(0);
|
|
32
|
+
border-top: 1px solid transparent;
|
|
33
|
+
transition: var(--dx-g-transition-transform-2x),
|
|
34
|
+
var(--dx-g-transition-hue-1x);
|
|
35
|
+
z-index: 1000;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.nav-menu.has-scrollshadow {
|
|
39
|
+
border-color: var(--dx-c-color-border-2);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.nav-menu.state-closed {
|
|
43
|
+
opacity: 0;
|
|
44
|
+
visibility: hidden;
|
|
45
|
+
transform: translateY(-16px);
|
|
46
|
+
pointer-events: none;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
.nav-menu ul {
|
|
50
|
+
display: flex;
|
|
51
|
+
flex-direction: column;
|
|
52
|
+
width: 100%;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.nav-menu_item {
|
|
56
|
+
display: flex;
|
|
57
|
+
flex-direction: column;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
.nav-menu_item,
|
|
61
|
+
.nav-menu_item_cta-main {
|
|
62
|
+
transition: var(--dx-g-transition-hue-1x);
|
|
63
|
+
border-radius: var(--dx-g-spacing-xs);
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
.nav-menu_item_cta-main {
|
|
67
|
+
justify-content: space-between;
|
|
68
|
+
font-family: var(--dx-g-font-display);
|
|
69
|
+
font-size: var(--dx-g-text-base);
|
|
70
|
+
color: var(--dx-g-blue-vibrant-20);
|
|
71
|
+
line-height: 20px;
|
|
72
|
+
padding: var(--dx-g-spacing-sm) var(--dx-g-spacing-md);
|
|
73
|
+
width: 100%;
|
|
74
|
+
display: flex;
|
|
75
|
+
align-items: center;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
.nav-menu ul > .nav-menu_item:not(:last-of-type) {
|
|
79
|
+
margin-bottom: var(--dx-g-spacing-xs);
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
.nav-menu_item.state-open {
|
|
83
|
+
background: var(--dx-c-button-color-background-inactive);
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
.nav-menu_item_cta-main:not(.state-active):hover {
|
|
87
|
+
background: var(--dx-c-button-color-background-inactive);
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
.nav-menu_item.state-open .nav-menu_item_cta-main:hover {
|
|
91
|
+
background: var(--dx-c-button-color-background-inactive-hover);
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
.nav-menu_item.state-open .chevrondown {
|
|
95
|
+
transform: rotateX(180deg);
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
.nav-menu_item_cta-options {
|
|
99
|
+
position: relative;
|
|
100
|
+
display: none;
|
|
101
|
+
flex-direction: column;
|
|
102
|
+
width: 100%;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
.nav-menu_item.state-open > .nav-menu_item_cta-options {
|
|
106
|
+
display: flex;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
.nav-menu_item_cta {
|
|
110
|
+
height: var(--dx-g-spacing-3xl);
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
.nav-menu_item_cta-main.state-active {
|
|
114
|
+
background: var(--dx-c-button-color-background-active);
|
|
115
|
+
color: var(--dx-c-color);
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
.nav-menu_item_cta-main > span {
|
|
119
|
+
transform: translateY(3px); /* ghost padding */
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
.nav-menu_item_cta-sub {
|
|
123
|
+
--dx-c-button-secondary-color-hover: var(
|
|
124
|
+
--dx-c-button-color-background-inactive-hover
|
|
125
|
+
);
|
|
126
|
+
|
|
127
|
+
font-size: var(--dx-g-text-sm);
|
|
128
|
+
width: 100%;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
.nav-menu_item_cta-sub::part(container) {
|
|
132
|
+
justify-content: flex-start;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
.nav-menu_item_cta-sub.state-active {
|
|
136
|
+
text-decoration: underline;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
.nav-menu_item > .nav-menu_item_cta-options:not(:first-of-type) {
|
|
140
|
+
padding-top: var(--dx-g-spacing-xs);
|
|
141
|
+
margin-top: var(--dx-g-spacing-xs);
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
.nav-menu_item > .nav-menu_item_cta-options:not(:first-of-type)::after {
|
|
145
|
+
content: "";
|
|
146
|
+
position: absolute;
|
|
147
|
+
top: 0;
|
|
148
|
+
left: var(--dx-g-spacing-md);
|
|
149
|
+
width: calc(100% - var(--dx-g-spacing-xl));
|
|
150
|
+
height: 1px;
|
|
151
|
+
background: var(--dx-c-color-border-2);
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
.backdrop {
|
|
155
|
+
position: fixed;
|
|
156
|
+
top: 0;
|
|
157
|
+
left: 0;
|
|
158
|
+
height: 100vh;
|
|
159
|
+
width: 100vw;
|
|
160
|
+
z-index: -1;
|
|
161
|
+
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
<template
|
|
1
|
+
<template>
|
|
2
2
|
<nav
|
|
3
3
|
aria-label="Navigation Menu"
|
|
4
4
|
class={className}
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
onscroll={onScroll}
|
|
7
7
|
>
|
|
8
8
|
<ul>
|
|
9
|
-
<template for:each={navItems} for:item="navItem"
|
|
9
|
+
<template for:each={navItems} for:item="navItem">
|
|
10
10
|
<li
|
|
11
11
|
class={navItem.liClassName}
|
|
12
12
|
key={navItem.id}
|
|
@@ -38,17 +38,16 @@
|
|
|
38
38
|
size="medium"
|
|
39
39
|
></dx-icon>
|
|
40
40
|
</button>
|
|
41
|
-
<template if:true={navItem.options}
|
|
42
|
-
<template for:each={navItem.options} for:item="options"
|
|
41
|
+
<template if:true={navItem.options}>
|
|
42
|
+
<template for:each={navItem.options} for:item="options">
|
|
43
43
|
<div
|
|
44
44
|
class="nav-menu_item_cta-options"
|
|
45
45
|
key={options.id}
|
|
46
46
|
>
|
|
47
|
-
<template if:true={options.options}
|
|
47
|
+
<template if:true={options.options}>
|
|
48
48
|
<template
|
|
49
49
|
for:each={options.options}
|
|
50
50
|
for:item="navSubItem"
|
|
51
|
-
lwc:render-mode='light'
|
|
52
51
|
>
|
|
53
52
|
<dx-header-mobile-nav-menu-option
|
|
54
53
|
key={navSubItem.id}
|