ublo-lib 1.10.10 → 1.10.12
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.
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
+
import classnames from "classnames";
|
|
2
3
|
import css from "./marker-list.module.css";
|
|
3
4
|
import Button from "dt-design-system/es/button";
|
|
4
5
|
import * as DTIcons from "dt-design-system/es/icons";
|
|
@@ -22,8 +23,11 @@ export default function MarkerList({
|
|
|
22
23
|
React.useEffect(() => {
|
|
23
24
|
setOpened(width > 992);
|
|
24
25
|
}, [width]);
|
|
26
|
+
const classes = classnames(css.list, {
|
|
27
|
+
[css.listOpened]: opened
|
|
28
|
+
});
|
|
25
29
|
return _jsxs("div", {
|
|
26
|
-
className:
|
|
30
|
+
className: classes,
|
|
27
31
|
children: [opened && _jsx("div", {
|
|
28
32
|
className: css.inner,
|
|
29
33
|
children: markers.map(({
|
|
@@ -1,19 +1,30 @@
|
|
|
1
1
|
.list {
|
|
2
|
-
--offset: 10px;
|
|
3
|
-
|
|
4
2
|
position: absolute;
|
|
5
|
-
|
|
6
|
-
right:
|
|
3
|
+
top: 0;
|
|
4
|
+
right: 0;
|
|
7
5
|
max-width: 220px;
|
|
8
|
-
|
|
6
|
+
height: 100%;
|
|
9
7
|
display: flex;
|
|
10
8
|
flex-direction: column;
|
|
11
9
|
gap: 8px;
|
|
10
|
+
padding: 8px;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.listOpened {
|
|
14
|
+
opacity: 0.8;
|
|
15
|
+
background-color: var(--ds-grey-000, #ffffff);
|
|
16
|
+
box-shadow: var(--ds-shadow-200, 0 5px 10px rgba(0, 0, 0, 0.12));
|
|
17
|
+
transition: opacity 160ms
|
|
18
|
+
var(--ds-transition-easing, cubic-bezier(0.4, 0.1, 0.2, 0.9));
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.listOpened:is(:hover, :focus-within) {
|
|
22
|
+
opacity: 1;
|
|
12
23
|
}
|
|
13
24
|
|
|
14
25
|
.toggle {
|
|
15
26
|
flex: 0 0 auto;
|
|
16
|
-
margin
|
|
27
|
+
margin: auto 0 0 auto;
|
|
17
28
|
}
|
|
18
29
|
|
|
19
30
|
.inner {
|
|
@@ -21,26 +32,15 @@
|
|
|
21
32
|
display: flex;
|
|
22
33
|
flex-direction: column;
|
|
23
34
|
gap: 8px;
|
|
24
|
-
padding: 8px;
|
|
25
|
-
background-color: var(--ds-grey-000, #ffffff);
|
|
26
|
-
border-radius: var(--ds-radius-200, 10px);
|
|
27
|
-
box-shadow: var(--ds-shadow-200, 0 5px 10px rgba(0, 0, 0, 0.12));
|
|
28
35
|
overflow: auto;
|
|
29
|
-
opacity: 0.8;
|
|
30
|
-
transition: opacity 160ms
|
|
31
|
-
var(--ds-transition-easing, cubic-bezier(0.4, 0.1, 0.2, 0.9));
|
|
32
36
|
animation: marker-list-inner-appearance 160ms
|
|
33
37
|
var(--ds-transition-easing, cubic-bezier(0.4, 0.1, 0.2, 0.9));
|
|
34
38
|
}
|
|
35
39
|
|
|
36
|
-
.inner:is(:hover, :focus-within) {
|
|
37
|
-
opacity: 1;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
40
|
@keyframes marker-list-inner-appearance {
|
|
41
41
|
0% {
|
|
42
42
|
opacity: 0;
|
|
43
|
-
transform:
|
|
43
|
+
transform: translateX(6px);
|
|
44
44
|
}
|
|
45
45
|
}
|
|
46
46
|
|
|
@@ -14,8 +14,12 @@ const DateDisplay = ({
|
|
|
14
14
|
const [stay, setStay] = React.useState();
|
|
15
15
|
const {
|
|
16
16
|
lang,
|
|
17
|
-
metadata
|
|
17
|
+
metadata,
|
|
18
|
+
config
|
|
18
19
|
} = useUbloContext();
|
|
20
|
+
const {
|
|
21
|
+
extend
|
|
22
|
+
} = config.season;
|
|
19
23
|
const classes = classnames(css.display, {
|
|
20
24
|
[className]: className
|
|
21
25
|
});
|
|
@@ -38,7 +42,7 @@ const DateDisplay = ({
|
|
|
38
42
|
};
|
|
39
43
|
}
|
|
40
44
|
}, [getStoredStay, metadata?.disableWeekpicker, updateStay]);
|
|
41
|
-
if (!stay || metadata?.disableWeekpicker) return null;
|
|
45
|
+
if (!extend || !stay || metadata?.disableWeekpicker) return null;
|
|
42
46
|
const formatedStay = Stay.formatStay(lang, stay);
|
|
43
47
|
return _jsxs("div", {
|
|
44
48
|
className: classes,
|