@brightspace-ui/core 2.167.2 → 2.168.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.
- package/README.md +1 -1
- package/components/alert/alert.js +1 -1
- package/components/breadcrumbs/breadcrumb.js +1 -1
- package/components/calendar/calendar.js +1 -1
- package/components/count-badge/count-badge-mixin.js +1 -1
- package/components/count-badge/count-badge.js +1 -1
- package/components/demo/demo-snippet.js +3 -3
- package/components/dialog/dialog-fullscreen.js +2 -2
- package/components/dropdown/dropdown-content-mixin.js +3 -3
- package/components/filter/demo/filter-load-more-demo.js +2 -2
- package/components/filter/filter-dimension-set.js +10 -10
- package/components/filter/filter.js +2 -2
- package/components/inputs/input-time-range.js +1 -1
- package/components/inputs/input-time.js +1 -1
- package/components/list/demo/demo-list-nested-iterations-helper.js +1 -1
- package/components/list/list-item-checkbox-mixin.js +5 -5
- package/components/list/list-item-drag-drop-mixin.js +1 -1
- package/components/list/list-item-drag-handle.js +1 -1
- package/components/list/list-item-expand-collapse-mixin.js +1 -1
- package/components/list/list-item-mixin.js +6 -6
- package/components/list/list.js +1 -1
- package/components/meter/meter-circle.js +1 -1
- package/components/meter/meter-linear.js +2 -2
- package/components/meter/meter-radial.js +1 -1
- package/components/overflow-group/overflow-group.js +3 -3
- package/components/selection/selection-mixin.js +1 -1
- package/components/skeleton/skeleton-group-mixin.js +1 -1
- package/components/tooltip/tooltip.js +9 -9
- package/components/typography/demo/typography.html +15 -0
- package/components/typography/typography.js +47 -5
- package/components/typography/typography.scss +38 -2
- package/helpers/getLocalizeResources.js +1 -1
- package/helpers/mathjax.js +1 -1
- package/mixins/localize/localize-mixin.js +11 -11
- package/package.json +2 -2
- package/templates/primary-secondary/primary-secondary.js +1 -1
package/README.md
CHANGED
@@ -172,7 +172,7 @@ class Alert extends LocalizeCoreElement(RtlMixin(LitElement)) {
|
|
172
172
|
}
|
173
173
|
|
174
174
|
render() {
|
175
|
-
const hasActions = this.buttonText && this.buttonText.length > 0
|
175
|
+
const hasActions = this.buttonText && this.buttonText.length > 0 || this.hasCloseButton;
|
176
176
|
const alertTextClasses = {
|
177
177
|
'd2l-alert-text': true,
|
178
178
|
'd2l-alert-text-with-actions': hasActions,
|
@@ -70,7 +70,7 @@ export function getDatesInMonthArray(shownMonth, shownYear) {
|
|
70
70
|
let nextMonthDay = 1;
|
71
71
|
let firstDateOfWeek = daysInWeek - numDaysFromPrevMonthToShow + 1;
|
72
72
|
const numWeeks = Math.ceil((numDaysFromPrevMonthToShow + numDays) / daysInWeek);
|
73
|
-
const nextMonth =
|
73
|
+
const nextMonth = getNextMonth(shownMonth);
|
74
74
|
const nextMonthYear = (shownMonth === 11) ? (shownYear + 1) : shownYear;
|
75
75
|
for (let i = 1; i < numWeeks; i++) {
|
76
76
|
const week = [];
|
@@ -43,7 +43,7 @@ class CountBadge extends FocusMixin(CountBadgeMixin(LitElement)) {
|
|
43
43
|
|
44
44
|
render() {
|
45
45
|
const tabbable = (this.tabStop || this.hasTooltip) && !(this.hideZero && this.number === 0) && !this.skeleton;
|
46
|
-
const innerHtml =
|
46
|
+
const innerHtml = html`
|
47
47
|
<div
|
48
48
|
class="d2l-count-badge-wrapper d2l-skeletize"
|
49
49
|
id="${this._badgeId}"
|
@@ -219,9 +219,9 @@ class DemoSnippet extends LitElement {
|
|
219
219
|
});
|
220
220
|
|
221
221
|
return lines.join('\n')
|
222
|
-
.replace(/ class=""/g, '')
|
223
|
-
.replace(/_[^=]*="[^"]*"/, '')
|
224
|
-
.replace(/=""/g, '');
|
222
|
+
.replace(/ class=""/g, '') // replace empty class attributes (class="")
|
223
|
+
.replace(/_[^=]*="[^"]*"/, '') // replace private reflected properties (_attr="value")
|
224
|
+
.replace(/=""/g, ''); // replace empty strings for boolean attributes (="")
|
225
225
|
}
|
226
226
|
|
227
227
|
async _handleFullscreenChange(e) {
|
@@ -296,8 +296,8 @@ class DialogFullscreen extends LocalizeCoreElement(AsyncContainerMixin(DialogMix
|
|
296
296
|
}
|
297
297
|
|
298
298
|
_handleResize() {
|
299
|
-
this._icon =
|
300
|
-
this._headerStyle =
|
299
|
+
this._icon = mediaQueryList.matches ? 'tier1:close-small' : 'tier1:close-large-thick';
|
300
|
+
this._headerStyle = mediaQueryList.matches ? 'd2l-heading-3' : 'd2l-heading-2';
|
301
301
|
}
|
302
302
|
|
303
303
|
}
|
@@ -873,7 +873,7 @@ export const DropdownContentMixin = superclass => class extends LocalizeCoreElem
|
|
873
873
|
|
874
874
|
maxWidthOverride = `${maxWidthOverride}px`;
|
875
875
|
minWidthOverride = `${minWidthOverride}px`;
|
876
|
-
const
|
876
|
+
const contentWidth = `${widthOverride + 18}px`;
|
877
877
|
/* add 2 to content width since scrollWidth does not include border */
|
878
878
|
const containerWidth = `${widthOverride + 20}px`;
|
879
879
|
|
@@ -1045,7 +1045,7 @@ export const DropdownContentMixin = superclass => class extends LocalizeCoreElem
|
|
1045
1045
|
}
|
1046
1046
|
|
1047
1047
|
async _handleMobileResize() {
|
1048
|
-
this._useMobileStyling =
|
1048
|
+
this._useMobileStyling = this.mediaQueryList.matches;
|
1049
1049
|
if (this.opened) this._showBackdrop = this._useMobileStyling && this.mobileTray;
|
1050
1050
|
if (this.opened) await this.__position();
|
1051
1051
|
}
|
@@ -1125,7 +1125,7 @@ export const DropdownContentMixin = superclass => class extends LocalizeCoreElem
|
|
1125
1125
|
</d2l-focus-trap>`;
|
1126
1126
|
}
|
1127
1127
|
|
1128
|
-
const dropdown =
|
1128
|
+
const dropdown = html`
|
1129
1129
|
<div class="d2l-dropdown-content-position" style=${styleMap(positionStyle)}>
|
1130
1130
|
${dropdownContentSlots}
|
1131
1131
|
</div>
|
@@ -41,9 +41,9 @@ class FilterLoadMoreDemo extends LitElement {
|
|
41
41
|
super();
|
42
42
|
const dimensions = [];
|
43
43
|
for (const dim of FullData) {
|
44
|
-
const values =
|
44
|
+
const values = {};
|
45
45
|
let selectedCount = 0;
|
46
|
-
for (const v of dim.values)
|
46
|
+
for (const v of dim.values) {
|
47
47
|
if (!v.selected) continue;
|
48
48
|
values[v.key] = { ...v };
|
49
49
|
selectedCount++;
|
@@ -116,6 +116,16 @@ class FilterDimensionSet extends LitElement {
|
|
116
116
|
}
|
117
117
|
}
|
118
118
|
|
119
|
+
willUpdate(changedProperties) {
|
120
|
+
if (changedProperties.has('hasMore') && this.hasMore) {
|
121
|
+
if (this.searchType !== 'manual') {
|
122
|
+
console.warn('Paging requires search type set to manual.');
|
123
|
+
this.hasMore = false;
|
124
|
+
}
|
125
|
+
else this.selectedFirst = true;
|
126
|
+
}
|
127
|
+
}
|
128
|
+
|
119
129
|
getSearchEmptyState() {
|
120
130
|
return this._getEmptyState(this._searchEmptyStateSlot, 'search');
|
121
131
|
}
|
@@ -138,16 +148,6 @@ class FilterDimensionSet extends LitElement {
|
|
138
148
|
return values;
|
139
149
|
}
|
140
150
|
|
141
|
-
willUpdate(changedProperties) {
|
142
|
-
if (changedProperties.has('hasMore') && this.hasMore) {
|
143
|
-
if (this.searchType !== 'manual') {
|
144
|
-
console.warn('Paging requires search type set to manual.');
|
145
|
-
this.hasMore = false;
|
146
|
-
}
|
147
|
-
else this.selectedFirst = true;
|
148
|
-
}
|
149
|
-
}
|
150
|
-
|
151
151
|
_dispatchDataChangeEvent(eventDetail) {
|
152
152
|
/** @ignore */
|
153
153
|
this.dispatchEvent(new CustomEvent('d2l-filter-dimension-data-change', {
|
@@ -502,7 +502,7 @@ class Filter extends FocusMixin(LocalizeCoreElement(RtlMixin(LitElement))) {
|
|
502
502
|
description="${this.localize('components.filter.searchResults', { number: count })}">
|
503
503
|
</d2l-empty-state-simple>
|
504
504
|
`;
|
505
|
-
searchResults =
|
505
|
+
searchResults = html`
|
506
506
|
<div class="${classMap(classes)}" role="alert">
|
507
507
|
${emptyState}
|
508
508
|
</div>
|
@@ -714,7 +714,7 @@ class Filter extends FocusMixin(LocalizeCoreElement(RtlMixin(LitElement))) {
|
|
714
714
|
|
715
715
|
if (shouldSearch) this._performDimensionSearch(dimension);
|
716
716
|
if (shouldRecount) this._setFilterCounts(dimension);
|
717
|
-
if (shouldUpdate)
|
717
|
+
if (shouldUpdate) this.requestUpdate();
|
718
718
|
if (shouldResizeDropdown) {
|
719
719
|
this._requestDropdownResize();
|
720
720
|
}
|
@@ -216,7 +216,7 @@ class InputTimeRange extends FocusMixin(SkeletonMixin(FormElementMixin(RtlMixin(
|
|
216
216
|
const endLabel = this.endLabel ? this.endLabel : this.localize('components.input-time-range.endTime');
|
217
217
|
|
218
218
|
const startTimeInput = this.shadowRoot && this.shadowRoot.querySelector('.d2l-input-time-range-start');
|
219
|
-
const endTimeInput =
|
219
|
+
const endTimeInput = this.shadowRoot && this.shadowRoot.querySelector('.d2l-input-time-range-end');
|
220
220
|
/**
|
221
221
|
* @type {'five'|'ten'|'fifteen'|'twenty'|'thirty'|'sixty'}
|
222
222
|
*/
|
@@ -58,7 +58,7 @@ export function getDefaultTime(time, enforceTimeIntervals, timeInterval) {
|
|
58
58
|
const today = getToday();
|
59
59
|
const date = new Date(today.year, today.month - 1, today.date, today.hours, today.minutes, 0);
|
60
60
|
const originalDate = new Date(date); // create new var for date for comparison
|
61
|
-
const timeAtInterval =
|
61
|
+
const timeAtInterval = getTimeAtInterval(timeInterval, date);
|
62
62
|
|
63
63
|
// set to next interval if original time is already equal to an interval
|
64
64
|
if (timeAtInterval.getTime() === originalDate.getTime()) timeAtInterval.setMinutes(timeAtInterval.getMinutes() + getIntervalNumber(timeInterval));
|
@@ -132,7 +132,7 @@ class ListNestedIterationsHelper extends LitElement {
|
|
132
132
|
items.push(html`
|
133
133
|
<d2l-list-item key="${childKey}" label="${childL2Text}" ?selectable="${!!childOptions[0]}" ?draggable="${this.draggable}" ?expandable="${childOptions[1] && i !== 1}" color="${ifDefined((childOptions[2] && i === 0) || childOptions[3] ? '#ff0000' : undefined)}">
|
134
134
|
<d2l-list-item-content>${childL2Text}</d2l-list-item-content>
|
135
|
-
${i === 1
|
135
|
+
${i === 1 || !childOptions[1] ? nothing : html`
|
136
136
|
<d2l-list slot="nested">
|
137
137
|
<d2l-list-item key="${`${childKey}-child`}" label="${childL3Text}" ?selectable="${!!childOptions[0]}" ?draggable="${this.draggable}" color="${ifDefined(childOptions[3] ? '#00ff00' : undefined)}">
|
138
138
|
<d2l-list-item-content>${childL3Text}</d2l-list-item-content>
|
@@ -89,17 +89,17 @@ export const ListItemCheckboxMixin = superclass => class extends SkeletonMixin(s
|
|
89
89
|
this.selected = (this.selectionInfo.state === SelectionInfo.states.all);
|
90
90
|
}
|
91
91
|
|
92
|
+
willUpdate(changedProperties) {
|
93
|
+
super.willUpdate(changedProperties);
|
94
|
+
if (changedProperties.has('selectionDisabled') && this.selectionDisabled === true) this._hoveringSelection = false;
|
95
|
+
}
|
96
|
+
|
92
97
|
setSelected(selected, suppressEvent = false) {
|
93
98
|
if (this.selected === selected || (this.selected === undefined && !selected)) return;
|
94
99
|
this.selected = selected;
|
95
100
|
if (!suppressEvent) this._dispatchSelected(selected);
|
96
101
|
}
|
97
102
|
|
98
|
-
willUpdate(changedProperties) {
|
99
|
-
super.willUpdate(changedProperties);
|
100
|
-
if (changedProperties.has('selectionDisabled') && this.selectionDisabled === true) this._hoveringSelection = false;
|
101
|
-
}
|
102
|
-
|
103
103
|
async _dispatchSelected(value) {
|
104
104
|
/* wait for internal state to be updated in case of action-click case so that a consumer
|
105
105
|
calling getSelectionInfo will get the correct state */
|
@@ -218,7 +218,7 @@ export class NewPositionEventDetails {
|
|
218
218
|
list[i] = list[i - 1];
|
219
219
|
}
|
220
220
|
} else {
|
221
|
-
destination = this.dropLocation === dropLocation.above
|
221
|
+
destination = this.dropLocation === dropLocation.above ? Math.max(destination - 1, 0) : destination;
|
222
222
|
for (let i = origin; i < destination; i++) {
|
223
223
|
list[i] = list[i + 1];
|
224
224
|
}
|
@@ -165,7 +165,7 @@ class ListItemDragHandle extends LocalizeCoreElement(FocusMixin(RtlMixin(LitElem
|
|
165
165
|
|
166
166
|
async _doAction(action) {
|
167
167
|
this._dispatchAction(action);
|
168
|
-
const cell = findComposedAncestor(this, (parent) =>
|
168
|
+
const cell = findComposedAncestor(this, (parent) => parent.hasAttribute && parent.hasAttribute('draggable'));
|
169
169
|
if (cell) await cell.updateComplete;
|
170
170
|
await this.updateComplete;
|
171
171
|
this.focus();
|
@@ -23,7 +23,7 @@ export const ListItemExpandCollapseMixin = superclass => class extends SkeletonM
|
|
23
23
|
expanded: { type: Boolean, reflect: true },
|
24
24
|
_siblingHasNestedItems: { state: true },
|
25
25
|
_renderExpandCollapseSlot: { type: Boolean, reflect: true, attribute: '_render-expand-collapse-slot' },
|
26
|
-
_showNestedLoadingSpinner: {
|
26
|
+
_showNestedLoadingSpinner: { state: true }
|
27
27
|
};
|
28
28
|
}
|
29
29
|
|
@@ -405,6 +405,12 @@ export const ListItemMixin = superclass => class extends composeMixins(
|
|
405
405
|
}
|
406
406
|
}
|
407
407
|
|
408
|
+
willUpdate(changedProperties) {
|
409
|
+
if (changedProperties.has('_siblingHasColor') || changedProperties.has('color')) {
|
410
|
+
this._hasColorSlot = this.color || this._siblingHasColor;
|
411
|
+
}
|
412
|
+
}
|
413
|
+
|
408
414
|
focus() {
|
409
415
|
this._tryFocus();
|
410
416
|
}
|
@@ -451,12 +457,6 @@ export const ListItemMixin = superclass => class extends composeMixins(
|
|
451
457
|
this._siblingHasColor = siblingHasColor;
|
452
458
|
}
|
453
459
|
|
454
|
-
willUpdate(changedProperties) {
|
455
|
-
if (changedProperties.has('_siblingHasColor') || changedProperties.has('color')) {
|
456
|
-
this._hasColorSlot = this.color || this._siblingHasColor;
|
457
|
-
}
|
458
|
-
}
|
459
|
-
|
460
460
|
_getFlattenedListItems(listItem) {
|
461
461
|
const listItems = new Map();
|
462
462
|
const lazyLoadListItems = new Map();
|
package/components/list/list.js
CHANGED
@@ -290,7 +290,7 @@ class List extends PageableMixin(SelectionMixin(LitElement)) {
|
|
290
290
|
|
291
291
|
_getLazyLoadItems() {
|
292
292
|
const items = this.getItems();
|
293
|
-
return items.length > 0 ?
|
293
|
+
return items.length > 0 ? items[0]._getFlattenedListItems().lazyLoadListItems : new Map();
|
294
294
|
}
|
295
295
|
|
296
296
|
_handleKeyDown(e) {
|
@@ -57,7 +57,7 @@ class MeterCircle extends MeterMixin(RtlMixin(LitElement)) {
|
|
57
57
|
|
58
58
|
const primary = this._primary(this.value, this.max) || '';
|
59
59
|
const secondary = this._secondary(this.value, this.max, this.text);
|
60
|
-
const textClasses =
|
60
|
+
const textClasses = {
|
61
61
|
'd2l-meter-circle-text-ltr': !this.percent,
|
62
62
|
'd2l-body-standard': true,
|
63
63
|
'd2l-meter-circle-text': true
|
@@ -112,12 +112,12 @@ class MeterLinear extends MeterMixin(RtlMixin(LitElement)) {
|
|
112
112
|
}
|
113
113
|
const primary = this._primary(this.value, this.max);
|
114
114
|
const secondary = this._secondary(this.value, this.max, this.text);
|
115
|
-
const textClasses =
|
115
|
+
const textClasses = {
|
116
116
|
'd2l-meter-linear-text-space-between': !this.textInline && secondary !== this.text,
|
117
117
|
'd2l-body-small': true,
|
118
118
|
'd2l-meter-linear-text': true
|
119
119
|
};
|
120
|
-
const primaryTextClasses =
|
120
|
+
const primaryTextClasses = {
|
121
121
|
'd2l-meter-linear-primary-ltr': !this.percent,
|
122
122
|
'd2l-meter-linear-primary': true
|
123
123
|
};
|
@@ -62,7 +62,7 @@ class MeterRadial extends MeterMixin(RtlMixin(LitElement)) {
|
|
62
62
|
const primary = this._primary(this.value, this.max);
|
63
63
|
const secondary = this._secondary(this.value, this.max, this.text);
|
64
64
|
const secondaryTextElement = this.text ? html`<div class="d2l-body-small d2l-meter-radial-text">${secondary}</div>` : html``;
|
65
|
-
const textClasses =
|
65
|
+
const textClasses = {
|
66
66
|
'd2l-meter-radial-text-ltr': !this.percent,
|
67
67
|
'd2l-heading-4': true,
|
68
68
|
'd2l-meter-radial-text': true
|
@@ -36,8 +36,8 @@ function createMenuItem(node) {
|
|
36
36
|
}
|
37
37
|
|
38
38
|
function createMenuItemLink(node) {
|
39
|
-
const text =
|
40
|
-
const href =
|
39
|
+
const text = node.textContent.trim();
|
40
|
+
const href = node.href;
|
41
41
|
const target = node.target;
|
42
42
|
|
43
43
|
return html`<d2l-menu-item-link
|
@@ -186,7 +186,7 @@ class OverflowGroup extends OverflowGroupMixin(RtlMixin(LitElement)) {
|
|
186
186
|
_createMenuItemMenu(node) {
|
187
187
|
const menuOpener =
|
188
188
|
node.querySelector('d2l-dropdown-button')
|
189
|
-
||
|
189
|
+
|| node.querySelector('d2l-dropdown-button-subtle');
|
190
190
|
|
191
191
|
const openerText = node.text || menuOpener.text;
|
192
192
|
const disabled = !!node.disabled;
|
@@ -182,7 +182,7 @@ export const SelectionMixin = superclass => class extends RtlMixin(CollectionMix
|
|
182
182
|
|
183
183
|
if (!selectionInput) {
|
184
184
|
// no selection-input since next/previous focusable is before/after list... cycle to first/last
|
185
|
-
focusable = forward ?
|
185
|
+
focusable = forward ? getFirstFocusableDescendant(this, false) : getLastFocusableDescendant(this, false);
|
186
186
|
selectionInput = getSelectionInput(focusable, forward);
|
187
187
|
}
|
188
188
|
|
@@ -12,7 +12,7 @@ export const SkeletonGroupMixin = dedupeMixin(superclass => class extends Skelet
|
|
12
12
|
|
13
13
|
constructor() {
|
14
14
|
super();
|
15
|
-
this._anySubscribersWithSkeletonActive
|
15
|
+
this._anySubscribersWithSkeletonActive = false;
|
16
16
|
this._skeletonSubscribers = new SubscriberRegistryController(this, 'skeleton', {
|
17
17
|
onSubscribe: this.onSubscriberChange.bind(this),
|
18
18
|
onUnsubscribe: this.onSubscriberChange.bind(this),
|
@@ -490,6 +490,15 @@ class Tooltip extends RtlMixin(LitElement) {
|
|
490
490
|
}
|
491
491
|
}
|
492
492
|
|
493
|
+
async getUpdateComplete() {
|
494
|
+
const fontsPromise = document.fonts ? document.fonts.ready : Promise.resolve();
|
495
|
+
await super.getUpdateComplete();
|
496
|
+
/* wait for the fonts to load because browsers have a font block period
|
497
|
+
where they will render an invisible fallback font face that may result in
|
498
|
+
improper width calculations before the real font is loaded */
|
499
|
+
await fontsPromise;
|
500
|
+
}
|
501
|
+
|
493
502
|
render() {
|
494
503
|
const tooltipPositionStyle = {
|
495
504
|
maxWidth: this._maxWidth ? `${this._maxWidth}px` : null
|
@@ -542,15 +551,6 @@ class Tooltip extends RtlMixin(LitElement) {
|
|
542
551
|
});
|
543
552
|
}
|
544
553
|
|
545
|
-
async getUpdateComplete() {
|
546
|
-
const fontsPromise = document.fonts ? document.fonts.ready : Promise.resolve();
|
547
|
-
await super.getUpdateComplete();
|
548
|
-
/* wait for the fonts to load because browsers have a font block period
|
549
|
-
where they will render an invisible fallback font face that may result in
|
550
|
-
improper width calculations before the real font is loaded */
|
551
|
-
await fontsPromise;
|
552
|
-
}
|
553
|
-
|
554
554
|
hide() {
|
555
555
|
this._isHovering = false;
|
556
556
|
this._isFocusing = false;
|
@@ -59,6 +59,21 @@
|
|
59
59
|
<blockquote class="d2l-blockquote">Grumpy wizards make toxic brew for the evil Queen and Jack. Grumpy wizards make toxic brew for the evil Queen and Jack.</blockquote>
|
60
60
|
</d2l-demo-snippet>
|
61
61
|
|
62
|
+
<h2>BC Sans</h2>
|
63
|
+
|
64
|
+
<div class="d2l-body-small">Showing a small selection of glyphs from Canadian Aboriginal blocks known to be different. For a detailed comparison, see the <a href="https://github.com/Brightspace/fonts-lib">fonts-lib</a>'s demo.</div>
|
65
|
+
<d2l-demo-snippet>
|
66
|
+
<div class="d2l-body-standard" style="font-family: BC Sans, sans-serif;">
|
67
|
+
<p>Grumpy wizards make toxic brew for the evil Queen and Jack. Grumpy wizards make toxic brew for the evil Queen and Jack.</p>
|
68
|
+
<p style="font-weight: 300;">ᐂ ᐪ ᒤ ᔆ ᔌ ᔕ ᔤ ᔧ ᕯ ᗯ ᘏ ᘗ ᘩ ᘨ ᣱ</p>
|
69
|
+
<p>ᐂ ᐪ ᒤ ᔆ ᔌ ᔕ ᔤ ᔧ ᕯ ᗯ ᘏ ᘗ ᘩ ᘨ ᣱ</p>
|
70
|
+
<p style="font-weight: 700;">ᐂ ᐪ ᒤ ᔆ ᔌ ᔕ ᔤ ᔧ ᕯ ᗯ ᘏ ᘗ ᘩ ᘨ ᣱ</p>
|
71
|
+
<p style="font-style: italic; font-weight: 300;">ᐂ ᐪ ᒤ ᔆ ᔌ ᔕ ᔤ ᔧ ᕯ ᗯ ᘏ ᘗ ᘩ ᘨ ᣱ</p>
|
72
|
+
<p style="font-style: italic;">ᐂ ᐪ ᒤ ᔆ ᔌ ᔕ ᔤ ᔧ ᕯ ᗯ ᘏ ᘗ ᘩ ᘨ ᣱ</p>
|
73
|
+
<p style="font-style: italic; font-weight: 700;">ᐂ ᐪ ᒤ ᔆ ᔌ ᔕ ᔤ ᔧ ᕯ ᗯ ᘏ ᘗ ᘩ ᘨ ᣱ</p>
|
74
|
+
</div>
|
75
|
+
</d2l-demo-snippet>
|
76
|
+
|
62
77
|
</d2l-demo-page>
|
63
78
|
|
64
79
|
</body>
|
@@ -1,9 +1,15 @@
|
|
1
1
|
import '../colors/colors.js';
|
2
2
|
|
3
|
-
export const importUrl = 'https://s.brightspace.com/lib/fonts/0.
|
3
|
+
export const importUrl = 'https://s.brightspace.com/lib/fonts/0.6.0/assets/';
|
4
4
|
export const fonts = {
|
5
|
-
|
6
|
-
|
5
|
+
LatoRegular: 'Lato-400',
|
6
|
+
LatoBold: 'Lato-700',
|
7
|
+
BCSansLight: 'BCSans-Light',
|
8
|
+
BCSansRegular: 'BCSans-Regular',
|
9
|
+
BCSansBold: 'BCSans-Bold',
|
10
|
+
BCSansLightItalic: 'BCSans-LightItalic',
|
11
|
+
BCSansItalic: 'BCSans-Italic',
|
12
|
+
BCSansBoldItalic: 'BCSans-BoldItalic'
|
7
13
|
};
|
8
14
|
|
9
15
|
if (!document.head.querySelector('#d2l-typography-font-face')) {
|
@@ -22,13 +28,49 @@ if (!document.head.querySelector('#d2l-typography-font-face')) {
|
|
22
28
|
font-family: 'Lato';
|
23
29
|
font-style: normal;
|
24
30
|
font-weight: 400;
|
25
|
-
src: local('Lato Regular'), local('Lato-Regular'), url(${new URL(`${fonts.
|
31
|
+
src: local('Lato Regular'), local('Lato-Regular'), url(${new URL(`${fonts.LatoRegular}.woff2`, importUrl)}) format('woff2'), url(${new URL(`${fonts.LatoRegular}.woff`, importUrl)}) format('woff'), url(${new URL(`${fonts.LatoRegular}.ttf`, importUrl)}) format('truetype');
|
26
32
|
}
|
27
33
|
@font-face {
|
28
34
|
font-family: 'Lato';
|
29
35
|
font-style: normal;
|
30
36
|
font-weight: 700;
|
31
|
-
src: local('Lato Bold'), local('Lato-Bold'), url(${new URL(`${fonts.
|
37
|
+
src: local('Lato Bold'), local('Lato-Bold'), url(${new URL(`${fonts.LatoBold}.woff2`, importUrl)}) format('woff2'), url(${new URL(`${fonts.LatoBold}.woff`, importUrl)}) format('woff'), url(${new URL(`${fonts.LatoBold}.ttf`, importUrl)}) format('truetype');
|
38
|
+
}
|
39
|
+
@font-face {
|
40
|
+
font-family: 'BC Sans';
|
41
|
+
font-style: normal;
|
42
|
+
font-weight: 300;
|
43
|
+
src: url(${new URL(`${fonts.BCSansLight}.woff2`, importUrl)}) format('woff2'), url(${new URL(`${fonts.BCSansLight}.woff`, importUrl)}) format('woff');
|
44
|
+
}
|
45
|
+
@font-face {
|
46
|
+
font-family: 'BC Sans';
|
47
|
+
font-style: normal;
|
48
|
+
font-weight: 400;
|
49
|
+
src: url(${new URL(`${fonts.BCSansRegular}.woff2`, importUrl)}) format('woff2'), url(${new URL(`${fonts.BCSansRegular}.woff`, importUrl)}) format('woff');
|
50
|
+
}
|
51
|
+
@font-face {
|
52
|
+
font-family: 'BC Sans';
|
53
|
+
font-style: normal;
|
54
|
+
font-weight: 700;
|
55
|
+
src: url(${new URL(`${fonts.BCSansBold}.woff2`, importUrl)}) format('woff2'), url(${new URL(`${fonts.BCSansBold}.woff`, importUrl)}) format('woff');
|
56
|
+
}
|
57
|
+
@font-face {
|
58
|
+
font-family: 'BC Sans';
|
59
|
+
font-style: italic;
|
60
|
+
font-weight: 300;
|
61
|
+
src: url(${new URL(`${fonts.BCSansLightItalic}.woff2`, importUrl)}) format('woff2'), url(${new URL(`${fonts.BCSansLightItalic}.woff`, importUrl)}) format('woff');
|
62
|
+
}
|
63
|
+
@font-face {
|
64
|
+
font-family: 'BC Sans';
|
65
|
+
font-style: italic;
|
66
|
+
font-weight: 400;
|
67
|
+
src: url(${new URL(`${fonts.BCSansItalic}.woff2`, importUrl)}) format('woff2'), url(${new URL(`${fonts.BCSansItalic}.woff`, importUrl)}) format('woff');
|
68
|
+
}
|
69
|
+
@font-face {
|
70
|
+
font-family: 'BC Sans';
|
71
|
+
font-style: italic;
|
72
|
+
font-weight: 700;
|
73
|
+
src: url(${new URL(`${fonts.BCSansBoldItalic}.woff2`, importUrl)}) format('woff2'), url(${new URL(`${fonts.BCSansBoldItalic}.woff`, importUrl)}) format('woff');
|
32
74
|
}
|
33
75
|
|
34
76
|
.d2l-typography {
|
@@ -41,13 +41,49 @@
|
|
41
41
|
font-family: 'Lato';
|
42
42
|
font-style: normal;
|
43
43
|
font-weight: 400;
|
44
|
-
src: url(https://s.brightspace.com/lib/fonts/0.
|
44
|
+
src: url(https://s.brightspace.com/lib/fonts/0.6.0/assets/Lato-400.woff2) format('woff2'), url(https://s.brightspace.com/lib/fonts/0.6.0/assets/Lato-400.woff) format('woff');
|
45
45
|
}
|
46
46
|
@font-face {
|
47
47
|
font-family: 'Lato';
|
48
48
|
font-style: normal;
|
49
49
|
font-weight: 700;
|
50
|
-
src: url(https://s.brightspace.com/lib/fonts/0.
|
50
|
+
src: url(https://s.brightspace.com/lib/fonts/0.6.0/assets/Lato-700.woff2) format('woff2'), url(https://s.brightspace.com/lib/fonts/0.6.0/assets/Lato-700.woff) format('woff');
|
51
|
+
}
|
52
|
+
@font-face {
|
53
|
+
font-family: 'BC Sans';
|
54
|
+
font-style: normal;
|
55
|
+
font-weight: 300;
|
56
|
+
src: url(https://s.brightspace.com/lib/fonts/0.6.0/assets/BCSans-Light.woff2) format('woff2'), url(https://s.brightspace.com/lib/fonts/0.6.0/assets/BCSans-Light.woff) format('woff');
|
57
|
+
}
|
58
|
+
@font-face {
|
59
|
+
font-family: 'BC Sans';
|
60
|
+
font-style: normal;
|
61
|
+
font-weight: 400;
|
62
|
+
src: url(https://s.brightspace.com/lib/fonts/0.6.0/assets/BCSans-Regular.woff2) format('woff2'), url(https://s.brightspace.com/lib/fonts/0.6.0/assets/BCSans-Regular.woff) format('woff');
|
63
|
+
}
|
64
|
+
@font-face {
|
65
|
+
font-family: 'BC Sans';
|
66
|
+
font-style: normal;
|
67
|
+
font-weight: 700;
|
68
|
+
src: url(https://s.brightspace.com/lib/fonts/0.6.0/assets/BCSans-Bold.woff2) format('woff2'), url(https://s.brightspace.com/lib/fonts/0.6.0/assets/BCSans-Bold.woff) format('woff');
|
69
|
+
}
|
70
|
+
@font-face {
|
71
|
+
font-family: 'BC Sans';
|
72
|
+
font-style: italic;
|
73
|
+
font-weight: 300;
|
74
|
+
src: url(https://s.brightspace.com/lib/fonts/0.6.0/assets/BCSans-LightItalic.woff2) format('woff2'), url(https://s.brightspace.com/lib/fonts/0.6.0/assets/BCSans-LightItalic.woff) format('woff');
|
75
|
+
}
|
76
|
+
@font-face {
|
77
|
+
font-family: 'BC Sans';
|
78
|
+
font-style: italic;
|
79
|
+
font-weight: 400;
|
80
|
+
src: url(https://s.brightspace.com/lib/fonts/0.6.0/assets/BCSans-Italic.woff2) format('woff2'), url(https://s.brightspace.com/lib/fonts/0.6.0/assets/BCSans-Italic.woff) format('woff');
|
81
|
+
}
|
82
|
+
@font-face {
|
83
|
+
font-family: 'BC Sans';
|
84
|
+
font-style: italic;
|
85
|
+
font-weight: 700;
|
86
|
+
src: url(https://s.brightspace.com/lib/fonts/0.6.0/assets/BCSans-BoldItalic.woff2) format('woff2'), url(https://s.brightspace.com/lib/fonts/0.6.0/assets/BCSans-BoldItalic.woff) format('woff');
|
51
87
|
}
|
52
88
|
}
|
53
89
|
|
@@ -155,7 +155,7 @@ function fetchWithQueuing(resource) {
|
|
155
155
|
|
156
156
|
function formatCacheKey(resource) {
|
157
157
|
|
158
|
-
return
|
158
|
+
return formatOsloRequest(documentLocaleSettings.oslo.collection, resource);
|
159
159
|
}
|
160
160
|
|
161
161
|
async function fetchWithCaching(resource) {
|
package/helpers/mathjax.js
CHANGED
@@ -23,7 +23,7 @@ const mathjaxFontMappings = new Map([
|
|
23
23
|
['MJXTEX-FRB', 'MathJax_Fraktur-Bold'],
|
24
24
|
['MJXTEX-SS', 'MathJax_SansSerif-Regular'],
|
25
25
|
['MJXTEX-SSB', 'MathJax_SansSerif-Bold'],
|
26
|
-
['MJXTEX-SSI',
|
26
|
+
['MJXTEX-SSI', 'MathJax_SansSerif-Italic'],
|
27
27
|
['MJXTEX-SC', 'MathJax_Script-Regular'],
|
28
28
|
['MJXTEX-T', 'MathJax_Typewriter-Regular'],
|
29
29
|
['MJXTEX-V', 'MathJax_Vector-Regular'],
|
@@ -10,7 +10,7 @@ export const _LocalizeMixinBase = dedupeMixin(superclass => class LocalizeMixinC
|
|
10
10
|
|
11
11
|
static get properties() {
|
12
12
|
return {
|
13
|
-
__resources: { type: Object, attribute: false
|
13
|
+
__resources: { type: Object, attribute: false }
|
14
14
|
};
|
15
15
|
}
|
16
16
|
|
@@ -61,6 +61,16 @@ export const _LocalizeMixinBase = dedupeMixin(superclass => class LocalizeMixinC
|
|
61
61
|
this.__updatedProperties.clear();
|
62
62
|
}
|
63
63
|
|
64
|
+
async getUpdateComplete() {
|
65
|
+
await super.getUpdateComplete();
|
66
|
+
const hasResources = this._hasResources();
|
67
|
+
const resourcesLoaded = this.__resources !== undefined;
|
68
|
+
if (!hasResources || resourcesLoaded) {
|
69
|
+
return;
|
70
|
+
}
|
71
|
+
await this.__resourcesLoadedPromise;
|
72
|
+
}
|
73
|
+
|
64
74
|
shouldUpdate(changedProperties) {
|
65
75
|
|
66
76
|
const hasResources = this._hasResources();
|
@@ -87,16 +97,6 @@ export const _LocalizeMixinBase = dedupeMixin(superclass => class LocalizeMixinC
|
|
87
97
|
|
88
98
|
}
|
89
99
|
|
90
|
-
async getUpdateComplete() {
|
91
|
-
await super.getUpdateComplete();
|
92
|
-
const hasResources = this._hasResources();
|
93
|
-
const resourcesLoaded = this.__resources !== undefined;
|
94
|
-
if (!hasResources || resourcesLoaded) {
|
95
|
-
return;
|
96
|
-
}
|
97
|
-
await this.__resourcesLoadedPromise;
|
98
|
-
}
|
99
|
-
|
100
100
|
localize(key) {
|
101
101
|
|
102
102
|
const { language, value } = this.__resources?.[key] ?? {};
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@brightspace-ui/core",
|
3
|
-
"version": "2.
|
3
|
+
"version": "2.168.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",
|
@@ -53,7 +53,7 @@
|
|
53
53
|
"@web/dev-server": "^0.2",
|
54
54
|
"chalk": "^5",
|
55
55
|
"eslint": "^8",
|
56
|
-
"eslint-config-brightspace": "^0.
|
56
|
+
"eslint-config-brightspace": "^0.25",
|
57
57
|
"glob-all": "^3",
|
58
58
|
"messageformat-validator": "^2",
|
59
59
|
"node-sass": "^9",
|
@@ -513,7 +513,7 @@ class MobileTouchResizer extends Resizer {
|
|
513
513
|
let isScrollable;
|
514
514
|
let secondaryHeight = this.panelSize;
|
515
515
|
if (delta > 0) {
|
516
|
-
if (isScrollingDivider ||
|
516
|
+
if (isScrollingDivider || curScroll === 0) {
|
517
517
|
secondaryHeight = this.clampMaxHeight(this.panelSize - delta);
|
518
518
|
}
|
519
519
|
isScrollable = curScroll > 0;
|