@brightspace-ui/core 3.155.8 → 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.
@@ -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(RtlMixin(LocalizeCoreElement(LitElement)))))) {
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(RtlMixin(LocalizeCoreElement(LitElement)))))) {
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(RtlMixin(LitElement)))))) {
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.paddingLeft = '0';
223
- dateStyle.paddingRight = '0';
224
- } else if (!timeHidden && this.dir === 'rtl') {
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(RtlMixin(LitElement)))))) {
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 RtlMixin(LitElement) {
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-left: 1.7rem;
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(RtlMixin(LitElement))) {
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-left: 0.3rem;
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(RtlMixin(LitElement)))))) {
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-left: 0;
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-right: calc(18px + 0.8rem);
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(RtlMixin(LocalizeCoreElement(LitElement))))) {
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(RtlMixin(LitElement)))))) {
122
+ class InputTime extends InputInlineHelpMixin(FocusMixin(LabelledMixin(SkeletonMixin(FormElementMixin(LitElement))))) {
124
123
 
125
124
  static get properties() {
126
125
  return {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@brightspace-ui/core",
3
- "version": "3.155.8",
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",