@brightspace-ui/core 3.153.1 → 3.153.3

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
- const xPadding = 'var(--d2l-count-badge-icon-padding)';
78
+ // left 50% + translateX(-50%) will center for both LTR and RTL
91
79
  numberStyles = {
92
80
  ... numberStyles,
93
- transform: this.dir === 'rtl'
94
- ? `translateY(-50%) translateX(calc(0px - ${xPadding}))`
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
- [this.dir === 'rtl' ? 'left' : 'right'] : '-0.1rem',
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(RtlMixin(superclass))) {
13
+ export const CountBadgeMixin = superclass => class extends LocalizeCoreElement(SkeletonMixin(superclass)) {
15
14
 
16
15
  static get properties() {
17
16
  return {
@@ -3,9 +3,8 @@ import '../expand-collapse/expand-collapse-content.js';
3
3
  import { css, html, LitElement, nothing } from 'lit';
4
4
  import { linkStyles } from '../link/link.js';
5
5
  import { LocalizeCoreElement } from '../../helpers/localize-core-element.js';
6
- import { RtlMixin } from '../../mixins/rtl/rtl-mixin.js';
7
6
 
8
- class FormErrorSummary extends LocalizeCoreElement(RtlMixin(LitElement)) {
7
+ class FormErrorSummary extends LocalizeCoreElement(LitElement) {
9
8
 
10
9
  static get properties() {
11
10
  return {
@@ -29,12 +28,8 @@ class FormErrorSummary extends LocalizeCoreElement(RtlMixin(LitElement)) {
29
28
  cursor: pointer;
30
29
  display: flex;
31
30
  justify-content: space-between;
32
- padding: 0.3rem 0.3rem 0.3rem 1.2rem;
33
- }
34
-
35
- :host([dir="rtl"]) .d2l-form-error-summary-header {
36
- padding-left: 0.3rem;
37
- padding-right: 1.2rem;
31
+ padding-block: 0.3rem;
32
+ padding-inline: 1.2rem 0.3rem;
38
33
  }
39
34
 
40
35
  .d2l-form-error-summary-text {
@@ -43,16 +38,12 @@ class FormErrorSummary extends LocalizeCoreElement(RtlMixin(LitElement)) {
43
38
  }
44
39
 
45
40
  .d2l-form-error-summary-error-list {
46
- margin: 0 0 0 1.2rem;
41
+ margin-block: 0;
42
+ margin-inline: 1.2rem 0;
47
43
  padding-bottom: 0.6rem;
48
44
  padding-top: 0.3rem;
49
45
  }
50
46
 
51
- :host([dir="rtl"]) .d2l-form-error-summary-error-list {
52
- margin-left: 0;
53
- margin-right: 1.2rem;
54
- }
55
-
56
47
  d2l-alert {
57
48
  max-width: none;
58
49
  }
@@ -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(RtlMixin(LitElement)))) {
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.1",
3
+ "version": "3.153.3",
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",