@lazerlen/legend-calendar 1.2.0 → 1.3.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.
@@ -9,12 +9,12 @@
9
9
  CJS Build start
10
10
  ESM Build start
11
11
  DTS Build start
12
- ESM dist/index.mjs 70.25 KB
13
- ESM dist/index.mjs.map 140.21 KB
14
- ESM ⚡️ Build success in 1089ms
15
- CJS dist/index.js 73.30 KB
16
- CJS dist/index.js.map 140.74 KB
17
- CJS ⚡️ Build success in 1089ms
18
- DTS ⚡️ Build success in 1185ms
19
- DTS dist/index.d.ts 24.07 KB
20
- DTS dist/index.d.mts 24.07 KB
12
+ CJS dist/index.js 74.31 KB
13
+ CJS dist/index.js.map 142.39 KB
14
+ CJS ⚡️ Build success in 1155ms
15
+ ESM dist/index.mjs 71.21 KB
16
+ ESM dist/index.mjs.map 141.86 KB
17
+ ESM ⚡️ Build success in 1155ms
18
+ DTS ⚡️ Build success in 1283ms
19
+ DTS dist/index.d.ts 24.36 KB
20
+ DTS dist/index.d.mts 24.36 KB
@@ -5,186 +5,186 @@
5
5
  src/hooks/useDateRange.test.ts:
6
6
  react-test-renderer is deprecated. See https://react.dev/warnings/react-test-renderer
7
7
  The current testing environment is not configured to support act(...)
8
- ✓ useDateRange > should initialize with correct default values [5.48ms]
8
+ ✓ useDateRange > should initialize with correct default values [7.06ms]
9
9
  react-test-renderer is deprecated. See https://react.dev/warnings/react-test-renderer
10
10
  The current testing environment is not configured to support act(...)
11
11
  The current testing environment is not configured to support act(...)
12
12
  The current testing environment is not configured to support act(...)
13
13
  The current testing environment is not configured to support act(...)
14
14
  The current testing environment is not configured to support act(...)
15
- ✓ useDateRange > should update dateRange correctly on onCalendarDayPress [1.31ms]
15
+ ✓ useDateRange > should update dateRange correctly on onCalendarDayPress [1.84ms]
16
16
  react-test-renderer is deprecated. See https://react.dev/warnings/react-test-renderer
17
17
  The current testing environment is not configured to support act(...)
18
18
  The current testing environment is not configured to support act(...)
19
19
  The current testing environment is not configured to support act(...)
20
20
  The current testing environment is not configured to support act(...)
21
- ✓ useDateRange > should clear dateRange on onClearDateRange [1.09ms]
21
+ ✓ useDateRange > should clear dateRange on onClearDateRange [0.95ms]
22
22
  react-test-renderer is deprecated. See https://react.dev/warnings/react-test-renderer
23
23
  The current testing environment is not configured to support act(...)
24
24
  The current testing environment is not configured to support act(...)
25
25
  The current testing environment is not configured to support act(...)
26
26
  The current testing environment is not configured to support act(...)
27
- ✓ useDateRange > should update isDateRangeValid correctly [0.34ms]
27
+ ✓ useDateRange > should update isDateRangeValid correctly [0.37ms]
28
28
  react-test-renderer is deprecated. See https://react.dev/warnings/react-test-renderer
29
29
  The current testing environment is not configured to support act(...)
30
- ✓ useDateRange > can initialize a date range [0.12ms]
30
+ ✓ useDateRange > can initialize a date range [0.11ms]
31
31
  
32
32
  src/hooks/useCalendarList.test.ts:
33
- ✓ getHeightForMonth > Measures months with 5 weeks (no calendar spacing) [0.12ms]
34
- ✓ getHeightForMonth > Measures months with 5 weeks (with calendar spacing) [0.10ms]
33
+ ✓ getHeightForMonth > Measures months with 5 weeks (no calendar spacing) [0.10ms]
34
+ ✓ getHeightForMonth > Measures months with 5 weeks (with calendar spacing) [0.03ms]
35
35
  ✓ getHeightForMonth > Accounts for additional height [0.02ms]
36
- ✓ getHeightForMonth > Measures months with 6 weeks [0.01ms]
37
- ✓ getHeightForMonth > February 24 has the right height with base options [0.42ms]
36
+ ✓ getHeightForMonth > Measures months with 6 weeks [0.02ms]
37
+ ✓ getHeightForMonth > February 24 has the right height with base options [0.66ms]
38
38
  react-test-renderer is deprecated. See https://react.dev/warnings/react-test-renderer
