@brightspace-ui/core 3.267.1 → 3.268.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.
Files changed (113) hide show
  1. package/components/alert/alert-toast.js +98 -102
  2. package/components/alert/alert.js +109 -113
  3. package/components/backdrop/backdrop-dirty-overlay.js +13 -17
  4. package/components/backdrop/backdrop-loading.js +105 -109
  5. package/components/backdrop/backdrop.js +50 -54
  6. package/components/breadcrumbs/breadcrumb-current-page.js +19 -23
  7. package/components/breadcrumbs/breadcrumb.js +50 -54
  8. package/components/breadcrumbs/breadcrumbs.js +34 -38
  9. package/components/button/button-add.js +156 -164
  10. package/components/button/button-copy-mixin.js +9 -11
  11. package/components/button/button-copy.js +15 -19
  12. package/components/button/button-icon.js +110 -114
  13. package/components/button/button-move.js +153 -157
  14. package/components/button/button-split-item.js +16 -20
  15. package/components/button/button-split.js +70 -74
  16. package/components/button/button-subtle-copy.js +17 -19
  17. package/components/button/button-subtle.js +145 -149
  18. package/components/button/button-toggle.js +25 -29
  19. package/components/button/button.js +70 -74
  20. package/components/button/floating-buttons.js +63 -67
  21. package/components/calendar/calendar.js +244 -248
  22. package/components/card/card-content-meta.js +13 -15
  23. package/components/card/card-content-title.js +9 -11
  24. package/components/card/card-footer-link.js +76 -80
  25. package/components/card/card-loading-shimmer.js +35 -39
  26. package/components/card/card.js +188 -192
  27. package/components/collapsible-panel/collapsible-panel-group.js +17 -21
  28. package/components/collapsible-panel/collapsible-panel-summary-item.js +27 -31
  29. package/components/collapsible-panel/collapsible-panel.js +258 -262
  30. package/components/count-badge/count-badge-icon.js +12 -16
  31. package/components/count-badge/count-badge-mixin.js +124 -128
  32. package/components/count-badge/count-badge.js +2 -4
  33. package/components/description-list/description-list-wrapper.js +27 -31
  34. package/components/dialog/dialog-confirm.js +55 -59
  35. package/components/dialog/dialog-fullscreen.js +128 -132
  36. package/components/dialog/dialog-mixin.js +39 -41
  37. package/components/dialog/dialog.js +61 -65
  38. package/components/dropdown/dropdown-button-subtle.js +21 -25
  39. package/components/dropdown/dropdown-button.js +31 -35
  40. package/components/dropdown/dropdown-context-menu.js +28 -31
  41. package/components/dropdown/dropdown-menu.js +27 -31
  42. package/components/dropdown/dropdown-more.js +23 -26
  43. package/components/dropdown/dropdown-opener-mixin.js +44 -46
  44. package/components/dropdown/dropdown-popover-mixin.js +155 -159
  45. package/components/dropdown/dropdown-tabs.js +5 -7
  46. package/components/dropdown/dropdown.js +1 -3
  47. package/components/empty-state/empty-state-action-button.js +18 -22
  48. package/components/empty-state/empty-state-action-link.js +14 -18
  49. package/components/empty-state/empty-state-illustrated.js +21 -25
  50. package/components/empty-state/empty-state-simple.js +8 -12
  51. package/components/expand-collapse/expand-collapse-content.js +48 -52
  52. package/components/filter/filter-dimension-set-date-text-value.js +34 -36
  53. package/components/filter/filter-dimension-set-date-time-range-value.js +45 -47
  54. package/components/filter/filter-dimension-set-empty-state.js +17 -19
  55. package/components/filter/filter-dimension-set-value.js +27 -29
  56. package/components/filter/filter-dimension-set.js +65 -67
  57. package/components/filter/filter-overflow-group.js +15 -19
  58. package/components/filter/filter-tags.js +16 -19
  59. package/components/filter/filter.js +115 -119
  60. package/components/focus-trap/focus-trap.js +17 -21
  61. package/components/form/form-element-mixin.js +33 -35
  62. package/components/form/form-error-summary.js +37 -42
  63. package/components/form/form.js +33 -37
  64. package/components/hierarchical-view/hierarchical-view-mixin.js +76 -80
  65. package/components/hierarchical-view/hierarchical-view.js +5 -7
  66. package/components/html-block/html-block.js +45 -49
  67. package/components/icons/icon-custom.js +20 -24
  68. package/components/icons/icon.js +20 -24
  69. package/components/icons/slotted-icon-mixin.js +16 -18
  70. package/components/inputs/input-checkbox-group.js +34 -38
  71. package/components/inputs/input-checkbox.js +106 -110
  72. package/components/inputs/input-color.js +142 -148
  73. package/components/inputs/input-date-range.js +90 -94
  74. package/components/inputs/input-date-time-range-to.js +70 -74
  75. package/components/inputs/input-date-time-range.js +110 -115
  76. package/components/inputs/input-date-time.js +75 -79
  77. package/components/inputs/input-date.js +101 -105
  78. package/components/inputs/input-fieldset.js +37 -43
  79. package/components/inputs/input-group.js +10 -12
  80. package/components/inputs/input-inline-help.js +4 -6
  81. package/components/inputs/input-number.js +112 -118
  82. package/components/inputs/input-percent.js +52 -58
  83. package/components/inputs/input-radio-group.js +45 -49
  84. package/components/inputs/input-radio-spacer.js +11 -13
  85. package/components/inputs/input-radio.js +62 -66
  86. package/components/inputs/input-search.js +63 -68
  87. package/components/inputs/input-select-styles.js +30 -25
  88. package/components/inputs/input-text.js +245 -251
  89. package/components/inputs/input-textarea.js +128 -132
  90. package/components/inputs/input-time-range.js +100 -104
  91. package/components/inputs/input-time.js +107 -113
  92. package/components/link/link-mixin.js +37 -41
  93. package/components/link/link.js +113 -119
  94. package/components/list/list-controls.js +25 -29
  95. package/components/list/list-item-button-mixin.js +10 -12
  96. package/components/list/list-item-checkbox-mixin.js +35 -37
  97. package/components/list/list-item-content.js +33 -35
  98. package/components/list/list-item-drag-drop-mixin.js +45 -47
  99. package/components/list/list-item-drag-handle.js +80 -84
  100. package/components/list/list-item-drag-image.js +77 -81
  101. package/components/list/list-item-expand-collapse-mixin.js +17 -19
  102. package/components/list/list-item-generic-layout.js +222 -226
  103. package/components/list/list-item-link-mixin.js +10 -12
  104. package/components/list/list-item-mixin.js +68 -70
  105. package/components/list/list-item-nav-mixin.js +17 -19
  106. package/components/list/list-item-placement-marker.js +65 -67
  107. package/components/list/list-item-role-mixin.js +9 -11
  108. package/components/list/list-item.js +7 -9
  109. package/components/list/list.js +121 -125
  110. package/components/loading-spinner/loading-spinner.js +93 -97
  111. package/custom-elements.json +1920 -6694
  112. package/helpers/focus.js +5 -1
  113. package/package.json +3 -2
