@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
|
@@ -22,120 +22,116 @@ const reduceMotion = matchMedia('(prefers-reduced-motion: reduce)').matches;
|
|
|
22
22
|
*/
|
|
23
23
|
class LoadingBackdrop extends PropertyRequiredMixin(LocalizeCoreElement(LitElement)) {
|
|
24
24
|
|
|
25
|
-
static
|
|
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
|
-
#visible {
|
|
67
|
-
display: none;
|
|
68
|
-
}
|
|
25
|
+
static properties = {
|
|
26
|
+
/**
|
|
27
|
+
* The state of data in the element being overlaid. Set to 'clean' when the data represents the user's latest selections, 'dirty' when the data does not represent the user's latest selections, and 'loading' if the data is being actively refreshed
|
|
28
|
+
* @type {'clean'|'dirty'|'loading'}
|
|
29
|
+
*/
|
|
30
|
+
dataState: {
|
|
31
|
+
reflect: true,
|
|
32
|
+
type: String
|
|
33
|
+
},
|
|
34
|
+
/**
|
|
35
|
+
* Used to identify content that the backdrop should make inert
|
|
36
|
+
* @type {string}
|
|
37
|
+
*/
|
|
38
|
+
for: { type: String, required: true },
|
|
39
|
+
/**
|
|
40
|
+
* The text displayed on the dirty state overlay when the 'dirty' dataState is set.
|
|
41
|
+
* @type {string}
|
|
42
|
+
*/
|
|
43
|
+
dirtyText: {
|
|
44
|
+
reflect: true,
|
|
45
|
+
attribute: 'dirty-text',
|
|
46
|
+
type: String
|
|
47
|
+
},
|
|
48
|
+
/**
|
|
49
|
+
* The text displayed on the button of the dirty state overlay when the 'dirty' dataState is set.
|
|
50
|
+
* @type {string}
|
|
51
|
+
*/
|
|
52
|
+
dirtyButtonText: {
|
|
53
|
+
reflect: true,
|
|
54
|
+
attribute: 'dirty-button-text',
|
|
55
|
+
type: String
|
|
56
|
+
},
|
|
57
|
+
_state: { type: String, reflect: true },
|
|
58
|
+
_spinnerTop: { state: true },
|
|
59
|
+
_ariaContent: { state: true }
|
|
60
|
+
};
|
|
61
|
+
|
|
62
|
+
static styles = [css`
|
|
63
|
+
#visible {
|
|
64
|
+
display: none;
|
|
65
|
+
}
|
|
69
66
|
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
67
|
+
:host([_state="showing"]),
|
|
68
|
+
:host([_state="shown"]),
|
|
69
|
+
:host([_state="hiding"]),
|
|
70
|
+
:host([_state="showing"]) #visible,
|
|
71
|
+
:host([_state="shown"]) #visible,
|
|
72
|
+
:host([_state="hiding"]) #visible {
|
|
73
|
+
display: flex;
|
|
74
|
+
height: 100%;
|
|
75
|
+
justify-content: center;
|
|
76
|
+
position: absolute;
|
|
77
|
+
top: 0;
|
|
78
|
+
width: 100%;
|
|
79
|
+
z-index: 999;
|
|
80
|
+
}
|
|
84
81
|
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
82
|
+
.backdrop {
|
|
83
|
+
background-color: var(--d2l-theme-backdrop-background-color);
|
|
84
|
+
height: 100%;
|
|
85
|
+
opacity: 0;
|
|
86
|
+
position: absolute;
|
|
87
|
+
top: 0;
|
|
88
|
+
width: 100%;
|
|
89
|
+
}
|
|
90
|
+
:host([_state="shown"]) .backdrop {
|
|
91
|
+
opacity: var(--d2l-theme-backdrop-opacity);
|
|
92
|
+
transition: opacity ${FADE_DURATION_MS}ms ease-in;
|
|
93
|
+
}
|
|
94
|
+
:host([_state="hiding"]) .backdrop {
|
|
95
|
+
transition: opacity ${FADE_DURATION_MS}ms ease-out;
|
|
96
|
+
}
|
|
100
97
|
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
98
|
+
d2l-loading-spinner {
|
|
99
|
+
opacity: 0;
|
|
100
|
+
position: absolute;
|
|
101
|
+
}
|
|
102
|
+
:host([_state="shown"]) d2l-loading-spinner {
|
|
103
|
+
opacity: 1;
|
|
104
|
+
transition: opacity ${FADE_DURATION_MS}ms ease-in ${SPINNER_DELAY_MS}ms;
|
|
105
|
+
}
|
|
106
|
+
:host([_state="shown"][dataState="dirty"]) d2l-loading-spinner,
|
|
107
|
+
:host([_state="hiding"]) d2l-loading-spinner {
|
|
108
|
+
opacity: 0;
|
|
109
|
+
transition: opacity ${FADE_DURATION_MS}ms ease-out;
|
|
110
|
+
}
|
|
114
111
|
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
112
|
+
d2l-backdrop-dirty-overlay {
|
|
113
|
+
background-color: var(--d2l-theme-backdrop-dialog-color);
|
|
114
|
+
height: fit-content;
|
|
115
|
+
justify-content: center;
|
|
116
|
+
opacity: 0;
|
|
117
|
+
position: relative;
|
|
118
|
+
top: 0;
|
|
119
|
+
z-index: 1000;
|
|
120
|
+
}
|
|
121
|
+
:host([_state="shown"]) d2l-backdrop-dirty-overlay {
|
|
122
|
+
opacity: 1;
|
|
123
|
+
transition: opacity ${FADE_DURATION_MS}ms ease-in;
|
|
124
|
+
}
|
|
125
|
+
:host([_state="shown"][dataState="loading"]) d2l-backdrop-dirty-overlay,
|
|
126
|
+
:host([_state="hiding"]) d2l-backdrop-dirty-overlay {
|
|
127
|
+
opacity: 0;
|
|
128
|
+
transition: opacity ${FADE_DURATION_MS}ms ease-out;
|
|
129
|
+
}
|
|
133
130
|
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
}
|
|
131
|
+
@media (prefers-reduced-motion: reduce) {
|
|
132
|
+
* { transition: none; }
|
|
133
|
+
}
|
|
134
|
+
`];
|
|
139
135
|
|
|
140
136
|
constructor() {
|
|
141
137
|
super();
|
|
@@ -20,64 +20,60 @@ let scrollOverflow = null;
|
|
|
20
20
|
*/
|
|
21
21
|
class Backdrop extends LitElement {
|
|
22
22
|
|
|
23
|
-
static
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
};
|
|
44
|
-
}
|
|
23
|
+
static properties = {
|
|
24
|
+
/**
|
|
25
|
+
* REQUIRED: id of the target element to display backdrop behind
|
|
26
|
+
* @type {string}
|
|
27
|
+
*/
|
|
28
|
+
forTarget: { type: String, attribute: 'for-target' },
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* Disables the fade-out transition while the backdrop is being hidden
|
|
32
|
+
* @type {boolean}
|
|
33
|
+
*/
|
|
34
|
+
noAnimateHide: { type: Boolean, attribute: 'no-animate-hide' },
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* Used to control whether the backdrop is shown
|
|
38
|
+
* @type {boolean}
|
|
39
|
+
*/
|
|
40
|
+
shown: { type: Boolean },
|
|
41
|
+
_state: { type: String, reflect: true }
|
|
42
|
+
};
|
|
45
43
|
|
|
46
|
-
static
|
|
47
|
-
|
|
48
|
-
:
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
44
|
+
static styles = [ css`
|
|
45
|
+
:host {
|
|
46
|
+
background-color: var(--d2l-theme-backdrop-background-color);
|
|
47
|
+
height: 0;
|
|
48
|
+
left: 0;
|
|
49
|
+
opacity: 0;
|
|
50
|
+
position: fixed;
|
|
51
|
+
top: 0;
|
|
52
|
+
transition: opacity ${TRANSITION_DURATION}ms ease-in;
|
|
53
|
+
width: 0;
|
|
54
|
+
z-index: 999;
|
|
55
|
+
}
|
|
56
|
+
:host([slow-transition]) {
|
|
57
|
+
transition: opacity 1200ms ease-in;
|
|
58
|
+
}
|
|
59
|
+
:host([_state="showing"]) {
|
|
60
|
+
opacity: var(--d2l-theme-backdrop-opacity);
|
|
61
|
+
}
|
|
62
|
+
:host([_state="showing"]),
|
|
63
|
+
:host([_state="hiding"]) {
|
|
64
|
+
height: 100%;
|
|
65
|
+
width: 100%;
|
|
66
|
+
}
|
|
67
|
+
:host([_state=null][no-animate-hide]) {
|
|
68
|
+
transition: none;
|
|
69
|
+
}
|
|
70
|
+
@media (prefers-reduced-motion: reduce) {
|
|
71
|
+
:host,
|
|
59
72
|
:host([slow-transition]) {
|
|
60
|
-
transition: opacity 1200ms ease-in;
|
|
61
|
-
}
|
|
62
|
-
:host([_state="showing"]) {
|
|
63
|
-
opacity: var(--d2l-theme-backdrop-opacity);
|
|
64
|
-
}
|
|
65
|
-
:host([_state="showing"]),
|
|
66
|
-
:host([_state="hiding"]) {
|
|
67
|
-
height: 100%;
|
|
68
|
-
width: 100%;
|
|
69
|
-
}
|
|
70
|
-
:host([_state=null][no-animate-hide]) {
|
|
71
73
|
transition: none;
|
|
72
74
|
}
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
:host([slow-transition]) {
|
|
76
|
-
transition: none;
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
`];
|
|
80
|
-
}
|
|
75
|
+
}
|
|
76
|
+
`];
|
|
81
77
|
|
|
82
78
|
constructor() {
|
|
83
79
|
super();
|
|
@@ -5,30 +5,26 @@ import { css, html, LitElement } from 'lit';
|
|
|
5
5
|
*/
|
|
6
6
|
class BreadcrumbCurrentPage extends LitElement {
|
|
7
7
|
|
|
8
|
-
static
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
};
|
|
20
|
-
}
|
|
8
|
+
static properties = {
|
|
9
|
+
/**
|
|
10
|
+
* @ignore
|
|
11
|
+
*/
|
|
12
|
+
_role: { type: 'string', attribute: 'role', reflect: true },
|
|
13
|
+
/**
|
|
14
|
+
* REQUIRED: The title of the current page
|
|
15
|
+
* @type {string}
|
|
16
|
+
*/
|
|
17
|
+
text: { type: String, reflect: true }
|
|
18
|
+
};
|
|
21
19
|
|
|
22
|
-
static
|
|
23
|
-
|
|
24
|
-
:
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
:
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
`;
|
|
31
|
-
}
|
|
20
|
+
static styles = css`
|
|
21
|
+
:host {
|
|
22
|
+
display: inline-block;
|
|
23
|
+
}
|
|
24
|
+
:host([hidden]) {
|
|
25
|
+
display: none;
|
|
26
|
+
}
|
|
27
|
+
`;
|
|
32
28
|
|
|
33
29
|
constructor() {
|
|
34
30
|
super();
|
|
@@ -10,61 +10,57 @@ import { linkStyles } from '../link/link.js';
|
|
|
10
10
|
*/
|
|
11
11
|
class Breadcrumb extends FocusMixin(LitElement) {
|
|
12
12
|
|
|
13
|
-
static
|
|
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
|
-
}
|
|
13
|
+
static properties = {
|
|
14
|
+
/**
|
|
15
|
+
* @ignore
|
|
16
|
+
*/
|
|
17
|
+
_compact: { attribute: 'data-compact', reflect: true, type: Boolean },
|
|
18
|
+
/**
|
|
19
|
+
* @ignore
|
|
20
|
+
*/
|
|
21
|
+
_role: { type: 'string', attribute: 'role', reflect: true },
|
|
22
|
+
/**
|
|
23
|
+
* The Url that breadcrumb is pointing to
|
|
24
|
+
* @type {string}
|
|
25
|
+
*/
|
|
26
|
+
href: { type: String, reflect: true },
|
|
27
|
+
/**
|
|
28
|
+
* The target of breadcrumb link
|
|
29
|
+
* @type {string}
|
|
30
|
+
*/
|
|
31
|
+
target: { type: String, reflect: true },
|
|
32
|
+
/**
|
|
33
|
+
* REQUIRED: The text of the breadcrumb link
|
|
34
|
+
* @type {string}
|
|
35
|
+
*/
|
|
36
|
+
text: { type: String, reflect: true },
|
|
37
|
+
/**
|
|
38
|
+
* ACCESSIBILITY: ARIA label for the breadcrumb, used if `text` does not provide enough context for screen reader users
|
|
39
|
+
* @type {string}
|
|
40
|
+
*/
|
|
41
|
+
ariaLabel: { attribute: 'aria-label', type: String, reflect: true }
|
|
42
|
+
};
|
|
45
43
|
|
|
46
|
-
static
|
|
47
|
-
|
|
48
|
-
:
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
:
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
:
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
`];
|
|
67
|
-
}
|
|
44
|
+
static styles = [linkStyles, css`
|
|
45
|
+
:host {
|
|
46
|
+
align-items: center;
|
|
47
|
+
display: inline-flex;
|
|
48
|
+
}
|
|
49
|
+
:host([hidden]) {
|
|
50
|
+
display: none;
|
|
51
|
+
}
|
|
52
|
+
:host([data-compact]) {
|
|
53
|
+
flex-direction: row-reverse;
|
|
54
|
+
}
|
|
55
|
+
d2l-icon {
|
|
56
|
+
height: 8px;
|
|
57
|
+
padding-inline: 8px 3px;
|
|
58
|
+
width: 8px;
|
|
59
|
+
}
|
|
60
|
+
d2l-icon[icon="tier1:chevron-left"] {
|
|
61
|
+
padding-inline: 0 8px;
|
|
62
|
+
}
|
|
63
|
+
`];
|
|
68
64
|
|
|
69
65
|
constructor() {
|
|
70
66
|
super();
|
|
@@ -9,45 +9,41 @@ import { overflowEllipsisDeclarations } from '../../helpers/overflow.js';
|
|
|
9
9
|
*/
|
|
10
10
|
class Breadcrumbs extends LocalizeCoreElement(LitElement) {
|
|
11
11
|
|
|
12
|
-
static
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
};
|
|
20
|
-
}
|
|
12
|
+
static properties = {
|
|
13
|
+
/**
|
|
14
|
+
* Renders in compact mode, displaying only the last item
|
|
15
|
+
* @type {boolean}
|
|
16
|
+
*/
|
|
17
|
+
compact: { type: Boolean, reflect: true }
|
|
18
|
+
};
|
|
21
19
|
|
|
22
|
-
static
|
|
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
|
-
}
|
|
20
|
+
static styles = css`
|
|
21
|
+
:host {
|
|
22
|
+
clip-path: rect(-1em 100% calc(100% + 1em) -1em);
|
|
23
|
+
display: block;
|
|
24
|
+
font-size: 0.7rem;
|
|
25
|
+
line-height: 1.05rem;
|
|
26
|
+
${overflowEllipsisDeclarations}
|
|
27
|
+
overflow-y: clip;
|
|
28
|
+
position: relative;
|
|
29
|
+
}
|
|
30
|
+
:host([hidden]) {
|
|
31
|
+
display: none;
|
|
32
|
+
}
|
|
33
|
+
:host::after {
|
|
34
|
+
background: linear-gradient(to var(--d2l-inline-end, right), rgba(255, 255, 255, 0), rgb(251, 252, 252));
|
|
35
|
+
content: "";
|
|
36
|
+
inset-block: 0;
|
|
37
|
+
inset-inline-end: 0;
|
|
38
|
+
pointer-events: none;
|
|
39
|
+
position: absolute;
|
|
40
|
+
width: 10px;
|
|
41
|
+
}
|
|
42
|
+
:host([compact]) ::slotted(d2l-breadcrumb:not(:last-of-type)),
|
|
43
|
+
:host([compact]) ::slotted(d2l-breadcrumb-current-page) {
|
|
44
|
+
display: none;
|
|
45
|
+
}
|
|
46
|
+
`;
|
|
51
47
|
|
|
52
48
|
constructor() {
|
|
53
49
|
super();
|