@brightspace-ui/core 3.1.0 → 3.1.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.
- package/components/inputs/docs/input-checkbox.md +4 -0
- package/components/inputs/docs/input-date-time.md +24 -0
- package/components/inputs/docs/input-numeric.md +8 -0
- package/components/inputs/docs/input-search.md +4 -0
- package/components/inputs/docs/input-text.md +1 -0
- package/components/inputs/input-checkbox.js +1 -0
- package/components/inputs/input-text.js +1 -0
- package/components/inputs/input-textarea.js +1 -0
- package/components/inputs/input-time.js +1 -0
- package/components/table/demo/table-test.js +0 -1
- package/components/table/table-col-sort-button.js +3 -4
- package/components/table/table-wrapper.js +5 -18
- package/custom-elements.json +20 -0
- package/package.json +1 -1
@@ -72,6 +72,10 @@ checkbox.addEventListener('change', (e) => {
|
|
72
72
|
console.log(checkbox.checked);
|
73
73
|
});
|
74
74
|
```
|
75
|
+
|
76
|
+
### Slots
|
77
|
+
|
78
|
+
* `inline-help`: Help text that will appear below the input. Use this only when other helpful cues are not sufficient, such as a carefully-worded label.
|
75
79
|
<!-- docs: end hidden content -->
|
76
80
|
|
77
81
|
### Accessibility Properties
|
@@ -59,6 +59,10 @@ Note: All `*value` properties should be in ISO 8601 calendar date format (`YYYY-
|
|
59
59
|
### Events
|
60
60
|
|
61
61
|
* `change`: dispatched when a date is selected or typed. `value` reflects the selected value and is in ISO 8601 calendar date format (`YYYY-MM-DD`).
|
62
|
+
|
63
|
+
### Slots
|
64
|
+
|
65
|
+
* `inline-help`: Help text that will appear below the input. Use this only when other helpful cues are not sufficient, such as a carefully-worded label.
|
62
66
|
<!-- docs: end hidden content -->
|
63
67
|
|
64
68
|
### Accessibility Properties
|
@@ -110,6 +114,10 @@ Note: All `*value` properties should be in ISO 8601 calendar date format (`YYYY-
|
|
110
114
|
### Events
|
111
115
|
|
112
116
|
* `change`: dispatched when a start or end date is selected or typed. `start-value` reflects the value of the first input, `end-value` reflects the value of the second input, and both are in ISO 8601 calendar date format (`YYYY-MM-DD`).
|
117
|
+
|
118
|
+
### Slots
|
119
|
+
|
120
|
+
* `inline-help`: Help text that will appear below the input. Use this only when other helpful cues are not sufficient, such as a carefully-worded label.
|
113
121
|
<!-- docs: end hidden content -->
|
114
122
|
|
115
123
|
### Accessibility Properties
|
@@ -157,6 +165,10 @@ Note: All `*value` properties should be in ISO 8601 time format (`hh:mm:ss`) and
|
|
157
165
|
### Events
|
158
166
|
|
159
167
|
* `change`: dispatched when a time is selected or typed. `value` reflects the selected value and is in ISO 8601 time format (`hh:mm:ss`).
|
168
|
+
|
169
|
+
### Slots
|
170
|
+
|
171
|
+
* `inline-help`: Help text that will appear below the input. Use this only when other helpful cues are not sufficient, such as a carefully-worded label.
|
160
172
|
<!-- docs: end hidden content -->
|
161
173
|
|
162
174
|
### Accessibility Properties
|
@@ -204,6 +216,10 @@ Note: All `*value` properties should be in ISO 8601 time format (`hh:mm:ss`) and
|
|
204
216
|
| `start-opened` | Boolean | Indicates if the start dropdown is open |
|
205
217
|
| `start-value` | String, default `''` | Value of the first time input |
|
206
218
|
| `time-interval` | String, default: `thirty` | Number of minutes between times shown in dropdown. Valid values include `five`, `ten`, `fifteen`, `twenty`, `thirty`, and `sixty`. |
|
219
|
+
|
220
|
+
### Slots
|
221
|
+
|
222
|
+
* `inline-help`: Help text that will appear below the input. Use this only when other helpful cues are not sufficient, such as a carefully-worded label.
|
207
223
|
<!-- docs: end hidden content -->
|
208
224
|
|
209
225
|
### Accessibility Properties
|
@@ -252,6 +268,10 @@ Note: All `*value` properties should be in ISO 8601 combined date and time forma
|
|
252
268
|
### Events
|
253
269
|
|
254
270
|
* `change`: dispatched when there is a change in selected date or selected time (when date is already selected). `value` reflects the selected value and is in ISO 8601 combined date and time format (`YYYY-MM-DDTHH:mm:ss.sssZ`).
|
271
|
+
|
272
|
+
### Slots
|
273
|
+
|
274
|
+
* `inline-help`: Help text that will appear below the input. Use this only when other helpful cues are not sufficient, such as a carefully-worded label.
|
255
275
|
<!-- docs: end hidden content -->
|
256
276
|
|
257
277
|
### Accessibility Properties
|
@@ -301,6 +321,10 @@ Note: All `*value` properties should be in ISO 8601 combined date and time forma
|
|
301
321
|
### Events
|
302
322
|
|
303
323
|
* `change`: dispatched when a start or end date is selected or typed. `start-value` reflects the value of the first input, `end-value` reflects the value of the second input, and both are in ISO 8601 combined date and time format (`YYYY-MM-DDTHH:mm:ss.sssZ`) and in UTC time.
|
324
|
+
|
325
|
+
### Slots
|
326
|
+
|
327
|
+
* `inline-help`: Help text that will appear below the input. Use this only when other helpful cues are not sufficient, such as a carefully-worded label.
|
304
328
|
<!-- docs: end hidden content -->
|
305
329
|
|
306
330
|
### Accessibility Properties
|
@@ -69,6 +69,10 @@ numberInput.addEventListener('change', (e) => {
|
|
69
69
|
console.log(numberInput.value);
|
70
70
|
});
|
71
71
|
```
|
72
|
+
|
73
|
+
### Slots
|
74
|
+
|
75
|
+
* `inline-help`: Help text that will appear below the input. Use this only when other helpful cues are not sufficient, such as a carefully-worded label.
|
72
76
|
<!-- docs: end hidden content -->
|
73
77
|
|
74
78
|
### Accessibility Properties
|
@@ -138,6 +142,10 @@ numberInput.addEventListener('change', (e) => {
|
|
138
142
|
console.log(numberInput.value);
|
139
143
|
});
|
140
144
|
```
|
145
|
+
|
146
|
+
### Slots
|
147
|
+
|
148
|
+
* `inline-help`: Help text that will appear below the input. Use this only when other helpful cues are not sufficient, such as a carefully-worded label.
|
141
149
|
<!-- docs: end hidden content -->
|
142
150
|
|
143
151
|
### Accessibility Properties
|
@@ -76,6 +76,10 @@ search.addEventListener('d2l-input-search-searched', (e) => {
|
|
76
76
|
```
|
77
77
|
|
78
78
|
When the input is cleared, the same event will be fired with an empty value.
|
79
|
+
|
80
|
+
### Slots
|
81
|
+
|
82
|
+
* `inline-help`: Help text that will appear below the input. Use this only when other helpful cues are not sufficient, such as a carefully-worded label.
|
79
83
|
<!-- docs: end hidden content -->
|
80
84
|
|
81
85
|
### Accessibility Properties
|
@@ -120,6 +120,7 @@ input.addEventListener('input', (e) => {
|
|
120
120
|
|
121
121
|
* `left`: Slot within the input on the left side. Useful for an `icon` or `button-icon`.
|
122
122
|
* `right`: Slot within the input on the right side. Useful for an `icon` or `button-icon`.
|
123
|
+
* `inline-help`: Help text that will appear below the input. Use this only when other helpful cues are not sufficient, such as a carefully-worded label.
|
123
124
|
<!-- docs: end hidden content -->
|
124
125
|
|
125
126
|
### Accessibility Properties
|
@@ -61,6 +61,7 @@ export const checkboxStyles = css`
|
|
61
61
|
/**
|
62
62
|
* A component that can be used to show a checkbox and optional visible label.
|
63
63
|
* @slot - Checkbox information (e.g., text)
|
64
|
+
* @slot inline-help - Help text that will appear below the input. Use this only when other helpful cues are not sufficient, such as a carefully-worded label.
|
64
65
|
* @fires change - Dispatched when the checkbox's state changes
|
65
66
|
*/
|
66
67
|
class InputCheckbox extends InputInlineHelpMixin(FocusMixin(SkeletonMixin(RtlMixin(LitElement)))) {
|
@@ -23,6 +23,7 @@ import { styleMap } from 'lit/directives/style-map.js';
|
|
23
23
|
* @slot left - Slot within the input on the left side. Useful for an "icon" or "button-icon".
|
24
24
|
* @slot right - Slot within the input on the right side. Useful for an "icon" or "button-icon".
|
25
25
|
* @slot after - Slot beside the input on the right side. Useful for an "icon" or "button-icon".
|
26
|
+
* @slot inline-help - Help text that will appear below the input. Use this only when other helpful cues are not sufficient, such as a carefully-worded label.
|
26
27
|
* @fires change - Dispatched when an alteration to the value is committed (typically after focus is lost) by the user
|
27
28
|
* @fires input - Dispatched immediately after changes by the user
|
28
29
|
*/
|
@@ -17,6 +17,7 @@ import { styleMap } from 'lit/directives/style-map.js';
|
|
17
17
|
|
18
18
|
/**
|
19
19
|
* A wrapper around the native `<textarea>` element that provides auto-grow and validation behaviours intended for inputting unformatted multi-line text.
|
20
|
+
* @slot inline-help - Help text that will appear below the input. Use this only when other helpful cues are not sufficient, such as a carefully-worded label.
|
20
21
|
* @fires change - Dispatched when an alteration to the value is committed (typically after focus is lost) by the user
|
21
22
|
* @fires input - Dispatched immediately after changes by the user
|
22
23
|
*/
|
@@ -117,6 +117,7 @@ function initIntervals(size, enforceTimeIntervals) {
|
|
117
117
|
|
118
118
|
/**
|
119
119
|
* A component that consists of a text input field for typing a time and an attached dropdown for time selection. It displays the "value" if one is specified, or a placeholder if not, and reflects the selected value when one is selected in the dropdown or entered in the text input.
|
120
|
+
* @slot inline-help - Help text that will appear below the input. Use this only when other helpful cues are not sufficient, such as a carefully-worded label.
|
120
121
|
* @fires change - Dispatched when there is a change to selected time. `value` corresponds to the selected value and is formatted in ISO 8601 time format (`hh:mm:ss`).
|
121
122
|
*/
|
122
123
|
class InputTime extends InputInlineHelpMixin(FocusMixin(LabelledMixin(SkeletonMixin(FormElementMixin(RtlMixin(LitElement)))))) {
|
@@ -35,8 +35,7 @@ export class TableColSortButton extends FocusMixin(LitElement) {
|
|
35
35
|
return css`
|
36
36
|
:host {
|
37
37
|
--d2l-table-col-sort-button-additional-padding-inline-end: 0px; /* stylelint-disable-line length-zero-no-unit */
|
38
|
-
--d2l-table-col-sort-button-
|
39
|
-
--d2l-table-col-sort-button-width: calc(100% - 2 * var(--d2l-table-cell-col-sort-button-size-offset));
|
38
|
+
--d2l-table-col-sort-button-width: calc(100% - var(--d2l-table-cell-col-sort-button-size-offset, 4px));
|
40
39
|
}
|
41
40
|
:host([nosort]) {
|
42
41
|
--d2l-table-col-sort-button-additional-padding-inline-end: calc(0.6rem + 18px);
|
@@ -53,8 +52,8 @@ export class TableColSortButton extends FocusMixin(LitElement) {
|
|
53
52
|
font-size: inherit;
|
54
53
|
letter-spacing: inherit;
|
55
54
|
line-height: 0.9rem;
|
56
|
-
margin: var(--d2l-table-cell-col-sort-button-size-offset, 4px);
|
57
|
-
margin-inline
|
55
|
+
margin-block: 0 var(--d2l-table-cell-col-sort-button-size-offset, 4px);
|
56
|
+
margin-inline: 0 var(--d2l-table-cell-col-sort-button-size-offset, 4px);
|
58
57
|
padding: calc(var(--d2l-table-cell-padding) - var(--d2l-table-cell-col-sort-button-size-offset, 4px));
|
59
58
|
padding-inline-end: calc(var(--d2l-table-cell-padding) - var(--d2l-table-cell-col-sort-button-size-offset, 4px) + var(--d2l-table-col-sort-button-additional-padding-inline-end));
|
60
59
|
text-decoration: none;
|
@@ -94,22 +94,13 @@ export const tableStyles = css`
|
|
94
94
|
}
|
95
95
|
d2l-table-col-sort-button:not(:only-child) {
|
96
96
|
--d2l-table-col-sort-button-additional-padding-inline-end: 0px; /* stylelint-disable-line length-zero-no-unit */
|
97
|
-
display: inline-flex;
|
98
|
-
margin-inline-start: calc(-1 * var(--d2l-table-cell-col-sort-button-size-offset));
|
99
|
-
margin-top: calc(-1 * var(--d2l-table-cell-col-sort-button-size-offset));
|
100
|
-
}
|
101
|
-
d2l-table-col-sort-button:not(:last-child) {
|
102
|
-
--d2l-table-col-sort-button-margin-inline-end: 0;
|
103
97
|
}
|
104
98
|
|
105
99
|
/* TODO: once we only support browsers that support :has the section below can be removed up until @supports */
|
106
100
|
.d2l-table th.d2l-table-header-col-sortable {
|
107
|
-
height: var(--d2l-table-cell-overall-height);
|
108
|
-
padding: 0;
|
109
|
-
}
|
110
|
-
.d2l-table th.d2l-table-header-col-sortable.d2l-table-header-col-sortable-siblings {
|
111
101
|
height: calc(var(--d2l-table-cell-overall-height) - var(--d2l-table-cell-col-sort-button-size-offset));
|
112
|
-
padding-
|
102
|
+
padding-block: var(--d2l-table-cell-col-sort-button-size-offset) 0;
|
103
|
+
padding-inline: var(--d2l-table-cell-col-sort-button-size-offset) 0;
|
113
104
|
}
|
114
105
|
.d2l-table th.d2l-table-header-col-sortable-siblings d2l-table-col-sort-button {
|
115
106
|
--d2l-table-col-sort-button-width: unset;
|
@@ -118,14 +109,10 @@ export const tableStyles = css`
|
|
118
109
|
padding-inline-end: calc(0.6rem + 18px);
|
119
110
|
}
|
120
111
|
@supports selector(:has(a, b)) {
|
121
|
-
.d2l-table th:has(d2l-table-col-sort-button) {
|
122
|
-
height: var(--d2l-table-cell-overall-height);
|
123
|
-
padding: 0;
|
124
|
-
}
|
125
|
-
.d2l-table th:has(d2l-table-col-sort-button:not(:only-child)) {
|
112
|
+
.d2l-table > * > tr > th:has(d2l-table-col-sort-button) {
|
126
113
|
height: calc(var(--d2l-table-cell-overall-height) - var(--d2l-table-cell-col-sort-button-size-offset));
|
127
|
-
padding-
|
128
|
-
padding-
|
114
|
+
padding-block: var(--d2l-table-cell-col-sort-button-size-offset) 0;
|
115
|
+
padding-inline: var(--d2l-table-cell-col-sort-button-size-offset) 0;
|
129
116
|
}
|
130
117
|
.d2l-table th:has(d2l-table-col-sort-button:not(:only-child)) d2l-table-col-sort-button {
|
131
118
|
--d2l-table-col-sort-button-width: unset;
|
package/custom-elements.json
CHANGED
@@ -4936,6 +4936,10 @@
|
|
4936
4936
|
{
|
4937
4937
|
"name": "",
|
4938
4938
|
"description": "Checkbox information (e.g., text)"
|
4939
|
+
},
|
4940
|
+
{
|
4941
|
+
"name": "inline-help",
|
4942
|
+
"description": "Help text that will appear below the input. Use this only when other helpful cues are not sufficient, such as a carefully-worded label."
|
4939
4943
|
}
|
4940
4944
|
]
|
4941
4945
|
},
|
@@ -7044,6 +7048,10 @@
|
|
7044
7048
|
{
|
7045
7049
|
"name": "after",
|
7046
7050
|
"description": "Slot beside the input on the right side. Useful for an \"icon\" or \"button-icon\"."
|
7051
|
+
},
|
7052
|
+
{
|
7053
|
+
"name": "inline-help",
|
7054
|
+
"description": "Help text that will appear below the input. Use this only when other helpful cues are not sufficient, such as a carefully-worded label."
|
7047
7055
|
}
|
7048
7056
|
]
|
7049
7057
|
},
|
@@ -7272,6 +7280,12 @@
|
|
7272
7280
|
"name": "input",
|
7273
7281
|
"description": "Dispatched immediately after changes by the user"
|
7274
7282
|
}
|
7283
|
+
],
|
7284
|
+
"slots": [
|
7285
|
+
{
|
7286
|
+
"name": "inline-help",
|
7287
|
+
"description": "Help text that will appear below the input. Use this only when other helpful cues are not sufficient, such as a carefully-worded label."
|
7288
|
+
}
|
7275
7289
|
]
|
7276
7290
|
},
|
7277
7291
|
{
|
@@ -7687,6 +7701,12 @@
|
|
7687
7701
|
"name": "change",
|
7688
7702
|
"description": "Dispatched when there is a change to selected time. `value` corresponds to the selected value and is formatted in ISO 8601 time format (`hh:mm:ss`)."
|
7689
7703
|
}
|
7704
|
+
],
|
7705
|
+
"slots": [
|
7706
|
+
{
|
7707
|
+
"name": "inline-help",
|
7708
|
+
"description": "Help text that will appear below the input. Use this only when other helpful cues are not sufficient, such as a carefully-worded label."
|
7709
|
+
}
|
7690
7710
|
]
|
7691
7711
|
},
|
7692
7712
|
{
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@brightspace-ui/core",
|
3
|
-
"version": "3.1.
|
3
|
+
"version": "3.1.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",
|