@brightspace-ui/core 3.187.1 → 3.188.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.
- package/components/inputs/input-checkbox.js +1 -1
- package/components/inputs/input-radio-styles.js +1 -1
- package/components/list/demo/list-layout.html +40 -0
- package/components/list/list-item-checkbox-mixin.js +2 -0
- package/components/list/list-item-generic-layout.js +13 -6
- package/components/list/list-item-mixin.js +30 -3
- package/package.json +1 -1
|
@@ -80,7 +80,7 @@ export const checkboxStyles = css`
|
|
|
80
80
|
input[type="checkbox"].d2l-input-checkbox:focus,
|
|
81
81
|
input[type="checkbox"].d2l-input-checkbox.d2l-input-checkbox-focus,
|
|
82
82
|
:host(.d2l-hovering) input[type="checkbox"]:not(:disabled).d2l-input-checkbox {
|
|
83
|
-
border-color: var(--d2l-color-celestine);
|
|
83
|
+
border-color: var(--d2l-input-checkbox-border-color-hover-focus, var(--d2l-color-celestine));
|
|
84
84
|
border-width: 2px;
|
|
85
85
|
outline-width: 0;
|
|
86
86
|
}
|
|
@@ -44,7 +44,7 @@ export const radioStyles = css`
|
|
|
44
44
|
.d2l-input-radio:focus,
|
|
45
45
|
.d2l-input-radio-label > input[type="radio"]:hover,
|
|
46
46
|
.d2l-input-radio-label > input[type="radio"]:focus {
|
|
47
|
-
border-color: var(--d2l-color-celestine);
|
|
47
|
+
border-color: var(--d2l-input-radio-border-color-hover-focus, var(--d2l-color-celestine));
|
|
48
48
|
border-width: 2px;
|
|
49
49
|
outline: none;
|
|
50
50
|
}
|
|
@@ -149,6 +149,46 @@
|
|
|
149
149
|
</template>
|
|
150
150
|
</d2l-demo-snippet>
|
|
151
151
|
|
|
152
|
+
<h2>Selectable</h2>
|
|
153
|
+
|
|
154
|
+
<d2l-demo-snippet>
|
|
155
|
+
<template>
|
|
156
|
+
<d2l-button-toggle pressed>
|
|
157
|
+
<d2l-button-subtle slot="not-pressed" icon="tier1:tile-view" text="Tiles"></d2l-button-subtle>
|
|
158
|
+
<d2l-button-subtle slot="pressed" icon="tier1:list-view" text="List"></d2l-button-subtle>
|
|
159
|
+
</d2l-button-toggle>
|
|
160
|
+
<d2l-list layout="tiles">
|
|
161
|
+
<d2l-list-item label="item 1" key="1" selectable>
|
|
162
|
+
<img slot="illustration" src="https://s.brightspace.com/course-images/images/38e839b1-37fa-470c-8830-b189ce4ae134/tile-high-density-max-size.jpg"></img>
|
|
163
|
+
<d2l-list-item-content>
|
|
164
|
+
<div>Identify categories of physical activities</div>
|
|
165
|
+
<div slot="secondary">Secondary Information</div>
|
|
166
|
+
<div slot="supporting-info">Specific Expectation A1.2</div>
|
|
167
|
+
</d2l-list-item-content>
|
|
168
|
+
</d2l-list-item>
|
|
169
|
+
<d2l-list-item label="item 2" key="2" selectable>
|
|
170
|
+
<img slot="illustration" src="https://s.brightspace.com/course-images/images/e5fd575a-bc14-4a80-89e1-46f349a76178/tile-high-density-max-size.jpg"></img>
|
|
171
|
+
<d2l-list-item-content>
|
|
172
|
+
<div>Apply a decision-making process to assess risks and make safe decisions in a variety of situations</div>
|
|
173
|
+
<div slot="secondary">Secondary Information</div>
|
|
174
|
+
<div slot="supporting-info">Specific Expectation B2.1</div>
|
|
175
|
+
</d2l-list-item-content>
|
|
176
|
+
</d2l-list-item>
|
|
177
|
+
<d2l-list-item label="item 3" key="3" selectable>
|
|
178
|
+
<img slot="illustration" src="https://s.brightspace.com/course-images/images/63b162ab-b582-4bf9-8c1d-1dad04714121/tile-high-density-max-size.jpg"></img>
|
|
179
|
+
<d2l-list-item-content>
|
|
180
|
+
<div>Retain objects of various shapes and sizes in different ways, while moving around others and equipment</div>
|
|
181
|
+
<div slot="secondary">Secondary Information</div>
|
|
182
|
+
<div slot="supporting-info">Specific Expectation B2.2</div>
|
|
183
|
+
</d2l-list-item-content>
|
|
184
|
+
</d2l-list-item>
|
|
185
|
+
</d2l-list>
|
|
186
|
+
<script data-demo-hide>
|
|
187
|
+
(demo => window.wireupListTileToggle(demo))(document.currentScript.parentNode);
|
|
188
|
+
</script>
|
|
189
|
+
</template>
|
|
190
|
+
</d2l-demo-snippet>
|
|
191
|
+
|
|
152
192
|
<h2>Links</h2>
|
|
153
193
|
|
|
154
194
|
<d2l-demo-snippet>
|
|
@@ -175,6 +175,8 @@ export const ListItemCheckboxMixin = superclass => class extends SkeletonMixin(s
|
|
|
175
175
|
?_indeterminate="${this.selectionInfo.state === SelectionInfo.states.some}"
|
|
176
176
|
key="${this.key}"
|
|
177
177
|
label="${this.label}"
|
|
178
|
+
@mouseenter="${this._onMouseEnterSelection}"
|
|
179
|
+
@mouseleave="${this._onMouseLeaveSelection}"
|
|
178
180
|
?selected="${this.selected}"
|
|
179
181
|
?skeleton="${this.skeleton}">
|
|
180
182
|
</d2l-selection-input>
|
|
@@ -219,15 +219,18 @@ class ListItemGenericLayout extends LitElement {
|
|
|
219
219
|
|
|
220
220
|
:host([layout="tile"]) {
|
|
221
221
|
grid-template-columns:
|
|
222
|
-
[start] minmax(0,
|
|
222
|
+
[start control-start] minmax(0, min-content)
|
|
223
|
+
[control-end] minmax(0, auto)
|
|
223
224
|
[end];
|
|
224
225
|
grid-template-rows:
|
|
225
|
-
[start]
|
|
226
|
-
[end]
|
|
226
|
+
[start header-start] minmax(0, min-content)
|
|
227
|
+
[header-end content-start] auto
|
|
228
|
+
[content-end end];
|
|
227
229
|
height: 100%;
|
|
228
230
|
}
|
|
229
231
|
:host([layout="tile"]) ::slotted([slot="content"]),
|
|
230
|
-
:host([layout="tile"]) ::slotted([slot="content-action"])
|
|
232
|
+
:host([layout="tile"]) ::slotted([slot="content-action"]),
|
|
233
|
+
:host([layout="tile"]) ::slotted([slot="control-action"]) {
|
|
231
234
|
grid-column: start / end;
|
|
232
235
|
grid-row: start / end;
|
|
233
236
|
}
|
|
@@ -235,6 +238,12 @@ class ListItemGenericLayout extends LitElement {
|
|
|
235
238
|
grid-column: start / end;
|
|
236
239
|
grid-row: start / end;
|
|
237
240
|
}
|
|
241
|
+
:host([layout="tile"]) ::slotted([slot="control"]) {
|
|
242
|
+
grid-column: control-start / control-end;
|
|
243
|
+
grid-row: start;
|
|
244
|
+
pointer-events: all;
|
|
245
|
+
width: unset;
|
|
246
|
+
}
|
|
238
247
|
|
|
239
248
|
:host([layout="tile"]) slot[name="add-top"],
|
|
240
249
|
:host([layout="tile"]) slot[name="control-container"],
|
|
@@ -243,8 +252,6 @@ class ListItemGenericLayout extends LitElement {
|
|
|
243
252
|
:host([layout="tile"]) slot[name="outside-control-action"],
|
|
244
253
|
:host([layout="tile"]) slot[name="color-indicator"],
|
|
245
254
|
:host([layout="tile"]) slot[name="expand-collapse"],
|
|
246
|
-
:host([layout="tile"]) slot[name="control-action"],
|
|
247
|
-
:host([layout="tile"]) slot[name="control"],
|
|
248
255
|
:host([layout="tile"]) slot[name="actions"],
|
|
249
256
|
:host([layout="tile"]) slot[name="drop-target"],
|
|
250
257
|
:host([layout="tile"]) slot[name="nested"],
|
|
@@ -193,10 +193,10 @@ export const ListItemMixin = superclass => class extends composeMixins(
|
|
|
193
193
|
border-top: 0;
|
|
194
194
|
}
|
|
195
195
|
|
|
196
|
-
:host(:not([_render-expand-collapse-slot])) .d2l-list-item-content-extend-separators > [slot="control"] {
|
|
196
|
+
:host(:not([layout="tile"]):not([_render-expand-collapse-slot])) .d2l-list-item-content-extend-separators > [slot="control"] {
|
|
197
197
|
width: 3rem;
|
|
198
198
|
}
|
|
199
|
-
:host(:not([_render-expand-collapse-slot])) .d2l-list-item-content-extend-separators > [slot="control"] ~ [slot="control-action"] [slot="content"] {
|
|
199
|
+
:host(:not([layout="tile"]):not([_render-expand-collapse-slot])) .d2l-list-item-content-extend-separators > [slot="control"] ~ [slot="control-action"] [slot="content"] {
|
|
200
200
|
padding-inline-start: 3rem;
|
|
201
201
|
}
|
|
202
202
|
:host(:not([_has-color-slot])) .d2l-list-item-content-extend-separators [slot="content"] {
|
|
@@ -303,7 +303,7 @@ export const ListItemMixin = superclass => class extends composeMixins(
|
|
|
303
303
|
margin-block: 0.55rem;
|
|
304
304
|
margin-inline-end: 0.55rem;
|
|
305
305
|
}
|
|
306
|
-
:host(:not([_render-expand-collapse-slot])) .d2l-list-item-content-extend-separators d2l-selection-input {
|
|
306
|
+
:host(:not([layout="tile"]):not([_render-expand-collapse-slot])) .d2l-list-item-content-extend-separators d2l-selection-input {
|
|
307
307
|
margin-inline-start: 0.9rem;
|
|
308
308
|
}
|
|
309
309
|
:host(:not([_render-expand-collapse-slot])[_has-color-slot]) .d2l-list-item-content-extend-separators d2l-selection-input {
|
|
@@ -511,6 +511,33 @@ export const ListItemMixin = superclass => class extends composeMixins(
|
|
|
511
511
|
border-color: transparent;
|
|
512
512
|
}
|
|
513
513
|
}
|
|
514
|
+
|
|
515
|
+
:host([layout="tile"]) d2l-selection-input {
|
|
516
|
+
--d2l-input-checkbox-border-color-hover-focus: var(--d2l-color-celestine-minus-1);
|
|
517
|
+
--d2l-input-radio-border-color-hover-focus: var(--d2l-color-celestine-minus-1);
|
|
518
|
+
border: 2px solid transparent;
|
|
519
|
+
border-radius: 8px;
|
|
520
|
+
margin: 0;
|
|
521
|
+
padding: 3px;
|
|
522
|
+
}
|
|
523
|
+
:host([layout="tile"][_focusing]) d2l-selection-input {
|
|
524
|
+
border: 2px solid white;
|
|
525
|
+
}
|
|
526
|
+
:host([layout="tile"]) [slot="control"] {
|
|
527
|
+
background-color: rgba(0, 0, 0, 0.5);
|
|
528
|
+
border-radius: 8px;
|
|
529
|
+
box-sizing: border-box;
|
|
530
|
+
margin: 0.5rem;
|
|
531
|
+
outline: 2px solid transparent;
|
|
532
|
+
}
|
|
533
|
+
:host([layout="tile"][_focusing]) [slot="control"] {
|
|
534
|
+
background-color: var(--d2l-color-celestine);
|
|
535
|
+
outline-color: var(--d2l-color-celestine-minus-1);
|
|
536
|
+
}
|
|
537
|
+
:host([layout="tile"][skeleton]) [slot="control"] {
|
|
538
|
+
background-color: transparent;
|
|
539
|
+
}
|
|
540
|
+
|
|
514
541
|
`];
|
|
515
542
|
|
|
516
543
|
super.styles && styles.unshift(super.styles);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@brightspace-ui/core",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.188.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",
|