@brightspace-ui/core 3.45.1 → 3.46.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.
@@ -47,13 +47,6 @@
47
47
  </template>
48
48
  </d2l-demo-snippet>
49
49
 
50
- <h2>Empty Text</h2>
51
- <d2l-demo-snippet>
52
- <template>
53
- <d2l-input-date label="Reminder Date" empty-text="No reminder date ever entered"></d2l-input-date>
54
- </template>
55
- </d2l-demo-snippet>
56
-
57
50
  <h2>Required</h2>
58
51
  <d2l-demo-snippet>
59
52
  <template>
@@ -47,7 +47,6 @@ Note: All `*value` properties should be in ISO 8601 calendar date format (`YYYY-
47
47
  |--|--|--|
48
48
  | `label` | String, **required** | Accessible label for the input |
49
49
  | `disabled` | Boolean | Disables the input |
50
- | `empty-text` | String | Text to reassure users that they can choose not to provide a value in this field (usually not necessary) |
51
50
  | `label-hidden` | Boolean | Hides the label visually (moves it to the input's `aria-label` attribute) |
52
51
  | `labelled-by` | String | HTML id of an element in the same shadow root which acts as the input's label |
53
52
  | `max-value` | String | Maximum valid date that could be selected by a user. |
@@ -38,11 +38,6 @@ class InputDate extends FocusMixin(LabelledMixin(SkeletonMixin(FormElementMixin(
38
38
  * @type {boolean}
39
39
  */
40
40
  disabled: { type: Boolean },
41
- /**
42
- * ADVANCED: Text that appears as a placeholder in the input to reassure users that they can choose not to provide a value (usually not necessary)
43
- * @type {string}
44
- */
45
- emptyText: { type: String, attribute: 'empty-text' },
46
41
  /**
47
42
  * @ignore
48
43
  * Optionally add a 'Now' button to be used in date-time pickers only.
@@ -149,7 +144,6 @@ class InputDate extends FocusMixin(LabelledMixin(SkeletonMixin(FormElementMixin(
149
144
  super();
150
145
 
151
146
  this.disabled = false;
152
- this.emptyText = '';
153
147
  /** @ignore */
154
148
  this.hasNow = false;
155
149
  this.labelHidden = false;
@@ -224,8 +218,6 @@ class InputDate extends FocusMixin(LabelledMixin(SkeletonMixin(FormElementMixin(
224
218
  this.updateComplete.then(() => tryUpdateHiddenContentWidth());
225
219
  });
226
220
 
227
- this._formattedValue = this.emptyText ? this.emptyText : '';
228
-
229
221
  await (document.fonts ? document.fonts.ready : Promise.resolve());
230
222
 
231
223
  // resize observer needed to handle case where it's initially hidden
@@ -283,7 +275,6 @@ class InputDate extends FocusMixin(LabelledMixin(SkeletonMixin(FormElementMixin(
283
275
  <div aria-hidden="true" class="d2l-input-date-hidden-text">
284
276
  <div>${formattedWideDate}</div>
285
277
  <div>${shortDateFormat}</div>
286
- <div>${this.emptyText}</div>
287
278
  </div>
288
279
  ${errorTooltip}
289
280
  <d2l-dropdown ?disabled="${this.disabled || this.skeleton}" no-auto-open ?prefer-fixed-positioning="${this.preferFixedPositioning}">
@@ -294,7 +285,6 @@ class InputDate extends FocusMixin(LabelledMixin(SkeletonMixin(FormElementMixin(
294
285
  @change="${this._handleChange}"
295
286
  class="d2l-dropdown-opener vdiff-target"
296
287
  instructions="${ifDefined((this._showInfoTooltip && !errorTooltip && !this.invalid && this.childErrors.size === 0 && this._inputTextFocusShowTooltip) ? this.localize(`${this._namespace}.openInstructions`, { format: shortDateFormat }) : undefined)}"
297
- description="${ifDefined(this.emptyText ? this.emptyText : undefined)}"
298
288
  ?disabled="${this.disabled}"
299
289
  @focus="${this._handleInputTextFocus}"
300
290
  @keydown="${this._handleKeydown}"
@@ -361,7 +351,6 @@ class InputDate extends FocusMixin(LabelledMixin(SkeletonMixin(FormElementMixin(
361
351
 
362
352
  _handleBlur() {
363
353
  this._showInfoTooltip = true;
364
- this._setFormattedValue(); // needed for case with empty text click on input-text then blur
365
354
  this.requestValidate(true);
366
355
  }
367
356
 
@@ -528,7 +517,7 @@ class InputDate extends FocusMixin(LabelledMixin(SkeletonMixin(FormElementMixin(
528
517
  }
529
518
 
530
519
  _setFormattedValue() {
531
- this._formattedValue = this._shownValue ? formatISODateInUserCalDescriptor(this._shownValue) : (this.emptyText ? this.emptyText : '');
520
+ this._formattedValue = this._shownValue ? formatISODateInUserCalDescriptor(this._shownValue) : '';
532
521
  }
533
522
 
534
523
  async _updateValueDispatchEvent(dateInISO, setToNow) {
@@ -5961,12 +5961,6 @@
5961
5961
  "type": "boolean",
5962
5962
  "default": "false"
5963
5963
  },
5964
- {
5965
- "name": "empty-text",
5966
- "description": "ADVANCED: Text that appears as a placeholder in the input to reassure users that they can choose not to provide a value (usually not necessary)",
5967
- "type": "string",
5968
- "default": "\"\""
5969
- },
5970
5964
  {
5971
5965
  "name": "label-hidden",
5972
5966
  "description": "Hides the label visually. Hidden labels are still read by screen readers so make sure to set an appropriate label.",
@@ -6032,13 +6026,6 @@
6032
6026
  "type": "boolean",
6033
6027
  "default": "false"
6034
6028
  },
6035
- {
6036
- "name": "emptyText",
6037
- "attribute": "empty-text",
6038
- "description": "ADVANCED: Text that appears as a placeholder in the input to reassure users that they can choose not to provide a value (usually not necessary)",
6039
- "type": "string",
6040
- "default": "\"\""
6041
- },
6042
6029
  {
6043
6030
  "name": "labelHidden",
6044
6031
  "attribute": "label-hidden",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@brightspace-ui/core",
3
- "version": "3.45.1",
3
+ "version": "3.46.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",
@@ -49,7 +49,7 @@
49
49
  "@brightspace-ui/testing": "^1",
50
50
  "@rollup/plugin-dynamic-import-vars": "^2",
51
51
  "@rollup/plugin-node-resolve": "^15",
52
- "@rollup/plugin-replace": "^5",
52
+ "@rollup/plugin-replace": "^6",
53
53
  "@web/dev-server": "^0.4",
54
54
  "chalk": "^5",
55
55
  "eslint": "^8",