@brightspace-ui/core 3.162.0 → 3.162.2
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/docs/input-date-time.md +1 -1
- package/components/inputs/input-date-time-range.js +14 -0
- package/components/inputs/input-date-time.js +2 -0
- package/components/inputs/input-time-range.js +2 -0
- package/components/progress/progress.js +3 -2
- package/custom-elements.json +22 -0
- package/package.json +1 -1
@@ -292,7 +292,7 @@ A few notable accessibility-related features of these components are:
|
|
292
292
|
* When the date input is opened with the keyboard, focus goes to either selected date, today, or earliest valid date if today is prior to `min-date`
|
293
293
|
* Extensive intuitive keyboard interaction support
|
294
294
|
|
295
|
-
##
|
295
|
+
## Time Zone
|
296
296
|
|
297
297
|
The `input-date-time` and `input-date-time-range` components expect input in UTC (`YYYY-MM-DDTHH:mm:ss.sssZ`). These components will convert values automatically to the user's time zone to display the date/time to them, and then will provide the value back in UTC. No time zone conversions are needed.
|
298
298
|
|
@@ -151,6 +151,16 @@ class InputDateTimeRange extends InteractiveMixin(FocusMixin(SkeletonMixin(FormE
|
|
151
151
|
* @type {string}
|
152
152
|
*/
|
153
153
|
startValue: { attribute: 'start-value', reflect: true, type: String },
|
154
|
+
/**
|
155
|
+
* Timezone identifier for the time inputs to use.
|
156
|
+
* @type {string}
|
157
|
+
*/
|
158
|
+
timeZoneId: { type: String },
|
159
|
+
/**
|
160
|
+
* Hides the time zone inside the time selection dropdowns. Should only be used when the time input values are not related to any one time zone
|
161
|
+
* @type {Boolean}
|
162
|
+
*/
|
163
|
+
timeZoneHidden: { type: Boolean, attribute: 'time-zone-hidden' },
|
154
164
|
_slotOccupied: { type: Boolean }
|
155
165
|
};
|
156
166
|
}
|
@@ -251,6 +261,8 @@ class InputDateTimeRange extends InteractiveMixin(FocusMixin(SkeletonMixin(FormE
|
|
251
261
|
?required="${this.required}"
|
252
262
|
?skeleton="${this.skeleton}"
|
253
263
|
time-default-value="startOfDay"
|
264
|
+
time-zone-id="${ifDefined(this.timeZoneId)}"
|
265
|
+
?time-zone-hidden="${this.timeZoneHidden}"
|
254
266
|
value="${ifDefined(this.startValue)}">
|
255
267
|
</d2l-input-date-time>
|
256
268
|
<slot name="start" @slotchange="${this._onSlotChange}"></slot>
|
@@ -273,6 +285,8 @@ class InputDateTimeRange extends InteractiveMixin(FocusMixin(SkeletonMixin(FormE
|
|
273
285
|
?required="${this.required}"
|
274
286
|
?skeleton="${this.skeleton}"
|
275
287
|
time-default-value="endOfDay"
|
288
|
+
time-zone-id="${ifDefined(this.timeZoneId)}"
|
289
|
+
?time-zone-hidden="${this.timeZoneHidden}"
|
276
290
|
value="${ifDefined(this.endValue)}">
|
277
291
|
</d2l-input-date-time>
|
278
292
|
<slot name="end" @slotchange="${this._onSlotChange}"></slot>
|
@@ -254,6 +254,8 @@ class InputDateTime extends FocusMixin(LabelledMixin(SkeletonMixin(FormElementMi
|
|
254
254
|
max-height="430"
|
255
255
|
?required="${this.required}"
|
256
256
|
?skeleton="${this.skeleton}"
|
257
|
+
time-zone-id="${ifDefined(this.timeZoneId)}"
|
258
|
+
?time-zone-hidden="${this.timeZoneHidden}"
|
257
259
|
.value="${parsedValue}">
|
258
260
|
</d2l-input-time>` : null;
|
259
261
|
|
@@ -281,6 +281,8 @@ class InputTimeRange extends FocusMixin(SkeletonMixin(FormElementMixin(LocalizeC
|
|
281
281
|
?skeleton="${this.skeleton}"
|
282
282
|
slot="right"
|
283
283
|
time-interval="${ifDefined(timeInterval)}"
|
284
|
+
time-zone-id="${ifDefined(this.timeZoneId)}"
|
285
|
+
?time-zone-hidden="${this.timeZoneHidden}"
|
284
286
|
value="${ifDefined(this.endValue)}">
|
285
287
|
</d2l-input-time>
|
286
288
|
</d2l-input-date-time-range-to>
|
@@ -49,7 +49,8 @@ class Progress extends LitElement {
|
|
49
49
|
display: block;
|
50
50
|
min-width: 6rem;
|
51
51
|
}
|
52
|
-
:host([hidden])
|
52
|
+
:host([hidden]),
|
53
|
+
.text[hidden] {
|
53
54
|
display: none;
|
54
55
|
}
|
55
56
|
.text {
|
@@ -130,7 +131,7 @@ class Progress extends LitElement {
|
|
130
131
|
const perecentageText = formatPercent(percentage);
|
131
132
|
|
132
133
|
return html`
|
133
|
-
<div class=${classMap(textClasses)} >
|
134
|
+
<div class=${classMap(textClasses)} ?hidden=${(this.labelHidden || !this.label) && this.valueHidden}>
|
134
135
|
<span ?hidden=${this.labelHidden} id="label">${this.label}</span>
|
135
136
|
<span style="font-size: 0;">${getSeparator({ nonBreaking: true })}</span>
|
136
137
|
<span ?hidden=${this.valueHidden}>${perecentageText}</span>
|
package/custom-elements.json
CHANGED
@@ -5881,6 +5881,16 @@
|
|
5881
5881
|
"description": "Value of the start date-time input",
|
5882
5882
|
"type": "string"
|
5883
5883
|
},
|
5884
|
+
{
|
5885
|
+
"name": "timeZoneId",
|
5886
|
+
"description": "Timezone identifier for the time inputs to use.",
|
5887
|
+
"type": "string"
|
5888
|
+
},
|
5889
|
+
{
|
5890
|
+
"name": "time-zone-hidden",
|
5891
|
+
"description": "Hides the time zone inside the time selection dropdowns. Should only be used when the time input values are not related to any one time zone",
|
5892
|
+
"type": "Boolean"
|
5893
|
+
},
|
5884
5894
|
{
|
5885
5895
|
"name": "auto-shift-dates",
|
5886
5896
|
"description": "ADVANCED: Automatically shifts end date when start date changes to keep same range. If start and end date are equal, automatically shifts end time when start time changes.",
|
@@ -5991,6 +6001,18 @@
|
|
5991
6001
|
"description": "Value of the start date-time input",
|
5992
6002
|
"type": "string"
|
5993
6003
|
},
|
6004
|
+
{
|
6005
|
+
"name": "timeZoneId",
|
6006
|
+
"attribute": "timeZoneId",
|
6007
|
+
"description": "Timezone identifier for the time inputs to use.",
|
6008
|
+
"type": "string"
|
6009
|
+
},
|
6010
|
+
{
|
6011
|
+
"name": "timeZoneHidden",
|
6012
|
+
"attribute": "time-zone-hidden",
|
6013
|
+
"description": "Hides the time zone inside the time selection dropdowns. Should only be used when the time input values are not related to any one time zone",
|
6014
|
+
"type": "Boolean"
|
6015
|
+
},
|
5994
6016
|
{
|
5995
6017
|
"name": "autoShiftDates",
|
5996
6018
|
"attribute": "auto-shift-dates",
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@brightspace-ui/core",
|
3
|
-
"version": "3.162.
|
3
|
+
"version": "3.162.2",
|
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",
|