@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
|
@@ -13,21 +13,17 @@ import { SelectionInfo } from './selection-mixin.js';
|
|
|
13
13
|
*/
|
|
14
14
|
class ActionMenuItem extends SelectionActionMixin(MenuItemMixin(LitElement)) {
|
|
15
15
|
|
|
16
|
-
static
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
}
|
|
28
|
-
`
|
|
29
|
-
];
|
|
30
|
-
}
|
|
16
|
+
static styles = [menuItemStyles, css`
|
|
17
|
+
:host {
|
|
18
|
+
align-items: center;
|
|
19
|
+
display: flex;
|
|
20
|
+
padding: 0.75rem 1rem;
|
|
21
|
+
}
|
|
22
|
+
d2l-icon {
|
|
23
|
+
flex: none;
|
|
24
|
+
margin-inline-start: 6px;
|
|
25
|
+
}
|
|
26
|
+
`];
|
|
31
27
|
|
|
32
28
|
connectedCallback() {
|
|
33
29
|
super.connectedCallback();
|
|
@@ -13,31 +13,27 @@ import { SelectionInfo } from './selection-mixin.js';
|
|
|
13
13
|
*/
|
|
14
14
|
class Action extends FocusMixin(SelectionActionMixin(ButtonMixin(LitElement))) {
|
|
15
15
|
|
|
16
|
-
static
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
};
|
|
29
|
-
}
|
|
16
|
+
static properties = {
|
|
17
|
+
/**
|
|
18
|
+
* Preset icon key (e.g. `tier1:gear`)
|
|
19
|
+
* @type {string}
|
|
20
|
+
*/
|
|
21
|
+
icon: { type: String, reflect: true },
|
|
22
|
+
/**
|
|
23
|
+
* REQUIRED: The text for the action
|
|
24
|
+
* @type {string}
|
|
25
|
+
*/
|
|
26
|
+
text: { type: String, reflect: true }
|
|
27
|
+
};
|
|
30
28
|
|
|
31
|
-
static
|
|
32
|
-
|
|
33
|
-
:
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
:
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
`;
|
|
40
|
-
}
|
|
29
|
+
static styles = css`
|
|
30
|
+
:host {
|
|
31
|
+
display: inline-block;
|
|
32
|
+
}
|
|
33
|
+
:host([hidden]) {
|
|
34
|
+
display: none;
|
|
35
|
+
}
|
|
36
|
+
`;
|
|
41
37
|
|
|
42
38
|
static get focusElementSelector() {
|
|
43
39
|
return 'd2l-button-subtle';
|
|
@@ -17,103 +17,99 @@ import { SelectionObserverMixin } from './selection-observer-mixin.js';
|
|
|
17
17
|
*/
|
|
18
18
|
export class SelectionControls extends PageableSubscriberMixin(SelectionObserverMixin(LocalizeCoreElement(LitElement))) {
|
|
19
19
|
|
|
20
|
-
static
|
|
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
|
-
|
|
49
|
-
|
|
50
|
-
:
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
@media (prefers-reduced-motion: no-preference) {
|
|
59
|
-
.d2l-selection-controls-shadow {
|
|
60
|
-
transition: box-shadow 200ms ease-out;
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
:host([_scrolled]) .d2l-selection-controls-shadow {
|
|
64
|
-
background-color: var(--d2l-selection-controls-background-color, var(--d2l-theme-background-color-base));
|
|
65
|
-
bottom: -4px;
|
|
66
|
-
box-shadow: 0 8px 12px -9px rgba(0, 0, 0, 0.3);
|
|
67
|
-
clip: rect(30px, auto, 200px, auto);
|
|
68
|
-
display: var(--d2l-selection-controls-shadow-display, block);
|
|
69
|
-
height: 40px;
|
|
70
|
-
margin: 0 calc(-1*var(--d2l-selection-controls-padding, 0px));
|
|
71
|
-
padding: 0 var(--d2l-selection-controls-padding, 0);
|
|
72
|
-
position: absolute;
|
|
73
|
-
width: 100%;
|
|
74
|
-
z-index: -1;
|
|
75
|
-
}
|
|
76
|
-
:host([hidden]) {
|
|
77
|
-
display: none;
|
|
78
|
-
}
|
|
79
|
-
.d2l-selection-controls-container {
|
|
80
|
-
align-items: center;
|
|
81
|
-
background-color: var(--d2l-selection-controls-background-color, var(--d2l-theme-background-color-base));
|
|
82
|
-
display: flex;
|
|
83
|
-
margin: 6px calc(-1*var(--d2l-selection-controls-padding, 0px));
|
|
84
|
-
min-height: 54px;
|
|
85
|
-
padding: 0 var(--d2l-selection-controls-padding, 0);
|
|
86
|
-
}
|
|
87
|
-
:host([no-sticky]) .d2l-selection-controls-container {
|
|
88
|
-
background-color: transparent;
|
|
89
|
-
}
|
|
90
|
-
.d2l-selection-controls-container-slim {
|
|
91
|
-
min-height: 36px;
|
|
92
|
-
}
|
|
93
|
-
d2l-selection-select-all, d2l-selection-summary {
|
|
94
|
-
flex: none;
|
|
95
|
-
}
|
|
96
|
-
d2l-selection-select-all + d2l-selection-summary {
|
|
97
|
-
margin-inline-start: 0.9rem;
|
|
98
|
-
}
|
|
99
|
-
d2l-selection-select-all-pages {
|
|
100
|
-
flex: none;
|
|
101
|
-
margin-inline-start: 0.45rem;
|
|
102
|
-
}
|
|
103
|
-
.d2l-selection-controls-actions {
|
|
104
|
-
--d2l-overflow-group-justify-content: flex-end;
|
|
105
|
-
flex: auto;
|
|
106
|
-
margin-inline-end: var(--d2l-selection-controls-offset, 0);
|
|
107
|
-
text-align: end;
|
|
108
|
-
}
|
|
109
|
-
.d2l-sticky-edge {
|
|
110
|
-
left: 0;
|
|
111
|
-
position: absolute;
|
|
112
|
-
right: 0;
|
|
113
|
-
top: -1px;
|
|
20
|
+
static properties = {
|
|
21
|
+
/**
|
|
22
|
+
* Whether to render select-all and selection summary
|
|
23
|
+
* @type {boolean}
|
|
24
|
+
*/
|
|
25
|
+
noSelection: { type: Boolean, attribute: 'no-selection' },
|
|
26
|
+
/**
|
|
27
|
+
* ADVANCED: Text to display if no items are selected (overrides pageable counts)
|
|
28
|
+
* @type {string}
|
|
29
|
+
*/
|
|
30
|
+
noSelectionText: { type: String, attribute: 'no-selection-text' },
|
|
31
|
+
/**
|
|
32
|
+
* Disables sticky positioning for the controls
|
|
33
|
+
* @type {boolean}
|
|
34
|
+
*/
|
|
35
|
+
noSticky: { type: Boolean, attribute: 'no-sticky', reflect: true },
|
|
36
|
+
/**
|
|
37
|
+
* Whether all pages can be selected
|
|
38
|
+
* @type {boolean}
|
|
39
|
+
*/
|
|
40
|
+
selectAllPagesAllowed: { type: Boolean, attribute: 'select-all-pages-allowed' },
|
|
41
|
+
_hasActions: { state: true },
|
|
42
|
+
_noSelectionText: { state: true },
|
|
43
|
+
_scrolled: { type: Boolean, reflect: true }
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
static styles = css`
|
|
47
|
+
:host {
|
|
48
|
+
display: block;
|
|
49
|
+
position: sticky;
|
|
50
|
+
top: 0;
|
|
51
|
+
}
|
|
52
|
+
:host([no-sticky]) {
|
|
53
|
+
position: static;
|
|
54
|
+
}
|
|
55
|
+
@media (prefers-reduced-motion: no-preference) {
|
|
56
|
+
.d2l-selection-controls-shadow {
|
|
57
|
+
transition: box-shadow 200ms ease-out;
|
|
114
58
|
}
|
|
115
|
-
|
|
116
|
-
|
|
59
|
+
}
|
|
60
|
+
:host([_scrolled]) .d2l-selection-controls-shadow {
|
|
61
|
+
background-color: var(--d2l-selection-controls-background-color, var(--d2l-theme-background-color-base));
|
|
62
|
+
bottom: -4px;
|
|
63
|
+
box-shadow: 0 8px 12px -9px rgba(0, 0, 0, 0.3);
|
|
64
|
+
clip: rect(30px, auto, 200px, auto);
|
|
65
|
+
display: var(--d2l-selection-controls-shadow-display, block);
|
|
66
|
+
height: 40px;
|
|
67
|
+
margin: 0 calc(-1*var(--d2l-selection-controls-padding, 0px));
|
|
68
|
+
padding: 0 var(--d2l-selection-controls-padding, 0);
|
|
69
|
+
position: absolute;
|
|
70
|
+
width: 100%;
|
|
71
|
+
z-index: -1;
|
|
72
|
+
}
|
|
73
|
+
:host([hidden]) {
|
|
74
|
+
display: none;
|
|
75
|
+
}
|
|
76
|
+
.d2l-selection-controls-container {
|
|
77
|
+
align-items: center;
|
|
78
|
+
background-color: var(--d2l-selection-controls-background-color, var(--d2l-theme-background-color-base));
|
|
79
|
+
display: flex;
|
|
80
|
+
margin: 6px calc(-1*var(--d2l-selection-controls-padding, 0px));
|
|
81
|
+
min-height: 54px;
|
|
82
|
+
padding: 0 var(--d2l-selection-controls-padding, 0);
|
|
83
|
+
}
|
|
84
|
+
:host([no-sticky]) .d2l-selection-controls-container {
|
|
85
|
+
background-color: transparent;
|
|
86
|
+
}
|
|
87
|
+
.d2l-selection-controls-container-slim {
|
|
88
|
+
min-height: 36px;
|
|
89
|
+
}
|
|
90
|
+
d2l-selection-select-all, d2l-selection-summary {
|
|
91
|
+
flex: none;
|
|
92
|
+
}
|
|
93
|
+
d2l-selection-select-all + d2l-selection-summary {
|
|
94
|
+
margin-inline-start: 0.9rem;
|
|
95
|
+
}
|
|
96
|
+
d2l-selection-select-all-pages {
|
|
97
|
+
flex: none;
|
|
98
|
+
margin-inline-start: 0.45rem;
|
|
99
|
+
}
|
|
100
|
+
.d2l-selection-controls-actions {
|
|
101
|
+
--d2l-overflow-group-justify-content: flex-end;
|
|
102
|
+
flex: auto;
|
|
103
|
+
margin-inline-end: var(--d2l-selection-controls-offset, 0);
|
|
104
|
+
text-align: end;
|
|
105
|
+
}
|
|
106
|
+
.d2l-sticky-edge {
|
|
107
|
+
left: 0;
|
|
108
|
+
position: absolute;
|
|
109
|
+
right: 0;
|
|
110
|
+
top: -1px;
|
|
111
|
+
}
|
|
112
|
+
`;
|
|
117
113
|
|
|
118
114
|
constructor() {
|
|
119
115
|
super();
|
|
@@ -19,50 +19,46 @@ const keyCodes = {
|
|
|
19
19
|
*/
|
|
20
20
|
class Input extends SkeletonMixin(LabelledMixin(LitElement)) {
|
|
21
21
|
|
|
22
|
-
static
|
|
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
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
display: none;
|
|
63
|
-
}
|
|
64
|
-
`];
|
|
65
|
-
}
|
|
22
|
+
static properties = {
|
|
23
|
+
/**
|
|
24
|
+
* State of the input
|
|
25
|
+
* @type {boolean}
|
|
26
|
+
*/
|
|
27
|
+
selected: { type: Boolean, reflect: true },
|
|
28
|
+
/**
|
|
29
|
+
* Disables the input
|
|
30
|
+
* @type {boolean}
|
|
31
|
+
*/
|
|
32
|
+
disabled: { type: Boolean, reflect: true },
|
|
33
|
+
/**
|
|
34
|
+
* Tooltip text when disabled
|
|
35
|
+
* @type {string}
|
|
36
|
+
*/
|
|
37
|
+
disabledTooltip: { type: String, attribute: 'disabled-tooltip' },
|
|
38
|
+
/**
|
|
39
|
+
* Private. Force hovering state of input
|
|
40
|
+
* @ignore
|
|
41
|
+
* @type {boolean}
|
|
42
|
+
*/
|
|
43
|
+
hovering: { type: Boolean },
|
|
44
|
+
/**
|
|
45
|
+
* REQUIRED: Key for the selectable
|
|
46
|
+
* @type {string}
|
|
47
|
+
*/
|
|
48
|
+
key: { type: String },
|
|
49
|
+
_indeterminate: { type: Boolean },
|
|
50
|
+
_provider: { type: Object }
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
static styles = [super.styles, radioStyles, css`
|
|
54
|
+
:host {
|
|
55
|
+
display: inline-block;
|
|
56
|
+
line-height: normal;
|
|
57
|
+
}
|
|
58
|
+
:host([hidden]) {
|
|
59
|
+
display: none;
|
|
60
|
+
}
|
|
61
|
+
`];
|
|
66
62
|
|
|
67
63
|
constructor() {
|
|
68
64
|
super();
|
|
@@ -51,19 +51,17 @@ export class SelectionInfo {
|
|
|
51
51
|
|
|
52
52
|
export const SelectionMixin = superclass => class extends CollectionMixin(superclass) {
|
|
53
53
|
|
|
54
|
-
static
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
};
|
|
66
|
-
}
|
|
54
|
+
static properties = {
|
|
55
|
+
/**
|
|
56
|
+
* @ignore
|
|
57
|
+
*/
|
|
58
|
+
selectionNoInputArrowKeyBehaviour: { type: Boolean, attribute: 'selection-no-input-arrow-key-behavior' },
|
|
59
|
+
/**
|
|
60
|
+
* Whether to render with single selection behaviour. If `selection-single` is specified, the nested `d2l-selection-input` elements will render radios instead of checkboxes, and the selection component will maintain a single selected item.
|
|
61
|
+
* @type {boolean}
|
|
62
|
+
*/
|
|
63
|
+
selectionSingle: { type: Boolean, attribute: 'selection-single' }
|
|
64
|
+
};
|
|
67
65
|
|
|
68
66
|
constructor() {
|
|
69
67
|
super();
|
|
@@ -3,22 +3,20 @@ import { SelectionInfo } from './selection-mixin.js';
|
|
|
3
3
|
|
|
4
4
|
export const SelectionObserverMixin = superclass => class extends superclass {
|
|
5
5
|
|
|
6
|
-
static
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
};
|
|
21
|
-
}
|
|
6
|
+
static properties = {
|
|
7
|
+
/**
|
|
8
|
+
* Id of the `SelectionMixin` component this component wants to observe (if not located within that component)
|
|
9
|
+
* @type {string}
|
|
10
|
+
*/
|
|
11
|
+
selectionFor: { type: String, reflect: true, attribute: 'selection-for' },
|
|
12
|
+
/**
|
|
13
|
+
* The selection info (set by the selection component)
|
|
14
|
+
* @ignore
|
|
15
|
+
* @type {object}
|
|
16
|
+
*/
|
|
17
|
+
selectionInfo: { type: Object },
|
|
18
|
+
_provider: { type: Object, attribute: false }
|
|
19
|
+
};
|
|
22
20
|
|
|
23
21
|
constructor() {
|
|
24
22
|
super();
|
|
@@ -12,16 +12,14 @@ import { SelectionObserverMixin } from './selection-observer-mixin.js';
|
|
|
12
12
|
*/
|
|
13
13
|
class SelectAllPages extends FocusMixin(LocalizeCoreElement(SelectionObserverMixin(LitElement))) {
|
|
14
14
|
|
|
15
|
-
static
|
|
16
|
-
|
|
17
|
-
:
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
:
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
`;
|
|
24
|
-
}
|
|
15
|
+
static styles = css`
|
|
16
|
+
:host {
|
|
17
|
+
display: inline-block;
|
|
18
|
+
}
|
|
19
|
+
:host([hidden]) {
|
|
20
|
+
display: none;
|
|
21
|
+
}
|
|
22
|
+
`;
|
|
25
23
|
|
|
26
24
|
static get focusElementSelector() {
|
|
27
25
|
return 'd2l-button-subtle';
|
|
@@ -12,27 +12,23 @@ import { SelectionObserverMixin } from './selection-observer-mixin.js';
|
|
|
12
12
|
*/
|
|
13
13
|
class SelectAll extends FocusMixin(LocalizeCoreElement(SelectionObserverMixin(LitElement))) {
|
|
14
14
|
|
|
15
|
-
static
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
};
|
|
23
|
-
}
|
|
15
|
+
static properties = {
|
|
16
|
+
/**
|
|
17
|
+
* Disables the select all checkbox
|
|
18
|
+
* @type {boolean}
|
|
19
|
+
*/
|
|
20
|
+
disabled: { type: Boolean }
|
|
21
|
+
};
|
|
24
22
|
|
|
25
|
-
static
|
|
26
|
-
|
|
27
|
-
:
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
:
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
`;
|
|
35
|
-
}
|
|
23
|
+
static styles = css`
|
|
24
|
+
:host {
|
|
25
|
+
display: inline-block;
|
|
26
|
+
line-height: normal;
|
|
27
|
+
}
|
|
28
|
+
:host([hidden]) {
|
|
29
|
+
display: none;
|
|
30
|
+
}
|
|
31
|
+
`;
|
|
36
32
|
|
|
37
33
|
constructor() {
|
|
38
34
|
super();
|
|
@@ -11,29 +11,25 @@ import { SelectionObserverMixin } from './selection-observer-mixin.js';
|
|
|
11
11
|
*/
|
|
12
12
|
class Summary extends LocalizeCoreElement(SelectionObserverMixin(LitElement)) {
|
|
13
13
|
|
|
14
|
-
static
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
};
|
|
22
|
-
}
|
|
14
|
+
static properties = {
|
|
15
|
+
/**
|
|
16
|
+
* Text to display if no items are selected
|
|
17
|
+
* @type {string}
|
|
18
|
+
*/
|
|
19
|
+
noSelectionText: { type: String, attribute: 'no-selection-text' }
|
|
20
|
+
};
|
|
23
21
|
|
|
24
|
-
static
|
|
25
|
-
|
|
26
|
-
:
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
:
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
`];
|
|
36
|
-
}
|
|
22
|
+
static styles = [bodyCompactStyles, css`
|
|
23
|
+
:host {
|
|
24
|
+
display: inline-block;
|
|
25
|
+
}
|
|
26
|
+
:host([hidden]) {
|
|
27
|
+
display: none;
|
|
28
|
+
}
|
|
29
|
+
p {
|
|
30
|
+
margin: 0;
|
|
31
|
+
}
|
|
32
|
+
`];
|
|
37
33
|
|
|
38
34
|
render() {
|
|
39
35
|
if (!this._summary) {
|
|
@@ -23,9 +23,7 @@ import { SkeletonMixin } from '@brightspace-ui/core/components/skeleton/skeleton
|
|
|
23
23
|
|
|
24
24
|
class MyElement extends SkeletonMixin(LitElement) {
|
|
25
25
|
|
|
26
|
-
static
|
|
27
|
-
return [ super.styles, ... ];
|
|
28
|
-
}
|
|
26
|
+
static styles = [ super.styles, ... ];
|
|
29
27
|
|
|
30
28
|
}
|
|
31
29
|
```
|
|
@@ -63,9 +61,7 @@ import { selectStyles } from '@brightspace-ui/core/components/inputs/input-selec
|
|
|
63
61
|
import { SkeletonMixin } from '@brightspace-ui/core/skeleton/skeleton-mixin.js';
|
|
64
62
|
|
|
65
63
|
class MyElement extends SkeletonMixin(LitElement) {
|
|
66
|
-
static
|
|
67
|
-
return [super.styles, selectStyles];
|
|
68
|
-
}
|
|
64
|
+
static styles = [super.styles, selectStyles];
|
|
69
65
|
render() {
|
|
70
66
|
return html`
|
|
71
67
|
<div class="d2l-skeletize">
|
|
@@ -4,11 +4,9 @@ import { SubscriberRegistryController } from '../../controllers/subscriber/subsc
|
|
|
4
4
|
|
|
5
5
|
export const SkeletonGroupMixin = dedupeMixin(superclass => class extends SkeletonMixin(superclass) {
|
|
6
6
|
|
|
7
|
-
static
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
};
|
|
11
|
-
}
|
|
7
|
+
static properties = {
|
|
8
|
+
_anySubscribersWithSkeletonActive : { state: true },
|
|
9
|
+
};
|
|
12
10
|
|
|
13
11
|
constructor() {
|
|
14
12
|
super();
|
|
@@ -166,15 +166,13 @@ export const skeletonStyles = css`
|
|
|
166
166
|
|
|
167
167
|
export const SkeletonMixin = dedupeMixin(superclass => class extends superclass {
|
|
168
168
|
|
|
169
|
-
static
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
};
|
|
177
|
-
}
|
|
169
|
+
static properties = {
|
|
170
|
+
/**
|
|
171
|
+
* Render the component as a [skeleton loader](https://github.com/BrightspaceUI/core/tree/main/components/skeleton).
|
|
172
|
+
* @type {boolean}
|
|
173
|
+
*/
|
|
174
|
+
skeleton: { reflect: true, type: Boolean },
|
|
175
|
+
};
|
|
178
176
|
|
|
179
177
|
static get styles() {
|
|
180
178
|
const styles = [ skeletonStyles ];
|