@brightspace-ui/core 3.240.1 → 3.240.2

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.
@@ -123,7 +123,7 @@ class DialogConfirm extends LocalizeCoreElement(DialogMixin(LitElement)) {
123
123
  <h2 id="${this._titleId}" class="d2l-heading-3" tabindex="${ifDefined(titleTabIndex)}" ?autofocus="${titleAutofocus}">${this.titleText}</h2>
124
124
  </div>` : null}
125
125
  <div id="${this._textId}" class="d2l-dialog-content" tabindex="${ifDefined(contentTabIndex)}" ?autofocus="${contentAutofocus}">
126
- <div>${this.text ? this.text.split('\n').map(line => html`<p>${line}</p>`) : null}</div>
126
+ <div>${this.#renderText()}</div>
127
127
  </div>
128
128
  <div class="d2l-dialog-footer">
129
129
  <slot name="footer" class="d2l-dialog-footer-slot"></slot>
@@ -163,6 +163,12 @@ class DialogConfirm extends LocalizeCoreElement(DialogMixin(LitElement)) {
163
163
  /* override default width measurement and just use max-width */
164
164
  }
165
165
 
166
+ #renderText() {
167
+ if (!this.text) return nothing;
168
+ const lines = this.text.split(/\r\n|\n/gi);
169
+ return lines.map(line => html`<p>${line}</p>`);
170
+ }
171
+
166
172
  }
167
173
 
168
174
  customElements.define('d2l-dialog-confirm', DialogConfirm);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@brightspace-ui/core",
3
- "version": "3.240.1",
3
+ "version": "3.240.2",
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",