@lazerlen/legend-calendar 1.1.0 → 1.2.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 66.59 KB
13
- ESM dist/index.mjs.map 135.15 KB
14
- ESM ⚡️ Build success in 1028ms
15
- CJS dist/index.js 69.65 KB
16
- CJS dist/index.js.map 135.66 KB
17
- CJS ⚡️ Build success in 1028ms
18
- DTS ⚡️ Build success in 1163ms
19
- DTS dist/index.d.ts 24.02 KB
20
- DTS dist/index.d.mts 24.02 KB
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
@@ -5,190 +5,190 @@
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 [4.88ms]
8
+ ✓ useDateRange > should initialize with correct default values [5.48ms]
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 [0.69ms]
15
+ ✓ useDateRange > should update dateRange correctly on onCalendarDayPress [1.31ms]
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 [0.27ms]
21
+ ✓ useDateRange > should clear dateRange on onClearDateRange [1.09ms]
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.33ms]
27
+ ✓ useDateRange > should update isDateRangeValid correctly [0.34ms]
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.26ms]
30
+ ✓ useDateRange > can initialize a date range [0.12ms]
31
31
  
32
32
  src/hooks/useCalendarList.test.ts:
33
- ✓ getHeightForMonth > Measures months with 5 weeks (no calendar spacing) [0.04ms]
34
- ✓ getHeightForMonth > Measures months with 5 weeks (with calendar spacing) [0.01ms]
35
- ✓ getHeightForMonth > Accounts for additional height
33
+ ✓ getHeightForMonth > Measures months with 5 weeks (no calendar spacing) [0.12ms]
34
+ ✓ getHeightForMonth > Measures months with 5 weeks (with calendar spacing) [0.10ms]
35
+ ✓ getHeightForMonth > Accounts for additional height [0.02ms]
36
36
  ✓ getHeightForMonth > Measures months with 6 weeks [0.01ms]
37
- ✓ getHeightForMonth > February 24 has the right height with base options [0.40ms]
37
+ ✓ getHeightForMonth > February 24 has the right height with base options [0.42ms]
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.61ms]
42
+ ✓ useCalendarList > Min/Max dates > Max: virtualization still works as expected [0.84ms]
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.28ms]
47
+ ✓ useCalendarList > Min/Max dates > Min: virtualization still works as expected [0.32ms]
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.06ms]
50
+ ✓ useCalendarList > Min/Max dates > Returns a single month when min and max are in the same month [0.09ms]
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.11ms]
53
+ ✓ useCalendarList > Min/Max dates > Returns a range of months bounded by the min and max dates [0.07ms]
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.08ms]
56
+ ✓ useCalendarList > Min/Max dates > Ignores past/future scroll ranges when min/max dates are used [0.13ms]
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.11ms]
59
+ ✓ useCalendarList > Min/Max dates > Append/Prepend are no-op if min/max are reached [0.24ms]
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.21ms]
64
+ ✓ useCalendarList > Min/Max dates > Prepend does not trigger a state update when starting month is already present [0.24ms]
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.11ms]
67
+ ✓ useCalendarList > github issues > #16: Incorrect scroll position when setting calendarMinDateId [0.14ms]
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
70
  ✓ useCalendarList > Data is correctly built when future/past ranges are 0 [0.07ms]
71
71
  
72
72
  src/hooks/useCalendar.test.ts:
