@brightspace-ui/core 1.197.0 → 1.197.4

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.
Files changed (73) hide show
  1. package/components/dropdown/README.md +4 -0
  2. package/components/dropdown/demo/dropdown-button.html +30 -0
  3. package/components/dropdown/dropdown-content-styles.js +13 -0
  4. package/components/dropdown/dropdown-opener-mixin.js +235 -24
  5. package/components/filter/README.md +15 -6
  6. package/components/filter/filter-dimension-set-value.js +3 -0
  7. package/components/filter/filter-dimension-set.js +5 -1
  8. package/components/filter/screenshots/filter-mobile.png +0 -0
  9. package/components/filter/screenshots/filter-multi-dim.png +0 -0
  10. package/components/filter/screenshots/filter.png +0 -0
  11. package/components/form/form-mixin.js +1 -0
  12. package/components/form/form-native.js +0 -1
  13. package/components/form/form.js +0 -1
  14. package/components/html-block/html-block.js +8 -0
  15. package/components/inputs/docs/input-date-time.md +7 -7
  16. package/components/inputs/input-date-range.js +9 -1
  17. package/components/inputs/input-date-time-range-to.js +3 -0
  18. package/components/inputs/input-date-time-range.js +10 -1
  19. package/components/inputs/input-date-time.js +7 -1
  20. package/components/inputs/input-date.js +7 -1
  21. package/components/inputs/input-fieldset.js +3 -0
  22. package/components/inputs/input-time-range.js +10 -1
  23. package/components/inputs/input-time.js +6 -1
  24. package/components/link/README.md +1 -1
  25. package/components/list/README.md +10 -10
  26. package/components/list/list-item-button-mixin.js +1 -0
  27. package/components/list/list-item-button.js +0 -3
  28. package/components/list/list-item-checkbox-mixin.js +1 -0
  29. package/components/list/list-item-drag-drop-mixin.js +2 -0
  30. package/components/list/list-item-link-mixin.js +1 -0
  31. package/components/list/list-item.js +0 -3
  32. package/components/list/list.js +2 -0
  33. package/components/menu/menu-item-checkbox.js +0 -4
  34. package/components/menu/menu-item-link.js +0 -2
  35. package/components/menu/menu-item-mixin.js +3 -0
  36. package/components/menu/menu-item-radio.js +0 -3
  37. package/components/menu/menu-item-selectable-mixin.js +2 -0
  38. package/components/menu/menu-item.js +0 -2
  39. package/components/overflow-group/overflow-group.js +4 -3
  40. package/components/scroll-wrapper/scroll-wrapper.js +1 -2
  41. package/components/selection/selection-action.js +4 -0
  42. package/components/selection/selection-input.js +5 -0
  43. package/components/selection/selection-mixin.js +2 -1
  44. package/components/selection/selection-observer-mixin.js +3 -1
  45. package/components/selection/selection-select-all.js +2 -0
  46. package/components/selection/selection-summary.js +3 -1
  47. package/components/skeleton/skeleton-mixin.js +1 -0
  48. package/components/status-indicator/status-indicator.js +2 -0
  49. package/components/switch/switch-visibility.js +3 -0
  50. package/components/switch/switch.js +3 -0
  51. package/components/table/table-col-sort-button.js +0 -2
  52. package/components/table/table-wrapper.js +0 -2
  53. package/components/tabs/tab-panel-mixin.js +2 -0
  54. package/components/tabs/tab-panel.js +0 -2
  55. package/custom-elements.json +118 -48
  56. package/lang/ar.js +7 -7
  57. package/lang/cy.js +7 -7
  58. package/lang/da.js +7 -7
  59. package/lang/de.js +7 -7
  60. package/lang/es-es.js +7 -7
  61. package/lang/es.js +8 -8
  62. package/lang/fr-fr.js +8 -8
  63. package/lang/fr.js +7 -7
  64. package/lang/ja.js +8 -8
  65. package/lang/ko.js +7 -7
  66. package/lang/nl.js +8 -8
  67. package/lang/pt.js +7 -7
  68. package/lang/sv.js +7 -7
  69. package/lang/tr.js +7 -7
  70. package/lang/zh-tw.js +7 -7
  71. package/lang/zh.js +8 -8
  72. package/package.json +1 -1
  73. package/templates/primary-secondary/primary-secondary.js +2 -0
