@brightspace-ui/core 2.160.1 → 2.160.3

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.
@@ -335,6 +335,7 @@ export const ListItemDragDropMixin = superclass => class extends superclass {
335
335
  opacity: 0;
336
336
  }
337
337
  :host([selected]) d2l-list-item-drag-handle,
338
+ d2l-list-item-drag-handle:hover,
338
339
  d2l-list-item-drag-handle.d2l-hovering,
339
340
  d2l-list-item-drag-handle.d2l-focusing {
340
341
  opacity: 1;
@@ -72,6 +72,7 @@ class ListItemDragHandle extends LocalizeCoreElement(FocusMixin(RtlMixin(LitElem
72
72
  :host {
73
73
  display: flex;
74
74
  margin: 0.25rem;
75
+ pointer-events: auto; /* required since its parent may set point-events: none; (see generic layout) */
75
76
  }
76
77
  :host([hidden]) {
77
78
  display: none;
@@ -181,25 +182,6 @@ class ListItemDragHandle extends LocalizeCoreElement(FocusMixin(RtlMixin(LitElem
181
182
  this.activateKeyboardMode();
182
183
  }
183
184
 
184
- _onKeyboardButtonFocusIn() {
185
- if (hasDisplayedKeyboardTooltip) return;
186
- this._displayKeyboardTooltip = true;
187
- hasDisplayedKeyboardTooltip = true;
188
- }
189
-
190
- _onKeyboardButtonFocusOut(e) {
191
- this._displayKeyboardTooltip = false;
192
- if (this._movingElement) {
193
- this._movingElement = false;
194
- e.stopPropagation();
195
- e.preventDefault();
196
- return;
197
- }
198
- this._keyboardActive = false;
199
- this._dispatchAction(dragActions.save);
200
- e.stopPropagation();
201
- }
202
-
203
185
  async _onMoveButtonAction(e) {
204
186
 
205
187
  let action = null;
@@ -245,6 +227,25 @@ class ListItemDragHandle extends LocalizeCoreElement(FocusMixin(RtlMixin(LitElem
245
227
 
246
228
  }
247
229
 
230
+ _onMoveButtonFocusIn() {
231
+ if (hasDisplayedKeyboardTooltip) return;
232
+ this._displayKeyboardTooltip = true;
233
+ hasDisplayedKeyboardTooltip = true;
234
+ }
235
+
236
+ _onMoveButtonFocusOut(e) {
237
+ this._displayKeyboardTooltip = false;
238
+ if (this._movingElement) {
239
+ this._movingElement = false;
240
+ e.stopPropagation();
241
+ e.preventDefault();
242
+ return;
243
+ }
244
+ this._keyboardActive = false;
245
+ this._dispatchAction(dragActions.save);
246
+ e.stopPropagation();
247
+ }
248
+
248
249
  async _onMoveButtonKeydown(e) {
249
250
  if (!this._keyboardActive) {
250
251
  return;
@@ -274,6 +275,10 @@ class ListItemDragHandle extends LocalizeCoreElement(FocusMixin(RtlMixin(LitElem
274
275
 
275
276
  }
276
277
 
278
+ _onMoveButtonMouseDown(e) {
279
+ e.preventDefault();
280
+ }
281
+
277
282
  _renderDragger() {
278
283
  return html`
279
284
  <button
@@ -292,10 +297,11 @@ class ListItemDragHandle extends LocalizeCoreElement(FocusMixin(RtlMixin(LitElem
292
297
  <d2l-button-move
293
298
  class="d2l-list-item-drag-handle-button"
294
299
  @d2l-button-move-action="${this._onMoveButtonAction}"
295
- @focusin="${this._onKeyboardButtonFocusIn}"
296
- @focusout="${this._onKeyboardButtonFocusOut}"
300
+ @focusin="${this._onMoveButtonFocusIn}"
301
+ @focusout="${this._onMoveButtonFocusOut}"
297
302
  id="${this._buttonId}"
298
303
  @keydown="${this._onMoveButtonKeydown}"
304
+ @mousedown="${this._onMoveButtonMouseDown}"
299
305
  text="${this._defaultLabel}">
300
306
  </d2l-button-move>
301
307
  ${this._displayKeyboardTooltip ? html`<d2l-tooltip class="vdiff-target" align="start" announced for="${this._buttonId}" for-type="descriptor">${this._renderTooltipContent()}</d2l-tooltip>` : ''}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@brightspace-ui/core",
3
- "version": "2.160.1",
3
+ "version": "2.160.3",
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",
@@ -69,7 +69,7 @@
69
69
  "@formatjs/intl-pluralrules": "^1",
70
70
  "@open-wc/dedupe-mixin": "^1",
71
71
  "ifrau": "^0.41",
72
- "intl-messageformat": "^10",
72
+ "intl-messageformat": "10.5.4",
73
73
  "lit": "^2",
74
74
  "prismjs": "^1",
75
75
  "resize-observer-polyfill": "^1"