39
39
  The current testing environment is not configured to support act(...)
40
40
  The current testing environment is not configured to support act(...)
41
41
  The current testing environment is not configured to support act(...)
42
- ✓ useCalendarList > Min/Max dates > Max: virtualization still works as expected [0.84ms]
42
+ ✓ useCalendarList > Min/Max dates > Max: virtualization still works as expected [1.04ms]
43
43
  react-test-renderer is deprecated. See https://react.dev/warnings/react-test-renderer
44
44
  The current testing environment is not configured to support act(...)
45
45
  The current testing environment is not configured to support act(...)
46
46
  The current testing environment is not configured to support act(...)
47
- ✓ useCalendarList > Min/Max dates > Min: virtualization still works as expected [0.32ms]
47
+ ✓ useCalendarList > Min/Max dates > Min: virtualization still works as expected [0.28ms]
48
48
  react-test-renderer is deprecated. See https://react.dev/warnings/react-test-renderer
49
49
  The current testing environment is not configured to support act(...)
50
- ✓ useCalendarList > Min/Max dates > Returns a single month when min and max are in the same month [0.09ms]
50
+ ✓ useCalendarList > Min/Max dates > Returns a single month when min and max are in the same month [0.06ms]
51
51
  react-test-renderer is deprecated. See https://react.dev/warnings/react-test-renderer
52
52
  The current testing environment is not configured to support act(...)
53
- ✓ useCalendarList > Min/Max dates > Returns a range of months bounded by the min and max dates [0.07ms]
53
+ ✓ useCalendarList > Min/Max dates > Returns a range of months bounded by the min and max dates [0.10ms]
54
54
  react-test-renderer is deprecated. See https://react.dev/warnings/react-test-renderer
55
55
  The current testing environment is not configured to support act(...)
56
- ✓ useCalendarList > Min/Max dates > Ignores past/future scroll ranges when min/max dates are used [0.13ms]
56
+ ✓ useCalendarList > Min/Max dates > Ignores past/future scroll ranges when min/max dates are used [0.10ms]
57
57
  react-test-renderer is deprecated. See https://react.dev/warnings/react-test-renderer
58
58
  The current testing environment is not configured to support act(...)
59
- ✓ useCalendarList > Min/Max dates > Append/Prepend are no-op if min/max are reached [0.24ms]
59
+ ✓ useCalendarList > Min/Max dates > Append/Prepend are no-op if min/max are reached [0.10ms]
60
60
  react-test-renderer is deprecated. See https://react.dev/warnings/react-test-renderer
61
61
  The current testing environment is not configured to support act(...)
62
62
  The current testing environment is not configured to support act(...)
63
63
  The current testing environment is not configured to support act(...)
64
- ✓ useCalendarList > Min/Max dates > Prepend does not trigger a state update when starting month is already present [0.24ms]
64
+ ✓ useCalendarList > Min/Max dates > Prepend does not trigger a state update when starting month is already present [0.52ms]
65
65
  react-test-renderer is deprecated. See https://react.dev/warnings/react-test-renderer
66
66
  The current testing environment is not configured to support act(...)
67
- ✓ useCalendarList > github issues > #16: Incorrect scroll position when setting calendarMinDateId [0.14ms]
67
+ ✓ useCalendarList > github issues > #16: Incorrect scroll position when setting calendarMinDateId [0.15ms]
68
68
  react-test-renderer is deprecated. See https://react.dev/warnings/react-test-renderer
69
69
  The current testing environment is not configured to support act(...)
70
- ✓ useCalendarList > Data is correctly built when future/past ranges are 0 [0.07ms]
70
+ ✓ useCalendarList > Data is correctly built when future/past ranges are 0 [0.12ms]
71
71
  
72
72
  src/hooks/useCalendar.test.ts:
