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.
Files changed (27) hide show
  1. package/README.md +49 -16
  2. package/lib/assets/IconsSvg.d.ts +1 -1
  3. package/lib/components/FilterBar/FilterBarTypes.d.ts +1 -1
  4. package/lib/components/FilterBar/components/guests/Guests.d.ts +1 -1
  5. package/lib/components/FilterCalendar/hooks/useFilterCalendar.d.ts +0 -1
  6. package/lib/core/components/calendar/utils/calendarSelectionRules.d.ts +2 -3
  7. package/lib/core/components/calendar/utils/handleCalendarModifiers.d.ts +1 -9
  8. package/lib/core/components/calendar/utils/handleRangeContextDisabledDates.d.ts +1 -1
  9. package/lib/index.esm.js +77 -95
  10. package/lib/index.esm.js.map +1 -1
  11. package/lib/index.js +77 -95
  12. package/lib/index.js.map +1 -1
  13. package/lib/index.umd.js +77 -95
  14. package/lib/index.umd.js.map +1 -1
  15. package/package.json +1 -1
  16. package/src/assets/IconsSvg.tsx +1 -0
  17. package/src/components/FilterBar/FilterBarTypes.ts +1 -1
  18. package/src/components/FilterBar/components/guests/GuestCount/GuestCount.tsx +5 -5
  19. package/src/components/FilterBar/components/guests/Guests.tsx +3 -7
  20. package/src/components/FilterCalendar/FilterCalendar.stories.tsx +275 -275
  21. package/src/components/FilterCalendar/FilterCalendar.tsx +0 -2
  22. package/src/components/FilterCalendar/hooks/useFilterCalendar.ts +0 -1
  23. package/src/core/components/calendar/Calendar.tsx +46 -35
  24. package/src/core/components/calendar/hooks/useUpdateDisabledDates.tsx +3 -3
  25. package/src/core/components/calendar/utils/calendarSelectionRules.tsx +0 -48
  26. package/src/core/components/calendar/utils/handleCalendarModifiers.tsx +1 -30
  27. package/src/core/components/calendar/utils/handleRangeContextDisabledDates.tsx +3 -3
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "willba-component-library",
3
- "version": "0.2.93",
3
+ "version": "0.2.95",
4
4
  "description": "A custom UI component library",
5
5
  "main": "lib/index.js",
6
6
  "module": "lib/index.esm.js",
@@ -64,5 +64,6 @@ export const IconsSvg = ({ fill, size, icon }: Props) => {
64
64
  </svg>
65
65
  )
66
66
  default:
67
+ return null
67
68
  }
68
69
  }
@@ -27,7 +27,7 @@ export type AgeCategoryType = {
27
27
 
28
28
  export type GuestsCountPropsType = {
29
29
  label: string
30
- id: number
30
+ id: string
31
31
  updateGuestsCount: (arg1: string, arg2: number) => void
32
32
  count: number
33
33
  minVal: number
@@ -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 ? true : false}
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
- stroke-width="2"
58
- stroke-linecap="round"
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
- stroke-width="2"
78
- stroke-linecap="round"
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={parseInt(category.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>