@brightspace-ui/core 2.80.6 → 2.80.8
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.
- package/components/filter/filter.js +10 -2
- package/components/list/README.md +1 -0
- package/components/list/list-item-button-mixin.js +20 -2
- package/custom-elements.json +13 -0
- package/lang/ar.js +0 -2
- package/lang/cy.js +0 -2
- package/lang/da.js +0 -2
- package/lang/de.js +0 -2
- package/lang/en.js +0 -2
- package/lang/es-es.js +0 -2
- package/lang/es.js +0 -2
- package/lang/fr-fr.js +0 -2
- package/lang/fr.js +0 -2
- package/lang/hi.js +0 -2
- package/lang/ja.js +0 -2
- package/lang/ko.js +0 -2
- package/lang/nl.js +0 -2
- package/lang/pt.js +0 -2
- package/lang/sv.js +0 -2
- package/lang/tr.js +0 -2
- package/lang/zh-cn.js +0 -2
- package/lang/zh-tw.js +0 -2
- package/package.json +1 -1
|
@@ -108,6 +108,8 @@ class Filter extends FocusMixin(LocalizeCoreElement(RtlMixin(LitElement))) {
|
|
|
108
108
|
flex-grow: 1;
|
|
109
109
|
padding-right: calc(2rem + 2px);
|
|
110
110
|
text-align: center;
|
|
111
|
+
text-overflow: ellipsis;
|
|
112
|
+
white-space: nowrap;
|
|
111
113
|
}
|
|
112
114
|
:host([dir="rtl"]) .d2l-filter-dimension-header-text {
|
|
113
115
|
padding-left: calc(2rem + 2px);
|
|
@@ -117,8 +119,6 @@ class Filter extends FocusMixin(LocalizeCoreElement(RtlMixin(LitElement))) {
|
|
|
117
119
|
.d2l-filter-dimension-header-text,
|
|
118
120
|
.d2l-filter-dimension-set-value-text {
|
|
119
121
|
overflow: hidden;
|
|
120
|
-
text-overflow: ellipsis;
|
|
121
|
-
white-space: nowrap;
|
|
122
122
|
}
|
|
123
123
|
|
|
124
124
|
.d2l-filter-dimension-set-value {
|
|
@@ -128,6 +128,14 @@ class Filter extends FocusMixin(LocalizeCoreElement(RtlMixin(LitElement))) {
|
|
|
128
128
|
line-height: unset;
|
|
129
129
|
overflow: hidden;
|
|
130
130
|
}
|
|
131
|
+
|
|
132
|
+
.d2l-filter-dimension-set-value-text {
|
|
133
|
+
-webkit-box-orient: vertical;
|
|
134
|
+
display: -webkit-box;
|
|
135
|
+
hyphens: auto;
|
|
136
|
+
-webkit-line-clamp: 2;
|
|
137
|
+
word-break: break-word;
|
|
138
|
+
}
|
|
131
139
|
|
|
132
140
|
d2l-list-item[disabled] .d2l-filter-dimension-set-value,
|
|
133
141
|
d2l-list-item[disabled] .d2l-body-small {
|
|
@@ -476,6 +476,7 @@ The `d2l-list-item-button` provides the same functionality as `d2l-list-item` ex
|
|
|
476
476
|
| Property | Type | Description |
|
|
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
|
+
| `button-disabled` | Boolean | Disables the primary action button |
|
|
479
480
|
| `disabled` | Boolean | Disables the input |
|
|
480
481
|
| `draggable` | Boolean | Whether the item is draggable |
|
|
481
482
|
| `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. |
|
|
@@ -4,13 +4,30 @@ import { getUniqueId } from '../../helpers/uniqueId.js';
|
|
|
4
4
|
import { ListItemMixin } from './list-item-mixin.js';
|
|
5
5
|
|
|
6
6
|
export const ListItemButtonMixin = superclass => class extends ListItemMixin(superclass) {
|
|
7
|
+
static get properties() {
|
|
8
|
+
return {
|
|
9
|
+
/**
|
|
10
|
+
* Disables the primary action button
|
|
11
|
+
* @type {boolean}
|
|
12
|
+
*/
|
|
13
|
+
buttonDisabled : { type: Boolean, attribute: 'button-disabled' }
|
|
14
|
+
};
|
|
15
|
+
}
|
|
7
16
|
|
|
8
17
|
static get styles() {
|
|
9
18
|
|
|
10
19
|
const styles = [ css`
|
|
11
|
-
:host {
|
|
20
|
+
:host(:not([button-disabled])) {
|
|
12
21
|
--d2l-list-item-content-text-color: var(--d2l-color-celestine);
|
|
13
22
|
}
|
|
23
|
+
:host([button-disabled][_hovering-primary-action]) .d2l-list-item-content,
|
|
24
|
+
:host([button-disabled][_focusing-primary-action]) .d2l-list-item-content {
|
|
25
|
+
--d2l-list-item-content-text-color: unset;
|
|
26
|
+
--d2l-list-item-content-text-decoration: none;
|
|
27
|
+
}
|
|
28
|
+
:host([button-disabled]) button {
|
|
29
|
+
cursor: default;
|
|
30
|
+
}
|
|
14
31
|
[slot="outside-control-container"] {
|
|
15
32
|
margin: 0 -12px;
|
|
16
33
|
}
|
|
@@ -51,6 +68,7 @@ export const ListItemButtonMixin = superclass => class extends ListItemMixin(sup
|
|
|
51
68
|
constructor() {
|
|
52
69
|
super();
|
|
53
70
|
this._primaryActionId = getUniqueId();
|
|
71
|
+
this.buttonDisabled = false;
|
|
54
72
|
}
|
|
55
73
|
|
|
56
74
|
_onButtonClick() {
|
|
@@ -59,7 +77,7 @@ export const ListItemButtonMixin = superclass => class extends ListItemMixin(sup
|
|
|
59
77
|
}
|
|
60
78
|
|
|
61
79
|
_renderPrimaryAction(labelledBy) {
|
|
62
|
-
return html`<button id="${this._primaryActionId}" aria-labelledby="${labelledBy}" @click="${this._onButtonClick}"></button>`;
|
|
80
|
+
return html`<button id="${this._primaryActionId}" aria-labelledby="${labelledBy}" @click="${this._onButtonClick}" ?disabled="${this.buttonDisabled}"></button>`;
|
|
63
81
|
}
|
|
64
82
|
|
|
65
83
|
};
|
package/custom-elements.json
CHANGED
|
@@ -7742,6 +7742,12 @@
|
|
|
7742
7742
|
"path": "./components/list/list-item-button.js",
|
|
7743
7743
|
"description": "A component for a \"listitem\" child within a list. It provides semantics, basic layout, breakpoints for responsiveness, a link for navigation, and selection.",
|
|
7744
7744
|
"attributes": [
|
|
7745
|
+
{
|
|
7746
|
+
"name": "button-disabled",
|
|
7747
|
+
"description": "Disables the primary action button",
|
|
7748
|
+
"type": "boolean",
|
|
7749
|
+
"default": "false"
|
|
7750
|
+
},
|
|
7745
7751
|
{
|
|
7746
7752
|
"name": "drag-target-handle-only",
|
|
7747
7753
|
"description": "Whether to allow the drag target to be the handle only rather than the entire cell",
|
|
@@ -7838,6 +7844,13 @@
|
|
|
7838
7844
|
}
|
|
7839
7845
|
],
|
|
7840
7846
|
"properties": [
|
|
7847
|
+
{
|
|
7848
|
+
"name": "buttonDisabled",
|
|
7849
|
+
"attribute": "button-disabled",
|
|
7850
|
+
"description": "Disables the primary action button",
|
|
7851
|
+
"type": "boolean",
|
|
7852
|
+
"default": "false"
|
|
7853
|
+
},
|
|
7841
7854
|
{
|
|
7842
7855
|
"name": "dragTargetHandleOnly",
|
|
7843
7856
|
"attribute": "drag-target-handle-only",
|
package/lang/ar.js
CHANGED
package/lang/cy.js
CHANGED
package/lang/da.js
CHANGED
package/lang/de.js
CHANGED
package/lang/en.js
CHANGED
package/lang/es-es.js
CHANGED
package/lang/es.js
CHANGED
package/lang/fr-fr.js
CHANGED
package/lang/fr.js
CHANGED
package/lang/hi.js
CHANGED
package/lang/ja.js
CHANGED
package/lang/ko.js
CHANGED
package/lang/nl.js
CHANGED
package/lang/pt.js
CHANGED
package/lang/sv.js
CHANGED
package/lang/tr.js
CHANGED
package/lang/zh-cn.js
CHANGED
package/lang/zh-tw.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@brightspace-ui/core",
|
|
3
|
-
"version": "2.80.
|
|
3
|
+
"version": "2.80.8",
|
|
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",
|