@brightspace-ui/core 2.17.0 → 2.18.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.
@@ -79,25 +79,23 @@ Examples are provided to display how user-authored math can be embedded within y
79
79
  import '@brightspace-ui/core/tools/mathjax-test-context.js';
80
80
  </script>
81
81
  <d2l-html-block>
82
- <div class="mathml-container">
83
- <math xmlns="http://www.w3.org/1998/Math/MathML">
84
- <msqrt>
85
- <mn>3</mn>
86
- <mi>x</mi>
87
- <mo>&#x2212;</mo>
88
- <mn>1</mn>
89
- </msqrt>
90
- <mo>+</mo>
91
- <mo stretchy="false">(</mo>
92
- <mn>1</mn>
93
- <mo>+</mo>
82
+ <math xmlns="http://www.w3.org/1998/Math/MathML">
83
+ <msqrt>
84
+ <mn>3</mn>
94
85
  <mi>x</mi>
95
- <msup>
96
- <mo stretchy="false">)</mo>
97
- <mn>2</mn>
98
- </msup>
99
- </math>
100
- </div>
86
+ <mo>&#x2212;</mo>
87
+ <mn>1</mn>
88
+ </msqrt>
89
+ <mo>+</mo>
90
+ <mo stretchy="false">(</mo>
91
+ <mn>1</mn>
92
+ <mo>+</mo>
93
+ <mi>x</mi>
94
+ <msup>
95
+ <mo stretchy="false">)</mo>
96
+ <mn>2</mn>
97
+ </msup>
98
+ </math>
101
99
  </d2l-html-block>
102
100
  ```
103
101
 
@@ -110,9 +108,7 @@ Examples are provided to display how user-authored math can be embedded within y
110
108
  import '@brightspace-ui/core/tools/mathjax-test-context.js';
111
109
  </script>
112
110
  <d2l-html-block>
113
- <div class="latex-container">
114
111
  $$ f(x) = \int \mathrm{e}^{-x}\,\mathrm{d}x $$ $$ x = \frac{-b \pm \sqrt{b^2 - 4ac}}{2a} $$
115
- </div>
116
112
  </d2l-html-block>
117
113
  ```
118
114
 
@@ -110,6 +110,18 @@
110
110
  </template>
111
111
  </d2l-demo-snippet>
112
112
 
113
+ <h2>HTML Block (inline)</h2>
114
+
115
+ <d2l-demo-snippet>
116
+ <template>
117
+ <span>Here's an inline html-block:</span>
118
+ <d2l-html-block inline>
119
+ I'm inline!
120
+ </d2l-html-block>
121
+ <span>Pretty cool!</span>
122
+ </template>
123
+ </d2l-demo-snippet>
124
+
113
125
  <h2>HTML Block (large font)</h2>
114
126
 
115
127
  <d2l-demo-snippet>
