@brightspace-ui/core 3.156.0 → 3.156.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/list/list-item-drag-handle.js +5 -4
- package/components/list/list-item-drag-image.js +3 -8
- package/components/list/list-item-generic-layout.js +11 -8
- package/components/list/list-item-mixin.js +8 -30
- package/components/list/list-item-placement-marker.js +3 -16
- package/components/typography/styles.js +6 -0
- package/package.json +1 -1
- package/templates/primary-secondary/primary-secondary.js +27 -55
@@ -7,7 +7,6 @@ import { FocusMixin } from '../../mixins/focus/focus-mixin.js';
|
|
7
7
|
import { getUniqueId } from '../../helpers/uniqueId.js';
|
8
8
|
import { LocalizeCoreElement } from '../../helpers/localize-core-element.js';
|
9
9
|
import { moveActions } from '../button/button-move.js';
|
10
|
-
import { RtlMixin } from '../../mixins/rtl/rtl-mixin.js';
|
11
10
|
|
12
11
|
const keyCodes = Object.freeze({
|
13
12
|
DOWN: 40,
|
@@ -43,7 +42,7 @@ let hasDisplayedKeyboardTooltip = false;
|
|
43
42
|
/**
|
44
43
|
* @fires d2l-list-item-drag-handle-action - Dispatched when an action performed on the drag handle
|
45
44
|
*/
|
46
|
-
class ListItemDragHandle extends LocalizeCoreElement(FocusMixin(
|
45
|
+
class ListItemDragHandle extends LocalizeCoreElement(FocusMixin(LitElement)) {
|
47
46
|
|
48
47
|
static get properties() {
|
49
48
|
return {
|
@@ -186,6 +185,8 @@ class ListItemDragHandle extends LocalizeCoreElement(FocusMixin(RtlMixin(LitElem
|
|
186
185
|
|
187
186
|
async _onMoveButtonAction(e) {
|
188
187
|
|
188
|
+
const isRtl = document.documentElement.getAttribute('dir') === 'rtl';
|
189
|
+
|
189
190
|
let action = null;
|
190
191
|
switch (e.detail.action) {
|
191
192
|
case moveActions.up:
|
@@ -199,11 +200,11 @@ class ListItemDragHandle extends LocalizeCoreElement(FocusMixin(RtlMixin(LitElem
|
|
199
200
|
break;
|
200
201
|
case moveActions.right:
|
201
202
|
this._movingElement = true;
|
202
|
-
action = (
|
203
|
+
action = (isRtl ? dragActions.unnest : dragActions.nest);
|
203
204
|
break;
|
204
205
|
case moveActions.left:
|
205
206
|
this._movingElement = true;
|
206
|
-
action = (
|
207
|
+
action = (isRtl ? dragActions.nest : dragActions.unnest) ;
|
207
208
|
break;
|
208
209
|
case moveActions.rootHome:
|
209
210
|
this._movingElement = true;
|
@@ -4,10 +4,9 @@ import { css, html, LitElement } from 'lit';
|
|
4
4
|
import { bodySmallStyles } from '../typography/styles.js';
|
5
5
|
import { formatNumber } from '@brightspace-ui/intl/lib/number.js';
|
6
6
|
import { LocalizeCoreElement } from '../../helpers/localize-core-element.js';
|
7
|
-
import { RtlMixin } from '../../mixins/rtl/rtl-mixin.js';
|
8
7
|
import { SkeletonMixin } from '../skeleton/skeleton-mixin.js';
|
9
8
|
|
10
|
-
class ListItemDragImage extends LocalizeCoreElement(SkeletonMixin(
|
9
|
+
class ListItemDragImage extends LocalizeCoreElement(SkeletonMixin(LitElement)) {
|
11
10
|
|
12
11
|
static get properties() {
|
13
12
|
return {
|
@@ -24,7 +23,7 @@ class ListItemDragImage extends LocalizeCoreElement(SkeletonMixin(RtlMixin(LitEl
|
|
24
23
|
:host {
|
25
24
|
display: block;
|
26
25
|
height: 70px;
|
27
|
-
|
26
|
+
inset-inline-start: -10000px;
|
28
27
|
position: absolute;
|
29
28
|
width: 340px;
|
30
29
|
z-index: 0;
|
@@ -32,10 +31,6 @@ class ListItemDragImage extends LocalizeCoreElement(SkeletonMixin(RtlMixin(LitEl
|
|
32
31
|
:host([hidden]) {
|
33
32
|
display: none;
|
34
33
|
}
|
35
|
-
:host([dir="rtl"]) {
|
36
|
-
left: 0;
|
37
|
-
right: -10000px;
|
38
|
-
}
|
39
34
|
.first, .second, .third {
|
40
35
|
background-color: white;
|
41
36
|
border: 1px solid var(--d2l-color-mica);
|
@@ -90,7 +85,7 @@ class ListItemDragImage extends LocalizeCoreElement(SkeletonMixin(RtlMixin(LitEl
|
|
90
85
|
top: 30px;
|
91
86
|
z-index: 998; /* must be higher than the skeleton z-index */
|
92
87
|
}
|
93
|
-
:
|
88
|
+
.count:dir(rtl) {
|
94
89
|
left: 14px;
|
95
90
|
}
|
96
91
|
`];
|
@@ -3,7 +3,6 @@ import { findComposedAncestor, isComposedAncestor } from '../../helpers/dom.js';
|
|
3
3
|
import { getComposedActiveElement, getFirstFocusableDescendant, getFocusableDescendants, getLastFocusableDescendant, getNextFocusable, getPreviousFocusable } from '../../helpers/focus.js';
|
4
4
|
import { getFlag } from '../../helpers/flags.js';
|
5
5
|
import { isInteractiveDescendant } from '../../mixins/interactive/interactive-mixin.js';
|
6
|
-
import { RtlMixin } from '../../mixins/rtl/rtl-mixin.js';
|
7
6
|
|
8
7
|
const keyCodes = {
|
9
8
|
DOWN: 40,
|
@@ -20,6 +19,10 @@ const keyCodes = {
|
|
20
19
|
|
21
20
|
const listItemUpButtonFixFlag = getFlag('GAUD-8229-list-up-button-fix', true);
|
22
21
|
|
22
|
+
function isRtl() {
|
23
|
+
return document.documentElement.getAttribute('dir') === 'rtl';
|
24
|
+
}
|
25
|
+
|
23
26
|
/**
|
24
27
|
* A component for generating a list item's layout with forced focus ordering and grid support.
|
25
28
|
* Focusable items placed in the "content" slot will have their focus removed; use the content-action
|
@@ -33,7 +36,7 @@ const listItemUpButtonFixFlag = getFlag('GAUD-8229-list-up-button-fix', true);
|
|
33
36
|
* @slot actions - Other actions for the list item on the far right, such as a context menu
|
34
37
|
* @slot nested - Optional `d2l-list` for creating nested lists
|
35
38
|
*/
|
36
|
-
class ListItemGenericLayout extends
|
39
|
+
class ListItemGenericLayout extends LitElement {
|
37
40
|
|
38
41
|
static get properties() {
|
39
42
|
return {
|
@@ -289,7 +292,7 @@ class ListItemGenericLayout extends RtlMixin(LitElement) {
|
|
289
292
|
_focusFirstRow() {
|
290
293
|
const list = findComposedAncestor(this, (node) => node.tagName === 'D2L-LIST');
|
291
294
|
const row = list.firstElementChild.shadowRoot.querySelector('[role="gridcell"]');
|
292
|
-
if (
|
295
|
+
if (isRtl()) {
|
293
296
|
row._focusLastCell();
|
294
297
|
} else {
|
295
298
|
row._focusFirstCell();
|
@@ -312,7 +315,7 @@ class ListItemGenericLayout extends RtlMixin(LitElement) {
|
|
312
315
|
_focusLastRow() {
|
313
316
|
const list = findComposedAncestor(this, (node) => node.tagName === 'D2L-LIST');
|
314
317
|
const row = list.lastElementChild.shadowRoot.querySelector('[role="gridcell"]');
|
315
|
-
if (
|
318
|
+
if (isRtl()) {
|
316
319
|
row._focusFirstCell();
|
317
320
|
} else {
|
318
321
|
row._focusLastCell();
|
@@ -485,14 +488,14 @@ class ListItemGenericLayout extends RtlMixin(LitElement) {
|
|
485
488
|
|
486
489
|
switch (e.keyCode) {
|
487
490
|
case keyCodes.RIGHT:
|
488
|
-
if (
|
491
|
+
if (isRtl()) {
|
489
492
|
this._focusPreviousWithinRow(focusInfo, focusables);
|
490
493
|
} else {
|
491
494
|
this._focusNextWithinRow(focusInfo, focusables);
|
492
495
|
}
|
493
496
|
break;
|
494
497
|
case keyCodes.LEFT:
|
495
|
-
if (
|
498
|
+
if (isRtl()) {
|
496
499
|
this._focusNextWithinRow(focusInfo, focusables);
|
497
500
|
} else {
|
498
501
|
this._focusPreviousWithinRow(focusInfo, focusables);
|
@@ -507,7 +510,7 @@ class ListItemGenericLayout extends RtlMixin(LitElement) {
|
|
507
510
|
this._focusNextRow(focusInfo);
|
508
511
|
break;
|
509
512
|
case keyCodes.HOME:
|
510
|
-
if (
|
513
|
+
if (isRtl()) {
|
511
514
|
if (e.ctrlKey) {
|
512
515
|
this._focusFirstRow();
|
513
516
|
} else {
|
@@ -525,7 +528,7 @@ class ListItemGenericLayout extends RtlMixin(LitElement) {
|
|
525
528
|
}
|
526
529
|
break;
|
527
530
|
case keyCodes.END:
|
528
|
-
if (
|
531
|
+
if (isRtl()) {
|
529
532
|
if (e.ctrlKey) {
|
530
533
|
// focus first item of last row
|
531
534
|
this._focusLastRow();
|
@@ -247,11 +247,8 @@ export const ListItemMixin = superclass => class extends composeMixins(
|
|
247
247
|
[slot="content"] {
|
248
248
|
display: flex;
|
249
249
|
justify-content: start;
|
250
|
-
padding: 0.55rem
|
251
|
-
|
252
|
-
:host([dir="rtl"]) [slot="content"] {
|
253
|
-
padding-left: 0.55rem;
|
254
|
-
padding-right: 0;
|
250
|
+
padding-block: 0.55rem;
|
251
|
+
padding-inline: 0 0.55rem;
|
255
252
|
}
|
256
253
|
:host([padding-type="none"]) [slot="content"] {
|
257
254
|
padding-bottom: 0;
|
@@ -292,12 +289,7 @@ export const ListItemMixin = superclass => class extends composeMixins(
|
|
292
289
|
|
293
290
|
.d2l-list-item-content-extend-separators ::slotted([slot="actions"]),
|
294
291
|
.d2l-list-item-content-extend-separators .d2l-list-item-actions > * {
|
295
|
-
margin-
|
296
|
-
}
|
297
|
-
:host([dir="rtl"]) .d2l-list-item-content-extend-separators ::slotted([slot="actions"]),
|
298
|
-
:host([dir="rtl"]) .d2l-list-item-content-extend-separators .d2l-list-item-actions > * {
|
299
|
-
margin-left: 0.9rem;
|
300
|
-
margin-right: 0;
|
292
|
+
margin-inline-end: 0.9rem;
|
301
293
|
}
|
302
294
|
|
303
295
|
d2l-selection-input {
|
@@ -453,31 +445,17 @@ export const ListItemMixin = superclass => class extends composeMixins(
|
|
453
445
|
width: var(--d2l-list-item-color-width, 6px);
|
454
446
|
}
|
455
447
|
.d2l-list-item-color-outer {
|
456
|
-
padding: 2px
|
457
|
-
|
458
|
-
:host([dir="rtl"]) .d2l-list-item-color-outer {
|
459
|
-
padding-left: 12px;
|
460
|
-
padding-right: 0;
|
448
|
+
padding-block: 2px 1px;
|
449
|
+
padding-inline: 0 12px;
|
461
450
|
}
|
462
451
|
:host(:not([_nested])) .d2l-list-item-content-extend-separators .d2l-list-item-color-outer {
|
463
|
-
padding-
|
464
|
-
}
|
465
|
-
:host(:not([_nested])[dir="rtl"]) .d2l-list-item-content-extend-separators .d2l-list-item-color-outer {
|
466
|
-
padding-left: 12px;
|
467
|
-
padding-right: 3px;
|
452
|
+
padding-inline-start: 3px;
|
468
453
|
}
|
469
454
|
:host([selectable]:not([_render-expand-collapse-slot])) .d2l-list-item-content-extend-separators .d2l-list-item-color-outer {
|
470
|
-
padding-
|
471
|
-
}
|
472
|
-
:host([selectable]:not([_render-expand-collapse-slot])[dir="rtl"]) .d2l-list-item-content-extend-separators .d2l-list-item-color-outer {
|
473
|
-
padding-left: 0;
|
455
|
+
padding-inline-end: 0;
|
474
456
|
}
|
475
457
|
.d2l-list-item-color-outer + .d2l-list-expand-collapse {
|
476
|
-
margin-
|
477
|
-
}
|
478
|
-
:host([dir="rtl"]) .d2l-list-item-color-outer + .d2l-list-expand-collapse {
|
479
|
-
margin-left: 0;
|
480
|
-
margin-right: -6px;
|
458
|
+
margin-inline-start: -6px;
|
481
459
|
}
|
482
460
|
|
483
461
|
[slot="add"],
|
@@ -1,8 +1,7 @@
|
|
1
1
|
import '../colors/colors.js';
|
2
2
|
import { css, html, LitElement } from 'lit';
|
3
|
-
import { RtlMixin } from '../../mixins/rtl/rtl-mixin.js';
|
4
3
|
|
5
|
-
class ListItemPlacementMarker extends
|
4
|
+
class ListItemPlacementMarker extends LitElement {
|
6
5
|
|
7
6
|
static get styles() {
|
8
7
|
return css`
|
@@ -26,32 +25,20 @@ class ListItemPlacementMarker extends RtlMixin(LitElement) {
|
|
26
25
|
.d2l-list-drag-marker-linecap {
|
27
26
|
fill: var(--d2l-color-celestine);
|
28
27
|
height: 12px;
|
29
|
-
margin-
|
30
|
-
margin-right: 0;
|
28
|
+
margin-inline: -1px 0;
|
31
29
|
stroke: none;
|
32
30
|
width: 4px;
|
33
31
|
}
|
34
32
|
|
35
|
-
:host([dir="rtl"]) .d2l-list-drag-marker-linecap {
|
36
|
-
margin-left: 0;
|
37
|
-
margin-right: -1px;
|
38
|
-
}
|
39
|
-
|
40
33
|
.d2l-list-drag-marker-circle {
|
41
34
|
fill: none;
|
42
35
|
height: 12px;
|
43
|
-
margin-
|
44
|
-
margin-right: -1px;
|
36
|
+
margin-inline: 0 -1px;
|
45
37
|
stroke: var(--d2l-color-celestine);
|
46
38
|
stroke-width: 3px;
|
47
39
|
width: 12px;
|
48
40
|
}
|
49
41
|
|
50
|
-
:host([dir="rtl"]) .d2l-list-drag-marker-circle {
|
51
|
-
margin-left: -1px;
|
52
|
-
margin-right: 0;
|
53
|
-
}
|
54
|
-
|
55
42
|
.d2l-list-drag-marker {
|
56
43
|
display: flex;
|
57
44
|
flex-wrap: nowrap;
|
@@ -504,15 +504,21 @@ export const fontFacesCss = `@font-face {
|
|
504
504
|
export const baseTypographyStyles = css`
|
505
505
|
${unsafeCSS(fontFacesCss)}
|
506
506
|
html {
|
507
|
+
--d2l-cursor-resize-inline-end: e-resize;
|
508
|
+
--d2l-cursor-resize-inline-start: w-resize;
|
507
509
|
--d2l-document-direction: ltr;
|
508
510
|
--d2l-inline-end: right;
|
509
511
|
--d2l-inline-start: left;
|
512
|
+
--d2l-length-factor: 1;
|
510
513
|
--d2l-mirror-transform: none;
|
511
514
|
}
|
512
515
|
html[dir="rtl"] {
|
516
|
+
--d2l-cursor-resize-inline-end: w-resize;
|
517
|
+
--d2l-cursor-resize-inline-start: e-resize;
|
513
518
|
--d2l-document-direction: rtl;
|
514
519
|
--d2l-inline-end: left;
|
515
520
|
--d2l-inline-start: right;
|
521
|
+
--d2l-length-factor: -1;
|
516
522
|
--d2l-mirror-transform: scale(-1, 1);
|
517
523
|
}
|
518
524
|
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@brightspace-ui/core",
|
3
|
-
"version": "3.156.
|
3
|
+
"version": "3.156.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",
|
@@ -8,7 +8,6 @@ import { classMap } from 'lit/directives/class-map.js';
|
|
8
8
|
import { formatPercent } from '@brightspace-ui/intl';
|
9
9
|
import { LocalizeCoreElement } from '../../helpers/localize-core-element.js';
|
10
10
|
import ResizeObserver from 'resize-observer-polyfill/dist/ResizeObserver.es.js';
|
11
|
-
import { RtlMixin } from '../../mixins/rtl/rtl-mixin.js';
|
12
11
|
import { styleMap } from 'lit/directives/style-map.js';
|
13
12
|
|
14
13
|
const reduceMotion = matchMedia('(prefers-reduced-motion: reduce)').matches;
|
@@ -28,6 +27,10 @@ const keyCodes = Object.freeze({
|
|
28
27
|
SPACE: 32
|
29
28
|
});
|
30
29
|
|
30
|
+
function isRtl() {
|
31
|
+
return document.documentElement.getAttribute('dir') === 'rtl';
|
32
|
+
}
|
33
|
+
|
31
34
|
function isMobile() {
|
32
35
|
return matchMedia('only screen and (max-width: 767px)').matches;
|
33
36
|
}
|
@@ -49,7 +52,6 @@ class Resizer {
|
|
49
52
|
this.contentBounds = null;
|
50
53
|
this.isCollapsed = false;
|
51
54
|
this.isMobile = false;
|
52
|
-
this.isRtl = false;
|
53
55
|
this.panelSize = 0;
|
54
56
|
this.secondaryFirst = false;
|
55
57
|
this._wasCollapsed = false;
|
@@ -126,7 +128,7 @@ class DesktopKeyboardResizer extends Resizer {
|
|
126
128
|
e.preventDefault();
|
127
129
|
|
128
130
|
// The direction of the container is flipped if exactly one of isRtl and secondaryFirst is true
|
129
|
-
const isFlipped =
|
131
|
+
const isFlipped = isRtl() ^ this.secondaryFirst;
|
130
132
|
const direction = e.keyCode === keyCodes.LEFT && !isFlipped
|
131
133
|
|| e.keyCode === keyCodes.RIGHT && isFlipped ? 1 : -1;
|
132
134
|
let secondaryWidth;
|
@@ -196,7 +198,7 @@ class DesktopMouseResizer extends Resizer {
|
|
196
198
|
_computeContentX(clientX) {
|
197
199
|
const x = clientX - this.contentRect.left;
|
198
200
|
// The direction of the container is flipped if exactly one of isRtl and secondaryFirst is true
|
199
|
-
return
|
201
|
+
return isRtl() ^ this.secondaryFirst ? x : this.contentRect.width - x;
|
200
202
|
}
|
201
203
|
|
202
204
|
_onMouseDown(e) {
|
@@ -546,7 +548,7 @@ class MobileTouchResizer extends Resizer {
|
|
546
548
|
* @fires d2l-template-primary-secondary-resize-start - Dispatched when a user begins moving the divider.
|
547
549
|
* @fires d2l-template-primary-secondary-resize-end - Dispatched when a user finishes moving the divider.
|
548
550
|
*/
|
549
|
-
class TemplatePrimarySecondary extends
|
551
|
+
class TemplatePrimarySecondary extends LocalizeCoreElement(LitElement) {
|
550
552
|
|
551
553
|
static get properties() {
|
552
554
|
return {
|
@@ -673,13 +675,8 @@ class TemplatePrimarySecondary extends RtlMixin(LocalizeCoreElement(LitElement))
|
|
673
675
|
:host([resizable]) [data-is-collapsed] aside {
|
674
676
|
visibility: hidden;
|
675
677
|
}
|
676
|
-
:host([resizable]:not([
|
677
|
-
|
678
|
-
float: left;
|
679
|
-
}
|
680
|
-
:host([resizable][dir="rtl"]:not([secondary-first])) aside,
|
681
|
-
:host([resizable]:not([dir="rtl"])[secondary-first]) aside {
|
682
|
-
float: right;
|
678
|
+
:host([resizable]:not([secondary-first])) aside {
|
679
|
+
float: inline-start;
|
683
680
|
}
|
684
681
|
.d2l-template-primary-secondary-divider,
|
685
682
|
.d2l-template-primary-secondary-divider-not-resizable {
|
@@ -701,26 +698,22 @@ class TemplatePrimarySecondary extends RtlMixin(LocalizeCoreElement(LitElement))
|
|
701
698
|
cursor: ew-resize;
|
702
699
|
width: 0.45rem;
|
703
700
|
}
|
704
|
-
:host([resizable]) [data-is-
|
705
|
-
|
706
|
-
cursor: w-resize;
|
701
|
+
:host([resizable]) [data-is-expanded] .d2l-template-primary-secondary-divider {
|
702
|
+
cursor: var(--d2l-cursor-resize-inline-end, e-resize);
|
707
703
|
}
|
708
|
-
:host([resizable]) [data-is-
|
709
|
-
|
710
|
-
cursor: e-resize;
|
704
|
+
:host([resizable]) [data-is-collapsed] .d2l-template-primary-secondary-divider {
|
705
|
+
cursor: var(--d2l-cursor-resize-inline-start, w-resize);
|
711
706
|
}
|
712
707
|
:host([resizable]) .d2l-template-primary-secondary-divider-handle {
|
713
708
|
align-items: center;
|
714
709
|
display: flex;
|
715
710
|
justify-content: center;
|
716
711
|
}
|
717
|
-
:host([resizable]) [data-background-shading="secondary"] .d2l-template-primary-secondary-divider
|
718
|
-
|
719
|
-
box-shadow: 1px 0 0 0 rgba(0, 0, 0, 0.15);
|
712
|
+
:host([resizable]) [data-background-shading="secondary"] .d2l-template-primary-secondary-divider {
|
713
|
+
box-shadow: calc(1px * var(--d2l-length-factor, 1)) 0 0 0 rgba(0, 0, 0, 0.15);
|
720
714
|
}
|
721
|
-
:host([resizable]) [data-background-shading="primary"] .d2l-template-primary-secondary-divider
|
722
|
-
|
723
|
-
box-shadow: -1px 0 0 0 rgba(0, 0, 0, 0.15);
|
715
|
+
:host([resizable]) [data-background-shading="primary"] .d2l-template-primary-secondary-divider {
|
716
|
+
box-shadow: calc(-1px * var(--d2l-length-factor, 1)) 0 0 0 rgba(0, 0, 0, 0.15);
|
724
717
|
}
|
725
718
|
.d2l-template-primary-secondary-divider-handle-desktop {
|
726
719
|
align-items: center;
|
@@ -735,10 +728,10 @@ class TemplatePrimarySecondary extends RtlMixin(LocalizeCoreElement(LitElement))
|
|
735
728
|
position: absolute;
|
736
729
|
}
|
737
730
|
.d2l-template-primary-secondary-divider-handle-left {
|
738
|
-
|
731
|
+
inset-inline-start: -1rem;
|
739
732
|
}
|
740
733
|
.d2l-template-primary-secondary-divider-handle-right {
|
741
|
-
|
734
|
+
inset-inline-end: -1rem;
|
742
735
|
}
|
743
736
|
.d2l-template-primary-secondary-divider-handle-line {
|
744
737
|
display: flex;
|
@@ -758,12 +751,8 @@ class TemplatePrimarySecondary extends RtlMixin(LocalizeCoreElement(LitElement))
|
|
758
751
|
.d2l-template-primary-secondary-divider:${unsafeCSS(getFocusPseudoClass())} .d2l-template-primary-secondary-divider-handle-left {
|
759
752
|
display: block;
|
760
753
|
}
|
761
|
-
:host(:not([
|
762
|
-
:host([
|
763
|
-
display: none;
|
764
|
-
}
|
765
|
-
:host(:not([dir="rtl"])[secondary-first]) [data-is-expanded] .d2l-template-primary-secondary-divider-handle-right,
|
766
|
-
:host([dir="rtl"]:not([secondary-first])) [data-is-expanded] .d2l-template-primary-secondary-divider-handle-right {
|
754
|
+
:host(:not([secondary-first])) [data-is-expanded] .d2l-template-primary-secondary-divider-handle-left,
|
755
|
+
:host([secondary-first]) [data-is-expanded] .d2l-template-primary-secondary-divider-handle-right {
|
767
756
|
display: none;
|
768
757
|
}
|
769
758
|
d2l-icon {
|
@@ -781,14 +770,11 @@ class TemplatePrimarySecondary extends RtlMixin(LocalizeCoreElement(LitElement))
|
|
781
770
|
}
|
782
771
|
|
783
772
|
:host([resizable]) .d2l-template-primary-secondary-divider:focus,
|
784
|
-
:host([resizable]) .d2l-template-primary-secondary-divider:hover
|
785
|
-
:host([resizable][dir="rtl"]) .d2l-template-primary-secondary-divider:focus,
|
786
|
-
:host([resizable][dir="rtl"]) .d2l-template-primary-secondary-divider:hover {
|
773
|
+
:host([resizable]) .d2l-template-primary-secondary-divider:hover {
|
787
774
|
background-color: var(--d2l-color-mica);
|
788
775
|
box-shadow: none;
|
789
776
|
}
|
790
|
-
:host([resizable]) .d2l-template-primary-secondary-divider:${unsafeCSS(getFocusPseudoClass())}
|
791
|
-
:host([resizable][dir="rtl"]) .d2l-template-primary-secondary-divider:${unsafeCSS(getFocusPseudoClass())} {
|
777
|
+
:host([resizable]) .d2l-template-primary-secondary-divider:${unsafeCSS(getFocusPseudoClass())} {
|
792
778
|
background-color: var(--d2l-color-celestine);
|
793
779
|
}
|
794
780
|
.d2l-template-primary-secondary-divider:focus .d2l-template-primary-secondary-divider-handle-line::before,
|
@@ -897,15 +883,10 @@ class TemplatePrimarySecondary extends RtlMixin(LocalizeCoreElement(LitElement))
|
|
897
883
|
border-radius: 0;
|
898
884
|
bottom: 0.1rem;
|
899
885
|
display: block;
|
900
|
-
|
886
|
+
inset-inline-end: calc(17px + 0.2rem);
|
901
887
|
overflow: hidden;
|
902
|
-
right: calc(17px + 0.2rem);
|
903
888
|
top: auto;
|
904
889
|
}
|
905
|
-
:host([dir="rtl"]) .d2l-template-primary-secondary-divider-handle {
|
906
|
-
left: calc(17px + 0.2rem);
|
907
|
-
right: auto;
|
908
|
-
}
|
909
890
|
.d2l-template-primary-secondary-divider-handle-mobile {
|
910
891
|
align-items: center;
|
911
892
|
background-color: var(--d2l-color-celestine);
|
@@ -928,13 +909,9 @@ class TemplatePrimarySecondary extends RtlMixin(LocalizeCoreElement(LitElement))
|
|
928
909
|
.d2l-template-primary-secondary-divider:${unsafeCSS(getFocusPseudoClass())} .d2l-template-primary-secondary-divider-handle {
|
929
910
|
box-shadow: none;
|
930
911
|
height: 1.2rem;
|
931
|
-
|
912
|
+
inset-inline-end: 17px;
|
932
913
|
width: 2.6rem;
|
933
914
|
}
|
934
|
-
:host([dir="rtl"]) .d2l-template-primary-secondary-divider:${unsafeCSS(getFocusPseudoClass())} .d2l-template-primary-secondary-divider-handle {
|
935
|
-
left: 17px;
|
936
|
-
right: auto;
|
937
|
-
}
|
938
915
|
d2l-icon {
|
939
916
|
color: white;
|
940
917
|
display: block;
|
@@ -1038,13 +1015,8 @@ class TemplatePrimarySecondary extends RtlMixin(LocalizeCoreElement(LitElement))
|
|
1038
1015
|
}
|
1039
1016
|
|
1040
1017
|
firstUpdated(changedProperties) {
|
1041
|
-
|
1042
1018
|
super.firstUpdated(changedProperties);
|
1043
1019
|
|
1044
|
-
const isRtl = this.getAttribute('dir') === 'rtl';
|
1045
|
-
for (const resizer of this._resizers) {
|
1046
|
-
resizer.isRtl = isRtl;
|
1047
|
-
}
|
1048
1020
|
const contentArea = this.shadowRoot.querySelector('.d2l-template-primary-secondary-content');
|
1049
1021
|
this._resizeObserver = new ResizeObserver(this._onContentResize);
|
1050
1022
|
this._resizeObserver.observe(contentArea);
|
@@ -1290,13 +1262,13 @@ class TemplatePrimarySecondary extends RtlMixin(LocalizeCoreElement(LitElement))
|
|
1290
1262
|
<div class="d2l-template-primary-secondary-divider-handle" @click=${this._onHandleTap} @mousedown=${this._onHandleTapStart}>
|
1291
1263
|
<div class="d2l-template-primary-secondary-divider-handle-desktop">
|
1292
1264
|
<d2l-icon-custom size="tier1" class="d2l-template-primary-secondary-divider-handle-left">
|
1293
|
-
<svg width="18" height="18" xmlns="http://www.w3.org/2000/svg">
|
1265
|
+
<svg width="18" height="18" mirror-in-rtl xmlns="http://www.w3.org/2000/svg">
|
1294
1266
|
<path transform="rotate(90 9.004714965820312,9.000227928161623)" d="m13.708,6.29a1.006,1.006 0 0 0 -0.708,-0.29l-7.995,0a1,1 0 0 0 -0.705,1.71l4,4a1.013,1.013 0 0 0 1.42,0l4,-4a1.01,1.01 0 0 0 -0.013,-1.42l0.001,0z" fill="#494c4e"/>
|
1295
1267
|
</svg>
|
1296
1268
|
</d2l-icon-custom>
|
1297
1269
|
<div class="d2l-template-primary-secondary-divider-handle-line"></div>
|
1298
1270
|
<d2l-icon-custom size="tier1" class="d2l-template-primary-secondary-divider-handle-right">
|
1299
|
-
<svg width="18" height="18" xmlns="http://www.w3.org/2000/svg">
|
1271
|
+
<svg width="18" height="18" mirror-in-rtl xmlns="http://www.w3.org/2000/svg">
|
1300
1272
|
<path transform="rotate(-90 9.004714965820314,9.000227928161621)" d="m13.708,6.29a1.006,1.006 0 0 0 -0.708,-0.29l-7.995,0a1,1 0 0 0 -0.705,1.71l4,4a1.013,1.013 0 0 0 1.42,0l4,-4a1.01,1.01 0 0 0 -0.013,-1.42l0.001,0z" fill="#494c4e"/>
|
1301
1273
|
</svg>
|
1302
1274
|
</d2l-icon-custom>
|