@brightspace-ui/core 2.79.0 → 2.79.2

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.
@@ -5,7 +5,6 @@ import { classMap } from 'lit/directives/class-map.js';
5
5
  import { createHtmlBlockRenderer as createMathRenderer } from '../../helpers/mathjax.js';
6
6
  import { HtmlAttributeObserverController } from '../../controllers/attributeObserver/htmlAttributeObserverController.js';
7
7
  import { requestInstance } from '../../mixins/provider-mixin.js';
8
- import { RtlMixin } from '../../mixins/rtl-mixin.js';
9
8
 
10
9
  export const htmlBlockContentStyles = css`
11
10
  .d2l-html-block-rendered {
@@ -135,7 +134,7 @@ const getRenderers = async() => {
135
134
  * A component for displaying user-authored HTML.
136
135
  * @slot - Provide your user-authored HTML
137
136
  */
138
- class HtmlBlock extends RtlMixin(LitElement) {
137
+ class HtmlBlock extends LitElement {
139
138
 
140
139
  static get properties() {
141
140
  return {
@@ -168,7 +167,7 @@ class HtmlBlock extends RtlMixin(LitElement) {
168
167
  :host {
169
168
  display: block;
170
169
  overflow-wrap: break-word;
171
- text-align: left;
170
+ text-align: start;
172
171
  }
173
172
  :host([inline]),
174
173
  :host([inline]) .d2l-html-block-rendered {
@@ -182,9 +181,6 @@ class HtmlBlock extends RtlMixin(LitElement) {
182
181
  :host([no-deferred-rendering]) slot {
183
182
  display: contents;
184
183
  }
185
- :host([dir="rtl"]) {
186
- text-align: right;
187
- }
188
184
  `];
189
185
  }
190
186
 
@@ -452,6 +452,8 @@ class ListItemGenericLayout extends RtlMixin(LitElement) {
452
452
  case keyCodes.SPACE:
453
453
  node = getComposedActiveElement();
454
454
  node.click();
455
+ // mouseup event is necessary for components like d2l-dropdown-more that control state by listening to this event
456
+ node.dispatchEvent(new MouseEvent('mouseup', { composed: true }));
455
457
  break;
456
458
  case keyCodes.RIGHT:
457
459
  node = getComposedActiveElement();
@@ -8155,6 +8155,11 @@
8155
8155
  "default": "false"
8156
8156
  }
8157
8157
  ],
8158
+ "events": [
8159
+ {
8160
+ "name": "mouseup"
8161
+ }
8162
+ ],
8158
8163
  "slots": [
8159
8164
  {
8160
8165
  "name": "outside-control",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@brightspace-ui/core",
3
- "version": "2.79.0",
3
+ "version": "2.79.2",
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",
@@ -334,6 +334,7 @@ class MobileMouseResizer extends Resizer {
334
334
 
335
335
  constructor() {
336
336
  super();
337
+ this._isDragging = false;
337
338
  this._onMouseDown = this._onMouseDown.bind(this);
338
339
  this._onMouseMove = this._onMouseMove.bind(this);
339
340
  this._onMouseUp = this._onMouseUp.bind(this);
@@ -363,6 +364,7 @@ class MobileMouseResizer extends Resizer {
363
364
  e.preventDefault();
364
365
  const y = e.clientY - this.contentRect.top;
365
366
  this._offset = y - (this.contentRect.height - this.panelSize);
367
+ this._isDragging = false;
366
368
  this._isResizing = true;
367
369
  this._target.focus();
368
370
  }
@@ -374,6 +376,7 @@ class MobileMouseResizer extends Resizer {
374
376
  }
375
377
  const y = e.clientY - this.contentRect.top;
376
378
  const secondaryHeight = this.clampMaxHeight(this.contentRect.height - y + this._offset);
379
+ this._isDragging = true;
377
380
  this.dispatchResize(secondaryHeight, false);
378
381
  }
379
382
 
@@ -386,12 +389,13 @@ class MobileMouseResizer extends Resizer {
386
389
  const y = e.clientY - this.contentRect.top;
387
390
  const desiredSecondaryHeight = this.contentRect.height - y + this._offset;
388
391
  if (
389
- (this._wasCollapsed && desiredSecondaryHeight < collapsedCollapseThreshold)
390
- || (!this._wasCollapsed && desiredSecondaryHeight < expandedCollapseThreshold)
392
+ this._isDragging
393
+ && ((this._wasCollapsed && desiredSecondaryHeight < collapsedCollapseThreshold)
394
+ || (!this._wasCollapsed && desiredSecondaryHeight < expandedCollapseThreshold))
391
395
  ) {
392
- if (desiredSecondaryHeight > 0) this.dispatchResize(0, true);
396
+ if (desiredSecondaryHeight !== 0) this.dispatchResize(0, true);
393
397
  }
394
- else if (desiredSecondaryHeight < this.contentBounds.minHeight) {
398
+ else if (this._isDragging && desiredSecondaryHeight < this.contentBounds.minHeight) {
395
399
  this.dispatchResize(this.contentBounds.minHeight, true);
396
400
  }
397
401
  this._isResizing = false;