@brightspace-ui/core 3.267.0 → 3.267.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/alert/alert-toast.js +98 -102
- package/components/alert/alert.js +109 -113
- package/components/backdrop/backdrop-dirty-overlay.js +13 -17
- package/components/backdrop/backdrop-loading.js +105 -109
- package/components/backdrop/backdrop.js +50 -54
- package/components/breadcrumbs/breadcrumb-current-page.js +19 -23
- package/components/breadcrumbs/breadcrumb.js +50 -54
- package/components/breadcrumbs/breadcrumbs.js +34 -38
- package/components/button/button-add.js +156 -164
- package/components/button/button-copy-mixin.js +9 -11
- package/components/button/button-copy.js +15 -19
- package/components/button/button-icon.js +110 -114
- package/components/button/button-move.js +153 -157
- package/components/button/button-split-item.js +16 -20
- package/components/button/button-split.js +70 -74
- package/components/button/button-subtle-copy.js +17 -19
- package/components/button/button-subtle.js +145 -149
- package/components/button/button-toggle.js +25 -29
- package/components/button/button.js +70 -74
- package/components/button/floating-buttons.js +63 -67
- package/components/calendar/calendar.js +244 -248
- package/components/card/card-content-meta.js +13 -15
- package/components/card/card-content-title.js +9 -11
- package/components/card/card-footer-link.js +76 -80
- package/components/card/card-loading-shimmer.js +35 -39
- package/components/card/card.js +188 -192
- package/components/collapsible-panel/collapsible-panel-group.js +17 -21
- package/components/collapsible-panel/collapsible-panel-summary-item.js +27 -31
- package/components/collapsible-panel/collapsible-panel.js +258 -262
- package/components/count-badge/count-badge-icon.js +12 -16
- package/components/count-badge/count-badge-mixin.js +124 -128
- package/components/count-badge/count-badge.js +2 -4
- package/components/description-list/description-list-wrapper.js +27 -31
- package/components/dialog/dialog-confirm.js +55 -59
- package/components/dialog/dialog-fullscreen.js +128 -132
- package/components/dialog/dialog-mixin.js +39 -41
- package/components/dialog/dialog.js +61 -65
- package/components/dropdown/dropdown-button-subtle.js +21 -25
- package/components/dropdown/dropdown-button.js +31 -35
- package/components/dropdown/dropdown-context-menu.js +28 -31
- package/components/dropdown/dropdown-menu.js +27 -31
- package/components/dropdown/dropdown-more.js +23 -26
- package/components/dropdown/dropdown-opener-mixin.js +44 -46
- package/components/dropdown/dropdown-popover-mixin.js +155 -159
- package/components/dropdown/dropdown-tabs.js +5 -7
- package/components/dropdown/dropdown.js +1 -3
- package/components/empty-state/empty-state-action-button.js +18 -22
- package/components/empty-state/empty-state-action-link.js +14 -18
- package/components/empty-state/empty-state-illustrated.js +21 -25
- package/components/empty-state/empty-state-simple.js +8 -12
- package/components/expand-collapse/expand-collapse-content.js +48 -52
- package/components/filter/filter-dimension-set-date-text-value.js +34 -36
- package/components/filter/filter-dimension-set-date-time-range-value.js +45 -47
- package/components/filter/filter-dimension-set-empty-state.js +17 -19
- package/components/filter/filter-dimension-set-value.js +27 -29
- package/components/filter/filter-dimension-set.js +65 -67
- package/components/filter/filter-overflow-group.js +15 -19
- package/components/filter/filter-tags.js +16 -19
- package/components/filter/filter.js +115 -119
- package/components/focus-trap/focus-trap.js +17 -21
- package/components/form/form-element-mixin.js +33 -35
- package/components/form/form-error-summary.js +37 -42
- package/components/form/form.js +33 -37
- package/components/hierarchical-view/hierarchical-view-mixin.js +76 -80
- package/components/hierarchical-view/hierarchical-view.js +5 -7
- package/components/html-block/html-block.js +45 -49
- package/components/icons/icon-custom.js +20 -24
- package/components/icons/icon.js +20 -24
- package/components/icons/slotted-icon-mixin.js +16 -18
- package/components/inputs/input-checkbox-group.js +34 -38
- package/components/inputs/input-checkbox.js +106 -110
- package/components/inputs/input-color.js +142 -148
- package/components/inputs/input-date-range.js +90 -94
- package/components/inputs/input-date-time-range-to.js +70 -74
- package/components/inputs/input-date-time-range.js +110 -115
- package/components/inputs/input-date-time.js +75 -79
- package/components/inputs/input-date.js +101 -105
- package/components/inputs/input-fieldset.js +37 -43
- package/components/inputs/input-group.js +10 -12
- package/components/inputs/input-inline-help.js +4 -6
- package/components/inputs/input-number.js +112 -118
- package/components/inputs/input-percent.js +52 -58
- package/components/inputs/input-radio-group.js +45 -49
- package/components/inputs/input-radio-spacer.js +11 -13
- package/components/inputs/input-radio.js +62 -66
- package/components/inputs/input-search.js +63 -68
- package/components/inputs/input-styles.js +140 -3
- package/components/inputs/input-text.js +245 -251
- package/components/inputs/input-textarea.js +128 -132
- package/components/inputs/input-time-range.js +100 -104
- package/components/inputs/input-time.js +107 -113
- package/components/link/link-mixin.js +37 -41
- package/components/link/link.js +113 -119
- package/components/list/list-controls.js +25 -29
- package/components/list/list-item-button-mixin.js +10 -12
- package/components/list/list-item-checkbox-mixin.js +35 -37
- package/components/list/list-item-content.js +33 -35
- package/components/list/list-item-drag-drop-mixin.js +45 -47
- package/components/list/list-item-drag-handle.js +80 -84
- package/components/list/list-item-drag-image.js +77 -81
- package/components/list/list-item-expand-collapse-mixin.js +17 -19
- package/components/list/list-item-generic-layout.js +222 -226
- package/components/list/list-item-link-mixin.js +10 -12
- package/components/list/list-item-mixin.js +68 -70
- package/components/list/list-item-nav-mixin.js +17 -19
- package/components/list/list-item-placement-marker.js +65 -67
- package/components/list/list-item-role-mixin.js +9 -11
- package/components/list/list-item.js +7 -9
- package/components/list/list.js +121 -125
- package/components/loading-spinner/loading-spinner.js +93 -97
- package/custom-elements.json +1920 -6694
- package/package.json +3 -2
|
@@ -63,79 +63,77 @@ export const ListItemMixin = superclass => class extends composeMixins(
|
|
|
63
63
|
ListItemRoleMixin,
|
|
64
64
|
SkeletonMixin) {
|
|
65
65
|
|
|
66
|
-
static
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
};
|
|
134
|
-
}
|
|
66
|
+
static properties = {
|
|
67
|
+
/**
|
|
68
|
+
* A color indicator to appear at the beginning of a list item. Expected value is a valid 3, 4, 6, or 8 character CSS color hex code (e.g., #006fbf).
|
|
69
|
+
* @type {string}
|
|
70
|
+
*/
|
|
71
|
+
color: { type: String },
|
|
72
|
+
/**
|
|
73
|
+
* @ignore
|
|
74
|
+
*/
|
|
75
|
+
first: { type: Boolean, reflect: true },
|
|
76
|
+
/**
|
|
77
|
+
* Whether to allow the drag target to be the handle only rather than the entire cell
|
|
78
|
+
* @type {boolean}
|
|
79
|
+
*/
|
|
80
|
+
dragTargetHandleOnly: { type: Boolean, attribute: 'drag-target-handle-only' },
|
|
81
|
+
/**
|
|
82
|
+
* Inline start padding (in px) to apply to list item(s) in the nested slot. When used, nested list items will not use the grid start calcuations and will only use this number to determine indentation.
|
|
83
|
+
* @type {number}
|
|
84
|
+
*/
|
|
85
|
+
indentation: { type: Number, reflect: true },
|
|
86
|
+
/**
|
|
87
|
+
* @ignore
|
|
88
|
+
*/
|
|
89
|
+
last: { type: Boolean, reflect: true },
|
|
90
|
+
/**
|
|
91
|
+
* @ignore
|
|
92
|
+
*/
|
|
93
|
+
layout: { type: String, reflect: true },
|
|
94
|
+
/**
|
|
95
|
+
* Whether to disable rendering the entire item as the primary action. Required if slotted content is interactive.
|
|
96
|
+
* @type {boolean}
|
|
97
|
+
*/
|
|
98
|
+
noPrimaryAction: { type: Boolean, attribute: 'no-primary-action' },
|
|
99
|
+
/**
|
|
100
|
+
* How much padding to render in standard/normal list items
|
|
101
|
+
* @type {'normal'|'none'}
|
|
102
|
+
*/
|
|
103
|
+
paddingType: { type: String, attribute: 'padding-type' },
|
|
104
|
+
/**
|
|
105
|
+
* Whether to disable rendering the entire item as the primary action. Required if slotted content is interactive.
|
|
106
|
+
* @type {boolean}
|
|
107
|
+
*/
|
|
108
|
+
tileHeader: { type: Boolean, reflect: true, attribute: 'tile-header' },
|
|
109
|
+
/**
|
|
110
|
+
* How much padding to render in tile list items
|
|
111
|
+
* @type {'normal'|'none'}
|
|
112
|
+
* @default "normal"
|
|
113
|
+
*/
|
|
114
|
+
tilePaddingType: { type: String, attribute: 'tile-padding-type' },
|
|
115
|
+
_addButtonText: { state: true },
|
|
116
|
+
_displayKeyboardTooltip: { type: Boolean },
|
|
117
|
+
_hasColorSlot: { type: Boolean, reflect: true, attribute: '_has-color-slot' },
|
|
118
|
+
_hasListItemContent: { state: true },
|
|
119
|
+
_hasNestedList: { type: Boolean, reflect: true, attribute: '_has-nested-list' },
|
|
120
|
+
_hasNestedListAddButton: { type: Boolean, reflect: true, attribute: '_has-nested-list-add-button' },
|
|
121
|
+
_hovering: { type: Boolean, reflect: true },
|
|
122
|
+
_hoveringControl: { type: Boolean, attribute: '_hovering-control', reflect: true },
|
|
123
|
+
_hoveringPrimaryAction: { type: Boolean, attribute: '_hovering-primary-action', reflect: true },
|
|
124
|
+
_focusing: { type: Boolean, reflect: true },
|
|
125
|
+
_focusingPrimaryAction: { type: Boolean, attribute: '_focusing-primary-action', reflect: true },
|
|
126
|
+
_forceShowSelection: { type: Boolean, attribute: '_force-show-selection', reflect: true },
|
|
127
|
+
_highlight: { type: Boolean, reflect: true },
|
|
128
|
+
_highlighting: { type: Boolean, reflect: true },
|
|
129
|
+
_showAddButton: { type: Boolean, attribute: '_show-add-button', reflect: true },
|
|
130
|
+
_selectionWhenInteracted: { type: Boolean, attribute: '_selection-when-interacted', reflect: true },
|
|
131
|
+
_siblingHasColor: { state: true },
|
|
132
|
+
};
|
|
135
133
|
|
|
136
134
|
static get styles() {
|
|
137
135
|
|
|
138
|
-
const styles = [
|
|
136
|
+
const styles = [css`
|
|
139
137
|
:host {
|
|
140
138
|
display: block;
|
|
141
139
|
position: relative;
|
|
@@ -4,27 +4,25 @@ import { ListItemLinkMixin } from './list-item-link-mixin.js';
|
|
|
4
4
|
|
|
5
5
|
export const ListItemNavMixin = superclass => class extends ListItemLinkMixin(superclass) {
|
|
6
6
|
|
|
7
|
-
static
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
};
|
|
23
|
-
}
|
|
7
|
+
static properties = {
|
|
8
|
+
/**
|
|
9
|
+
* Whether the list item is the current page in a navigation context. At most one list item should have the `current` attribute at any time; this will be managed by the `list` after initial render.
|
|
10
|
+
* @type {boolean}
|
|
11
|
+
*/
|
|
12
|
+
current: { type: Boolean, reflect: true },
|
|
13
|
+
/**
|
|
14
|
+
* Whether to prevent the default navigation behavior of the link
|
|
15
|
+
* @type {boolean}
|
|
16
|
+
*/
|
|
17
|
+
preventNavigation: { type: Boolean, attribute: 'prevent-navigation' },
|
|
18
|
+
_childCurrent: { type: Boolean, reflect: true, attribute: '_child-current' },
|
|
19
|
+
_hasCurrentParent: { type: Boolean, reflect: true, attribute: '_has-current-parent' },
|
|
20
|
+
_nextSiblingCurrent: { type: Boolean, reflect: true, attribute: '_next-sibling-current' },
|
|
21
|
+
};
|
|
24
22
|
|
|
25
23
|
static get styles() {
|
|
26
24
|
|
|
27
|
-
const styles = [
|
|
25
|
+
const styles = [css`
|
|
28
26
|
:host([action-href]:not([action-href=""])) {
|
|
29
27
|
--d2l-list-item-content-text-color: var(--d2l-color-ferrite);
|
|
30
28
|
}
|
|
@@ -65,7 +63,7 @@ export const ListItemNavMixin = superclass => class extends ListItemLinkMixin(su
|
|
|
65
63
|
:host([current]) .d2l-list-item-color-outer {
|
|
66
64
|
padding-block: 3px;
|
|
67
65
|
}
|
|
68
|
-
`
|
|
66
|
+
`];
|
|
69
67
|
|
|
70
68
|
super.styles && styles.unshift(super.styles);
|
|
71
69
|
return styles;
|
|
@@ -7,73 +7,71 @@ class ListItemPlacementMarker extends LitElement {
|
|
|
7
7
|
vertical: { type: Boolean, reflect: true }
|
|
8
8
|
};
|
|
9
9
|
|
|
10
|
-
static
|
|
11
|
-
|
|
12
|
-
:
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
:
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
:
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
:
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
:
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
:
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
:
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
`;
|
|
76
|
-
}
|
|
10
|
+
static styles = css`
|
|
11
|
+
:host {
|
|
12
|
+
display: block;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
:host([vertical]) {
|
|
16
|
+
height: 100%;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
:host([hidden]) {
|
|
20
|
+
display: none;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
:host([vertical]) .d2l-list-drag-marker-line {
|
|
24
|
+
height: 100%;
|
|
25
|
+
margin: -1px 0;
|
|
26
|
+
width: 12px;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.d2l-list-drag-marker-line {
|
|
30
|
+
height: 12px;
|
|
31
|
+
margin-inline: -1px;
|
|
32
|
+
stroke: var(--d2l-color-celestine);
|
|
33
|
+
stroke-width: 3px;
|
|
34
|
+
width: 100%;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
:host([vertical]) .d2l-list-drag-marker-linecap {
|
|
38
|
+
height: 4px;
|
|
39
|
+
margin-inline: 0 -2px;
|
|
40
|
+
width: 12px;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.d2l-list-drag-marker-linecap {
|
|
44
|
+
fill: var(--d2l-color-celestine);
|
|
45
|
+
height: 12px;
|
|
46
|
+
margin-inline: -1px 0;
|
|
47
|
+
stroke: none;
|
|
48
|
+
width: 4px;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
:host([vertical]) .d2l-list-drag-marker-circle {
|
|
52
|
+
margin-inline: 0 0;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
.d2l-list-drag-marker-circle {
|
|
57
|
+
fill: none;
|
|
58
|
+
height: 12px;
|
|
59
|
+
margin-inline: 0 -1px;
|
|
60
|
+
stroke: var(--d2l-color-celestine);
|
|
61
|
+
stroke-width: 3px;
|
|
62
|
+
width: 12px;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
.d2l-list-drag-marker {
|
|
66
|
+
display: flex;
|
|
67
|
+
flex-wrap: nowrap;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
:host([vertical]) .d2l-list-drag-marker {
|
|
71
|
+
flex-direction: column;
|
|
72
|
+
height: 100%;
|
|
73
|
+
}
|
|
74
|
+
`;
|
|
77
75
|
|
|
78
76
|
constructor() {
|
|
79
77
|
super();
|
|
@@ -2,17 +2,15 @@ import { findComposedAncestor } from '../../helpers/dom.js';
|
|
|
2
2
|
|
|
3
3
|
export const ListItemRoleMixin = superclass => class extends superclass {
|
|
4
4
|
|
|
5
|
-
static
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
};
|
|
15
|
-
}
|
|
5
|
+
static properties = {
|
|
6
|
+
/**
|
|
7
|
+
* @ignore
|
|
8
|
+
*/
|
|
9
|
+
// eslint-disable-next-line lit/no-native-attributes
|
|
10
|
+
role: { type: String, reflect: true },
|
|
11
|
+
_nested: { type: Boolean, reflect: true },
|
|
12
|
+
_separators: { type: String, reflect: true }
|
|
13
|
+
};
|
|
16
14
|
|
|
17
15
|
constructor() {
|
|
18
16
|
super();
|
|
@@ -10,15 +10,13 @@ import { LitElement } from 'lit';
|
|
|
10
10
|
*/
|
|
11
11
|
class ListItem extends ListItemLinkMixin(LitElement) {
|
|
12
12
|
|
|
13
|
-
static
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
};
|
|
21
|
-
}
|
|
13
|
+
static properties = {
|
|
14
|
+
/**
|
|
15
|
+
* Address of item link if navigable
|
|
16
|
+
* @type {string}
|
|
17
|
+
*/
|
|
18
|
+
href: { type: String }
|
|
19
|
+
};
|
|
22
20
|
|
|
23
21
|
get href() {
|
|
24
22
|
return this.actionHref;
|
package/components/list/list.js
CHANGED
|
@@ -35,134 +35,130 @@ const ro = new ResizeObserver(entries => {
|
|
|
35
35
|
*/
|
|
36
36
|
class List extends PageableMixin(SelectionMixin(LitElement)) {
|
|
37
37
|
|
|
38
|
-
static
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
* @type {boolean}
|
|
38
|
+
static properties = {
|
|
39
|
+
/**
|
|
40
|
+
* When true, show the inline add button after each list item.
|
|
41
|
+
* @type {boolean}
|
|
42
|
+
*/
|
|
43
|
+
addButton: { type: Boolean, reflect: true, attribute: 'add-button' },
|
|
44
|
+
/**
|
|
45
|
+
* Text to show in label tooltip on inline add button. Defaults to "Add Item".
|
|
46
|
+
* @type {string}
|
|
47
|
+
*/
|
|
48
|
+
addButtonText: { type: String, reflect: true, attribute: 'add-button-text' },
|
|
49
|
+
/**
|
|
50
|
+
* Breakpoints for responsiveness in pixels. There are four different breakpoints and only the four largest breakpoints will be used.
|
|
51
|
+
* @type {array}
|
|
52
|
+
*/
|
|
53
|
+
breakpoints: { type: Array },
|
|
54
|
+
/**
|
|
55
|
+
* Always show drag handle
|
|
56
|
+
* @type {boolean}
|
|
57
|
+
*/
|
|
58
|
+
dragHandleShowAlways: { type: Boolean, attribute: 'drag-handle-show-always' },
|
|
59
|
+
/**
|
|
60
|
+
* Whether the user can drag multiple items
|
|
61
|
+
* @type {boolean}
|
|
63
62
|
*/
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
63
|
+
dragMultiple: { type: Boolean, reflect: true, attribute: 'drag-multiple' },
|
|
64
|
+
/**
|
|
65
|
+
* Disable ability to drop items above or below this item
|
|
66
|
+
* @type {boolean}
|
|
67
|
+
*/
|
|
68
|
+
dropNestedOnly: { type: Boolean, attribute: 'drop-nested-only' },
|
|
69
|
+
/**
|
|
70
|
+
* Whether to extend the separators beyond the content's edge
|
|
71
|
+
* @type {boolean}
|
|
72
|
+
*/
|
|
73
|
+
extendSeparators: { type: Boolean, reflect: true, attribute: 'extend-separators' },
|
|
74
|
+
/**
|
|
75
|
+
* Use grid to manage focus with arrow keys. See [Accessibility](#accessibility).
|
|
76
|
+
* @type {boolean}
|
|
77
|
+
*/
|
|
78
|
+
grid: { type: Boolean },
|
|
79
|
+
/**
|
|
80
|
+
* Sets an accessible label. For use when the list context is unclear. This property is only valid on top-level lists and will have no effect on nested lists.
|
|
81
|
+
* @type {string}
|
|
83
82
|
*/
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
:
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
:
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
:
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
:
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
:
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
:
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
margin-bottom: calc(6px + 0.4rem); /* controls section margin-bottom + spacing for add-button */
|
|
154
|
-
}
|
|
83
|
+
label: { type: String },
|
|
84
|
+
/**
|
|
85
|
+
* The type of layout for the list items. Valid values are "list" (default) and "tiles". The tile layout is only valid for single level (non-nested) lists.
|
|
86
|
+
* @type {'list'|'tiles'}
|
|
87
|
+
* @default "list"
|
|
88
|
+
*/
|
|
89
|
+
layout: { type: String, reflect: true },
|
|
90
|
+
/**
|
|
91
|
+
* Display separators. Valid values are "all" (default), "between", "none"
|
|
92
|
+
* @type {'all'|'between'|'none'}
|
|
93
|
+
* @default "all"
|
|
94
|
+
*/
|
|
95
|
+
separators: { type: String, reflect: true },
|
|
96
|
+
/**
|
|
97
|
+
* Show selection only on hover, focus or if at least one item is selected. Exclusive for the tile layout
|
|
98
|
+
* @type {boolean}
|
|
99
|
+
*/
|
|
100
|
+
selectionWhenInteracted: { type: Boolean, attribute: 'selection-when-interacted', reflect: true },
|
|
101
|
+
_breakpoint: { type: Number, reflect: true },
|
|
102
|
+
_slimColor: { type: Boolean, reflect: true, attribute: '_slim-color' }
|
|
103
|
+
};
|
|
104
|
+
|
|
105
|
+
static styles = css`
|
|
106
|
+
:host {
|
|
107
|
+
--d2l-list-item-color-border-radius: 6px;
|
|
108
|
+
--d2l-list-item-color-width: 6px;
|
|
109
|
+
--d2l-list-item-illustration-margin-inline-end: 0.9rem;
|
|
110
|
+
--d2l-list-item-illustration-max-height: 2.6rem;
|
|
111
|
+
--d2l-list-item-illustration-max-width: 4.5rem;
|
|
112
|
+
display: block;
|
|
113
|
+
}
|
|
114
|
+
:host([layout="tiles"]) > .d2l-list-content {
|
|
115
|
+
display: flex;
|
|
116
|
+
flex-wrap: wrap;
|
|
117
|
+
gap: 0.9rem;
|
|
118
|
+
justify-content: normal;
|
|
119
|
+
}
|
|
120
|
+
:host(:not([slot="nested"])) > .d2l-list-content {
|
|
121
|
+
padding-bottom: 1px;
|
|
122
|
+
}
|
|
123
|
+
:host([hidden]) {
|
|
124
|
+
display: none;
|
|
125
|
+
}
|
|
126
|
+
slot[name="pager"]::slotted(*) {
|
|
127
|
+
margin-top: 10px;
|
|
128
|
+
}
|
|
129
|
+
:host([extend-separators]) slot[name="pager"]::slotted(*) {
|
|
130
|
+
margin-left: 0.9rem;
|
|
131
|
+
margin-right: 0.9rem;
|
|
132
|
+
}
|
|
133
|
+
:host([_breakpoint="1"]) {
|
|
134
|
+
--d2l-list-item-illustration-max-height: 3.55rem;
|
|
135
|
+
--d2l-list-item-illustration-max-width: 6rem;
|
|
136
|
+
}
|
|
137
|
+
:host([_breakpoint="2"]) {
|
|
138
|
+
--d2l-list-item-illustration-max-height: 5.1rem;
|
|
139
|
+
--d2l-list-item-illustration-max-width: 9rem;
|
|
140
|
+
}
|
|
141
|
+
:host([_breakpoint="3"]) {
|
|
142
|
+
--d2l-list-item-illustration-max-height: 6rem;
|
|
143
|
+
--d2l-list-item-illustration-max-width: 10.8rem;
|
|
144
|
+
}
|
|
145
|
+
:host([_slim-color]) {
|
|
146
|
+
--d2l-list-item-color-border-radius: 3px;
|
|
147
|
+
--d2l-list-item-color-width: 3px;
|
|
148
|
+
}
|
|
149
|
+
:host([add-button]) ::slotted([slot="controls"]) {
|
|
150
|
+
margin-bottom: calc(6px + 0.4rem); /* controls section margin-bottom + spacing for add-button */
|
|
151
|
+
}
|
|
155
152
|
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
}
|
|
153
|
+
::slotted(.d2l-list-tile-break) {
|
|
154
|
+
display: none;
|
|
155
|
+
}
|
|
156
|
+
:host([layout="tiles"]) ::slotted(.d2l-list-tile-break) {
|
|
157
|
+
display: block;
|
|
158
|
+
flex-basis: 100%;
|
|
159
|
+
height: 0;
|
|
160
|
+
}
|
|
161
|
+
`;
|
|
166
162
|
|
|
167
163
|
constructor() {
|
|
168
164
|
super();
|