@brightspace-ui/core 3.322.0 → 3.324.0

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.
@@ -1,9 +1,10 @@
1
1
  import './list-item-drag-image.js';
2
2
  import { css, html, nothing } from 'lit';
3
- import { findComposedAncestor, isComposedAncestor } from '../../helpers/dom.js';
3
+ import { findComposedAncestor, getScrollableAncestor, isComposedAncestor } from '../../helpers/dom.js';
4
4
  import { announce } from '../../helpers/announce.js';
5
5
  import { classMap } from 'lit/directives/class-map.js';
6
6
  import { dragActions } from './list-item-drag-handle.js';
7
+ import { getFlag } from '../../helpers/flags.js';
7
8
  import { getUniqueId } from '../../helpers/uniqueId.js';
8
9
  import { ifDefined } from 'lit/directives/if-defined.js';
9
10
  import { SelectionInfo } from '../selection/selection-mixin.js';
@@ -24,6 +25,8 @@ export const dropLocation = moveLocations; // backwards compatibility
24
25
  const dropTargetLeaveDelay = 1000; // ms
25
26
  const touchHoldDuration = 400; // length of time user needs to hold down touch before dragging occurs
26
27
  const scrollSensitivity = 150; // pixels between top/bottom of viewport to scroll for mobile
28
+ const scrollContainerSensitivity = 60; // pixels between top/bottom of scrollable container to scroll for mobile
29
+ const scrollSpeed = 10; // pixels to scroll for mobile
27
30
 
