@dile/ui 2.11.1 → 2.12.1
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.
|
@@ -28,7 +28,7 @@ export class DileHamburger extends LitElement {
|
|
|
28
28
|
margin: 0;
|
|
29
29
|
overflow: visible;
|
|
30
30
|
position: relative;
|
|
31
|
-
top: var(--dile-hamburguer-position-top,
|
|
31
|
+
top: var(--dile-hamburguer-position-top, 0);
|
|
32
32
|
}
|
|
33
33
|
.hamburger:hover {
|
|
34
34
|
opacity: 0.7;
|
|
@@ -52,6 +52,8 @@ export class DileHamburger extends LitElement {
|
|
|
52
52
|
.hamburger-inner {
|
|
53
53
|
display: block;
|
|
54
54
|
top: 50%;
|
|
55
|
+
left: 0;
|
|
56
|
+
transform: translateY(-50%);
|
|
55
57
|
margin-top: 0px;
|
|
56
58
|
}
|
|
57
59
|
.hamburger-inner,
|
|
@@ -94,7 +96,7 @@ export class DileHamburger extends LitElement {
|
|
|
94
96
|
}
|
|
95
97
|
|
|
96
98
|
.hamburger--squeeze.is-active .hamburger-inner {
|
|
97
|
-
transform: rotate(45deg);
|
|
99
|
+
transform: translateY(-50%) rotate(45deg);
|
|
98
100
|
transition-delay: 0.12s;
|
|
99
101
|
transition-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1);
|
|
100
102
|
}
|
|
@@ -110,8 +112,18 @@ export class DileHamburger extends LitElement {
|
|
|
110
112
|
transform 0.075s 0.12s cubic-bezier(0.215, 0.61, 0.355, 1);
|
|
111
113
|
}
|
|
112
114
|
|
|
113
|
-
|
|
114
|
-
|
|
115
|
+
.hamburger:focus {
|
|
116
|
+
background-color: transparent;
|
|
117
|
+
}
|
|
118
|
+
.hamburger:focus-visible {
|
|
119
|
+
outline: 2px solid var(--dile-hamburger-focus-outline, var(--dile-primary-dark-color, #0a66ff));
|
|
120
|
+
outline-offset: 3px;
|
|
121
|
+
background-color: transparent;
|
|
122
|
+
}
|
|
123
|
+
.hamburger:focus-visible .hamburger-inner,
|
|
124
|
+
.hamburger:focus-visible .hamburger-inner::before,
|
|
125
|
+
.hamburger:focus-visible .hamburger-inner::after {
|
|
126
|
+
background-color: var(--dile-hamburger-focus-color, var(--dile-primary-dark-color, #0a66ff));
|
|
115
127
|
}
|
|
116
128
|
`;
|
|
117
129
|
}
|
|
@@ -12,18 +12,28 @@
|
|
|
12
12
|
export const DileCloseDocumentClick = (SuperClass) =>
|
|
13
13
|
class extends SuperClass {
|
|
14
14
|
|
|
15
|
+
static closeDocumentHandler = null;
|
|
16
|
+
|
|
15
17
|
constructor() {
|
|
16
18
|
super()
|
|
17
19
|
if(!DileCloseDocumentClick.elements) {
|
|
18
20
|
DileCloseDocumentClick.elements = [];
|
|
19
21
|
}
|
|
20
|
-
this.closeDocumentHandler = this.closeAll.bind(this);
|
|
21
22
|
}
|
|
22
23
|
|
|
23
24
|
connectedCallback() {
|
|
24
25
|
super.connectedCallback();
|
|
25
|
-
if (!DileCloseDocumentClick.elements
|
|
26
|
-
|
|
26
|
+
if (!DileCloseDocumentClick.elements?.length) {
|
|
27
|
+
if (!DileCloseDocumentClick.closeDocumentHandler) {
|
|
28
|
+
DileCloseDocumentClick.closeDocumentHandler = () => {
|
|
29
|
+
if(DileCloseDocumentClick.elements) {
|
|
30
|
+
for (let ele of DileCloseDocumentClick.elements) {
|
|
31
|
+
ele.close();
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
document.addEventListener("click", DileCloseDocumentClick.closeDocumentHandler);
|
|
27
37
|
}
|
|
28
38
|
DileCloseDocumentClick.elements.push(this);
|
|
29
39
|
}
|
|
@@ -34,8 +44,7 @@ export const DileCloseDocumentClick = (SuperClass) =>
|
|
|
34
44
|
(item) => item != this
|
|
35
45
|
);
|
|
36
46
|
if (DileCloseDocumentClick.elements.length == 0) {
|
|
37
|
-
DileCloseDocumentClick.
|
|
38
|
-
document.removeEventListener("click", this.closeDocumentHandler);
|
|
47
|
+
document.removeEventListener("click", DileCloseDocumentClick.closeDocumentHandler);
|
|
39
48
|
}
|
|
40
49
|
}
|
|
41
50
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dile/ui",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.12.1",
|
|
4
4
|
"description": "UI Core components from dile-components.",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -26,5 +26,5 @@
|
|
|
26
26
|
"publishConfig": {
|
|
27
27
|
"access": "public"
|
|
28
28
|
},
|
|
29
|
-
"gitHead": "
|
|
29
|
+
"gitHead": "2ee025d271d519659ca39ccc38fc1d5445f7881d"
|
|
30
30
|
}
|