@salesforcedevs/dx-components 1.40.5-final-alpha2 → 1.40.5-final-alpha3
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
CHANGED
|
@@ -19,6 +19,13 @@
|
|
|
19
19
|
position: relative;
|
|
20
20
|
}
|
|
21
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
|
+
|
|
22
29
|
.tree-item-row dx-tree-tile {
|
|
23
30
|
flex: 1;
|
|
24
31
|
min-width: 0;
|
|
@@ -30,19 +37,6 @@
|
|
|
30
37
|
overflow: visible;
|
|
31
38
|
}
|
|
32
39
|
|
|
33
|
-
/* Keyboard focus on the link. The tile sets data-focus-visible only then,
|
|
34
|
-
so a click does not ring. The next Tab clears it and focuses the picker. */
|
|
35
|
-
.tree-item-row:has(dx-tree-tile[data-focus-visible])::after {
|
|
36
|
-
content: "";
|
|
37
|
-
position: absolute;
|
|
38
|
-
z-index: 1;
|
|
39
|
-
inset: 0 var(--dx-g-spacing-lg) 0
|
|
40
|
-
var(--dx-g-global-header-padding-horizontal);
|
|
41
|
-
border-radius: var(--dx-g-spacing-2xs);
|
|
42
|
-
outline: var(--dx-g-spacing-2xs) solid var(--dx-g-blue-vibrant-40);
|
|
43
|
-
pointer-events: none;
|
|
44
|
-
}
|
|
45
|
-
|
|
46
40
|
.tree-item-row-selected {
|
|
47
41
|
background: var(--dx-g-cloud-blue-vibrant-95);
|
|
48
42
|
box-shadow: inset var(--dx-g-spacing-xs) 0 0 0 var(--dx-g-blue-vibrant-40);
|
|
@@ -70,15 +70,6 @@
|
|
|
70
70
|
padding-right: var(--dx-g-spacing-xs);
|
|
71
71
|
}
|
|
72
72
|
|
|
73
|
-
/* Undo the shared focus inset. The row draws the ring around link and picker. */
|
|
74
|
-
.sidebar-item.tile-with-version-picker:focus-visible {
|
|
75
|
-
margin: 0;
|
|
76
|
-
padding-right: var(--dx-g-spacing-xs);
|
|
77
|
-
padding-left: var(--dx-g-global-header-padding-horizontal);
|
|
78
|
-
border-radius: 0;
|
|
79
|
-
outline: none;
|
|
80
|
-
}
|
|
81
|
-
|
|
82
73
|
.tile-with-children .tile-label {
|
|
83
74
|
order: 2;
|
|
84
75
|
}
|
|
@@ -226,3 +217,51 @@ a:visited.tile-root,
|
|
|
226
217
|
a:link.tile-root {
|
|
227
218
|
color: var(--dx-g-blue-vibrant-20);
|
|
228
219
|
}
|
|
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
|
+
:host .sidebar-item:focus-visible .indentation {
|
|
234
|
+
padding-top: 0;
|
|
235
|
+
padding-bottom: 0;
|
|
236
|
+
outline: none;
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
:host .sidebar-item:focus-visible::before,
|
|
240
|
+
:host .sidebar-item:focus-visible::after {
|
|
241
|
+
content: "";
|
|
242
|
+
position: absolute;
|
|
243
|
+
inset: 0;
|
|
244
|
+
pointer-events: none;
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
:host .sidebar-item:focus-visible::before {
|
|
248
|
+
z-index: -1;
|
|
249
|
+
background: var(--dx-g-cloud-blue-vibrant-95);
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
:host .sidebar-item:focus-visible::after {
|
|
253
|
+
z-index: 1;
|
|
254
|
+
box-shadow: inset 0 0 0 2px var(--dx-g-blue-vibrant-60),
|
|
255
|
+
inset 0 0 0 4px white;
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
/* A selected item keeps its left bar, inside the ring, when it also has keyboard focus. */
|
|
259
|
+
:host
|
|
260
|
+
.sidebar-item:is(
|
|
261
|
+
.sidebar-item-selected,
|
|
262
|
+
.sidebar-item-selected-text
|
|
263
|
+
):focus-visible::after {
|
|
264
|
+
box-shadow: inset 0 0 0 2px var(--dx-g-blue-vibrant-60),
|
|
265
|
+
inset 0 0 0 4px white,
|
|
266
|
+
inset calc(2 * var(--dx-g-spacing-xs)) 0 0 0 var(--dx-g-blue-vibrant-40);
|
|
267
|
+
}
|
|
@@ -1,12 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<a
|
|
3
|
-
href={href}
|
|
4
|
-
class={tileClass}
|
|
5
|
-
target={target}
|
|
6
|
-
aria-label={linkAriaLabel}
|
|
7
|
-
onfocus={onLinkFocus}
|
|
8
|
-
onblur={onLinkBlur}
|
|
9
|
-
>
|
|
2
|
+
<a href={href} class={tileClass} target={target} aria-label={linkAriaLabel}>
|
|
10
3
|
<div class="flex indentation" role="heading" aria-level={tileAriaLevel}>
|
|
11
4
|
<div class="flex tile-expand-icon tile-icon" if:true={showArrow}>
|
|
12
5
|
<dx-icon
|
|
@@ -119,18 +119,4 @@ export default class TreeTile extends LightningElement {
|
|
|
119
119
|
event.stopPropagation();
|
|
120
120
|
this.dispatchEvent(new CustomEvent("iconclick"));
|
|
121
121
|
}
|
|
122
|
-
|
|
123
|
-
/* :focus-visible does not cross this shadow root, so the row reads it here. */
|
|
124
|
-
private onLinkFocus(event: FocusEvent) {
|
|
125
|
-
const link = event.currentTarget as HTMLElement;
|
|
126
|
-
if (this.hasVersionPicker && link.matches(":focus-visible")) {
|
|
127
|
-
this.setAttribute("data-focus-visible", "");
|
|
128
|
-
return;
|
|
129
|
-
}
|
|
130
|
-
this.removeAttribute("data-focus-visible");
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
private onLinkBlur() {
|
|
134
|
-
this.removeAttribute("data-focus-visible");
|
|
135
|
-
}
|
|
136
122
|
}
|