@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
|
@@ -16,125 +16,121 @@ const customScroll = isWindows && !isMobile;
|
|
|
16
16
|
*/
|
|
17
17
|
class PageHeaderCustom extends LitElement {
|
|
18
18
|
|
|
19
|
-
static
|
|
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
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
19
|
+
static properties = {
|
|
20
|
+
/**
|
|
21
|
+
* When set, the bottom slot will be a "d2l-visible-on-ancestor-target"
|
|
22
|
+
* @type {boolean}
|
|
23
|
+
*/
|
|
24
|
+
bottomIsVisibleOnAncestorTarget: { type: Boolean, attribute: 'bottom-is-visible-on-ancestor-target' },
|
|
25
|
+
/**
|
|
26
|
+
* Whether to render a skip nav link
|
|
27
|
+
* @type {boolean}
|
|
28
|
+
*/
|
|
29
|
+
hasSkipNav: { type: Boolean, attribute: 'has-skip-nav', reflect: true },
|
|
30
|
+
_hasBottom: { state: true }
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
static styles = [css`
|
|
34
|
+
:host {
|
|
35
|
+
background-color: white;
|
|
36
|
+
display: block;
|
|
37
|
+
position: relative;
|
|
38
|
+
}
|
|
39
|
+
:host([hidden]) {
|
|
40
|
+
display: none;
|
|
41
|
+
}
|
|
42
|
+
.band {
|
|
43
|
+
background: linear-gradient(180deg, var(--d2l-branding-primary-color, var(--d2l-color-celestine)) 1.5rem, #ffffff 0%);
|
|
44
|
+
line-height: 0;
|
|
45
|
+
min-height: 4px;
|
|
46
|
+
position: relative; /* Needed for Firefox */
|
|
47
|
+
}
|
|
48
|
+
.band .padding {
|
|
49
|
+
display: inline-block;
|
|
50
|
+
position: unset;
|
|
51
|
+
vertical-align: top;
|
|
52
|
+
}
|
|
53
|
+
.band-scroll {
|
|
54
|
+
overflow-x: auto;
|
|
55
|
+
overflow-y: hidden;
|
|
56
|
+
scroll-behavior: smooth;
|
|
57
|
+
}
|
|
58
|
+
@media (prefers-reduced-motion: reduce) {
|
|
56
59
|
.band-scroll {
|
|
57
|
-
|
|
58
|
-
overflow-y: hidden;
|
|
59
|
-
scroll-behavior: smooth;
|
|
60
|
-
}
|
|
61
|
-
@media (prefers-reduced-motion: reduce) {
|
|
62
|
-
.band-scroll {
|
|
63
|
-
scroll-behavior: auto;
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
.band-scroll[data-custom-scroll] {
|
|
67
|
-
/* Firefox Styles */
|
|
68
|
-
scrollbar-color: var(--d2l-color-galena) var(--d2l-color-sylvite);
|
|
69
|
-
scrollbar-width: thin;
|
|
70
|
-
}
|
|
71
|
-
/* Webkit Styles */
|
|
72
|
-
.band-scroll[data-custom-scroll]::-webkit-scrollbar {
|
|
73
|
-
background-color: var(--d2l-color-sylvite);
|
|
74
|
-
border-radius: 8px;
|
|
75
|
-
height: 9px;
|
|
60
|
+
scroll-behavior: auto;
|
|
76
61
|
}
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
62
|
+
}
|
|
63
|
+
.band-scroll[data-custom-scroll] {
|
|
64
|
+
/* Firefox Styles */
|
|
65
|
+
scrollbar-color: var(--d2l-color-galena) var(--d2l-color-sylvite);
|
|
66
|
+
scrollbar-width: thin;
|
|
67
|
+
}
|
|
68
|
+
/* Webkit Styles */
|
|
69
|
+
.band-scroll[data-custom-scroll]::-webkit-scrollbar {
|
|
70
|
+
background-color: var(--d2l-color-sylvite);
|
|
71
|
+
border-radius: 8px;
|
|
72
|
+
height: 9px;
|
|
73
|
+
}
|
|
74
|
+
.band-scroll[data-custom-scroll]::-webkit-scrollbar-thumb {
|
|
75
|
+
background-color: var(--d2l-color-galena);
|
|
76
|
+
border-bottom: 1px solid var(--d2l-color-sylvite);
|
|
77
|
+
border-radius: 8px;
|
|
78
|
+
border-top: 1px solid var(--d2l-color-sylvite);
|
|
79
|
+
}
|
|
80
|
+
/* Faded edges styles */
|
|
81
|
+
.band-scroll-before,
|
|
82
|
+
.band-scroll-after {
|
|
83
|
+
height: 100%;
|
|
84
|
+
max-height: 1.5rem; /* should match linear-background height */
|
|
85
|
+
pointer-events: none;
|
|
86
|
+
position: absolute;
|
|
87
|
+
top: 0;
|
|
88
|
+
width: var(--d2l-page-padding, 30px);
|
|
89
|
+
z-index: 2;
|
|
90
|
+
}
|
|
91
|
+
.band-scroll-before {
|
|
92
|
+
background: linear-gradient(to right, var(--d2l-branding-primary-color, var(--d2l-color-celestine)), transparent);
|
|
93
|
+
left: 0;
|
|
94
|
+
}
|
|
95
|
+
.band-scroll-after {
|
|
96
|
+
background: linear-gradient(to left, var(--d2l-branding-primary-color, var(--d2l-color-celestine)), transparent);
|
|
97
|
+
right: 0;
|
|
98
|
+
}
|
|
99
|
+
@media (max-width: 615px) {
|
|
84
100
|
.band-scroll-before,
|
|
85
101
|
.band-scroll-after {
|
|
86
|
-
|
|
87
|
-
max-height: 1.5rem; /* should match linear-background height */
|
|
88
|
-
pointer-events: none;
|
|
89
|
-
position: absolute;
|
|
90
|
-
top: 0;
|
|
91
|
-
width: var(--d2l-page-padding, 30px);
|
|
92
|
-
z-index: 2;
|
|
93
|
-
}
|
|
94
|
-
.band-scroll-before {
|
|
95
|
-
background: linear-gradient(to right, var(--d2l-branding-primary-color, var(--d2l-color-celestine)), transparent);
|
|
96
|
-
left: 0;
|
|
102
|
+
width: 15px;
|
|
97
103
|
}
|
|
104
|
+
}
|
|
105
|
+
@media (min-width: 1230px) {
|
|
106
|
+
.band-scroll-before,
|
|
98
107
|
.band-scroll-after {
|
|
99
|
-
|
|
100
|
-
right: 0;
|
|
101
|
-
}
|
|
102
|
-
@media (max-width: 615px) {
|
|
103
|
-
.band-scroll-before,
|
|
104
|
-
.band-scroll-after {
|
|
105
|
-
width: 15px;
|
|
106
|
-
}
|
|
107
|
-
}
|
|
108
|
-
@media (min-width: 1230px) {
|
|
109
|
-
.band-scroll-before,
|
|
110
|
-
.band-scroll-after {
|
|
111
|
-
width: 30px;
|
|
112
|
-
}
|
|
113
|
-
}
|
|
114
|
-
.bottom,
|
|
115
|
-
.top {
|
|
116
|
-
border-bottom: 1px solid rgba(124, 134, 149, 0.18);
|
|
117
|
-
}
|
|
118
|
-
.bottom {
|
|
119
|
-
background-color: var(--d2l-page-header-bottom-background-color, transparent);
|
|
108
|
+
width: 30px;
|
|
120
109
|
}
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
110
|
+
}
|
|
111
|
+
.bottom,
|
|
112
|
+
.top {
|
|
113
|
+
border-bottom: 1px solid rgba(124, 134, 149, 0.18);
|
|
114
|
+
}
|
|
115
|
+
.bottom {
|
|
116
|
+
background-color: var(--d2l-page-header-bottom-background-color, transparent);
|
|
117
|
+
}
|
|
118
|
+
.shadow {
|
|
119
|
+
background-color: rgba(0, 0, 0, 0.02);
|
|
120
|
+
bottom: -4px;
|
|
121
|
+
height: 4px;
|
|
122
|
+
pointer-events: none;
|
|
123
|
+
position: absolute;
|
|
124
|
+
width: 100%;
|
|
125
|
+
}
|
|
126
|
+
.max-width {
|
|
127
|
+
margin-inline: var(--d2l-page-margin-inline, auto);
|
|
128
|
+
max-width: var(--d2l-page-header-max-width, 1230px);
|
|
129
|
+
}
|
|
130
|
+
.padding {
|
|
131
|
+
padding-inline: var(--d2l-page-padding, 30px);
|
|
132
|
+
}
|
|
133
|
+
`];
|
|
138
134
|
|
|
139
135
|
constructor() {
|
|
140
136
|
super();
|
|
@@ -11,80 +11,76 @@ import { RequesterMixin } from '../../mixins/provider/provider-mixin.js';
|
|
|
11
11
|
|
|
12
12
|
class PageHeaderImmersive extends RequesterMixin(LocalizeCoreElement(LitElement)) {
|
|
13
13
|
|
|
14
|
-
static
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
};
|
|
23
|
-
}
|
|
14
|
+
static properties = {
|
|
15
|
+
backHref: { attribute: 'back-href', type: String },
|
|
16
|
+
backCustomText: { attribute: 'back-custom-text', type: String },
|
|
17
|
+
titleText: { attribute: 'title-text', type: String },
|
|
18
|
+
subtitleText: { attribute: 'subtitle-text', type: String },
|
|
19
|
+
_error: { state: true },
|
|
20
|
+
_hasActions: { state: true }
|
|
21
|
+
};
|
|
24
22
|
|
|
25
|
-
static
|
|
26
|
-
|
|
27
|
-
:
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
23
|
+
static styles = [bodyCompactStyles, heading3Styles, labelStyles, highlightBorderStyles, highlightLinkStyles, css`
|
|
24
|
+
:host {
|
|
25
|
+
display: block;
|
|
26
|
+
}
|
|
27
|
+
:host([hidden]),
|
|
28
|
+
.actions[hidden] {
|
|
29
|
+
display: none;
|
|
30
|
+
}
|
|
31
|
+
.container {
|
|
32
|
+
align-items: stretch;
|
|
33
|
+
display: flex;
|
|
34
|
+
gap: 24px;
|
|
35
|
+
height: 3.1rem;
|
|
36
|
+
}
|
|
37
|
+
.title {
|
|
38
|
+
flex: 0 1 auto;
|
|
39
|
+
min-width: 0;
|
|
40
|
+
width: 100%;
|
|
41
|
+
}
|
|
42
|
+
.back,
|
|
43
|
+
.actions {
|
|
44
|
+
flex: 0 0 auto;
|
|
45
|
+
}
|
|
46
|
+
.title,
|
|
47
|
+
.actions {
|
|
48
|
+
border-inline-start: 1px solid var(--d2l-color-gypsum);
|
|
49
|
+
padding-inline-start: 24px;
|
|
50
|
+
}
|
|
51
|
+
.title h1 {
|
|
52
|
+
display: flex;
|
|
53
|
+
flex-direction: column;
|
|
54
|
+
height: 100%;
|
|
55
|
+
justify-content: center;
|
|
56
|
+
margin: 0;
|
|
57
|
+
}
|
|
58
|
+
.actions {
|
|
59
|
+
align-items: center;
|
|
60
|
+
display: flex;
|
|
61
|
+
gap: 0.6rem;
|
|
62
|
+
}
|
|
63
|
+
.title h1 .d2l-heading-3 {
|
|
64
|
+
margin: 0;
|
|
65
|
+
}
|
|
66
|
+
.back-text-short {
|
|
67
|
+
display: none;
|
|
68
|
+
}
|
|
69
|
+
@media (max-width: 615px) {
|
|
70
|
+
.back-text-long {
|
|
32
71
|
display: none;
|
|
33
72
|
}
|
|
34
|
-
.container {
|
|
35
|
-
align-items: stretch;
|
|
36
|
-
display: flex;
|
|
37
|
-
gap: 24px;
|
|
38
|
-
height: 3.1rem;
|
|
39
|
-
}
|
|
40
|
-
.title {
|
|
41
|
-
flex: 0 1 auto;
|
|
42
|
-
min-width: 0;
|
|
43
|
-
width: 100%;
|
|
44
|
-
}
|
|
45
|
-
.back,
|
|
46
|
-
.actions {
|
|
47
|
-
flex: 0 0 auto;
|
|
48
|
-
}
|
|
49
|
-
.title,
|
|
50
|
-
.actions {
|
|
51
|
-
border-inline-start: 1px solid var(--d2l-color-gypsum);
|
|
52
|
-
padding-inline-start: 24px;
|
|
53
|
-
}
|
|
54
|
-
.title h1 {
|
|
55
|
-
display: flex;
|
|
56
|
-
flex-direction: column;
|
|
57
|
-
height: 100%;
|
|
58
|
-
justify-content: center;
|
|
59
|
-
margin: 0;
|
|
60
|
-
}
|
|
61
|
-
.actions {
|
|
62
|
-
align-items: center;
|
|
63
|
-
display: flex;
|
|
64
|
-
gap: 0.6rem;
|
|
65
|
-
}
|
|
66
|
-
.title h1 .d2l-heading-3 {
|
|
67
|
-
margin: 0;
|
|
68
|
-
}
|
|
69
73
|
.back-text-short {
|
|
70
|
-
display:
|
|
71
|
-
}
|
|
72
|
-
@media (max-width: 615px) {
|
|
73
|
-
.back-text-long {
|
|
74
|
-
display: none;
|
|
75
|
-
}
|
|
76
|
-
.back-text-short {
|
|
77
|
-
display: inline;
|
|
78
|
-
}
|
|
74
|
+
display: inline;
|
|
79
75
|
}
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
|
|
76
|
+
}
|
|
77
|
+
d2l-alert {
|
|
78
|
+
margin: 10px auto;
|
|
79
|
+
}
|
|
80
|
+
.title-text {
|
|
81
|
+
${overflowEllipsisDeclarations}
|
|
82
|
+
}
|
|
83
|
+
`];
|
|
88
84
|
|
|
89
85
|
constructor() {
|
|
90
86
|
super();
|
|
@@ -7,20 +7,18 @@ import { css, html, LitElement } from 'lit';
|
|
|
7
7
|
*/
|
|
8
8
|
class PageHeaderSeparator extends LitElement {
|
|
9
9
|
|
|
10
|
-
static
|
|
11
|
-
|
|
12
|
-
:
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
:
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
d2l-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
`;
|
|
23
|
-
}
|
|
10
|
+
static styles = css`
|
|
11
|
+
:host {
|
|
12
|
+
display: inline-block;
|
|
13
|
+
margin: 0 9px;
|
|
14
|
+
}
|
|
15
|
+
:host([hidden]) {
|
|
16
|
+
display: none;
|
|
17
|
+
}
|
|
18
|
+
d2l-icon {
|
|
19
|
+
color: var(--d2l-color-mica);
|
|
20
|
+
}
|
|
21
|
+
`;
|
|
24
22
|
|
|
25
23
|
render() {
|
|
26
24
|
return html`
|
|
@@ -4,11 +4,9 @@ import { SubscriberRegistryController } from '../../controllers/subscriber/subsc
|
|
|
4
4
|
|
|
5
5
|
export const PageableMixin = superclass => class extends CollectionMixin(superclass) {
|
|
6
6
|
|
|
7
|
-
static
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
};
|
|
11
|
-
}
|
|
7
|
+
static properties = {
|
|
8
|
+
_itemShowingCount: { state: true },
|
|
9
|
+
};
|
|
12
10
|
|
|
13
11
|
constructor() {
|
|
14
12
|
super();
|
|
@@ -2,16 +2,14 @@ import { EventSubscriberController, IdSubscriberController } from '../../control
|
|
|
2
2
|
|
|
3
3
|
export const PageableSubscriberMixin = superclass => class extends superclass {
|
|
4
4
|
|
|
5
|
-
static
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
};
|
|
14
|
-
}
|
|
5
|
+
static properties = {
|
|
6
|
+
/**
|
|
7
|
+
* Id of the `PageableMixin` component this component wants to observe (if not located within that component)
|
|
8
|
+
* @type {string}
|
|
9
|
+
*/
|
|
10
|
+
pageableFor: { type: String, reflect: true, attribute: 'pageable-for' },
|
|
11
|
+
_pageableInfo: { state: true }
|
|
12
|
+
};
|
|
15
13
|
|
|
16
14
|
constructor() {
|
|
17
15
|
super();
|
|
@@ -20,57 +20,53 @@ const nativeFocus = document.createElement('div').focus;
|
|
|
20
20
|
*/
|
|
21
21
|
class LoadMore extends PageableSubscriberMixin(FocusMixin(LocalizeCoreElement(LitElement))) {
|
|
22
22
|
|
|
23
|
-
static
|
|
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
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
font-weight: 400;
|
|
71
|
-
}
|
|
72
|
-
`];
|
|
73
|
-
}
|
|
23
|
+
static properties = {
|
|
24
|
+
/**
|
|
25
|
+
* Whether there are more items that can be loaded.
|
|
26
|
+
* @type {boolean}
|
|
27
|
+
*/
|
|
28
|
+
hasMore: { type: Boolean, attribute: 'has-more', reflect: true },
|
|
29
|
+
/**
|
|
30
|
+
* The number of additional items to load.
|
|
31
|
+
* @type {number}
|
|
32
|
+
*/
|
|
33
|
+
pageSize: { type: Number, attribute: 'page-size', reflect: true },
|
|
34
|
+
_loading: { state: true }
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
static styles = [buttonStyles, labelStyles, offscreenStyles, css`
|
|
38
|
+
:host {
|
|
39
|
+
display: block;
|
|
40
|
+
}
|
|
41
|
+
:host(:not([has-more])),
|
|
42
|
+
:host([hidden]) {
|
|
43
|
+
display: none;
|
|
44
|
+
}
|
|
45
|
+
button {
|
|
46
|
+
align-items: center;
|
|
47
|
+
background-color: var(--d2l-theme-background-color-interactive-faint-default);
|
|
48
|
+
border: 1px solid var(--d2l-theme-border-color-subtle);
|
|
49
|
+
display: flex;
|
|
50
|
+
font-family: inherit;
|
|
51
|
+
gap: 0.5rem;
|
|
52
|
+
justify-content: center;
|
|
53
|
+
width: 100%;
|
|
54
|
+
}
|
|
55
|
+
button:hover {
|
|
56
|
+
background-color: var(--d2l-theme-background-color-interactive-faint-hover);
|
|
57
|
+
}
|
|
58
|
+
.action {
|
|
59
|
+
color: var(--d2l-theme-text-color-interactive-default);
|
|
60
|
+
}
|
|
61
|
+
.separator {
|
|
62
|
+
border-right: 1px solid var(--d2l-theme-border-color-standard);
|
|
63
|
+
height: 0.8rem;
|
|
64
|
+
}
|
|
65
|
+
.info {
|
|
66
|
+
color: var(--d2l-theme-text-color-static-faint);
|
|
67
|
+
font-weight: 400;
|
|
68
|
+
}
|
|
69
|
+
`];
|
|
74
70
|
|
|
75
71
|
constructor() {
|
|
76
72
|
super();
|