ublo-lib 1.32.8 → 1.33.0
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/es/common/components/msem-preset-editor/services/api.d.ts.map +1 -1
- package/es/common/components/msem-preset-editor/services/api.js +2 -4
- package/es/common/components/week-selector/index.d.ts +3 -0
- package/es/common/components/week-selector/index.d.ts.map +1 -0
- package/es/common/components/week-selector/index.js +2 -0
- package/es/common/components/week-selector/services/weeks.d.ts +8 -0
- package/es/common/components/week-selector/services/weeks.d.ts.map +1 -0
- package/es/common/components/week-selector/services/weeks.js +77 -0
- package/es/common/components/week-selector/week-selector.d.ts +8 -0
- package/es/common/components/week-selector/week-selector.d.ts.map +1 -0
- package/es/common/components/week-selector/week-selector.js +116 -0
- package/es/common/components/week-selector/week-selector.module.css +186 -0
- package/es/future/components/msem/tunnel.d.ts +1 -0
- package/es/future/components/msem/tunnel.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"api.d.ts","sourceRoot":"","sources":["../../../../../src/common/components/msem-preset-editor/services/api.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"api.d.ts","sourceRoot":"","sources":["../../../../../src/common/components/msem-preset-editor/services/api.ts"],"names":[],"mappings":"AAOA,wBAAgB,SAAS,CACvB,IAAI,EAAE,IAAI,GAAG,IAAI,EACjB,OAAO,EAAE,MAAM,EACf,MAAM,EAAE,MAAM,GAAG,MAAM,EACvB,KAAK,EAAE,MAAM,gBAId;AAWD,wBAAsB,cAAc,CAClC,IAAI,EAAE,IAAI,GAAG,IAAI,EACjB,OAAO,EAAE,MAAM,EACf,MAAM,EAAE,MAAM,GAAG,MAAM,EACvB,KAAK,EAAE,MAAM,EACb,IAAI,EAAE,MAAM,gBAMb;AAED,wBAAsB,UAAU,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,gBAGxE;AAED,wBAAsB,oB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etcher from "../../../utils/fetcher";
|
|
3
3
|
const { publicRuntimeConfig } = getConfig();
|
|
4
4
|
const { msemServicesUrl } = publicRuntimeConfig;
|
|
5
|
-
const standardProductUrl = "https://standard-product.esf-plus.com";
|
|
6
|
-
const skiRentalUrl = "https://location-ski.esf-plus.com";
|
|
7
5
|
export function getOffers(lang, channel, resort, facet) {
|
|
8
6
|
const endpoint = `${msemServicesUrl}/api/tunnel/offers/${channel}/${resort}`;
|
|
9
7
|
return Fetcher.get(endpoint, { lang, facet });
|
|
@@ -24,7 +22,7 @@ export async function getOtherOffers(lang, channel, resort, facet, kind) {
|
|
|
24
22
|
return Fetcher.get(endpoint, { lang, facet });
|
|
25
23
|
}
|
|
26
24
|
export async function getRenters(channel, resort) {
|
|
27
|
-
const endpoint = `${
|
|
25
|
+
const endpoint = `${msemServicesUrl}/api/ski-rental/${resort}/renters`;
|
|
28
26
|
return Fetcher.post(endpoint, { channel });
|
|
29
27
|
}
|
|
30
28
|
export async function getSkiPassesCatalogs(merchant) {
|
|
@@ -68,6 +66,6 @@ export async function getVakarioLevels(channel, merchant, kind, age, category, l
|
|
|
68
66
|
return Fetcher.get(endpoint);
|
|
69
67
|
}
|
|
70
68
|
export async function getOtherProductsCategories(facet, merchant, lang = "fr") {
|
|
71
|
-
const endpoint = `${
|
|
69
|
+
const endpoint = `${msemServicesUrl}/api/standard-product/merchant/${merchant}`;
|
|
72
70
|
return Fetcher.post(endpoint, { facet: Number(facet), lang });
|
|
73
71
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/common/components/week-selector/index.ts"],"names":[],"mappings":"AAAA,OAAO,YAAY,MAAM,iBAAiB,CAAC;AAE3C,eAAe,YAAY,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export declare function createDate(...args: number[]): Date;
|
|
2
|
+
export declare function getChristmasWeek(endWeek: any, yearOffset?: number): Date;
|
|
3
|
+
export declare function dateToWeek(date: any, christmasWeek: any): number;
|
|
4
|
+
export declare function removeFilter(): void;
|
|
5
|
+
export declare function filter(week: number): void;
|
|
6
|
+
export declare function weekToDate(week: any, endWeek: any, yearOffset?: number): Date;
|
|
7
|
+
export declare function formatShort(date: any): string;
|
|
8
|
+
//# sourceMappingURL=weeks.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"weeks.d.ts","sourceRoot":"","sources":["../../../../../src/common/components/week-selector/services/weeks.ts"],"names":[],"mappings":"AAYA,wBAAgB,UAAU,CAAC,GAAG,IAAI,EAAE,MAAM,EAAE,QAO3C;AAoBD,wBAAgB,gBAAgB,CAAC,OAAO,KAAA,EAAE,UAAU,SAAI,QAWvD;AAED,wBAAgB,UAAU,CAAC,IAAI,KAAA,EAAE,aAAa,KAAA,UAK7C;AAMD,wBAAgB,YAAY,SAO3B;AAED,wBAAgB,MAAM,CAAC,IAAI,EAAE,MAAM,QAalC;AAED,wBAAgB,UAAU,CAAC,IAAI,KAAA,EAAE,OAAO,KAAA,EAAE,UAAU,SAAI,QAEvD;AAED,wBAAgB,WAAW,CAAC,IAAI,KAAA,UAG/B"}
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
function padStart(value, count, pad) {
|
|
2
|
+
let str = String(value);
|
|
3
|
+
while (str.length < count) {
|
|
4
|
+
str = pad + str;
|
|
5
|
+
}
|
|
6
|
+
return str;
|
|
7
|
+
}
|
|
8
|
+
export function createDate(...args) {
|
|
9
|
+
const ref = new Date(...args);
|
|
10
|
+
const yy = ref.getFullYear();
|
|
11
|
+
const mm = padStart(ref.getMonth() + 1, 2, 0);
|
|
12
|
+
const dd = padStart(ref.getDate(), 2, 0);
|
|
13
|
+
const str = `${yy}-${mm}-${dd}`;
|
|
14
|
+
return new Date(str);
|
|
15
|
+
}
|
|
16
|
+
function getPrevSaturday(date) {
|
|
17
|
+
const clone = createDate(date);
|
|
18
|
+
const day = 1 + clone.getDay();
|
|
19
|
+
const prevSaturday = clone.getDate() - (day % 7);
|
|
20
|
+
clone.setDate(prevSaturday);
|
|
21
|
+
return clone;
|
|
22
|
+
}
|
|
23
|
+
function addDays(date, days) {
|
|
24
|
+
const clone = createDate(date);
|
|
25
|
+
clone.setDate(clone.getDate() + days);
|
|
26
|
+
return clone;
|
|
27
|
+
}
|
|
28
|
+
export function getChristmasWeek(endWeek, yearOffset = 0) {
|
|
29
|
+
const now = createDate();
|
|
30
|
+
const year = now.getFullYear();
|
|
31
|
+
const month = now.getMonth();
|
|
32
|
+
const date = now.getDate();
|
|
33
|
+
const isAfterChristmas = (month === 11 && date >= 25) || month < 5;
|
|
34
|
+
const lastChristmasYear = (isAfterChristmas ? year - 1 : year) + yearOffset;
|
|
35
|
+
const lastChristmas = createDate(lastChristmasYear, 11, 25);
|
|
36
|
+
const nextChristmas = createDate(lastChristmasYear + 1, 11, 25);
|
|
37
|
+
const dateSeasonEnd = addDays(getPrevSaturday(lastChristmas), endWeek * 7);
|
|
38
|
+
return getPrevSaturday(now <= dateSeasonEnd ? lastChristmas : nextChristmas);
|
|
39
|
+
}
|
|
40
|
+
export function dateToWeek(date, christmasWeek) {
|
|
41
|
+
const diff = date - christmasWeek;
|
|
42
|
+
const days = Math.floor(diff / (1000 * 60 * 60 * 24));
|
|
43
|
+
const weeks = Math.floor(days / 7);
|
|
44
|
+
return weeks;
|
|
45
|
+
}
|
|
46
|
+
function getFiltrableSections() {
|
|
47
|
+
return Array.from(document.querySelectorAll("section[data-weeks]"));
|
|
48
|
+
}
|
|
49
|
+
export function removeFilter() {
|
|
50
|
+
const filtrables = getFiltrableSections();
|
|
51
|
+
filtrables.forEach((section) => {
|
|
52
|
+
if (section.originalDisplayStyle !== undefined) {
|
|
53
|
+
section.style.display = section.originalDisplayStyle;
|
|
54
|
+
}
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
export function filter(week) {
|
|
58
|
+
const search = String(week);
|
|
59
|
+
const filtrables = getFiltrableSections();
|
|
60
|
+
filtrables.forEach((section) => {
|
|
61
|
+
const weeks = section.dataset.weeks
|
|
62
|
+
.split(",")
|
|
63
|
+
.filter((week) => week !== "");
|
|
64
|
+
const visible = weeks.length === 0 || weeks.includes(search);
|
|
65
|
+
if (section.originalDisplayStyle === undefined) {
|
|
66
|
+
section.originalDisplayStyle = section.style.display;
|
|
67
|
+
}
|
|
68
|
+
section.style.display = visible ? section.originalDisplayStyle : "none";
|
|
69
|
+
});
|
|
70
|
+
}
|
|
71
|
+
export function weekToDate(week, endWeek, yearOffset = 0) {
|
|
72
|
+
return addDays(getChristmasWeek(endWeek, yearOffset), week * 7);
|
|
73
|
+
}
|
|
74
|
+
export function formatShort(date) {
|
|
75
|
+
const dd = padStart(date.getDate(), 2, 0);
|
|
76
|
+
return dd;
|
|
77
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
type Props = {
|
|
2
|
+
displayDate: number;
|
|
3
|
+
setDisplayDate: (date: number) => void;
|
|
4
|
+
cmsMode: "connected" | "editing" | "info";
|
|
5
|
+
};
|
|
6
|
+
export default function WeekSelector({ displayDate, setDisplayDate, cmsMode, }: Props): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export {};
|
|
8
|
+
//# sourceMappingURL=week-selector.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"week-selector.d.ts","sourceRoot":"","sources":["../../../../src/common/components/week-selector/week-selector.tsx"],"names":[],"mappings":"AAUA,KAAK,KAAK,GAAG;IACX,WAAW,EAAE,MAAM,CAAC;IACpB,cAAc,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IACvC,OAAO,EAAE,WAAW,GAAG,SAAS,GAAG,MAAM,CAAC;CAC3C,CAAC;AAKF,MAAM,CAAC,OAAO,UAAU,YAAY,CAAC,EACnC,WAAW,EACX,cAAc,EACd,OAAO,GACR,EAAE,KAAK,2CAkNP"}
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
import classNames from "classnames";
|
|
4
|
+
import { motion } from "framer-motion";
|
|
5
|
+
import getConfig from "next/config";
|
|
6
|
+
import Button from "dt-design-system/es/button";
|
|
7
|
+
import Select from "dt-design-system/es/select";
|
|
8
|
+
import * as Icons from "dt-design-system/es/icons";
|
|
9
|
+
import * as Weeks from "./services/weeks";
|
|
10
|
+
import styles from "./week-selector.module.css";
|
|
11
|
+
const { publicRuntimeConfig } = getConfig();
|
|
12
|
+
const { start, end } = publicRuntimeConfig.season;
|
|
13
|
+
export default function WeekSelector({ displayDate, setDisplayDate, cmsMode, }) {
|
|
14
|
+
const constraintsRef = React.useRef(null);
|
|
15
|
+
const scrollingAreaRef = React.useRef(null);
|
|
16
|
+
const [yearOffset, setYearOffset] = React.useState(0);
|
|
17
|
+
const [allowDrag, setAllowDrag] = React.useState(false);
|
|
18
|
+
const [dragging, setDragging] = React.useState(false);
|
|
19
|
+
const christmasWeek = Weeks.getChristmasWeek(end, yearOffset);
|
|
20
|
+
const christmasWeekYear = React.useRef(christmasWeek.getFullYear());
|
|
21
|
+
React.useEffect(() => {
|
|
22
|
+
const bar = scrollingAreaRef.current;
|
|
23
|
+
if (cmsMode === "connected" && bar && displayDate) {
|
|
24
|
+
const selectedItem = bar.querySelector(`.${styles.selected}`);
|
|
25
|
+
if (selectedItem) {
|
|
26
|
+
selectedItem.scrollIntoView({
|
|
27
|
+
behavior: "smooth",
|
|
28
|
+
inline: "center",
|
|
29
|
+
block: "center",
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
}, [cmsMode, displayDate, scrollingAreaRef]);
|
|
34
|
+
if (cmsMode !== "connected")
|
|
35
|
+
return null;
|
|
36
|
+
const enableDrag = () => {
|
|
37
|
+
setAllowDrag(true);
|
|
38
|
+
};
|
|
39
|
+
const disableDrag = () => {
|
|
40
|
+
if (!dragging) {
|
|
41
|
+
setAllowDrag(false);
|
|
42
|
+
}
|
|
43
|
+
};
|
|
44
|
+
const startDragging = () => {
|
|
45
|
+
setDragging(true);
|
|
46
|
+
};
|
|
47
|
+
const stopDragging = () => {
|
|
48
|
+
setDragging(false);
|
|
49
|
+
setAllowDrag(false);
|
|
50
|
+
};
|
|
51
|
+
const scrollRight = () => {
|
|
52
|
+
const bar = scrollingAreaRef.current;
|
|
53
|
+
if (bar) {
|
|
54
|
+
bar.scrollBy({
|
|
55
|
+
left: 200,
|
|
56
|
+
behavior: "smooth",
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
};
|
|
60
|
+
const scrollLeft = () => {
|
|
61
|
+
const bar = scrollingAreaRef.current;
|
|
62
|
+
if (bar) {
|
|
63
|
+
bar.scrollBy({
|
|
64
|
+
left: -200,
|
|
65
|
+
behavior: "smooth",
|
|
66
|
+
});
|
|
67
|
+
}
|
|
68
|
+
};
|
|
69
|
+
const currentSeason = `${christmasWeekYear.current}-${christmasWeekYear.current + 1}`;
|
|
70
|
+
const newSeason = `${christmasWeekYear.current + 1}-${christmasWeekYear.current + 2}`;
|
|
71
|
+
const seasons = [
|
|
72
|
+
{ value: "0", label: currentSeason },
|
|
73
|
+
{ value: "1", label: newSeason },
|
|
74
|
+
];
|
|
75
|
+
const weeks = [...new Array(end - start)].map((_, i) => start + i);
|
|
76
|
+
const classes = classNames(styles.selector, {
|
|
77
|
+
[styles.dragging]: dragging,
|
|
78
|
+
});
|
|
79
|
+
return (_jsx("div", { ref: constraintsRef, className: classes, children: _jsxs(motion.div, { animate: {
|
|
80
|
+
boxShadow: "var(--ds-shadow-200, 0 5px 10px rgba(0, 0, 0, 0.12))",
|
|
81
|
+
}, dragMomentum: false, drag: allowDrag, dragConstraints: constraintsRef, className: styles.container, whileDrag: {
|
|
82
|
+
cursor: "grabbing",
|
|
83
|
+
scale: 1.02,
|
|
84
|
+
boxShadow: "var(--ds-shadow-400, 0 30px 60px rgba(0, 0, 0, 0.12))",
|
|
85
|
+
}, onDragStart: startDragging, onDragEnd: stopDragging, children: [_jsxs("div", { className: styles.header, children: [_jsx(Button, { variant: "link", className: styles.dragHandle, onMouseEnter: enableDrag, onMouseMove: enableDrag, onMouseLeave: disableDrag, children: _jsx(Icons.DragHandle, {}) }), _jsx("div", { className: styles.title, children: "Pr\u00E9visualisation au" }), _jsx("div", { className: styles.selectedDate, children: Weeks.weekToDate(displayDate, end, yearOffset).toLocaleDateString("fr-FR", {
|
|
86
|
+
day: "2-digit",
|
|
87
|
+
month: "2-digit",
|
|
88
|
+
year: "numeric",
|
|
89
|
+
}) }), _jsx(Select, { className: styles.seasonSelect, label: "Saison", options: seasons, value: yearOffset, onValueChange: (value) => setYearOffset(Number(value)), compact: true })] }), _jsxs("div", { className: styles.inner, children: [_jsx("div", { ref: scrollingAreaRef, className: styles.items, children: weeks.map((week) => {
|
|
90
|
+
const prevDate = Weeks.weekToDate(week - 1, end, yearOffset);
|
|
91
|
+
const currDate = Weeks.weekToDate(week, end, yearOffset);
|
|
92
|
+
const nextDate = Weeks.weekToDate(week + 1, end, yearOffset);
|
|
93
|
+
const isSelected = displayDate === week;
|
|
94
|
+
const isFirst = week === start;
|
|
95
|
+
const isLast = week === end - 1;
|
|
96
|
+
const prevYear = prevDate.getFullYear();
|
|
97
|
+
const currYear = currDate.getFullYear();
|
|
98
|
+
const hasYearChanged = prevYear !== currYear;
|
|
99
|
+
const showYear = isFirst || hasYearChanged;
|
|
100
|
+
const prevMonth = prevDate.getMonth();
|
|
101
|
+
const currMonth = currDate.getMonth();
|
|
102
|
+
const hasMonthChanged = prevMonth !== currMonth;
|
|
103
|
+
const showMonth = isFirst || hasMonthChanged;
|
|
104
|
+
const locale = "fr-FR";
|
|
105
|
+
const formattedMonth = currDate.toLocaleString(locale, {
|
|
106
|
+
month: "short",
|
|
107
|
+
});
|
|
108
|
+
const weekClasses = classNames(styles.item, {
|
|
109
|
+
[styles.selected]: isSelected,
|
|
110
|
+
});
|
|
111
|
+
const selectWeek = () => {
|
|
112
|
+
setDisplayDate(week);
|
|
113
|
+
};
|
|
114
|
+
return (_jsxs("div", { className: weekClasses, children: [_jsx(Button, { className: styles.itemButton, onClick: selectWeek }), _jsxs("div", { className: styles.itemDate, children: [_jsx("div", { className: styles.itemDateFrom, children: Weeks.formatShort(currDate) }), isLast && (_jsx("div", { className: styles.itemDateTo, children: Weeks.formatShort(nextDate) }))] }), showMonth && (_jsxs("span", { className: styles.itemMonth, children: [formattedMonth, " ", showYear && (_jsx("b", { className: styles.itemYear, children: currYear }))] }))] }, week));
|
|
115
|
+
}) }), _jsxs("div", { className: styles.controls, children: [_jsx(Button, { className: styles.control, variant: "secondary", "data-direction": "prev", onClick: scrollLeft, children: _jsx(Icons.ChevronsLeft, {}) }), _jsx(Button, { className: styles.control, variant: "secondary", "data-direction": "next", onClick: scrollRight, children: _jsx(Icons.ChevronsRight, {}) })] })] })] }) }));
|
|
116
|
+
}
|
|
@@ -0,0 +1,186 @@
|
|
|
1
|
+
.selector {
|
|
2
|
+
position: fixed;
|
|
3
|
+
top: 0;
|
|
4
|
+
left: 0;
|
|
5
|
+
width: 100%;
|
|
6
|
+
height: 100%;
|
|
7
|
+
display: flex;
|
|
8
|
+
align-items: flex-end;
|
|
9
|
+
justify-content: center;
|
|
10
|
+
padding: 16px;
|
|
11
|
+
z-index: 1000;
|
|
12
|
+
pointer-events: none;
|
|
13
|
+
user-select: none;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.container {
|
|
17
|
+
--item-width: 30px;
|
|
18
|
+
--item-height: 14px;
|
|
19
|
+
|
|
20
|
+
width: 90vw;
|
|
21
|
+
max-width: 800px;
|
|
22
|
+
bottom: 16px;
|
|
23
|
+
background-color: var(--ds-grey-000, #fff);
|
|
24
|
+
border-radius: var(--ds-radius-400, 20px);
|
|
25
|
+
pointer-events: auto;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.header {
|
|
29
|
+
display: flex;
|
|
30
|
+
align-items: center;
|
|
31
|
+
gap: 6px;
|
|
32
|
+
padding: 8px 8px 0 8px;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.dragHandle {
|
|
36
|
+
cursor: grab;
|
|
37
|
+
color: var(--ds-grey-400, #9d9d9d);
|
|
38
|
+
transition: color 160ms
|
|
39
|
+
var(--ds-transition-easing, cubic-bezier(0.4, 0.1, 0.2, 0.9));
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.selector.dragging .dragHandle,
|
|
43
|
+
.dragHandle:hover {
|
|
44
|
+
color: var(--ds-grey-700, #262626);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.selector.dragging .dragHandle {
|
|
48
|
+
cursor: grabbing;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
.title {
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
.selectedDate {
|
|
55
|
+
padding: 6px 8px;
|
|
56
|
+
font-weight: 700;
|
|
57
|
+
line-height: 1;
|
|
58
|
+
background-color: var(--ds-grey-200, #ededed);
|
|
59
|
+
border-radius: var(--ds-radius-200, 8px);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
.seasonSelect {
|
|
63
|
+
margin-left: auto;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
.seasonSelect > label {
|
|
67
|
+
flex-direction: row;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
.inner {
|
|
71
|
+
position: relative;
|
|
72
|
+
padding: 8px 16px;
|
|
73
|
+
overflow: clip;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
.inner::before {
|
|
77
|
+
content: "";
|
|
78
|
+
position: absolute;
|
|
79
|
+
top: 8px;
|
|
80
|
+
left: 0;
|
|
81
|
+
width: 100%;
|
|
82
|
+
height: calc(var(--item-height) + 2px);
|
|
83
|
+
background-color: var(--ds-grey-200, #ededed);
|
|
84
|
+
z-index: 0;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
.controls {
|
|
88
|
+
position: absolute;
|
|
89
|
+
top: 0;
|
|
90
|
+
left: -10px;
|
|
91
|
+
width: calc(100% + 20px);
|
|
92
|
+
display: flex;
|
|
93
|
+
justify-content: space-between;
|
|
94
|
+
pointer-events: none;
|
|
95
|
+
z-index: 1;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
button.control {
|
|
99
|
+
pointer-events: auto;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
button.control[data-direction="prev"] {
|
|
103
|
+
padding-right: 4px;
|
|
104
|
+
padding-left: 10px;
|
|
105
|
+
border-radius: 0 100px 100px 0;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
button.control[data-direction="next"] {
|
|
109
|
+
padding-right: 10px;
|
|
110
|
+
padding-left: 4px;
|
|
111
|
+
border-radius: 100px 0 0 100px;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
.items {
|
|
115
|
+
position: relative;
|
|
116
|
+
display: flex;
|
|
117
|
+
padding: 0 10px;
|
|
118
|
+
overflow: hidden;
|
|
119
|
+
scroll-behavior: smooth;
|
|
120
|
+
z-index: 1;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
.item {
|
|
124
|
+
position: relative;
|
|
125
|
+
border-left: 1px solid var(--ds-grey-000, #fff);
|
|
126
|
+
border-right: 1px solid var(--ds-grey-000, #fff);
|
|
127
|
+
padding-bottom: 40px;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
.item:first-child {
|
|
131
|
+
border-left: 2px solid var(--ds-grey-000, #fff);
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
.item:last-child {
|
|
135
|
+
margin-right: 10px;
|
|
136
|
+
border-right: 2px solid var(--ds-grey-000, #fff);
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
.item.selected,
|
|
140
|
+
.item:focus-within {
|
|
141
|
+
z-index: 1;
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
.itemButton {
|
|
145
|
+
flex: 0 0 var(--item-width);
|
|
146
|
+
width: var(--item-width);
|
|
147
|
+
height: var(--item-height);
|
|
148
|
+
background-color: var(--ds-grey-200, #ededed);
|
|
149
|
+
cursor: pointer;
|
|
150
|
+
transition: background-color 160ms
|
|
151
|
+
var(--ds-transition-easing, cubic-bezier(0.4, 0.1, 0.2, 0.9));
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
.selected .itemButton {
|
|
155
|
+
background-color: var(--ds-primary);
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
.item:not(.selected) .itemButton:hover {
|
|
159
|
+
background-color: var(--ds-grey-300, #d7d7d7);
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
.itemDate {
|
|
163
|
+
position: absolute;
|
|
164
|
+
top: 15px;
|
|
165
|
+
left: 0;
|
|
166
|
+
width: 100%;
|
|
167
|
+
font-size: 14px;
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
.itemDateTo {
|
|
171
|
+
position: absolute;
|
|
172
|
+
top: 0;
|
|
173
|
+
left: 100%;
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
.itemYear {
|
|
177
|
+
line-height: 1;
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
.itemMonth {
|
|
181
|
+
position: absolute;
|
|
182
|
+
top: 27px;
|
|
183
|
+
left: 0;
|
|
184
|
+
font-size: 14px;
|
|
185
|
+
line-height: 1;
|
|
186
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tunnel.d.ts","sourceRoot":"","sources":["../../../../src/future/components/msem/tunnel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAE7C,KAAK,IAAI,GAAG,MAAM,GAAG,QAAQ,GAAG,MAAM,CAAC;AAEvC,KAAK,OAAO,GAAG,aAAa,GAAG;IAC7B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,UAAU,CAAC,EAAE,MAAM,CA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