@@ -63,79 +63,77 @@ export const ListItemMixin = superclass => class extends composeMixins(
63
63
  ListItemRoleMixin,
64
64
  SkeletonMixin) {
65
65
 
66
- static get properties() {
67
- return {
68
- /**
69
- * A color indicator to appear at the beginning of a list item. Expected value is a valid 3, 4, 6, or 8 character CSS color hex code (e.g., #006fbf).
70
- * @type {string}
71
- */
72
- color: { type: String },
73
- /**
74
- * @ignore
75
- */
76
- first: { type: Boolean, reflect: true },
77
- /**
78
- * Whether to allow the drag target to be the handle only rather than the entire cell
79
- * @type {boolean}
80
- */
81
- dragTargetHandleOnly: { type: Boolean, attribute: 'drag-target-handle-only' },
82
- /**
83
- * Inline start padding (in px) to apply to list item(s) in the nested slot. When used, nested list items will not use the grid start calcuations and will only use this number to determine indentation.
84
- * @type {number}
85
- */
86
- indentation: { type: Number, reflect: true },
87
- /**
88
- * @ignore
89
- */
90
- last: { type: Boolean, reflect: true },
91
- /**
92
- * @ignore
93
- */
94
- layout: { type: String, reflect: true },
95
- /**
96
- * Whether to disable rendering the entire item as the primary action. Required if slotted content is interactive.
97
- * @type {boolean}
98
- */
99
- noPrimaryAction: { type: Boolean, attribute: 'no-primary-action' },
100
- /**
101
- * How much padding to render in standard/normal list items
102
- * @type {'normal'|'none'}
103
- */
104
- paddingType: { type: String, attribute: 'padding-type' },
105
- /**
106
- * Whether to disable rendering the entire item as the primary action. Required if slotted content is interactive.
107
- * @type {boolean}
108
- */
109
- tileHeader: { type: Boolean, reflect: true, attribute: 'tile-header' },
110
- /**
111
- * How much padding to render in tile list items
112
- * @type {'normal'|'none'}
113
- * @default "normal"
114
- */
115
- tilePaddingType: { type: String, attribute: 'tile-padding-type' },
116
- _addButtonText: { state: true },
117
- _displayKeyboardTooltip: { type: Boolean },
118
- _hasColorSlot: { type: Boolean, reflect: true, attribute: '_has-color-slot' },
119
- _hasListItemContent: { state: true },
120
- _hasNestedList: { type: Boolean, reflect: true, attribute: '_has-nested-list' },
121
- _hasNestedListAddButton: { type: Boolean, reflect: true, attribute: '_has-nested-list-add-button' },
122
- _hovering: { type: Boolean, reflect: true },
123
- _hoveringControl: { type: Boolean, attribute: '_hovering-control', reflect: true },
124
- _hoveringPrimaryAction: { type: Boolean, attribute: '_hovering-primary-action', reflect: true },
125
- _focusing: { type: Boolean, reflect: true },
126
- _focusingPrimaryAction: { type: Boolean, attribute: '_focusing-primary-action', reflect: true },
127
- _forceShowSelection: { type: Boolean, attribute: '_force-show-selection', reflect: true },
128
- _highlight: { type: Boolean, reflect: true },
129
- _highlighting: { type: Boolean, reflect: true },
130
- _showAddButton: { type: Boolean, attribute: '_show-add-button', reflect: true },
131
- _selectionWhenInteracted: { type: Boolean, attribute: '_selection-when-interacted', reflect: true },
132
- _siblingHasColor: { state: true },
133
- };
134
- }
66
+ static properties = {
67
+ /**
68
+ * A color indicator to appear at the beginning of a list item. Expected value is a valid 3, 4, 6, or 8 character CSS color hex code (e.g., #006fbf).
69
+ * @type {string}
70
+ */
71
+ color: { type: String },
72
+ /**
73
+ * @ignore
74
+ */
75
+ first: { type: Boolean, reflect: true },
76
+ /**
77
+ * Whether to allow the drag target to be the handle only rather than the entire cell
78
+ * @type {boolean}
79
+ */
80
+ dragTargetHandleOnly: { type: Boolean, attribute: 'drag-target-handle-only' },
81
+ /**
82
+ * Inline start padding (in px) to apply to list item(s) in the nested slot. When used, nested list items will not use the grid start calcuations and will only use this number to determine indentation.
83
+ * @type {number}
84
+ */
85
+ indentation: { type: Number, reflect: true },
86
+ /**
87
+ * @ignore
88
+ */
89
+ last: { type: Boolean, reflect: true },
90
+ /**
91
+ * @ignore
92
+ */
93
+ layout: { type: String, reflect: true },
94
+ /**
95
+ * Whether to disable rendering the entire item as the primary action. Required if slotted content is interactive.
96
+ * @type {boolean}
97
+ */
98
+ noPrimaryAction: { type: Boolean, attribute: 'no-primary-action' },
99
+ /**
100
+ * How much padding to render in standard/normal list items
101
+ * @type {'normal'|'none'}
102
+ */
103
+ paddingType: { type: String, attribute: 'padding-type' },
104
+ /**
105
+ * Whether to disable rendering the entire item as the primary action. Required if slotted content is interactive.
106
+ * @type {boolean}
107
+ */
108
+ tileHeader: { type: Boolean, reflect: true, attribute: 'tile-header' },
109
+ /**
110
+ * How much padding to render in tile list items
111
+ * @type {'normal'|'none'}
112
+ * @default "normal"
113
+ */
114
+ tilePaddingType: { type: String, attribute: 'tile-padding-type' },
115
+ _addButtonText: { state: true },
116
+ _displayKeyboardTooltip: { type: Boolean },
117
+ _hasColorSlot: { type: Boolean, reflect: true, attribute: '_has-color-slot' },
118
+ _hasListItemContent: { state: true },
119
+ _hasNestedList: { type: Boolean, reflect: true, attribute: '_has-nested-list' },
120
+ _hasNestedListAddButton: { type: Boolean, reflect: true, attribute: '_has-nested-list-add-button' },
121
+ _hovering: { type: Boolean, reflect: true },
122
+ _hoveringControl: { type: Boolean, attribute: '_hovering-control', reflect: true },
123
+ _hoveringPrimaryAction: { type: Boolean, attribute: '_hovering-primary-action', reflect: true },
124
+ _focusing: { type: Boolean, reflect: true },
125
+ _focusingPrimaryAction: { type: Boolean, attribute: '_focusing-primary-action', reflect: true },
126
+ _forceShowSelection: { type: Boolean, attribute: '_force-show-selection', reflect: true },
127
+ _highlight: { type: Boolean, reflect: true },
128
+ _highlighting: { type: Boolean, reflect: true },
129
+ _showAddButton: { type: Boolean, attribute: '_show-add-button', reflect: true },
130
+ _selectionWhenInteracted: { type: Boolean, attribute: '_selection-when-interacted', reflect: true },
131
+ _siblingHasColor: { state: true },
132
+ };
135
133
 
136
134
  static get styles() {
137
135
 
138
- const styles = [ css`
136
+ const styles = [css`
139
137
  :host {
140
138
  display: block;
141
139
  position: relative;
@@ -4,27 +4,25 @@ import { ListItemLinkMixin } from './list-item-link-mixin.js';
4
4
 
5
5
  export const ListItemNavMixin = superclass => class extends ListItemLinkMixin(superclass) {
6
6
 
7
- static get properties() {
8
- return {
9
- /**
10
- * Whether the list item is the current page in a navigation context. At most one list item should have the `current` attribute at any time; this will be managed by the `list` after initial render.
11
- * @type {boolean}
12
- */
13
- current: { type: Boolean, reflect: true },
14
- /**
15
- * Whether to prevent the default navigation behavior of the link
16
- * @type {boolean}
17
- */
18
- preventNavigation: { type: Boolean, attribute: 'prevent-navigation' },
19
- _childCurrent: { type: Boolean, reflect: true, attribute: '_child-current' },
20
- _hasCurrentParent: { type: Boolean, reflect: true, attribute: '_has-current-parent' },
21
- _nextSiblingCurrent: { type: Boolean, reflect: true, attribute: '_next-sibling-current' },
22
- };
23
- }
7
+ static properties = {
8
+ /**
9
+ * Whether the list item is the current page in a navigation context. At most one list item should have the `current` attribute at any time; this will be managed by the `list` after initial render.
10
+ * @type {boolean}
11
+ */
12
+ current: { type: Boolean, reflect: true },
13
+ /**
14
+ * Whether to prevent the default navigation behavior of the link
15
+ * @type {boolean}
16
+ */
17
+ preventNavigation: { type: Boolean, attribute: 'prevent-navigation' },
18
+ _childCurrent: { type: Boolean, reflect: true, attribute: '_child-current' },
19
+ _hasCurrentParent: { type: Boolean, reflect: true, attribute: '_has-current-parent' },
20
+ _nextSiblingCurrent: { type: Boolean, reflect: true, attribute: '_next-sibling-current' },
21
+ };
24
22
 
25
23
  static get styles() {
26
24
 
27
- const styles = [ css`
25
+ const styles = [css`
28
26
  :host([action-href]:not([action-href=""])) {
29
27
  --d2l-list-item-content-text-color: var(--d2l-color-ferrite);
30
28
  }
@@ -65,7 +63,7 @@ export const ListItemNavMixin = superclass => class extends ListItemLinkMixin(su
65
63
  :host([current]) .d2l-list-item-color-outer {
66
64
  padding-block: 3px;
67
65
  }
68
- ` ];
66
+ `];
69
67
 
70
68
  super.styles && styles.unshift(super.styles);
71
69
  return styles;
@@ -7,73 +7,71 @@ class ListItemPlacementMarker extends LitElement {
7
7
  vertical: { type: Boolean, reflect: true }
8
8
  };
9
9
 
10
- static get styles() {
11
- return css`
12
- :host {
13
- display: block;
14
- }
15
-
16
- :host([vertical]) {
17
- height: 100%;
18
- }
19
-
20
- :host([hidden]) {
21
- display: none;
22
- }
23
-
24
- :host([vertical]) .d2l-list-drag-marker-line {
25
- height: 100%;
26
- margin: -1px 0;
27
- width: 12px;
28
- }
29
-
30
- .d2l-list-drag-marker-line {
31
- height: 12px;
32
- margin-inline: -1px;
33
- stroke: var(--d2l-color-celestine);
34
- stroke-width: 3px;
35
- width: 100%;
36
- }
37
-
38
- :host([vertical]) .d2l-list-drag-marker-linecap {
39
- height: 4px;
40
- margin-inline: 0 -2px;
41
- width: 12px;
42
- }
43
-
44
- .d2l-list-drag-marker-linecap {
45
- fill: var(--d2l-color-celestine);
46
- height: 12px;
47
- margin-inline: -1px 0;
48
- stroke: none;
49
- width: 4px;
50
- }
51
-
52
- :host([vertical]) .d2l-list-drag-marker-circle {
53
- margin-inline: 0 0;
54
- }
55
-
56
-
57
- .d2l-list-drag-marker-circle {
58
- fill: none;
59
- height: 12px;
60
- margin-inline: 0 -1px;
61
- stroke: var(--d2l-color-celestine);
62
- stroke-width: 3px;
63
- width: 12px;
64
- }
65
-
66
- .d2l-list-drag-marker {
67
- display: flex;
68
- flex-wrap: nowrap;
69
- }
70
-
71
- :host([vertical]) .d2l-list-drag-marker {
72
- flex-direction: column;
73
- height: 100%;
74
- }
75
- `;
76
- }
10
+ static styles = css`
11
+ :host {
12
+ display: block;
13
+ }
14
+
15
+ :host([vertical]) {
16
+ height: 100%;
17
+ }
18
+
19
+ :host([hidden]) {
20
+ display: none;
21
+ }
22
+
23
+ :host([vertical]) .d2l-list-drag-marker-line {
24
+ height: 100%;
25
+ margin: -1px 0;
26
+ width: 12px;
27
+ }
28
+
29
+ .d2l-list-drag-marker-line {
30
+ height: 12px;
31
+ margin-inline: -1px;
32
+ stroke: var(--d2l-color-celestine);
33
+ stroke-width: 3px;
34
+ width: 100%;
35
+ }
36
+
37
+ :host([vertical]) .d2l-list-drag-marker-linecap {
38
+ height: 4px;
39
+ margin-inline: 0 -2px;
40
+ width: 12px;
41
+ }
42
+
43
+ .d2l-list-drag-marker-linecap {
44
+ fill: var(--d2l-color-celestine);
45
+ height: 12px;
46
+ margin-inline: -1px 0;
47
+ stroke: none;
48
+ width: 4px;
49
+ }
50
+
51
+ :host([vertical]) .d2l-list-drag-marker-circle {
52
+ margin-inline: 0 0;
53
+ }
54
+
55
+
56
+ .d2l-list-drag-marker-circle {
57
+ fill: none;
58
+ height: 12px;
59
+ margin-inline: 0 -1px;
60
+ stroke: var(--d2l-color-celestine);
61
+ stroke-width: 3px;
62
+ width: 12px;
63
+ }
64
+
65
+ .d2l-list-drag-marker {
66
+ display: flex;
67
+ flex-wrap: nowrap;
68
+ }
69
+
70
+ :host([vertical]) .d2l-list-drag-marker {
71
+ flex-direction: column;
72
+ height: 100%;
73
+ }
74
+ `;
77
75
 
78
76
  constructor() {
79
77
  super();
@@ -2,17 +2,15 @@ import { findComposedAncestor } from '../../helpers/dom.js';
2
2
 
3
3
  export const ListItemRoleMixin = superclass => class extends superclass {
4
4
 
5
- static get properties() {
6
- return {
7
- /**
8
- * @ignore
9
- */
10
- // eslint-disable-next-line lit/no-native-attributes
11
- role: { type: String, reflect: true },
12
- _nested: { type: Boolean, reflect: true },
13
- _separators: { type: String, reflect: true }
14
- };
15
- }
5
+ static properties = {
6
+ /**
7
+ * @ignore
8
+ */
9
+ // eslint-disable-next-line lit/no-native-attributes
10
+ role: { type: String, reflect: true },
11
+ _nested: { type: Boolean, reflect: true },
12
+ _separators: { type: String, reflect: true }
13
+ };
16
14
 
17
15
  constructor() {
18
16
  super();
@@ -10,15 +10,13 @@ import { LitElement } from 'lit';
10
10
  */
11
11
  class ListItem extends ListItemLinkMixin(LitElement) {
12
12
 
13
- static get properties() {
14
- return {
15
- /**
16
- * Address of item link if navigable
17
- * @type {string}
18
- */
19
- href: { type: String }
20
- };
21
- }
13
+ static properties = {
14
+ /**
15
+ * Address of item link if navigable
16
+ * @type {string}
17
+ */
18
+ href: { type: String }
19
+ };
22
20
 
23
21
  get href() {
24
22
  return this.actionHref;
@@ -35,134 +35,130 @@ const ro = new ResizeObserver(entries => {
35
35
  */
36
36
  class List extends PageableMixin(SelectionMixin(LitElement)) {
37
37
 
38
- static get properties() {
39
- return {
40
- /**
41
- * When true, show the inline add button after each list item.
42
- * @type {boolean}
43
- */
44
- addButton: { type: Boolean, reflect: true, attribute: 'add-button' },
45
- /**
46
- * Text to show in label tooltip on inline add button. Defaults to "Add Item".
47
- * @type {string}
48
- */
49
- addButtonText: { type: String, reflect: true, attribute: 'add-button-text' },
50
- /**
51
- * Breakpoints for responsiveness in pixels. There are four different breakpoints and only the four largest breakpoints will be used.
52
- * @type {array}
53
- */
54
- breakpoints: { type: Array },
55
- /**
56
- * Always show drag handle
57
- * @type {boolean}
58
- */
59
- dragHandleShowAlways: { type: Boolean, attribute: 'drag-handle-show-always' },
60
- /**
61
- * Whether the user can drag multiple items
62
- * @type {boolean}
38
+ static properties = {
39
+ /**
40
+ * When true, show the inline add button after each list item.
41
+ * @type {boolean}
42
+ */
43
+ addButton: { type: Boolean, reflect: true, attribute: 'add-button' },
44
+ /**
45
+ * Text to show in label tooltip on inline add button. Defaults to "Add Item".
46
+ * @type {string}
47
+ */
48
+ addButtonText: { type: String, reflect: true, attribute: 'add-button-text' },
49
+ /**
50
+ * Breakpoints for responsiveness in pixels. There are four different breakpoints and only the four largest breakpoints will be used.
51
+ * @type {array}
52
+ */
53
+ breakpoints: { type: Array },
54
+ /**
55
+ * Always show drag handle
56
+ * @type {boolean}
57
+ */
58
+ dragHandleShowAlways: { type: Boolean, attribute: 'drag-handle-show-always' },
59
+ /**
60
+ * Whether the user can drag multiple items
61
+ * @type {boolean}
63
62
  */
64
- dragMultiple: { type: Boolean, reflect: true, attribute: 'drag-multiple' },
65
- /**
66
- * Disable ability to drop items above or below this item
67
- * @type {boolean}
68
- */
69
- dropNestedOnly: { type: Boolean, attribute: 'drop-nested-only' },
70
- /**
71
- * Whether to extend the separators beyond the content's edge
72
- * @type {boolean}
73
- */
74
- extendSeparators: { type: Boolean, reflect: true, attribute: 'extend-separators' },
75
- /**
76
- * Use grid to manage focus with arrow keys. See [Accessibility](#accessibility).
77
- * @type {boolean}
78
- */
79
- grid: { type: Boolean },
80
- /**
81
- * Sets an accessible label. For use when the list context is unclear. This property is only valid on top-level lists and will have no effect on nested lists.
82
- * @type {string}
63
+ dragMultiple: { type: Boolean, reflect: true, attribute: 'drag-multiple' },
64
+ /**
65
+ * Disable ability to drop items above or below this item
66
+ * @type {boolean}
67
+ */
68
+ dropNestedOnly: { type: Boolean, attribute: 'drop-nested-only' },
69
+ /**
70
+ * Whether to extend the separators beyond the content's edge
71
+ * @type {boolean}
72
+ */
73
+ extendSeparators: { type: Boolean, reflect: true, attribute: 'extend-separators' },
74
+ /**
75
+ * Use grid to manage focus with arrow keys. See [Accessibility](#accessibility).
76
+ * @type {boolean}
77
+ */
78
+ grid: { type: Boolean },
79
+ /**
80
+ * Sets an accessible label. For use when the list context is unclear. This property is only valid on top-level lists and will have no effect on nested lists.
81
+ * @type {string}
83
82
  */
84
- label: { type: String },
85
- /**
86
- * The type of layout for the list items. Valid values are "list" (default) and "tiles". The tile layout is only valid for single level (non-nested) lists.
87
- * @type {'list'|'tiles'}
88
- * @default "list"
89
- */
90
- layout: { type: String, reflect: true },
91
- /**
92
- * Display separators. Valid values are "all" (default), "between", "none"
93
- * @type {'all'|'between'|'none'}
94
- * @default "all"
95
- */
96
- separators: { type: String, reflect: true },
97
- /**
98
- * Show selection only on hover, focus or if at least one item is selected. Exclusive for the tile layout
99
- * @type {boolean}
100
- */
101
- selectionWhenInteracted: { type: Boolean, attribute: 'selection-when-interacted', reflect: true },
102
- _breakpoint: { type: Number, reflect: true },
103
- _slimColor: { type: Boolean, reflect: true, attribute: '_slim-color' }
104
- };
105
- }
106
-
107
- static get styles() {
108
- return css`
109
- :host {
110
- --d2l-list-item-color-border-radius: 6px;
111
- --d2l-list-item-color-width: 6px;
112
- --d2l-list-item-illustration-margin-inline-end: 0.9rem;
113
- --d2l-list-item-illustration-max-height: 2.6rem;
114
- --d2l-list-item-illustration-max-width: 4.5rem;
115
- display: block;
116
- }
117
- :host([layout="tiles"]) > .d2l-list-content {
118
- display: flex;
119
- flex-wrap: wrap;
120
- gap: 0.9rem;
121
- justify-content: normal;
122
- }
123
- :host(:not([slot="nested"])) > .d2l-list-content {
124
- padding-bottom: 1px;
125
- }
126
- :host([hidden]) {
127
- display: none;
128
- }
129
- slot[name="pager"]::slotted(*) {
130
- margin-top: 10px;
131
- }
132
- :host([extend-separators]) slot[name="pager"]::slotted(*) {
133
- margin-left: 0.9rem;
134
- margin-right: 0.9rem;
135
- }
136
- :host([_breakpoint="1"]) {
137
- --d2l-list-item-illustration-max-height: 3.55rem;
138
- --d2l-list-item-illustration-max-width: 6rem;
139
- }
140
- :host([_breakpoint="2"]) {
141
- --d2l-list-item-illustration-max-height: 5.1rem;
142
- --d2l-list-item-illustration-max-width: 9rem;
143
- }
144
- :host([_breakpoint="3"]) {
145
- --d2l-list-item-illustration-max-height: 6rem;
146
- --d2l-list-item-illustration-max-width: 10.8rem;
147
- }
148
- :host([_slim-color]) {
149
- --d2l-list-item-color-border-radius: 3px;
150
- --d2l-list-item-color-width: 3px;
151
- }
152
- :host([add-button]) ::slotted([slot="controls"]) {
153
- margin-bottom: calc(6px + 0.4rem); /* controls section margin-bottom + spacing for add-button */
154
- }
83
+ label: { type: String },
84
+ /**
85
+ * The type of layout for the list items. Valid values are "list" (default) and "tiles". The tile layout is only valid for single level (non-nested) lists.
86
+ * @type {'list'|'tiles'}
87
+ * @default "list"
88
+ */
89
+ layout: { type: String, reflect: true },
90
+ /**
91
+ * Display separators. Valid values are "all" (default), "between", "none"
92
+ * @type {'all'|'between'|'none'}
93
+ * @default "all"
94
+ */
95
+ separators: { type: String, reflect: true },
96
+ /**
97
+ * Show selection only on hover, focus or if at least one item is selected. Exclusive for the tile layout
98
+ * @type {boolean}
99
+ */
100
+ selectionWhenInteracted: { type: Boolean, attribute: 'selection-when-interacted', reflect: true },
101
+ _breakpoint: { type: Number, reflect: true },
102
+ _slimColor: { type: Boolean, reflect: true, attribute: '_slim-color' }
103
+ };
104
+
105
+ static styles = css`
106
+ :host {
107
+ --d2l-list-item-color-border-radius: 6px;
108
+ --d2l-list-item-color-width: 6px;
109
+ --d2l-list-item-illustration-margin-inline-end: 0.9rem;
110
+ --d2l-list-item-illustration-max-height: 2.6rem;
111
+ --d2l-list-item-illustration-max-width: 4.5rem;
112
+ display: block;
113
+ }
114
+ :host([layout="tiles"]) > .d2l-list-content {
115
+ display: flex;
116
+ flex-wrap: wrap;
117
+ gap: 0.9rem;
118
+ justify-content: normal;
119
+ }
120
+ :host(:not([slot="nested"])) > .d2l-list-content {
121
+ padding-bottom: 1px;
122
+ }
123
+ :host([hidden]) {
124
+ display: none;
125
+ }
126
+ slot[name="pager"]::slotted(*) {
127
+ margin-top: 10px;
128
+ }
129
+ :host([extend-separators]) slot[name="pager"]::slotted(*) {
130
+ margin-left: 0.9rem;
131
+ margin-right: 0.9rem;
132
+ }
133
+ :host([_breakpoint="1"]) {
134
+ --d2l-list-item-illustration-max-height: 3.55rem;
135
+ --d2l-list-item-illustration-max-width: 6rem;
136
+ }
137
+ :host([_breakpoint="2"]) {
138
+ --d2l-list-item-illustration-max-height: 5.1rem;
139
+ --d2l-list-item-illustration-max-width: 9rem;
140
+ }
141
+ :host([_breakpoint="3"]) {
142
+ --d2l-list-item-illustration-max-height: 6rem;
143
+ --d2l-list-item-illustration-max-width: 10.8rem;
144
+ }
145
+ :host([_slim-color]) {
146
+ --d2l-list-item-color-border-radius: 3px;
147
+ --d2l-list-item-color-width: 3px;
148
+ }
149
+ :host([add-button]) ::slotted([slot="controls"]) {
150
+ margin-bottom: calc(6px + 0.4rem); /* controls section margin-bottom + spacing for add-button */
151
+ }
155
152
 
156
- ::slotted(.d2l-list-tile-break) {
157
- display: none;
158
- }
159
- :host([layout="tiles"]) ::slotted(.d2l-list-tile-break) {
160
- display: block;
161
- flex-basis: 100%;
162
- height: 0;
163
- }
164
- `;
165
- }
153
+ ::slotted(.d2l-list-tile-break) {
154
+ display: none;
155
+ }
156
+ :host([layout="tiles"]) ::slotted(.d2l-list-tile-break) {
157
+ display: block;
158
+ flex-basis: 100%;
159
+ height: 0;
160
+ }
161
+ `;
166
162
 
167
163
  constructor() {
168
164
  super();