@brightspace-ui/core 1.197.0 → 1.197.1
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/filter/filter-dimension-set-value.js +3 -0
- package/components/filter/filter-dimension-set.js +5 -1
- package/components/form/form-mixin.js +1 -0
- package/components/form/form-native.js +0 -1
- package/components/form/form.js +0 -1
- package/components/inputs/input-date-range.js +9 -1
- package/components/inputs/input-date-time-range-to.js +3 -0
- package/components/inputs/input-date-time-range.js +10 -1
- package/components/inputs/input-date-time.js +7 -1
- package/components/inputs/input-date.js +7 -1
- package/components/inputs/input-fieldset.js +3 -0
- package/components/inputs/input-time-range.js +10 -1
- package/components/inputs/input-time.js +6 -1
- package/components/link/README.md +1 -1
- package/components/list/README.md +10 -10
- package/custom-elements.json +14 -19
- package/package.json +1 -1
|
@@ -10,14 +10,17 @@ class FilterDimensionSetValue extends LitElement {
|
|
|
10
10
|
return {
|
|
11
11
|
/**
|
|
12
12
|
* REQUIRED: Unique key to represent this value in the dimension
|
|
13
|
+
* @type {string}
|
|
13
14
|
*/
|
|
14
15
|
key: { type: String },
|
|
15
16
|
/**
|
|
16
17
|
* Whether this value in the filter is selected or not
|
|
18
|
+
* @type {boolean}
|
|
17
19
|
*/
|
|
18
20
|
selected: { type: Boolean, reflect: true },
|
|
19
21
|
/**
|
|
20
22
|
* REQUIRED: The text that is displayed for the value
|
|
23
|
+
* @type {string}
|
|
21
24
|
*/
|
|
22
25
|
text: { type: String }
|
|
23
26
|
};
|
|
@@ -4,7 +4,6 @@ import { html, LitElement } from 'lit-element/lit-element.js';
|
|
|
4
4
|
* A component to represent the main filter dimension type - a set of possible values that can be selected.
|
|
5
5
|
* This component does not render anything, but instead gathers data needed for the d2l-filter.
|
|
6
6
|
* @slot - For d2l-filter-dimension-set-value components
|
|
7
|
-
* @fires d2l-filter-dimension-data-change - @ignore
|
|
8
7
|
*/
|
|
9
8
|
class FilterDimensionSet extends LitElement {
|
|
10
9
|
|
|
@@ -12,10 +11,12 @@ class FilterDimensionSet extends LitElement {
|
|
|
12
11
|
return {
|
|
13
12
|
/**
|
|
14
13
|
* REQUIRED: Unique key to represent this dimension in the filter
|
|
14
|
+
* @type {string}
|
|
15
15
|
*/
|
|
16
16
|
key: { type: String },
|
|
17
17
|
/**
|
|
18
18
|
* Whether the values for this dimension are still loading and a loading spinner should be displayed
|
|
19
|
+
* @type {boolean}
|
|
19
20
|
*/
|
|
20
21
|
loading: { type: Boolean },
|
|
21
22
|
/**
|
|
@@ -25,14 +26,17 @@ class FilterDimensionSet extends LitElement {
|
|
|
25
26
|
searchType: { type: String, attribute: 'search-type' },
|
|
26
27
|
/**
|
|
27
28
|
* Adds a select all checkbox and summary for this dimension
|
|
29
|
+
* @type {boolean}
|
|
28
30
|
*/
|
|
29
31
|
selectAll: { type: Boolean, attribute: 'select-all' },
|
|
30
32
|
/**
|
|
31
33
|
* Whether only one value can be selected at a time for this dimension
|
|
34
|
+
* @type {boolean}
|
|
32
35
|
*/
|
|
33
36
|
selectionSingle: { type: Boolean, attribute: 'selection-single' },
|
|
34
37
|
/**
|
|
35
38
|
* REQUIRED: The text that is displayed for the dimension title
|
|
39
|
+
* @type {string}
|
|
36
40
|
*/
|
|
37
41
|
text: { type: String }
|
|
38
42
|
};
|
|
@@ -106,6 +106,7 @@ export const FormMixin = superclass => class extends LocalizeCoreElement(supercl
|
|
|
106
106
|
|
|
107
107
|
if ((isNativeFormElement(ele) || isCustomFormElement(ele)) && e.type !== 'focusout') {
|
|
108
108
|
this._dirty = true;
|
|
109
|
+
/** Dispatched whenever any form element fires an `input` or `change` event. Can be used to track whether the form is dirty or not. */
|
|
109
110
|
this.dispatchEvent(new CustomEvent('d2l-form-dirty'));
|
|
110
111
|
}
|
|
111
112
|
|
|
@@ -8,7 +8,6 @@ import { getUniqueId } from '../../helpers/uniqueId.js';
|
|
|
8
8
|
* These interactive controls are submitted using a native HTML form submission.
|
|
9
9
|
* @slot - The native and custom form elements that participate in validation and submission
|
|
10
10
|
* @fires submit - Dispatched when the form is submitted. Cancelling this event will prevent form submission.
|
|
11
|
-
* @fires d2l-form-dirty - Dispatched whenever any form element fires an `input` or `change` event. Can be used to track whether the form is dirty or not.
|
|
12
11
|
*/
|
|
13
12
|
class FormNative extends FormMixin(LitElement) {
|
|
14
13
|
|
package/components/form/form.js
CHANGED
|
@@ -6,7 +6,6 @@ import { FormMixin } from './form-mixin.js';
|
|
|
6
6
|
* A component that can be used to build sections containing interactive controls that are validated and submitted as a group.
|
|
7
7
|
* Values of these interactive controls are aggregated but the user is responsible for handling submission via the @d2l-form-submit event.
|
|
8
8
|
* @slot - The native and custom form elements that participate in validation and submission
|
|
9
|
-
* @fires d2l-form-dirty - Dispatched whenever any form element fires an `input` or `change` event. Can be used to track whether the form is dirty or not.
|
|
10
9
|
*/
|
|
11
10
|
class Form extends FormMixin(LitElement) {
|
|
12
11
|
|
|
@@ -28,7 +28,7 @@ export function getShiftedEndDate(startValue, endValue, prevStartValue, inclusiv
|
|
|
28
28
|
|
|
29
29
|
/**
|
|
30
30
|
* A component consisting of two input-date components - one for start of range and one for end of range. Values specified for these components (through start-value and/or end-value attributes) should be localized to the user's timezone if applicable and must be in ISO 8601 calendar date format ("YYYY-MM-DD").
|
|
31
|
-
* @fires change - Dispatched when there is a change to selected start date or selected end date.
|
|
31
|
+
* @fires change - Dispatched when there is a change to selected start date or selected end date. `start-value` and `end-value` correspond to the selected values and are formatted in ISO 8601 calendar date format (`YYYY-MM-DD`).
|
|
32
32
|
*/
|
|
33
33
|
class InputDateRange extends SkeletonMixin(FormElementMixin(RtlMixin(LocalizeCoreElement(LitElement)))) {
|
|
34
34
|
|
|
@@ -36,14 +36,17 @@ class InputDateRange extends SkeletonMixin(FormElementMixin(RtlMixin(LocalizeCor
|
|
|
36
36
|
return {
|
|
37
37
|
/**
|
|
38
38
|
* Automatically shifts end date when start date changes to keep same range
|
|
39
|
+
* @type {boolean}
|
|
39
40
|
*/
|
|
40
41
|
autoShiftDates: { attribute: 'auto-shift-dates', reflect: true, type: Boolean },
|
|
41
42
|
/**
|
|
42
43
|
* Hides the start and end labels visually
|
|
44
|
+
* @type {boolean}
|
|
43
45
|
*/
|
|
44
46
|
childLabelsHidden: { attribute: 'child-labels-hidden', reflect: true, type: Boolean },
|
|
45
47
|
/**
|
|
46
48
|
* Disables the inputs
|
|
49
|
+
* @type {boolean}
|
|
47
50
|
*/
|
|
48
51
|
disabled: { type: Boolean, reflect: true },
|
|
49
52
|
/**
|
|
@@ -54,6 +57,7 @@ class InputDateRange extends SkeletonMixin(FormElementMixin(RtlMixin(LocalizeCor
|
|
|
54
57
|
endLabel: { attribute: 'end-label', reflect: true, type: String },
|
|
55
58
|
/**
|
|
56
59
|
* Indicates if the end calendar dropdown is open
|
|
60
|
+
* @type {boolean}
|
|
57
61
|
*/
|
|
58
62
|
endOpened: { attribute: 'end-opened', type: Boolean },
|
|
59
63
|
/**
|
|
@@ -63,6 +67,7 @@ class InputDateRange extends SkeletonMixin(FormElementMixin(RtlMixin(LocalizeCor
|
|
|
63
67
|
endValue: { attribute: 'end-value', reflect: true, type: String },
|
|
64
68
|
/**
|
|
65
69
|
* Validates on inclusive range (i.e., it is valid for start and end dates to be equal)
|
|
70
|
+
* @type {boolean}
|
|
66
71
|
*/
|
|
67
72
|
inclusiveDateRange: { attribute: 'inclusive-date-range', reflect: true, type: Boolean },
|
|
68
73
|
/**
|
|
@@ -72,6 +77,7 @@ class InputDateRange extends SkeletonMixin(FormElementMixin(RtlMixin(LocalizeCor
|
|
|
72
77
|
label: { type: String, reflect: true },
|
|
73
78
|
/**
|
|
74
79
|
* Hides the fieldset label visually
|
|
80
|
+
* @type {boolean}
|
|
75
81
|
*/
|
|
76
82
|
labelHidden: { type: Boolean, attribute: 'label-hidden', reflect: true },
|
|
77
83
|
/**
|
|
@@ -86,6 +92,7 @@ class InputDateRange extends SkeletonMixin(FormElementMixin(RtlMixin(LocalizeCor
|
|
|
86
92
|
minValue: { attribute: 'min-value', reflect: true, type: String },
|
|
87
93
|
/**
|
|
88
94
|
* Indicates that values are required
|
|
95
|
+
* @type {boolean}
|
|
89
96
|
*/
|
|
90
97
|
required: { type: Boolean, reflect: true },
|
|
91
98
|
/**
|
|
@@ -96,6 +103,7 @@ class InputDateRange extends SkeletonMixin(FormElementMixin(RtlMixin(LocalizeCor
|
|
|
96
103
|
startLabel: { attribute: 'start-label', reflect: true, type: String },
|
|
97
104
|
/**
|
|
98
105
|
* Indicates if the start calendar dropdown is open
|
|
106
|
+
* @type {boolean}
|
|
99
107
|
*/
|
|
100
108
|
startOpened: { attribute: 'start-opened', type: Boolean },
|
|
101
109
|
/**
|
|
@@ -12,14 +12,17 @@ class InputDateTimeRangeTo extends SkeletonMixin(LocalizeCoreElement(LitElement)
|
|
|
12
12
|
return {
|
|
13
13
|
/**
|
|
14
14
|
* Force block (stacked) range display if true
|
|
15
|
+
* @type {boolean}
|
|
15
16
|
*/
|
|
16
17
|
blockDisplay: { attribute: 'block-display', type: Boolean },
|
|
17
18
|
/**
|
|
18
19
|
* Display localized "to" between the left and right slot contents
|
|
20
|
+
* @type {boolean}
|
|
19
21
|
*/
|
|
20
22
|
displayTo: { attribute: 'display-to', type: Boolean },
|
|
21
23
|
/**
|
|
22
24
|
* Add margin-top for case where there would be a label above the range
|
|
25
|
+
* @type {boolean}
|
|
23
26
|
*/
|
|
24
27
|
topMargin: { attribute: 'top-margin', type: Boolean },
|
|
25
28
|
_blockDisplay: { attribute: false, type: Boolean }
|
|
@@ -59,9 +59,9 @@ export function getShiftedEndDateTime(startValue, endValue, prevStartValue, incl
|
|
|
59
59
|
|
|
60
60
|
/**
|
|
61
61
|
* A component consisting of two input-date-time components - one for start of range and one for end of range. The time input only appears once a date is selected.
|
|
62
|
-
* @fires change - Dispatched when there is a change to selected start date-time or selected end date-time. "start-value" and "end-value" correspond to the selected values and are formatted in ISO 8601 combined date and time format ("YYYY-MM-DDTHH:mm:ss.sssZ").
|
|
63
62
|
* @slot start - Optional content that would appear below the start input-date-time
|
|
64
63
|
* @slot end - Optional content that would appear below the end input-date-time
|
|
64
|
+
* @fires change - Dispatched when there is a change to selected start date-time or selected end date-time. `start-value` and `end-value` correspond to the selected values and are formatted in ISO 8601 combined date and time format (`YYYY-MM-DDTHH:mm:ss.sssZ`).
|
|
65
65
|
*/
|
|
66
66
|
class InputDateTimeRange extends SkeletonMixin(FormElementMixin(RtlMixin(LocalizeCoreElement(LitElement)))) {
|
|
67
67
|
|
|
@@ -69,14 +69,17 @@ class InputDateTimeRange extends SkeletonMixin(FormElementMixin(RtlMixin(Localiz
|
|
|
69
69
|
return {
|
|
70
70
|
/**
|
|
71
71
|
* Automatically shifts end date when start date changes to keep same range. If start and end date are equal, automatically shifts end time when start time changes.
|
|
72
|
+
* @type {boolean}
|
|
72
73
|
*/
|
|
73
74
|
autoShiftDates: { attribute: 'auto-shift-dates', reflect: true, type: Boolean },
|
|
74
75
|
/**
|
|
75
76
|
* Hides the start and end labels visually
|
|
77
|
+
* @type {boolean}
|
|
76
78
|
*/
|
|
77
79
|
childLabelsHidden: { attribute: 'child-labels-hidden', reflect: true, type: Boolean },
|
|
78
80
|
/**
|
|
79
81
|
* Disables the inputs
|
|
82
|
+
* @type {boolean}
|
|
80
83
|
*/
|
|
81
84
|
disabled: { type: Boolean, reflect: true },
|
|
82
85
|
/**
|
|
@@ -87,6 +90,7 @@ class InputDateTimeRange extends SkeletonMixin(FormElementMixin(RtlMixin(Localiz
|
|
|
87
90
|
endLabel: { attribute: 'end-label', reflect: true, type: String },
|
|
88
91
|
/**
|
|
89
92
|
* Indicates if the end date or time dropdown is open
|
|
93
|
+
* @type {boolean}
|
|
90
94
|
*/
|
|
91
95
|
endOpened: { attribute: 'end-opened', type: Boolean },
|
|
92
96
|
/**
|
|
@@ -96,6 +100,7 @@ class InputDateTimeRange extends SkeletonMixin(FormElementMixin(RtlMixin(Localiz
|
|
|
96
100
|
endValue: { attribute: 'end-value', reflect: true, type: String },
|
|
97
101
|
/**
|
|
98
102
|
* Validates on inclusive range (i.e., it is valid for start and end date-times to be equal)
|
|
103
|
+
* @type {boolean}
|
|
99
104
|
*/
|
|
100
105
|
inclusiveDateRange: { attribute: 'inclusive-date-range', reflect: true, type: Boolean },
|
|
101
106
|
/**
|
|
@@ -105,10 +110,12 @@ class InputDateTimeRange extends SkeletonMixin(FormElementMixin(RtlMixin(Localiz
|
|
|
105
110
|
label: { type: String, reflect: true },
|
|
106
111
|
/**
|
|
107
112
|
* Hides the fieldset label visually
|
|
113
|
+
* @type {boolean}
|
|
108
114
|
*/
|
|
109
115
|
labelHidden: { type: Boolean, attribute: 'label-hidden', reflect: true },
|
|
110
116
|
/**
|
|
111
117
|
* Indicates that localization will be handled by the consumer. `*value` will not be converted from/to UTC.
|
|
118
|
+
* @type {boolean}
|
|
112
119
|
*/
|
|
113
120
|
localized: { reflect: true, type: Boolean },
|
|
114
121
|
/**
|
|
@@ -123,6 +130,7 @@ class InputDateTimeRange extends SkeletonMixin(FormElementMixin(RtlMixin(Localiz
|
|
|
123
130
|
minValue: { attribute: 'min-value', reflect: true, type: String },
|
|
124
131
|
/**
|
|
125
132
|
* Indicates that values are required
|
|
133
|
+
* @type {boolean}
|
|
126
134
|
*/
|
|
127
135
|
required: { type: Boolean, reflect: true },
|
|
128
136
|
/**
|
|
@@ -133,6 +141,7 @@ class InputDateTimeRange extends SkeletonMixin(FormElementMixin(RtlMixin(Localiz
|
|
|
133
141
|
startLabel: { attribute: 'start-label', reflect: true, type: String },
|
|
134
142
|
/**
|
|
135
143
|
* Indicates if the start date or time dropdown is open
|
|
144
|
+
* @type {boolean}
|
|
136
145
|
*/
|
|
137
146
|
startOpened: { attribute: 'start-opened', type: Boolean },
|
|
138
147
|
/**
|
|
@@ -37,7 +37,7 @@ function _getFormattedDefaultTime(defaultValue) {
|
|
|
37
37
|
|
|
38
38
|
/**
|
|
39
39
|
* A component that consists of a "<d2l-input-date>" and a "<d2l-input-time>" component. The time input only appears once a date is selected. This component displays the "value" if one is specified, and reflects the selected value when one is selected or entered.
|
|
40
|
-
* @fires change - Dispatched when there is a change to selected date or selected time.
|
|
40
|
+
* @fires change - Dispatched when there is a change to selected date or selected time. `value` corresponds to the selected value and is formatted in ISO 8601 combined date and time format (`YYYY-MM-DDTHH:mm:ss.sssZ`).
|
|
41
41
|
*/
|
|
42
42
|
class InputDateTime extends LabelledMixin(SkeletonMixin(FormElementMixin(LocalizeCoreElement(RtlMixin(LitElement))))) {
|
|
43
43
|
|
|
@@ -45,14 +45,17 @@ class InputDateTime extends LabelledMixin(SkeletonMixin(FormElementMixin(Localiz
|
|
|
45
45
|
return {
|
|
46
46
|
/**
|
|
47
47
|
* Disables the input
|
|
48
|
+
* @type {boolean}
|
|
48
49
|
*/
|
|
49
50
|
disabled: { type: Boolean },
|
|
50
51
|
/**
|
|
51
52
|
* Hides the fieldset label visually
|
|
53
|
+
* @type {boolean}
|
|
52
54
|
*/
|
|
53
55
|
labelHidden: { attribute: 'label-hidden', reflect: true, type: Boolean },
|
|
54
56
|
/**
|
|
55
57
|
* Indicates that localization will be handled by the consumer. `*value` will not be converted from/to UTC.
|
|
58
|
+
* @type {boolean}
|
|
56
59
|
*/
|
|
57
60
|
localized: { reflect: true, type: Boolean },
|
|
58
61
|
/**
|
|
@@ -67,10 +70,12 @@ class InputDateTime extends LabelledMixin(SkeletonMixin(FormElementMixin(Localiz
|
|
|
67
70
|
minValue: { attribute: 'min-value', reflect: true, type: String },
|
|
68
71
|
/**
|
|
69
72
|
* Indicates if the date or time dropdown is open
|
|
73
|
+
* @type {boolean}
|
|
70
74
|
*/
|
|
71
75
|
opened: { type: Boolean },
|
|
72
76
|
/**
|
|
73
77
|
* Indicates that a value is required
|
|
78
|
+
* @type {boolean}
|
|
74
79
|
*/
|
|
75
80
|
required: { type: Boolean, reflect: true },
|
|
76
81
|
/**
|
|
@@ -80,6 +85,7 @@ class InputDateTime extends LabelledMixin(SkeletonMixin(FormElementMixin(Localiz
|
|
|
80
85
|
timeDefaultValue: { attribute: 'time-default-value', reflect: true, type: String },
|
|
81
86
|
/**
|
|
82
87
|
* Value of the input
|
|
88
|
+
* @type {string}
|
|
83
89
|
*/
|
|
84
90
|
value: { type: String },
|
|
85
91
|
_maxValueLocalized: { type: String },
|
|
@@ -25,7 +25,7 @@ export function formatISODateInUserCalDescriptor(val) {
|
|
|
25
25
|
|
|
26
26
|
/**
|
|
27
27
|
* A component that consists of a text input field for typing a date and an attached calendar (d2l-calendar) dropdown. It displays the "value" if one is specified, or a placeholder if not, and reflects the selected value when one is selected in the calendar or entered in the text input.
|
|
28
|
-
* @fires change - Dispatched when there is a change to selected date.
|
|
28
|
+
* @fires change - Dispatched when there is a change to selected date. `value` corresponds to the selected value and is formatted in ISO 8601 calendar date format (`YYYY-MM-DD`).
|
|
29
29
|
*/
|
|
30
30
|
class InputDate extends LabelledMixin(SkeletonMixin(FormElementMixin(LocalizeCoreElement(LitElement)))) {
|
|
31
31
|
|
|
@@ -33,14 +33,17 @@ class InputDate extends LabelledMixin(SkeletonMixin(FormElementMixin(LocalizeCor
|
|
|
33
33
|
return {
|
|
34
34
|
/**
|
|
35
35
|
* Disables the input
|
|
36
|
+
* @type {boolean}
|
|
36
37
|
*/
|
|
37
38
|
disabled: { type: Boolean },
|
|
38
39
|
/**
|
|
39
40
|
* Text that appears as a placeholder in the input to reassure users that they can choose not to provide a value (usually not necessary)
|
|
41
|
+
* @type {string}
|
|
40
42
|
*/
|
|
41
43
|
emptyText: { type: String, attribute: 'empty-text' },
|
|
42
44
|
/**
|
|
43
45
|
* Hides the label visually (moves it to the input's "aria-label" attribute)
|
|
46
|
+
* @type {boolean}
|
|
44
47
|
*/
|
|
45
48
|
labelHidden: { type: Boolean, attribute: 'label-hidden' },
|
|
46
49
|
/**
|
|
@@ -60,14 +63,17 @@ class InputDate extends LabelledMixin(SkeletonMixin(FormElementMixin(LocalizeCor
|
|
|
60
63
|
noValidateMinMax: { attribute: 'novalidateminmax', type: Boolean },
|
|
61
64
|
/**
|
|
62
65
|
* Indicates if the calendar dropdown is open
|
|
66
|
+
* @type {boolean}
|
|
63
67
|
*/
|
|
64
68
|
opened: { type: Boolean, reflect: true },
|
|
65
69
|
/**
|
|
66
70
|
* Indicates that a value is required
|
|
71
|
+
* @type {boolean}
|
|
67
72
|
*/
|
|
68
73
|
required: { type: Boolean, reflect: true },
|
|
69
74
|
/**
|
|
70
75
|
* Value of the input
|
|
76
|
+
* @type {string}
|
|
71
77
|
*/
|
|
72
78
|
value: { type: String },
|
|
73
79
|
_hiddenCalendarHeight: { type: Number },
|
|
@@ -15,14 +15,17 @@ class InputFieldset extends SkeletonMixin(RtlMixin(LitElement)) {
|
|
|
15
15
|
return {
|
|
16
16
|
/**
|
|
17
17
|
* REQUIRED: Label for the fieldset
|
|
18
|
+
* @type {string}
|
|
18
19
|
*/
|
|
19
20
|
label: { type: String },
|
|
20
21
|
/**
|
|
21
22
|
* Hides the label visually
|
|
23
|
+
* @type {boolean}
|
|
22
24
|
*/
|
|
23
25
|
labelHidden: { type: Boolean, attribute: 'label-hidden', reflect: true },
|
|
24
26
|
/**
|
|
25
27
|
* Indicates that a value is required for inputs in the fieldset
|
|
28
|
+
* @type {boolean}
|
|
26
29
|
*/
|
|
27
30
|
required: { type: Boolean, reflect: true }
|
|
28
31
|
};
|
|
@@ -35,7 +35,7 @@ function getValidISOTimeAtInterval(val, timeInterval) {
|
|
|
35
35
|
|
|
36
36
|
/**
|
|
37
37
|
* A component consisting of two input-time components - one for start of range and one for end of range. Values specified for these components (through start-value and/or end-value attributes) should be localized to the user's timezone if applicable and must be in ISO 8601 time format ("hh:mm:ss").
|
|
38
|
-
* @fires change - Dispatched when there is a change to selected start time or selected end time.
|
|
38
|
+
* @fires change - Dispatched when there is a change to selected start time or selected end time. `start-value` and `end-value` correspond to the selected values and are formatted in ISO 8601 calendar time format (`hh:mm:ss`).
|
|
39
39
|
*/
|
|
40
40
|
|
|
41
41
|
class InputTimeRange extends SkeletonMixin(FormElementMixin(RtlMixin(LocalizeCoreElement(LitElement)))) {
|
|
@@ -44,14 +44,17 @@ class InputTimeRange extends SkeletonMixin(FormElementMixin(RtlMixin(LocalizeCor
|
|
|
44
44
|
return {
|
|
45
45
|
/**
|
|
46
46
|
* Automatically shifts end time when start time changes to keep same range
|
|
47
|
+
* @type {boolean}
|
|
47
48
|
*/
|
|
48
49
|
autoShiftTimes: { attribute: 'auto-shift-times', reflect: true, type: Boolean },
|
|
49
50
|
/**
|
|
50
51
|
* Hides the start and end labels visually
|
|
52
|
+
* @type {boolean}
|
|
51
53
|
*/
|
|
52
54
|
childLabelsHidden: { attribute: 'child-labels-hidden', reflect: true, type: Boolean },
|
|
53
55
|
/**
|
|
54
56
|
* Disables the inputs
|
|
57
|
+
* @type {boolean}
|
|
55
58
|
*/
|
|
56
59
|
disabled: { type: Boolean, reflect: true },
|
|
57
60
|
/**
|
|
@@ -62,6 +65,7 @@ class InputTimeRange extends SkeletonMixin(FormElementMixin(RtlMixin(LocalizeCor
|
|
|
62
65
|
endLabel: { attribute: 'end-label', reflect: true, type: String },
|
|
63
66
|
/**
|
|
64
67
|
* Indicates if the end dropdown is open
|
|
68
|
+
* @type {boolean}
|
|
65
69
|
*/
|
|
66
70
|
endOpened: { attribute: 'end-opened', type: Boolean },
|
|
67
71
|
/**
|
|
@@ -71,10 +75,12 @@ class InputTimeRange extends SkeletonMixin(FormElementMixin(RtlMixin(LocalizeCor
|
|
|
71
75
|
endValue: { attribute: 'end-value', reflect: true, type: String },
|
|
72
76
|
/**
|
|
73
77
|
* Rounds typed input up to nearest valid interval time (specified with "time-interval")
|
|
78
|
+
* @type {boolean}
|
|
74
79
|
*/
|
|
75
80
|
enforceTimeIntervals: { attribute: 'enforce-time-intervals', reflect: true, type: Boolean },
|
|
76
81
|
/**
|
|
77
82
|
* Validates on inclusive range (i.e., it is valid for start and end times to be equal)
|
|
83
|
+
* @type {boolean}
|
|
78
84
|
*/
|
|
79
85
|
inclusiveTimeRange: { attribute: 'inclusive-time-range', reflect: true, type: Boolean },
|
|
80
86
|
/**
|
|
@@ -84,10 +90,12 @@ class InputTimeRange extends SkeletonMixin(FormElementMixin(RtlMixin(LocalizeCor
|
|
|
84
90
|
label: { type: String, reflect: true },
|
|
85
91
|
/**
|
|
86
92
|
* Hides the fieldset label visually
|
|
93
|
+
* @type {boolean}
|
|
87
94
|
*/
|
|
88
95
|
labelHidden: { attribute: 'label-hidden', reflect: true, type: Boolean },
|
|
89
96
|
/**
|
|
90
97
|
* Indicates that values are required
|
|
98
|
+
* @type {boolean}
|
|
91
99
|
*/
|
|
92
100
|
required: { type: Boolean, reflect: true },
|
|
93
101
|
/**
|
|
@@ -98,6 +106,7 @@ class InputTimeRange extends SkeletonMixin(FormElementMixin(RtlMixin(LocalizeCor
|
|
|
98
106
|
startLabel: { attribute: 'start-label', reflect: true, type: String },
|
|
99
107
|
/**
|
|
100
108
|
* Indicates if the start dropdown is open
|
|
109
|
+
* @type {boolean}
|
|
101
110
|
*/
|
|
102
111
|
startOpened: { attribute: 'start-opened', type: Boolean },
|
|
103
112
|
/**
|
|
@@ -109,7 +109,7 @@ function initIntervals(size, enforceTimeIntervals) {
|
|
|
109
109
|
|
|
110
110
|
/**
|
|
111
111
|
* 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.
|
|
112
|
-
* @fires change - Dispatched when there is a change to selected time.
|
|
112
|
+
* @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`).
|
|
113
113
|
*/
|
|
114
114
|
class InputTime extends LabelledMixin(SkeletonMixin(FormElementMixin(LitElement))) {
|
|
115
115
|
|
|
@@ -122,14 +122,17 @@ class InputTime extends LabelledMixin(SkeletonMixin(FormElementMixin(LitElement)
|
|
|
122
122
|
defaultValue: { type: String, attribute: 'default-value' },
|
|
123
123
|
/**
|
|
124
124
|
* Disables the input
|
|
125
|
+
* @type {boolean}
|
|
125
126
|
*/
|
|
126
127
|
disabled: { type: Boolean },
|
|
127
128
|
/**
|
|
128
129
|
* Rounds typed input up to nearest valid interval time (specified with "time-interval")
|
|
130
|
+
* @type {boolean}
|
|
129
131
|
*/
|
|
130
132
|
enforceTimeIntervals: { type: Boolean, attribute: 'enforce-time-intervals' },
|
|
131
133
|
/**
|
|
132
134
|
* Hides the label visually (moves it to the input's "aria-label" attribute)
|
|
135
|
+
* @type {boolean}
|
|
133
136
|
*/
|
|
134
137
|
labelHidden: { type: Boolean, attribute: 'label-hidden' },
|
|
135
138
|
/**
|
|
@@ -139,10 +142,12 @@ class InputTime extends LabelledMixin(SkeletonMixin(FormElementMixin(LitElement)
|
|
|
139
142
|
maxHeight: { type: Number, attribute: 'max-height' },
|
|
140
143
|
/**
|
|
141
144
|
* Indicates if the dropdown is open
|
|
145
|
+
* @type {boolean}
|
|
142
146
|
*/
|
|
143
147
|
opened: { type: Boolean },
|
|
144
148
|
/**
|
|
145
149
|
* Indicates that a value is required
|
|
150
|
+
* @type {boolean}
|
|
146
151
|
*/
|
|
147
152
|
required: { type: Boolean, reflect: true },
|
|
148
153
|
/**
|
|
@@ -69,7 +69,7 @@ To make your usage of `d2l-link` accessible, use the following property when app
|
|
|
69
69
|
|--|--|
|
|
70
70
|
| `aria-label` | Use when text in link does not provide enough context. |
|
|
71
71
|
|
|
72
|
-
## Applying link styles to native
|
|
72
|
+
## Applying link styles to native anchor elements
|
|
73
73
|
|
|
74
74
|
Alternately, you can apply link styles to a native `<a>` element by importing the styles and placing the `d2l-link` CSS class on the element.
|
|
75
75
|
|
|
@@ -15,13 +15,13 @@ A list displays a collection of objects of the same type. A list is primarily us
|
|
|
15
15
|
</script>
|
|
16
16
|
|
|
17
17
|
<d2l-list style="width: 100%">
|
|
18
|
-
<d2l-list-item>
|
|
18
|
+
<d2l-list-item label="List Item 1">
|
|
19
19
|
<d2l-list-item-content>
|
|
20
20
|
<div>Regular list item</div>
|
|
21
21
|
<div slot="secondary">Secondary information</div>
|
|
22
22
|
</d2l-list-item-content>
|
|
23
23
|
</d2l-list-item>
|
|
24
|
-
<d2l-list-item href="http://www.d2l.com" key="1">
|
|
24
|
+
<d2l-list-item href="http://www.d2l.com" key="1" label="List Item 2">
|
|
25
25
|
<img slot="illustration" src="https://s.brightspace.com/course-images/images/38e839b1-37fa-470c-8830-b189ce4ae134/tile-high-density-max-size.jpg" />
|
|
26
26
|
<d2l-list-item-content>
|
|
27
27
|
<div>More exciting list item</div>
|
|
@@ -38,7 +38,7 @@ A list displays a collection of objects of the same type. A list is primarily us
|
|
|
38
38
|
</d2l-dropdown-more>
|
|
39
39
|
</div>
|
|
40
40
|
</d2l-list-item>
|
|
41
|
-
<d2l-list-item href="http://www.d2l.com" selectable key="2" selected>
|
|
41
|
+
<d2l-list-item href="http://www.d2l.com" selectable key="2" selected label="List Item 3">
|
|
42
42
|
<img slot="illustration" src="https://s.brightspace.com/course-images/images/63b162ab-b582-4bf9-8c1d-1dad04714121/tile-high-density-max-size.jpg">
|
|
43
43
|
<d2l-list-item-content>
|
|
44
44
|
<div>Selectable list item (selected)</div>
|
|
@@ -115,14 +115,14 @@ The `d2l-list` is the container to create a styled list of items using `d2l-list
|
|
|
115
115
|
</script>
|
|
116
116
|
|
|
117
117
|
<d2l-list style="width: 100%">
|
|
118
|
-
<d2l-list-item selectable>
|
|
118
|
+
<d2l-list-item selectable label="List Item 1">
|
|
119
119
|
<d2l-list-item-content>
|
|
120
120
|
<div>Regular list item</div>
|
|
121
121
|
<div slot="secondary">Secondary information</div>
|
|
122
122
|
<div slot="supporting-info">Supporting information</div>
|
|
123
123
|
</d2l-list-item-content>
|
|
124
124
|
</d2l-list-item>
|
|
125
|
-
<d2l-list-item selectable>
|
|
125
|
+
<d2l-list-item selectable label="List Item 2">
|
|
126
126
|
<d2l-list-item-content>
|
|
127
127
|
<div>Regular list item 2</div>
|
|
128
128
|
<div slot="secondary">Secondary information</div>
|
|
@@ -245,7 +245,7 @@ Here is a simple component example that adds drag 'n' drop to a list:
|
|
|
245
245
|
render() {
|
|
246
246
|
const listItems = this.list.map((item) => {
|
|
247
247
|
return html`
|
|
248
|
-
<d2l-list-item draggable key="${item.key}">
|
|
248
|
+
<d2l-list-item draggable key="${item.key}" label="Draggable List Item">
|
|
249
249
|
<d2l-list-item-content>
|
|
250
250
|
${item.content}
|
|
251
251
|
<div slot="secondary">Secondary information</div>
|
|
@@ -300,7 +300,7 @@ The `d2l-list-header` component can be placed in the `d2l-list`'s `header` slot
|
|
|
300
300
|
<div slot="supporting-info">Supporting information</div>
|
|
301
301
|
</d2l-list-item-content>
|
|
302
302
|
</d2l-list-item>
|
|
303
|
-
<d2l-list-item selectable key="ast" label="
|
|
303
|
+
<d2l-list-item selectable key="ast" label="Astronomy">
|
|
304
304
|
<d2l-list-item-content>
|
|
305
305
|
<div>Astronomy</div>
|
|
306
306
|
<div slot="supporting-info">Supporting information</div>
|
|
@@ -335,7 +335,7 @@ The `d2l-list-item` provides the appropriate `listitem` semantics for children w
|
|
|
335
335
|
</script>
|
|
336
336
|
|
|
337
337
|
<d2l-list>
|
|
338
|
-
<d2l-list-item href="http://www.d2l.com" selectable key="3">
|
|
338
|
+
<d2l-list-item href="http://www.d2l.com" selectable key="3" label="Geomorphology and GIS">
|
|
339
339
|
<img slot="illustration" src="https://s.brightspace.com/course-images/images/63b162ab-b582-4bf9-8c1d-1dad04714121/tile-high-density-max-size.jpg" />
|
|
340
340
|
<d2l-list-item-content>
|
|
341
341
|
<div>Geomorphology and GIS </div>
|
|
@@ -433,7 +433,7 @@ The `d2l-list-item-button` provides the same functionality as `d2l-list-item` ex
|
|
|
433
433
|
</script>
|
|
434
434
|
|
|
435
435
|
<d2l-list style="width: 100%">
|
|
436
|
-
<d2l-list-item-button href="http://www.d2l.com" selectable key="1">
|
|
436
|
+
<d2l-list-item-button href="http://www.d2l.com" selectable key="1" label="Geomorphology and GIS">
|
|
437
437
|
<d2l-list-item-content>
|
|
438
438
|
<div>Geomorphology and GIS </div>
|
|
439
439
|
<div slot="supporting-info">This course explores the geological processes of the Earth's interior and surface. These include volcanism, earthquakes, mountain...</div>
|
|
@@ -465,7 +465,7 @@ The `d2l-list-item-content` provides additional consistent layout for primary an
|
|
|
465
465
|
</script>
|
|
466
466
|
|
|
467
467
|
<d2l-list style="width: 100%">
|
|
468
|
-
<d2l-list-item>
|
|
468
|
+
<d2l-list-item label="List Item 1">
|
|
469
469
|
<d2l-list-item-content>
|
|
470
470
|
<div>Item 1</div>
|
|
471
471
|
<div slot="secondary">Secondary Info for item 1</div>
|
package/custom-elements.json
CHANGED
|
@@ -2961,11 +2961,6 @@
|
|
|
2961
2961
|
"default": "\"\""
|
|
2962
2962
|
}
|
|
2963
2963
|
],
|
|
2964
|
-
"events": [
|
|
2965
|
-
{
|
|
2966
|
-
"name": "d2l-filter-dimension-data-change"
|
|
2967
|
-
}
|
|
2968
|
-
],
|
|
2969
2964
|
"slots": [
|
|
2970
2965
|
{
|
|
2971
2966
|
"name": "",
|
|
@@ -3161,13 +3156,13 @@
|
|
|
3161
3156
|
"name": "submit",
|
|
3162
3157
|
"description": "Dispatched when the form is submitted. Cancelling this event will prevent form submission."
|
|
3163
3158
|
},
|
|
3164
|
-
{
|
|
3165
|
-
"name": "d2l-form-dirty",
|
|
3166
|
-
"description": "Dispatched whenever any form element fires an `input` or `change` event. Can be used to track whether the form is dirty or not."
|
|
3167
|
-
},
|
|
3168
3159
|
{
|
|
3169
3160
|
"name": "formdata",
|
|
3170
3161
|
"description": "Dispatched after the entry list representing the form's data is constructed. This happens when the form is submitted just prior to submission. The form data can be obtained from the `detail`'s `formData` property."
|
|
3162
|
+
},
|
|
3163
|
+
{
|
|
3164
|
+
"name": "d2l-form-dirty",
|
|
3165
|
+
"description": "Dispatched whenever any form element fires an `input` or `change` event. Can be used to track whether the form is dirty or not."
|
|
3171
3166
|
}
|
|
3172
3167
|
],
|
|
3173
3168
|
"slots": [
|
|
@@ -3210,10 +3205,6 @@
|
|
|
3210
3205
|
}
|
|
3211
3206
|
],
|
|
3212
3207
|
"events": [
|
|
3213
|
-
{
|
|
3214
|
-
"name": "d2l-form-dirty",
|
|
3215
|
-
"description": "Dispatched whenever any form element fires an `input` or `change` event. Can be used to track whether the form is dirty or not."
|
|
3216
|
-
},
|
|
3217
3208
|
{
|
|
3218
3209
|
"name": "d2l-form-invalid",
|
|
3219
3210
|
"description": "Dispatched when the form fails validation. The error map can be obtained from the `detail`'s `errors` property."
|
|
@@ -3221,6 +3212,10 @@
|
|
|
3221
3212
|
{
|
|
3222
3213
|
"name": "d2l-form-submit",
|
|
3223
3214
|
"description": "Dispatched when the form is submitted. The form data can be obtained from the `detail`'s `formData` property."
|
|
3215
|
+
},
|
|
3216
|
+
{
|
|
3217
|
+
"name": "d2l-form-dirty",
|
|
3218
|
+
"description": "Dispatched whenever any form element fires an `input` or `change` event. Can be used to track whether the form is dirty or not."
|
|
3224
3219
|
}
|
|
3225
3220
|
],
|
|
3226
3221
|
"slots": [
|
|
@@ -3816,7 +3811,7 @@
|
|
|
3816
3811
|
"events": [
|
|
3817
3812
|
{
|
|
3818
3813
|
"name": "change",
|
|
3819
|
-
"description": "Dispatched when there is a change to selected start date or selected end date.
|
|
3814
|
+
"description": "Dispatched when there is a change to selected start date or selected end date. `start-value` and `end-value` correspond to the selected values and are formatted in ISO 8601 calendar date format (`YYYY-MM-DD`)."
|
|
3820
3815
|
}
|
|
3821
3816
|
]
|
|
3822
3817
|
},
|
|
@@ -4102,7 +4097,7 @@
|
|
|
4102
4097
|
"events": [
|
|
4103
4098
|
{
|
|
4104
4099
|
"name": "change",
|
|
4105
|
-
"description": "Dispatched when there is a change to selected start date-time or selected end date-time.
|
|
4100
|
+
"description": "Dispatched when there is a change to selected start date-time or selected end date-time. `start-value` and `end-value` correspond to the selected values and are formatted in ISO 8601 combined date and time format (`YYYY-MM-DDTHH:mm:ss.sssZ`)."
|
|
4106
4101
|
}
|
|
4107
4102
|
],
|
|
4108
4103
|
"slots": [
|
|
@@ -4278,7 +4273,7 @@
|
|
|
4278
4273
|
"events": [
|
|
4279
4274
|
{
|
|
4280
4275
|
"name": "change",
|
|
4281
|
-
"description": "Dispatched when there is a change to selected date or selected time.
|
|
4276
|
+
"description": "Dispatched when there is a change to selected date or selected time. `value` corresponds to the selected value and is formatted in ISO 8601 combined date and time format (`YYYY-MM-DDTHH:mm:ss.sssZ`)."
|
|
4282
4277
|
}
|
|
4283
4278
|
]
|
|
4284
4279
|
},
|
|
@@ -4433,7 +4428,7 @@
|
|
|
4433
4428
|
"events": [
|
|
4434
4429
|
{
|
|
4435
4430
|
"name": "change",
|
|
4436
|
-
"description": "Dispatched when there is a change to selected date.
|
|
4431
|
+
"description": "Dispatched when there is a change to selected date. `value` corresponds to the selected value and is formatted in ISO 8601 calendar date format (`YYYY-MM-DD`)."
|
|
4437
4432
|
}
|
|
4438
4433
|
]
|
|
4439
4434
|
},
|
|
@@ -5862,7 +5857,7 @@
|
|
|
5862
5857
|
"events": [
|
|
5863
5858
|
{
|
|
5864
5859
|
"name": "change",
|
|
5865
|
-
"description": "Dispatched when there is a change to selected start time or selected end time.
|
|
5860
|
+
"description": "Dispatched when there is a change to selected start time or selected end time. `start-value` and `end-value` correspond to the selected values and are formatted in ISO 8601 calendar time format (`hh:mm:ss`)."
|
|
5866
5861
|
}
|
|
5867
5862
|
]
|
|
5868
5863
|
},
|
|
@@ -6028,7 +6023,7 @@
|
|
|
6028
6023
|
"events": [
|
|
6029
6024
|
{
|
|
6030
6025
|
"name": "change",
|
|
6031
|
-
"description": "Dispatched when there is a change to selected time.
|
|
6026
|
+
"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`)."
|
|
6032
6027
|
}
|
|
6033
6028
|
]
|
|
6034
6029
|
},
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@brightspace-ui/core",
|
|
3
|
-
"version": "1.197.
|
|
3
|
+
"version": "1.197.1",
|
|
4
4
|
"description": "A collection of accessible, free, open-source web components for building Brightspace applications",
|
|
5
5
|
"repository": "https://github.com/BrightspaceUI/core.git",
|
|
6
6
|
"publishConfig": {
|