@brightspace-ui/core 3.307.0 → 3.307.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.
|
@@ -178,7 +178,7 @@ Use icon buttons for compact, supplementary actions where space is limited and t
|
|
|
178
178
|
|
|
179
179
|
A navigation control for moving sequentially through a set of items.
|
|
180
180
|
|
|
181
|
-
<!-- docs: demo code properties name:d2l-button-iterator sandboxTitle:'Iterator Button' -->
|
|
181
|
+
<!-- docs: demo code properties name:d2l-button-iterator autoSize:false size:small sandboxTitle:'Iterator Button' -->
|
|
182
182
|
```html
|
|
183
183
|
<script type="module">
|
|
184
184
|
import '@brightspace-ui/core/components/button/button-iterator.js';
|
|
@@ -95,12 +95,12 @@ class ButtonIterator extends FocusMixin(PropertyRequiredMixin(LocalizeCoreElemen
|
|
|
95
95
|
|
|
96
96
|
constructor() {
|
|
97
97
|
super();
|
|
98
|
-
this.description =
|
|
98
|
+
this.description = '';
|
|
99
99
|
this.nextDisabled = false;
|
|
100
100
|
this.nextOnly = false;
|
|
101
|
-
this.nextText =
|
|
101
|
+
this.nextText = '';
|
|
102
102
|
this.previousDisabled = false;
|
|
103
|
-
this.previousText =
|
|
103
|
+
this.previousText = '';
|
|
104
104
|
}
|
|
105
105
|
|
|
106
106
|
static get focusElementSelector() {
|
package/components/page/page.js
CHANGED
|
@@ -87,11 +87,11 @@ class PanelStateController {
|
|
|
87
87
|
if (storeState) this.#storePanelState(key);
|
|
88
88
|
}
|
|
89
89
|
|
|
90
|
-
setCollapsed(key, collapsed) {
|
|
90
|
+
setCollapsed(key, collapsed, { animate = true } = {}) {
|
|
91
91
|
const panel = this.#panels[key];
|
|
92
92
|
panel.collapsed = collapsed;
|
|
93
93
|
panel.dragSize = null;
|
|
94
|
-
panel.animate =
|
|
94
|
+
panel.animate = animate;
|
|
95
95
|
this.#host.requestUpdate();
|
|
96
96
|
this.#storePanelState(key);
|
|
97
97
|
}
|
|
@@ -542,7 +542,9 @@ class Page extends ProviderMixin(LocalizeCoreElement(LitElement)) {
|
|
|
542
542
|
|
|
543
543
|
#handleDividerResize(e) {
|
|
544
544
|
const panelKey = e.target.dataset.panelKey;
|
|
545
|
-
|
|
545
|
+
// Do not animate if dragging past closed size
|
|
546
|
+
const animate = this._panelState.getSize(panelKey) > DIVIDER_GUTTER_WIDTH;
|
|
547
|
+
this._panelState.resize(panelKey, e.detail.requestedSize, { animate, storeState: true });
|
|
546
548
|
};
|
|
547
549
|
|
|
548
550
|
#handleDividerResizeLive(e) {
|
|
@@ -552,8 +554,10 @@ class Page extends ProviderMixin(LocalizeCoreElement(LitElement)) {
|
|
|
552
554
|
|
|
553
555
|
#handleDividerToggle(e) {
|
|
554
556
|
const panelKey = e.target.dataset.panelKey;
|
|
555
|
-
const collapsed =
|
|
556
|
-
|
|
557
|
+
const collapsed = this._panelState.getCollapsed(panelKey);
|
|
558
|
+
// Do not animate if dragged to fully closed
|
|
559
|
+
const animate = collapsed || this._panelState.getSize(panelKey) > DIVIDER_GUTTER_WIDTH;
|
|
560
|
+
this._panelState.setCollapsed(panelKey, !collapsed, { animate });
|
|
557
561
|
};
|
|
558
562
|
|
|
559
563
|
#handleScrimClick() {
|
|
@@ -578,13 +582,9 @@ class Page extends ProviderMixin(LocalizeCoreElement(LitElement)) {
|
|
|
578
582
|
}
|
|
579
583
|
|
|
580
584
|
#renderDivider(panelKey, label, panelPosition) {
|
|
581
|
-
const classes = {
|
|
582
|
-
'divider': true,
|
|
583
|
-
'animate': this._panelState.getAnimate(panelKey)
|
|
584
|
-
};
|
|
585
585
|
return html`
|
|
586
586
|
<d2l-page-divider-internal
|
|
587
|
-
class="
|
|
587
|
+
class="divider"
|
|
588
588
|
data-panel-key="${panelKey}"
|
|
589
589
|
label="${label}"
|
|
590
590
|
?collapsed="${this._panelState.getCollapsed(panelKey)}"
|
package/custom-elements.json
CHANGED
|
@@ -711,7 +711,7 @@
|
|
|
711
711
|
"name": "description",
|
|
712
712
|
"description": "ACCESSIBILITY: An optional description, typically for indicating the current position within the set of items",
|
|
713
713
|
"type": "string",
|
|
714
|
-
"default": "\"
|
|
714
|
+
"default": "\"\""
|
|
715
715
|
},
|
|
716
716
|
{
|
|
717
717
|
"name": "next-disabled",
|
|
@@ -729,7 +729,7 @@
|
|
|
729
729
|
"name": "next-text",
|
|
730
730
|
"description": "Overrides the default text for the next button",
|
|
731
731
|
"type": "string",
|
|
732
|
-
"default": "\"
|
|
732
|
+
"default": "\"\""
|
|
733
733
|
},
|
|
734
734
|
{
|
|
735
735
|
"name": "previous-disabled",
|
|
@@ -741,7 +741,7 @@
|
|
|
741
741
|
"name": "previous-text",
|
|
742
742
|
"description": "Overrides the default text for the previous button",
|
|
743
743
|
"type": "string",
|
|
744
|
-
"default": "\"
|
|
744
|
+
"default": "\"\""
|
|
745
745
|
}
|
|
746
746
|
],
|
|
747
747
|
"properties": [
|
|
@@ -755,7 +755,7 @@
|
|
|
755
755
|
"attribute": "description",
|
|
756
756
|
"description": "ACCESSIBILITY: An optional description, typically for indicating the current position within the set of items",
|
|
757
757
|
"type": "string",
|
|
758
|
-
"default": "\"
|
|
758
|
+
"default": "\"\""
|
|
759
759
|
},
|
|
760
760
|
{
|
|
761
761
|
"name": "nextDisabled",
|
|
@@ -776,7 +776,7 @@
|
|
|
776
776
|
"attribute": "next-text",
|
|
777
777
|
"description": "Overrides the default text for the next button",
|
|
778
778
|
"type": "string",
|
|
779
|
-
"default": "\"
|
|
779
|
+
"default": "\"\""
|
|
780
780
|
},
|
|
781
781
|
{
|
|
782
782
|
"name": "previousDisabled",
|
|
@@ -790,7 +790,7 @@
|
|
|
790
790
|
"attribute": "previous-text",
|
|
791
791
|
"description": "Overrides the default text for the previous button",
|
|
792
792
|
"type": "string",
|
|
793
|
-
"default": "\"
|
|
793
|
+
"default": "\"\""
|
|
794
794
|
}
|
|
795
795
|
],
|
|
796
796
|
"events": [
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@brightspace-ui/core",
|
|
3
|
-
"version": "3.307.
|
|
3
|
+
"version": "3.307.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",
|