@brightspace-ui/labs 2.55.1 → 2.56.2
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/demo/components/ou-filter/ouFilterDemoPage.js +14 -16
- package/package.json +4 -3
- package/src/components/accessibility-disability-simulator/accessibility-disability-simulator.js +70 -74
- package/src/components/accordion/accordion-collapse.js +161 -164
- package/src/components/accordion/accordion.js +14 -17
- package/src/components/attribute-picker/attribute-picker-item.js +63 -66
- package/src/components/attribute-picker/attribute-picker.js +118 -121
- package/src/components/card-overlay/card-overlay.js +53 -55
- package/src/components/checkbox-drawer/checkbox-drawer.js +32 -36
- package/src/components/community/community-base.js +3 -5
- package/src/components/community/community-button.js +3 -5
- package/src/components/community/community-link.js +4 -6
- package/src/components/file-uploader/file-uploader.js +148 -151
- package/src/components/grade-result/grade-result-icon-button.js +5 -6
- package/src/components/grade-result/grade-result-letter-score.js +18 -22
- package/src/components/grade-result/grade-result-numeric-score.js +25 -28
- package/src/components/grade-result/grade-result-presentational.js +133 -136
- package/src/components/grade-result/grade-result-student-grade-preview.js +38 -42
- package/src/components/media-player/media-player-audio-bars.js +28 -31
- package/src/components/media-player/media-player.js +471 -475
- package/src/components/media-player/slider-bar.js +119 -122
- package/src/components/navigation/navigation-band.js +69 -71
- package/src/components/navigation/navigation-button-icon.js +51 -55
- package/src/components/navigation/navigation-dropdown-button-custom.js +13 -17
- package/src/components/navigation/navigation-dropdown-button-icon.js +21 -25
- package/src/components/navigation/navigation-immersive.js +128 -132
- package/src/components/navigation/navigation-iterator.js +24 -24
- package/src/components/navigation/navigation-link-back.js +13 -17
- package/src/components/navigation/navigation-link-icon.js +36 -40
- package/src/components/navigation/navigation-link-image.js +31 -35
- package/src/components/navigation/navigation-link.js +34 -38
- package/src/components/navigation/navigation-main-footer.js +7 -9
- package/src/components/navigation/navigation-main-header.js +34 -36
- package/src/components/navigation/navigation-notification-icon.js +30 -34
- package/src/components/navigation/navigation.js +19 -23
- package/src/components/opt-in-flyout/flyout-impl.js +138 -146
- package/src/components/opt-in-flyout/opt-in-flyout.js +14 -18
- package/src/components/opt-in-flyout/opt-out-dialog.js +63 -67
- package/src/components/opt-in-flyout/opt-out-flyout.js +15 -19
- package/src/components/opt-in-flyout/opt-out-reason-selector.js +38 -45
- package/src/components/opt-in-flyout/opt-out-reason.js +9 -13
- package/src/components/ou-filter/ou-filter.js +14 -18
- package/src/components/ou-filter/tree-filter.js +22 -26
- package/src/components/ou-filter/tree-selector-node.js +62 -66
- package/src/components/ou-filter/tree-selector.js +55 -62
- package/src/components/pagination/pager-numeric.js +35 -39
- package/src/components/view-toggle/view-toggle.js +79 -81
- package/src/components/wizard/single-step-header.js +106 -110
- package/src/components/wizard/wizard-step.js +65 -68
- package/src/components/wizard/wizard.js +30 -33
- package/src/utilities/reactive-store/README.md +10 -15
|
@@ -16,22 +16,20 @@ function parseHash(hash) {
|
|
|
16
16
|
/* eslint-disable no-console */
|
|
17
17
|
class OuFilterDemoPage extends MobxLitElement {
|
|
18
18
|
|
|
19
|
-
static
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
:
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
];
|
|
34
|
-
}
|
|
19
|
+
static styles = [
|
|
20
|
+
css`
|
|
21
|
+
:host {
|
|
22
|
+
display: inline-block;
|
|
23
|
+
}
|
|
24
|
+
div {
|
|
25
|
+
padding: 30px;
|
|
26
|
+
}
|
|
27
|
+
label {
|
|
28
|
+
display: block;
|
|
29
|
+
margin-top: 25px;
|
|
30
|
+
}
|
|
31
|
+
`
|
|
32
|
+
];
|
|
35
33
|
|
|
36
34
|
constructor() {
|
|
37
35
|
super();
|
package/package.json
CHANGED
|
@@ -80,7 +80,7 @@
|
|
|
80
80
|
"@web/dev-server": "^0.4",
|
|
81
81
|
"@web/rollup-plugin-html": "^3",
|
|
82
82
|
"eslint": "^9",
|
|
83
|
-
"eslint-config-brightspace": "^
|
|
83
|
+
"eslint-config-brightspace": "^4",
|
|
84
84
|
"glob-all": "^3",
|
|
85
85
|
"messageformat-validator": "^3.0.0-beta.5",
|
|
86
86
|
"rollup": "^4",
|
|
@@ -96,7 +96,8 @@
|
|
|
96
96
|
"/demo/components/ou-filter/*.js"
|
|
97
97
|
],
|
|
98
98
|
"publishConfig": {
|
|
99
|
-
"access": "public"
|
|
99
|
+
"access": "public",
|
|
100
|
+
"registry": "https://registry.npmjs.org/"
|
|
100
101
|
},
|
|
101
102
|
"dependencies": {
|
|
102
103
|
"@adobe/lit-mobx": "^2",
|
|
@@ -111,5 +112,5 @@
|
|
|
111
112
|
"parse-srt": "^1.0.0-alpha",
|
|
112
113
|
"webvtt-parser": "^2"
|
|
113
114
|
},
|
|
114
|
-
"version": "2.
|
|
115
|
+
"version": "2.56.2"
|
|
115
116
|
}
|
package/src/components/accessibility-disability-simulator/accessibility-disability-simulator.js
CHANGED
|
@@ -23,81 +23,77 @@ const otherTypes = Object.entries(DISABILITY_TYPES).filter(value => !value[0].in
|
|
|
23
23
|
|
|
24
24
|
class AccessibilityDisabilitySimulator extends LocalizeLabsElement(LitElement) {
|
|
25
25
|
|
|
26
|
-
static
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
26
|
+
static properties = {
|
|
27
|
+
/**
|
|
28
|
+
* The level of blurriness when the low-vision filter is being used, should range between 1 and 100
|
|
29
|
+
* @type {Number}
|
|
30
|
+
*/
|
|
31
|
+
blurLevel: { type: Number, attribute: 'blur-level', reflect: true },
|
|
32
|
+
/**
|
|
33
|
+
* The type of disability to simulate
|
|
34
|
+
* @type {'no-vision'|'low-vision'|'keyboard-only'|'colorblind-achromatopsia'|'colorblind-deuteranopia'|'colorblind-protanopia'|'colorblind-tritanopia'}
|
|
35
|
+
*/
|
|
36
|
+
disabilityType: { type: String, attribute: 'disability-type', reflect: true },
|
|
37
|
+
/**
|
|
38
|
+
* Whether or not the alert should be shown
|
|
39
|
+
* @type {Boolean}
|
|
40
|
+
*/
|
|
41
|
+
hideAlert: { type: Boolean, attribute: 'hide-alert' },
|
|
42
|
+
/**
|
|
43
|
+
* Whether or not to show the disability type selection and blur level controls
|
|
44
|
+
* @type {Boolean}
|
|
45
|
+
*/
|
|
46
|
+
hideControls: { type: Boolean, attribute: 'hide-controls' }
|
|
47
|
+
};
|
|
48
|
+
|
|
49
|
+
static styles = [bodyCompactStyles, bodyStandardStyles, offscreenStyles, selectStyles, css`
|
|
50
|
+
.simulator-controls {
|
|
51
|
+
align-items: center;
|
|
52
|
+
display: flex;
|
|
53
|
+
gap: 0.5rem;
|
|
54
|
+
margin-bottom: 1rem;
|
|
55
|
+
}
|
|
50
56
|
|
|
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
|
-
:
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
:
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
:
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
:
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
:host([disability-type="colorblind-protanopia"]) .wrapper-slot {
|
|
93
|
-
filter: url("#protanopia");
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
:host([disability-type="colorblind-tritanopia"]) .wrapper-slot {
|
|
97
|
-
filter: url("#tritanopia");
|
|
98
|
-
}
|
|
99
|
-
` ];
|
|
100
|
-
}
|
|
57
|
+
.low-vision-slider {
|
|
58
|
+
align-items: center;
|
|
59
|
+
display: flex;
|
|
60
|
+
gap: 0.5rem;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.alert-message {
|
|
64
|
+
display: inline-block;
|
|
65
|
+
margin-bottom: 1rem;
|
|
66
|
+
padding: 0.5rem;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
.svg-filter {
|
|
70
|
+
display: none;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
:host([disability-type="keyboard-only"]) .wrapper-slot {
|
|
74
|
+
pointer-events: none;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
:host([disability-type="no-vision"]) .wrapper-slot {
|
|
78
|
+
filter: grayscale(1);
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
:host([disability-type="colorblind-achromatopsia"]) .wrapper-slot {
|
|
82
|
+
filter: grayscale(1);
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
:host([disability-type="colorblind-deuteranopia"]) .wrapper-slot {
|
|
86
|
+
filter: url("#deuteranopia");
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
:host([disability-type="colorblind-protanopia"]) .wrapper-slot {
|
|
90
|
+
filter: url("#protanopia");
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
:host([disability-type="colorblind-tritanopia"]) .wrapper-slot {
|
|
94
|
+
filter: url("#tritanopia");
|
|
95
|
+
}
|
|
96
|
+
`];
|
|
101
97
|
|
|
102
98
|
constructor() {
|
|
103
99
|
super();
|
|
@@ -6,172 +6,169 @@ import { findComposedAncestor, isComposedAncestor } from '@brightspace-ui/core/h
|
|
|
6
6
|
import { offscreenStyles } from '@brightspace-ui/core/components/offscreen/offscreen.js';
|
|
7
7
|
|
|
8
8
|
class LabsAccordionCollapse extends LitElement {
|
|
9
|
-
static get properties() {
|
|
10
|
-
return {
|
|
11
|
-
/**
|
|
12
|
-
* Label. Does not apply title to entire accordion
|
|
13
|
-
*/
|
|
14
|
-
label: { type: String },
|
|
15
|
-
/**
|
|
16
|
-
* Header text hidden on the screen, but to be read by a screen reader
|
|
17
|
-
*/
|
|
18
|
-
screenReaderHeaderText: { type: String, attribute: 'screen-reader-header-text' },
|
|
19
|
-
/**
|
|
20
|
-
* Corresponds to the iron-collapse's noAnimation property.
|
|
21
|
-
*/
|
|
22
|
-
noAnimation: { type: Boolean, attribute: 'no-animation' },
|
|
23
|
-
/**
|
|
24
|
-
* Whether currently expanded.
|
|
25
|
-
*/
|
|
26
|
-
opened: { type: Boolean, reflect: true },
|
|
27
|
-
/**
|
|
28
|
-
* The icon when collapsed.
|
|
29
|
-
*/
|
|
30
|
-
expandIcon: { type: String, attribute: 'expand-icon' },
|
|
31
|
-
/**
|
|
32
|
-
* The icon when expanded.
|
|
33
|
-
*/
|
|
34
|
-
collapseIcon: { type: String, attribute: 'collapse-icon' },
|
|
35
|
-
/**
|
|
36
|
-
* Whether to hide the expand/collapse icon.
|
|
37
|
-
*/
|
|
38
|
-
noIcons: { type: Boolean, attribute: 'no-icons' },
|
|
39
|
-
/**
|
|
40
|
-
* Whether or not to use flex layout.
|
|
41
|
-
*/
|
|
42
|
-
flex: { type: Boolean, reflect: true },
|
|
43
|
-
/**
|
|
44
|
-
* Whether or not to add extra padding for icon.
|
|
45
|
-
*/
|
|
46
|
-
iconHasPadding: { type: Boolean, attribute: 'icon-has-padding', reflect: true },
|
|
47
|
-
/**
|
|
48
|
-
* Whether or not to add a border between the header and the content.
|
|
49
|
-
*/
|
|
50
|
-
headerBorder: { type: Boolean, attribute: 'header-border' },
|
|
51
|
-
/**
|
|
52
|
-
* Whether the accordion's expand/collapse function is disabled.
|
|
53
|
-
*/
|
|
54
|
-
disabled: { type: Boolean, reflect: true },
|
|
55
|
-
/**
|
|
56
|
-
* Whether or not to disable default focus styles
|
|
57
|
-
*/
|
|
58
|
-
disableDefaultTriggerFocus: { type: Boolean, attribute: 'disable-default-trigger-focus', reflect: true },
|
|
59
|
-
/**
|
|
60
|
-
* Whether or not the header contains an interactive element inside it (e.g. clickable)
|
|
61
|
-
*/
|
|
62
|
-
headerHasInteractiveContent: { type: Boolean, attribute: 'header-has-interactive-content', reflect: true },
|
|
63
|
-
/**
|
|
64
|
-
* Listener for state changes.
|
|
65
|
-
*/
|
|
66
|
-
_boundListener: { type: Function, attribute: '_bound-listener' },
|
|
67
|
-
/**
|
|
68
|
-
* The current state of the accordion (opened, closed)
|
|
69
|
-
*/
|
|
70
|
-
_state: { type: String, reflect: true }
|
|
71
|
-
};
|
|
72
|
-
}
|
|
73
9
|
|
|
74
|
-
static
|
|
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
|
-
padding
|
|
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
|
-
:host([_state="opening"]) .summary,
|
|
138
|
-
:host([_state="opened"]) .summary {
|
|
139
|
-
opacity: 0;
|
|
140
|
-
}
|
|
141
|
-
:host([_state="closing"]) .summary,
|
|
142
|
-
:host([_state="opening"]) .summary,
|
|
143
|
-
:host([_state="opened"]) .summary {
|
|
144
|
-
pointer-events: none;
|
|
145
|
-
position: absolute;
|
|
146
|
-
}
|
|
147
|
-
:host([_state="closing"]) .summary,
|
|
148
|
-
:host([_state="opened"]) .summary {
|
|
149
|
-
transition-property: none;
|
|
150
|
-
}
|
|
151
|
-
:host([disabled]) a {
|
|
152
|
-
cursor: default;
|
|
153
|
-
}
|
|
154
|
-
:host([disabled]) d2l-icon {
|
|
155
|
-
color: var(--d2l-color-chromite);
|
|
156
|
-
}
|
|
157
|
-
:host([disable-default-trigger-focus]) #trigger:focus {
|
|
158
|
-
outline: none;
|
|
159
|
-
}
|
|
10
|
+
static properties = {
|
|
11
|
+
/**
|
|
12
|
+
* Label. Does not apply title to entire accordion
|
|
13
|
+
*/
|
|
14
|
+
label: { type: String },
|
|
15
|
+
/**
|
|
16
|
+
* Header text hidden on the screen, but to be read by a screen reader
|
|
17
|
+
*/
|
|
18
|
+
screenReaderHeaderText: { type: String, attribute: 'screen-reader-header-text' },
|
|
19
|
+
/**
|
|
20
|
+
* Corresponds to the iron-collapse's noAnimation property.
|
|
21
|
+
*/
|
|
22
|
+
noAnimation: { type: Boolean, attribute: 'no-animation' },
|
|
23
|
+
/**
|
|
24
|
+
* Whether currently expanded.
|
|
25
|
+
*/
|
|
26
|
+
opened: { type: Boolean, reflect: true },
|
|
27
|
+
/**
|
|
28
|
+
* The icon when collapsed.
|
|
29
|
+
*/
|
|
30
|
+
expandIcon: { type: String, attribute: 'expand-icon' },
|
|
31
|
+
/**
|
|
32
|
+
* The icon when expanded.
|
|
33
|
+
*/
|
|
34
|
+
collapseIcon: { type: String, attribute: 'collapse-icon' },
|
|
35
|
+
/**
|
|
36
|
+
* Whether to hide the expand/collapse icon.
|
|
37
|
+
*/
|
|
38
|
+
noIcons: { type: Boolean, attribute: 'no-icons' },
|
|
39
|
+
/**
|
|
40
|
+
* Whether or not to use flex layout.
|
|
41
|
+
*/
|
|
42
|
+
flex: { type: Boolean, reflect: true },
|
|
43
|
+
/**
|
|
44
|
+
* Whether or not to add extra padding for icon.
|
|
45
|
+
*/
|
|
46
|
+
iconHasPadding: { type: Boolean, attribute: 'icon-has-padding', reflect: true },
|
|
47
|
+
/**
|
|
48
|
+
* Whether or not to add a border between the header and the content.
|
|
49
|
+
*/
|
|
50
|
+
headerBorder: { type: Boolean, attribute: 'header-border' },
|
|
51
|
+
/**
|
|
52
|
+
* Whether the accordion's expand/collapse function is disabled.
|
|
53
|
+
*/
|
|
54
|
+
disabled: { type: Boolean, reflect: true },
|
|
55
|
+
/**
|
|
56
|
+
* Whether or not to disable default focus styles
|
|
57
|
+
*/
|
|
58
|
+
disableDefaultTriggerFocus: { type: Boolean, attribute: 'disable-default-trigger-focus', reflect: true },
|
|
59
|
+
/**
|
|
60
|
+
* Whether or not the header contains an interactive element inside it (e.g. clickable)
|
|
61
|
+
*/
|
|
62
|
+
headerHasInteractiveContent: { type: Boolean, attribute: 'header-has-interactive-content', reflect: true },
|
|
63
|
+
/**
|
|
64
|
+
* Listener for state changes.
|
|
65
|
+
*/
|
|
66
|
+
_boundListener: { type: Function, attribute: '_bound-listener' },
|
|
67
|
+
/**
|
|
68
|
+
* The current state of the accordion (opened, closed)
|
|
69
|
+
*/
|
|
70
|
+
_state: { type: String, reflect: true }
|
|
71
|
+
};
|
|
160
72
|
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
73
|
+
static styles = [offscreenStyles, css`
|
|
74
|
+
:host {
|
|
75
|
+
display: block;
|
|
76
|
+
}
|
|
77
|
+
#interactive-header-content {
|
|
78
|
+
align-items: center;
|
|
79
|
+
display: flex;
|
|
80
|
+
}
|
|
81
|
+
#trigger {
|
|
82
|
+
align-items: center;
|
|
83
|
+
display: flex;
|
|
84
|
+
text-decoration: none;
|
|
85
|
+
}
|
|
86
|
+
#trigger:focus-visible {
|
|
87
|
+
outline-offset: 3px;
|
|
88
|
+
}
|
|
89
|
+
#trigger[data-border] {
|
|
90
|
+
border-bottom: solid 1px var(--d2l-color-corundum);
|
|
91
|
+
margin-bottom: 0.4rem;
|
|
92
|
+
padding-bottom: 0.4rem;
|
|
93
|
+
}
|
|
94
|
+
#trigger, #trigger:visited, #trigger:hover, #trigger:active {
|
|
95
|
+
color: inherit;
|
|
96
|
+
}
|
|
97
|
+
:host([flex]) .collapse-title {
|
|
98
|
+
flex: 1;
|
|
99
|
+
flex-basis: 0.000000001px;
|
|
100
|
+
overflow: hidden;
|
|
101
|
+
}
|
|
102
|
+
:host([icon-has-padding]) d2l-icon {
|
|
103
|
+
padding-left: 1.25rem;
|
|
104
|
+
padding-right: 0;
|
|
105
|
+
}
|
|
106
|
+
:host([icon-has-padding][dir="rtl"]) d2l-icon {
|
|
107
|
+
padding-left: 0;
|
|
108
|
+
padding-right: 1.25rem;
|
|
109
|
+
}
|
|
110
|
+
:host([flex][icon-has-padding]) d2l-icon {
|
|
111
|
+
padding-left: 0;
|
|
112
|
+
padding-right: 1.25rem;
|
|
113
|
+
}
|
|
114
|
+
:host([flex][icon-has-padding][dir="rtl"]) d2l-icon {
|
|
115
|
+
padding-left: 1.25rem;
|
|
116
|
+
padding-right: 0;
|
|
117
|
+
}
|
|
118
|
+
.content {
|
|
119
|
+
height: auto;
|
|
120
|
+
margin: -1px;
|
|
121
|
+
padding: 1px;
|
|
122
|
+
position: relative;
|
|
123
|
+
}
|
|
124
|
+
.summary {
|
|
125
|
+
transition: opacity 500ms ease;
|
|
126
|
+
}
|
|
127
|
+
:host([_state="closing"]) .content,
|
|
128
|
+
:host([_state="opening"]) .content {
|
|
129
|
+
overflow: hidden;
|
|
130
|
+
}
|
|
131
|
+
:host([_state="closed"]) .summary,
|
|
132
|
+
:host([_state="closing"]) .summary {
|
|
133
|
+
transition-delay: 500ms;
|
|
134
|
+
}
|
|
135
|
+
:host([_state="opening"]) .summary,
|
|
136
|
+
:host([_state="opened"]) .summary {
|
|
137
|
+
opacity: 0;
|
|
138
|
+
}
|
|
139
|
+
:host([_state="closing"]) .summary,
|
|
140
|
+
:host([_state="opening"]) .summary,
|
|
141
|
+
:host([_state="opened"]) .summary {
|
|
142
|
+
pointer-events: none;
|
|
143
|
+
position: absolute;
|
|
144
|
+
}
|
|
145
|
+
:host([_state="closing"]) .summary,
|
|
146
|
+
:host([_state="opened"]) .summary {
|
|
147
|
+
transition-property: none;
|
|
148
|
+
}
|
|
149
|
+
:host([disabled]) a {
|
|
150
|
+
cursor: default;
|
|
151
|
+
}
|
|
152
|
+
:host([disabled]) d2l-icon {
|
|
153
|
+
color: var(--d2l-color-chromite);
|
|
154
|
+
}
|
|
155
|
+
:host([disable-default-trigger-focus]) #trigger:focus {
|
|
156
|
+
outline: none;
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
:host([header-has-interactive-content]) #header-container {
|
|
160
|
+
display: grid;
|
|
161
|
+
grid-template-columns: auto;
|
|
162
|
+
grid-template-rows: auto;
|
|
163
|
+
}
|
|
164
|
+
:host([header-has-interactive-content]) .header-grid-item {
|
|
165
|
+
grid-column: 1;
|
|
166
|
+
grid-row: 1;
|
|
167
|
+
}
|
|
168
|
+
:host([header-has-interactive-content]) #interactive-header-content {
|
|
169
|
+
cursor: pointer;
|
|
170
|
+
}
|
|
171
|
+
`];
|
|
175
172
|
|
|
176
173
|
constructor() {
|
|
177
174
|
super();
|
|
@@ -2,24 +2,21 @@ import './accordion-collapse.js';
|
|
|
2
2
|
import { css, html, LitElement } from 'lit';
|
|
3
3
|
|
|
4
4
|
class LabsAccordion extends LitElement {
|
|
5
|
-
static get properties() {
|
|
6
|
-
return {
|
|
7
|
-
/**
|
|
8
|
-
* Whether to automatically close other opened branches
|
|
9
|
-
*/
|
|
10
|
-
autoClose: { type: Boolean, attribute: 'auto-close' },
|
|
11
|
-
_selected: { type: Number }
|
|
12
|
-
};
|
|
13
|
-
}
|
|
14
5
|
|
|
15
|
-
static
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
6
|
+
static properties = {
|
|
7
|
+
/**
|
|
8
|
+
* Whether to automatically close other opened branches
|
|
9
|
+
*/
|
|
10
|
+
autoClose: { type: Boolean, attribute: 'auto-close' },
|
|
11
|
+
_selected: { type: Number }
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
static styles = css`
|
|
15
|
+
:host {
|
|
16
|
+
box-sizing: border-box;
|
|
17
|
+
display: block;
|
|
18
|
+
}
|
|
19
|
+
`;
|
|
23
20
|
|
|
24
21
|
constructor() {
|
|
25
22
|
super();
|