@brightspace-ui/core 2.112.0 → 2.112.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.
|
@@ -2,11 +2,12 @@ import '../button/button-icon.js';
|
|
|
2
2
|
import '../loading-spinner/loading-spinner.js';
|
|
3
3
|
import { css, html, nothing } from 'lit';
|
|
4
4
|
import { EventSubscriberController } from '../../controllers/subscriber/subscriberControllers.js';
|
|
5
|
+
import { SkeletonMixin } from '../skeleton/skeleton-mixin.js';
|
|
5
6
|
|
|
6
7
|
const dragIntervalDelay = 100;
|
|
7
8
|
const dragHoverDropTime = 1000;
|
|
8
9
|
|
|
9
|
-
export const ListItemExpandCollapseMixin = superclass => class extends superclass {
|
|
10
|
+
export const ListItemExpandCollapseMixin = superclass => class extends SkeletonMixin(superclass) {
|
|
10
11
|
|
|
11
12
|
static get properties() {
|
|
12
13
|
return {
|
|
@@ -127,6 +128,7 @@ export const ListItemExpandCollapseMixin = superclass => class extends superclas
|
|
|
127
128
|
}
|
|
128
129
|
return html`
|
|
129
130
|
<d2l-button-icon
|
|
131
|
+
class="d2l-skeletize"
|
|
130
132
|
icon="${this.expanded ? 'tier1:arrow-collapse-small' : 'tier1:arrow-expand-small' }"
|
|
131
133
|
aria-expanded="${this.expanded ? 'true' : 'false'}"
|
|
132
134
|
text="${this.label}"
|
|
@@ -198,6 +198,11 @@
|
|
|
198
198
|
</template>
|
|
199
199
|
</d2l-demo-snippet>
|
|
200
200
|
|
|
201
|
+
<script>
|
|
202
|
+
document.addEventListener('d2l-tooltip-show', e => console.log('d2l-tooltip-show', e.target));
|
|
203
|
+
document.addEventListener('d2l-tooltip-hide', e => console.log('d2l-tooltip-hide', e.target));
|
|
204
|
+
</script>
|
|
205
|
+
|
|
201
206
|
</d2l-demo-page>
|
|
202
207
|
|
|
203
208
|
</body>
|
|
@@ -459,7 +459,7 @@ class Tooltip extends RtlMixin(LitElement) {
|
|
|
459
459
|
if (oldVal !== val) {
|
|
460
460
|
this._showing = val;
|
|
461
461
|
this.requestUpdate('showing', oldVal);
|
|
462
|
-
this._showingChanged(val);
|
|
462
|
+
this._showingChanged(val, oldVal !== undefined); // don't dispatch hide event when initializing
|
|
463
463
|
}
|
|
464
464
|
}
|
|
465
465
|
|
|
@@ -882,7 +882,7 @@ class Tooltip extends RtlMixin(LitElement) {
|
|
|
882
882
|
}
|
|
883
883
|
}
|
|
884
884
|
|
|
885
|
-
async _showingChanged(newValue) {
|
|
885
|
+
async _showingChanged(newValue, dispatch) {
|
|
886
886
|
clearTimeout(this._hoverTimeout);
|
|
887
887
|
clearTimeout(this._longPressTimeout);
|
|
888
888
|
if (newValue) {
|
|
@@ -895,9 +895,11 @@ class Tooltip extends RtlMixin(LitElement) {
|
|
|
895
895
|
this.setAttribute('aria-hidden', 'false');
|
|
896
896
|
await this.updateComplete;
|
|
897
897
|
await this.updatePosition();
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
898
|
+
if (dispatch) {
|
|
899
|
+
this.dispatchEvent(new CustomEvent(
|
|
900
|
+
'd2l-tooltip-show', { bubbles: true, composed: true }
|
|
901
|
+
));
|
|
902
|
+
}
|
|
901
903
|
|
|
902
904
|
if (this.announced && !this._isInteractive(this._target)) announce(this.innerText);
|
|
903
905
|
} else {
|
|
@@ -908,9 +910,11 @@ class Tooltip extends RtlMixin(LitElement) {
|
|
|
908
910
|
clearDismissible(this._dismissibleId);
|
|
909
911
|
this._dismissibleId = null;
|
|
910
912
|
}
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
913
|
+
if (dispatch) {
|
|
914
|
+
this.dispatchEvent(new CustomEvent(
|
|
915
|
+
'd2l-tooltip-hide', { bubbles: true, composed: true }
|
|
916
|
+
));
|
|
917
|
+
}
|
|
914
918
|
}
|
|
915
919
|
}
|
|
916
920
|
|
package/custom-elements.json
CHANGED
|
@@ -7815,12 +7815,6 @@
|
|
|
7815
7815
|
"type": "boolean",
|
|
7816
7816
|
"default": "false"
|
|
7817
7817
|
},
|
|
7818
|
-
{
|
|
7819
|
-
"name": "skeleton",
|
|
7820
|
-
"description": "Renders the input as a [skeleton loader](https://github.com/BrightspaceUI/core/tree/main/components/skeleton)",
|
|
7821
|
-
"type": "boolean",
|
|
7822
|
-
"default": "false"
|
|
7823
|
-
},
|
|
7824
7818
|
{
|
|
7825
7819
|
"name": "drag-handle-text",
|
|
7826
7820
|
"description": "**Drag & drop:** The drag-handle label for assistive technology. If implementing drag & drop, you should change this to dynamically announce what the drag-handle is moving for assistive technology in keyboard mode.",
|
|
@@ -7858,6 +7852,12 @@
|
|
|
7858
7852
|
"description": "Default state for expand collapse toggle - if not set, collapsed will be the default state",
|
|
7859
7853
|
"type": "boolean"
|
|
7860
7854
|
},
|
|
7855
|
+
{
|
|
7856
|
+
"name": "skeleton",
|
|
7857
|
+
"description": "Renders the input as a [skeleton loader](https://github.com/BrightspaceUI/core/tree/main/components/skeleton)",
|
|
7858
|
+
"type": "boolean",
|
|
7859
|
+
"default": "false"
|
|
7860
|
+
},
|
|
7861
7861
|
{
|
|
7862
7862
|
"name": "labelled-by",
|
|
7863
7863
|
"description": "The id of element that provides the label for this element",
|
|
@@ -7921,13 +7921,6 @@
|
|
|
7921
7921
|
{
|
|
7922
7922
|
"name": "selectionInfo"
|
|
7923
7923
|
},
|
|
7924
|
-
{
|
|
7925
|
-
"name": "skeleton",
|
|
7926
|
-
"attribute": "skeleton",
|
|
7927
|
-
"description": "Renders the input as a [skeleton loader](https://github.com/BrightspaceUI/core/tree/main/components/skeleton)",
|
|
7928
|
-
"type": "boolean",
|
|
7929
|
-
"default": "false"
|
|
7930
|
-
},
|
|
7931
7924
|
{
|
|
7932
7925
|
"name": "dragHandleText",
|
|
7933
7926
|
"attribute": "drag-handle-text",
|
|
@@ -7972,6 +7965,13 @@
|
|
|
7972
7965
|
"description": "Default state for expand collapse toggle - if not set, collapsed will be the default state",
|
|
7973
7966
|
"type": "boolean"
|
|
7974
7967
|
},
|
|
7968
|
+
{
|
|
7969
|
+
"name": "skeleton",
|
|
7970
|
+
"attribute": "skeleton",
|
|
7971
|
+
"description": "Renders the input as a [skeleton loader](https://github.com/BrightspaceUI/core/tree/main/components/skeleton)",
|
|
7972
|
+
"type": "boolean",
|
|
7973
|
+
"default": "false"
|
|
7974
|
+
},
|
|
7975
7975
|
{
|
|
7976
7976
|
"name": "documentLocaleSettings",
|
|
7977
7977
|
"default": "\"getDocumentLocaleSettings()\""
|
|
@@ -8149,12 +8149,6 @@
|
|
|
8149
8149
|
"type": "boolean",
|
|
8150
8150
|
"default": "false"
|
|
8151
8151
|
},
|
|
8152
|
-
{
|
|
8153
|
-
"name": "skeleton",
|
|
8154
|
-
"description": "Renders the input as a [skeleton loader](https://github.com/BrightspaceUI/core/tree/main/components/skeleton)",
|
|
8155
|
-
"type": "boolean",
|
|
8156
|
-
"default": "false"
|
|
8157
|
-
},
|
|
8158
8152
|
{
|
|
8159
8153
|
"name": "drag-handle-text",
|
|
8160
8154
|
"description": "**Drag & drop:** The drag-handle label for assistive technology. If implementing drag & drop, you should change this to dynamically announce what the drag-handle is moving for assistive technology in keyboard mode.",
|
|
@@ -8192,6 +8186,12 @@
|
|
|
8192
8186
|
"description": "Default state for expand collapse toggle - if not set, collapsed will be the default state",
|
|
8193
8187
|
"type": "boolean"
|
|
8194
8188
|
},
|
|
8189
|
+
{
|
|
8190
|
+
"name": "skeleton",
|
|
8191
|
+
"description": "Renders the input as a [skeleton loader](https://github.com/BrightspaceUI/core/tree/main/components/skeleton)",
|
|
8192
|
+
"type": "boolean",
|
|
8193
|
+
"default": "false"
|
|
8194
|
+
},
|
|
8195
8195
|
{
|
|
8196
8196
|
"name": "labelled-by",
|
|
8197
8197
|
"description": "The id of element that provides the label for this element",
|
|
@@ -8262,13 +8262,6 @@
|
|
|
8262
8262
|
{
|
|
8263
8263
|
"name": "selectionInfo"
|
|
8264
8264
|
},
|
|
8265
|
-
{
|
|
8266
|
-
"name": "skeleton",
|
|
8267
|
-
"attribute": "skeleton",
|
|
8268
|
-
"description": "Renders the input as a [skeleton loader](https://github.com/BrightspaceUI/core/tree/main/components/skeleton)",
|
|
8269
|
-
"type": "boolean",
|
|
8270
|
-
"default": "false"
|
|
8271
|
-
},
|
|
8272
8265
|
{
|
|
8273
8266
|
"name": "dragHandleText",
|
|
8274
8267
|
"attribute": "drag-handle-text",
|
|
@@ -8313,6 +8306,13 @@
|
|
|
8313
8306
|
"description": "Default state for expand collapse toggle - if not set, collapsed will be the default state",
|
|
8314
8307
|
"type": "boolean"
|
|
8315
8308
|
},
|
|
8309
|
+
{
|
|
8310
|
+
"name": "skeleton",
|
|
8311
|
+
"attribute": "skeleton",
|
|
8312
|
+
"description": "Renders the input as a [skeleton loader](https://github.com/BrightspaceUI/core/tree/main/components/skeleton)",
|
|
8313
|
+
"type": "boolean",
|
|
8314
|
+
"default": "false"
|
|
8315
|
+
},
|
|
8316
8316
|
{
|
|
8317
8317
|
"name": "documentLocaleSettings",
|
|
8318
8318
|
"default": "\"getDocumentLocaleSettings()\""
|
|
@@ -8623,12 +8623,6 @@
|
|
|
8623
8623
|
"type": "boolean",
|
|
8624
8624
|
"default": "false"
|
|
8625
8625
|
},
|
|
8626
|
-
{
|
|
8627
|
-
"name": "skeleton",
|
|
8628
|
-
"description": "Renders the input as a [skeleton loader](https://github.com/BrightspaceUI/core/tree/main/components/skeleton)",
|
|
8629
|
-
"type": "boolean",
|
|
8630
|
-
"default": "false"
|
|
8631
|
-
},
|
|
8632
8626
|
{
|
|
8633
8627
|
"name": "drag-handle-text",
|
|
8634
8628
|
"description": "**Drag & drop:** The drag-handle label for assistive technology. If implementing drag & drop, you should change this to dynamically announce what the drag-handle is moving for assistive technology in keyboard mode.",
|
|
@@ -8666,6 +8660,12 @@
|
|
|
8666
8660
|
"description": "Default state for expand collapse toggle - if not set, collapsed will be the default state",
|
|
8667
8661
|
"type": "boolean"
|
|
8668
8662
|
},
|
|
8663
|
+
{
|
|
8664
|
+
"name": "skeleton",
|
|
8665
|
+
"description": "Renders the input as a [skeleton loader](https://github.com/BrightspaceUI/core/tree/main/components/skeleton)",
|
|
8666
|
+
"type": "boolean",
|
|
8667
|
+
"default": "false"
|
|
8668
|
+
},
|
|
8669
8669
|
{
|
|
8670
8670
|
"name": "labelled-by",
|
|
8671
8671
|
"description": "The id of element that provides the label for this element",
|
|
@@ -8741,13 +8741,6 @@
|
|
|
8741
8741
|
{
|
|
8742
8742
|
"name": "selectionInfo"
|
|
8743
8743
|
},
|
|
8744
|
-
{
|
|
8745
|
-
"name": "skeleton",
|
|
8746
|
-
"attribute": "skeleton",
|
|
8747
|
-
"description": "Renders the input as a [skeleton loader](https://github.com/BrightspaceUI/core/tree/main/components/skeleton)",
|
|
8748
|
-
"type": "boolean",
|
|
8749
|
-
"default": "false"
|
|
8750
|
-
},
|
|
8751
8744
|
{
|
|
8752
8745
|
"name": "dragHandleText",
|
|
8753
8746
|
"attribute": "drag-handle-text",
|
|
@@ -8792,6 +8785,13 @@
|
|
|
8792
8785
|
"description": "Default state for expand collapse toggle - if not set, collapsed will be the default state",
|
|
8793
8786
|
"type": "boolean"
|
|
8794
8787
|
},
|
|
8788
|
+
{
|
|
8789
|
+
"name": "skeleton",
|
|
8790
|
+
"attribute": "skeleton",
|
|
8791
|
+
"description": "Renders the input as a [skeleton loader](https://github.com/BrightspaceUI/core/tree/main/components/skeleton)",
|
|
8792
|
+
"type": "boolean",
|
|
8793
|
+
"default": "false"
|
|
8794
|
+
},
|
|
8795
8795
|
{
|
|
8796
8796
|
"name": "documentLocaleSettings",
|
|
8797
8797
|
"default": "\"getDocumentLocaleSettings()\""
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@brightspace-ui/core",
|
|
3
|
-
"version": "2.112.
|
|
3
|
+
"version": "2.112.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",
|