@brightspace-ui/core 2.23.2 → 2.24.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.
@@ -176,7 +176,7 @@ function hideAccessible(target) {
176
176
  };
177
177
 
178
178
  let parent = getComposedParent(target);
179
- while (parent !== document.documentElement) {
179
+ while (parent !== document.documentElement && parent !== null) {
180
180
  if (parent.nodeType === Node.ELEMENT_NODE) {
181
181
  path.push(parent);
182
182
  hideAccessibleChildren(parent);
@@ -286,7 +286,7 @@ A tag-list allowing the user to see (and remove) the currently applied filters.
286
286
  | Property | Type | Description |
287
287
  |---|---|---|
288
288
  | `filter-ids` | String, required | Id(s) (space-delimited) of the filter component(s) to subscribe to |
289
- | `label-text` | String | The text displayed in this component's label |
289
+ | `label` | String | The text displayed in this component's label |
290
290
  <!-- docs: end hidden content -->
291
291
 
292
292
  ## Filter Dimension: Date [d2l-filter-dimension-date]
@@ -82,7 +82,6 @@ class InputDate extends FocusMixin(LabelledMixin(SkeletonMixin(FormElementMixin(
82
82
  * @type {string}
83
83
  */
84
84
  value: { type: String },
85
- _hiddenCalendarHeight: { type: Number },
86
85
  _hiddenContentWidth: { type: String },
87
86
  _dateTimeDescriptor: { type: Object },
88
87
  _dropdownFirstOpened: { type: Boolean },
@@ -114,8 +113,7 @@ class InputDate extends FocusMixin(LabelledMixin(SkeletonMixin(FormElementMixin(
114
113
  :host([disabled]) d2l-icon {
115
114
  opacity: 0.5;
116
115
  }
117
- .d2l-input-date-hidden-text,
118
- .d2l-input-date-hidden-calendar {
116
+ .d2l-input-date-hidden-text {
119
117
  font-family: inherit;
120
118
  font-size: 0.8rem;
121
119
  font-weight: 400;
@@ -154,7 +152,6 @@ class InputDate extends FocusMixin(LabelledMixin(SkeletonMixin(FormElementMixin(
154
152
 
155
153
  this._dropdownFirstOpened = false;
156
154
  this._formattedValue = '';
157
- this._hiddenCalendarHeight = 415; // height of 6 date row calendar when 1rem = 20px
158
155
  this._hiddenContentWidth = '8rem';
159
156
  this._inputId = getUniqueId();
160
157
  this._inputTextFocusMouseup = false;
@@ -191,7 +188,6 @@ class InputDate extends FocusMixin(LabelledMixin(SkeletonMixin(FormElementMixin(
191
188
  disconnectedCallback() {
192
189
  super.disconnectedCallback();
193
190
  if (this._hiddenContentResizeObserver) this._hiddenContentResizeObserver.disconnect();
194
- if (this._hiddenCalendarResizeObserver) this._hiddenCalendarResizeObserver.disconnect();
195
191
  }
196
192
 
197
193
  async firstUpdated(changedProperties) {
@@ -219,17 +215,6 @@ class InputDate extends FocusMixin(LabelledMixin(SkeletonMixin(FormElementMixin(
219
215
  this._hiddenContentWidth = `${width}px`;
220
216
  });
221
217
  this._hiddenContentResizeObserver.observe(hiddenContent);
222
-
223
- const hiddenCalendar = this.shadowRoot.querySelector('.d2l-input-date-hidden-calendar');
224
- if (!hiddenCalendar) return;
225
- this._hiddenCalendarResizeObserver = new ResizeObserver(() => {
226
- const hiddenCalendarHeight = Math.ceil(parseFloat(getComputedStyle(hiddenCalendar).getPropertyValue('height')));
227
- if (hiddenCalendarHeight > 0) {
228
- this._hiddenCalendarHeight = hiddenCalendarHeight;
229
- this._hiddenCalendarResizeObserver.disconnect();
230
- }
231
- });
232
- this._hiddenCalendarResizeObserver.observe(hiddenCalendar);
233
218
  }
234
219
 
235
220
  render() {
@@ -252,7 +237,7 @@ class InputDate extends FocusMixin(LabelledMixin(SkeletonMixin(FormElementMixin(
252
237
  @d2l-dropdown-open="${this._handleDropdownOpen}"
253
238
  @d2l-dropdown-focus-enter="${this._handleFocusTrapEnter}"
254
239
  max-width="335"
255
- min-height="${this._hiddenCalendarHeight}"
240
+ min-height="415"
256
241
  ?no-auto-fit="${!mediaQueryList.matches}"
257
242
  trap-focus
258
243
  no-auto-focus
@@ -307,13 +292,6 @@ class InputDate extends FocusMixin(LabelledMixin(SkeletonMixin(FormElementMixin(
307
292
  </d2l-input-text>
308
293
  ${dropdownContent}
309
294
  </d2l-dropdown>
310
- ${!this._dropdownFirstOpened ? html`<div aria-hidden="true" class="d2l-input-date-hidden-calendar">
311
- <d2l-calendar selected-value="2018-09-08">
312
- <div class="d2l-calendar-slot-buttons">
313
- <d2l-button-subtle text="${this.localize(`${this._namespace}.today`)}"></d2l-button-subtle>
314
- </div>
315
- </d2l-calendar>
316
- </div>` : null}
317
295
  `;
318
296
  }
319
297
 
@@ -8,6 +8,8 @@ import { LocalizeCoreElement } from '../../helpers/localize-core-element.js';
8
8
  import ResizeObserver from 'resize-observer-polyfill/dist/ResizeObserver.es.js';
9
9
  import { styleMap } from 'lit/directives/style-map.js';
10
10
 
11
+ const CLEAR_ALL_THRESHOLD = 4;
12
+ const GAP = 6;
11
13
  const PAGE_SIZE = {
12
14
  medium: 600,
13
15
  large: 970
@@ -17,7 +19,6 @@ const PAGE_SIZE_LINES = {
17
19
  medium: 2,
18
20
  small: 3
19
21
  };
20
- const GAP = 6;
21
22
 
22
23
  async function filterAsync(arr, callback) {
23
24
  const fail = Symbol();
@@ -177,7 +178,7 @@ class TagList extends LocalizeCoreElement(InteractiveMixin(ArrowKeysMixin(LitEle
177
178
  }
178
179
  const clearableClasses = {
179
180
  'd2l-tag-list-clear-button': true,
180
- 'd2l-tag-list-clear-button-visible': this.clearable && this._items && this._items.length > 0
181
+ 'd2l-tag-list-clear-button-visible': this.clearable && this._items && this._items.length >= CLEAR_ALL_THRESHOLD
181
182
  };
182
183
 
183
184
  const containerClasses = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@brightspace-ui/core",
3
- "version": "2.23.2",
3
+ "version": "2.24.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",