@@ -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. "start-value" and "end-value" correspond to the selected values and are formatted 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. `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. "value" corresponds to the selected value and is formatted in ISO 8601 combined date and time format ("YYYY-MM-DDTHH:mm:ss.sssZ").
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. "value" corresponds to the selected value and is formatted in ISO 8601 calendar date format ("YYYY-MM-DD").
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. "start-value" and "end-value" correspond to the selected values and are formatted in ISO 8601 calendar time format ("hh:mm:ss").
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. "value" corresponds to the selected value and is formatted in ISO 8601 time format ("hh:mm:ss").
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 `<a>` elements
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="Atronomy">
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>
@@ -35,6 +35,7 @@ export const ListItemButtonMixin = superclass => class extends ListItemMixin(sup
35
35
  }
36
36
 
37
37
  _onButtonClick() {
38
+ /** Dispatched when the item's primary button action is clicked */
38
39
  this.dispatchEvent(new CustomEvent('d2l-list-item-button-click', { bubbles: true }));
39
40
  }
40
41
 
@@ -6,9 +6,6 @@ import { LitElement } from 'lit-element/lit-element.js';
6
6
  * @slot - Default content placed inside of the component
7
7
  * @slot illustration - Image associated with the list item located at the left of the item
8
8
  * @slot actions - Actions (e.g., button icons) associated with the listen item located at the right of the item
9
- * @fires d2l-list-item-button-click - Dispatched when the item's primary button action is clicked
10
- * @fires d2l-list-item-position-change - Dispatched when a draggable list item's position changes in the list. See [Event Details: d2l-list-item-position-change](#event-details%3A-d2l-list-item-position-change).
11
- * @fires d2l-list-item-selected - Dispatched when the component item is selected
12
9
  */
13
10
  class ListItemButton extends ListItemButtonMixin(LitElement) {
14
11
 
@@ -105,6 +105,7 @@ export const ListItemCheckboxMixin = superclass => class extends SkeletonMixin(L
105
105
  /* wait for internal state to be updated in case of action-click case so that a consumer
106
106
  calling getSelectionInfo will get the correct state */
107
107
  await this.updateComplete;
108
+ /** Dispatched when the component item is selected */
108
109
  this.dispatchEvent(new CustomEvent('d2l-list-item-selected', {
109
110
  detail: { key: this.key, selected: value },
110
111
  composed: true,
@@ -265,6 +265,7 @@ export const ListItemDragDropMixin = superclass => class extends superclass {
265
265
  dragHandleText: { type: String, attribute: 'drag-handle-text' },
266
266
  /**
267
267
  * **Drag & drop:** Text to drag and drop
268
+ * @type {string}
268
269
  */
269
270
  dropText: { type: String, attribute: 'drop-text' },
270
271
  /**
@@ -351,6 +352,7 @@ export const ListItemDragDropMixin = superclass => class extends superclass {
351
352
  }
352
353
 
353
354
  _annoucePositionChange(dragTargetKey, dropTargetKey, dropLocation) {
355
+ /** Dispatched when a draggable list item's position changes in the list. See [Event Details: d2l-list-item-position-change](#event-details%3A-d2l-list-item-position-change). */
354
356
  this.dispatchEvent(new CustomEvent('d2l-list-item-position-change', {
355
357
  detail: new NewPositionEventDetails({ dragTargetKey, dropTargetKey, dropLocation }),
356
358
  bubbles: true
@@ -45,6 +45,7 @@ export const ListItemLinkMixin = superclass => class extends ListItemMixin(super
45
45
  }
46
46
 
47
47
  _handleLinkClick() {
48
+ /** Dispatched when the item's primary link action is clicked */
48
49
  this.dispatchEvent(new CustomEvent('d2l-list-item-link-click', { bubbles: true }));
49
50
  }
50
51
 
@@ -6,9 +6,6 @@ import { LitElement } from 'lit-element/lit-element.js';
6
6
  * @slot - Default content placed inside of the component
7
7
  * @slot illustration - Image associated with the list item located at the left of the item
8
8
  * @slot actions - Actions (e.g., button icons) associated with the listen item located at the right of the item
9
- * @fires d2l-list-item-link-click - Dispatched when the item's primary link action is clicked
10
- * @fires d2l-list-item-position-change - Dispatched when a draggable list item's position changes in the list. See [Event Details: d2l-list-item-position-change](#event-details%3A-d2l-list-item-position-change).
11
- * @fires d2l-list-item-selected - Dispatched when the component item is selected
12
9
  */
13
10
  class ListItem extends ListItemLinkMixin(LitElement) {
14
11
 
@@ -18,10 +18,12 @@ class List extends SelectionMixin(LitElement) {
18
18
  return {
19
19
  /**
20
20
  * Whether to extend the separators beyond the content's edge
21
+ * @type {boolean}
21
22
  */
22
23
  extendSeparators: { type: Boolean, reflect: true, attribute: 'extend-separators' },
23
24
  /**
24
25
  * Use grid to manage focus with arrow keys. See [Accessibility](#accessibility).
26
+ * @type {boolean}
25
27
  */
26
28
  grid: { type: Boolean },
27
29
  /**
@@ -6,10 +6,6 @@ import { RtlMixin } from '../../mixins/rtl-mixin.js';
6
6
 
7
7
  /**
8
8
  * A menu item component used for selection. Multiple checkboxes can be selected at once.
9
- * @fires click - Dispatched when the link is clicked
10
- * @fires d2l-menu-item-change - Dispatched when the selected menu item changes
11
- * @fires d2l-menu-item-select - Dispatched when the menu item is selected
12
- * @fires d2l-menu-item-visibility-change - Dispatched when the visibility of the menu item changes
13
9
  */
14
10
  class MenuItemCheckbox extends RtlMixin(MenuItemSelectableMixin(LitElement)) {
15
11
 
@@ -6,8 +6,6 @@ import { menuItemStyles } from './menu-item-styles.js';
6
6
  /**
7
7
  * A menu item component used for navigating.
8
8
  * @fires click - Dispatched when the link is clicked
9
- * @fires d2l-menu-item-select - Dispatched when the menu item is selected
10
- * @fires d2l-menu-item-visibility-change - Dispatched when the visibility of the menu item changes
11
9
  */
12
10
  class MenuItemLink extends MenuItemMixin(LitElement) {
13
11
 
@@ -4,6 +4,7 @@ export const MenuItemMixin = superclass => class extends superclass {
4
4
  return {
5
5
  /**
6
6
  * Disables the menu item
7
+ * @type {boolean}
7
8
  */
8
9
  disabled: { type: Boolean, reflect: true },
9
10
  /**
@@ -100,6 +101,7 @@ export const MenuItemMixin = superclass => class extends superclass {
100
101
  // assumption: single, focusable child view
101
102
  this.__children[0].show();
102
103
  } else {
104
+ /** Dispatched when the menu item is selected */
103
105
  this.dispatchEvent(new CustomEvent('d2l-menu-item-select', { bubbles: true, composed: true }));
104
106
  }
105
107
  }
@@ -162,6 +164,7 @@ export const MenuItemMixin = superclass => class extends superclass {
162
164
  }
163
165
 
164
166
  _onHidden() {
167
+ /** Dispatched when the visibility of the menu item changes */
165
168
  this.dispatchEvent(new CustomEvent('d2l-menu-item-visibility-change', { bubbles: true, composed: true }));
166
169
  }
167
170
 
@@ -6,9 +6,6 @@ import { RtlMixin } from '../../mixins/rtl-mixin.js';
6
6
 
7
7
  /**
8
8
  * A menu item component used for radio selection. Only one radio item in a given d2l-menu may be selected at once (i.e., selecting one option will deselect the other selected "d2l-menu-item-radio" item).
9
- * @fires d2l-menu-item-change - Dispatched when the selected menu item changes
10
- * @fires d2l-menu-item-select - Dispatched when a menu item is selected
11
- * @fires d2l-menu-item-visibility-change - Dispatched when the visibility of the menu item changes
12
9
  */
13
10
  class MenuItemRadio extends RtlMixin(MenuItemRadioMixin(LitElement)) {
14
11
 
@@ -6,6 +6,7 @@ export const MenuItemSelectableMixin = superclass => class extends MenuItemMixin
6
6
  return {
7
7
  /**
8
8
  * This will set the item to be selected by default
9
+ * @type {boolean}
9
10
  */
10
11
  selected: { type: Boolean, reflect: true },
11
12
  /**
@@ -42,6 +43,7 @@ export const MenuItemSelectableMixin = superclass => class extends MenuItemMixin
42
43
  selected: this.selected
43
44
  }
44
45
  };
46
+ /** Dispatched when the selected menu item changes */
45
47
  this.dispatchEvent(new CustomEvent('d2l-menu-item-change', eventDetails));
46
48
  }
47
49
 
@@ -6,8 +6,6 @@ import { menuItemStyles } from './menu-item-styles.js';
6
6
  /**
7
7
  * A menu item component used with JS handlers.
8
8
  * @slot - Default content placed inside of the component
9
- * @fires d2l-menu-item-select - Dispatched when a menu item is selected
10
- * @fires d2l-menu-item-visibility-change - Dispatched when the visibility of the menu item changes
11
9
  */
12
10
  class MenuItem extends MenuItemMixin(LitElement) {
13
11