@brightspace-ui/core 2.178.1 → 2.178.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.
@@ -72,9 +72,9 @@ class ListItemGenericLayout extends RtlMixin(LitElement) {
72
72
  grid-template-rows:
73
73
  [start add-top-start] minmax(0, min-content)
74
74
  [add-top-end main-start] minmax(0, min-content)
75
- [main-end add-start] minmax(0, min-content)
76
- [add-end nested-start] minmax(0, min-content)
77
- [nested-end end];
75
+ [main-end nested-start] minmax(0, min-content)
76
+ [nested-end add-start] minmax(0, min-content)
77
+ [add-end end];
78
78
  }
79
79
 
80
80
  :host([align-nested="control"]) ::slotted([slot="nested"]) {
@@ -242,8 +242,8 @@ class ListItemGenericLayout extends RtlMixin(LitElement) {
242
242
  <slot name="actions" class="d2l-cell" data-cell-num="7"></slot>
243
243
 
244
244
  <slot name="drop-target"></slot>
245
- <slot name="add" class="d2l-cell" data-cell-num="9"></slot>
246
245
  <slot name="nested"></slot>
246
+ <slot name="add" class="d2l-cell" data-cell-num="9"></slot>
247
247
  `;
248
248
  }
249
249
 
@@ -83,6 +83,7 @@ export const ListItemMixin = superclass => class extends composeMixins(
83
83
  _displayKeyboardTooltip: { type: Boolean },
84
84
  _hasColorSlot: { type: Boolean, reflect: true, attribute: '_has-color-slot' },
85
85
  _hasNestedList: { type: Boolean, reflect: true, attribute: '_has-nested-list' },
86
+ _hasNestedListAddButton: { type: Boolean, reflect: true, attribute: '_has-nested-list-add-button' },
86
87
  _hovering: { type: Boolean, reflect: true },
87
88
  _hoveringPrimaryAction: { type: Boolean, attribute: '_hovering-primary-action', reflect: true },
88
89
  _focusing: { type: Boolean, reflect: true },
@@ -125,11 +126,11 @@ export const ListItemMixin = superclass => class extends composeMixins(
125
126
  position: absolute;
126
127
  width: 100%;
127
128
  }
128
- :host([_show-add-button][_has-nested-list]) [slot="before-content"] {
129
+ :host([_has-nested-list-add-button]) [slot="before-content"] {
129
130
  border-bottom: 1px solid var(--d2l-color-mica);
130
131
  margin-bottom: -1px;
131
132
  }
132
- :host([_show-add-button][_has-nested-list]:not([selection-disabled]):not([skeleton])[selected]) [slot="before-content"] {
133
+ :host([_has-nested-list-add-button]:not([selection-disabled]):not([skeleton])[selected]) [slot="before-content"] {
133
134
  border-bottom-color: #b6cbe8;
134
135
  }
135
136
  :host(:first-of-type) [slot="control-container"]::before {
@@ -154,7 +155,8 @@ export const ListItemMixin = superclass => class extends composeMixins(
154
155
  :host([selected]:not([selection-disabled]):not([skeleton])) [slot="control-container"]::before,
155
156
  :host([selected]:not([selection-disabled]):not([skeleton])) [slot="control-container"]::after,
156
157
  :host([_show-add-button]) [slot="control-container"]::before,
157
- :host([_show-add-button]) [slot="control-container"]::after,
158
+ .hide-bottom-border[slot="control-container"]::after,
159
+ :host([_has-nested-list-add-button]) [slot="control-container"]::after,
158
160
  :host(:first-of-type[_nested]) [slot="control-container"]::before {
159
161
  border-top-color: transparent;
160
162
  }
@@ -305,19 +307,19 @@ export const ListItemMixin = superclass => class extends composeMixins(
305
307
  margin-bottom: -1px;
306
308
  }
307
309
  /* below hides the border under the d2l-button-add */
308
- :host([_hovering-primary-action][_show-add-button]) [slot="outside-control-container"],
309
- :host([_hovering-selection][_show-add-button]) [slot="outside-control-container"],
310
- :host([_focusing-primary-action][_show-add-button]) [slot="outside-control-container"],
311
- :host(:not([selection-disabled]):not([skeleton])[selected][_show-add-button]) [slot="outside-control-container"],
312
- :host(:not([selection-disabled]):not([skeleton])[selected][_hovering-selection][_show-add-button]) [slot="outside-control-container"],
313
- :host(:not([selection-disabled]):not([skeleton])[selectable][_focusing][_show-add-button]) [slot="outside-control-container"] {
310
+ :host([_hovering-primary-action]) [slot="outside-control-container"].hide-bottom-border,
311
+ :host([_hovering-selection]) [slot="outside-control-container"].hide-bottom-border,
312
+ :host([_focusing-primary-action]) [slot="outside-control-container"].hide-bottom-border,
313
+ :host(:not([selection-disabled]):not([skeleton])[selected]) [slot="outside-control-container"].hide-bottom-border,
314
+ :host(:not([selection-disabled]):not([skeleton])[selected][_hovering-selection]) [slot="outside-control-container"].hide-bottom-border,
315
+ :host(:not([selection-disabled]):not([skeleton])[selectable][_focusing]) [slot="outside-control-container"].hide-bottom-border {
314
316
  background-clip: content-box, border-box;
315
317
  background-image: linear-gradient(white, white), linear-gradient(to right, #b6cbe8 20%, transparent 20%, transparent 80%, #b6cbe8 80%);
316
318
  background-origin: border-box;
317
319
  border: double 1px transparent;
318
320
  border-radius: 6px;
319
321
  }
320
- :host(:not([selection-disabled]):not([skeleton])[selected][_show-add-button]) [slot="outside-control-container"] {
322
+ :host(:not([selection-disabled]):not([skeleton])[selected]) [slot="outside-control-container"].hide-bottom-border {
321
323
  background-image: linear-gradient(#f3fbff, #f3fbff), linear-gradient(to right, #b6cbe8 20%, transparent 20%, transparent 80%, #b6cbe8 80%);
322
324
  }
323
325
  :host([_hovering-primary-action]) d2l-button-add,
@@ -640,7 +642,7 @@ export const ListItemMixin = superclass => class extends composeMixins(
640
642
  const nestedList = this._getNestedList();
641
643
  if (this._hasNestedList !== !!nestedList) {
642
644
  this._hasNestedList = !!nestedList;
643
- this._hasNestedListAddButton = nestedList.hasAttribute('add-button');
645
+ this._hasNestedListAddButton = this._hasNestedList && nestedList.hasAttribute('add-button');
644
646
  /** @ignore */
645
647
  this.dispatchEvent(new CustomEvent('d2l-list-item-nested-change', { bubbles: true, composed: true }));
646
648
  }
@@ -659,6 +661,9 @@ export const ListItemMixin = superclass => class extends composeMixins(
659
661
  'd2l-list-item-color-inner': true,
660
662
  'd2l-skeletize': this.color
661
663
  };
664
+ const bottomBorderClasses = {
665
+ 'hide-bottom-border': this._showAddButton && (!this._hasNestedList || this._hasNestedListAddButton)
666
+ };
662
667
 
663
668
  const alignNested = ((this.draggable && this.selectable) || (this.expandable && this.selectable && this.color)) ? 'control' : undefined;
664
669
  const primaryAction = ((!this.noPrimaryAction && this._renderPrimaryAction) ? this._renderPrimaryAction(this._contentId) : null);
@@ -678,12 +683,12 @@ export const ListItemMixin = superclass => class extends composeMixins(
678
683
  <d2l-button-add text="${addButtonText}" mode="icon-when-interacted" @click="${this._handleButtonAddClick}" data-is-first></d2l-button-add>
679
684
  </div>
680
685
  ` : nothing}
681
- <div slot="outside-control-container"></div>
686
+ <div slot="outside-control-container" class="${classMap(bottomBorderClasses)}"></div>
682
687
  <div slot="before-content"></div>
683
688
  ${this._renderDropTarget()}
684
689
  ${this._renderDragHandle(this._renderOutsideControl)}
685
690
  ${this._renderDragTarget(this.dragTargetHandleOnly ? this._renderOutsideControlHandleOnly : this._renderOutsideControlAction)}
686
- <div slot="control-container"></div>
691
+ <div slot="control-container" class="${classMap(bottomBorderClasses)}"></div>
687
692
  ${this._hasColorSlot ? html`
688
693
  <div slot="color-indicator" class="d2l-list-item-color-outer">
689
694
  <div class="${classMap(colorClasses)}" style="${styleMap(colorStyles)}"></div>
@@ -721,12 +726,12 @@ export const ListItemMixin = superclass => class extends composeMixins(
721
726
  class="d2l-list-item-actions-container">
722
727
  <slot name="actions" class="d2l-list-item-actions">${actions}</slot>
723
728
  </div>
729
+ ${this._renderNested(nested)}
724
730
  ${this._showAddButton && (!this._hasNestedListAddButton || (this.expandable && !this.expanded)) ? html`
725
731
  <div slot="add">
726
732
  <d2l-button-add text="${addButtonText}" mode="icon-when-interacted" @click="${this._handleButtonAddClick}"></d2l-button-add>
727
733
  </div>
728
734
  ` : nothing}
729
- ${this._renderNested(nested)}
730
735
  </d2l-list-item-generic-layout>
731
736
  `;
732
737
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@brightspace-ui/core",
3
- "version": "2.178.1",
3
+ "version": "2.178.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",