@brightspace-ui/core 3.308.0 → 3.308.1

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.
@@ -382,7 +382,7 @@ Load-More paging functionality can be implemented in lists by placing a `d2l-pag
382
382
 
383
383
  ## Drag & Drop Lists
384
384
 
385
- The `d2l-list` supports drag & drop.
385
+ The `d2l-list` supports drag & drop, in both `list` and `tiles` layout.
386
386
 
387
387
  The `d2l-list` is simply a rendering component, so there is some light work involved in hooking up this behaviour. In order for items to be draggable, they must have their `draggable` and `key` attributes set. Optionally, the `drop-nested` attribute can be applied to items to indicate whether other items can be dropped as nested children on the item.
388
388
 
@@ -394,7 +394,7 @@ If an item is draggable, the `drag-handle-text` attribute should be used to prov
394
394
 
395
395
  ### Example
396
396
 
397
- <!-- docs: demo code display:block autoSize:false size:medium sandboxTitle:'List - Drag & Drop'-->
397
+ <!-- docs: demo code display:block sandboxTitle:'List - Drag & Drop'-->
398
398
  ```html
399
399
  <script type="module">
400
400
  import '@brightspace-ui/core/components/list/list.js';
@@ -404,11 +404,13 @@ If an item is draggable, the `drag-handle-text` attribute should be used to prov
404
404
 
405
405
  class ListDemoDragAndDropUsage extends LitElement {
406
406
  static properties = {
407
+ layout: { type: String },
407
408
  list: { type: Array }
408
409
  };
409
410
 
410
411
  constructor() {
411
412
  super();
413
+ this.layout = 'list';
412
414
  this.list = [
413
415
  { key: '1', content: 'Initially first list item' },
414
416
  { key: '2', content: 'Initially second list item' },
@@ -429,7 +431,7 @@ If an item is draggable, the `drag-handle-text` attribute should be used to prov
429
431
  });
430
432
 
431
433
  return html`
432
- <d2l-list @d2l-list-item-position-change="${this._moveItems}">
434
+ <d2l-list layout="${this.layout}" @d2l-list-item-position-change="${this._moveItems}">
433
435
  ${listItems}
434
436
  </d2l-list>
435
437
  `;
@@ -443,6 +445,7 @@ If an item is draggable, the `drag-handle-text` attribute should be used to prov
443
445
  customElements.define('d2l-my-drag-drop-elem', ListDemoDragAndDropUsage);
444
446
  </script>
445
447
  <d2l-my-drag-drop-elem></d2l-my-drag-drop-elem>
448
+ <d2l-my-drag-drop-elem layout="tiles" style="display: flex; justify-content: center; margin-top: 1.5rem;"></d2l-my-drag-drop-elem>
446
449
  ```
447
450
 
448
451
  #### Draggable lists with interactive content
@@ -801,7 +804,7 @@ The example below also includes expand/collapse behavior in order to expand or c
801
804
 
802
805
  The `d2l-list` component supports displaying items in a tile layout. The built-in rendering will take care of laying out the illustration, selection, secondary actions, and color indicators for each item in either the `list` (default) or `tiles` layout. To display items in a tile layout, set the `d2l-list`'s `layout` property to `tiles`.
803
806
 
804
- **Note:** Nested lists, separators, and drag & drop are not supported in the tile layout.
807
+ **Note:** Nested lists and separators are not supported in the tile layout.
805
808
 
806
809
  <!-- docs: demo code display:block autoSize:true sandboxTitle:'List - Tile Layout'-->
807
810
  ```html
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@brightspace-ui/core",
3
- "version": "3.308.0",
3
+ "version": "3.308.1",
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",