73
- ✓ buildCalendar > isLastDayOfWeek > isLastDayOfWeek respects "sunday" as last day of week [10.22ms]
74
- ✓ buildCalendar > isLastDayOfWeek > isLastDayOfWeek respects "monday" as last day of week [2.35ms]
75
- ✓ buildCalendar > isWeekend > starting on sunday [1.85ms]
76
- ✓ buildCalendar > isWeekend > starting on monday [1.28ms]
77
- ✓ buildCalendar > state > active: supersedes today [1.16ms]
78
- ✓ buildCalendar > state > active: supersedes disabled (with calendarDisabledDateIds) [0.86ms]
79
- ✓ buildCalendar > state > active: supersedes disabled (with min) [0.91ms]
80
- ✓ buildCalendar > state > active: supersedes disabled (with max) [1.55ms]
81
- ✓ buildCalendar > state > active: supersedes idle [1.43ms]
82
- ✓ buildCalendar > state > disabled: supersedes idle [1.37ms]
83
- ✓ buildCalendar > state > today: supersedes idle [1.11ms]
84
- ✓ buildCalendar > state > idle: serves as the base state [2.84ms]
85
- ✓ buildCalendar > builds the month row [1.65ms]
86
- ✓ buildCalendar > build the month row with custom formatting [3.22ms]
87
- ✓ buildCalendar > builds the week days row starting on sunday [1.42ms]
88
- ✓ buildCalendar > builds the week days row starting on monday [1.50ms]
89
- ✓ buildCalendar > builds the weeks row [1.34ms]
90
- ✓ buildCalendar > build the weeks row with custom formatting [0.53ms]
91
- ✓ buildCalendar > handles the expected range [1.23ms]
92
- ✓ buildCalendar > calendarMinDate [1.27ms]
93
- ✓ buildCalendar > calendarMaxDate [1.18ms]
73
+ ✓ buildCalendar > isLastDayOfWeek > isLastDayOfWeek respects "sunday" as last day of week [11.87ms]
74
+ ✓ buildCalendar > isLastDayOfWeek > isLastDayOfWeek respects "monday" as last day of week [1.15ms]
75
+ ✓ buildCalendar > isWeekend > starting on sunday [1.51ms]
76
+ ✓ buildCalendar > isWeekend > starting on monday [1.05ms]
77
+ ✓ buildCalendar > state > active: supersedes today [1.27ms]
78
+ ✓ buildCalendar > state > active: supersedes disabled (with calendarDisabledDateIds) [1.36ms]
79
+ ✓ buildCalendar > state > active: supersedes disabled (with min) [0.90ms]
80
+ ✓ buildCalendar > state > active: supersedes disabled (with max) [1.09ms]
81
+ ✓ buildCalendar > state > active: supersedes idle [1.14ms]
82
+ ✓ buildCalendar > state > disabled: supersedes idle [1.11ms]
83
+ ✓ buildCalendar > state > today: supersedes idle [1.29ms]
84
+ ✓ buildCalendar > state > idle: serves as the base state [1.58ms]
85
+ ✓ buildCalendar > builds the month row [1.37ms]
86
+ ✓ buildCalendar > build the month row with custom formatting [2.73ms]
87
+ ✓ buildCalendar > builds the week days row starting on sunday [1.14ms]
88
+ ✓ buildCalendar > builds the week days row starting on monday [1.29ms]
89
+ ✓ buildCalendar > builds the weeks row [1.51ms]
90
+ ✓ buildCalendar > build the weeks row with custom formatting [0.82ms]
91
+ ✓ buildCalendar > handles the expected range [0.93ms]
92
+ ✓ buildCalendar > calendarMinDate [1.17ms]
93
+ ✓ buildCalendar > calendarMaxDate [1.07ms]
94
94
  
95
95
  src/hooks/useOptimizedDayMetadata.test.ts:
96
96
  react-test-renderer is deprecated. See https://react.dev/warnings/react-test-renderer
97
97
  The current testing environment is not configured to support act(...)
98
- ✓ useOptimizedDayMetadata > return the base metadata as the initial value [1.42ms]
98
+ ✓ useOptimizedDayMetadata > return the base metadata as the initial value [1.08ms]
99
99
  react-test-renderer is deprecated. See https://react.dev/warnings/react-test-renderer
100
100
  The current testing environment is not configured to support act(...)
101
101
  The current testing environment is not configured to support act(...)
102
- ✓ useOptimizedDayMetadata > if the base changes, the returned value should match it. [0.92ms]
102
+ ✓ useOptimizedDayMetadata > if the base changes, the returned value should match it. [1.01ms]
103
103
  react-test-renderer is deprecated. See https://react.dev/warnings/react-test-renderer