28
31
  const createDragEvent = (name) => {
29
32
  const event = new Event(name, { bubbles: true });
@@ -427,6 +430,14 @@ export const ListItemDragDropMixin = superclass => class extends superclass {
427
430
  if (this.shadowRoot) this.shadowRoot.querySelector(`#${this._itemDragId}`).activateKeyboardMode();
428
431
  }
429
432
 
433
+ get _isListItemDragAndDropMixin() {
434
+ return true;
435
+ }
436
+
437
+ #scrollableContainer;
438
+ #touchAction = '';
439
+ #improvedMobileDragAndDropFlag = getFlag('GAUD-10642-improved-mobile-drag-and-drop', true);
440
+
430
441
  _annoucePositionChange(dragTargetKey, dropTargetKey, dropLocation) {
431
442
  /** Dispatched when a draggable list item's position changes in the list. See [Event Details: d2l-list-item-position-change](#event-details%3A-d2l-list-item-position-change). */
432
443
  this.dispatchEvent(new CustomEvent('d2l-list-item-position-change', {
@@ -557,7 +568,20 @@ export const ListItemDragDropMixin = superclass => class extends superclass {
557
568
 
558
569
  _findListItemFromCoordinates(x, y) {
559
570
  const listNode = findComposedAncestor(this.parentNode, (node) => node && node.tagName === 'D2L-LIST');
560
- return listNode.shadowRoot.elementFromPoint(x, y);
571
+ // remove this if when cleaning 'GAUD-10642-improved-mobile-drag-and-drop'
572
+ if (!this.#improvedMobileDragAndDropFlag) {
573
+ return listNode.shadowRoot.elementFromPoint(x, y);
574
+ }
575
+
576
+ // This is to make sure that in Firefox it looks for the list item
577
+ // in the shadow DOM (if rendered as part of a template)
578
+ // or in the light DOM (when using the default slot of a parent element)
579
+ const node = listNode.getRootNode().elementFromPoint(x, y);
580
+ if (node?._isListItemDragAndDropMixin) {
581
+ return node;
582
+ }
583
+
584
+ return null;
561
585
  }
562
586
 
563
587
  _getKeyboardText() {
@@ -792,6 +816,7 @@ export const ListItemDragDropMixin = superclass => class extends superclass {
792
816
  _onTouchCancel() {
793
817
  if (this._touchTimeoutId) clearTimeout(this._touchTimeoutId);
794
818
  this._touchStarted = false;
819
+ if (this.#improvedMobileDragAndDropFlag) this.#resetScrollableContainer();
795
820
  }
796
821
 
797
822
  /**
@@ -800,14 +825,22 @@ export const ListItemDragDropMixin = superclass => class extends superclass {
800
825
  _onTouchEnd(e) {
801
826
  if (this._touchTimeoutId) clearTimeout(this._touchTimeoutId);
802
827
  if (!this._touchStarted) return;
803
- e.preventDefault();
828
+ if (e.cancelable) e.preventDefault();
804
829
  this._touchStarted = false;
830
+ // leave the code inside the if when removing 'GAUD-10642-improved-mobile-drag-and-drop'
831
+ if (this.#improvedMobileDragAndDropFlag) this.#resetScrollableContainer();
805
832
  this._currentTouchListItem = undefined;
806
833
  // simulate drop if over a drop area
807
834
  const touch = e.changedTouches[0];
808
835
  const listItem = this._findListItemFromCoordinates(touch.clientX, touch.clientY);
809
- const dropGrid = listItem.shadowRoot.querySelector('.d2l-list-item-drag-drop-grid');
810
- if (dropGrid) dropGrid.dispatchEvent(createDragEvent('drop'));
836
+ // remove the if when cleaning 'GAUD-10642-improved-mobile-drag-and-drop' and leave the else code block
837
+ if (!this.#improvedMobileDragAndDropFlag) {
838
+ const dropGrid = listItem.shadowRoot.querySelector('.d2l-list-item-drag-drop-grid');
839
+ if (dropGrid) dropGrid.dispatchEvent(createDragEvent('drop'));
840
+ } else if (listItem) {
841
+ const dropGrid = listItem.shadowRoot.querySelector('.d2l-list-item-drag-drop-grid');
842
+ if (dropGrid) dropGrid.dispatchEvent(createDragEvent('drop'));
843
+ }
811
844
  // simulate dragend
812
845
  if (this.shadowRoot)
813
846
  this.shadowRoot.querySelector('.d2l-list-item-drag-area').dispatchEvent(createDragEvent('dragend'));
@@ -823,6 +856,8 @@ export const ListItemDragDropMixin = superclass => class extends superclass {
823
856
  e.preventDefault();
824
857
  }
825
858
  const touch = e.changedTouches[0];
859
+ if (this.#improvedMobileDragAndDropFlag) this.#doTouchScroll(touch);
860
+
826
861
  const listItem = this._findListItemFromCoordinates(touch.clientX, touch.clientY);
827
862
  if (!listItem) return;
828
863
  // simulate host dragenter
@@ -830,6 +865,7 @@ export const ListItemDragDropMixin = superclass => class extends superclass {
830
865
  listItem.dispatchEvent(createDragEvent('dragenter'));
831
866
  this._currentTouchListItem = listItem;
832
867
  }
868
+
833
869
  // get the drop area
834
870
  const dropGrid = listItem.shadowRoot.querySelector('.d2l-list-item-drag-drop-grid');
835
871
  if (!dropGrid) return;
@@ -845,6 +881,8 @@ export const ListItemDragDropMixin = superclass => class extends superclass {
845
881
  this._currentTouchDropArea = movingOverElem;
846
882
  }
847
883
  }
884
+ // Delete all of the following code when removing 'GAUD-10642-improved-scroll-in-mobile'
885
+ if (this.#improvedMobileDragAndDropFlag) return;
848
886
  // scroll the viewport if we've reached the end
849
887
  if (touch.clientY > window.innerHeight / 2 && window.innerHeight - touch.clientY < scrollSensitivity) {
850
888
  // scroll down
@@ -862,6 +900,17 @@ export const ListItemDragDropMixin = superclass => class extends superclass {
862
900
  // simulate dragstart for touch and hold
863
901
  this._touchTimeoutId = setTimeout(() => {
864
902
  this._touchStarted = true;
903
+ // leave the code inside the if when removing 'GAUD-10642-improved-mobile-drag-and-drop'
904
+ if (this.#improvedMobileDragAndDropFlag) {
905
+ // search for scrollable container
906
+ this.#scrollableContainer = getScrollableAncestor(this);
907
+ if (this.#scrollableContainer) {
908
+ // check if it has the touch-action style already
909
+ const touchAction = this.#scrollableContainer.style.getPropertyValue('touch-action');
910
+ if (touchAction && touchAction !== 'none') this.#touchAction = touchAction;
911
+ this.#scrollableContainer.style.setProperty('touch-action', 'none');
912
+ }
913
+ }
865
914
  if (this.shadowRoot)
866
915
  this.shadowRoot.querySelector('.d2l-list-item-drag-area').dispatchEvent(createDragEvent('dragstart'));
867
916
  }, touchHoldDuration);
@@ -933,6 +982,38 @@ export const ListItemDragDropMixin = superclass => class extends superclass {
933
982
  return this._dropLocation === dropLocation.above ? html`<div class="d2l-list-item-drag-top-marker">${renderTemplate}</div>` : null;
934
983
  }
935
984
 
985
+ #doTouchScroll(touch) {
986
+ if (!touch || !this.#scrollableContainer) return;
987
+ if (this.#scrollableContainer === document.body) {
988
+ this.#handleViewPortTouchScrolling(touch);
989
+ } else {
990
+ this.#handleContainerTouchScrolling(touch);
991
+ }
992
+ }
993
+
994
+ #handleContainerTouchScrolling(touch) {
995
+ // scroll the viewport if we've reached the end
996
+ const rect = this.#scrollableContainer.getBoundingClientRect();
997
+ if (rect.bottom - touch.clientY < scrollContainerSensitivity) {
998
+ // scroll down
999
+ this.#scrollableContainer.scrollBy(0, scrollSpeed);
1000
+ } else if (touch.clientY - rect.top < scrollContainerSensitivity) {
1001
+ // scroll up
1002
+ this.#scrollableContainer.scrollBy(0, -scrollSpeed);
1003
+ }
1004
+ }
1005
+
1006
+ #handleViewPortTouchScrolling(touch) {
1007
+ const height = window.innerHeight;
1008
+ if (touch.clientY > height / 2 && height - touch.clientY < scrollSensitivity) {
1009
+ // scroll down
1010
+ window.scrollBy(0, scrollSpeed);
1011
+ } else if (touch.clientY < height / 2 && touch.clientY < scrollSensitivity) {
1012
+ // scroll up
1013
+ window.scrollBy(0, -scrollSpeed);
1014
+ }
1015
+ }
1016
+
936
1017
  #onDropEnterHelper(e, isTopHalf, isMiddle) {
937
1018
  if (this.dropDisabled) return;
938
1019
  e.dataTransfer.dropEffect = 'move';
@@ -954,4 +1035,16 @@ export const ListItemDragDropMixin = superclass => class extends superclass {
954
1035
  const dragState = getDragState();
955
1036
  dragState.setActiveDropTarget(this, location);
956
1037
  }
1038
+
1039
+ #resetScrollableContainer() {
1040
+ if (this.#scrollableContainer) {
1041
+ if (this.#touchAction) {
1042
+ this.#scrollableContainer.style.setProperty('touch-action', this.#touchAction);
1043
+ } else {
1044
+ this.#scrollableContainer.style.removeProperty('touch-action');
1045
+ }
1046
+ this.#touchAction = '';
1047
+ }
1048
+ this.#scrollableContainer = undefined;
1049
+ }
957
1050
  };
@@ -18039,7 +18039,7 @@
18039
18039
  },
18040
18040
  {
18041
18041
  "name": "styles",
18042
- "default": "\"css`\\n\\t\\t:host,\\n\\t\\t:host > d2l-form {\\n\\t\\t\\tbottom: 0;\\n\\t\\t\\tleft: 0;\\n\\t\\t\\toverflow: hidden;\\n\\t\\t\\tposition: absolute;\\n\\t\\t\\tright: 0;\\n\\t\\t\\ttop: 0;\\n\\t\\t}\\n\\n\\t\\t:host([hidden]) {\\n\\t\\t\\tdisplay: none;\\n\\t\\t}\\n\\t\\t:host([width-type=\\\"normal\\\"]) .d2l-template-primary-secondary-content,\\n\\t\\t:host([width-type=\\\"normal\\\"]) .d2l-template-primary-secondary-footer {\\n\\t\\t\\tmargin: 0 auto;\\n\\t\\t\\tmax-width: 1230px;\\n\\t\\t\\twidth: 100%;\\n\\t\\t}\\n\\t\\t.d2l-template-primary-secondary-container {\\n\\t\\t\\tdisplay: flex;\\n\\t\\t\\tflex-direction: column;\\n\\t\\t\\theight: 100%;\\n\\t\\t\\twidth: 100%;\\n\\t\\t}\\n\\t\\t.d2l-template-primary-secondary-content {\\n\\t\\t\\tdisplay: flex;\\n\\t\\t\\theight: 100%;\\n\\t\\t\\toverflow: hidden;\\n\\t\\t}\\n\\n\\t\\tmain {\\n\\t\\t\\tflex: 2 0 0;\\n\\t\\t\\toverflow-x: hidden;\\n\\t\\t\\ttransition: none;\\n\\t\\t}\\n\\t\\tmain d2l-form-error-summary {\\n\\t\\t\\tmargin-inline: var(--d2l-template-primary-secondary-form-error-inline-margin, 20px);\\n\\t\\t}\\n\\n\\t\\t:host([resizable]) main {\\n\\t\\t\\tflex: 1 0 0;\\n\\t\\t}\\n\\t\\t:host([primary-overflow=\\\"hidden\\\"]) main {\\n\\t\\t\\toverflow: hidden;\\n\\t\\t}\\n\\t\\t.d2l-template-primary-secondary-secondary-container {\\n\\t\\t\\tflex: 1 0 0;\\n\\t\\t\\tmin-width: ${desktopMinSize}px;\\n\\t\\t\\toverflow: hidden;\\n\\t\\t}\\n\\t\\t:host([resizable]) .d2l-template-primary-secondary-secondary-container {\\n\\t\\t\\tflex: none;\\n\\t\\t\\tmin-width: 0;\\n\\t\\t}\\n\\t\\t[data-animate-resize] .d2l-template-primary-secondary-secondary-container {\\n\\t\\t\\ttransition: width 400ms cubic-bezier(0, 0.7, 0.5, 1), height 400ms cubic-bezier(0, 0.7, 0.5, 1);\\n\\t\\t}\\n\\t\\t.d2l-template-primary-secondary-divider-shadow {\\n\\t\\t\\tdisplay: none;\\n\\t\\t}\\n\\t\\taside {\\n\\t\\t\\theight: 100%;\\n\\t\\t\\tmin-width: ${desktopMinSize}px;\\n\\t\\t\\toverflow-x: hidden;\\n\\t\\t\\toverflow-y: scroll;\\n\\t\\t\\twidth: 100%;\\n\\t\\t}\\n\\n\\t\\t/* prevent margin colapse on slotted children */\\n\\t\\taside::before,\\n\\t\\taside::after {\\n\\t\\t\\tcontent: \\\" \\\";\\n\\t\\t\\tdisplay: table;\\n\\t\\t}\\n\\t\\t[data-background-shading=\\\"primary\\\"] > main,\\n\\t\\t[data-background-shading=\\\"secondary\\\"] > .d2l-template-primary-secondary-secondary-container {\\n\\t\\t\\tbackground-color: var(--d2l-color-gypsum);\\n\\t\\t}\\n\\t\\t:host([resizable]) [data-is-collapsed] aside {\\n\\t\\t\\tvisibility: hidden;\\n\\t\\t}\\n\\t\\t:host([resizable]:not([secondary-first])) aside {\\n\\t\\t\\tfloat: inline-start;\\n\\t\\t}\\n\\t\\t.d2l-template-primary-secondary-divider,\\n\\t\\t.d2l-template-primary-secondary-divider-not-resizable {\\n\\t\\t\\tbackground-color: var(--d2l-color-mica);\\n\\t\\t\\tflex: none;\\n\\t\\t\\toutline: none;\\n\\t\\t\\tposition: relative;\\n\\t\\t\\twidth: 1px;\\n\\t\\t\\tz-index: 1;\\n\\t\\t}\\n\\t\\t.d2l-template-primary-secondary-divider-handle {\\n\\t\\t\\tdisplay: none;\\n\\t\\t\\tposition: absolute;\\n\\t\\t\\ttop: calc(50%);\\n\\t\\t\\twidth: 100%;\\n\\t\\t}\\n\\t\\t:host([resizable]) .d2l-template-primary-secondary-divider {\\n\\t\\t\\tbackground-color: var(--d2l-color-gypsum);\\n\\t\\t\\tcursor: ew-resize;\\n\\t\\t\\twidth: 0.45rem;\\n\\t\\t}\\n\\t\\t:host([resizable]) [data-is-expanded] .d2l-template-primary-secondary-divider {\\n\\t\\t\\tcursor: var(--d2l-cursor-resize-inline-end, e-resize);\\n\\t\\t}\\n\\t\\t:host([resizable]) [data-is-collapsed] .d2l-template-primary-secondary-divider {\\n\\t\\t\\tcursor: var(--d2l-cursor-resize-inline-start, w-resize);\\n\\t\\t}\\n\\t\\t:host([resizable]) .d2l-template-primary-secondary-divider-handle {\\n\\t\\t\\talign-items: center;\\n\\t\\t\\tdisplay: flex;\\n\\t\\t\\tjustify-content: center;\\n\\t\\t}\\n\\t\\t:host([resizable]) [data-background-shading=\\\"secondary\\\"] .d2l-template-primary-secondary-divider {\\n\\t\\t\\tbox-shadow: calc(1px * var(--d2l-length-factor, 1)) 0 0 0 rgba(0, 0, 0, 0.15);\\n\\t\\t}\\n\\t\\t:host([resizable]) [data-background-shading=\\\"primary\\\"] .d2l-template-primary-secondary-divider {\\n\\t\\t\\tbox-shadow: calc(-1px * var(--d2l-length-factor, 1)) 0 0 0 rgba(0, 0, 0, 0.15);\\n\\t\\t}\\n\\t\\t.d2l-template-primary-secondary-divider-handle-desktop {\\n\\t\\t\\talign-items: center;\\n\\t\\t\\tdisplay: flex;\\n\\t\\t\\tjustify-content: center;\\n\\t\\t\\tposition: absolute;\\n\\t\\t}\\n\\t\\t.d2l-template-primary-secondary-divider-handle-left,\\n\\t\\t.d2l-template-primary-secondary-divider-handle-right {\\n\\t\\t\\tcolor: var(--d2l-color-celestine);\\n\\t\\t\\tdisplay: none;\\n\\t\\t\\tposition: absolute;\\n\\t\\t}\\n\\t\\t.d2l-template-primary-secondary-divider-handle-left {\\n\\t\\t\\tinset-inline-start: -1rem;\\n\\t\\t}\\n\\t\\t.d2l-template-primary-secondary-divider-handle-right {\\n\\t\\t\\tinset-inline-end: -1rem;\\n\\t\\t}\\n\\t\\t.d2l-template-primary-secondary-divider-handle-line {\\n\\t\\t\\tdisplay: flex;\\n\\t\\t\\theight: 0.9rem;\\n\\t\\t\\tjustify-content: space-between;\\n\\t\\t\\twidth: 0.25rem;\\n\\t\\t}\\n\\t\\t.d2l-template-primary-secondary-divider-handle-line::before,\\n\\t\\t.d2l-template-primary-secondary-divider-handle-line::after {\\n\\t\\t\\tbackground-color: var(--d2l-color-galena);\\n\\t\\t\\tborder-radius: 0.05rem;\\n\\t\\t\\tcontent: \\\"\\\";\\n\\t\\t\\tdisplay: inline-block;\\n\\t\\t\\twidth: 0.1rem;\\n\\t\\t}\\n\\t\\t.d2l-template-primary-secondary-divider:${unsafeCSS(getFocusPseudoClass())} .d2l-template-primary-secondary-divider-handle-right,\\n\\t\\t.d2l-template-primary-secondary-divider:${unsafeCSS(getFocusPseudoClass())} .d2l-template-primary-secondary-divider-handle-left {\\n\\t\\t\\tdisplay: block;\\n\\t\\t}\\n\\t\\t:host(:not([secondary-first])) [data-is-expanded] .d2l-template-primary-secondary-divider-handle-left,\\n\\t\\t:host([secondary-first]) [data-is-expanded] .d2l-template-primary-secondary-divider-handle-right {\\n\\t\\t\\tdisplay: none;\\n\\t\\t}\\n\\t\\td2l-icon {\\n\\t\\t\\tdisplay: none;\\n\\t\\t}\\n\\n\\t\\tfooter {\\n\\t\\t\\tbackground-color: white;\\n\\t\\t\\tbox-shadow: 0 -2px 4px rgba(32, 33, 34, 0.2); /* ferrite */\\n\\t\\t\\tpadding: 0.75rem 1rem;\\n\\t\\t\\tz-index: 1; /* ensures the footer box-shadow is over main areas with background colours set */\\n\\t\\t}\\n\\t\\theader {\\n\\t\\t\\tz-index: 14; /* ensures the header box-shadow is over main areas with background colours set, and opt-in on top of sticky header */\\n\\t\\t}\\n\\n\\t\\t:host([resizable]) .d2l-template-primary-secondary-divider:focus,\\n\\t\\t:host([resizable]) .d2l-template-primary-secondary-divider:hover {\\n\\t\\t\\tbackground-color: var(--d2l-color-mica);\\n\\t\\t\\tbox-shadow: none;\\n\\t\\t}\\n\\t\\t:host([resizable]) .d2l-template-primary-secondary-divider:${unsafeCSS(getFocusPseudoClass())} {\\n\\t\\t\\tbackground-color: var(--d2l-color-celestine);\\n\\t\\t}\\n\\t\\t.d2l-template-primary-secondary-divider:focus .d2l-template-primary-secondary-divider-handle-line::before,\\n\\t\\t.d2l-template-primary-secondary-divider:focus .d2l-template-primary-secondary-divider-handle-line::after,\\n\\t\\t.d2l-template-primary-secondary-divider:hover .d2l-template-primary-secondary-divider-handle-line::before,\\n\\t\\t.d2l-template-primary-secondary-divider:hover .d2l-template-primary-secondary-divider-handle-line::after {\\n\\t\\t\\tbackground-color: var(--d2l-color-ferrite);\\n\\t\\t}\\n\\t\\t.d2l-template-primary-secondary-divider:${unsafeCSS(getFocusPseudoClass())} .d2l-template-primary-secondary-divider-handle-line::before,\\n\\t\\t.d2l-template-primary-secondary-divider:${unsafeCSS(getFocusPseudoClass())} .d2l-template-primary-secondary-divider-handle-line::after {\\n\\t\\t\\tbackground-color: white;\\n\\t\\t}\\n\\n\\t\\t.d2l-template-primary-secondary-divider,\\n\\t\\t.d2l-template-primary-secondary-divider-handle-mobile,\\n\\t\\t.d2l-template-primary-secondary-divider-handle-line::before,\\n\\t\\t.d2l-template-primary-secondary-divider-handle-line::after {\\n\\t\\t\\ttransition: background-color 100ms, box-shadow 100ms;\\n\\t\\t}\\n\\t\\t.d2l-template-primary-secondary-divider:hover,\\n\\t\\t.d2l-template-primary-secondary-divider:hover .d2l-template-primary-secondary-divider-handle-mobile,\\n\\t\\t.d2l-template-primary-secondary-divider:hover .d2l-template-primary-secondary-divider-handle-line::before,\\n\\t\\t.d2l-template-primary-secondary-divider:hover .d2l-template-primary-secondary-divider-handle-line::after {\\n\\t\\t\\ttransition-delay: 100ms;\\n\\t\\t}\\n\\n\\t\\t.d2l-template-scroll::-webkit-scrollbar {\\n\\t\\t\\twidth: 8px;\\n\\t\\t}\\n\\n\\t\\t.d2l-template-scroll::-webkit-scrollbar-track {\\n\\t\\t\\tbackground: rgba(255, 255, 255, 0.4);\\n\\t\\t}\\n\\n\\t\\t.d2l-template-scroll::-webkit-scrollbar-thumb {\\n\\t\\t\\tbackground: var(--d2l-color-galena);\\n\\t\\t\\tborder-radius: 4px;\\n\\t\\t}\\n\\n\\t\\t.d2l-template-scroll::-webkit-scrollbar-thumb:hover {\\n\\t\\t\\tbackground: var(--d2l-color-tungsten);\\n\\t\\t}\\n\\n\\t\\t/* For Firefox */\\n\\t\\t.d2l-template-scroll {\\n\\t\\t\\tscrollbar-color: var(--d2l-color-galena) rgba(255, 255, 255, 0.4);\\n\\t\\t\\tscrollbar-width: thin;\\n\\t\\t}\\n\\n\\t\\t@media (prefers-reduced-motion: reduce) {\\n\\t\\t\\t.d2l-template-primary-secondary-divider,\\n\\t\\t\\t.d2l-template-primary-secondary-divider-handle-line::before,\\n\\t\\t\\t.d2l-template-primary-secondary-divider-handle-line::after,\\n\\t\\t\\t.d2l-template-primary-secondary-divider-handle-mobile {\\n\\t\\t\\t\\ttransition: none;\\n\\t\\t\\t}\\n\\t\\t}\\n\\t\\t@media only screen and (max-width: 767px) {\\n\\n\\t\\t\\t.d2l-template-primary-secondary-content {\\n\\t\\t\\t\\tflex-direction: column;\\n\\t\\t\\t}\\n\\n\\t\\t\\tmain {\\n\\t\\t\\t\\tflex: 1 0 0;\\n\\t\\t\\t}\\n\\t\\t\\t.d2l-template-primary-secondary-secondary-container {\\n\\t\\t\\t\\tflex: none;\\n\\t\\t\\t}\\n\\t\\t\\taside,\\n\\t\\t\\t.d2l-template-primary-secondary-secondary-container {\\n\\t\\t\\t\\tmin-width: auto;\\n\\t\\t\\t}\\n\\t\\t\\t[data-is-collapsed] aside {\\n\\t\\t\\t\\tdisplay: none;\\n\\t\\t\\t}\\n\\n\\t\\t\\t.d2l-template-primary-secondary-divider-handle-desktop {\\n\\t\\t\\t\\tdisplay: none;\\n\\t\\t\\t}\\n\\t\\t\\t/* Attribute selector is only used to increase specificity */\\n\\t\\t\\t:host([resizable]) .d2l-template-primary-secondary-divider,\\n\\t\\t\\t:host(:not([resizable])) .d2l-template-primary-secondary-divider {\\n\\t\\t\\t\\tbackground-color: var(--d2l-color-celestine);\\n\\t\\t\\t\\tcursor: ns-resize;\\n\\t\\t\\t\\theight: 0.1rem;\\n\\t\\t\\t\\twidth: 100%;\\n\\t\\t\\t}\\n\\t\\t\\t:host([resizable]) [data-is-collapsed] .d2l-template-primary-secondary-divider,\\n\\t\\t\\t:host(:not([resizable])) [data-is-collapsed] .d2l-template-primary-secondary-divider {\\n\\t\\t\\t\\tcursor: n-resize;\\n\\t\\t\\t}\\n\\t\\t\\t:host([resizable]) [data-is-expanded] .d2l-template-primary-secondary-divider,\\n\\t\\t\\t:host(:not([resizable])) [data-is-expanded] .d2l-template-primary-secondary-divider {\\n\\t\\t\\t\\tcursor: s-resize;\\n\\t\\t\\t}\\n\\n\\t\\t\\t/* Attribute selector is only used to increase specificity */\\n\\t\\t\\t:host([resizable]) .d2l-template-primary-secondary-divider:hover,\\n\\t\\t\\t:host(:not([resizable])) .d2l-template-primary-secondary-divider:hover,\\n\\t\\t\\t:host([resizable]) .d2l-template-primary-secondary-divider:focus,\\n\\t\\t\\t:host(:not([resizable])) .d2l-template-primary-secondary-divider:focus {\\n\\t\\t\\t\\tbackground-color: var(--d2l-color-celestine-minus-1);\\n\\t\\t\\t}\\n\\t\\t\\t.d2l-template-primary-secondary-divider-handle {\\n\\t\\t\\t\\tborder-radius: 0;\\n\\t\\t\\t\\tbottom: 0.1rem;\\n\\t\\t\\t\\tdisplay: block;\\n\\t\\t\\t\\tinset-inline-end: calc(17px + 0.2rem);\\n\\t\\t\\t\\toverflow: hidden;\\n\\t\\t\\t\\ttop: auto;\\n\\t\\t\\t}\\n\\t\\t\\t.d2l-template-primary-secondary-divider-handle-mobile {\\n\\t\\t\\t\\talign-items: center;\\n\\t\\t\\t\\tbackground-color: var(--d2l-color-celestine);\\n\\t\\t\\t\\tborder-radius: 0.25rem 0.25rem 0 0;\\n\\t\\t\\t\\tbottom: 0;\\n\\t\\t\\t\\tdisplay: flex;\\n\\t\\t\\t\\tjustify-content: center;\\n\\t\\t\\t\\tposition: absolute;\\n\\t\\t\\t\\tright: 0;\\n\\t\\t\\t}\\n\\t\\t\\t.d2l-template-primary-secondary-divider:hover .d2l-template-primary-secondary-divider-handle-mobile,\\n\\t\\t\\t.d2l-template-primary-secondary-divider:focus .d2l-template-primary-secondary-divider-handle-mobile {\\n\\t\\t\\t\\tbackground-color: var(--d2l-color-celestine-minus-1);\\n\\t\\t\\t}\\n\\t\\t\\t.d2l-template-primary-secondary-divider-handle,\\n\\t\\t\\t.d2l-template-primary-secondary-divider-handle-mobile {\\n\\t\\t\\t\\theight: 1rem;\\n\\t\\t\\t\\twidth: 2.2rem;\\n\\t\\t\\t}\\n\\t\\t\\t.d2l-template-primary-secondary-divider:${unsafeCSS(getFocusPseudoClass())} .d2l-template-primary-secondary-divider-handle {\\n\\t\\t\\t\\tbox-shadow: none;\\n\\t\\t\\t\\theight: 1.2rem;\\n\\t\\t\\t\\tinset-inline-end: 17px;\\n\\t\\t\\t\\twidth: 2.6rem;\\n\\t\\t\\t}\\n\\t\\t\\td2l-icon {\\n\\t\\t\\t\\tcolor: white;\\n\\t\\t\\t\\tdisplay: block;\\n\\t\\t\\t}\\n\\t\\t\\t${getFocusRingStyles(pseudoClass => `.d2l-template-primary-secondary-divider:${pseudoClass} .d2l-template-primary-secondary-divider-handle-mobile`, { extraStyles: css`right: 0.2rem; box-shadow: 0 0 0 2px #ffffff;` })}\\n\\t\\t\\t.d2l-template-primary-secondary-divider-shadow {\\n\\t\\t\\t\\tbox-shadow: 0 -2px 8px rgba(0, 0, 0, 0.25);\\n\\t\\t\\t\\tdisplay: block;\\n\\t\\t\\t\\theight: 100%;\\n\\t\\t\\t\\tposition: absolute;\\n\\t\\t\\t\\twidth: 100%;\\n\\t\\t\\t\\tz-index: -1;\\n\\t\\t\\t}\\n\\t\\t}\\n\\n\\t\\t@media print {\\n\\t\\t\\t:host {\\n\\t\\t\\t\\toverflow: visible;\\n\\t\\t\\t\\tposition: relative;\\n\\t\\t\\t}\\n\\n\\t\\t\\t.d2l-template-primary-secondary-content {\\n\\t\\t\\t\\tflex-direction: column;\\n\\t\\t\\t}\\n\\n\\t\\t\\t.d2l-template-primary-secondary-content,\\n\\t\\t\\t.d2l-template-primary-secondary-content > main,\\n\\t\\t\\t.d2l-template-primary-secondary-secondary-container {\\n\\t\\t\\t\\toverflow: visible;\\n\\t\\t\\t}\\n\\n\\t\\t\\t.d2l-template-primary-secondary-content > main {\\n\\t\\t\\t\\tbackground: none;\\n\\t\\t\\t}\\n\\n\\t\\t\\t.d2l-template-primary-secondary-divider-not-resizable,\\n\\t\\t\\t.d2l-template-primary-secondary-divider {\\n\\t\\t\\t\\tdisplay: none;\\n\\t\\t\\t}\\n\\n\\t\\t\\t.d2l-template-primary-secondary-container > footer {\\n\\t\\t\\t\\tbox-shadow: none;\\n\\t\\t\\t\\tpadding: 0;\\n\\t\\t\\t}\\n\\n\\t\\t\\t.d2l-template-primary-secondary-container,\\n\\t\\t\\t.d2l-template-primary-secondary-content {\\n\\t\\t\\t\\theight: auto;\\n\\t\\t\\t}\\n\\t\\t}\\n\\t`\""
18042
+ "default": "\"css`\\n\\t\\t:host,\\n\\t\\t:host > d2l-form {\\n\\t\\t\\tbottom: 0;\\n\\t\\t\\tleft: 0;\\n\\t\\t\\toverflow: hidden;\\n\\t\\t\\tposition: absolute;\\n\\t\\t\\tright: 0;\\n\\t\\t\\ttop: 0;\\n\\t\\t}\\n\\n\\t\\t:host([hidden]) {\\n\\t\\t\\tdisplay: none;\\n\\t\\t}\\n\\t\\t:host([width-type=\\\"normal\\\"]) .d2l-template-primary-secondary-content,\\n\\t\\t:host([width-type=\\\"normal\\\"]) .d2l-template-primary-secondary-footer {\\n\\t\\t\\tmargin: 0 auto;\\n\\t\\t\\tmax-width: 1230px;\\n\\t\\t\\twidth: 100%;\\n\\t\\t}\\n\\t\\t.d2l-template-primary-secondary-container {\\n\\t\\t\\tdisplay: flex;\\n\\t\\t\\tflex-direction: column;\\n\\t\\t\\theight: 100%;\\n\\t\\t\\twidth: 100%;\\n\\t\\t}\\n\\t\\t.d2l-template-primary-secondary-content {\\n\\t\\t\\tdisplay: flex;\\n\\t\\t\\theight: 100%;\\n\\t\\t\\toverflow: hidden;\\n\\t\\t}\\n\\n\\t\\tmain {\\n\\t\\t\\tflex: 2 0 0;\\n\\t\\t\\toverflow-x: hidden;\\n\\t\\t\\ttransition: none;\\n\\t\\t}\\n\\t\\tmain d2l-form-error-summary {\\n\\t\\t\\tmargin-inline: var(--d2l-template-primary-secondary-form-error-inline-margin, 20px);\\n\\t\\t}\\n\\n\\t\\t:host([resizable]) main {\\n\\t\\t\\tflex: 1 0 0;\\n\\t\\t}\\n\\t\\t:host([primary-overflow=\\\"hidden\\\"]) main {\\n\\t\\t\\toverflow: hidden;\\n\\t\\t}\\n\\t\\t.d2l-template-primary-secondary-secondary-container {\\n\\t\\t\\tflex: 1 0 0;\\n\\t\\t\\tmin-width: ${desktopMinSize}px;\\n\\t\\t\\toverflow: hidden;\\n\\t\\t}\\n\\t\\t:host([resizable]) .d2l-template-primary-secondary-secondary-container {\\n\\t\\t\\tflex: none;\\n\\t\\t\\tmin-width: 0;\\n\\t\\t}\\n\\t\\t[data-animate-resize] .d2l-template-primary-secondary-secondary-container {\\n\\t\\t\\ttransition: width 400ms cubic-bezier(0, 0.7, 0.5, 1), height 400ms cubic-bezier(0, 0.7, 0.5, 1);\\n\\t\\t}\\n\\t\\t.d2l-template-primary-secondary-divider-shadow {\\n\\t\\t\\tdisplay: none;\\n\\t\\t}\\n\\t\\taside {\\n\\t\\t\\theight: 100%;\\n\\t\\t\\tmin-width: ${desktopMinSize}px;\\n\\t\\t\\toverflow-x: hidden;\\n\\t\\t\\toverflow-y: scroll;\\n\\t\\t\\twidth: 100%;\\n\\t\\t}\\n\\n\\t\\t/* prevent margin colapse on slotted children */\\n\\t\\taside::before,\\n\\t\\taside::after {\\n\\t\\t\\tcontent: \\\" \\\";\\n\\t\\t\\tdisplay: table;\\n\\t\\t}\\n\\t\\t[data-background-shading=\\\"primary\\\"] > main,\\n\\t\\t[data-background-shading=\\\"secondary\\\"] > .d2l-template-primary-secondary-secondary-container {\\n\\t\\t\\tbackground-color: var(--d2l-color-gypsum);\\n\\t\\t}\\n\\t\\t:host([resizable]) [data-is-collapsed] aside {\\n\\t\\t\\tvisibility: hidden;\\n\\t\\t}\\n\\t\\t:host([resizable]:not([secondary-first])) aside {\\n\\t\\t\\tfloat: inline-start;\\n\\t\\t}\\n\\t\\t.d2l-template-primary-secondary-divider,\\n\\t\\t.d2l-template-primary-secondary-divider-not-resizable {\\n\\t\\t\\tbackground-color: var(--d2l-color-mica);\\n\\t\\t\\tflex: none;\\n\\t\\t\\toutline: none;\\n\\t\\t\\tposition: relative;\\n\\t\\t\\twidth: 1px;\\n\\t\\t\\tz-index: 1;\\n\\t\\t}\\n\\t\\t.d2l-template-primary-secondary-divider-handle {\\n\\t\\t\\tdisplay: none;\\n\\t\\t\\tposition: absolute;\\n\\t\\t\\ttop: calc(50%);\\n\\t\\t\\twidth: 100%;\\n\\t\\t}\\n\\t\\t:host([resizable]) .d2l-template-primary-secondary-divider {\\n\\t\\t\\tbackground-color: var(--d2l-color-gypsum);\\n\\t\\t\\tcursor: ew-resize;\\n\\t\\t\\twidth: 0.45rem;\\n\\t\\t}\\n\\t\\t:host([resizable]) [data-is-expanded] .d2l-template-primary-secondary-divider {\\n\\t\\t\\tcursor: var(--d2l-cursor-resize-inline-end, e-resize);\\n\\t\\t}\\n\\t\\t:host([resizable]) [data-is-collapsed] .d2l-template-primary-secondary-divider {\\n\\t\\t\\tcursor: var(--d2l-cursor-resize-inline-start, w-resize);\\n\\t\\t}\\n\\t\\t:host([resizable]) .d2l-template-primary-secondary-divider-handle {\\n\\t\\t\\talign-items: center;\\n\\t\\t\\tdisplay: flex;\\n\\t\\t\\tjustify-content: center;\\n\\t\\t}\\n\\t\\t:host([resizable]) [data-background-shading=\\\"secondary\\\"] .d2l-template-primary-secondary-divider {\\n\\t\\t\\tbox-shadow: calc(1px * var(--d2l-length-factor, 1)) 0 0 0 rgba(0, 0, 0, 0.15);\\n\\t\\t}\\n\\t\\t:host([resizable]) [data-background-shading=\\\"primary\\\"] .d2l-template-primary-secondary-divider {\\n\\t\\t\\tbox-shadow: calc(-1px * var(--d2l-length-factor, 1)) 0 0 0 rgba(0, 0, 0, 0.15);\\n\\t\\t}\\n\\t\\t.d2l-template-primary-secondary-divider-handle-desktop {\\n\\t\\t\\talign-items: center;\\n\\t\\t\\tdisplay: flex;\\n\\t\\t\\tjustify-content: center;\\n\\t\\t\\tposition: absolute;\\n\\t\\t}\\n\\t\\t.d2l-template-primary-secondary-divider-handle-left,\\n\\t\\t.d2l-template-primary-secondary-divider-handle-right {\\n\\t\\t\\tcolor: var(--d2l-color-celestine);\\n\\t\\t\\tdisplay: none;\\n\\t\\t\\tposition: absolute;\\n\\t\\t}\\n\\t\\t.d2l-template-primary-secondary-divider-handle-left {\\n\\t\\t\\tinset-inline-start: -1rem;\\n\\t\\t}\\n\\t\\t.d2l-template-primary-secondary-divider-handle-right {\\n\\t\\t\\tinset-inline-end: -1rem;\\n\\t\\t}\\n\\t\\t.d2l-template-primary-secondary-divider-handle-line {\\n\\t\\t\\tdisplay: flex;\\n\\t\\t\\theight: 0.9rem;\\n\\t\\t\\tjustify-content: space-between;\\n\\t\\t\\twidth: 0.25rem;\\n\\t\\t}\\n\\t\\t.d2l-template-primary-secondary-divider-handle-line::before,\\n\\t\\t.d2l-template-primary-secondary-divider-handle-line::after {\\n\\t\\t\\tbackground-color: var(--d2l-color-galena);\\n\\t\\t\\tborder-radius: 0.05rem;\\n\\t\\t\\tcontent: \\\"\\\";\\n\\t\\t\\tdisplay: inline-block;\\n\\t\\t\\twidth: 0.1rem;\\n\\t\\t}\\n\\t\\t.d2l-template-primary-secondary-divider:${unsafeCSS(getFocusPseudoClass())} .d2l-template-primary-secondary-divider-handle-right,\\n\\t\\t.d2l-template-primary-secondary-divider:${unsafeCSS(getFocusPseudoClass())} .d2l-template-primary-secondary-divider-handle-left {\\n\\t\\t\\tdisplay: block;\\n\\t\\t}\\n\\t\\t:host(:not([secondary-first])) [data-is-expanded] .d2l-template-primary-secondary-divider-handle-left,\\n\\t\\t:host([secondary-first]) [data-is-expanded] .d2l-template-primary-secondary-divider-handle-right {\\n\\t\\t\\tdisplay: none;\\n\\t\\t}\\n\\t\\td2l-icon {\\n\\t\\t\\tdisplay: none;\\n\\t\\t}\\n\\n\\t\\tfooter {\\n\\t\\t\\tbackground-color: white;\\n\\t\\t\\tbox-shadow: 0 -2px 4px rgba(32, 33, 34, 0.2); /* ferrite */\\n\\t\\t\\tpadding: 0.75rem 1rem;\\n\\t\\t\\tz-index: 1; /* ensures the footer box-shadow is over main areas with background colours set */\\n\\t\\t}\\n\\t\\theader {\\n\\t\\t\\tz-index: 14; /* ensures the header box-shadow is over main areas with background colours set, and opt-in on top of sticky header */\\n\\t\\t}\\n\\n\\t\\t:host([resizable]) .d2l-template-primary-secondary-divider:focus,\\n\\t\\t:host([resizable]) .d2l-template-primary-secondary-divider:hover {\\n\\t\\t\\tbackground-color: var(--d2l-color-mica);\\n\\t\\t\\tbox-shadow: none;\\n\\t\\t}\\n\\t\\t:host([resizable]) .d2l-template-primary-secondary-divider:${unsafeCSS(getFocusPseudoClass())} {\\n\\t\\t\\tbackground-color: var(--d2l-color-celestine);\\n\\t\\t}\\n\\t\\t.d2l-template-primary-secondary-divider:focus .d2l-template-primary-secondary-divider-handle-line::before,\\n\\t\\t.d2l-template-primary-secondary-divider:focus .d2l-template-primary-secondary-divider-handle-line::after,\\n\\t\\t.d2l-template-primary-secondary-divider:hover .d2l-template-primary-secondary-divider-handle-line::before,\\n\\t\\t.d2l-template-primary-secondary-divider:hover .d2l-template-primary-secondary-divider-handle-line::after {\\n\\t\\t\\tbackground-color: var(--d2l-color-ferrite);\\n\\t\\t}\\n\\t\\t.d2l-template-primary-secondary-divider:${unsafeCSS(getFocusPseudoClass())} .d2l-template-primary-secondary-divider-handle-line::before,\\n\\t\\t.d2l-template-primary-secondary-divider:${unsafeCSS(getFocusPseudoClass())} .d2l-template-primary-secondary-divider-handle-line::after {\\n\\t\\t\\tbackground-color: white;\\n\\t\\t}\\n\\n\\t\\t.d2l-template-primary-secondary-divider,\\n\\t\\t.d2l-template-primary-secondary-divider-handle-mobile,\\n\\t\\t.d2l-template-primary-secondary-divider-handle-line::before,\\n\\t\\t.d2l-template-primary-secondary-divider-handle-line::after {\\n\\t\\t\\ttransition: background-color 100ms, box-shadow 100ms;\\n\\t\\t}\\n\\t\\t.d2l-template-primary-secondary-divider:hover,\\n\\t\\t.d2l-template-primary-secondary-divider:hover .d2l-template-primary-secondary-divider-handle-mobile,\\n\\t\\t.d2l-template-primary-secondary-divider:hover .d2l-template-primary-secondary-divider-handle-line::before,\\n\\t\\t.d2l-template-primary-secondary-divider:hover .d2l-template-primary-secondary-divider-handle-line::after {\\n\\t\\t\\ttransition-delay: 100ms;\\n\\t\\t}\\n\\n\\t\\t.d2l-template-scroll::-webkit-scrollbar {\\n\\t\\t\\twidth: 8px;\\n\\t\\t}\\n\\n\\t\\t.d2l-template-scroll::-webkit-scrollbar-track {\\n\\t\\t\\tbackground: rgba(255, 255, 255, 0.4);\\n\\t\\t}\\n\\n\\t\\t.d2l-template-scroll::-webkit-scrollbar-thumb {\\n\\t\\t\\tbackground: var(--d2l-color-galena);\\n\\t\\t\\tborder-radius: 4px;\\n\\t\\t}\\n\\n\\t\\t.d2l-template-scroll::-webkit-scrollbar-thumb:hover {\\n\\t\\t\\tbackground: var(--d2l-color-tungsten);\\n\\t\\t}\\n\\n\\t\\t/* For Firefox */\\n\\t\\t.d2l-template-scroll {\\n\\t\\t\\tscrollbar-color: var(--d2l-color-galena) rgba(255, 255, 255, 0.4);\\n\\t\\t\\tscrollbar-width: thin;\\n\\t\\t}\\n\\n\\t\\t@media (prefers-reduced-motion: reduce) {\\n\\t\\t\\t.d2l-template-primary-secondary-divider,\\n\\t\\t\\t.d2l-template-primary-secondary-divider-handle-line::before,\\n\\t\\t\\t.d2l-template-primary-secondary-divider-handle-line::after,\\n\\t\\t\\t.d2l-template-primary-secondary-divider-handle-mobile {\\n\\t\\t\\t\\ttransition: none;\\n\\t\\t\\t}\\n\\t\\t}\\n\\t\\t@media only screen and (max-width: 767px) {\\n\\n\\t\\t\\t.d2l-template-primary-secondary-content {\\n\\t\\t\\t\\tflex-direction: column;\\n\\t\\t\\t}\\n\\n\\t\\t\\tmain {\\n\\t\\t\\t\\tflex: 1 0 0;\\n\\t\\t\\t}\\n\\t\\t\\t.d2l-template-primary-secondary-secondary-container {\\n\\t\\t\\t\\tflex: none;\\n\\t\\t\\t}\\n\\t\\t\\taside,\\n\\t\\t\\t.d2l-template-primary-secondary-secondary-container {\\n\\t\\t\\t\\tmin-width: auto;\\n\\t\\t\\t}\\n\\t\\t\\t[data-is-collapsed] aside {\\n\\t\\t\\t\\tdisplay: none;\\n\\t\\t\\t}\\n\\n\\t\\t\\t.d2l-template-primary-secondary-divider-handle-desktop {\\n\\t\\t\\t\\tdisplay: none;\\n\\t\\t\\t}\\n\\n\\t\\t\\t:host([_static-footer]),\\n\\t\\t\\t:host([_static-footer]) > d2l-form {\\n\\t\\t\\t\\tbottom: unset;\\n\\t\\t\\t}\\n\\t\\t\\t:host([_static-footer]) .d2l-template-primary-secondary-container {\\n\\t\\t\\t\\tmin-height: 100vh;\\n\\t\\t\\t}\\n\\t\\t\\t:host([_static-footer]) .d2l-template-primary-secondary-content {\\n\\t\\t\\t\\tdisplay: grid;\\n\\t\\t\\t\\tflex-grow: 1;\\n\\t\\t\\t\\tgrid-template: 1fr auto auto / 1fr;\\n\\t\\t\\t}\\n\\t\\t\\t:host([_static-footer]) .d2l-template-primary-secondary-content > * {\\n\\t\\t\\t\\tgrid-column: 1/-1;\\n\\t\\t\\t}\\n\\t\\t\\t:host([_static-footer]) main {\\n\\t\\t\\t\\tgrid-row: 1 / -1;\\n\\t\\t\\t}\\n\\t\\t\\t:host([_static-footer]) .d2l-template-primary-secondary-divider {\\n\\t\\t\\t\\tgrid-row: 2 / 3;\\n\\t\\t\\t}\\n\\t\\t\\t:host([_static-footer]) .d2l-template-primary-secondary-secondary-container {\\n\\t\\t\\t\\tgrid-row: 3 / 4;\\n\\t\\t\\t}\\n\\t\\t\\t:host([_static-footer]) :not([data-background-shading=\\\"secondary\\\"]) > .d2l-template-primary-secondary-secondary-container {\\n\\t\\t\\t\\tbackground-color: white;\\n\\t\\t\\t}\\n\\n\\t\\t\\t/* Attribute selector is only used to increase specificity */\\n\\t\\t\\t:host([resizable]) .d2l-template-primary-secondary-divider,\\n\\t\\t\\t:host(:not([resizable])) .d2l-template-primary-secondary-divider {\\n\\t\\t\\t\\tbackground-color: var(--d2l-color-celestine);\\n\\t\\t\\t\\tcursor: ns-resize;\\n\\t\\t\\t\\theight: 0.1rem;\\n\\t\\t\\t\\twidth: 100%;\\n\\t\\t\\t}\\n\\t\\t\\t:host([resizable]) [data-is-collapsed] .d2l-template-primary-secondary-divider,\\n\\t\\t\\t:host(:not([resizable])) [data-is-collapsed] .d2l-template-primary-secondary-divider {\\n\\t\\t\\t\\tcursor: n-resize;\\n\\t\\t\\t}\\n\\t\\t\\t:host([resizable]) [data-is-expanded] .d2l-template-primary-secondary-divider,\\n\\t\\t\\t:host(:not([resizable])) [data-is-expanded] .d2l-template-primary-secondary-divider {\\n\\t\\t\\t\\tcursor: s-resize;\\n\\t\\t\\t}\\n\\n\\t\\t\\t/* Attribute selector is only used to increase specificity */\\n\\t\\t\\t:host([resizable]) .d2l-template-primary-secondary-divider:hover,\\n\\t\\t\\t:host(:not([resizable])) .d2l-template-primary-secondary-divider:hover,\\n\\t\\t\\t:host([resizable]) .d2l-template-primary-secondary-divider:focus,\\n\\t\\t\\t:host(:not([resizable])) .d2l-template-primary-secondary-divider:focus {\\n\\t\\t\\t\\tbackground-color: var(--d2l-color-celestine-minus-1);\\n\\t\\t\\t}\\n\\t\\t\\t.d2l-template-primary-secondary-divider-handle {\\n\\t\\t\\t\\tborder-radius: 0;\\n\\t\\t\\t\\tbottom: 0.1rem;\\n\\t\\t\\t\\tdisplay: block;\\n\\t\\t\\t\\tinset-inline-end: calc(17px + 0.2rem);\\n\\t\\t\\t\\toverflow: hidden;\\n\\t\\t\\t\\ttop: auto;\\n\\t\\t\\t}\\n\\t\\t\\t.d2l-template-primary-secondary-divider-handle-mobile {\\n\\t\\t\\t\\talign-items: center;\\n\\t\\t\\t\\tbackground-color: var(--d2l-color-celestine);\\n\\t\\t\\t\\tborder-radius: 0.25rem 0.25rem 0 0;\\n\\t\\t\\t\\tbottom: 0;\\n\\t\\t\\t\\tdisplay: flex;\\n\\t\\t\\t\\tjustify-content: center;\\n\\t\\t\\t\\tposition: absolute;\\n\\t\\t\\t\\tright: 0;\\n\\t\\t\\t}\\n\\t\\t\\t.d2l-template-primary-secondary-divider:hover .d2l-template-primary-secondary-divider-handle-mobile,\\n\\t\\t\\t.d2l-template-primary-secondary-divider:focus .d2l-template-primary-secondary-divider-handle-mobile {\\n\\t\\t\\t\\tbackground-color: var(--d2l-color-celestine-minus-1);\\n\\t\\t\\t}\\n\\t\\t\\t.d2l-template-primary-secondary-divider-handle,\\n\\t\\t\\t.d2l-template-primary-secondary-divider-handle-mobile {\\n\\t\\t\\t\\theight: 1rem;\\n\\t\\t\\t\\twidth: 2.2rem;\\n\\t\\t\\t}\\n\\t\\t\\t.d2l-template-primary-secondary-divider:${unsafeCSS(getFocusPseudoClass())} .d2l-template-primary-secondary-divider-handle {\\n\\t\\t\\t\\tbox-shadow: none;\\n\\t\\t\\t\\theight: 1.2rem;\\n\\t\\t\\t\\tinset-inline-end: 17px;\\n\\t\\t\\t\\twidth: 2.6rem;\\n\\t\\t\\t}\\n\\t\\t\\td2l-icon {\\n\\t\\t\\t\\tcolor: white;\\n\\t\\t\\t\\tdisplay: block;\\n\\t\\t\\t}\\n\\t\\t\\t${getFocusRingStyles(pseudoClass => `.d2l-template-primary-secondary-divider:${pseudoClass} .d2l-template-primary-secondary-divider-handle-mobile`, { extraStyles: css`right: 0.2rem; box-shadow: 0 0 0 2px #ffffff;` })}\\n\\t\\t\\t.d2l-template-primary-secondary-divider-shadow {\\n\\t\\t\\t\\tbox-shadow: 0 -2px 8px rgba(0, 0, 0, 0.25);\\n\\t\\t\\t\\tdisplay: block;\\n\\t\\t\\t\\theight: 100%;\\n\\t\\t\\t\\tposition: absolute;\\n\\t\\t\\t\\twidth: 100%;\\n\\t\\t\\t\\tz-index: -1;\\n\\t\\t\\t}\\n\\t\\t}\\n\\n\\t\\t@media print {\\n\\t\\t\\t:host {\\n\\t\\t\\t\\toverflow: visible;\\n\\t\\t\\t\\tposition: relative;\\n\\t\\t\\t}\\n\\n\\t\\t\\t.d2l-template-primary-secondary-content {\\n\\t\\t\\t\\tflex-direction: column;\\n\\t\\t\\t}\\n\\n\\t\\t\\t.d2l-template-primary-secondary-content,\\n\\t\\t\\t.d2l-template-primary-secondary-content > main,\\n\\t\\t\\t.d2l-template-primary-secondary-secondary-container {\\n\\t\\t\\t\\toverflow: visible;\\n\\t\\t\\t}\\n\\n\\t\\t\\t.d2l-template-primary-secondary-content > main {\\n\\t\\t\\t\\tbackground: none;\\n\\t\\t\\t}\\n\\n\\t\\t\\t.d2l-template-primary-secondary-divider-not-resizable,\\n\\t\\t\\t.d2l-template-primary-secondary-divider {\\n\\t\\t\\t\\tdisplay: none;\\n\\t\\t\\t}\\n\\n\\t\\t\\t.d2l-template-primary-secondary-container > footer {\\n\\t\\t\\t\\tbox-shadow: none;\\n\\t\\t\\t\\tpadding: 0;\\n\\t\\t\\t}\\n\\n\\t\\t\\t.d2l-template-primary-secondary-container,\\n\\t\\t\\t.d2l-template-primary-secondary-content {\\n\\t\\t\\t\\theight: auto;\\n\\t\\t\\t}\\n\\t\\t}\\n\\t`\""
18043
18043
  },
18044
18044
  {
18045
18045
  "name": "form"
package/helpers/dom.js CHANGED
@@ -57,6 +57,19 @@ export function findComposedAncestor(node, predicate) {
57
57
  return null;
58
58
  }
59
59
 
60
+ export function getScrollableAncestor(node) {
61
+ return findComposedAncestor(node, (el) => {
62
+ if (el.nodeType !== Node.ELEMENT_NODE) return false;
63
+ if (el === document.body) return true;
64
+ const styles = getComputedStyle(el);
65
+ const overflowY = styles.getPropertyValue('overflow-y');
66
+ const overflowX = styles.getPropertyValue('overflow-x');
67
+ const overflow = styles.getPropertyValue('overflow');
68
+ const overflowValues = ['auto', 'scroll'];
69
+ return (overflowValues.includes(overflowY) || overflowValues.includes(overflowX) || overflowValues.includes(overflow));
70
+ });
71
+ }
72
+
60
73
  export function getBoundingAncestor(node) {
61
74
  return findComposedAncestor(node, (node) => {
62
75
  if (node === document.body) return false;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@brightspace-ui/core",
3
- "version": "3.322.0",
3
+ "version": "3.324.0",
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",
@@ -12,6 +12,7 @@ import { LocalizeCoreElement } from '../../helpers/localize-core-element.js';
12
12
  import { styleMap } from 'lit/directives/style-map.js';
13
13
 
14
14
  const reduceMotion = matchMedia('(prefers-reduced-motion: reduce)').matches;
15
+ const desktopMinHeight = 3 * 44; // Primary/Secondary panels have a min-height of 1/3 of the viewport on mobile view. This threshhold prevents them from being smaller than the recommended WCAG Target size(AAA)
15
16
 
16
17
  const desktopMinSize = 320;
17
18
 
@@ -375,7 +376,7 @@ class MobileMouseResizer extends Resizer {
375
376
  this._wasCollapsed = this.isCollapsed;
376
377
  this.dispatchResizeStart();
377
378
  e.preventDefault();
378
- const y = e.clientY - this.contentRect.top;
379
+ const y = this.#getY(e);
379
380
  this._offset = y - (this.contentRect.height - this.panelSize);
380
381
  this._isDragging = false;
381
382
  this._isResizing = true;
@@ -387,7 +388,7 @@ class MobileMouseResizer extends Resizer {
387
388
  if (!this._isResizing) {
388
389
  return;
389
390
  }
390
- const y = e.clientY - this.contentRect.top;
391
+ const y = this.#getY(e);
391
392
  const secondaryHeight = this.clampMaxHeight(this.contentRect.height - y + this._offset);
392
393
  this._isDragging = true;
393
394
  this.dispatchResize(secondaryHeight, false);
@@ -399,7 +400,7 @@ class MobileMouseResizer extends Resizer {
399
400
  }
400
401
  const expandedCollapseThreshold = this.contentBounds.minHeight * 0.75;
401
402
  const collapsedCollapseThreshold = this.contentBounds.minHeight * 0.1;
402
- const y = e.clientY - this.contentRect.top;
403
+ const y = this.#getY(e);
403
404
  const desiredSecondaryHeight = this.contentRect.height - y + this._offset;
404
405
  if (
405
406
  this._isDragging
@@ -414,6 +415,9 @@ class MobileMouseResizer extends Resizer {
414
415
  this._isResizing = false;
415
416
  this.dispatchResizeEnd();
416
417
  }
418
+ #getY(e) {
419
+ return e.clientY + document.documentElement.scrollTop - this.contentRect.top;
420
+ }
417
421
 
418
422
  }
419
423
 
@@ -595,6 +599,7 @@ class TemplatePrimarySecondary extends LocalizeCoreElement(LitElement) {
595
599
  * @type {boolean}
596
600
  */
597
601
  hasForm: { type: Boolean, attribute: 'has-form' },
602
+ _staticFooter: { type: Boolean, attribute: '_static-footer', reflect: true },
598
603
  _formErrorSummary: { type: Array },
599
604
  _hasFooter: { state: true },
600
605
  _isCollapsed: { state: true },
@@ -867,6 +872,35 @@ class TemplatePrimarySecondary extends LocalizeCoreElement(LitElement) {
867
872
  .d2l-template-primary-secondary-divider-handle-desktop {
868
873
  display: none;
869
874
  }
875
+
876
+ :host([_static-footer]),
877
+ :host([_static-footer]) > d2l-form {
878
+ bottom: unset;
879
+ }
880
+ :host([_static-footer]) .d2l-template-primary-secondary-container {
881
+ min-height: 100vh;
882
+ }
883
+ :host([_static-footer]) .d2l-template-primary-secondary-content {
884
+ display: grid;
885
+ flex-grow: 1;
886
+ grid-template: 1fr auto auto / 1fr;
887
+ }
888
+ :host([_static-footer]) .d2l-template-primary-secondary-content > * {
889
+ grid-column: 1/-1;
890
+ }
891
+ :host([_static-footer]) main {
892
+ grid-row: 1 / -1;
893
+ }
894
+ :host([_static-footer]) .d2l-template-primary-secondary-divider {
895
+ grid-row: 2 / 3;
896
+ }
897
+ :host([_static-footer]) .d2l-template-primary-secondary-secondary-container {
898
+ grid-row: 3 / 4;
899
+ }
900
+ :host([_static-footer]) :not([data-background-shading="secondary"]) > .d2l-template-primary-secondary-secondary-container {
901
+ background-color: white;
902
+ }
903
+
870
904
  /* Attribute selector is only used to increase specificity */
871
905
  :host([resizable]) .d2l-template-primary-secondary-divider,
872
906
  :host(:not([resizable])) .d2l-template-primary-secondary-divider {
@@ -1009,6 +1043,7 @@ class TemplatePrimarySecondary extends LocalizeCoreElement(LitElement) {
1009
1043
  this.widthType = 'fullscreen';
1010
1044
 
1011
1045
  this._animateResize = false;
1046
+ this._staticFooter = false;
1012
1047
  this._isCollapsed = false;
1013
1048
  this._isExpanded = false;
1014
1049
  this._isMobile = isMobile();
@@ -1151,11 +1186,13 @@ class TemplatePrimarySecondary extends LocalizeCoreElement(LitElement) {
1151
1186
  this.shadowRoot.querySelector('.d2l-template-primary-secondary-divider-not-resizable');
1152
1187
  const desktopDividerSize = divider.offsetWidth;
1153
1188
  const mobileDividerSize = divider.offsetHeight;
1189
+ const footerSize = this.shadowRoot.querySelector('footer')?.offsetHeight ?? 0;
1190
+ const maxAvailableHeight = !this._staticFooter ? contentRect.height : Math.min(contentRect.height, window.innerHeight - footerSize);
1154
1191
  return {
1155
1192
  height: contentRect.height,
1156
1193
  minWidth: desktopMinSize,
1157
1194
  maxWidth: contentRect.width - desktopMinSize - desktopDividerSize,
1158
- minHeight: (contentRect.height - mobileDividerSize) * (1 / 3),
1195
+ minHeight: (maxAvailableHeight - mobileDividerSize) * (1 / 3),
1159
1196
  maxHeight: (contentRect.height - mobileDividerSize) * (2 / 3),
1160
1197
  width: contentRect.width
1161
1198
  };
@@ -1173,6 +1210,9 @@ class TemplatePrimarySecondary extends LocalizeCoreElement(LitElement) {
1173
1210
  _onContentResize(entries) {
1174
1211
  const entry = entries[0];
1175
1212
  const contentRect = entry.target.getBoundingClientRect();
1213
+ const footerSize = this.shadowRoot.querySelector('footer')?.offsetHeight ?? 0;
1214
+ const headerSize = this.shadowRoot.querySelector('header')?.offsetHeight ?? 0;
1215
+ this._staticFooter = window.innerHeight - footerSize - headerSize < desktopMinHeight;
1176
1216
  this._contentBounds = this._computeContentBounds(contentRect);
1177
1217
  this._isMobile = isMobile();
1178
1218