@brightspace-ui/core 2.50.1 → 2.50.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/components/dropdown/dropdown.js +9 -3
- package/components/tag-list/README.md +1 -1
- package/components/tag-list/demo/tag-list.html +30 -14
- package/components/tag-list/tag-list-item-mixin.js +72 -66
- package/components/tag-list/tag-list-item.js +4 -1
- package/components/tag-list/tag-list.js +5 -17
- package/lang/ar.js +2 -0
- package/lang/cy.js +2 -0
- package/lang/da.js +2 -0
- package/lang/de.js +2 -0
- package/lang/en.js +2 -0
- package/lang/es-es.js +2 -0
- package/lang/es.js +2 -0
- package/lang/fr-fr.js +2 -0
- package/lang/fr.js +2 -0
- package/lang/hi.js +2 -0
- package/lang/ja.js +2 -0
- package/lang/ko.js +2 -0
- package/lang/nl.js +2 -0
- package/lang/pt.js +2 -0
- package/lang/sv.js +2 -0
- package/lang/tr.js +2 -0
- package/lang/zh-cn.js +2 -0
- package/lang/zh-tw.js +2 -0
- package/package.json +1 -1
|
@@ -22,9 +22,15 @@ class Dropdown extends DropdownOpenerMixin(LitElement) {
|
|
|
22
22
|
*/
|
|
23
23
|
getOpenerElement() {
|
|
24
24
|
if (!this.shadowRoot) return undefined;
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
25
|
+
|
|
26
|
+
const nodes = this.shadowRoot.querySelector('slot').assignedNodes({ flatten: true });
|
|
27
|
+
for (let i = 0; i < nodes.length; i++) {
|
|
28
|
+
if (nodes[i].nodeType !== Node.ELEMENT_NODE) continue;
|
|
29
|
+
if (nodes[i].classList.contains('d2l-dropdown-opener')) return nodes[i];
|
|
30
|
+
if (nodes[i]._dropdownContent) continue;
|
|
31
|
+
const nestedOpener = nodes[i].querySelector('.d2l-dropdown-opener');
|
|
32
|
+
if (nestedOpener) return nestedOpener;
|
|
33
|
+
}
|
|
28
34
|
}
|
|
29
35
|
|
|
30
36
|
}
|
|
@@ -38,7 +38,7 @@ The corresponding `*-clear` event must be listened to for whatever component (`d
|
|
|
38
38
|
|
|
39
39
|
document.addEventListener('d2l-tag-list-item-clear', (e) => {
|
|
40
40
|
e.target.parentNode.removeChild(e.target);
|
|
41
|
-
console.log(`d2l-tag-list-item-clear event dispatched. Value: ${e.detail.value}
|
|
41
|
+
console.log(`d2l-tag-list-item-clear event dispatched. Value: ${e.detail.value}`);
|
|
42
42
|
});
|
|
43
43
|
|
|
44
44
|
document.addEventListener('d2l-tag-list-clear', (e) => {
|
|
@@ -42,31 +42,47 @@
|
|
|
42
42
|
</script>
|
|
43
43
|
<d2l-demo-snippet fullscreen>
|
|
44
44
|
<d2l-tag-list description="A bunch of example tags">
|
|
45
|
-
<d2l-tag-list-item text="Example
|
|
46
|
-
<d2l-tag-list-item text="
|
|
47
|
-
<d2l-tag-list-item text="
|
|
45
|
+
<d2l-tag-list-item text="Example 1"></d2l-tag-list-item>
|
|
46
|
+
<d2l-tag-list-item text="Example 2 - much much much much much much much much longer"></d2l-tag-list-item>
|
|
47
|
+
<d2l-tag-list-item text="Example 3"></d2l-tag-list-item>
|
|
48
48
|
<d2l-tag-list-item-mixin-consumer name="Custom Tag List Item"></d2l-tag-list-item-mixin-consumer>
|
|
49
|
-
<d2l-tag-list-item text="Example
|
|
50
|
-
<d2l-tag-list-item text="Example
|
|
51
|
-
<d2l-tag-list-item text="Example
|
|
49
|
+
<d2l-tag-list-item text="Example 5"></d2l-tag-list-item>
|
|
50
|
+
<d2l-tag-list-item text="Example 6" description="this is a description"></d2l-tag-list-item>
|
|
51
|
+
<d2l-tag-list-item text="Example 7"></d2l-tag-list-item>
|
|
52
|
+
<d2l-tag-list-item text="Example 8"></d2l-tag-list-item>
|
|
53
|
+
<d2l-tag-list-item text="Example 9"></d2l-tag-list-item>
|
|
52
54
|
</d2l-tag-list>
|
|
53
55
|
</d2l-demo-snippet>
|
|
54
56
|
|
|
55
57
|
<h2>Clearable Tag List</h2>
|
|
56
58
|
<d2l-demo-snippet fullscreen>
|
|
57
59
|
<d2l-tag-list description="A bunch of example tags" clearable>
|
|
58
|
-
<d2l-tag-list-item text="Example
|
|
59
|
-
<d2l-tag-list-item text="
|
|
60
|
-
<d2l-tag-list-item text="
|
|
60
|
+
<d2l-tag-list-item text="Example 1"></d2l-tag-list-item>
|
|
61
|
+
<d2l-tag-list-item text="Example 2 - much much much much much much much much longer"></d2l-tag-list-item>
|
|
62
|
+
<d2l-tag-list-item text="Example 3"></d2l-tag-list-item>
|
|
61
63
|
<d2l-tag-list-item-mixin-consumer name="Custom Tag List Item"></d2l-tag-list-item-mixin-consumer>
|
|
62
|
-
<d2l-tag-list-item text="Example
|
|
63
|
-
<d2l-tag-list-item text="Example
|
|
64
|
-
<d2l-tag-list-item text="Example
|
|
64
|
+
<d2l-tag-list-item text="Example 5"></d2l-tag-list-item>
|
|
65
|
+
<d2l-tag-list-item text="Example 6" description="this is a description"></d2l-tag-list-item>
|
|
66
|
+
<d2l-tag-list-item text="Example 7"></d2l-tag-list-item>
|
|
67
|
+
<d2l-tag-list-item text="Example 8"></d2l-tag-list-item>
|
|
68
|
+
<d2l-tag-list-item text="Example 9"></d2l-tag-list-item>
|
|
65
69
|
</d2l-tag-list>
|
|
66
|
-
<script>
|
|
70
|
+
<script type="module">
|
|
71
|
+
import { forceFocusVisible, getNextFocusable } from '../../../helpers/focus.js';
|
|
72
|
+
|
|
67
73
|
document.addEventListener('d2l-tag-list-item-clear', (e) => {
|
|
68
74
|
e.target.parentNode.removeChild(e.target);
|
|
69
|
-
console.log(`d2l-tag-list-item-clear event dispatched. Value: ${e.detail.value}
|
|
75
|
+
console.log(`d2l-tag-list-item-clear event dispatched. Value: ${e.detail.value}`);
|
|
76
|
+
});
|
|
77
|
+
|
|
78
|
+
document.addEventListener('d2l-tag-list-clear', (e) => {
|
|
79
|
+
console.log('d2l-tag-list-clear event dispatched.', e.target);
|
|
80
|
+
const nextFocusable = getNextFocusable(e.target, true, true, true);
|
|
81
|
+
[...e.target.children].forEach(tag => {
|
|
82
|
+
e.target.removeChild(tag);
|
|
83
|
+
});
|
|
84
|
+
// consumer must move focus someplace logical
|
|
85
|
+
forceFocusVisible(nextFocusable);
|
|
70
86
|
});
|
|
71
87
|
</script>
|
|
72
88
|
</d2l-demo-snippet>
|
|
@@ -5,8 +5,8 @@ import { css, html, nothing } from 'lit';
|
|
|
5
5
|
import { heading4Styles, labelStyles } from '../typography/styles.js';
|
|
6
6
|
import { announce } from '../../helpers/announce.js';
|
|
7
7
|
import { classMap } from 'lit/directives/class-map.js';
|
|
8
|
-
import { findComposedAncestor } from '../../helpers/dom.js';
|
|
9
8
|
import { getUniqueId } from '../../helpers/uniqueId.js';
|
|
9
|
+
import { ifDefined } from 'lit/directives/if-defined.js';
|
|
10
10
|
import { LocalizeCoreElement } from '../../helpers/localize-core-element.js';
|
|
11
11
|
import { RtlMixin } from '../../mixins/rtl-mixin.js';
|
|
12
12
|
|
|
@@ -30,11 +30,7 @@ export const TagListItemMixin = superclass => class extends LocalizeCoreElement(
|
|
|
30
30
|
* @ignore
|
|
31
31
|
*/
|
|
32
32
|
keyboardTooltipItem: { type: Boolean, attribute: 'keyboard-tooltip-item' },
|
|
33
|
-
|
|
34
|
-
* @ignore
|
|
35
|
-
*/
|
|
36
|
-
role: { type: String, reflect: true },
|
|
37
|
-
_displayKeyboardTooltip: { type: Boolean }
|
|
33
|
+
_displayKeyboardTooltip: { state: true }
|
|
38
34
|
};
|
|
39
35
|
}
|
|
40
36
|
|
|
@@ -76,12 +72,12 @@ export const TagListItemMixin = superclass => class extends LocalizeCoreElement(
|
|
|
76
72
|
padding: 0.25rem 0.6rem;
|
|
77
73
|
text-overflow: ellipsis;
|
|
78
74
|
}
|
|
79
|
-
:host(:focus-
|
|
80
|
-
:host(:focus-
|
|
75
|
+
:host(:focus-within) .tag-list-item-container,
|
|
76
|
+
:host(:focus-within:hover) .tag-list-item-container {
|
|
81
77
|
box-shadow: inset 0 0 0 2px var(--d2l-color-celestine), 0 2px 4px rgba(0, 0, 0, 0.03);
|
|
82
78
|
}
|
|
83
79
|
:host(:hover) .tag-list-item-container,
|
|
84
|
-
:host(:focus-
|
|
80
|
+
:host(:focus-within) .tag-list-item-container {
|
|
85
81
|
background-color: var(--d2l-color-sylvite);
|
|
86
82
|
}
|
|
87
83
|
:host(:hover) .tag-list-item-container {
|
|
@@ -131,52 +127,55 @@ export const TagListItemMixin = superclass => class extends LocalizeCoreElement(
|
|
|
131
127
|
this.clearable = false;
|
|
132
128
|
/** @ignore */
|
|
133
129
|
this.keyboardTooltipItem = false;
|
|
134
|
-
/** @ignore */
|
|
135
|
-
this.role = 'listitem';
|
|
136
130
|
this._displayKeyboardTooltip = false;
|
|
137
131
|
this._id = getUniqueId();
|
|
138
|
-
this.
|
|
132
|
+
this._keyboardTooltipShown = false;
|
|
139
133
|
}
|
|
140
134
|
|
|
141
135
|
firstUpdated(changedProperties) {
|
|
142
136
|
super.firstUpdated(changedProperties);
|
|
143
137
|
|
|
144
138
|
const container = this.shadowRoot.querySelector('.tag-list-item-content');
|
|
139
|
+
|
|
145
140
|
this.addEventListener('focus', async(e) => {
|
|
146
141
|
// ignore focus events coming from inside the tag content
|
|
147
142
|
if (e.composedPath()[0] !== this) return;
|
|
148
143
|
|
|
149
|
-
this._displayKeyboardTooltip = (this.keyboardTooltipItem && !this.
|
|
144
|
+
this._displayKeyboardTooltip = (this.keyboardTooltipItem && !this._keyboardTooltipShown);
|
|
150
145
|
await this.updateComplete;
|
|
151
146
|
|
|
152
|
-
|
|
153
|
-
container.dispatchEvent(new FocusEvent('focus', { bubbles: false, cancelable: true }));
|
|
147
|
+
container.focus();
|
|
154
148
|
});
|
|
149
|
+
|
|
155
150
|
this.addEventListener('blur', () => {
|
|
156
151
|
this._displayKeyboardTooltip = false;
|
|
157
|
-
/** @ignore */
|
|
158
|
-
container.dispatchEvent(new FocusEvent('blur', { bubbles: false, cancelable: true }));
|
|
159
152
|
});
|
|
153
|
+
|
|
160
154
|
this.addEventListener('keydown', this._handleKeydown);
|
|
161
155
|
}
|
|
162
156
|
|
|
163
|
-
|
|
157
|
+
_handleClearItem() {
|
|
164
158
|
if (!this.clearable) return;
|
|
165
159
|
|
|
166
|
-
let handleFocus = false;
|
|
167
|
-
if (e) {
|
|
168
|
-
const listItemParent = findComposedAncestor(e.composedPath()[0], (node) => node.role === 'listitem');
|
|
169
|
-
handleFocus = listItemParent ? true : false;
|
|
170
|
-
}
|
|
171
|
-
|
|
172
|
-
if (clearAll) return;
|
|
173
|
-
|
|
174
160
|
announce(this.localize('components.tag-list.cleared-item', { value: this.text }));
|
|
175
161
|
|
|
176
162
|
/** Dispatched when a user selects to delete an individual tag list item. The consumer must handle the actual element deletion and focus behaviour if there are no remaining list items. */
|
|
177
163
|
this.dispatchEvent(new CustomEvent(
|
|
178
164
|
'd2l-tag-list-item-clear',
|
|
179
|
-
{ bubbles: true, composed: true, detail: { value: this.text
|
|
165
|
+
{ bubbles: true, composed: true, detail: { value: this.text } }
|
|
166
|
+
));
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
_handleKeyboardTooltipHide() {
|
|
170
|
+
if (this._keyboardTooltipShown) this._displayKeyboardTooltip = false;
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
_handleKeyboardTooltipShow() {
|
|
174
|
+
this._keyboardTooltipShown = true;
|
|
175
|
+
/** @ignore */
|
|
176
|
+
this.dispatchEvent(new CustomEvent(
|
|
177
|
+
'd2l-tag-list-item-tooltip-show',
|
|
178
|
+
{ bubbles: true, composed: true }
|
|
180
179
|
));
|
|
181
180
|
}
|
|
182
181
|
|
|
@@ -187,55 +186,72 @@ export const TagListItemMixin = superclass => class extends LocalizeCoreElement(
|
|
|
187
186
|
const clearKeys = e.keyCode === keyCodes.BACKSPACE || e.keyCode === keyCodes.DELETE;
|
|
188
187
|
if (!this.clearable || !clearKeys) return;
|
|
189
188
|
e.preventDefault();
|
|
190
|
-
this.
|
|
189
|
+
this._handleClearItem();
|
|
191
190
|
}
|
|
192
191
|
|
|
193
|
-
|
|
194
|
-
|
|
192
|
+
_renderKeyboardTooltipContent() {
|
|
193
|
+
return html`
|
|
194
|
+
<div class="d2l-tag-list-item-tooltip-title-key">${this.localize('components.tag-list-item.tooltip-title')}</div>
|
|
195
|
+
<ul>
|
|
196
|
+
<li><span class="d2l-tag-list-item-tooltip-title-key">${this.localize('components.tag-list-item.tooltip-arrow-keys')}</span> - ${this.localize('components.tag-list-item.tooltip-arrow-keys-desc')}</li>
|
|
197
|
+
<li><span class="d2l-tag-list-item-tooltip-title-key">${this.localize('components.tag-list-item.tooltip-delete-key')}</span> - ${this.localize('components.tag-list-item.tooltip-delete-key-desc')}</li>
|
|
198
|
+
</ul>
|
|
199
|
+
`;
|
|
195
200
|
}
|
|
196
201
|
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
/** @ignore */
|
|
200
|
-
this.dispatchEvent(new CustomEvent(
|
|
201
|
-
'd2l-tag-list-item-tooltip-show',
|
|
202
|
-
{ bubbles: true, composed: true }
|
|
203
|
-
));
|
|
204
|
-
}
|
|
202
|
+
_renderTag(tagContent, options) {
|
|
203
|
+
if (!options) options = {};
|
|
205
204
|
|
|
206
|
-
_renderTag(tagContent, hasTruncationTooltip, description) {
|
|
207
205
|
const buttonText = typeof tagContent === 'object'
|
|
208
206
|
? this.localize('components.tag-list.clear', { value: '' })
|
|
209
207
|
: this.localize('components.tag-list.clear', { value: tagContent });
|
|
210
|
-
|
|
211
|
-
const
|
|
212
|
-
|
|
208
|
+
|
|
209
|
+
const hasDescription = !!options.description;
|
|
210
|
+
|
|
211
|
+
let tooltip = nothing;
|
|
212
|
+
if (this._displayKeyboardTooltip) {
|
|
213
|
+
tooltip = html`
|
|
214
|
+
<d2l-tooltip
|
|
215
|
+
align="start"
|
|
216
|
+
@d2l-tooltip-hide="${this._handleKeyboardTooltipHide}"
|
|
217
|
+
@d2l-tooltip-show="${this._handleKeyboardTooltipShow}"
|
|
218
|
+
for="${this._id}">
|
|
219
|
+
${this._renderKeyboardTooltipContent()}
|
|
220
|
+
</d2l-tooltip>`;
|
|
221
|
+
} else if (options.hasTruncationTooltip || hasDescription) {
|
|
222
|
+
const tooltipHeader = hasDescription ? html`<div class="d2l-heading-4">${tagContent}</div>` : tagContent;
|
|
223
|
+
tooltip = html`
|
|
213
224
|
<d2l-tooltip for="${this._id}" ?show-truncated-only="${!hasDescription}">
|
|
214
225
|
${tooltipHeader}
|
|
215
|
-
${hasDescription ? description : nothing}
|
|
216
|
-
</d2l-tooltip
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
<d2l-tooltip
|
|
220
|
-
align="start"
|
|
221
|
-
@d2l-tooltip-hide="${this._handleTooltipHide}"
|
|
222
|
-
@d2l-tooltip-show="${this._handleTooltipShow}"
|
|
223
|
-
for="${this._id}">
|
|
224
|
-
${this._renderTooltipContent()}
|
|
225
|
-
</d2l-tooltip>` : null;
|
|
226
|
+
${hasDescription ? options.description : nothing}
|
|
227
|
+
</d2l-tooltip>`;
|
|
228
|
+
}
|
|
229
|
+
|
|
226
230
|
const containerClasses = {
|
|
227
231
|
'd2l-label-text': true,
|
|
228
232
|
'tag-list-item-container': true,
|
|
229
233
|
'tag-list-item-container-clearable': this.clearable
|
|
230
234
|
};
|
|
235
|
+
const focusableClasses = {
|
|
236
|
+
'tag-list-item-content': true
|
|
237
|
+
};
|
|
238
|
+
if (options.focusableClass) focusableClasses[options.focusableClass] = true;
|
|
239
|
+
|
|
231
240
|
return html`
|
|
232
|
-
${
|
|
241
|
+
${tooltip}
|
|
233
242
|
<div class="${classMap(containerClasses)}">
|
|
234
|
-
<div
|
|
243
|
+
<div aria-label="${ifDefined(options.label)}"
|
|
244
|
+
aria-roledescription="${this.localize('components.tag-list-item.role-description')}"
|
|
245
|
+
class="${classMap(focusableClasses)}"
|
|
246
|
+
id="${this._id}"
|
|
247
|
+
role="button"
|
|
248
|
+
tabindex="-1">
|
|
249
|
+
${tagContent}
|
|
250
|
+
</div>
|
|
235
251
|
${this.clearable ? html`
|
|
236
252
|
<d2l-button-icon
|
|
237
253
|
class="d2l-tag-list-item-clear-button"
|
|
238
|
-
@click="${this.
|
|
254
|
+
@click="${this._handleClearItem}"
|
|
239
255
|
icon="tier1:close-small"
|
|
240
256
|
tabindex="-1"
|
|
241
257
|
text="${buttonText}">
|
|
@@ -244,14 +260,4 @@ export const TagListItemMixin = superclass => class extends LocalizeCoreElement(
|
|
|
244
260
|
`;
|
|
245
261
|
}
|
|
246
262
|
|
|
247
|
-
_renderTooltipContent() {
|
|
248
|
-
return html`
|
|
249
|
-
<div class="d2l-tag-list-item-tooltip-title-key">${this.localize('components.tag-list-item.tooltip-title')}</div>
|
|
250
|
-
<ul>
|
|
251
|
-
<li><span class="d2l-tag-list-item-tooltip-title-key">${this.localize('components.tag-list-item.tooltip-arrow-keys')}</span> - ${this.localize('components.tag-list-item.tooltip-arrow-keys-desc')}</li>
|
|
252
|
-
<li><span class="d2l-tag-list-item-tooltip-title-key">${this.localize('components.tag-list-item.tooltip-delete-key')}</span> - ${this.localize('components.tag-list-item.tooltip-delete-key-desc')}</li>
|
|
253
|
-
</ul>
|
|
254
|
-
`;
|
|
255
|
-
}
|
|
256
|
-
|
|
257
263
|
};
|
|
@@ -20,7 +20,10 @@ class TagListItem extends TagListItemMixin(LitElement) {
|
|
|
20
20
|
}
|
|
21
21
|
|
|
22
22
|
render() {
|
|
23
|
-
return this._renderTag(this.text,
|
|
23
|
+
return this._renderTag(this.text, {
|
|
24
|
+
description: this.description,
|
|
25
|
+
hasTruncationTooltip: true
|
|
26
|
+
});
|
|
24
27
|
}
|
|
25
28
|
}
|
|
26
29
|
|
|
@@ -2,7 +2,6 @@ import '../button/button-subtle.js';
|
|
|
2
2
|
import { css, html, LitElement } from 'lit';
|
|
3
3
|
import { announce } from '../../helpers/announce.js';
|
|
4
4
|
import { ArrowKeysMixin } from '../../mixins/arrow-keys-mixin.js';
|
|
5
|
-
import { BACKDROP_ROLE } from '../backdrop/backdrop.js';
|
|
6
5
|
import { classMap } from 'lit/directives/class-map.js';
|
|
7
6
|
import { getOffsetParent } from '../../helpers/dom.js';
|
|
8
7
|
import { InteractiveMixin } from '../../mixins/interactive-mixin.js';
|
|
@@ -193,18 +192,17 @@ class TagList extends LocalizeCoreElement(InteractiveMixin(ArrowKeysMixin(LitEle
|
|
|
193
192
|
<div
|
|
194
193
|
aria-label="${this.description}"
|
|
195
194
|
class="${classMap(containerClasses)}"
|
|
196
|
-
role="
|
|
195
|
+
role="group"
|
|
196
|
+
aria-roledescription="${this.localize('components.tag-list.role-description')}"
|
|
197
197
|
@d2l-tag-list-item-clear="${this._handleItemDeleted}"
|
|
198
|
-
@d2l-tag-list-item-tooltip-show="${this._handleKeyboardTooltipShown}"
|
|
199
|
-
>
|
|
198
|
+
@d2l-tag-list-item-tooltip-show="${this._handleKeyboardTooltipShown}">
|
|
200
199
|
<slot @slotchange="${this._handleSlotChange}"></slot>
|
|
201
200
|
${overflowButton}
|
|
202
201
|
<d2l-button-subtle
|
|
203
202
|
class="${classMap(clearableClasses)}"
|
|
204
203
|
@click="${this._handleClearAll}"
|
|
205
204
|
slim
|
|
206
|
-
text="${this.localize('components.tag-list.clear-all')}"
|
|
207
|
-
>
|
|
205
|
+
text="${this.localize('components.tag-list.clear-all')}">
|
|
208
206
|
</d2l-button-subtle>
|
|
209
207
|
</div>
|
|
210
208
|
`;
|
|
@@ -313,10 +311,6 @@ class TagList extends LocalizeCoreElement(InteractiveMixin(ArrowKeysMixin(LitEle
|
|
|
313
311
|
if (node.nodeType !== Node.ELEMENT_NODE) return false;
|
|
314
312
|
await node.updateComplete;
|
|
315
313
|
|
|
316
|
-
const role = node.getAttribute('role');
|
|
317
|
-
const backdropRole = node.getAttribute(BACKDROP_ROLE);
|
|
318
|
-
if (role !== 'listitem' && backdropRole !== 'listitem') return false;
|
|
319
|
-
|
|
320
314
|
if (this.clearable) node.setAttribute('clearable', 'clearable');
|
|
321
315
|
node.removeAttribute('data-is-chomped');
|
|
322
316
|
node.removeAttribute('keyboard-tooltip-item');
|
|
@@ -337,7 +331,7 @@ class TagList extends LocalizeCoreElement(InteractiveMixin(ArrowKeysMixin(LitEle
|
|
|
337
331
|
return items.concat(showMoreButton).concat(clearButton);
|
|
338
332
|
}
|
|
339
333
|
|
|
340
|
-
_handleClearAll(
|
|
334
|
+
_handleClearAll() {
|
|
341
335
|
if (!this._items) return;
|
|
342
336
|
|
|
343
337
|
/** Dispatched when a user selects to delete all tag list items. The consumer must handle the actual element deletion and focus behaviour. */
|
|
@@ -347,15 +341,9 @@ class TagList extends LocalizeCoreElement(InteractiveMixin(ArrowKeysMixin(LitEle
|
|
|
347
341
|
));
|
|
348
342
|
|
|
349
343
|
announce(this.localize('components.tag-list.cleared-all'));
|
|
350
|
-
|
|
351
|
-
this._items.forEach((item) => {
|
|
352
|
-
item.handleClearItem(e, true);
|
|
353
|
-
});
|
|
354
344
|
}
|
|
355
345
|
|
|
356
346
|
_handleItemDeleted(e) {
|
|
357
|
-
if (!e || !e.detail || !e.detail.handleFocus) return;
|
|
358
|
-
|
|
359
347
|
const rootTarget = e.composedPath()[0];
|
|
360
348
|
const children = this._getVisibleEffectiveChildren();
|
|
361
349
|
const itemIndex = children.indexOf(rootTarget);
|
package/lang/ar.js
CHANGED
|
@@ -110,8 +110,10 @@ export default {
|
|
|
110
110
|
"components.tag-list.cleared-item": "تمت إزالة عنصر قائمة العلامات {value}",
|
|
111
111
|
"components.tag-list.interactive-label": "قائمة العلامات، {count} من العناصر",
|
|
112
112
|
"components.tag-list.num-hidden": "زيادة {count} إضافي",
|
|
113
|
+
"components.tag-list.role-description": "Tag List",
|
|
113
114
|
"components.tag-list.show-less": "إظهار أقل",
|
|
114
115
|
"components.tag-list.show-more-description": "حدد لإظهار عناصر قائمة العلامات المخفية",
|
|
116
|
+
"components.tag-list-item.role-description": "Tag",
|
|
115
117
|
"components.tag-list-item.tooltip-arrow-keys": "مفاتيح الأسهم",
|
|
116
118
|
"components.tag-list-item.tooltip-arrow-keys-desc": "التنقل بين العلامات",
|
|
117
119
|
"components.tag-list-item.tooltip-delete-key": "مسافة للخلف/حذف",
|
package/lang/cy.js
CHANGED
|
@@ -110,8 +110,10 @@ export default {
|
|
|
110
110
|
"components.tag-list.cleared-item": "Wedi tynnu’r eitem rhestr tag {value}",
|
|
111
111
|
"components.tag-list.interactive-label": "Rhestr Tag, {count} o eitemau",
|
|
112
112
|
"components.tag-list.num-hidden": "+ {count} yn rhagor",
|
|
113
|
+
"components.tag-list.role-description": "Tag List",
|
|
113
114
|
"components.tag-list.show-less": "Dangos Llai",
|
|
114
115
|
"components.tag-list.show-more-description": "Dewis i ddangos eitemau rhestr tag cudd",
|
|
116
|
+
"components.tag-list-item.role-description": "Tag",
|
|
115
117
|
"components.tag-list-item.tooltip-arrow-keys": "Byselli Saeth",
|
|
116
118
|
"components.tag-list-item.tooltip-arrow-keys-desc": "Symud rhwng tagiau",
|
|
117
119
|
"components.tag-list-item.tooltip-delete-key": "Yn ôl/Dileu",
|
package/lang/da.js
CHANGED
|
@@ -110,8 +110,10 @@ export default {
|
|
|
110
110
|
"components.tag-list.cleared-item": "Fjernede taglisteelement {value}",
|
|
111
111
|
"components.tag-list.interactive-label": "Tagliste, {count} elementer",
|
|
112
112
|
"components.tag-list.num-hidden": "+ {count} mere",
|
|
113
|
+
"components.tag-list.role-description": "Tag List",
|
|
113
114
|
"components.tag-list.show-less": "Vis færre",
|
|
114
115
|
"components.tag-list.show-more-description": "Vælg for at få vist skjulte taglisteelementer",
|
|
116
|
+
"components.tag-list-item.role-description": "Tag",
|
|
115
117
|
"components.tag-list-item.tooltip-arrow-keys": "Piletaster",
|
|
116
118
|
"components.tag-list-item.tooltip-arrow-keys-desc": "Flyt mellem tags",
|
|
117
119
|
"components.tag-list-item.tooltip-delete-key": "Tilbage/Slet",
|
package/lang/de.js
CHANGED
|
@@ -110,8 +110,10 @@ export default {
|
|
|
110
110
|
"components.tag-list.cleared-item": "Element {value} der Tag-Liste wurde entfernt",
|
|
111
111
|
"components.tag-list.interactive-label": "Tag-Liste, {count} Elemente",
|
|
112
112
|
"components.tag-list.num-hidden": "+ {count} weitere",
|
|
113
|
+
"components.tag-list.role-description": "Tag List",
|
|
113
114
|
"components.tag-list.show-less": "Weniger anzeigen",
|
|
114
115
|
"components.tag-list.show-more-description": "Wählen Sie diese Option, um ausgeblendete Elemente der Tag-Liste anzuzeigen",
|
|
116
|
+
"components.tag-list-item.role-description": "Tag",
|
|
115
117
|
"components.tag-list-item.tooltip-arrow-keys": "Pfeiltasten",
|
|
116
118
|
"components.tag-list-item.tooltip-arrow-keys-desc": "Zwischen Tags wechseln",
|
|
117
119
|
"components.tag-list-item.tooltip-delete-key": "Rücktaste/Entfernen",
|
package/lang/en.js
CHANGED
|
@@ -110,8 +110,10 @@ export default {
|
|
|
110
110
|
"components.tag-list.cleared-item": "Removed tag list item {value}",
|
|
111
111
|
"components.tag-list.interactive-label": "Tag List, {count} items",
|
|
112
112
|
"components.tag-list.num-hidden": "+ {count} more",
|
|
113
|
+
"components.tag-list.role-description": "Tag List",
|
|
113
114
|
"components.tag-list.show-less": "Show Less",
|
|
114
115
|
"components.tag-list.show-more-description": "Select to show hidden tag list items",
|
|
116
|
+
"components.tag-list-item.role-description": "Tag",
|
|
115
117
|
"components.tag-list-item.tooltip-arrow-keys": "Arrow Keys",
|
|
116
118
|
"components.tag-list-item.tooltip-arrow-keys-desc": "Move between tags",
|
|
117
119
|
"components.tag-list-item.tooltip-delete-key": "Backspace/Delete",
|
package/lang/es-es.js
CHANGED
|
@@ -110,8 +110,10 @@ export default {
|
|
|
110
110
|
"components.tag-list.cleared-item": "Se ha eliminado el elemento {value} de la lista de etiquetas",
|
|
111
111
|
"components.tag-list.interactive-label": "Lista de etiquetas, {count} elementos",
|
|
112
112
|
"components.tag-list.num-hidden": "+ {count} más",
|
|
113
|
+
"components.tag-list.role-description": "Tag List",
|
|
113
114
|
"components.tag-list.show-less": "Mostrar menos",
|
|
114
115
|
"components.tag-list.show-more-description": "Seleccione esta opción para mostrar los elementos ocultos de la lista de etiquetas",
|
|
116
|
+
"components.tag-list-item.role-description": "Tag",
|
|
115
117
|
"components.tag-list-item.tooltip-arrow-keys": "Teclas de flecha",
|
|
116
118
|
"components.tag-list-item.tooltip-arrow-keys-desc": "Desplazamiento entre etiquetas",
|
|
117
119
|
"components.tag-list-item.tooltip-delete-key": "Retroceso/Eliminar",
|
package/lang/es.js
CHANGED
|
@@ -110,8 +110,10 @@ export default {
|
|
|
110
110
|
"components.tag-list.cleared-item": "Se eliminó el elemento {value} de la lista de etiquetas",
|
|
111
111
|
"components.tag-list.interactive-label": "Lista de etiquetas, {count} elementos",
|
|
112
112
|
"components.tag-list.num-hidden": "+ {count} más",
|
|
113
|
+
"components.tag-list.role-description": "Tag List",
|
|
113
114
|
"components.tag-list.show-less": "Mostrar menos",
|
|
114
115
|
"components.tag-list.show-more-description": "Seleccione para mostrar los elementos ocultos de la lista de etiquetas",
|
|
116
|
+
"components.tag-list-item.role-description": "Tag",
|
|
115
117
|
"components.tag-list-item.tooltip-arrow-keys": "Teclas de flecha",
|
|
116
118
|
"components.tag-list-item.tooltip-arrow-keys-desc": "Mover entre etiquetas",
|
|
117
119
|
"components.tag-list-item.tooltip-delete-key": "Retroceso/Suprimir",
|
package/lang/fr-fr.js
CHANGED
|
@@ -110,8 +110,10 @@ export default {
|
|
|
110
110
|
"components.tag-list.cleared-item": "Suppression de l’élément de liste d’étiquettes {value}",
|
|
111
111
|
"components.tag-list.interactive-label": "Liste d’étiquettes, {count} éléments",
|
|
112
112
|
"components.tag-list.num-hidden": "{count} de plus",
|
|
113
|
+
"components.tag-list.role-description": "Tag List",
|
|
113
114
|
"components.tag-list.show-less": "Afficher moins",
|
|
114
115
|
"components.tag-list.show-more-description": "Sélectionnez cette option pour afficher les éléments de la liste d’étiquettes masquées",
|
|
116
|
+
"components.tag-list-item.role-description": "Tag",
|
|
115
117
|
"components.tag-list-item.tooltip-arrow-keys": "Touches fléchées",
|
|
116
118
|
"components.tag-list-item.tooltip-arrow-keys-desc": "Passez d’une étiquette à l’autre",
|
|
117
119
|
"components.tag-list-item.tooltip-delete-key": "Retour arrière/Supprimer",
|
package/lang/fr.js
CHANGED
|
@@ -110,8 +110,10 @@ export default {
|
|
|
110
110
|
"components.tag-list.cleared-item": "Élément {value} de la liste des balises supprimé",
|
|
111
111
|
"components.tag-list.interactive-label": "Liste des balises, {count} éléments",
|
|
112
112
|
"components.tag-list.num-hidden": "+ {count} de plus",
|
|
113
|
+
"components.tag-list.role-description": "Tag List",
|
|
113
114
|
"components.tag-list.show-less": "Afficher moins",
|
|
114
115
|
"components.tag-list.show-more-description": "Sélectionnez cette option pour afficher les éléments de la liste des balises cachées",
|
|
116
|
+
"components.tag-list-item.role-description": "Tag",
|
|
115
117
|
"components.tag-list-item.tooltip-arrow-keys": "Touches fléchées",
|
|
116
118
|
"components.tag-list-item.tooltip-arrow-keys-desc": "Passer d’une balise à l’autre",
|
|
117
119
|
"components.tag-list-item.tooltip-delete-key": "Retour arrière/suppression",
|
package/lang/hi.js
CHANGED
|
@@ -110,8 +110,10 @@ export default {
|
|
|
110
110
|
"components.tag-list.cleared-item": "टैग लिस्ट आइटम {value} हटाए गए",
|
|
111
111
|
"components.tag-list.interactive-label": "टैग लिस्ट, {count} आइटम",
|
|
112
112
|
"components.tag-list.num-hidden": "+ {count} और",
|
|
113
|
+
"components.tag-list.role-description": "Tag List",
|
|
113
114
|
"components.tag-list.show-less": "कम दिखाएँ",
|
|
114
115
|
"components.tag-list.show-more-description": "छिपे हुए टैग लिस्ट आइटम दिखाने के लिए चुनें",
|
|
116
|
+
"components.tag-list-item.role-description": "Tag",
|
|
115
117
|
"components.tag-list-item.tooltip-arrow-keys": "तीर कुंजियाँ",
|
|
116
118
|
"components.tag-list-item.tooltip-arrow-keys-desc": "टैग के बीच आना-जाना",
|
|
117
119
|
"components.tag-list-item.tooltip-delete-key": "बैकस्पेस/हटाएँ",
|
package/lang/ja.js
CHANGED
|
@@ -110,8 +110,10 @@ export default {
|
|
|
110
110
|
"components.tag-list.cleared-item": "タグリスト項目 {value} を削除しました",
|
|
111
111
|
"components.tag-list.interactive-label": "タグリスト、{count} 項目",
|
|
112
112
|
"components.tag-list.num-hidden": "+ {count} 件追加",
|
|
113
|
+
"components.tag-list.role-description": "Tag List",
|
|
113
114
|
"components.tag-list.show-less": "少なく表示",
|
|
114
115
|
"components.tag-list.show-more-description": "選択すると、非表示のタグリスト項目が表示されます",
|
|
116
|
+
"components.tag-list-item.role-description": "Tag",
|
|
115
117
|
"components.tag-list-item.tooltip-arrow-keys": "矢印キー",
|
|
116
118
|
"components.tag-list-item.tooltip-arrow-keys-desc": "タグ間を移動します",
|
|
117
119
|
"components.tag-list-item.tooltip-delete-key": "Backspace キー/Delete キー",
|
package/lang/ko.js
CHANGED
|
@@ -110,8 +110,10 @@ export default {
|
|
|
110
110
|
"components.tag-list.cleared-item": "태그 목록 항목 {value}을(를) 제거했습니다",
|
|
111
111
|
"components.tag-list.interactive-label": "태그 목록, {count}개 항목",
|
|
112
112
|
"components.tag-list.num-hidden": "{count}개 더",
|
|
113
|
+
"components.tag-list.role-description": "Tag List",
|
|
113
114
|
"components.tag-list.show-less": "간단히 표시",
|
|
114
115
|
"components.tag-list.show-more-description": "숨겨진 태그 목록 항목을 표시하려면 선택합니다",
|
|
116
|
+
"components.tag-list-item.role-description": "Tag",
|
|
115
117
|
"components.tag-list-item.tooltip-arrow-keys": "화살표 키",
|
|
116
118
|
"components.tag-list-item.tooltip-arrow-keys-desc": "태그 간에 이동합니다",
|
|
117
119
|
"components.tag-list-item.tooltip-delete-key": "백스페이스/삭제",
|
package/lang/nl.js
CHANGED
|
@@ -110,8 +110,10 @@ export default {
|
|
|
110
110
|
"components.tag-list.cleared-item": "Item {value} op de labellijst is verwijderd",
|
|
111
111
|
"components.tag-list.interactive-label": "Labellijst, {count} items",
|
|
112
112
|
"components.tag-list.num-hidden": "+ {count} extra",
|
|
113
|
+
"components.tag-list.role-description": "Tag List",
|
|
113
114
|
"components.tag-list.show-less": "Minder weergeven",
|
|
114
115
|
"components.tag-list.show-more-description": "Selecteer deze optie om verborgen items op labellijsten weer te geven",
|
|
116
|
+
"components.tag-list-item.role-description": "Tag",
|
|
115
117
|
"components.tag-list-item.tooltip-arrow-keys": "Pijltoetsen",
|
|
116
118
|
"components.tag-list-item.tooltip-arrow-keys-desc": "Schakelen tussen tags",
|
|
117
119
|
"components.tag-list-item.tooltip-delete-key": "Backspace/Verwijderen",
|
package/lang/pt.js
CHANGED
|
@@ -110,8 +110,10 @@ export default {
|
|
|
110
110
|
"components.tag-list.cleared-item": "Item {value} da lista de marcas removido",
|
|
111
111
|
"components.tag-list.interactive-label": "Lista de marcas, {count} itens",
|
|
112
112
|
"components.tag-list.num-hidden": "+ {count} mais",
|
|
113
|
+
"components.tag-list.role-description": "Tag List",
|
|
113
114
|
"components.tag-list.show-less": "Mostrar menos",
|
|
114
115
|
"components.tag-list.show-more-description": "Selecione para mostrar itens ocultos da lista de marcas",
|
|
116
|
+
"components.tag-list-item.role-description": "Tag",
|
|
115
117
|
"components.tag-list-item.tooltip-arrow-keys": "Teclas de seta",
|
|
116
118
|
"components.tag-list-item.tooltip-arrow-keys-desc": "Mover entre marcas",
|
|
117
119
|
"components.tag-list-item.tooltip-delete-key": "Retroceder/Excluir",
|
package/lang/sv.js
CHANGED
|
@@ -110,8 +110,10 @@ export default {
|
|
|
110
110
|
"components.tag-list.cleared-item": "Ta bort tagglistobjektet {value}",
|
|
111
111
|
"components.tag-list.interactive-label": "Tagglista, {count} objekt",
|
|
112
112
|
"components.tag-list.num-hidden": "+ {count} till",
|
|
113
|
+
"components.tag-list.role-description": "Tag List",
|
|
113
114
|
"components.tag-list.show-less": "Visa färre",
|
|
114
115
|
"components.tag-list.show-more-description": "Välj för att visa dolda tagglistobjekt",
|
|
116
|
+
"components.tag-list-item.role-description": "Tag",
|
|
115
117
|
"components.tag-list-item.tooltip-arrow-keys": "Piltangenter",
|
|
116
118
|
"components.tag-list-item.tooltip-arrow-keys-desc": "Flytta mellan taggar",
|
|
117
119
|
"components.tag-list-item.tooltip-delete-key": "Backstegstangenten/Delete-tangenten",
|
package/lang/tr.js
CHANGED
|
@@ -110,8 +110,10 @@ export default {
|
|
|
110
110
|
"components.tag-list.cleared-item": "Kaldırılan etiket listesi öğesi {value}",
|
|
111
111
|
"components.tag-list.interactive-label": "Etiket Listesi, {count} öğe",
|
|
112
112
|
"components.tag-list.num-hidden": "+{count} tane daha",
|
|
113
|
+
"components.tag-list.role-description": "Tag List",
|
|
113
114
|
"components.tag-list.show-less": "Daha Azını Göster",
|
|
114
115
|
"components.tag-list.show-more-description": "Gizli etiket listesi öğelerini göstermek için seçin",
|
|
116
|
+
"components.tag-list-item.role-description": "Tag",
|
|
115
117
|
"components.tag-list-item.tooltip-arrow-keys": "Ok Tuşları",
|
|
116
118
|
"components.tag-list-item.tooltip-arrow-keys-desc": "Etiketler arasında gezinme",
|
|
117
119
|
"components.tag-list-item.tooltip-delete-key": "Geri Al/Sil",
|
package/lang/zh-cn.js
CHANGED
|
@@ -110,8 +110,10 @@ export default {
|
|
|
110
110
|
"components.tag-list.cleared-item": "已移除标签列表项目 {value}",
|
|
111
111
|
"components.tag-list.interactive-label": "标签列表,{count} 个项目",
|
|
112
112
|
"components.tag-list.num-hidden": "+ {count} 个",
|
|
113
|
+
"components.tag-list.role-description": "Tag List",
|
|
113
114
|
"components.tag-list.show-less": "显示更少",
|
|
114
115
|
"components.tag-list.show-more-description": "选择以显示隐藏的标签列表项目",
|
|
116
|
+
"components.tag-list-item.role-description": "Tag",
|
|
115
117
|
"components.tag-list-item.tooltip-arrow-keys": "箭头键",
|
|
116
118
|
"components.tag-list-item.tooltip-arrow-keys-desc": "在标签之间移动",
|
|
117
119
|
"components.tag-list-item.tooltip-delete-key": "退格键/Delete 键",
|
package/lang/zh-tw.js
CHANGED
|
@@ -110,8 +110,10 @@ export default {
|
|
|
110
110
|
"components.tag-list.cleared-item": "已移除標記清單項目 {value}",
|
|
111
111
|
"components.tag-list.interactive-label": "標記清單,{count} 個項目",
|
|
112
112
|
"components.tag-list.num-hidden": "還有 {count} 個",
|
|
113
|
+
"components.tag-list.role-description": "Tag List",
|
|
113
114
|
"components.tag-list.show-less": "顯示更少",
|
|
114
115
|
"components.tag-list.show-more-description": "選取以顯示隱藏的標記清單項目",
|
|
116
|
+
"components.tag-list-item.role-description": "Tag",
|
|
115
117
|
"components.tag-list-item.tooltip-arrow-keys": "方向鍵",
|
|
116
118
|
"components.tag-list-item.tooltip-arrow-keys-desc": "在標記之間移動",
|
|
117
119
|
"components.tag-list-item.tooltip-delete-key": "退格/刪除",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@brightspace-ui/core",
|
|
3
|
-
"version": "2.50.
|
|
3
|
+
"version": "2.50.2",
|
|
4
4
|
"description": "A collection of accessible, free, open-source web components for building Brightspace applications",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"repository": "https://github.com/BrightspaceUI/core.git",
|