@brightspace-ui/core 2.37.2 → 2.38.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.
@@ -174,6 +174,13 @@ export const DropdownOpenerMixin = superclass => class extends superclass {
174
174
  this.dropdownOpened = !this.dropdownOpened;
175
175
  }
176
176
 
177
+ __dispatchOpenerClickEvent() {
178
+ /** Dispatched when the opener is clicked, useful for when no-auto-open is enabled */
179
+ this.dispatchEvent(new CustomEvent(
180
+ 'd2l-dropdown-opener-click', { bubbles: false, composed: false }
181
+ ));
182
+ }
183
+
177
184
  __getContentElement() {
178
185
  if (!this.shadowRoot) return undefined;
179
186
  return this.shadowRoot.querySelector('slot:not([name])').assignedNodes()
@@ -202,6 +209,7 @@ export const DropdownOpenerMixin = superclass => class extends superclass {
202
209
  __onKeypress(e) {
203
210
  if (e.srcElement === this || isComposedAncestor(this.getOpenerElement(), e.srcElement)) {
204
211
  if (e.keyCode !== 13 && e.keyCode !== 32) return;
212
+ this.__dispatchOpenerClickEvent();
205
213
  if (this.noAutoOpen) return;
206
214
  if (!this.openOnHover) {
207
215
  this.toggleOpen(true);
@@ -256,6 +264,7 @@ export const DropdownOpenerMixin = superclass => class extends superclass {
256
264
  }
257
265
 
258
266
  __onOpenerMouseUp(e) {
267
+ this.__dispatchOpenerClickEvent();
259
268
  if (this.noAutoOpen) return;
260
269
  if (this.openOnHover) {
261
270
  // prevent propogation to window and triggering _onOutsideClick
@@ -5,6 +5,7 @@ import { css, html, LitElement, nothing } from 'lit';
5
5
  /**
6
6
  * `d2l-empty-state-action-button` is an empty state action component that can be placed inside of the default slot of `empty-state-simple` or `empty-state-illustrated` to add a button action to the component.
7
7
  * @fires d2l-empty-state-action - Dispatched when the action button is clicked
8
+ * @fires d2l-empty-state-illustrated-check - Internal event
8
9
  */
9
10
  class EmptyStateActionButton extends LitElement {
10
11
 
@@ -20,7 +20,7 @@ export const emptyStateStyles = css`
20
20
 
21
21
  .action-slot::slotted(d2l-empty-state-action-button:first-child),
22
22
  .action-slot::slotted(d2l-empty-state-action-link:first-child) {
23
- display: inline-block;
23
+ display: inline;
24
24
  }
25
25
 
26
26
  `;
@@ -49,6 +49,7 @@ class TooltipHelp extends FocusMixin(FocusVisiblePolyfillMixin(LitElement)) {
49
49
  background: none;
50
50
  border: none;
51
51
  cursor: inherit;
52
+ font-family: inherit;
52
53
  padding: 0;
53
54
  text-decoration-line: underline;
54
55
  text-decoration-style: dashed;
@@ -151,7 +151,7 @@ export class IdSubscriberController {
151
151
  let registryIds = this._host[this._idPropertyName];
152
152
  if (!registryIds) return;
153
153
 
154
- registryIds = registryIds.split(' ');
154
+ registryIds = registryIds.trim().split(' ');
155
155
  registryIds.forEach(registryId => {
156
156
  this._updateRegistry(registryId, 0);
157
157
  });
@@ -1815,6 +1815,12 @@
1815
1815
  "default": "false"
1816
1816
  }
1817
1817
  ],
1818
+ "events": [
1819
+ {
1820
+ "name": "d2l-dropdown-opener-click",
1821
+ "description": "Dispatched when the opener is clicked, useful for when no-auto-open is enabled"
1822
+ }
1823
+ ],
1818
1824
  "slots": [
1819
1825
  {
1820
1826
  "name": "",
@@ -1903,6 +1909,12 @@
1903
1909
  "default": "false"
1904
1910
  }
1905
1911
  ],
1912
+ "events": [
1913
+ {
1914
+ "name": "d2l-dropdown-opener-click",
1915
+ "description": "Dispatched when the opener is clicked, useful for when no-auto-open is enabled"
1916
+ }
1917
+ ],
1906
1918
  "slots": [
1907
1919
  {
1908
1920
  "name": "",
@@ -2266,6 +2278,12 @@
2266
2278
  "default": "false"
2267
2279
  }
2268
2280
  ],
2281
+ "events": [
2282
+ {
2283
+ "name": "d2l-dropdown-opener-click",
2284
+ "description": "Dispatched when the opener is clicked, useful for when no-auto-open is enabled"
2285
+ }
2286
+ ],
2269
2287
  "slots": [
2270
2288
  {
2271
2289
  "name": "",
@@ -2629,6 +2647,12 @@
2629
2647
  "default": "false"
2630
2648
  }
2631
2649
  ],
2650
+ "events": [
2651
+ {
2652
+ "name": "d2l-dropdown-opener-click",
2653
+ "description": "Dispatched when the opener is clicked, useful for when no-auto-open is enabled"
2654
+ }
2655
+ ],
2632
2656
  "slots": [
2633
2657
  {
2634
2658
  "name": "",
@@ -2963,6 +2987,12 @@
2963
2987
  "default": "false"
2964
2988
  }
2965
2989
  ],
2990
+ "events": [
2991
+ {
2992
+ "name": "d2l-dropdown-opener-click",
2993
+ "description": "Dispatched when the opener is clicked, useful for when no-auto-open is enabled"
2994
+ }
2995
+ ],
2966
2996
  "slots": [
2967
2997
  {
2968
2998
  "name": "",
@@ -3010,7 +3040,8 @@
3010
3040
  "description": "Dispatched when the action button is clicked"
3011
3041
  },
3012
3042
  {
3013
- "name": "d2l-empty-state-illustrated-check"
3043
+ "name": "d2l-empty-state-illustrated-check",
3044
+ "description": "Internal event"
3014
3045
  }
3015
3046
  ]
3016
3047
  },
@@ -9071,6 +9102,10 @@
9071
9102
  {
9072
9103
  "name": "d2l-selection-observer-subscribe",
9073
9104
  "description": "Internal event"
9105
+ },
9106
+ {
9107
+ "name": "d2l-dropdown-opener-click",
9108
+ "description": "Dispatched when the opener is clicked, useful for when no-auto-open is enabled"
9074
9109
  }
9075
9110
  ],
9076
9111
  "slots": [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@brightspace-ui/core",
3
- "version": "2.37.2",
3
+ "version": "2.38.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",