willba-component-library 0.2.79 → 0.2.80
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/lib/assets/SpinnerSvg.d.ts +5 -0
- package/lib/components/FilterBar/FilterBar.stories.d.ts +1 -1
- package/lib/components/FilterBar/components/buttons/close-button/CloseButton.d.ts +7 -0
- package/lib/components/FilterBar/components/buttons/submit-button/SubmitButton.d.ts +3 -0
- package/lib/components/FilterBar/components/calendar/Calendar.d.ts +14 -0
- package/lib/components/FilterBar/hooks/useCloseFilterSection.d.ts +8 -0
- package/lib/components/FilterBar/hooks/useUpdateTranslations.d.ts +5 -0
- package/lib/components/FilterBar/utils/parseDates.d.ts +6 -0
- package/lib/components/FilterCalendar/FilterCalendar.d.ts +1 -1
- package/lib/components/FilterCalendar/FilterCalendar.stories.d.ts +1 -3
- package/lib/components/FilterCalendar/hooks/useFilterCalendar.d.ts +3 -10
- package/lib/core/components/buttons/submit-button/SubmitButton.d.ts +1 -3
- package/lib/core/components/calendar/CalendarTypes.d.ts +2 -9
- package/lib/core/utils/handleOverlappingDates.d.ts +1 -0
- package/lib/core/utils/index.d.ts +3 -0
- package/lib/core/utils/nightsCount.d.ts +6 -0
- package/lib/core/utils/parseDate.d.ts +7 -0
- package/lib/core/utils/parseDates.d.ts +6 -0
- package/lib/index.d.ts +3 -11
- package/lib/index.esm.js +267 -894
- package/lib/index.esm.js.map +1 -1
- package/lib/index.js +267 -894
- package/lib/index.js.map +1 -1
- package/lib/index.umd.js +267 -894
- package/lib/index.umd.js.map +1 -1
- package/lib/themes/useTheme.d.ts +0 -2
- package/package.json +1 -1
- package/src/assets/SpinnerSvg.tsx +40 -0
- package/src/components/FilterBar/FilterBar.stories.tsx +1 -2
- package/src/components/FilterBar/FilterBar.tsx +1 -1
- package/src/components/FilterBar/components/buttons/tab-button/TabButton.css +1 -1
- package/src/components/FilterBar/hooks/useFilterBar.tsx +1 -1
- package/src/components/FilterCalendar/FilterCalendar.css +10 -26
- package/src/components/FilterCalendar/FilterCalendar.stories.tsx +153 -522
- package/src/components/FilterCalendar/FilterCalendar.tsx +54 -25
- package/src/components/FilterCalendar/FilterCalendarTypes.ts +1 -0
- package/src/components/FilterCalendar/hooks/useFilterCalendar.ts +4 -94
- package/src/core/components/buttons/submit-button/SubmitButton.css +2 -16
- package/src/core/components/buttons/submit-button/SubmitButton.tsx +5 -6
- package/src/core/components/calendar/Calendar.css +18 -71
- package/src/core/components/calendar/Calendar.tsx +342 -132
- package/src/core/components/calendar/CalendarTypes.ts +3 -10
- package/src/core/utils/index.ts +3 -0
- package/src/locales/en/common.json +1 -7
- package/src/locales/en/filterBar.json +1 -2
- package/src/locales/fi/common.json +1 -7
- package/src/locales/fi/filterBar.json +1 -2
- package/src/themes/Default.css +3 -12
- package/src/themes/useTheme.tsx +0 -3
- package/src/assets/IconsSvg.tsx +0 -68
- package/src/components/FilterCalendar/components/Footer.tsx +0 -96
- package/src/core/components/calendar/hooks/index.ts +0 -3
- package/src/core/components/calendar/hooks/useCalendarLoadingSpinner.tsx +0 -19
- package/src/core/components/calendar/hooks/useCalendarTooltips.tsx +0 -125
- package/src/core/components/calendar/hooks/useUpdateDisabledDates.tsx +0 -107
- package/src/core/components/calendar/utils/calendarSelectionRules.tsx +0 -228
- package/src/core/components/calendar/utils/checkForContinuousSelection.tsx +0 -86
- package/src/core/components/calendar/utils/disabledDatesByPage.tsx +0 -36
- package/src/core/components/calendar/utils/handleCalendarModifiers.tsx +0 -147
- package/src/core/components/calendar/utils/handleRangeContextDisabledDates.tsx +0 -75
- package/src/core/components/calendar/utils/index.ts +0 -8
- /package/src/core/{components/calendar/utils → utils}/nightsCount.tsx +0 -0
- /package/src/core/{components/calendar/utils → utils}/parseDate.tsx +0 -0
- /package/src/core/{components/calendar/utils → utils}/parseDates.tsx +0 -0
|
@@ -3,16 +3,16 @@ import { useTranslation } from 'react-i18next'
|
|
|
3
3
|
|
|
4
4
|
import useTheme from '../../themes/useTheme'
|
|
5
5
|
import '../../themes/Default.css'
|
|
6
|
-
import { Calendar, CloseButton } from '../../core/components'
|
|
6
|
+
import { Calendar, SubmitButton, CloseButton } from '../../core/components'
|
|
7
7
|
import {
|
|
8
8
|
useAwaitRender,
|
|
9
9
|
useCloseFilterSection,
|
|
10
10
|
useUpdateTranslations,
|
|
11
11
|
} from '../../core/hooks'
|
|
12
|
+
import { nightsCount, parseDate } from '../../core/utils'
|
|
12
13
|
|
|
13
14
|
import { FilterCalendarTypes } from './FilterCalendarTypes'
|
|
14
15
|
import { useFilterCalendar } from './hooks/useFilterCalendar'
|
|
15
|
-
import { Footer } from './components/Footer'
|
|
16
16
|
|
|
17
17
|
import './FilterCalendar.css'
|
|
18
18
|
|
|
@@ -21,14 +21,13 @@ export default function FilterCalendar({
|
|
|
21
21
|
language,
|
|
22
22
|
palette,
|
|
23
23
|
onSubmit,
|
|
24
|
-
disableCalendarDates
|
|
24
|
+
disableCalendarDates,
|
|
25
25
|
toggleCalendar,
|
|
26
26
|
loadingData,
|
|
27
27
|
setToggleCalendar,
|
|
28
28
|
requestDates,
|
|
29
29
|
showFeedback,
|
|
30
30
|
noActiveSelection,
|
|
31
|
-
rangeContext: outerRangeContext,
|
|
32
31
|
}: FilterCalendarTypes) {
|
|
33
32
|
const themePalette = useTheme({ palette })
|
|
34
33
|
|
|
@@ -37,26 +36,21 @@ export default function FilterCalendar({
|
|
|
37
36
|
const { t } = useTranslation()
|
|
38
37
|
|
|
39
38
|
const {
|
|
39
|
+
handleSubmit,
|
|
40
40
|
setCalendarRange,
|
|
41
41
|
handleClearDates,
|
|
42
42
|
calendarRange,
|
|
43
43
|
disabledDates,
|
|
44
44
|
setDisabledDates,
|
|
45
45
|
updateCalendarMonthNavigation,
|
|
46
|
-
|
|
46
|
+
updateCalendarDefaultMoth,
|
|
47
47
|
setUpdateCalendarMonthNavigation,
|
|
48
|
-
|
|
49
|
-
setCalendarHasError,
|
|
50
|
-
setUpdatedForSubmit,
|
|
51
|
-
rangeContext,
|
|
52
|
-
disableCalendarDates,
|
|
48
|
+
initialCalendarRange,
|
|
53
49
|
} = useFilterCalendar({
|
|
54
50
|
onSubmit,
|
|
55
51
|
setToggleCalendar,
|
|
56
52
|
noActiveSelection,
|
|
57
53
|
toggleCalendar,
|
|
58
|
-
outerRangeContext,
|
|
59
|
-
outerDisableCalendarDates,
|
|
60
54
|
})
|
|
61
55
|
|
|
62
56
|
// Display component after fully loaded
|
|
@@ -67,6 +61,10 @@ export default function FilterCalendar({
|
|
|
67
61
|
handleSelectedFilter: setToggleCalendar,
|
|
68
62
|
})
|
|
69
63
|
|
|
64
|
+
const nights = nightsCount({
|
|
65
|
+
calendarRange: calendarRange || initialCalendarRange,
|
|
66
|
+
})
|
|
67
|
+
|
|
70
68
|
return (
|
|
71
69
|
<div className={`will-root`} style={themePalette}>
|
|
72
70
|
{toggleCalendar && (
|
|
@@ -90,25 +88,56 @@ export default function FilterCalendar({
|
|
|
90
88
|
setUpdateCalendarMonthNavigation={
|
|
91
89
|
setUpdateCalendarMonthNavigation
|
|
92
90
|
}
|
|
93
|
-
|
|
91
|
+
updateCalendarDefaultMoth={updateCalendarDefaultMoth}
|
|
94
92
|
loadingData={loadingData}
|
|
93
|
+
initialCalendarRange={initialCalendarRange}
|
|
95
94
|
showFeedback={showFeedback}
|
|
96
95
|
noActiveSelection={noActiveSelection}
|
|
97
96
|
palette={palette}
|
|
98
|
-
setCalendarHasError={setCalendarHasError}
|
|
99
|
-
setUpdatedForSubmit={setUpdatedForSubmit}
|
|
100
|
-
rangeContext={rangeContext}
|
|
101
|
-
calendarHasError={calendarHasError}
|
|
102
97
|
/>
|
|
103
98
|
</div>
|
|
104
|
-
<div className=
|
|
105
|
-
<
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
99
|
+
<div className={`will-calendar-footer`}>
|
|
100
|
+
<div className={`will-calendar-footer-dates`}>
|
|
101
|
+
<div>
|
|
102
|
+
<span>
|
|
103
|
+
{parseDate({
|
|
104
|
+
date: calendarRange?.from || initialCalendarRange?.from,
|
|
105
|
+
dateFormat: 'EEEEEE d.M.yyyy',
|
|
106
|
+
language,
|
|
107
|
+
}) || t('common:checkIn')}
|
|
108
|
+
</span>
|
|
109
|
+
<span className={`will-calendar-footer-dates-separator`}>
|
|
110
|
+
-
|
|
111
|
+
</span>
|
|
112
|
+
<span>
|
|
113
|
+
{parseDate({
|
|
114
|
+
date: calendarRange?.to || initialCalendarRange?.to,
|
|
115
|
+
dateFormat: 'EEEEEE d.M.yyyy',
|
|
116
|
+
language,
|
|
117
|
+
}) || t('common:checkOut')}
|
|
118
|
+
</span>
|
|
119
|
+
</div>
|
|
120
|
+
|
|
121
|
+
<span className={`will-calendar-footer-booked`}>
|
|
122
|
+
{nights
|
|
123
|
+
? `${nights} ${t(
|
|
124
|
+
`common:${nights === 1 ? 'night' : 'nights'}`
|
|
125
|
+
)}`
|
|
126
|
+
: ''}
|
|
127
|
+
</span>
|
|
128
|
+
</div>
|
|
129
|
+
<div className={`will-calendar-footer-actions`}>
|
|
130
|
+
<SubmitButton
|
|
131
|
+
onClick={handleClearDates}
|
|
132
|
+
disabled={!calendarRange?.from}
|
|
133
|
+
label={t(`common:clearDates`)}
|
|
134
|
+
/>
|
|
135
|
+
<SubmitButton
|
|
136
|
+
onClick={() => handleSubmit()}
|
|
137
|
+
label={t(`common:apply`)}
|
|
138
|
+
disabled={!calendarRange?.from || !calendarRange?.to}
|
|
139
|
+
/>
|
|
140
|
+
</div>
|
|
112
141
|
</div>
|
|
113
142
|
</div>
|
|
114
143
|
)}
|
|
@@ -1,18 +1,11 @@
|
|
|
1
1
|
import { useEffect, useState } from 'react'
|
|
2
2
|
import { DateRange, Matcher } from 'react-day-picker'
|
|
3
|
-
import { compareAsc, endOfDay, format, isAfter, parseISO } from 'date-fns'
|
|
4
|
-
import {
|
|
5
|
-
DisableCalendarDates,
|
|
6
|
-
RangeContext,
|
|
7
|
-
} from 'src/core/components/calendar/CalendarTypes'
|
|
8
3
|
|
|
9
4
|
type Props = {
|
|
10
5
|
onSubmit: (val: any) => void
|
|
11
6
|
setToggleCalendar: (val: boolean) => void
|
|
12
7
|
noActiveSelection?: boolean
|
|
13
8
|
toggleCalendar?: boolean
|
|
14
|
-
outerRangeContext?: RangeContext
|
|
15
|
-
outerDisableCalendarDates?: DisableCalendarDates
|
|
16
9
|
}
|
|
17
10
|
|
|
18
11
|
export const useFilterCalendar = ({
|
|
@@ -20,59 +13,17 @@ export const useFilterCalendar = ({
|
|
|
20
13
|
setToggleCalendar,
|
|
21
14
|
noActiveSelection,
|
|
22
15
|
toggleCalendar,
|
|
23
|
-
outerRangeContext,
|
|
24
|
-
outerDisableCalendarDates,
|
|
25
16
|
}: Props) => {
|
|
26
|
-
// State
|
|
27
17
|
const [calendarRange, setCalendarRange] = useState<DateRange | undefined>()
|
|
28
|
-
const [rangeContext, setRangeContext] = useState<RangeContext | undefined>(
|
|
29
|
-
outerRangeContext
|
|
30
|
-
)
|
|
31
18
|
const [initialCalendarRange, setInitialCalendarRange] = useState<
|
|
32
19
|
DateRange | undefined
|
|
33
20
|
>()
|
|
34
21
|
const [disabledDates, setDisabledDates] = useState<Matcher[]>([])
|
|
35
22
|
const [updateCalendarMonthNavigation, setUpdateCalendarMonthNavigation] =
|
|
36
23
|
useState<boolean>(false)
|
|
37
|
-
const [
|
|
24
|
+
const [updateCalendarDefaultMoth, setUpdateCalendarDefaultMoth] =
|
|
38
25
|
useState<number>(0)
|
|
39
26
|
|
|
40
|
-
const [calendarHasError, setCalendarHasError] = useState<boolean>(false)
|
|
41
|
-
|
|
42
|
-
const [updatedForSubmit, setUpdatedForSubmit] = useState<boolean>(false)
|
|
43
|
-
const [disableCalendarDates, setDisableCalendarDates] =
|
|
44
|
-
useState<DisableCalendarDates>()
|
|
45
|
-
|
|
46
|
-
// Lifecycle
|
|
47
|
-
|
|
48
|
-
// Handle update component with new data
|
|
49
|
-
useEffect(() => {
|
|
50
|
-
if (outerDisableCalendarDates?.availableDates) {
|
|
51
|
-
setDisableCalendarDates({
|
|
52
|
-
availableDates: [
|
|
53
|
-
...outerDisableCalendarDates.availableDates.sort((a, b) =>
|
|
54
|
-
compareAsc(a.checkIn, b.checkIn)
|
|
55
|
-
),
|
|
56
|
-
],
|
|
57
|
-
disabledDates: outerDisableCalendarDates.disabledDates
|
|
58
|
-
? [
|
|
59
|
-
...outerDisableCalendarDates.disabledDates.sort((a, b) =>
|
|
60
|
-
compareAsc(a.from, b.from)
|
|
61
|
-
),
|
|
62
|
-
]
|
|
63
|
-
: [],
|
|
64
|
-
})
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
if (disabledDates && !!outerDisableCalendarDates?.disabledDates?.length) {
|
|
68
|
-
setDisabledDates({
|
|
69
|
-
...disabledDates,
|
|
70
|
-
...outerDisableCalendarDates.disabledDates,
|
|
71
|
-
})
|
|
72
|
-
}
|
|
73
|
-
}, [outerDisableCalendarDates])
|
|
74
|
-
|
|
75
|
-
// Handle Range Context initial selections
|
|
76
27
|
useEffect(() => {
|
|
77
28
|
if (typeof window === 'undefined') return
|
|
78
29
|
|
|
@@ -84,17 +35,11 @@ export const useFilterCalendar = ({
|
|
|
84
35
|
if (startDateParam && endDateParam) {
|
|
85
36
|
if (noActiveSelection) {
|
|
86
37
|
handleClearDates()
|
|
87
|
-
|
|
88
|
-
setUpdatedForSubmit(false)
|
|
89
|
-
setRangeContext(outerRangeContext)
|
|
38
|
+
setUpdateCalendarDefaultMoth((prev) => prev + 1)
|
|
90
39
|
setInitialCalendarRange({
|
|
91
40
|
from: new Date(startDateParam),
|
|
92
41
|
to: new Date(endDateParam),
|
|
93
42
|
})
|
|
94
|
-
setCalendarRange({
|
|
95
|
-
from: new Date(startDateParam),
|
|
96
|
-
to: new Date(endDateParam),
|
|
97
|
-
})
|
|
98
43
|
} else {
|
|
99
44
|
setCalendarRange({
|
|
100
45
|
from: new Date(startDateParam),
|
|
@@ -104,35 +49,6 @@ export const useFilterCalendar = ({
|
|
|
104
49
|
}
|
|
105
50
|
}, [toggleCalendar])
|
|
106
51
|
|
|
107
|
-
// Handle submit dates
|
|
108
|
-
useEffect(() => {
|
|
109
|
-
const formatString = 'dd.MM.yyyy'
|
|
110
|
-
const initialRangeTo = initialCalendarRange?.to
|
|
111
|
-
? format(initialCalendarRange.to, formatString)
|
|
112
|
-
: null
|
|
113
|
-
const initialRangeFrom = initialCalendarRange?.from
|
|
114
|
-
? format(initialCalendarRange.from, formatString)
|
|
115
|
-
: null
|
|
116
|
-
const calendarRangeTo = calendarRange?.to
|
|
117
|
-
? format(calendarRange.to, formatString)
|
|
118
|
-
: null
|
|
119
|
-
const calendarRangeFrom = calendarRange?.from
|
|
120
|
-
? format(calendarRange.from, formatString)
|
|
121
|
-
: null
|
|
122
|
-
|
|
123
|
-
if (!!(calendarRangeTo && calendarRangeFrom && updatedForSubmit)) {
|
|
124
|
-
if (
|
|
125
|
-
!!(calendarRangeTo !== initialRangeTo) ||
|
|
126
|
-
!!(calendarRangeFrom !== initialRangeFrom)
|
|
127
|
-
) {
|
|
128
|
-
handleSubmit()
|
|
129
|
-
} else {
|
|
130
|
-
setToggleCalendar(false)
|
|
131
|
-
}
|
|
132
|
-
}
|
|
133
|
-
}, [calendarRange])
|
|
134
|
-
|
|
135
|
-
// Methods
|
|
136
52
|
const handleSubmit = () => {
|
|
137
53
|
setToggleCalendar(false)
|
|
138
54
|
return onSubmit(calendarRange)
|
|
@@ -141,8 +57,6 @@ export const useFilterCalendar = ({
|
|
|
141
57
|
const handleClearDates = () => {
|
|
142
58
|
setDisabledDates([])
|
|
143
59
|
setCalendarRange(undefined)
|
|
144
|
-
setCalendarHasError(false)
|
|
145
|
-
setInitialCalendarRange(undefined)
|
|
146
60
|
}
|
|
147
61
|
|
|
148
62
|
return {
|
|
@@ -154,11 +68,7 @@ export const useFilterCalendar = ({
|
|
|
154
68
|
calendarRange,
|
|
155
69
|
disabledDates,
|
|
156
70
|
updateCalendarMonthNavigation,
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
setCalendarHasError,
|
|
160
|
-
setUpdatedForSubmit,
|
|
161
|
-
rangeContext,
|
|
162
|
-
disableCalendarDates,
|
|
71
|
+
updateCalendarDefaultMoth,
|
|
72
|
+
initialCalendarRange,
|
|
163
73
|
}
|
|
164
74
|
}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
.will-filter-bar-submit-button {
|
|
2
2
|
width: auto;
|
|
3
3
|
height: auto;
|
|
4
|
+
background-color: var(--will-primary);
|
|
5
|
+
color: var(--will-white);
|
|
4
6
|
padding: 10px 20px;
|
|
5
7
|
border-radius: 20px;
|
|
6
8
|
cursor: pointer;
|
|
@@ -10,22 +12,6 @@
|
|
|
10
12
|
font-size: 12px;
|
|
11
13
|
display: flex;
|
|
12
14
|
align-items: center;
|
|
13
|
-
user-select: none;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
/* Submit button variants */
|
|
17
|
-
.will-filter-bar-submit-button.default {
|
|
18
|
-
background-color: var(--will-primary);
|
|
19
|
-
color: var(--will-white);
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
.will-filter-bar-submit-button.text {
|
|
23
|
-
background-color: transparent;
|
|
24
|
-
color: var(--will-black);
|
|
25
|
-
text-decoration: underline;
|
|
26
|
-
font-weight: 500;
|
|
27
|
-
font-size: 15px;
|
|
28
|
-
padding: 0 10px;
|
|
29
15
|
}
|
|
30
16
|
|
|
31
17
|
.will-filter-bar-submit-button span {
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import { FaSpinner } from 'react-icons/fa'
|
|
2
1
|
import React, { ReactNode } from 'react'
|
|
3
2
|
|
|
4
|
-
import '
|
|
3
|
+
import { SpinnerSVG } from '../../../../assets/SpinnerSvg'
|
|
4
|
+
import { Palette } from '../../../../themes/useTheme'
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
import './SubmitButton.css'
|
|
7
|
+
import { FaSpinner } from 'react-icons/fa'
|
|
7
8
|
|
|
8
9
|
type Props = {
|
|
9
10
|
onClick?: () => void
|
|
@@ -11,7 +12,6 @@ type Props = {
|
|
|
11
12
|
label?: string
|
|
12
13
|
disabled?: boolean
|
|
13
14
|
isLoading?: boolean
|
|
14
|
-
variant?: SubmitButtonVariant
|
|
15
15
|
}
|
|
16
16
|
|
|
17
17
|
export const SubmitButton = ({
|
|
@@ -20,11 +20,10 @@ export const SubmitButton = ({
|
|
|
20
20
|
label,
|
|
21
21
|
disabled,
|
|
22
22
|
isLoading,
|
|
23
|
-
variant,
|
|
24
23
|
}: Props) => {
|
|
25
24
|
return (
|
|
26
25
|
<button
|
|
27
|
-
className=
|
|
26
|
+
className="will-filter-bar-submit-button"
|
|
28
27
|
onClick={onClick}
|
|
29
28
|
disabled={disabled || isLoading}
|
|
30
29
|
>
|
|
@@ -6,8 +6,9 @@
|
|
|
6
6
|
|
|
7
7
|
/* Calendar overrides */
|
|
8
8
|
|
|
9
|
+
|
|
9
10
|
.will-calendar-filter-container .DayPicker {
|
|
10
|
-
font-size: 25px;
|
|
11
|
+
font-size: 25px; /* Adjust this value to make the DayPicker bigger */
|
|
11
12
|
}
|
|
12
13
|
|
|
13
14
|
.will-calendar-filter-container .rdp-month {
|
|
@@ -41,15 +42,9 @@
|
|
|
41
42
|
opacity: .6;
|
|
42
43
|
}
|
|
43
44
|
|
|
44
|
-
.will-calendar-filter-container .rdp-table {
|
|
45
|
-
border-collapse: separate;
|
|
46
|
-
border-spacing: 0px 2px;
|
|
47
|
-
}
|
|
48
|
-
|
|
49
45
|
.will-calendar-filter-container .rdp-button_reset.rdp-button.rdp-day.rdp-day_selected {
|
|
50
46
|
background-color: var(--will-primary);
|
|
51
47
|
opacity: 1;
|
|
52
|
-
color: var(--will-white)
|
|
53
48
|
}
|
|
54
49
|
|
|
55
50
|
.will-calendar-filter-container .my-today:not(.rdp-day_selected) {
|
|
@@ -72,8 +67,7 @@
|
|
|
72
67
|
}
|
|
73
68
|
|
|
74
69
|
.will-calendar-filter-container .rdp-cell .rdp-button[disabled] {
|
|
75
|
-
|
|
76
|
-
opacity: 1
|
|
70
|
+
opacity: 0.5;
|
|
77
71
|
}
|
|
78
72
|
|
|
79
73
|
@media (max-width: 960px) {
|
|
@@ -91,12 +85,10 @@
|
|
|
91
85
|
}
|
|
92
86
|
}
|
|
93
87
|
|
|
94
|
-
/*
|
|
88
|
+
/* Tooltip */
|
|
95
89
|
.will-root .will-calendar-filter-container .will-calendar-tooltip,
|
|
96
90
|
.will-root .will-calendar-filter-container .will-calendar-tooltip-check-out,
|
|
97
|
-
.will-root .will-calendar-filter-container .will-calendar-tooltip-overlapping-date
|
|
98
|
-
.will-root .will-calendar-filter-container .will-calendar-tooltip-check-out-only,
|
|
99
|
-
.will-root .will-calendar-filter-container .will-calendar-tooltip-check-in-only {
|
|
91
|
+
.will-root .will-calendar-filter-container .will-calendar-tooltip-overlapping-date {
|
|
100
92
|
position: absolute;
|
|
101
93
|
top: -42px;
|
|
102
94
|
transform: translateX(calc(-50% + 20px));
|
|
@@ -104,12 +96,9 @@
|
|
|
104
96
|
white-space: nowrap;
|
|
105
97
|
z-index: 2;
|
|
106
98
|
}
|
|
107
|
-
|
|
108
99
|
.will-root .will-calendar-filter-container .will-calendar-tooltip > div,
|
|
109
100
|
.will-root .will-calendar-filter-container .will-calendar-tooltip-check-out > div,
|
|
110
|
-
.will-root .will-calendar-filter-container .will-calendar-tooltip-overlapping-date > div
|
|
111
|
-
.will-root .will-calendar-filter-container .will-calendar-tooltip-check-out-only > div,
|
|
112
|
-
.will-root .will-calendar-filter-container .will-calendar-tooltip-check-in-only > div {
|
|
101
|
+
.will-root .will-calendar-filter-container .will-calendar-tooltip-overlapping-date > div {
|
|
113
102
|
background-color: white;
|
|
114
103
|
position: relative;
|
|
115
104
|
padding: 5px 10px;
|
|
@@ -119,9 +108,7 @@
|
|
|
119
108
|
|
|
120
109
|
.will-root .will-calendar-filter-container .will-calendar-tooltip::before,
|
|
121
110
|
.will-root .will-calendar-filter-container .will-calendar-tooltip-check-out::before,
|
|
122
|
-
.will-root .will-calendar-filter-container .will-calendar-tooltip-overlapping-date::before
|
|
123
|
-
.will-root .will-calendar-filter-container .will-calendar-tooltip-check-out-only::before,
|
|
124
|
-
.will-root .will-calendar-filter-container .will-calendar-tooltip-check-in-only::before {
|
|
111
|
+
.will-root .will-calendar-filter-container .will-calendar-tooltip-overlapping-date::before {
|
|
125
112
|
content: "";
|
|
126
113
|
width: 10px;
|
|
127
114
|
height: 10px;
|
|
@@ -136,9 +123,7 @@
|
|
|
136
123
|
|
|
137
124
|
.will-root .will-calendar-filter-container .rdp-cell:hover .will-calendar-tooltip,
|
|
138
125
|
.will-root .will-calendar-filter-container .rdp-cell:hover .will-calendar-tooltip-check-out,
|
|
139
|
-
.will-root .will-calendar-filter-container .rdp-cell:hover .will-calendar-tooltip-overlapping-date
|
|
140
|
-
.will-root .will-calendar-filter-container .rdp-cell:hover .will-calendar-tooltip-check-out-only,
|
|
141
|
-
.will-root .will-calendar-filter-container .rdp-cell:hover .will-calendar-tooltip-check-in-only {
|
|
126
|
+
.will-root .will-calendar-filter-container .rdp-cell:hover .will-calendar-tooltip-overlapping-date {
|
|
142
127
|
display: block;
|
|
143
128
|
}
|
|
144
129
|
|
|
@@ -164,43 +149,17 @@
|
|
|
164
149
|
|
|
165
150
|
/* No active selection */
|
|
166
151
|
|
|
167
|
-
.will-root .will-calendar-filter-container .no-active-selection
|
|
168
|
-
.will-root .will-calendar-filter-container .no-active-selection
|
|
169
|
-
.will-root .will-calendar-filter-container .no-active-selection
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
.will-root .will-calendar-filter-container .no-active-selection-start::before,
|
|
174
|
-
.will-root .will-calendar-filter-container .no-active-selection-mid::before,
|
|
175
|
-
.will-root .will-calendar-filter-container .no-active-selection-end::before {
|
|
176
|
-
content: "";
|
|
177
|
-
position: absolute;
|
|
178
|
-
width: 100%;
|
|
179
|
-
height: 100%;
|
|
180
|
-
border: 2px solid var(--will-light-grey);
|
|
181
|
-
box-sizing: border-box;
|
|
182
|
-
}
|
|
183
|
-
|
|
184
|
-
.will-root .will-calendar-filter-container .no-active-selection-start::before {
|
|
185
|
-
border-right: none;
|
|
186
|
-
border-top-left-radius: 50%;
|
|
187
|
-
border-bottom-left-radius: 50%;
|
|
188
|
-
}
|
|
189
|
-
|
|
190
|
-
.will-root .will-calendar-filter-container .no-active-selection-mid::before {
|
|
191
|
-
border-right: none;
|
|
192
|
-
border-left: none;
|
|
193
|
-
}
|
|
194
|
-
|
|
195
|
-
.will-root .will-calendar-filter-container .no-active-selection-end::before {
|
|
196
|
-
border-left: none;
|
|
197
|
-
border-top-right-radius: 50%;
|
|
198
|
-
border-bottom-right-radius: 50%;
|
|
152
|
+
.will-root .will-calendar-filter-container .rdp-day_selected.rdp-day_range_start.no-active-selection,
|
|
153
|
+
.will-root .will-calendar-filter-container .rdp-day_selected.rdp-day_range_middle.no-active-selection,
|
|
154
|
+
.will-root .will-calendar-filter-container .rdp-day_selected.rdp-day_range_end.no-active-selection {
|
|
155
|
+
background-color: var(--will-onahau);
|
|
156
|
+
color: inherit;
|
|
199
157
|
}
|
|
200
158
|
|
|
201
|
-
.will-root .will-calendar-filter-container .rdp-day_selected.rdp-
|
|
202
|
-
|
|
203
|
-
|
|
159
|
+
.will-root .will-calendar-filter-container .rdp-day_selected.rdp-day_range_start.no-active-selection:hover,
|
|
160
|
+
.will-root .will-calendar-filter-container .rdp-day_selected.rdp-day_range_middle.no-active-selection:hover,
|
|
161
|
+
.will-root .will-calendar-filter-container .rdp-day_selected.rdp-day_range_end.no-active-selection:hover {
|
|
162
|
+
background-color: var(--rdp-background-color);
|
|
204
163
|
}
|
|
205
164
|
|
|
206
165
|
/* Overlapping date */
|
|
@@ -208,23 +167,11 @@
|
|
|
208
167
|
.will-root .will-calendar-filter-container .overlapping-date {
|
|
209
168
|
user-select: none;
|
|
210
169
|
pointer-events: none;
|
|
170
|
+
|
|
211
171
|
}
|
|
212
172
|
|
|
213
173
|
.will-root .will-calendar-filter-container .overlapping-date:hover {
|
|
214
174
|
cursor: not-allowed;
|
|
215
175
|
}
|
|
216
176
|
|
|
217
|
-
@media (max-width: 600px) {
|
|
218
|
-
/* Tooltips */
|
|
219
|
-
.will-root .will-calendar-filter-container .will-calendar-tooltip,
|
|
220
|
-
.will-root .will-calendar-filter-container .will-calendar-tooltip-check-out,
|
|
221
|
-
.will-root .will-calendar-filter-container .will-calendar-tooltip-overlapping-date,
|
|
222
|
-
.will-root .will-calendar-filter-container .will-calendar-tooltip-check-out-only,
|
|
223
|
-
.will-root .will-calendar-filter-container .will-calendar-tooltip-check-in-only {
|
|
224
|
-
top: -70px;
|
|
225
|
-
white-space: wrap;
|
|
226
|
-
max-width: 120px;
|
|
227
|
-
}
|
|
228
|
-
}
|
|
229
|
-
|
|
230
177
|
|