@brightspace-ui/core 3.315.0 → 3.316.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.
@@ -72,6 +72,11 @@ class PageDivider extends FocusMixin(PropertyRequiredMixin(LitElement)) {
72
72
  * @type {number}
73
73
  */
74
74
  currentSize: { type: Number, attribute: 'current-size' },
75
+ /**
76
+ * Whether to force-hide the directional arrows
77
+ * @type {boolean}
78
+ */
79
+ hideArrows: { type: Boolean, attribute: 'hide-arrows' },
75
80
  /**
76
81
  * REQUIRED: label for the divider
77
82
  * @type {string}
@@ -228,6 +233,7 @@ class PageDivider extends FocusMixin(PropertyRequiredMixin(LitElement)) {
228
233
  this.collapsed = false;
229
234
  this.collapsedSize = 0;
230
235
  this.currentSize = 0;
236
+ this.hideArrows = false;
231
237
  this.label = '';
232
238
  this.maxSize = 0;
233
239
  this.minSize = 0;
@@ -258,7 +264,7 @@ class PageDivider extends FocusMixin(PropertyRequiredMixin(LitElement)) {
258
264
 
259
265
  return html`
260
266
  <div class="${classMap(dividerClasses)}" @click="${this.#handleClick}" @pointerdown="${this.#handlePointerDown}">
261
- ${this.panelType === 'panel' ? html`
267
+ ${this.panelType === 'panel' && !this.hideArrows ? html`
262
268
  <div class="divider-arrow start" data-position="start" ?hidden="${!showStartArrow}">
263
269
  <d2l-icon-custom size="tier1">${ICON_ARROW_COLLAPSE_LEFT}</d2l-icon-custom>
264
270
  </div>
@@ -27,6 +27,8 @@ const MOBILE_MODE_BREAKPOINT = 767;
27
27
  const overlayModeQuery = window.matchMedia(`(max-width: ${OVERLAY_MODE_BREAKPOINT}px)`);
28
28
  const mobileModeQuery = window.matchMedia(`(max-width: ${MOBILE_MODE_BREAKPOINT}px)`);
29
29
 
30
+ export const HIDE_ARROWS_BREAKPOINT = 400;
31
+
30
32
  class PanelStateController {
31
33
  constructor(host, panelConfigs) {
32
34
  this.#host = host;
@@ -594,6 +596,7 @@ class Page extends ProviderMixin(LocalizeCoreElement(LitElement)) {
594
596
  max-size="${this._panelState.getMaxSize(panelKey)}"
595
597
  min-size="${this._panelState.getMinSize(panelKey)}"
596
598
  panel-position="${ifDefined(panelPosition)}"
599
+ ?hide-arrows="${this._contentWidth < HIDE_ARROWS_BREAKPOINT}"
597
600
  @d2l-page-divider-resize="${this.#handleDividerResize}"
598
601
  @d2l-page-divider-resize-live="${this.#handleDividerResizeLive}"
599
602
  @d2l-page-divider-toggle="${this.#handleDividerToggle}"
@@ -13366,6 +13366,12 @@
13366
13366
  "type": "number",
13367
13367
  "default": "0"
13368
13368
  },
13369
+ {
13370
+ "name": "hide-arrows",
13371
+ "description": "Whether to force-hide the directional arrows",
13372
+ "type": "boolean",
13373
+ "default": "false"
13374
+ },
13369
13375
  {
13370
13376
  "name": "label",
13371
13377
  "description": "REQUIRED: label for the divider",
@@ -13428,6 +13434,13 @@
13428
13434
  "type": "number",
13429
13435
  "default": "0"
13430
13436
  },
13437
+ {
13438
+ "name": "hideArrows",
13439
+ "attribute": "hide-arrows",
13440
+ "description": "Whether to force-hide the directional arrows",
13441
+ "type": "boolean",
13442
+ "default": "false"
13443
+ },
13431
13444
  {
13432
13445
  "name": "label",
13433
13446
  "attribute": "label",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@brightspace-ui/core",
3
- "version": "3.315.0",
3
+ "version": "3.316.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",