@brightspace-ui/core 1.196.3 → 1.197.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/components/filter/README.md +15 -6
- package/components/filter/filter-dimension-set-value.js +3 -0
- package/components/filter/filter-dimension-set.js +5 -1
- package/components/filter/screenshots/filter-mobile.png +0 -0
- package/components/filter/screenshots/filter-multi-dim.png +0 -0
- package/components/filter/screenshots/filter.png +0 -0
- 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/html-block/html-block.js +8 -0
- 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-radio-styles.js +2 -1
- 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 +11 -10
- package/components/list/list-item-button-mixin.js +1 -0
- package/components/list/list-item-button.js +0 -3
- package/components/list/list-item-checkbox-mixin.js +1 -0
- package/components/list/list-item-drag-drop-mixin.js +2 -0
- package/components/list/list-item-link-mixin.js +1 -0
- package/components/list/list-item.js +0 -3
- package/components/list/list.js +13 -0
- package/components/menu/menu-item-checkbox.js +0 -4
- package/components/menu/menu-item-link.js +0 -2
- package/components/menu/menu-item-mixin.js +3 -0
- package/components/menu/menu-item-radio.js +0 -3
- package/components/menu/menu-item-selectable-mixin.js +2 -0
- package/components/menu/menu-item.js +0 -2
- package/components/overflow-group/overflow-group.js +4 -3
- package/components/scroll-wrapper/scroll-wrapper.js +1 -2
- package/components/selection/selection-action.js +4 -0
- package/components/selection/selection-input.js +9 -2
- package/components/selection/selection-mixin.js +2 -1
- package/components/selection/selection-observer-mixin.js +3 -1
- package/components/selection/selection-select-all.js +2 -0
- package/components/selection/selection-summary.js +3 -1
- package/components/skeleton/skeleton-mixin.js +1 -0
- package/components/status-indicator/status-indicator.js +2 -0
- package/components/switch/switch-visibility.js +3 -0
- package/components/switch/switch.js +3 -0
- package/components/table/table-col-sort-button.js +0 -2
- package/components/table/table-wrapper.js +0 -2
- package/components/tabs/tab-panel-mixin.js +2 -0
- package/components/tabs/tab-panel.js +0 -2
- package/custom-elements.json +53 -48
- package/lang/ar.js +7 -7
- package/lang/cy.js +7 -7
- package/lang/da.js +7 -7
- package/lang/de.js +7 -7
- package/lang/es-es.js +7 -7
- package/lang/es.js +8 -8
- package/lang/fr-fr.js +8 -8
- package/lang/fr.js +7 -7
- package/lang/ja.js +8 -8
- package/lang/ko.js +7 -7
- package/lang/nl.js +8 -8
- package/lang/pt.js +7 -7
- package/lang/sv.js +7 -7
- package/lang/tr.js +7 -7
- package/lang/zh-tw.js +7 -7
- package/lang/zh.js +8 -8
- package/package.json +1 -1
- package/templates/primary-secondary/primary-secondary.js +2 -0
|
@@ -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
|
|
package/components/list/list.js
CHANGED
|
@@ -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
|
/**
|
|
@@ -97,6 +99,17 @@ class List extends SelectionMixin(LitElement) {
|
|
|
97
99
|
return this._getItems().indexOf(item);
|
|
98
100
|
}
|
|
99
101
|
|
|
102
|
+
getSelectedListItems(includeNested) {
|
|
103
|
+
let selectedItems = [];
|
|
104
|
+
this._getItems().forEach(item => {
|
|
105
|
+
if (item.selected) selectedItems.push(item);
|
|
106
|
+
if (includeNested && item._selectionProvider) {
|
|
107
|
+
selectedItems = [...selectedItems, ...item._selectionProvider.getSelectedListItems(includeNested)];
|
|
108
|
+
}
|
|
109
|
+
});
|
|
110
|
+
return selectedItems;
|
|
111
|
+
}
|
|
112
|
+
|
|
100
113
|
getSelectionInfo(includeNested) {
|
|
101
114
|
const selectionInfo = super.getSelectionInfo();
|
|
102
115
|
if (!includeNested) return selectionInfo;
|
|
@@ -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
|
|
|
@@ -111,9 +111,7 @@ function convertToDropdownItem(node) {
|
|
|
111
111
|
}
|
|
112
112
|
/**
|
|
113
113
|
*
|
|
114
|
-
* A component that can be used to display a set of buttons, links or menus that will be put into a
|
|
115
|
-
* dropdown menu when they no longer fit on the first line of their container
|
|
116
|
-
*
|
|
114
|
+
* A component that can be used to display a set of buttons, links or menus that will be put into a dropdown menu when they no longer fit on the first line of their container
|
|
117
115
|
* @slot - Buttons, dropdown buttons, links or other items to be added to the container
|
|
118
116
|
* @fires d2l-overflow-group-updated - Dispatched when there is an update performed to the overflow group
|
|
119
117
|
*/
|
|
@@ -123,6 +121,7 @@ class OverflowGroup extends RtlMixin(LocalizeCoreElement(LitElement)) {
|
|
|
123
121
|
return {
|
|
124
122
|
/**
|
|
125
123
|
* Use predefined classes on slot elements to set min and max buttons to show
|
|
124
|
+
* @type {boolean}
|
|
126
125
|
*/
|
|
127
126
|
autoShow: {
|
|
128
127
|
type: Boolean,
|
|
@@ -130,6 +129,7 @@ class OverflowGroup extends RtlMixin(LocalizeCoreElement(LitElement)) {
|
|
|
130
129
|
},
|
|
131
130
|
/**
|
|
132
131
|
* minimum amount of buttons to show
|
|
132
|
+
* @type {number}
|
|
133
133
|
*/
|
|
134
134
|
minToShow: {
|
|
135
135
|
type: Number,
|
|
@@ -138,6 +138,7 @@ class OverflowGroup extends RtlMixin(LocalizeCoreElement(LitElement)) {
|
|
|
138
138
|
},
|
|
139
139
|
/**
|
|
140
140
|
* maximum amount of buttons to show
|
|
141
|
+
* @type {number}
|
|
141
142
|
*/
|
|
142
143
|
maxToShow: {
|
|
143
144
|
type: Number,
|
|
@@ -12,7 +12,6 @@ const SCROLL_AMOUNT = 0.8;
|
|
|
12
12
|
/**
|
|
13
13
|
*
|
|
14
14
|
* Wraps content which may overflow its horizontal boundaries, providing left/right scroll buttons.
|
|
15
|
-
*
|
|
16
15
|
* @slot - User provided content to wrap
|
|
17
16
|
*/
|
|
18
17
|
class ScrollWrapper extends FocusVisiblePolyfillMixin(RtlMixin(LitElement)) {
|
|
@@ -54,7 +53,7 @@ class ScrollWrapper extends FocusVisiblePolyfillMixin(RtlMixin(LitElement)) {
|
|
|
54
53
|
:host([hidden]) {
|
|
55
54
|
display: none;
|
|
56
55
|
}
|
|
57
|
-
|
|
56
|
+
|
|
58
57
|
.d2l-scroll-wrapper-container {
|
|
59
58
|
box-sizing: border-box;
|
|
60
59
|
outline: none;
|
|
@@ -12,6 +12,7 @@ import { SelectionObserverMixin } from './selection-observer-mixin.js';
|
|
|
12
12
|
/**
|
|
13
13
|
* An action associated with a selection component.
|
|
14
14
|
* @fires d2l-selection-action-click - Dispatched when the user clicks the action; provides the selection info
|
|
15
|
+
* @fires d2l-selection-observer-subscribe - Internal event
|
|
15
16
|
*/
|
|
16
17
|
class Action extends LocalizeCoreElement(SelectionObserverMixin(ButtonMixin(RtlMixin(LitElement)))) {
|
|
17
18
|
|
|
@@ -19,14 +20,17 @@ class Action extends LocalizeCoreElement(SelectionObserverMixin(ButtonMixin(RtlM
|
|
|
19
20
|
return {
|
|
20
21
|
/**
|
|
21
22
|
* Preset icon key (e.g. "tier1:gear")
|
|
23
|
+
* @type {string}
|
|
22
24
|
*/
|
|
23
25
|
icon: { type: String, reflect: true },
|
|
24
26
|
/**
|
|
25
27
|
* Whether the action requires one or more selected items
|
|
28
|
+
* @type {boolean}
|
|
26
29
|
*/
|
|
27
30
|
requiresSelection: { type: Boolean, attribute: 'requires-selection', reflect: true },
|
|
28
31
|
/**
|
|
29
32
|
* REQUIRED: The text for the action
|
|
33
|
+
* @type {string}
|
|
30
34
|
*/
|
|
31
35
|
text: { type: String, reflect: true }
|
|
32
36
|
};
|
|
@@ -13,6 +13,7 @@ const keyCodes = {
|
|
|
13
13
|
/**
|
|
14
14
|
* An input (radio or checkbox) for use in selection components such as lists and tables.
|
|
15
15
|
* @fires d2l-selection-change - Dispatched when the selected state changes
|
|
16
|
+
* @fires d2l-selection-input-subscribe - Internal event
|
|
16
17
|
*/
|
|
17
18
|
class Input extends SkeletonMixin(LabelledMixin(LitElement)) {
|
|
18
19
|
|
|
@@ -20,18 +21,22 @@ class Input extends SkeletonMixin(LabelledMixin(LitElement)) {
|
|
|
20
21
|
return {
|
|
21
22
|
/**
|
|
22
23
|
* State of the input
|
|
24
|
+
* @type {boolean}
|
|
23
25
|
*/
|
|
24
26
|
selected: { type: Boolean },
|
|
25
27
|
/**
|
|
26
28
|
* Disables the input
|
|
29
|
+
* @type {boolean}
|
|
27
30
|
*/
|
|
28
31
|
disabled: { type: Boolean },
|
|
29
32
|
/**
|
|
30
33
|
* Private. Force hovering state of input
|
|
34
|
+
* @type {boolean}
|
|
31
35
|
*/
|
|
32
36
|
hovering: { type: Boolean },
|
|
33
37
|
/**
|
|
34
38
|
* Key for the selectable
|
|
39
|
+
* @type {string}
|
|
35
40
|
*/
|
|
36
41
|
key: { type: String },
|
|
37
42
|
_indeterminate: { type: Boolean },
|
|
@@ -89,10 +94,12 @@ class Input extends SkeletonMixin(LabelledMixin(LitElement)) {
|
|
|
89
94
|
'd2l-input-radio': true,
|
|
90
95
|
'd2l-selection-input-radio': true,
|
|
91
96
|
'd2l-skeletize': true,
|
|
92
|
-
'd2l-hovering': this.hovering
|
|
97
|
+
'd2l-hovering': this.hovering,
|
|
98
|
+
'd2l-disabled': this.disabled
|
|
93
99
|
};
|
|
94
100
|
return html`
|
|
95
101
|
<div
|
|
102
|
+
aria-disabled="${ifDefined(this.disabled)}"
|
|
96
103
|
aria-label="${this.label}"
|
|
97
104
|
aria-checked="${this.selected ? 'true' : 'false'}"
|
|
98
105
|
class="${classMap(radioClasses)}"
|
|
@@ -100,7 +107,7 @@ class Input extends SkeletonMixin(LabelledMixin(LitElement)) {
|
|
|
100
107
|
@keydown="${this._handleRadioKeyDown}"
|
|
101
108
|
@keyup="${this._handleRadioKeyUp}"
|
|
102
109
|
role="radio"
|
|
103
|
-
tabindex="0"></div>
|
|
110
|
+
tabindex="${ifDefined(this.disabled ? undefined : 0)}"></div>
|
|
104
111
|
`;
|
|
105
112
|
} else {
|
|
106
113
|
return html`
|
|
@@ -39,7 +39,8 @@ export const SelectionMixin = superclass => class extends RtlMixin(superclass) {
|
|
|
39
39
|
static get properties() {
|
|
40
40
|
return {
|
|
41
41
|
/**
|
|
42
|
-
* Whether the selection control is limited to single selection
|
|
42
|
+
* Whether the selection control is limited to single selection
|
|
43
|
+
* @type {boolean}
|
|
43
44
|
*/
|
|
44
45
|
selectionSingle: { type: Boolean, attribute: 'selection-single' }
|
|
45
46
|
};
|
|
@@ -7,10 +7,12 @@ export const SelectionObserverMixin = superclass => class extends superclass {
|
|
|
7
7
|
return {
|
|
8
8
|
/**
|
|
9
9
|
* Id of the SelectionMixin component this component wants to observe (if not located within that component)
|
|
10
|
+
* @type {string}
|
|
10
11
|
*/
|
|
11
12
|
selectionFor: { type: String, reflect: true, attribute: 'selection-for' },
|
|
12
13
|
/**
|
|
13
|
-
* The selection info (set by the selection component)
|
|
14
|
+
* The selection info (set by the selection component)
|
|
15
|
+
* @type {object}
|
|
14
16
|
*/
|
|
15
17
|
selectionInfo: { type: Object },
|
|
16
18
|
_provider: { type: Object, attribute: false }
|
|
@@ -7,6 +7,7 @@ import { SelectionObserverMixin } from './selection-observer-mixin.js';
|
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
9
|
* A checkbox that provides select-all behavior for selection components such as tables and lists.
|
|
10
|
+
* @fires d2l-selection-observer-subscribe - Internal event
|
|
10
11
|
*/
|
|
11
12
|
class SelectAll extends LocalizeCoreElement(SelectionObserverMixin(LitElement)) {
|
|
12
13
|
|
|
@@ -14,6 +15,7 @@ class SelectAll extends LocalizeCoreElement(SelectionObserverMixin(LitElement))
|
|
|
14
15
|
return {
|
|
15
16
|
/**
|
|
16
17
|
* Disables the select all checkbox
|
|
18
|
+
* @type {boolean}
|
|
17
19
|
*/
|
|
18
20
|
disabled: { type: Boolean }
|
|
19
21
|
};
|
|
@@ -6,13 +6,15 @@ import { SelectionObserverMixin } from './selection-observer-mixin.js';
|
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* A summary showing the current selected count.
|
|
9
|
+
* @fires d2l-selection-observer-subscribe - Internal event
|
|
9
10
|
*/
|
|
10
11
|
class Summary extends LocalizeCoreElement(SelectionObserverMixin(LitElement)) {
|
|
11
12
|
|
|
12
13
|
static get properties() {
|
|
13
14
|
return {
|
|
14
15
|
/**
|
|
15
|
-
* Text to display if no items are selected
|
|
16
|
+
* Text to display if no items are selected
|
|
17
|
+
* @type {string}
|
|
16
18
|
*/
|
|
17
19
|
noSelectionText: { type: String, attribute: 'no-selection-text' }
|
|
18
20
|
};
|
|
@@ -148,6 +148,7 @@ export const SkeletonMixin = dedupeMixin(superclass => class extends RtlMixin(su
|
|
|
148
148
|
return {
|
|
149
149
|
/**
|
|
150
150
|
* Renders the input as a [skeleton loader](https://github.com/BrightspaceUI/core/tree/main/components/skeleton)
|
|
151
|
+
* @type {boolean}
|
|
151
152
|
*/
|
|
152
153
|
skeleton: { reflect: true, type: Boolean }
|
|
153
154
|
};
|
|
@@ -18,12 +18,14 @@ class StatusIndicator extends LitElement {
|
|
|
18
18
|
},
|
|
19
19
|
/**
|
|
20
20
|
* REQUIRED: The text that is displayed within the status indicator
|
|
21
|
+
* @type {string}
|
|
21
22
|
*/
|
|
22
23
|
text: {
|
|
23
24
|
type: String
|
|
24
25
|
},
|
|
25
26
|
/**
|
|
26
27
|
* Use when the status is very important and needs to have a lot of prominence
|
|
28
|
+
* @type {boolean}
|
|
27
29
|
*/
|
|
28
30
|
bold: {
|
|
29
31
|
type: Boolean,
|
|
@@ -3,6 +3,9 @@ import { html, LitElement } from 'lit-element/lit-element.js';
|
|
|
3
3
|
import { LocalizeCoreElement } from '../../lang/localize-core-element.js';
|
|
4
4
|
import { SwitchMixin } from './switch-mixin.js';
|
|
5
5
|
|
|
6
|
+
/**
|
|
7
|
+
* A variant of the generic switch configured with special icons and default text for toggling "visibility".
|
|
8
|
+
*/
|
|
6
9
|
class VisibilitySwitch extends LocalizeCoreElement(SwitchMixin(LitElement)) {
|
|
7
10
|
|
|
8
11
|
get text() {
|
|
@@ -4,6 +4,9 @@ import '../icons/icon-custom.js';
|
|
|
4
4
|
import { html, LitElement } from 'lit-element/lit-element.js';
|
|
5
5
|
import { SwitchMixin } from './switch-mixin.js';
|
|
6
6
|
|
|
7
|
+
/**
|
|
8
|
+
* A generic switch with on/off semantics.
|
|
9
|
+
*/
|
|
7
10
|
class Switch extends SwitchMixin(LitElement) {
|
|
8
11
|
|
|
9
12
|
get offIcon() {
|
|
@@ -2,9 +2,7 @@ import '../icons/icon.js';
|
|
|
2
2
|
import { css, html, LitElement } from 'lit-element/lit-element.js';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
|
-
*
|
|
6
5
|
* Button for sorting a table column in ascending/descending order.
|
|
7
|
-
*
|
|
8
6
|
* @slot - Text of the sort button
|
|
9
7
|
*/
|
|
10
8
|
export class TableColSortButton extends LitElement {
|
|
@@ -164,9 +164,7 @@ export const tableStyles = css`
|
|
|
164
164
|
`;
|
|
165
165
|
|
|
166
166
|
/**
|
|
167
|
-
*
|
|
168
167
|
* Wraps a native <table> element, providing styling and scroll buttons for overflow.
|
|
169
|
-
*
|
|
170
168
|
* @slot - Content to wrap
|
|
171
169
|
*/
|
|
172
170
|
export class TableWrapper extends RtlMixin(LitElement) {
|
|
@@ -55,6 +55,7 @@ export const TabPanelMixin = superclass => class extends superclass {
|
|
|
55
55
|
super.attributeChangedCallback(name, oldval, newval);
|
|
56
56
|
if (name === 'text') {
|
|
57
57
|
this.setAttribute('aria-label', this.text);
|
|
58
|
+
/** Dispatched when the text attribute is changed */
|
|
58
59
|
this.dispatchEvent(new CustomEvent(
|
|
59
60
|
'd2l-tab-panel-text-changed', { bubbles: true, composed: true, detail: { text: this.text } }
|
|
60
61
|
));
|
|
@@ -73,6 +74,7 @@ export const TabPanelMixin = superclass => class extends superclass {
|
|
|
73
74
|
if (prop === 'selected') {
|
|
74
75
|
if (this.selected) {
|
|
75
76
|
requestAnimationFrame(() => {
|
|
77
|
+
/** Dispatched when a tab is selected */
|
|
76
78
|
this.dispatchEvent(new CustomEvent(
|
|
77
79
|
'd2l-tab-panel-selected', { bubbles: true, composed: true }
|
|
78
80
|
));
|
|
@@ -4,8 +4,6 @@ import { TabPanelMixin } from './tab-panel-mixin.js';
|
|
|
4
4
|
/**
|
|
5
5
|
* A component for tab panel content.
|
|
6
6
|
* @slot - Default content in tab panel
|
|
7
|
-
* @fires d2l-tab-panel-text-changed - Dispatched when the text attribute is changed
|
|
8
|
-
* @fires d2l-tab-panel-selected - Dispatched when a tab is selected
|
|
9
7
|
*/
|
|
10
8
|
class TabPanel extends TabPanelMixin(LitElement) {
|
|
11
9
|
|