@brightspace-ui/core 3.28.5 → 3.28.7
Sign up to get free protection for your applications and to get access to all the features.
- package/components/button/README.md +1 -1
- package/components/form/docs/form.md +2 -2
- package/components/inputs/docs/input-checkbox.md +1 -1
- package/components/inputs/docs/input-color.md +1 -1
- package/components/inputs/docs/input-date-time.md +6 -6
- package/components/inputs/docs/input-numeric.md +2 -2
- package/components/inputs/docs/input-search.md +1 -1
- package/components/inputs/docs/input-text.md +2 -2
- package/components/list/demo/list-nested.html +0 -1
- package/components/loading-spinner/README.md +1 -1
- package/components/meter/meter-circle.js +1 -1
- package/components/selection/selection-mixin.js +17 -5
- package/package.json +1 -1
@@ -170,7 +170,7 @@ Floating workflow buttons `<d2l-floating-buttons>` cause buttons to float or 'do
|
|
170
170
|
|
171
171
|
The best time to use floating workflow buttons is when users need immediate access to the buttons without scrolling. An example is a long or complex form page where it's common for users to make frequent isolated edits rather than sequentially completing the form.
|
172
172
|
|
173
|
-
<!-- docs: demo code properties name:d2l-floating-buttons autoSize:false display:block size:xlarge -->
|
173
|
+
<!-- docs: demo code properties name:d2l-floating-buttons sandboxTitle:'Floating Buttons' autoSize:false display:block size:xlarge -->
|
174
174
|
```html
|
175
175
|
<script type="module">
|
176
176
|
import '@brightspace-ui/core/components/button/floating-buttons.js';
|
@@ -50,7 +50,7 @@ It differs from the native HTML `form` element in 4 ways:
|
|
50
50
|
|
51
51
|
If you're looking to emulate native form element submission, `d2l-form-native` may be more appropriate.
|
52
52
|
|
53
|
-
<!-- docs: demo code properties name:d2l-form autoSize:false display:block size:large -->
|
53
|
+
<!-- docs: demo code properties name:d2l-form sandboxTitle:'Form' autoSize:false display:block size:large -->
|
54
54
|
```html
|
55
55
|
<script type="module">
|
56
56
|
import '@brightspace-ui/core/components/form/form.js';
|
@@ -184,7 +184,7 @@ It differs from the native HTML `form` element in 2 ways:
|
|
184
184
|
|
185
185
|
If you're looking to submit form data via your own API calls or nest multiple forms within each other, `d2l-form` may be more appropriate.
|
186
186
|
|
187
|
-
<!-- docs: demo code properties name:d2l-form-native autoSize:false display:block size:medium -->
|
187
|
+
<!-- docs: demo code properties name:d2l-form-native sandboxTitle:'Native Form' autoSize:false display:block size:medium -->
|
188
188
|
```html
|
189
189
|
<script type="module">
|
190
190
|
import '@brightspace-ui/core/components/form/form-native.js';
|
@@ -31,7 +31,7 @@ Checkboxes are used in forms to toggle an option or preference.
|
|
31
31
|
|
32
32
|
The `<d2l-input-checkbox>` element can be used to get a checkbox and optional visible label.
|
33
33
|
|
34
|
-
<!-- docs: demo code properties name:d2l-input-checkbox display:block -->
|
34
|
+
<!-- docs: demo code properties name:d2l-input-checkbox sandboxTitle:'Checkbox Input' display:block -->
|
35
35
|
```html
|
36
36
|
<script type="module">
|
37
37
|
import '@brightspace-ui/core/components/inputs/input-checkbox.js';
|
@@ -16,7 +16,7 @@ Color inputs allow users to select a color from a palette and perform color cont
|
|
16
16
|
|
17
17
|
The `<d2l-input-color>` will open a dialog to allow the user to select a color from a palette.
|
18
18
|
|
19
|
-
<!-- docs: demo code properties name:d2l-input-color -->
|
19
|
+
<!-- docs: demo code properties name:d2l-input-color sandboxTitle:'Color Input' -->
|
20
20
|
```html
|
21
21
|
<script type="module">
|
22
22
|
import '@brightspace-ui/core/components/inputs/input-color.js';
|
@@ -31,7 +31,7 @@ Use the `<d2l-input-date>` component when users need to choose a single date. It
|
|
31
31
|
|
32
32
|
Note: All `*value` properties should be in ISO 8601 calendar date format (`YYYY-MM-DD`) and should be [localized to the user's timezone](#timezone) (if applicable).
|
33
33
|
|
34
|
-
<!-- docs: demo code properties name:d2l-input-date align:flex-start autoSize:false size:xlarge -->
|
34
|
+
<!-- docs: demo code properties name:d2l-input-date sandboxTitle:'Date Input' align:flex-start autoSize:false size:xlarge -->
|
35
35
|
```html
|
36
36
|
<script type="module">
|
37
37
|
import '@brightspace-ui/core/components/inputs/input-date.js';
|
@@ -81,7 +81,7 @@ Use the `<d2l-input-date-range>` component when users need to enter two dates i
|
|
81
81
|
|
82
82
|
Note: All `*value` properties should be in ISO 8601 calendar date format (`YYYY-MM-DD`) and should be [localized to the user's timezone](#timezone) (if applicable).
|
83
83
|
|
84
|
-
<!-- docs: demo code properties name:d2l-input-date-range align:flex-start autoSize:false size:xlarge -->
|
84
|
+
<!-- docs: demo code properties name:d2l-input-date-range sandboxTitle:'Date Range Input' align:flex-start autoSize:false size:xlarge -->
|
85
85
|
```html
|
86
86
|
<script type="module">
|
87
87
|
import '@brightspace-ui/core/components/inputs/input-date-range.js';
|
@@ -137,7 +137,7 @@ Use the `<d2l-input-time>` component when users need to enter a time, without a
|
|
137
137
|
|
138
138
|
Note: All `*value` properties should be in ISO 8601 time format (`hh:mm:ss`) and should be [localized to the user's timezone](#timezone) (if applicable).
|
139
139
|
|
140
|
-
<!-- docs: demo code properties name:d2l-input-time align:flex-start autoSize:false size:large -->
|
140
|
+
<!-- docs: demo code properties name:d2l-input-time sandboxTitle:'Time Input' align:flex-start autoSize:false size:large -->
|
141
141
|
```html
|
142
142
|
<script type="module">
|
143
143
|
import '@brightspace-ui/core/components/inputs/input-time.js';
|
@@ -187,7 +187,7 @@ Use the `<d2l-input-time-range>` component when users need to enter two times in
|
|
187
187
|
|
188
188
|
Note: All `*value` properties should be in ISO 8601 time format (`hh:mm:ss`) and should be [localized to the user's timezone](#timezone) (if applicable).
|
189
189
|
|
190
|
-
<!-- docs: demo code properties name:d2l-input-time-range align:flex-start autoSize:false size:large -->
|
190
|
+
<!-- docs: demo code properties name:d2l-input-time-range sandboxTitle:'Time Range Input' align:flex-start autoSize:false size:large -->
|
191
191
|
```html
|
192
192
|
<script type="module">
|
193
193
|
import '@brightspace-ui/core/components/inputs/input-time-range.js';
|
@@ -239,7 +239,7 @@ Use the `<d2l-input-date-time>` component when users need to enter a single dat
|
|
239
239
|
|
240
240
|
Note: All `*value` properties should be in ISO 8601 combined date and time format (`YYYY-MM-DDTHH:mm:ss.sssZ`) and in UTC time (i.e., do NOT localize to the user's timezone).
|
241
241
|
|
242
|
-
<!-- docs: demo code properties name:d2l-input-date-time align:flex-start autoSize:false size:xlarge -->
|
242
|
+
<!-- docs: demo code properties name:d2l-input-date-time sandboxTitle:'Date-Time Input' align:flex-start autoSize:false size:xlarge -->
|
243
243
|
```html
|
244
244
|
<script type="module">
|
245
245
|
import '@brightspace-ui/core/components/inputs/input-date-time.js';
|
@@ -290,7 +290,7 @@ Use the `<d2l-input-date-time-range>` component when users need to enter two d
|
|
290
290
|
|
291
291
|
Note: All `*value` properties should be in ISO 8601 combined date and time format (`YYYY-MM-DDTHH:mm:ss.sssZ`) and in UTC time (i.e., do NOT localize to the user's timezone).
|
292
292
|
|
293
|
-
<!-- docs: demo code properties name:d2l-input-date-time-range align:flex-start autoSize:false size:xlarge -->
|
293
|
+
<!-- docs: demo code properties name:d2l-input-date-time-range sandboxTitle:'Date-Time Range Input' align:flex-start autoSize:false size:xlarge -->
|
294
294
|
```html
|
295
295
|
<script type="module">
|
296
296
|
import '@brightspace-ui/core/components/inputs/input-date-time-range.js';
|
@@ -21,7 +21,7 @@ Numeric inputs allow users to input numbers. These include the more generic `d2l
|
|
21
21
|
|
22
22
|
The `<d2l-input-number>` element is similar to `<d2l-input-text>`, except it's intended for inputting numbers only.
|
23
23
|
|
24
|
-
<!-- docs: demo code properties name:d2l-input-number -->
|
24
|
+
<!-- docs: demo code properties name:d2l-input-number sandboxTitle:'Number Input' -->
|
25
25
|
```html
|
26
26
|
<script type="module">
|
27
27
|
import '@brightspace-ui/core/components/inputs/input-number.js';
|
@@ -101,7 +101,7 @@ To accept only integer numbers, set `max-fraction-digits` to zero:
|
|
101
101
|
|
102
102
|
The `<d2l-input-percent>` element is similar to `<d2l-input-number>`, except it provides a "%" symbol beside the number.
|
103
103
|
|
104
|
-
<!-- docs: demo code properties name:d2l-input-percent -->
|
104
|
+
<!-- docs: demo code properties name:d2l-input-percent sandboxTitle:'Percent Input' -->
|
105
105
|
```html
|
106
106
|
<script type="module">
|
107
107
|
import '@brightspace-ui/core/components/inputs/input-percent.js';
|
@@ -35,7 +35,7 @@ Search inputs allow users to input text, execute a search, and clear results. A
|
|
35
35
|
|
36
36
|
For text searches use `<d2l-input-search>`, which wraps the native `<input type="search">` element.
|
37
37
|
|
38
|
-
<!-- docs: demo code properties name:d2l-input-search -->
|
38
|
+
<!-- docs: demo code properties name:d2l-input-search sandboxTitle:'Search Input' -->
|
39
39
|
```html
|
40
40
|
<script type="module">
|
41
41
|
import '@brightspace-ui/core/components/inputs/input-search.js';
|
@@ -49,7 +49,7 @@ Therefore in text inputs, placeholder text is a light colour (Mica), which fails
|
|
49
49
|
|
50
50
|
The `<d2l-input-text>` element is a simple wrapper around the native `<input type="text">` tag. It's intended primarily for inputting generic text, email addresses and URLs.
|
51
51
|
|
52
|
-
<!-- docs: demo code properties name:d2l-input-text -->
|
52
|
+
<!-- docs: demo code properties name:d2l-input-text sandboxTitle:'Text Input' -->
|
53
53
|
```html
|
54
54
|
<script type="module">
|
55
55
|
import '@brightspace-ui/core/components/inputs/input-text.js';
|
@@ -168,7 +168,7 @@ As an alternative to using the `<d2l-input-text>` custom element, you can style
|
|
168
168
|
|
169
169
|
The `<d2l-input-textarea>` is a wrapper around the native `<textarea>` element that provides auto-grow and validation behaviours. It's intended for inputting unformatted multi-line text.
|
170
170
|
|
171
|
-
<!-- docs: demo code properties name:d2l-input-textarea -->
|
171
|
+
<!-- docs: demo code properties name:d2l-input-textarea sandboxTitle:'Textarea Input' -->
|
172
172
|
```html
|
173
173
|
<script type="module">
|
174
174
|
import '@brightspace-ui/core/components/inputs/input-textarea.js';
|
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
A loading spinner indicates that something is happening and we don't know how long it will take.
|
4
4
|
|
5
|
-
<!-- docs: demo name:d2l-loading-spinner -->
|
5
|
+
<!-- docs: demo name:d2l-loading-spinner sandboxTitle:'Loading Spinner' -->
|
6
6
|
```html
|
7
7
|
<script type="module">
|
8
8
|
import '@brightspace-ui/core/components/loading-spinner/loading-spinner.js';
|
@@ -12,13 +12,19 @@ const keyCodes = {
|
|
12
12
|
|
13
13
|
export class SelectionInfo {
|
14
14
|
|
15
|
-
constructor(keys, state) {
|
15
|
+
constructor(keys, state, allEnabledSelected) {
|
16
|
+
if (!allEnabledSelected) allEnabledSelected = false;
|
16
17
|
if (!keys) keys = [];
|
17
18
|
if (!state) state = SelectionInfo.states.none;
|
19
|
+
this._allEnabledSelected = allEnabledSelected;
|
18
20
|
this._keys = keys;
|
19
21
|
this._state = state;
|
20
22
|
}
|
21
23
|
|
24
|
+
get allEnabledSelected() {
|
25
|
+
return this._allEnabledSelected;
|
26
|
+
}
|
27
|
+
|
22
28
|
get keys() {
|
23
29
|
return this._keys;
|
24
30
|
}
|
@@ -87,6 +93,7 @@ export const SelectionMixin = superclass => class extends RtlMixin(CollectionMix
|
|
87
93
|
}
|
88
94
|
|
89
95
|
getSelectionInfo() {
|
96
|
+
let allEnabledSelected = true;
|
90
97
|
let state = SelectionInfo.states.none;
|
91
98
|
const keys = [];
|
92
99
|
|
@@ -95,6 +102,7 @@ export const SelectionMixin = superclass => class extends RtlMixin(CollectionMix
|
|
95
102
|
} else {
|
96
103
|
this._selectionSelectables.forEach(selectable => {
|
97
104
|
if (selectable.selected) keys.push(selectable.key);
|
105
|
+
if (!selectable.disabled && !selectable.selected) allEnabledSelected = false;
|
98
106
|
if (selectable._indeterminate) state = SelectionInfo.states.some;
|
99
107
|
});
|
100
108
|
|
@@ -104,19 +112,23 @@ export const SelectionMixin = superclass => class extends RtlMixin(CollectionMix
|
|
104
112
|
}
|
105
113
|
}
|
106
114
|
|
107
|
-
return new SelectionInfo(keys, state);
|
115
|
+
return new SelectionInfo(keys, state, allEnabledSelected);
|
108
116
|
}
|
109
117
|
|
110
118
|
setSelectionForAll(selected, selectAllPages) {
|
111
119
|
if (this.selectionSingle && selected) return;
|
112
|
-
|
113
120
|
this._selectAllPages = (selected && selectAllPages);
|
114
121
|
|
122
|
+
const { allEnabledSelected } = this.getSelectionInfo();
|
123
|
+
|
115
124
|
this._selectionSelectables.forEach(selectable => {
|
116
|
-
if (
|
117
|
-
selectable.selected = selected;
|
125
|
+
if (this.selectionSingle || this._selectAllPages) {
|
126
|
+
if (selectable.selected !== selected) selectable.selected = selected;
|
127
|
+
} else if (!selectable.disabled && selectable.selected !== !allEnabledSelected) {
|
128
|
+
selectable.selected = !allEnabledSelected;
|
118
129
|
}
|
119
130
|
});
|
131
|
+
|
120
132
|
this._updateSelectionObservers();
|
121
133
|
}
|
122
134
|
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@brightspace-ui/core",
|
3
|
-
"version": "3.28.
|
3
|
+
"version": "3.28.7",
|
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",
|