@brightspace-ui/core 3.155.7 → 3.155.9
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-date-range.js +1 -2
- package/components/inputs/input-date-time-range.js +1 -2
- package/components/inputs/input-date-time.js +4 -10
- package/components/inputs/input-percent.js +1 -2
- package/components/inputs/input-radio-spacer.js +2 -7
- package/components/inputs/input-search.js +2 -4
- package/components/inputs/input-styles.js +2 -10
- package/components/inputs/input-textarea.js +3 -9
- package/components/inputs/input-time-range.js +1 -2
- package/components/inputs/input-time.js +1 -2
- package/components/scroll-wrapper/scroll-wrapper.js +12 -22
- package/package.json +2 -2
@@ -10,7 +10,6 @@ import { getUniqueId } from '../../helpers/uniqueId.js';
|
|
10
10
|
import { ifDefined } from 'lit/directives/if-defined.js';
|
11
11
|
import { InteractiveMixin } from '../../mixins/interactive/interactive-mixin.js';
|
12
12
|
import { LocalizeCoreElement } from '../../helpers/localize-core-element.js';
|
13
|
-
import { RtlMixin } from '../../mixins/rtl/rtl-mixin.js';
|
14
13
|
import { SkeletonMixin } from '../skeleton/skeleton-mixin.js';
|
15
14
|
|
16
15
|
export function getShiftedEndDate(startValue, endValue, prevStartValue, inclusive) {
|
@@ -33,7 +32,7 @@ export function getShiftedEndDate(startValue, endValue, prevStartValue, inclusiv
|
|
33
32
|
* @slot inline-help - Help text that will appear below the input. Use this only when other helpful cues are not sufficient, such as a carefully-worded label.
|
34
33
|
* @fires change - Dispatched when there is a change to selected start date or selected end date. `start-value` and `end-value` correspond to the selected values and are formatted in ISO 8601 calendar date format (`YYYY-MM-DD`).
|
35
34
|
*/
|
36
|
-
class InputDateRange extends InteractiveMixin(FocusMixin(SkeletonMixin(FormElementMixin(
|
35
|
+
class InputDateRange extends InteractiveMixin(FocusMixin(SkeletonMixin(FormElementMixin(LocalizeCoreElement(LitElement))))) {
|
37
36
|
|
38
37
|
static get properties() {
|
39
38
|
return {
|
@@ -11,7 +11,6 @@ import { getUniqueId } from '../../helpers/uniqueId.js';
|
|
11
11
|
import { ifDefined } from 'lit/directives/if-defined.js';
|
12
12
|
import { InteractiveMixin } from '../../mixins/interactive/interactive-mixin.js';
|
13
13
|
import { LocalizeCoreElement } from '../../helpers/localize-core-element.js';
|
14
|
-
import { RtlMixin } from '../../mixins/rtl/rtl-mixin.js';
|
15
14
|
import { SkeletonMixin } from '../skeleton/skeleton-mixin.js';
|
16
15
|
|
17
16
|
function _isSameDate(date1, date2) {
|
@@ -66,7 +65,7 @@ export function getShiftedEndDateTime(startValue, endValue, prevStartValue, incl
|
|
66
65
|
* @slot inline-help - Help text that will appear below the input. Use this only when other helpful cues are not sufficient, such as a carefully-worded label.
|
67
66
|
* @fires change - Dispatched when there is a change to selected start date-time or selected end date-time. `start-value` and `end-value` correspond to the selected values and are formatted in ISO 8601 combined date and time format (`YYYY-MM-DDTHH:mm:ss.sssZ`).
|
68
67
|
*/
|
69
|
-
class InputDateTimeRange extends InteractiveMixin(FocusMixin(SkeletonMixin(FormElementMixin(
|
68
|
+
class InputDateTimeRange extends InteractiveMixin(FocusMixin(SkeletonMixin(FormElementMixin(LocalizeCoreElement(LitElement))))) {
|
70
69
|
|
71
70
|
static get properties() {
|
72
71
|
return {
|
@@ -21,7 +21,6 @@ import { getUniqueId } from '../../helpers/uniqueId.js';
|
|
21
21
|
import { ifDefined } from 'lit/directives/if-defined.js';
|
22
22
|
import { LabelledMixin } from '../../mixins/labelled/labelled-mixin.js';
|
23
23
|
import { LocalizeCoreElement } from '../../helpers/localize-core-element.js';
|
24
|
-
import { RtlMixin } from '../../mixins/rtl/rtl-mixin.js';
|
25
24
|
import { SkeletonMixin } from '../skeleton/skeleton-mixin.js';
|
26
25
|
import { styleMap } from 'lit/directives/style-map.js';
|
27
26
|
|
@@ -42,7 +41,7 @@ function _getFormattedDefaultTime(defaultValue) {
|
|
42
41
|
* @slot inline-help - Help text that will appear below the input. Use this only when other helpful cues are not sufficient, such as a carefully-worded label.
|
43
42
|
* @fires change - Dispatched when there is a change to selected date or selected time. `value` corresponds to the selected value and is formatted in ISO 8601 combined date and time format (`YYYY-MM-DDTHH:mm:ss.sssZ`).
|
44
43
|
*/
|
45
|
-
class InputDateTime extends FocusMixin(LabelledMixin(SkeletonMixin(FormElementMixin(LocalizeCoreElement(
|
44
|
+
class InputDateTime extends FocusMixin(LabelledMixin(SkeletonMixin(FormElementMixin(LocalizeCoreElement(LitElement))))) {
|
46
45
|
|
47
46
|
static get properties() {
|
48
47
|
return {
|
@@ -219,14 +218,9 @@ class InputDateTime extends FocusMixin(LabelledMixin(SkeletonMixin(FormElementMi
|
|
219
218
|
|
220
219
|
const dateStyle = {};
|
221
220
|
if (timeHidden) {
|
222
|
-
dateStyle.
|
223
|
-
|
224
|
-
|
225
|
-
dateStyle.paddingLeft = '0.3rem';
|
226
|
-
dateStyle.paddingRight = '0';
|
227
|
-
} else if (!timeHidden) {
|
228
|
-
dateStyle.paddingLeft = '0';
|
229
|
-
dateStyle.paddingRight = '0.3rem';
|
221
|
+
dateStyle.paddingInline = '0';
|
222
|
+
} else {
|
223
|
+
dateStyle.paddingInline = '0 0.3rem';
|
230
224
|
}
|
231
225
|
|
232
226
|
const dateOpened = this.opened && !this._timeOpened && !this.disabled && !this.skeleton;
|
@@ -5,7 +5,6 @@ import { FormElementMixin } from '../form/form-element-mixin.js';
|
|
5
5
|
import { ifDefined } from 'lit/directives/if-defined.js';
|
6
6
|
import { LabelledMixin } from '../../mixins/labelled/labelled-mixin.js';
|
7
7
|
import { LocalizeCoreElement } from '../../helpers/localize-core-element.js';
|
8
|
-
import { RtlMixin } from '../../mixins/rtl/rtl-mixin.js';
|
9
8
|
import { SkeletonMixin } from '../skeleton/skeleton-mixin.js';
|
10
9
|
|
11
10
|
/**
|
@@ -14,7 +13,7 @@ import { SkeletonMixin } from '../skeleton/skeleton-mixin.js';
|
|
14
13
|
* @slot inline-help - Help text that will appear below the input. Use this only when other helpful cues are not sufficient, such as a carefully-worded label.
|
15
14
|
* @fires change - Dispatched when an alteration to the value is committed (typically after focus is lost) by the user. The `value` attribute reflects a JavaScript Number which is parsed from the formatted input value.
|
16
15
|
*/
|
17
|
-
class InputPercent extends FocusMixin(LabelledMixin(SkeletonMixin(FormElementMixin(LocalizeCoreElement(
|
16
|
+
class InputPercent extends FocusMixin(LabelledMixin(SkeletonMixin(FormElementMixin(LocalizeCoreElement(LitElement))))) {
|
18
17
|
|
19
18
|
static get properties() {
|
20
19
|
return {
|
@@ -1,11 +1,10 @@
|
|
1
1
|
import { css, html, LitElement } from 'lit';
|
2
|
-
import { RtlMixin } from '../../mixins/rtl/rtl-mixin.js';
|
3
2
|
|
4
3
|
/**
|
5
4
|
* Used to align related content below radio buttons
|
6
5
|
* @slot - Additional related content
|
7
6
|
*/
|
8
|
-
class InputRadioSpacer extends
|
7
|
+
class InputRadioSpacer extends LitElement {
|
9
8
|
|
10
9
|
static get styles() {
|
11
10
|
return css`
|
@@ -13,11 +12,7 @@ class InputRadioSpacer extends RtlMixin(LitElement) {
|
|
13
12
|
box-sizing: border-box;
|
14
13
|
display: block;
|
15
14
|
margin-bottom: 0.9rem;
|
16
|
-
padding-
|
17
|
-
}
|
18
|
-
:host([dir="rtl"]) {
|
19
|
-
padding-left: 0;
|
20
|
-
padding-right: 1.7rem;
|
15
|
+
padding-inline-start: 1.7rem;
|
21
16
|
}
|
22
17
|
:host(.d2l-input-inline-help) {
|
23
18
|
margin-bottom: 0.9rem !important;
|
@@ -6,7 +6,6 @@ import { FocusMixin } from '../../mixins/focus/focus-mixin.js';
|
|
6
6
|
import { ifDefined } from 'lit/directives/if-defined.js';
|
7
7
|
import { inputStyles } from './input-styles.js';
|
8
8
|
import { LocalizeCoreElement } from '../../helpers/localize-core-element.js';
|
9
|
-
import { RtlMixin } from '../../mixins/rtl/rtl-mixin.js';
|
10
9
|
|
11
10
|
export const INPUT_TIMEOUT_MS = 400;
|
12
11
|
export const SUPPRESS_ENTER_TIMEOUT_MS = 1000;
|
@@ -16,7 +15,7 @@ export const SUPPRESS_ENTER_TIMEOUT_MS = 1000;
|
|
16
15
|
* @slot inline-help - Help text that will appear below the input. Use this only when other helpful cues are not sufficient, such as a carefully-worded label.
|
17
16
|
* @fires d2l-input-search-searched - Dispatched when a search is performed. When the input is cleared, this will be fired with an empty value.
|
18
17
|
*/
|
19
|
-
class InputSearch extends FocusMixin(LocalizeCoreElement(
|
18
|
+
class InputSearch extends FocusMixin(LocalizeCoreElement(LitElement)) {
|
20
19
|
|
21
20
|
static get properties() {
|
22
21
|
return {
|
@@ -81,8 +80,7 @@ class InputSearch extends FocusMixin(LocalizeCoreElement(RtlMixin(LitElement)))
|
|
81
80
|
--d2l-button-icon-min-width: 1.5rem;
|
82
81
|
--d2l-button-icon-border-radius: 4px;
|
83
82
|
--d2l-focus-ring-offset: 1px;
|
84
|
-
margin-
|
85
|
-
margin-right: 0.3rem;
|
83
|
+
margin-inline: 0.3rem;
|
86
84
|
}
|
87
85
|
`
|
88
86
|
];
|
@@ -92,7 +92,7 @@ export const inputStyles = css`
|
|
92
92
|
}
|
93
93
|
textarea.d2l-input[aria-invalid="true"] {
|
94
94
|
background-image: ${invalidIcon};
|
95
|
-
background-position: top 12px right 18px;
|
95
|
+
background-position: top 12px var(--d2l-inline-end, right) 18px;
|
96
96
|
background-repeat: no-repeat;
|
97
97
|
background-size: 0.8rem 0.8rem;
|
98
98
|
padding-inline-end: calc(18px + 0.8rem);
|
@@ -100,17 +100,9 @@ export const inputStyles = css`
|
|
100
100
|
textarea.d2l-input-focus[aria-invalid="true"],
|
101
101
|
textarea.d2l-input[aria-invalid="true"]:hover,
|
102
102
|
textarea.d2l-input[aria-invalid="true"]:${focusClass} {
|
103
|
-
background-position: top calc(12px - 1px) right calc(18px - 1px);
|
103
|
+
background-position: top calc(12px - 1px) var(--d2l-inline-end, right) calc(18px - 1px);
|
104
104
|
padding-inline-end: calc(18px + 0.8rem - 1px);
|
105
105
|
}
|
106
|
-
:host([dir="rtl"]) textarea.d2l-input[aria-invalid="true"] {
|
107
|
-
background-position: top 12px left 18px;
|
108
|
-
}
|
109
|
-
:host([dir="rtl"]) textarea.d2l-input-focus[aria-invalid="true"],
|
110
|
-
:host([dir="rtl"]) textarea.d2l-input[aria-invalid="true"]:${focusClass},
|
111
|
-
:host([dir="rtl"]) textarea.d2l-input[aria-invalid="true"]:hover {
|
112
|
-
background-position: top calc(12px - 1px) left calc(18px - 1px);
|
113
|
-
}
|
114
106
|
textarea[aria-invalid="true"].d2l-input:disabled {
|
115
107
|
background-image: none;
|
116
108
|
}
|
@@ -11,7 +11,6 @@ import { inputLabelStyles } from './input-label-styles.js';
|
|
11
11
|
import { inputStyles } from './input-styles.js';
|
12
12
|
import { LabelledMixin } from '../../mixins/labelled/labelled-mixin.js';
|
13
13
|
import { offscreenStyles } from '../offscreen/offscreen.js';
|
14
|
-
import { RtlMixin } from '../../mixins/rtl/rtl-mixin.js';
|
15
14
|
import { SkeletonMixin } from '../skeleton/skeleton-mixin.js';
|
16
15
|
import { styleMap } from 'lit/directives/style-map.js';
|
17
16
|
|
@@ -21,7 +20,7 @@ import { styleMap } from 'lit/directives/style-map.js';
|
|
21
20
|
* @fires change - Dispatched when an alteration to the value is committed (typically after focus is lost) by the user
|
22
21
|
* @fires input - Dispatched immediately after changes by the user
|
23
22
|
*/
|
24
|
-
class InputTextArea extends InputInlineHelpMixin(FocusMixin(LabelledMixin(FormElementMixin(SkeletonMixin(
|
23
|
+
class InputTextArea extends InputInlineHelpMixin(FocusMixin(LabelledMixin(FormElementMixin(SkeletonMixin(LitElement))))) {
|
25
24
|
|
26
25
|
static get properties() {
|
27
26
|
return {
|
@@ -132,8 +131,7 @@ class InputTextArea extends InputInlineHelpMixin(FocusMixin(LabelledMixin(FormEl
|
|
132
131
|
visibility: hidden;
|
133
132
|
}
|
134
133
|
:host([no-padding]) .d2l-input {
|
135
|
-
padding-
|
136
|
-
padding-right: 0;
|
134
|
+
padding-inline: 0;
|
137
135
|
}
|
138
136
|
:host([no-border][no-padding]) textarea.d2l-input:hover,
|
139
137
|
:host([no-border][no-padding]) textarea.d2l-input:focus {
|
@@ -141,11 +139,7 @@ class InputTextArea extends InputInlineHelpMixin(FocusMixin(LabelledMixin(FormEl
|
|
141
139
|
border-right-width: 1px;
|
142
140
|
}
|
143
141
|
.d2l-input-textarea-mirror[aria-invalid="true"] {
|
144
|
-
padding-
|
145
|
-
}
|
146
|
-
:host([dir="rtl"]) .d2l-input-textarea-mirror[aria-invalid="true"] {
|
147
|
-
padding-left: calc(18px + 0.8rem);
|
148
|
-
padding-right: 0.75rem;
|
142
|
+
padding-inline-end: calc(18px + 0.8rem);
|
149
143
|
}
|
150
144
|
`];
|
151
145
|
}
|
@@ -9,7 +9,6 @@ import { FormElementMixin } from '../form/form-element-mixin.js';
|
|
9
9
|
import { getUniqueId } from '../../helpers/uniqueId.js';
|
10
10
|
import { ifDefined } from 'lit/directives/if-defined.js';
|
11
11
|
import { LocalizeCoreElement } from '../../helpers/localize-core-element.js';
|
12
|
-
import { RtlMixin } from '../../mixins/rtl/rtl-mixin.js';
|
13
12
|
import { SkeletonMixin } from '../skeleton/skeleton-mixin.js';
|
14
13
|
|
15
14
|
export function getShiftedEndTime(startValue, endValue, prevStartValue, inclusive) {
|
@@ -40,7 +39,7 @@ function getValidISOTimeAtInterval(val, timeInterval) {
|
|
40
39
|
* @fires change - Dispatched when there is a change to selected start time or selected end time. `start-value` and `end-value` correspond to the selected values and are formatted in ISO 8601 calendar time format (`hh:mm:ss`).
|
41
40
|
*/
|
42
41
|
|
43
|
-
class InputTimeRange extends FocusMixin(SkeletonMixin(FormElementMixin(
|
42
|
+
class InputTimeRange extends FocusMixin(SkeletonMixin(FormElementMixin(LocalizeCoreElement(LitElement)))) {
|
44
43
|
|
45
44
|
static get properties() {
|
46
45
|
return {
|
@@ -17,7 +17,6 @@ import { inputStyles } from './input-styles.js';
|
|
17
17
|
import { LabelledMixin } from '../../mixins/labelled/labelled-mixin.js';
|
18
18
|
import { offscreenStyles } from '../offscreen/offscreen.js';
|
19
19
|
import ResizeObserver from 'resize-observer-polyfill/dist/ResizeObserver.es.js';
|
20
|
-
import { RtlMixin } from '../../mixins/rtl/rtl-mixin.js';
|
21
20
|
import { SkeletonMixin } from '../skeleton/skeleton-mixin.js';
|
22
21
|
|
23
22
|
const MIDNIGHT = new Date(2020, 0, 1, 0, 0, 0);
|
@@ -120,7 +119,7 @@ function initIntervals(size, enforceTimeIntervals) {
|
|
120
119
|
* @slot inline-help - Help text that will appear below the input. Use this only when other helpful cues are not sufficient, such as a carefully-worded label.
|
121
120
|
* @fires change - Dispatched when there is a change to selected time. `value` corresponds to the selected value and is formatted in ISO 8601 time format (`hh:mm:ss`).
|
122
121
|
*/
|
123
|
-
class InputTime extends InputInlineHelpMixin(FocusMixin(LabelledMixin(SkeletonMixin(FormElementMixin(
|
122
|
+
class InputTime extends InputInlineHelpMixin(FocusMixin(LabelledMixin(SkeletonMixin(FormElementMixin(LitElement))))) {
|
124
123
|
|
125
124
|
static get properties() {
|
126
125
|
return {
|
@@ -5,7 +5,6 @@ import { classMap } from 'lit/directives/class-map.js';
|
|
5
5
|
import { getFlag } from '../../helpers/flags.js';
|
6
6
|
import { getFocusRingStyles } from '../../helpers/focus.js';
|
7
7
|
import ResizeObserver from 'resize-observer-polyfill/dist/ResizeObserver.es.js';
|
8
|
-
import { RtlMixin } from '../../mixins/rtl/rtl-mixin.js';
|
9
8
|
|
10
9
|
export const printMediaQueryOnlyFlag = getFlag('GAUD-8263-scroll-wrapper-media-print', false);
|
11
10
|
|
@@ -44,7 +43,7 @@ function getStyleSheetInsertionPoint(elem) {
|
|
44
43
|
* Wraps content which may overflow its horizontal boundaries, providing left/right scroll buttons.
|
45
44
|
* @slot - User provided content to wrap
|
46
45
|
*/
|
47
|
-
class ScrollWrapper extends
|
46
|
+
class ScrollWrapper extends LitElement {
|
48
47
|
|
49
48
|
static get properties() {
|
50
49
|
return {
|
@@ -97,32 +96,23 @@ class ScrollWrapper extends RtlMixin(LitElement) {
|
|
97
96
|
overflow-y: var(--d2l-scroll-wrapper-overflow-y, visible);
|
98
97
|
}
|
99
98
|
:host([h-scrollbar]) .d2l-scroll-wrapper-container {
|
100
|
-
border-
|
101
|
-
border-right: 1px dashed var(--d2l-color-mica);
|
99
|
+
border-inline: 1px dashed var(--d2l-color-mica);
|
102
100
|
}
|
103
101
|
:host([h-scrollbar][hide-actions]) .d2l-scroll-wrapper-container {
|
104
|
-
border-
|
105
|
-
border-right: none;
|
102
|
+
border-inline: none;
|
106
103
|
}
|
107
|
-
:host([
|
108
|
-
|
109
|
-
border-left: none;
|
104
|
+
:host([scrollbar-left]) .d2l-scroll-wrapper-container {
|
105
|
+
border-inline-start: none;
|
110
106
|
}
|
111
|
-
:host([
|
112
|
-
|
113
|
-
border-right: none;
|
107
|
+
:host([scrollbar-right]) .d2l-scroll-wrapper-container {
|
108
|
+
border-inline-end: none;
|
114
109
|
}
|
115
110
|
|
116
|
-
:host([dir="rtl"]) .d2l-scroll-wrapper-button-left,
|
117
|
-
.d2l-scroll-wrapper-button-right {
|
118
|
-
left: auto;
|
119
|
-
right: -10px;
|
120
|
-
}
|
121
|
-
|
122
|
-
:host([dir="rtl"]) .d2l-scroll-wrapper-button-right,
|
123
111
|
.d2l-scroll-wrapper-button-left {
|
124
|
-
|
125
|
-
|
112
|
+
inset-inline-start: -10px;
|
113
|
+
}
|
114
|
+
.d2l-scroll-wrapper-button-right {
|
115
|
+
inset-inline-end: -10px;
|
126
116
|
}
|
127
117
|
|
128
118
|
.d2l-scroll-wrapper-actions {
|
@@ -270,7 +260,7 @@ class ScrollWrapper extends RtlMixin(LitElement) {
|
|
270
260
|
|
271
261
|
scrollDistance(distance, smooth) {
|
272
262
|
if (!this._container) return;
|
273
|
-
if (
|
263
|
+
if (document.documentElement.getAttribute('dir') === 'rtl') distance = distance * RTL_MULTIPLIER;
|
274
264
|
if (this._container.scrollBy) {
|
275
265
|
this._container.scrollBy({ left: distance, behavior: smooth ? 'smooth' : 'auto' });
|
276
266
|
} else {
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@brightspace-ui/core",
|
3
|
-
"version": "3.155.
|
3
|
+
"version": "3.155.9",
|
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",
|
@@ -54,7 +54,7 @@
|
|
54
54
|
"chalk": "^5",
|
55
55
|
"eslint": "^9",
|
56
56
|
"eslint-config-brightspace": "^2.0.0",
|
57
|
-
"eslint-plugin-unicorn": "^
|
57
|
+
"eslint-plugin-unicorn": "^60",
|
58
58
|
"glob-all": "^3",
|
59
59
|
"messageformat-validator": "^3.0.0-beta",
|
60
60
|
"rollup": "^4",
|