@central-ui/react 0.0.0-stage → 0.1.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/LICENSE +21 -0
- package/README.md +33 -2
- package/dist/components/accordion/index.d.ts +73 -0
- package/dist/components/accordion/index.d.ts.map +1 -0
- package/dist/components/accordion/index.js +92 -0
- package/dist/components/accordion/index.js.map +1 -0
- package/dist/components/autocomplete/index.d.ts +365 -0
- package/dist/components/autocomplete/index.d.ts.map +1 -0
- package/dist/components/autocomplete/index.js +369 -0
- package/dist/components/autocomplete/index.js.map +1 -0
- package/dist/components/avatar/index.d.ts +48 -0
- package/dist/components/avatar/index.d.ts.map +1 -0
- package/dist/components/avatar/index.js +60 -0
- package/dist/components/avatar/index.js.map +1 -0
- package/dist/components/badge/index.d.ts +29 -0
- package/dist/components/badge/index.d.ts.map +1 -0
- package/dist/components/badge/index.js +36 -0
- package/dist/components/badge/index.js.map +1 -0
- package/dist/components/banner/index.d.ts +71 -0
- package/dist/components/banner/index.d.ts.map +1 -0
- package/dist/components/banner/index.js +119 -0
- package/dist/components/banner/index.js.map +1 -0
- package/dist/components/breadcrumb/index.d.ts +31 -0
- package/dist/components/breadcrumb/index.d.ts.map +1 -0
- package/dist/components/breadcrumb/index.js +42 -0
- package/dist/components/breadcrumb/index.js.map +1 -0
- package/dist/components/button/index.d.ts +48 -0
- package/dist/components/button/index.d.ts.map +1 -0
- package/dist/components/button/index.js +60 -0
- package/dist/components/button/index.js.map +1 -0
- package/dist/components/card/index.d.ts +34 -0
- package/dist/components/card/index.d.ts.map +1 -0
- package/dist/components/card/index.js +45 -0
- package/dist/components/card/index.js.map +1 -0
- package/dist/components/checkbox/index.d.ts +66 -0
- package/dist/components/checkbox/index.d.ts.map +1 -0
- package/dist/components/checkbox/index.js +146 -0
- package/dist/components/checkbox/index.js.map +1 -0
- package/dist/components/chip/index.d.ts +26 -0
- package/dist/components/chip/index.d.ts.map +1 -0
- package/dist/components/chip/index.js +40 -0
- package/dist/components/chip/index.js.map +1 -0
- package/dist/components/combobox/index.d.ts +427 -0
- package/dist/components/combobox/index.d.ts.map +1 -0
- package/dist/components/combobox/index.js +416 -0
- package/dist/components/combobox/index.js.map +1 -0
- package/dist/components/datepicker/index.d.ts +297 -0
- package/dist/components/datepicker/index.d.ts.map +1 -0
- package/dist/components/datepicker/index.js +507 -0
- package/dist/components/datepicker/index.js.map +1 -0
- package/dist/components/dialog/index.d.ts +88 -0
- package/dist/components/dialog/index.d.ts.map +1 -0
- package/dist/components/dialog/index.js +102 -0
- package/dist/components/dialog/index.js.map +1 -0
- package/dist/components/divider/index.d.ts +21 -0
- package/dist/components/divider/index.d.ts.map +1 -0
- package/dist/components/divider/index.js +24 -0
- package/dist/components/divider/index.js.map +1 -0
- package/dist/components/drawer/index.d.ts +99 -0
- package/dist/components/drawer/index.d.ts.map +1 -0
- package/dist/components/drawer/index.js +137 -0
- package/dist/components/drawer/index.js.map +1 -0
- package/dist/components/empty/index.d.ts +40 -0
- package/dist/components/empty/index.d.ts.map +1 -0
- package/dist/components/empty/index.js +61 -0
- package/dist/components/empty/index.js.map +1 -0
- package/dist/components/fileupload/index.d.ts +107 -0
- package/dist/components/fileupload/index.d.ts.map +1 -0
- package/dist/components/fileupload/index.js +185 -0
- package/dist/components/fileupload/index.js.map +1 -0
- package/dist/components/form/index.d.ts +34 -0
- package/dist/components/form/index.d.ts.map +1 -0
- package/dist/components/form/index.js +35 -0
- package/dist/components/form/index.js.map +1 -0
- package/dist/components/input/index.d.ts +85 -0
- package/dist/components/input/index.d.ts.map +1 -0
- package/dist/components/input/index.js +249 -0
- package/dist/components/input/index.js.map +1 -0
- package/dist/components/menu/index.d.ts +115 -0
- package/dist/components/menu/index.d.ts.map +1 -0
- package/dist/components/menu/index.js +188 -0
- package/dist/components/menu/index.js.map +1 -0
- package/dist/components/metric/index.d.ts +24 -0
- package/dist/components/metric/index.d.ts.map +1 -0
- package/dist/components/metric/index.js +26 -0
- package/dist/components/metric/index.js.map +1 -0
- package/dist/components/numberinput/index.d.ts +105 -0
- package/dist/components/numberinput/index.d.ts.map +1 -0
- package/dist/components/numberinput/index.js +240 -0
- package/dist/components/numberinput/index.js.map +1 -0
- package/dist/components/otpinput/index.d.ts +63 -0
- package/dist/components/otpinput/index.d.ts.map +1 -0
- package/dist/components/otpinput/index.js +133 -0
- package/dist/components/otpinput/index.js.map +1 -0
- package/dist/components/page/index.d.ts +54 -0
- package/dist/components/page/index.d.ts.map +1 -0
- package/dist/components/page/index.js +100 -0
- package/dist/components/page/index.js.map +1 -0
- package/dist/components/passwordinput/index.d.ts +88 -0
- package/dist/components/passwordinput/index.d.ts.map +1 -0
- package/dist/components/passwordinput/index.js +251 -0
- package/dist/components/passwordinput/index.js.map +1 -0
- package/dist/components/popover/index.d.ts +67 -0
- package/dist/components/popover/index.d.ts.map +1 -0
- package/dist/components/popover/index.js +76 -0
- package/dist/components/popover/index.js.map +1 -0
- package/dist/components/radio/index.d.ts +90 -0
- package/dist/components/radio/index.d.ts.map +1 -0
- package/dist/components/radio/index.js +232 -0
- package/dist/components/radio/index.js.map +1 -0
- package/dist/components/ratinginput/index.d.ts +59 -0
- package/dist/components/ratinginput/index.d.ts.map +1 -0
- package/dist/components/ratinginput/index.js +88 -0
- package/dist/components/ratinginput/index.js.map +1 -0
- package/dist/components/select/index.d.ts +205 -0
- package/dist/components/select/index.d.ts.map +1 -0
- package/dist/components/select/index.js +234 -0
- package/dist/components/select/index.js.map +1 -0
- package/dist/components/skeleton/index.d.ts +19 -0
- package/dist/components/skeleton/index.d.ts.map +1 -0
- package/dist/components/skeleton/index.js +20 -0
- package/dist/components/skeleton/index.js.map +1 -0
- package/dist/components/slider/index.d.ts +72 -0
- package/dist/components/slider/index.d.ts.map +1 -0
- package/dist/components/slider/index.js +159 -0
- package/dist/components/slider/index.js.map +1 -0
- package/dist/components/spinner/index.d.ts +14 -0
- package/dist/components/spinner/index.d.ts.map +1 -0
- package/dist/components/spinner/index.js +15 -0
- package/dist/components/spinner/index.js.map +1 -0
- package/dist/components/splitter/index.d.ts +49 -0
- package/dist/components/splitter/index.d.ts.map +1 -0
- package/dist/components/splitter/index.js +67 -0
- package/dist/components/splitter/index.js.map +1 -0
- package/dist/components/stepper/index.d.ts +82 -0
- package/dist/components/stepper/index.d.ts.map +1 -0
- package/dist/components/stepper/index.js +100 -0
- package/dist/components/stepper/index.js.map +1 -0
- package/dist/components/switch/index.d.ts +57 -0
- package/dist/components/switch/index.d.ts.map +1 -0
- package/dist/components/switch/index.js +101 -0
- package/dist/components/switch/index.js.map +1 -0
- package/dist/components/table/index.d.ts +110 -0
- package/dist/components/table/index.d.ts.map +1 -0
- package/dist/components/table/index.js +211 -0
- package/dist/components/table/index.js.map +1 -0
- package/dist/components/tabs/index.d.ts +67 -0
- package/dist/components/tabs/index.d.ts.map +1 -0
- package/dist/components/tabs/index.js +78 -0
- package/dist/components/tabs/index.js.map +1 -0
- package/dist/components/textarea/index.d.ts +72 -0
- package/dist/components/textarea/index.d.ts.map +1 -0
- package/dist/components/textarea/index.js +205 -0
- package/dist/components/textarea/index.js.map +1 -0
- package/dist/components/textlink/index.d.ts +39 -0
- package/dist/components/textlink/index.d.ts.map +1 -0
- package/dist/components/textlink/index.js +42 -0
- package/dist/components/textlink/index.js.map +1 -0
- package/dist/components/toast/index.d.ts +111 -0
- package/dist/components/toast/index.d.ts.map +1 -0
- package/dist/components/toast/index.js +205 -0
- package/dist/components/toast/index.js.map +1 -0
- package/dist/components/toggle/index.d.ts +41 -0
- package/dist/components/toggle/index.d.ts.map +1 -0
- package/dist/components/toggle/index.js +78 -0
- package/dist/components/toggle/index.js.map +1 -0
- package/dist/components/tooltip/index.d.ts +44 -0
- package/dist/components/tooltip/index.d.ts.map +1 -0
- package/dist/components/tooltip/index.js +51 -0
- package/dist/components/tooltip/index.js.map +1 -0
- package/dist/index.d.ts +50 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +46 -0
- package/dist/index.js.map +1 -0
- package/dist/types/Style.d.ts +14 -0
- package/dist/types/Style.d.ts.map +1 -0
- package/dist/types/Style.js +2 -0
- package/dist/types/Style.js.map +1 -0
- package/dist/types/Tone.d.ts +4 -0
- package/dist/types/Tone.d.ts.map +1 -0
- package/dist/types/Tone.js +2 -0
- package/dist/types/Tone.js.map +1 -0
- package/dist/utils/ArkStateToDataAttributes.d.ts +4 -0
- package/dist/utils/ArkStateToDataAttributes.d.ts.map +1 -0
- package/dist/utils/ArkStateToDataAttributes.js +9 -0
- package/dist/utils/ArkStateToDataAttributes.js.map +1 -0
- package/dist/utils/Tone.d.ts +3 -0
- package/dist/utils/Tone.d.ts.map +1 -0
- package/dist/utils/Tone.js +7 -0
- package/dist/utils/Tone.js.map +1 -0
- package/dist/utils/useForwardClickToInput.d.ts +4 -0
- package/dist/utils/useForwardClickToInput.d.ts.map +1 -0
- package/dist/utils/useForwardClickToInput.js +27 -0
- package/dist/utils/useForwardClickToInput.js.map +1 -0
- package/dist/utils/virtualization/useVirtualizedAutocomplete.d.ts +198 -0
- package/dist/utils/virtualization/useVirtualizedAutocomplete.d.ts.map +1 -0
- package/dist/utils/virtualization/useVirtualizedAutocomplete.js +180 -0
- package/dist/utils/virtualization/useVirtualizedAutocomplete.js.map +1 -0
- package/dist/utils/virtualization/useVirtualizedCombobox.d.ts +200 -0
- package/dist/utils/virtualization/useVirtualizedCombobox.d.ts.map +1 -0
- package/dist/utils/virtualization/useVirtualizedCombobox.js +174 -0
- package/dist/utils/virtualization/useVirtualizedCombobox.js.map +1 -0
- package/dist/utils/virtualization/useVirtualizedTable.d.ts +169 -0
- package/dist/utils/virtualization/useVirtualizedTable.d.ts.map +1 -0
- package/dist/utils/virtualization/useVirtualizedTable.js +127 -0
- package/dist/utils/virtualization/useVirtualizedTable.js.map +1 -0
- package/package.json +64 -4
- package/src/presets/shopify-polaris/shopify-polaris-accordion.css +28 -0
- package/src/presets/shopify-polaris/shopify-polaris-autocomplete.css +155 -0
- package/src/presets/shopify-polaris/shopify-polaris-avatar.css +47 -0
- package/src/presets/shopify-polaris/shopify-polaris-badge.css +27 -0
- package/src/presets/shopify-polaris/shopify-polaris-banner.css +111 -0
- package/src/presets/shopify-polaris/shopify-polaris-breadcrumb.css +16 -0
- package/src/presets/shopify-polaris/shopify-polaris-button.css +79 -0
- package/src/presets/shopify-polaris/shopify-polaris-card.css +28 -0
- package/src/presets/shopify-polaris/shopify-polaris-checkbox.css +52 -0
- package/src/presets/shopify-polaris/shopify-polaris-chip.css +16 -0
- package/src/presets/shopify-polaris/shopify-polaris-combobox.css +179 -0
- package/src/presets/shopify-polaris/shopify-polaris-datepicker.css +183 -0
- package/src/presets/shopify-polaris/shopify-polaris-dialog.css +40 -0
- package/src/presets/shopify-polaris/shopify-polaris-divider.css +12 -0
- package/src/presets/shopify-polaris/shopify-polaris-drawer.css +40 -0
- package/src/presets/shopify-polaris/shopify-polaris-empty.css +32 -0
- package/src/presets/shopify-polaris/shopify-polaris-fileupload.css +78 -0
- package/src/presets/shopify-polaris/shopify-polaris-form.css +8 -0
- package/src/presets/shopify-polaris/shopify-polaris-input.css +72 -0
- package/src/presets/shopify-polaris/shopify-polaris-menu.css +112 -0
- package/src/presets/shopify-polaris/shopify-polaris-metric.css +16 -0
- package/src/presets/shopify-polaris/shopify-polaris-numberinput.css +88 -0
- package/src/presets/shopify-polaris/shopify-polaris-otpinput.css +42 -0
- package/src/presets/shopify-polaris/shopify-polaris-page.css +69 -0
- package/src/presets/shopify-polaris/shopify-polaris-passwordinput.css +76 -0
- package/src/presets/shopify-polaris/shopify-polaris-popover.css +47 -0
- package/src/presets/shopify-polaris/shopify-polaris-radio.css +54 -0
- package/src/presets/shopify-polaris/shopify-polaris-ratinginput.css +42 -0
- package/src/presets/shopify-polaris/shopify-polaris-select.css +119 -0
- package/src/presets/shopify-polaris/shopify-polaris-skeleton.css +8 -0
- package/src/presets/shopify-polaris/shopify-polaris-slider.css +86 -0
- package/src/presets/shopify-polaris/shopify-polaris-spinner.css +16 -0
- package/src/presets/shopify-polaris/shopify-polaris-splitter.css +34 -0
- package/src/presets/shopify-polaris/shopify-polaris-stepper.css +55 -0
- package/src/presets/shopify-polaris/shopify-polaris-switch.css +38 -0
- package/src/presets/shopify-polaris/shopify-polaris-table.css +72 -0
- package/src/presets/shopify-polaris/shopify-polaris-tabs.css +33 -0
- package/src/presets/shopify-polaris/shopify-polaris-textarea.css +61 -0
- package/src/presets/shopify-polaris/shopify-polaris-textlink.css +8 -0
- package/src/presets/shopify-polaris/shopify-polaris-toggle.css +52 -0
- package/src/presets/shopify-polaris/shopify-polaris-tooltip.css +31 -0
- package/src/presets/shopify-polaris/shopify-polaris.css +380 -0
- package/src/presets/shopify-polaris-legacy/shopify-polaris-legacy-accordion.css +28 -0
- package/src/presets/shopify-polaris-legacy/shopify-polaris-legacy-autocomplete.css +155 -0
- package/src/presets/shopify-polaris-legacy/shopify-polaris-legacy-avatar.css +47 -0
- package/src/presets/shopify-polaris-legacy/shopify-polaris-legacy-badge.css +27 -0
- package/src/presets/shopify-polaris-legacy/shopify-polaris-legacy-banner.css +96 -0
- package/src/presets/shopify-polaris-legacy/shopify-polaris-legacy-breadcrumb.css +16 -0
- package/src/presets/shopify-polaris-legacy/shopify-polaris-legacy-button.css +68 -0
- package/src/presets/shopify-polaris-legacy/shopify-polaris-legacy-card.css +28 -0
- package/src/presets/shopify-polaris-legacy/shopify-polaris-legacy-checkbox.css +52 -0
- package/src/presets/shopify-polaris-legacy/shopify-polaris-legacy-chip.css +16 -0
- package/src/presets/shopify-polaris-legacy/shopify-polaris-legacy-combobox.css +184 -0
- package/src/presets/shopify-polaris-legacy/shopify-polaris-legacy-datepicker.css +187 -0
- package/src/presets/shopify-polaris-legacy/shopify-polaris-legacy-dialog.css +40 -0
- package/src/presets/shopify-polaris-legacy/shopify-polaris-legacy-divider.css +12 -0
- package/src/presets/shopify-polaris-legacy/shopify-polaris-legacy-drawer.css +40 -0
- package/src/presets/shopify-polaris-legacy/shopify-polaris-legacy-empty.css +32 -0
- package/src/presets/shopify-polaris-legacy/shopify-polaris-legacy-fileupload.css +72 -0
- package/src/presets/shopify-polaris-legacy/shopify-polaris-legacy-form.css +8 -0
- package/src/presets/shopify-polaris-legacy/shopify-polaris-legacy-input.css +72 -0
- package/src/presets/shopify-polaris-legacy/shopify-polaris-legacy-menu.css +112 -0
- package/src/presets/shopify-polaris-legacy/shopify-polaris-legacy-metric.css +16 -0
- package/src/presets/shopify-polaris-legacy/shopify-polaris-legacy-numberinput.css +88 -0
- package/src/presets/shopify-polaris-legacy/shopify-polaris-legacy-otpinput.css +42 -0
- package/src/presets/shopify-polaris-legacy/shopify-polaris-legacy-page.css +69 -0
- package/src/presets/shopify-polaris-legacy/shopify-polaris-legacy-passwordinput.css +76 -0
- package/src/presets/shopify-polaris-legacy/shopify-polaris-legacy-popover.css +47 -0
- package/src/presets/shopify-polaris-legacy/shopify-polaris-legacy-radio.css +54 -0
- package/src/presets/shopify-polaris-legacy/shopify-polaris-legacy-ratinginput.css +42 -0
- package/src/presets/shopify-polaris-legacy/shopify-polaris-legacy-select.css +118 -0
- package/src/presets/shopify-polaris-legacy/shopify-polaris-legacy-skeleton.css +8 -0
- package/src/presets/shopify-polaris-legacy/shopify-polaris-legacy-slider.css +86 -0
- package/src/presets/shopify-polaris-legacy/shopify-polaris-legacy-spinner.css +16 -0
- package/src/presets/shopify-polaris-legacy/shopify-polaris-legacy-splitter.css +34 -0
- package/src/presets/shopify-polaris-legacy/shopify-polaris-legacy-stepper.css +55 -0
- package/src/presets/shopify-polaris-legacy/shopify-polaris-legacy-switch.css +38 -0
- package/src/presets/shopify-polaris-legacy/shopify-polaris-legacy-table.css +72 -0
- package/src/presets/shopify-polaris-legacy/shopify-polaris-legacy-tabs.css +33 -0
- package/src/presets/shopify-polaris-legacy/shopify-polaris-legacy-textarea.css +61 -0
- package/src/presets/shopify-polaris-legacy/shopify-polaris-legacy-textlink.css +8 -0
- package/src/presets/shopify-polaris-legacy/shopify-polaris-legacy-toast.css +43 -0
- package/src/presets/shopify-polaris-legacy/shopify-polaris-legacy-toggle.css +52 -0
- package/src/presets/shopify-polaris-legacy/shopify-polaris-legacy-tooltip.css +31 -0
- package/src/presets/shopify-polaris-legacy/shopify-polaris-legacy.css +381 -0
|
@@ -0,0 +1,507 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { DatePicker as AriaDatePicker, DateRangePicker as AriaDateRangePicker, RangeCalendar as AriaRangeCalendar, DateRangePickerStateContext, RangeCalendarStateContext, Label as AriaLabel, Group as AriaGroup, DateInput as AriaDateInput, DateSegment as AriaDateSegment, Button as AriaButton, Popover as AriaPopover, Calendar as AriaCalendar, Heading, CalendarGrid, CalendarGridHeader, CalendarHeaderCell, CalendarGridBody, CalendarCell, ListBox, ListBoxItem, SelectionIndicatorContext, useSlottedContext, Text, FieldError, I18nProvider, DatePickerStateContext, CalendarStateContext, DateFieldStateContext, DialogContext, useContextProps, } from 'react-aria-components';
|
|
3
|
+
import { parseDate, toCalendarDate, toCalendar, GregorianCalendar, } from '@internationalized/date';
|
|
4
|
+
import { useLocale, useDateFormatter, mergeProps } from 'react-aria';
|
|
5
|
+
import { cloneElement, createContext, forwardRef, useContext, Fragment, useState, useMemo, } from 'react';
|
|
6
|
+
import { CalendarDays, Check, ChevronLeft, ChevronRight, LoaderCircle, } from 'lucide-react';
|
|
7
|
+
import { twMerge } from 'tailwind-merge';
|
|
8
|
+
import { ToneProvider, useToneContext } from "../../utils/Tone.js";
|
|
9
|
+
const SinglePicker = forwardRef(function SinglePicker({ mode, locale, tone, presets, value, defaultValue, minValue, maxValue, placeholderValue, onValueChange, disabled, readOnly, required, invalid, open, isDateUnavailable, ...props }, ref) {
|
|
10
|
+
return (_jsx(AriaDatePicker, { ...props, isDisabled: disabled, isReadOnly: readOnly, isRequired: required, isInvalid: invalid, isOpen: open, ref: ref, style: { display: 'contents' }, granularity: "day", value: parseDateString(value), defaultValue: parseDateString(defaultValue), minValue: parseDateString(minValue), maxValue: parseDateString(maxValue), placeholderValue: parseDateString(placeholderValue), onChange: (date) => onValueChange?.(date ? toGregorianDateString(date) : null), isDateUnavailable: isDateUnavailable &&
|
|
11
|
+
((date) => isDateUnavailable(toGregorianDateString(date))) }));
|
|
12
|
+
});
|
|
13
|
+
const RangePicker = forwardRef(function RangePicker({ mode, locale, tone, presets, value, defaultValue, minValue, maxValue, placeholderValue, onValueChange, disabled, readOnly, required, invalid, open, isDateUnavailable, ...props }, ref) {
|
|
14
|
+
return (_jsx(AriaDateRangePicker, { ...props, isDisabled: disabled, isReadOnly: readOnly, isRequired: required, isInvalid: invalid, isOpen: open, ref: ref, style: { display: 'contents' }, granularity: "day", value: parseDateRange(value), defaultValue: parseDateRange(defaultValue), minValue: parseDateString(minValue), maxValue: parseDateString(maxValue), placeholderValue: parseDateString(placeholderValue), onChange: (range) => onValueChange?.(range
|
|
15
|
+
? {
|
|
16
|
+
start: toGregorianDateString(range.start),
|
|
17
|
+
end: toGregorianDateString(range.end),
|
|
18
|
+
}
|
|
19
|
+
: null), isDateUnavailable: isDateUnavailable &&
|
|
20
|
+
((date, anchor) => isDateUnavailable(toGregorianDateString(date), anchor ? toGregorianDateString(anchor) : null)) }));
|
|
21
|
+
});
|
|
22
|
+
function Picker({ pickerRef, ...props }) {
|
|
23
|
+
if (props.mode === 'range')
|
|
24
|
+
return _jsx(RangePicker, { ...props, ref: pickerRef });
|
|
25
|
+
return _jsx(SinglePicker, { ...props, ref: pickerRef });
|
|
26
|
+
}
|
|
27
|
+
// Both native roots and the button-only Group stay in the DOM without layout boxes.
|
|
28
|
+
/**
|
|
29
|
+
* Choose one trigger composition: editable InputGroup with segmented inputs and AddonOpenButton, OR OpenButton containing OpenButtonValue and OpenButtonIcon. Do not render both trigger compositions. Both share Popup → Calendar → Actions and TablesList → Table. PresetsList is optional.
|
|
30
|
+
*
|
|
31
|
+
* @example Complete composition
|
|
32
|
+
* import { DatePicker } from '@central-ui/react'
|
|
33
|
+
*
|
|
34
|
+
* function Example() {
|
|
35
|
+
* return (
|
|
36
|
+
* <DatePicker.Root defaultValue="2026-10-15" name="departure">
|
|
37
|
+
* <DatePicker.Container>
|
|
38
|
+
* <DatePicker.Label>Departure</DatePicker.Label>
|
|
39
|
+
* <DatePicker.InputGroup>
|
|
40
|
+
* <DatePicker.Input>
|
|
41
|
+
* {(segment) => <DatePicker.Segment segment={segment} />}
|
|
42
|
+
* </DatePicker.Input>
|
|
43
|
+
* <DatePicker.Addon>
|
|
44
|
+
* <DatePicker.AddonOpenButton>
|
|
45
|
+
* <DatePicker.AddonOpenButtonIcon />
|
|
46
|
+
* </DatePicker.AddonOpenButton>
|
|
47
|
+
* </DatePicker.Addon>
|
|
48
|
+
* </DatePicker.InputGroup>
|
|
49
|
+
* <DatePicker.Popup>
|
|
50
|
+
* <DatePicker.Calendar>
|
|
51
|
+
* <DatePicker.Actions>
|
|
52
|
+
* <DatePicker.PreviousButton>
|
|
53
|
+
* <DatePicker.PreviousButtonIcon />
|
|
54
|
+
* </DatePicker.PreviousButton>
|
|
55
|
+
* <DatePicker.ViewDateValue />
|
|
56
|
+
* <DatePicker.NextButton>
|
|
57
|
+
* <DatePicker.NextButtonIcon />
|
|
58
|
+
* </DatePicker.NextButton>
|
|
59
|
+
* </DatePicker.Actions>
|
|
60
|
+
* <DatePicker.TablesList>
|
|
61
|
+
* {(index) => <DatePicker.Table key={index} index={index} />}
|
|
62
|
+
* </DatePicker.TablesList>
|
|
63
|
+
* </DatePicker.Calendar>
|
|
64
|
+
* </DatePicker.Popup>
|
|
65
|
+
* </DatePicker.Container>
|
|
66
|
+
* </DatePicker.Root>
|
|
67
|
+
* )
|
|
68
|
+
* }
|
|
69
|
+
*
|
|
70
|
+
* @example Button-only trigger instead of editable inputs
|
|
71
|
+
* // Replace InputGroup entirely. Keep the same Popup and calendar nesting from above.
|
|
72
|
+
* ;<DatePicker.OpenButton>
|
|
73
|
+
* <DatePicker.OpenButtonValue />
|
|
74
|
+
* <DatePicker.OpenButtonIcon />
|
|
75
|
+
* </DatePicker.OpenButton>
|
|
76
|
+
*
|
|
77
|
+
* @example Editable date range instead of a single date
|
|
78
|
+
* // Use Root mode="range". Replace its single Input with these fields inside InputGroup.
|
|
79
|
+
* ;<DatePicker.InputsList>
|
|
80
|
+
* <DatePicker.Input target="start">
|
|
81
|
+
* {(segment) => <DatePicker.Segment segment={segment} />}
|
|
82
|
+
* </DatePicker.Input>
|
|
83
|
+
* <DatePicker.InputsListSeparator>to</DatePicker.InputsListSeparator>
|
|
84
|
+
* <DatePicker.Input target="end">
|
|
85
|
+
* {(segment) => <DatePicker.Segment segment={segment} />}
|
|
86
|
+
* </DatePicker.Input>
|
|
87
|
+
* </DatePicker.InputsList>
|
|
88
|
+
*
|
|
89
|
+
* @example Optional presets and multiple visible months
|
|
90
|
+
* // Supply presets on Root; put PresetsList before Actions inside Calendar.
|
|
91
|
+
* // Calendar visibleDuration={{ months: 2 }} makes TablesList produce two table indices.
|
|
92
|
+
* ;<DatePicker.PresetsList>
|
|
93
|
+
* {(presets) =>
|
|
94
|
+
* presets.map((preset) => (
|
|
95
|
+
* <DatePicker.Item key={preset.label} value={preset.value} textValue={preset.label}>
|
|
96
|
+
* <DatePicker.ItemText>{preset.label}</DatePicker.ItemText>
|
|
97
|
+
* <DatePicker.ItemIndicator />
|
|
98
|
+
* </DatePicker.Item>
|
|
99
|
+
* ))
|
|
100
|
+
* }
|
|
101
|
+
* </DatePicker.PresetsList>
|
|
102
|
+
*/
|
|
103
|
+
export const Root = forwardRef(function Root(props, ref) {
|
|
104
|
+
const [buttonAnchor, setButtonAnchor] = useState(null);
|
|
105
|
+
const buttonAnchorRef = useMemo(() => ({ current: buttonAnchor }), [buttonAnchor]);
|
|
106
|
+
return (_jsx(I18nProvider, { locale: props.locale ?? 'en-US', children: _jsx(ToneProvider, { value: props.tone ?? 'neutral', children: _jsx(ConfigurationContext.Provider, { value: {
|
|
107
|
+
mode: props.mode ?? 'single',
|
|
108
|
+
presets: props.presets ?? [],
|
|
109
|
+
buttonAnchorRef,
|
|
110
|
+
setButtonAnchor,
|
|
111
|
+
disabled: props.disabled ?? false,
|
|
112
|
+
readOnly: props.readOnly ?? false,
|
|
113
|
+
}, children: _jsx(Picker, { ...props, pickerRef: ref }) }) }) }));
|
|
114
|
+
});
|
|
115
|
+
export function Container({ disableStyle, className, ...props }) {
|
|
116
|
+
return (_jsx("div", { ...props, ...usePartAttributes(), "data-component": "datepicker-container", "data-style-disabled": disableStyle ? '' : undefined, className: className }));
|
|
117
|
+
}
|
|
118
|
+
export function Label({ disableStyle, className, ...props }) {
|
|
119
|
+
return (_jsx(AriaLabel, { ...props, ...usePartAttributes(), "data-component": "datepicker-label", "data-style-disabled": disableStyle ? '' : undefined, className: className }));
|
|
120
|
+
}
|
|
121
|
+
export function InputGroup({ disableStyle, className, ...props }) {
|
|
122
|
+
return (_jsx(AriaGroup, { ...props, ...usePartAttributes(), "data-component": "datepicker-inputgroup", "data-style-disabled": disableStyle ? '' : undefined, className: className }));
|
|
123
|
+
}
|
|
124
|
+
export function Addon({ disableStyle, className, variant = 'normal', ...props }) {
|
|
125
|
+
return (_jsx("div", { ...props, ...usePartAttributes(), "data-variant": variant, "data-component": "datepicker-addon", "data-style-disabled": disableStyle ? '' : undefined, className: className }));
|
|
126
|
+
}
|
|
127
|
+
export function AddonText({ disableStyle, className, ...props }) {
|
|
128
|
+
return (_jsx("span", { ...props, ...usePartAttributes(), "data-component": "datepicker-addontext", "data-style-disabled": disableStyle ? '' : undefined, className: className }));
|
|
129
|
+
}
|
|
130
|
+
/** Supply the decorative icon as a child. Its classes are preserved; interaction belongs to the surrounding control. */
|
|
131
|
+
export function AddonIcon({ disableStyle, children, className, ...props }) {
|
|
132
|
+
return cloneElement(children, {
|
|
133
|
+
...children.props,
|
|
134
|
+
...props,
|
|
135
|
+
...usePartAttributes(),
|
|
136
|
+
'aria-hidden': true,
|
|
137
|
+
...{
|
|
138
|
+
'data-component': 'datepicker-addonicon',
|
|
139
|
+
'data-style-disabled': disableStyle ? '' : undefined,
|
|
140
|
+
},
|
|
141
|
+
className: twMerge(children.props.className, className),
|
|
142
|
+
strokeWidth: props.strokeWidth ?? children.props.strokeWidth ?? 1.5,
|
|
143
|
+
});
|
|
144
|
+
}
|
|
145
|
+
/** A default icon is supplied. Omit children for the usual case; pass an icon only to replace that visual. */
|
|
146
|
+
export function AddonLoadingIcon({ disableStyle, children = _jsx(LoaderCircle, {}), className, ...props }) {
|
|
147
|
+
return cloneElement(children, {
|
|
148
|
+
...children.props,
|
|
149
|
+
...props,
|
|
150
|
+
...usePartAttributes(),
|
|
151
|
+
'aria-hidden': true,
|
|
152
|
+
...{
|
|
153
|
+
'data-component': 'datepicker-addonloadingicon',
|
|
154
|
+
'data-style-disabled': disableStyle ? '' : undefined,
|
|
155
|
+
},
|
|
156
|
+
className: twMerge(children.props.className, className),
|
|
157
|
+
strokeWidth: props.strokeWidth ?? children.props.strokeWidth ?? 1.5,
|
|
158
|
+
});
|
|
159
|
+
}
|
|
160
|
+
export function AddonButton({ disableStyle, className, disabled, type = 'button', ...props }) {
|
|
161
|
+
const attributes = usePartAttributes();
|
|
162
|
+
return (_jsx("button", { ...props, ...attributes, type: type, disabled: disabled || attributes['data-disabled'] || attributes['data-readonly'], "data-component": "datepicker-addonbutton", "data-style-disabled": disableStyle ? '' : undefined, className: className }));
|
|
163
|
+
}
|
|
164
|
+
export function InputsList({ disableStyle, className, ...props }) {
|
|
165
|
+
return (_jsx("div", { ...props, "data-component": "datepicker-inputslist", "data-style-disabled": disableStyle ? '' : undefined, className: className }));
|
|
166
|
+
}
|
|
167
|
+
export function InputsListSeparator({ disableStyle, children = '-', className, ...props }) {
|
|
168
|
+
return (_jsx("span", { ...props, "aria-hidden": "true", "data-component": "datepicker-inputslistseparator", "data-style-disabled": disableStyle ? '' : undefined, className: className, children: children }));
|
|
169
|
+
}
|
|
170
|
+
export function Input({ disableStyle, target, className, ...props }) {
|
|
171
|
+
return (_jsx(AriaDateInput, { ...props, slot: target, "data-component": "datepicker-input", "data-style-disabled": disableStyle ? '' : undefined, "data-range-input": target ? '' : undefined, className: className }));
|
|
172
|
+
}
|
|
173
|
+
/** Pass the segment from Input children. Editing, focus movement, and placeholder content are handled automatically. */
|
|
174
|
+
export function Segment({ disableStyle, segment, className, ...props }) {
|
|
175
|
+
const field = useContext(DateFieldStateContext);
|
|
176
|
+
let text = segment.text;
|
|
177
|
+
if (segment.type === 'literal') {
|
|
178
|
+
const index = field.segments.indexOf(segment);
|
|
179
|
+
const previous = field.segments
|
|
180
|
+
.slice(0, index)
|
|
181
|
+
.map((part) => part.isEditable)
|
|
182
|
+
.lastIndexOf(true);
|
|
183
|
+
const next = field.segments.slice(index + 1).some((part) => part.isEditable);
|
|
184
|
+
// Literals may contain locale suffixes or invisible bidi controls. Emit one hyphen
|
|
185
|
+
// between editable segments, remove suffixes, and retain the direction controls.
|
|
186
|
+
const direction = text.replace(/[^\u061c\u200e\u200f\u202a-\u202e\u2066-\u2069]/g, '');
|
|
187
|
+
text =
|
|
188
|
+
direction + (previous >= 0 && next && index === previous + 1 ? '-' : '');
|
|
189
|
+
}
|
|
190
|
+
return (_jsx(AriaDateSegment, { ...props, segment: segment, "data-component": "datepicker-segment", "data-style-disabled": disableStyle ? '' : undefined, className: className, children: text }));
|
|
191
|
+
}
|
|
192
|
+
export function AddonOpenButton({ disableStyle, className, isDisabled, ...props }) {
|
|
193
|
+
return (_jsx(AriaButton, { isDisabled: isDisabled || undefined, ...props, ...usePartAttributes(), "data-component": "datepicker-addonopenbutton", "data-style-disabled": disableStyle ? '' : undefined, className: className }));
|
|
194
|
+
}
|
|
195
|
+
/** A default icon is supplied. Omit children for the usual case; pass an icon only to replace that visual. */
|
|
196
|
+
export function AddonOpenButtonIcon({ disableStyle, children = _jsx(CalendarDays, {}), className, ...props }) {
|
|
197
|
+
return cloneElement(children, {
|
|
198
|
+
...children.props,
|
|
199
|
+
...props,
|
|
200
|
+
...usePartAttributes(),
|
|
201
|
+
'aria-hidden': true,
|
|
202
|
+
...{
|
|
203
|
+
'data-component': 'datepicker-addonopenbuttonicon',
|
|
204
|
+
'data-style-disabled': disableStyle ? '' : undefined,
|
|
205
|
+
},
|
|
206
|
+
className: twMerge(children.props.className, className),
|
|
207
|
+
strokeWidth: props.strokeWidth ?? children.props.strokeWidth ?? 2,
|
|
208
|
+
});
|
|
209
|
+
}
|
|
210
|
+
/** Behavior only: give your child control this action. Style the child itself; this wrapper has no preset appearance or disableStyle prop. */
|
|
211
|
+
export function AddonOpenHandler({ children, isDisabled, ...props }) {
|
|
212
|
+
return (_jsx(AriaButton, { isDisabled: isDisabled || undefined, ...props, render: (buttonProps) => renderButtonChild(children, buttonProps) }));
|
|
213
|
+
}
|
|
214
|
+
export function OpenButton({ disableStyle, className, isDisabled, ...props }) {
|
|
215
|
+
const { setButtonAnchor } = useContext(ConfigurationContext);
|
|
216
|
+
return (_jsx(AriaGroup, { style: { display: 'contents' }, children: _jsx(AriaButton, { isDisabled: isDisabled || undefined, ...props, ref: setButtonAnchor, ...usePartAttributes(), "data-component": "datepicker-openbutton", "data-style-disabled": disableStyle ? '' : undefined, className: className }) }));
|
|
217
|
+
}
|
|
218
|
+
/** Behavior only: give your child control this action. Style the child itself; this wrapper has no preset appearance or disableStyle prop. */
|
|
219
|
+
export function OpenHandler({ children, isDisabled, ...props }) {
|
|
220
|
+
const { setButtonAnchor } = useContext(ConfigurationContext);
|
|
221
|
+
return (_jsx(AriaGroup, { style: { display: 'contents' }, children: _jsx(AriaButton, { isDisabled: isDisabled || undefined, ...props, ref: setButtonAnchor, render: (buttonProps) => renderButtonChild(children, buttonProps) }) }));
|
|
222
|
+
}
|
|
223
|
+
/** Formats the selected date or range automatically. Omit children for the usual display; supply children only to replace it. Placeholder appears before selection. */
|
|
224
|
+
export function OpenButtonValue({ disableStyle, children, placeholder = 'Select date', className, ...props }) {
|
|
225
|
+
const single = useContext(DatePickerStateContext);
|
|
226
|
+
const range = useContext(DateRangePickerStateContext);
|
|
227
|
+
const { mode } = useContext(ConfigurationContext);
|
|
228
|
+
const { locale } = useLocale();
|
|
229
|
+
return (_jsx("span", { ...props, ...usePartAttributes(), "data-component": "datepicker-openbuttonvalue", "data-style-disabled": disableStyle ? '' : undefined, className: className, children: children ??
|
|
230
|
+
(() => {
|
|
231
|
+
if (mode === 'range') {
|
|
232
|
+
if (!range?.value.start || !range.value.end)
|
|
233
|
+
return placeholder;
|
|
234
|
+
const formatted = range.formatValue(locale, {
|
|
235
|
+
day: 'numeric',
|
|
236
|
+
month: 'long',
|
|
237
|
+
year: 'numeric',
|
|
238
|
+
});
|
|
239
|
+
return formatted
|
|
240
|
+
? formatted.start + ' — ' + formatted.end
|
|
241
|
+
: placeholder;
|
|
242
|
+
}
|
|
243
|
+
return single?.value
|
|
244
|
+
? single.formatValue(locale, {
|
|
245
|
+
day: 'numeric',
|
|
246
|
+
month: 'long',
|
|
247
|
+
year: 'numeric',
|
|
248
|
+
})
|
|
249
|
+
: placeholder;
|
|
250
|
+
})() }));
|
|
251
|
+
}
|
|
252
|
+
/** A default icon is supplied. Omit children for the usual case; pass an icon only to replace that visual. */
|
|
253
|
+
export function OpenButtonIcon({ disableStyle, children = _jsx(CalendarDays, {}), className, ...props }) {
|
|
254
|
+
return cloneElement(children, {
|
|
255
|
+
...children.props,
|
|
256
|
+
...props,
|
|
257
|
+
'aria-hidden': true,
|
|
258
|
+
...{
|
|
259
|
+
'data-component': 'datepicker-openbuttonicon',
|
|
260
|
+
'data-style-disabled': disableStyle ? '' : undefined,
|
|
261
|
+
},
|
|
262
|
+
className: twMerge(children.props.className, className),
|
|
263
|
+
strokeWidth: props.strokeWidth ?? children.props.strokeWidth ?? 1.5,
|
|
264
|
+
});
|
|
265
|
+
}
|
|
266
|
+
/** Use the same calendar composition for both trigger choices. Opening and focus management are handled by the picker; do not add your own popup visibility condition. */
|
|
267
|
+
export const Popup = forwardRef(function Popup({ disableStyle, ...props }, ref) {
|
|
268
|
+
// The Popover supplies dialog semantics itself. Merge DatePicker's generated dialog
|
|
269
|
+
// id/labeling onto that same element instead of adding another Dialog wrapper.
|
|
270
|
+
const { buttonAnchorRef } = useContext(ConfigurationContext);
|
|
271
|
+
const [mergedProps, mergedRef] = useContextProps(props, ref, DialogContext);
|
|
272
|
+
const { className, style, placement = 'bottom end', offset = 5, ...rest } = mergedProps;
|
|
273
|
+
return (_jsx(AriaPopover, { ...(buttonAnchorRef?.current ? { triggerRef: buttonAnchorRef } : {}), ...rest, ref: mergedRef, placement: placement, offset: offset, style: { minWidth: 'var(--trigger-width)', ...style }, "data-component": "datepicker-popup", "data-style-disabled": disableStyle ? '' : undefined, className: className }));
|
|
274
|
+
});
|
|
275
|
+
function SingleCalendar({ disableStyle, className, focusedValue, defaultFocusedValue, onFocusChange, ...props }) {
|
|
276
|
+
return (_jsx(AriaCalendar, { ...props, firstDayOfWeek: "mon", pageBehavior: "single", focusedValue: parseDateString(focusedValue), defaultFocusedValue: parseDateString(defaultFocusedValue), onFocusChange: onFocusChange && ((date) => onFocusChange(toGregorianDateString(date))), "data-component": "datepicker-calendar", "data-style-disabled": disableStyle ? '' : undefined, className: className }));
|
|
277
|
+
}
|
|
278
|
+
function RangeCalendar({ disableStyle, className, focusedValue, defaultFocusedValue, onFocusChange, ...props }) {
|
|
279
|
+
return (_jsx(AriaRangeCalendar, { ...props, firstDayOfWeek: "mon", pageBehavior: "single", focusedValue: parseDateString(focusedValue), defaultFocusedValue: parseDateString(defaultFocusedValue), onFocusChange: onFocusChange && ((date) => onFocusChange(toGregorianDateString(date))), "data-component": "datepicker-calendar", "data-style-disabled": disableStyle ? '' : undefined, className: className }));
|
|
280
|
+
}
|
|
281
|
+
/** Chooses the single-date or range calendar from Root mode automatically. Keep Actions and TablesList inside; do not render separate calendars for each mode. */
|
|
282
|
+
export function Calendar(props) {
|
|
283
|
+
const { mode } = useContext(ConfigurationContext);
|
|
284
|
+
if (mode === 'range')
|
|
285
|
+
return _jsx(RangeCalendar, { ...props });
|
|
286
|
+
return _jsx(SingleCalendar, { ...props });
|
|
287
|
+
}
|
|
288
|
+
/** Optional shortcut list. Its children callback receives all presets from Root once; map them to Item. Item handles applying the chosen value. */
|
|
289
|
+
export function PresetsList({ disableStyle, className, children, ...props }) {
|
|
290
|
+
const { presets, mode } = useContext(ConfigurationContext);
|
|
291
|
+
const single = useContext(DatePickerStateContext);
|
|
292
|
+
const range = useContext(DateRangePickerStateContext);
|
|
293
|
+
const selectedValue = mode === 'range'
|
|
294
|
+
? range?.value.start && range.value.end
|
|
295
|
+
? {
|
|
296
|
+
start: toGregorianDateString(range.value.start),
|
|
297
|
+
end: toGregorianDateString(range.value.end),
|
|
298
|
+
}
|
|
299
|
+
: null
|
|
300
|
+
: single?.value
|
|
301
|
+
? toGregorianDateString(single.value)
|
|
302
|
+
: null;
|
|
303
|
+
const selectedPreset = presets.find((preset) => samePresetValue(preset.value, selectedValue));
|
|
304
|
+
return (_jsx(ListBox, { "aria-label": "Presets", ...props, selectionMode: "single", disallowEmptySelection: true, selectedKeys: selectedPreset ? [selectedPreset.label] : [], onSelectionChange: (keys) => {
|
|
305
|
+
if (keys === 'all')
|
|
306
|
+
return;
|
|
307
|
+
const key = keys.values().next().value;
|
|
308
|
+
const preset = presets.find((preset) => preset.label === key);
|
|
309
|
+
if (!preset)
|
|
310
|
+
return;
|
|
311
|
+
if (typeof preset.value === 'string') {
|
|
312
|
+
single.setDateValue(parseDateString(preset.value));
|
|
313
|
+
}
|
|
314
|
+
else {
|
|
315
|
+
range.setDateRange(parseDateRange(preset.value));
|
|
316
|
+
}
|
|
317
|
+
}, "data-component": "datepicker-presetslist", "data-style-disabled": disableStyle ? '' : undefined, className: className, children: children(presets) }));
|
|
318
|
+
}
|
|
319
|
+
export function Item({ disableStyle, value, className, textValue, ...props }) {
|
|
320
|
+
const calendar = useActiveCalendarState();
|
|
321
|
+
const { presets } = useContext(ConfigurationContext);
|
|
322
|
+
const dates = typeof value === 'string'
|
|
323
|
+
? [parseDateString(value)]
|
|
324
|
+
: [parseDateString(value.start), parseDateString(value.end)];
|
|
325
|
+
// Distinct presets may resolve to the same date (e.g. Today and First of this week).
|
|
326
|
+
// Their labels identify options; their date values still control the actual picker.
|
|
327
|
+
const label = textValue ??
|
|
328
|
+
presets.find((preset) => samePresetValue(preset.value, value))?.label;
|
|
329
|
+
return (_jsx(ListBoxItem, { ...props, id: label ??
|
|
330
|
+
(typeof value === 'string' ? value : value.start + '/' + value.end), textValue: label, isDisabled: calendar.isDisabled ||
|
|
331
|
+
calendar.isReadOnly ||
|
|
332
|
+
dates.some((date) => calendar.isInvalid(date) || calendar.isCellUnavailable(date)), "data-component": "datepicker-item", "data-style-disabled": disableStyle ? '' : undefined, className: className }));
|
|
333
|
+
}
|
|
334
|
+
export const ItemText = forwardRef(function ItemText({ disableStyle, className, ...props }, ref) {
|
|
335
|
+
return (_jsx(Text, { ...props, ref: ref, slot: "label", "data-component": "datepicker-itemtext", "data-style-disabled": disableStyle ? '' : undefined, className: className }));
|
|
336
|
+
});
|
|
337
|
+
/** Tracks the surrounding item state automatically. Keep it mounted; do not add your own visibility condition. Use the supplied default visual unless customization is needed. */
|
|
338
|
+
export const ItemIndicator = forwardRef(function ItemIndicator({ disableStyle, children, ...props }, ref) {
|
|
339
|
+
// ListBoxItem supplies this public Aria context, including for controlled selection.
|
|
340
|
+
// Read visibility directly so no measured div or shared-element animation is needed.
|
|
341
|
+
const selection = useSlottedContext(SelectionIndicatorContext);
|
|
342
|
+
if (!selection?.isSelected)
|
|
343
|
+
return null;
|
|
344
|
+
const iconProps = {
|
|
345
|
+
'aria-hidden': true,
|
|
346
|
+
strokeWidth: 2,
|
|
347
|
+
...props,
|
|
348
|
+
ref,
|
|
349
|
+
'data-rac': '',
|
|
350
|
+
'data-selected': true,
|
|
351
|
+
'data-component': 'datepicker-itemindicator',
|
|
352
|
+
'data-style-disabled': disableStyle ? '' : undefined,
|
|
353
|
+
};
|
|
354
|
+
return cloneElement(children ?? _jsx(Check, {}), iconProps);
|
|
355
|
+
});
|
|
356
|
+
export function Actions({ disableStyle, className, ...props }) {
|
|
357
|
+
return (_jsx("div", { ...props, "data-component": "datepicker-actions", "data-style-disabled": disableStyle ? '' : undefined, className: className }));
|
|
358
|
+
}
|
|
359
|
+
export function ViewDateValue({ disableStyle, className, level, ...props }) {
|
|
360
|
+
const calendar = useActiveCalendarState();
|
|
361
|
+
const formatter = useDateFormatter({
|
|
362
|
+
month: 'long',
|
|
363
|
+
year: 'numeric',
|
|
364
|
+
calendar: calendar.visibleRange.start.calendar.identifier,
|
|
365
|
+
timeZone: calendar.timeZone,
|
|
366
|
+
});
|
|
367
|
+
return (_jsx(Heading, { ...props, level: level, "data-component": "datepicker-viewdatevalue", "data-style-disabled": disableStyle ? '' : undefined, className: className, children: Array.from({ length: calendar.visibleDuration.months ?? 1 }, (_, index) => formatter.format(calendar.visibleRange.start
|
|
368
|
+
.add({ months: index })
|
|
369
|
+
.toDate(calendar.timeZone))).join(' - ') }));
|
|
370
|
+
}
|
|
371
|
+
export function PreviousButton({ disableStyle, className, isDisabled, ...props }) {
|
|
372
|
+
return (_jsx(AriaButton, { isDisabled: isDisabled || undefined, ...props, slot: "previous", "data-component": "datepicker-previousbutton", "data-style-disabled": disableStyle ? '' : undefined, className: className }));
|
|
373
|
+
}
|
|
374
|
+
export function NextButton({ disableStyle, className, isDisabled, ...props }) {
|
|
375
|
+
return (_jsx(AriaButton, { isDisabled: isDisabled || undefined, ...props, slot: "next", "data-component": "datepicker-nextbutton", "data-style-disabled": disableStyle ? '' : undefined, className: className }));
|
|
376
|
+
}
|
|
377
|
+
/** Behavior only: give your child control this action. Style the child itself; this wrapper has no preset appearance or disableStyle prop. */
|
|
378
|
+
export function PreviousHandler({ children, isDisabled, ...props }) {
|
|
379
|
+
return (_jsx(AriaButton, { isDisabled: isDisabled || undefined, ...props, slot: "previous", render: (buttonProps) => renderButtonChild(children, buttonProps) }));
|
|
380
|
+
}
|
|
381
|
+
/** Behavior only: give your child control this action. Style the child itself; this wrapper has no preset appearance or disableStyle prop. */
|
|
382
|
+
export function NextHandler({ children, isDisabled, ...props }) {
|
|
383
|
+
return (_jsx(AriaButton, { isDisabled: isDisabled || undefined, ...props, slot: "next", render: (buttonProps) => renderButtonChild(children, buttonProps) }));
|
|
384
|
+
}
|
|
385
|
+
/** A default icon is supplied. Omit children for the usual case; pass an icon only to replace that visual. */
|
|
386
|
+
export function PreviousButtonIcon({ disableStyle, children = _jsx(ChevronLeft, {}), className, ...props }) {
|
|
387
|
+
const calendar = useActiveCalendarState();
|
|
388
|
+
return cloneElement(children, {
|
|
389
|
+
...children.props,
|
|
390
|
+
...props,
|
|
391
|
+
'aria-hidden': true,
|
|
392
|
+
...{
|
|
393
|
+
'data-disabled': calendar.isDisabled ||
|
|
394
|
+
calendar.isPreviousVisibleRangeInvalid() ||
|
|
395
|
+
undefined,
|
|
396
|
+
},
|
|
397
|
+
...{
|
|
398
|
+
'data-component': 'datepicker-previousbuttonicon',
|
|
399
|
+
'data-style-disabled': disableStyle ? '' : undefined,
|
|
400
|
+
},
|
|
401
|
+
className: twMerge(children.props.className, className),
|
|
402
|
+
strokeWidth: props.strokeWidth ?? children.props.strokeWidth ?? 2,
|
|
403
|
+
});
|
|
404
|
+
}
|
|
405
|
+
/** A default icon is supplied. Omit children for the usual case; pass an icon only to replace that visual. */
|
|
406
|
+
export function NextButtonIcon({ disableStyle, children = _jsx(ChevronRight, {}), className, ...props }) {
|
|
407
|
+
const calendar = useActiveCalendarState();
|
|
408
|
+
return cloneElement(children, {
|
|
409
|
+
...children.props,
|
|
410
|
+
...props,
|
|
411
|
+
'aria-hidden': true,
|
|
412
|
+
...{
|
|
413
|
+
'data-disabled': calendar.isDisabled ||
|
|
414
|
+
calendar.isNextVisibleRangeInvalid() ||
|
|
415
|
+
undefined,
|
|
416
|
+
},
|
|
417
|
+
...{
|
|
418
|
+
'data-component': 'datepicker-nextbuttonicon',
|
|
419
|
+
'data-style-disabled': disableStyle ? '' : undefined,
|
|
420
|
+
},
|
|
421
|
+
className: twMerge(children.props.className, className),
|
|
422
|
+
strokeWidth: props.strokeWidth ?? children.props.strokeWidth ?? 2,
|
|
423
|
+
});
|
|
424
|
+
}
|
|
425
|
+
/** Calls children for each visible month. Pass its index to Table rather than manually calculating month offsets. */
|
|
426
|
+
export function TablesList({ disableStyle, className, children, ...props }) {
|
|
427
|
+
const calendar = useActiveCalendarState();
|
|
428
|
+
return (_jsx("div", { ...props, "data-component": "datepicker-tableslist", "data-style-disabled": disableStyle ? '' : undefined, className: className, children: Array.from({ length: calendar.visibleDuration.months ?? 1 }, (_, index) => (_jsx(Fragment, { children: children(index) }, index))) }));
|
|
429
|
+
}
|
|
430
|
+
/** Renders weekday headings and day cells automatically. Pass the index from TablesList; do not map individual dates yourself. */
|
|
431
|
+
export function Table({ disableStyle, index = 0, className, ...props }) {
|
|
432
|
+
const { mode } = useContext(ConfigurationContext);
|
|
433
|
+
return (_jsxs(CalendarGrid, { ...props, offset: { months: index }, "data-component": "datepicker-table", "data-style-disabled": disableStyle ? '' : undefined, className: className, children: [_jsx(CalendarGridHeader, { children: (day) => (_jsx(CalendarHeaderCell, { "data-component": "datepicker-table-1", children: day })) }), _jsx(CalendarGridBody, { children: (date) => (_jsx(CalendarCell, { date: date, "data-mode": mode, "data-component": "datepicker-table-2" })) })] }));
|
|
434
|
+
}
|
|
435
|
+
export function Description({ disableStyle, className, ...props }) {
|
|
436
|
+
return (_jsx(Text, { ...props, ...usePartAttributes(), slot: "description", "data-component": "datepicker-description", "data-style-disabled": disableStyle ? '' : undefined, className: className }));
|
|
437
|
+
}
|
|
438
|
+
/** Keep mounted to let the picker render its validation error automatically. Omit children for the native error text; override only for a custom message. */
|
|
439
|
+
export function Error({ disableStyle, className, ...props }) {
|
|
440
|
+
return (_jsx(FieldError, { ...props, ...usePartAttributes(), "data-component": "datepicker-error", "data-style-disabled": disableStyle ? '' : undefined, className: className }));
|
|
441
|
+
}
|
|
442
|
+
/** You decide when to show this feedback. Changing tone does not validate data or render the message for you. */
|
|
443
|
+
export function Success({ disableStyle, className, ...props }) {
|
|
444
|
+
return (_jsx(Text, { role: "status", ...props, ...usePartAttributes(), slot: "description", "data-component": "datepicker-success", "data-style-disabled": disableStyle ? '' : undefined, className: className }));
|
|
445
|
+
}
|
|
446
|
+
const ConfigurationContext = createContext({ mode: 'single', presets: [], disabled: false, readOnly: false });
|
|
447
|
+
function usePartAttributes() {
|
|
448
|
+
const single = useContext(DatePickerStateContext);
|
|
449
|
+
const range = useContext(DateRangePickerStateContext);
|
|
450
|
+
const configuration = useContext(ConfigurationContext);
|
|
451
|
+
const tone = useToneContext();
|
|
452
|
+
const state = configuration.mode === 'range' ? range : single;
|
|
453
|
+
return {
|
|
454
|
+
'data-tone': tone,
|
|
455
|
+
'data-disabled': configuration.disabled || undefined,
|
|
456
|
+
'data-readonly': configuration.readOnly || undefined,
|
|
457
|
+
'data-open': state.isOpen || undefined,
|
|
458
|
+
'data-invalid': state.isInvalid || undefined,
|
|
459
|
+
};
|
|
460
|
+
}
|
|
461
|
+
function parseDateString(value) {
|
|
462
|
+
if (value == null)
|
|
463
|
+
return value;
|
|
464
|
+
if (value.length !== 10)
|
|
465
|
+
throw new globalThis.Error('DatePicker dates must use YYYY-MM-DD.');
|
|
466
|
+
return parseDate(value);
|
|
467
|
+
}
|
|
468
|
+
/** Returns a Gregorian YYYY-MM-DD string, without a time or time zone.
|
|
469
|
+
* Calendar interactions may produce dates in the locale's calendar system;
|
|
470
|
+
* normalize them so callbacks and preset comparisons use the same stored format.
|
|
471
|
+
*/
|
|
472
|
+
function toGregorianDateString(date) {
|
|
473
|
+
return toCalendar(toCalendarDate(date), new GregorianCalendar()).toString();
|
|
474
|
+
}
|
|
475
|
+
/** Passes Aria's generated button behavior and ref to the supplied child.
|
|
476
|
+
* Merge events and classes, and keep the child's contents without another DOM element.
|
|
477
|
+
*/
|
|
478
|
+
function renderButtonChild(child, buttonProps) {
|
|
479
|
+
return cloneElement(child, mergeProps(child.props, buttonProps, {
|
|
480
|
+
className: twMerge(buttonProps.className, child.props.className),
|
|
481
|
+
children: child.props.children,
|
|
482
|
+
}));
|
|
483
|
+
}
|
|
484
|
+
// Both hooks are always read; mode selects the context supplied by this Root.
|
|
485
|
+
function useActiveCalendarState() {
|
|
486
|
+
const single = useContext(CalendarStateContext);
|
|
487
|
+
const range = useContext(RangeCalendarStateContext);
|
|
488
|
+
const { mode } = useContext(ConfigurationContext);
|
|
489
|
+
return mode === 'range' ? range : single;
|
|
490
|
+
}
|
|
491
|
+
function samePresetValue(a, b) {
|
|
492
|
+
if (typeof a === 'string')
|
|
493
|
+
return a === b;
|
|
494
|
+
return (b !== null &&
|
|
495
|
+
typeof b !== 'string' &&
|
|
496
|
+
a.start === b.start &&
|
|
497
|
+
a.end === b.end);
|
|
498
|
+
}
|
|
499
|
+
function parseDateRange(value) {
|
|
500
|
+
if (value == null)
|
|
501
|
+
return value;
|
|
502
|
+
return {
|
|
503
|
+
start: parseDateString(value.start),
|
|
504
|
+
end: parseDateString(value.end),
|
|
505
|
+
};
|
|
506
|
+
}
|
|
507
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/datepicker/index.tsx"],"names":[],"mappings":";AACA,OAAO,EACL,UAAU,IAAI,cAAc,EAC5B,eAAe,IAAI,mBAAmB,EACtC,aAAa,IAAI,iBAAiB,EAClC,2BAA2B,EAC3B,yBAAyB,EACzB,KAAK,IAAI,SAAS,EAClB,KAAK,IAAI,SAAS,EAClB,SAAS,IAAI,aAAa,EAC1B,WAAW,IAAI,eAAe,EAC9B,MAAM,IAAI,UAAU,EACpB,OAAO,IAAI,WAAW,EACtB,QAAQ,IAAI,YAAY,EACxB,OAAO,EACP,YAAY,EACZ,kBAAkB,EAClB,kBAAkB,EAClB,gBAAgB,EAChB,YAAY,EACZ,OAAO,EACP,WAAW,EACX,yBAAyB,EACzB,iBA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