@brightspace-ui/core 3.85.1 → 3.85.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.
@@ -23,7 +23,7 @@ Empty state components are used to convey that there is no data available to be
23
23
  <d2l-empty-state-simple description="There are no assignments to display.">
24
24
  <d2l-empty-state-action-link text="Create an Assignment" href="#"></d2l-empty-state-action-link>
25
25
  </d2l-empty-state-simple>
26
- <d2l-empty-state-illustrated illustration-name="desert-road" title-text="No Learning Paths Yet" description="Get started by clicking below to create your first learning path.">
26
+ <d2l-empty-state-illustrated illustration-name="desert-road" title-text="No Learning Paths Yet" description="Get started by clicking below to create your first learning path">
27
27
  <d2l-empty-state-action-link text="Create Learning Paths" href="#"></d2l-empty-state-action-link>
28
28
  </d2l-empty-state-illustrated>
29
29
  ```
@@ -55,7 +55,7 @@ The `d2l-empty-state-simple` component is an empty state component that displays
55
55
  import '@brightspace-ui/core/components/empty-state/empty-state-simple.js';
56
56
  </script>
57
57
 
58
- <d2l-empty-state-simple description="There are no assignments to display."></d2l-empty-state-simple>
58
+ <d2l-empty-state-simple description="There are no assignments to display"></d2l-empty-state-simple>
59
59
  ```
60
60
 
61
61
  ## Empty State Illustrated [d2l-empty-state-illustrated]
@@ -79,7 +79,7 @@ The `illustration-name` property can be set to use one of the preset illustratio
79
79
  }
80
80
  </style>
81
81
  <!-- docs: end hidden content -->
82
- <d2l-empty-state-illustrated illustration-name="desert-road" title-text="No Learning Paths Yet" description="Get started by clicking below to create your first learning path."></d2l-empty-state-illustrated>
82
+ <d2l-empty-state-illustrated illustration-name="desert-road" title-text="No Learning Paths Yet" description="Get started by clicking below to create your first learning path"></d2l-empty-state-illustrated>
83
83
  ```
84
84
 
85
85
  ## Empty State Action Button [d2l-empty-state-action-button]
@@ -112,7 +112,7 @@ The `primary` attribute can be set to render a primary button in place of the de
112
112
  <d2l-empty-state-simple description="There are no assignments to display.">
113
113
  <d2l-empty-state-action-button text="Create an Assignment"></d2l-empty-state-action-button>
114
114
  </d2l-empty-state-simple>
115
- <d2l-empty-state-illustrated illustration-name="desert-road" title-text="No Learning Paths Yet" description="Get started by clicking below to create your first learning path.">
115
+ <d2l-empty-state-illustrated illustration-name="desert-road" title-text="No Learning Paths Yet" description="Get started by clicking below to create your first learning path">
116
116
  <d2l-empty-state-action-button text="Create Learning Paths"></d2l-empty-state-action-button>
117
117
  </d2l-empty-state-illustrated>
118
118
  ```
@@ -145,7 +145,7 @@ To add the link, place a `d2l-empty-state-action-link` component inside of the d
145
145
  <d2l-empty-state-simple description="There are no assignments to display.">
146
146
  <d2l-empty-state-action-link text="Create an Assignment" href="#"></d2l-empty-state-action-link>
147
147
  </d2l-empty-state-simple>
148
- <d2l-empty-state-illustrated illustration-name="desert-road" title-text="No Learning Paths Yet" description="Get started by clicking below to create your first learning path.">
148
+ <d2l-empty-state-illustrated illustration-name="desert-road" title-text="No Learning Paths Yet" description="Get started by clicking below to create your first learning path">
149
149
  <d2l-empty-state-action-link text="Create Learning Paths" href="#"></d2l-empty-state-action-link>
150
150
  </d2l-empty-state-illustrated>
151
151
  ```
@@ -30,6 +30,7 @@ import { formatNumber } from '@brightspace-ui/intl/lib/number.js';
30
30
  import { ifDefined } from 'lit/directives/if-defined.js';
31
31
  import { LocalizeCoreElement } from '../../helpers/localize-core-element.js';
32
32
  import { offscreenStyles } from '../offscreen/offscreen.js';
33
+ import ResizeObserver from 'resize-observer-polyfill/dist/ResizeObserver.es.js';
33
34
  import { RtlMixin } from '../../mixins/rtl/rtl-mixin.js';
34
35
  import { SubscriberRegistryController } from '../../controllers/subscriber/subscriberControllers.js';
35
36
 
@@ -256,6 +257,11 @@ class Filter extends FocusMixin(LocalizeCoreElement(RtlMixin(LitElement))) {
256
257
  addSpaceListener();
257
258
  }
258
259
 
260
+ disconnectedCallback() {
261
+ super.disconnectedCallback();
262
+ if (this.#resizeObserver) this.#resizeObserver.disconnect();
263
+ }
264
+
259
265
  firstUpdated(changedProperties) {
260
266
  super.firstUpdated(changedProperties);
261
267
  this.addEventListener('d2l-filter-dimension-data-change', this._handleDimensionDataChange);
@@ -349,6 +355,16 @@ class Filter extends FocusMixin(LocalizeCoreElement(RtlMixin(LitElement))) {
349
355
  super.update(changedProperties);
350
356
  }
351
357
 
358
+ updated(changedProperties) {
359
+ super.updated(changedProperties);
360
+ const search = this.shadowRoot.querySelector('d2l-input-search');
361
+ if (search) {
362
+ if (this.#resizeObserver) this.#resizeObserver.disconnect();
363
+ this.#resizeObserver = new ResizeObserver(() => requestAnimationFrame(() => this.#handleSearchResize()));
364
+ this.#resizeObserver.observe(search);
365
+ }
366
+ }
367
+
352
368
  requestFilterClearAll() {
353
369
  this._handleClearAll();
354
370
  }
@@ -363,6 +379,8 @@ class Filter extends FocusMixin(LocalizeCoreElement(RtlMixin(LitElement))) {
363
379
  }
364
380
  }
365
381
 
382
+ #resizeObserver;
383
+
366
384
  _buildDimension(dimension, singleDimension) {
367
385
  let dimensionHTML;
368
386
  switch (dimension.type) {
@@ -1143,6 +1161,10 @@ class Filter extends FocusMixin(LocalizeCoreElement(RtlMixin(LitElement))) {
1143
1161
  }
1144
1162
  }
1145
1163
 
1164
+ #handleSearchResize() {
1165
+ const content = this.shadowRoot.querySelector(`.${FILTER_CONTENT_CLASS}`);
1166
+ content.resize();
1167
+ }
1146
1168
  }
1147
1169
 
1148
1170
  customElements.define('d2l-filter', Filter);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@brightspace-ui/core",
3
- "version": "3.85.1",
3
+ "version": "3.85.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",