104
104
  The current testing environment is not configured to support act(...)
105
105
  The current testing environment is not configured to support act(...)
106
- ✓ useOptimizedDayMetadata > endOfRange: returns the updated metadata once an event is emitted [0.67ms]
106
+ ✓ useOptimizedDayMetadata > endOfRange: returns the updated metadata once an event is emitted [1.01ms]
107
107
  react-test-renderer is deprecated. See https://react.dev/warnings/react-test-renderer
108
108
  The current testing environment is not configured to support act(...)
109
109
  The current testing environment is not configured to support act(...)
110
- ✓ useOptimizedDayMetadata > startOfRange: returns the updated metadata once an event is emitted [0.33ms]
110
+ ✓ useOptimizedDayMetadata > startOfRange: returns the updated metadata once an event is emitted [0.37ms]
111
111
  react-test-renderer is deprecated. See https://react.dev/warnings/react-test-renderer
112
112
  The current testing environment is not configured to support act(...)
113
113
  The current testing environment is not configured to support act(...)
114
- ✓ useOptimizedDayMetadata > startOfRange|endOfRange: returns the updated metadata once an event is emitted [0.14ms]
114
+ ✓ useOptimizedDayMetadata > startOfRange|endOfRange: returns the updated metadata once an event is emitted [0.25ms]
115
115
  react-test-renderer is deprecated. See https://react.dev/warnings/react-test-renderer
116
116
  The current testing environment is not configured to support act(...)
117
117
  The current testing environment is not configured to support act(...)
118
- ✓ useOptimizedDayMetadata > doesn't re-render if the active dates don't overlap [0.16ms]
118
+ ✓ useOptimizedDayMetadata > doesn't re-render if the active dates don't overlap [0.24ms]
119
119
  react-test-renderer is deprecated. See https://react.dev/warnings/react-test-renderer
120
120
  The current testing environment is not configured to support act(...)
121
121
  The current testing environment is not configured to support act(...)
122
122
  The current testing environment is not configured to support act(...)
123
- ✓ useOptimizedDayMetadata > resets the state once a new range is selected [0.14ms]
123
+ ✓ useOptimizedDayMetadata > resets the state once a new range is selected [0.18ms]
124
124
  react-test-renderer is deprecated. See https://react.dev/warnings/react-test-renderer
125
125
  The current testing environment is not configured to support act(...)
126
126
  The current testing environment is not configured to support act(...)
127
- ✓ useOptimizedDayMetadata with calendarInstanceId > uses the default instance ID when not provided [0.10ms]
127
+ ✓ useOptimizedDayMetadata with calendarInstanceId > uses the default instance ID when not provided [0.16ms]
128
128
  react-test-renderer is deprecated. See https://react.dev/warnings/react-test-renderer
129
129
  The current testing environment is not configured to support act(...)
130
130
  The current testing environment is not configured to support act(...)
131
- ✓ useOptimizedDayMetadata with calendarInstanceId > responds to events for the correct instance ID [0.08ms]
131
+ ✓ useOptimizedDayMetadata with calendarInstanceId > responds to events for the correct instance ID [0.12ms]
132
132
  react-test-renderer is deprecated. See https://react.dev/warnings/react-test-renderer
133
133
  The current testing environment is not configured to support act(...)
134
- ✓ useOptimizedDayMetadata with calendarInstanceId > ignores events for different instance IDs [0.06ms]
134
+ ✓ useOptimizedDayMetadata with calendarInstanceId > ignores events for different instance IDs [0.09ms]
135
135
  react-test-renderer is deprecated. See https://react.dev/warnings/react-test-renderer
136
136
  The current testing environment is not configured to support act(...)
137
137
  react-test-renderer is deprecated. See https://react.dev/warnings/react-test-renderer
138
138
  The current testing environment is not configured to support act(...)
139
139
  The current testing environment is not configured to support act(...)
140
140
  The current testing environment is not configured to support act(...)
141
- ✓ useOptimizedDayMetadata with calendarInstanceId > handles multiple instances correctly [0.17ms]
141
+ ✓ useOptimizedDayMetadata with calendarInstanceId > handles multiple instances correctly [0.21ms]
142
142
  react-test-renderer is deprecated. See https://react.dev/warnings/react-test-renderer
143
143
  The current testing environment is not configured to support act(...)
