willba-component-library 0.2.93 → 0.2.95
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/README.md +49 -16
- package/lib/assets/IconsSvg.d.ts +1 -1
- package/lib/components/FilterBar/FilterBarTypes.d.ts +1 -1
- package/lib/components/FilterBar/components/guests/Guests.d.ts +1 -1
- package/lib/components/FilterCalendar/hooks/useFilterCalendar.d.ts +0 -1
- package/lib/core/components/calendar/utils/calendarSelectionRules.d.ts +2 -3
- package/lib/core/components/calendar/utils/handleCalendarModifiers.d.ts +1 -9
- package/lib/core/components/calendar/utils/handleRangeContextDisabledDates.d.ts +1 -1
- package/lib/index.esm.js +77 -95
- package/lib/index.esm.js.map +1 -1
- package/lib/index.js +77 -95
- package/lib/index.js.map +1 -1
- package/lib/index.umd.js +77 -95
- package/lib/index.umd.js.map +1 -1
- package/package.json +1 -1
- package/src/assets/IconsSvg.tsx +1 -0
- package/src/components/FilterBar/FilterBarTypes.ts +1 -1
- package/src/components/FilterBar/components/guests/GuestCount/GuestCount.tsx +5 -5
- package/src/components/FilterBar/components/guests/Guests.tsx +3 -7
- package/src/components/FilterCalendar/FilterCalendar.stories.tsx +275 -275
- package/src/components/FilterCalendar/FilterCalendar.tsx +0 -2
- package/src/components/FilterCalendar/hooks/useFilterCalendar.ts +0 -1
- package/src/core/components/calendar/Calendar.tsx +46 -35
- package/src/core/components/calendar/hooks/useUpdateDisabledDates.tsx +3 -3
- package/src/core/components/calendar/utils/calendarSelectionRules.tsx +0 -48
- package/src/core/components/calendar/utils/handleCalendarModifiers.tsx +1 -30
- package/src/core/components/calendar/utils/handleRangeContextDisabledDates.tsx +3 -3
package/package.json
CHANGED
package/src/assets/IconsSvg.tsx
CHANGED
|
@@ -36,7 +36,7 @@ export default function GuestCount({
|
|
|
36
36
|
<button
|
|
37
37
|
className="will-guests-filter-counter-button"
|
|
38
38
|
onClick={handleDecrement}
|
|
39
|
-
disabled={(minVal && count <= minVal) || !count
|
|
39
|
+
disabled={(minVal && count <= minVal) || !count}
|
|
40
40
|
style={{
|
|
41
41
|
cursor:
|
|
42
42
|
(minVal && count <= minVal) || !count ? 'initial' : 'pointer',
|
|
@@ -54,8 +54,8 @@ export default function GuestCount({
|
|
|
54
54
|
<path
|
|
55
55
|
d="M4 10H16"
|
|
56
56
|
stroke="currentColor"
|
|
57
|
-
|
|
58
|
-
|
|
57
|
+
strokeWidth="2"
|
|
58
|
+
strokeLinecap="round"
|
|
59
59
|
/>
|
|
60
60
|
</svg>
|
|
61
61
|
</button>
|
|
@@ -74,8 +74,8 @@ export default function GuestCount({
|
|
|
74
74
|
<path
|
|
75
75
|
d="M10 4V16M4 10H16"
|
|
76
76
|
stroke="currentColor"
|
|
77
|
-
|
|
78
|
-
|
|
77
|
+
strokeWidth="2"
|
|
78
|
+
strokeLinecap="round"
|
|
79
79
|
/>
|
|
80
80
|
</svg>
|
|
81
81
|
</button>
|
|
@@ -9,7 +9,7 @@ import './Guests.css'
|
|
|
9
9
|
type Props = {
|
|
10
10
|
ageCategories: AgeCategoryType[]
|
|
11
11
|
updateGuestsCount: (arg1: string, arg2: number) => void
|
|
12
|
-
ageCategoryCounts: AgeCategoryCount
|
|
12
|
+
ageCategoryCounts: AgeCategoryCount
|
|
13
13
|
}
|
|
14
14
|
|
|
15
15
|
export const Guests = forwardRef<HTMLDivElement, Props>(
|
|
@@ -23,16 +23,12 @@ export const Guests = forwardRef<HTMLDivElement, Props>(
|
|
|
23
23
|
{ageCategories?.map((category) => (
|
|
24
24
|
<GuestCount
|
|
25
25
|
key={category.id}
|
|
26
|
-
id={
|
|
26
|
+
id={category.id}
|
|
27
27
|
label={category.name}
|
|
28
28
|
minVal={category.minVal}
|
|
29
29
|
sortOrder={category.sortOrder}
|
|
30
30
|
updateGuestsCount={updateGuestsCount}
|
|
31
|
-
count={
|
|
32
|
-
(ageCategoryCounts as AgeCategoryCount)[
|
|
33
|
-
`guests-${category.id}`
|
|
34
|
-
] || 0
|
|
35
|
-
}
|
|
31
|
+
count={ageCategoryCounts[`guests-${category.id}`] || 0}
|
|
36
32
|
/>
|
|
37
33
|
))}
|
|
38
34
|
</div>
|