@brightspace-ui/core 3.164.0 → 3.164.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.
@@ -343,8 +343,7 @@ export const ListItemDragDropMixin = superclass => class extends superclass {
|
|
343
343
|
}
|
344
344
|
:host([selected]) d2l-list-item-drag-handle,
|
345
345
|
:host([current]) d2l-list-item-drag-handle,
|
346
|
-
:host([_focusing
|
347
|
-
:host([_list-item-new-styles][_focusing]) d2l-list-item-drag-handle,
|
346
|
+
:host([_focusing]) d2l-list-item-drag-handle,
|
348
347
|
d2l-list-item-drag-handle:hover,
|
349
348
|
d2l-list-item-drag-handle.d2l-hovering,
|
350
349
|
d2l-list-item-drag-handle.d2l-focusing {
|
@@ -5,13 +5,12 @@ import './list-item-generic-layout.js';
|
|
5
5
|
import './list-item-placement-marker.js';
|
6
6
|
import '../tooltip/tooltip.js';
|
7
7
|
import '../expand-collapse/expand-collapse-content.js';
|
8
|
-
import { css, html, nothing
|
8
|
+
import { css, html, nothing } from 'lit';
|
9
9
|
import { findComposedAncestor, getComposedChildren, getComposedParent } from '../../helpers/dom.js';
|
10
10
|
import { interactiveElements, isInteractiveInComposedPath } from '../../helpers/interactive.js';
|
11
11
|
import { classMap } from 'lit/directives/class-map.js';
|
12
12
|
import { composeMixins } from '../../helpers/composeMixins.js';
|
13
13
|
import { getFirstFocusableDescendant } from '../../helpers/focus.js';
|
14
|
-
import { getFlag } from '../../helpers/flags.js';
|
15
14
|
import { getUniqueId } from '../../helpers/uniqueId.js';
|
16
15
|
import { getValidHexColor } from '../../helpers/color.js';
|
17
16
|
import { ifDefined } from 'lit/directives/if-defined.js';
|
@@ -41,8 +40,6 @@ function addTabListener() {
|
|
41
40
|
});
|
42
41
|
}
|
43
42
|
|
44
|
-
const useNewStylesFlag = getFlag('GAUD-7495-list-item-new-styles', true);
|
45
|
-
|
46
43
|
let hasDisplayedKeyboardTooltip = false;
|
47
44
|
|
48
45
|
export function isInteractiveInListItemComposedPath(e, isPrimaryAction) {
|
@@ -116,7 +113,6 @@ export const ListItemMixin = superclass => class extends composeMixins(
|
|
116
113
|
_focusingPrimaryAction: { type: Boolean, attribute: '_focusing-primary-action', reflect: true },
|
117
114
|
_highlight: { type: Boolean, reflect: true },
|
118
115
|
_highlighting: { type: Boolean, reflect: true },
|
119
|
-
_listItemNewStyles: { type: Boolean, reflect: true, attribute: '_list-item-new-styles' },
|
120
116
|
_showAddButton: { type: Boolean, attribute: '_show-add-button', reflect: true },
|
121
117
|
_siblingHasColor: { state: true },
|
122
118
|
};
|
@@ -148,15 +144,15 @@ export const ListItemMixin = superclass => class extends composeMixins(
|
|
148
144
|
|
149
145
|
:host(:first-of-type) [slot="control-container"]::before,
|
150
146
|
[slot="control-container"]::after,
|
151
|
-
:host(
|
152
|
-
:host(
|
147
|
+
:host(:not([_separators="none"])[expandable][expanded]:not(:last-of-type))::after,
|
148
|
+
:host(:not([_separators="none"])[_has-nested-list]:not([expandable]):not(:last-of-type))::after {
|
153
149
|
border-top: 1px solid var(--d2l-color-mica);
|
154
150
|
content: "";
|
155
151
|
position: absolute;
|
156
152
|
width: 100%;
|
157
153
|
}
|
158
|
-
:host([
|
159
|
-
:host([
|
154
|
+
:host([draggable][expandable][expanded]:not(:last-of-type))::after,
|
155
|
+
:host([draggable][_has-nested-list]:not([expandable]):not(:last-of-type))::after {
|
160
156
|
inset-inline-start: 1.5rem; /* left and right margins of 0.3rem + drag handle width of 0.9rem */
|
161
157
|
width: calc(100% - 1.5rem);
|
162
158
|
}
|
@@ -220,22 +216,22 @@ export const ListItemMixin = superclass => class extends composeMixins(
|
|
220
216
|
outline-offset: -4px;
|
221
217
|
}
|
222
218
|
@supports selector(:has(a, b)) {
|
223
|
-
:host([
|
219
|
+
:host([_focusing-primary-action]) .d2l-list-item-content {
|
224
220
|
--d2l-list-item-content-text-border-radius: initial;
|
225
221
|
--d2l-list-item-content-text-outline: initial;
|
226
222
|
--d2l-list-item-content-text-outline-offset: initial;
|
227
223
|
}
|
228
|
-
:host([
|
224
|
+
:host([_focusing-primary-action]):has(:focus-visible) .d2l-list-item-content {
|
229
225
|
--d2l-list-item-content-text-border-radius: 3px;
|
230
226
|
--d2l-list-item-content-text-outline: 2px solid var(--d2l-color-celestine);
|
231
227
|
--d2l-list-item-content-text-outline-offset: 1px;
|
232
228
|
}
|
233
|
-
:host([
|
229
|
+
:host([_focusing-primary-action]:not([padding-type="none"])) .d2l-list-item-content-none {
|
234
230
|
border-radius: initial;
|
235
231
|
outline: initial;
|
236
232
|
outline-offset: initial;
|
237
233
|
}
|
238
|
-
:host([
|
234
|
+
:host([_focusing-primary-action]:not([padding-type="none"])):has(:focus-visible) .d2l-list-item-content-none {
|
239
235
|
border-radius: 8px;
|
240
236
|
outline: var(--d2l-list-item-content-text-outline);
|
241
237
|
outline-offset: -4px;
|
@@ -328,7 +324,7 @@ export const ListItemMixin = superclass => class extends composeMixins(
|
|
328
324
|
.d2l-list-item-content-extend-separators [slot="outside-control-container"] {
|
329
325
|
margin: 0;
|
330
326
|
}
|
331
|
-
:host([
|
327
|
+
:host([draggable]) [slot="outside-control-container"] {
|
332
328
|
margin-inline-end: -12px;
|
333
329
|
}
|
334
330
|
|
@@ -351,27 +347,17 @@ export const ListItemMixin = superclass => class extends composeMixins(
|
|
351
347
|
:host([_hovering-selection]) [slot="outside-control-container"],
|
352
348
|
:host([_focusing-primary-action]) [slot="outside-control-container"],
|
353
349
|
:host(:not([selection-disabled]):not([skeleton])[selected][_hovering-selection]) [slot="outside-control-container"],
|
354
|
-
:host(:not([
|
355
|
-
:host([_list-item-new-styles]:not([selection-disabled]):not([button-disabled]):not([skeleton])[_focusing]:not([current])) [slot="outside-control-container"] {
|
356
|
-
border-color: ${unsafeCSS(useNewStylesFlag ? 'var(--d2l-color-mica)' : '#b6cbe8')}; /* stylelint-disable-line */
|
357
|
-
margin-bottom: -1px;
|
358
|
-
}
|
359
|
-
/* clean up with GAUD-7495-list-item-new-styles flag */
|
360
|
-
:host(:not([selection-disabled]):not([button-disabled]):not([skeleton])[_focusing-elem]:not([current])) [slot="outside-control-container"] {
|
350
|
+
:host(:not([selection-disabled]):not([button-disabled]):not([skeleton])[_focusing]:not([current])) [slot="outside-control-container"] {
|
361
351
|
border-color: var(--d2l-color-mica);
|
362
352
|
margin-bottom: -1px;
|
363
353
|
}
|
364
|
-
/* clean up with GAUD-7495-list-item-new-styles flag */
|
365
|
-
:host(:not([selection-disabled]):not([skeleton])[selected]) [slot="outside-control-container"].hide-bottom-border {
|
366
|
-
background-image: linear-gradient(#f3fbff, #f3fbff), linear-gradient(to right, ${unsafeCSS(useNewStylesFlag ? 'var(--d2l-color-mica)' : '#b6cbe8')} 20%, transparent 20%, transparent 80%, ${unsafeCSS(useNewStylesFlag ? 'var(--d2l-color-mica)' : '#b6cbe8')} 80%); /* stylelint-disable-line */
|
367
|
-
}
|
368
354
|
:host([_hovering-control]) d2l-button-add,
|
369
355
|
:host([_hovering-primary-action]) d2l-button-add,
|
370
356
|
:host([_hovering-selection]) d2l-button-add,
|
371
357
|
:host([_focusing-primary-action]) d2l-button-add,
|
372
358
|
:host(:not([selection-disabled]):not([skeleton])[selectable][_focusing]) d2l-button-add,
|
373
359
|
:host(:not([selection-disabled]):not([skeleton])[selected]) d2l-button-add {
|
374
|
-
--d2l-button-add-line-color:
|
360
|
+
--d2l-button-add-line-color: var(--d2l-color-mica);
|
375
361
|
}
|
376
362
|
:host([_hovering-control]) [slot="outside-control-container"],
|
377
363
|
:host([_hovering-primary-action]) [slot="outside-control-container"],
|
@@ -380,7 +366,7 @@ export const ListItemMixin = superclass => class extends composeMixins(
|
|
380
366
|
}
|
381
367
|
:host(:not([selection-disabled]):not([skeleton])[selected]) [slot="outside-control-container"] {
|
382
368
|
background-color: #f3fbff;
|
383
|
-
border-color:
|
369
|
+
border-color: var(--d2l-color-mica);
|
384
370
|
margin-bottom: -1px;
|
385
371
|
}
|
386
372
|
|
@@ -471,7 +457,6 @@ export const ListItemMixin = superclass => class extends composeMixins(
|
|
471
457
|
this._hasColorSlot = false;
|
472
458
|
this._hasListItemContent = true;
|
473
459
|
this._hasNestedList = false;
|
474
|
-
this._listItemNewStyles = useNewStylesFlag;
|
475
460
|
this._siblingHasColor = false;
|
476
461
|
}
|
477
462
|
|
@@ -642,9 +627,7 @@ export const ListItemMixin = superclass => class extends composeMixins(
|
|
642
627
|
}
|
643
628
|
|
644
629
|
_onFocusIn(e) {
|
645
|
-
|
646
|
-
e.stopPropagation(); // prevent _focusing from being set on the parent
|
647
|
-
}
|
630
|
+
e.stopPropagation(); // prevent _focusing from being set on the parent
|
648
631
|
this._focusing = true;
|
649
632
|
if (this.role !== 'row' || !tabPressed || hasDisplayedKeyboardTooltip) return;
|
650
633
|
this._displayKeyboardTooltip = true;
|
@@ -17,7 +17,6 @@ export const ListItemNavMixin = superclass => class extends ListItemLinkMixin(su
|
|
17
17
|
*/
|
18
18
|
preventNavigation: { type: Boolean, attribute: 'prevent-navigation' },
|
19
19
|
_childCurrent: { type: Boolean, reflect: true, attribute: '_child-current' },
|
20
|
-
_focusingElem: { type: Boolean, reflect: true, attribute: '_focusing-elem' },
|
21
20
|
_hasCurrentParent: { type: Boolean, reflect: true, attribute: '_has-current-parent' },
|
22
21
|
_nextSiblingCurrent: { type: Boolean, reflect: true, attribute: '_next-sibling-current' },
|
23
22
|
};
|
@@ -66,21 +65,6 @@ export const ListItemNavMixin = superclass => class extends ListItemLinkMixin(su
|
|
66
65
|
:host([current]) .d2l-list-item-color-outer {
|
67
66
|
padding-block: 3px;
|
68
67
|
}
|
69
|
-
|
70
|
-
/* clean up with GAUD-7495-list-item-new-styles flag */
|
71
|
-
@supports selector(:has(a, b)) {
|
72
|
-
:host([_focusing-primary-action]) .d2l-list-item-content {
|
73
|
-
--d2l-list-item-content-text-border-radius: initial;
|
74
|
-
--d2l-list-item-content-text-outline: initial;
|
75
|
-
--d2l-list-item-content-text-outline-offset: initial;
|
76
|
-
}
|
77
|
-
:host([_focusing-primary-action]):has(:focus-visible) .d2l-list-item-content {
|
78
|
-
--d2l-list-item-content-text-border-radius: 3px;
|
79
|
-
--d2l-list-item-content-text-outline: 2px solid var(--d2l-color-celestine);
|
80
|
-
--d2l-list-item-content-text-outline-offset: 1px;
|
81
|
-
}
|
82
|
-
}
|
83
|
-
|
84
68
|
` ];
|
85
69
|
|
86
70
|
super.styles && styles.unshift(super.styles);
|
@@ -91,7 +75,6 @@ export const ListItemNavMixin = superclass => class extends ListItemLinkMixin(su
|
|
91
75
|
super();
|
92
76
|
this.current = false;
|
93
77
|
this._childCurrent = false;
|
94
|
-
this._focusingElem = false;
|
95
78
|
this._hasCurrentParent = false;
|
96
79
|
this._nextSiblingCurrent = false;
|
97
80
|
}
|
@@ -112,9 +95,6 @@ export const ListItemNavMixin = superclass => class extends ListItemLinkMixin(su
|
|
112
95
|
if (this.current) {
|
113
96
|
this.dispatchSetChildCurrentEvent(true);
|
114
97
|
}
|
115
|
-
|
116
|
-
this.addEventListener('focusin', this.#handleFocusIn);
|
117
|
-
this.addEventListener('focusout', this.#handleFocusOut);
|
118
98
|
}
|
119
99
|
|
120
100
|
updated(changedProperties) {
|
@@ -173,16 +153,6 @@ export const ListItemNavMixin = superclass => class extends ListItemLinkMixin(su
|
|
173
153
|
super._handleLinkClick(e);
|
174
154
|
}
|
175
155
|
|
176
|
-
/* clean up (including _focusingElem) with GAUD-7495-list-item-new-styles flag */
|
177
|
-
#handleFocusIn(e) {
|
178
|
-
e.stopPropagation(); // prevent _focusing from being set on the parent
|
179
|
-
this._focusingElem = true;
|
180
|
-
}
|
181
|
-
|
182
|
-
#handleFocusOut() {
|
183
|
-
this._focusingElem = false;
|
184
|
-
}
|
185
|
-
|
186
156
|
#setAriaCurrent(val) {
|
187
157
|
this._ariaCurrent = val;
|
188
158
|
}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@brightspace-ui/core",
|
3
|
-
"version": "3.164.
|
3
|
+
"version": "3.164.1",
|
4
4
|
"description": "A collection of accessible, free, open-source web components for building Brightspace applications",
|
5
5
|
"type": "module",
|
6
6
|
"repository": "https://github.com/BrightspaceUI/core.git",
|