144
144
  The current testing environment is not configured to support act(...)
145
145
  The current testing environment is not configured to support act(...)
146
- ✓ useOptimizedDayMetadata with calendarInstanceId > resets state for the correct instance when a new range is selected [0.12ms]
146
+ ✓ useOptimizedDayMetadata with calendarInstanceId > resets state for the correct instance when a new range is selected [0.15ms]
147
147
  
148
148
  src/helpers/dates.test.ts:
149
- ✓ toDateId: UTC time zone > January 1st, 2024 [0.14ms]
149
+ ✓ toDateId: UTC time zone > January 1st, 2024
150
150
  ✓ toDateId: UTC time zone > January 31th, 2024 [0.02ms]
151
- ✓ toDateId: UTC time zone > February 1st, 2024
151
+ ✓ toDateId: UTC time zone > February 1st, 2024 [0.01ms]
152
152
  ✓ toDateId: UTC time zone > February 10th, 2024
153
153
  ✓ toDateId: UTC time zone > convert between ID -> Date -> ID returns the original result [0.01ms]
154
154
  ✓ toDateId: Brasilia time zone  > January 1st, 2024
155
- ✓ toDateId: Brasilia time zone  > January 31th, 2024 [0.01ms]
156
- ✓ toDateId: Brasilia time zone  > February 1st, 2024
157
- ✓ toDateId: Brasilia time zone  > February 10th, 2024 [0.01ms]
155
+ ✓ toDateId: Brasilia time zone  > January 31th, 2024
156
+ ✓ toDateId: Brasilia time zone  > February 1st, 2024 [0.02ms]
157
+ ✓ toDateId: Brasilia time zone  > February 10th, 2024
158
158
  ✓ toDateId: Brasilia time zone  > February 29th, 2024 [0.01ms]
159
159
  ✓ toDateId: Brasilia time zone  > convert between ID -> Date -> ID returns the original result [0.02ms]
160
160
  ✓ fromDateId: UTC time zone > parse Jan 1st [0.02ms]
161
- ✓ fromDateId: UTC time zone > parses March 1st [0.02ms]
161
+ ✓ fromDateId: UTC time zone > parses March 1st [0.01ms]
162
162
  ✓ fromDateId: Brasilia time zone > parse Jan 1st
163
163
  ✓ fromDateId: Brasilia time zone > parses March 1st
164
- ✓ startOfMonth > January [0.02ms]
165
- ✓ startOfMonth > February [0.01ms]
166
- ✓ startOfMonth > matches date-fns [1.58ms]
167
- ✓ endOfMonth > January [0.04ms]
168
- ✓ endOfMonth > February [0.03ms]
169
- ✓ endOfMonth > matches date-fns [1.11ms]
170
- ✓ startOfWeek > sunday: week of February 17th [0.02ms]
171
- ✓ startOfWeek > sunday: week of February 11th
164
+ ✓ startOfMonth > January [0.01ms]
165
+ ✓ startOfMonth > February
166
+ ✓ startOfMonth > matches date-fns [1.44ms]
167
+ ✓ endOfMonth > January [0.03ms]
168
+ ✓ endOfMonth > February [0.02ms]
169
+ ✓ endOfMonth > matches date-fns [1.25ms]
170
+ ✓ startOfWeek > sunday: week of February 17th [0.01ms]
171
+ ✓ startOfWeek > sunday: week of February 11th [0.03ms]
172
172
  ✓ startOfWeek > monday: week of February 17th
173
- ✓ startOfWeek > monday: week of February 11th [0.01ms]
174
- ✓ startOfWeek > matches date-fns [1.21ms]
175
- ✓ addMonths > add 1 month [0.03ms]
176
- ✓ addMonths > add 10 months [0.04ms]
177
- ✓ addMonths > matches date-fns [0.18ms]
178
- ✓ subMonths > sub 1 month
173
+ ✓ startOfWeek > monday: week of February 11th
174
+ ✓ startOfWeek > matches date-fns [1.19ms]
175
+ ✓ addMonths > add 1 month [0.02ms]
176
+ ✓ addMonths > add 10 months
177
+ ✓ addMonths > matches date-fns [0.19ms]
178
+ ✓ subMonths > sub 1 month [0.02ms]
179
179
  ✓ subMonths > sub 10 months
