@brightspace-ui/core 1.219.3 → 1.220.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.
@@ -141,7 +141,7 @@ Alternately, add the `compact` attribute to only display the last breadcrumb. Th
141
141
  To make your usage of `d2l-breadcrumb` (child) accessible, use the following attribute when applicable:
142
142
 
143
143
  | Attribute | Description |
144
- |--|--|
144
+ |---|---|
145
145
  | `aria-label` | Acts as a primary label. Use if `text` does not provide enough context. |
146
146
 
147
147
  ## Current Page [d2l-breadcrumb-current-page]
@@ -62,7 +62,7 @@ The `d2l-button` element can be used just like the native button element, but al
62
62
  To make your `d2l-button` accessible, use the following properties when applicable:
63
63
 
64
64
  | Attribute | Description |
65
- |--|--|
65
+ |---|---|
66
66
  | `aria-expanded` | [Indicate expansion state of a collapsible element](https://www.w3.org/WAI/PF/aria/states_and_properties#aria-expanded). Example: [d2l-more-less](https://github.com/BrightspaceUI/core/blob/f9f30d0975ee5a8479263a84541fc3b781e8830f/components/more-less/more-less.js#L158). |
67
67
  | `aria-haspopup` | [Indicate clicking the button opens a menu](https://www.w3.org/WAI/PF/aria/states_and_properties#aria-haspopup). Example: [d2l-dropdown](https://github.com/BrightspaceUI/core/blob/main/components/dropdown/dropdown-opener-mixin.js#L46). |
68
68
  | `description` | Use when text on button does not provide enough context. |
@@ -104,7 +104,7 @@ The `d2l-button-subtle` element can be used just like the native `button`, but f
104
104
  To make your `d2l-button-subtle` accessible, use the following properties when applicable:
105
105
 
106
106
  | Attribute | Description |
107
- |--|--|
107
+ |---|---|
108
108
  | `aria-expanded` | [Indicate expansion state of a collapsible element](https://www.w3.org/WAI/PF/aria/states_and_properties#aria-expanded). Example: [d2l-more-less](https://github.com/BrightspaceUI/core/blob/f9f30d0975ee5a8479263a84541fc3b781e8830f/components/more-less/more-less.js#L158). |
109
109
  | `aria-haspopup` | [Indicate clicking the button opens a menu](https://www.w3.org/WAI/PF/aria/states_and_properties#aria-haspopup). Example: [d2l-dropdown](https://github.com/BrightspaceUI/core/blob/main/components/dropdown/dropdown-opener-mixin.js#L46). |
110
110
  | `description` | Use when text on button does not provide enough context. |
@@ -143,7 +143,7 @@ The `d2l-button-icon` element can be used just like the native `button`, for ins
143
143
  To make your `d2l-button-icon` accessible, use the following properties when applicable:
144
144
 
145
145
  | Attribute | Description |
146
- |--|--|
146
+ |---|---|
147
147
  | `text` | **REQUIRED**. Acts as a primary label and tooltip. |
148
148
  | `aria-expanded` | [Indicate expansion state of a collapsible element](https://www.w3.org/WAI/PF/aria/states_and_properties#aria-expanded). Example: [d2l-more-less](https://github.com/BrightspaceUI/core/blob/f9f30d0975ee5a8479263a84541fc3b781e8830f/components/more-less/more-less.js#L158). |
149
149
  | `aria-haspopup` | [Indicate clicking the button opens a menu](https://www.w3.org/WAI/PF/aria/states_and_properties#aria-haspopup). Example: [d2l-dropdown](https://github.com/BrightspaceUI/core/blob/main/components/dropdown/dropdown-opener-mixin.js#L46). |
@@ -6,7 +6,7 @@ Components to assist with displaying user-authored HTML within your webpage.
6
6
 
7
7
  The `d2l-html-block` element is a web component for displaying user-authored HTML. It includes styles for headings, lists, anchors and other elements. In addition, it provides integration with MathJax for rendering MathML.
8
8
 
9
- Place the user-authored HTML within a `template` and the `d2l-html-block` will stamp the content into its local DOM where styles will be applied, and math typeset.
9
+ Place the user-authored HTML within the `d2l-html-block` and the component will stamp the content into its local DOM where styles will be applied, and math typeset.
10
10
 
11
11
  <!-- docs: demo live name:d2l-html-block autoSize:false size:small -->
12
12
  ```html
@@ -15,34 +15,32 @@ 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
+ <!-- docs: start hidden content -->
19
+ <style>
20
+ div {
21
+ --d2l-icon-fill-color: var(--d2l-color-cinnabar);
22
+ }
23
+ span {
24
+ color: var(--d2l-color-cinnabar);
25
+ margin-left: 10px;
26
+ vertical-align: middle;
27
+ }
28
+ d2l-icon {
29
+ align-self: center;
30
+ flex-shrink: 0;
31
+ }
32
+ .warning-container {
33
+ align-items: center;
34
+ display: flex;
35
+ justify-content: center;
36
+ }
37
+ </style>
39
38
  <!-- 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>
39
+ <d2l-icon icon="tier3:alert"></d2l-icon>
40
+ <span>
41
+ <b>Important:</b> user-authored HTML must be trusted or properly sanitized!
42
+ </span>
43
+ </div>
46
44
  </d2l-html-block>
47
45
  ```
48
46
 
@@ -58,7 +56,7 @@ To use `d2l-html-block` within another Lit component, use the [unsafeHTML](https
58
56
  render() {
59
57
  return html`
60
58
  <d2l-html-block>
61
- <template>${unsafeHTML(this._unsafeHTML)}</template>
59
+ ${unsafeHTML(this._unsafeHTML)}
62
60
  </d2l-html-block>`;
63
61
  }
64
62
  }
@@ -79,27 +77,25 @@ Examples are provided to display how user-authored math can be embedded within y
79
77
  import '@brightspace-ui/core/components/icons/icon.js';
80
78
  </script>
81
79
  <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>
80
+ <div class="mathml-container">
81
+ <math xmlns="http://www.w3.org/1998/Math/MathML">
82
+ <msqrt>
83
+ <mn>3</mn>
95
84
  <mi>x</mi>
96
- <msup>
97
- <mo stretchy="false">)</mo>
98
- <mn>2</mn>
99
- </msup>
100
- </math>
101
- </div>
102
- </template>
85
+ <mo>&#x2212;</mo>
86
+ <mn>1</mn>
87
+ </msqrt>
88
+ <mo>+</mo>
89
+ <mo stretchy="false">(</mo>
90
+ <mn>1</mn>
91
+ <mo>+</mo>
92
+ <mi>x</mi>
93
+ <msup>
94
+ <mo stretchy="false">)</mo>
95
+ <mn>2</mn>
96
+ </msup>
97
+ </math>
98
+ </div>
103
99
  </d2l-html-block>
104
100
  ```
105
101
 
@@ -124,10 +120,8 @@ Examples are provided to display how user-authored math can be embedded within y
124
120
  document.getElementsByTagName('html')[0].dataset.mathjaxContext = JSON.stringify({ renderLatex: true });<!-- docs: end hidden content -->
125
121
  </script>
126
122
  <d2l-html-block>
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>
123
+ <div class="latex-container">
124
+ $$ f(x) = \int \mathrm{e}^{-x}\,\mathrm{d}x $$ $$ x = \frac{-b \pm \sqrt{b^2 - 4ac}}{2a} $$
125
+ </div>
132
126
  </d2l-html-block>
133
127
  ```