73
- ✓ buildCalendar > isLastDayOfWeek > isLastDayOfWeek respects "sunday" as last day of week [7.38ms]
74
- ✓ buildCalendar > isLastDayOfWeek > isLastDayOfWeek respects "monday" as last day of week [1.09ms]
75
- ✓ buildCalendar > isWeekend > starting on sunday [1.14ms]
76
- ✓ buildCalendar > isWeekend > starting on monday [1.20ms]
77
- ✓ buildCalendar > state > active: supersedes today [1.10ms]
78
- ✓ buildCalendar > state > active: supersedes disabled (with calendarDisabledDateIds) [1.08ms]
79
- ✓ buildCalendar > state > active: supersedes disabled (with min) [1.53ms]
80
- ✓ buildCalendar > state > active: supersedes disabled (with max) [1.15ms]
81
- ✓ buildCalendar > state > active: supersedes idle [1.06ms]
82
- ✓ buildCalendar > state > disabled: supersedes idle [1.13ms]
83
- ✓ buildCalendar > state > today: supersedes idle [1.45ms]
84
- ✓ buildCalendar > state > idle: serves as the base state [1.43ms]
85
- ✓ buildCalendar > builds the month row [1.02ms]
86
- ✓ buildCalendar > build the month row with custom formatting [1.55ms]
87
- ✓ buildCalendar > builds the week days row starting on sunday [1.29ms]
88
- ✓ buildCalendar > builds the week days row starting on monday [1.48ms]
89
- ✓ buildCalendar > builds the weeks row [2.15ms]
90
- ✓ buildCalendar > build the weeks row with custom formatting [1.45ms]
91
- ✓ buildCalendar > handles the expected range [1.77ms]
92
- ✓ buildCalendar > calendarMinDate [2.63ms]
93
- ✓ buildCalendar > calendarMaxDate [1.38ms]
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]
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 [0.89ms]
98
+ ✓ useOptimizedDayMetadata > return the base metadata as the initial value [1.42ms]
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.62ms]
102
+ ✓ useOptimizedDayMetadata > if the base changes, the returned value should match it. [0.92ms]
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.55ms]
106
+ ✓ useOptimizedDayMetadata > endOfRange: returns the updated metadata once an event is emitted [0.67ms]
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.17ms]
110
+ ✓ useOptimizedDayMetadata > startOfRange: returns the updated metadata once an event is emitted [0.33ms]
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.20ms]
114
+ ✓ useOptimizedDayMetadata > startOfRange|endOfRange: returns the updated metadata once an event is emitted [0.14ms]
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.19ms]
118
+ ✓ useOptimizedDayMetadata > doesn't re-render if the active dates don't overlap [0.16ms]
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.17ms]
123
+ ✓ useOptimizedDayMetadata > resets the state once a new range is selected [0.14ms]
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.23ms]
127
+ ✓ useOptimizedDayMetadata with calendarInstanceId > uses the default instance ID when not provided [0.10ms]
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.72ms]
131
+ ✓ useOptimizedDayMetadata with calendarInstanceId > responds to events for the correct instance ID [0.08ms]
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.38ms]
134
+ ✓ useOptimizedDayMetadata with calendarInstanceId > ignores events for different instance IDs [0.06ms]
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.77ms]
141
+ ✓ useOptimizedDayMetadata with calendarInstanceId > handles multiple instances correctly [0.17ms]
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.65ms]
146
+ ✓ useOptimizedDayMetadata with calendarInstanceId > resets state for the correct instance when a new range is selected [0.12ms]
147
147
  
148
148
  src/helpers/dates.test.ts:
149
- ✓ toDateId: UTC time zone > January 1st, 2024 [0.08ms]
150
- ✓ toDateId: UTC time zone > January 31th, 2024 [0.11ms]
151
- ✓ toDateId: UTC time zone > February 1st, 2024 [0.06ms]
152
- ✓ toDateId: UTC time zone > February 10th, 2024 [0.07ms]
153
- ✓ toDateId: UTC time zone > convert between ID -> Date -> ID returns the original result [0.04ms]
154
- ✓ toDateId: Brasilia time zone  > January 1st, 2024 [0.04ms]
155
- ✓ toDateId: Brasilia time zone  > January 31th, 2024 [0.07ms]
156
- ✓ toDateId: Brasilia time zone  > February 1st, 2024 [0.08ms]
157
- ✓ toDateId: Brasilia time zone  > February 10th, 2024 [0.04ms]
158
- ✓ toDateId: Brasilia time zone  > February 29th, 2024 [0.08ms]
159
- ✓ toDateId: Brasilia time zone  > convert between ID -> Date -> ID returns the original result [0.04ms]
160
- ✓ fromDateId: UTC time zone > parse Jan 1st [0.08ms]
161
- ✓ fromDateId: UTC time zone > parses March 1st [0.05ms]
162
- ✓ fromDateId: Brasilia time zone > parse Jan 1st [0.08ms]
163
- ✓ fromDateId: Brasilia time zone > parses March 1st [0.05ms]
164
- ✓ startOfMonth > January [0.06ms]
165
- ✓ startOfMonth > February [0.03ms]
166
- ✓ startOfMonth > matches date-fns [2.44ms]
167
- ✓ endOfMonth > January [0.08ms]
168
- ✓ endOfMonth > February
169
- ✓ endOfMonth > matches date-fns [1.33ms]
149
+ ✓ toDateId: UTC time zone > January 1st, 2024 [0.14ms]
150
+ ✓ toDateId: UTC time zone > January 31th, 2024 [0.02ms]
151
+ ✓ toDateId: UTC time zone > February 1st, 2024
152
+ ✓ toDateId: UTC time zone > February 10th, 2024
153
+ ✓ toDateId: UTC time zone > convert between ID -> Date -> ID returns the original result [0.01ms]
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]
158
+ ✓ toDateId: Brasilia time zone  > February 29th, 2024 [0.01ms]
159
+ ✓ toDateId: Brasilia time zone  > convert between ID -> Date -> ID returns the original result [0.02ms]
160
+ ✓ fromDateId: UTC time zone > parse Jan 1st [0.02ms]
161
+ ✓ fromDateId: UTC time zone > parses March 1st [0.02ms]
162
+ ✓ fromDateId: Brasilia time zone > parse Jan 1st
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
170
  ✓ startOfWeek > sunday: week of February 17th [0.02ms]
