@igne-agency/react-web-ui 0.4.0 → 0.6.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/dist/base.css +3 -0
- package/dist/components/accordion/accordion.css +21 -21
- package/dist/components/accordion/accordion.d.ts +17 -4
- package/dist/components/accordion/accordion.js +83 -36
- package/dist/components/accordion/accordion.module.js +6 -6
- package/dist/components/attachment-tile/attachment-preview.d.ts +56 -13
- package/dist/components/attachment-tile/attachment-preview.js +388 -119
- package/dist/components/attachment-tile/attachment-tile.css +31 -25
- package/dist/components/attachment-tile/attachment-tile.d.ts +32 -10
- package/dist/components/attachment-tile/attachment-tile.js +160 -43
- package/dist/components/attachment-tile/attachment-tile.module.js +8 -8
- package/dist/components/attachment-tile/index.d.ts +1 -1
- package/dist/components/avatar/avatar.css +9 -9
- package/dist/components/avatar/avatar.d.ts +50 -5
- package/dist/components/avatar/avatar.js +178 -64
- package/dist/components/avatar/avatar.module.js +3 -3
- package/dist/components/avatar-group/avatar-group-context.d.ts +2 -4
- package/dist/components/avatar-group/avatar-group-context.js +2 -2
- package/dist/components/avatar-group/avatar-group.css +26 -20
- package/dist/components/avatar-group/avatar-group.d.ts +85 -27
- package/dist/components/avatar-group/avatar-group.js +400 -246
- package/dist/components/avatar-group/avatar-group.module.js +8 -8
- package/dist/components/breadcrumbs/breadcrumbs.css +12 -12
- package/dist/components/breadcrumbs/breadcrumbs.d.ts +69 -23
- package/dist/components/breadcrumbs/breadcrumbs.js +299 -248
- package/dist/components/breadcrumbs/breadcrumbs.module.js +8 -8
- package/dist/components/button/button.css +29 -31
- package/dist/components/button/button.d.ts +20 -16
- package/dist/components/button/button.js +140 -145
- package/dist/components/button/button.module.js +1 -1
- package/dist/components/button/index.js +1 -1
- package/dist/components/checkbox-field/checkbox-field.js +63 -49
- package/dist/components/checkbox-field/checkbox.css +105 -56
- package/dist/components/checkbox-field/checkbox.d.ts +3 -2
- package/dist/components/checkbox-field/checkbox.js +12 -9
- package/dist/components/checkbox-field/checkbox.module.js +4 -4
- package/dist/components/checkbox-group-field/checkbox-group-field.js +78 -72
- package/dist/components/checkbox-group-field/checkbox-group.css +14 -10
- package/dist/components/checkbox-group-field/checkbox-group.d.ts +2 -2
- package/dist/components/checkbox-group-field/checkbox-group.js +2 -2
- package/dist/components/checkbox-group-field/checkbox-group.module.js +2 -2
- package/dist/components/collapsible/collapsible.css +20 -20
- package/dist/components/collapsible/collapsible.d.ts +17 -4
- package/dist/components/collapsible/collapsible.js +83 -36
- package/dist/components/collapsible/collapsible.module.js +5 -5
- package/dist/components/combobox-field/combobox-field.js +206 -158
- package/dist/components/combobox-field/combobox.css +492 -277
- package/dist/components/combobox-field/combobox.d.ts +148 -39
- package/dist/components/combobox-field/combobox.js +506 -206
- package/dist/components/combobox-field/combobox.module.js +21 -21
- package/dist/components/combobox-field/value-state-view.css +5 -5
- package/dist/components/combobox-field/value-state-view.module.js +4 -4
- package/dist/components/composer/composer-attachments.d.ts +30 -11
- package/dist/components/composer/composer-attachments.js +45 -40
- package/dist/components/composer/composer-editor.css +40 -35
- package/dist/components/composer/composer-editor.d.ts +14 -4
- package/dist/components/composer/composer-editor.js +134 -44
- package/dist/components/composer/composer-editor.module.js +5 -5
- package/dist/components/composer/composer.css +22 -22
- package/dist/components/composer/composer.d.ts +13 -2
- package/dist/components/composer/composer.js +78 -63
- package/dist/components/composer/composer.module.js +5 -5
- package/dist/components/composer/index.d.ts +2 -2
- package/dist/components/composer/mention-text.css +5 -5
- package/dist/components/composer/mention-text.module.js +1 -1
- package/dist/components/confirm-dialog/confirm-dialog.css +29 -29
- package/dist/components/confirm-dialog/confirm-dialog.d.ts +57 -3
- package/dist/components/confirm-dialog/confirm-dialog.js +266 -108
- package/dist/components/confirm-dialog/confirm-dialog.module.js +5 -5
- package/dist/components/conversation/conversation.css +52 -52
- package/dist/components/conversation/conversation.d.ts +43 -18
- package/dist/components/conversation/conversation.js +120 -78
- package/dist/components/conversation/conversation.module.js +15 -15
- package/dist/components/date-field/date-field.d.ts +1 -1
- package/dist/components/date-field/date-field.js +202 -100
- package/dist/components/date-field/date-input.d.ts +73 -37
- package/dist/components/date-field/date-input.js +72 -45
- package/dist/components/date-field/index.d.ts +1 -1
- package/dist/components/date-range-field/date-range-field.d.ts +1 -1
- package/dist/components/date-range-field/date-range-field.js +219 -107
- package/dist/components/date-range-field/date-range-input.d.ts +84 -40
- package/dist/components/date-range-field/date-range-input.js +83 -48
- package/dist/components/dialog/dialog.css +32 -32
- package/dist/components/dialog/dialog.d.ts +8 -7
- package/dist/components/dialog/dialog.js +8 -26
- package/dist/components/dialog/dialog.module.js +6 -6
- package/dist/components/divider/divider.css +6 -6
- package/dist/components/divider/divider.d.ts +36 -2
- package/dist/components/divider/divider.js +195 -29
- package/dist/components/divider/divider.module.js +3 -3
- package/dist/components/drawer/drawer.css +55 -56
- package/dist/components/drawer/drawer.d.ts +8 -7
- package/dist/components/drawer/drawer.js +8 -26
- package/dist/components/drawer/drawer.module.js +6 -6
- package/dist/components/field/field.css +34 -24
- package/dist/components/field/field.d.ts +60 -37
- package/dist/components/field/field.js +242 -157
- package/dist/components/field/field.module.js +12 -10
- package/dist/components/field/input-parts.d.ts +11 -13
- package/dist/components/field/input-parts.js +23 -42
- package/dist/components/field-placeholder/field-placeholder.css +6 -6
- package/dist/components/field-placeholder/field-placeholder.module.js +4 -4
- package/dist/components/fieldset/field-group.d.ts +1 -1
- package/dist/components/fieldset/field-group.js +48 -42
- package/dist/components/fieldset/fieldset-root.d.ts +1 -1
- package/dist/components/fieldset/fieldset-root.js +19 -17
- package/dist/components/fieldset/fieldset.d.ts +2 -2
- package/dist/components/fieldset/fieldset.js +2 -2
- package/dist/components/file-field/file-field.css +126 -60
- package/dist/components/file-field/file-field.js +201 -109
- package/dist/components/file-field/file-field.module.js +4 -4
- package/dist/components/file-field/file-input.d.ts +66 -40
- package/dist/components/file-field/file-input.js +188 -132
- package/dist/components/filter-bar/filter-bar.css +8 -8
- package/dist/components/filter-bar/filter-bar.d.ts +12 -3
- package/dist/components/filter-bar/filter-bar.js +23 -25
- package/dist/components/filter-bar/filter-bar.module.js +5 -5
- package/dist/components/form/form.d.ts +19 -7
- package/dist/components/form/form.js +80 -29
- package/dist/components/icon/icon.css +2 -2
- package/dist/components/icon/icon.module.js +1 -1
- package/dist/components/link/link.css +6 -5
- package/dist/components/link/link.module.js +1 -1
- package/dist/components/menu/menu.css +52 -47
- package/dist/components/menu/menu.d.ts +32 -25
- package/dist/components/menu/menu.js +75 -124
- package/dist/components/menu/menu.module.js +8 -8
- package/dist/components/nav/nav-context.d.ts +1 -1
- package/dist/components/nav/nav-item-view.d.ts +10 -13
- package/dist/components/nav/nav-item-view.js +42 -54
- package/dist/components/nav/nav.css +150 -119
- package/dist/components/nav/nav.d.ts +61 -17
- package/dist/components/nav/nav.js +271 -176
- package/dist/components/nav/nav.module.js +17 -15
- package/dist/components/number-field/number-field.css +153 -64
- package/dist/components/number-field/number-field.d.ts +2 -2
- package/dist/components/number-field/number-field.js +112 -91
- package/dist/components/number-field/number-field.module.js +6 -6
- package/dist/components/number-field/number-input.d.ts +43 -23
- package/dist/components/number-field/number-input.js +179 -125
- package/dist/components/otp-field/otp-field.css +153 -60
- package/dist/components/otp-field/otp-field.d.ts +2 -2
- package/dist/components/otp-field/otp-field.js +62 -46
- package/dist/components/otp-field/otp-field.module.js +4 -4
- package/dist/components/otp-field/otp-input.d.ts +8 -6
- package/dist/components/otp-field/otp-input.js +92 -92
- package/dist/components/pagination/pagination.d.ts +46 -15
- package/dist/components/pagination/pagination.js +217 -224
- package/dist/components/password-field/password-field.css +23 -23
- package/dist/components/password-field/password-field.js +107 -85
- package/dist/components/password-field/password-field.module.js +8 -8
- package/dist/components/password-field/password-strength.d.ts +107 -3
- package/dist/components/password-field/password-strength.js +569 -92
- package/dist/components/photo-field/photo-field.js +137 -112
- package/dist/components/photo-field/photo-input.css +67 -44
- package/dist/components/photo-field/photo-input.d.ts +59 -15
- package/dist/components/photo-field/photo-input.js +173 -86
- package/dist/components/photo-field/photo-input.module.js +10 -8
- package/dist/components/popover/popover.css +41 -41
- package/dist/components/popover/popover.d.ts +66 -25
- package/dist/components/popover/popover.js +332 -217
- package/dist/components/popover/popover.module.js +15 -19
- package/dist/components/radio-group-field/radio-group-field.js +80 -71
- package/dist/components/radio-group-field/radio-group.css +112 -60
- package/dist/components/radio-group-field/radio-group.d.ts +19 -3
- package/dist/components/radio-group-field/radio-group.js +66 -23
- package/dist/components/radio-group-field/radio-group.module.js +4 -4
- package/dist/components/segmented-control-field/segmented-control-field.d.ts +1 -1
- package/dist/components/segmented-control-field/segmented-control-field.js +111 -96
- package/dist/components/segmented-control-field/segmented-control.css +132 -79
- package/dist/components/segmented-control-field/segmented-control.d.ts +39 -15
- package/dist/components/segmented-control-field/segmented-control.js +124 -41
- package/dist/components/segmented-control-field/segmented-control.module.js +4 -4
- package/dist/components/select-field/select.css +214 -101
- package/dist/components/select-field/select.d.ts +43 -11
- package/dist/components/select-field/select.js +194 -109
- package/dist/components/select-field/select.module.js +14 -14
- package/dist/components/skeleton/skeleton.css +4 -4
- package/dist/components/skeleton/skeleton.module.js +3 -3
- package/dist/components/stale/stale.css +15 -15
- package/dist/components/stale/stale.d.ts +27 -3
- package/dist/components/stale/stale.js +147 -66
- package/dist/components/stale/stale.module.js +6 -6
- package/dist/components/status-message/status-message.css +22 -22
- package/dist/components/status-message/status-message.module.js +6 -6
- package/dist/components/switch-field/switch-field.js +77 -57
- package/dist/components/switch-field/switch.css +112 -63
- package/dist/components/switch-field/switch.d.ts +20 -3
- package/dist/components/switch-field/switch.js +70 -27
- package/dist/components/switch-field/switch.module.js +4 -4
- package/dist/components/tabs/tabs.css +32 -32
- package/dist/components/tabs/tabs.d.ts +21 -7
- package/dist/components/tabs/tabs.js +73 -14
- package/dist/components/tabs/tabs.module.js +7 -7
- package/dist/components/tag/tag.css +84 -84
- package/dist/components/tag/tag.module.js +3 -3
- package/dist/components/tag-group/tag-group.css +94 -94
- package/dist/components/tag-group/tag-group.module.js +4 -4
- package/dist/components/text-field/text-field.css +159 -82
- package/dist/components/text-field/text-field.d.ts +1 -1
- package/dist/components/text-field/text-field.js +139 -110
- package/dist/components/text-field/text-field.module.js +9 -9
- package/dist/components/text-field/text-input.d.ts +81 -45
- package/dist/components/text-field/text-input.js +366 -217
- package/dist/components/textarea-field/textarea-field.css +7 -2
- package/dist/components/textarea-field/textarea-field.js +72 -56
- package/dist/components/textarea-field/textarea-field.module.js +2 -2
- package/dist/components/time-field/time-field.js +153 -60
- package/dist/components/time-field/time-input.d.ts +21 -10
- package/dist/components/time-field/time-input.js +22 -11
- package/dist/components/toast/toast-provider.css +34 -31
- package/dist/components/toast/toast-provider.d.ts +63 -14
- package/dist/components/toast/toast-provider.js +174 -111
- package/dist/components/toast/toast-provider.module.js +7 -7
- package/dist/components/toggle-group-field/toggle-group-field.d.ts +1 -1
- package/dist/components/toggle-group-field/toggle-group-field.js +95 -89
- package/dist/components/toggle-group-field/toggle-group.css +117 -67
- package/dist/components/toggle-group-field/toggle-group.d.ts +2 -2
- package/dist/components/toggle-group-field/toggle-group.js +2 -2
- package/dist/components/toggle-group-field/toggle-group.module.js +2 -2
- package/dist/components/tooltip/tooltip.css +4 -4
- package/dist/components/tooltip/tooltip.module.js +1 -1
- package/dist/data-table/data-table-content.js +6 -5
- package/dist/data-table/data-table-parts.d.ts +41 -13
- package/dist/data-table/data-table-parts.js +213 -172
- package/dist/data-table/data-table-selection.d.ts +105 -3
- package/dist/data-table/data-table-selection.js +654 -145
- package/dist/data-table/data-table.css +125 -128
- package/dist/data-table/data-table.d.ts +21 -26
- package/dist/data-table/data-table.js +20 -23
- package/dist/data-table/data-table.module.js +32 -34
- package/dist/data-table/index.d.ts +2 -2
- package/dist/index.js +3 -3
- package/dist/lib/calendar/calendar-navigation.d.ts +39 -5
- package/dist/lib/calendar/calendar-navigation.js +185 -118
- package/dist/lib/calendar/calendar-parts.d.ts +143 -0
- package/dist/lib/calendar/calendar-parts.js +540 -0
- package/dist/lib/calendar/calendar-prefab.d.ts +52 -0
- package/dist/lib/calendar/calendar-prefab.js +311 -0
- package/dist/lib/calendar/calendar-year.d.ts +3 -1
- package/dist/lib/calendar/calendar-year.js +139 -131
- package/dist/lib/calendar/temporal.css +325 -232
- package/dist/lib/calendar/temporal.d.ts +67 -82
- package/dist/lib/calendar/temporal.js +258 -569
- package/dist/lib/calendar/temporal.module.js +38 -38
- package/dist/lib/forms/use-connected-field.d.ts +1 -1
- package/dist/lib/forms/use-connected-field.js +1 -1
- package/dist/lib/render-as.d.ts +13 -0
- package/dist/lib/render-as.js +46 -0
- package/dist/terrazzo/index.d.ts +4 -3
- package/dist/terrazzo/index.js +17 -6
- package/dist/tokens.css +28 -4
- package/package.json +2 -2
- package/tokens/dark.tokens.json +6 -0
- package/tokens/sys.tokens.json +7 -0
- package/dist/components/button/close-button.d.ts +0 -16
- package/dist/components/button/close-button.js +0 -30
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
import type { CalendarDate } from "@internationalized/date";
|
|
2
|
+
import { useRender } from "@base-ui/react/use-render";
|
|
3
|
+
import { type ComponentProps, type ReactNode, type Ref } from "react";
|
|
4
|
+
import { CalendarCell as AriaCalendarCell, CalendarGrid as AriaCalendarGrid, CalendarGridBody as AriaCalendarGridBody, CalendarGridHeader as AriaCalendarGridHeader, CalendarHeaderCell as AriaCalendarHeaderCell, type CalendarProps as AriaCalendarProps, Heading as AriaHeading, type RangeCalendarProps as AriaRangeCalendarProps } from "react-aria-components";
|
|
5
|
+
import type { TemporalButtonProps } from "./temporal.tsx";
|
|
6
|
+
export type CalendarRootProps = Omit<AriaCalendarProps<CalendarDate>, "className"> & Readonly<{
|
|
7
|
+
className?: string;
|
|
8
|
+
ref?: Ref<HTMLDivElement>;
|
|
9
|
+
}>;
|
|
10
|
+
/**
|
|
11
|
+
* A month of days, selecting one. Without a value, it opens on today in the
|
|
12
|
+
* `TimeZoneProvider`'s zone.
|
|
13
|
+
*
|
|
14
|
+
* @example
|
|
15
|
+
* <DateInput.Calendar>
|
|
16
|
+
* <DateInput.CalendarHeader>…</DateInput.CalendarHeader>
|
|
17
|
+
* <DateInput.Grid>…</DateInput.Grid>
|
|
18
|
+
* </DateInput.Calendar>
|
|
19
|
+
*/
|
|
20
|
+
export declare const CalendarRoot: ({ className, ...props }: CalendarRootProps) => ReactNode;
|
|
21
|
+
export type RangeCalendarRootProps = Omit<AriaRangeCalendarProps<CalendarDate>, "className" | "visibleDuration"> & Readonly<{
|
|
22
|
+
/** Months shown side by side, each a `Grid` offset by its index. @default 1 */
|
|
23
|
+
visibleMonths?: number;
|
|
24
|
+
className?: string;
|
|
25
|
+
ref?: Ref<HTMLDivElement>;
|
|
26
|
+
}>;
|
|
27
|
+
/**
|
|
28
|
+
* Days of one or more adjacent months, selecting a continuous range. Without a
|
|
29
|
+
* value, it opens on today in the `TimeZoneProvider`'s zone.
|
|
30
|
+
*
|
|
31
|
+
* @example
|
|
32
|
+
* <DateRangeInput.Calendar visibleMonths={2}>
|
|
33
|
+
* <DateRangeInput.CalendarHeader>…</DateRangeInput.CalendarHeader>
|
|
34
|
+
* <DateRangeInput.Months>…</DateRangeInput.Months>
|
|
35
|
+
* </DateRangeInput.Calendar>
|
|
36
|
+
*/
|
|
37
|
+
export declare const RangeCalendarRoot: ({ visibleMonths, className, ...props }: RangeCalendarRootProps) => ReactNode;
|
|
38
|
+
export type CalendarHeaderProps = useRender.ComponentProps<"header">;
|
|
39
|
+
/**
|
|
40
|
+
* The row above the grid holding the month steppers and, between them, the
|
|
41
|
+
* heading or the month and year pickers.
|
|
42
|
+
*
|
|
43
|
+
* @example
|
|
44
|
+
* <DateInput.CalendarHeader>
|
|
45
|
+
* <DateInput.Previous render={…} />
|
|
46
|
+
* <DateInput.Heading />
|
|
47
|
+
* <DateInput.Next render={…} />
|
|
48
|
+
* </DateInput.CalendarHeader>
|
|
49
|
+
*/
|
|
50
|
+
export declare const CalendarHeader: ({ render, className, ref, ...props }: CalendarHeaderProps) => ReactNode;
|
|
51
|
+
export type CalendarHeadingProps = ComponentProps<typeof AriaHeading>;
|
|
52
|
+
/**
|
|
53
|
+
* The month or months the calendar shows, as text.
|
|
54
|
+
*
|
|
55
|
+
* @example
|
|
56
|
+
* <DateInput.Heading />
|
|
57
|
+
*/
|
|
58
|
+
export declare const CalendarHeading: (props: CalendarHeadingProps) => ReactNode;
|
|
59
|
+
/**
|
|
60
|
+
* The button that shows the previous month. It renders whichever button it is
|
|
61
|
+
* given.
|
|
62
|
+
*
|
|
63
|
+
* @example
|
|
64
|
+
* <DateInput.Previous
|
|
65
|
+
* render={
|
|
66
|
+
* <IconButton label="Previous month" variant="tertiary" size="md">
|
|
67
|
+
* <ChevronLeftIcon />
|
|
68
|
+
* </IconButton>
|
|
69
|
+
* }
|
|
70
|
+
* />
|
|
71
|
+
*/
|
|
72
|
+
export declare const CalendarPrevious: ({ render, ref, ...props }: TemporalButtonProps) => ReactNode;
|
|
73
|
+
/**
|
|
74
|
+
* The button that shows the next month. It renders whichever button it is
|
|
75
|
+
* given.
|
|
76
|
+
*
|
|
77
|
+
* @example
|
|
78
|
+
* <DateInput.Next
|
|
79
|
+
* render={
|
|
80
|
+
* <IconButton label="Next month" variant="tertiary" size="md">
|
|
81
|
+
* <ChevronRightIcon />
|
|
82
|
+
* </IconButton>
|
|
83
|
+
* }
|
|
84
|
+
* />
|
|
85
|
+
*/
|
|
86
|
+
export declare const CalendarNext: ({ render, ref, ...props }: TemporalButtonProps) => ReactNode;
|
|
87
|
+
export type CalendarMonthsProps = useRender.ComponentProps<"div">;
|
|
88
|
+
/**
|
|
89
|
+
* The row of grids a range calendar shows side by side.
|
|
90
|
+
*
|
|
91
|
+
* @example
|
|
92
|
+
* <DateRangeInput.Months>
|
|
93
|
+
* <DateRangeInput.Grid>…</DateRangeInput.Grid>
|
|
94
|
+
* <DateRangeInput.Grid offset={{ months: 1 }}>…</DateRangeInput.Grid>
|
|
95
|
+
* </DateRangeInput.Months>
|
|
96
|
+
*/
|
|
97
|
+
export declare const CalendarMonths: ({ render, className, ref, ...props }: CalendarMonthsProps) => ReactNode;
|
|
98
|
+
export type CalendarGridProps = ComponentProps<typeof AriaCalendarGrid>;
|
|
99
|
+
/**
|
|
100
|
+
* One month's table of days. `offset` picks a later month of a calendar that
|
|
101
|
+
* shows several.
|
|
102
|
+
*
|
|
103
|
+
* @example
|
|
104
|
+
* <DateInput.Grid>
|
|
105
|
+
* <DateInput.GridHeader>{day => <DateInput.HeaderCell>{day}</DateInput.HeaderCell>}</DateInput.GridHeader>
|
|
106
|
+
* <DateInput.GridBody>{date => <DateInput.Cell date={date} />}</DateInput.GridBody>
|
|
107
|
+
* </DateInput.Grid>
|
|
108
|
+
*/
|
|
109
|
+
export declare const CalendarGrid: ({ className, ...props }: CalendarGridProps) => ReactNode;
|
|
110
|
+
export type CalendarGridHeaderProps = ComponentProps<typeof AriaCalendarGridHeader>;
|
|
111
|
+
/**
|
|
112
|
+
* The row of weekday names at the top of a grid. Its children render each one.
|
|
113
|
+
*
|
|
114
|
+
* @example
|
|
115
|
+
* <DateInput.GridHeader>{day => <DateInput.HeaderCell>{day}</DateInput.HeaderCell>}</DateInput.GridHeader>
|
|
116
|
+
*/
|
|
117
|
+
export declare const CalendarGridHeader: (props: CalendarGridHeaderProps) => ReactNode;
|
|
118
|
+
export type CalendarHeaderCellProps = ComponentProps<typeof AriaCalendarHeaderCell>;
|
|
119
|
+
/**
|
|
120
|
+
* One weekday name.
|
|
121
|
+
*
|
|
122
|
+
* @example
|
|
123
|
+
* <DateInput.HeaderCell>{day}</DateInput.HeaderCell>
|
|
124
|
+
*/
|
|
125
|
+
export declare const CalendarHeaderCell: ({ className, ...props }: CalendarHeaderCellProps) => ReactNode;
|
|
126
|
+
export type CalendarGridBodyProps = ComponentProps<typeof AriaCalendarGridBody>;
|
|
127
|
+
/**
|
|
128
|
+
* The weeks of a grid. Its children render each day.
|
|
129
|
+
*
|
|
130
|
+
* @example
|
|
131
|
+
* <DateInput.GridBody>{date => <DateInput.Cell date={date} />}</DateInput.GridBody>
|
|
132
|
+
*/
|
|
133
|
+
export declare const CalendarGridBody: (props: CalendarGridBodyProps) => ReactNode;
|
|
134
|
+
export type CalendarCellProps = Omit<ComponentProps<typeof AriaCalendarCell>, "className"> & Readonly<{
|
|
135
|
+
className?: string;
|
|
136
|
+
}>;
|
|
137
|
+
/**
|
|
138
|
+
* One day, marking today in the `TimeZoneProvider`'s zone.
|
|
139
|
+
*
|
|
140
|
+
* @example
|
|
141
|
+
* <DateInput.Cell date={date} />
|
|
142
|
+
*/
|
|
143
|
+
export declare const CalendarCell: ({ date, className, ...props }: CalendarCellProps) => ReactNode;
|
|
@@ -0,0 +1,540 @@
|
|
|
1
|
+
import { useTimeZone } from "../../components/time-zone-provider/time-zone-provider.js";
|
|
2
|
+
import { todayIn } from "./temporal-value.js";
|
|
3
|
+
import temporal_module_default from "./temporal.module.js";
|
|
4
|
+
import { c } from "react/compiler-runtime";
|
|
5
|
+
import { useRender } from "@base-ui/react/use-render";
|
|
6
|
+
import { clsx } from "clsx";
|
|
7
|
+
import { jsx } from "react/jsx-runtime";
|
|
8
|
+
import { useContext } from "react";
|
|
9
|
+
import { Button, Calendar, CalendarCell, CalendarGrid, CalendarGridBody, CalendarGridHeader, CalendarHeaderCell, DatePickerStateContext, DateRangePickerStateContext, Heading, RangeCalendar } from "react-aria-components";
|
|
10
|
+
// src/lib/calendar/calendar-parts.tsx
|
|
11
|
+
/**
|
|
12
|
+
* A month of days, selecting one. Without a value, it opens on today in the
|
|
13
|
+
* `TimeZoneProvider`'s zone.
|
|
14
|
+
*
|
|
15
|
+
* @example
|
|
16
|
+
* <DateInput.Calendar>
|
|
17
|
+
* <DateInput.CalendarHeader>…</DateInput.CalendarHeader>
|
|
18
|
+
* <DateInput.Grid>…</DateInput.Grid>
|
|
19
|
+
* </DateInput.Calendar>
|
|
20
|
+
*/
|
|
21
|
+
var CalendarRoot = (t0) => {
|
|
22
|
+
const $ = c(11);
|
|
23
|
+
let className;
|
|
24
|
+
let props;
|
|
25
|
+
if ($[0] !== t0) {
|
|
26
|
+
({className, ...props} = t0);
|
|
27
|
+
$[0] = t0;
|
|
28
|
+
$[1] = className;
|
|
29
|
+
$[2] = props;
|
|
30
|
+
} else {
|
|
31
|
+
className = $[1];
|
|
32
|
+
props = $[2];
|
|
33
|
+
}
|
|
34
|
+
const t1 = useTimeZone();
|
|
35
|
+
let t2;
|
|
36
|
+
if ($[3] !== t1) {
|
|
37
|
+
t2 = todayIn(t1);
|
|
38
|
+
$[3] = t1;
|
|
39
|
+
$[4] = t2;
|
|
40
|
+
} else t2 = $[4];
|
|
41
|
+
const today = t2;
|
|
42
|
+
const picked = useContext(DatePickerStateContext)?.value ?? null;
|
|
43
|
+
let t3;
|
|
44
|
+
if ($[5] !== className) {
|
|
45
|
+
t3 = clsx(temporal_module_default.calendar, className);
|
|
46
|
+
$[5] = className;
|
|
47
|
+
$[6] = t3;
|
|
48
|
+
} else t3 = $[6];
|
|
49
|
+
const t4 = picked === null ? today : void 0;
|
|
50
|
+
let t5;
|
|
51
|
+
if ($[7] !== props || $[8] !== t3 || $[9] !== t4) {
|
|
52
|
+
t5 = /* @__PURE__ */ jsx(Calendar, {
|
|
53
|
+
className: t3,
|
|
54
|
+
defaultFocusedValue: t4,
|
|
55
|
+
...props
|
|
56
|
+
});
|
|
57
|
+
$[7] = props;
|
|
58
|
+
$[8] = t3;
|
|
59
|
+
$[9] = t4;
|
|
60
|
+
$[10] = t5;
|
|
61
|
+
} else t5 = $[10];
|
|
62
|
+
return t5;
|
|
63
|
+
};
|
|
64
|
+
/**
|
|
65
|
+
* Days of one or more adjacent months, selecting a continuous range. Without a
|
|
66
|
+
* value, it opens on today in the `TimeZoneProvider`'s zone.
|
|
67
|
+
*
|
|
68
|
+
* @example
|
|
69
|
+
* <DateRangeInput.Calendar visibleMonths={2}>
|
|
70
|
+
* <DateRangeInput.CalendarHeader>…</DateRangeInput.CalendarHeader>
|
|
71
|
+
* <DateRangeInput.Months>…</DateRangeInput.Months>
|
|
72
|
+
* </DateRangeInput.Calendar>
|
|
73
|
+
*/
|
|
74
|
+
var RangeCalendarRoot = (t0) => {
|
|
75
|
+
const $ = c(15);
|
|
76
|
+
let className;
|
|
77
|
+
let props;
|
|
78
|
+
let t1;
|
|
79
|
+
if ($[0] !== t0) {
|
|
80
|
+
({visibleMonths: t1, className, ...props} = t0);
|
|
81
|
+
$[0] = t0;
|
|
82
|
+
$[1] = className;
|
|
83
|
+
$[2] = props;
|
|
84
|
+
$[3] = t1;
|
|
85
|
+
} else {
|
|
86
|
+
className = $[1];
|
|
87
|
+
props = $[2];
|
|
88
|
+
t1 = $[3];
|
|
89
|
+
}
|
|
90
|
+
const visibleMonths = t1 === void 0 ? 1 : t1;
|
|
91
|
+
const t2 = useTimeZone();
|
|
92
|
+
let t3;
|
|
93
|
+
if ($[4] !== t2) {
|
|
94
|
+
t3 = todayIn(t2);
|
|
95
|
+
$[4] = t2;
|
|
96
|
+
$[5] = t3;
|
|
97
|
+
} else t3 = $[5];
|
|
98
|
+
const today = t3;
|
|
99
|
+
const picked = useContext(DateRangePickerStateContext)?.value.start ?? null;
|
|
100
|
+
let t4;
|
|
101
|
+
if ($[6] !== className) {
|
|
102
|
+
t4 = clsx(temporal_module_default.calendar, temporal_module_default.rangeCalendar, className);
|
|
103
|
+
$[6] = className;
|
|
104
|
+
$[7] = t4;
|
|
105
|
+
} else t4 = $[7];
|
|
106
|
+
const t5 = Math.max(1, visibleMonths);
|
|
107
|
+
let t6;
|
|
108
|
+
if ($[8] !== t5) {
|
|
109
|
+
t6 = { months: t5 };
|
|
110
|
+
$[8] = t5;
|
|
111
|
+
$[9] = t6;
|
|
112
|
+
} else t6 = $[9];
|
|
113
|
+
const t7 = picked === null ? today : void 0;
|
|
114
|
+
let t8;
|
|
115
|
+
if ($[10] !== props || $[11] !== t4 || $[12] !== t6 || $[13] !== t7) {
|
|
116
|
+
t8 = /* @__PURE__ */ jsx(RangeCalendar, {
|
|
117
|
+
className: t4,
|
|
118
|
+
visibleDuration: t6,
|
|
119
|
+
defaultFocusedValue: t7,
|
|
120
|
+
...props
|
|
121
|
+
});
|
|
122
|
+
$[10] = props;
|
|
123
|
+
$[11] = t4;
|
|
124
|
+
$[12] = t6;
|
|
125
|
+
$[13] = t7;
|
|
126
|
+
$[14] = t8;
|
|
127
|
+
} else t8 = $[14];
|
|
128
|
+
return t8;
|
|
129
|
+
};
|
|
130
|
+
/**
|
|
131
|
+
* The row above the grid holding the month steppers and, between them, the
|
|
132
|
+
* heading or the month and year pickers.
|
|
133
|
+
*
|
|
134
|
+
* @example
|
|
135
|
+
* <DateInput.CalendarHeader>
|
|
136
|
+
* <DateInput.Previous render={…} />
|
|
137
|
+
* <DateInput.Heading />
|
|
138
|
+
* <DateInput.Next render={…} />
|
|
139
|
+
* </DateInput.CalendarHeader>
|
|
140
|
+
*/
|
|
141
|
+
var CalendarHeader = (t0) => {
|
|
142
|
+
const $ = c(14);
|
|
143
|
+
let className;
|
|
144
|
+
let props;
|
|
145
|
+
let ref;
|
|
146
|
+
let render;
|
|
147
|
+
if ($[0] !== t0) {
|
|
148
|
+
({render, className, ref, ...props} = t0);
|
|
149
|
+
$[0] = t0;
|
|
150
|
+
$[1] = className;
|
|
151
|
+
$[2] = props;
|
|
152
|
+
$[3] = ref;
|
|
153
|
+
$[4] = render;
|
|
154
|
+
} else {
|
|
155
|
+
className = $[1];
|
|
156
|
+
props = $[2];
|
|
157
|
+
ref = $[3];
|
|
158
|
+
render = $[4];
|
|
159
|
+
}
|
|
160
|
+
let t1;
|
|
161
|
+
if ($[5] !== className) {
|
|
162
|
+
t1 = clsx(temporal_module_default.header, className);
|
|
163
|
+
$[5] = className;
|
|
164
|
+
$[6] = t1;
|
|
165
|
+
} else t1 = $[6];
|
|
166
|
+
let t2;
|
|
167
|
+
if ($[7] !== props || $[8] !== t1) {
|
|
168
|
+
t2 = {
|
|
169
|
+
...props,
|
|
170
|
+
className: t1
|
|
171
|
+
};
|
|
172
|
+
$[7] = props;
|
|
173
|
+
$[8] = t1;
|
|
174
|
+
$[9] = t2;
|
|
175
|
+
} else t2 = $[9];
|
|
176
|
+
let t3;
|
|
177
|
+
if ($[10] !== ref || $[11] !== render || $[12] !== t2) {
|
|
178
|
+
t3 = {
|
|
179
|
+
defaultTagName: "header",
|
|
180
|
+
render,
|
|
181
|
+
ref,
|
|
182
|
+
props: t2
|
|
183
|
+
};
|
|
184
|
+
$[10] = ref;
|
|
185
|
+
$[11] = render;
|
|
186
|
+
$[12] = t2;
|
|
187
|
+
$[13] = t3;
|
|
188
|
+
} else t3 = $[13];
|
|
189
|
+
return useRender(t3);
|
|
190
|
+
};
|
|
191
|
+
/**
|
|
192
|
+
* The month or months the calendar shows, as text.
|
|
193
|
+
*
|
|
194
|
+
* @example
|
|
195
|
+
* <DateInput.Heading />
|
|
196
|
+
*/
|
|
197
|
+
var CalendarHeading = (props) => {
|
|
198
|
+
const $ = c(2);
|
|
199
|
+
let t0;
|
|
200
|
+
if ($[0] !== props) {
|
|
201
|
+
t0 = /* @__PURE__ */ jsx(Heading, { ...props });
|
|
202
|
+
$[0] = props;
|
|
203
|
+
$[1] = t0;
|
|
204
|
+
} else t0 = $[1];
|
|
205
|
+
return t0;
|
|
206
|
+
};
|
|
207
|
+
/**
|
|
208
|
+
* The button that shows the previous month. It renders whichever button it is
|
|
209
|
+
* given.
|
|
210
|
+
*
|
|
211
|
+
* @example
|
|
212
|
+
* <DateInput.Previous
|
|
213
|
+
* render={
|
|
214
|
+
* <IconButton label="Previous month" variant="tertiary" size="md">
|
|
215
|
+
* <ChevronLeftIcon />
|
|
216
|
+
* </IconButton>
|
|
217
|
+
* }
|
|
218
|
+
* />
|
|
219
|
+
*/
|
|
220
|
+
var CalendarPrevious = (t0) => {
|
|
221
|
+
const $ = c(11);
|
|
222
|
+
let props;
|
|
223
|
+
let ref;
|
|
224
|
+
let render;
|
|
225
|
+
if ($[0] !== t0) {
|
|
226
|
+
({render, ref, ...props} = t0);
|
|
227
|
+
$[0] = t0;
|
|
228
|
+
$[1] = props;
|
|
229
|
+
$[2] = ref;
|
|
230
|
+
$[3] = render;
|
|
231
|
+
} else {
|
|
232
|
+
props = $[1];
|
|
233
|
+
ref = $[2];
|
|
234
|
+
render = $[3];
|
|
235
|
+
}
|
|
236
|
+
let t1;
|
|
237
|
+
if ($[4] === Symbol.for("react.memo_cache_sentinel")) {
|
|
238
|
+
t1 = /* @__PURE__ */ jsx(Button, { slot: "previous" });
|
|
239
|
+
$[4] = t1;
|
|
240
|
+
} else t1 = $[4];
|
|
241
|
+
let t2;
|
|
242
|
+
if ($[5] !== props) {
|
|
243
|
+
t2 = {
|
|
244
|
+
...props,
|
|
245
|
+
render: t1
|
|
246
|
+
};
|
|
247
|
+
$[5] = props;
|
|
248
|
+
$[6] = t2;
|
|
249
|
+
} else t2 = $[6];
|
|
250
|
+
let t3;
|
|
251
|
+
if ($[7] !== ref || $[8] !== render || $[9] !== t2) {
|
|
252
|
+
t3 = {
|
|
253
|
+
render,
|
|
254
|
+
ref,
|
|
255
|
+
props: t2
|
|
256
|
+
};
|
|
257
|
+
$[7] = ref;
|
|
258
|
+
$[8] = render;
|
|
259
|
+
$[9] = t2;
|
|
260
|
+
$[10] = t3;
|
|
261
|
+
} else t3 = $[10];
|
|
262
|
+
return useRender(t3);
|
|
263
|
+
};
|
|
264
|
+
/**
|
|
265
|
+
* The button that shows the next month. It renders whichever button it is
|
|
266
|
+
* given.
|
|
267
|
+
*
|
|
268
|
+
* @example
|
|
269
|
+
* <DateInput.Next
|
|
270
|
+
* render={
|
|
271
|
+
* <IconButton label="Next month" variant="tertiary" size="md">
|
|
272
|
+
* <ChevronRightIcon />
|
|
273
|
+
* </IconButton>
|
|
274
|
+
* }
|
|
275
|
+
* />
|
|
276
|
+
*/
|
|
277
|
+
var CalendarNext = (t0) => {
|
|
278
|
+
const $ = c(11);
|
|
279
|
+
let props;
|
|
280
|
+
let ref;
|
|
281
|
+
let render;
|
|
282
|
+
if ($[0] !== t0) {
|
|
283
|
+
({render, ref, ...props} = t0);
|
|
284
|
+
$[0] = t0;
|
|
285
|
+
$[1] = props;
|
|
286
|
+
$[2] = ref;
|
|
287
|
+
$[3] = render;
|
|
288
|
+
} else {
|
|
289
|
+
props = $[1];
|
|
290
|
+
ref = $[2];
|
|
291
|
+
render = $[3];
|
|
292
|
+
}
|
|
293
|
+
let t1;
|
|
294
|
+
if ($[4] === Symbol.for("react.memo_cache_sentinel")) {
|
|
295
|
+
t1 = /* @__PURE__ */ jsx(Button, { slot: "next" });
|
|
296
|
+
$[4] = t1;
|
|
297
|
+
} else t1 = $[4];
|
|
298
|
+
let t2;
|
|
299
|
+
if ($[5] !== props) {
|
|
300
|
+
t2 = {
|
|
301
|
+
...props,
|
|
302
|
+
render: t1
|
|
303
|
+
};
|
|
304
|
+
$[5] = props;
|
|
305
|
+
$[6] = t2;
|
|
306
|
+
} else t2 = $[6];
|
|
307
|
+
let t3;
|
|
308
|
+
if ($[7] !== ref || $[8] !== render || $[9] !== t2) {
|
|
309
|
+
t3 = {
|
|
310
|
+
render,
|
|
311
|
+
ref,
|
|
312
|
+
props: t2
|
|
313
|
+
};
|
|
314
|
+
$[7] = ref;
|
|
315
|
+
$[8] = render;
|
|
316
|
+
$[9] = t2;
|
|
317
|
+
$[10] = t3;
|
|
318
|
+
} else t3 = $[10];
|
|
319
|
+
return useRender(t3);
|
|
320
|
+
};
|
|
321
|
+
/**
|
|
322
|
+
* The row of grids a range calendar shows side by side.
|
|
323
|
+
*
|
|
324
|
+
* @example
|
|
325
|
+
* <DateRangeInput.Months>
|
|
326
|
+
* <DateRangeInput.Grid>…</DateRangeInput.Grid>
|
|
327
|
+
* <DateRangeInput.Grid offset={{ months: 1 }}>…</DateRangeInput.Grid>
|
|
328
|
+
* </DateRangeInput.Months>
|
|
329
|
+
*/
|
|
330
|
+
var CalendarMonths = (t0) => {
|
|
331
|
+
const $ = c(14);
|
|
332
|
+
let className;
|
|
333
|
+
let props;
|
|
334
|
+
let ref;
|
|
335
|
+
let render;
|
|
336
|
+
if ($[0] !== t0) {
|
|
337
|
+
({render, className, ref, ...props} = t0);
|
|
338
|
+
$[0] = t0;
|
|
339
|
+
$[1] = className;
|
|
340
|
+
$[2] = props;
|
|
341
|
+
$[3] = ref;
|
|
342
|
+
$[4] = render;
|
|
343
|
+
} else {
|
|
344
|
+
className = $[1];
|
|
345
|
+
props = $[2];
|
|
346
|
+
ref = $[3];
|
|
347
|
+
render = $[4];
|
|
348
|
+
}
|
|
349
|
+
let t1;
|
|
350
|
+
if ($[5] !== className) {
|
|
351
|
+
t1 = clsx(temporal_module_default.months, className);
|
|
352
|
+
$[5] = className;
|
|
353
|
+
$[6] = t1;
|
|
354
|
+
} else t1 = $[6];
|
|
355
|
+
let t2;
|
|
356
|
+
if ($[7] !== props || $[8] !== t1) {
|
|
357
|
+
t2 = {
|
|
358
|
+
...props,
|
|
359
|
+
className: t1
|
|
360
|
+
};
|
|
361
|
+
$[7] = props;
|
|
362
|
+
$[8] = t1;
|
|
363
|
+
$[9] = t2;
|
|
364
|
+
} else t2 = $[9];
|
|
365
|
+
let t3;
|
|
366
|
+
if ($[10] !== ref || $[11] !== render || $[12] !== t2) {
|
|
367
|
+
t3 = {
|
|
368
|
+
render,
|
|
369
|
+
ref,
|
|
370
|
+
props: t2
|
|
371
|
+
};
|
|
372
|
+
$[10] = ref;
|
|
373
|
+
$[11] = render;
|
|
374
|
+
$[12] = t2;
|
|
375
|
+
$[13] = t3;
|
|
376
|
+
} else t3 = $[13];
|
|
377
|
+
return useRender(t3);
|
|
378
|
+
};
|
|
379
|
+
/**
|
|
380
|
+
* One month's table of days. `offset` picks a later month of a calendar that
|
|
381
|
+
* shows several.
|
|
382
|
+
*
|
|
383
|
+
* @example
|
|
384
|
+
* <DateInput.Grid>
|
|
385
|
+
* <DateInput.GridHeader>{day => <DateInput.HeaderCell>{day}</DateInput.HeaderCell>}</DateInput.GridHeader>
|
|
386
|
+
* <DateInput.GridBody>{date => <DateInput.Cell date={date} />}</DateInput.GridBody>
|
|
387
|
+
* </DateInput.Grid>
|
|
388
|
+
*/
|
|
389
|
+
var CalendarGrid$1 = (t0) => {
|
|
390
|
+
const $ = c(8);
|
|
391
|
+
let className;
|
|
392
|
+
let props;
|
|
393
|
+
if ($[0] !== t0) {
|
|
394
|
+
({className, ...props} = t0);
|
|
395
|
+
$[0] = t0;
|
|
396
|
+
$[1] = className;
|
|
397
|
+
$[2] = props;
|
|
398
|
+
} else {
|
|
399
|
+
className = $[1];
|
|
400
|
+
props = $[2];
|
|
401
|
+
}
|
|
402
|
+
let t1;
|
|
403
|
+
if ($[3] !== className) {
|
|
404
|
+
t1 = clsx(temporal_module_default.grid, className);
|
|
405
|
+
$[3] = className;
|
|
406
|
+
$[4] = t1;
|
|
407
|
+
} else t1 = $[4];
|
|
408
|
+
let t2;
|
|
409
|
+
if ($[5] !== props || $[6] !== t1) {
|
|
410
|
+
t2 = /* @__PURE__ */ jsx(CalendarGrid, {
|
|
411
|
+
className: t1,
|
|
412
|
+
...props
|
|
413
|
+
});
|
|
414
|
+
$[5] = props;
|
|
415
|
+
$[6] = t1;
|
|
416
|
+
$[7] = t2;
|
|
417
|
+
} else t2 = $[7];
|
|
418
|
+
return t2;
|
|
419
|
+
};
|
|
420
|
+
/**
|
|
421
|
+
* The row of weekday names at the top of a grid. Its children render each one.
|
|
422
|
+
*
|
|
423
|
+
* @example
|
|
424
|
+
* <DateInput.GridHeader>{day => <DateInput.HeaderCell>{day}</DateInput.HeaderCell>}</DateInput.GridHeader>
|
|
425
|
+
*/
|
|
426
|
+
var CalendarGridHeader$1 = (props) => {
|
|
427
|
+
const $ = c(2);
|
|
428
|
+
let t0;
|
|
429
|
+
if ($[0] !== props) {
|
|
430
|
+
t0 = /* @__PURE__ */ jsx(CalendarGridHeader, { ...props });
|
|
431
|
+
$[0] = props;
|
|
432
|
+
$[1] = t0;
|
|
433
|
+
} else t0 = $[1];
|
|
434
|
+
return t0;
|
|
435
|
+
};
|
|
436
|
+
/**
|
|
437
|
+
* One weekday name.
|
|
438
|
+
*
|
|
439
|
+
* @example
|
|
440
|
+
* <DateInput.HeaderCell>{day}</DateInput.HeaderCell>
|
|
441
|
+
*/
|
|
442
|
+
var CalendarHeaderCell$1 = (t0) => {
|
|
443
|
+
const $ = c(8);
|
|
444
|
+
let className;
|
|
445
|
+
let props;
|
|
446
|
+
if ($[0] !== t0) {
|
|
447
|
+
({className, ...props} = t0);
|
|
448
|
+
$[0] = t0;
|
|
449
|
+
$[1] = className;
|
|
450
|
+
$[2] = props;
|
|
451
|
+
} else {
|
|
452
|
+
className = $[1];
|
|
453
|
+
props = $[2];
|
|
454
|
+
}
|
|
455
|
+
let t1;
|
|
456
|
+
if ($[3] !== className) {
|
|
457
|
+
t1 = clsx(temporal_module_default.weekday, className);
|
|
458
|
+
$[3] = className;
|
|
459
|
+
$[4] = t1;
|
|
460
|
+
} else t1 = $[4];
|
|
461
|
+
let t2;
|
|
462
|
+
if ($[5] !== props || $[6] !== t1) {
|
|
463
|
+
t2 = /* @__PURE__ */ jsx(CalendarHeaderCell, {
|
|
464
|
+
className: t1,
|
|
465
|
+
...props
|
|
466
|
+
});
|
|
467
|
+
$[5] = props;
|
|
468
|
+
$[6] = t1;
|
|
469
|
+
$[7] = t2;
|
|
470
|
+
} else t2 = $[7];
|
|
471
|
+
return t2;
|
|
472
|
+
};
|
|
473
|
+
/**
|
|
474
|
+
* The weeks of a grid. Its children render each day.
|
|
475
|
+
*
|
|
476
|
+
* @example
|
|
477
|
+
* <DateInput.GridBody>{date => <DateInput.Cell date={date} />}</DateInput.GridBody>
|
|
478
|
+
*/
|
|
479
|
+
var CalendarGridBody$1 = (props) => {
|
|
480
|
+
const $ = c(2);
|
|
481
|
+
let t0;
|
|
482
|
+
if ($[0] !== props) {
|
|
483
|
+
t0 = /* @__PURE__ */ jsx(CalendarGridBody, { ...props });
|
|
484
|
+
$[0] = props;
|
|
485
|
+
$[1] = t0;
|
|
486
|
+
} else t0 = $[1];
|
|
487
|
+
return t0;
|
|
488
|
+
};
|
|
489
|
+
/**
|
|
490
|
+
* One day, marking today in the `TimeZoneProvider`'s zone.
|
|
491
|
+
*
|
|
492
|
+
* @example
|
|
493
|
+
* <DateInput.Cell date={date} />
|
|
494
|
+
*/
|
|
495
|
+
var CalendarCell$1 = (t0) => {
|
|
496
|
+
const $ = c(14);
|
|
497
|
+
let className;
|
|
498
|
+
let date;
|
|
499
|
+
let props;
|
|
500
|
+
if ($[0] !== t0) {
|
|
501
|
+
({date, className, ...props} = t0);
|
|
502
|
+
$[0] = t0;
|
|
503
|
+
$[1] = className;
|
|
504
|
+
$[2] = date;
|
|
505
|
+
$[3] = props;
|
|
506
|
+
} else {
|
|
507
|
+
className = $[1];
|
|
508
|
+
date = $[2];
|
|
509
|
+
props = $[3];
|
|
510
|
+
}
|
|
511
|
+
const today = todayIn(useTimeZone());
|
|
512
|
+
const T0 = CalendarCell;
|
|
513
|
+
const t1 = clsx;
|
|
514
|
+
const t2 = temporal_module_default;
|
|
515
|
+
const t3 = date.compare(today) === 0 && temporal_module_default.today;
|
|
516
|
+
let t4;
|
|
517
|
+
if ($[4] !== className || $[5] !== t1 || $[6] !== t2.day || $[7] !== t3) {
|
|
518
|
+
t4 = t1(t2.day, t3, className);
|
|
519
|
+
$[4] = className;
|
|
520
|
+
$[5] = t1;
|
|
521
|
+
$[6] = t2.day;
|
|
522
|
+
$[7] = t3;
|
|
523
|
+
$[8] = t4;
|
|
524
|
+
} else t4 = $[8];
|
|
525
|
+
let t5;
|
|
526
|
+
if ($[9] !== T0 || $[10] !== date || $[11] !== props || $[12] !== t4) {
|
|
527
|
+
t5 = /* @__PURE__ */ jsx(T0, {
|
|
528
|
+
date,
|
|
529
|
+
className: t4,
|
|
530
|
+
...props
|
|
531
|
+
});
|
|
532
|
+
$[9] = T0;
|
|
533
|
+
$[10] = date;
|
|
534
|
+
$[11] = props;
|
|
535
|
+
$[12] = t4;
|
|
536
|
+
$[13] = t5;
|
|
537
|
+
} else t5 = $[13];
|
|
538
|
+
return t5;
|
|
539
|
+
};
|
|
540
|
+
export { CalendarCell$1 as CalendarCell, CalendarGrid$1 as CalendarGrid, CalendarGridBody$1 as CalendarGridBody, CalendarGridHeader$1 as CalendarGridHeader, CalendarHeader, CalendarHeaderCell$1 as CalendarHeaderCell, CalendarHeading, CalendarMonths, CalendarNext, CalendarPrevious, CalendarRoot, RangeCalendarRoot };
|