@kanso-labs/react-native-kanso-ui 0.9.0 → 0.11.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/README.md +4 -3
- package/dist/autocomplete/index.js +15 -1
- package/dist/autocomplete/index.js.map +1 -1
- package/dist/button/group.d.ts +5 -0
- package/dist/button/group.js +115 -0
- package/dist/button/group.js.map +1 -0
- package/dist/button/index.d.ts +4 -1
- package/dist/button/index.js +44 -22
- package/dist/button/index.js.map +1 -1
- package/dist/button/slots.js +2 -1
- package/dist/button/slots.js.map +1 -1
- package/dist/calendar/index.js +351 -182
- package/dist/calendar/index.js.map +1 -1
- package/dist/calendar/styles.js +33 -2
- package/dist/calendar/styles.js.map +1 -1
- package/dist/carousel/arrangement.d.ts +5 -0
- package/dist/carousel/arrangement.js +123 -0
- package/dist/carousel/arrangement.js.map +1 -0
- package/dist/chequer/index.js +95 -0
- package/dist/chequer/index.js.map +1 -0
- package/dist/collection/index.d.ts +157 -0
- package/dist/collection/index.js +1358 -0
- package/dist/collection/index.js.map +1 -0
- package/dist/color-thumb/index.js +56 -0
- package/dist/color-thumb/index.js.map +1 -0
- package/dist/components/button/index.d.ts +4 -2
- package/dist/components/button/index.js +227 -188
- package/dist/components/button/index.js.map +1 -1
- package/dist/components/button-group/index.d.ts +87 -0
- package/dist/components/button-group/index.js +275 -0
- package/dist/components/button-group/index.js.map +1 -0
- package/dist/components/calendar/index.d.ts +11 -3
- package/dist/components/calendar/index.js +60 -45
- package/dist/components/calendar/index.js.map +1 -1
- package/dist/components/carousel/index.d.ts +72 -0
- package/dist/components/carousel/index.js +496 -0
- package/dist/components/carousel/index.js.map +1 -0
- package/dist/components/checkbox-group/index.d.ts +3 -4
- package/dist/components/checkbox-group/index.js +1 -1
- package/dist/components/checkbox-group/index.js.map +1 -1
- package/dist/components/chip/index.d.ts +4 -1
- package/dist/components/chip/index.js +229 -161
- package/dist/components/chip/index.js.map +1 -1
- package/dist/components/color-area/index.d.ts +85 -0
- package/dist/components/color-area/index.js +630 -0
- package/dist/components/color-area/index.js.map +1 -0
- package/dist/components/color-field/index.d.ts +144 -0
- package/dist/components/color-field/index.js +516 -0
- package/dist/components/color-field/index.js.map +1 -0
- package/dist/components/color-picker/index.d.ts +74 -0
- package/dist/components/color-picker/index.js +317 -0
- package/dist/components/color-picker/index.js.map +1 -0
- package/dist/components/color-slider/index.d.ts +82 -0
- package/dist/components/color-slider/index.js +456 -0
- package/dist/components/color-slider/index.js.map +1 -0
- package/dist/components/color-swatch/index.d.ts +46 -0
- package/dist/components/color-swatch/index.js +127 -0
- package/dist/components/color-swatch/index.js.map +1 -0
- package/dist/components/color-swatch-picker/index.d.ts +81 -0
- package/dist/components/color-swatch-picker/index.js +287 -0
- package/dist/components/color-swatch-picker/index.js.map +1 -0
- package/dist/components/color-wheel/index.d.ts +71 -0
- package/dist/components/color-wheel/index.js +407 -0
- package/dist/components/color-wheel/index.js.map +1 -0
- package/dist/components/combo-box/index.d.ts +193 -0
- package/dist/components/combo-box/index.js +616 -0
- package/dist/components/combo-box/index.js.map +1 -0
- package/dist/components/date-field/index.d.ts +120 -0
- package/dist/components/date-field/index.js +111 -0
- package/dist/components/date-field/index.js.map +1 -0
- package/dist/components/date-picker/index.d.ts +130 -0
- package/dist/components/date-picker/index.js +310 -0
- package/dist/components/date-picker/index.js.map +1 -0
- package/dist/components/date-range-picker/index.d.ts +139 -0
- package/dist/components/date-range-picker/index.js +421 -0
- package/dist/components/date-range-picker/index.js.map +1 -0
- package/dist/components/dialog/index.d.ts +5 -5
- package/dist/components/dialog/index.js +5 -5
- package/dist/components/dialog/index.js.map +1 -1
- package/dist/components/disclosure/index.d.ts +94 -0
- package/dist/components/disclosure/index.js +365 -0
- package/dist/components/disclosure/index.js.map +1 -0
- package/dist/components/disclosure-group/index.d.ts +61 -0
- package/dist/components/disclosure-group/index.js +100 -0
- package/dist/components/disclosure-group/index.js.map +1 -0
- package/dist/components/drop-zone/index.d.ts +113 -0
- package/dist/components/drop-zone/index.js +304 -0
- package/dist/components/drop-zone/index.js.map +1 -0
- package/dist/components/fab/index.d.ts +1 -1
- package/dist/components/fab/index.js +91 -76
- package/dist/components/fab/index.js.map +1 -1
- package/dist/components/form/index.d.ts +3 -2
- package/dist/components/form/index.js.map +1 -1
- package/dist/components/icon-button/index.d.ts +4 -2
- package/dist/components/icon-button/index.js +204 -171
- package/dist/components/icon-button/index.js.map +1 -1
- package/dist/components/list/index.d.ts +15 -158
- package/dist/components/list/index.js +21 -1047
- package/dist/components/list/index.js.map +1 -1
- package/dist/components/list-box/index.d.ts +73 -0
- package/dist/components/list-box/index.js +82 -0
- package/dist/components/list-box/index.js.map +1 -0
- package/dist/components/loading-indicator/index.d.ts +32 -0
- package/dist/components/loading-indicator/index.js +174 -0
- package/dist/components/loading-indicator/index.js.map +1 -0
- package/dist/components/menu/index.d.ts +3 -3
- package/dist/components/menu/index.js +3 -3
- package/dist/components/menu/index.js.map +1 -1
- package/dist/components/navigation-tree/index.d.ts +117 -0
- package/dist/components/navigation-tree/index.js +135 -0
- package/dist/components/navigation-tree/index.js.map +1 -0
- package/dist/components/number-field/index.js +132 -143
- package/dist/components/number-field/index.js.map +1 -1
- package/dist/components/popover/index.d.ts +2 -2
- package/dist/components/popover/index.js +2 -2
- package/dist/components/popover/index.js.map +1 -1
- package/dist/components/range-calendar/index.d.ts +69 -0
- package/dist/components/range-calendar/index.js +144 -0
- package/dist/components/range-calendar/index.js.map +1 -0
- package/dist/components/search-view/index.d.ts +79 -0
- package/dist/components/search-view/index.js +571 -0
- package/dist/components/search-view/index.js.map +1 -0
- package/dist/components/select/index.d.ts +152 -0
- package/dist/components/select/index.js +419 -0
- package/dist/components/select/index.js.map +1 -0
- package/dist/components/sheet/index.d.ts +16 -7
- package/dist/components/sheet/index.js +157 -152
- package/dist/components/sheet/index.js.map +1 -1
- package/dist/components/slider/index.d.ts +111 -0
- package/dist/components/slider/index.js +673 -0
- package/dist/components/slider/index.js.map +1 -0
- package/dist/components/split-button/index.d.ts +77 -0
- package/dist/components/split-button/index.js +354 -0
- package/dist/components/split-button/index.js.map +1 -0
- package/dist/components/table/index.d.ts +391 -0
- package/dist/components/table/index.js +1708 -0
- package/dist/components/table/index.js.map +1 -0
- package/dist/components/tabs/index.d.ts +196 -0
- package/dist/components/tabs/index.js +1137 -0
- package/dist/components/tabs/index.js.map +1 -0
- package/dist/components/time-field/index.d.ts +43 -0
- package/dist/components/time-field/index.js +107 -0
- package/dist/components/time-field/index.js.map +1 -0
- package/dist/components/time-picker/index.d.ts +65 -0
- package/dist/components/time-picker/index.js +1168 -0
- package/dist/components/time-picker/index.js.map +1 -0
- package/dist/components/token-field/index.d.ts +105 -0
- package/dist/components/token-field/index.js +574 -0
- package/dist/components/token-field/index.js.map +1 -0
- package/dist/components/tooltip/index.d.ts +102 -0
- package/dist/components/tooltip/index.js +223 -0
- package/dist/components/tooltip/index.js.map +1 -0
- package/dist/components/tree/index.d.ts +112 -0
- package/dist/components/tree/index.js +157 -0
- package/dist/components/tree/index.js.map +1 -0
- package/dist/disclosure/chevron.js +75 -0
- package/dist/disclosure/chevron.js.map +1 -0
- package/dist/disclosure/index.js +7 -0
- package/dist/disclosure/index.js.map +1 -0
- package/dist/drop/index.d.ts +54 -0
- package/dist/drop/index.js +161 -0
- package/dist/drop/index.js.map +1 -0
- package/dist/field/chevron.js +74 -0
- package/dist/field/chevron.js.map +1 -0
- package/dist/field/index.d.ts +2 -1
- package/dist/field/index.js +359 -154
- package/dist/field/index.js.map +1 -1
- package/dist/field/styles.js +18 -1
- package/dist/field/styles.js.map +1 -1
- package/dist/files/index.d.ts +18 -0
- package/dist/files/index.js +107 -0
- package/dist/files/index.js.map +1 -0
- package/dist/form/index.d.ts +5 -2
- package/dist/form/index.js +64 -85
- package/dist/form/index.js.map +1 -1
- package/dist/glyphs/index.js +128 -1
- package/dist/glyphs/index.js.map +1 -1
- package/dist/i18n/index.js +36 -1
- package/dist/i18n/index.js.map +1 -1
- package/dist/i18n/messages.js +1734 -34
- package/dist/i18n/messages.js.map +1 -1
- package/dist/index.d.ts +37 -3
- package/dist/index.js +36 -3
- package/dist/indicator/paths.js +23 -1
- package/dist/indicator/paths.js.map +1 -1
- package/dist/modal/index.js +92 -77
- package/dist/modal/index.js.map +1 -1
- package/dist/number/keyboard.js +16 -0
- package/dist/number/keyboard.js.map +1 -0
- package/dist/overlay/anchored.js +68 -38
- package/dist/overlay/anchored.js.map +1 -1
- package/dist/overlay/keyboard.js +57 -0
- package/dist/overlay/keyboard.js.map +1 -0
- package/dist/overlay/panel.js +173 -19
- package/dist/overlay/panel.js.map +1 -1
- package/dist/overlay/placement.js +13 -1
- package/dist/overlay/placement.js.map +1 -1
- package/dist/picker/index.js +322 -0
- package/dist/picker/index.js.map +1 -0
- package/dist/press/index.d.ts +2 -0
- package/dist/press/index.js +102 -100
- package/dist/press/index.js.map +1 -1
- package/dist/row/index.js +77 -69
- package/dist/row/index.js.map +1 -1
- package/dist/row/styles.js +13 -2
- package/dist/row/styles.js.map +1 -1
- package/dist/segments/field.js +277 -0
- package/dist/segments/field.js.map +1 -0
- package/dist/segments/index.js +574 -0
- package/dist/segments/index.js.map +1 -0
- package/dist/segments/styles.js +24 -0
- package/dist/segments/styles.js.map +1 -0
- package/dist/slider/index.js +145 -0
- package/dist/slider/index.js.map +1 -0
- package/dist/swatch/index.js +56 -0
- package/dist/swatch/index.js.map +1 -0
- package/package.json +11 -2
package/dist/calendar/index.js
CHANGED
|
@@ -6,71 +6,123 @@ import { withOpacity } from "../theme/color.js";
|
|
|
6
6
|
import { messagesFor } from "../i18n/index.js";
|
|
7
7
|
import { ArrowDropDownGlyph, CheckGlyph, ChevronEndGlyph } from "../glyphs/index.js";
|
|
8
8
|
import { IconButton } from "../components/icon-button/index.js";
|
|
9
|
+
import { useWindowSizeClass } from "../hooks/useWindowSizeClass.js";
|
|
9
10
|
import { useFocusOnPlaced, useReturnFocus } from "../overlay/panel.js";
|
|
10
|
-
import { styles, stylesOf } from "./styles.js";
|
|
11
|
+
import { rootWidthOf, styles, stylesOf } from "./styles.js";
|
|
11
12
|
import { c } from "react/compiler-runtime";
|
|
12
|
-
import { FlatList, I18nManager, Pressable, Text, View } from "react-native";
|
|
13
|
+
import { FlatList, I18nManager, Pressable, StyleSheet, Text, View } from "react-native";
|
|
13
14
|
import Animated, { Easing, useAnimatedStyle, useReducedMotion, useSharedValue, withTiming } from "react-native-reanimated";
|
|
14
|
-
import { useLayoutEffect, useRef, useState } from "react";
|
|
15
|
+
import { createContext, use, useLayoutEffect, useRef, useState } from "react";
|
|
15
16
|
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
16
|
-
import { DateFormatter, endOfMonth, isSameDay, isSameYear, isToday, startOfMonth, startOfWeek, toCalendarDate, today } from "@internationalized/date";
|
|
17
|
+
import { DateFormatter, endOfMonth, isSameDay, isSameMonth, isSameYear, isToday, startOfMonth, startOfWeek, toCalendarDate, today } from "@internationalized/date";
|
|
17
18
|
//#region src/calendar/index.tsx
|
|
19
|
+
/**
|
|
20
|
+
* Where a calendar hands over the cell of the date it is on, the one held or
|
|
21
|
+
* else the one it opened on, for a surface that sends a screen reader to that
|
|
22
|
+
* date as it opens, as a date picker's does. The cell hands itself over as it
|
|
23
|
+
* becomes that date and `null` as it stops being it. Outside such a surface
|
|
24
|
+
* it is `null`, and no cell hands anything over.
|
|
25
|
+
*/
|
|
26
|
+
const CalendarFocusContext = createContext(null);
|
|
18
27
|
const LISTED_YEARS = 201;
|
|
19
28
|
const ROWS_ABOVE_SHOWN = 3;
|
|
20
29
|
/**
|
|
21
|
-
* What a calendar draws inside its container
|
|
22
|
-
*
|
|
23
|
-
*
|
|
30
|
+
* What a calendar draws inside its container: the header, and a grid for each
|
|
31
|
+
* month it shows. With `showMonthYearMenus` the header is the date pickers
|
|
32
|
+
* page's docked one, the month and the year as menu buttons, and while either
|
|
33
|
+
* is open its list takes the grid's place.
|
|
34
|
+
*
|
|
35
|
+
* The menus are for one month. They name and pick the first month alone, so
|
|
36
|
+
* a second grid beside it would have no month or year of its own; with more
|
|
37
|
+
* than one the header is the plain one, whose heading names every month
|
|
38
|
+
* shown, both years where they are two, as web's does.
|
|
24
39
|
*/
|
|
25
40
|
function CalendarFrame(t0) {
|
|
26
|
-
const $ = c(
|
|
27
|
-
const { firstDayOfWeek, locale, showMonthYearMenus, state } = t0;
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
41
|
+
const $ = c(28);
|
|
42
|
+
const { firstDayOfWeek, locale, months, showMonthYearMenus, state } = t0;
|
|
43
|
+
const t1 = useTheme();
|
|
44
|
+
let t2;
|
|
45
|
+
if ($[0] !== t1) {
|
|
46
|
+
t2 = stylesOf(t1);
|
|
47
|
+
$[0] = t1;
|
|
48
|
+
$[1] = t2;
|
|
49
|
+
} else t2 = $[1];
|
|
50
|
+
const own = t2;
|
|
51
|
+
const sideBySide = useSideBySide(months);
|
|
52
|
+
const t3 = sideBySide ? own.monthsSideBySide : own.months;
|
|
53
|
+
let t4;
|
|
54
|
+
if ($[2] !== firstDayOfWeek || $[3] !== locale || $[4] !== months || $[5] !== own.monthSideBySide || $[6] !== sideBySide || $[7] !== state) {
|
|
55
|
+
let t5;
|
|
56
|
+
if ($[9] !== firstDayOfWeek || $[10] !== locale || $[11] !== own.monthSideBySide || $[12] !== sideBySide || $[13] !== state) {
|
|
57
|
+
t5 = (offset) => /* @__PURE__ */ jsx(View, {
|
|
58
|
+
style: sideBySide ? own.monthSideBySide : void 0,
|
|
59
|
+
children: /* @__PURE__ */ jsx(MonthGrid, {
|
|
60
|
+
firstDayOfWeek,
|
|
61
|
+
locale,
|
|
62
|
+
offset,
|
|
63
|
+
state
|
|
64
|
+
})
|
|
65
|
+
}, offset.months);
|
|
66
|
+
$[9] = firstDayOfWeek;
|
|
67
|
+
$[10] = locale;
|
|
68
|
+
$[11] = own.monthSideBySide;
|
|
69
|
+
$[12] = sideBySide;
|
|
70
|
+
$[13] = state;
|
|
71
|
+
$[14] = t5;
|
|
72
|
+
} else t5 = $[14];
|
|
73
|
+
t4 = offsetsOf(months).map(t5);
|
|
74
|
+
$[2] = firstDayOfWeek;
|
|
75
|
+
$[3] = locale;
|
|
76
|
+
$[4] = months;
|
|
77
|
+
$[5] = own.monthSideBySide;
|
|
78
|
+
$[6] = sideBySide;
|
|
79
|
+
$[7] = state;
|
|
80
|
+
$[8] = t4;
|
|
81
|
+
} else t4 = $[8];
|
|
82
|
+
let t5;
|
|
83
|
+
if ($[15] !== t3 || $[16] !== t4) {
|
|
84
|
+
t5 = /* @__PURE__ */ jsx(View, {
|
|
85
|
+
style: t3,
|
|
86
|
+
children: t4
|
|
34
87
|
});
|
|
35
|
-
$[
|
|
36
|
-
$[
|
|
37
|
-
$[
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
t2 = /* @__PURE__ */ jsx(CalendarMenus, {
|
|
88
|
+
$[15] = t3;
|
|
89
|
+
$[16] = t4;
|
|
90
|
+
$[17] = t5;
|
|
91
|
+
} else t5 = $[17];
|
|
92
|
+
const grids = t5;
|
|
93
|
+
if (showMonthYearMenus && months <= 1) {
|
|
94
|
+
let t6;
|
|
95
|
+
if ($[18] !== grids || $[19] !== locale || $[20] !== state) {
|
|
96
|
+
t6 = /* @__PURE__ */ jsx(CalendarMenus, {
|
|
45
97
|
locale,
|
|
46
98
|
state,
|
|
47
|
-
children:
|
|
99
|
+
children: grids
|
|
48
100
|
});
|
|
49
|
-
$[
|
|
50
|
-
$[
|
|
51
|
-
$[
|
|
52
|
-
$[
|
|
53
|
-
} else
|
|
54
|
-
return
|
|
101
|
+
$[18] = grids;
|
|
102
|
+
$[19] = locale;
|
|
103
|
+
$[20] = state;
|
|
104
|
+
$[21] = t6;
|
|
105
|
+
} else t6 = $[21];
|
|
106
|
+
return t6;
|
|
55
107
|
}
|
|
56
|
-
let
|
|
57
|
-
if ($[
|
|
58
|
-
|
|
108
|
+
let t6;
|
|
109
|
+
if ($[22] !== locale || $[23] !== state) {
|
|
110
|
+
t6 = /* @__PURE__ */ jsx(CalendarHeader, {
|
|
59
111
|
locale,
|
|
60
112
|
state
|
|
61
113
|
});
|
|
62
|
-
$[
|
|
63
|
-
$[
|
|
64
|
-
$[
|
|
65
|
-
} else
|
|
66
|
-
let
|
|
67
|
-
if ($[
|
|
68
|
-
|
|
69
|
-
$[
|
|
70
|
-
$[
|
|
71
|
-
$[
|
|
72
|
-
} else
|
|
73
|
-
return
|
|
114
|
+
$[22] = locale;
|
|
115
|
+
$[23] = state;
|
|
116
|
+
$[24] = t6;
|
|
117
|
+
} else t6 = $[24];
|
|
118
|
+
let t7;
|
|
119
|
+
if ($[25] !== grids || $[26] !== t6) {
|
|
120
|
+
t7 = /* @__PURE__ */ jsxs(Fragment$1, { children: [t6, grids] });
|
|
121
|
+
$[25] = grids;
|
|
122
|
+
$[26] = t6;
|
|
123
|
+
$[27] = t7;
|
|
124
|
+
} else t7 = $[27];
|
|
125
|
+
return t7;
|
|
74
126
|
}
|
|
75
127
|
/** The two chevrons with the month and year between them. */
|
|
76
128
|
function CalendarHeader(t0) {
|
|
@@ -97,7 +149,7 @@ function CalendarHeader(t0) {
|
|
|
97
149
|
const t5 = composeStyles(role, own.heading);
|
|
98
150
|
let t6;
|
|
99
151
|
if ($[3] !== locale || $[4] !== state) {
|
|
100
|
-
t6 =
|
|
152
|
+
t6 = visibleRangeOf(state, locale);
|
|
101
153
|
$[3] = locale;
|
|
102
154
|
$[4] = state;
|
|
103
155
|
$[5] = t6;
|
|
@@ -418,119 +470,159 @@ function chooseThen(state, setOpen, shown) {
|
|
|
418
470
|
setOpen(null);
|
|
419
471
|
};
|
|
420
472
|
}
|
|
473
|
+
function cornersOf(shape) {
|
|
474
|
+
const { borderBottomEndRadius, borderBottomStartRadius, borderRadius, borderTopEndRadius, borderTopStartRadius } = StyleSheet.flatten(shape) ?? {};
|
|
475
|
+
return {
|
|
476
|
+
borderBottomEndRadius,
|
|
477
|
+
borderBottomStartRadius,
|
|
478
|
+
borderRadius,
|
|
479
|
+
borderTopEndRadius,
|
|
480
|
+
borderTopStartRadius
|
|
481
|
+
};
|
|
482
|
+
}
|
|
421
483
|
/**
|
|
422
484
|
* One date: the page's 40dp circle in its 48dp square, which `hitSlop` makes
|
|
423
485
|
* the press target. Its name is the date in full, with today, the selection
|
|
424
486
|
* and the first or last date the bounds allow said as web says them, and it
|
|
425
|
-
* reports itself disabled where it cannot be picked
|
|
487
|
+
* reports itself disabled where it cannot be picked, as a date of the months
|
|
488
|
+
* either side of its grid's is.
|
|
489
|
+
*
|
|
490
|
+
* In a range calendar a selected day is the band instead, as wide as its
|
|
491
|
+
* column, with the two ends filled and round on their outer side, and the
|
|
492
|
+
* state layers follow the ground under them: on primary over an end, on
|
|
493
|
+
* primary container over the band, on surface elsewhere. While a range is
|
|
494
|
+
* started, a pointer over a date draws the range as far as it, as web's
|
|
495
|
+
* does; a touch has no such preview, and the second press ends the range.
|
|
426
496
|
*/
|
|
427
497
|
function DateCell(t0) {
|
|
428
|
-
const $ = c(
|
|
429
|
-
const { date, locale, state } = t0;
|
|
498
|
+
const $ = c(37);
|
|
499
|
+
const { date, locale, month, state } = t0;
|
|
430
500
|
const theme = useTheme();
|
|
431
501
|
const { colors, sizing } = theme;
|
|
432
502
|
const own = stylesOf(theme);
|
|
433
503
|
const role = useTypeRole("bodyLarge");
|
|
434
504
|
let t1;
|
|
435
|
-
if ($[0] !== date || $[1] !== state) {
|
|
436
|
-
t1 = state.isCellDisabled(date);
|
|
505
|
+
if ($[0] !== date || $[1] !== month || $[2] !== state) {
|
|
506
|
+
t1 = state.isCellDisabled(date) || !isSameMonth(date, month);
|
|
437
507
|
$[0] = date;
|
|
438
|
-
$[1] =
|
|
439
|
-
$[2] =
|
|
440
|
-
|
|
508
|
+
$[1] = month;
|
|
509
|
+
$[2] = state;
|
|
510
|
+
$[3] = t1;
|
|
511
|
+
} else t1 = $[3];
|
|
441
512
|
const isDisabled = t1;
|
|
442
513
|
let t2;
|
|
443
|
-
if ($[
|
|
514
|
+
if ($[4] !== date || $[5] !== state) {
|
|
444
515
|
t2 = state.isCellUnavailable(date);
|
|
445
|
-
$[
|
|
446
|
-
$[
|
|
447
|
-
$[
|
|
448
|
-
} else t2 = $[
|
|
516
|
+
$[4] = date;
|
|
517
|
+
$[5] = state;
|
|
518
|
+
$[6] = t2;
|
|
519
|
+
} else t2 = $[6];
|
|
449
520
|
const isUnavailable = t2;
|
|
450
521
|
const selectable = !isDisabled && !isUnavailable;
|
|
451
522
|
const isSelected = selectable && state.isSelected(date);
|
|
452
523
|
const isCurrent = isToday(date, state.timeZone);
|
|
524
|
+
const range = rangeOf(state, date, isSelected);
|
|
525
|
+
const isFilled = range === null ? isSelected : range.isEnd;
|
|
526
|
+
const report = use(CalendarFocusContext);
|
|
527
|
+
const isFocused = isSameMonth(date, month) && isSameDay(date, state.focusedDate);
|
|
528
|
+
const shape = composeStyles(own.date, range === null ? void 0 : own.dateInRange, range?.isFirst === true ? own.dateRangeStart : void 0, range?.isLast === true ? own.dateRangeEnd : void 0);
|
|
453
529
|
const feedback = usePressFeedback({
|
|
454
|
-
color:
|
|
455
|
-
corners:
|
|
456
|
-
disabled: !selectable
|
|
530
|
+
color: isFilled ? colors.onPrimary : range === null ? colors.onSurface : colors.onPrimaryContainer,
|
|
531
|
+
corners: cornersOf(shape),
|
|
532
|
+
disabled: !selectable,
|
|
533
|
+
onHoverIn: highlightThen(state, date)
|
|
457
534
|
});
|
|
458
535
|
const T0 = Pressable;
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
$[
|
|
464
|
-
$[7] = t4;
|
|
465
|
-
} else t4 = $[7];
|
|
466
|
-
let t5;
|
|
467
|
-
if ($[8] !== date || $[9] !== state) {
|
|
468
|
-
t5 = selectThen(state, date);
|
|
469
|
-
$[8] = date;
|
|
536
|
+
let t3;
|
|
537
|
+
if ($[7] !== locale || $[8] !== selectable || $[9] !== state) {
|
|
538
|
+
t3 = promptOf(state, locale, selectable);
|
|
539
|
+
$[7] = locale;
|
|
540
|
+
$[8] = selectable;
|
|
470
541
|
$[9] = state;
|
|
471
|
-
$[10] =
|
|
472
|
-
} else
|
|
473
|
-
const
|
|
474
|
-
const
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
542
|
+
$[10] = t3;
|
|
543
|
+
} else t3 = $[10];
|
|
544
|
+
const t4 = dateLabelOf(date, state, locale, isCurrent, isSelected);
|
|
545
|
+
const t5 = range === null ? sizing.controlSm : void 0;
|
|
546
|
+
let t6;
|
|
547
|
+
if ($[11] !== sizing.controlSm || $[12] !== t5) {
|
|
548
|
+
t6 = hitSlop(sizing.controlSm, t5);
|
|
549
|
+
$[11] = sizing.controlSm;
|
|
550
|
+
$[12] = t5;
|
|
551
|
+
$[13] = t6;
|
|
552
|
+
} else t6 = $[13];
|
|
553
|
+
let t7;
|
|
554
|
+
if ($[14] !== date || $[15] !== state) {
|
|
555
|
+
t7 = selectThen(state, date);
|
|
556
|
+
$[14] = date;
|
|
557
|
+
$[15] = state;
|
|
558
|
+
$[16] = t7;
|
|
559
|
+
} else t7 = $[16];
|
|
560
|
+
const t8 = isFocused && report !== null ? report : void 0;
|
|
561
|
+
const t9 = "button";
|
|
562
|
+
const t10 = feedback.handlers;
|
|
563
|
+
const t11 = !selectable;
|
|
564
|
+
const t12 = composeStyles(shape, isCurrent ? own.dateToday : void 0, isFilled ? own.dateSelected : void 0, feedback.ring);
|
|
565
|
+
const t13 = feedback.layer;
|
|
478
566
|
const T1 = Text;
|
|
479
|
-
const
|
|
480
|
-
let
|
|
481
|
-
if ($[
|
|
482
|
-
|
|
483
|
-
$[
|
|
484
|
-
$[
|
|
485
|
-
$[
|
|
486
|
-
$[
|
|
487
|
-
} else
|
|
488
|
-
let
|
|
489
|
-
if ($[
|
|
490
|
-
|
|
491
|
-
style:
|
|
492
|
-
children:
|
|
567
|
+
const t14 = composeStyles(role, own.dateText, isCurrent ? own.dateTextToday : void 0, range === null ? void 0 : own.dateTextInRange, isFilled ? own.dateTextSelected : void 0, isUnavailable ? own.dateTextUnavailable : void 0, isDisabled ? own.dateTextDisabled : void 0);
|
|
568
|
+
let t15;
|
|
569
|
+
if ($[17] !== date || $[18] !== locale || $[19] !== state) {
|
|
570
|
+
t15 = dayOf(date, state, locale);
|
|
571
|
+
$[17] = date;
|
|
572
|
+
$[18] = locale;
|
|
573
|
+
$[19] = state;
|
|
574
|
+
$[20] = t15;
|
|
575
|
+
} else t15 = $[20];
|
|
576
|
+
let t16;
|
|
577
|
+
if ($[21] !== T1 || $[22] !== t14 || $[23] !== t15) {
|
|
578
|
+
t16 = /* @__PURE__ */ jsx(T1, {
|
|
579
|
+
style: t14,
|
|
580
|
+
children: t15
|
|
493
581
|
});
|
|
494
|
-
$[
|
|
495
|
-
$[
|
|
496
|
-
$[
|
|
497
|
-
$[
|
|
498
|
-
} else
|
|
499
|
-
let
|
|
500
|
-
if ($[
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
582
|
+
$[21] = T1;
|
|
583
|
+
$[22] = t14;
|
|
584
|
+
$[23] = t15;
|
|
585
|
+
$[24] = t16;
|
|
586
|
+
} else t16 = $[24];
|
|
587
|
+
let t17;
|
|
588
|
+
if ($[25] !== T0 || $[26] !== feedback.handlers || $[27] !== feedback.layer || $[28] !== t11 || $[29] !== t12 || $[30] !== t16 || $[31] !== t3 || $[32] !== t4 || $[33] !== t6 || $[34] !== t7 || $[35] !== t8) {
|
|
589
|
+
t17 = /* @__PURE__ */ jsxs(T0, {
|
|
590
|
+
accessibilityHint: t3,
|
|
591
|
+
"aria-label": t4,
|
|
592
|
+
hitSlop: t6,
|
|
593
|
+
onPress: t7,
|
|
594
|
+
ref: t8,
|
|
595
|
+
role: t9,
|
|
596
|
+
...t10,
|
|
597
|
+
disabled: t11,
|
|
598
|
+
style: t12,
|
|
599
|
+
children: [t13, t16]
|
|
510
600
|
});
|
|
511
|
-
$[
|
|
512
|
-
$[
|
|
513
|
-
$[
|
|
514
|
-
$[
|
|
515
|
-
$[
|
|
516
|
-
$[
|
|
517
|
-
$[
|
|
518
|
-
$[
|
|
519
|
-
$[
|
|
520
|
-
$[
|
|
521
|
-
|
|
522
|
-
|
|
601
|
+
$[25] = T0;
|
|
602
|
+
$[26] = feedback.handlers;
|
|
603
|
+
$[27] = feedback.layer;
|
|
604
|
+
$[28] = t11;
|
|
605
|
+
$[29] = t12;
|
|
606
|
+
$[30] = t16;
|
|
607
|
+
$[31] = t3;
|
|
608
|
+
$[32] = t4;
|
|
609
|
+
$[33] = t6;
|
|
610
|
+
$[34] = t7;
|
|
611
|
+
$[35] = t8;
|
|
612
|
+
$[36] = t17;
|
|
613
|
+
} else t17 = $[36];
|
|
614
|
+
return t17;
|
|
523
615
|
}
|
|
524
616
|
function dateLabelOf(date, state, locale, isCurrent, isSelected) {
|
|
525
617
|
const words = messagesFor(locale).calendar;
|
|
526
|
-
const full = new DateFormatter(locale, {
|
|
618
|
+
const full = `${rangeNameOf(state, date, locale)}${new DateFormatter(locale, {
|
|
527
619
|
day: "numeric",
|
|
528
620
|
era: eraOf(date),
|
|
529
621
|
month: "long",
|
|
530
622
|
timeZone: state.timeZone,
|
|
531
623
|
weekday: "long",
|
|
532
624
|
year: "numeric"
|
|
533
|
-
}).format(date.toDate(state.timeZone))
|
|
625
|
+
}).format(date.toDate(state.timeZone))}`;
|
|
534
626
|
const said = isCurrent ? (isSelected ? words.todayDateSelected : words.todayDate).replace("{date}", full) : isSelected ? words.dateSelected.replace("{date}", full) : full;
|
|
535
627
|
if (state.minValue != null && isSameDay(date, state.minValue)) return `${said}, ${words.minimumDate}`;
|
|
536
628
|
if (state.maxValue != null && isSameDay(date, state.maxValue)) return `${said}, ${words.maximumDate}`;
|
|
@@ -546,6 +638,12 @@ function dayOf(date, state, locale) {
|
|
|
546
638
|
function eraOf(date) {
|
|
547
639
|
return date.calendar.identifier === "gregory" && date.era === "BC" ? "short" : void 0;
|
|
548
640
|
}
|
|
641
|
+
function highlightThen(state, date) {
|
|
642
|
+
if (!("highlightDate" in state)) return;
|
|
643
|
+
return () => {
|
|
644
|
+
state.highlightDate(date);
|
|
645
|
+
};
|
|
646
|
+
}
|
|
549
647
|
function layoutOf(height) {
|
|
550
648
|
return (_data, index) => ({
|
|
551
649
|
index,
|
|
@@ -715,83 +813,92 @@ function MenuList(t0) {
|
|
|
715
813
|
return t5;
|
|
716
814
|
}
|
|
717
815
|
/**
|
|
718
|
-
* The weekday row and
|
|
816
|
+
* The weekday row and one month's weeks, held at six weeks of room so the
|
|
719
817
|
* calendar keeps its height from month to month. The weeks slide in from the
|
|
720
818
|
* side the new month comes from.
|
|
721
819
|
*/
|
|
722
820
|
function MonthGrid(t0) {
|
|
723
|
-
const $ = c(
|
|
724
|
-
const { firstDayOfWeek, locale, state } = t0;
|
|
821
|
+
const $ = c(20);
|
|
822
|
+
const { firstDayOfWeek, locale, offset, state } = t0;
|
|
725
823
|
const theme = useTheme();
|
|
726
824
|
const own = stylesOf(theme);
|
|
727
825
|
const role = useTypeRole("bodyLarge");
|
|
728
|
-
|
|
826
|
+
let t1;
|
|
827
|
+
if ($[0] !== offset || $[1] !== state.visibleRange.start) {
|
|
828
|
+
t1 = state.visibleRange.start.add(offset);
|
|
829
|
+
$[0] = offset;
|
|
830
|
+
$[1] = state.visibleRange.start;
|
|
831
|
+
$[2] = t1;
|
|
832
|
+
} else t1 = $[2];
|
|
833
|
+
const start = t1;
|
|
729
834
|
const slide = useMonthSlide(start, theme);
|
|
730
835
|
const rowStyle = composeStyles(styles.row, own.rowHeight);
|
|
731
836
|
const T0 = View;
|
|
732
|
-
const
|
|
837
|
+
const t2 = own.grid;
|
|
733
838
|
const T1 = View;
|
|
734
|
-
const
|
|
735
|
-
const
|
|
839
|
+
const t3 = true;
|
|
840
|
+
const t4 = weekdaysOf(state, locale, firstDayOfWeek).map((weekday) => /* @__PURE__ */ jsx(View, {
|
|
736
841
|
style: styles.column,
|
|
737
842
|
children: /* @__PURE__ */ jsx(Text, {
|
|
738
843
|
style: composeStyles(role, own.weekday),
|
|
739
844
|
children: weekday.label
|
|
740
845
|
})
|
|
741
846
|
}, weekday.key));
|
|
742
|
-
let
|
|
743
|
-
if ($[
|
|
744
|
-
|
|
745
|
-
"aria-hidden":
|
|
847
|
+
let t5;
|
|
848
|
+
if ($[3] !== T1 || $[4] !== rowStyle || $[5] !== t4) {
|
|
849
|
+
t5 = /* @__PURE__ */ jsx(T1, {
|
|
850
|
+
"aria-hidden": t3,
|
|
746
851
|
style: rowStyle,
|
|
747
|
-
children:
|
|
852
|
+
children: t4
|
|
748
853
|
});
|
|
749
|
-
$[
|
|
750
|
-
$[
|
|
751
|
-
$[
|
|
752
|
-
$[
|
|
753
|
-
} else
|
|
754
|
-
let
|
|
755
|
-
if ($[
|
|
756
|
-
|
|
854
|
+
$[3] = T1;
|
|
855
|
+
$[4] = rowStyle;
|
|
856
|
+
$[5] = t4;
|
|
857
|
+
$[6] = t5;
|
|
858
|
+
} else t5 = $[6];
|
|
859
|
+
let t6;
|
|
860
|
+
if ($[7] !== locale || $[8] !== rowStyle || $[9] !== start || $[10] !== state) {
|
|
861
|
+
t6 = weeksOf(state, start).map((week) => /* @__PURE__ */ jsx(View, {
|
|
757
862
|
style: rowStyle,
|
|
758
863
|
children: week.days.map((day) => /* @__PURE__ */ jsx(View, {
|
|
759
864
|
style: styles.column,
|
|
760
865
|
children: day.date === null ? null : /* @__PURE__ */ jsx(DateCell, {
|
|
761
866
|
date: day.date,
|
|
762
867
|
locale,
|
|
868
|
+
month: start,
|
|
763
869
|
state
|
|
764
870
|
})
|
|
765
871
|
}, day.key))
|
|
766
872
|
}, week.key));
|
|
767
|
-
$[
|
|
768
|
-
$[
|
|
769
|
-
$[
|
|
770
|
-
$[
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
873
|
+
$[7] = locale;
|
|
874
|
+
$[8] = rowStyle;
|
|
875
|
+
$[9] = start;
|
|
876
|
+
$[10] = state;
|
|
877
|
+
$[11] = t6;
|
|
878
|
+
} else t6 = $[11];
|
|
879
|
+
let t7;
|
|
880
|
+
if ($[12] !== slide || $[13] !== t6) {
|
|
881
|
+
t7 = /* @__PURE__ */ jsx(Animated.View, {
|
|
775
882
|
style: slide,
|
|
776
|
-
children:
|
|
883
|
+
children: t6
|
|
777
884
|
});
|
|
778
|
-
$[
|
|
779
|
-
$[
|
|
780
|
-
$[
|
|
781
|
-
} else
|
|
782
|
-
let
|
|
783
|
-
if ($[
|
|
784
|
-
|
|
785
|
-
style:
|
|
786
|
-
children: [
|
|
885
|
+
$[12] = slide;
|
|
886
|
+
$[13] = t6;
|
|
887
|
+
$[14] = t7;
|
|
888
|
+
} else t7 = $[14];
|
|
889
|
+
let t8;
|
|
890
|
+
if ($[15] !== T0 || $[16] !== own || $[17] !== t5 || $[18] !== t7) {
|
|
891
|
+
t8 = /* @__PURE__ */ jsxs(T0, {
|
|
892
|
+
style: t2,
|
|
893
|
+
children: [t5, t7]
|
|
787
894
|
});
|
|
788
|
-
$[
|
|
789
|
-
$[
|
|
790
|
-
$[
|
|
791
|
-
$[
|
|
792
|
-
$[
|
|
793
|
-
} else
|
|
794
|
-
return
|
|
895
|
+
$[15] = T0;
|
|
896
|
+
$[16] = own;
|
|
897
|
+
$[17] = t5;
|
|
898
|
+
$[18] = t7;
|
|
899
|
+
$[19] = t8;
|
|
900
|
+
} else t8 = $[19];
|
|
901
|
+
return t8;
|
|
795
902
|
}
|
|
796
903
|
/** The open month list: the months of the year shown, named in full. */
|
|
797
904
|
function MonthList(t0) {
|
|
@@ -869,6 +976,9 @@ function monthsOf(state, locale, format) {
|
|
|
869
976
|
};
|
|
870
977
|
});
|
|
871
978
|
}
|
|
979
|
+
function offsetsOf(months) {
|
|
980
|
+
return Array.from({ length: Math.max(1, months) }, (_unused, index) => ({ months: index }));
|
|
981
|
+
}
|
|
872
982
|
function outsideBounds(state, months) {
|
|
873
983
|
const { maxValue, minValue } = state;
|
|
874
984
|
return new Set(months.filter(({ date }) => maxValue != null && startOfMonth(date).compare(maxValue) > 0 || minValue != null && endOfMonth(date).compare(minValue) < 0).map(({ id }) => id));
|
|
@@ -882,6 +992,36 @@ function pageThen(state, direction) {
|
|
|
882
992
|
function previousGlyphStyle() {
|
|
883
993
|
return I18nManager.isRTL ? styles.previousGlyphRightToLeft : styles.previousGlyph;
|
|
884
994
|
}
|
|
995
|
+
function promptOf(state, locale, selectable) {
|
|
996
|
+
if (!("anchorDate" in state) || state.isReadOnly || !selectable) return;
|
|
997
|
+
const words = messagesFor(locale).calendar;
|
|
998
|
+
return state.anchorDate === null ? words.startRangeSelectionPrompt : words.finishRangeSelectionPrompt;
|
|
999
|
+
}
|
|
1000
|
+
function rangeNameOf(state, date, locale) {
|
|
1001
|
+
if (!("highlightedRange" in state) || state.value === null || state.anchorDate !== null || state.highlightedRange === null || !isSameDay(date, state.value.start) && !isSameDay(date, state.value.end)) return "";
|
|
1002
|
+
const { end, start } = state.highlightedRange;
|
|
1003
|
+
const { timeZone } = state;
|
|
1004
|
+
const words = messagesFor(locale).calendar;
|
|
1005
|
+
const formatter = new DateFormatter(locale, {
|
|
1006
|
+
day: "numeric",
|
|
1007
|
+
era: eraOf(start) ?? eraOf(end),
|
|
1008
|
+
month: "long",
|
|
1009
|
+
timeZone,
|
|
1010
|
+
weekday: "long",
|
|
1011
|
+
year: "numeric"
|
|
1012
|
+
});
|
|
1013
|
+
return `${isSameDay(start, end) ? words.selectedDateDescription.replace("{date}", formatter.format(start.toDate(timeZone))) : words.selectedRangeDescription.replace("{dateRange}", spokenRangeOf(formatter, locale, start, end, timeZone))}, `;
|
|
1014
|
+
}
|
|
1015
|
+
function rangeOf(state, date, isSelected) {
|
|
1016
|
+
if (!isSelected || !("highlightedRange" in state) || state.highlightedRange === null) return null;
|
|
1017
|
+
const isFirst = isSameDay(date, state.highlightedRange.start);
|
|
1018
|
+
const isLast = isSameDay(date, state.highlightedRange.end);
|
|
1019
|
+
return {
|
|
1020
|
+
isEnd: isFirst || isLast,
|
|
1021
|
+
isFirst,
|
|
1022
|
+
isLast
|
|
1023
|
+
};
|
|
1024
|
+
}
|
|
885
1025
|
/**
|
|
886
1026
|
* One row of an open list: the check where the row is the entry shown, the
|
|
887
1027
|
* room it takes where it is not, then the month or the year, in body large.
|
|
@@ -971,6 +1111,18 @@ function selectThen(state, date) {
|
|
|
971
1111
|
state.setFocusedDate(date);
|
|
972
1112
|
};
|
|
973
1113
|
}
|
|
1114
|
+
function spokenRangeOf(formatter, locale, start, end, timeZone) {
|
|
1115
|
+
const parts = formatter.formatRangeToParts(start.toDate(timeZone), end.toDate(timeZone));
|
|
1116
|
+
let separator = -1;
|
|
1117
|
+
for (const [index, part] of parts.entries()) {
|
|
1118
|
+
if (part.source === "endRange") break;
|
|
1119
|
+
if (part.source === "shared" && part.type === "literal") separator = index;
|
|
1120
|
+
}
|
|
1121
|
+
return messagesFor(locale).calendar.dateRange.replace("{startDate}", textOf(parts.slice(0, Math.max(0, separator)))).replace("{endDate}", textOf(parts.slice(separator + 1)));
|
|
1122
|
+
}
|
|
1123
|
+
function textOf(parts) {
|
|
1124
|
+
return parts.map((part) => part.value).join("");
|
|
1125
|
+
}
|
|
974
1126
|
function toggleThen(setOpen, list) {
|
|
975
1127
|
return () => {
|
|
976
1128
|
setOpen((open) => open === list ? null : list);
|
|
@@ -1034,15 +1186,33 @@ function useMonthSlide(start, t0) {
|
|
|
1034
1186
|
};
|
|
1035
1187
|
});
|
|
1036
1188
|
}
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1189
|
+
/**
|
|
1190
|
+
* The container's style for the months a calendar shows: the page's 360dp,
|
|
1191
|
+
* or as wide as its months side by side with the room between them.
|
|
1192
|
+
*/
|
|
1193
|
+
function useRootStyle(months) {
|
|
1194
|
+
const theme = useTheme();
|
|
1195
|
+
const own = stylesOf(theme);
|
|
1196
|
+
return useSideBySide(months) ? composeStyles(own.root, { width: rootWidthOf(theme, months) }) : own.root;
|
|
1197
|
+
}
|
|
1198
|
+
function useSideBySide(months) {
|
|
1199
|
+
const sizeClass = useWindowSizeClass();
|
|
1200
|
+
return months > 1 && sizeClass !== "compact" && sizeClass !== "medium";
|
|
1201
|
+
}
|
|
1202
|
+
function visibleRangeOf(state, locale, spoken = false) {
|
|
1203
|
+
const { end, start } = state.visibleRange;
|
|
1204
|
+
const { timeZone } = state;
|
|
1205
|
+
const formatter = new DateFormatter(locale, {
|
|
1040
1206
|
calendar: start.calendar.identifier,
|
|
1041
|
-
era: eraOf(start),
|
|
1207
|
+
era: eraOf(start) ?? eraOf(end),
|
|
1042
1208
|
month: "long",
|
|
1043
|
-
timeZone
|
|
1209
|
+
timeZone,
|
|
1044
1210
|
year: "numeric"
|
|
1045
|
-
})
|
|
1211
|
+
});
|
|
1212
|
+
const first = start.calendar.getFormattableMonth?.(start) ?? start;
|
|
1213
|
+
if (isSameMonth(start, end)) return formatter.format(first.toDate(timeZone));
|
|
1214
|
+
const last = end.calendar.getFormattableMonth?.(end) ?? end;
|
|
1215
|
+
return spoken ? spokenRangeOf(formatter, locale, first, last, timeZone) : formatter.formatRange(first.toDate(timeZone), last.toDate(timeZone));
|
|
1046
1216
|
}
|
|
1047
1217
|
function weekdaysOf(state, locale, firstDayOfWeek) {
|
|
1048
1218
|
const first = startOfWeek(today(state.timeZone), locale, firstDayOfWeek);
|
|
@@ -1058,12 +1228,11 @@ function weekdaysOf(state, locale, firstDayOfWeek) {
|
|
|
1058
1228
|
};
|
|
1059
1229
|
});
|
|
1060
1230
|
}
|
|
1061
|
-
function weeksOf(state) {
|
|
1062
|
-
|
|
1063
|
-
return Array.from({ length: state.getWeeksInMonth() }, (_unused, week) => {
|
|
1231
|
+
function weeksOf(state, start) {
|
|
1232
|
+
return Array.from({ length: state.getWeeksInMonth(start) }, (_unused, week) => {
|
|
1064
1233
|
const key = start.add({ weeks: week }).toString();
|
|
1065
1234
|
return {
|
|
1066
|
-
days: state.getDatesInWeek(week).map((date, day) => ({
|
|
1235
|
+
days: state.getDatesInWeek(week, start).map((date, day) => ({
|
|
1067
1236
|
date,
|
|
1068
1237
|
key: date?.toString() ?? `${key}+${String(day)}`
|
|
1069
1238
|
})),
|
|
@@ -1177,6 +1346,6 @@ function yearsOf(state, locale) {
|
|
|
1177
1346
|
}
|
|
1178
1347
|
const NONE = /* @__PURE__ */ new Set();
|
|
1179
1348
|
//#endregion
|
|
1180
|
-
export { CalendarFrame,
|
|
1349
|
+
export { CalendarFocusContext, CalendarFrame, useRootStyle, visibleRangeOf };
|
|
1181
1350
|
|
|
1182
1351
|
//# sourceMappingURL=index.js.map
|