@brightspace-ui/core 3.28.6 → 3.29.0
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.
- 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/loading-spinner/README.md +1 -1
- package/components/meter/meter-circle.js +1 -1
- package/components/overflow-group/README.md +25 -3
- 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';
|
@@ -1,7 +1,7 @@
|
|
1
1
|
# Overflow Groups
|
2
|
-
|
2
|
+
An Overflow Group adds responsive behaviour to a group of buttons, links, or menus.
|
3
3
|
|
4
|
-
<!-- docs: demo autoSize:false display:block size:
|
4
|
+
<!-- docs: demo autoSize:false display:block size:small -->
|
5
5
|
```html
|
6
6
|
<script type="module">
|
7
7
|
import '@brightspace-ui/core/components/overflow-group/overflow-group.js';
|
@@ -26,11 +26,27 @@ The `d2l-overflow-group` element can be used to add responsiveness to a set of b
|
|
26
26
|
<d2l-button>Delete</d2l-button>
|
27
27
|
</d2l-overflow-group>
|
28
28
|
```
|
29
|
+
## Best Practices
|
30
|
+
|
31
|
+
<!-- docs: start best practices -->
|
32
|
+
<!-- docs: start dos -->
|
33
|
+
* Use when grouping 3 or more adjacent actions
|
34
|
+
* Consider whether visible actions can be reduced
|
35
|
+
* Use `max-to-show` to set an upper limit on how many actions are displayed before overflowing; this can prevent users from feeling overwhelmed with top-level choices
|
36
|
+
* Use the `subtle` `opener-style` if the actions are [Subtle Buttons](../../components/button#d2l-button-subtle)
|
37
|
+
<!-- docs: end dos -->
|
38
|
+
|
39
|
+
<!-- docs: start donts -->
|
40
|
+
* Avoid using `min-to-show` unless users are heavily impacted when the first 1 or 2 actions overflow into the More Actions menu
|
41
|
+
* Don't use the `icon` `opener-type` unless it's for page-level actions in the top right corner of the page, or if space is severely limited
|
42
|
+
<!-- docs: end donts -->
|
43
|
+
<!-- docs: end best practices -->
|
29
44
|
|
30
45
|
## Overflow Group [d2l-overflow-group]
|
46
|
+
|
31
47
|
Items added to this container element will no longer wrap onto a second line when the container becomes too small, but will be added to a dropdown menu with configurable styling.
|
32
48
|
|
33
|
-
<!-- docs: demo code properties name:d2l-overflow-group sandboxTitle:'Overflow Group' autoSize:false display:block size:
|
49
|
+
<!-- docs: demo code properties name:d2l-overflow-group sandboxTitle:'Overflow Group' autoSize:false display:block size:small -->
|
34
50
|
```html
|
35
51
|
<script type="module">
|
36
52
|
import '@brightspace-ui/core/components/overflow-group/overflow-group.js';
|
@@ -108,3 +124,9 @@ getOverflowContainer(overflowItems, mini) {
|
|
108
124
|
else return html`<d2l-dropdown-button text="Overflow Menu"><d2l-dropdown-menu>${overflowItems}</d2l-dropdown-menu></d2l-dropdown-button>`;
|
109
125
|
}
|
110
126
|
```
|
127
|
+
|
128
|
+
## Accessibility
|
129
|
+
|
130
|
+
Navigation and focus order are impacted when items overflow the viewport; they are physically moved into the More Actions menu. Since this effect is not limited to visual presentation, it affects both screen reader users and sighted users equally.
|
131
|
+
|
132
|
+
The accessibility and keyboard interaction of the More Actions menu aligns with [W3C's best practices for menus](https://www.w3.org/WAI/ARIA/apg/patterns/menubar/) — see [Menu](../menu) for more information.
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@brightspace-ui/core",
|
3
|
-
"version": "3.
|
3
|
+
"version": "3.29.0",
|
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",
|