@brightspace-ui/labs 2.56.0 → 2.56.3
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/demo/components/ou-filter/ouFilterDemoPage.js +14 -16
- package/package.json +4 -3
- package/src/components/accessibility-disability-simulator/accessibility-disability-simulator.js +70 -74
- package/src/components/accordion/accordion-collapse.js +161 -164
- package/src/components/accordion/accordion.js +14 -17
- package/src/components/attribute-picker/attribute-picker-item.js +63 -66
- package/src/components/attribute-picker/attribute-picker.js +116 -121
- package/src/components/card-overlay/card-overlay.js +53 -55
- package/src/components/checkbox-drawer/checkbox-drawer.js +32 -36
- package/src/components/community/community-base.js +3 -5
- package/src/components/community/community-button.js +3 -5
- package/src/components/community/community-link.js +4 -6
- package/src/components/file-uploader/file-uploader.js +148 -151
- package/src/components/grade-result/grade-result-icon-button.js +5 -6
- package/src/components/grade-result/grade-result-letter-score.js +18 -22
- package/src/components/grade-result/grade-result-numeric-score.js +25 -28
- package/src/components/grade-result/grade-result-presentational.js +133 -136
- package/src/components/grade-result/grade-result-student-grade-preview.js +38 -42
- package/src/components/media-player/media-player-audio-bars.js +28 -31
- package/src/components/media-player/media-player.js +503 -487
- package/src/components/media-player/slider-bar.js +119 -122
- package/src/components/navigation/navigation-band.js +69 -71
- package/src/components/navigation/navigation-button-icon.js +51 -55
- package/src/components/navigation/navigation-dropdown-button-custom.js +13 -17
- package/src/components/navigation/navigation-dropdown-button-icon.js +21 -25
- package/src/components/navigation/navigation-immersive.js +128 -132
- package/src/components/navigation/navigation-iterator.js +21 -25
- package/src/components/navigation/navigation-link-back.js +13 -17
- package/src/components/navigation/navigation-link-icon.js +36 -40
- package/src/components/navigation/navigation-link-image.js +31 -35
- package/src/components/navigation/navigation-link.js +34 -38
- package/src/components/navigation/navigation-main-footer.js +7 -9
- package/src/components/navigation/navigation-main-header.js +34 -36
- package/src/components/navigation/navigation-notification-icon.js +30 -34
- package/src/components/navigation/navigation.js +19 -23
- package/src/components/opt-in-flyout/flyout-impl.js +138 -146
- package/src/components/opt-in-flyout/opt-in-flyout.js +14 -18
- package/src/components/opt-in-flyout/opt-out-dialog.js +63 -67
- package/src/components/opt-in-flyout/opt-out-flyout.js +15 -19
- package/src/components/opt-in-flyout/opt-out-reason-selector.js +38 -45
- package/src/components/opt-in-flyout/opt-out-reason.js +9 -13
- package/src/components/ou-filter/ou-filter.js +14 -18
- package/src/components/ou-filter/tree-filter.js +22 -26
- package/src/components/ou-filter/tree-selector-node.js +62 -66
- package/src/components/ou-filter/tree-selector.js +55 -62
- package/src/components/pagination/pager-numeric.js +35 -39
- package/src/components/view-toggle/view-toggle.js +79 -81
- package/src/components/wizard/single-step-header.js +106 -110
- package/src/components/wizard/wizard-step.js +65 -68
- package/src/components/wizard/wizard.js +30 -33
- package/src/utilities/reactive-store/README.md +10 -15
|
@@ -6,177 +6,174 @@ import { FocusMixin } from '@brightspace-ui/core/mixins/focus/focus-mixin.js';
|
|
|
6
6
|
import { LocalizeLabsElement } from '../localize-labs-element.js';
|
|
7
7
|
|
|
8
8
|
class FileUploader extends FocusMixin(LocalizeLabsElement(LitElement)) {
|
|
9
|
-
static get properties() {
|
|
10
|
-
return {
|
|
11
|
-
/**
|
|
12
|
-
* When set, displays a feedback message to the user. Used in conjunction with `feedback-type`.
|
|
13
|
-
*/
|
|
14
|
-
feedback: { type: String, reflect: true },
|
|
15
|
-
/**
|
|
16
|
-
* The type of feedback to display. One of: "error", "warning"
|
|
17
|
-
*/
|
|
18
|
-
feedbackType: { type: String, attribute: 'feedback-type', reflect: true },
|
|
19
|
-
/**
|
|
20
|
-
* A descriptive label to associate with the file input. Should
|
|
21
|
-
* be unique enough to distinguish the input from others on the page.
|
|
22
|
-
*/
|
|
23
|
-
label: { type: String },
|
|
24
|
-
/**
|
|
25
|
-
* Whether multiple files can be uploaded.
|
|
26
|
-
*/
|
|
27
|
-
multiple: { type: Boolean, reflect: true },
|
|
28
|
-
/**
|
|
29
|
-
* Collection of uploaded files, as [File](https://developer.mozilla.org/en-US/docs/Web/API/File) objects.
|
|
30
|
-
*/
|
|
31
|
-
_files: { type: Object },
|
|
32
|
-
/**
|
|
33
|
-
* Whether a file is currently being dragged over the document.
|
|
34
|
-
*/
|
|
35
|
-
_fileDragOver: { type: Boolean, attribute: '_file-drag-over', reflect: true },
|
|
36
|
-
_inputFocus: { type: Boolean }
|
|
37
|
-
};
|
|
38
|
-
}
|
|
39
9
|
|
|
40
|
-
static
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
10
|
+
static properties = {
|
|
11
|
+
/**
|
|
12
|
+
* When set, displays a feedback message to the user. Used in conjunction with `feedback-type`.
|
|
13
|
+
*/
|
|
14
|
+
feedback: { type: String, reflect: true },
|
|
15
|
+
/**
|
|
16
|
+
* The type of feedback to display. One of: "error", "warning"
|
|
17
|
+
*/
|
|
18
|
+
feedbackType: { type: String, attribute: 'feedback-type', reflect: true },
|
|
19
|
+
/**
|
|
20
|
+
* A descriptive label to associate with the file input. Should
|
|
21
|
+
* be unique enough to distinguish the input from others on the page.
|
|
22
|
+
*/
|
|
23
|
+
label: { type: String },
|
|
24
|
+
/**
|
|
25
|
+
* Whether multiple files can be uploaded.
|
|
26
|
+
*/
|
|
27
|
+
multiple: { type: Boolean, reflect: true },
|
|
28
|
+
/**
|
|
29
|
+
* Collection of uploaded files, as [File](https://developer.mozilla.org/en-US/docs/Web/API/File) objects.
|
|
30
|
+
*/
|
|
31
|
+
_files: { type: Object },
|
|
32
|
+
/**
|
|
33
|
+
* Whether a file is currently being dragged over the document.
|
|
34
|
+
*/
|
|
35
|
+
_fileDragOver: { type: Boolean, attribute: '_file-drag-over', reflect: true },
|
|
36
|
+
_inputFocus: { type: Boolean }
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
static styles = css`
|
|
40
|
+
:host {
|
|
41
|
+
box-sizing: border-box;
|
|
42
|
+
display: block;
|
|
43
|
+
max-width: 27rem;
|
|
44
|
+
}
|
|
45
|
+
:host([feedback-type="warning"]) {
|
|
46
|
+
--d2l-file-uploader-feedback-color: var(--d2l-color-feedback-warning);
|
|
47
|
+
}
|
|
48
|
+
:host([feedback-type="error"]) {
|
|
49
|
+
--d2l-file-uploader-feedback-color: var(--d2l-color-feedback-error);
|
|
50
|
+
}
|
|
53
51
|
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
52
|
+
.d2l-file-uploader-drop-zone {
|
|
53
|
+
border: 2px dashed var(--d2l-color-ferrite);
|
|
54
|
+
border-radius: 0.3rem;
|
|
55
|
+
padding: 1.5rem;
|
|
56
|
+
text-align: center;
|
|
57
|
+
}
|
|
60
58
|
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
59
|
+
:host([_file-drag-over]) .d2l-file-uploader-drop-zone {
|
|
60
|
+
background-color: var(--d2l-color-celestine-plus-2);
|
|
61
|
+
border-color: var(--d2l-color-celestine);
|
|
62
|
+
}
|
|
65
63
|
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
64
|
+
.d2l-file-uploader-icon {
|
|
65
|
+
padding-bottom: 0.5rem;
|
|
66
|
+
}
|
|
69
67
|
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
68
|
+
:host([_file-drag-over]) svg path {
|
|
69
|
+
fill: var(--d2l-color-celestine);
|
|
70
|
+
}
|
|
73
71
|
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
72
|
+
.d2l-file-uploader-input {
|
|
73
|
+
display: inline-block;
|
|
74
|
+
height: 100%;
|
|
75
|
+
left: 0;
|
|
76
|
+
opacity: 0;
|
|
77
|
+
position: absolute;
|
|
78
|
+
top: 0;
|
|
79
|
+
width: 100%;
|
|
80
|
+
}
|
|
83
81
|
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
82
|
+
.d2l-file-uploader-browse-label {
|
|
83
|
+
background: none;
|
|
84
|
+
border: none;
|
|
85
|
+
color: var(--d2l-color-celestine);
|
|
86
|
+
overflow: hidden;
|
|
87
|
+
padding-right: 0;
|
|
88
|
+
position: relative;
|
|
89
|
+
}
|
|
90
|
+
.d2l-file-uploader-browse-label:hover,
|
|
91
|
+
.d2l-file-uploader-browse-label-focus {
|
|
92
|
+
color: var(--d2l-color-celestine-minus-1);
|
|
93
|
+
text-decoration: underline;
|
|
94
|
+
}
|
|
97
95
|
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
96
|
+
.d2l-file-uploader-browse-files {
|
|
97
|
+
display: none;
|
|
98
|
+
}
|
|
101
99
|
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
100
|
+
.d2l-file-uploader-feedback {
|
|
101
|
+
-webkit-animation-duration: 0.7s;
|
|
102
|
+
animation-duration: 0.7s;
|
|
103
|
+
-webkit-animation-name: feedbackIn;
|
|
104
|
+
animation-name: feedbackIn;
|
|
105
|
+
border: 1px solid var(--d2l-color-mica);
|
|
106
|
+
border-left-color: var(--d2l-file-uploader-feedback-color);
|
|
107
|
+
border-left-width: 0.5rem;
|
|
108
|
+
border-radius: 0.3rem;
|
|
109
|
+
display: none;
|
|
110
|
+
margin-bottom: 1.5rem;
|
|
111
|
+
padding: 0.7rem 1rem 0.7rem;
|
|
112
|
+
}
|
|
113
|
+
:host(:dir(rtl)) > .d2l-file-uploader-feedback {
|
|
114
|
+
border-left-color: var(--d2l-color-mica);
|
|
115
|
+
border-left-width: 1px;
|
|
116
|
+
border-right-color: var(--d2l-file-uploader-feedback-color);
|
|
117
|
+
border-right-width: 0.5rem;
|
|
118
|
+
}
|
|
119
|
+
:host([feedback]) > .d2l-file-uploader-feedback {
|
|
120
|
+
display: block;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
@keyframes feedbackIn {
|
|
124
|
+
0% {
|
|
125
|
+
max-height: 0.1rem;
|
|
126
|
+
opacity: 0;
|
|
114
127
|
}
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
border-left-width: 1px;
|
|
118
|
-
border-right-color: var(--d2l-file-uploader-feedback-color);
|
|
119
|
-
border-right-width: 0.5rem;
|
|
128
|
+
20% {
|
|
129
|
+
opacity: 0;
|
|
120
130
|
}
|
|
121
|
-
|
|
122
|
-
|
|
131
|
+
80% {
|
|
132
|
+
max-height: 3rem;
|
|
123
133
|
}
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
0% {
|
|
127
|
-
max-height: 0.1rem;
|
|
128
|
-
opacity: 0;
|
|
129
|
-
}
|
|
130
|
-
20% {
|
|
131
|
-
opacity: 0;
|
|
132
|
-
}
|
|
133
|
-
80% {
|
|
134
|
-
max-height: 3rem;
|
|
135
|
-
}
|
|
136
|
-
100% {
|
|
137
|
-
opacity: 1;
|
|
138
|
-
}
|
|
134
|
+
100% {
|
|
135
|
+
opacity: 1;
|
|
139
136
|
}
|
|
137
|
+
}
|
|
140
138
|
|
|
141
|
-
|
|
139
|
+
@media (max-width: 992px) {
|
|
142
140
|
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
.d2l-file-uploader-browse-files {
|
|
149
|
-
display: inline;
|
|
150
|
-
}
|
|
141
|
+
.d2l-file-uploader-input-container {
|
|
142
|
+
display: block;
|
|
143
|
+
margin-top: 0.8rem;
|
|
144
|
+
}
|
|
151
145
|
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
146
|
+
.d2l-file-uploader-browse-files {
|
|
147
|
+
display: inline;
|
|
148
|
+
}
|
|
155
149
|
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
border-radius: 0.3rem;
|
|
160
|
-
border-style: none;
|
|
161
|
-
color: #ffffff;
|
|
162
|
-
display: inline-block;
|
|
163
|
-
font-size: 0.7rem;
|
|
164
|
-
padding: 0.35rem 1.5rem;
|
|
165
|
-
}
|
|
150
|
+
.d2l-file-uploader-browse {
|
|
151
|
+
display: none;
|
|
152
|
+
}
|
|
166
153
|
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
154
|
+
.d2l-file-uploader-browse-label {
|
|
155
|
+
background-color: var(--d2l-color-celestine);
|
|
156
|
+
border-color: var(--d2l-color-celestine-minus-1);
|
|
157
|
+
border-radius: 0.3rem;
|
|
158
|
+
border-style: none;
|
|
159
|
+
color: #ffffff;
|
|
160
|
+
display: inline-block;
|
|
161
|
+
font-size: 0.7rem;
|
|
162
|
+
padding: 0.35rem 1.5rem;
|
|
163
|
+
}
|
|
176
164
|
|
|
165
|
+
.d2l-file-uploader-browse-label:hover,
|
|
166
|
+
.d2l-file-uploader-browse-label-focus {
|
|
167
|
+
background-color: var(--d2l-color-celestine-minus-1);
|
|
168
|
+
color: #ffffff;
|
|
169
|
+
text-decoration: none;
|
|
177
170
|
}
|
|
178
|
-
|
|
179
|
-
|
|
171
|
+
.d2l-file-uploader-browse-label-focus {
|
|
172
|
+
box-shadow: 0 0 0 2px #ffffff, 0 0 0 4px var(--d2l-color-celestine);
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
}
|
|
176
|
+
`;
|
|
180
177
|
|
|
181
178
|
constructor() {
|
|
182
179
|
super();
|
|
@@ -3,12 +3,11 @@ import { html, LitElement } from 'lit';
|
|
|
3
3
|
import { getUniqueId } from '@brightspace-ui/core/helpers/uniqueId.js';
|
|
4
4
|
|
|
5
5
|
export class D2LGradeResultIconButton extends LitElement {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
}
|
|
6
|
+
|
|
7
|
+
static properties = {
|
|
8
|
+
text: { type: String },
|
|
9
|
+
icon: { type: String },
|
|
10
|
+
};
|
|
12
11
|
|
|
13
12
|
render() {
|
|
14
13
|
return html`
|
|
@@ -8,29 +8,25 @@ import { selectStyles } from '@brightspace-ui/core/components/inputs/input-selec
|
|
|
8
8
|
*/
|
|
9
9
|
export class D2LGradeResultLetterScore extends LocalizeLabsElement(LitElement) {
|
|
10
10
|
|
|
11
|
-
static
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
};
|
|
18
|
-
}
|
|
11
|
+
static properties = {
|
|
12
|
+
availableOptions: { attribute: 'available-options', type: Object },
|
|
13
|
+
label: { type: String },
|
|
14
|
+
selectedOption: { attribute: 'selected-option', type: String },
|
|
15
|
+
readonly: { type: Boolean }
|
|
16
|
+
};
|
|
19
17
|
|
|
20
|
-
static
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
`];
|
|
33
|
-
}
|
|
18
|
+
static styles = [selectStyles, bodyStandardStyles, css`
|
|
19
|
+
.d2l-grade-result-letter-score-container {
|
|
20
|
+
width: 8rem;
|
|
21
|
+
}
|
|
22
|
+
.d2l-grade-result-letter-score-select {
|
|
23
|
+
width: 100%;
|
|
24
|
+
}
|
|
25
|
+
.d2l-grade-result-letter-score-score-read-only {
|
|
26
|
+
height: calc(2rem + 2px);
|
|
27
|
+
line-height: calc(2rem + 2px);
|
|
28
|
+
}
|
|
29
|
+
`];
|
|
34
30
|
|
|
35
31
|
constructor() {
|
|
36
32
|
super();
|
|
@@ -18,35 +18,32 @@ const MIN_POSITIVE_GRADE = 0;
|
|
|
18
18
|
* @fires d2l-grade-result-grade-change - Dispatched on the change of the grade for a gradeType="Numeric" grade.
|
|
19
19
|
*/
|
|
20
20
|
export class D2LGradeResultNumericScore extends LocalizeLabsElement(LitElement) {
|
|
21
|
-
static get properties() {
|
|
22
|
-
return {
|
|
23
|
-
label: { type: String },
|
|
24
|
-
scoreNumerator: { attribute: 'score-numerator', type: Number, converter: numberConverter },
|
|
25
|
-
scoreDenominator: { attribute: 'score-denominator', type: Number },
|
|
26
|
-
readonly: { type: Boolean },
|
|
27
|
-
required: { type: Boolean },
|
|
28
|
-
allowNegativeScore: { attribute: 'allow-negative-score', type: Boolean },
|
|
29
|
-
showFlooredScoreWarning: { attribute: 'show-floored-score-warning', type: Boolean },
|
|
30
|
-
};
|
|
31
|
-
}
|
|
32
21
|
|
|
33
|
-
static
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
22
|
+
static properties = {
|
|
23
|
+
label: { type: String },
|
|
24
|
+
scoreNumerator: { attribute: 'score-numerator', type: Number, converter: numberConverter },
|
|
25
|
+
scoreDenominator: { attribute: 'score-denominator', type: Number },
|
|
26
|
+
readonly: { type: Boolean },
|
|
27
|
+
required: { type: Boolean },
|
|
28
|
+
allowNegativeScore: { attribute: 'allow-negative-score', type: Boolean },
|
|
29
|
+
showFlooredScoreWarning: { attribute: 'show-floored-score-warning', type: Boolean },
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
static styles = [bodyCompactStyles, bodyStandardStyles, css`
|
|
33
|
+
.d2l-grade-result-numeric-score-container {
|
|
34
|
+
align-items: center;
|
|
35
|
+
display: flex;
|
|
36
|
+
flex-direction: row;
|
|
37
|
+
}
|
|
38
|
+
.d2l-grade-result-numeric-score-score-read-only {
|
|
39
|
+
height: calc(2rem + 2px);
|
|
40
|
+
line-height: calc(2rem + 2px);
|
|
41
|
+
max-width: 5.25rem;
|
|
42
|
+
}
|
|
43
|
+
.d2l-grade-result-numeric-score-hint {
|
|
44
|
+
margin: 0 0.3rem;
|
|
45
|
+
}
|
|
46
|
+
`];
|
|
50
47
|
|
|
51
48
|
render() {
|
|
52
49
|
const roundedNumerator = isNaN(this.scoreNumerator) ? '' : Math.round((this.scoreNumerator + Number.EPSILON) * 100) / 100;
|