@brightspace-ui/core 3.40.0 → 3.40.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.
@@ -178,15 +178,24 @@ class CollapsiblePanel extends SkeletonMixin(FocusMixin(RtlMixin(LitElement))) {
|
|
178
178
|
margin-inline-start: 0.75rem;
|
179
179
|
}
|
180
180
|
|
181
|
-
.d2l-collapsible-panel.focused
|
182
|
-
outline: var(--d2l-collapsible-panel-focus-outline);
|
183
|
-
}
|
181
|
+
.d2l-collapsible-panel.focused,
|
184
182
|
:host([expanded]) .d2l-collapsible-panel.focused .d2l-collapsible-panel-header {
|
185
183
|
outline: var(--d2l-collapsible-panel-focus-outline);
|
186
184
|
}
|
185
|
+
@supports selector(:has(a, b)) {
|
186
|
+
.d2l-collapsible-panel.focused,
|
187
|
+
:host([expanded]) .d2l-collapsible-panel.focused .d2l-collapsible-panel-header {
|
188
|
+
outline: none;
|
189
|
+
}
|
190
|
+
.d2l-collapsible-panel.focused:has(:focus-visible),
|
191
|
+
:host([expanded]) .d2l-collapsible-panel.focused:has(:focus-visible) .d2l-collapsible-panel-header {
|
192
|
+
outline: var(--d2l-collapsible-panel-focus-outline);
|
193
|
+
}
|
194
|
+
}
|
187
195
|
:host([expanded]) .d2l-collapsible-panel {
|
188
196
|
outline: none;
|
189
197
|
}
|
198
|
+
|
190
199
|
.d2l-collapsible-panel-header-primary {
|
191
200
|
align-items: center;
|
192
201
|
display: flex;
|
@@ -218,6 +227,7 @@ class CollapsiblePanel extends SkeletonMixin(FocusMixin(RtlMixin(LitElement))) {
|
|
218
227
|
align-self: self-start;
|
219
228
|
background-color: transparent;
|
220
229
|
border: none;
|
230
|
+
cursor: pointer;
|
221
231
|
margin-inline-end: var(--d2l-collapsible-panel-spacing-inline);
|
222
232
|
order: 1;
|
223
233
|
outline: none;
|
@@ -338,8 +348,7 @@ class CollapsiblePanel extends SkeletonMixin(FocusMixin(RtlMixin(LitElement))) {
|
|
338
348
|
<d2l-expand-collapse-content
|
339
349
|
?expanded="${this.expanded}"
|
340
350
|
@d2l-expand-collapse-content-collapse="${this._handleExpandCollapse}"
|
341
|
-
@d2l-expand-collapse-content-expand="${this._handleExpandCollapse}"
|
342
|
-
>
|
351
|
+
@d2l-expand-collapse-content-expand="${this._handleExpandCollapse}">
|
343
352
|
<div class="d2l-collapsible-panel-content">
|
344
353
|
<slot></slot>
|
345
354
|
</div>
|
@@ -505,7 +514,9 @@ class CollapsiblePanel extends SkeletonMixin(FocusMixin(RtlMixin(LitElement))) {
|
|
505
514
|
_toggleExpand() {
|
506
515
|
if (this.skeleton) return;
|
507
516
|
this.expanded = !this.expanded;
|
517
|
+
this.focus();
|
508
518
|
}
|
519
|
+
|
509
520
|
}
|
510
521
|
|
511
522
|
customElements.define('d2l-collapsible-panel', CollapsiblePanel);
|
@@ -113,7 +113,7 @@
|
|
113
113
|
<d2l-demo-snippet>
|
114
114
|
<d2l-collapsible-panel panel-title="Session: January 1, 2021: 10:00 AM" expand-collapse-label="Session on January 1">
|
115
115
|
<d2l-icon icon="tier3:assignments" slot="before"></d2l-icon>
|
116
|
-
<d2l-button-icon slot="actions" icon="tier1:fullscreen"></d2l-button-icon><d2l-button-icon slot="actions" icon="tier1:download"></d2l-button-icon><d2l-dropdown-more slot="actions">
|
116
|
+
<d2l-button-icon slot="actions" icon="tier1:fullscreen" text="Fullscreen"></d2l-button-icon><d2l-button-icon slot="actions" icon="tier1:download" text="Download"></d2l-button-icon><d2l-dropdown-more slot="actions" text="More">
|
117
117
|
<d2l-dropdown-menu>
|
118
118
|
<d2l-menu>
|
119
119
|
<d2l-menu-item text="Duplicate"></d2l-menu-item>
|
@@ -134,7 +134,7 @@
|
|
134
134
|
<h2>With long title</h2>
|
135
135
|
<d2l-demo-snippet>
|
136
136
|
<d2l-collapsible-panel panel-title="https://en.wikipedia.org/wiki/William_Thomson,_1st_Baron_Kelvin (the guy who invented absolute zero and some other cool thermodynamics stuff)" expand-collapse-label="Session on January 1">
|
137
|
-
<d2l-button-icon slot="actions" icon="tier1:fullscreen"></d2l-button-icon><d2l-button-icon slot="actions" icon="tier1:download"></d2l-button-icon><d2l-dropdown-more slot="actions">
|
137
|
+
<d2l-button-icon slot="actions" icon="tier1:fullscreen" text="Fullscreen"></d2l-button-icon><d2l-button-icon slot="actions" icon="tier1:download" text="Download"></d2l-button-icon><d2l-dropdown-more slot="actions" text="More">
|
138
138
|
<d2l-dropdown-menu>
|
139
139
|
<d2l-menu>
|
140
140
|
<d2l-menu-item text="Duplicate"></d2l-menu-item>
|
@@ -205,5 +205,14 @@
|
|
205
205
|
</d2l-collapsible-panel>
|
206
206
|
</d2l-demo-snippet>
|
207
207
|
</d2l-demo-page>
|
208
|
+
|
209
|
+
<script>
|
210
|
+
document.body.addEventListener('d2l-collapsible-panel-expand', e => {
|
211
|
+
console.log('d2l-collapsible-panel-expand', e);
|
212
|
+
}, true);
|
213
|
+
document.body.addEventListener('d2l-collapsible-panel-collapse', e => {
|
214
|
+
console.log('d2l-collapsible-panel-collapse', e);
|
215
|
+
}, true);
|
216
|
+
</script>
|
208
217
|
</body>
|
209
218
|
</html>
|
@@ -287,7 +287,7 @@ class DialogFullscreen extends LocalizeCoreElement(AsyncContainerMixin(DialogMix
|
|
287
287
|
|
288
288
|
willUpdate(changedProperties) {
|
289
289
|
super.willUpdate(changedProperties);
|
290
|
-
|
290
|
+
this._width = Math.max(1170, this.width); // Always enforce limit
|
291
291
|
}
|
292
292
|
|
293
293
|
_abort() {
|
@@ -169,7 +169,7 @@ The `add-button` attribute inserts the `d2l-button-add` component above and belo
|
|
169
169
|
|
170
170
|
Adding new items to the list is handled entirely by consumers by listening for the `d2l-list-add-button-click` event. A simple example scenario is below.
|
171
171
|
|
172
|
-
<!-- docs: demo code display:block -->
|
172
|
+
<!-- docs: demo code display:block sandboxTitle:'List - Add Button'-->
|
173
173
|
```html
|
174
174
|
<script type="module">
|
175
175
|
import '@brightspace-ui/core/components/list/list.js';
|
@@ -275,7 +275,7 @@ If a `d2l-list-item` is selectable then it should have a `label` attribute that
|
|
275
275
|
|
276
276
|
### Example
|
277
277
|
|
278
|
-
<!-- docs: demo code display:block autoSize:false size:medium -->
|
278
|
+
<!-- docs: demo code display:block autoSize:false size:medium sandboxTitle:'List - Selection'-->
|
279
279
|
```html
|
280
280
|
<script type="module">
|
281
281
|
import '@brightspace-ui/core/components/list/list.js';
|
@@ -314,7 +314,7 @@ If a `d2l-list-item` is expandable then it should have a `label` attribute that
|
|
314
314
|
|
315
315
|
### Expandable List Example
|
316
316
|
|
317
|
-
<!-- docs: demo code display:block autoSize:false size:medium -->
|
317
|
+
<!-- docs: demo code display:block autoSize:false size:medium sandboxTitle:'List - Expandable'-->
|
318
318
|
```html
|
319
319
|
<script type="module">
|
320
320
|
import '@brightspace-ui/core/components/list/list.js';
|
@@ -383,7 +383,7 @@ If an item is draggable, the `drag-handle-text` attribute should be used to prov
|
|
383
383
|
|
384
384
|
### Example
|
385
385
|
|
386
|
-
<!-- docs: demo code display:block autoSize:false size:medium -->
|
386
|
+
<!-- docs: demo code display:block autoSize:false size:medium sandboxTitle:'List - Drag & Drop'-->
|
387
387
|
```html
|
388
388
|
<script type="module">
|
389
389
|
import '@brightspace-ui/core/components/list/list.js';
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@brightspace-ui/core",
|
3
|
-
"version": "3.40.
|
3
|
+
"version": "3.40.1",
|
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",
|