@brightspace-ui/core 2.82.2 → 2.83.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.
@@ -137,8 +137,8 @@ class Filter extends FocusMixin(LocalizeCoreElement(RtlMixin(LitElement))) {
137
137
  word-break: break-word;
138
138
  }
139
139
 
140
- d2l-list-item[disabled] .d2l-filter-dimension-set-value,
141
- d2l-list-item[disabled] .d2l-body-small {
140
+ d2l-list-item[selection-disabled] .d2l-filter-dimension-set-value,
141
+ d2l-list-item[selection-disabled] .d2l-body-small {
142
142
  color: var(--d2l-color-chromite);
143
143
  }
144
144
 
@@ -424,7 +424,7 @@ class Filter extends FocusMixin(LocalizeCoreElement(RtlMixin(LitElement))) {
424
424
  separators="between">
425
425
  ${dimension.values.map(item => html`
426
426
  <d2l-list-item
427
- ?disabled="${item.disabled}"
427
+ ?selection-disabled="${item.disabled}"
428
428
  ?hidden="${item.hidden}"
429
429
  key="${item.key}"
430
430
  label="${item.text}"
@@ -402,7 +402,6 @@ The `d2l-list-item` provides the appropriate `listitem` semantics for children w
402
402
  | Property | Type | Description |
403
403
  |---|---|---|
404
404
  | `breakpoints` | Array | Breakpoints for responsiveness in pixels. There are four different breakpoints and only the four largest breakpoints will be used. |
405
- | `disabled` | Boolean | Disables the input |
406
405
  | `draggable` | Boolean | Whether the item is draggable |
407
406
  | `drag-handle-text` | String | The drag-handle label for assistive technology. If implementing drag & drop, you should change this to dynamically announce what the drag-handle is moving for assistive technology in keyboard mode. |
408
407
  | `drag-target-handle-only` | Boolean | Make the drag target the drag handle only. |
@@ -418,6 +417,7 @@ The `d2l-list-item` provides the appropriate `listitem` semantics for children w
418
417
  | `padding-type` | String | List item whitespace (`normal` (default), `none`)|
419
418
  | `selectable` | Boolean | Indicates an input should be rendered for selecting the item |
420
419
  | `selected` | Boolean | Whether the item is selected |
420
+ | `selection-disabled` | Boolean | Disables selection |
421
421
  | `skeleton` | Boolean | Renders the input as a skeleton loader |
422
422
 
423
423
  ### Methods
@@ -477,7 +477,6 @@ The `d2l-list-item-button` provides the same functionality as `d2l-list-item` ex
477
477
  |---|---|---|
478
478
  | `breakpoints` | Array | Breakpoints for responsiveness in pixels. There are four different breakpoints and only the four largest breakpoints will be used. |
479
479
  | `button-disabled` | Boolean | Disables the primary action button |
480
- | `disabled` | Boolean | Disables the input |
481
480
  | `draggable` | Boolean | Whether the item is draggable |
482
481
  | `drag-handle-text` | String | The drag-handle label for assistive technology. If implementing drag & drop, you should change this to dynamically announce what the drag-handle is moving for assistive technology in keyboard mode. |
483
482
  | `drop-nested` | Boolean | Whether nested items can be dropped on this item |
@@ -490,6 +489,7 @@ The `d2l-list-item-button` provides the same functionality as `d2l-list-item` ex
490
489
  | `padding-type` | String | List item whitespace (`normal` (default), `none`)|
491
490
  | `selectable` | Boolean | Indicates an input should be rendered for selecting the item |
492
491
  | `selected` | Boolean | Whether the item is selected |
492
+ | `selection-disabled` | Boolean | Disables selection |
493
493
  | `skeleton` | Boolean | Renders the input as a skeleton loader |
494
494
 
495
495
  ### Events
@@ -31,18 +31,25 @@ export const ListItemButtonMixin = superclass => class extends ListItemMixin(sup
31
31
  [slot="outside-control-container"] {
32
32
  margin: 0 -12px;
33
33
  }
34
- :host([_hovering]) [slot="control-container"]::before,
35
- :host([_hovering]) [slot="control-container"]::after,
36
- :host([_focusing]) [slot="control-container"]::before,
37
- :host([_focusing]) [slot="control-container"]::after {
34
+ :host(:not([selectable]):not([button-disabled]):not([skeleton])[_hovering]) [slot="control-container"]::before,
35
+ :host(:not([selectable]):not([button-disabled]):not([skeleton])[_hovering]) [slot="control-container"]::after,
36
+ :host(:not([selectable]):not([button-disabled]):not([skeleton])[_focusing]) [slot="control-container"]::before,
37
+ :host(:not([selectable]):not([button-disabled]):not([skeleton])[_focusing]) [slot="control-container"]::after,
38
+ :host([selectable]:not([selection-disabled][button-disabled]):not([skeleton])[_hovering]) [slot="control-container"]::before,
39
+ :host([selectable]:not([selection-disabled][button-disabled]):not([skeleton])[_hovering]) [slot="control-container"]::after,
40
+ :host([selectable]:not([selection-disabled][button-disabled]):not([skeleton])[_focusing]) [slot="control-container"]::before,
41
+ :host([selectable]:not([selection-disabled][button-disabled]):not([skeleton])[_focusing]) [slot="control-container"]::after {
38
42
  border-top-color: transparent;
39
43
  }
40
- :host(:not([disabled]):not([skeleton])[_hovering]) [slot="outside-control-container"],
41
- :host(:not([disabled]):not([skeleton])[_focusing]) [slot="outside-control-container"] {
44
+ :host(:not([selectable]):not([button-disabled]):not([skeleton])[_hovering]) [slot="outside-control-container"],
45
+ :host(:not([selectable]):not([button-disabled]):not([skeleton])[_focusing]) [slot="outside-control-container"],
46
+ :host([selectable]:not([selection-disabled][button-disabled]):not([skeleton])[_hovering]) [slot="outside-control-container"],
47
+ :host([selectable]:not([selection-disabled][button-disabled]):not([skeleton])[_focusing]) [slot="outside-control-container"] {
42
48
  background-color: white;
43
49
  border-color: #b6cbe8; /* celestine alpha 0.3 */
44
50
  }
45
- :host(:not([disabled]):not([skeleton])[_hovering]) [slot="outside-control-container"] {
51
+ :host([selectable]:not([selection-disabled][button-disabled]):not([skeleton])[_hovering]) [slot="outside-control-container"],
52
+ :host(:not([selectable]):not([button-disabled]):not([skeleton])[_hovering]) [slot="outside-control-container"] {
46
53
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
47
54
  }
48
55
  button {
@@ -12,8 +12,14 @@ export const ListItemCheckboxMixin = superclass => class extends SkeletonMixin(s
12
12
  /**
13
13
  * **Selection:** Disables the input
14
14
  * @type {boolean}
15
+ * @ignore
16
+ */
17
+ disabled: { type: Boolean }, // deprecated
18
+ /**
19
+ * **Selection:** Disables selection
20
+ * @type {boolean}
15
21
  */
16
- disabled: { type: Boolean },
22
+ selectionDisabled: { type: Boolean, attribute: 'selection-disabled', reflect: true },
17
23
  /**
18
24
  * **Selection:** Value to identify item if selectable
19
25
  * @type {string}
@@ -55,9 +61,9 @@ export const ListItemCheckboxMixin = superclass => class extends SkeletonMixin(s
55
61
 
56
62
  constructor() {
57
63
  super();
58
- this.disabled = false;
59
64
  this.selectable = false;
60
65
  this.selected = false;
66
+ this.selectionDisabled = false;
61
67
  this.selectionInfo = new SelectionInfo();
62
68
  this._checkboxId = getUniqueId();
63
69
  }
@@ -95,6 +101,10 @@ export const ListItemCheckboxMixin = superclass => class extends SkeletonMixin(s
95
101
  if (!suppressEvent) this._dispatchSelected(selected);
96
102
  }
97
103
 
104
+ willUpdate(changedProperties) {
105
+ if (changedProperties.has('disabled')) this.selectionDisabled = this.disabled;
106
+ }
107
+
98
108
  async _dispatchSelected(value) {
99
109
  /* wait for internal state to be updated in case of action-click case so that a consumer
100
110
  calling getSelectionInfo will get the correct state */
@@ -109,7 +119,7 @@ export const ListItemCheckboxMixin = superclass => class extends SkeletonMixin(s
109
119
 
110
120
  _onCheckboxActionClick(event) {
111
121
  event.preventDefault();
112
- if (this.disabled) return;
122
+ if (this.selectionDisabled) return;
113
123
  this.setSelected(!this.selected);
114
124
  const checkbox = this.shadowRoot && this.shadowRoot.querySelector(`#${this._checkboxId}`);
115
125
  if (checkbox) checkbox.focus();
@@ -138,7 +148,7 @@ export const ListItemCheckboxMixin = superclass => class extends SkeletonMixin(s
138
148
  <d2l-selection-input
139
149
  @d2l-selection-change="${this._onCheckboxChange}"
140
150
  ?selected="${this.selected}"
141
- ?disabled="${this.disabled}"
151
+ ?disabled="${this.selectionDisabled}"
142
152
  id="${this._checkboxId}"
143
153
  ?_indeterminate="${this.selectionInfo.state === SelectionInfo.states.some}"
144
154
  key="${this.key}"
@@ -152,7 +162,7 @@ export const ListItemCheckboxMixin = superclass => class extends SkeletonMixin(s
152
162
  _renderCheckboxAction(inner) {
153
163
  const classes = {
154
164
  'd2l-checkbox-action': true,
155
- 'd2l-checkbox-action-disabled': this.disabled
165
+ 'd2l-checkbox-action-disabled': this.selectionDisabled
156
166
  };
157
167
  return this.selectable ? html`
158
168
  <div @click="${this._onCheckboxActionClick}"
@@ -27,12 +27,12 @@ export const ListItemLinkMixin = superclass => class extends ListItemMixin(super
27
27
  :host([action-href]:not([action-href=""])[_focusing]) [slot="control-container"]::after {
28
28
  border-top-color: transparent;
29
29
  }
30
- :host(:not([disabled]):not([skeleton])[action-href]:not([action-href=""])[_hovering]) [slot="outside-control-container"],
31
- :host(:not([disabled]):not([skeleton])[action-href]:not([action-href=""])[_focusing]) [slot="outside-control-container"] {
30
+ :host(:not([skeleton])[action-href]:not([action-href=""])[_hovering]) [slot="outside-control-container"],
31
+ :host(:not([skeleton])[action-href]:not([action-href=""])[_focusing]) [slot="outside-control-container"] {
32
32
  background-color: white;
33
33
  border-color: #b6cbe8; /* celestine alpha 0.3 */
34
34
  }
35
- :host(:not([disabled]):not([skeleton])[action-href]:not([action-href=""])[_hovering]) [slot="outside-control-container"] {
35
+ :host(:not([skeleton])[action-href]:not([action-href=""])[_hovering]) [slot="outside-control-container"] {
36
36
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
37
37
  }
38
38
  a[href] {
@@ -147,8 +147,8 @@ export const ListItemMixin = superclass => class extends composeMixins(
147
147
  :host(:last-of-type[_separators="between"]) [slot="control-container"]::after,
148
148
  :host([_separators="none"]) [slot="control-container"]::before,
149
149
  :host([_separators="none"]) [slot="control-container"]::after,
150
- :host([selectable][_hovering]:not([disabled])) [slot="control-container"]::before,
151
- :host([selectable][_hovering]:not([disabled])) [slot="control-container"]::after,
150
+ :host([selectable][_hovering]:not([selection-disabled])) [slot="control-container"]::before,
151
+ :host([selectable][_hovering]:not([selection-disabled])) [slot="control-container"]::after,
152
152
  :host([selectable][_focusing]) [slot="control-container"]::before,
153
153
  :host([selectable][_focusing]) [slot="control-container"]::after,
154
154
  :host([selected]) [slot="control-container"]::before,
@@ -317,20 +317,20 @@ export const ListItemMixin = superclass => class extends composeMixins(
317
317
  margin: 0;
318
318
  }
319
319
 
320
- :host(:not([disabled]):not([skeleton])[selected]) [slot="outside-control-container"],
321
- :host(:not([disabled]):not([skeleton])[selectable][_hovering]) [slot="outside-control-container"],
322
- :host(:not([disabled]):not([skeleton])[selectable][_focusing]) [slot="outside-control-container"] {
320
+ :host(:not([selection-disabled]):not([skeleton])[selected]) [slot="outside-control-container"],
321
+ :host(:not([selection-disabled]):not([skeleton])[selectable][_hovering]) [slot="outside-control-container"],
322
+ :host(:not([selection-disabled]):not([skeleton])[selectable][_focusing]) [slot="outside-control-container"] {
323
323
  background-color: white;
324
324
  border-color: #b6cbe8; /* celestine alpha 0.3 */
325
325
  }
326
- :host(:not([disabled]):not([skeleton])[selectable][_hovering]) [slot="outside-control-container"] {
326
+ :host(:not([selection-disabled]):not([skeleton])[selectable][_hovering]) [slot="outside-control-container"] {
327
327
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
328
328
  }
329
- :host(:not([disabled]):not([skeleton])[selected]) [slot="outside-control-container"] {
329
+ :host(:not([selection-disabled]):not([skeleton])[selected]) [slot="outside-control-container"] {
330
330
  background-color: #f3fbff;
331
331
  }
332
332
 
333
- :host(:not([disabled]):not([skeleton])[padding-type="none"]) [slot="outside-control-container"] {
333
+ :host(:not([selection-disabled]):not([skeleton])[padding-type="none"]) [slot="outside-control-container"] {
334
334
  border-color: transparent;
335
335
  margin: 0;
336
336
  }
@@ -343,9 +343,9 @@ export const ListItemMixin = superclass => class extends composeMixins(
343
343
  transition: border-color 400ms linear;
344
344
  }
345
345
  :host([_highlighting]) [slot="outside-control-container"],
346
- :host(:not([disabled]):not([skeleton])[_hovering][_highlighting]) [slot="outside-control-container"],
347
- :host(:not([disabled]):not([skeleton])[_focusing][_highlighting]) [slot="outside-control-container"],
348
- :host(:not([disabled]):not([skeleton])[selected][_highlighting]) [slot="outside-control-container"] {
346
+ :host(:not([selection-disabled]):not([skeleton])[_hovering][_highlighting]) [slot="outside-control-container"],
347
+ :host(:not([selection-disabled]):not([skeleton])[_focusing][_highlighting]) [slot="outside-control-container"],
348
+ :host(:not([selection-disabled]):not([skeleton])[selected][_highlighting]) [slot="outside-control-container"] {
349
349
  background-color: var(--d2l-color-celestine-plus-2);
350
350
  border-color: var(--d2l-color-celestine);
351
351
  }
@@ -7461,12 +7461,6 @@
7461
7461
  "type": "'normal'|'none'",
7462
7462
  "default": "\"normal\""
7463
7463
  },
7464
- {
7465
- "name": "disabled",
7466
- "description": "**Selection:** Disables the input",
7467
- "type": "boolean",
7468
- "default": "false"
7469
- },
7470
7464
  {
7471
7465
  "name": "selectable",
7472
7466
  "description": "**Selection:** Indicates an input should be rendered for selecting the item",
@@ -7479,6 +7473,12 @@
7479
7473
  "type": "boolean",
7480
7474
  "default": "false"
7481
7475
  },
7476
+ {
7477
+ "name": "selection-disabled",
7478
+ "description": "**Selection:** Disables selection",
7479
+ "type": "boolean",
7480
+ "default": "false"
7481
+ },
7482
7482
  {
7483
7483
  "name": "skeleton",
7484
7484
  "description": "Renders the input as a [skeleton loader](https://github.com/BrightspaceUI/core/tree/main/components/skeleton)",
@@ -7561,13 +7561,6 @@
7561
7561
  "type": "'normal'|'none'",
7562
7562
  "default": "\"normal\""
7563
7563
  },
7564
- {
7565
- "name": "disabled",
7566
- "attribute": "disabled",
7567
- "description": "**Selection:** Disables the input",
7568
- "type": "boolean",
7569
- "default": "false"
7570
- },
7571
7564
  {
7572
7565
  "name": "selectable",
7573
7566
  "attribute": "selectable",
@@ -7582,6 +7575,13 @@
7582
7575
  "type": "boolean",
7583
7576
  "default": "false"
7584
7577
  },
7578
+ {
7579
+ "name": "selectionDisabled",
7580
+ "attribute": "selection-disabled",
7581
+ "description": "**Selection:** Disables selection",
7582
+ "type": "boolean",
7583
+ "default": "false"
7584
+ },
7585
7585
  {
7586
7586
  "name": "selectionInfo"
7587
7587
  },
@@ -7860,12 +7860,6 @@
7860
7860
  "type": "'normal'|'none'",
7861
7861
  "default": "\"normal\""
7862
7862
  },
7863
- {
7864
- "name": "disabled",
7865
- "description": "**Selection:** Disables the input",
7866
- "type": "boolean",
7867
- "default": "false"
7868
- },
7869
7863
  {
7870
7864
  "name": "selectable",
7871
7865
  "description": "**Selection:** Indicates an input should be rendered for selecting the item",
@@ -7878,6 +7872,12 @@
7878
7872
  "type": "boolean",
7879
7873
  "default": "false"
7880
7874
  },
7875
+ {
7876
+ "name": "selection-disabled",
7877
+ "description": "**Selection:** Disables selection",
7878
+ "type": "boolean",
7879
+ "default": "false"
7880
+ },
7881
7881
  {
7882
7882
  "name": "skeleton",
7883
7883
  "description": "Renders the input as a [skeleton loader](https://github.com/BrightspaceUI/core/tree/main/components/skeleton)",
@@ -7967,13 +7967,6 @@
7967
7967
  "type": "'normal'|'none'",
7968
7968
  "default": "\"normal\""
7969
7969
  },
7970
- {
7971
- "name": "disabled",
7972
- "attribute": "disabled",
7973
- "description": "**Selection:** Disables the input",
7974
- "type": "boolean",
7975
- "default": "false"
7976
- },
7977
7970
  {
7978
7971
  "name": "selectable",
7979
7972
  "attribute": "selectable",
@@ -7988,6 +7981,13 @@
7988
7981
  "type": "boolean",
7989
7982
  "default": "false"
7990
7983
  },
7984
+ {
7985
+ "name": "selectionDisabled",
7986
+ "attribute": "selection-disabled",
7987
+ "description": "**Selection:** Disables selection",
7988
+ "type": "boolean",
7989
+ "default": "false"
7990
+ },
7991
7991
  {
7992
7992
  "name": "selectionInfo"
7993
7993
  },
@@ -8339,12 +8339,6 @@
8339
8339
  "type": "'normal'|'none'",
8340
8340
  "default": "\"normal\""
8341
8341
  },
8342
- {
8343
- "name": "disabled",
8344
- "description": "**Selection:** Disables the input",
8345
- "type": "boolean",
8346
- "default": "false"
8347
- },
8348
8342
  {
8349
8343
  "name": "selectable",
8350
8344
  "description": "**Selection:** Indicates an input should be rendered for selecting the item",
@@ -8357,6 +8351,12 @@
8357
8351
  "type": "boolean",
8358
8352
  "default": "false"
8359
8353
  },
8354
+ {
8355
+ "name": "selection-disabled",
8356
+ "description": "**Selection:** Disables selection",
8357
+ "type": "boolean",
8358
+ "default": "false"
8359
+ },
8360
8360
  {
8361
8361
  "name": "skeleton",
8362
8362
  "description": "Renders the input as a [skeleton loader](https://github.com/BrightspaceUI/core/tree/main/components/skeleton)",
@@ -8451,13 +8451,6 @@
8451
8451
  "type": "'normal'|'none'",
8452
8452
  "default": "\"normal\""
8453
8453
  },
8454
- {
8455
- "name": "disabled",
8456
- "attribute": "disabled",
8457
- "description": "**Selection:** Disables the input",
8458
- "type": "boolean",
8459
- "default": "false"
8460
- },
8461
8454
  {
8462
8455
  "name": "selectable",
8463
8456
  "attribute": "selectable",
@@ -8472,6 +8465,13 @@
8472
8465
  "type": "boolean",
8473
8466
  "default": "false"
8474
8467
  },
8468
+ {
8469
+ "name": "selectionDisabled",
8470
+ "attribute": "selection-disabled",
8471
+ "description": "**Selection:** Disables selection",
8472
+ "type": "boolean",
8473
+ "default": "false"
8474
+ },
8475
8475
  {
8476
8476
  "name": "selectionInfo"
8477
8477
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@brightspace-ui/core",
3
- "version": "2.82.2",
3
+ "version": "2.83.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",