@brightspace-ui/core 3.343.5 → 3.344.1
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.
|
@@ -35,7 +35,7 @@ class BackdropStaleOverlay extends LocalizeCoreElement(LitElement) {
|
|
|
35
35
|
|
|
36
36
|
render() {
|
|
37
37
|
const message = this.text || this.localize('components.backdrop-stale-overlay.message');
|
|
38
|
-
const buttonText = this.buttonText || this.
|
|
38
|
+
const buttonText = this.buttonText || this.localizeCommon('actions:reload');;
|
|
39
39
|
|
|
40
40
|
return html`
|
|
41
41
|
<p class="d2l-body-compact">${message}</p>
|
|
@@ -34,7 +34,7 @@ class ButtonCopy extends FocusMixin(ButtonCopyMixin(LitElement)) {
|
|
|
34
34
|
<d2l-button-icon
|
|
35
35
|
?disabled="${this.disabled}"
|
|
36
36
|
icon="${this._recentCopySuccessful ? 'tier1:check' : 'tier1:copy'}"
|
|
37
|
-
text="${this.text ?? this.
|
|
37
|
+
text="${this.text ?? this.localizeCommon('actions:copy')}"
|
|
38
38
|
@click="${this._handleClick}">
|
|
39
39
|
</d2l-button-icon>
|
|
40
40
|
${this._renderToast()}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import '../colors/colors.js';
|
|
2
1
|
import '../icons/icon.js';
|
|
3
2
|
import '../tooltip/tooltip.js';
|
|
4
3
|
import { css, html, LitElement, nothing } from 'lit';
|
|
@@ -13,11 +12,6 @@ import { ifDefined } from 'lit/directives/if-defined.js';
|
|
|
13
12
|
class PageHeaderButton extends FocusMixin(LitElement) {
|
|
14
13
|
|
|
15
14
|
static properties = {
|
|
16
|
-
/**
|
|
17
|
-
* Disables the button
|
|
18
|
-
* @type {boolean}
|
|
19
|
-
*/
|
|
20
|
-
disabled: { reflect: true, type: Boolean },
|
|
21
15
|
/**
|
|
22
16
|
* REQUIRED: Preset icon key (e.g. "tier1:gear")
|
|
23
17
|
* @type {string}
|
|
@@ -57,10 +51,8 @@ class PageHeaderButton extends FocusMixin(LitElement) {
|
|
|
57
51
|
|
|
58
52
|
constructor() {
|
|
59
53
|
super();
|
|
60
|
-
this.disabled = false;
|
|
61
54
|
this.iconPosition = 'start';
|
|
62
55
|
this.textHidden = false;
|
|
63
|
-
this.tooltipPosition = 'bottom';
|
|
64
56
|
}
|
|
65
57
|
|
|
66
58
|
static get focusElementSelector() {
|
|
@@ -69,11 +61,10 @@ class PageHeaderButton extends FocusMixin(LitElement) {
|
|
|
69
61
|
|
|
70
62
|
render() {
|
|
71
63
|
const { ariaLabel, id, text, tooltip } = this.#getRenderSettings();
|
|
72
|
-
const highlightBorder = !this.disabled ? html`<span class="d2l-page-header-highlight-border"></span>` : nothing;
|
|
73
64
|
const icon = html`<d2l-icon icon="${this.icon}"></d2l-icon>`;
|
|
74
65
|
return html`
|
|
75
|
-
<button class="d2l-page-header-highlight-button" id="${ifDefined(id)}"
|
|
76
|
-
|
|
66
|
+
<button class="d2l-page-header-highlight-button" id="${ifDefined(id)}" aria-label="${ifDefined(ariaLabel)}" type="button">
|
|
67
|
+
<span class="d2l-page-header-highlight-border"></span>
|
|
77
68
|
${this.iconPosition === 'start' ? icon : nothing}
|
|
78
69
|
${text}
|
|
79
70
|
${this.iconPosition === 'end' ? icon : nothing}
|
package/custom-elements.json
CHANGED
|
@@ -13546,12 +13546,6 @@
|
|
|
13546
13546
|
"description": "Offset of the tooltip",
|
|
13547
13547
|
"type": "Number"
|
|
13548
13548
|
},
|
|
13549
|
-
{
|
|
13550
|
-
"name": "disabled",
|
|
13551
|
-
"description": "Disables the button",
|
|
13552
|
-
"type": "boolean",
|
|
13553
|
-
"default": "false"
|
|
13554
|
-
},
|
|
13555
13549
|
{
|
|
13556
13550
|
"name": "icon-position",
|
|
13557
13551
|
"description": "Position of the icon.",
|
|
@@ -13589,13 +13583,6 @@
|
|
|
13589
13583
|
"type": "array",
|
|
13590
13584
|
"default": "[\"highlightBorderStyles\",\"highlightButtonStyles\",null]"
|
|
13591
13585
|
},
|
|
13592
|
-
{
|
|
13593
|
-
"name": "disabled",
|
|
13594
|
-
"attribute": "disabled",
|
|
13595
|
-
"description": "Disables the button",
|
|
13596
|
-
"type": "boolean",
|
|
13597
|
-
"default": "false"
|
|
13598
|
-
},
|
|
13599
13586
|
{
|
|
13600
13587
|
"name": "iconPosition",
|
|
13601
13588
|
"attribute": "icon-position",
|
|
@@ -13609,11 +13596,6 @@
|
|
|
13609
13596
|
"description": "Visually hides the text but still accessible",
|
|
13610
13597
|
"type": "boolean",
|
|
13611
13598
|
"default": "false"
|
|
13612
|
-
},
|
|
13613
|
-
{
|
|
13614
|
-
"name": "tooltipPosition",
|
|
13615
|
-
"type": "string",
|
|
13616
|
-
"default": "\"bottom\""
|
|
13617
13599
|
}
|
|
13618
13600
|
]
|
|
13619
13601
|
},
|
|
@@ -154,7 +154,7 @@ this.localizeHTML('octopus', {
|
|
|
154
154
|
|
|
155
155
|
### Common Resources
|
|
156
156
|
|
|
157
|
-
Some resources are common and shared across D2L applications. To use these, set the `loadCommon` option:
|
|
157
|
+
Some localization resources are common and shared across D2L applications. To use these resources, set the `loadCommon` option:
|
|
158
158
|
|
|
159
159
|
```javascript
|
|
160
160
|
static get localizeConfig() {
|
|
@@ -164,11 +164,21 @@ static get localizeConfig() {
|
|
|
164
164
|
}
|
|
165
165
|
```
|
|
166
166
|
|
|
167
|
+
#### localizeCommon
|
|
168
|
+
|
|
169
|
+
The localized value of [these common terms](https://github.com/BrightspaceUI/intl/blob/main/lang/en.js) can be accessed using `localizeCommon(name)`, where `intl-common:` is omitted from the term name.
|
|
170
|
+
|
|
171
|
+
Example:
|
|
172
|
+
|
|
173
|
+
```javascript
|
|
174
|
+
const value = localizer.localizeCommon('actions:copy'); // -> Copy in en-US
|
|
175
|
+
```
|
|
176
|
+
|
|
167
177
|
#### localizeCharacter
|
|
168
178
|
|
|
169
179
|
The localized value of the following characters can be accessed using `localizeCharacter(char)`:
|
|
170
|
-
* `'` (apostrophe)
|
|
171
180
|
* `&` (ampersand)
|
|
181
|
+
* `'` (apostrophe)
|
|
172
182
|
* `*` (asterisk)
|
|
173
183
|
* `\` (backslash)
|
|
174
184
|
* `:` (colon)
|
|
@@ -182,7 +192,7 @@ The localized value of the following characters can be accessed using `localizeC
|
|
|
182
192
|
* `"` (quotation mark)
|
|
183
193
|
|
|
184
194
|
```javascript
|
|
185
|
-
this.localizeCharacter('&'); // -> 'ampersand' in en-US
|
|
195
|
+
const value = this.localizeCharacter('&'); // -> 'ampersand' in en-US
|
|
186
196
|
```
|
|
187
197
|
|
|
188
198
|
## Off-Stack Language Overrides
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@brightspace-ui/core",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.344.1",
|
|
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",
|