@salesforcedevs/dx-components 1.3.103 → 1.3.104-alpha02
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 +2 -3
- package/src/modules/dx/footer/footer.css +1 -1
- package/src/modules/dx/sidebar/sidebar.ts +4 -2
- package/src/modules/dx/sidebarOld/sidebarOld.ts +1 -3
- package/src/modules/dx/toc/toc.css +1 -38
- package/src/modules/dx/toc/toc.html +4 -11
- package/src/modules/dx/toc/toc.ts +0 -45
- package/src/modules/dxHelpers/commonHeader/commonHeader.css +3 -3
- package/src/modules/dxHelpers/commonSidebar/commonSidebar.css +1 -1
- package/LICENSE +0 -12
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@salesforcedevs/dx-components",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.104-alpha02",
|
|
4
4
|
"description": "DX Lightning web components",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"engines": {
|
|
@@ -39,6 +39,5 @@
|
|
|
39
39
|
"@types/vimeo__player": "^2.16.2",
|
|
40
40
|
"eventsourcemock": "^2.0.0",
|
|
41
41
|
"luxon": "^3.1.0"
|
|
42
|
-
}
|
|
43
|
-
"gitHead": "1595697b3a469a6a1723fdc4066617092739b112"
|
|
42
|
+
}
|
|
44
43
|
}
|
|
@@ -156,8 +156,10 @@ export default class Sidebar extends SidebarBase {
|
|
|
156
156
|
this.matchMedia.removeEventListener("change", this.onMediaChange);
|
|
157
157
|
}
|
|
158
158
|
|
|
159
|
-
private onMediaChange = (event: MediaQueryListEvent | MediaQueryList) =>
|
|
160
|
-
|
|
159
|
+
private onMediaChange = (event: MediaQueryListEvent | MediaQueryList) => {
|
|
160
|
+
this.mobile = event.matches;
|
|
161
|
+
this.expanded = !this.mobile;
|
|
162
|
+
};
|
|
161
163
|
|
|
162
164
|
private onSelect(event: CustomEvent) {
|
|
163
165
|
this._value = event.detail.name;
|
|
@@ -88,9 +88,7 @@ export default class Sidebar extends SidebarBase {
|
|
|
88
88
|
|
|
89
89
|
private onMediaChange = (event: MediaQueryListEvent | MediaQueryList) => {
|
|
90
90
|
this.mobile = event.matches;
|
|
91
|
-
|
|
92
|
-
this.expanded = true;
|
|
93
|
-
}
|
|
91
|
+
this.expanded = !this.mobile;
|
|
94
92
|
};
|
|
95
93
|
|
|
96
94
|
private onSelect(event: CustomEvent) {
|
|
@@ -9,15 +9,10 @@
|
|
|
9
9
|
display: flex;
|
|
10
10
|
flex-direction: row-reverse;
|
|
11
11
|
width: var(--dx-c-toc-width);
|
|
12
|
-
max-width:
|
|
12
|
+
max-width: 240px;
|
|
13
13
|
word-break: break-word;
|
|
14
14
|
}
|
|
15
15
|
|
|
16
|
-
.toc_collapsed {
|
|
17
|
-
width: var(--dx-g-spacing-xl);
|
|
18
|
-
margin-left: var(--dx-g-spacing-xl);
|
|
19
|
-
}
|
|
20
|
-
|
|
21
16
|
.toc_content {
|
|
22
17
|
display: flex;
|
|
23
18
|
flex-direction: column;
|
|
@@ -26,11 +21,6 @@
|
|
|
26
21
|
padding-bottom: var(--dx-g-spacing-smd);
|
|
27
22
|
}
|
|
28
23
|
|
|
29
|
-
.state-hide-content {
|
|
30
|
-
opacity: 0;
|
|
31
|
-
pointer-events: none;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
24
|
.toc_title {
|
|
35
25
|
display: flex;
|
|
36
26
|
flex-direction: row;
|
|
@@ -44,29 +34,6 @@
|
|
|
44
34
|
transition: var(--dx-g-transition-hue-1x);
|
|
45
35
|
}
|
|
46
36
|
|
|
47
|
-
.toggle-button.collapsed {
|
|
48
|
-
--dx-c-button-opacity: 1;
|
|
49
|
-
|
|
50
|
-
transform: rotate(180deg);
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
.toggle-button {
|
|
54
|
-
width: var(--dx-g-icon-size-xl);
|
|
55
|
-
height: var(--dx-g-icon-size-xl);
|
|
56
|
-
|
|
57
|
-
--dx-c-button-opacity: 0;
|
|
58
|
-
--dx-c-button-custom-color: var(--dx-g-blue-vibrant-50);
|
|
59
|
-
--dx-c-button-custom-background: white;
|
|
60
|
-
--dx-c-button-custom-border: white;
|
|
61
|
-
--dx-c-button-custom-color-hover: white;
|
|
62
|
-
--dx-c-button-custom-background-hover: var(--dx-g-blue-vibrant-50);
|
|
63
|
-
--dx-c-button-custom-border-hover: var(--dx-g-blue-vibrant-50);
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
.toggle-button:hover {
|
|
67
|
-
--dx-c-button-opacity: 1;
|
|
68
|
-
}
|
|
69
|
-
|
|
70
37
|
.content-button {
|
|
71
38
|
line-height: var(--dx-g-text-lg);
|
|
72
39
|
color: var(--dx-g-blue-vibrant-20);
|
|
@@ -100,7 +67,3 @@
|
|
|
100
67
|
color: var(--dx-g-blue-vibrant-40);
|
|
101
68
|
border-color: var(--dx-g-blue-vibrant-40);
|
|
102
69
|
}
|
|
103
|
-
|
|
104
|
-
.toc:hover .toggle-button {
|
|
105
|
-
--dx-c-button-opacity: 1;
|
|
106
|
-
}
|
|
@@ -1,14 +1,7 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div class=
|
|
3
|
-
<
|
|
4
|
-
|
|
5
|
-
class={toggleButtonClass}
|
|
6
|
-
onclick={toggleShowContent}
|
|
7
|
-
icon-symbol="open_panel"
|
|
8
|
-
variant="custom"
|
|
9
|
-
></dx-button>
|
|
10
|
-
<div if:true={showContent} class="toc toc_content">
|
|
11
|
-
<h2 class={titleClassName}>{title}</h2>
|
|
2
|
+
<div class="toc" role="directory">
|
|
3
|
+
<div class="toc toc_content">
|
|
4
|
+
<h2 class="dx-text-display-8 toc_title">{title}</h2>
|
|
12
5
|
<template for:each={options} for:item="option">
|
|
13
6
|
<a
|
|
14
7
|
href={option.anchor}
|
|
@@ -23,7 +16,7 @@
|
|
|
23
16
|
</template>
|
|
24
17
|
</div>
|
|
25
18
|
</div>
|
|
26
|
-
<div
|
|
19
|
+
<div>
|
|
27
20
|
<slot name="view-pdf"></slot>
|
|
28
21
|
</div>
|
|
29
22
|
</template>
|
|
@@ -35,34 +35,9 @@ export default class Toc extends LightningElement {
|
|
|
35
35
|
}
|
|
36
36
|
|
|
37
37
|
private _value?: string = undefined;
|
|
38
|
-
private showContent: boolean = true;
|
|
39
38
|
|
|
40
39
|
@track _options!: Array<ContentElement>;
|
|
41
40
|
|
|
42
|
-
private get toggleButtonIconSymbol() {
|
|
43
|
-
return this.showContent ? "forward" : "back";
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
private get toggleButtonAriaLabel() {
|
|
47
|
-
return this.showContent
|
|
48
|
-
? "Hide table of contents"
|
|
49
|
-
: "Show table of contents";
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
private get contentClassName() {
|
|
53
|
-
return cx("toc", !this.showContent && "toc_collapsed");
|
|
54
|
-
}
|
|
55
|
-
private get toggleButtonClass() {
|
|
56
|
-
return cx("toggle-button", !this.showContent && "collapsed");
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
private get titleClassName() {
|
|
60
|
-
return cx(
|
|
61
|
-
"dx-text-display-8 toc_title",
|
|
62
|
-
!this.showContent && "state-hide-content"
|
|
63
|
-
);
|
|
64
|
-
}
|
|
65
|
-
|
|
66
41
|
private onClick(e: Event) {
|
|
67
42
|
const target = e.currentTarget as HTMLElement;
|
|
68
43
|
const id = target.getAttribute("contentid");
|
|
@@ -84,24 +59,4 @@ export default class Toc extends LightningElement {
|
|
|
84
59
|
content_category: "cta"
|
|
85
60
|
});
|
|
86
61
|
}
|
|
87
|
-
|
|
88
|
-
private toggleShowContent(e: Event) {
|
|
89
|
-
this.showContent = !this.showContent;
|
|
90
|
-
this.trackShowContent(e);
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
private trackShowContent(event: Event) {
|
|
94
|
-
let action = "collapse";
|
|
95
|
-
if (this.showContent) {
|
|
96
|
-
action = "expand";
|
|
97
|
-
}
|
|
98
|
-
sendGtm(event.target!, "custEv_tableOfContents", {
|
|
99
|
-
click_text: this.toggleButtonAriaLabel,
|
|
100
|
-
clickAction: action,
|
|
101
|
-
click_url: "",
|
|
102
|
-
element_title: this.title,
|
|
103
|
-
element_type: "button",
|
|
104
|
-
content_category: "cta"
|
|
105
|
-
});
|
|
106
|
-
}
|
|
107
62
|
}
|
|
@@ -43,7 +43,7 @@ header.state-show-mobile-nav .header_l2_group-nav_overflow {
|
|
|
43
43
|
.header_l1 {
|
|
44
44
|
height: var(--dx-g-spacing-3xl);
|
|
45
45
|
background: var(--dx-g-brand-current-color-background-2);
|
|
46
|
-
padding: 0 var(--dx-g-
|
|
46
|
+
padding: 0 var(--dx-g-header-padding-horizontal);
|
|
47
47
|
position: relative;
|
|
48
48
|
}
|
|
49
49
|
|
|
@@ -60,7 +60,7 @@ header.state-show-mobile-nav .header_l2_group-nav_overflow {
|
|
|
60
60
|
.header_l2 {
|
|
61
61
|
height: var(--dx-g-spacing-4xl);
|
|
62
62
|
background: var(--dx-g-brand-current-color-background);
|
|
63
|
-
padding: var(--dx-g-spacing-lg) var(--dx-g-
|
|
63
|
+
padding: var(--dx-g-spacing-lg) var(--dx-g-header-padding-horizontal);
|
|
64
64
|
}
|
|
65
65
|
|
|
66
66
|
.header_l2_group {
|
|
@@ -121,7 +121,7 @@ header.state-show-mobile-nav .header_l2_group-nav_overflow {
|
|
|
121
121
|
|
|
122
122
|
@media (max-width: 768px) {
|
|
123
123
|
.header_l2_group-nav {
|
|
124
|
-
padding-left: calc(var(--dx-g-
|
|
124
|
+
padding-left: calc(var(--dx-g-header-padding-horizontal) - 4px);
|
|
125
125
|
}
|
|
126
126
|
|
|
127
127
|
.header_l2_group-nav_overflow {
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
--dx-c-sidebar-button-color-hover: white;
|
|
10
10
|
--dx-c-sidebar-button-background-hover: var(--dx-g-blue-vibrant-50);
|
|
11
11
|
--dx-c-sidebar-button-border-hover: var(--dx-g-blue-vibrant-50);
|
|
12
|
-
--dx-c-sidebar-left-padding: var(--dx-g-
|
|
12
|
+
--dx-c-sidebar-left-padding: var(--dx-g-header-padding-horizontal);
|
|
13
13
|
--dx-c-sidebar-vertical-padding: var(--dx-g-spacing-md);
|
|
14
14
|
}
|
|
15
15
|
|
package/LICENSE
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
Copyright (c) 2020, Salesforce.com, Inc.
|
|
2
|
-
All rights reserved.
|
|
3
|
-
|
|
4
|
-
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
|
|
5
|
-
|
|
6
|
-
* Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
|
|
7
|
-
|
|
8
|
-
* Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
|
|
9
|
-
|
|
10
|
-
* Neither the name of Salesforce.com nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
|
|
11
|
-
|
|
12
|
-
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|