171
171
  ✓ startOfWeek > sunday: week of February 11th
172
172
  ✓ startOfWeek > monday: week of February 17th
173
- ✓ startOfWeek > monday: week of February 11th
174
- ✓ startOfWeek > matches date-fns [1.10ms]
175
- ✓ addMonths > add 1 month [0.01ms]
176
- ✓ addMonths > add 10 months
177
- ✓ addMonths > matches date-fns [0.19ms]
178
- ✓ subMonths > sub 1 month [0.03ms]
179
- ✓ subMonths > sub 10 months [0.04ms]
180
- ✓ subMonths > matches date-fns [0.21ms]
181
- ✓ addDays > add 1 day [0.01ms]
182
- ✓ addDays > add 10 days
183
- ✓ addDays > matches date-fns [0.11ms]
184
- ✓ subDays > sub 1 day [0.02ms]
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
179
+ ✓ subMonths > sub 10 months
180
+ ✓ subMonths > matches date-fns [0.27ms]
181
+ ✓ addDays > add 1 day [0.03ms]
182
+ ✓ addDays > add 10 days [0.01ms]
183
+ ✓ addDays > matches date-fns [0.09ms]
184
+ ✓ subDays > sub 1 day [0.01ms]
185
185
  ✓ subDays > sub 10 days
186
186
  ✓ subDays > matches date-fns [0.08ms]
187
187
  ✓ isWeekend > Friday
188
188
  ✓ isWeekend > Saturday
189
189
  ✓ isWeekend > Sunday
190
190
  ✓ isWeekend > Monday
191
- ✓ differenceInMonths  > edge cases > it returns diff of 1 month between Feb 28 2021 and Jan 30 2021
191
+ ✓ differenceInMonths  > edge cases > it returns diff of 1 month between Feb 28 2021 and Jan 30 2021 [0.01ms]
192
192
  ✓ differenceInMonths  > edge cases > it returns diff of 1 month between Feb 28 2021 and Jan 31 2021
193
193
  ✓ differenceInMonths  > edge cases > it returns diff of 1 month between Nov, 30 2021 and Oct, 31 2021
194
194
  ✓ differenceInMonths  > edge cases > it returns diff of 1 month between Oct, 31 2021 and Sep, 30 2021
@@ -196,22 +196,22 @@ src/helpers/dates.test.ts:
196
196
  ✓ differenceInMonths  > edge cases > it returns diff of -1 month between Sep, 30 2021 and Oct, 31 2021
197
197
  ✓ differenceInMonths  > edge cases > the days of months of the given dates are the same
198
198
  ✓ differenceInMonths  > edge cases > the given dates are the same
199
- ✓ differenceInMonths  > edge cases > does not return -0 when the given dates are the same
200
- ✓ differenceInMonths  > edge cases > returns the number of full months between the given dates - end of Feb [0.04ms]
199
+ ✓ differenceInMonths  > edge cases > does not return -0 when the given dates are the same [0.01ms]
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
203
  ✓ differenceInMonths  > returns NaN if the first date is `Invalid Date`
204
204
  ✓ differenceInMonths  > returns NaN if the second date is `Invalid Date`
205
- ✓ differenceInMonths  > returns NaN if the both dates are `Invalid Date` [0.01ms]
206
- ✓ getWeeksInMonth > sunday: Month with 5 weeks [0.03ms]
205
+ ✓ differenceInMonths  > returns NaN if the both dates are `Invalid Date`
206
+ ✓ getWeeksInMonth > sunday: Month with 5 weeks
207
207
  ✓ getWeeksInMonth > sunday: Month with 6 weeks
208
- ✓ getWeeksInMonth > monday: Month with 5 weeks [0.01ms]
209
- ✓ getWeeksInMonth > matches date-fns [2.55ms]
210
- ✓ getWeekOfMonth > sunday: June [0.17ms]
211
- ✓ getWeekOfMonth > monday: June [0.03ms]
212
- ✓ getWeekOfMonth > matches date-fns [0.80ms]
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]
213
213
 
214
214
   116 pass
215
215
   0 fail
