@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
|
@@ -4,8 +4,6 @@ import { OptionWithNested } from "typings/custom";
|
|
|
4
4
|
import { deepmapOptions } from "dxUtils/options";
|
|
5
5
|
|
|
6
6
|
export default class HeaderMobileNavMenu extends LightningElement {
|
|
7
|
-
static renderMode = 'light';
|
|
8
|
-
|
|
9
7
|
@api open: boolean = false;
|
|
10
8
|
@api value: string | null = null;
|
|
11
9
|
@api pathname: string | null = null;
|
|
@@ -64,7 +62,7 @@ export default class HeaderMobileNavMenu extends LightningElement {
|
|
|
64
62
|
|
|
65
63
|
renderedCallback() {
|
|
66
64
|
if (!this.navElement) {
|
|
67
|
-
this.navElement = this.querySelector("nav");
|
|
65
|
+
this.navElement = this.template.querySelector("nav");
|
|
68
66
|
}
|
|
69
67
|
if (this.open && !this.wasOpen && this.value) {
|
|
70
68
|
this.scrollToAccordianSection();
|
|
@@ -75,10 +73,10 @@ export default class HeaderMobileNavMenu extends LightningElement {
|
|
|
75
73
|
}
|
|
76
74
|
|
|
77
75
|
private scrollToAccordianSection() {
|
|
78
|
-
const element = this.querySelector(
|
|
76
|
+
const element = this.template.querySelector(
|
|
79
77
|
`li[data-id="${this.value}"]`
|
|
80
78
|
);
|
|
81
|
-
const container = this.querySelector(".nav-menu");
|
|
79
|
+
const container = this.template.querySelector(".nav-menu");
|
|
82
80
|
if (element && container) {
|
|
83
81
|
container.scrollTop = element.offsetTop - 8;
|
|
84
82
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
<template
|
|
1
|
+
<template>
|
|
2
2
|
<nav role="navigation" aria-label={ariaLabel}>
|
|
3
3
|
<ul class="nav-list">
|
|
4
|
-
<template for:each={navItems} for:item="navItem"
|
|
4
|
+
<template for:each={navItems} for:item="navItem">
|
|
5
5
|
<li key={navItem.id}>
|
|
6
6
|
<dx-tab
|
|
7
7
|
if:false={navItem.options}
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import { LightningElement, api } from "lwc";
|
|
2
2
|
import { TabVariant, OptionWithNested } from "typings/custom";
|
|
3
3
|
export default class HeaderNav extends LightningElement {
|
|
4
|
-
static renderMode = 'light';
|
|
5
|
-
|
|
6
4
|
@api pathname: string | null = null;
|
|
7
5
|
@api variant: TabVariant = "default";
|
|
8
6
|
@api ariaLabel: string = "Primary Navigation";
|
|
@@ -1,3 +1,62 @@
|
|
|
1
|
-
|
|
1
|
+
@import "dxHelpers/reset";
|
|
2
|
+
|
|
3
|
+
/* DESKTOP */
|
|
4
|
+
|
|
5
|
+
:host {
|
|
2
6
|
--toggle-width: var(--dx-g-spacing-5xl);
|
|
3
|
-
}
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.desktop_search-container {
|
|
10
|
+
position: relative;
|
|
11
|
+
display: flex;
|
|
12
|
+
height: var(--dx-g-spacing-xl);
|
|
13
|
+
font-size: var(--dx-g-text-sm);
|
|
14
|
+
font-family: var(--dx-g-font-sans);
|
|
15
|
+
color: var(--dx-g-gray-50);
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.desktop_search-container dx-input {
|
|
19
|
+
--dx-c-input-width: calc(
|
|
20
|
+
var(--dx-c-header-search-width) - var(--toggle-width)
|
|
21
|
+
);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
/* MOBILE */
|
|
25
|
+
|
|
26
|
+
.mobile_search-button {
|
|
27
|
+
position: relative;
|
|
28
|
+
z-index: 3;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.mobile_search-dropdown {
|
|
32
|
+
--dx-c-popover-border-radius: 0;
|
|
33
|
+
--dx-c-popover-border: none;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.mobile_search-input {
|
|
37
|
+
position: absolute;
|
|
38
|
+
top: 0;
|
|
39
|
+
left: 0;
|
|
40
|
+
height: 100%;
|
|
41
|
+
width: 100%;
|
|
42
|
+
transition: var(--dx-g-transition-hue-1x);
|
|
43
|
+
opacity: 0;
|
|
44
|
+
pointer-events: none;
|
|
45
|
+
|
|
46
|
+
--dx-c-input-border: none;
|
|
47
|
+
--dx-c-input-border-radius: 0;
|
|
48
|
+
--dx-c-input-border-active: none;
|
|
49
|
+
--dx-c-input-icon-color: var(--dx-g-blue-vibrant-20);
|
|
50
|
+
--dx-c-input-padding: 0 var(--dx-g-spacing-4xl) 0 var(--dx-g-spacing-md);
|
|
51
|
+
--dx-c-input-background: var(--dx-g-brand-current-color-background-2);
|
|
52
|
+
--dx-c-input-background-active: var(
|
|
53
|
+
--dx-g-brand-current-color-background-2
|
|
54
|
+
);
|
|
55
|
+
--dx-c-input-height: 100% !important;
|
|
56
|
+
--dx-c-input-width: 100%;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.mobile_search-input.state-open {
|
|
60
|
+
opacity: 1;
|
|
61
|
+
pointer-events: auto;
|
|
62
|
+
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
<template
|
|
1
|
+
<template>
|
|
2
2
|
<div class={className} role="search" aria-label="Records Search">
|
|
3
3
|
<!-- MOBILE -->
|
|
4
|
-
<template if:true={mobile}
|
|
4
|
+
<template if:true={mobile}>
|
|
5
5
|
<dx-dropdown
|
|
6
6
|
aria-label="Record Type"
|
|
7
7
|
class="mobile_search-dropdown"
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
</template>
|
|
38
38
|
|
|
39
39
|
<!-- DESKTOP -->
|
|
40
|
-
<template if:false={mobile}
|
|
40
|
+
<template if:false={mobile}>
|
|
41
41
|
<dx-dropdown
|
|
42
42
|
options={suggestions}
|
|
43
43
|
open={isDropdownOpen}
|
|
@@ -1,9 +1,5 @@
|
|
|
1
1
|
import { LightningElement, api } from "lwc";
|
|
2
|
-
import {
|
|
3
|
-
LightningSlotElement,
|
|
4
|
-
PopoverRequestCloseType,
|
|
5
|
-
PopperPlacement
|
|
6
|
-
} from "typings/custom";
|
|
2
|
+
import { PopoverRequestCloseType, PopperPlacement } from "typings/custom";
|
|
7
3
|
|
|
8
4
|
import { computePosition, flip, size, shift } from "@floating-ui/dom";
|
|
9
5
|
import cx from "classnames";
|
|
@@ -23,6 +19,8 @@ const isEventOutsideElements = (
|
|
|
23
19
|
);
|
|
24
20
|
|
|
25
21
|
export default class Popover extends LightningElement {
|
|
22
|
+
static renderMode = "light";
|
|
23
|
+
|
|
26
24
|
@api ariaLabel: string | null = null;
|
|
27
25
|
@api offset?: "small" | "medium";
|
|
28
26
|
@api pagePadding?: number = 16; // padding between dropdown and the edge of the page
|
|
@@ -118,8 +116,10 @@ export default class Popover extends LightningElement {
|
|
|
118
116
|
|
|
119
117
|
renderedCallback() {
|
|
120
118
|
if (!this.popover) {
|
|
121
|
-
this.popover = this.
|
|
119
|
+
this.popover = this.querySelector(".popover-container");
|
|
122
120
|
}
|
|
121
|
+
|
|
122
|
+
this.doWeirdControlStuff();
|
|
123
123
|
}
|
|
124
124
|
|
|
125
125
|
// GETTERS
|
|
@@ -127,6 +127,7 @@ export default class Popover extends LightningElement {
|
|
|
127
127
|
private get className() {
|
|
128
128
|
return cx(
|
|
129
129
|
"popover",
|
|
130
|
+
"popover-content",
|
|
130
131
|
this.offset && `popover-offset-${this.offset}`,
|
|
131
132
|
this.small && "popover-small",
|
|
132
133
|
this.width && "popover-overridewidth",
|
|
@@ -232,23 +233,36 @@ export default class Popover extends LightningElement {
|
|
|
232
233
|
this.openPopover();
|
|
233
234
|
};
|
|
234
235
|
|
|
235
|
-
private onSlotChange(e: LightningSlotElement) {
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
236
|
+
// private onSlotChange(e: LightningSlotElement) {
|
|
237
|
+
// const slot = e.target;
|
|
238
|
+
// const elements = slot.assignedElements();
|
|
239
|
+
// const slotted = elements.length === 0 ? null : elements[0];
|
|
240
|
+
// // allows dropdown/select to compose popover
|
|
241
|
+
// const control =
|
|
242
|
+
// slotted.tagName === "SLOT" ? slotted.firstChild : slotted;
|
|
243
|
+
// const onboardControl =
|
|
244
|
+
// (!this.control || (control && !control.isSameNode(this.control))) &&
|
|
245
|
+
// control;
|
|
246
|
+
// if (onboardControl) {
|
|
247
|
+
// control.setAttribute("aria-haspopup", "true");
|
|
248
|
+
// control.style.cursor = this.openOnHover ? "default" : "cursor";
|
|
249
|
+
// this.control = control;
|
|
250
|
+
// this.addControlListeners();
|
|
251
|
+
// this.setPosition();
|
|
252
|
+
// }
|
|
253
|
+
// }
|
|
254
|
+
|
|
255
|
+
private doWeirdControlStuff() {
|
|
256
|
+
const control = this.querySelector('[slot="control"]');
|
|
257
|
+
|
|
258
|
+
if (control) {
|
|
246
259
|
control.setAttribute("aria-haspopup", "true");
|
|
247
260
|
control.style.cursor = this.openOnHover ? "default" : "cursor";
|
|
248
261
|
this.control = control;
|
|
249
|
-
this.addControlListeners();
|
|
250
|
-
this.setPosition();
|
|
251
262
|
}
|
|
263
|
+
|
|
264
|
+
this.addControlListeners();
|
|
265
|
+
this.setPosition();
|
|
252
266
|
}
|
|
253
267
|
|
|
254
268
|
private onKeyDown(e: KeyboardEvent): void {
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { LightningElement, api } from "lwc";
|
|
2
2
|
|
|
3
3
|
export default class RelativeDateTime extends LightningElement {
|
|
4
|
-
static renderMode = 'light';
|
|
5
4
|
@api messageWhenHoursPast: String = "";
|
|
6
5
|
@api messageWhenDaysPast: String = "";
|
|
7
6
|
@api messageWhenWeeksPast: String = "";
|