180
- ✓ subMonths > matches date-fns [0.27ms]
181
- ✓ addDays > add 1 day [0.03ms]
180
+ ✓ subMonths > matches date-fns [0.13ms]
181
+ ✓ addDays > add 1 day [0.02ms]
182
182
  ✓ addDays > add 10 days [0.01ms]
183
- ✓ addDays > matches date-fns [0.09ms]
184
- ✓ subDays > sub 1 day [0.01ms]
185
- ✓ subDays > sub 10 days
183
+ ✓ addDays > matches date-fns [0.08ms]
184
+ ✓ subDays > sub 1 day [0.03ms]
185
+ ✓ subDays > sub 10 days [0.02ms]
186
186
  ✓ subDays > matches date-fns [0.08ms]
187
- ✓ isWeekend > Friday
187
+ ✓ isWeekend > Friday [0.03ms]
188
188
  ✓ isWeekend > Saturday
189
189
  ✓ isWeekend > Sunday
190
190
  ✓ isWeekend > Monday
@@ -200,18 +200,18 @@ src/helpers/dates.test.ts:
200
200
  ✓ differenceInMonths  > edge cases > returns the number of full months between the given dates - end of Feb [0.02ms]
201
201
  ✓ differenceInMonths  > returns the number of full months between the given dates
202
202
  ✓ differenceInMonths  > returns a negative number if the time value of the first date is smaller
203
- ✓ differenceInMonths  > returns NaN if the first date is `Invalid Date`
204
- ✓ differenceInMonths  > returns NaN if the second date is `Invalid Date`
203
+ ✓ differenceInMonths  > returns NaN if the first date is `Invalid Date` [0.21ms]
204
+ ✓ differenceInMonths  > returns NaN if the second date is `Invalid Date` [0.02ms]
205
205
  ✓ differenceInMonths  > returns NaN if the both dates are `Invalid Date`
206
- ✓ getWeeksInMonth > sunday: Month with 5 weeks
207
- ✓ getWeeksInMonth > sunday: Month with 6 weeks
208
- ✓ getWeeksInMonth > monday: Month with 5 weeks
209
- ✓ getWeeksInMonth > matches date-fns [2.19ms]
210
- ✓ getWeekOfMonth > sunday: June [0.21ms]
211
- ✓ getWeekOfMonth > monday: June [0.06ms]
212
- ✓ getWeekOfMonth > matches date-fns [0.65ms]
206
+ ✓ getWeeksInMonth > sunday: Month with 5 weeks [0.03ms]
207
+ ✓ getWeeksInMonth > sunday: Month with 6 weeks [0.01ms]
208
+ ✓ getWeeksInMonth > monday: Month with 5 weeks [0.03ms]
209
+ ✓ getWeeksInMonth > matches date-fns [2.46ms]
210
+ ✓ getWeekOfMonth > sunday: June [0.09ms]
211
+ ✓ getWeekOfMonth > monday: June [0.04ms]
212
+ ✓ getWeekOfMonth > matches date-fns [0.38ms]
213
213
 
214
214
   116 pass
215
215
   0 fail
216
216
  8696 expect() calls
217
- Ran 116 tests across 5 files. [178.00ms]
217
+ Ran 116 tests across 5 files. [193.00ms]
package/dist/index.d.mts CHANGED
@@ -166,6 +166,10 @@ interface CalendarItemDayContainerTheme {
166
166
  /** An absolute positioned filler to join the active days together in a single
167
167
  * complete range. */
168
168
  activeDayFiller?: ViewStyle | ((params: CalendarDayMetadata) => ViewStyle);
169
+ /** An absolutely-positioned background view rendered inside the spacer,
170
+ * behind the day button. Useful for rendering a range band that doesn't
171
+ * extend behind the circular edge days. */
172
+ activeDayRangeBackground?: ViewStyle | ((params: CalendarDayMetadata) => ViewStyle | undefined);
169
173
  }
