@brightspace-ui/core 1.202.1 → 1.204.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.
@@ -38,7 +38,7 @@ The `d2l-button` element can be used just like the native button element, but al
38
38
  ![Button](./screenshots/button.png?raw=true)
39
39
  <!-- docs: end hidden content -->
40
40
 
41
- <!-- docs: demo live name: d2l-button -->
41
+ <!-- docs: demo live name:d2l-button -->
42
42
  ```html
43
43
  <script type="module">
44
44
  import '@brightspace-ui/core/components/button/button.js';
@@ -325,9 +325,7 @@ export const DropdownContentMixin = superclass => class extends LocalizeCoreElem
325
325
  if (isNaN(newVerticalOffset)) {
326
326
  newVerticalOffset = 20;
327
327
  }
328
- // for IE11
329
- if (window.ShadyCSS) window.ShadyCSS.styleSubtree(this, { '--d2l-dropdown-verticaloffset': `${newVerticalOffset}px` });
330
- else this.style.setProperty('--d2l-dropdown-verticaloffset', `${newVerticalOffset}px`);
328
+ this.style.setProperty('--d2l-dropdown-verticaloffset', `${newVerticalOffset}px`);
331
329
  }
332
330
  });
333
331
  }
@@ -15,34 +15,34 @@ Place the user-authored HTML within a `template` and the `d2l-html-block` will s
15
15
  import '@brightspace-ui/core/components/icons/icon.js';
16
16
  </script>
17
17
  <d2l-html-block>
18
- <template>
19
- <!-- docs: start hidden content -->
20
- <style>
21
- div {
22
- --d2l-icon-fill-color: var(--d2l-color-cinnabar);
23
- }
24
- span {
25
- color: var(--d2l-color-cinnabar);
26
- margin-left: 10px;
27
- vertical-align: middle;
28
- }
29
- d2l-icon {
30
- align-self: center;
31
- flex-shrink: 0;
32
- }
33
- .warning-container {
34
- align-items: center;
35
- display: flex;
36
- justify-content: center;
37
- }
38
- </style>
18
+ <template>
19
+ <!-- docs: start hidden content -->
20
+ <style>
21
+ div {
22
+ --d2l-icon-fill-color: var(--d2l-color-cinnabar);
23
+ }
24
+ span {
25
+ color: var(--d2l-color-cinnabar);
26
+ margin-left: 10px;
27
+ vertical-align: middle;
28
+ }
29
+ d2l-icon {
30
+ align-self: center;
31
+ flex-shrink: 0;
32
+ }
33
+ .warning-container {
34
+ align-items: center;
35
+ display: flex;
36
+ justify-content: center;
37
+ }
38
+ </style>
39
39
  <!-- docs: end hidden content --><div class="warning-container">
40
- <d2l-icon icon="tier3:alert"></d2l-icon>
41
- <span>
42
- <b>Important:</b> user-authored HTML must be trusted or properly sanitized!
43
- </span>
44
- </div>
45
- </template>
40
+ <d2l-icon icon="tier3:alert"></d2l-icon>
41
+ <span>
42
+ <b>Important:</b> user-authored HTML must be trusted or properly sanitized!
43
+ </span>
44
+ </div>
45
+ </template>
46
46
  </d2l-html-block>
47
47
  ```
48
48
 
