@brightspace-ui/core 3.10.0 → 3.12.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/filter/filter.js +23 -3
- package/components/inputs/input-date-range.js +7 -0
- package/components/inputs/input-date-time-range.js +7 -0
- package/components/inputs/input-date-time.js +7 -0
- package/components/inputs/input-date.js +8 -2
- package/components/inputs/input-time-range.js +7 -0
- package/components/inputs/input-time.js +8 -2
- package/package.json +1 -1
@@ -8,6 +8,7 @@ import '../dropdown/dropdown-menu.js';
|
|
8
8
|
import '../empty-state/empty-state-action-button.js';
|
9
9
|
import '../empty-state/empty-state-action-link.js';
|
10
10
|
import '../empty-state/empty-state-simple.js';
|
11
|
+
import '../expand-collapse/expand-collapse-content.js';
|
11
12
|
import '../hierarchical-view/hierarchical-view.js';
|
12
13
|
import '../inputs/input-search.js';
|
13
14
|
import '../list/list.js';
|
@@ -132,12 +133,20 @@ class Filter extends FocusMixin(LocalizeCoreElement(RtlMixin(LitElement))) {
|
|
132
133
|
}
|
133
134
|
|
134
135
|
.d2l-filter-dimension-set-value {
|
136
|
+
align-items: center;
|
135
137
|
color: var(--d2l-color-ferrite);
|
136
138
|
display: flex;
|
137
139
|
gap: 0.45rem;
|
138
140
|
line-height: unset;
|
139
141
|
overflow: hidden;
|
140
142
|
}
|
143
|
+
.d2l-filter-dimension-set-value d2l-icon {
|
144
|
+
flex-shrink: 0;
|
145
|
+
}
|
146
|
+
d2l-expand-collapse-content[expanded] {
|
147
|
+
padding-block: 0.5rem;
|
148
|
+
padding-inline: 0.2rem;
|
149
|
+
}
|
141
150
|
|
142
151
|
.d2l-filter-dimension-set-value-text {
|
143
152
|
-webkit-box-orient: vertical;
|
@@ -577,11 +586,22 @@ class Filter extends FocusMixin(LocalizeCoreElement(RtlMixin(LitElement))) {
|
|
577
586
|
?hidden="${item.hidden}"
|
578
587
|
key="${item.key}"
|
579
588
|
label="${item.text}"
|
589
|
+
?no-primary-action="${item.additionalContent && item.selected}"
|
580
590
|
selectable
|
581
591
|
?selected="${item.selected}">
|
582
|
-
<div
|
583
|
-
<div class="d2l-filter-dimension-set-value-
|
584
|
-
|
592
|
+
<div>
|
593
|
+
<div class="d2l-filter-dimension-set-value d2l-body-compact">
|
594
|
+
<div class="d2l-filter-dimension-set-value-text">${item.text}</div>
|
595
|
+
${item.count !== undefined ? html`<div class="d2l-body-small">(${formatNumber(item.count)})</div>` : nothing}
|
596
|
+
${item.additionalContent
|
597
|
+
? html`<d2l-icon icon="${item.selected ? 'tier1:arrow-collapse-small' : 'tier1:arrow-expand-small'}"></d2l-icon>`
|
598
|
+
: nothing}
|
599
|
+
</div>
|
600
|
+
${item.additionalContent ? html`
|
601
|
+
<d2l-expand-collapse-content ?expanded="${item.selected}">
|
602
|
+
${item.additionalContent()}
|
603
|
+
</d2l-expand-collapse-content>
|
604
|
+
` : nothing}
|
585
605
|
</div>
|
586
606
|
</d2l-list-item>
|
587
607
|
`;
|
@@ -92,6 +92,11 @@ class InputDateRange extends FocusMixin(SkeletonMixin(FormElementMixin(RtlMixin(
|
|
92
92
|
* @type {string}
|
93
93
|
*/
|
94
94
|
minValue: { attribute: 'min-value', reflect: true, type: String },
|
95
|
+
/**
|
96
|
+
* Temporary.
|
97
|
+
* @ignore
|
98
|
+
*/
|
99
|
+
preferFixedPositioning: { type: Boolean, attribute: 'prefer-fixed-positioning' },
|
95
100
|
/**
|
96
101
|
* Indicates that values are required
|
97
102
|
* @type {boolean}
|
@@ -197,6 +202,7 @@ class InputDateRange extends FocusMixin(SkeletonMixin(FormElementMixin(RtlMixin(
|
|
197
202
|
max-value="${ifDefined(this.maxValue)}"
|
198
203
|
min-value="${ifDefined(this.minValue)}"
|
199
204
|
?opened="${this.startOpened}"
|
205
|
+
?prefer-fixed-positioning="${this.preferFixedPositioning}"
|
200
206
|
?required="${this.required}"
|
201
207
|
?skeleton="${this.skeleton}"
|
202
208
|
slot="left"
|
@@ -215,6 +221,7 @@ class InputDateRange extends FocusMixin(SkeletonMixin(FormElementMixin(RtlMixin(
|
|
215
221
|
max-value="${ifDefined(this.maxValue)}"
|
216
222
|
min-value="${ifDefined(this.minValue)}"
|
217
223
|
?opened="${this.endOpened}"
|
224
|
+
?prefer-fixed-positioning="${this.preferFixedPositioning}"
|
218
225
|
?required="${this.required}"
|
219
226
|
?skeleton="${this.skeleton}"
|
220
227
|
slot="right"
|
@@ -130,6 +130,11 @@ class InputDateTimeRange extends FocusMixin(SkeletonMixin(FormElementMixin(RtlMi
|
|
130
130
|
* @type {string}
|
131
131
|
*/
|
132
132
|
minValue: { attribute: 'min-value', reflect: true, type: String },
|
133
|
+
/**
|
134
|
+
* Temporary.
|
135
|
+
* @ignore
|
136
|
+
*/
|
137
|
+
preferFixedPositioning: { type: Boolean, attribute: 'prefer-fixed-positioning' },
|
133
138
|
/**
|
134
139
|
* Indicates that values are required
|
135
140
|
* @type {boolean}
|
@@ -248,6 +253,7 @@ class InputDateTimeRange extends FocusMixin(SkeletonMixin(FormElementMixin(RtlMi
|
|
248
253
|
max-value="${ifDefined(this.maxValue)}"
|
249
254
|
min-value="${ifDefined(this.minValue)}"
|
250
255
|
?opened="${this.startOpened}"
|
256
|
+
?prefer-fixed-positioning="${this.preferFixedPositioning}"
|
251
257
|
?required="${this.required}"
|
252
258
|
?skeleton="${this.skeleton}"
|
253
259
|
time-default-value="startOfDay"
|
@@ -270,6 +276,7 @@ class InputDateTimeRange extends FocusMixin(SkeletonMixin(FormElementMixin(RtlMi
|
|
270
276
|
max-value="${ifDefined(this.maxValue)}"
|
271
277
|
min-value="${ifDefined(this.minValue)}"
|
272
278
|
?opened="${this.endOpened}"
|
279
|
+
?prefer-fixed-positioning="${this.preferFixedPositioning}"
|
273
280
|
?required="${this.required}"
|
274
281
|
?skeleton="${this.skeleton}"
|
275
282
|
time-default-value="endOfDay"
|
@@ -76,6 +76,11 @@ class InputDateTime extends FocusMixin(LabelledMixin(SkeletonMixin(FormElementMi
|
|
76
76
|
* @type {boolean}
|
77
77
|
*/
|
78
78
|
opened: { type: Boolean },
|
79
|
+
/**
|
80
|
+
* Temporary.
|
81
|
+
* @ignore
|
82
|
+
*/
|
83
|
+
preferFixedPositioning: { type: Boolean, attribute: 'prefer-fixed-positioning' },
|
79
84
|
/**
|
80
85
|
* Indicates that a value is required
|
81
86
|
* @type {boolean}
|
@@ -248,6 +253,7 @@ class InputDateTime extends FocusMixin(LabelledMixin(SkeletonMixin(FormElementMi
|
|
248
253
|
label-hidden
|
249
254
|
.labelRequired="${false}"
|
250
255
|
max-height="430"
|
256
|
+
?prefer-fixed-positioning="${this.preferFixedPositioning}"
|
251
257
|
?required="${this.required}"
|
252
258
|
?skeleton="${this.skeleton}"
|
253
259
|
.value="${parsedValue}">
|
@@ -277,6 +283,7 @@ class InputDateTime extends FocusMixin(LabelledMixin(SkeletonMixin(FormElementMi
|
|
277
283
|
max-value="${ifDefined(this._maxValueLocalized)}"
|
278
284
|
min-value="${ifDefined(this._minValueLocalized)}"
|
279
285
|
?opened="${dateOpened}"
|
286
|
+
?prefer-fixed-positioning="${this.preferFixedPositioning}"
|
280
287
|
?required="${this.required}"
|
281
288
|
?skeleton="${this.skeleton}"
|
282
289
|
style="${styleMap(dateStyle)}"
|
@@ -73,6 +73,11 @@ class InputDate extends FocusMixin(LabelledMixin(SkeletonMixin(FormElementMixin(
|
|
73
73
|
* @type {boolean}
|
74
74
|
*/
|
75
75
|
opened: { type: Boolean, reflect: true },
|
76
|
+
/**
|
77
|
+
* Temporary.
|
78
|
+
* @ignore
|
79
|
+
*/
|
80
|
+
preferFixedPositioning: { type: Boolean, attribute: 'prefer-fixed-positioning' },
|
76
81
|
/**
|
77
82
|
* Indicates that a value is required
|
78
83
|
* @type {boolean}
|
@@ -256,7 +261,8 @@ class InputDate extends FocusMixin(LabelledMixin(SkeletonMixin(FormElementMixin(
|
|
256
261
|
trap-focus
|
257
262
|
no-auto-focus
|
258
263
|
mobile-tray="bottom"
|
259
|
-
no-padding
|
264
|
+
no-padding
|
265
|
+
?prefer-fixed-positioning="${this.preferFixedPositioning}">
|
260
266
|
<d2l-calendar
|
261
267
|
@d2l-calendar-selected="${this._handleDateSelected}"
|
262
268
|
label="${ifDefined(this.label)}"
|
@@ -277,7 +283,7 @@ class InputDate extends FocusMixin(LabelledMixin(SkeletonMixin(FormElementMixin(
|
|
277
283
|
<div>${this.emptyText}</div>
|
278
284
|
</div>
|
279
285
|
${errorTooltip}
|
280
|
-
<d2l-dropdown ?disabled="${this.disabled || this.skeleton}" no-auto-open>
|
286
|
+
<d2l-dropdown ?disabled="${this.disabled || this.skeleton}" no-auto-open ?prefer-fixed-positioning="${this.preferFixedPositioning}">
|
281
287
|
<d2l-input-text
|
282
288
|
?novalidate="${this.noValidate}"
|
283
289
|
aria-invalid="${this.invalid ? 'true' : 'false'}"
|
@@ -95,6 +95,11 @@ class InputTimeRange extends FocusMixin(SkeletonMixin(FormElementMixin(RtlMixin(
|
|
95
95
|
* @type {boolean}
|
96
96
|
*/
|
97
97
|
labelHidden: { attribute: 'label-hidden', reflect: true, type: Boolean },
|
98
|
+
/**
|
99
|
+
* Temporary.
|
100
|
+
* @ignore
|
101
|
+
*/
|
102
|
+
preferFixedPositioning: { type: Boolean, attribute: 'prefer-fixed-positioning' },
|
98
103
|
/**
|
99
104
|
* Indicates that values are required
|
100
105
|
* @type {boolean}
|
@@ -248,6 +253,7 @@ class InputTimeRange extends FocusMixin(SkeletonMixin(FormElementMixin(RtlMixin(
|
|
248
253
|
label="${startLabel}"
|
249
254
|
?label-hidden="${this.childLabelsHidden}"
|
250
255
|
?opened="${this.startOpened}"
|
256
|
+
?prefer-fixed-positioning="${this.preferFixedPositioning}"
|
251
257
|
?required="${this.required}"
|
252
258
|
?skeleton="${this.skeleton}"
|
253
259
|
slot="left"
|
@@ -266,6 +272,7 @@ class InputTimeRange extends FocusMixin(SkeletonMixin(FormElementMixin(RtlMixin(
|
|
266
272
|
label="${endLabel}"
|
267
273
|
?label-hidden="${this.childLabelsHidden}"
|
268
274
|
?opened="${this.endOpened}"
|
275
|
+
?prefer-fixed-positioning="${this.preferFixedPositioning}"
|
269
276
|
?required="${this.required}"
|
270
277
|
?skeleton="${this.skeleton}"
|
271
278
|
slot="right"
|
@@ -154,6 +154,11 @@ class InputTime extends InputInlineHelpMixin(FocusMixin(LabelledMixin(SkeletonMi
|
|
154
154
|
* @type {boolean}
|
155
155
|
*/
|
156
156
|
opened: { type: Boolean },
|
157
|
+
/**
|
158
|
+
* Temporary.
|
159
|
+
* @ignore
|
160
|
+
*/
|
161
|
+
preferFixedPositioning: { type: Boolean, attribute: 'prefer-fixed-positioning' },
|
157
162
|
/**
|
158
163
|
* Indicates that a value is required
|
159
164
|
* @type {boolean}
|
@@ -339,7 +344,7 @@ class InputTime extends InputInlineHelpMixin(FocusMixin(LabelledMixin(SkeletonMi
|
|
339
344
|
class="${this.label && !this.labelHidden && !this.labelledBy ? 'd2l-input-label d2l-skeletize' : 'd2l-offscreen'}"
|
340
345
|
for="${this._dropdownId}-input"
|
341
346
|
id="${this._dropdownId}-label">${this.label}</label>
|
342
|
-
<d2l-dropdown class="d2l-skeletize" ?disabled="${disabled}">
|
347
|
+
<d2l-dropdown class="d2l-skeletize" ?disabled="${disabled}" ?prefer-fixed-positioning="${this.preferFixedPositioning}">
|
343
348
|
<input
|
344
349
|
aria-invalid="${this.invalid ? 'true' : 'false'}"
|
345
350
|
aria-controls="${this._dropdownId}"
|
@@ -363,7 +368,8 @@ class InputTime extends InputInlineHelpMixin(FocusMixin(LabelledMixin(SkeletonMi
|
|
363
368
|
no-padding-footer
|
364
369
|
max-height="${ifDefined(this.maxHeight)}"
|
365
370
|
min-width="195"
|
366
|
-
?opened="${opened}"
|
371
|
+
?opened="${opened}"
|
372
|
+
?prefer-fixed-positioning="${this.preferFixedPositioning}">
|
367
373
|
<d2l-menu
|
368
374
|
aria-labelledby="${this._dropdownId}-label"
|
369
375
|
class="d2l-input-time-menu"
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@brightspace-ui/core",
|
3
|
-
"version": "3.
|
3
|
+
"version": "3.12.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",
|