@salesforcedevs/dx-components 1.3.151-canary.0 → 1.3.152
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/LICENSE +12 -0
- package/lwc.config.json +0 -4
- package/package.json +3 -2
- package/src/modules/dx/button/button.css +1 -4
- package/src/modules/dx/button/button.ts +0 -15
- package/src/modules/dx/checkbox/checkbox.ts +2 -25
- package/src/modules/dx/faq/faq.html +2 -6
- package/src/modules/dx/featuresListHeader/featuresListHeader.css +1 -6
- package/src/modules/dx/featuresListHeader/featuresListHeader.html +1 -3
- package/src/modules/dx/featuresListHeader/featuresListHeader.ts +0 -12
- package/src/modules/dx/input/input.html +0 -1
- package/src/modules/dx/input/input.ts +5 -37
- package/src/modules/dx/popover/popover.ts +3 -3
- package/src/modules/dx/scrollManager/scrollManager.ts +0 -1
- package/src/modules/dx/sectionBanner/sectionBanner.css +0 -2
- package/src/modules/dx/select/select.ts +1 -11
- package/src/modules/dx/stepSequence/stepSequence.css +4 -0
- package/src/modules/dx/stepSequence/stepSequence.html +0 -1
- package/src/modules/dx/stepSequence/stepSequence.ts +33 -159
- package/src/modules/dx/tabPanelItem/tabPanelItem.css +1 -0
- package/src/modules/dx/tabPanelItem/tabPanelItem.html +13 -2
- package/src/modules/dx/tabPanelItem/tabPanelItem.ts +6 -1
- package/src/modules/dx/tabPanelList/tabPanelList.css +2 -0
- package/src/modules/dx/tabPanelList/tabPanelList.html +18 -12
- package/src/modules/dx/alert/alert.css +0 -108
- package/src/modules/dx/alert/alert.html +0 -36
- package/src/modules/dx/alert/alert.ts +0 -137
- package/src/modules/dx/cardStep/cardStep.css +0 -111
- package/src/modules/dx/cardStep/cardStep.html +0 -31
- package/src/modules/dx/cardStep/cardStep.ts +0 -55
- package/src/modules/dx/cardStep/mockProps.ts +0 -60
- package/src/modules/dxBaseElements/lightningElementWithState/lightningElementWithState.ts +0 -93
- package/src/modules/dxUtils/list/list.ts +0 -11
- package/yarn-error.log +0 -18466
package/LICENSE
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
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.
|
package/lwc.config.json
CHANGED
|
@@ -4,7 +4,6 @@
|
|
|
4
4
|
{ "npm": "@salesforcedevs/dw-components" }
|
|
5
5
|
],
|
|
6
6
|
"expose": [
|
|
7
|
-
"dx/alert",
|
|
8
7
|
"dx/audio",
|
|
9
8
|
"dx/banner",
|
|
10
9
|
"dx/brandThemeProvider",
|
|
@@ -23,7 +22,6 @@
|
|
|
23
22
|
"dx/cardNews",
|
|
24
23
|
"dx/cardPodcastEpisode",
|
|
25
24
|
"dx/cardSmall",
|
|
26
|
-
"dx/cardStep",
|
|
27
25
|
"dx/cardTrailheadModule",
|
|
28
26
|
"dx/cardTrial",
|
|
29
27
|
"dx/cardTrialExpanded",
|
|
@@ -91,7 +89,6 @@
|
|
|
91
89
|
"dx/typeBadge",
|
|
92
90
|
"dx/vimeoPlayer",
|
|
93
91
|
"dxBaseElements/headerBase",
|
|
94
|
-
"dxBaseElements/lightningElementWithState",
|
|
95
92
|
"dxBaseElements/matchMediaElement",
|
|
96
93
|
"dxConstants/brands",
|
|
97
94
|
"dxConstants/colors",
|
|
@@ -113,7 +110,6 @@
|
|
|
113
110
|
"dxUtils/dates",
|
|
114
111
|
"dxUtils/highlight",
|
|
115
112
|
"dxUtils/language",
|
|
116
|
-
"dxUtils/list",
|
|
117
113
|
"dxUtils/lwc",
|
|
118
114
|
"dxUtils/normalizers",
|
|
119
115
|
"dxUtils/queryCoordinator",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@salesforcedevs/dx-components",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.152",
|
|
4
4
|
"description": "DX Lightning web components",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"engines": {
|
|
@@ -40,5 +40,6 @@
|
|
|
40
40
|
"@types/vimeo__player": "^2.16.2",
|
|
41
41
|
"eventsourcemock": "^2.0.0",
|
|
42
42
|
"luxon": "^3.1.0"
|
|
43
|
-
}
|
|
43
|
+
},
|
|
44
|
+
"gitHead": "c5a985566863a4a94e243299855702fab466a66c"
|
|
44
45
|
}
|
|
@@ -50,7 +50,6 @@
|
|
|
50
50
|
|
|
51
51
|
.button dx-icon {
|
|
52
52
|
display: inline;
|
|
53
|
-
vertical-align: var(--dx-c-button-icon-vertical-align, unset);
|
|
54
53
|
}
|
|
55
54
|
|
|
56
55
|
.button.variant_inline dx-icon,
|
|
@@ -62,7 +61,6 @@
|
|
|
62
61
|
font-family: inherit;
|
|
63
62
|
font-size: inherit;
|
|
64
63
|
font-weight: inherit;
|
|
65
|
-
vertical-align: var(--dx-c-button-span-vertical-align, unset);
|
|
66
64
|
}
|
|
67
65
|
|
|
68
66
|
.button:not(.variant_inline-inherit).font-display {
|
|
@@ -197,8 +195,7 @@
|
|
|
197
195
|
}
|
|
198
196
|
|
|
199
197
|
/* custom */
|
|
200
|
-
.button.variant_custom
|
|
201
|
-
.button.variant_custom:hover.state-disabled {
|
|
198
|
+
.button.variant_custom {
|
|
202
199
|
color: var(--dx-c-button-custom-color);
|
|
203
200
|
background: var(--dx-c-button-custom-background);
|
|
204
201
|
border: 1px solid var(--dx-c-button-custom-border);
|
|
@@ -10,7 +10,6 @@ import {
|
|
|
10
10
|
} from "typings/custom";
|
|
11
11
|
|
|
12
12
|
export default class Button extends LightningElement {
|
|
13
|
-
private _didSetFormAttribute = false;
|
|
14
13
|
@api ariaLabel: string = "";
|
|
15
14
|
@api disabled: boolean | null = null;
|
|
16
15
|
@api iconSize?: IconSize = "small";
|
|
@@ -22,7 +21,6 @@ export default class Button extends LightningElement {
|
|
|
22
21
|
@api variant: ButtonVariant = "primary";
|
|
23
22
|
@api inlineTextColor: ButtonTextColor = "dark";
|
|
24
23
|
@api font: "display" | "sans" = "display";
|
|
25
|
-
@api form: string | undefined;
|
|
26
24
|
@api name?: string;
|
|
27
25
|
@api value?: any;
|
|
28
26
|
|
|
@@ -63,19 +61,6 @@ export default class Button extends LightningElement {
|
|
|
63
61
|
);
|
|
64
62
|
}
|
|
65
63
|
|
|
66
|
-
renderedCallback() {
|
|
67
|
-
if (
|
|
68
|
-
!this.href &&
|
|
69
|
-
typeof this.form !== "undefined" &&
|
|
70
|
-
!this._didSetFormAttribute
|
|
71
|
-
) {
|
|
72
|
-
this._didSetFormAttribute = true;
|
|
73
|
-
this.template
|
|
74
|
-
.querySelector("button")
|
|
75
|
-
?.setAttribute("form", this.form);
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
|
|
79
64
|
private onSlotChange(e: LightningSlotElement) {
|
|
80
65
|
const slot = e.target;
|
|
81
66
|
this.isSlotEmpty = slot.assignedElements().length !== 0;
|
|
@@ -5,12 +5,12 @@ export default class Checkbox extends LightningElement {
|
|
|
5
5
|
@api disabled: boolean = false;
|
|
6
6
|
@api errorMessage?: string = "Please check this box if you want to proceed";
|
|
7
7
|
@api label?: string;
|
|
8
|
+
@api name: string | null = null;
|
|
9
|
+
@api required: boolean = false;
|
|
8
10
|
@api type: "checkbox" | "radio" = "checkbox";
|
|
9
11
|
@api value!: string;
|
|
10
12
|
|
|
11
13
|
private _checked: boolean = false;
|
|
12
|
-
private _required: boolean = false;
|
|
13
|
-
private _name: string | null = null;
|
|
14
14
|
|
|
15
15
|
@api
|
|
16
16
|
get checked(): boolean {
|
|
@@ -20,24 +20,6 @@ export default class Checkbox extends LightningElement {
|
|
|
20
20
|
this._checked = value;
|
|
21
21
|
}
|
|
22
22
|
|
|
23
|
-
@api
|
|
24
|
-
get name(): string | null {
|
|
25
|
-
return this._name;
|
|
26
|
-
}
|
|
27
|
-
set name(value: string | null) {
|
|
28
|
-
this._name = value;
|
|
29
|
-
this.setAttribute("name", value); // reflect to HTML
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
@api
|
|
33
|
-
get required(): boolean {
|
|
34
|
-
return this._required;
|
|
35
|
-
}
|
|
36
|
-
set required(value: boolean) {
|
|
37
|
-
this._required = value;
|
|
38
|
-
this.setAttribute("required", value); // reflect to HTML
|
|
39
|
-
}
|
|
40
|
-
|
|
41
23
|
private showValidity = false;
|
|
42
24
|
|
|
43
25
|
private get valid(): boolean {
|
|
@@ -58,11 +40,6 @@ export default class Checkbox extends LightningElement {
|
|
|
58
40
|
return this.valid;
|
|
59
41
|
}
|
|
60
42
|
|
|
61
|
-
@api
|
|
62
|
-
checkValidity(): boolean {
|
|
63
|
-
return this.valid;
|
|
64
|
-
}
|
|
65
|
-
|
|
66
43
|
private onChange(e: InputEvent) {
|
|
67
44
|
this._checked = ((e.currentTarget as HTMLInputElement) || {}).checked;
|
|
68
45
|
this.dispatchEvent(
|
|
@@ -23,13 +23,9 @@
|
|
|
23
23
|
color="blue-vibrant-20"
|
|
24
24
|
></dx-icon-badge>
|
|
25
25
|
</summary>
|
|
26
|
-
<p class="faq-body dx-text-body-2">
|
|
27
|
-
|
|
28
|
-
value={it.value.body}
|
|
29
|
-
></dx-formatted-rich-text>
|
|
30
|
-
</p>
|
|
26
|
+
<p class="faq-body dx-text-body-2">{it.value.body}</p>
|
|
27
|
+
<dx-hr no-padding="true"></dx-hr>
|
|
31
28
|
</details>
|
|
32
|
-
<dx-hr key={it.value.title} no-padding="true"></dx-hr>
|
|
33
29
|
</template>
|
|
34
30
|
</div>
|
|
35
31
|
</div>
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
flex-direction: column;
|
|
15
15
|
justify-content: center;
|
|
16
16
|
align-items: flex-start;
|
|
17
|
-
padding: var(--dx-g-spacing-
|
|
17
|
+
padding: var(--dx-g-spacing-4xl) 0;
|
|
18
18
|
min-height: 460px;
|
|
19
19
|
text-align: left;
|
|
20
20
|
background-position: center;
|
|
@@ -62,11 +62,6 @@ dx-button {
|
|
|
62
62
|
margin-top: var(--dx-g-spacing-smd);
|
|
63
63
|
}
|
|
64
64
|
|
|
65
|
-
img.desktop {
|
|
66
|
-
padding-left: 20px;
|
|
67
|
-
max-width: 50%; /* assumes desktop images are high-res */
|
|
68
|
-
}
|
|
69
|
-
|
|
70
65
|
img.mobile {
|
|
71
66
|
display: none;
|
|
72
67
|
}
|
|
@@ -2,9 +2,7 @@
|
|
|
2
2
|
<div class="container" style={style}>
|
|
3
3
|
<div class={textStyle}>
|
|
4
4
|
<h1 class="heading dx-text-display-2">
|
|
5
|
-
<dx-formatted-rich-text
|
|
6
|
-
value={displayTitle}
|
|
7
|
-
></dx-formatted-rich-text>
|
|
5
|
+
<dx-formatted-rich-text value={title}></dx-formatted-rich-text>
|
|
8
6
|
</h1>
|
|
9
7
|
<span if:true={subtitle} class="dx-text-display-5">{subtitle}</span>
|
|
10
8
|
<div class="features-list">
|
|
@@ -4,7 +4,6 @@ import { track } from "dxUtils/analytics";
|
|
|
4
4
|
import { toJson } from "dxUtils/normalizers";
|
|
5
5
|
|
|
6
6
|
export default class FeaturesListHeader extends LightningElement {
|
|
7
|
-
private _displayTitle: string | null = null;
|
|
8
7
|
@api title!: string;
|
|
9
8
|
@api subtitle?: string;
|
|
10
9
|
@api ctaLabel!: string;
|
|
@@ -26,17 +25,6 @@ export default class FeaturesListHeader extends LightningElement {
|
|
|
26
25
|
this._featuresList = toJson(value);
|
|
27
26
|
}
|
|
28
27
|
|
|
29
|
-
// For use when displayed title will have embed HTML, i.e., is "rich text"
|
|
30
|
-
@api
|
|
31
|
-
get displayTitle() {
|
|
32
|
-
return typeof this._displayTitle === "string"
|
|
33
|
-
? this._displayTitle
|
|
34
|
-
: this.title;
|
|
35
|
-
}
|
|
36
|
-
set displayTitle(value: string | null) {
|
|
37
|
-
this._displayTitle = value;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
28
|
private get style() {
|
|
41
29
|
return cx(
|
|
42
30
|
this.backgroundColor &&
|
|
@@ -30,8 +30,9 @@ export default class Input extends LightningElement {
|
|
|
30
30
|
@api loading: boolean = false;
|
|
31
31
|
@api missingErrorMessage: string = "Complete this field";
|
|
32
32
|
@api formatErrorMessage?: string;
|
|
33
|
+
@api name?: string;
|
|
33
34
|
@api placeholder!: string;
|
|
34
|
-
@api
|
|
35
|
+
@api required = false;
|
|
35
36
|
@api role: string | null = null;
|
|
36
37
|
@api shortcutKey: string | null = null;
|
|
37
38
|
@api size: "small" | "large" | "override" = "small";
|
|
@@ -47,24 +48,6 @@ export default class Input extends LightningElement {
|
|
|
47
48
|
this._value = value || "";
|
|
48
49
|
}
|
|
49
50
|
|
|
50
|
-
@api
|
|
51
|
-
get name() {
|
|
52
|
-
return this._name;
|
|
53
|
-
}
|
|
54
|
-
set name(name: string | undefined) {
|
|
55
|
-
this._name = name;
|
|
56
|
-
this.setAttribute("name", name); // reflect to HTML
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
@api
|
|
60
|
-
get required(): boolean {
|
|
61
|
-
return this._required;
|
|
62
|
-
}
|
|
63
|
-
set required(value: boolean) {
|
|
64
|
-
this._required = value;
|
|
65
|
-
this.setAttribute("required", value); // reflect to HTML
|
|
66
|
-
}
|
|
67
|
-
|
|
68
51
|
@api
|
|
69
52
|
get errorMessage() {
|
|
70
53
|
return this._errorMessage;
|
|
@@ -82,7 +65,7 @@ export default class Input extends LightningElement {
|
|
|
82
65
|
|
|
83
66
|
@api
|
|
84
67
|
reportValidity(): boolean {
|
|
85
|
-
if (this.
|
|
68
|
+
if (this.isRequiredAndFilled) {
|
|
86
69
|
this._errorMessage = this.missingErrorMessage;
|
|
87
70
|
return false;
|
|
88
71
|
}
|
|
@@ -98,25 +81,10 @@ export default class Input extends LightningElement {
|
|
|
98
81
|
return true;
|
|
99
82
|
}
|
|
100
83
|
|
|
101
|
-
@api checkValidity(): boolean {
|
|
102
|
-
if (this.isRequiredButEmpty) {
|
|
103
|
-
return false;
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
const typeValidator = typeValidatorMap[this.type];
|
|
107
|
-
if (typeValidator && !typeValidator.validator(this.value)) {
|
|
108
|
-
return false;
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
return true;
|
|
112
|
-
}
|
|
113
|
-
|
|
114
84
|
private _errorMessage: string = "";
|
|
115
85
|
private focused: boolean = false;
|
|
116
86
|
private input: HTMLInputElement | null = null;
|
|
117
87
|
private _value: string | null = null;
|
|
118
|
-
private _name?: string;
|
|
119
|
-
private _required: boolean = false;
|
|
120
88
|
private _loading: boolean = false;
|
|
121
89
|
private isMac: boolean = false;
|
|
122
90
|
|
|
@@ -139,7 +107,7 @@ export default class Input extends LightningElement {
|
|
|
139
107
|
private get inputInvalid() {
|
|
140
108
|
const typeValidator = typeValidatorMap[this.type];
|
|
141
109
|
return (
|
|
142
|
-
this.
|
|
110
|
+
this.isRequiredAndFilled &&
|
|
143
111
|
typeValidator &&
|
|
144
112
|
!typeValidator.validator(this.value)
|
|
145
113
|
);
|
|
@@ -183,7 +151,7 @@ export default class Input extends LightningElement {
|
|
|
183
151
|
return `${this.commandKey}-${this.shortcutKey} is the search shortcut`;
|
|
184
152
|
}
|
|
185
153
|
|
|
186
|
-
private get
|
|
154
|
+
private get isRequiredAndFilled() {
|
|
187
155
|
return this.required && (!this.value || !this.value.trim());
|
|
188
156
|
}
|
|
189
157
|
|
|
@@ -254,9 +254,9 @@ export default class Popover extends LightningElement {
|
|
|
254
254
|
const elements = slot.assignedElements();
|
|
255
255
|
const slotted = elements.length === 0 ? null : elements[0];
|
|
256
256
|
// allows dropdown/select to compose popover
|
|
257
|
-
const slotElement = (
|
|
258
|
-
|
|
259
|
-
|
|
257
|
+
const slotElement = (slotted?.tagName === "SLOT"
|
|
258
|
+
? slotted.firstChild
|
|
259
|
+
: slotted) as HTMLElement | null;
|
|
260
260
|
const isWorkToDo =
|
|
261
261
|
slotElement &&
|
|
262
262
|
(!this.control || !slotElement.isSameNode(this.control));
|
|
@@ -166,7 +166,6 @@ export default class ScrollManager extends LightningElement {
|
|
|
166
166
|
saveScroll = throttle(100, () => {
|
|
167
167
|
window.history.replaceState(
|
|
168
168
|
{
|
|
169
|
-
...window.history.state,
|
|
170
169
|
scroll: {
|
|
171
170
|
value: document.body.scrollTop,
|
|
172
171
|
docSize: document.body.scrollHeight
|
|
@@ -6,7 +6,6 @@
|
|
|
6
6
|
--padding-top: var(--dx-g-spacing-4xl);
|
|
7
7
|
--margin-top: 80px;
|
|
8
8
|
--dx-c-section-banner-content-align: flex-end;
|
|
9
|
-
--dx-c-section-banner-image-transform: none;
|
|
10
9
|
}
|
|
11
10
|
|
|
12
11
|
.container {
|
|
@@ -56,7 +55,6 @@
|
|
|
56
55
|
flex-shrink: 0;
|
|
57
56
|
height: fit-content;
|
|
58
57
|
align-self: flex-end;
|
|
59
|
-
transform: var(--dx-c-section-banner-image-transform);
|
|
60
58
|
}
|
|
61
59
|
|
|
62
60
|
.graphic {
|
|
@@ -10,6 +10,7 @@ export default class Select extends LightningElement {
|
|
|
10
10
|
@api autocomplete?: string;
|
|
11
11
|
@api label?: string;
|
|
12
12
|
@api messageWhenValueMissing: string = DEFAULT_MISSING_MESSAGE;
|
|
13
|
+
@api name?: string;
|
|
13
14
|
@api placeholder?: string;
|
|
14
15
|
@api size?: string;
|
|
15
16
|
|
|
@@ -50,22 +51,11 @@ export default class Select extends LightningElement {
|
|
|
50
51
|
this.updateSelectValue();
|
|
51
52
|
}
|
|
52
53
|
|
|
53
|
-
@api
|
|
54
|
-
get name() {
|
|
55
|
-
return this._name;
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
set name(name) {
|
|
59
|
-
this._name = name;
|
|
60
|
-
this.setAttribute("name", name); // reflect to HTML
|
|
61
|
-
}
|
|
62
|
-
|
|
63
54
|
_disabled = false;
|
|
64
55
|
_size = "";
|
|
65
56
|
_required = false;
|
|
66
57
|
_options: Array<SelectOption> = [];
|
|
67
58
|
_value: string = "";
|
|
68
|
-
_name?: string;
|
|
69
59
|
_selectElement: HTMLSelectElement | null = null;
|
|
70
60
|
helpMessage?: string = "";
|
|
71
61
|
|