@brightspace-ui/core 3.227.5 → 3.227.7

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.
@@ -49,8 +49,8 @@ class ButtonIcon extends SlottedIconMixin(PropertyRequiredMixin(ThemeMixin(Butto
49
49
  return [super.styles, buttonStyles, visibleOnAncestorStyles,
50
50
  css`
51
51
  :host {
52
- --d2l-button-icon-background-color-default: transparent;
53
- --d2l-button-icon-background-color-hover-default: var(--d2l-color-gypsum);
52
+ --d2l-button-icon-background-color-default: var(--d2l-theme-background-color-interactive-tertiary-default);
53
+ --d2l-button-icon-background-color-hover-default: var(--d2l-theme-background-color-interactive-tertiary-hover);
54
54
  --d2l-button-icon-border-radius-default: 0.3rem;
55
55
  --d2l-button-icon-min-height-default: calc(2rem + 2px);
56
56
  --d2l-button-icon-min-width-default: calc(2rem + 2px);
@@ -62,12 +62,12 @@ class ButtonIcon extends SlottedIconMixin(PropertyRequiredMixin(ThemeMixin(Butto
62
62
  display: none;
63
63
  }
64
64
  :host([translucent]) {
65
- --d2l-button-icon-background-color-default: rgba(0, 0, 0, 0.5);
66
- --d2l-button-icon-background-color-hover-default: var(--d2l-color-celestine);
67
- --d2l-focus-ring-color: white;
65
+ --d2l-button-icon-background-color-default: var(--d2l-theme-background-color-interactive-translucent-default);
66
+ --d2l-button-icon-background-color-hover-default: var(--d2l-theme-background-color-interactive-translucent-hover);
67
+ --d2l-focus-ring-color: var(--d2l-theme-icon-color-inverted);
68
68
  --d2l-focus-ring-offset: -4px;
69
- --d2l-button-icon-fill-color: white;
70
- --d2l-button-icon-fill-color-hover: white;
69
+ --d2l-button-icon-fill-color: var(--d2l-theme-icon-color-inverted);
70
+ --d2l-button-icon-fill-color-hover: var(--d2l-theme-icon-color-inverted);
71
71
  }
72
72
  :host([theme="dark"]) {
73
73
  --d2l-button-icon-background-color-default: transparent;
@@ -103,13 +103,13 @@ class ButtonIcon extends SlottedIconMixin(PropertyRequiredMixin(ThemeMixin(Butto
103
103
  button:hover:not([disabled]),
104
104
  button:focus:not([disabled]),
105
105
  :host([active]) button:not([disabled]) {
106
- --d2l-button-icon-fill-color: var(--d2l-button-icon-fill-color-hover, var(--d2l-color-tungsten));
106
+ --d2l-button-icon-fill-color: var(--d2l-button-icon-fill-color-hover, var(--d2l-theme-icon-color-standard));
107
107
  background-color: var(--d2l-button-icon-background-color-hover, var(--d2l-button-icon-background-color-hover-default));
108
108
  }
109
109
 
110
110
  d2l-icon,
111
111
  slot[name="icon"]::slotted(d2l-icon-custom) {
112
- color: var(--d2l-button-icon-fill-color, var(--d2l-color-tungsten));
112
+ color: var(--d2l-button-icon-fill-color, var(--d2l-theme-icon-color-standard));
113
113
  }
114
114
 
115
115
  :host([translucent]) button {
@@ -122,7 +122,7 @@ class ButtonIcon extends SlottedIconMixin(PropertyRequiredMixin(ThemeMixin(Butto
122
122
 
123
123
  :host([disabled]) button {
124
124
  cursor: default;
125
- opacity: 0.5;
125
+ opacity: var(--d2l-theme-opacity-disabled-control);
126
126
  }
127
127
 
128
128
  @media (prefers-reduced-motion: reduce) {
@@ -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);
@@ -70,7 +70,7 @@ class FilterDimensionSetDateTimeRangeValue extends LocalizeCoreElement(LitElemen
70
70
  this._dispatchFilterChangeEvent = false;
71
71
  this._enforceSingleSelection = true;
72
72
  this._filterSetValue = true;
73
- this._minWidth = 390;
73
+ this._minWidth = 410;
74
74
  this._noSearchSupport = true;
75
75
 
76
76
  this._handleDateChange = this._handleDateChange.bind(this);
@@ -122,6 +122,7 @@ class FilterDimensionSetDateTimeRangeValue extends LocalizeCoreElement(LitElemen
122
122
  selected: this.selected,
123
123
  text: this.text,
124
124
  valueText: this.valueText,
125
+ minWidth: this._minWidth,
125
126
  additionalContent: this._getAdditionalContent.bind(this),
126
127
  getAdditionalEventDetails: this._getAdditionalEventDetails.bind(this),
127
128
  clearProperties: this._clearProperties.bind(this)
@@ -151,7 +151,7 @@ class FilterDimensionSet extends LitElement {
151
151
  const values = valueNodes.map(value => {
152
152
  if (value._noSearchSupport) noSearchSupport = true;
153
153
  if (value._enforceSingleSelection) enforceSingleSelection = true;
154
- if (value._minWidth) minWidth = value._minWidth;
154
+ if (value._minWidth) minWidth = minWidth ? Math.max(value._minWidth, minWidth) : value._minWidth;
155
155
 
156
156
  return value.getValueDetails();
157
157
  });
@@ -574,7 +574,7 @@ class Filter extends FocusMixin(LocalizeCoreElement(LitElement)) {
574
574
  `;
575
575
  }
576
576
 
577
- if (dimension.minWidth) this._minWidth = dimension.minWidth;
577
+ if (dimension.minWidth) this._minWidth = Math.max(dimension.minWidth, this._minWidth);
578
578
  if (this._isDimensionEmpty(dimension)) {
579
579
  const emptyState = dimension.setEmptyState
580
580
  ? this._createEmptyState(dimension.setEmptyState, dimension.key)
@@ -842,6 +842,7 @@ class Filter extends FocusMixin(LocalizeCoreElement(LitElement)) {
842
842
  if (dimension.searchValue || dimension.searchType === 'manual') shouldSearch = true;
843
843
  shouldRecount = true;
844
844
  this._activeFiltersSubscribers.updateSubscribers();
845
+ newValue.forEach((field) => this._minWidth = field.minWidth ? Math.max(field.minWidth, this._minWidth) : this._minWidth);
845
846
  } else if (prop === 'text') {
846
847
  this._activeFiltersSubscribers.updateSubscribers();
847
848
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@brightspace-ui/core",
3
- "version": "3.227.5",
3
+ "version": "3.227.7",
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",