@brightspace-ui/core 3.267.3 → 3.268.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.
- package/components/collapsible-panel/README.md +11 -15
- package/components/demo/code-view.js +6 -10
- package/components/demo/demo-page-settings.js +25 -29
- package/components/demo/demo-page.js +32 -36
- package/components/demo/demo-snippet.js +95 -99
- package/components/description-list/README.md +25 -33
- package/components/description-list/demo/description-list-test.js +36 -39
- package/components/dialog/README.md +3 -5
- package/components/form/docs/form-element-mixin.md +11 -14
- package/components/form/docs/form-element-nesting.md +4 -6
- package/components/form/docs/form-element-wrapping.md +1 -3
- package/components/hierarchical-view/README.md +8 -11
- package/components/inputs/docs/input-select-styles.md +4 -9
- package/components/inputs/docs/styling-native-inputs.md +11 -25
- package/components/inputs/input-select-styles.js +30 -25
- package/components/link/README.md +1 -1
- package/components/list/README.md +8 -16
- package/components/menu/menu-item-checkbox.js +1 -3
- package/components/menu/menu-item-link.js +27 -33
- package/components/menu/menu-item-mixin.js +52 -54
- package/components/menu/menu-item-radio.js +1 -3
- package/components/menu/menu-item-return.js +18 -22
- package/components/menu/menu-item-selectable-mixin.js +12 -14
- package/components/menu/menu-item-separator.js +9 -11
- package/components/menu/menu-item.js +11 -15
- package/components/menu/menu.js +50 -54
- package/components/meter/meter-circle.js +3 -4
- package/components/meter/meter-linear.js +86 -88
- package/components/meter/meter-mixin.js +34 -36
- package/components/meter/meter-radial.js +3 -4
- package/components/more-less/more-less.js +57 -61
- package/components/object-property-list/object-property-list-item-link.js +18 -19
- package/components/object-property-list/object-property-list-item-tooltip-help.js +8 -9
- package/components/object-property-list/object-property-list-item.js +52 -55
- package/components/object-property-list/object-property-list.js +24 -27
- package/components/offscreen/README.md +1 -1
- package/components/offscreen/offscreen.js +13 -15
- package/components/offscreen/screen-reader-pause.js +1 -3
- package/components/overflow-group/README.md +1 -3
- package/components/overflow-group/overflow-group-mixin.js +55 -59
- package/components/overflow-group/overflow-group.js +38 -42
- package/components/page/page-header-button.js +41 -45
- package/components/page/page-header-custom.js +108 -112
- package/components/page/page-header-immersive.js +65 -69
- package/components/page/page-header-separator.js +12 -14
- package/components/paging/pageable-mixin.js +3 -5
- package/components/paging/pageable-subscriber-mixin.js +8 -10
- package/components/paging/pager-load-more.js +47 -51
- package/components/popover/popover-mixin.js +186 -190
- package/components/progress/progress.js +160 -164
- package/components/scroll-wrapper/scroll-wrapper.js +109 -113
- package/components/selection/README.md +5 -7
- package/components/selection/demo/demo-selection.js +5 -7
- package/components/selection/selection-action-dropdown.js +9 -13
- package/components/selection/selection-action-menu-item.js +11 -15
- package/components/selection/selection-action.js +20 -24
- package/components/selection/selection-controls.js +92 -96
- package/components/selection/selection-input.js +40 -44
- package/components/selection/selection-mixin.js +11 -13
- package/components/selection/selection-observer-mixin.js +14 -16
- package/components/selection/selection-select-all-pages.js +8 -10
- package/components/selection/selection-select-all.js +16 -20
- package/components/selection/selection-summary.js +18 -22
- package/components/skeleton/README.md +2 -6
- package/components/skeleton/skeleton-group-mixin.js +3 -5
- package/components/skeleton/skeleton-mixin.js +7 -9
- package/components/skip-nav/skip-nav-custom.js +33 -37
- package/components/sorting/sort.js +11 -13
- package/components/status-indicator/status-indicator.js +75 -79
- package/components/switch/switch-mixin.js +145 -149
- package/components/switch/switch-visibility.js +11 -15
- package/components/switch/switch.js +5 -7
- package/components/table/README.md +19 -37
- package/components/table/demo/table-test.js +27 -31
- package/components/table/table-col-sort-button-item.js +1 -3
- package/components/table/table-col-sort-button.js +105 -109
- package/components/table/table-controls.js +18 -21
- package/components/table/table-wrapper.js +124 -128
- package/components/tabs/tab-internal.js +72 -76
- package/components/tabs/tab-mixin.js +22 -24
- package/components/tabs/tab-panel-mixin.js +47 -51
- package/components/tabs/tab.js +7 -9
- package/components/tabs/tabs.js +171 -175
- package/components/tag-list/tag-list-item-mixin.js +103 -107
- package/components/tag-list/tag-list-item.js +13 -15
- package/components/tag-list/tag-list.js +54 -58
- package/components/tooltip/tooltip-help.js +67 -71
- package/components/tooltip/tooltip.js +103 -107
- package/components/typography/README.md +5 -7
- package/components/validation/validation-custom-mixin.js +4 -6
- package/components/view-switcher/view-switcher-button.js +42 -46
- package/components/view-switcher/view-switcher.js +26 -29
- package/controllers/subscriber/README.md +7 -11
- package/custom-elements.json +1026 -3850
- package/helpers/focus.js +5 -1
- package/mixins/arrow-keys/arrow-keys-mixin.js +10 -12
- package/mixins/async-container/async-container-mixin.js +10 -12
- package/mixins/collection/collection-mixin.js +7 -9
- package/mixins/interactive/interactive-mixin.js +10 -14
- package/mixins/labelled/README.md +3 -5
- package/mixins/labelled/labelled-mixin.js +26 -30
- package/mixins/provider/README.md +5 -7
- package/mixins/rtl/README.md +5 -7
- package/mixins/rtl/rtl-mixin.js +7 -9
- package/mixins/theme/theme-mixin.js +6 -8
- package/mixins/visible-on-ancestor/README.md +1 -3
- package/mixins/visible-on-ancestor/visible-on-ancestor-mixin.js +11 -13
- package/package.json +1 -1
- package/templates/primary-secondary/primary-secondary.js +373 -377
|
@@ -9,62 +9,59 @@ import { SkeletonMixin } from '../skeleton/skeleton-mixin.js';
|
|
|
9
9
|
* with an optional icon.
|
|
10
10
|
*/
|
|
11
11
|
export class ObjectPropertyListItem extends SkeletonMixin(LitElement) {
|
|
12
|
-
static get properties() {
|
|
13
|
-
return {
|
|
14
|
-
/**
|
|
15
|
-
* @ignore
|
|
16
|
-
*/
|
|
17
|
-
// eslint-disable-next-line lit/no-native-attributes
|
|
18
|
-
hidden: { type: Boolean },
|
|
19
|
-
/**
|
|
20
|
-
* Name of an optional icon to display
|
|
21
|
-
* @type {string}
|
|
22
|
-
*/
|
|
23
|
-
icon: { type: String },
|
|
24
|
-
/**
|
|
25
|
-
* REQUIRED: Text to display on the item
|
|
26
|
-
* @type {string}
|
|
27
|
-
*/
|
|
28
|
-
text: { type: String },
|
|
29
|
-
_showSeparator: { state: true },
|
|
30
|
-
};
|
|
31
|
-
}
|
|
32
12
|
|
|
33
|
-
static
|
|
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
|
-
|
|
67
|
-
|
|
13
|
+
static properties = {
|
|
14
|
+
/**
|
|
15
|
+
* @ignore
|
|
16
|
+
*/
|
|
17
|
+
// eslint-disable-next-line lit/no-native-attributes
|
|
18
|
+
hidden: { type: Boolean },
|
|
19
|
+
/**
|
|
20
|
+
* Name of an optional icon to display
|
|
21
|
+
* @type {string}
|
|
22
|
+
*/
|
|
23
|
+
icon: { type: String },
|
|
24
|
+
/**
|
|
25
|
+
* REQUIRED: Text to display on the item
|
|
26
|
+
* @type {string}
|
|
27
|
+
*/
|
|
28
|
+
text: { type: String },
|
|
29
|
+
_showSeparator: { state: true },
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
static styles = [super.styles, css`
|
|
33
|
+
:host {
|
|
34
|
+
unicode-bidi: isolate;
|
|
35
|
+
vertical-align: middle;
|
|
36
|
+
}
|
|
37
|
+
:host([hidden]) {
|
|
38
|
+
display: none;
|
|
39
|
+
}
|
|
40
|
+
d2l-icon {
|
|
41
|
+
height: 1.2857em; /* 18px desired height at main font size (14px), but using em to scale properly at smaller breakpoint. */
|
|
42
|
+
width: 1.2857em;
|
|
43
|
+
}
|
|
44
|
+
.separator {
|
|
45
|
+
margin: 0 -0.05rem; /* 10px desired margin, subtract 5px arbitrary whitespace and 6px whitespace inside bullet icon. */
|
|
46
|
+
}
|
|
47
|
+
.separator d2l-icon {
|
|
48
|
+
color: var(--d2l-theme-text-color-static-faint);
|
|
49
|
+
}
|
|
50
|
+
.item-icon {
|
|
51
|
+
margin-inline-end: 0.05rem; /* 6px desired margin, subtract 5px arbitrary whitespace. */
|
|
52
|
+
margin-top: -0.1rem;
|
|
53
|
+
}
|
|
54
|
+
:host([skeleton]) d2l-icon {
|
|
55
|
+
color: var(--d2l-theme-background-color-interactive-faint-hover);
|
|
56
|
+
}
|
|
57
|
+
:host([skeleton]) .d2l-skeletize {
|
|
58
|
+
display: inline-block;
|
|
59
|
+
max-width: 80%;
|
|
60
|
+
overflow: hidden;
|
|
61
|
+
vertical-align: middle;
|
|
62
|
+
white-space: nowrap;
|
|
63
|
+
}
|
|
64
|
+
`];
|
|
68
65
|
|
|
69
66
|
constructor() {
|
|
70
67
|
super();
|
|
@@ -11,34 +11,31 @@ import { SkeletonMixin } from '../skeleton/skeleton-mixin.js';
|
|
|
11
11
|
* @slot status - Slot for a single `d2l-status-indicator` to be rendered before the list
|
|
12
12
|
*/
|
|
13
13
|
class ObjectPropertyList extends LocalizeCoreElement(SkeletonMixin(LitElement)) {
|
|
14
|
-
static get properties() {
|
|
15
|
-
return {
|
|
16
|
-
/**
|
|
17
|
-
* Number of skeleton items to insert
|
|
18
|
-
* @type {number}
|
|
19
|
-
*/
|
|
20
|
-
skeletonCount: { type: Number, attribute: 'skeleton-count' },
|
|
21
|
-
};
|
|
22
|
-
}
|
|
23
14
|
|
|
24
|
-
static
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
15
|
+
static properties = {
|
|
16
|
+
/**
|
|
17
|
+
* Number of skeleton items to insert
|
|
18
|
+
* @type {number}
|
|
19
|
+
*/
|
|
20
|
+
skeletonCount: { type: Number, attribute: 'skeleton-count' },
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
static styles = [super.styles, bodySmallStyles, css`
|
|
24
|
+
:host {
|
|
25
|
+
display: block;
|
|
26
|
+
overflow-wrap: anywhere;
|
|
27
|
+
}
|
|
28
|
+
:host([hidden]) {
|
|
29
|
+
display: none;
|
|
30
|
+
}
|
|
31
|
+
::slotted([slot="status"]) {
|
|
32
|
+
display: none;
|
|
33
|
+
}
|
|
34
|
+
::slotted(d2l-status-indicator[slot="status"]:first-of-type) {
|
|
35
|
+
display: inline-block;
|
|
36
|
+
margin-inline-end: 0.25rem; /* 10px desired margin, subtract 5px arbitrary whitespace. */
|
|
37
|
+
}
|
|
38
|
+
`];
|
|
42
39
|
|
|
43
40
|
firstUpdated() {
|
|
44
41
|
this.addEventListener('d2l-object-property-list-item-visibility-change', () => this._onItemsChanged());
|
|
@@ -7,14 +7,14 @@ const OffSCREEN_SIZELESS = getFlag('d2l-offscreen-sizeless', true);
|
|
|
7
7
|
* A private helper declarations that should not be used by general consumers
|
|
8
8
|
*/
|
|
9
9
|
export const _offscreenStyleDeclarations = css`
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
10
|
+
direction: var(--d2l-document-direction, ${document.dir === 'rtl' ? css`rtl` : css`ltr`}); /* stylelint-disable-line @stylistic/string-quotes */
|
|
11
|
+
height: ${OffSCREEN_SIZELESS ? 0 : 1}px;
|
|
12
|
+
inset-inline-start: -10000px;
|
|
13
|
+
overflow: hidden;
|
|
14
|
+
position: absolute !important;
|
|
15
|
+
white-space: nowrap;
|
|
16
|
+
width: ${OffSCREEN_SIZELESS ? 0 : 1}px;
|
|
17
|
+
${document.dir === 'rtl' ? css`right` : css`left`}: -10000px;
|
|
18
18
|
`;
|
|
19
19
|
|
|
20
20
|
export const offscreenStyles = css`
|
|
@@ -28,13 +28,11 @@ export const offscreenStyles = css`
|
|
|
28
28
|
* @slot - Default content placed inside of the component
|
|
29
29
|
*/
|
|
30
30
|
class Offscreen extends LitElement {
|
|
31
|
-
static
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
`;
|
|
37
|
-
}
|
|
31
|
+
static styles = css`
|
|
32
|
+
:host {
|
|
33
|
+
${_offscreenStyleDeclarations}
|
|
34
|
+
}
|
|
35
|
+
`;
|
|
38
36
|
render() {
|
|
39
37
|
return html`<slot></slot>`;
|
|
40
38
|
}
|
|
@@ -3,9 +3,7 @@ import { getSeparator } from '@brightspace-ui/intl/lib/list.js';
|
|
|
3
3
|
import { offscreenStyles } from './offscreen.js';
|
|
4
4
|
|
|
5
5
|
export class ScreenReaderPause extends LitElement {
|
|
6
|
-
static
|
|
7
|
-
return offscreenStyles;
|
|
8
|
-
}
|
|
6
|
+
static styles = offscreenStyles;
|
|
9
7
|
|
|
10
8
|
render() {
|
|
11
9
|
return html`<span class="d2l-offscreen">${getSeparator({ nonBreaking: true })}</span>`;
|
|
@@ -24,65 +24,61 @@ async function filterAsync(arr, callback) {
|
|
|
24
24
|
|
|
25
25
|
export const OverflowGroupMixin = superclass => class extends LocalizeCoreElement(superclass) {
|
|
26
26
|
|
|
27
|
-
static
|
|
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
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
display: none !important;
|
|
83
|
-
}
|
|
84
|
-
`;
|
|
85
|
-
}
|
|
27
|
+
static properties = {
|
|
28
|
+
/**
|
|
29
|
+
* @ignore
|
|
30
|
+
*/
|
|
31
|
+
autoShow: {
|
|
32
|
+
type: Boolean,
|
|
33
|
+
attribute: 'auto-show',
|
|
34
|
+
},
|
|
35
|
+
/**
|
|
36
|
+
* minimum amount of slotted items to show
|
|
37
|
+
* @type {number}
|
|
38
|
+
*/
|
|
39
|
+
minToShow: {
|
|
40
|
+
type: Number,
|
|
41
|
+
reflect: true,
|
|
42
|
+
attribute: 'min-to-show',
|
|
43
|
+
},
|
|
44
|
+
/**
|
|
45
|
+
* maximum amount of slotted items to show
|
|
46
|
+
* @type {number}
|
|
47
|
+
*/
|
|
48
|
+
maxToShow: {
|
|
49
|
+
type: Number,
|
|
50
|
+
reflect: true,
|
|
51
|
+
attribute: 'max-to-show',
|
|
52
|
+
},
|
|
53
|
+
/**
|
|
54
|
+
* @ignore
|
|
55
|
+
*/
|
|
56
|
+
openerType: {
|
|
57
|
+
type: String,
|
|
58
|
+
attribute: 'opener-type'
|
|
59
|
+
},
|
|
60
|
+
_chompIndex: { state: true },
|
|
61
|
+
_itemGap: { state: true },
|
|
62
|
+
_mini: { state: true },
|
|
63
|
+
_wrapping: { state: true }
|
|
64
|
+
};
|
|
65
|
+
|
|
66
|
+
static styles = css`
|
|
67
|
+
:host {
|
|
68
|
+
display: block;
|
|
69
|
+
}
|
|
70
|
+
:host([hidden]) {
|
|
71
|
+
display: none;
|
|
72
|
+
}
|
|
73
|
+
.d2l-overflow-group-container {
|
|
74
|
+
align-items: var(--d2l-overflow-group-align-items, normal);
|
|
75
|
+
display: flex;
|
|
76
|
+
justify-content: var(--d2l-overflow-group-justify-content, normal);
|
|
77
|
+
}
|
|
78
|
+
.d2l-overflow-group-container ::slotted([data-is-chomped]) {
|
|
79
|
+
display: none !important;
|
|
80
|
+
}
|
|
81
|
+
`;
|
|
86
82
|
|
|
87
83
|
constructor() {
|
|
88
84
|
super();
|
|
@@ -69,49 +69,45 @@ function createMenuItemSeparator() {
|
|
|
69
69
|
*/
|
|
70
70
|
class OverflowGroup extends OverflowGroupMixin(LitElement) {
|
|
71
71
|
|
|
72
|
-
static
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
};
|
|
85
|
-
}
|
|
72
|
+
static properties = {
|
|
73
|
+
/**
|
|
74
|
+
* Setting this property will change the style of the overflow menu opener
|
|
75
|
+
* @type {'default'|'subtle'}
|
|
76
|
+
* @default "default"
|
|
77
|
+
*/
|
|
78
|
+
openerStyle: {
|
|
79
|
+
type: String,
|
|
80
|
+
reflect: true,
|
|
81
|
+
attribute: 'opener-style',
|
|
82
|
+
}
|
|
83
|
+
};
|
|
86
84
|
|
|
87
|
-
static
|
|
88
|
-
|
|
89
|
-
:
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
`];
|
|
114
|
-
}
|
|
85
|
+
static styles = [super.styles, css`
|
|
86
|
+
:host([opener-style="subtle"]) {
|
|
87
|
+
--d2l-button-icon-fill-color: var(--d2l-theme-text-color-interactive-default);
|
|
88
|
+
--d2l-button-icon-fill-color-hover: var(--d2l-theme-text-color-interactive-hover);
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
::slotted(d2l-button),
|
|
92
|
+
::slotted(d2l-link),
|
|
93
|
+
::slotted(span),
|
|
94
|
+
::slotted(d2l-dropdown:not(.d2l-overflow-dropdown)),
|
|
95
|
+
::slotted(d2l-dropdown-button) {
|
|
96
|
+
margin-inline-end: 0.6rem;
|
|
97
|
+
}
|
|
98
|
+
::slotted(d2l-button-subtle),
|
|
99
|
+
::slotted(d2l-button-icon),
|
|
100
|
+
::slotted(d2l-dropdown-button-subtle),
|
|
101
|
+
::slotted(d2l-dropdown-more),
|
|
102
|
+
::slotted(d2l-dropdown-context-menu),
|
|
103
|
+
::slotted(d2l-selection-action),
|
|
104
|
+
::slotted(d2l-selection-action-dropdown) {
|
|
105
|
+
margin-inline-end: 0.2rem;
|
|
106
|
+
}
|
|
107
|
+
::slotted(*:last-child) {
|
|
108
|
+
margin-inline-end: 0;
|
|
109
|
+
}
|
|
110
|
+
`];
|
|
115
111
|
|
|
116
112
|
constructor() {
|
|
117
113
|
super();
|
|
@@ -12,52 +12,48 @@ import { ifDefined } from 'lit/directives/if-defined.js';
|
|
|
12
12
|
*/
|
|
13
13
|
class PageHeaderButton extends FocusMixin(LitElement) {
|
|
14
14
|
|
|
15
|
-
static
|
|
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
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
};
|
|
48
|
-
}
|
|
15
|
+
static properties = {
|
|
16
|
+
/**
|
|
17
|
+
* Disables the button
|
|
18
|
+
* @type {boolean}
|
|
19
|
+
*/
|
|
20
|
+
disabled: { reflect: true, type: Boolean },
|
|
21
|
+
/**
|
|
22
|
+
* REQUIRED: Preset icon key (e.g. "tier1:gear")
|
|
23
|
+
* @type {string}
|
|
24
|
+
*/
|
|
25
|
+
icon: { type: String },
|
|
26
|
+
/**
|
|
27
|
+
* Position of the icon.
|
|
28
|
+
* @type {'start'|'end'}
|
|
29
|
+
*/
|
|
30
|
+
iconPosition: { attribute: 'icon-position', type: String },
|
|
31
|
+
/**
|
|
32
|
+
* REQUIRED: Text for the button
|
|
33
|
+
* @type {string}
|
|
34
|
+
*/
|
|
35
|
+
text: { type: String },
|
|
36
|
+
/**
|
|
37
|
+
* Visually hides the text but still accessible
|
|
38
|
+
* @type {boolean}
|
|
39
|
+
*/
|
|
40
|
+
textHidden: { attribute: 'text-hidden', type: Boolean },
|
|
41
|
+
/**
|
|
42
|
+
* Offset of the tooltip
|
|
43
|
+
* @type {Number}
|
|
44
|
+
*/
|
|
45
|
+
tooltipOffset: { attribute: 'tooltip-offset', type: Number },
|
|
46
|
+
};
|
|
49
47
|
|
|
50
|
-
static
|
|
51
|
-
|
|
52
|
-
:
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
:
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
`];
|
|
60
|
-
}
|
|
48
|
+
static styles = [highlightBorderStyles, highlightButtonStyles, css`
|
|
49
|
+
:host {
|
|
50
|
+
display: inline-block;
|
|
51
|
+
height: 100%;
|
|
52
|
+
}
|
|
53
|
+
:host([hidden]) {
|
|
54
|
+
display: none;
|
|
55
|
+
}
|
|
56
|
+
`];
|
|
61
57
|
|
|
62
58
|
constructor() {
|
|
63
59
|
super();
|