@brightspace-ui/core 3.153.1 → 3.153.2
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.
@@ -26,8 +26,6 @@ class CountBadgeIcon extends FocusMixin(CountBadgeMixin(LitElement)) {
|
|
26
26
|
return [super.styles, css`
|
27
27
|
${getFocusRingStyles(pseudoClass => `:host([focus-ring]) d2l-icon, d2l-icon:${pseudoClass}`)}
|
28
28
|
:host {
|
29
|
-
/* for long numbers, center the number on the icon */
|
30
|
-
--d2l-count-badge-icon-padding: calc(-50% + (var(--d2l-count-badge-icon-height) / 2) + 2px);
|
31
29
|
display: inline-block;
|
32
30
|
/* symmetrical padding to prevent overflows for most numbers */
|
33
31
|
padding-left: 0.5rem;
|
@@ -45,16 +43,6 @@ class CountBadgeIcon extends FocusMixin(CountBadgeMixin(LitElement)) {
|
|
45
43
|
padding-top: var(--d2l-count-badge-icon-padding-top);
|
46
44
|
}
|
47
45
|
|
48
|
-
:host([icon*="tier1:"]) {
|
49
|
-
--d2l-count-badge-icon-height: 18px;
|
50
|
-
}
|
51
|
-
:host([icon*="tier2:"]) {
|
52
|
-
--d2l-count-badge-icon-height: 24px;
|
53
|
-
}
|
54
|
-
:host([icon*="tier3:"]) {
|
55
|
-
--d2l-count-badge-icon-height: 30px;
|
56
|
-
}
|
57
|
-
|
58
46
|
d2l-tooltip[_open-dir="top"] {
|
59
47
|
margin-top: calc(0px - var(--d2l-count-badge-icon-padding-top));
|
60
48
|
}
|
@@ -87,17 +75,16 @@ class CountBadgeIcon extends FocusMixin(CountBadgeMixin(LitElement)) {
|
|
87
75
|
const centerNumber = this.getNumberString().length >= 4;
|
88
76
|
|
89
77
|
if (centerNumber) {
|
90
|
-
|
78
|
+
// left 50% + translateX(-50%) will center for both LTR and RTL
|
91
79
|
numberStyles = {
|
92
80
|
... numberStyles,
|
93
|
-
|
94
|
-
|
95
|
-
: `translateY(-50%) translateX(${xPadding})`
|
81
|
+
left: '50%',
|
82
|
+
transform: 'translate(-50%, -50%)'
|
96
83
|
};
|
97
84
|
} else {
|
98
85
|
numberStyles = {
|
99
86
|
... numberStyles,
|
100
|
-
|
87
|
+
insetInlineEnd: '-0.1rem',
|
101
88
|
transform: 'translateY(-50%)'
|
102
89
|
};
|
103
90
|
}
|
@@ -5,13 +5,12 @@ import { formatNumber } from '@brightspace-ui/intl/lib/number.js';
|
|
5
5
|
import { getUniqueId } from '../../helpers/uniqueId.js';
|
6
6
|
import { LocalizeCoreElement } from '../../helpers/localize-core-element.js';
|
7
7
|
import { offscreenStyles } from '../offscreen/offscreen.js';
|
8
|
-
import { RtlMixin } from '../../mixins/rtl/rtl-mixin.js';
|
9
8
|
import { SkeletonMixin } from '../skeleton/skeleton-mixin.js';
|
10
9
|
import { styleMap } from 'lit/directives/style-map.js';
|
11
10
|
|
12
11
|
const maxBadgeDigits = 5;
|
13
12
|
|
14
|
-
export const CountBadgeMixin = superclass => class extends LocalizeCoreElement(SkeletonMixin(
|
13
|
+
export const CountBadgeMixin = superclass => class extends LocalizeCoreElement(SkeletonMixin(superclass)) {
|
15
14
|
|
16
15
|
static get properties() {
|
17
16
|
return {
|
@@ -10,7 +10,6 @@ import { labelStyles } from '../typography/styles.js';
|
|
10
10
|
import { LocalizeCoreElement } from '../../helpers/localize-core-element.js';
|
11
11
|
import { offscreenStyles } from '../offscreen/offscreen.js';
|
12
12
|
import { PageableSubscriberMixin } from './pageable-subscriber-mixin.js';
|
13
|
-
import { RtlMixin } from '../../mixins/rtl/rtl-mixin.js';
|
14
13
|
|
15
14
|
const nativeFocus = document.createElement('div').focus;
|
16
15
|
|
@@ -19,7 +18,7 @@ const nativeFocus = document.createElement('div').focus;
|
|
19
18
|
* @fires d2l-pager-load-more - Dispatched when the user clicks the load-more button. Consumers must call the provided "complete" method once items have been loaded.
|
20
19
|
* @fires d2l-pager-load-more-loaded - Dispatched after more items have been loaded.
|
21
20
|
*/
|
22
|
-
class LoadMore extends PageableSubscriberMixin(FocusMixin(LocalizeCoreElement(
|
21
|
+
class LoadMore extends PageableSubscriberMixin(FocusMixin(LocalizeCoreElement(LitElement))) {
|
23
22
|
|
24
23
|
static get properties() {
|
25
24
|
return {
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@brightspace-ui/core",
|
3
|
-
"version": "3.153.
|
3
|
+
"version": "3.153.2",
|
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",
|