216
216
  8696 expect() calls
217
- Ran 116 tests across 5 files. [121.00ms]
217
+ Ran 116 tests across 5 files. [178.00ms]
package/dist/index.d.mts CHANGED
@@ -1,8 +1,8 @@
1
1
  import * as react from 'react';
2
2
  import { ReactNode } from 'react';
3
3
  import { TextProps, ViewStyle, TextStyle, PressableProps, ColorSchemeName } from 'react-native';
4
- import { LegendListProps } from '@legendapp/list/react-native';
5
4
  import * as react_jsx_runtime from 'react/jsx-runtime';
5
+ import { LegendListProps } from '@legendapp/list/react-native';
6
6
 
7
7
  type CalendarTextProps = Omit<TextProps, "onPress" | "onLongPress" | "onPressIn" | "onPressOut">;
8
8
 
@@ -131,7 +131,7 @@ declare module "react-native" {
131
131
  }
132
132
  type DayState = "idle" | "active" | "today" | "disabled";
133
133
  interface DayTheme {
134
- container: Omit<ViewStyle, "borderRadius">;
134
+ container: ViewStyle;
135
135
  content: TextStyle;
136
136
  }
137
137
  interface CalendarItemDayProps {
@@ -162,7 +162,7 @@ declare const CalendarItemDay: react.NamedExoticComponent<CalendarItemDayProps>;
162
162
  interface CalendarItemDayContainerTheme {
163
163
  /** An empty view that acts as a spacer between each day. The spacing is
164
164
  * controlled by the `daySpacing` prop. */
165
- spacer?: ViewStyle;
165
+ spacer?: ViewStyle | ((params: CalendarDayMetadata) => ViewStyle);
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);
@@ -538,9 +538,9 @@ interface CalendarListRef {
538
538
  scrollToDate: (date: Date, animated: boolean, params?: ImperativeScrollParams) => void;
539
539
  scrollToOffset: (offset: number, animated: boolean) => void;
540
540
  }
541
- declare const CalendarList: react.NamedExoticComponent<CalendarListProps & {
541
+ declare function CalendarList({ ref, ...props }: CalendarListProps & {
542
542
  ref?: React.Ref<CalendarListRef>;
543
- }>;
543
+ }): react_jsx_runtime.JSX.Element;
544
544
 
545
545
  interface HStackProps {
546
546
  alignItems?: ViewStyle["alignItems"];
package/dist/index.d.ts CHANGED
@@ -1,8 +1,8 @@
1
1
  import * as react from 'react';
2
2
  import { ReactNode } from 'react';
3
3
  import { TextProps, ViewStyle, TextStyle, PressableProps, ColorSchemeName } from 'react-native';
4
- import { LegendListProps } from '@legendapp/list/react-native';
5
4
  import * as react_jsx_runtime from 'react/jsx-runtime';
5
+ import { LegendListProps } from '@legendapp/list/react-native';
6
6
 
7
7
  type CalendarTextProps = Omit<TextProps, "onPress" | "onLongPress" | "onPressIn" | "onPressOut">;
8
8
 
@@ -131,7 +131,7 @@ declare module "react-native" {
131
131
  }
132
132
  type DayState = "idle" | "active" | "today" | "disabled";
133
133
  interface DayTheme {
134
- container: Omit<ViewStyle, "borderRadius">;
134
+ container: ViewStyle;
135
135
  content: TextStyle;
136
136
  }
137
137
  interface CalendarItemDayProps {
@@ -162,7 +162,7 @@ declare const CalendarItemDay: react.NamedExoticComponent<CalendarItemDayProps>;
162
162
  interface CalendarItemDayContainerTheme {
163
163
  /** An empty view that acts as a spacer between each day. The spacing is
164
164
  * controlled by the `daySpacing` prop. */
165
- spacer?: ViewStyle;
165
+ spacer?: ViewStyle | ((params: CalendarDayMetadata) => ViewStyle);
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);
@@ -538,9 +538,9 @@ interface CalendarListRef {
538
538
  scrollToDate: (date: Date, animated: boolean, params?: ImperativeScrollParams) => void;
539
539
  scrollToOffset: (offset: number, animated: boolean) => void;
540
540
  }
541
- declare const CalendarList: react.NamedExoticComponent<CalendarListProps & {
541
+ declare function CalendarList({ ref, ...props }: CalendarListProps & {
542
542
  ref?: React.Ref<CalendarListRef>;
543
- }>;
543
+ }): react_jsx_runtime.JSX.Element;
544
544
 
545
545
  interface HStackProps {
546
546
  alignItems?: ViewStyle["alignItems"];