jaci-ui 0.3.0 → 0.4.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/CHANGELOG.md +6 -0
- package/README.md +48 -0
- package/dist/components/calendar/calendar.cjs +377 -0
- package/dist/components/calendar/calendar.cjs.map +1 -0
- package/dist/components/calendar/calendar.d.cts +56 -0
- package/dist/components/calendar/calendar.d.ts +56 -0
- package/dist/components/calendar/calendar.js +368 -0
- package/dist/components/calendar/calendar.js.map +1 -0
- package/dist/components/calendar/index.d.cts +2 -0
- package/dist/components/calendar/index.d.ts +2 -0
- package/dist/components/combobox/combobox.cjs +13 -1
- package/dist/components/combobox/combobox.cjs.map +1 -1
- package/dist/components/combobox/combobox.d.cts +7 -2
- package/dist/components/combobox/combobox.d.ts +7 -2
- package/dist/components/combobox/combobox.js +13 -2
- package/dist/components/combobox/combobox.js.map +1 -1
- package/dist/components/combobox/index.d.cts +2 -2
- package/dist/components/combobox/index.d.ts +2 -2
- package/dist/components/controls/input.cjs +26 -5
- package/dist/components/controls/input.cjs.map +1 -1
- package/dist/components/controls/input.d.cts +5 -2
- package/dist/components/controls/input.d.ts +5 -2
- package/dist/components/controls/input.js +28 -7
- package/dist/components/controls/input.js.map +1 -1
- package/dist/components/controls/textarea.cjs +26 -5
- package/dist/components/controls/textarea.cjs.map +1 -1
- package/dist/components/controls/textarea.d.cts +5 -2
- package/dist/components/controls/textarea.d.ts +5 -2
- package/dist/components/controls/textarea.js +28 -7
- package/dist/components/controls/textarea.js.map +1 -1
- package/dist/components/date-picker/date-picker.cjs +9 -9
- package/dist/components/date-picker/date-picker.cjs.map +1 -1
- package/dist/components/date-picker/date-picker.d.cts +3 -1
- package/dist/components/date-picker/date-picker.d.ts +3 -1
- package/dist/components/date-picker/date-picker.js +9 -9
- package/dist/components/date-picker/date-picker.js.map +1 -1
- package/dist/components/date-range-picker/date-range-picker.cjs +589 -0
- package/dist/components/date-range-picker/date-range-picker.cjs.map +1 -0
- package/dist/components/date-range-picker/date-range-picker.d.cts +134 -0
- package/dist/components/date-range-picker/date-range-picker.d.ts +134 -0
- package/dist/components/date-range-picker/date-range-picker.js +568 -0
- package/dist/components/date-range-picker/date-range-picker.js.map +1 -0
- package/dist/components/date-range-picker/index.d.cts +2 -0
- package/dist/components/date-range-picker/index.d.ts +2 -0
- package/dist/components/field/field.cjs +106 -11
- package/dist/components/field/field.cjs.map +1 -1
- package/dist/components/field/field.d.cts +22 -4
- package/dist/components/field/field.d.ts +22 -4
- package/dist/components/field/field.js +107 -13
- package/dist/components/field/field.js.map +1 -1
- package/dist/components/field/index.d.cts +2 -2
- package/dist/components/field/index.d.ts +2 -2
- package/dist/components/pin-input/index.d.cts +2 -0
- package/dist/components/pin-input/index.d.ts +2 -0
- package/dist/components/pin-input/pin-input.cjs +266 -0
- package/dist/components/pin-input/pin-input.cjs.map +1 -0
- package/dist/components/pin-input/pin-input.d.cts +46 -0
- package/dist/components/pin-input/pin-input.d.ts +46 -0
- package/dist/components/pin-input/pin-input.js +258 -0
- package/dist/components/pin-input/pin-input.js.map +1 -0
- package/dist/components/select/index.d.cts +2 -2
- package/dist/components/select/index.d.ts +2 -2
- package/dist/components/select/select.cjs +80 -3
- package/dist/components/select/select.cjs.map +1 -1
- package/dist/components/select/select.d.cts +18 -3
- package/dist/components/select/select.d.ts +18 -3
- package/dist/components/select/select.js +78 -5
- package/dist/components/select/select.js.map +1 -1
- package/dist/components/tags-input/tags-input.cjs +83 -5
- package/dist/components/tags-input/tags-input.cjs.map +1 -1
- package/dist/components/tags-input/tags-input.d.cts +3 -0
- package/dist/components/tags-input/tags-input.d.ts +3 -0
- package/dist/components/tags-input/tags-input.js +83 -5
- package/dist/components/tags-input/tags-input.js.map +1 -1
- package/dist/components/upload/index.d.cts +2 -2
- package/dist/components/upload/index.d.ts +2 -2
- package/dist/components/upload/upload.cjs +90 -10
- package/dist/components/upload/upload.cjs.map +1 -1
- package/dist/components/upload/upload.d.cts +25 -2
- package/dist/components/upload/upload.d.ts +25 -2
- package/dist/components/upload/upload.js +89 -11
- package/dist/components/upload/upload.js.map +1 -1
- package/dist/index.cjs +52 -1
- package/dist/index.d.cts +11 -5
- package/dist/index.d.ts +11 -5
- package/dist/index.js +9 -6
- package/dist/styled-system/recipes/calendar.cjs +43 -0
- package/dist/styled-system/recipes/calendar.cjs.map +1 -0
- package/dist/styled-system/recipes/calendar.js +43 -0
- package/dist/styled-system/recipes/calendar.js.map +1 -0
- package/dist/styled-system/recipes/combobox.cjs +1 -0
- package/dist/styled-system/recipes/combobox.cjs.map +1 -1
- package/dist/styled-system/recipes/combobox.js +1 -0
- package/dist/styled-system/recipes/combobox.js.map +1 -1
- package/dist/styled-system/recipes/date-range-picker.cjs +52 -0
- package/dist/styled-system/recipes/date-range-picker.cjs.map +1 -0
- package/dist/styled-system/recipes/date-range-picker.js +52 -0
- package/dist/styled-system/recipes/date-range-picker.js.map +1 -0
- package/dist/styled-system/recipes/pin-input.cjs +39 -0
- package/dist/styled-system/recipes/pin-input.cjs.map +1 -0
- package/dist/styled-system/recipes/pin-input.js +39 -0
- package/dist/styled-system/recipes/pin-input.js.map +1 -0
- package/dist/styled-system/recipes/select.cjs +5 -1
- package/dist/styled-system/recipes/select.cjs.map +1 -1
- package/dist/styled-system/recipes/select.js +5 -1
- package/dist/styled-system/recipes/select.js.map +1 -1
- package/dist/styled-system/recipes/upload.cjs +2 -0
- package/dist/styled-system/recipes/upload.cjs.map +1 -1
- package/dist/styled-system/recipes/upload.js +2 -0
- package/dist/styled-system/recipes/upload.js.map +1 -1
- package/dist/styles.css +745 -81
- package/package.json +3 -2
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"date-range-picker.cjs","names":["isBeforeDay","isAfterDay","startOfMonth","dateRangePicker","createCalendarDate","addMonths","addDays","dateKey","BasePopover","toInputDate","cx","withRecipeClassName","formatDateLabel","getMonthLabels","isSameDay","getCalendarDays","getWeekdayLabels","formatMonthLabel"],"sources":["../../../src/components/date-range-picker/date-range-picker.tsx"],"sourcesContent":["\"use client\";\n\nimport { Popover as BasePopover } from \"@base-ui/react/popover\";\nimport {\n createContext,\n forwardRef,\n useCallback,\n useContext,\n useEffect,\n useId,\n useMemo,\n useRef,\n useState,\n} from \"react\";\nimport type { ComponentPropsWithoutRef, ReactNode } from \"react\";\nimport type { PopoverRoot as BasePopoverRoot } from \"@base-ui/react/popover\";\n\nimport { cx } from \"../../styled-system/css\";\nimport { dateRangePicker } from \"../../styled-system/recipes\";\nimport { withRecipeClassName } from \"../base-ui\";\nimport {\n addDays,\n addMonths,\n createCalendarDate,\n dateKey,\n formatDateLabel,\n formatMonthLabel,\n getCalendarDays,\n getMonthLabels,\n getWeekdayLabels,\n isAfterDay,\n isBeforeDay,\n isSameDay,\n startOfMonth,\n toInputDate,\n} from \"../date-picker/date-utils\";\n\nexport interface DateRange {\n start: Date | null;\n end: Date | null;\n}\n\nexport interface DateRangePickerYearRange {\n start: number;\n end: number;\n}\n\nexport interface DateRangePickerRootProps extends Omit<BasePopoverRoot.Props, \"children\"> {\n value?: DateRange;\n defaultValue?: DateRange;\n onValueChange?: (range: DateRange) => void;\n referenceDate?: Date;\n locale?: string;\n weekStartsOn?: 0 | 1 | 2 | 3 | 4 | 5 | 6;\n minDate?: Date;\n maxDate?: Date;\n isDateDisabled?: (date: Date) => boolean;\n yearRange?: DateRangePickerYearRange;\n closeOnSelect?: boolean;\n name?: string;\n disabled?: boolean;\n placeholder?: ReactNode;\n children?: ReactNode;\n}\n\ninterface DateRangePickerContextValue {\n canNavigate: (amount: number) => boolean;\n close: () => void;\n dateDisabled: (date: Date) => boolean;\n disabled: boolean;\n focusDate: (date: Date, direction?: number) => void;\n focusedDate: Date;\n hoveredDate: Date | null;\n locale: string;\n maxDate: Date | undefined;\n minDate: Date | undefined;\n month: Date;\n monthDisabled: (date: Date) => boolean;\n onSelect: (date: Date) => void;\n range: DateRange;\n selectMonth: (month: number) => void;\n selectYear: (year: number) => void;\n setMonth: (date: Date) => void;\n setHoveredDate: (date: Date | null) => void;\n setRange: (range: DateRange) => void;\n styles: ReturnType<typeof dateRangePicker>;\n today: Date;\n triggerId: string;\n weekStartsOn: number;\n yearRange: DateRangePickerYearRange;\n registerDay: (key: string, node: HTMLButtonElement | null) => void;\n}\n\nconst DateRangePickerContext = createContext<DateRangePickerContextValue | null>(null);\n\nfunction useDateRangePickerContext() {\n const context = useContext(DateRangePickerContext);\n if (!context)\n throw new Error(\"DateRangePicker parts must be rendered inside DateRangePicker.Root.\");\n return context;\n}\n\nfunction sameMonth(left: Date, right: Date) {\n return left.getFullYear() === right.getFullYear() && left.getMonth() === right.getMonth();\n}\n\nfunction dateInRange(date: Date, range: DateRange, preview: Date | null) {\n const end = range.end ?? preview;\n return Boolean(range.start && end && !isBeforeDay(date, range.start) && !isAfterDay(date, end));\n}\n\nexport function DateRangePickerRoot({\n children,\n closeOnSelect = true,\n defaultValue = { start: null, end: null },\n disabled = false,\n isDateDisabled,\n locale = \"pt-BR\",\n maxDate,\n minDate,\n name,\n onValueChange,\n referenceDate,\n value: controlledValue,\n weekStartsOn = 0,\n yearRange: configuredYearRange,\n ...popoverProps\n}: DateRangePickerRootProps) {\n const [uncontrolledRange, setUncontrolledRange] = useState<DateRange>(defaultValue);\n const range = controlledValue ?? uncontrolledRange;\n const initialDate = range.start ?? referenceDate ?? new Date();\n const [month, setMonthState] = useState(() => startOfMonth(initialDate));\n const [focusedDate, setFocusedDate] = useState(range.start ?? initialDate);\n const [hoveredDate, setHoveredDate] = useState<Date | null>(null);\n const dayRefs = useRef(new Map<string, HTMLButtonElement>());\n const actionsRef = useRef<BasePopoverRoot.Actions | null>(null);\n const triggerId = useId();\n const styles = dateRangePicker();\n const today = useMemo(() => referenceDate ?? new Date(), [referenceDate]);\n const minMonth = minDate ? startOfMonth(minDate) : undefined;\n const maxMonth = maxDate ? startOfMonth(maxDate) : undefined;\n const yearRange = useMemo(() => {\n const start = configuredYearRange?.start ?? today.getFullYear() - 100;\n const end = configuredYearRange?.end ?? today.getFullYear() + 20;\n const years = [\n range.start?.getFullYear(),\n range.end?.getFullYear(),\n minDate?.getFullYear(),\n maxDate?.getFullYear(),\n ].filter((year): year is number => year !== undefined);\n return { start: Math.min(start, end, ...years), end: Math.max(start, end, ...years) };\n }, [\n configuredYearRange?.end,\n configuredYearRange?.start,\n maxDate,\n minDate,\n range.end,\n range.start,\n today,\n ]);\n\n const dateDisabled = useCallback(\n (date: Date) =>\n Boolean(\n (minDate && isBeforeDay(date, minDate)) ||\n (maxDate && isAfterDay(date, maxDate)) ||\n isDateDisabled?.(date),\n ),\n [isDateDisabled, maxDate, minDate],\n );\n const monthDisabled = useCallback(\n (date: Date) => {\n const first = startOfMonth(date);\n const last = createCalendarDate(date.getFullYear(), date.getMonth() + 1, 0);\n return Boolean(\n (minDate && isBeforeDay(last, minDate)) || (maxDate && isAfterDay(first, maxDate)),\n );\n },\n [maxDate, minDate],\n );\n const clampMonth = useCallback(\n (date: Date) => {\n const normalized = startOfMonth(date);\n if (minMonth && isBeforeDay(normalized, minMonth)) return minMonth;\n if (maxMonth && isAfterDay(normalized, maxMonth)) return maxMonth;\n return normalized;\n },\n [maxMonth, minMonth],\n );\n const setMonth = useCallback((date: Date) => setMonthState(clampMonth(date)), [clampMonth]);\n const canNavigate = useCallback(\n (amount: number) => {\n const next = addMonths(month, amount);\n return (\n !(minMonth && isBeforeDay(next, minMonth)) && !(maxMonth && isAfterDay(next, maxMonth))\n );\n },\n [maxMonth, minMonth, month],\n );\n const setRange = useCallback(\n (nextRange: DateRange) => {\n if (controlledValue === undefined) setUncontrolledRange(nextRange);\n onValueChange?.(nextRange);\n },\n [controlledValue, onValueChange],\n );\n const close = useCallback(() => actionsRef.current?.close(), []);\n const onSelect = useCallback(\n (date: Date) => {\n if (disabled || dateDisabled(date)) return;\n const nextDate = createCalendarDate(date.getFullYear(), date.getMonth(), date.getDate());\n let nextRange: DateRange;\n if (!range.start || range.end) nextRange = { start: nextDate, end: null };\n else if (isBeforeDay(nextDate, range.start)) nextRange = { start: nextDate, end: null };\n else nextRange = { start: range.start, end: nextDate };\n setRange(nextRange);\n setFocusedDate(nextDate);\n setMonth(nextDate);\n setHoveredDate(null);\n if (nextRange.start && nextRange.end && closeOnSelect) close();\n },\n [close, closeOnSelect, dateDisabled, disabled, range.end, range.start, setMonth, setRange],\n );\n const focusDate = useCallback(\n (date: Date, direction = 1) => {\n let next = createCalendarDate(date.getFullYear(), date.getMonth(), date.getDate());\n const step = direction < 0 ? -1 : 1;\n let attempts = 0;\n while (dateDisabled(next) && attempts < 366) {\n next = addDays(next, step);\n attempts += 1;\n }\n setFocusedDate(next);\n setMonth(next);\n const focusTarget = () => dayRefs.current.get(dateKey(next))?.focus();\n focusTarget();\n queueMicrotask(focusTarget);\n },\n [dateDisabled, setMonth],\n );\n const selectMonth = useCallback(\n (monthIndex: number) => setMonth(createCalendarDate(month.getFullYear(), monthIndex, 1)),\n [month, setMonth],\n );\n const selectYear = useCallback(\n (year: number) => setMonth(createCalendarDate(year, month.getMonth(), 1)),\n [month, setMonth],\n );\n const registerDay = useCallback((key: string, node: HTMLButtonElement | null) => {\n if (node) dayRefs.current.set(key, node);\n else dayRefs.current.delete(key);\n }, []);\n\n useEffect(() => {\n const selected = range.end ?? range.start;\n if (!selected) return;\n setFocusedDate(selected);\n setMonthState((current) => (sameMonth(current, selected) ? current : clampMonth(selected)));\n }, [clampMonth, range.end, range.start]);\n\n const context: DateRangePickerContextValue = {\n canNavigate,\n close,\n dateDisabled,\n disabled,\n focusDate,\n focusedDate,\n hoveredDate,\n locale,\n maxDate,\n minDate,\n month,\n monthDisabled,\n onSelect,\n range,\n registerDay,\n selectMonth,\n selectYear,\n setHoveredDate,\n setMonth,\n setRange,\n styles,\n today,\n triggerId,\n weekStartsOn,\n yearRange,\n };\n\n return (\n <DateRangePickerContext.Provider value={context}>\n <BasePopover.Root {...popoverProps} actionsRef={actionsRef}>\n {children}\n </BasePopover.Root>\n {name ? (\n <>\n <input\n disabled={disabled}\n name={`${name}[start]`}\n type=\"hidden\"\n value={toInputDate(range.start)}\n />\n <input\n disabled={disabled}\n name={`${name}[end]`}\n type=\"hidden\"\n value={toInputDate(range.end)}\n />\n </>\n ) : null}\n </DateRangePickerContext.Provider>\n );\n}\n\nexport type DateRangePickerLabelProps = ComponentPropsWithoutRef<\"label\">;\nexport const DateRangePickerLabel = forwardRef<HTMLLabelElement, DateRangePickerLabelProps>(\n function DateRangePickerLabel({ className, ...props }, ref) {\n const { styles, triggerId } = useDateRangePickerContext();\n return (\n // biome-ignore lint/a11y/noLabelWithoutControl: the consumer renders the trigger/control in this composition.\n <label\n {...props}\n className={cx(styles.label, className)}\n data-slot=\"date-range-picker-label\"\n htmlFor={props.htmlFor ?? triggerId}\n ref={ref}\n />\n );\n },\n);\n\nexport type DateRangePickerControlProps = ComponentPropsWithoutRef<\"div\">;\nexport const DateRangePickerControl = forwardRef<HTMLDivElement, DateRangePickerControlProps>(\n function DateRangePickerControl({ className, ...props }, ref) {\n const { styles } = useDateRangePickerContext();\n return (\n <div\n {...props}\n className={cx(styles.control, className)}\n data-slot=\"date-range-picker-control\"\n ref={ref}\n />\n );\n },\n);\n\nexport type DateRangePickerTriggerProps = ComponentPropsWithoutRef<typeof BasePopover.Trigger>;\nexport const DateRangePickerTrigger = forwardRef<HTMLButtonElement, DateRangePickerTriggerProps>(\n function DateRangePickerTrigger({ children, className, disabled, id, ...props }, ref) {\n const { disabled: pickerDisabled, styles, triggerId } = useDateRangePickerContext();\n return (\n <BasePopover.Trigger\n {...props}\n aria-label={props[\"aria-label\"] ?? \"Choose date range\"}\n className={withRecipeClassName(styles.trigger, className)}\n data-jaci-component=\"date-range-picker\"\n data-slot=\"date-range-picker-trigger\"\n disabled={disabled ?? pickerDisabled}\n id={id ?? triggerId}\n ref={ref}\n >\n {children ?? (\n <>\n <DateRangePickerValue />\n <span aria-hidden=\"true\">▾</span>\n </>\n )}\n </BasePopover.Trigger>\n );\n },\n);\n\nexport interface DateRangePickerValueProps extends ComponentPropsWithoutRef<\"span\"> {\n placeholder?: ReactNode;\n}\nexport const DateRangePickerValue = forwardRef<HTMLSpanElement, DateRangePickerValueProps>(\n function DateRangePickerValue({ children, className, placeholder, ...props }, ref) {\n const { locale, range, styles } = useDateRangePickerContext();\n const value =\n children ??\n (range.start && range.end\n ? `${formatDateLabel(range.start, locale, \"\")} – ${formatDateLabel(range.end, locale, \"\")}`\n : range.start\n ? `${formatDateLabel(range.start, locale, \"\")} – …`\n : (placeholder ?? \"Select a date range\"));\n return (\n <span\n {...props}\n className={cx(styles.value, className)}\n data-placeholder={range.start ? undefined : \"true\"}\n data-slot=\"date-range-picker-value\"\n ref={ref}\n >\n {value}\n </span>\n );\n },\n);\n\nexport type DateRangePickerClearProps = ComponentPropsWithoutRef<\"button\">;\nexport const DateRangePickerClear = forwardRef<HTMLButtonElement, DateRangePickerClearProps>(\n function DateRangePickerClear({ children = \"×\", className, disabled, onClick, ...props }, ref) {\n const {\n disabled: pickerDisabled,\n range,\n setRange,\n styles,\n close,\n } = useDateRangePickerContext();\n return (\n <button\n {...props}\n aria-label={props[\"aria-label\"] ?? \"Clear date range\"}\n className={cx(styles.clear, className)}\n data-slot=\"date-range-picker-clear\"\n disabled={disabled || pickerDisabled || (!range.start && !range.end)}\n onClick={(event) => {\n setRange({ start: null, end: null });\n close();\n onClick?.(event);\n }}\n ref={ref}\n type=\"button\"\n >\n {children}\n </button>\n );\n },\n);\n\nexport type DateRangePickerPortalProps = ComponentPropsWithoutRef<typeof BasePopover.Portal>;\nexport const DateRangePickerPortal = BasePopover.Portal;\nexport type DateRangePickerPositionerProps = ComponentPropsWithoutRef<\n typeof BasePopover.Positioner\n>;\nexport const DateRangePickerPositioner = forwardRef<HTMLDivElement, DateRangePickerPositionerProps>(\n function DateRangePickerPositioner({ className, ...props }, ref) {\n const { styles } = useDateRangePickerContext();\n return (\n <BasePopover.Positioner\n {...props}\n className={withRecipeClassName(styles.positioner, className)}\n data-slot=\"date-range-picker-positioner\"\n ref={ref}\n />\n );\n },\n);\nexport type DateRangePickerPopupProps = ComponentPropsWithoutRef<typeof BasePopover.Popup>;\nexport const DateRangePickerPopup = forwardRef<HTMLDivElement, DateRangePickerPopupProps>(\n function DateRangePickerPopup({ className, ...props }, ref) {\n const { styles } = useDateRangePickerContext();\n return (\n <BasePopover.Popup\n {...props}\n aria-label={props[\"aria-label\"] ?? \"Calendar\"}\n className={withRecipeClassName(styles.popup, className)}\n data-slot=\"date-range-picker-popup\"\n ref={ref}\n />\n );\n },\n);\nexport type DateRangePickerCloseProps = ComponentPropsWithoutRef<typeof BasePopover.Close>;\nexport const DateRangePickerClose = forwardRef<HTMLButtonElement, DateRangePickerCloseProps>(\n function DateRangePickerClose({ className, ...props }, ref) {\n const { styles } = useDateRangePickerContext();\n return (\n <BasePopover.Close\n {...props}\n className={withRecipeClassName(styles.close, className)}\n data-slot=\"date-range-picker-close\"\n ref={ref}\n />\n );\n },\n);\n\nexport type DateRangePickerHeaderProps = ComponentPropsWithoutRef<\"div\">;\nexport const DateRangePickerHeader = forwardRef<HTMLDivElement, DateRangePickerHeaderProps>(\n function DateRangePickerHeader({ className, ...props }, ref) {\n const { styles } = useDateRangePickerContext();\n return (\n <div\n {...props}\n className={cx(styles.header, className)}\n data-slot=\"date-range-picker-header\"\n ref={ref}\n />\n );\n },\n);\nexport type DateRangePickerNavigationProps = ComponentPropsWithoutRef<\"button\"> & {\n amount?: number;\n};\nconst DateRangePickerNavigationButton = forwardRef<\n HTMLButtonElement,\n DateRangePickerNavigationProps\n>(function DateRangePickerNavigationButton(\n { amount = 1, children, className, onClick, ...props },\n ref,\n) {\n const { canNavigate, month, setMonth, styles } = useDateRangePickerContext();\n const isDisabled = props.disabled || !canNavigate(amount);\n return (\n <button\n {...props}\n aria-label={props[\"aria-label\"] ?? (amount < 0 ? \"Previous month\" : \"Next month\")}\n className={cx(styles.navigation, className)}\n data-slot={amount < 0 ? \"date-range-picker-previous\" : \"date-range-picker-next\"}\n disabled={isDisabled}\n onClick={(event) => {\n if (!isDisabled) setMonth(addMonths(month, amount));\n onClick?.(event);\n }}\n ref={ref}\n type=\"button\"\n >\n {children ?? (amount < 0 ? \"‹\" : \"›\")}\n </button>\n );\n});\nexport const DateRangePickerPrevious = forwardRef<\n HTMLButtonElement,\n DateRangePickerNavigationProps\n>(function DateRangePickerPrevious(props, ref) {\n return <DateRangePickerNavigationButton {...props} amount={-1} ref={ref} />;\n});\nexport const DateRangePickerNext = forwardRef<HTMLButtonElement, DateRangePickerNavigationProps>(\n function DateRangePickerNext(props, ref) {\n return <DateRangePickerNavigationButton {...props} amount={1} ref={ref} />;\n },\n);\nexport type DateRangePickerMonthSelectProps = Omit<\n ComponentPropsWithoutRef<\"select\">,\n \"children\" | \"onChange\" | \"value\"\n>;\nexport const DateRangePickerMonthSelect = forwardRef<\n HTMLSelectElement,\n DateRangePickerMonthSelectProps\n>(function DateRangePickerMonthSelect({ className, ...props }, ref) {\n const { locale, month, monthDisabled, selectMonth, styles } = useDateRangePickerContext();\n const labels = getMonthLabels(locale);\n return (\n <select\n {...props}\n aria-label={props[\"aria-label\"] ?? \"Select month\"}\n className={cx(styles.monthSelect, className)}\n data-slot=\"date-range-picker-month-select\"\n onChange={(event) => selectMonth(Number(event.currentTarget.value))}\n ref={ref}\n value={month.getMonth()}\n >\n {labels.map((label, index) => (\n <option\n disabled={monthDisabled(createCalendarDate(month.getFullYear(), index, 1))}\n key={label}\n value={index}\n >\n {label}\n </option>\n ))}\n </select>\n );\n});\nexport type DateRangePickerYearSelectProps = Omit<\n ComponentPropsWithoutRef<\"select\">,\n \"children\" | \"onChange\" | \"value\"\n>;\nexport const DateRangePickerYearSelect = forwardRef<\n HTMLSelectElement,\n DateRangePickerYearSelectProps\n>(function DateRangePickerYearSelect({ className, ...props }, ref) {\n const { month, monthDisabled, selectYear, styles, yearRange } = useDateRangePickerContext();\n const years = Array.from(\n { length: yearRange.end - yearRange.start + 1 },\n (_, index) => yearRange.start + index,\n );\n return (\n <select\n {...props}\n aria-label={props[\"aria-label\"] ?? \"Select year\"}\n className={cx(styles.yearSelect, className)}\n data-slot=\"date-range-picker-year-select\"\n onChange={(event) => selectYear(Number(event.currentTarget.value))}\n ref={ref}\n value={month.getFullYear()}\n >\n {years.map((year) => (\n <option\n disabled={monthDisabled(createCalendarDate(year, month.getMonth(), 1))}\n key={year}\n value={year}\n >\n {year}\n </option>\n ))}\n </select>\n );\n});\n\nexport interface DateRangePickerDayProps extends Omit<ComponentPropsWithoutRef<\"button\">, \"value\"> {\n date: Date;\n}\nexport const DateRangePickerDay = forwardRef<HTMLButtonElement, DateRangePickerDayProps>(\n function DateRangePickerDay(\n { children, className, date, disabled, onClick, onKeyDown, onMouseEnter, ...props },\n ref,\n ) {\n const {\n dateDisabled,\n disabled: pickerDisabled,\n focusDate,\n focusedDate,\n hoveredDate,\n locale,\n month,\n range,\n onSelect,\n registerDay,\n setHoveredDate,\n styles,\n today,\n weekStartsOn,\n } = useDateRangePickerContext();\n const key = dateKey(date);\n const isDisabled = Boolean(disabled || pickerDisabled || dateDisabled(date));\n const isStart = Boolean(range.start && isSameDay(date, range.start));\n const isEnd = Boolean(range.end && isSameDay(date, range.end));\n const inRange = dateInRange(date, range, hoveredDate);\n const outsideMonth = !sameMonth(date, month);\n const isFocused = isSameDay(date, focusedDate);\n const isToday = isSameDay(date, today);\n return (\n // biome-ignore lint/a11y/useSemanticElements: the roving button is the interactive grid cell.\n <button\n {...props}\n aria-label={\n props[\"aria-label\"] ?? new Intl.DateTimeFormat(locale, { dateStyle: \"full\" }).format(date)\n }\n aria-current={isToday ? \"date\" : undefined}\n aria-selected={isStart || isEnd}\n className={cx(styles.day, className)}\n data-date={key}\n data-disabled={isDisabled || undefined}\n data-in-range={inRange || undefined}\n data-outside-month={outsideMonth || undefined}\n data-range-end={isEnd || undefined}\n data-range-start={isStart || undefined}\n data-slot=\"date-range-picker-day\"\n data-today={isToday || undefined}\n disabled={isDisabled}\n onClick={(event) => {\n onSelect(date);\n onClick?.(event);\n }}\n onKeyDown={(event) => {\n if (!event.defaultPrevented) {\n let nextDate: Date | undefined;\n switch (event.key) {\n case \"ArrowLeft\":\n nextDate = addDays(date, -1);\n break;\n case \"ArrowRight\":\n nextDate = addDays(date, 1);\n break;\n case \"ArrowUp\":\n nextDate = addDays(date, -7);\n break;\n case \"ArrowDown\":\n nextDate = addDays(date, 7);\n break;\n case \"Home\":\n nextDate = addDays(date, -((date.getDay() - weekStartsOn + 7) % 7));\n break;\n case \"End\":\n nextDate = addDays(date, 6 - ((date.getDay() - weekStartsOn + 7) % 7));\n break;\n case \"PageUp\":\n nextDate = addMonths(date, event.shiftKey ? -12 : -1);\n break;\n case \"PageDown\":\n nextDate = addMonths(date, event.shiftKey ? 12 : 1);\n break;\n case \"Enter\":\n case \" \":\n if (!isDisabled) {\n event.preventDefault();\n onSelect(date);\n }\n break;\n }\n if (nextDate) {\n event.preventDefault();\n focusDate(nextDate, nextDate < date ? -1 : 1);\n }\n }\n onKeyDown?.(event);\n }}\n onMouseEnter={(event) => {\n if (!isDisabled) setHoveredDate(date);\n onMouseEnter?.(event);\n }}\n ref={(node) => {\n registerDay(key, node);\n if (typeof ref === \"function\") ref(node);\n else if (ref) ref.current = node;\n }}\n role=\"gridcell\"\n tabIndex={isFocused && !isDisabled ? 0 : -1}\n type=\"button\"\n >\n {children ?? date.getDate()}\n </button>\n );\n },\n);\n\nexport interface DateRangePickerCalendarProps\n extends Omit<ComponentPropsWithoutRef<\"section\">, \"children\"> {\n \"aria-label\"?: string;\n}\nexport const DateRangePickerCalendar = forwardRef<HTMLElement, DateRangePickerCalendarProps>(\n function DateRangePickerCalendar({ \"aria-label\": ariaLabel, className, ...props }, ref) {\n const { locale, month, styles, weekStartsOn } = useDateRangePickerContext();\n const days = useMemo(() => getCalendarDays(month, weekStartsOn), [month, weekStartsOn]);\n const weekdays = useMemo(() => getWeekdayLabels(locale, weekStartsOn), [locale, weekStartsOn]);\n return (\n <section\n {...props}\n aria-label={ariaLabel ?? formatMonthLabel(month, locale)}\n className={cx(styles.calendar, className)}\n data-slot=\"date-range-picker-calendar\"\n ref={ref}\n >\n <div aria-hidden=\"true\" className={styles.weekdays} data-slot=\"date-range-picker-weekdays\">\n {weekdays.map((weekday) => (\n <span className={styles.weekday} data-slot=\"date-range-picker-weekday\" key={weekday}>\n {weekday}\n </span>\n ))}\n </div>\n {/* biome-ignore lint/a11y/useSemanticElements: the calendar uses the ARIA grid pattern. */}\n <div\n aria-label={formatMonthLabel(month, locale)}\n className={styles.grid}\n data-slot=\"date-range-picker-grid\"\n role=\"grid\"\n >\n {days.map((date) => (\n <DateRangePickerDay date={date} key={dateKey(date)} />\n ))}\n </div>\n </section>\n );\n },\n);\n\nexport interface DateRangePickerPreviewProps extends ComponentPropsWithoutRef<\"div\"> {\n children?: ReactNode;\n}\nexport const DateRangePickerPreview = forwardRef<HTMLDivElement, DateRangePickerPreviewProps>(\n function DateRangePickerPreview({ children, className, ...props }, ref) {\n const { hoveredDate, locale, range, styles } = useDateRangePickerContext();\n const content =\n children ??\n (range.start\n ? `${formatDateLabel(range.start, locale, \"\")} – ${range.end ? formatDateLabel(range.end, locale, \"\") : hoveredDate ? formatDateLabel(hoveredDate, locale, \"\") : \"…\"}`\n : \"Select a start date\");\n return (\n <div\n {...props}\n aria-live=\"polite\"\n className={cx(styles.preview, className)}\n data-slot=\"date-range-picker-preview\"\n ref={ref}\n >\n {content}\n </div>\n );\n },\n);\n\nexport interface DateRangePickerInputProps\n extends Omit<ComponentPropsWithoutRef<\"input\">, \"type\" | \"value\" | \"onChange\"> {\n side: \"start\" | \"end\";\n}\nexport const DateRangePickerInput = forwardRef<HTMLInputElement, DateRangePickerInputProps>(\n function DateRangePickerInput({ className, onBlur, onInput, side, ...props }, ref) {\n const { disabled, range, setRange, styles } = useDateRangePickerContext();\n const value = toInputDate(side === \"start\" ? range.start : range.end);\n return (\n <input\n {...props}\n aria-label={props[\"aria-label\"] ?? (side === \"start\" ? \"Start date\" : \"End date\")}\n className={cx(styles.input, className)}\n data-slot={`date-range-picker-${side}-input`}\n disabled={disabled || props.disabled}\n onChange={(event) => {\n const [year, month, day] = event.currentTarget.value.split(\"-\").map(Number);\n if (!year || !month || !day) return;\n const date = createCalendarDate(year, month - 1, day);\n setRange(\n side === \"start\" ? { start: date, end: range.end } : { start: range.start, end: date },\n );\n }}\n onBlur={onBlur}\n onInput={onInput}\n ref={ref}\n type=\"date\"\n value={value}\n />\n );\n },\n);\n\nexport const DateRangePickerStartInput = forwardRef<\n HTMLInputElement,\n Omit<DateRangePickerInputProps, \"side\">\n>(function DateRangePickerStartInput(props, ref) {\n return <DateRangePickerInput {...props} ref={ref} side=\"start\" />;\n});\nexport const DateRangePickerEndInput = forwardRef<\n HTMLInputElement,\n Omit<DateRangePickerInputProps, \"side\">\n>(function DateRangePickerEndInput(props, ref) {\n return <DateRangePickerInput {...props} ref={ref} side=\"end\" />;\n});\n\nexport const DateRangePicker = {\n Root: DateRangePickerRoot,\n Label: DateRangePickerLabel,\n Control: DateRangePickerControl,\n Trigger: DateRangePickerTrigger,\n Value: DateRangePickerValue,\n Clear: DateRangePickerClear,\n Portal: DateRangePickerPortal,\n Positioner: DateRangePickerPositioner,\n Popup: DateRangePickerPopup,\n Close: DateRangePickerClose,\n Header: DateRangePickerHeader,\n Previous: DateRangePickerPrevious,\n Next: DateRangePickerNext,\n MonthSelect: DateRangePickerMonthSelect,\n YearSelect: DateRangePickerYearSelect,\n Calendar: DateRangePickerCalendar,\n Day: DateRangePickerDay,\n Preview: DateRangePickerPreview,\n StartInput: DateRangePickerStartInput,\n EndInput: DateRangePickerEndInput,\n};\n"],"mappings":";;;;;;;;;AA6FA,MAAM,0BAAA,GAAA,MAAA,cAAA,CAA2E,IAAI;AAErF,SAAS,4BAA4B;CACnC,MAAM,WAAA,GAAA,MAAA,WAAA,CAAqB,sBAAsB;CACjD,IAAI,CAAC,SACH,MAAM,IAAI,MAAM,qEAAqE;CACvF,OAAO;AACT;AAEA,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iBAAA,GAAA,kBAAA,IAAA,CAAC,sBAAD;EAAsB,GAAI;EAAY;EAAK,MAAK;CAAS,CAAA;AAClE,CAAC;AACD,MAAa,2BAAA,GAAA,MAAA,WAAA,CAGX,SAAS,wBAAwB,OAAO,KAAK;CAC7C,OAAO,iBAAA,GAAA,kBAAA,IAAA,CAAC,sBAAD;EAAsB,GAAI;EAAY;EAAK,MAAK;CAAO,CAAA;AAChE,CAAC;AAED,MAAa,kBAAkB;CAC7B,MAAM;CACN,OAAO;CACP,SAAS;CACT,SAAS;CACT,OAAO;CACP,OAAO;CACP,QAAQ;CACR,YAAY;CACZ,OAAO;CACP,OAAO;CACP,QAAQ;CACR,UAAU;CACV,MAAM;CACN,aAAa;CACb,YAAY;CACZ,UAAU;CACV,KAAK;CACL,SAAS;CACT,YAAY;CACZ,UAAU;AACZ"}
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
import { ComponentPropsWithoutRef, ReactNode } from "react";
|
|
2
|
+
import { Popover, PopoverRoot } from "@base-ui/react/popover";
|
|
3
|
+
//#region src/components/date-range-picker/date-range-picker.d.ts
|
|
4
|
+
interface DateRange {
|
|
5
|
+
start: Date | null;
|
|
6
|
+
end: Date | null;
|
|
7
|
+
}
|
|
8
|
+
interface DateRangePickerYearRange {
|
|
9
|
+
start: number;
|
|
10
|
+
end: number;
|
|
11
|
+
}
|
|
12
|
+
interface DateRangePickerRootProps extends Omit<PopoverRoot.Props, "children"> {
|
|
13
|
+
value?: DateRange;
|
|
14
|
+
defaultValue?: DateRange;
|
|
15
|
+
onValueChange?: (range: DateRange) => void;
|
|
16
|
+
referenceDate?: Date;
|
|
17
|
+
locale?: string;
|
|
18
|
+
weekStartsOn?: 0 | 1 | 2 | 3 | 4 | 5 | 6;
|
|
19
|
+
minDate?: Date;
|
|
20
|
+
maxDate?: Date;
|
|
21
|
+
isDateDisabled?: (date: Date) => boolean;
|
|
22
|
+
yearRange?: DateRangePickerYearRange;
|
|
23
|
+
closeOnSelect?: boolean;
|
|
24
|
+
name?: string;
|
|
25
|
+
disabled?: boolean;
|
|
26
|
+
placeholder?: ReactNode;
|
|
27
|
+
children?: ReactNode;
|
|
28
|
+
}
|
|
29
|
+
declare function DateRangePickerRoot({ children, closeOnSelect, defaultValue, disabled, isDateDisabled, locale, maxDate, minDate, name, onValueChange, referenceDate, value: controlledValue, weekStartsOn, yearRange: configuredYearRange, ...popoverProps }: DateRangePickerRootProps): import("react").JSX.Element;
|
|
30
|
+
type DateRangePickerLabelProps = ComponentPropsWithoutRef<"label">;
|
|
31
|
+
declare const DateRangePickerLabel: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").LabelHTMLAttributes<HTMLLabelElement>, HTMLLabelElement>, "ref"> & import("react").RefAttributes<HTMLLabelElement>>;
|
|
32
|
+
type DateRangePickerControlProps = ComponentPropsWithoutRef<"div">;
|
|
33
|
+
declare const DateRangePickerControl: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
34
|
+
type DateRangePickerTriggerProps = ComponentPropsWithoutRef<typeof Popover.Trigger>;
|
|
35
|
+
declare const DateRangePickerTrigger: import("react").ForwardRefExoticComponent<Omit<import("@base-ui/react/internals/types").NativeButtonProps & Omit<import("@base-ui/react/internals/types").WithBaseUIEvent<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>>, "style" | "defaultChecked" | "defaultValue" | "className" | "color"> & {
|
|
36
|
+
className?: string | ((state: import("@base-ui/react").PopoverTriggerState) => string | undefined) | undefined;
|
|
37
|
+
render?: import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>> | import("@base-ui/react").ComponentRenderFn<import("@base-ui/react").HTMLProps, import("@base-ui/react").PopoverTriggerState> | undefined;
|
|
38
|
+
style?: import("react").CSSProperties | ((state: import("@base-ui/react").PopoverTriggerState) => React.CSSProperties | undefined) | undefined;
|
|
39
|
+
} & {
|
|
40
|
+
nativeButton?: boolean | undefined;
|
|
41
|
+
handle?: Popover.Handle<unknown> | undefined;
|
|
42
|
+
payload?: unknown;
|
|
43
|
+
id?: string | undefined;
|
|
44
|
+
openOnHover?: boolean | undefined;
|
|
45
|
+
delay?: number | undefined;
|
|
46
|
+
closeDelay?: number | undefined;
|
|
47
|
+
} & import("react").RefAttributes<HTMLElement>, "ref"> & import("react").RefAttributes<HTMLButtonElement>>;
|
|
48
|
+
interface DateRangePickerValueProps extends ComponentPropsWithoutRef<"span"> {
|
|
49
|
+
placeholder?: ReactNode;
|
|
50
|
+
}
|
|
51
|
+
declare const DateRangePickerValue: import("react").ForwardRefExoticComponent<DateRangePickerValueProps & import("react").RefAttributes<HTMLSpanElement>>;
|
|
52
|
+
type DateRangePickerClearProps = ComponentPropsWithoutRef<"button">;
|
|
53
|
+
declare const DateRangePickerClear: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & import("react").RefAttributes<HTMLButtonElement>>;
|
|
54
|
+
type DateRangePickerPortalProps = ComponentPropsWithoutRef<typeof Popover.Portal>;
|
|
55
|
+
declare const DateRangePickerPortal: import("react").ForwardRefExoticComponent<Omit<import("@base-ui/react").PopoverPortalProps, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
56
|
+
type DateRangePickerPositionerProps = ComponentPropsWithoutRef<typeof Popover.Positioner>;
|
|
57
|
+
declare const DateRangePickerPositioner: import("react").ForwardRefExoticComponent<Omit<Omit<import("@base-ui/react").PopoverPositionerProps, "ref"> & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
58
|
+
type DateRangePickerPopupProps = ComponentPropsWithoutRef<typeof Popover.Popup>;
|
|
59
|
+
declare const DateRangePickerPopup: import("react").ForwardRefExoticComponent<Omit<Omit<import("@base-ui/react").PopoverPopupProps, "ref"> & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
60
|
+
type DateRangePickerCloseProps = ComponentPropsWithoutRef<typeof Popover.Close>;
|
|
61
|
+
declare const DateRangePickerClose: import("react").ForwardRefExoticComponent<Omit<Omit<import("@base-ui/react").PopoverCloseProps, "ref"> & import("react").RefAttributes<HTMLButtonElement>, "ref"> & import("react").RefAttributes<HTMLButtonElement>>;
|
|
62
|
+
type DateRangePickerHeaderProps = ComponentPropsWithoutRef<"div">;
|
|
63
|
+
declare const DateRangePickerHeader: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
64
|
+
type DateRangePickerNavigationProps = ComponentPropsWithoutRef<"button"> & {
|
|
65
|
+
amount?: number;
|
|
66
|
+
};
|
|
67
|
+
declare const DateRangePickerPrevious: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & {
|
|
68
|
+
amount?: number;
|
|
69
|
+
} & import("react").RefAttributes<HTMLButtonElement>>;
|
|
70
|
+
declare const DateRangePickerNext: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & {
|
|
71
|
+
amount?: number;
|
|
72
|
+
} & import("react").RefAttributes<HTMLButtonElement>>;
|
|
73
|
+
type DateRangePickerMonthSelectProps = Omit<ComponentPropsWithoutRef<"select">, "children" | "onChange" | "value">;
|
|
74
|
+
declare const DateRangePickerMonthSelect: import("react").ForwardRefExoticComponent<DateRangePickerMonthSelectProps & import("react").RefAttributes<HTMLSelectElement>>;
|
|
75
|
+
type DateRangePickerYearSelectProps = Omit<ComponentPropsWithoutRef<"select">, "children" | "onChange" | "value">;
|
|
76
|
+
declare const DateRangePickerYearSelect: import("react").ForwardRefExoticComponent<DateRangePickerYearSelectProps & import("react").RefAttributes<HTMLSelectElement>>;
|
|
77
|
+
interface DateRangePickerDayProps extends Omit<ComponentPropsWithoutRef<"button">, "value"> {
|
|
78
|
+
date: Date;
|
|
79
|
+
}
|
|
80
|
+
declare const DateRangePickerDay: import("react").ForwardRefExoticComponent<DateRangePickerDayProps & import("react").RefAttributes<HTMLButtonElement>>;
|
|
81
|
+
interface DateRangePickerCalendarProps extends Omit<ComponentPropsWithoutRef<"section">, "children"> {
|
|
82
|
+
"aria-label"?: string;
|
|
83
|
+
}
|
|
84
|
+
declare const DateRangePickerCalendar: import("react").ForwardRefExoticComponent<DateRangePickerCalendarProps & import("react").RefAttributes<HTMLElement>>;
|
|
85
|
+
interface DateRangePickerPreviewProps extends ComponentPropsWithoutRef<"div"> {
|
|
86
|
+
children?: ReactNode;
|
|
87
|
+
}
|
|
88
|
+
declare const DateRangePickerPreview: import("react").ForwardRefExoticComponent<DateRangePickerPreviewProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
89
|
+
interface DateRangePickerInputProps extends Omit<ComponentPropsWithoutRef<"input">, "type" | "value" | "onChange"> {
|
|
90
|
+
side: "start" | "end";
|
|
91
|
+
}
|
|
92
|
+
declare const DateRangePickerStartInput: import("react").ForwardRefExoticComponent<Omit<DateRangePickerInputProps, "side"> & import("react").RefAttributes<HTMLInputElement>>;
|
|
93
|
+
declare const DateRangePickerEndInput: import("react").ForwardRefExoticComponent<Omit<DateRangePickerInputProps, "side"> & import("react").RefAttributes<HTMLInputElement>>;
|
|
94
|
+
declare const DateRangePicker: {
|
|
95
|
+
Root: typeof DateRangePickerRoot;
|
|
96
|
+
Label: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").LabelHTMLAttributes<HTMLLabelElement>, HTMLLabelElement>, "ref"> & import("react").RefAttributes<HTMLLabelElement>>;
|
|
97
|
+
Control: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
98
|
+
Trigger: import("react").ForwardRefExoticComponent<Omit<import("@base-ui/react/internals/types").NativeButtonProps & Omit<import("@base-ui/react/internals/types").WithBaseUIEvent<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>>, "style" | "defaultChecked" | "defaultValue" | "className" | "color"> & {
|
|
99
|
+
className?: string | ((state: import("@base-ui/react").PopoverTriggerState) => string | undefined) | undefined;
|
|
100
|
+
render?: import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>> | import("@base-ui/react").ComponentRenderFn<import("@base-ui/react").HTMLProps, import("@base-ui/react").PopoverTriggerState> | undefined;
|
|
101
|
+
style?: import("react").CSSProperties | ((state: import("@base-ui/react").PopoverTriggerState) => React.CSSProperties | undefined) | undefined;
|
|
102
|
+
} & {
|
|
103
|
+
nativeButton?: boolean | undefined;
|
|
104
|
+
handle?: Popover.Handle<unknown> | undefined;
|
|
105
|
+
payload?: unknown;
|
|
106
|
+
id?: string | undefined;
|
|
107
|
+
openOnHover?: boolean | undefined;
|
|
108
|
+
delay?: number | undefined;
|
|
109
|
+
closeDelay?: number | undefined;
|
|
110
|
+
} & import("react").RefAttributes<HTMLElement>, "ref"> & import("react").RefAttributes<HTMLButtonElement>>;
|
|
111
|
+
Value: import("react").ForwardRefExoticComponent<DateRangePickerValueProps & import("react").RefAttributes<HTMLSpanElement>>;
|
|
112
|
+
Clear: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & import("react").RefAttributes<HTMLButtonElement>>;
|
|
113
|
+
Portal: import("react").ForwardRefExoticComponent<Omit<import("@base-ui/react").PopoverPortalProps, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
114
|
+
Positioner: import("react").ForwardRefExoticComponent<Omit<Omit<import("@base-ui/react").PopoverPositionerProps, "ref"> & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
115
|
+
Popup: import("react").ForwardRefExoticComponent<Omit<Omit<import("@base-ui/react").PopoverPopupProps, "ref"> & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
116
|
+
Close: import("react").ForwardRefExoticComponent<Omit<Omit<import("@base-ui/react").PopoverCloseProps, "ref"> & import("react").RefAttributes<HTMLButtonElement>, "ref"> & import("react").RefAttributes<HTMLButtonElement>>;
|
|
117
|
+
Header: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
118
|
+
Previous: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & {
|
|
119
|
+
amount?: number;
|
|
120
|
+
} & import("react").RefAttributes<HTMLButtonElement>>;
|
|
121
|
+
Next: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & {
|
|
122
|
+
amount?: number;
|
|
123
|
+
} & import("react").RefAttributes<HTMLButtonElement>>;
|
|
124
|
+
MonthSelect: import("react").ForwardRefExoticComponent<DateRangePickerMonthSelectProps & import("react").RefAttributes<HTMLSelectElement>>;
|
|
125
|
+
YearSelect: import("react").ForwardRefExoticComponent<DateRangePickerYearSelectProps & import("react").RefAttributes<HTMLSelectElement>>;
|
|
126
|
+
Calendar: import("react").ForwardRefExoticComponent<DateRangePickerCalendarProps & import("react").RefAttributes<HTMLElement>>;
|
|
127
|
+
Day: import("react").ForwardRefExoticComponent<DateRangePickerDayProps & import("react").RefAttributes<HTMLButtonElement>>;
|
|
128
|
+
Preview: import("react").ForwardRefExoticComponent<DateRangePickerPreviewProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
129
|
+
StartInput: import("react").ForwardRefExoticComponent<Omit<DateRangePickerInputProps, "side"> & import("react").RefAttributes<HTMLInputElement>>;
|
|
130
|
+
EndInput: import("react").ForwardRefExoticComponent<Omit<DateRangePickerInputProps, "side"> & import("react").RefAttributes<HTMLInputElement>>;
|
|
131
|
+
};
|
|
132
|
+
//#endregion
|
|
133
|
+
export { DateRange, DateRangePicker, DateRangePickerCalendar, DateRangePickerCalendarProps, DateRangePickerClear, DateRangePickerClearProps, DateRangePickerClose, DateRangePickerCloseProps, DateRangePickerControl, DateRangePickerControlProps, DateRangePickerDay, DateRangePickerDayProps, DateRangePickerEndInput, DateRangePickerHeader, DateRangePickerHeaderProps, DateRangePickerInputProps, DateRangePickerLabel, DateRangePickerLabelProps, DateRangePickerMonthSelect, DateRangePickerMonthSelectProps, DateRangePickerNavigationProps, DateRangePickerNext, DateRangePickerPopup, DateRangePickerPopupProps, DateRangePickerPortal, DateRangePickerPortalProps, DateRangePickerPositioner, DateRangePickerPositionerProps, DateRangePickerPreview, DateRangePickerPreviewProps, DateRangePickerPrevious, DateRangePickerRoot, DateRangePickerRootProps, DateRangePickerStartInput, DateRangePickerTrigger, DateRangePickerTriggerProps, DateRangePickerValue, DateRangePickerValueProps, DateRangePickerYearRange, DateRangePickerYearSelect, DateRangePickerYearSelectProps };
|
|
134
|
+
//# sourceMappingURL=date-range-picker.d.cts.map
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
import { ComponentPropsWithoutRef, ReactNode } from "react";
|
|
2
|
+
import { Popover, PopoverRoot } from "@base-ui/react/popover";
|
|
3
|
+
//#region src/components/date-range-picker/date-range-picker.d.ts
|
|
4
|
+
interface DateRange {
|
|
5
|
+
start: Date | null;
|
|
6
|
+
end: Date | null;
|
|
7
|
+
}
|
|
8
|
+
interface DateRangePickerYearRange {
|
|
9
|
+
start: number;
|
|
10
|
+
end: number;
|
|
11
|
+
}
|
|
12
|
+
interface DateRangePickerRootProps extends Omit<PopoverRoot.Props, "children"> {
|
|
13
|
+
value?: DateRange;
|
|
14
|
+
defaultValue?: DateRange;
|
|
15
|
+
onValueChange?: (range: DateRange) => void;
|
|
16
|
+
referenceDate?: Date;
|
|
17
|
+
locale?: string;
|
|
18
|
+
weekStartsOn?: 0 | 1 | 2 | 3 | 4 | 5 | 6;
|
|
19
|
+
minDate?: Date;
|
|
20
|
+
maxDate?: Date;
|
|
21
|
+
isDateDisabled?: (date: Date) => boolean;
|
|
22
|
+
yearRange?: DateRangePickerYearRange;
|
|
23
|
+
closeOnSelect?: boolean;
|
|
24
|
+
name?: string;
|
|
25
|
+
disabled?: boolean;
|
|
26
|
+
placeholder?: ReactNode;
|
|
27
|
+
children?: ReactNode;
|
|
28
|
+
}
|
|
29
|
+
declare function DateRangePickerRoot({ children, closeOnSelect, defaultValue, disabled, isDateDisabled, locale, maxDate, minDate, name, onValueChange, referenceDate, value: controlledValue, weekStartsOn, yearRange: configuredYearRange, ...popoverProps }: DateRangePickerRootProps): import("react").JSX.Element;
|
|
30
|
+
type DateRangePickerLabelProps = ComponentPropsWithoutRef<"label">;
|
|
31
|
+
declare const DateRangePickerLabel: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").LabelHTMLAttributes<HTMLLabelElement>, HTMLLabelElement>, "ref"> & import("react").RefAttributes<HTMLLabelElement>>;
|
|
32
|
+
type DateRangePickerControlProps = ComponentPropsWithoutRef<"div">;
|
|
33
|
+
declare const DateRangePickerControl: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
34
|
+
type DateRangePickerTriggerProps = ComponentPropsWithoutRef<typeof Popover.Trigger>;
|
|
35
|
+
declare const DateRangePickerTrigger: import("react").ForwardRefExoticComponent<Omit<import("@base-ui/react/internals/types").NativeButtonProps & Omit<import("@base-ui/react/internals/types").WithBaseUIEvent<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>>, "style" | "defaultChecked" | "defaultValue" | "className" | "color"> & {
|
|
36
|
+
className?: string | ((state: import("@base-ui/react").PopoverTriggerState) => string | undefined) | undefined;
|
|
37
|
+
render?: import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>> | import("@base-ui/react").ComponentRenderFn<import("@base-ui/react").HTMLProps, import("@base-ui/react").PopoverTriggerState> | undefined;
|
|
38
|
+
style?: import("react").CSSProperties | ((state: import("@base-ui/react").PopoverTriggerState) => React.CSSProperties | undefined) | undefined;
|
|
39
|
+
} & {
|
|
40
|
+
nativeButton?: boolean | undefined;
|
|
41
|
+
handle?: Popover.Handle<unknown> | undefined;
|
|
42
|
+
payload?: unknown;
|
|
43
|
+
id?: string | undefined;
|
|
44
|
+
openOnHover?: boolean | undefined;
|
|
45
|
+
delay?: number | undefined;
|
|
46
|
+
closeDelay?: number | undefined;
|
|
47
|
+
} & import("react").RefAttributes<HTMLElement>, "ref"> & import("react").RefAttributes<HTMLButtonElement>>;
|
|
48
|
+
interface DateRangePickerValueProps extends ComponentPropsWithoutRef<"span"> {
|
|
49
|
+
placeholder?: ReactNode;
|
|
50
|
+
}
|
|
51
|
+
declare const DateRangePickerValue: import("react").ForwardRefExoticComponent<DateRangePickerValueProps & import("react").RefAttributes<HTMLSpanElement>>;
|
|
52
|
+
type DateRangePickerClearProps = ComponentPropsWithoutRef<"button">;
|
|
53
|
+
declare const DateRangePickerClear: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & import("react").RefAttributes<HTMLButtonElement>>;
|
|
54
|
+
type DateRangePickerPortalProps = ComponentPropsWithoutRef<typeof Popover.Portal>;
|
|
55
|
+
declare const DateRangePickerPortal: import("react").ForwardRefExoticComponent<Omit<import("@base-ui/react").PopoverPortalProps, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
56
|
+
type DateRangePickerPositionerProps = ComponentPropsWithoutRef<typeof Popover.Positioner>;
|
|
57
|
+
declare const DateRangePickerPositioner: import("react").ForwardRefExoticComponent<Omit<Omit<import("@base-ui/react").PopoverPositionerProps, "ref"> & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
58
|
+
type DateRangePickerPopupProps = ComponentPropsWithoutRef<typeof Popover.Popup>;
|
|
59
|
+
declare const DateRangePickerPopup: import("react").ForwardRefExoticComponent<Omit<Omit<import("@base-ui/react").PopoverPopupProps, "ref"> & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
60
|
+
type DateRangePickerCloseProps = ComponentPropsWithoutRef<typeof Popover.Close>;
|
|
61
|
+
declare const DateRangePickerClose: import("react").ForwardRefExoticComponent<Omit<Omit<import("@base-ui/react").PopoverCloseProps, "ref"> & import("react").RefAttributes<HTMLButtonElement>, "ref"> & import("react").RefAttributes<HTMLButtonElement>>;
|
|
62
|
+
type DateRangePickerHeaderProps = ComponentPropsWithoutRef<"div">;
|
|
63
|
+
declare const DateRangePickerHeader: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
64
|
+
type DateRangePickerNavigationProps = ComponentPropsWithoutRef<"button"> & {
|
|
65
|
+
amount?: number;
|
|
66
|
+
};
|
|
67
|
+
declare const DateRangePickerPrevious: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & {
|
|
68
|
+
amount?: number;
|
|
69
|
+
} & import("react").RefAttributes<HTMLButtonElement>>;
|
|
70
|
+
declare const DateRangePickerNext: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & {
|
|
71
|
+
amount?: number;
|
|
72
|
+
} & import("react").RefAttributes<HTMLButtonElement>>;
|
|
73
|
+
type DateRangePickerMonthSelectProps = Omit<ComponentPropsWithoutRef<"select">, "children" | "onChange" | "value">;
|
|
74
|
+
declare const DateRangePickerMonthSelect: import("react").ForwardRefExoticComponent<DateRangePickerMonthSelectProps & import("react").RefAttributes<HTMLSelectElement>>;
|
|
75
|
+
type DateRangePickerYearSelectProps = Omit<ComponentPropsWithoutRef<"select">, "children" | "onChange" | "value">;
|
|
76
|
+
declare const DateRangePickerYearSelect: import("react").ForwardRefExoticComponent<DateRangePickerYearSelectProps & import("react").RefAttributes<HTMLSelectElement>>;
|
|
77
|
+
interface DateRangePickerDayProps extends Omit<ComponentPropsWithoutRef<"button">, "value"> {
|
|
78
|
+
date: Date;
|
|
79
|
+
}
|
|
80
|
+
declare const DateRangePickerDay: import("react").ForwardRefExoticComponent<DateRangePickerDayProps & import("react").RefAttributes<HTMLButtonElement>>;
|
|
81
|
+
interface DateRangePickerCalendarProps extends Omit<ComponentPropsWithoutRef<"section">, "children"> {
|
|
82
|
+
"aria-label"?: string;
|
|
83
|
+
}
|
|
84
|
+
declare const DateRangePickerCalendar: import("react").ForwardRefExoticComponent<DateRangePickerCalendarProps & import("react").RefAttributes<HTMLElement>>;
|
|
85
|
+
interface DateRangePickerPreviewProps extends ComponentPropsWithoutRef<"div"> {
|
|
86
|
+
children?: ReactNode;
|
|
87
|
+
}
|
|
88
|
+
declare const DateRangePickerPreview: import("react").ForwardRefExoticComponent<DateRangePickerPreviewProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
89
|
+
interface DateRangePickerInputProps extends Omit<ComponentPropsWithoutRef<"input">, "type" | "value" | "onChange"> {
|
|
90
|
+
side: "start" | "end";
|
|
91
|
+
}
|
|
92
|
+
declare const DateRangePickerStartInput: import("react").ForwardRefExoticComponent<Omit<DateRangePickerInputProps, "side"> & import("react").RefAttributes<HTMLInputElement>>;
|
|
93
|
+
declare const DateRangePickerEndInput: import("react").ForwardRefExoticComponent<Omit<DateRangePickerInputProps, "side"> & import("react").RefAttributes<HTMLInputElement>>;
|
|
94
|
+
declare const DateRangePicker: {
|
|
95
|
+
Root: typeof DateRangePickerRoot;
|
|
96
|
+
Label: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").LabelHTMLAttributes<HTMLLabelElement>, HTMLLabelElement>, "ref"> & import("react").RefAttributes<HTMLLabelElement>>;
|
|
97
|
+
Control: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
98
|
+
Trigger: import("react").ForwardRefExoticComponent<Omit<import("@base-ui/react/internals/types").NativeButtonProps & Omit<import("@base-ui/react/internals/types").WithBaseUIEvent<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>>, "style" | "defaultChecked" | "defaultValue" | "className" | "color"> & {
|
|
99
|
+
className?: string | ((state: import("@base-ui/react").PopoverTriggerState) => string | undefined) | undefined;
|
|
100
|
+
render?: import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>> | import("@base-ui/react").ComponentRenderFn<import("@base-ui/react").HTMLProps, import("@base-ui/react").PopoverTriggerState> | undefined;
|
|
101
|
+
style?: import("react").CSSProperties | ((state: import("@base-ui/react").PopoverTriggerState) => React.CSSProperties | undefined) | undefined;
|
|
102
|
+
} & {
|
|
103
|
+
nativeButton?: boolean | undefined;
|
|
104
|
+
handle?: Popover.Handle<unknown> | undefined;
|
|
105
|
+
payload?: unknown;
|
|
106
|
+
id?: string | undefined;
|
|
107
|
+
openOnHover?: boolean | undefined;
|
|
108
|
+
delay?: number | undefined;
|
|
109
|
+
closeDelay?: number | undefined;
|
|
110
|
+
} & import("react").RefAttributes<HTMLElement>, "ref"> & import("react").RefAttributes<HTMLButtonElement>>;
|
|
111
|
+
Value: import("react").ForwardRefExoticComponent<DateRangePickerValueProps & import("react").RefAttributes<HTMLSpanElement>>;
|
|
112
|
+
Clear: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & import("react").RefAttributes<HTMLButtonElement>>;
|
|
113
|
+
Portal: import("react").ForwardRefExoticComponent<Omit<import("@base-ui/react").PopoverPortalProps, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
114
|
+
Positioner: import("react").ForwardRefExoticComponent<Omit<Omit<import("@base-ui/react").PopoverPositionerProps, "ref"> & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
115
|
+
Popup: import("react").ForwardRefExoticComponent<Omit<Omit<import("@base-ui/react").PopoverPopupProps, "ref"> & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
116
|
+
Close: import("react").ForwardRefExoticComponent<Omit<Omit<import("@base-ui/react").PopoverCloseProps, "ref"> & import("react").RefAttributes<HTMLButtonElement>, "ref"> & import("react").RefAttributes<HTMLButtonElement>>;
|
|
117
|
+
Header: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
118
|
+
Previous: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & {
|
|
119
|
+
amount?: number;
|
|
120
|
+
} & import("react").RefAttributes<HTMLButtonElement>>;
|
|
121
|
+
Next: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & {
|
|
122
|
+
amount?: number;
|
|
123
|
+
} & import("react").RefAttributes<HTMLButtonElement>>;
|
|
124
|
+
MonthSelect: import("react").ForwardRefExoticComponent<DateRangePickerMonthSelectProps & import("react").RefAttributes<HTMLSelectElement>>;
|
|
125
|
+
YearSelect: import("react").ForwardRefExoticComponent<DateRangePickerYearSelectProps & import("react").RefAttributes<HTMLSelectElement>>;
|
|
126
|
+
Calendar: import("react").ForwardRefExoticComponent<DateRangePickerCalendarProps & import("react").RefAttributes<HTMLElement>>;
|
|
127
|
+
Day: import("react").ForwardRefExoticComponent<DateRangePickerDayProps & import("react").RefAttributes<HTMLButtonElement>>;
|
|
128
|
+
Preview: import("react").ForwardRefExoticComponent<DateRangePickerPreviewProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
129
|
+
StartInput: import("react").ForwardRefExoticComponent<Omit<DateRangePickerInputProps, "side"> & import("react").RefAttributes<HTMLInputElement>>;
|
|
130
|
+
EndInput: import("react").ForwardRefExoticComponent<Omit<DateRangePickerInputProps, "side"> & import("react").RefAttributes<HTMLInputElement>>;
|
|
131
|
+
};
|
|
132
|
+
//#endregion
|
|
133
|
+
export { DateRange, DateRangePicker, DateRangePickerCalendar, DateRangePickerCalendarProps, DateRangePickerClear, DateRangePickerClearProps, DateRangePickerClose, DateRangePickerCloseProps, DateRangePickerControl, DateRangePickerControlProps, DateRangePickerDay, DateRangePickerDayProps, DateRangePickerEndInput, DateRangePickerHeader, DateRangePickerHeaderProps, DateRangePickerInputProps, DateRangePickerLabel, DateRangePickerLabelProps, DateRangePickerMonthSelect, DateRangePickerMonthSelectProps, DateRangePickerNavigationProps, DateRangePickerNext, DateRangePickerPopup, DateRangePickerPopupProps, DateRangePickerPortal, DateRangePickerPortalProps, DateRangePickerPositioner, DateRangePickerPositionerProps, DateRangePickerPreview, DateRangePickerPreviewProps, DateRangePickerPrevious, DateRangePickerRoot, DateRangePickerRootProps, DateRangePickerStartInput, DateRangePickerTrigger, DateRangePickerTriggerProps, DateRangePickerValue, DateRangePickerValueProps, DateRangePickerYearRange, DateRangePickerYearSelect, DateRangePickerYearSelectProps };
|
|
134
|
+
//# sourceMappingURL=date-range-picker.d.ts.map
|