@@ -50,20 +50,20 @@ To use `d2l-html-block` within another Lit component, use the [unsafeHTML](https
50
50
 
51
51
  ```html
52
52
  <script type="module">
53
- import { html, LitElement } from 'lit-element/lit-element.js';
54
- import { unsafeHTML } from 'lit-html/directives/unsafe-html.js';
55
- import '@brightspace-ui/core/components/icons/icon.js';
53
+ import { html, LitElement } from 'lit-element/lit-element.js';
54
+ import { unsafeHTML } from 'lit-html/directives/unsafe-html.js';
55
+ import '@brightspace-ui/core/components/icons/icon.js';
56
56
 
57
- class SomeComponent extends LitElement {
58
- render() {
59
- return html`
60
- <d2l-html-block>
61
- <template>${unsafeHTML(this._unsafeHTML)}</template>
62
- </d2l-html-block>`;
63
- }
64
- }
57
+ class SomeComponent extends LitElement {
58
+ render() {
59
+ return html`
60
+ <d2l-html-block>
61
+ <template>${unsafeHTML(this._unsafeHTML)}</template>
62
+ </d2l-html-block>`;
63
+ }
64
+ }
65
65
 
66
- customElements.define('d2l-some-component', SomeComponent);
66
+ customElements.define('d2l-some-component', SomeComponent);
67
67
  </script>
68
68
  <d2l-some-component></d2l-some-component>
69
69
  ```
@@ -79,27 +79,27 @@ Examples are provided to display how user-authored math can be embedded within y
79
79
  import '@brightspace-ui/core/components/icons/icon.js';
80
80
  </script>
81
81
  <d2l-html-block>
82
- <template>
83
- <div class="mathml-container">
84
- <math xmlns="http://www.w3.org/1998/Math/MathML">
85
- <msqrt>
86
- <mn>3</mn>
87
- <mi>x</mi>
88
- <mo>&#x2212;</mo>
89
- <mn>1</mn>
90
- </msqrt>
91
- <mo>+</mo>
92
- <mo stretchy="false">(</mo>
93
- <mn>1</mn>
94
- <mo>+</mo>
95
- <mi>x</mi>
96
- <msup>
97
- <mo stretchy="false">)</mo>
98
- <mn>2</mn>
99
- </msup>
100
- </math>
101
- </div>
102
- </template>
82
+ <template>
83
+ <div class="mathml-container">
84
+ <math xmlns="http://www.w3.org/1998/Math/MathML">
85
+ <msqrt>
86
+ <mn>3</mn>
87
+ <mi>x</mi>
88
+ <mo>&#x2212;</mo>
89
+ <mn>1</mn>
90
+ </msqrt>
91
+ <mo>+</mo>
92
+ <mo stretchy="false">(</mo>
93
+ <mn>1</mn>
94
+ <mo>+</mo>
95
+ <mi>x</mi>
96
+ <msup>
97
+ <mo stretchy="false">)</mo>
98
+ <mn>2</mn>
99
+ </msup>
100
+ </math>
101
+ </div>
102
+ </template>
103
103
  </d2l-html-block>
104
104
  ```
105
105
 
@@ -109,26 +109,25 @@ Examples are provided to display how user-authored math can be embedded within y
109
109
  ```html
110
110
  <script type="module">
111
111
  import '@brightspace-ui/core/components/html-block/html-block.js';
112
- import '@brightspace-ui/core/components/icons/icon.js';
113
112
 
114
- </script>
115
- <script>
116
- window.D2L = {};
117
- D2L.LP = {};
118
- D2L.LP.Web = {};
119
- D2L.LP.Web.UI = {};
120
- D2L.LP.Web.UI.Flags = {
121
- Flag: (feature, defaultValue) => {
122
- if (feature === 'us125413-mathjax-render-latex') return true;
123
- else return defaultValue;
124
- }
125
- };
113
+ window.D2L = {};
114
+ D2L.LP = {};
115
+ D2L.LP.Web = {};
116
+ D2L.LP.Web.UI = {};
117
+ D2L.LP.Web.UI.Flags = {
118
+ Flag: (feature, defaultValue) => {
119
+ if (feature === 'us125413-mathjax-render-latex') return true;
120
+ else return defaultValue;
121
+ }
122
+ };
123
+ <!-- docs: start hidden content -->
124
+ document.getElementsByTagName('html')[0].dataset.mathjaxContext = JSON.stringify({ renderLatex: true });<!-- docs: end hidden content -->
126
125
  </script>
127
126
  <d2l-html-block>
128
- <template>
129
- <div class="latex-container">
130
- $$ f(x) = \int \mathrm{e}^{-x}\,\mathrm{d}x $$ $$ x = \frac{-b \pm \sqrt{b^2 - 4ac}}{2a} $$
131
- </div>
132
- </template>
127
+ <template>
128
+ <div class="latex-container">
129
+ $$ f(x) = \int \mathrm{e}^{-x}\,\mathrm{d}x $$ $$ x = \frac{-b \pm \sqrt{b^2 - 4ac}}{2a} $$
130
+ </div>
131
+ </template>
133
132
  </d2l-html-block>
134
133
  ```
@@ -39,7 +39,7 @@
39
39
  </script>
40
40
  <script>
41
41
  if (window.location.search.indexOf('latex=true') !== -1) {
42
- document.getElementsByTagName('html')[0].dataset.mathjaxContext = JSON.stringify({ renderLaTeX: true });
42
+ document.getElementsByTagName('html')[0].dataset.mathjaxContext = JSON.stringify({ renderLatex: true });
43
43
  }
44
44
  </script>
45
45
  </head>
@@ -170,13 +170,9 @@ class LoadingSpinner extends LitElement {
170
170
  updated(changedProperties) {
171
171
  changedProperties.forEach((oldValue, propName) => {
172
172
  if (propName === 'color') {
173
- // for IE11
174
- if (window.ShadyCSS) window.ShadyCSS.styleSubtree(this, { '--d2l-loading-spinner-color': this.color });
175
- else this.style.setProperty('--d2l-loading-spinner-color', this.color);
173
+ this.style.setProperty('--d2l-loading-spinner-color', this.color);
176
174
  } else if (propName === 'size') {
177
- // for IE11
178
- if (window.ShadyCSS) window.ShadyCSS.styleSubtree(this, { '--d2l-loading-spinner-size': `${this.size}px` });
179
- else this.style.setProperty('--d2l-loading-spinner-size', `${this.size}px`);
175
+ this.style.setProperty('--d2l-loading-spinner-size', `${this.size}px`);
180
176
  }
181
177
  });
182
178
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@brightspace-ui/core",
3
- "version": "1.202.1",
3
+ "version": "1.204.0",
4
4
  "description": "A collection of accessible, free, open-source web components for building Brightspace applications",
5
5
  "repository": "https://github.com/BrightspaceUI/core.git",
6
6
  "publishConfig": {