@brightspace-ui/core 2.31.3 → 2.32.0

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.
@@ -14,6 +14,11 @@ export const DropdownOpenerMixin = superclass => class extends superclass {
14
14
  reflect: true
15
15
  },
16
16
 
17
+ /**
18
+ * @ignore
19
+ */
20
+ dropdownOpened: { state: true },
21
+
17
22
  /**
18
23
  * @ignore
19
24
  */
@@ -40,7 +45,6 @@ export const DropdownOpenerMixin = superclass => class extends superclass {
40
45
  attribute: 'open-on-hover'
41
46
  },
42
47
  _isHovering: { type: Boolean },
43
- _isOpen: { type: Boolean },
44
48
  _isOpenedViaClick: { type: Boolean },
45
49
  _isFading: { type: Boolean }
46
50
  };
@@ -55,7 +59,7 @@ export const DropdownOpenerMixin = superclass => class extends superclass {
55
59
 
56
60
  // hover option
57
61
  this._dismissTimerId = getUniqueId();
58
- this._isOpen = false;
62
+ this.dropdownOpened = false;
59
63
  this._isOpenedViaClick = false;
60
64
  this._isHovering = false;
61
65
  this._isFading = false;
@@ -121,7 +125,7 @@ export const DropdownOpenerMixin = superclass => class extends superclass {
121
125
 
122
126
  /* used by open-on-hover option */
123
127
  async closeDropdown(fadeOut) {
124
- this._isOpen = false;
128
+ this.dropdownOpened = false;
125
129
  this._isHovering = false;
126
130
  this._isOpenedViaClick = false;
127
131
  if (fadeOut) {
@@ -150,7 +154,7 @@ export const DropdownOpenerMixin = superclass => class extends superclass {
150
154
 
151
155
  /* used by open-on-hover option */
152
156
  async openDropdown(applyFocus) {
153
- this._isOpen = true;
157
+ this.dropdownOpened = true;
154
158
  const dropdownContent = this.__getContentElement();
155
159
  if (!dropdownContent) return;
156
160
  await dropdownContent.open(applyFocus);
@@ -167,7 +171,7 @@ export const DropdownOpenerMixin = superclass => class extends superclass {
167
171
  return;
168
172
  }
169
173
  content.toggleOpen(applyFocus);
170
- this._isOpen = !this._isOpen;
174
+ this.dropdownOpened = !this.dropdownOpened;
171
175
  }
172
176
 
173
177
  __getContentElement() {
@@ -183,12 +187,12 @@ export const DropdownOpenerMixin = superclass => class extends superclass {
183
187
  }
184
188
  opener.setAttribute('aria-expanded', 'false');
185
189
  opener.removeAttribute('active');
186
- this._isOpen = false;
190
+ this.dropdownOpened = false;
187
191
  this._isOpenedViaClick = false;
188
192
  }
189
193
 
190
194
  __onDropdownMouseUp() {
191
- this._isOpen = true;
195
+ this.dropdownOpened = true;
192
196
  this._isFading = false;
193
197
  this._isHovering = false;
194
198
  this._isOpenedViaClick = true;
@@ -216,7 +220,7 @@ export const DropdownOpenerMixin = superclass => class extends superclass {
216
220
  const dropdownContent = this.__getContentElement();
217
221
  if (dropdownContent._useMobileStyling) return;
218
222
  clearTimeout(this._dismissTimerId);
219
- if (!this._isOpen) await this.openDropdown(false);
223
+ if (!this.dropdownOpened) await this.openDropdown(false);
220
224
  this._closeTimerStop();
221
225
  if (!this._isOpenedViaClick) this._isHovering = true;
222
226
  }
@@ -259,7 +263,7 @@ export const DropdownOpenerMixin = superclass => class extends superclass {
259
263
  e.stopPropagation();
260
264
  }
261
265
  this._closeTimerStop();
262
- if (this._isOpen && !this._isHovering) {
266
+ if (this.dropdownOpened && !this._isHovering) {
263
267
  this.closeDropdown();
264
268
  } else {
265
269
  this._isOpenedViaClick = true;
@@ -271,7 +275,7 @@ export const DropdownOpenerMixin = superclass => class extends superclass {
271
275
 
272
276
  /* used by open-on-hover option */
273
277
  _closeTimerStart() {
274
- if (this._isOpen) return;
278
+ if (this.dropdownOpened) return;
275
279
  clearTimeout(this._setTimeoutId);
276
280
  this._isFading = true;
277
281
  this._setTimeoutId = setTimeout(() => {
@@ -289,7 +293,7 @@ export const DropdownOpenerMixin = superclass => class extends superclass {
289
293
 
290
294
  /* used by open-on-hover option */
291
295
  _onOutsideClick(e) {
292
- if (!this._isOpen) return;
296
+ if (!this.dropdownOpened) return;
293
297
  const isWithinDropdown = isComposedAncestor(this.__getContentElement(), e.composedPath()[0]);
294
298
  const isWithinOpener = isComposedAncestor(this.getOpenerElement(), e.composedPath()[0]);
295
299
  const isBackdropClick = isWithinDropdown
@@ -1808,6 +1808,11 @@
1808
1808
  "description": "Disables the dropdown opener",
1809
1809
  "type": "boolean",
1810
1810
  "default": "false"
1811
+ },
1812
+ {
1813
+ "name": "dropdownOpened",
1814
+ "type": "boolean",
1815
+ "default": "false"
1811
1816
  }
1812
1817
  ],
1813
1818
  "slots": [
@@ -1891,6 +1896,11 @@
1891
1896
  "description": "Disables the dropdown opener",
1892
1897
  "type": "boolean",
1893
1898
  "default": "false"
1899
+ },
1900
+ {
1901
+ "name": "dropdownOpened",
1902
+ "type": "boolean",
1903
+ "default": "false"
1894
1904
  }
1895
1905
  ],
1896
1906
  "slots": [
@@ -2245,6 +2255,11 @@
2245
2255
  "type": "boolean",
2246
2256
  "default": "false"
2247
2257
  },
2258
+ {
2259
+ "name": "dropdownOpened",
2260
+ "type": "boolean",
2261
+ "default": "false"
2262
+ },
2248
2263
  {
2249
2264
  "name": "visibleOnAncestor",
2250
2265
  "type": "boolean",
@@ -2603,6 +2618,11 @@
2603
2618
  "type": "boolean",
2604
2619
  "default": "false"
2605
2620
  },
2621
+ {
2622
+ "name": "dropdownOpened",
2623
+ "type": "boolean",
2624
+ "default": "false"
2625
+ },
2606
2626
  {
2607
2627
  "name": "visibleOnAncestor",
2608
2628
  "type": "boolean",
@@ -2936,6 +2956,11 @@
2936
2956
  "description": "Disables the dropdown opener",
2937
2957
  "type": "boolean",
2938
2958
  "default": "false"
2959
+ },
2960
+ {
2961
+ "name": "dropdownOpened",
2962
+ "type": "boolean",
2963
+ "default": "false"
2939
2964
  }
2940
2965
  ],
2941
2966
  "slots": [
@@ -8804,6 +8829,11 @@
8804
8829
  "description": "Disables the dropdown opener",
8805
8830
  "type": "boolean",
8806
8831
  "default": "false"
8832
+ },
8833
+ {
8834
+ "name": "dropdownOpened",
8835
+ "type": "boolean",
8836
+ "default": "false"
8807
8837
  }
8808
8838
  ],
8809
8839
  "events": [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@brightspace-ui/core",
3
- "version": "2.31.3",
3
+ "version": "2.32.0",
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",