@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.
- package/.turbo/turbo-build.log +9 -9
- package/.turbo/turbo-test.log +94 -94
- package/dist/index.d.mts +5 -5
- package/dist/index.d.ts +5 -5
- package/dist/index.js +168 -91
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +169 -92
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/components/CalendarItemDay.tsx +74 -20
- package/src/components/CalendarList.tsx +22 -3
package/.turbo/turbo-build.log
CHANGED
|
@@ -9,12 +9,12 @@
|
|
|
9
9
|
[34mCJS[39m Build start
|
|
10
10
|
[34mESM[39m Build start
|
|
11
11
|
DTS Build start
|
|
12
|
-
[32mESM[39m [1mdist/index.mjs [22m[
|
|
13
|
-
[32mESM[39m [1mdist/index.mjs.map [22m[
|
|
14
|
-
[32mESM[39m ⚡️ Build success in
|
|
15
|
-
[32mCJS[39m [1mdist/index.js [22m[
|
|
16
|
-
[32mCJS[39m [1mdist/index.js.map [22m[
|
|
17
|
-
[32mCJS[39m ⚡️ Build success in
|
|
18
|
-
DTS ⚡️ Build success in
|
|
19
|
-
DTS dist/index.d.ts 24.
|
|
20
|
-
DTS dist/index.d.mts 24.
|
|
12
|
+
[32mESM[39m [1mdist/index.mjs [22m[32m70.25 KB[39m
|
|
13
|
+
[32mESM[39m [1mdist/index.mjs.map [22m[32m140.21 KB[39m
|
|
14
|
+
[32mESM[39m ⚡️ Build success in 1089ms
|
|
15
|
+
[32mCJS[39m [1mdist/index.js [22m[32m73.30 KB[39m
|
|
16
|
+
[32mCJS[39m [1mdist/index.js.map [22m[32m140.74 KB[39m
|
|
17
|
+
[32mCJS[39m ⚡️ 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
|
package/.turbo/turbo-test.log
CHANGED
|
@@ -5,190 +5,190 @@
|
|
|
5
5
|
src/hooks/useDateRange.test.ts:
|
|
6
6
|
[0m[31mreact-test-renderer is deprecated. See https://react.dev/warnings/react-test-renderer[0m
|
|
7
7
|
[0m[31mThe current testing environment is not configured to support act(...)[0m
|
|
8
|
-
[0m[32m✓[0m [0museDateRange[2m >[0m[1m should initialize with correct default values[0m [0m[2m[
|
|
8
|
+
[0m[32m✓[0m [0museDateRange[2m >[0m[1m should initialize with correct default values[0m [0m[2m[5.48ms[0m[2m][0m
|
|
9
9
|
[0m[31mreact-test-renderer is deprecated. See https://react.dev/warnings/react-test-renderer[0m
|
|
10
10
|
[0m[31mThe current testing environment is not configured to support act(...)[0m
|
|
11
11
|
[0m[31mThe current testing environment is not configured to support act(...)[0m
|
|
12
12
|
[0m[31mThe current testing environment is not configured to support act(...)[0m
|
|
13
13
|
[0m[31mThe current testing environment is not configured to support act(...)[0m
|
|
14
14
|
[0m[31mThe current testing environment is not configured to support act(...)[0m
|
|
15
|
-
[0m[32m✓[0m [0museDateRange[2m >[0m[1m should update dateRange correctly on onCalendarDayPress[0m [0m[2m[
|
|
15
|
+
[0m[32m✓[0m [0museDateRange[2m >[0m[1m should update dateRange correctly on onCalendarDayPress[0m [0m[2m[1.31ms[0m[2m][0m
|
|
16
16
|
[0m[31mreact-test-renderer is deprecated. See https://react.dev/warnings/react-test-renderer[0m
|
|
17
17
|
[0m[31mThe current testing environment is not configured to support act(...)[0m
|
|
18
18
|
[0m[31mThe current testing environment is not configured to support act(...)[0m
|
|
19
19
|
[0m[31mThe current testing environment is not configured to support act(...)[0m
|
|
20
20
|
[0m[31mThe current testing environment is not configured to support act(...)[0m
|
|
21
|
-
[0m[32m✓[0m [0museDateRange[2m >[0m[1m should clear dateRange on onClearDateRange[0m [0m[2m[
|
|
21
|
+
[0m[32m✓[0m [0museDateRange[2m >[0m[1m should clear dateRange on onClearDateRange[0m [0m[2m[1.09ms[0m[2m][0m
|
|
22
22
|
[0m[31mreact-test-renderer is deprecated. See https://react.dev/warnings/react-test-renderer[0m
|
|
23
23
|
[0m[31mThe current testing environment is not configured to support act(...)[0m
|
|
24
24
|
[0m[31mThe current testing environment is not configured to support act(...)[0m
|
|
25
25
|
[0m[31mThe current testing environment is not configured to support act(...)[0m
|
|
26
26
|
[0m[31mThe current testing environment is not configured to support act(...)[0m
|
|
27
|
-
[0m[32m✓[0m [0museDateRange[2m >[0m[1m should update isDateRangeValid correctly[0m [0m[2m[0.
|
|
27
|
+
[0m[32m✓[0m [0museDateRange[2m >[0m[1m should update isDateRangeValid correctly[0m [0m[2m[0.34ms[0m[2m][0m
|
|
28
28
|
[0m[31mreact-test-renderer is deprecated. See https://react.dev/warnings/react-test-renderer[0m
|
|
29
29
|
[0m[31mThe current testing environment is not configured to support act(...)[0m
|
|
30
|
-
[0m[32m✓[0m [0museDateRange[2m >[0m[1m can initialize a date range[0m [0m[2m[0.
|
|
30
|
+
[0m[32m✓[0m [0museDateRange[2m >[0m[1m can initialize a date range[0m [0m[2m[0.12ms[0m[2m][0m
|
|
31
31
|
[0m
|
|
32
32
|
src/hooks/useCalendarList.test.ts:
|
|
33
|
-
[0m[32m✓[0m [0mgetHeightForMonth[2m >[0m[1m Measures months with 5 weeks (no calendar spacing)[0m [0m[2m[0.
|
|
34
|
-
[0m[32m✓[0m [0mgetHeightForMonth[2m >[0m[1m Measures months with 5 weeks (with calendar spacing)[0m [0m[2m[0.
|
|
35
|
-
[0m[32m✓[0m [0mgetHeightForMonth[2m >[0m[1m Accounts for additional height[0m
|
|
33
|
+
[0m[32m✓[0m [0mgetHeightForMonth[2m >[0m[1m Measures months with 5 weeks (no calendar spacing)[0m [0m[2m[0.12ms[0m[2m][0m
|
|
34
|
+
[0m[32m✓[0m [0mgetHeightForMonth[2m >[0m[1m Measures months with 5 weeks (with calendar spacing)[0m [0m[2m[0.10ms[0m[2m][0m
|
|
35
|
+
[0m[32m✓[0m [0mgetHeightForMonth[2m >[0m[1m Accounts for additional height[0m [0m[2m[0.02ms[0m[2m][0m
|
|
36
36
|
[0m[32m✓[0m [0mgetHeightForMonth[2m >[0m[1m Measures months with 6 weeks[0m [0m[2m[0.01ms[0m[2m][0m
|
|
37
|
-
[0m[32m✓[0m [0mgetHeightForMonth[2m >[0m[1m February 24 has the right height with base options[0m [0m[2m[0.
|
|
37
|
+
[0m[32m✓[0m [0mgetHeightForMonth[2m >[0m[1m February 24 has the right height with base options[0m [0m[2m[0.42ms[0m[2m][0m
|
|
38
38
|
[0m[31mreact-test-renderer is deprecated. See https://react.dev/warnings/react-test-renderer[0m
|
|
39
39
|
[0m[31mThe current testing environment is not configured to support act(...)[0m
|
|
40
40
|
[0m[31mThe current testing environment is not configured to support act(...)[0m
|
|
41
41
|
[0m[31mThe current testing environment is not configured to support act(...)[0m
|
|
42
|
-
[0m[32m✓[0m [0museCalendarList[2m > [0mMin/Max dates[2m >[0m[1m Max: virtualization still works as expected[0m [0m[2m[0.
|
|
42
|
+
[0m[32m✓[0m [0museCalendarList[2m > [0mMin/Max dates[2m >[0m[1m Max: virtualization still works as expected[0m [0m[2m[0.84ms[0m[2m][0m
|
|
43
43
|
[0m[31mreact-test-renderer is deprecated. See https://react.dev/warnings/react-test-renderer[0m
|
|
44
44
|
[0m[31mThe current testing environment is not configured to support act(...)[0m
|
|
45
45
|
[0m[31mThe current testing environment is not configured to support act(...)[0m
|
|
46
46
|
[0m[31mThe current testing environment is not configured to support act(...)[0m
|
|
47
|
-
[0m[32m✓[0m [0museCalendarList[2m > [0mMin/Max dates[2m >[0m[1m Min: virtualization still works as expected[0m [0m[2m[0.
|
|
47
|
+
[0m[32m✓[0m [0museCalendarList[2m > [0mMin/Max dates[2m >[0m[1m Min: virtualization still works as expected[0m [0m[2m[0.32ms[0m[2m][0m
|
|
48
48
|
[0m[31mreact-test-renderer is deprecated. See https://react.dev/warnings/react-test-renderer[0m
|
|
49
49
|
[0m[31mThe current testing environment is not configured to support act(...)[0m
|
|
50
|
-
[0m[32m✓[0m [0museCalendarList[2m > [0mMin/Max dates[2m >[0m[1m Returns a single month when min and max are in the same month[0m [0m[2m[0.
|
|
50
|
+
[0m[32m✓[0m [0museCalendarList[2m > [0mMin/Max dates[2m >[0m[1m Returns a single month when min and max are in the same month[0m [0m[2m[0.09ms[0m[2m][0m
|
|
51
51
|
[0m[31mreact-test-renderer is deprecated. See https://react.dev/warnings/react-test-renderer[0m
|
|
52
52
|
[0m[31mThe current testing environment is not configured to support act(...)[0m
|
|
53
|
-
[0m[32m✓[0m [0museCalendarList[2m > [0mMin/Max dates[2m >[0m[1m Returns a range of months bounded by the min and max dates[0m [0m[2m[0.
|
|
53
|
+
[0m[32m✓[0m [0museCalendarList[2m > [0mMin/Max dates[2m >[0m[1m Returns a range of months bounded by the min and max dates[0m [0m[2m[0.07ms[0m[2m][0m
|
|
54
54
|
[0m[31mreact-test-renderer is deprecated. See https://react.dev/warnings/react-test-renderer[0m
|
|
55
55
|
[0m[31mThe current testing environment is not configured to support act(...)[0m
|
|
56
|
-
[0m[32m✓[0m [0museCalendarList[2m > [0mMin/Max dates[2m >[0m[1m Ignores past/future scroll ranges when min/max dates are used[0m [0m[2m[0.
|
|
56
|
+
[0m[32m✓[0m [0museCalendarList[2m > [0mMin/Max dates[2m >[0m[1m Ignores past/future scroll ranges when min/max dates are used[0m [0m[2m[0.13ms[0m[2m][0m
|
|
57
57
|
[0m[31mreact-test-renderer is deprecated. See https://react.dev/warnings/react-test-renderer[0m
|
|
58
58
|
[0m[31mThe current testing environment is not configured to support act(...)[0m
|
|
59
|
-
[0m[32m✓[0m [0museCalendarList[2m > [0mMin/Max dates[2m >[0m[1m Append/Prepend are no-op if min/max are reached[0m [0m[2m[0.
|
|
59
|
+
[0m[32m✓[0m [0museCalendarList[2m > [0mMin/Max dates[2m >[0m[1m Append/Prepend are no-op if min/max are reached[0m [0m[2m[0.24ms[0m[2m][0m
|
|
60
60
|
[0m[31mreact-test-renderer is deprecated. See https://react.dev/warnings/react-test-renderer[0m
|
|
61
61
|
[0m[31mThe current testing environment is not configured to support act(...)[0m
|
|
62
62
|
[0m[31mThe current testing environment is not configured to support act(...)[0m
|
|
63
63
|
[0m[31mThe current testing environment is not configured to support act(...)[0m
|
|
64
|
-
[0m[32m✓[0m [0museCalendarList[2m > [0mMin/Max dates[2m >[0m[1m Prepend does not trigger a state update when starting month is already present[0m [0m[2m[0.
|
|
64
|
+
[0m[32m✓[0m [0museCalendarList[2m > [0mMin/Max dates[2m >[0m[1m Prepend does not trigger a state update when starting month is already present[0m [0m[2m[0.24ms[0m[2m][0m
|
|
65
65
|
[0m[31mreact-test-renderer is deprecated. See https://react.dev/warnings/react-test-renderer[0m
|
|
66
66
|
[0m[31mThe current testing environment is not configured to support act(...)[0m
|
|
67
|
-
[0m[32m✓[0m [0museCalendarList[2m > [0mgithub issues[2m >[0m[1m #16: Incorrect scroll position when setting calendarMinDateId[0m [0m[2m[0.
|
|
67
|
+
[0m[32m✓[0m [0museCalendarList[2m > [0mgithub issues[2m >[0m[1m #16: Incorrect scroll position when setting calendarMinDateId[0m [0m[2m[0.14ms[0m[2m][0m
|
|
68
68
|
[0m[31mreact-test-renderer is deprecated. See https://react.dev/warnings/react-test-renderer[0m
|
|
69
69
|
[0m[31mThe current testing environment is not configured to support act(...)[0m
|
|
70
70
|
[0m[32m✓[0m [0museCalendarList[2m >[0m[1m Data is correctly built when future/past ranges are 0[0m [0m[2m[0.07ms[0m[2m][0m
|
|
71
71
|
[0m
|
|
72
72
|
src/hooks/useCalendar.test.ts:
|
|
73
|
-
[0m[32m✓[0m [0mbuildCalendar[2m > [0misLastDayOfWeek[2m >[0m[1m isLastDayOfWeek respects "sunday" as last day of week[0m [0m[2m[
|
|
74
|
-
[0m[32m✓[0m [0mbuildCalendar[2m > [0misLastDayOfWeek[2m >[0m[1m isLastDayOfWeek respects "monday" as last day of week[0m [0m[2m[
|
|
75
|
-
[0m[32m✓[0m [0mbuildCalendar[2m > [0misWeekend[2m >[0m[1m starting on sunday[0m [0m[2m[1.
|
|
76
|
-
[0m[32m✓[0m [0mbuildCalendar[2m > [0misWeekend[2m >[0m[1m starting on monday[0m [0m[2m[1.
|
|
77
|
-
[0m[32m✓[0m [0mbuildCalendar[2m > [0mstate[2m >[0m[1m active: supersedes today[0m [0m[2m[1.
|
|
78
|
-
[0m[32m✓[0m [0mbuildCalendar[2m > [0mstate[2m >[0m[1m active: supersedes disabled (with calendarDisabledDateIds)[0m [0m[2m[
|
|
79
|
-
[0m[32m✓[0m [0mbuildCalendar[2m > [0mstate[2m >[0m[1m active: supersedes disabled (with min)[0m [0m[2m[
|
|
80
|
-
[0m[32m✓[0m [0mbuildCalendar[2m > [0mstate[2m >[0m[1m active: supersedes disabled (with max)[0m [0m[2m[1.
|
|
81
|
-
[0m[32m✓[0m [0mbuildCalendar[2m > [0mstate[2m >[0m[1m active: supersedes idle[0m [0m[2m[1.
|
|
82
|
-
[0m[32m✓[0m [0mbuildCalendar[2m > [0mstate[2m >[0m[1m disabled: supersedes idle[0m [0m[2m[1.
|
|
83
|
-
[0m[32m✓[0m [0mbuildCalendar[2m > [0mstate[2m >[0m[1m today: supersedes idle[0m [0m[2m[1.
|
|
84
|
-
[0m[32m✓[0m [0mbuildCalendar[2m > [0mstate[2m >[0m[1m idle: serves as the base state[0m [0m[2m[
|
|
85
|
-
[0m[32m✓[0m [0mbuildCalendar[2m >[0m[1m builds the month row[0m [0m[2m[1.
|
|
86
|
-
[0m[32m✓[0m [0mbuildCalendar[2m >[0m[1m build the month row with custom formatting[0m [0m[2m[
|
|
87
|
-
[0m[32m✓[0m [0mbuildCalendar[2m >[0m[1m builds the week days row starting on sunday[0m [0m[2m[1.
|
|
88
|
-
[0m[32m✓[0m [0mbuildCalendar[2m >[0m[1m builds the week days row starting on monday[0m [0m[2m[1.
|
|
89
|
-
[0m[32m✓[0m [0mbuildCalendar[2m >[0m[1m builds the weeks row[0m [0m[2m[
|
|
90
|
-
[0m[32m✓[0m [0mbuildCalendar[2m >[0m[1m build the weeks row with custom formatting[0m [0m[2m[
|
|
91
|
-
[0m[32m✓[0m [0mbuildCalendar[2m >[0m[1m handles the expected range[0m [0m[2m[1.
|
|
92
|
-
[0m[32m✓[0m [0mbuildCalendar[2m >[0m[1m calendarMinDate[0m [0m[2m[
|
|
93
|
-
[0m[32m✓[0m [0mbuildCalendar[2m >[0m[1m calendarMaxDate[0m [0m[2m[1.
|
|
73
|
+
[0m[32m✓[0m [0mbuildCalendar[2m > [0misLastDayOfWeek[2m >[0m[1m isLastDayOfWeek respects "sunday" as last day of week[0m [0m[2m[[1m10.22ms[0m[2m][0m
|
|
74
|
+
[0m[32m✓[0m [0mbuildCalendar[2m > [0misLastDayOfWeek[2m >[0m[1m isLastDayOfWeek respects "monday" as last day of week[0m [0m[2m[2.35ms[0m[2m][0m
|
|
75
|
+
[0m[32m✓[0m [0mbuildCalendar[2m > [0misWeekend[2m >[0m[1m starting on sunday[0m [0m[2m[1.85ms[0m[2m][0m
|
|
76
|
+
[0m[32m✓[0m [0mbuildCalendar[2m > [0misWeekend[2m >[0m[1m starting on monday[0m [0m[2m[1.28ms[0m[2m][0m
|
|
77
|
+
[0m[32m✓[0m [0mbuildCalendar[2m > [0mstate[2m >[0m[1m active: supersedes today[0m [0m[2m[1.16ms[0m[2m][0m
|
|
78
|
+
[0m[32m✓[0m [0mbuildCalendar[2m > [0mstate[2m >[0m[1m active: supersedes disabled (with calendarDisabledDateIds)[0m [0m[2m[0.86ms[0m[2m][0m
|
|
79
|
+
[0m[32m✓[0m [0mbuildCalendar[2m > [0mstate[2m >[0m[1m active: supersedes disabled (with min)[0m [0m[2m[0.91ms[0m[2m][0m
|
|
80
|
+
[0m[32m✓[0m [0mbuildCalendar[2m > [0mstate[2m >[0m[1m active: supersedes disabled (with max)[0m [0m[2m[1.55ms[0m[2m][0m
|
|
81
|
+
[0m[32m✓[0m [0mbuildCalendar[2m > [0mstate[2m >[0m[1m active: supersedes idle[0m [0m[2m[1.43ms[0m[2m][0m
|
|
82
|
+
[0m[32m✓[0m [0mbuildCalendar[2m > [0mstate[2m >[0m[1m disabled: supersedes idle[0m [0m[2m[1.37ms[0m[2m][0m
|
|
83
|
+
[0m[32m✓[0m [0mbuildCalendar[2m > [0mstate[2m >[0m[1m today: supersedes idle[0m [0m[2m[1.11ms[0m[2m][0m
|
|
84
|
+
[0m[32m✓[0m [0mbuildCalendar[2m > [0mstate[2m >[0m[1m idle: serves as the base state[0m [0m[2m[2.84ms[0m[2m][0m
|
|
85
|
+
[0m[32m✓[0m [0mbuildCalendar[2m >[0m[1m builds the month row[0m [0m[2m[1.65ms[0m[2m][0m
|
|
86
|
+
[0m[32m✓[0m [0mbuildCalendar[2m >[0m[1m build the month row with custom formatting[0m [0m[2m[3.22ms[0m[2m][0m
|
|
87
|
+
[0m[32m✓[0m [0mbuildCalendar[2m >[0m[1m builds the week days row starting on sunday[0m [0m[2m[1.42ms[0m[2m][0m
|
|
88
|
+
[0m[32m✓[0m [0mbuildCalendar[2m >[0m[1m builds the week days row starting on monday[0m [0m[2m[1.50ms[0m[2m][0m
|
|
89
|
+
[0m[32m✓[0m [0mbuildCalendar[2m >[0m[1m builds the weeks row[0m [0m[2m[1.34ms[0m[2m][0m
|
|
90
|
+
[0m[32m✓[0m [0mbuildCalendar[2m >[0m[1m build the weeks row with custom formatting[0m [0m[2m[0.53ms[0m[2m][0m
|
|
91
|
+
[0m[32m✓[0m [0mbuildCalendar[2m >[0m[1m handles the expected range[0m [0m[2m[1.23ms[0m[2m][0m
|
|
92
|
+
[0m[32m✓[0m [0mbuildCalendar[2m >[0m[1m calendarMinDate[0m [0m[2m[1.27ms[0m[2m][0m
|
|
93
|
+
[0m[32m✓[0m [0mbuildCalendar[2m >[0m[1m calendarMaxDate[0m [0m[2m[1.18ms[0m[2m][0m
|
|
94
94
|
[0m
|
|
95
95
|
src/hooks/useOptimizedDayMetadata.test.ts:
|
|
96
96
|
[0m[31mreact-test-renderer is deprecated. See https://react.dev/warnings/react-test-renderer[0m
|
|
97
97
|
[0m[31mThe current testing environment is not configured to support act(...)[0m
|
|
98
|
-
[0m[32m✓[0m [0museOptimizedDayMetadata[2m >[0m[1m return the base metadata as the initial value[0m [0m[2m[
|
|
98
|
+
[0m[32m✓[0m [0museOptimizedDayMetadata[2m >[0m[1m return the base metadata as the initial value[0m [0m[2m[1.42ms[0m[2m][0m
|
|
99
99
|
[0m[31mreact-test-renderer is deprecated. See https://react.dev/warnings/react-test-renderer[0m
|
|
100
100
|
[0m[31mThe current testing environment is not configured to support act(...)[0m
|
|
101
101
|
[0m[31mThe current testing environment is not configured to support act(...)[0m
|
|
102
|
-
[0m[32m✓[0m [0museOptimizedDayMetadata[2m >[0m[1m if the base changes, the returned value should match it.[0m [0m[2m[0.
|
|
102
|
+
[0m[32m✓[0m [0museOptimizedDayMetadata[2m >[0m[1m if the base changes, the returned value should match it.[0m [0m[2m[0.92ms[0m[2m][0m
|
|
103
103
|
[0m[31mreact-test-renderer is deprecated. See https://react.dev/warnings/react-test-renderer[0m
|
|
104
104
|
[0m[31mThe current testing environment is not configured to support act(...)[0m
|
|
105
105
|
[0m[31mThe current testing environment is not configured to support act(...)[0m
|
|
106
|
-
[0m[32m✓[0m [0museOptimizedDayMetadata[2m >[0m[1m endOfRange: returns the updated metadata once an event is emitted[0m [0m[2m[0.
|
|
106
|
+
[0m[32m✓[0m [0museOptimizedDayMetadata[2m >[0m[1m endOfRange: returns the updated metadata once an event is emitted[0m [0m[2m[0.67ms[0m[2m][0m
|
|
107
107
|
[0m[31mreact-test-renderer is deprecated. See https://react.dev/warnings/react-test-renderer[0m
|
|
108
108
|
[0m[31mThe current testing environment is not configured to support act(...)[0m
|
|
109
109
|
[0m[31mThe current testing environment is not configured to support act(...)[0m
|
|
110
|
-
[0m[32m✓[0m [0museOptimizedDayMetadata[2m >[0m[1m startOfRange: returns the updated metadata once an event is emitted[0m [0m[2m[0.
|
|
110
|
+
[0m[32m✓[0m [0museOptimizedDayMetadata[2m >[0m[1m startOfRange: returns the updated metadata once an event is emitted[0m [0m[2m[0.33ms[0m[2m][0m
|
|
111
111
|
[0m[31mreact-test-renderer is deprecated. See https://react.dev/warnings/react-test-renderer[0m
|
|
112
112
|
[0m[31mThe current testing environment is not configured to support act(...)[0m
|
|
113
113
|
[0m[31mThe current testing environment is not configured to support act(...)[0m
|
|
114
|
-
[0m[32m✓[0m [0museOptimizedDayMetadata[2m >[0m[1m startOfRange|endOfRange: returns the updated metadata once an event is emitted[0m [0m[2m[0.
|
|
114
|
+
[0m[32m✓[0m [0museOptimizedDayMetadata[2m >[0m[1m startOfRange|endOfRange: returns the updated metadata once an event is emitted[0m [0m[2m[0.14ms[0m[2m][0m
|
|
115
115
|
[0m[31mreact-test-renderer is deprecated. See https://react.dev/warnings/react-test-renderer[0m
|
|
116
116
|
[0m[31mThe current testing environment is not configured to support act(...)[0m
|
|
117
117
|
[0m[31mThe current testing environment is not configured to support act(...)[0m
|
|
118
|
-
[0m[32m✓[0m [0museOptimizedDayMetadata[2m >[0m[1m doesn't re-render if the active dates don't overlap[0m [0m[2m[0.
|
|
118
|
+
[0m[32m✓[0m [0museOptimizedDayMetadata[2m >[0m[1m doesn't re-render if the active dates don't overlap[0m [0m[2m[0.16ms[0m[2m][0m
|
|
119
119
|
[0m[31mreact-test-renderer is deprecated. See https://react.dev/warnings/react-test-renderer[0m
|
|
120
120
|
[0m[31mThe current testing environment is not configured to support act(...)[0m
|
|
121
121
|
[0m[31mThe current testing environment is not configured to support act(...)[0m
|
|
122
122
|
[0m[31mThe current testing environment is not configured to support act(...)[0m
|
|
123
|
-
[0m[32m✓[0m [0museOptimizedDayMetadata[2m >[0m[1m resets the state once a new range is selected[0m [0m[2m[0.
|
|
123
|
+
[0m[32m✓[0m [0museOptimizedDayMetadata[2m >[0m[1m resets the state once a new range is selected[0m [0m[2m[0.14ms[0m[2m][0m
|
|
124
124
|
[0m[31mreact-test-renderer is deprecated. See https://react.dev/warnings/react-test-renderer[0m
|
|
125
125
|
[0m[31mThe current testing environment is not configured to support act(...)[0m
|
|
126
126
|
[0m[31mThe current testing environment is not configured to support act(...)[0m
|
|
127
|
-
[0m[32m✓[0m [0museOptimizedDayMetadata with calendarInstanceId[2m >[0m[1m uses the default instance ID when not provided[0m [0m[2m[0.
|
|
127
|
+
[0m[32m✓[0m [0museOptimizedDayMetadata with calendarInstanceId[2m >[0m[1m uses the default instance ID when not provided[0m [0m[2m[0.10ms[0m[2m][0m
|
|
128
128
|
[0m[31mreact-test-renderer is deprecated. See https://react.dev/warnings/react-test-renderer[0m
|
|
129
129
|
[0m[31mThe current testing environment is not configured to support act(...)[0m
|
|
130
130
|
[0m[31mThe current testing environment is not configured to support act(...)[0m
|
|
131
|
-
[0m[32m✓[0m [0museOptimizedDayMetadata with calendarInstanceId[2m >[0m[1m responds to events for the correct instance ID[0m [0m[2m[0.
|
|
131
|
+
[0m[32m✓[0m [0museOptimizedDayMetadata with calendarInstanceId[2m >[0m[1m responds to events for the correct instance ID[0m [0m[2m[0.08ms[0m[2m][0m
|
|
132
132
|
[0m[31mreact-test-renderer is deprecated. See https://react.dev/warnings/react-test-renderer[0m
|
|
133
133
|
[0m[31mThe current testing environment is not configured to support act(...)[0m
|
|
134
|
-
[0m[32m✓[0m [0museOptimizedDayMetadata with calendarInstanceId[2m >[0m[1m ignores events for different instance IDs[0m [0m[2m[0.
|
|
134
|
+
[0m[32m✓[0m [0museOptimizedDayMetadata with calendarInstanceId[2m >[0m[1m ignores events for different instance IDs[0m [0m[2m[0.06ms[0m[2m][0m
|
|
135
135
|
[0m[31mreact-test-renderer is deprecated. See https://react.dev/warnings/react-test-renderer[0m
|
|
136
136
|
[0m[31mThe current testing environment is not configured to support act(...)[0m
|
|
137
137
|
[0m[31mreact-test-renderer is deprecated. See https://react.dev/warnings/react-test-renderer[0m
|
|
138
138
|
[0m[31mThe current testing environment is not configured to support act(...)[0m
|
|
139
139
|
[0m[31mThe current testing environment is not configured to support act(...)[0m
|
|
140
140
|
[0m[31mThe current testing environment is not configured to support act(...)[0m
|
|
141
|
-
[0m[32m✓[0m [0museOptimizedDayMetadata with calendarInstanceId[2m >[0m[1m handles multiple instances correctly[0m [0m[2m[0.
|
|
141
|
+
[0m[32m✓[0m [0museOptimizedDayMetadata with calendarInstanceId[2m >[0m[1m handles multiple instances correctly[0m [0m[2m[0.17ms[0m[2m][0m
|
|
142
142
|
[0m[31mreact-test-renderer is deprecated. See https://react.dev/warnings/react-test-renderer[0m
|
|
143
143
|
[0m[31mThe current testing environment is not configured to support act(...)[0m
|
|
144
144
|
[0m[31mThe current testing environment is not configured to support act(...)[0m
|
|
145
145
|
[0m[31mThe current testing environment is not configured to support act(...)[0m
|
|
146
|
-
[0m[32m✓[0m [0museOptimizedDayMetadata with calendarInstanceId[2m >[0m[1m resets state for the correct instance when a new range is selected[0m [0m[2m[0.
|
|
146
|
+
[0m[32m✓[0m [0museOptimizedDayMetadata with calendarInstanceId[2m >[0m[1m resets state for the correct instance when a new range is selected[0m [0m[2m[0.12ms[0m[2m][0m
|
|
147
147
|
[0m
|
|
148
148
|
src/helpers/dates.test.ts:
|
|
149
|
-
[0m[32m✓[0m [0mtoDateId: UTC time zone[2m >[0m[1m January 1st, 2024[0m [0m[2m[0.
|
|
150
|
-
[0m[32m✓[0m [0mtoDateId: UTC time zone[2m >[0m[1m January 31th, 2024[0m [0m[2m[0.
|
|
151
|
-
[0m[32m✓[0m [0mtoDateId: UTC time zone[2m >[0m[1m February 1st, 2024[0m
|
|
152
|
-
[0m[32m✓[0m [0mtoDateId: UTC time zone[2m >[0m[1m February 10th, 2024[0m
|
|
153
|
-
[0m[32m✓[0m [0mtoDateId: UTC time zone[2m >[0m[1m convert between ID -> Date -> ID returns the original result[0m [0m[2m[0.
|
|
154
|
-
[0m[32m✓[0m [0mtoDateId: Brasilia time zone [2m >[0m[1m January 1st, 2024[0m
|
|
155
|
-
[0m[32m✓[0m [0mtoDateId: Brasilia time zone [2m >[0m[1m January 31th, 2024[0m [0m[2m[0.
|
|
156
|
-
[0m[32m✓[0m [0mtoDateId: Brasilia time zone [2m >[0m[1m February 1st, 2024[0m
|
|
157
|
-
[0m[32m✓[0m [0mtoDateId: Brasilia time zone [2m >[0m[1m February 10th, 2024[0m [0m[2m[0.
|
|
158
|
-
[0m[32m✓[0m [0mtoDateId: Brasilia time zone [2m >[0m[1m February 29th, 2024[0m [0m[2m[0.
|
|
159
|
-
[0m[32m✓[0m [0mtoDateId: Brasilia time zone [2m >[0m[1m convert between ID -> Date -> ID returns the original result[0m [0m[2m[0.
|
|
160
|
-
[0m[32m✓[0m [0mfromDateId: UTC time zone[2m >[0m[1m parse Jan 1st[0m [0m[2m[0.
|
|
161
|
-
[0m[32m✓[0m [0mfromDateId: UTC time zone[2m >[0m[1m parses March 1st[0m [0m[2m[0.
|
|
162
|
-
[0m[32m✓[0m [0mfromDateId: Brasilia time zone[2m >[0m[1m parse Jan 1st[0m
|
|
163
|
-
[0m[32m✓[0m [0mfromDateId: Brasilia time zone[2m >[0m[1m parses March 1st[0m
|
|
164
|
-
[0m[32m✓[0m [0mstartOfMonth[2m >[0m[1m January[0m [0m[2m[0.
|
|
165
|
-
[0m[32m✓[0m [0mstartOfMonth[2m >[0m[1m February[0m [0m[2m[0.
|
|
166
|
-
[0m[32m✓[0m [0mstartOfMonth[2m >[0m[1m matches date-fns[0m [0m[2m[
|
|
167
|
-
[0m[32m✓[0m [0mendOfMonth[2m >[0m[1m January[0m [0m[2m[0.
|
|
168
|
-
[0m[32m✓[0m [0mendOfMonth[2m >[0m[1m February[0m
|
|
169
|
-
[0m[32m✓[0m [0mendOfMonth[2m >[0m[1m matches date-fns[0m [0m[2m[1.
|
|
149
|
+
[0m[32m✓[0m [0mtoDateId: UTC time zone[2m >[0m[1m January 1st, 2024[0m [0m[2m[0.14ms[0m[2m][0m
|
|
150
|
+
[0m[32m✓[0m [0mtoDateId: UTC time zone[2m >[0m[1m January 31th, 2024[0m [0m[2m[0.02ms[0m[2m][0m
|
|
151
|
+
[0m[32m✓[0m [0mtoDateId: UTC time zone[2m >[0m[1m February 1st, 2024[0m
|
|
152
|
+
[0m[32m✓[0m [0mtoDateId: UTC time zone[2m >[0m[1m February 10th, 2024[0m
|
|
153
|
+
[0m[32m✓[0m [0mtoDateId: UTC time zone[2m >[0m[1m convert between ID -> Date -> ID returns the original result[0m [0m[2m[0.01ms[0m[2m][0m
|
|
154
|
+
[0m[32m✓[0m [0mtoDateId: Brasilia time zone [2m >[0m[1m January 1st, 2024[0m
|
|
155
|
+
[0m[32m✓[0m [0mtoDateId: Brasilia time zone [2m >[0m[1m January 31th, 2024[0m [0m[2m[0.01ms[0m[2m][0m
|
|
156
|
+
[0m[32m✓[0m [0mtoDateId: Brasilia time zone [2m >[0m[1m February 1st, 2024[0m
|
|
157
|
+
[0m[32m✓[0m [0mtoDateId: Brasilia time zone [2m >[0m[1m February 10th, 2024[0m [0m[2m[0.01ms[0m[2m][0m
|
|
158
|
+
[0m[32m✓[0m [0mtoDateId: Brasilia time zone [2m >[0m[1m February 29th, 2024[0m [0m[2m[0.01ms[0m[2m][0m
|
|
159
|
+
[0m[32m✓[0m [0mtoDateId: Brasilia time zone [2m >[0m[1m convert between ID -> Date -> ID returns the original result[0m [0m[2m[0.02ms[0m[2m][0m
|
|
160
|
+
[0m[32m✓[0m [0mfromDateId: UTC time zone[2m >[0m[1m parse Jan 1st[0m [0m[2m[0.02ms[0m[2m][0m
|
|
161
|
+
[0m[32m✓[0m [0mfromDateId: UTC time zone[2m >[0m[1m parses March 1st[0m [0m[2m[0.02ms[0m[2m][0m
|
|
162
|
+
[0m[32m✓[0m [0mfromDateId: Brasilia time zone[2m >[0m[1m parse Jan 1st[0m
|
|
163
|
+
[0m[32m✓[0m [0mfromDateId: Brasilia time zone[2m >[0m[1m parses March 1st[0m
|
|
164
|
+
[0m[32m✓[0m [0mstartOfMonth[2m >[0m[1m January[0m [0m[2m[0.02ms[0m[2m][0m
|
|
165
|
+
[0m[32m✓[0m [0mstartOfMonth[2m >[0m[1m February[0m [0m[2m[0.01ms[0m[2m][0m
|
|
166
|
+
[0m[32m✓[0m [0mstartOfMonth[2m >[0m[1m matches date-fns[0m [0m[2m[1.58ms[0m[2m][0m
|
|
167
|
+
[0m[32m✓[0m [0mendOfMonth[2m >[0m[1m January[0m [0m[2m[0.04ms[0m[2m][0m
|
|
168
|
+
[0m[32m✓[0m [0mendOfMonth[2m >[0m[1m February[0m [0m[2m[0.03ms[0m[2m][0m
|
|
169
|
+
[0m[32m✓[0m [0mendOfMonth[2m >[0m[1m matches date-fns[0m [0m[2m[1.11ms[0m[2m][0m
|
|
170
170
|
[0m[32m✓[0m [0mstartOfWeek[2m >[0m[1m sunday: week of February 17th[0m [0m[2m[0.02ms[0m[2m][0m
|
|
171
171
|
[0m[32m✓[0m [0mstartOfWeek[2m >[0m[1m sunday: week of February 11th[0m
|
|
172
172
|
[0m[32m✓[0m [0mstartOfWeek[2m >[0m[1m monday: week of February 17th[0m
|
|
173
|
-
[0m[32m✓[0m [0mstartOfWeek[2m >[0m[1m monday: week of February 11th[0m
|
|
174
|
-
[0m[32m✓[0m [0mstartOfWeek[2m >[0m[1m matches date-fns[0m [0m[2m[1.
|
|
175
|
-
[0m[32m✓[0m [0maddMonths[2m >[0m[1m add 1 month[0m [0m[2m[0.
|
|
176
|
-
[0m[32m✓[0m [0maddMonths[2m >[0m[1m add 10 months[0m
|
|
177
|
-
[0m[32m✓[0m [0maddMonths[2m >[0m[1m matches date-fns[0m [0m[2m[0.
|
|
178
|
-
[0m[32m✓[0m [0msubMonths[2m >[0m[1m sub 1 month[0m
|
|
179
|
-
[0m[32m✓[0m [0msubMonths[2m >[0m[1m sub 10 months[0m
|
|
180
|
-
[0m[32m✓[0m [0msubMonths[2m >[0m[1m matches date-fns[0m [0m[2m[0.
|
|
181
|
-
[0m[32m✓[0m [0maddDays[2m >[0m[1m add 1 day[0m [0m[2m[0.
|
|
182
|
-
[0m[32m✓[0m [0maddDays[2m >[0m[1m add 10 days[0m
|
|
183
|
-
[0m[32m✓[0m [0maddDays[2m >[0m[1m matches date-fns[0m [0m[2m[0.
|
|
184
|
-
[0m[32m✓[0m [0msubDays[2m >[0m[1m sub 1 day[0m [0m[2m[0.
|
|
173
|
+
[0m[32m✓[0m [0mstartOfWeek[2m >[0m[1m monday: week of February 11th[0m [0m[2m[0.01ms[0m[2m][0m
|
|
174
|
+
[0m[32m✓[0m [0mstartOfWeek[2m >[0m[1m matches date-fns[0m [0m[2m[1.21ms[0m[2m][0m
|
|
175
|
+
[0m[32m✓[0m [0maddMonths[2m >[0m[1m add 1 month[0m [0m[2m[0.03ms[0m[2m][0m
|
|
176
|
+
[0m[32m✓[0m [0maddMonths[2m >[0m[1m add 10 months[0m [0m[2m[0.04ms[0m[2m][0m
|
|
177
|
+
[0m[32m✓[0m [0maddMonths[2m >[0m[1m matches date-fns[0m [0m[2m[0.18ms[0m[2m][0m
|
|
178
|
+
[0m[32m✓[0m [0msubMonths[2m >[0m[1m sub 1 month[0m
|
|
179
|
+
[0m[32m✓[0m [0msubMonths[2m >[0m[1m sub 10 months[0m
|
|
180
|
+
[0m[32m✓[0m [0msubMonths[2m >[0m[1m matches date-fns[0m [0m[2m[0.27ms[0m[2m][0m
|
|
181
|
+
[0m[32m✓[0m [0maddDays[2m >[0m[1m add 1 day[0m [0m[2m[0.03ms[0m[2m][0m
|
|
182
|
+
[0m[32m✓[0m [0maddDays[2m >[0m[1m add 10 days[0m [0m[2m[0.01ms[0m[2m][0m
|
|
183
|
+
[0m[32m✓[0m [0maddDays[2m >[0m[1m matches date-fns[0m [0m[2m[0.09ms[0m[2m][0m
|
|
184
|
+
[0m[32m✓[0m [0msubDays[2m >[0m[1m sub 1 day[0m [0m[2m[0.01ms[0m[2m][0m
|
|
185
185
|
[0m[32m✓[0m [0msubDays[2m >[0m[1m sub 10 days[0m
|
|
186
186
|
[0m[32m✓[0m [0msubDays[2m >[0m[1m matches date-fns[0m [0m[2m[0.08ms[0m[2m][0m
|
|
187
187
|
[0m[32m✓[0m [0misWeekend[2m >[0m[1m Friday[0m
|
|
188
188
|
[0m[32m✓[0m [0misWeekend[2m >[0m[1m Saturday[0m
|
|
189
189
|
[0m[32m✓[0m [0misWeekend[2m >[0m[1m Sunday[0m
|
|
190
190
|
[0m[32m✓[0m [0misWeekend[2m >[0m[1m Monday[0m
|
|
191
|
-
[0m[32m✓[0m [0mdifferenceInMonths [2m > [0medge cases[2m >[0m[1m it returns diff of 1 month between Feb 28 2021 and Jan 30 2021[0m
|
|
191
|
+
[0m[32m✓[0m [0mdifferenceInMonths [2m > [0medge cases[2m >[0m[1m it returns diff of 1 month between Feb 28 2021 and Jan 30 2021[0m [0m[2m[0.01ms[0m[2m][0m
|
|
192
192
|
[0m[32m✓[0m [0mdifferenceInMonths [2m > [0medge cases[2m >[0m[1m it returns diff of 1 month between Feb 28 2021 and Jan 31 2021[0m
|
|
193
193
|
[0m[32m✓[0m [0mdifferenceInMonths [2m > [0medge cases[2m >[0m[1m it returns diff of 1 month between Nov, 30 2021 and Oct, 31 2021[0m
|
|
194
194
|
[0m[32m✓[0m [0mdifferenceInMonths [2m > [0medge cases[2m >[0m[1m it returns diff of 1 month between Oct, 31 2021 and Sep, 30 2021[0m
|
|
@@ -196,22 +196,22 @@ src/helpers/dates.test.ts:
|
|
|
196
196
|
[0m[32m✓[0m [0mdifferenceInMonths [2m > [0medge cases[2m >[0m[1m it returns diff of -1 month between Sep, 30 2021 and Oct, 31 2021[0m
|
|
197
197
|
[0m[32m✓[0m [0mdifferenceInMonths [2m > [0medge cases[2m >[0m[1m the days of months of the given dates are the same[0m
|
|
198
198
|
[0m[32m✓[0m [0mdifferenceInMonths [2m > [0medge cases[2m >[0m[1m the given dates are the same[0m
|
|
199
|
-
[0m[32m✓[0m [0mdifferenceInMonths [2m > [0medge cases[2m >[0m[1m does not return -0 when the given dates are the same[0m
|
|
200
|
-
[0m[32m✓[0m [0mdifferenceInMonths [2m > [0medge cases[2m >[0m[1m returns the number of full months between the given dates - end of Feb[0m [0m[2m[0.
|
|
199
|
+
[0m[32m✓[0m [0mdifferenceInMonths [2m > [0medge cases[2m >[0m[1m does not return -0 when the given dates are the same[0m [0m[2m[0.01ms[0m[2m][0m
|
|
200
|
+
[0m[32m✓[0m [0mdifferenceInMonths [2m > [0medge cases[2m >[0m[1m returns the number of full months between the given dates - end of Feb[0m [0m[2m[0.02ms[0m[2m][0m
|
|
201
201
|
[0m[32m✓[0m [0mdifferenceInMonths [2m >[0m[1m returns the number of full months between the given dates[0m
|
|
202
202
|
[0m[32m✓[0m [0mdifferenceInMonths [2m >[0m[1m returns a negative number if the time value of the first date is smaller[0m
|
|
203
203
|
[0m[32m✓[0m [0mdifferenceInMonths [2m >[0m[1m returns NaN if the first date is `Invalid Date`[0m
|
|
204
204
|
[0m[32m✓[0m [0mdifferenceInMonths [2m >[0m[1m returns NaN if the second date is `Invalid Date`[0m
|
|
205
|
-
[0m[32m✓[0m [0mdifferenceInMonths [2m >[0m[1m returns NaN if the both dates are `Invalid Date`[0m
|
|
206
|
-
[0m[32m✓[0m [0mgetWeeksInMonth[2m >[0m[1m sunday: Month with 5 weeks[0m
|
|
205
|
+
[0m[32m✓[0m [0mdifferenceInMonths [2m >[0m[1m returns NaN if the both dates are `Invalid Date`[0m
|
|
206
|
+
[0m[32m✓[0m [0mgetWeeksInMonth[2m >[0m[1m sunday: Month with 5 weeks[0m
|
|
207
207
|
[0m[32m✓[0m [0mgetWeeksInMonth[2m >[0m[1m sunday: Month with 6 weeks[0m
|
|
208
|
-
[0m[32m✓[0m [0mgetWeeksInMonth[2m >[0m[1m monday: Month with 5 weeks[0m
|
|
209
|
-
[0m[32m✓[0m [0mgetWeeksInMonth[2m >[0m[1m matches date-fns[0m [0m[2m[2.
|
|
210
|
-
[0m[32m✓[0m [0mgetWeekOfMonth[2m >[0m[1m sunday: June[0m [0m[2m[0.
|
|
211
|
-
[0m[32m✓[0m [0mgetWeekOfMonth[2m >[0m[1m monday: June[0m [0m[2m[0.
|
|
212
|
-
[0m[32m✓[0m [0mgetWeekOfMonth[2m >[0m[1m matches date-fns[0m [0m[2m[0.
|
|
208
|
+
[0m[32m✓[0m [0mgetWeeksInMonth[2m >[0m[1m monday: Month with 5 weeks[0m
|
|
209
|
+
[0m[32m✓[0m [0mgetWeeksInMonth[2m >[0m[1m matches date-fns[0m [0m[2m[2.19ms[0m[2m][0m
|
|
210
|
+
[0m[32m✓[0m [0mgetWeekOfMonth[2m >[0m[1m sunday: June[0m [0m[2m[0.21ms[0m[2m][0m
|
|
211
|
+
[0m[32m✓[0m [0mgetWeekOfMonth[2m >[0m[1m monday: June[0m [0m[2m[0.06ms[0m[2m][0m
|
|
212
|
+
[0m[32m✓[0m [0mgetWeekOfMonth[2m >[0m[1m matches date-fns[0m [0m[2m[0.65ms[0m[2m][0m
|
|
213
213
|
|
|
214
214
|
[0m[32m 116 pass[0m
|
|
215
215
|
[0m[2m 0 fail[0m
|
|
216
216
|
8696 expect() calls
|
|
217
|
-
Ran 116 tests across 5 files. [0m[2m[[
|
|
217
|
+
Ran 116 tests across 5 files. [0m[2m[[1m178.00ms[0m[2m][0m
|
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:
|
|
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
|
|
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:
|
|
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
|
|
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"];
|