@brightspace-ui/core 3.227.6 → 3.227.8

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.
@@ -54,8 +54,8 @@ class ButtonSubtle extends SlottedIconMixin(ButtonMixin(LitElement)) {
54
54
  return [super.styles, labelStyles, buttonStyles,
55
55
  css`
56
56
  :host {
57
- --d2l-count-badge-background-color: var(--d2l-color-celestine);
58
- --d2l-count-badge-foreground-color: #ffffff;
57
+ --d2l-count-badge-background-color: var(--d2l-theme-background-color-interactive-primary-default);
58
+ --d2l-count-badge-foreground-color: var(--d2l-theme-text-color-static-inverted);
59
59
  display: inline-block;
60
60
  }
61
61
 
@@ -67,7 +67,7 @@ class ButtonSubtle extends SlottedIconMixin(ButtonMixin(LitElement)) {
67
67
  --d2l-button-subtle-padding-inline-start: 0.6rem;
68
68
  --d2l-button-subtle-padding-inline-end: 0.6rem;
69
69
  align-items: center;
70
- background-color: transparent;
70
+ background-color: var(--d2l-theme-background-color-interactive-tertiary-default);
71
71
  border-color: transparent;
72
72
  column-gap: 0.3rem;
73
73
  display: inline-flex;
@@ -110,34 +110,34 @@ class ButtonSubtle extends SlottedIconMixin(ButtonMixin(LitElement)) {
110
110
  button[disabled]:hover,
111
111
  button[disabled]:focus,
112
112
  :host([active]) button[disabled] {
113
- background-color: transparent;
113
+ background-color: var(--d2l-theme-background-color-interactive-tertiary-default);
114
114
  }
115
115
 
116
116
  button:hover,
117
117
  button:focus,
118
118
  :host([active]) button {
119
- background-color: var(--d2l-color-gypsum);
119
+ background-color: var(--d2l-theme-background-color-interactive-tertiary-hover);
120
120
  }
121
121
 
122
122
  .d2l-button-subtle-content {
123
- color: var(--d2l-color-celestine);
123
+ color: var(--d2l-theme-text-color-interactive-default);
124
124
  }
125
125
 
126
126
  button:hover:not([disabled]) .d2l-button-subtle-content,
127
127
  button:focus:not([disabled]) .d2l-button-subtle-content,
128
128
  :host([active]:not([disabled])) button .d2l-button-subtle-content {
129
- color: var(--d2l-color-celestine-minus-1);
129
+ color: var(--d2l-theme-text-color-interactive-hover);
130
130
  }
131
131
 
132
132
  button:hover:not([disabled]),
133
133
  button:focus:not([disabled]),
134
134
  :host([active]:not([disabled])) {
135
- --d2l-count-badge-background-color: var(--d2l-color-celestine-minus-1);
135
+ --d2l-count-badge-background-color: var(--d2l-theme-text-color-interactive-hover);
136
136
  }
137
137
 
138
138
  .property-icon,
139
139
  slot[name="icon"]::slotted(d2l-icon-custom) {
140
- color: var(--d2l-color-celestine);
140
+ color: var(--d2l-theme-text-color-interactive-default);
141
141
  }
142
142
 
143
143
  button:hover:not([disabled]) .property-icon,
@@ -146,7 +146,7 @@ class ButtonSubtle extends SlottedIconMixin(ButtonMixin(LitElement)) {
146
146
  button:hover:not([disabled]) slot[name="icon"]::slotted(d2l-icon-custom),
147
147
  button:focus:not([disabled]) slot[name="icon"]::slotted(d2l-icon-custom),
148
148
  :host([active]:not([disabled])) slot[name="icon"]::slotted(d2l-icon-custom) {
149
- color: var(--d2l-color-celestine-minus-1);
149
+ color: var(--d2l-theme-text-color-interactive-hover);
150
150
  }
151
151
 
152
152
  :host([icon-right]) .property-icon,
@@ -154,9 +154,13 @@ class ButtonSubtle extends SlottedIconMixin(ButtonMixin(LitElement)) {
154
154
  order: 1;
155
155
  }
156
156
 
157
+ .d2l-button-subtle-content-wrapper slot {
158
+ color: var(--d2l-theme-text-color-static-standard);
159
+ }
160
+
157
161
  :host([disabled]) button {
158
162
  cursor: default;
159
- opacity: 0.5;
163
+ opacity: var(--d2l-theme-opacity-disabled-control);
160
164
  }
161
165
  `
162
166
  ];
@@ -457,9 +457,8 @@ class Calendar extends LocalizeCoreElement(LitElement) {
457
457
  this._tableInfoId = getUniqueId();
458
458
  getCalendarData();
459
459
  }
460
-
461
- firstUpdated(changedProperties) {
462
- super.firstUpdated(changedProperties);
460
+ connectedCallback() {
461
+ super.connectedCallback();
463
462
 
464
463
  if (this.minValue && this.maxValue && (getDateFromISODate(this.minValue).getTime() > getDateFromISODate(this.maxValue).getTime())) {
465
464
  throw new RangeError('d2l-calendar component expects min-value to be before max-value');
@@ -470,18 +469,15 @@ class Calendar extends LocalizeCoreElement(LitElement) {
470
469
  (node) => { return (node.tagName === 'D2L-DROPDOWN-CONTENT'); }
471
470
  );
472
471
  if (dropdownContent) this._dialog = true;
473
-
474
- this.addEventListener('blur', () => this._isInitialFocusDate = true);
475
-
476
- this.addEventListener('d2l-localize-resources-change', () => {
477
- getCalendarData();
478
- this.requestUpdate();
479
- });
480
-
481
472
  this._today = getDateFromDateObj(getToday());
482
473
  if (this.selectedValue) this._getInitialFocusDate();
483
474
  else this.reset();
475
+ }
484
476
 
477
+ firstUpdated() {
478
+ super.firstUpdated();
479
+ this.addEventListener('blur', this._onBlur.bind(this));
480
+ this.addEventListener('d2l-localize-resources-change', this._onLocalizeResourcesChange.bind(this));
485
481
  }
486
482
 
487
483
  render() {
@@ -686,6 +682,10 @@ class Calendar extends LocalizeCoreElement(LitElement) {
686
682
  this._shownMonth = getNextMonth(this._shownMonth);
687
683
  }
688
684
 
685
+ _onBlur() {
686
+ this._isInitialFocusDate = true;
687
+ }
688
+
689
689
  async _onDateSelected(e) {
690
690
  let selectedDate = e.composedPath()[0];
691
691
  if (selectedDate.tagName === 'BUTTON') selectedDate = selectedDate.parentNode;
@@ -866,6 +866,11 @@ class Calendar extends LocalizeCoreElement(LitElement) {
866
866
  await this._showFocusDateMonth(oldFocusDate, Math.abs(numDaysChange) !== 1);
867
867
  }
868
868
 
869
+ _onLocalizeResourcesChange() {
870
+ getCalendarData();
871
+ this.requestUpdate();
872
+ }
873
+
869
874
  async _onNextMonthButtonClick() {
870
875
  this._monthIncrease();
871
876
  this._triggerMonthChangeAnimations(true);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@brightspace-ui/core",
3
- "version": "3.227.6",
3
+ "version": "3.227.8",
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",