@brightspace-ui/core 3.343.5 → 3.344.0
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.
|
@@ -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
|
},
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@brightspace-ui/core",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.344.0",
|
|
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",
|