panelui-native 0.25.0 → 0.28.1
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/lib/module/components/accordion/index.js +8 -8
- package/lib/module/components/accordion/index.js.map +1 -1
- package/lib/module/components/alert/index.js +2 -2
- package/lib/module/components/alert/index.js.map +1 -1
- package/lib/module/components/area-chart/index.js +182 -50
- package/lib/module/components/area-chart/index.js.map +1 -1
- package/lib/module/components/attachment/index.js +2 -1
- package/lib/module/components/attachment/index.js.map +1 -1
- package/lib/module/components/avatar/index.js +3 -3
- package/lib/module/components/avatar/index.js.map +1 -1
- package/lib/module/components/badge/index.js +4 -4
- package/lib/module/components/badge/index.js.map +1 -1
- package/lib/module/components/bar-chart/index.js +197 -56
- package/lib/module/components/bar-chart/index.js.map +1 -1
- package/lib/module/components/bottom-sheet/index.js +15 -10
- package/lib/module/components/bottom-sheet/index.js.map +1 -1
- package/lib/module/components/breadcrumb/index.js +6 -6
- package/lib/module/components/breadcrumb/index.js.map +1 -1
- package/lib/module/components/button/index.js +11 -6
- package/lib/module/components/button/index.js.map +1 -1
- package/lib/module/components/calendar/index.js +557 -0
- package/lib/module/components/calendar/index.js.map +1 -0
- package/lib/module/components/carousel/index.js +680 -0
- package/lib/module/components/carousel/index.js.map +1 -0
- package/lib/module/components/chip/index.js +4 -4
- package/lib/module/components/chip/index.js.map +1 -1
- package/lib/module/components/date-picker/index.js +158 -0
- package/lib/module/components/date-picker/index.js.map +1 -0
- package/lib/module/components/dialog/index.js +7 -2
- package/lib/module/components/dialog/index.js.map +1 -1
- package/lib/module/components/direction/index.js +2 -1
- package/lib/module/components/direction/index.js.map +1 -1
- package/lib/module/components/empty-state/index.js +2 -2
- package/lib/module/components/empty-state/index.js.map +1 -1
- package/lib/module/components/field/index.js +5 -5
- package/lib/module/components/field/index.js.map +1 -1
- package/lib/module/components/flow/index.js +3 -3
- package/lib/module/components/flow/index.js.map +1 -1
- package/lib/module/components/frame/index.js +5 -5
- package/lib/module/components/frame/index.js.map +1 -1
- package/lib/module/components/input-group/index.js +3 -2
- package/lib/module/components/input-group/index.js.map +1 -1
- package/lib/module/components/item/index.js +9 -9
- package/lib/module/components/item/index.js.map +1 -1
- package/lib/module/components/label/index.js +4 -4
- package/lib/module/components/label/index.js.map +1 -1
- package/lib/module/components/line-chart/index.js +167 -44
- package/lib/module/components/line-chart/index.js.map +1 -1
- package/lib/module/components/map/index.js +7 -7
- package/lib/module/components/map/index.js.map +1 -1
- package/lib/module/components/marker/index.js +3 -3
- package/lib/module/components/marker/index.js.map +1 -1
- package/lib/module/components/message/index.js +7 -7
- package/lib/module/components/message/index.js.map +1 -1
- package/lib/module/components/message-scroller/index.js +5 -4
- package/lib/module/components/message-scroller/index.js.map +1 -1
- package/lib/module/components/popover/index.js +39 -7
- package/lib/module/components/popover/index.js.map +1 -1
- package/lib/module/components/radio-group/index.js +2 -2
- package/lib/module/components/radio-group/index.js.map +1 -1
- package/lib/module/components/section-rail/index.js +4 -4
- package/lib/module/components/section-rail/index.js.map +1 -1
- package/lib/module/components/select/index.js +10 -4
- package/lib/module/components/select/index.js.map +1 -1
- package/lib/module/components/steps/index.js +4 -4
- package/lib/module/components/steps/index.js.map +1 -1
- package/lib/module/components/tabs/index.js +7 -7
- package/lib/module/components/tabs/index.js.map +1 -1
- package/lib/module/components/timeline/index.js +4 -4
- package/lib/module/components/timeline/index.js.map +1 -1
- package/lib/module/components/toast/index.js +2 -2
- package/lib/module/components/toast/index.js.map +1 -1
- package/lib/module/components/toggle-button/index.js +5 -5
- package/lib/module/components/toggle-button/index.js.map +1 -1
- package/lib/module/components/tooltip/index.js +492 -0
- package/lib/module/components/tooltip/index.js.map +1 -0
- package/lib/module/components/typography/index.js +2 -2
- package/lib/module/components/typography/index.js.map +1 -1
- package/lib/module/hooks/index.js +1 -0
- package/lib/module/hooks/index.js.map +1 -1
- package/lib/module/hooks/use-back-handler.js +37 -0
- package/lib/module/hooks/use-back-handler.js.map +1 -0
- package/lib/module/icons/index.js +63 -0
- package/lib/module/icons/index.js.map +1 -1
- package/lib/module/index.js +5 -1
- package/lib/module/index.js.map +1 -1
- package/lib/module/primitives/keyboard-avoider.js +2 -1
- package/lib/module/primitives/keyboard-avoider.js.map +1 -1
- package/lib/module/primitives/text.js +25 -1
- package/lib/module/primitives/text.js.map +1 -1
- package/lib/module/utils/date.js +386 -0
- package/lib/module/utils/date.js.map +1 -0
- package/lib/typescript/src/components/accordion/index.d.ts.map +1 -1
- package/lib/typescript/src/components/alert/index.d.ts.map +1 -1
- package/lib/typescript/src/components/area-chart/index.d.ts +41 -1
- package/lib/typescript/src/components/area-chart/index.d.ts.map +1 -1
- package/lib/typescript/src/components/attachment/index.d.ts.map +1 -1
- package/lib/typescript/src/components/bar-chart/index.d.ts +44 -2
- package/lib/typescript/src/components/bar-chart/index.d.ts.map +1 -1
- package/lib/typescript/src/components/bottom-sheet/index.d.ts.map +1 -1
- package/lib/typescript/src/components/breadcrumb/index.d.ts.map +1 -1
- package/lib/typescript/src/components/button/index.d.ts.map +1 -1
- package/lib/typescript/src/components/calendar/index.d.ts +108 -0
- package/lib/typescript/src/components/calendar/index.d.ts.map +1 -0
- package/lib/typescript/src/components/carousel/index.d.ts +179 -0
- package/lib/typescript/src/components/carousel/index.d.ts.map +1 -0
- package/lib/typescript/src/components/chip/index.d.ts.map +1 -1
- package/lib/typescript/src/components/date-picker/index.d.ts +91 -0
- package/lib/typescript/src/components/date-picker/index.d.ts.map +1 -0
- package/lib/typescript/src/components/dialog/index.d.ts.map +1 -1
- package/lib/typescript/src/components/direction/index.d.ts.map +1 -1
- package/lib/typescript/src/components/empty-state/index.d.ts.map +1 -1
- package/lib/typescript/src/components/field/index.d.ts.map +1 -1
- package/lib/typescript/src/components/frame/index.d.ts.map +1 -1
- package/lib/typescript/src/components/input-group/index.d.ts.map +1 -1
- package/lib/typescript/src/components/item/index.d.ts.map +1 -1
- package/lib/typescript/src/components/label/index.d.ts.map +1 -1
- package/lib/typescript/src/components/line-chart/index.d.ts +41 -2
- package/lib/typescript/src/components/line-chart/index.d.ts.map +1 -1
- package/lib/typescript/src/components/map/index.d.ts.map +1 -1
- package/lib/typescript/src/components/marker/index.d.ts.map +1 -1
- package/lib/typescript/src/components/message/index.d.ts.map +1 -1
- package/lib/typescript/src/components/message-scroller/index.d.ts.map +1 -1
- package/lib/typescript/src/components/popover/index.d.ts.map +1 -1
- package/lib/typescript/src/components/select/index.d.ts.map +1 -1
- package/lib/typescript/src/components/steps/index.d.ts.map +1 -1
- package/lib/typescript/src/components/tabs/index.d.ts.map +1 -1
- package/lib/typescript/src/components/timeline/index.d.ts.map +1 -1
- package/lib/typescript/src/components/toast/index.d.ts.map +1 -1
- package/lib/typescript/src/components/toggle-button/index.d.ts.map +1 -1
- package/lib/typescript/src/components/tooltip/index.d.ts +125 -0
- package/lib/typescript/src/components/tooltip/index.d.ts.map +1 -0
- package/lib/typescript/src/components/typography/index.d.ts.map +1 -1
- package/lib/typescript/src/hooks/index.d.ts +1 -0
- package/lib/typescript/src/hooks/index.d.ts.map +1 -1
- package/lib/typescript/src/hooks/use-back-handler.d.ts +19 -0
- package/lib/typescript/src/hooks/use-back-handler.d.ts.map +1 -0
- package/lib/typescript/src/icons/index.d.ts +3 -0
- package/lib/typescript/src/icons/index.d.ts.map +1 -1
- package/lib/typescript/src/index.d.ts +8 -4
- package/lib/typescript/src/index.d.ts.map +1 -1
- package/lib/typescript/src/primitives/keyboard-avoider.d.ts.map +1 -1
- package/lib/typescript/src/primitives/text.d.ts +20 -0
- package/lib/typescript/src/primitives/text.d.ts.map +1 -1
- package/lib/typescript/src/utils/date.d.ts +116 -0
- package/lib/typescript/src/utils/date.d.ts.map +1 -0
- package/package.json +1 -1
- package/src/components/accordion/index.tsx +8 -12
- package/src/components/alert/index.tsx +2 -2
- package/src/components/area-chart/index.tsx +208 -55
- package/src/components/attachment/index.tsx +2 -2
- package/src/components/avatar/index.tsx +3 -3
- package/src/components/badge/index.tsx +6 -6
- package/src/components/bar-chart/index.tsx +214 -54
- package/src/components/bottom-sheet/index.tsx +17 -16
- package/src/components/breadcrumb/index.tsx +6 -8
- package/src/components/button/index.tsx +12 -8
- package/src/components/calendar/index.tsx +703 -0
- package/src/components/carousel/index.tsx +788 -0
- package/src/components/chip/index.tsx +4 -6
- package/src/components/date-picker/index.tsx +237 -0
- package/src/components/dialog/index.tsx +7 -2
- package/src/components/direction/index.tsx +2 -1
- package/src/components/empty-state/index.tsx +2 -2
- package/src/components/field/index.tsx +3 -5
- package/src/components/flow/index.tsx +3 -3
- package/src/components/frame/index.tsx +5 -7
- package/src/components/input-group/index.tsx +3 -2
- package/src/components/item/index.tsx +9 -9
- package/src/components/label/index.tsx +2 -2
- package/src/components/line-chart/index.tsx +189 -50
- package/src/components/map/index.tsx +7 -9
- package/src/components/marker/index.tsx +3 -3
- package/src/components/message/index.tsx +7 -7
- package/src/components/message-scroller/index.tsx +5 -4
- package/src/components/popover/index.tsx +43 -7
- package/src/components/radio-group/index.tsx +2 -2
- package/src/components/section-rail/index.tsx +4 -4
- package/src/components/select/index.tsx +10 -4
- package/src/components/steps/index.tsx +4 -4
- package/src/components/tabs/index.tsx +7 -9
- package/src/components/timeline/index.tsx +4 -4
- package/src/components/toast/index.tsx +2 -2
- package/src/components/toggle-button/index.tsx +5 -7
- package/src/components/tooltip/index.tsx +610 -0
- package/src/components/typography/index.tsx +2 -2
- package/src/hooks/index.ts +1 -0
- package/src/hooks/use-back-handler.ts +37 -0
- package/src/icons/index.tsx +45 -0
- package/src/index.ts +45 -0
- package/src/primitives/keyboard-avoider.tsx +2 -1
- package/src/primitives/text.tsx +28 -1
- package/src/utils/date.ts +446 -0
|
@@ -0,0 +1,557 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Calendar — a month of days, for picking one, several, or a range.
|
|
5
|
+
*
|
|
6
|
+
* ```tsx
|
|
7
|
+
* const [day, setDay] = useState<Date>();
|
|
8
|
+
*
|
|
9
|
+
* <Calendar mode="single" selected={day} onSelect={setDay} />
|
|
10
|
+
* ```
|
|
11
|
+
*
|
|
12
|
+
* ## The grid is always six weeks
|
|
13
|
+
*
|
|
14
|
+
* A month needs five rows or six depending on what day it starts on. Drawing
|
|
15
|
+
* only the rows a month uses makes the calendar change height as it is paged
|
|
16
|
+
* through — everything below it jumps, and the days themselves appear to shift
|
|
17
|
+
* between months. So the grid is six rows always, and the spare cells hold the
|
|
18
|
+
* neighbouring months' days.
|
|
19
|
+
*
|
|
20
|
+
* ## Why a range is drawn in three pieces
|
|
21
|
+
*
|
|
22
|
+
* On the web the band under a selected range is one background with the ends
|
|
23
|
+
* rounded by `:first-child` and `:last-child`. There are no pseudo-classes
|
|
24
|
+
* here, so each day works out for itself whether it is a start, a middle or an
|
|
25
|
+
* end — and, separately, whether it is at the edge of its own row, because a
|
|
26
|
+
* range that runs over a weekend has to close off on Saturday and open again
|
|
27
|
+
* on Sunday rather than trailing into the gap.
|
|
28
|
+
*
|
|
29
|
+
* Every cell therefore draws its band as a view *behind* the number, sized and
|
|
30
|
+
* rounded from those flags, rather than as a background on the cell itself.
|
|
31
|
+
*/
|
|
32
|
+
import { createContext, useCallback, useContext, useMemo, useState } from 'react';
|
|
33
|
+
import { Pressable, View } from 'react-native';
|
|
34
|
+
import { tv } from 'tailwind-variants';
|
|
35
|
+
import { ChevronLeftIcon, ChevronRightIcon } from "../../icons/index.js";
|
|
36
|
+
import { Text } from "../../primitives/text.js";
|
|
37
|
+
import { cn } from "../../utils/cn.js";
|
|
38
|
+
import { addCalendarMonths, addDays, calendarDayNumber, calendarLongDate, calendarMonthLabel, calendarMonthNames, calendarParts, isAfter, isBefore, isSameCalendarMonth, isSameDay, isWithin, resolveCalendar, startOfCalendarMonth, startOfDay, weekdayNames } from "../../utils/date.js";
|
|
39
|
+
|
|
40
|
+
/** A range under construction: `to` is undefined between the two taps. */
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* What a `mode` selects. Written as a map so the root, the parts and the
|
|
44
|
+
* caller all read the same association rather than each casting their own way.
|
|
45
|
+
*/
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* Which days cannot be picked. A list, a span, or a rule — a rule because
|
|
49
|
+
* "no weekends" and "not in the past" are the two most common cases and
|
|
50
|
+
* neither can be written as a list that stays right tomorrow.
|
|
51
|
+
*/
|
|
52
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
53
|
+
const dayVariants = tv({
|
|
54
|
+
slots: {
|
|
55
|
+
cell: 'flex-1 items-center justify-center',
|
|
56
|
+
/** The range band, drawn behind the number so it can run cell to cell. */
|
|
57
|
+
band: 'absolute inset-y-1',
|
|
58
|
+
/** The circle on a selected day, or the ring on today. */
|
|
59
|
+
disc: 'h-9 w-9 items-center justify-center rounded-full',
|
|
60
|
+
label: ''
|
|
61
|
+
},
|
|
62
|
+
variants: {
|
|
63
|
+
selected: {
|
|
64
|
+
true: {
|
|
65
|
+
disc: 'bg-primary',
|
|
66
|
+
label: 'text-primary-foreground'
|
|
67
|
+
}
|
|
68
|
+
},
|
|
69
|
+
today: {
|
|
70
|
+
true: {
|
|
71
|
+
disc: 'border border-primary',
|
|
72
|
+
label: 'text-primary'
|
|
73
|
+
}
|
|
74
|
+
},
|
|
75
|
+
outside: {
|
|
76
|
+
true: {
|
|
77
|
+
label: 'text-muted-foreground/40'
|
|
78
|
+
}
|
|
79
|
+
},
|
|
80
|
+
disabled: {
|
|
81
|
+
true: {
|
|
82
|
+
label: 'text-muted-foreground/30'
|
|
83
|
+
}
|
|
84
|
+
},
|
|
85
|
+
inRange: {
|
|
86
|
+
true: {
|
|
87
|
+
band: 'bg-accent'
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
},
|
|
91
|
+
compoundVariants: [
|
|
92
|
+
// A selected day inside a range keeps the solid disc; the band passes
|
|
93
|
+
// under it rather than the disc losing to it.
|
|
94
|
+
{
|
|
95
|
+
selected: true,
|
|
96
|
+
today: true,
|
|
97
|
+
class: {
|
|
98
|
+
label: 'text-primary-foreground'
|
|
99
|
+
}
|
|
100
|
+
}]
|
|
101
|
+
});
|
|
102
|
+
const CalendarContext = /*#__PURE__*/createContext(null);
|
|
103
|
+
function useCalendar(component) {
|
|
104
|
+
const context = useContext(CalendarContext);
|
|
105
|
+
if (!context) {
|
|
106
|
+
throw new Error(`${component} must be used within a <Calendar>`);
|
|
107
|
+
}
|
|
108
|
+
return context;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
/** Whether a rule, a list or a span rules this day out. */
|
|
112
|
+
function isDisabled(date, disabled, minDate, maxDate) {
|
|
113
|
+
if (minDate && isBefore(date, minDate)) return true;
|
|
114
|
+
if (maxDate && isAfter(date, maxDate)) return true;
|
|
115
|
+
if (!disabled) return false;
|
|
116
|
+
if (typeof disabled === 'function') return disabled(date);
|
|
117
|
+
if (Array.isArray(disabled)) return disabled.some(day => isSameDay(day, date));
|
|
118
|
+
return isWithin(date, disabled.from, disabled.to);
|
|
119
|
+
}
|
|
120
|
+
function CalendarRoot({
|
|
121
|
+
className,
|
|
122
|
+
mode = 'single',
|
|
123
|
+
selected,
|
|
124
|
+
defaultSelected,
|
|
125
|
+
onSelect,
|
|
126
|
+
month: monthProp,
|
|
127
|
+
defaultMonth,
|
|
128
|
+
onMonthChange,
|
|
129
|
+
numberOfMonths = 1,
|
|
130
|
+
captionLayout = 'label',
|
|
131
|
+
disabled,
|
|
132
|
+
minDate,
|
|
133
|
+
maxDate,
|
|
134
|
+
weekStartsOn = 0,
|
|
135
|
+
showOutsideDays = true,
|
|
136
|
+
locale,
|
|
137
|
+
calendar = 'gregory',
|
|
138
|
+
...props
|
|
139
|
+
}) {
|
|
140
|
+
// Settled once here rather than at each call site, so every part of the
|
|
141
|
+
// grid is certainly reading the same calendar.
|
|
142
|
+
const system = useMemo(() => resolveCalendar(calendar, locale), [calendar, locale]);
|
|
143
|
+
const [internalSelected, setInternalSelected] = useState(defaultSelected);
|
|
144
|
+
const isControlled = selected !== undefined;
|
|
145
|
+
const value = isControlled ? selected : internalSelected;
|
|
146
|
+
|
|
147
|
+
/**
|
|
148
|
+
* The month to open on: whatever is selected, so a picker reopened on a date
|
|
149
|
+
* chosen last year does not land on today and make it look unselected.
|
|
150
|
+
*/
|
|
151
|
+
const initialMonth = useMemo(() => {
|
|
152
|
+
if (defaultMonth) return startOfCalendarMonth(defaultMonth, system, locale);
|
|
153
|
+
const first = value instanceof Date ? value : Array.isArray(value) ? value[0] : value && typeof value === 'object' && 'from' in value ? value.from : undefined;
|
|
154
|
+
return startOfCalendarMonth(first ?? new Date(), system, locale);
|
|
155
|
+
// Only the first render decides this; after that the month is its own state.
|
|
156
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
157
|
+
}, []);
|
|
158
|
+
const [internalMonth, setInternalMonth] = useState(initialMonth);
|
|
159
|
+
const month = monthProp ? startOfCalendarMonth(monthProp, system, locale) : internalMonth;
|
|
160
|
+
const setMonth = useCallback(next => {
|
|
161
|
+
const settled = startOfCalendarMonth(next, system, locale);
|
|
162
|
+
if (!monthProp) setInternalMonth(settled);
|
|
163
|
+
onMonthChange?.(settled);
|
|
164
|
+
}, [monthProp, onMonthChange, system, locale]);
|
|
165
|
+
const commit = useCallback(next => {
|
|
166
|
+
if (!isControlled) setInternalSelected(next);
|
|
167
|
+
onSelect?.(next);
|
|
168
|
+
}, [isControlled, onSelect]);
|
|
169
|
+
const select = useCallback(date => {
|
|
170
|
+
const day = startOfDay(date);
|
|
171
|
+
if (mode === 'multiple') {
|
|
172
|
+
const current = value ?? [];
|
|
173
|
+
const without = current.filter(picked => !isSameDay(picked, day));
|
|
174
|
+
const next = without.length === current.length ? [...current, day] : without;
|
|
175
|
+
commit(next);
|
|
176
|
+
return;
|
|
177
|
+
}
|
|
178
|
+
if (mode === 'range') {
|
|
179
|
+
const current = value;
|
|
180
|
+
/*
|
|
181
|
+
* Three states, not two: no range, half a range, a whole range. A tap
|
|
182
|
+
* with half a range open closes it — unless it landed before the open
|
|
183
|
+
* end, in which case it becomes the new start. Anything else would ask
|
|
184
|
+
* someone who picked the wrong month first to undo before retrying.
|
|
185
|
+
*/
|
|
186
|
+
if (!current || current.to || isBefore(day, current.from)) {
|
|
187
|
+
commit({
|
|
188
|
+
from: day
|
|
189
|
+
});
|
|
190
|
+
} else {
|
|
191
|
+
commit({
|
|
192
|
+
from: current.from,
|
|
193
|
+
to: day
|
|
194
|
+
});
|
|
195
|
+
}
|
|
196
|
+
return;
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
// Single. Tapping the selected day again clears it.
|
|
200
|
+
const current = value;
|
|
201
|
+
commit(isSameDay(current, day) ? undefined : day);
|
|
202
|
+
}, [mode, value, commit]);
|
|
203
|
+
const context = useMemo(() => ({
|
|
204
|
+
month,
|
|
205
|
+
setMonth,
|
|
206
|
+
locale,
|
|
207
|
+
system,
|
|
208
|
+
minDate,
|
|
209
|
+
maxDate,
|
|
210
|
+
captionLayout
|
|
211
|
+
}), [month, setMonth, locale, system, minDate, maxDate, captionLayout]);
|
|
212
|
+
return /*#__PURE__*/_jsx(CalendarContext.Provider, {
|
|
213
|
+
value: context,
|
|
214
|
+
children: /*#__PURE__*/_jsx(View, {
|
|
215
|
+
...props,
|
|
216
|
+
className: cn('gap-4', className),
|
|
217
|
+
children: Array.from({
|
|
218
|
+
length: Math.max(1, numberOfMonths)
|
|
219
|
+
}, (_unused, offset) => /*#__PURE__*/_jsxs(View, {
|
|
220
|
+
className: "gap-2",
|
|
221
|
+
children: [/*#__PURE__*/_jsx(CalendarCaption, {
|
|
222
|
+
offset: offset,
|
|
223
|
+
lastOffset: numberOfMonths - 1
|
|
224
|
+
}), /*#__PURE__*/_jsx(CalendarGrid, {
|
|
225
|
+
month: addCalendarMonths(month, offset, system, locale),
|
|
226
|
+
mode: mode,
|
|
227
|
+
value: value,
|
|
228
|
+
onSelect: select,
|
|
229
|
+
disabled: disabled,
|
|
230
|
+
minDate: minDate,
|
|
231
|
+
maxDate: maxDate,
|
|
232
|
+
weekStartsOn: weekStartsOn,
|
|
233
|
+
showOutsideDays: showOutsideDays,
|
|
234
|
+
locale: locale,
|
|
235
|
+
system: system
|
|
236
|
+
})]
|
|
237
|
+
}, offset))
|
|
238
|
+
})
|
|
239
|
+
});
|
|
240
|
+
}
|
|
241
|
+
CalendarRoot.displayName = 'Calendar';
|
|
242
|
+
|
|
243
|
+
/* -------------------------------------------------------------------------- */
|
|
244
|
+
/* Caption */
|
|
245
|
+
/* -------------------------------------------------------------------------- */
|
|
246
|
+
|
|
247
|
+
/**
|
|
248
|
+
* The month name and the arrows, or the month and year pickers.
|
|
249
|
+
*
|
|
250
|
+
* With several months shown the arrows are split across the row — back on the
|
|
251
|
+
* first, forward on the last — because both sets on both captions would page
|
|
252
|
+
* the whole run and give two ways to do one thing.
|
|
253
|
+
*/
|
|
254
|
+
function CalendarCaption({
|
|
255
|
+
offset,
|
|
256
|
+
lastOffset
|
|
257
|
+
}) {
|
|
258
|
+
const {
|
|
259
|
+
month,
|
|
260
|
+
setMonth,
|
|
261
|
+
locale,
|
|
262
|
+
system,
|
|
263
|
+
minDate,
|
|
264
|
+
maxDate,
|
|
265
|
+
captionLayout
|
|
266
|
+
} = useCalendar('Calendar.Caption');
|
|
267
|
+
const shown = addCalendarMonths(month, offset, system, locale);
|
|
268
|
+
const canGoBack = !minDate || isBefore(startOfCalendarMonth(minDate, system, locale), month);
|
|
269
|
+
const canGoForward = !maxDate || isAfter(startOfCalendarMonth(maxDate, system, locale), shown);
|
|
270
|
+
return /*#__PURE__*/_jsxs(View, {
|
|
271
|
+
className: "h-9 flex-row items-center justify-between",
|
|
272
|
+
children: [offset === 0 ? /*#__PURE__*/_jsx(CalendarNav, {
|
|
273
|
+
direction: "previous",
|
|
274
|
+
disabled: !canGoBack,
|
|
275
|
+
onPress: () => setMonth(addCalendarMonths(month, -1, system, locale))
|
|
276
|
+
}) : /*#__PURE__*/_jsx(View, {
|
|
277
|
+
className: "h-7 w-7"
|
|
278
|
+
}), captionLayout === 'dropdown' ? /*#__PURE__*/_jsx(CalendarDropdowns, {
|
|
279
|
+
month: shown,
|
|
280
|
+
offset: offset
|
|
281
|
+
}) : /*#__PURE__*/_jsx(Text, {
|
|
282
|
+
weight: "semibold",
|
|
283
|
+
children: calendarMonthLabel(shown, system, locale)
|
|
284
|
+
}), offset === lastOffset ? /*#__PURE__*/_jsx(CalendarNav, {
|
|
285
|
+
direction: "next",
|
|
286
|
+
disabled: !canGoForward,
|
|
287
|
+
onPress: () => setMonth(addCalendarMonths(month, 1, system, locale))
|
|
288
|
+
}) : /*#__PURE__*/_jsx(View, {
|
|
289
|
+
className: "h-7 w-7"
|
|
290
|
+
})]
|
|
291
|
+
});
|
|
292
|
+
}
|
|
293
|
+
function CalendarNav({
|
|
294
|
+
direction,
|
|
295
|
+
disabled,
|
|
296
|
+
onPress
|
|
297
|
+
}) {
|
|
298
|
+
return /*#__PURE__*/_jsx(Pressable, {
|
|
299
|
+
disabled: disabled,
|
|
300
|
+
onPress: onPress,
|
|
301
|
+
hitSlop: 8,
|
|
302
|
+
accessibilityRole: "button",
|
|
303
|
+
accessibilityLabel: direction === 'next' ? 'Next month' : 'Previous month',
|
|
304
|
+
accessibilityState: {
|
|
305
|
+
disabled
|
|
306
|
+
},
|
|
307
|
+
className: cn('h-7 w-7 items-center justify-center rounded-md border border-border', disabled ? 'opacity-40' : 'active:bg-accent'),
|
|
308
|
+
children: direction === 'next' ? /*#__PURE__*/_jsx(ChevronRightIcon, {
|
|
309
|
+
size: 16
|
|
310
|
+
}) : /*#__PURE__*/_jsx(ChevronLeftIcon, {
|
|
311
|
+
size: 16
|
|
312
|
+
})
|
|
313
|
+
});
|
|
314
|
+
}
|
|
315
|
+
|
|
316
|
+
/**
|
|
317
|
+
* Month and year as two rows of chips rather than as native pickers.
|
|
318
|
+
*
|
|
319
|
+
* A picker is a platform overlay, and putting one on top of a calendar that is
|
|
320
|
+
* itself already inside a popover is two floating layers deep for choosing a
|
|
321
|
+
* number. Chips stay on the surface the choice is being made on.
|
|
322
|
+
*/
|
|
323
|
+
function CalendarDropdowns({
|
|
324
|
+
month,
|
|
325
|
+
offset
|
|
326
|
+
}) {
|
|
327
|
+
const {
|
|
328
|
+
setMonth,
|
|
329
|
+
locale,
|
|
330
|
+
system,
|
|
331
|
+
minDate,
|
|
332
|
+
maxDate
|
|
333
|
+
} = useCalendar('Calendar.Caption');
|
|
334
|
+
const [open, setOpen] = useState(null);
|
|
335
|
+
|
|
336
|
+
/*
|
|
337
|
+
* Everything here counts in the calendar on screen, not in the platform's.
|
|
338
|
+
* The names come from a real year of that calendar rather than from twelve
|
|
339
|
+
* Gregorian firsts, and the year list is that calendar's years — a Hijri
|
|
340
|
+
* caption offering Gregorian years is choosing from the wrong set.
|
|
341
|
+
*/
|
|
342
|
+
const months = useMemo(() => calendarMonthNames(month, system, locale, 'short'), [month, system, locale]);
|
|
343
|
+
const current = calendarParts(month, system, locale);
|
|
344
|
+
const bounds = {
|
|
345
|
+
from: minDate ? calendarParts(minDate, system, locale).year : current.year - 100,
|
|
346
|
+
to: maxDate ? calendarParts(maxDate, system, locale).year : current.year + 10
|
|
347
|
+
};
|
|
348
|
+
const years = Array.from({
|
|
349
|
+
length: Math.max(1, bounds.to - bounds.from + 1)
|
|
350
|
+
}, (_unused, index) => bounds.from + index);
|
|
351
|
+
|
|
352
|
+
/*
|
|
353
|
+
* Navigated by months rather than by building a date, because there is no
|
|
354
|
+
* `new Date(hijriYear, hijriMonth)`. A Hijri year is always twelve months,
|
|
355
|
+
* so a year jump is twelve of them.
|
|
356
|
+
*/
|
|
357
|
+
const choose = months_ => {
|
|
358
|
+
setMonth(addCalendarMonths(month, months_ - offset, system, locale));
|
|
359
|
+
setOpen(null);
|
|
360
|
+
};
|
|
361
|
+
return /*#__PURE__*/_jsxs(View, {
|
|
362
|
+
className: "flex-1 items-center",
|
|
363
|
+
children: [/*#__PURE__*/_jsxs(View, {
|
|
364
|
+
className: "flex-row items-center gap-1",
|
|
365
|
+
children: [/*#__PURE__*/_jsx(CaptionChip, {
|
|
366
|
+
label: months[current.month - 1] ?? String(current.month),
|
|
367
|
+
expanded: open === 'month',
|
|
368
|
+
onPress: () => setOpen(open === 'month' ? null : 'month')
|
|
369
|
+
}), /*#__PURE__*/_jsx(CaptionChip, {
|
|
370
|
+
label: String(current.year),
|
|
371
|
+
expanded: open === 'year',
|
|
372
|
+
onPress: () => setOpen(open === 'year' ? null : 'year')
|
|
373
|
+
})]
|
|
374
|
+
}), open ? /*#__PURE__*/_jsx(View, {
|
|
375
|
+
className: "mt-2 max-h-40 w-full flex-row flex-wrap justify-center gap-1 rounded-lg border border-border bg-popover p-2",
|
|
376
|
+
children: (open === 'month' ? months : years.map(String)).map((option, index) => {
|
|
377
|
+
const active = open === 'month' ? index === current.month - 1 : years[index] === current.year;
|
|
378
|
+
return /*#__PURE__*/_jsx(Pressable, {
|
|
379
|
+
onPress: () => choose(open === 'month' ? index - (current.month - 1) : (years[index] - current.year) * 12),
|
|
380
|
+
accessibilityRole: "button",
|
|
381
|
+
accessibilityState: {
|
|
382
|
+
selected: active
|
|
383
|
+
},
|
|
384
|
+
className: cn('rounded-md px-2.5 py-1.5', active ? 'bg-primary' : 'active:bg-accent'),
|
|
385
|
+
children: /*#__PURE__*/_jsx(Text, {
|
|
386
|
+
size: "sm",
|
|
387
|
+
className: active ? 'text-primary-foreground' : undefined,
|
|
388
|
+
children: option
|
|
389
|
+
})
|
|
390
|
+
}, option);
|
|
391
|
+
})
|
|
392
|
+
}) : null]
|
|
393
|
+
});
|
|
394
|
+
}
|
|
395
|
+
function CaptionChip({
|
|
396
|
+
label,
|
|
397
|
+
expanded,
|
|
398
|
+
onPress
|
|
399
|
+
}) {
|
|
400
|
+
return /*#__PURE__*/_jsx(Pressable, {
|
|
401
|
+
onPress: onPress,
|
|
402
|
+
accessibilityRole: "button",
|
|
403
|
+
accessibilityState: {
|
|
404
|
+
expanded
|
|
405
|
+
},
|
|
406
|
+
className: "flex-row items-center gap-1 rounded-md px-2 py-1 active:bg-accent",
|
|
407
|
+
children: /*#__PURE__*/_jsx(Text, {
|
|
408
|
+
weight: "semibold",
|
|
409
|
+
children: label
|
|
410
|
+
})
|
|
411
|
+
});
|
|
412
|
+
}
|
|
413
|
+
|
|
414
|
+
/* -------------------------------------------------------------------------- */
|
|
415
|
+
/* Grid */
|
|
416
|
+
/* -------------------------------------------------------------------------- */
|
|
417
|
+
|
|
418
|
+
function CalendarGrid({
|
|
419
|
+
month,
|
|
420
|
+
mode,
|
|
421
|
+
value,
|
|
422
|
+
onSelect,
|
|
423
|
+
disabled,
|
|
424
|
+
minDate,
|
|
425
|
+
maxDate,
|
|
426
|
+
weekStartsOn,
|
|
427
|
+
showOutsideDays,
|
|
428
|
+
locale,
|
|
429
|
+
system
|
|
430
|
+
}) {
|
|
431
|
+
/*
|
|
432
|
+
* Six rows of consecutive days, anchored on the first of *this* calendar's
|
|
433
|
+
* month. Weekdays are shared between the two calendars — only the month
|
|
434
|
+
* boundaries and the day numbers differ — so the walk itself is the same
|
|
435
|
+
* either way and only where it starts moves.
|
|
436
|
+
*/
|
|
437
|
+
const weeks = useMemo(() => {
|
|
438
|
+
const first = startOfCalendarMonth(month, system, locale);
|
|
439
|
+
const lead = (first.getDay() - weekStartsOn + 7) % 7;
|
|
440
|
+
const start = addDays(first, -lead);
|
|
441
|
+
return Array.from({
|
|
442
|
+
length: 6
|
|
443
|
+
}, (_unusedWeek, week) => Array.from({
|
|
444
|
+
length: 7
|
|
445
|
+
}, (_unusedDay, day) => addDays(start, week * 7 + day)));
|
|
446
|
+
}, [month, weekStartsOn, system, locale]);
|
|
447
|
+
const headings = useMemo(() => weekdayNames(locale, weekStartsOn), [locale, weekStartsOn]);
|
|
448
|
+
const today = startOfDay(new Date());
|
|
449
|
+
const range = mode === 'range' ? value : undefined;
|
|
450
|
+
const multiple = mode === 'multiple' ? value ?? [] : [];
|
|
451
|
+
const single = mode === 'single' ? value : undefined;
|
|
452
|
+
return (
|
|
453
|
+
/*#__PURE__*/
|
|
454
|
+
// React Native has no `grid` role, so the month announces itself as a list
|
|
455
|
+
// of days and each day carries its own full date as its label.
|
|
456
|
+
_jsxs(View, {
|
|
457
|
+
accessibilityRole: "list",
|
|
458
|
+
className: "gap-1",
|
|
459
|
+
children: [/*#__PURE__*/_jsx(View, {
|
|
460
|
+
className: "flex-row",
|
|
461
|
+
children: headings.map(heading => /*#__PURE__*/_jsx(Text, {
|
|
462
|
+
size: "xs",
|
|
463
|
+
muted: true,
|
|
464
|
+
className: "flex-1 text-center",
|
|
465
|
+
children: heading
|
|
466
|
+
}, heading))
|
|
467
|
+
}), weeks.map((week, weekIndex) => /*#__PURE__*/_jsx(View, {
|
|
468
|
+
className: "flex-row",
|
|
469
|
+
children: week.map((date, dayIndex) => {
|
|
470
|
+
const outside = !isSameCalendarMonth(date, month, system, locale);
|
|
471
|
+
if (outside && !showOutsideDays) {
|
|
472
|
+
// A spacer, not nothing: the row has to stay seven wide or the
|
|
473
|
+
// columns stop lining up with their headings.
|
|
474
|
+
return /*#__PURE__*/_jsx(View, {
|
|
475
|
+
className: "h-10 flex-1"
|
|
476
|
+
}, dayIndex);
|
|
477
|
+
}
|
|
478
|
+
const selected = mode === 'range' ? isSameDay(date, range?.from) || isSameDay(date, range?.to) : mode === 'multiple' ? multiple.some(picked => isSameDay(picked, date)) : isSameDay(date, single);
|
|
479
|
+
|
|
480
|
+
// Between the ends, but not an end itself — the band, not the disc.
|
|
481
|
+
const inRange = !!range?.to && isWithin(date, range.from, range.to) && !selected;
|
|
482
|
+
return /*#__PURE__*/_jsx(CalendarDay, {
|
|
483
|
+
date: date,
|
|
484
|
+
outside: outside,
|
|
485
|
+
selected: selected,
|
|
486
|
+
inRange: inRange,
|
|
487
|
+
today: isSameDay(date, today),
|
|
488
|
+
disabled: isDisabled(date, disabled, minDate, maxDate)
|
|
489
|
+
// The band closes off at the edges of a row rather than
|
|
490
|
+
// trailing into the gap between weeks.
|
|
491
|
+
,
|
|
492
|
+
openStart: inRange && dayIndex > 0,
|
|
493
|
+
openEnd: inRange && dayIndex < 6,
|
|
494
|
+
locale: locale,
|
|
495
|
+
system: system,
|
|
496
|
+
onPress: () => onSelect(date)
|
|
497
|
+
}, dayIndex);
|
|
498
|
+
})
|
|
499
|
+
}, weekIndex))]
|
|
500
|
+
})
|
|
501
|
+
);
|
|
502
|
+
}
|
|
503
|
+
function CalendarDay({
|
|
504
|
+
date,
|
|
505
|
+
outside,
|
|
506
|
+
selected,
|
|
507
|
+
inRange,
|
|
508
|
+
today,
|
|
509
|
+
disabled,
|
|
510
|
+
openStart,
|
|
511
|
+
openEnd,
|
|
512
|
+
locale,
|
|
513
|
+
system,
|
|
514
|
+
onPress
|
|
515
|
+
}) {
|
|
516
|
+
const styles = dayVariants({
|
|
517
|
+
selected,
|
|
518
|
+
today: today && !selected,
|
|
519
|
+
outside,
|
|
520
|
+
disabled,
|
|
521
|
+
inRange
|
|
522
|
+
});
|
|
523
|
+
return /*#__PURE__*/_jsxs(Pressable, {
|
|
524
|
+
disabled: disabled,
|
|
525
|
+
onPress: onPress,
|
|
526
|
+
accessibilityRole: "button",
|
|
527
|
+
accessibilityLabel: calendarLongDate(date, system, locale),
|
|
528
|
+
accessibilityState: {
|
|
529
|
+
selected,
|
|
530
|
+
disabled
|
|
531
|
+
},
|
|
532
|
+
className: cn(styles.cell(), 'h-10'),
|
|
533
|
+
children: [inRange ? /*#__PURE__*/_jsx(View, {
|
|
534
|
+
className: cn(styles.band()),
|
|
535
|
+
style: {
|
|
536
|
+
left: openStart ? 0 : '10%',
|
|
537
|
+
right: openEnd ? 0 : '10%',
|
|
538
|
+
borderTopLeftRadius: openStart ? 0 : 999,
|
|
539
|
+
borderBottomLeftRadius: openStart ? 0 : 999,
|
|
540
|
+
borderTopRightRadius: openEnd ? 0 : 999,
|
|
541
|
+
borderBottomRightRadius: openEnd ? 0 : 999
|
|
542
|
+
}
|
|
543
|
+
}) : null, /*#__PURE__*/_jsx(View, {
|
|
544
|
+
className: cn(styles.disc()),
|
|
545
|
+
children: /*#__PURE__*/_jsx(Text, {
|
|
546
|
+
size: "sm",
|
|
547
|
+
className: cn(styles.label()),
|
|
548
|
+
children: calendarDayNumber(date, system, locale)
|
|
549
|
+
})
|
|
550
|
+
})]
|
|
551
|
+
});
|
|
552
|
+
}
|
|
553
|
+
export const Calendar = Object.assign(CalendarRoot, {
|
|
554
|
+
Grid: CalendarGrid,
|
|
555
|
+
Day: CalendarDay
|
|
556
|
+
});
|
|
557
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["createContext","useCallback","useContext","useMemo","useState","Pressable","View","tv","ChevronLeftIcon","ChevronRightIcon","Text","cn","addCalendarMonths","addDays","calendarDayNumber","calendarLongDate","calendarMonthLabel","calendarMonthNames","calendarParts","isAfter","isBefore","isSameCalendarMonth","isSameDay","isWithin","resolveCalendar","startOfCalendarMonth","startOfDay","weekdayNames","jsx","_jsx","jsxs","_jsxs","dayVariants","slots","cell","band","disc","label","variants","selected","true","today","outside","disabled","inRange","compoundVariants","class","CalendarContext","useCalendar","component","context","Error","isDisabled","date","minDate","maxDate","Array","isArray","some","day","from","to","CalendarRoot","className","mode","defaultSelected","onSelect","month","monthProp","defaultMonth","onMonthChange","numberOfMonths","captionLayout","weekStartsOn","showOutsideDays","locale","calendar","props","system","internalSelected","setInternalSelected","isControlled","undefined","value","initialMonth","first","Date","internalMonth","setInternalMonth","setMonth","next","settled","commit","select","current","without","filter","picked","length","Provider","children","Math","max","_unused","offset","CalendarCaption","lastOffset","CalendarGrid","displayName","shown","canGoBack","canGoForward","CalendarNav","direction","onPress","CalendarDropdowns","weight","hitSlop","accessibilityRole","accessibilityLabel","accessibilityState","size","open","setOpen","months","bounds","year","years","index","choose","months_","CaptionChip","String","expanded","map","option","active","weeks","lead","getDay","start","_unusedWeek","week","_unusedDay","headings","range","multiple","single","heading","muted","weekIndex","dayIndex","CalendarDay","openStart","openEnd","styles","style","left","right","borderTopLeftRadius","borderBottomLeftRadius","borderTopRightRadius","borderBottomRightRadius","Calendar","Object","assign","Grid","Day"],"sourceRoot":"../../../../src","sources":["components/calendar/index.tsx"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SACEA,aAAa,EACbC,WAAW,EACXC,UAAU,EACVC,OAAO,EACPC,QAAQ,QAEH,OAAO;AACd,SAASC,SAAS,EAAEC,IAAI,QAAwB,cAAc;AAC9D,SAASC,EAAE,QAAQ,mBAAmB;AACtC,SAASC,eAAe,EAAEC,gBAAgB,QAAQ,sBAAa;AAC/D,SAASC,IAAI,QAAQ,0BAAuB;AAC5C,SAASC,EAAE,QAAQ,mBAAgB;AACnC,SACEC,iBAAiB,EACjBC,OAAO,EACPC,iBAAiB,EACjBC,gBAAgB,EAChBC,kBAAkB,EAClBC,kBAAkB,EAClBC,aAAa,EACbC,OAAO,EACPC,QAAQ,EACRC,mBAAmB,EACnBC,SAAS,EACTC,QAAQ,EACRC,eAAe,EACfC,oBAAoB,EACpBC,UAAU,EACVC,YAAY,QAGP,qBAAkB;;AAKzB;;AAMA;AACA;AACA;AACA;;AAOA;AACA;AACA;AACA;AACA;AAJA,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAUA,MAAMC,WAAW,GAAGzB,EAAE,CAAC;EACrB0B,KAAK,EAAE;IACLC,IAAI,EAAE,oCAAoC;IAC1C;IACAC,IAAI,EAAE,oBAAoB;IAC1B;IACAC,IAAI,EAAE,kDAAkD;IACxDC,KAAK,EAAE;EACT,CAAC;EACDC,QAAQ,EAAE;IACRC,QAAQ,EAAE;MAAEC,IAAI,EAAE;QAAEJ,IAAI,EAAE,YAAY;QAAEC,KAAK,EAAE;MAA0B;IAAE,CAAC;IAC5EI,KAAK,E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