170
174
  interface CalendarItemDayContainerProps {
171
175
  children: ReactNode;
package/dist/index.d.ts CHANGED
@@ -166,6 +166,10 @@ interface CalendarItemDayContainerTheme {
166
166
  /** An absolute positioned filler to join the active days together in a single
167
167
  * complete range. */
168
168
  activeDayFiller?: ViewStyle | ((params: CalendarDayMetadata) => ViewStyle);
169
+ /** An absolutely-positioned background view rendered inside the spacer,
170
+ * behind the day button. Useful for rendering a range band that doesn't
171
+ * extend behind the circular edge days. */
172
+ activeDayRangeBackground?: ViewStyle | ((params: CalendarDayMetadata) => ViewStyle | undefined);
169
173
  }
170
174
  interface CalendarItemDayContainerProps {
171
175
  children: ReactNode;
package/dist/index.js CHANGED
@@ -791,7 +791,7 @@ var CalendarItemDay = /* @__PURE__ */ (0, import_react4.memo)(function CalendarI
791
791
  return t7;
792
792
  });
793
793
  var CalendarItemDayContainer = /* @__PURE__ */ (0, import_react4.memo)(function CalendarItemDayContainer2(t0) {
794
- const $ = (0, import_compiler_runtime3.c)(21);
794
+ const $ = (0, import_compiler_runtime3.c)(29);
795
795
  const {
796
796
  children,
797
797
  isStartOfWeek,
@@ -858,29 +858,65 @@ var CalendarItemDayContainer = /* @__PURE__ */ (0, import_react4.memo)(function
858
858
  }
859
859
  const activeDayFiller = t5;
860
860
  let t6;
861
- if ($[15] !== activeDayFiller) {
862
- t6 = activeDayFiller ? /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_react_native2.View, {
861
+ if ($[15] !== metadata || $[16] !== theme) {
862
+ t6 = typeof (theme == null ? void 0 : theme.activeDayRangeBackground) === "function" && metadata ? theme.activeDayRangeBackground(metadata) : theme == null ? void 0 : theme.activeDayRangeBackground;
863
+ $[15] = metadata;
864
+ $[16] = theme;
865
+ $[17] = t6;
866
+ } else {
867
+ t6 = $[17];
868
+ }
869
+ const rangeBackgroundTheme = t6;
870
+ let t7;
871
+ if ($[18] !== rangeBackgroundTheme) {
872
+ t7 = rangeBackgroundTheme ? __spreadValues({
873
+ position: "absolute",
874
+ top: 0,
875
+ bottom: 0,
876
+ left: 0,
877
+ right: 0
878
+ }, rangeBackgroundTheme) : null;
879
+ $[18] = rangeBackgroundTheme;
880
+ $[19] = t7;
881
+ } else {
882
+ t7 = $[19];
883
+ }
884
+ const rangeBackground = t7;
885
+ let t8;
886
+ if ($[20] !== rangeBackground) {
887
+ t8 = rangeBackground ? /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_react_native2.View, {
888
+ style: rangeBackground
889
+ }) : null;
890
+ $[20] = rangeBackground;
891
+ $[21] = t8;
892
+ } else {
893
+ t8 = $[21];
894
+ }
895
+ let t9;
896
+ if ($[22] !== activeDayFiller) {
897
+ t9 = activeDayFiller ? /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_react_native2.View, {
863
898
  style: activeDayFiller
864
899
  }) : null;
865
- $[15] = activeDayFiller;
866
- $[16] = t6;
900
+ $[22] = activeDayFiller;
901
+ $[23] = t9;
867
902
  } else {
868
- t6 = $[16];
903
+ t9 = $[23];
869
904
  }
870
- let t7;
871
- if ($[17] !== children || $[18] !== spacerStyles || $[19] !== t6) {
872
- t7 = /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_react_native2.View, {
905
+ let t10;
906
+ if ($[24] !== children || $[25] !== spacerStyles || $[26] !== t8 || $[27] !== t9) {
907
+ t10 = /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_react_native2.View, {
873
908
  style: spacerStyles,
874
- children: [t6, children]
909
+ children: [t8, t9, children]
875
910
  });
876
- $[17] = children;
877
- $[18] = spacerStyles;
878
- $[19] = t6;
879
- $[20] = t7;
911
+ $[24] = children;
912
+ $[25] = spacerStyles;
913
+ $[26] = t8;
914
+ $[27] = t9;
915
+ $[28] = t10;
880
916
  } else {
881
- t7 = $[20];
917
+ t10 = $[28];
882
918
  }
883
- return t7;
919
+ return t10;
884
920
  });
885
921
  var CalendarItemDayWithContainer = /* @__PURE__ */ (0, import_react4.memo)(function CalendarItemDayWithContainer2(t0) {
886
922
  const $ = (0, import_compiler_runtime3.c)(14);