@@ -136,6 +136,10 @@ class HtmlBlock extends RtlMixin(LitElement) {
136
136
  * @type {Boolean}
137
137
  */
138
138
  compact: { type: Boolean },
139
+ /**
140
+ * Whether to display the HTML in inline mode
141
+ */
142
+ inline: { type: Boolean },
139
143
  /**
140
144
  * Whether to disable deferred rendering of the user-authored HTML. Do *not* set this
141
145
  * unless your HTML relies on script executions that may break upon stamping.
@@ -152,15 +156,16 @@ class HtmlBlock extends RtlMixin(LitElement) {
152
156
  overflow-wrap: break-word;
153
157
  overflow-x: auto;
154
158
  overflow-y: hidden;
155
- position: relative;
156
159
  text-align: left;
157
160
  }
158
- :host([hidden]) {
159
- display: none;
160
- }
161
+ :host([hidden]),
161
162
  :host([no-deferred-rendering]) div.d2l-html-block-rendered {
162
163
  display: none;
163
164
  }
165
+ :host([inline]),
166
+ :host([inline]) div.d2l-html-block-rendered {
167
+ display: inline;
168
+ }
164
169
  :host([dir="rtl"]) {
165
170
  text-align: right;
166
171
  }
@@ -170,6 +175,7 @@ class HtmlBlock extends RtlMixin(LitElement) {
170
175
  constructor() {
171
176
  super();
172
177
  this.compact = false;
178
+ this.inline = false;
173
179
  this.noDeferredRendering = false;
174
180
 
175
181
  const rendererContextAttributes = getRenderers().reduce((attrs, currentRenderer) => {
@@ -3,7 +3,7 @@
3
3
 
4
4
  Tag lists are used to present a list of compact, discrete pieces of information.
5
5
 
6
- <!-- docs: demo display:block -->
6
+ <!-- docs: demo autoSize:false display:block size:small -->
7
7
  ```html
8
8
  <script type="module">
9
9
  import '@brightspace-ui/core/components/tag-list/tag-list.js';
@@ -12,7 +12,7 @@ Tag lists are used to present a list of compact, discrete pieces of information.
12
12
 
13
13
  <d2l-tag-list description="Example Tags">
14
14
  <d2l-tag-list-item text="Lorem ipsum dolor"></d2l-tag-list-item>
15
- <d2l-tag-list-item text="Reprehenderit in voluptate velit esse"></d2l-tag-list-item>
15
+ <d2l-tag-list-item text="Reprehenderit in voluptate velit esse lorem ipsum dolor"></d2l-tag-list-item>
16
16
  <d2l-tag-list-item text="Sit amet"></d2l-tag-list-item>
17
17
  <d2l-tag-list-item text="Duis aute irure"></d2l-tag-list-item>
18
18
  <d2l-tag-list-item text="Excepteur sint"></d2l-tag-list-item>
@@ -26,7 +26,7 @@ Tag lists are used to present a list of compact, discrete pieces of information.
26
26
 
27
27
  The `d2l-tag-list` element can take a combination of any type of `d2l-tag-list-item` and adds the appropriate keyboard navigation, list semantics, clearing behaviour and responsive behaviour.
28
28
 
29
- <!-- docs: demo live name:d2l-tag-list display:block -->
29
+ <!-- docs: demo live name:d2l-tag-list autoSize:false display:block size:small -->
30
30
  ```html
31
31
  <script type="module">
32
32
  import '@brightspace-ui/core/components/tag-list/tag-list.js';
@@ -39,7 +39,7 @@ The `d2l-tag-list` element can take a combination of any type of `d2l-tag-list-i
39
39
  </script>
40
40
  <d2l-tag-list description="Example Tags">
41
41
  <d2l-tag-list-item text="Lorem ipsum dolor"></d2l-tag-list-item>
42
- <d2l-tag-list-item text="Reprehenderit in voluptate velit esse"></d2l-tag-list-item>
42
+ <d2l-tag-list-item text="Reprehenderit in voluptate velit esse lorem ipsum dolor"></d2l-tag-list-item>
43
43
  <d2l-tag-list-item text="Sit amet"></d2l-tag-list-item>
44
44
  <d2l-tag-list-item text="Duis aute irure"></d2l-tag-list-item>
45
45
  </d2l-tag-list>
@@ -48,7 +48,7 @@ The `d2l-tag-list` element can take a combination of any type of `d2l-tag-list-i
48
48
  ## Tag List Item [d2l-tag-list-item]
49
49
  The `d2l-tag-list-item` provides the appropriate `listitem` semantics and styling for children within a tag list. Tag List items do not work outside of a Tag List and should not be used on their own.
50
50
 
51
- <!-- docs: demo live name:d2l-tag-list-item display:block -->
51
+ <!-- docs: demo live name:d2l-tag-list-item autoSize:false display:block size:small -->
52
52
  ```html
53
53
  <script type="module">
54
54
  import '@brightspace-ui/core/components/tag-list/tag-list.js';
@@ -3503,6 +3503,12 @@
3503
3503
  "type": "Boolean",
3504
3504
  "default": "false"
3505
3505
  },
3506
+ {
3507
+ "name": "inline",
3508
+ "description": "Whether to display the HTML in inline mode",
3509
+ "type": "boolean",
3510
+ "default": "false"
3511
+ },
3506
3512
  {
3507
3513
  "name": "no-deferred-rendering",
3508
3514
  "description": "Whether to disable deferred rendering of the user-authored HTML. Do *not* set this\nunless your HTML relies on script executions that may break upon stamping.",
@@ -3518,6 +3524,13 @@
3518
3524
  "type": "Boolean",
3519
3525
  "default": "false"
3520
3526
  },
3527
+ {
3528
+ "name": "inline",
3529
+ "attribute": "inline",
3530
+ "description": "Whether to display the HTML in inline mode",
3531
+ "type": "boolean",
3532
+ "default": "false"
3533
+ },
3521
3534
  {
3522
3535
  "name": "noDeferredRendering",
3523
3536
  "attribute": "no-deferred-rendering",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@brightspace-ui/core",
3
- "version": "2.17.0",
3
+ "version": "2.18.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",
@@ -60,7 +60,7 @@
60
60
  "lit-analyzer": "^1",
61
61
  "messageformat-validator": "^2",
62
62
  "node-sass": "^7",
63
- "sinon": "^13",
63
+ "sinon": "^14",
64
64
  "stylelint": "^14"
65
65
  },
66
66
  "dependencies": {