-
Notifications
You must be signed in to change notification settings - Fork 25
/
list-item-placement-marker.js
80 lines (68 loc) · 1.6 KB
/
list-item-placement-marker.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
import '../colors/colors.js';
import { css, html, LitElement } from 'lit';
import { RtlMixin } from '../../mixins/rtl/rtl-mixin.js';
class ListItemPlacementMarker extends RtlMixin(LitElement) {
static get styles() {
return css`
:host {
display: block;
}
:host([hidden]) {
display: none;
}
.d2l-list-drag-marker-line {
height: 12px;
margin-left: -1px;
margin-right: -1px;
stroke: var(--d2l-color-celestine);
stroke-width: 3px;
width: 100%;
}
.d2l-list-drag-marker-linecap {
fill: var(--d2l-color-celestine);
height: 12px;
margin-left: -1px;
margin-right: 0;
stroke: none;
width: 4px;
}
:host([dir="rtl"]) .d2l-list-drag-marker-linecap {
margin-left: 0;
margin-right: -1px;
}
.d2l-list-drag-marker-circle {
fill: none;
height: 12px;
margin-left: 0;
margin-right: -1px;
stroke: var(--d2l-color-celestine);
stroke-width: 3px;
width: 12px;
}
:host([dir="rtl"]) .d2l-list-drag-marker-circle {
margin-left: -1px;
margin-right: 0;
}
.d2l-list-drag-marker {
display: flex;
flex-wrap: nowrap;
}
`;
}
render() {
return html`
<div class="d2l-list-drag-marker">
<svg class="d2l-list-drag-marker-circle">
<circle cx="50%" cy="50%" r="3.8px"/>
</svg>
<svg class="d2l-list-drag-marker-line">
<line x1="0" y1="50%" x2="100%" y2="50%" />
</svg>
<svg class="d2l-list-drag-marker-linecap">
<circle cx="50%" cy="50%" r="1.5px"/>
</svg>
</div>
`;
}
}
customElements.define('d2l-list-item-placement-marker', ListItemPlacementMarker);