@salesforcedevs/dx-components 1.40.7-bug-fix-alpha → 1.40.7-scroll-1
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 +2 -3
- package/package.json +3 -2
- package/src/modules/dx/button/button.css +2 -2
- package/src/modules/dx/codeBlock/codeBlock.ts +6 -0
- package/src/modules/dx/dropdown/dropdown.css +1 -29
- package/src/modules/dx/dropdown/dropdown.html +1 -1
- package/src/modules/dx/dropdown/dropdown.ts +1 -16
- package/src/modules/dx/dropdownOption/dropdownOption.css +6 -29
- package/src/modules/dx/popover/popover.ts +7 -119
- package/src/modules/dx/sidebar/sidebar.html +0 -1
- package/src/modules/dx/sidebarOld/sidebarOld.html +0 -1
- package/src/modules/dx/tree/tree.html +0 -1
- package/src/modules/dx/tree/tree.ts +1 -5
- package/src/modules/dx/tree/treeHandler.ts +13 -92
- package/src/modules/dx/treeItem/treeItem.css +0 -38
- package/src/modules/dx/treeItem/treeItem.html +2 -17
- package/src/modules/dx/treeItem/treeItem.ts +11 -109
- package/src/modules/dx/treeTile/treeTile.css +0 -57
- package/src/modules/dx/treeTile/treeTile.ts +3 -12
- package/src/modules/dx/typeBadge/typeBadge.ts +2 -23
- package/src/modules/dxBaseElements/headerBase/headerBase.ts +6 -1
- package/src/modules/dxHelpers/commonSidebar/commonSidebar.css +3 -3
- package/src/modules/dxHelpers/commonTreeItem/commonTreeItem.css +0 -4
- package/src/modules/dxHelpers/typeBadge/typeBadge.css +0 -22
- package/src/modules/dx/versionPicker/versionPicker.css +0 -248
- package/src/modules/dx/versionPicker/versionPicker.html +0 -73
- package/src/modules/dx/versionPicker/versionPicker.ts +0 -157
- package/src/modules/dxUtils/topicVersion/topicVersion.ts +0 -525
|
@@ -2,44 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
:host {
|
|
4
4
|
display: block;
|
|
5
|
-
|
|
6
|
-
/* Keep a stable containing block; z-index still lifts the open menu. */
|
|
7
|
-
position: relative;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
/* Lift this row above later sibling pickers while its menu is open. */
|
|
11
|
-
:host(:focus-within) {
|
|
12
|
-
z-index: 2;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
.tree-item-row {
|
|
16
|
-
display: flex;
|
|
17
|
-
align-items: center;
|
|
18
|
-
min-width: 0;
|
|
19
|
-
position: relative;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
/* The tile's keyboard focus layers fill this row, picker included. isolate
|
|
23
|
-
keeps the fill above the row's background and below its content. Only while
|
|
24
|
-
focus is inside: a row that is always isolated traps its picker's menu. */
|
|
25
|
-
.tree-item-row:focus-within {
|
|
26
|
-
isolation: isolate;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
.tree-item-row dx-tree-tile {
|
|
30
|
-
flex: 1;
|
|
31
|
-
min-width: 0;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
.tree-item-version-picker {
|
|
35
|
-
flex: 0 0 auto;
|
|
36
|
-
margin-right: var(--dx-g-spacing-lg);
|
|
37
|
-
overflow: visible;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
.tree-item-row-selected {
|
|
41
|
-
background: var(--dx-g-cloud-blue-vibrant-95);
|
|
42
|
-
box-shadow: inset var(--dx-g-spacing-xs) 0 0 0 var(--dx-g-blue-vibrant-40);
|
|
43
5
|
}
|
|
44
6
|
|
|
45
7
|
button {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<
|
|
2
|
+
<a href={href} target={target} onclick={onLinkClick} tabindex="-1">
|
|
3
3
|
<dx-tree-tile
|
|
4
4
|
href={href}
|
|
5
5
|
is-root={isRoot}
|
|
@@ -7,26 +7,12 @@
|
|
|
7
7
|
is-expanded={isExpanded}
|
|
8
8
|
has-children={hasChildren}
|
|
9
9
|
is-selected={isSelected}
|
|
10
|
-
is-contained-selection={isContainedSelection}
|
|
11
10
|
oniconclick={onIconClick}
|
|
12
11
|
show-arrow={isParent}
|
|
13
12
|
target={target}
|
|
14
13
|
is-external-link={isExternalLink}
|
|
15
|
-
has-version-picker={showVersionPicker}
|
|
16
|
-
onclick={onLinkClick}
|
|
17
14
|
></dx-tree-tile>
|
|
18
|
-
|
|
19
|
-
if:true={showVersionPicker}
|
|
20
|
-
class="tree-item-version-picker"
|
|
21
|
-
small="true"
|
|
22
|
-
versions={versionPickerOptions}
|
|
23
|
-
selected-version={selectedVersion}
|
|
24
|
-
latest-version={isLatestVersion}
|
|
25
|
-
onchange={onVersionChange}
|
|
26
|
-
onclick={onVersionPickerClick}
|
|
27
|
-
onmousedown={onVersionPickerClick}
|
|
28
|
-
></dx-version-picker>
|
|
29
|
-
</div>
|
|
15
|
+
</a>
|
|
30
16
|
<img
|
|
31
17
|
if:true={showChildrenLoading}
|
|
32
18
|
class="tree-children-loading"
|
|
@@ -39,7 +25,6 @@
|
|
|
39
25
|
key={child.key}
|
|
40
26
|
tree-node={child}
|
|
41
27
|
selected-key={selectedKey}
|
|
42
|
-
language={language}
|
|
43
28
|
></dx-tree-item>
|
|
44
29
|
</template>
|
|
45
30
|
</template>
|
|
@@ -2,28 +2,12 @@ import { LightningElement, api } from "lwc";
|
|
|
2
2
|
import { InternalTreeNode } from "typings/custom";
|
|
3
3
|
import { track } from "dxUtils/analytics";
|
|
4
4
|
import { isInViewport } from "dxUtils/browser";
|
|
5
|
-
import type { TopicVersionOption } from "dxUtils/topicVersion";
|
|
6
|
-
import {
|
|
7
|
-
firstContentNode,
|
|
8
|
-
getTopicVersionKey,
|
|
9
|
-
getVersionPickerOptions,
|
|
10
|
-
isParentOnlyTopic,
|
|
11
|
-
normalizePath,
|
|
12
|
-
persistTopicVersion,
|
|
13
|
-
resolveSelectedVersion,
|
|
14
|
-
shouldShowTopicVersionPicker
|
|
15
|
-
} from "dxUtils/topicVersion";
|
|
16
5
|
|
|
17
6
|
const DEFAULT_TARGET = "_self";
|
|
18
7
|
|
|
19
|
-
type VersionedInternalTreeNode = InternalTreeNode & {
|
|
20
|
-
versions?: TopicVersionOption[];
|
|
21
|
-
};
|
|
22
|
-
|
|
23
8
|
export default class TreeItem extends LightningElement {
|
|
24
9
|
@api selectedKey?: string;
|
|
25
10
|
@api isRoot: boolean = false;
|
|
26
|
-
@api language?: string;
|
|
27
11
|
|
|
28
12
|
@api
|
|
29
13
|
public get treeNode() {
|
|
@@ -36,7 +20,7 @@ export default class TreeItem extends LightningElement {
|
|
|
36
20
|
this.isChildrenLoading = (node && node.isChildrenLoading) || false;
|
|
37
21
|
}
|
|
38
22
|
|
|
39
|
-
private _treeNode!:
|
|
23
|
+
private _treeNode!: InternalTreeNode;
|
|
40
24
|
private isExpanded: boolean = false;
|
|
41
25
|
private isChildrenLoading: boolean = false;
|
|
42
26
|
private rootParentLabel: string = "";
|
|
@@ -46,22 +30,9 @@ export default class TreeItem extends LightningElement {
|
|
|
46
30
|
}
|
|
47
31
|
|
|
48
32
|
private get isSelected(): boolean {
|
|
49
|
-
if (isParentOnlyTopic(this._treeNode)) {
|
|
50
|
-
return false;
|
|
51
|
-
}
|
|
52
33
|
return this._treeNode.key === this.selectedKey && !this.isExternalLink;
|
|
53
34
|
}
|
|
54
35
|
|
|
55
|
-
private get rowClass(): string {
|
|
56
|
-
return this.isSelected && this.showVersionPicker
|
|
57
|
-
? "tree-item-row tree-item-row-selected"
|
|
58
|
-
: "tree-item-row";
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
private get isContainedSelection(): boolean {
|
|
62
|
-
return this.isSelected && this.showVersionPicker;
|
|
63
|
-
}
|
|
64
|
-
|
|
65
36
|
private get hasChildren(): boolean {
|
|
66
37
|
return !!(
|
|
67
38
|
this.treeNode &&
|
|
@@ -112,48 +83,8 @@ export default class TreeItem extends LightningElement {
|
|
|
112
83
|
return `${parentLabels.reverse().join(":")}:${this.treeNode.label}`;
|
|
113
84
|
}
|
|
114
85
|
|
|
115
|
-
private get versions(): TopicVersionOption[] | undefined {
|
|
116
|
-
return this._treeNode?.versions;
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
private get versionPickerOptions(): TopicVersionOption[] | undefined {
|
|
120
|
-
return getVersionPickerOptions(this._treeNode);
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
private get showVersionPicker(): boolean {
|
|
124
|
-
return shouldShowTopicVersionPicker(
|
|
125
|
-
this.versions,
|
|
126
|
-
this._treeNode?.showForwardArrow
|
|
127
|
-
);
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
private get selectedVersion(): TopicVersionOption | undefined {
|
|
131
|
-
return resolveSelectedVersion(this._treeNode, this.language);
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
private get topicVersionKey(): string {
|
|
135
|
-
return getTopicVersionKey(this._treeNode, this.language);
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
private get isLatestVersion(): boolean {
|
|
139
|
-
return (
|
|
140
|
-
!!this.selectedVersion &&
|
|
141
|
-
this.selectedVersion.id === this.versions?.[0]?.id
|
|
142
|
-
);
|
|
143
|
-
}
|
|
144
|
-
|
|
145
86
|
private get href(): string | undefined {
|
|
146
|
-
if (isParentOnlyTopic(this._treeNode)) {
|
|
147
|
-
const contentNode = firstContentNode(this._treeNode);
|
|
148
|
-
return (
|
|
149
|
-
contentNode?.link?.href ||
|
|
150
|
-
contentNode?.name ||
|
|
151
|
-
this.selectedVersion?.link?.href ||
|
|
152
|
-
""
|
|
153
|
-
);
|
|
154
|
-
}
|
|
155
87
|
return (
|
|
156
|
-
this.selectedVersion?.link?.href ||
|
|
157
88
|
(this._treeNode.link && this._treeNode.link.href) ||
|
|
158
89
|
this._treeNode.name ||
|
|
159
90
|
""
|
|
@@ -173,23 +104,6 @@ export default class TreeItem extends LightningElement {
|
|
|
173
104
|
setExpanded: this.setExpanded.bind(this)
|
|
174
105
|
});
|
|
175
106
|
}
|
|
176
|
-
|
|
177
|
-
// Remember this topic's resolved version (own URL, descendant URL, or
|
|
178
|
-
// session) so sibling pickers stay independent for the tab.
|
|
179
|
-
const selected = this.selectedVersion;
|
|
180
|
-
const topicKey = this.topicVersionKey;
|
|
181
|
-
if (this.versions?.length && selected && topicKey) {
|
|
182
|
-
persistTopicVersion(topicKey, selected.id);
|
|
183
|
-
}
|
|
184
|
-
}
|
|
185
|
-
|
|
186
|
-
private onVersionChange(event: CustomEvent): void {
|
|
187
|
-
event.stopPropagation();
|
|
188
|
-
persistTopicVersion(this.topicVersionKey, event.detail);
|
|
189
|
-
}
|
|
190
|
-
|
|
191
|
-
private onVersionPickerClick(event: Event): void {
|
|
192
|
-
event.stopPropagation();
|
|
193
107
|
}
|
|
194
108
|
|
|
195
109
|
renderedCallback(): void {
|
|
@@ -218,14 +132,10 @@ export default class TreeItem extends LightningElement {
|
|
|
218
132
|
}
|
|
219
133
|
|
|
220
134
|
private preventDefaultLinkBehavior(event: Event) {
|
|
221
|
-
//
|
|
222
|
-
// anchor. Parent-only topics are excluded: their href is the child page.
|
|
223
|
-
// Otherwise cancel only an empty href or a click on the current path.
|
|
135
|
+
// prevent page refresh if href isn't present or link is already active
|
|
224
136
|
if (
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
!this.href ||
|
|
228
|
-
normalizePath(this.href) === normalizePath(window.location.pathname)
|
|
137
|
+
!this._treeNode.link?.href ||
|
|
138
|
+
this._treeNode.link?.href === window.location.pathname
|
|
229
139
|
) {
|
|
230
140
|
event.preventDefault();
|
|
231
141
|
}
|
|
@@ -245,14 +155,10 @@ export default class TreeItem extends LightningElement {
|
|
|
245
155
|
this.sendGtm(event);
|
|
246
156
|
return;
|
|
247
157
|
}
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
this.doExpand(isSelectAction);
|
|
253
|
-
this.sendGtm(event);
|
|
254
|
-
return;
|
|
255
|
-
}
|
|
158
|
+
const isSelectAction = false;
|
|
159
|
+
this.doExpand(isSelectAction);
|
|
160
|
+
this.sendGtm(event);
|
|
161
|
+
return;
|
|
256
162
|
}
|
|
257
163
|
|
|
258
164
|
if (this.isParent) {
|
|
@@ -261,12 +167,8 @@ export default class TreeItem extends LightningElement {
|
|
|
261
167
|
}
|
|
262
168
|
|
|
263
169
|
this.sendGtm(event);
|
|
264
|
-
const contentNode = isParentOnlyTopic(this._treeNode)
|
|
265
|
-
? firstContentNode(this._treeNode)
|
|
266
|
-
: undefined;
|
|
267
170
|
this.fireEvent("tileselected", {
|
|
268
|
-
name:
|
|
269
|
-
...(contentNode?.key ? { key: contentNode.key } : {}),
|
|
171
|
+
name: this._treeNode.name,
|
|
270
172
|
isExternalLink: this.isExternalLink
|
|
271
173
|
});
|
|
272
174
|
}
|
|
@@ -284,8 +186,8 @@ export default class TreeItem extends LightningElement {
|
|
|
284
186
|
this.dispatchEvent(
|
|
285
187
|
new CustomEvent(type, {
|
|
286
188
|
detail: {
|
|
287
|
-
|
|
288
|
-
|
|
189
|
+
...detail,
|
|
190
|
+
key: this._treeNode.key
|
|
289
191
|
},
|
|
290
192
|
bubbles: true,
|
|
291
193
|
composed: true
|
|
@@ -66,10 +66,6 @@
|
|
|
66
66
|
white-space: nowrap;
|
|
67
67
|
}
|
|
68
68
|
|
|
69
|
-
.tile-with-version-picker {
|
|
70
|
-
padding-right: var(--dx-g-spacing-xs);
|
|
71
|
-
}
|
|
72
|
-
|
|
73
69
|
.tile-with-children .tile-label {
|
|
74
70
|
order: 2;
|
|
75
71
|
}
|
|
@@ -217,56 +213,3 @@ a:visited.tile-root,
|
|
|
217
213
|
a:link.tile-root {
|
|
218
214
|
color: var(--dx-g-blue-vibrant-20);
|
|
219
215
|
}
|
|
220
|
-
|
|
221
|
-
/* Keyboard focus matches dx-dropdown-option: a light fill, a 2px blue inset
|
|
222
|
-
ring, and a white inner band. The layers fill dx-tree-item's row (it sets
|
|
223
|
-
position: relative), so a version picker beside the link sits inside the
|
|
224
|
-
focus box. Undo the shared tree item focus box (commonTreeItem) first. */
|
|
225
|
-
:host .sidebar-item:focus-visible {
|
|
226
|
-
margin: 0;
|
|
227
|
-
padding: 6px var(--dx-g-spacing-lg) 6px
|
|
228
|
-
var(--dx-g-global-header-padding-horizontal);
|
|
229
|
-
outline: none;
|
|
230
|
-
border-radius: 0;
|
|
231
|
-
}
|
|
232
|
-
|
|
233
|
-
/* Keep the picker row's 4px right padding on focus, so the label does not rewrap. */
|
|
234
|
-
:host .tile-with-version-picker:focus-visible {
|
|
235
|
-
padding-right: var(--dx-g-spacing-xs);
|
|
236
|
-
}
|
|
237
|
-
|
|
238
|
-
:host .sidebar-item:focus-visible .indentation {
|
|
239
|
-
padding-top: 0;
|
|
240
|
-
padding-bottom: 0;
|
|
241
|
-
outline: none;
|
|
242
|
-
}
|
|
243
|
-
|
|
244
|
-
:host .sidebar-item:focus-visible::before,
|
|
245
|
-
:host .sidebar-item:focus-visible::after {
|
|
246
|
-
content: "";
|
|
247
|
-
position: absolute;
|
|
248
|
-
inset: 0;
|
|
249
|
-
pointer-events: none;
|
|
250
|
-
}
|
|
251
|
-
|
|
252
|
-
:host .sidebar-item:focus-visible::before {
|
|
253
|
-
z-index: -1;
|
|
254
|
-
background: var(--dx-g-cloud-blue-vibrant-95);
|
|
255
|
-
}
|
|
256
|
-
|
|
257
|
-
:host .sidebar-item:focus-visible::after {
|
|
258
|
-
z-index: 1;
|
|
259
|
-
box-shadow: inset 0 0 0 2px var(--dx-g-blue-vibrant-60),
|
|
260
|
-
inset 0 0 0 4px white;
|
|
261
|
-
}
|
|
262
|
-
|
|
263
|
-
/* A selected item keeps its left bar, inside the ring, when it also has keyboard focus. */
|
|
264
|
-
:host
|
|
265
|
-
.sidebar-item:is(
|
|
266
|
-
.sidebar-item-selected,
|
|
267
|
-
.sidebar-item-selected-text
|
|
268
|
-
):focus-visible::after {
|
|
269
|
-
box-shadow: inset 0 0 0 2px var(--dx-g-blue-vibrant-60),
|
|
270
|
-
inset 0 0 0 4px white,
|
|
271
|
-
inset calc(2 * var(--dx-g-spacing-xs)) 0 0 0 var(--dx-g-blue-vibrant-40);
|
|
272
|
-
}
|
|
@@ -28,12 +28,10 @@ export default class TreeTile extends LightningElement {
|
|
|
28
28
|
@api isExpanded = false;
|
|
29
29
|
@api hasChildren = false;
|
|
30
30
|
@api isSelected = false;
|
|
31
|
-
@api isContainedSelection = false;
|
|
32
31
|
@api href!: string;
|
|
33
32
|
@api showArrow = false;
|
|
34
33
|
@api target!: string;
|
|
35
34
|
@api isExternalLink = false;
|
|
36
|
-
@api hasVersionPicker = false;
|
|
37
35
|
|
|
38
36
|
get tileAriaLevel() {
|
|
39
37
|
return this.treeNode.level + 2;
|
|
@@ -45,21 +43,18 @@ export default class TreeTile extends LightningElement {
|
|
|
45
43
|
* screen reader users (WCAG 2.4.4)
|
|
46
44
|
*/
|
|
47
45
|
get linkAriaLabel(): string | null {
|
|
48
|
-
if (!this.treeNode.redirectToChild) {
|
|
46
|
+
if (!this.treeNode.redirectToChild || !this.treeNode.link?.href) {
|
|
49
47
|
return null;
|
|
50
48
|
}
|
|
51
49
|
/**
|
|
52
50
|
* The redirect can target a deep descendant, so walk the first-child
|
|
53
51
|
* chain to the node that owns the destination link and name it.
|
|
54
|
-
* The destination href may live on this anchor (parent-only topics do
|
|
55
|
-
* not copy it onto the parent node).
|
|
56
52
|
*/
|
|
57
53
|
let destination = this.treeNode.children?.[0];
|
|
58
54
|
while (destination?.redirectToChild) {
|
|
59
55
|
destination = destination.children?.[0];
|
|
60
56
|
}
|
|
61
|
-
|
|
62
|
-
return destination?.link?.href && destination.link.href === triggerHref
|
|
57
|
+
return destination?.link?.href === this.treeNode.link.href
|
|
63
58
|
? `${this.treeNode.label}, opens ${destination.label}`
|
|
64
59
|
: null;
|
|
65
60
|
}
|
|
@@ -106,11 +101,7 @@ export default class TreeTile extends LightningElement {
|
|
|
106
101
|
"tile-root": this.isRoot,
|
|
107
102
|
"tile-with-children": !this.isRoot && this.hasChildren,
|
|
108
103
|
"tile-root-with-child": this.isRoot && this.showArrow,
|
|
109
|
-
"sidebar-item-selected":
|
|
110
|
-
this.isSelected && !this.isContainedSelection,
|
|
111
|
-
"sidebar-item-selected-text":
|
|
112
|
-
this.isSelected && this.isContainedSelection,
|
|
113
|
-
"tile-with-version-picker": this.hasVersionPicker
|
|
104
|
+
"sidebar-item-selected": this.isSelected
|
|
114
105
|
});
|
|
115
106
|
}
|
|
116
107
|
|
|
@@ -7,7 +7,6 @@ import {
|
|
|
7
7
|
IconSprite,
|
|
8
8
|
IconData,
|
|
9
9
|
IconSymbol,
|
|
10
|
-
StatusBadgeVariant,
|
|
11
10
|
TypeBadgeSize
|
|
12
11
|
} from "typings/custom";
|
|
13
12
|
import { colorToDxColors, buildStyleColorVariables } from "dxUtils/css";
|
|
@@ -21,16 +20,9 @@ import {
|
|
|
21
20
|
getContentTypeColorVariables
|
|
22
21
|
} from "dxUtils/contentTypes";
|
|
23
22
|
|
|
24
|
-
// Opt-in solid status variants (status-success/-warning/-error).
|
|
25
|
-
export const STATUS_BADGE_VARIANTS: StatusBadgeVariant[] = [
|
|
26
|
-
"status-success",
|
|
27
|
-
"status-warning",
|
|
28
|
-
"status-error"
|
|
29
|
-
];
|
|
30
|
-
|
|
31
23
|
export default class TypeBadge extends LightningElement {
|
|
32
24
|
@api size: TypeBadgeSize = "default";
|
|
33
|
-
@api variant: Brand | ContentType
|
|
25
|
+
@api variant: Brand | ContentType = "default";
|
|
34
26
|
@api color?: Color;
|
|
35
27
|
@api dark?: false;
|
|
36
28
|
|
|
@@ -95,24 +87,11 @@ export default class TypeBadge extends LightningElement {
|
|
|
95
87
|
return isContentType(this.variant);
|
|
96
88
|
}
|
|
97
89
|
|
|
98
|
-
private get isStatus(): boolean {
|
|
99
|
-
return STATUS_BADGE_VARIANTS.includes(
|
|
100
|
-
this.variant as StatusBadgeVariant
|
|
101
|
-
);
|
|
102
|
-
}
|
|
103
|
-
|
|
104
90
|
private get className(): string {
|
|
105
|
-
return cx(
|
|
106
|
-
"dx-badge",
|
|
107
|
-
`size-${this.size}`,
|
|
108
|
-
this.isStatus && this.variant
|
|
109
|
-
);
|
|
91
|
+
return cx("dx-badge", `size-${this.size}`);
|
|
110
92
|
}
|
|
111
93
|
|
|
112
94
|
private get style(): string {
|
|
113
|
-
if (this.isStatus) {
|
|
114
|
-
return "";
|
|
115
|
-
}
|
|
116
95
|
if (this.dark) {
|
|
117
96
|
return buildStyleColorVariables({
|
|
118
97
|
background: "--dx-g-purple-vibrant-40",
|
|
@@ -155,7 +155,12 @@ export abstract class HeaderBase extends LightningElement {
|
|
|
155
155
|
setTimeout(() => {
|
|
156
156
|
const id = hash.replace("#", "");
|
|
157
157
|
const element = document.getElementById(id);
|
|
158
|
-
|
|
158
|
+
// doc-heading targets are scrolled by doc-content-layout once the page has rendered
|
|
159
|
+
if (
|
|
160
|
+
element &&
|
|
161
|
+
element.tagName !== "DOC-HEADING" &&
|
|
162
|
+
element.scrollIntoView
|
|
163
|
+
) {
|
|
159
164
|
element.scrollIntoView();
|
|
160
165
|
}
|
|
161
166
|
}, 0);
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
--dx-c-sidebar-button-border-hover: var(--dx-g-blue-vibrant-50);
|
|
12
12
|
--dx-c-sidebar-left-padding: var(--dx-g-global-header-padding-horizontal);
|
|
13
13
|
--dx-c-sidebar-vertical-padding: var(--dx-g-spacing-md);
|
|
14
|
-
--
|
|
14
|
+
--doc-version-picker-width: 296px;
|
|
15
15
|
}
|
|
16
16
|
|
|
17
17
|
.header {
|
|
@@ -170,9 +170,9 @@
|
|
|
170
170
|
margin-bottom: var(--dx-g-spacing-2xl);
|
|
171
171
|
}
|
|
172
172
|
|
|
173
|
-
@media screen and (max-width:
|
|
173
|
+
@media screen and (max-width: 767px) {
|
|
174
174
|
:host {
|
|
175
|
-
--
|
|
175
|
+
--doc-version-picker-width: calc(
|
|
176
176
|
100vw - var(--dx-c-sidebar-left-padding) - var(--dx-g-spacing-lg)
|
|
177
177
|
);
|
|
178
178
|
}
|
|
@@ -13,10 +13,6 @@
|
|
|
13
13
|
color: var(--dx-g-blue-vibrant-40) !important;
|
|
14
14
|
}
|
|
15
15
|
|
|
16
|
-
.sidebar-item-selected-text {
|
|
17
|
-
color: var(--dx-g-blue-vibrant-40) !important;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
16
|
.sidebar-item {
|
|
21
17
|
padding: 6px var(--dx-g-spacing-lg) 6px
|
|
22
18
|
var(--dx-g-global-header-padding-horizontal);
|
|
@@ -26,28 +26,6 @@
|
|
|
26
26
|
--height: var(--dx-g-spacing-mlg);
|
|
27
27
|
}
|
|
28
28
|
|
|
29
|
-
.dx-badge.status-success,
|
|
30
|
-
.dx-badge.status-warning,
|
|
31
|
-
.dx-badge.status-error {
|
|
32
|
-
/* No spacing token maps to 10px; status badges need this exact padding. */
|
|
33
|
-
--horizontal-spacing: 10px;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
.dx-badge.status-success {
|
|
37
|
-
--color: var(--sds-g-gray-1);
|
|
38
|
-
--background: var(--dx-g-green-vibrant-50);
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
.dx-badge.status-warning {
|
|
42
|
-
--color: var(--dx-g-gray-15);
|
|
43
|
-
--background: var(--dx-g-yellow-vibrant-80);
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
.dx-badge.status-error {
|
|
47
|
-
--color: var(--sds-g-gray-1);
|
|
48
|
-
--background: var(--dx-g-red-vibrant-40);
|
|
49
|
-
}
|
|
50
|
-
|
|
51
29
|
svg,
|
|
52
30
|
dx-icon {
|
|
53
31
|
margin-right: var(--dx-g-spacing-sm);
|