@allxsmith/bestax-bulma 5.67.0 → 5.67.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bestax.css +1 -1
- package/dist/bestax.css.map +1 -1
- package/dist/esm/components/Dropdown.js +8 -2
- package/dist/esm/components/Dropdown.js.map +1 -1
- package/dist/esm/form/Control.js +2 -5
- package/dist/esm/form/Control.js.map +1 -1
- package/dist/esm/form/DateInputBase.js +1 -1
- package/dist/esm/form/DateInputBase.js.map +1 -1
- package/dist/esm/form/DateRangeInputBase.js +1 -1
- package/dist/esm/form/DateRangeInputBase.js.map +1 -1
- package/dist/esm/form/DateTimeInputBase.js +3 -3
- package/dist/esm/form/DateTimeInputBase.js.map +1 -1
- package/dist/esm/form/Field.js +2 -4
- package/dist/esm/form/Field.js.map +1 -1
- package/dist/esm/form/_pickerInternals/Calendar.js +19 -10
- package/dist/esm/form/_pickerInternals/Calendar.js.map +1 -1
- package/dist/extras.css +1 -1
- package/dist/extras.css.map +1 -1
- package/dist/index.cjs +35 -25
- package/dist/index.cjs.map +1 -1
- package/dist/types/components/Dropdown.d.ts +5 -1
- package/dist/types/form/DateInputBase.d.ts +10 -2
- package/dist/types/form/DateRangeInputBase.d.ts +10 -2
- package/dist/types/form/DateTimeInputBase.d.ts +10 -2
- package/dist/types/form/_pickerInternals/Calendar.d.ts +12 -0
- package/dist/types-cjs/components/Dropdown.d.ts +5 -1
- package/dist/types-cjs/form/DateInputBase.d.ts +10 -2
- package/dist/types-cjs/form/DateRangeInputBase.d.ts +10 -2
- package/dist/types-cjs/form/DateTimeInputBase.d.ts +10 -2
- package/dist/types-cjs/form/_pickerInternals/Calendar.d.ts +12 -0
- package/dist/versions/bestax-no-dark-mode.css +1 -1
- package/dist/versions/bestax-no-dark-mode.css.map +1 -1
- package/dist/versions/bestax-no-helpers-prefixed.css +1 -1
- package/dist/versions/bestax-no-helpers-prefixed.css.map +1 -1
- package/dist/versions/bestax-no-helpers.css +1 -1
- package/dist/versions/bestax-no-helpers.css.map +1 -1
- package/dist/versions/bestax-prefixed.css +1 -1
- package/dist/versions/bestax-prefixed.css.map +1 -1
- package/package.json +1 -1
- package/src/scss/form/_dateinput.scss +4 -0
- package/src/scss/form/_datetimeinput.scss +9 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DateRangeInputBase.js","sources":["../../../src/form/DateRangeInputBase.tsx"],"sourcesContent":["import React, {\n forwardRef,\n useCallback,\n useEffect,\n useId,\n useMemo,\n useRef,\n useState,\n} from 'react';\nimport { classNames, usePrefixedClassNames } from '../helpers/classNames';\nimport { useBulmaClasses, BulmaClassesProps } from '../helpers/useBulmaClasses';\nimport {\n DateRangeValue,\n DayOfWeek,\n PickerLabels,\n PickerPosition,\n mergeLabels,\n} from './_pickerInternals/pickerTypes';\nimport {\n DEFAULT_DATE_FORMAT,\n DateFormatOption,\n formatDate,\n fromIsoValue,\n parseDate,\n toIsoValue,\n} from './_pickerInternals/formatters';\nimport {\n canCloseRange,\n clampDate,\n floorMin,\n isSameDay,\n isWithin,\n startOfDay,\n} from './_pickerInternals/dateUtils';\nimport { Calendar, CALENDAR_FOCUSED_CELL } from './_pickerInternals/Calendar';\nimport { PickerPopover } from './_pickerInternals/PickerPopover';\nimport { useNativeMobilePicker } from './_pickerInternals/useNativeMobilePicker';\nimport { useSegmentedEntry } from './_pickerInternals/useSegmentedEntry';\nimport {\n hasOwnDayNames,\n usePickerFirstDayOfWeek,\n usePickerLocale,\n usePickerLocaleScope,\n} from './_pickerInternals/useLocaleDefaults';\nimport { useControlLoading } from './controlLoading';\nimport { useAutoLabelledBy } from './useAutoLabelId';\nimport { useFieldsetDisabled } from './FormContext';\nimport { Icon } from '../elements/Icon';\n\nexport type { DateRangeValue };\n\nconst EMPTY_RANGE: DateRangeValue = [null, null];\n\n/** A range's end as the form and the native inputs carry it. */\nconst isoDay = (d: Date | null): string => (d ? toIsoValue(d, 'day') : '');\n\n/** Today at local midnight, where typing into an empty end starts. */\nconst today = (): Date => startOfDay(new Date());\n\n/**\n * Props for the raw DateRangeInput base. Use the higher-level\n * `DateRangeInput` for Field/Control composition; `DateRangeInputBase` is the\n * two inputs and the popover only.\n */\nexport interface DateRangeInputBaseProps\n extends\n Omit<\n React.HTMLAttributes<HTMLDivElement>,\n 'defaultValue' | 'onChange' | 'color' | 'placeholder' | 'popover'\n >,\n Omit<BulmaClassesProps, 'color'> {\n /**\n * Controlled range, start first. Either end may be `null`, and\n * `[null, null]` is empty.\n */\n value?: DateRangeValue;\n /** Initial range for uncontrolled usage. */\n defaultValue?: DateRangeValue;\n /**\n * Fired when the range changes, with the start first. Typing commits one\n * end at a time, so a range half typed arrives as `[start, null]`. The\n * calendar commits only a finished range: its first pick marks the start\n * inside the calendar and its second commits both ends in one call. The\n * range stays ordered, so the end is never before the start.\n */\n onChange?: (range: DateRangeValue) => void;\n /** Fired when the popover opens. */\n onOpen?: () => void;\n /** Fired when the popover closes. */\n onClose?: () => void;\n /**\n * Earliest selectable date, for either end. A `min` before year 1 is raised\n * to 1 January of year 1, where the range starts without one too.\n */\n min?: Date;\n /** Latest selectable date, for either end. */\n max?: Date;\n /** Disable both inputs and the launcher. */\n disabled?: boolean;\n /** Make both inputs read-only and keep the popover closed. */\n readOnly?: boolean;\n /** Placeholder text, shown in both inputs while they are empty. */\n placeholder?: string;\n /**\n * Token format string or `Intl.DateTimeFormat` options, used by both\n * inputs.\n * @defaultValue 'YYYY-MM-DD'\n */\n format?: DateFormatOption;\n /**\n * Custom parser (use when `format` is `Intl.DateTimeFormatOptions`).\n * Enter and leaving an input call it only if the user changed its text.\n */\n parse?: (s: string) => Date | null;\n /**\n * BCP-47 locale tag for day/month names and Intl formatting. Unset, it is\n * the `locale` of a `LocaleProvider` around the picker, and with neither,\n * `Intl` uses the runtime's own locale. On a server render that is the\n * server's, so an `inline` calendar rendered there names its days in the\n * server's language and the browser's own render names them in the\n * browser's: give it a locale, here or through a `LocaleProvider`, where\n * the two can differ.\n */\n locale?: string;\n /**\n * Render the calendar inline, with no inputs and no popover. The hidden\n * form inputs still carry the range.\n * On a server-rendered page it marks today once the page hydrates, by\n * the browser's clock rather than the server's. With no `value` or\n * `defaultValue` it opens on the month the clock reads, and around the end\n * of a month the server's clock and the browser's can read different\n * months, so give it a date both render the same.\n */\n inline?: boolean;\n /**\n * Use two native `<input type=\"date\">`s on coarse-pointer, small-viewport\n * devices (`'auto'`), always (`true`) or never (`false`). The end input's\n * `min` follows the start, and a change goes through the same rules as\n * typing.\n */\n mobileNative?: boolean | 'auto';\n /** Allow segmented keyboard typing in both inputs. `false` makes the field picker-only. */\n editable?: boolean;\n /** Whether the calendar popover exists. `false` makes the field input-only. */\n popover?: boolean;\n /**\n * Open the popover when focus arrives in the field. Moving focus between\n * the two inputs, or back from the launcher, leaves it closed, and so does\n * the focus a closing popover hands back. A click on either input opens it.\n * With it off, the launcher or Alt+ArrowDown opens it.\n */\n openOnFocus?: boolean;\n /**\n * Close the popover once the range is picked. The first pick, which only\n * marks the start, never closes it.\n */\n closeOnSelect?: boolean;\n /**\n * Where the popover opens against the field. Left out, it opens below and\n * lines up with the field's start edge, which is its right edge when the\n * picker reads right to left. A corner you pass stays physical, so\n * `bottom-left` lines up the left edges either way.\n * @defaultValue 'bottom-left'\n */\n position?: PickerPosition;\n /**\n * Render the popover through a portal, into the `portalContainer` a\n * `ConfigProvider` sets, `document.body` by default.\n */\n appendToBody?: boolean;\n /**\n * Bulma color modifier for the field, also carried by the calendar, where it\n * colors the range's ends and the band between them.\n */\n color?: 'primary' | 'link' | 'info' | 'success' | 'warning' | 'danger';\n /** Size variant. */\n size?: 'small' | 'medium' | 'large';\n /** Render the field with rounded corners. */\n isRounded?: boolean;\n /**\n * Predicate to disable specific dates (e.g. weekends). A disabled day can\n * be neither end, typing rejects it, and a range can't include one unless\n * `allowDisabledInRange` is set.\n */\n shouldDisableDate?: (d: Date) => boolean;\n /** Convenience array of disabled dates; merged with `shouldDisableDate`. Matched by calendar day. */\n unselectableDates?: Date[];\n /**\n * Let a range include days that `shouldDisableDate` or `unselectableDates`\n * disable, such as a stay over a night with no check-ins. Its ends still\n * can't be such days. Off, a pick in the calendar past a disabled day\n * starts a new range there, typing refuses an end past one, and a start\n * typed with one before the end clears the end. Finding one walks the days\n * between, so off, a span too long to walk is refused as well.\n */\n allowDisabledInRange?: boolean;\n /**\n * Day the week starts on (0 = Sunday). Unset inside a `LocaleProvider`,\n * it is the first day of the week in the picker's locale, its own `locale`\n * or else the provider's, such as Monday for `\"de\"`. Elsewhere, with no\n * locale from either, or with seven `dayNames` of your own, it is Sunday:\n * set it with `dayNames` to start the week on another day.\n * @defaultValue 0\n */\n firstDayOfWeek?: DayOfWeek;\n /**\n * Override the 7 day-name labels (in calendar order, post-rotation). They\n * are shown exactly as given, from the first column, so they have to start\n * on the day the week does. With them, an unset `firstDayOfWeek` stays\n * Sunday even inside a `LocaleProvider`, so names written Sunday first keep\n * matching their columns; to start on the locale's day, set\n * `firstDayOfWeek` too and list the names from that day.\n */\n dayNames?: string[];\n /** Override the 12 month-name labels. */\n monthNames?: string[];\n /** Show dimmed dates from adjacent months in the grid. */\n nearbyMonthDays?: boolean;\n /** Decorative left icon glyph for the wrapping `Control` (shown by default). Set `''` to hide. */\n iconLeftName?: string;\n /**\n * Show a clickable launcher button on the right that toggles the popover.\n * Hidden by default while a `Control` it sits in shows its `isLoading`\n * spinner, which shares that right edge.\n * @defaultValue true\n */\n triggerIcon?: boolean;\n /** Glyph for the right launcher button. */\n triggerIconName?: string;\n /**\n * Optional translatable string overrides. `rangeStart` and `rangeEnd` name\n * the two inputs and the range's ends in the calendar, `rangePreviewEnd`\n * describes the day a pending range would end on, `rangeSeparator` sits\n * between the inputs, and `chooseDateRange` names the launcher and the\n * popover.\n */\n labels?: PickerLabels;\n /**\n * Form field name. Two hidden inputs submit the range as `YYYY-MM-DD`,\n * named `name[start]` and `name[end]`, in every mode. The visible inputs\n * carry no name.\n */\n name?: string;\n /** Name of the hidden input carrying the start, in place of `name[start]`. */\n startName?: string;\n /** Name of the hidden input carrying the end, in place of `name[end]`. */\n endName?: string;\n /** Form id the hidden inputs belong to. */\n form?: string;\n /**\n * Mark both visible inputs required, so a form won't submit with either\n * end empty. An `inline` calendar has no visible input, so it is not\n * checked there.\n */\n required?: boolean;\n /** Id of the start input. The end input takes `${id}-end`. */\n id?: string;\n}\n\n/**\n * Raw DateRangeInput: the two inputs and the popover calendar without\n * Field/Control wrapping. Use `DateRangeInput` for the convenience wrapper.\n * Composed in a labeled `Field`, its `role=\"group\"` root points\n * `aria-labelledby` at that `Field`'s label, `inline` too, as the wrapper's\n * does, and each input keeps its own name. An `aria-label` or\n * `aria-labelledby` you give it wins over the label, and an `aria-labelledby`\n * key counts even when undefined, since it is spread over the group's own.\n *\n * @function\n * @param {DateRangeInputBaseProps} props\n * @returns {JSX.Element}\n */\nexport const DateRangeInputBase = forwardRef<\n HTMLInputElement,\n DateRangeInputBaseProps\n>((props, ref) => {\n const {\n value: controlledValue,\n defaultValue,\n onChange,\n onOpen,\n onClose,\n min,\n max,\n disabled: disabledProp,\n readOnly,\n placeholder,\n format,\n parse,\n locale: localeProp,\n inline = false,\n mobileNative = 'auto',\n editable = true,\n popover = true,\n openOnFocus = true,\n closeOnSelect = true,\n position,\n appendToBody = false,\n color,\n size,\n isRounded,\n shouldDisableDate,\n unselectableDates,\n allowDisabledInRange = false,\n firstDayOfWeek: firstDayOfWeekProp,\n dayNames,\n monthNames,\n nearbyMonthDays = true,\n iconLeftName: _iconLeftName,\n triggerIcon: triggerIconProp,\n triggerIconName = 'chevron-down',\n labels,\n name,\n startName,\n endName,\n form,\n required,\n id,\n className,\n onFocus,\n onFocusCapture,\n ...rest\n } = props;\n // A LocaleProvider around the picker sets its default locale and, through\n // that locale, the day its week starts on.\n const locale = usePickerLocale(localeProp);\n // Its own language and direction, which its root and a portaled panel\n // carry inside a provider.\n const localeScope = usePickerLocaleScope(localeProp, props.dir);\n const firstDayOfWeek = usePickerFirstDayOfWeek(\n firstDayOfWeekProp,\n locale,\n hasOwnDayNames(dayNames)\n );\n const disabled = useFieldsetDisabled(disabledProp);\n // The launcher gives way to the loading spinner of a Control this sits in.\n const controlLoading = useControlLoading();\n const triggerIcon = triggerIconProp ?? !controlLoading;\n\n const t = mergeLabels(labels);\n const resolvedFormat = format ?? DEFAULT_DATE_FORMAT;\n\n const isControlled = controlledValue !== undefined;\n const [internalValue, setInternalValue] = useState<DateRangeValue>(\n defaultValue ?? EMPTY_RANGE\n );\n const range = isControlled ? controlledValue : internalValue;\n const [start, end] = range;\n\n // Nothing before year 1 is in range, as in HTML's date inputs.\n const lowerBound = useMemo(() => floorMin(min), [min]);\n\n const [focusedDate, setFocusedDate] = useState<Date>(() =>\n clampDate(start ?? end ?? new Date(), lowerBound, max)\n );\n // Re-clamp the focused day if the bounds change after mount, so the\n // calendar never shows a month outside them.\n useEffect(() => {\n setFocusedDate(prev => clampDate(prev, lowerBound, max));\n }, [lowerBound, max]);\n\n const [open, setOpenState] = useState(false);\n const [startText, setStartText] = useState(() =>\n start ? formatDate(start, resolvedFormat, locale) : ''\n );\n const [endText, setEndText] = useState(() =>\n end ? formatDate(end, resolvedFormat, locale) : ''\n );\n // Each input shows its end of the range as it changes from outside.\n useEffect(() => {\n setStartText(start ? formatDate(start, resolvedFormat, locale) : '');\n }, [start, resolvedFormat, locale]);\n useEffect(() => {\n setEndText(end ? formatDate(end, resolvedFormat, locale) : '');\n }, [end, resolvedFormat, locale]);\n\n const containerRef = useRef<HTMLDivElement>(null);\n const startRef = useRef<HTMLInputElement>(null);\n const endRef = useRef<HTMLInputElement>(null);\n const reactId = useId();\n const popoverId = id ? `${id}-popover` : `picker-${reactId}`;\n\n const { bulmaHelperClasses, rest: cleanRest } = useBulmaClasses(rest);\n // Two inputs can't share a labeled Field's `for`, so inside one the group\n // points `aria-labelledby` at that Field's label, as `DateRangeInput`\n // does, in every mode. A name the caller gave the group wins, and so does\n // the `aria-labelledby` that wrapper always passes, so it decides there.\n const { ariaLabelledBy } = useAutoLabelledBy({\n label: undefined,\n rendersLabel: false,\n callerProps: rest,\n });\n\n const { shouldUseNative } = useNativeMobilePicker({\n force: mobileNative === 'auto' ? undefined : mobileNative,\n });\n const useNative = !inline && shouldUseNative;\n\n // The root borrows DateInput's container class, which places the launcher\n // and sizes a Control's icons around the field.\n const containerClass = usePrefixedClassNames(\n 'daterangeinput',\n 'dateinput-container'\n );\n const fieldClass = usePrefixedClassNames('input', 'daterangeinput-field', {\n [`is-${color}`]: !!color,\n [`is-${size}`]: !!size,\n 'is-rounded': isRounded,\n 'is-disabled': disabled,\n });\n const inputClass = usePrefixedClassNames('daterangeinput-input');\n const separatorClass = usePrefixedClassNames('daterangeinput-separator');\n const triggerClass = usePrefixedClassNames('dateinput-trigger');\n\n // What the latest request asked for, so a second request in the same event\n // sees it before React renders. The callbacks fire here rather than in a\n // state updater, which StrictMode calls twice.\n const requestedOpenRef = useRef(false);\n const setOpen = useCallback(\n (next: boolean) => {\n if (requestedOpenRef.current === next) return;\n requestedOpenRef.current = next;\n setOpenState(next);\n if (next) onOpen?.();\n else onClose?.();\n },\n [onOpen, onClose]\n );\n\n // Focus that moves inside the field, from one input to the other or from\n // the launcher, is not focus arriving, so it opens nothing. Set as the\n // focus is captured on the way in, and cleared once the input has handled\n // it, so a click that follows still opens the popover.\n const focusFromInsideRef = useRef(false);\n const handleFocusCapture = (e: React.FocusEvent<HTMLDivElement>) => {\n const from = e.relatedTarget as Node | null;\n focusFromInsideRef.current = !!from && e.currentTarget.contains(from);\n onFocusCapture?.(e);\n };\n const handleFocus = (e: React.FocusEvent<HTMLDivElement>) => {\n focusFromInsideRef.current = false;\n onFocus?.(e);\n };\n const requestOpen = useCallback(\n (next: boolean) => {\n if (next && focusFromInsideRef.current) return;\n setOpen(next);\n },\n [setOpen]\n );\n\n const commitRange = useCallback(\n (next: DateRangeValue) => {\n if (!isControlled) setInternalValue(next);\n onChange?.(next);\n },\n [isControlled, onChange]\n );\n\n const constraints = useMemo(\n () => ({ shouldDisableDate, unselectableDates }),\n [shouldDisableDate, unselectableDates]\n );\n // A day the calendar disables: shouldDisableDate or unselectableDates.\n // Typing and the native inputs check the bounds alongside it.\n const isBlockedDay = useCallback(\n (d: Date) =>\n !!shouldDisableDate?.(d) ||\n !!unselectableDates?.some(u => isSameDay(u, d)),\n [shouldDisableDate, unselectableDates]\n );\n // An end the range can take: it is not disabled, and it closes a range\n // from the start, which it can't when it comes first or, unless allowed,\n // reaches over a disabled day.\n const isBlockedEnd = useCallback(\n (d: Date) =>\n isBlockedDay(d) ||\n (!!start && !canCloseRange(start, d, constraints, allowDisabledInRange)),\n [isBlockedDay, start, constraints, allowDisabledInRange]\n );\n\n // A new start keeps the end only while the two still make a range, so a\n // start moved past the end, or over a disabled day before it, clears it.\n const commitStart = useCallback(\n (next: Date | null) => {\n const keepsEnd =\n !next ||\n !end ||\n canCloseRange(next, end, constraints, allowDisabledInRange);\n commitRange([next, keepsEnd ? end : null]);\n if (next) setFocusedDate(next);\n },\n [end, constraints, allowDisabledInRange, commitRange]\n );\n // Every digit typed into the start commits, so a start passes through\n // values on its way to the one being typed. The first digits of a year make\n // a start centuries back, which can't keep the end once a disabled day may\n // lie between. Such a value waits for the segment's next digit rather than\n // clearing an end the finished start may keep.\n const startCostsEnd = useCallback(\n (d: Date) =>\n !!end && !canCloseRange(d, end, constraints, allowDisabledInRange),\n [end, constraints, allowDisabledInRange]\n );\n const commitEnd = useCallback(\n (next: Date | null) => {\n commitRange([start, next]);\n if (next) setFocusedDate(next);\n },\n [start, commitRange]\n );\n\n const handleRangeSelect = useCallback(\n (from: Date, to: Date) => {\n commitRange([from, to]);\n setFocusedDate(to);\n if (closeOnSelect) setOpen(false);\n },\n [commitRange, closeOnSelect, setOpen]\n );\n\n const tryParse = useCallback(\n (s: string): Date | null => {\n const trimmed = s.trim();\n if (!trimmed) return null;\n const fmt = typeof format === 'string' ? format : undefined;\n return parse\n ? parse(trimmed)\n : parseDate(trimmed, fmt ?? DEFAULT_DATE_FORMAT, locale);\n },\n [parse, format, locale]\n );\n\n // Typing into an empty end starts from the start, so only what differs\n // needs typing; an empty start starts from today.\n const makeEndBase = useCallback(\n () => (start ? startOfDay(start) : today()),\n [start]\n );\n\n // Where focus goes back as the popover closes: the input focused last,\n // which is the one that opened it unless the launcher did, or the start\n // input before either has had focus.\n const openerRef = useRef<HTMLInputElement | null>(null);\n const restoreFocusRef = useMemo(\n () => ({\n get current() {\n return openerRef.current ?? startRef.current;\n },\n }),\n []\n );\n\n const shared = {\n format: resolvedFormat,\n formatFn: formatDate,\n tryParse,\n locale,\n min: lowerBound,\n max,\n disabled,\n readOnly,\n editable,\n popover,\n openOnFocus,\n closeOnSelect,\n isOpen: open,\n setOpen: requestOpen,\n };\n // Each input is its own picker field. Its blur counts focus leaving it,\n // even for the other input, so text typed into one is read as focus moves\n // to the other.\n const { inputHandlers: startHandlers } = useSegmentedEntry({\n ...shared,\n value: start,\n commitValue: commitStart,\n text: startText,\n setText: setStartText,\n makeBaseDate: today,\n isBlocked: isBlockedDay,\n isUnfinishedBlocked: startCostsEnd,\n inputRef: startRef,\n containerRef: startRef,\n onFocus: () => {\n openerRef.current = startRef.current;\n },\n });\n const { inputHandlers: endHandlers } = useSegmentedEntry({\n ...shared,\n value: end,\n commitValue: commitEnd,\n text: endText,\n setText: setEndText,\n makeBaseDate: makeEndBase,\n isBlocked: isBlockedEnd,\n inputRef: endRef,\n containerRef: endRef,\n onFocus: () => {\n openerRef.current = endRef.current;\n },\n });\n\n const combinedRef = useCallback(\n (node: HTMLInputElement | null) => {\n (startRef as React.MutableRefObject<HTMLInputElement | null>).current =\n node;\n if (typeof ref === 'function') ref(node);\n else if (ref)\n (ref as React.MutableRefObject<HTMLInputElement | null>).current = node;\n },\n [ref]\n );\n\n const handlePopoverClose = useCallback(() => setOpen(false), [setOpen]);\n\n const startField = startName ?? (name ? `${name}[start]` : undefined);\n const endField = endName ?? (name ? `${name}[end]` : undefined);\n const hiddenInputs = (\n <>\n {startField && (\n <input\n type=\"hidden\"\n name={startField}\n form={form}\n value={isoDay(start)}\n />\n )}\n {endField && (\n <input type=\"hidden\" name={endField} form={form} value={isoDay(end)} />\n )}\n </>\n );\n\n const separator = (\n <span className={separatorClass} aria-hidden=\"true\">\n {t.rangeSeparator}\n </span>\n );\n\n // Native mobile path: two <input type=\"date\">s, held to the same rules as\n // typing. A change the rules refuse leaves the input showing the range.\n if (useNative) {\n const nativeChange =\n (commit: (d: Date | null) => void, isBlocked: (d: Date) => boolean) =>\n (e: React.ChangeEvent<HTMLInputElement>) => {\n // An empty value is the end cleared. A date input gives nothing else\n // that doesn't read as a date.\n const parsed = fromIsoValue(e.target.value, 'day');\n if (!parsed) commit(null);\n else if (isWithin(parsed, lowerBound, max) && !isBlocked(parsed)) {\n commit(parsed);\n }\n };\n const minIso = min ? isoDay(lowerBound) : undefined;\n const maxIso = max ? isoDay(max) : undefined;\n return (\n <div\n aria-labelledby={ariaLabelledBy}\n {...localeScope.rootAttrs}\n {...cleanRest}\n ref={containerRef}\n role=\"group\"\n className={classNames(containerClass, bulmaHelperClasses, className)}\n onFocus={onFocus}\n onFocusCapture={onFocusCapture}\n >\n <div className={fieldClass}>\n <input\n ref={combinedRef}\n type=\"date\"\n id={id}\n aria-label={t.rangeStart}\n className={inputClass}\n value={isoDay(start)}\n onChange={nativeChange(commitStart, isBlockedDay)}\n min={minIso}\n max={maxIso}\n disabled={disabled}\n readOnly={readOnly}\n required={required}\n />\n {separator}\n <input\n ref={endRef}\n type=\"date\"\n id={id ? `${id}-end` : undefined}\n aria-label={t.rangeEnd}\n className={inputClass}\n value={isoDay(end)}\n onChange={nativeChange(commitEnd, isBlockedEnd)}\n min={start ? isoDay(start) : minIso}\n max={maxIso}\n disabled={disabled}\n readOnly={readOnly}\n required={required}\n />\n </div>\n {hiddenInputs}\n </div>\n );\n }\n\n const calendar = (\n <Calendar\n range={range}\n onRangeSelect={handleRangeSelect}\n allowDisabledInRange={allowDisabledInRange}\n focusedDate={focusedDate}\n onFocusedDateChange={setFocusedDate}\n min={min}\n max={max}\n shouldDisableDate={shouldDisableDate}\n unselectableDates={unselectableDates}\n firstDayOfWeek={firstDayOfWeek}\n locale={locale}\n dayNames={dayNames}\n monthNames={monthNames}\n nearbyMonthDays={nearbyMonthDays}\n color={color}\n size={size}\n // The popover panel takes `popoverId`, so the calendar inside it takes\n // one of its own. Inline there is no panel.\n id={inline ? popoverId : `${popoverId}-cal`}\n autoFocusCell={open}\n labels={labels}\n />\n );\n\n if (inline) {\n return (\n <div\n aria-labelledby={ariaLabelledBy}\n {...localeScope.rootAttrs}\n {...cleanRest}\n ref={containerRef}\n role=\"group\"\n className={classNames(containerClass, bulmaHelperClasses, className)}\n onFocus={onFocus}\n onFocusCapture={onFocusCapture}\n >\n {calendar}\n {hiddenInputs}\n </div>\n );\n }\n\n const canOpen = !!popover && !disabled && !readOnly;\n const inputReadOnly = !!readOnly || !editable;\n\n // The field reads as one text box, so a press on it that misses both\n // inputs, on its padding, the gap or the separator, goes to the nearer\n // input and does what a press on that input does.\n const handleFieldMouseDown = (e: React.MouseEvent<HTMLDivElement>) => {\n const startInput = startRef.current as HTMLInputElement;\n const endInput = endRef.current as HTMLInputElement;\n if (disabled || e.button !== 0) return;\n if (e.target === startInput || e.target === endInput) return;\n e.preventDefault();\n const middle =\n (startInput.getBoundingClientRect().right +\n endInput.getBoundingClientRect().left) /\n 2;\n (e.clientX < middle ? startInput : endInput).focus();\n if (openOnFocus && canOpen) requestOpen(true);\n };\n const comboboxProps = {\n type: 'text',\n role: 'combobox',\n 'aria-haspopup': 'dialog' as const,\n 'aria-expanded': open,\n 'aria-controls': popoverId,\n autoComplete: 'off',\n className: inputClass,\n placeholder,\n disabled,\n readOnly: inputReadOnly,\n required,\n };\n\n return (\n <div\n aria-labelledby={ariaLabelledBy}\n {...localeScope.rootAttrs}\n {...cleanRest}\n ref={containerRef}\n role=\"group\"\n className={classNames(containerClass, bulmaHelperClasses, className)}\n onFocus={handleFocus}\n onFocusCapture={handleFocusCapture}\n >\n <div className={fieldClass} onMouseDown={handleFieldMouseDown}>\n <input\n {...comboboxProps}\n ref={combinedRef}\n id={id}\n aria-label={t.rangeStart}\n value={startText}\n {...startHandlers}\n />\n {separator}\n <input\n {...comboboxProps}\n ref={endRef}\n id={id ? `${id}-end` : undefined}\n aria-label={t.rangeEnd}\n value={endText}\n {...endHandlers}\n />\n </div>\n {popover && triggerIcon && (\n <button\n type=\"button\"\n className={triggerClass}\n // Disabled whenever the popover can't open, so a click can.\n onClick={() => setOpen(!open)}\n disabled={!canOpen}\n aria-label={t.chooseDateRange}\n aria-haspopup=\"dialog\"\n aria-controls={popoverId}\n aria-expanded={open}\n tabIndex={canOpen ? 0 : -1}\n >\n <Icon name={triggerIconName} size={size} />\n </button>\n )}\n {popover && (\n <PickerPopover\n localeScope={localeScope.panel}\n isOpen={open}\n onClose={handlePopoverClose}\n anchorRef={containerRef}\n position={position}\n appendToBody={appendToBody}\n ariaLabel={t.chooseDateRange}\n id={popoverId}\n restoreFocusRef={restoreFocusRef}\n initialFocusSelector={CALENDAR_FOCUSED_CELL}\n >\n {calendar}\n </PickerPopover>\n )}\n {hiddenInputs}\n </div>\n );\n});\n\nDateRangeInputBase.displayName = 'DateRangeInputBase';\n\nexport default DateRangeInputBase;\n"],"names":["_jsxs","_Fragment","_jsx"],"mappings":";;;;;;;;;;;;;;;;;;;AAmDA,MAAM,WAAW,GAAmB,CAAC,IAAI,EAAE,IAAI,CAAC;AAEhD;AACA,MAAM,MAAM,GAAG,CAAC,CAAc,MAAc,CAAC,GAAG,UAAU,CAAC,CAAC,EAAE,KAAK,CAAC,GAAG,EAAE,CAAC;AAE1E;AACA,MAAM,KAAK,GAAG,MAAY,UAAU,CAAC,IAAI,IAAI,EAAE,CAAC;AA0MhD;;;;;;;;;;;;AAYG;AACI,MAAM,kBAAkB,GAAG,UAAU,CAG1C,CAAC,KAAK,EAAE,GAAG,KAAI;AACf,IAAA,MAAM,EAC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,aAAa,EACjB,GAAG,EAAE,MAAM,EACX,EAAE,EAAE,EAAE,GAAG,CAAA,EAAG,EAAE,CAAA,IAAA,CAAM,GAAG,SAAS,EAAA,YAAA,EACpB,CAAC,CAAC,QAAQ,EACtB,KAAK,EAAE,OAAO,EAAA,GACV,WAAW,EAAA,CACf,CAAA,EAAA,CACE,EACL,OAAO,IAAI,WAAW,KACrBA,GAAA,CAAA,QAAA,EAAA,EACE,IAAI,EAAC,QAAQ,EACb,SAAS,EAAE,YAAY;;gBAEvB,OAAO,EAAE,MAAM,OAAO,CAAC,CAAC,IAAI,CAAC,EAC7B,QAAQ,EAAE,CAAC,OAAO,EAAA,YAAA,EACN,CAAC,CAAC,eAAe,EAAA,eAAA,EACf,QAAQ,EAAA,eAAA,EACP,SAAS,EAAA,eAAA,EACT,IAAI,EACnB,QAAQ,EAAE,OAAO,GAAG,CAAC,GAAG,EAAE,EAAA,QAAA,EAE1BA,GAAA,CAAC,IAAI,IAAC,IAAI,EAAE,eAAe,EAAE,IAAI,EAAE,IAAI,EAAA,CAAI,EAAA,CACpC,CACV,EACA,OAAO,KACNA,GAAA,CAAC,aAAa,EAAA,EACZ,WAAW,EAAE,WAAW,CAAC,KAAK,EAC9B,MAAM,EAAE,IAAI,EACZ,OAAO,EAAE,kBAAkB,EAC3B,SAAS,EAAE,YAAY,EACvB,QAAQ,EAAE,QAAQ,EAClB,YAAY,EAAE,YAAY,EAC1B,SAAS,EAAE,CAAC,CAAC,eAAe,EAC5B,EAAE,EAAE,SAAS,EACb,eAAe,EAAE,eAAe,EAChC,oBAAoB,EAAE,qBAAqB,EAAA,QAAA,EAE1C,QAAQ,EAAA,CACK,CACjB,EACA,YAAY,CAAA,EAAA,CACT;AAEV,CAAC;AAED,kBAAkB,CAAC,WAAW,GAAG,oBAAoB;;"}
|
|
1
|
+
{"version":3,"file":"DateRangeInputBase.js","sources":["../../../src/form/DateRangeInputBase.tsx"],"sourcesContent":["import React, {\n forwardRef,\n useCallback,\n useEffect,\n useId,\n useMemo,\n useRef,\n useState,\n} from 'react';\nimport { classNames, usePrefixedClassNames } from '../helpers/classNames';\nimport { useBulmaClasses, BulmaClassesProps } from '../helpers/useBulmaClasses';\nimport {\n DateRangeValue,\n DayOfWeek,\n PickerLabels,\n PickerPosition,\n mergeLabels,\n} from './_pickerInternals/pickerTypes';\nimport {\n DEFAULT_DATE_FORMAT,\n DateFormatOption,\n formatDate,\n fromIsoValue,\n parseDate,\n toIsoValue,\n} from './_pickerInternals/formatters';\nimport {\n canCloseRange,\n clampDate,\n floorMin,\n isSameDay,\n isWithin,\n startOfDay,\n} from './_pickerInternals/dateUtils';\nimport { Calendar, CALENDAR_FOCUSED_CELL } from './_pickerInternals/Calendar';\nimport { PickerPopover } from './_pickerInternals/PickerPopover';\nimport { useNativeMobilePicker } from './_pickerInternals/useNativeMobilePicker';\nimport { useSegmentedEntry } from './_pickerInternals/useSegmentedEntry';\nimport {\n hasOwnDayNames,\n usePickerFirstDayOfWeek,\n usePickerLocale,\n usePickerLocaleScope,\n} from './_pickerInternals/useLocaleDefaults';\nimport { useControlLoading } from './controlLoading';\nimport { useAutoLabelledBy } from './useAutoLabelId';\nimport { useFieldsetDisabled } from './FormContext';\nimport { Icon } from '../elements/Icon';\n\nexport type { DateRangeValue };\n\nconst EMPTY_RANGE: DateRangeValue = [null, null];\n\n/** A range's end as the form and the native inputs carry it. */\nconst isoDay = (d: Date | null): string => (d ? toIsoValue(d, 'day') : '');\n\n/** Today at local midnight, where typing into an empty end starts. */\nconst today = (): Date => startOfDay(new Date());\n\n/**\n * Props for the raw DateRangeInput base. Use the higher-level\n * `DateRangeInput` for Field/Control composition; `DateRangeInputBase` is the\n * two inputs and the popover only.\n */\nexport interface DateRangeInputBaseProps\n extends\n Omit<\n React.HTMLAttributes<HTMLDivElement>,\n 'defaultValue' | 'onChange' | 'color' | 'placeholder' | 'popover'\n >,\n Omit<BulmaClassesProps, 'color'> {\n /**\n * Controlled range, start first. Either end may be `null`, and\n * `[null, null]` is empty.\n */\n value?: DateRangeValue;\n /** Initial range for uncontrolled usage. */\n defaultValue?: DateRangeValue;\n /**\n * Fired when the range changes, with the start first. Typing commits one\n * end at a time, so a range half typed arrives as `[start, null]`. The\n * calendar commits only a finished range: its first pick marks the start\n * inside the calendar and its second commits both ends in one call. The\n * range stays ordered, so the end is never before the start.\n */\n onChange?: (range: DateRangeValue) => void;\n /** Fired when the popover opens. */\n onOpen?: () => void;\n /** Fired when the popover closes. */\n onClose?: () => void;\n /**\n * Earliest selectable date, for either end. A `min` before year 1 is raised\n * to 1 January of year 1, where the range starts without one too.\n */\n min?: Date;\n /** Latest selectable date, for either end. */\n max?: Date;\n /**\n * Disable both inputs and the launcher, or an `inline` calendar's days and\n * header buttons. The hidden inputs still submit the range, in every mode,\n * where a disabled input submits nothing.\n */\n disabled?: boolean;\n /**\n * Make both inputs read-only and keep the popover closed. An `inline`\n * calendar still moves through the dates by key and by its header, but a\n * click, Enter or Space picks nothing.\n */\n readOnly?: boolean;\n /** Placeholder text, shown in both inputs while they are empty. */\n placeholder?: string;\n /**\n * Token format string or `Intl.DateTimeFormat` options, used by both\n * inputs.\n * @defaultValue 'YYYY-MM-DD'\n */\n format?: DateFormatOption;\n /**\n * Custom parser (use when `format` is `Intl.DateTimeFormatOptions`).\n * Enter and leaving an input call it only if the user changed its text.\n */\n parse?: (s: string) => Date | null;\n /**\n * BCP-47 locale tag for day/month names and Intl formatting. Unset, it is\n * the `locale` of a `LocaleProvider` around the picker, and with neither,\n * `Intl` uses the runtime's own locale. On a server render that is the\n * server's, so an `inline` calendar rendered there names its days in the\n * server's language and the browser's own render names them in the\n * browser's: give it a locale, here or through a `LocaleProvider`, where\n * the two can differ.\n */\n locale?: string;\n /**\n * Render the calendar inline, with no inputs and no popover. The hidden\n * form inputs still carry the range.\n * On a server-rendered page it marks today once the page hydrates, by\n * the browser's clock rather than the server's. With no `value` or\n * `defaultValue` it opens on the month the clock reads, and around the end\n * of a month the server's clock and the browser's can read different\n * months, so give it a date both render the same.\n */\n inline?: boolean;\n /**\n * Use two native `<input type=\"date\">`s on coarse-pointer, small-viewport\n * devices (`'auto'`), always (`true`) or never (`false`). The end input's\n * `min` follows the start, and a change goes through the same rules as\n * typing.\n */\n mobileNative?: boolean | 'auto';\n /** Allow segmented keyboard typing in both inputs. `false` makes the field picker-only. */\n editable?: boolean;\n /** Whether the calendar popover exists. `false` makes the field input-only. */\n popover?: boolean;\n /**\n * Open the popover when focus arrives in the field. Moving focus between\n * the two inputs, or back from the launcher, leaves it closed, and so does\n * the focus a closing popover hands back. A click on either input opens it.\n * With it off, the launcher or Alt+ArrowDown opens it.\n */\n openOnFocus?: boolean;\n /**\n * Close the popover once the range is picked. The first pick, which only\n * marks the start, never closes it.\n */\n closeOnSelect?: boolean;\n /**\n * Where the popover opens against the field. Left out, it opens below and\n * lines up with the field's start edge, which is its right edge when the\n * picker reads right to left. A corner you pass stays physical, so\n * `bottom-left` lines up the left edges either way.\n * @defaultValue 'bottom-left'\n */\n position?: PickerPosition;\n /**\n * Render the popover through a portal, into the `portalContainer` a\n * `ConfigProvider` sets, `document.body` by default.\n */\n appendToBody?: boolean;\n /**\n * Bulma color modifier for the field, also carried by the calendar, where it\n * colors the range's ends and the band between them.\n */\n color?: 'primary' | 'link' | 'info' | 'success' | 'warning' | 'danger';\n /** Size variant. */\n size?: 'small' | 'medium' | 'large';\n /** Render the field with rounded corners. */\n isRounded?: boolean;\n /**\n * Predicate to disable specific dates (e.g. weekends). A disabled day can\n * be neither end, typing rejects it, and a range can't include one unless\n * `allowDisabledInRange` is set.\n */\n shouldDisableDate?: (d: Date) => boolean;\n /** Convenience array of disabled dates; merged with `shouldDisableDate`. Matched by calendar day. */\n unselectableDates?: Date[];\n /**\n * Let a range include days that `shouldDisableDate` or `unselectableDates`\n * disable, such as a stay over a night with no check-ins. Its ends still\n * can't be such days. Off, a pick in the calendar past a disabled day\n * starts a new range there, typing refuses an end past one, and a start\n * typed with one before the end clears the end. Finding one walks the days\n * between, so off, a span too long to walk is refused as well.\n */\n allowDisabledInRange?: boolean;\n /**\n * Day the week starts on (0 = Sunday). Unset inside a `LocaleProvider`,\n * it is the first day of the week in the picker's locale, its own `locale`\n * or else the provider's, such as Monday for `\"de\"`. Elsewhere, with no\n * locale from either, or with seven `dayNames` of your own, it is Sunday:\n * set it with `dayNames` to start the week on another day.\n * @defaultValue 0\n */\n firstDayOfWeek?: DayOfWeek;\n /**\n * Override the 7 day-name labels (in calendar order, post-rotation). They\n * are shown exactly as given, from the first column, so they have to start\n * on the day the week does. With them, an unset `firstDayOfWeek` stays\n * Sunday even inside a `LocaleProvider`, so names written Sunday first keep\n * matching their columns; to start on the locale's day, set\n * `firstDayOfWeek` too and list the names from that day.\n */\n dayNames?: string[];\n /** Override the 12 month-name labels. */\n monthNames?: string[];\n /** Show dimmed dates from adjacent months in the grid. */\n nearbyMonthDays?: boolean;\n /** Decorative left icon glyph for the wrapping `Control` (shown by default). Set `''` to hide. */\n iconLeftName?: string;\n /**\n * Show a clickable launcher button on the right that toggles the popover.\n * Hidden by default while a `Control` it sits in shows its `isLoading`\n * spinner, which shares that right edge.\n * @defaultValue true\n */\n triggerIcon?: boolean;\n /** Glyph for the right launcher button. */\n triggerIconName?: string;\n /**\n * Optional translatable string overrides. `rangeStart` and `rangeEnd` name\n * the two inputs and the range's ends in the calendar, `rangePreviewEnd`\n * describes the day a pending range would end on, `rangeSeparator` sits\n * between the inputs, and `chooseDateRange` names the launcher and the\n * popover.\n */\n labels?: PickerLabels;\n /**\n * Form field name. Two hidden inputs submit the range as `YYYY-MM-DD`,\n * named `name[start]` and `name[end]`, in every mode. The visible inputs\n * carry no name.\n */\n name?: string;\n /** Name of the hidden input carrying the start, in place of `name[start]`. */\n startName?: string;\n /** Name of the hidden input carrying the end, in place of `name[end]`. */\n endName?: string;\n /** Form id the hidden inputs belong to. */\n form?: string;\n /**\n * Mark both visible inputs required, so a form won't submit with either\n * end empty. An `inline` calendar has no visible input, so it is not\n * checked there.\n */\n required?: boolean;\n /** Id of the start input. The end input takes `${id}-end`. */\n id?: string;\n}\n\n/**\n * Raw DateRangeInput: the two inputs and the popover calendar without\n * Field/Control wrapping. Use `DateRangeInput` for the convenience wrapper.\n * Composed in a labeled `Field`, its `role=\"group\"` root points\n * `aria-labelledby` at that `Field`'s label, `inline` too, as the wrapper's\n * does, and each input keeps its own name. An `aria-label` or\n * `aria-labelledby` you give it wins over the label, and an `aria-labelledby`\n * key counts even when undefined, since it is spread over the group's own.\n *\n * @function\n * @param {DateRangeInputBaseProps} props\n * @returns {JSX.Element}\n */\nexport const DateRangeInputBase = forwardRef<\n HTMLInputElement,\n DateRangeInputBaseProps\n>((props, ref) => {\n const {\n value: controlledValue,\n defaultValue,\n onChange,\n onOpen,\n onClose,\n min,\n max,\n disabled: disabledProp,\n readOnly,\n placeholder,\n format,\n parse,\n locale: localeProp,\n inline = false,\n mobileNative = 'auto',\n editable = true,\n popover = true,\n openOnFocus = true,\n closeOnSelect = true,\n position,\n appendToBody = false,\n color,\n size,\n isRounded,\n shouldDisableDate,\n unselectableDates,\n allowDisabledInRange = false,\n firstDayOfWeek: firstDayOfWeekProp,\n dayNames,\n monthNames,\n nearbyMonthDays = true,\n iconLeftName: _iconLeftName,\n triggerIcon: triggerIconProp,\n triggerIconName = 'chevron-down',\n labels,\n name,\n startName,\n endName,\n form,\n required,\n id,\n className,\n onFocus,\n onFocusCapture,\n ...rest\n } = props;\n // A LocaleProvider around the picker sets its default locale and, through\n // that locale, the day its week starts on.\n const locale = usePickerLocale(localeProp);\n // Its own language and direction, which its root and a portaled panel\n // carry inside a provider.\n const localeScope = usePickerLocaleScope(localeProp, props.dir);\n const firstDayOfWeek = usePickerFirstDayOfWeek(\n firstDayOfWeekProp,\n locale,\n hasOwnDayNames(dayNames)\n );\n const disabled = useFieldsetDisabled(disabledProp);\n // The launcher gives way to the loading spinner of a Control this sits in.\n const controlLoading = useControlLoading();\n const triggerIcon = triggerIconProp ?? !controlLoading;\n\n const t = mergeLabels(labels);\n const resolvedFormat = format ?? DEFAULT_DATE_FORMAT;\n\n const isControlled = controlledValue !== undefined;\n const [internalValue, setInternalValue] = useState<DateRangeValue>(\n defaultValue ?? EMPTY_RANGE\n );\n const range = isControlled ? controlledValue : internalValue;\n const [start, end] = range;\n\n // Nothing before year 1 is in range, as in HTML's date inputs.\n const lowerBound = useMemo(() => floorMin(min), [min]);\n\n const [focusedDate, setFocusedDate] = useState<Date>(() =>\n clampDate(start ?? end ?? new Date(), lowerBound, max)\n );\n // Re-clamp the focused day if the bounds change after mount, so the\n // calendar never shows a month outside them.\n useEffect(() => {\n setFocusedDate(prev => clampDate(prev, lowerBound, max));\n }, [lowerBound, max]);\n\n const [open, setOpenState] = useState(false);\n const [startText, setStartText] = useState(() =>\n start ? formatDate(start, resolvedFormat, locale) : ''\n );\n const [endText, setEndText] = useState(() =>\n end ? formatDate(end, resolvedFormat, locale) : ''\n );\n // Each input shows its end of the range as it changes from outside.\n useEffect(() => {\n setStartText(start ? formatDate(start, resolvedFormat, locale) : '');\n }, [start, resolvedFormat, locale]);\n useEffect(() => {\n setEndText(end ? formatDate(end, resolvedFormat, locale) : '');\n }, [end, resolvedFormat, locale]);\n\n const containerRef = useRef<HTMLDivElement>(null);\n const startRef = useRef<HTMLInputElement>(null);\n const endRef = useRef<HTMLInputElement>(null);\n const reactId = useId();\n const popoverId = id ? `${id}-popover` : `picker-${reactId}`;\n\n const { bulmaHelperClasses, rest: cleanRest } = useBulmaClasses(rest);\n // Two inputs can't share a labeled Field's `for`, so inside one the group\n // points `aria-labelledby` at that Field's label, as `DateRangeInput`\n // does, in every mode. A name the caller gave the group wins, and so does\n // the `aria-labelledby` that wrapper always passes, so it decides there.\n const { ariaLabelledBy } = useAutoLabelledBy({\n label: undefined,\n rendersLabel: false,\n callerProps: rest,\n });\n\n const { shouldUseNative } = useNativeMobilePicker({\n force: mobileNative === 'auto' ? undefined : mobileNative,\n });\n const useNative = !inline && shouldUseNative;\n\n // The root borrows DateInput's container class, which places the launcher\n // and sizes a Control's icons around the field.\n const containerClass = usePrefixedClassNames(\n 'daterangeinput',\n 'dateinput-container'\n );\n const fieldClass = usePrefixedClassNames('input', 'daterangeinput-field', {\n [`is-${color}`]: !!color,\n [`is-${size}`]: !!size,\n 'is-rounded': isRounded,\n 'is-disabled': disabled,\n });\n const inputClass = usePrefixedClassNames('daterangeinput-input');\n const separatorClass = usePrefixedClassNames('daterangeinput-separator');\n const triggerClass = usePrefixedClassNames('dateinput-trigger');\n\n // What the latest request asked for, so a second request in the same event\n // sees it before React renders. The callbacks fire here rather than in a\n // state updater, which StrictMode calls twice.\n const requestedOpenRef = useRef(false);\n const setOpen = useCallback(\n (next: boolean) => {\n if (requestedOpenRef.current === next) return;\n requestedOpenRef.current = next;\n setOpenState(next);\n if (next) onOpen?.();\n else onClose?.();\n },\n [onOpen, onClose]\n );\n\n // Focus that moves inside the field, from one input to the other or from\n // the launcher, is not focus arriving, so it opens nothing. Set as the\n // focus is captured on the way in, and cleared once the input has handled\n // it, so a click that follows still opens the popover.\n const focusFromInsideRef = useRef(false);\n const handleFocusCapture = (e: React.FocusEvent<HTMLDivElement>) => {\n const from = e.relatedTarget as Node | null;\n focusFromInsideRef.current = !!from && e.currentTarget.contains(from);\n onFocusCapture?.(e);\n };\n const handleFocus = (e: React.FocusEvent<HTMLDivElement>) => {\n focusFromInsideRef.current = false;\n onFocus?.(e);\n };\n const requestOpen = useCallback(\n (next: boolean) => {\n if (next && focusFromInsideRef.current) return;\n setOpen(next);\n },\n [setOpen]\n );\n\n const commitRange = useCallback(\n (next: DateRangeValue) => {\n if (!isControlled) setInternalValue(next);\n onChange?.(next);\n },\n [isControlled, onChange]\n );\n\n const constraints = useMemo(\n () => ({ shouldDisableDate, unselectableDates }),\n [shouldDisableDate, unselectableDates]\n );\n // A day the calendar disables: shouldDisableDate or unselectableDates.\n // Typing and the native inputs check the bounds alongside it.\n const isBlockedDay = useCallback(\n (d: Date) =>\n !!shouldDisableDate?.(d) ||\n !!unselectableDates?.some(u => isSameDay(u, d)),\n [shouldDisableDate, unselectableDates]\n );\n // An end the range can take: it is not disabled, and it closes a range\n // from the start, which it can't when it comes first or, unless allowed,\n // reaches over a disabled day.\n const isBlockedEnd = useCallback(\n (d: Date) =>\n isBlockedDay(d) ||\n (!!start && !canCloseRange(start, d, constraints, allowDisabledInRange)),\n [isBlockedDay, start, constraints, allowDisabledInRange]\n );\n\n // A new start keeps the end only while the two still make a range, so a\n // start moved past the end, or over a disabled day before it, clears it.\n const commitStart = useCallback(\n (next: Date | null) => {\n const keepsEnd =\n !next ||\n !end ||\n canCloseRange(next, end, constraints, allowDisabledInRange);\n commitRange([next, keepsEnd ? end : null]);\n if (next) setFocusedDate(next);\n },\n [end, constraints, allowDisabledInRange, commitRange]\n );\n // Every digit typed into the start commits, so a start passes through\n // values on its way to the one being typed. The first digits of a year make\n // a start centuries back, which can't keep the end once a disabled day may\n // lie between. Such a value waits for the segment's next digit rather than\n // clearing an end the finished start may keep.\n const startCostsEnd = useCallback(\n (d: Date) =>\n !!end && !canCloseRange(d, end, constraints, allowDisabledInRange),\n [end, constraints, allowDisabledInRange]\n );\n const commitEnd = useCallback(\n (next: Date | null) => {\n commitRange([start, next]);\n if (next) setFocusedDate(next);\n },\n [start, commitRange]\n );\n\n const handleRangeSelect = useCallback(\n (from: Date, to: Date) => {\n commitRange([from, to]);\n setFocusedDate(to);\n if (closeOnSelect) setOpen(false);\n },\n [commitRange, closeOnSelect, setOpen]\n );\n\n const tryParse = useCallback(\n (s: string): Date | null => {\n const trimmed = s.trim();\n if (!trimmed) return null;\n const fmt = typeof format === 'string' ? format : undefined;\n return parse\n ? parse(trimmed)\n : parseDate(trimmed, fmt ?? DEFAULT_DATE_FORMAT, locale);\n },\n [parse, format, locale]\n );\n\n // Typing into an empty end starts from the start, so only what differs\n // needs typing; an empty start starts from today.\n const makeEndBase = useCallback(\n () => (start ? startOfDay(start) : today()),\n [start]\n );\n\n // Where focus goes back as the popover closes: the input focused last,\n // which is the one that opened it unless the launcher did, or the start\n // input before either has had focus.\n const openerRef = useRef<HTMLInputElement | null>(null);\n const restoreFocusRef = useMemo(\n () => ({\n get current() {\n return openerRef.current ?? startRef.current;\n },\n }),\n []\n );\n\n const shared = {\n format: resolvedFormat,\n formatFn: formatDate,\n tryParse,\n locale,\n min: lowerBound,\n max,\n disabled,\n readOnly,\n editable,\n popover,\n openOnFocus,\n closeOnSelect,\n isOpen: open,\n setOpen: requestOpen,\n };\n // Each input is its own picker field. Its blur counts focus leaving it,\n // even for the other input, so text typed into one is read as focus moves\n // to the other.\n const { inputHandlers: startHandlers } = useSegmentedEntry({\n ...shared,\n value: start,\n commitValue: commitStart,\n text: startText,\n setText: setStartText,\n makeBaseDate: today,\n isBlocked: isBlockedDay,\n isUnfinishedBlocked: startCostsEnd,\n inputRef: startRef,\n containerRef: startRef,\n onFocus: () => {\n openerRef.current = startRef.current;\n },\n });\n const { inputHandlers: endHandlers } = useSegmentedEntry({\n ...shared,\n value: end,\n commitValue: commitEnd,\n text: endText,\n setText: setEndText,\n makeBaseDate: makeEndBase,\n isBlocked: isBlockedEnd,\n inputRef: endRef,\n containerRef: endRef,\n onFocus: () => {\n openerRef.current = endRef.current;\n },\n });\n\n const combinedRef = useCallback(\n (node: HTMLInputElement | null) => {\n (startRef as React.MutableRefObject<HTMLInputElement | null>).current =\n node;\n if (typeof ref === 'function') ref(node);\n else if (ref)\n (ref as React.MutableRefObject<HTMLInputElement | null>).current = node;\n },\n [ref]\n );\n\n const handlePopoverClose = useCallback(() => setOpen(false), [setOpen]);\n\n const startField = startName ?? (name ? `${name}[start]` : undefined);\n const endField = endName ?? (name ? `${name}[end]` : undefined);\n const hiddenInputs = (\n <>\n {startField && (\n <input\n type=\"hidden\"\n name={startField}\n form={form}\n value={isoDay(start)}\n />\n )}\n {endField && (\n <input type=\"hidden\" name={endField} form={form} value={isoDay(end)} />\n )}\n </>\n );\n\n const separator = (\n <span className={separatorClass} aria-hidden=\"true\">\n {t.rangeSeparator}\n </span>\n );\n\n // Native mobile path: two <input type=\"date\">s, held to the same rules as\n // typing. A change the rules refuse leaves the input showing the range.\n if (useNative) {\n const nativeChange =\n (commit: (d: Date | null) => void, isBlocked: (d: Date) => boolean) =>\n (e: React.ChangeEvent<HTMLInputElement>) => {\n // An empty value is the end cleared. A date input gives nothing else\n // that doesn't read as a date.\n const parsed = fromIsoValue(e.target.value, 'day');\n if (!parsed) commit(null);\n else if (isWithin(parsed, lowerBound, max) && !isBlocked(parsed)) {\n commit(parsed);\n }\n };\n const minIso = min ? isoDay(lowerBound) : undefined;\n const maxIso = max ? isoDay(max) : undefined;\n return (\n <div\n aria-labelledby={ariaLabelledBy}\n {...localeScope.rootAttrs}\n {...cleanRest}\n ref={containerRef}\n role=\"group\"\n className={classNames(containerClass, bulmaHelperClasses, className)}\n onFocus={onFocus}\n onFocusCapture={onFocusCapture}\n >\n <div className={fieldClass}>\n <input\n ref={combinedRef}\n type=\"date\"\n id={id}\n aria-label={t.rangeStart}\n className={inputClass}\n value={isoDay(start)}\n onChange={nativeChange(commitStart, isBlockedDay)}\n min={minIso}\n max={maxIso}\n disabled={disabled}\n readOnly={readOnly}\n required={required}\n />\n {separator}\n <input\n ref={endRef}\n type=\"date\"\n id={id ? `${id}-end` : undefined}\n aria-label={t.rangeEnd}\n className={inputClass}\n value={isoDay(end)}\n onChange={nativeChange(commitEnd, isBlockedEnd)}\n min={start ? isoDay(start) : minIso}\n max={maxIso}\n disabled={disabled}\n readOnly={readOnly}\n required={required}\n />\n </div>\n {hiddenInputs}\n </div>\n );\n }\n\n const calendar = (\n <Calendar\n range={range}\n onRangeSelect={handleRangeSelect}\n allowDisabledInRange={allowDisabledInRange}\n focusedDate={focusedDate}\n onFocusedDateChange={setFocusedDate}\n min={min}\n max={max}\n shouldDisableDate={shouldDisableDate}\n unselectableDates={unselectableDates}\n firstDayOfWeek={firstDayOfWeek}\n locale={locale}\n dayNames={dayNames}\n monthNames={monthNames}\n nearbyMonthDays={nearbyMonthDays}\n color={color}\n size={size}\n // The popover panel takes `popoverId`, so the calendar inside it takes\n // one of its own. Inline there is no panel.\n id={inline ? popoverId : `${popoverId}-cal`}\n autoFocusCell={open}\n labels={labels}\n disabled={disabled}\n readOnly={readOnly}\n />\n );\n\n if (inline) {\n return (\n <div\n aria-labelledby={ariaLabelledBy}\n {...localeScope.rootAttrs}\n {...cleanRest}\n ref={containerRef}\n role=\"group\"\n className={classNames(containerClass, bulmaHelperClasses, className)}\n onFocus={onFocus}\n onFocusCapture={onFocusCapture}\n >\n {calendar}\n {hiddenInputs}\n </div>\n );\n }\n\n const canOpen = !!popover && !disabled && !readOnly;\n const inputReadOnly = !!readOnly || !editable;\n\n // The field reads as one text box, so a press on it that misses both\n // inputs, on its padding, the gap or the separator, goes to the nearer\n // input and does what a press on that input does.\n const handleFieldMouseDown = (e: React.MouseEvent<HTMLDivElement>) => {\n const startInput = startRef.current as HTMLInputElement;\n const endInput = endRef.current as HTMLInputElement;\n if (disabled || e.button !== 0) return;\n if (e.target === startInput || e.target === endInput) return;\n e.preventDefault();\n const middle =\n (startInput.getBoundingClientRect().right +\n endInput.getBoundingClientRect().left) /\n 2;\n (e.clientX < middle ? startInput : endInput).focus();\n if (openOnFocus && canOpen) requestOpen(true);\n };\n const comboboxProps = {\n type: 'text',\n role: 'combobox',\n 'aria-haspopup': 'dialog' as const,\n 'aria-expanded': open,\n 'aria-controls': popoverId,\n autoComplete: 'off',\n className: inputClass,\n placeholder,\n disabled,\n readOnly: inputReadOnly,\n required,\n };\n\n return (\n <div\n aria-labelledby={ariaLabelledBy}\n {...localeScope.rootAttrs}\n {...cleanRest}\n ref={containerRef}\n role=\"group\"\n className={classNames(containerClass, bulmaHelperClasses, className)}\n onFocus={handleFocus}\n onFocusCapture={handleFocusCapture}\n >\n <div className={fieldClass} onMouseDown={handleFieldMouseDown}>\n <input\n {...comboboxProps}\n ref={combinedRef}\n id={id}\n aria-label={t.rangeStart}\n value={startText}\n {...startHandlers}\n />\n {separator}\n <input\n {...comboboxProps}\n ref={endRef}\n id={id ? `${id}-end` : undefined}\n aria-label={t.rangeEnd}\n value={endText}\n {...endHandlers}\n />\n </div>\n {popover && triggerIcon && (\n <button\n type=\"button\"\n className={triggerClass}\n // Disabled whenever the popover can't open, so a click can.\n onClick={() => setOpen(!open)}\n disabled={!canOpen}\n aria-label={t.chooseDateRange}\n aria-haspopup=\"dialog\"\n aria-controls={popoverId}\n aria-expanded={open}\n tabIndex={canOpen ? 0 : -1}\n >\n <Icon name={triggerIconName} size={size} />\n </button>\n )}\n {popover && (\n <PickerPopover\n localeScope={localeScope.panel}\n isOpen={open}\n onClose={handlePopoverClose}\n anchorRef={containerRef}\n position={position}\n appendToBody={appendToBody}\n ariaLabel={t.chooseDateRange}\n id={popoverId}\n restoreFocusRef={restoreFocusRef}\n initialFocusSelector={CALENDAR_FOCUSED_CELL}\n >\n {calendar}\n </PickerPopover>\n )}\n {hiddenInputs}\n </div>\n );\n});\n\nDateRangeInputBase.displayName = 'DateRangeInputBase';\n\nexport default DateRangeInputBase;\n"],"names":["_jsxs","_Fragment","_jsx"],"mappings":";;;;;;;;;;;;;;;;;;;AAmDA,MAAM,WAAW,GAAmB,CAAC,IAAI,EAAE,IAAI,CAAC;AAEhD;AACA,MAAM,MAAM,GAAG,CAAC,CAAc,MAAc,CAAC,GAAG,UAAU,CAAC,CAAC,EAAE,KAAK,CAAC,GAAG,EAAE,CAAC;AAE1E;AACA,MAAM,KAAK,GAAG,MAAY,UAAU,CAAC,IAAI,IAAI,EAAE,CAAC;AAkNhD;;;;;;;;;;;;AAYG;AACI,MAAM,kBAAkB,GAAG,UAAU,CAG1C,CAAC,KAAK,EAAE,GAAG,KAAI;AACf,IAAA,MAAM,EACJ,KAAK,EAAE,eAAe,EACtB,YAAY,EACZ,QAAQ,EACR,MAAM,EACN,OAAO,EACP,GAAG,EACH,GAAG,EACH,QAAQ,EAAE,YAAY,EACtB,QAAQ,EACR,WAAW,EACX,MAAM,EACN,KAA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AA,CAAM,GAAG,SAAS,EAAA,YAAA,EACpB,CAAC,CAAC,QAAQ,EACtB,KAAK,EAAE,OAAO,EAAA,GACV,WAAW,EAAA,CACf,CAAA,EAAA,CACE,EACL,OAAO,IAAI,WAAW,KACrBA,GAAA,CAAA,QAAA,EAAA,EACE,IAAI,EAAC,QAAQ,EACb,SAAS,EAAE,YAAY;;gBAEvB,OAAO,EAAE,MAAM,OAAO,CAAC,CAAC,IAAI,CAAC,EAC7B,QAAQ,EAAE,CAAC,OAAO,EAAA,YAAA,EACN,CAAC,CAAC,eAAe,EAAA,eAAA,EACf,QAAQ,EAAA,eAAA,EACP,SAAS,EAAA,eAAA,EACT,IAAI,EACnB,QAAQ,EAAE,OAAO,GAAG,CAAC,GAAG,EAAE,EAAA,QAAA,EAE1BA,GAAA,CAAC,IAAI,IAAC,IAAI,EAAE,eAAe,EAAE,IAAI,EAAE,IAAI,EAAA,CAAI,EAAA,CACpC,CACV,EACA,OAAO,KACNA,GAAA,CAAC,aAAa,EAAA,EACZ,WAAW,EAAE,WAAW,CAAC,KAAK,EAC9B,MAAM,EAAE,IAAI,EACZ,OAAO,EAAE,kBAAkB,EAC3B,SAAS,EAAE,YAAY,EACvB,QAAQ,EAAE,QAAQ,EAClB,YAAY,EAAE,YAAY,EAC1B,SAAS,EAAE,CAAC,CAAC,eAAe,EAC5B,EAAE,EAAE,SAAS,EACb,eAAe,EAAE,eAAe,EAChC,oBAAoB,EAAE,qBAAqB,EAAA,QAAA,EAE1C,QAAQ,EAAA,CACK,CACjB,EACA,YAAY,CAAA,EAAA,CACT;AAEV,CAAC;AAED,kBAAkB,CAAC,WAAW,GAAG,oBAAoB;;"}
|
|
@@ -324,17 +324,17 @@ const DateTimeInputBase = forwardRef((props, ref) => {
|
|
|
324
324
|
e.stopPropagation();
|
|
325
325
|
closeTime();
|
|
326
326
|
}
|
|
327
|
-
}, children: [jsxs("div", { className: calendarWrapClass, children: [jsx("div", { ...inertProps(timeOpen), children: jsx(Calendar, { value: value, focusedDate: focusedDate, onSelect: handleDateSelect, onFocusedDateChange: setFocusedDate, min: min, max: max, shouldDisableDate: shouldDisableDate, unselectableDates: unselectableDates, firstDayOfWeek: firstDayOfWeek, locale: locale, dayNames: dayNames, monthNames: monthNames, nearbyMonthDays: nearbyMonthDays, color: color, size: size, id: `${popoverId}-cal`, autoFocusCell: open, labels: labels }) }), timeOpen && (jsx("div", { ref: timeOverlayRef, className: timeOverlayClass, onClick: e => {
|
|
327
|
+
}, children: [jsxs("div", { className: calendarWrapClass, children: [jsx("div", { ...inertProps(timeOpen), children: jsx(Calendar, { value: value, focusedDate: focusedDate, onSelect: handleDateSelect, onFocusedDateChange: setFocusedDate, min: min, max: max, shouldDisableDate: shouldDisableDate, unselectableDates: unselectableDates, firstDayOfWeek: firstDayOfWeek, locale: locale, dayNames: dayNames, monthNames: monthNames, nearbyMonthDays: nearbyMonthDays, color: color, size: size, id: `${popoverId}-cal`, autoFocusCell: open, labels: labels, disabled: disabled, readOnly: readOnly }) }), timeOpen && (jsx("div", { ref: timeOverlayRef, className: timeOverlayClass, onClick: e => {
|
|
328
328
|
// Tap outside the wheel card (on the covered calendar area)
|
|
329
329
|
// collapses the wheels without selecting a date, matching the
|
|
330
330
|
// native behavior.
|
|
331
331
|
if (e.target === e.currentTarget)
|
|
332
332
|
closeTime();
|
|
333
|
-
}, children: jsx("div", { className: timeCardClass, children: jsx(TimeWheels, { value: spinnerValue, onChange: handleTimeChange, hourFormat: effectiveHourFormat, enableSeconds: enableSeconds, incrementHours: incrementHours, incrementMinutes: incrementMinutes, incrementSeconds: incrementSeconds, unselectableTimes: unselectableTimes, color: color, size: size, disabled: disabled, id: timeWheelsId, labels: labels, itemHeight: wheelItemHeight, audioTick: effectiveAudioTick,
|
|
333
|
+
}, children: jsx("div", { className: timeCardClass, children: jsx(TimeWheels, { value: spinnerValue, onChange: handleTimeChange, hourFormat: effectiveHourFormat, enableSeconds: enableSeconds, incrementHours: incrementHours, incrementMinutes: incrementMinutes, incrementSeconds: incrementSeconds, unselectableTimes: unselectableTimes, color: color, size: size, disabled: disabled || readOnly, id: timeWheelsId, labels: labels, itemHeight: wheelItemHeight, audioTick: effectiveAudioTick,
|
|
334
334
|
// Enter on a wheel commits the time, which the wheels already
|
|
335
335
|
// did live, and closes: the popover, or inline, where there
|
|
336
336
|
// is no popover, the wheels, as Escape does.
|
|
337
|
-
onCommit: () => (inline ? closeTime() : setOpen(false)) }) }) }))] }), jsxs("div", { className: footerClass, children: [jsxs("button", { ref: timeButtonRef, type: "button", className: footerTimeClass, onClick: () => (timeOpen ? closeTime() : setTimeOpen(true)), "aria-expanded": timeOpen, "aria-controls": timeOpen ? timeWheelsId : undefined, disabled: disabled, children: [jsx("span", { children: t.time }), jsx("span", { className: footerTimePillClass, children: value ? formatTime(value, timeDisplayFormat, locale) : '—' })] }), jsxs("div", { className: footerActionsClass, children: [jsx("button", { type: "button", className: footerResetClass, onClick: () => commitValue(valueAtOpenRef.current), children: t.reset }), jsx("button", { type: "button", className: footerDoneClass, "aria-label": t.done, onClick: () => setOpen(false), children: jsx("svg", { width: "22", height: "22", viewBox: "0 0 22 22", "aria-hidden": "true", children: jsx("path", { d: "M5 11l4 4 8-8", fill: "none", stroke: "currentColor", strokeWidth: "2.5", strokeLinecap: "round", strokeLinejoin: "round" }) }) })] })] })] }));
|
|
337
|
+
onCommit: () => (inline ? closeTime() : setOpen(false)) }) }) }))] }), jsxs("div", { className: footerClass, children: [jsxs("button", { ref: timeButtonRef, type: "button", className: footerTimeClass, onClick: () => (timeOpen ? closeTime() : setTimeOpen(true)), "aria-expanded": timeOpen, "aria-controls": timeOpen ? timeWheelsId : undefined, disabled: disabled || readOnly, children: [jsx("span", { children: t.time }), jsx("span", { className: footerTimePillClass, children: value ? formatTime(value, timeDisplayFormat, locale) : '—' })] }), jsxs("div", { className: footerActionsClass, children: [jsx("button", { type: "button", className: footerResetClass, onClick: () => commitValue(valueAtOpenRef.current), disabled: disabled || readOnly, children: t.reset }), jsx("button", { type: "button", className: footerDoneClass, "aria-label": t.done, onClick: () => setOpen(false), disabled: disabled, children: jsx("svg", { width: "22", height: "22", viewBox: "0 0 22 22", "aria-hidden": "true", children: jsx("path", { d: "M5 11l4 4 8-8", fill: "none", stroke: "currentColor", strokeWidth: "2.5", strokeLinecap: "round", strokeLinejoin: "round" }) }) })] })] })] }));
|
|
338
338
|
if (inline) {
|
|
339
339
|
return (jsxs("div", { ...localeScope.rootAttrs, ...cleanRest, ref: containerRef, className: classNames(containerClass, bulmaHelperClasses, className), children: [panel, name && (jsx("input", { type: "hidden", name: name, form: form, value: value ? toIsoDateTime(value, enableSeconds) : '', required: required }))] }));
|
|
340
340
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DateTimeInputBase.js","sources":["../../../src/form/DateTimeInputBase.tsx"],"sourcesContent":["import React, {\n forwardRef,\n useCallback,\n useEffect,\n useId,\n useMemo,\n useRef,\n useState,\n} from 'react';\nimport { classNames, usePrefixedClassNames } from '../helpers/classNames';\nimport { useBulmaClasses, BulmaClassesProps } from '../helpers/useBulmaClasses';\nimport {\n PickerPosition,\n HourFormat,\n DayOfWeek,\n PickerLabels,\n mergeLabels,\n} from './_pickerInternals/pickerTypes';\nimport {\n formatDateTime,\n formatTime,\n hourCycleFromFormat,\n parseDate,\n DateFormatOption,\n DEFAULT_DATETIME_FORMAT,\n} from './_pickerInternals/formatters';\nimport {\n isWithin,\n setTimeOfDay,\n clampDate,\n FIRST_YEAR,\n floorMin,\n isSameDay,\n makeDate,\n} from './_pickerInternals/dateUtils';\nimport { Calendar, CALENDAR_FOCUSED_CELL } from './_pickerInternals/Calendar';\nimport { TimeWheels } from './_pickerInternals/TimeWheels';\nimport { PickerPopover } from './_pickerInternals/PickerPopover';\nimport { useNativeMobilePicker } from './_pickerInternals/useNativeMobilePicker';\nimport { useSegmentedEntry } from './_pickerInternals/useSegmentedEntry';\nimport {\n hasOwnDayNames,\n usePickerFirstDayOfWeek,\n usePickerLocale,\n usePickerLocaleScope,\n} from './_pickerInternals/useLocaleDefaults';\nimport { useControlLoading } from './controlLoading';\nimport { useFieldLabelTarget, useFieldsetDisabled } from './FormContext';\nimport { Icon } from '../elements/Icon';\nimport { getActiveElementInTree } from '../helpers/shadowDom';\nimport { inertProps } from '../helpers/inertProps';\n\n// The year is padded to four digits, as `datetime-local` requires. HTML has\n// no such shape for a year before 1, so a date then is empty, as that input\n// would make it.\nconst toIsoDateTime = (d: Date, withSeconds: boolean): string => {\n if (d.getFullYear() < FIRST_YEAR) return '';\n const yyyy = String(d.getFullYear()).padStart(4, '0');\n const mo = String(d.getMonth() + 1).padStart(2, '0');\n const dd = String(d.getDate()).padStart(2, '0');\n const hh = String(d.getHours()).padStart(2, '0');\n const mm = String(d.getMinutes()).padStart(2, '0');\n const ss = String(d.getSeconds()).padStart(2, '0');\n return withSeconds\n ? `${yyyy}-${mo}-${dd}T${hh}:${mm}:${ss}`\n : `${yyyy}-${mo}-${dd}T${hh}:${mm}`;\n};\n\nconst fromIsoDateTime = (s: string): Date | null => {\n // The HTML datetime-local value may carry fractional seconds (the spec\n // allows them and some engines normalize to `:ss.sss`); accept and drop.\n // Its year is four or more digits, as `toIsoDateTime` writes one past 9999.\n const m =\n /^(\\d{4,})-(\\d{2})-(\\d{2})T(\\d{2}):(\\d{2})(?::(\\d{2})(?:\\.\\d{1,3})?)?$/.exec(\n s\n );\n if (!m) return null;\n const d = makeDate(Number(m[1]), Number(m[2]) - 1, Number(m[3]));\n d.setHours(Number(m[4]), Number(m[5]), m[6] ? Number(m[6]) : 0, 0);\n return d;\n};\n\n/**\n * Props for the raw DateTimeInput base. Use the higher-level `DateTimeInput`\n * for Field/Control composition. Combines the prop set of `DateInputBaseProps`\n * and `TimeInputBaseProps`.\n */\nexport interface DateTimeInputBaseProps\n extends\n Omit<\n React.InputHTMLAttributes<HTMLInputElement>,\n | 'value'\n | 'defaultValue'\n | 'onChange'\n | 'size'\n | 'color'\n | 'min'\n | 'max'\n | 'type'\n | 'popover'\n >,\n Omit<BulmaClassesProps, 'color'> {\n /** Controlled selected date-time. */\n value?: Date | null;\n /** Initial value for uncontrolled usage. */\n defaultValue?: Date | null;\n /**\n * Fired when either the date or time portion changes. Picking a day keeps\n * the value's whole time of day, down to seconds and milliseconds the field\n * doesn't show, and `min` and `max` judge the picked day at that time. An\n * empty field's day is picked at midnight.\n */\n onChange?: (d: Date | null) => void;\n /** Fired when the popover opens. */\n onOpen?: () => void;\n /** Fired when the popover closes. */\n onClose?: () => void;\n /**\n * Lower bound for the combined date-time. A `min` before year 1 is raised\n * to midnight on 1 January of year 1, where the range starts without one\n * too: HTML's datetime-local input holds no earlier year, so the calendar,\n * the time wheels and typing stop there.\n */\n min?: Date;\n /** Upper bound for the combined date-time. */\n max?: Date;\n /** Disable the input. */\n disabled?: boolean;\n /** Read-only input. */\n readOnly?: boolean;\n /** Placeholder text. */\n placeholder?: string;\n /**\n * Token format string or `Intl.DateTimeFormat` options. Default `'YYYY-MM-DD HH:mm'`.\n * @defaultValue 'YYYY-MM-DD HH:mm'\n */\n format?: DateFormatOption;\n /**\n * Custom parser. Enter and leaving the field call it only if the user\n * changed the text, so focus passing through commits nothing and the value\n * keeps what the format leaves out, such as seconds.\n */\n parse?: (s: string) => Date | null;\n /**\n * BCP-47 locale tag for day/month names and Intl formatting. Unset, it is\n * the `locale` of a `LocaleProvider` around the picker, and with neither,\n * `Intl` uses the runtime's own locale. On a server render that is the\n * server's, so an `inline` calendar rendered there names its days in the\n * server's language and the browser's own render names them in the\n * browser's: give it a locale, here or through a `LocaleProvider`, where\n * the two can differ.\n */\n locale?: string;\n /**\n * Render the panel inline (no popover).\n * On a server-rendered page it marks today once the page hydrates, by\n * the browser's clock rather than the server's. With no `value` or\n * `defaultValue` it opens on the month the clock reads, and around the end\n * of a month the server's clock and the browser's can read different\n * months, so give it a date both render the same.\n */\n inline?: boolean;\n /** Use `<input type=\"datetime-local\">` on coarse-pointer devices. */\n mobileNative?: boolean | 'auto';\n /** Allow segmented keyboard typing (type the date-time directly across all segments). `false` makes the field picker-only. */\n editable?: boolean;\n /** Whether the calendar + time popover exists. `false` makes the field input-only (segmented typing with no popover). Default `true`. */\n popover?: boolean;\n /**\n * Open the popover on focus. Default `true`. Focus that a closing popover\n * hands back to the input leaves it closed. Dismissing it commits nothing:\n * an empty field stays empty, and leaving afterwards commits only what was\n * typed since. With it off, the launcher or Alt+ArrowDown opens it.\n */\n openOnFocus?: boolean;\n /** Off by default — users typically tweak both halves before committing. */\n closeOnSelect?: boolean;\n /**\n * Where the popover opens against the field. Left out, it opens below and\n * lines up with the field's start edge, which is its right edge when the\n * picker reads right to left. A corner you pass stays physical, so\n * `bottom-left` lines up the left edges either way.\n * @defaultValue 'bottom-left'\n */\n position?: PickerPosition;\n /**\n * Render the popover through a portal, into the `portalContainer` a\n * `ConfigProvider` sets, `document.body` by default.\n */\n appendToBody?: boolean;\n /**\n * Bulma color modifier for the input, also carried by the calendar and the\n * time wheels, where it colors the selected date and the selection band.\n * Today's date and the calendar's keyboard focus ring take the color's\n * `-on-scheme` variant, which Bulma adjusts to contrast with the background,\n * so pale colors stay readable. A focused wheel's ring is\n * drawn inside the band in the color's `-invert`, like the selected value,\n * so it shows on the fill. Unset, they use their\n * `--bulma-dateinput-*` and `--bulma-timeinput-wheel-*` variables, which\n * follow `primary` by default. The footer's time pill and Done button do not\n * follow `color`.\n */\n color?: 'primary' | 'link' | 'info' | 'success' | 'warning' | 'danger';\n /** Size variant. */\n size?: 'small' | 'medium' | 'large';\n /** Rounded input corners. */\n isRounded?: boolean;\n // date subset\n /** Disable specific dates. Blocked dates are also rejected during manual typing (the predicate receives the full candidate date-time — prefer day-based checks). */\n shouldDisableDate?: (d: Date) => boolean;\n /** Convenience array of disabled dates, matched by calendar day; also rejected by manual typing. */\n unselectableDates?: Date[];\n /**\n * Day the week starts on (0 = Sunday). Unset inside a `LocaleProvider`,\n * it is the first day of the week in the picker's locale, its own `locale`\n * or else the provider's, such as Monday for `\"de\"`. Elsewhere, with no\n * locale from either, or with seven `dayNames` of your own, it is Sunday:\n * set it with `dayNames` to start the week on another day.\n * @defaultValue 0\n */\n firstDayOfWeek?: DayOfWeek;\n /**\n * Override the 7 day-name labels (in calendar order, post-rotation). They\n * are shown exactly as given, from the first column, so they have to start\n * on the day the week does. With them, an unset `firstDayOfWeek` stays\n * Sunday even inside a `LocaleProvider`, so names written Sunday first keep\n * matching their columns; to start on the locale's day, set\n * `firstDayOfWeek` too and list the names from that day.\n */\n dayNames?: string[];\n /** Override the 12 month-name labels. */\n monthNames?: string[];\n /** Show dimmed dates from adjacent months. */\n nearbyMonthDays?: boolean;\n // time subset\n /** Time format. */\n hourFormat?: HourFormat;\n /** Show seconds column. Note: iOS Safari's native datetime-local picker UI does not include a seconds wheel; pass `mobileNative={false}` if you need one on iOS. */\n enableSeconds?: boolean;\n /** Hour step. */\n incrementHours?: number;\n /** Step between minute-wheel values (`1` = every minute, iOS-style). */\n incrementMinutes?: number;\n /** Step between second-wheel values (only with `enableSeconds`). */\n incrementSeconds?: number;\n /** Block specific times. Blocked times are also rejected during manual typing. */\n unselectableTimes?: (d: Date) => boolean;\n /** Decorative left icon glyph for the wrapping `Control` (shown by default). Set `''` to hide. */\n iconLeftName?: string;\n /**\n * Show a clickable launcher button on the right that toggles the popover.\n * Hidden by default while a `Control` it sits in shows its `isLoading`\n * spinner, which shares that right edge.\n * @defaultValue true\n */\n triggerIcon?: boolean;\n /** Glyph for the right launcher button. */\n triggerIconName?: string;\n /** Play a short audible tick on each time-wheel crossing. Default `false`. */\n audioTick?: boolean;\n /** Auto-route tactile feedback per wheel tick (vibrate on Android, audio thunk on iOS). Default `false`. */\n haptics?: boolean;\n /**\n * Optional translatable string overrides. In a 12-hour picker, `ampm`\n * names the AM/PM column, `'AM/PM'` by default.\n */\n labels?: PickerLabels;\n}\n\n/**\n * Raw DateTimeInput — combined input + calendar + time spinner without\n * Field/Control wrapping. Use `DateTimeInput` for the convenience wrapper.\n *\n * @function\n * @param {DateTimeInputBaseProps} props\n * @returns {JSX.Element}\n */\nexport const DateTimeInputBase = forwardRef<\n HTMLInputElement,\n DateTimeInputBaseProps\n>((props, ref) => {\n const {\n value: controlledValue,\n defaultValue,\n onChange,\n onOpen,\n onClose,\n min,\n max,\n disabled: disabledProp,\n readOnly,\n placeholder,\n format,\n parse,\n locale: localeProp,\n inline = false,\n mobileNative = 'auto',\n editable = true,\n popover = true,\n openOnFocus = true,\n closeOnSelect = false,\n position,\n appendToBody = false,\n color,\n size,\n isRounded,\n shouldDisableDate,\n unselectableDates,\n firstDayOfWeek: firstDayOfWeekProp,\n dayNames,\n monthNames,\n nearbyMonthDays = true,\n hourFormat = '24',\n enableSeconds = false,\n incrementHours = 1,\n // Step between visible wheel values; 1 gives the iOS-style every-minute wheel.\n incrementMinutes = 1,\n incrementSeconds = 1,\n unselectableTimes,\n className,\n name,\n form,\n required,\n id: idProp,\n onFocus,\n onClick,\n onKeyDown,\n onBlur,\n iconLeftName: _iconLeftName,\n triggerIcon: triggerIconProp,\n triggerIconName = 'chevron-down',\n audioTick = false,\n haptics = false,\n labels,\n ...rest\n } = props;\n // A LocaleProvider around the picker sets its default locale and, through\n // that locale, the day its week starts on.\n const locale = usePickerLocale(localeProp);\n // Its own language and direction, which its root and a portaled panel\n // carry inside a provider.\n const localeScope = usePickerLocaleScope(localeProp, props.dir);\n const firstDayOfWeek = usePickerFirstDayOfWeek(\n firstDayOfWeekProp,\n locale,\n hasOwnDayNames(dayNames)\n );\n const disabled = useFieldsetDisabled(disabledProp);\n // Inside a labeled Field the input takes the id the label points at\n // when the caller set none, as InputBase does, and the popover's ids\n // follow it. Inline there is no input to name, so nothing takes the\n // Field's id or builds on it.\n const id = useFieldLabelTarget(idProp, !inline);\n // The launcher gives way to the loading spinner of a Control this sits in.\n const controlLoading = useControlLoading();\n const triggerIcon = triggerIconProp ?? !controlLoading;\n const t = mergeLabels(labels);\n\n // Platform-appropriate feedback routing for the time wheel: on iOS (no\n // navigator.vibrate) the audio thunk fills in; on Android the real haptic\n // fires and no audio is layered on. `audioTick` always wins.\n const hasVibrate =\n typeof navigator !== 'undefined' && typeof navigator.vibrate === 'function';\n const effectiveAudioTick = audioTick || (haptics && !hasVibrate);\n\n const isControlled = controlledValue !== undefined;\n const [internalValue, setInternalValue] = useState<Date | null>(\n defaultValue ?? null\n );\n const value = isControlled ? (controlledValue ?? null) : internalValue;\n\n // Nothing before year 1 is in range, as in HTML's date inputs.\n const lowerBound = useMemo(() => floorMin(min), [min]);\n\n const initialFocused = useMemo(\n () => clampDate(value ?? new Date(), lowerBound, max),\n // eslint-disable-next-line react-hooks/exhaustive-deps\n []\n );\n const [focusedDate, setFocusedDate] = useState<Date>(initialFocused);\n // Re-clamp focusedDate when min/max change so the focused cell stays valid.\n useEffect(() => {\n setFocusedDate(prev => clampDate(prev, lowerBound, max));\n }, [lowerBound, max]);\n\n const defaultFormat: DateFormatOption =\n format ??\n (hourFormat === '12'\n ? enableSeconds\n ? 'YYYY-MM-DD hh:mm:ss A'\n : 'YYYY-MM-DD hh:mm A'\n : enableSeconds\n ? 'YYYY-MM-DD HH:mm:ss'\n : DEFAULT_DATETIME_FORMAT);\n\n // The displayed format is the source of truth for the hour cycle: an explicit\n // 12-hour `format` must drive a 12-hour wheel + pill even when `hourFormat`\n // was left at its default. Fall back to the raw prop only when the cycle\n // can't be read from the format (an Intl-options object, or no hour token).\n const effectiveHourFormat = hourCycleFromFormat(defaultFormat) ?? hourFormat;\n\n const [open, setOpenState] = useState(false);\n // The time wheels are collapsed by default (iOS-style); the user reveals\n // them by clicking the time value in the footer.\n const [timeOpen, setTimeOpen] = useState(false);\n const [text, setText] = useState<string>(\n value ? formatDateTime(value, defaultFormat, locale) : ''\n );\n\n const inputRef = useRef<HTMLInputElement>(null);\n const containerRef = useRef<HTMLDivElement>(null);\n // Snapshot of the value when the popover opens, so Reset can revert the\n // edits made in this session (reverting to empty if it opened empty).\n const valueAtOpenRef = useRef<Date | null>(null);\n const reactId = useId();\n const popoverId = id ? `${id}-popover` : `picker-${reactId}`;\n const timeWheelsId = `${popoverId}-time`;\n\n const { bulmaHelperClasses, rest: cleanRest } = useBulmaClasses(rest);\n\n const { shouldUseNative, isSmallViewport } = useNativeMobilePicker({\n force: mobileNative === 'auto' ? undefined : mobileNative,\n });\n const useNative = !inline && shouldUseNative;\n const wheelItemHeight = isSmallViewport ? 40 : 32;\n\n // Time-only format for the footer's \"Time 5:07 PM\" display.\n const timeDisplayFormat =\n effectiveHourFormat === '12'\n ? enableSeconds\n ? 'h:mm:ss A'\n : 'h:mm A'\n : enableSeconds\n ? 'HH:mm:ss'\n : 'HH:mm';\n\n const inputClass = usePrefixedClassNames('input', {\n [`is-${color}`]: !!color,\n [`is-${size}`]: !!size,\n 'is-rounded': isRounded,\n });\n const containerClass = usePrefixedClassNames('datetimeinput-container');\n const triggerClass = usePrefixedClassNames('datetimeinput-trigger');\n const panelClass = usePrefixedClassNames('datetimeinput');\n const calendarWrapClass = usePrefixedClassNames(\n 'datetimeinput-calendar-wrap'\n );\n const timeOverlayClass = usePrefixedClassNames('datetimeinput-time-overlay');\n const timeCardClass = usePrefixedClassNames('datetimeinput-time-card');\n const footerClass = usePrefixedClassNames('datetimeinput-footer');\n const footerTimeClass = usePrefixedClassNames('datetimeinput-footer-time');\n const footerActionsClass = usePrefixedClassNames(\n 'datetimeinput-footer-actions'\n );\n const footerResetClass = usePrefixedClassNames('datetimeinput-footer-reset');\n const footerDoneClass = usePrefixedClassNames('datetimeinput-footer-done');\n const footerTimePillClass = usePrefixedClassNames(\n 'datetimeinput-footer-time-pill'\n );\n\n // What the latest request asked for, so a second request in the same event\n // sees it before React renders. The callbacks fire here rather than in a\n // state updater, which StrictMode calls twice, and after the state is set,\n // so a request a callback makes is the one that lands last.\n const requestedOpenRef = useRef(false);\n const setOpen = useCallback(\n (next: boolean) => {\n if (requestedOpenRef.current === next) return;\n requestedOpenRef.current = next;\n setOpenState(next);\n if (next) {\n valueAtOpenRef.current = value;\n onOpen?.();\n } else {\n onClose?.();\n }\n },\n [onOpen, onClose, value]\n );\n\n useEffect(() => {\n setText(value ? formatDateTime(value, defaultFormat, locale) : '');\n }, [value, defaultFormat, locale]);\n\n // Collapse the time wheels whenever the popover closes.\n useEffect(() => {\n if (!open) setTimeOpen(false);\n }, [open]);\n\n // The footer's Time button opens the wheels, and the hours wheel takes\n // focus so the keys turn it straight away. The calendar they cover is\n // inert meanwhile, so no tab stop, pointer or screen reader reaches a day\n // behind them. Closing the wheels hands focus back to the button: focus\n // in them would fall to the page as they unmount, and a pointer press\n // outside them has already dropped it on the panel or the page. Focus the\n // keys moved on to the footer, such as Reset, stays there.\n const panelRef = useRef<HTMLDivElement>(null);\n const timeButtonRef = useRef<HTMLButtonElement>(null);\n const timeOverlayRef = useRef<HTMLDivElement>(null);\n useEffect(() => {\n if (!timeOpen) return;\n timeOverlayRef.current\n ?.querySelector<HTMLElement>('[role=\"spinbutton\"]')\n ?.focus();\n }, [timeOpen]);\n const closeTime = useCallback(() => {\n const panel = panelRef.current;\n const active = getActiveElementInTree(panel);\n const movedOn =\n !!panel?.contains(active) && !timeOverlayRef.current?.contains(active);\n if (!movedOn) timeButtonRef.current?.focus();\n setTimeOpen(false);\n }, []);\n\n const commitValue = useCallback(\n (next: Date | null) => {\n if (!isControlled) setInternalValue(next);\n // Keep the calendar's focused cell tracking typed / parsed values.\n if (next) setFocusedDate(next);\n onChange?.(next);\n },\n [isControlled, onChange]\n );\n\n // A picked day takes the value's whole time of day, seconds and all, or\n // midnight in an empty field. The day handed over by the keyboard is the\n // calendar's focused date, which can carry the time of the clock it\n // started from, so none of its time is kept.\n const handleDateSelect = useCallback(\n (d: Date) => {\n const merged = setTimeOfDay(d, {\n hours: value?.getHours() ?? 0,\n minutes: value?.getMinutes() ?? 0,\n seconds: value?.getSeconds() ?? 0,\n milliseconds: value?.getMilliseconds() ?? 0,\n });\n if (!isWithin(merged, lowerBound, max)) return;\n commitValue(merged);\n setFocusedDate(d);\n },\n [value, lowerBound, max, commitValue]\n );\n\n // The wheels set the value's time. An empty field starts from the focused\n // day, at the whole minute or second the wheels show.\n const handleTimeChange = useCallback(\n (parts: { hours: number; minutes: number; seconds?: number }) => {\n const next = value\n ? setTimeOfDay(value, parts)\n : setTimeOfDay(focusedDate, {\n ...parts,\n seconds: parts.seconds ?? 0,\n milliseconds: 0,\n });\n if (!isWithin(next, lowerBound, max)) return;\n commitValue(next);\n },\n [value, focusedDate, lowerBound, max, commitValue]\n );\n\n const tryParse = useCallback(\n (s: string): Date | null => {\n const trimmed = s.trim();\n if (!trimmed) return null;\n if (parse) return parse(trimmed);\n const fmt = typeof defaultFormat === 'string' ? defaultFormat : undefined;\n return parseDate(trimmed, fmt ?? DEFAULT_DATETIME_FORMAT, locale);\n },\n [parse, defaultFormat, locale]\n );\n\n // The Date the user edits when starting without a current value: now, at\n // the whole minute, or the whole second with `enableSeconds`.\n const makeBaseDate = useCallback(\n (): Date =>\n setTimeOfDay(new Date(), {\n seconds: enableSeconds ? undefined : 0,\n milliseconds: 0,\n }),\n [enableSeconds]\n );\n\n const inputReadOnlyAttr = !!readOnly || !editable;\n const canOpen = !!popover && !disabled && !readOnly;\n\n // Blocking predicate for manual entry, combining the calendar's\n // disabled-day logic with the wheels' unselectable-times predicate. The\n // candidate passed in carries the full date-time, so date predicates\n // should use day-based checks.\n const isBlocked = useMemo(() => {\n if (!shouldDisableDate && !unselectableDates?.length && !unselectableTimes)\n return undefined;\n return (d: Date) =>\n !!shouldDisableDate?.(d) ||\n !!unselectableDates?.some(u => isSameDay(u, d)) ||\n !!unselectableTimes?.(d);\n }, [shouldDisableDate, unselectableDates, unselectableTimes]);\n\n const { inputHandlers } = useSegmentedEntry({\n format: defaultFormat,\n value,\n commitValue,\n formatFn: formatDateTime,\n tryParse,\n text,\n setText,\n makeBaseDate,\n locale,\n min: lowerBound,\n max,\n isBlocked,\n disabled,\n readOnly,\n editable,\n popover,\n openOnFocus,\n closeOnSelect,\n isOpen: open,\n setOpen,\n inputRef,\n containerRef,\n onFocus,\n onClick,\n onKeyDown,\n onBlur,\n });\n\n const combinedRef = useCallback(\n (node: HTMLInputElement | null) => {\n (inputRef as React.MutableRefObject<HTMLInputElement | null>).current =\n node;\n if (typeof ref === 'function') ref(node);\n else if (ref)\n (ref as React.MutableRefObject<HTMLInputElement | null>).current = node;\n },\n [ref]\n );\n\n if (useNative) {\n const nativeStep = enableSeconds ? incrementSeconds : incrementMinutes * 60;\n return (\n <input\n {...localeScope.rootAttrs}\n {...cleanRest}\n ref={combinedRef}\n type=\"datetime-local\"\n step={nativeStep}\n className={classNames(inputClass, bulmaHelperClasses, className)}\n value={value ? toIsoDateTime(value, enableSeconds) : ''}\n onChange={e => {\n const parsed = e.target.value\n ? fromIsoDateTime(e.target.value)\n : null;\n commitValue(parsed);\n }}\n min={min ? toIsoDateTime(lowerBound, enableSeconds) : undefined}\n max={max ? toIsoDateTime(max, enableSeconds) : undefined}\n disabled={disabled}\n readOnly={readOnly}\n placeholder={placeholder}\n name={name}\n form={form}\n required={required}\n id={id}\n />\n );\n }\n\n const spinnerValue = {\n hours: value?.getHours() ?? 0,\n minutes: value?.getMinutes() ?? 0,\n seconds: enableSeconds ? (value?.getSeconds() ?? 0) : undefined,\n };\n\n const panel = (\n <div\n ref={panelRef}\n className={panelClass}\n onKeyDown={e => {\n // First Escape collapses the floating time wheels; the popover's own\n // Escape handler (which closes the whole panel) only sees the second.\n if (timeOpen && e.key === 'Escape') {\n e.stopPropagation();\n closeTime();\n }\n }}\n >\n <div className={calendarWrapClass}>\n <div {...inertProps(timeOpen)}>\n <Calendar\n value={value}\n focusedDate={focusedDate}\n onSelect={handleDateSelect}\n onFocusedDateChange={setFocusedDate}\n min={min}\n max={max}\n shouldDisableDate={shouldDisableDate}\n unselectableDates={unselectableDates}\n firstDayOfWeek={firstDayOfWeek}\n locale={locale}\n dayNames={dayNames}\n monthNames={monthNames}\n nearbyMonthDays={nearbyMonthDays}\n color={color}\n size={size}\n id={`${popoverId}-cal`}\n autoFocusCell={open}\n labels={labels}\n />\n </div>\n {timeOpen && (\n <div\n ref={timeOverlayRef}\n className={timeOverlayClass}\n onClick={e => {\n // Tap outside the wheel card (on the covered calendar area)\n // collapses the wheels without selecting a date, matching the\n // native behavior.\n if (e.target === e.currentTarget) closeTime();\n }}\n >\n <div className={timeCardClass}>\n <TimeWheels\n value={spinnerValue}\n onChange={handleTimeChange}\n hourFormat={effectiveHourFormat}\n enableSeconds={enableSeconds}\n incrementHours={incrementHours}\n incrementMinutes={incrementMinutes}\n incrementSeconds={incrementSeconds}\n unselectableTimes={unselectableTimes}\n color={color}\n size={size}\n disabled={disabled}\n id={timeWheelsId}\n labels={labels}\n itemHeight={wheelItemHeight}\n audioTick={effectiveAudioTick}\n // Enter on a wheel commits the time, which the wheels already\n // did live, and closes: the popover, or inline, where there\n // is no popover, the wheels, as Escape does.\n onCommit={() => (inline ? closeTime() : setOpen(false))}\n />\n </div>\n </div>\n )}\n </div>\n <div className={footerClass}>\n <button\n ref={timeButtonRef}\n type=\"button\"\n className={footerTimeClass}\n onClick={() => (timeOpen ? closeTime() : setTimeOpen(true))}\n aria-expanded={timeOpen}\n // The wheels exist only while open, so only then is there an\n // element for the button to name.\n aria-controls={timeOpen ? timeWheelsId : undefined}\n disabled={disabled}\n >\n <span>{t.time}</span>\n <span className={footerTimePillClass}>\n {value ? formatTime(value, timeDisplayFormat, locale) : '—'}\n </span>\n </button>\n <div className={footerActionsClass}>\n <button\n type=\"button\"\n className={footerResetClass}\n onClick={() => commitValue(valueAtOpenRef.current)}\n >\n {t.reset}\n </button>\n <button\n type=\"button\"\n className={footerDoneClass}\n aria-label={t.done}\n onClick={() => setOpen(false)}\n >\n <svg width=\"22\" height=\"22\" viewBox=\"0 0 22 22\" aria-hidden=\"true\">\n <path\n d=\"M5 11l4 4 8-8\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"2.5\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n />\n </svg>\n </button>\n </div>\n </div>\n </div>\n );\n\n if (inline) {\n return (\n <div\n {...localeScope.rootAttrs}\n {...cleanRest}\n ref={containerRef}\n className={classNames(containerClass, bulmaHelperClasses, className)}\n >\n {panel}\n {name && (\n <input\n type=\"hidden\"\n name={name}\n form={form}\n value={value ? toIsoDateTime(value, enableSeconds) : ''}\n required={required}\n />\n )}\n </div>\n );\n }\n\n return (\n <div\n ref={containerRef}\n className={classNames(containerClass, bulmaHelperClasses, className)}\n {...localeScope.rootAttrs}\n {...cleanRest}\n >\n <input\n ref={combinedRef}\n type=\"text\"\n role=\"combobox\"\n aria-haspopup=\"dialog\"\n aria-expanded={open}\n aria-controls={popoverId}\n autoComplete=\"off\"\n className={inputClass}\n value={text}\n placeholder={placeholder}\n disabled={disabled}\n readOnly={inputReadOnlyAttr}\n name={name}\n form={form}\n required={required}\n id={id}\n {...inputHandlers}\n />\n {popover && triggerIcon && (\n <button\n type=\"button\"\n className={triggerClass}\n onClick={() => {\n if (canOpen) setOpen(!open);\n }}\n disabled={!canOpen}\n aria-label={t.chooseDateTime}\n aria-haspopup=\"dialog\"\n aria-controls={popoverId}\n aria-expanded={open}\n tabIndex={canOpen ? 0 : -1}\n >\n <Icon name={triggerIconName} size={size} />\n </button>\n )}\n {popover && (\n <PickerPopover\n localeScope={localeScope.panel}\n isOpen={open}\n onClose={() => setOpen(false)}\n anchorRef={containerRef}\n position={position}\n appendToBody={appendToBody}\n ariaLabel={t.chooseDateTime}\n id={popoverId}\n restoreFocusRef={inputRef}\n initialFocusSelector={CALENDAR_FOCUSED_CELL}\n >\n {panel}\n </PickerPopover>\n )}\n </div>\n );\n});\n\nDateTimeInputBase.displayName = 'DateTimeInputBase';\n\nexport default DateTimeInputBase;\n"],"names":["_jsx","_jsxs"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAoDA;AACA;AACA;AACA,MAAM,aAAa,GAAG,CAAC,CAAO,EAAE,WAAoB,KAAY;AAC9D,IAAA,IAAI,CAAC,CAAC,WAAW,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,EAAE,IAAI,EAAA,CAAI,EAAA,CACpC,CACV,EACA,OAAO,KACNA,GAAA,CAAC,aAAa,EAAA,EACZ,WAAW,EAAE,WAAW,CAAC,KAAK,EAC9B,MAAM,EAAE,IAAI,EACZ,OAAO,EAAE,MAAM,OAAO,CAAC,KAAK,CAAC,EAC7B,SAAS,EAAE,YAAY,EACvB,QAAQ,EAAE,QAAQ,EAClB,YAAY,EAAE,YAAY,EAC1B,SAAS,EAAE,CAAC,CAAC,cAAc,EAC3B,EAAE,EAAE,SAAS,EACb,eAAe,EAAE,QAAQ,EACzB,oBAAoB,EAAE,qBAAqB,EAAA,QAAA,EAE1C,KAAK,EAAA,CACQ,CACjB,CAAA,EAAA,CACG;AAEV,CAAC;AAED,iBAAiB,CAAC,WAAW,GAAG,mBAAmB;;"}
|
|
1
|
+
{"version":3,"file":"DateTimeInputBase.js","sources":["../../../src/form/DateTimeInputBase.tsx"],"sourcesContent":["import React, {\n forwardRef,\n useCallback,\n useEffect,\n useId,\n useMemo,\n useRef,\n useState,\n} from 'react';\nimport { classNames, usePrefixedClassNames } from '../helpers/classNames';\nimport { useBulmaClasses, BulmaClassesProps } from '../helpers/useBulmaClasses';\nimport {\n PickerPosition,\n HourFormat,\n DayOfWeek,\n PickerLabels,\n mergeLabels,\n} from './_pickerInternals/pickerTypes';\nimport {\n formatDateTime,\n formatTime,\n hourCycleFromFormat,\n parseDate,\n DateFormatOption,\n DEFAULT_DATETIME_FORMAT,\n} from './_pickerInternals/formatters';\nimport {\n isWithin,\n setTimeOfDay,\n clampDate,\n FIRST_YEAR,\n floorMin,\n isSameDay,\n makeDate,\n} from './_pickerInternals/dateUtils';\nimport { Calendar, CALENDAR_FOCUSED_CELL } from './_pickerInternals/Calendar';\nimport { TimeWheels } from './_pickerInternals/TimeWheels';\nimport { PickerPopover } from './_pickerInternals/PickerPopover';\nimport { useNativeMobilePicker } from './_pickerInternals/useNativeMobilePicker';\nimport { useSegmentedEntry } from './_pickerInternals/useSegmentedEntry';\nimport {\n hasOwnDayNames,\n usePickerFirstDayOfWeek,\n usePickerLocale,\n usePickerLocaleScope,\n} from './_pickerInternals/useLocaleDefaults';\nimport { useControlLoading } from './controlLoading';\nimport { useFieldLabelTarget, useFieldsetDisabled } from './FormContext';\nimport { Icon } from '../elements/Icon';\nimport { getActiveElementInTree } from '../helpers/shadowDom';\nimport { inertProps } from '../helpers/inertProps';\n\n// The year is padded to four digits, as `datetime-local` requires. HTML has\n// no such shape for a year before 1, so a date then is empty, as that input\n// would make it.\nconst toIsoDateTime = (d: Date, withSeconds: boolean): string => {\n if (d.getFullYear() < FIRST_YEAR) return '';\n const yyyy = String(d.getFullYear()).padStart(4, '0');\n const mo = String(d.getMonth() + 1).padStart(2, '0');\n const dd = String(d.getDate()).padStart(2, '0');\n const hh = String(d.getHours()).padStart(2, '0');\n const mm = String(d.getMinutes()).padStart(2, '0');\n const ss = String(d.getSeconds()).padStart(2, '0');\n return withSeconds\n ? `${yyyy}-${mo}-${dd}T${hh}:${mm}:${ss}`\n : `${yyyy}-${mo}-${dd}T${hh}:${mm}`;\n};\n\nconst fromIsoDateTime = (s: string): Date | null => {\n // The HTML datetime-local value may carry fractional seconds (the spec\n // allows them and some engines normalize to `:ss.sss`); accept and drop.\n // Its year is four or more digits, as `toIsoDateTime` writes one past 9999.\n const m =\n /^(\\d{4,})-(\\d{2})-(\\d{2})T(\\d{2}):(\\d{2})(?::(\\d{2})(?:\\.\\d{1,3})?)?$/.exec(\n s\n );\n if (!m) return null;\n const d = makeDate(Number(m[1]), Number(m[2]) - 1, Number(m[3]));\n d.setHours(Number(m[4]), Number(m[5]), m[6] ? Number(m[6]) : 0, 0);\n return d;\n};\n\n/**\n * Props for the raw DateTimeInput base. Use the higher-level `DateTimeInput`\n * for Field/Control composition. Combines the prop set of `DateInputBaseProps`\n * and `TimeInputBaseProps`.\n */\nexport interface DateTimeInputBaseProps\n extends\n Omit<\n React.InputHTMLAttributes<HTMLInputElement>,\n | 'value'\n | 'defaultValue'\n | 'onChange'\n | 'size'\n | 'color'\n | 'min'\n | 'max'\n | 'type'\n | 'popover'\n >,\n Omit<BulmaClassesProps, 'color'> {\n /** Controlled selected date-time. */\n value?: Date | null;\n /** Initial value for uncontrolled usage. */\n defaultValue?: Date | null;\n /**\n * Fired when either the date or time portion changes. Picking a day keeps\n * the value's whole time of day, down to seconds and milliseconds the field\n * doesn't show, and `min` and `max` judge the picked day at that time. An\n * empty field's day is picked at midnight.\n */\n onChange?: (d: Date | null) => void;\n /** Fired when the popover opens. */\n onOpen?: () => void;\n /** Fired when the popover closes. */\n onClose?: () => void;\n /**\n * Lower bound for the combined date-time. A `min` before year 1 is raised\n * to midnight on 1 January of year 1, where the range starts without one\n * too: HTML's datetime-local input holds no earlier year, so the calendar,\n * the time wheels and typing stop there.\n */\n min?: Date;\n /** Upper bound for the combined date-time. */\n max?: Date;\n /**\n * Disable the input. An `inline` panel disables its days, header buttons,\n * Time, Reset and ✓, but its hidden input still submits the value, where a\n * disabled input submits nothing.\n */\n disabled?: boolean;\n /**\n * Read-only input. An `inline` panel still moves through the dates by key\n * and by its header, but a click, Enter or Space picks nothing, and Time\n * and Reset are disabled, so the time can't change either.\n */\n readOnly?: boolean;\n /** Placeholder text. */\n placeholder?: string;\n /**\n * Token format string or `Intl.DateTimeFormat` options. Default `'YYYY-MM-DD HH:mm'`.\n * @defaultValue 'YYYY-MM-DD HH:mm'\n */\n format?: DateFormatOption;\n /**\n * Custom parser. Enter and leaving the field call it only if the user\n * changed the text, so focus passing through commits nothing and the value\n * keeps what the format leaves out, such as seconds.\n */\n parse?: (s: string) => Date | null;\n /**\n * BCP-47 locale tag for day/month names and Intl formatting. Unset, it is\n * the `locale` of a `LocaleProvider` around the picker, and with neither,\n * `Intl` uses the runtime's own locale. On a server render that is the\n * server's, so an `inline` calendar rendered there names its days in the\n * server's language and the browser's own render names them in the\n * browser's: give it a locale, here or through a `LocaleProvider`, where\n * the two can differ.\n */\n locale?: string;\n /**\n * Render the panel inline (no popover).\n * On a server-rendered page it marks today once the page hydrates, by\n * the browser's clock rather than the server's. With no `value` or\n * `defaultValue` it opens on the month the clock reads, and around the end\n * of a month the server's clock and the browser's can read different\n * months, so give it a date both render the same.\n */\n inline?: boolean;\n /** Use `<input type=\"datetime-local\">` on coarse-pointer devices. */\n mobileNative?: boolean | 'auto';\n /** Allow segmented keyboard typing (type the date-time directly across all segments). `false` makes the field picker-only. */\n editable?: boolean;\n /** Whether the calendar + time popover exists. `false` makes the field input-only (segmented typing with no popover). Default `true`. */\n popover?: boolean;\n /**\n * Open the popover on focus. Default `true`. Focus that a closing popover\n * hands back to the input leaves it closed. Dismissing it commits nothing:\n * an empty field stays empty, and leaving afterwards commits only what was\n * typed since. With it off, the launcher or Alt+ArrowDown opens it.\n */\n openOnFocus?: boolean;\n /** Off by default — users typically tweak both halves before committing. */\n closeOnSelect?: boolean;\n /**\n * Where the popover opens against the field. Left out, it opens below and\n * lines up with the field's start edge, which is its right edge when the\n * picker reads right to left. A corner you pass stays physical, so\n * `bottom-left` lines up the left edges either way.\n * @defaultValue 'bottom-left'\n */\n position?: PickerPosition;\n /**\n * Render the popover through a portal, into the `portalContainer` a\n * `ConfigProvider` sets, `document.body` by default.\n */\n appendToBody?: boolean;\n /**\n * Bulma color modifier for the input, also carried by the calendar and the\n * time wheels, where it colors the selected date and the selection band.\n * Today's date and the calendar's keyboard focus ring take the color's\n * `-on-scheme` variant, which Bulma adjusts to contrast with the background,\n * so pale colors stay readable. A focused wheel's ring is\n * drawn inside the band in the color's `-invert`, like the selected value,\n * so it shows on the fill. Unset, they use their\n * `--bulma-dateinput-*` and `--bulma-timeinput-wheel-*` variables, which\n * follow `primary` by default. The footer's time pill and Done button do not\n * follow `color`.\n */\n color?: 'primary' | 'link' | 'info' | 'success' | 'warning' | 'danger';\n /** Size variant. */\n size?: 'small' | 'medium' | 'large';\n /** Rounded input corners. */\n isRounded?: boolean;\n // date subset\n /** Disable specific dates. Blocked dates are also rejected during manual typing (the predicate receives the full candidate date-time — prefer day-based checks). */\n shouldDisableDate?: (d: Date) => boolean;\n /** Convenience array of disabled dates, matched by calendar day; also rejected by manual typing. */\n unselectableDates?: Date[];\n /**\n * Day the week starts on (0 = Sunday). Unset inside a `LocaleProvider`,\n * it is the first day of the week in the picker's locale, its own `locale`\n * or else the provider's, such as Monday for `\"de\"`. Elsewhere, with no\n * locale from either, or with seven `dayNames` of your own, it is Sunday:\n * set it with `dayNames` to start the week on another day.\n * @defaultValue 0\n */\n firstDayOfWeek?: DayOfWeek;\n /**\n * Override the 7 day-name labels (in calendar order, post-rotation). They\n * are shown exactly as given, from the first column, so they have to start\n * on the day the week does. With them, an unset `firstDayOfWeek` stays\n * Sunday even inside a `LocaleProvider`, so names written Sunday first keep\n * matching their columns; to start on the locale's day, set\n * `firstDayOfWeek` too and list the names from that day.\n */\n dayNames?: string[];\n /** Override the 12 month-name labels. */\n monthNames?: string[];\n /** Show dimmed dates from adjacent months. */\n nearbyMonthDays?: boolean;\n // time subset\n /** Time format. */\n hourFormat?: HourFormat;\n /** Show seconds column. Note: iOS Safari's native datetime-local picker UI does not include a seconds wheel; pass `mobileNative={false}` if you need one on iOS. */\n enableSeconds?: boolean;\n /** Hour step. */\n incrementHours?: number;\n /** Step between minute-wheel values (`1` = every minute, iOS-style). */\n incrementMinutes?: number;\n /** Step between second-wheel values (only with `enableSeconds`). */\n incrementSeconds?: number;\n /** Block specific times. Blocked times are also rejected during manual typing. */\n unselectableTimes?: (d: Date) => boolean;\n /** Decorative left icon glyph for the wrapping `Control` (shown by default). Set `''` to hide. */\n iconLeftName?: string;\n /**\n * Show a clickable launcher button on the right that toggles the popover.\n * Hidden by default while a `Control` it sits in shows its `isLoading`\n * spinner, which shares that right edge.\n * @defaultValue true\n */\n triggerIcon?: boolean;\n /** Glyph for the right launcher button. */\n triggerIconName?: string;\n /** Play a short audible tick on each time-wheel crossing. Default `false`. */\n audioTick?: boolean;\n /** Auto-route tactile feedback per wheel tick (vibrate on Android, audio thunk on iOS). Default `false`. */\n haptics?: boolean;\n /**\n * Optional translatable string overrides. In a 12-hour picker, `ampm`\n * names the AM/PM column, `'AM/PM'` by default.\n */\n labels?: PickerLabels;\n}\n\n/**\n * Raw DateTimeInput — combined input + calendar + time spinner without\n * Field/Control wrapping. Use `DateTimeInput` for the convenience wrapper.\n *\n * @function\n * @param {DateTimeInputBaseProps} props\n * @returns {JSX.Element}\n */\nexport const DateTimeInputBase = forwardRef<\n HTMLInputElement,\n DateTimeInputBaseProps\n>((props, ref) => {\n const {\n value: controlledValue,\n defaultValue,\n onChange,\n onOpen,\n onClose,\n min,\n max,\n disabled: disabledProp,\n readOnly,\n placeholder,\n format,\n parse,\n locale: localeProp,\n inline = false,\n mobileNative = 'auto',\n editable = true,\n popover = true,\n openOnFocus = true,\n closeOnSelect = false,\n position,\n appendToBody = false,\n color,\n size,\n isRounded,\n shouldDisableDate,\n unselectableDates,\n firstDayOfWeek: firstDayOfWeekProp,\n dayNames,\n monthNames,\n nearbyMonthDays = true,\n hourFormat = '24',\n enableSeconds = false,\n incrementHours = 1,\n // Step between visible wheel values; 1 gives the iOS-style every-minute wheel.\n incrementMinutes = 1,\n incrementSeconds = 1,\n unselectableTimes,\n className,\n name,\n form,\n required,\n id: idProp,\n onFocus,\n onClick,\n onKeyDown,\n onBlur,\n iconLeftName: _iconLeftName,\n triggerIcon: triggerIconProp,\n triggerIconName = 'chevron-down',\n audioTick = false,\n haptics = false,\n labels,\n ...rest\n } = props;\n // A LocaleProvider around the picker sets its default locale and, through\n // that locale, the day its week starts on.\n const locale = usePickerLocale(localeProp);\n // Its own language and direction, which its root and a portaled panel\n // carry inside a provider.\n const localeScope = usePickerLocaleScope(localeProp, props.dir);\n const firstDayOfWeek = usePickerFirstDayOfWeek(\n firstDayOfWeekProp,\n locale,\n hasOwnDayNames(dayNames)\n );\n const disabled = useFieldsetDisabled(disabledProp);\n // Inside a labeled Field the input takes the id the label points at\n // when the caller set none, as InputBase does, and the popover's ids\n // follow it. Inline there is no input to name, so nothing takes the\n // Field's id or builds on it.\n const id = useFieldLabelTarget(idProp, !inline);\n // The launcher gives way to the loading spinner of a Control this sits in.\n const controlLoading = useControlLoading();\n const triggerIcon = triggerIconProp ?? !controlLoading;\n const t = mergeLabels(labels);\n\n // Platform-appropriate feedback routing for the time wheel: on iOS (no\n // navigator.vibrate) the audio thunk fills in; on Android the real haptic\n // fires and no audio is layered on. `audioTick` always wins.\n const hasVibrate =\n typeof navigator !== 'undefined' && typeof navigator.vibrate === 'function';\n const effectiveAudioTick = audioTick || (haptics && !hasVibrate);\n\n const isControlled = controlledValue !== undefined;\n const [internalValue, setInternalValue] = useState<Date | null>(\n defaultValue ?? null\n );\n const value = isControlled ? (controlledValue ?? null) : internalValue;\n\n // Nothing before year 1 is in range, as in HTML's date inputs.\n const lowerBound = useMemo(() => floorMin(min), [min]);\n\n const initialFocused = useMemo(\n () => clampDate(value ?? new Date(), lowerBound, max),\n // eslint-disable-next-line react-hooks/exhaustive-deps\n []\n );\n const [focusedDate, setFocusedDate] = useState<Date>(initialFocused);\n // Re-clamp focusedDate when min/max change so the focused cell stays valid.\n useEffect(() => {\n setFocusedDate(prev => clampDate(prev, lowerBound, max));\n }, [lowerBound, max]);\n\n const defaultFormat: DateFormatOption =\n format ??\n (hourFormat === '12'\n ? enableSeconds\n ? 'YYYY-MM-DD hh:mm:ss A'\n : 'YYYY-MM-DD hh:mm A'\n : enableSeconds\n ? 'YYYY-MM-DD HH:mm:ss'\n : DEFAULT_DATETIME_FORMAT);\n\n // The displayed format is the source of truth for the hour cycle: an explicit\n // 12-hour `format` must drive a 12-hour wheel + pill even when `hourFormat`\n // was left at its default. Fall back to the raw prop only when the cycle\n // can't be read from the format (an Intl-options object, or no hour token).\n const effectiveHourFormat = hourCycleFromFormat(defaultFormat) ?? hourFormat;\n\n const [open, setOpenState] = useState(false);\n // The time wheels are collapsed by default (iOS-style); the user reveals\n // them by clicking the time value in the footer.\n const [timeOpen, setTimeOpen] = useState(false);\n const [text, setText] = useState<string>(\n value ? formatDateTime(value, defaultFormat, locale) : ''\n );\n\n const inputRef = useRef<HTMLInputElement>(null);\n const containerRef = useRef<HTMLDivElement>(null);\n // Snapshot of the value when the popover opens, so Reset can revert the\n // edits made in this session (reverting to empty if it opened empty).\n const valueAtOpenRef = useRef<Date | null>(null);\n const reactId = useId();\n const popoverId = id ? `${id}-popover` : `picker-${reactId}`;\n const timeWheelsId = `${popoverId}-time`;\n\n const { bulmaHelperClasses, rest: cleanRest } = useBulmaClasses(rest);\n\n const { shouldUseNative, isSmallViewport } = useNativeMobilePicker({\n force: mobileNative === 'auto' ? undefined : mobileNative,\n });\n const useNative = !inline && shouldUseNative;\n const wheelItemHeight = isSmallViewport ? 40 : 32;\n\n // Time-only format for the footer's \"Time 5:07 PM\" display.\n const timeDisplayFormat =\n effectiveHourFormat === '12'\n ? enableSeconds\n ? 'h:mm:ss A'\n : 'h:mm A'\n : enableSeconds\n ? 'HH:mm:ss'\n : 'HH:mm';\n\n const inputClass = usePrefixedClassNames('input', {\n [`is-${color}`]: !!color,\n [`is-${size}`]: !!size,\n 'is-rounded': isRounded,\n });\n const containerClass = usePrefixedClassNames('datetimeinput-container');\n const triggerClass = usePrefixedClassNames('datetimeinput-trigger');\n const panelClass = usePrefixedClassNames('datetimeinput');\n const calendarWrapClass = usePrefixedClassNames(\n 'datetimeinput-calendar-wrap'\n );\n const timeOverlayClass = usePrefixedClassNames('datetimeinput-time-overlay');\n const timeCardClass = usePrefixedClassNames('datetimeinput-time-card');\n const footerClass = usePrefixedClassNames('datetimeinput-footer');\n const footerTimeClass = usePrefixedClassNames('datetimeinput-footer-time');\n const footerActionsClass = usePrefixedClassNames(\n 'datetimeinput-footer-actions'\n );\n const footerResetClass = usePrefixedClassNames('datetimeinput-footer-reset');\n const footerDoneClass = usePrefixedClassNames('datetimeinput-footer-done');\n const footerTimePillClass = usePrefixedClassNames(\n 'datetimeinput-footer-time-pill'\n );\n\n // What the latest request asked for, so a second request in the same event\n // sees it before React renders. The callbacks fire here rather than in a\n // state updater, which StrictMode calls twice, and after the state is set,\n // so a request a callback makes is the one that lands last.\n const requestedOpenRef = useRef(false);\n const setOpen = useCallback(\n (next: boolean) => {\n if (requestedOpenRef.current === next) return;\n requestedOpenRef.current = next;\n setOpenState(next);\n if (next) {\n valueAtOpenRef.current = value;\n onOpen?.();\n } else {\n onClose?.();\n }\n },\n [onOpen, onClose, value]\n );\n\n useEffect(() => {\n setText(value ? formatDateTime(value, defaultFormat, locale) : '');\n }, [value, defaultFormat, locale]);\n\n // Collapse the time wheels whenever the popover closes.\n useEffect(() => {\n if (!open) setTimeOpen(false);\n }, [open]);\n\n // The footer's Time button opens the wheels, and the hours wheel takes\n // focus so the keys turn it straight away. The calendar they cover is\n // inert meanwhile, so no tab stop, pointer or screen reader reaches a day\n // behind them. Closing the wheels hands focus back to the button: focus\n // in them would fall to the page as they unmount, and a pointer press\n // outside them has already dropped it on the panel or the page. Focus the\n // keys moved on to the footer, such as Reset, stays there.\n const panelRef = useRef<HTMLDivElement>(null);\n const timeButtonRef = useRef<HTMLButtonElement>(null);\n const timeOverlayRef = useRef<HTMLDivElement>(null);\n useEffect(() => {\n if (!timeOpen) return;\n timeOverlayRef.current\n ?.querySelector<HTMLElement>('[role=\"spinbutton\"]')\n ?.focus();\n }, [timeOpen]);\n const closeTime = useCallback(() => {\n const panel = panelRef.current;\n const active = getActiveElementInTree(panel);\n const movedOn =\n !!panel?.contains(active) && !timeOverlayRef.current?.contains(active);\n if (!movedOn) timeButtonRef.current?.focus();\n setTimeOpen(false);\n }, []);\n\n const commitValue = useCallback(\n (next: Date | null) => {\n if (!isControlled) setInternalValue(next);\n // Keep the calendar's focused cell tracking typed / parsed values.\n if (next) setFocusedDate(next);\n onChange?.(next);\n },\n [isControlled, onChange]\n );\n\n // A picked day takes the value's whole time of day, seconds and all, or\n // midnight in an empty field. The day handed over by the keyboard is the\n // calendar's focused date, which can carry the time of the clock it\n // started from, so none of its time is kept.\n const handleDateSelect = useCallback(\n (d: Date) => {\n const merged = setTimeOfDay(d, {\n hours: value?.getHours() ?? 0,\n minutes: value?.getMinutes() ?? 0,\n seconds: value?.getSeconds() ?? 0,\n milliseconds: value?.getMilliseconds() ?? 0,\n });\n if (!isWithin(merged, lowerBound, max)) return;\n commitValue(merged);\n setFocusedDate(d);\n },\n [value, lowerBound, max, commitValue]\n );\n\n // The wheels set the value's time. An empty field starts from the focused\n // day, at the whole minute or second the wheels show.\n const handleTimeChange = useCallback(\n (parts: { hours: number; minutes: number; seconds?: number }) => {\n const next = value\n ? setTimeOfDay(value, parts)\n : setTimeOfDay(focusedDate, {\n ...parts,\n seconds: parts.seconds ?? 0,\n milliseconds: 0,\n });\n if (!isWithin(next, lowerBound, max)) return;\n commitValue(next);\n },\n [value, focusedDate, lowerBound, max, commitValue]\n );\n\n const tryParse = useCallback(\n (s: string): Date | null => {\n const trimmed = s.trim();\n if (!trimmed) return null;\n if (parse) return parse(trimmed);\n const fmt = typeof defaultFormat === 'string' ? defaultFormat : undefined;\n return parseDate(trimmed, fmt ?? DEFAULT_DATETIME_FORMAT, locale);\n },\n [parse, defaultFormat, locale]\n );\n\n // The Date the user edits when starting without a current value: now, at\n // the whole minute, or the whole second with `enableSeconds`.\n const makeBaseDate = useCallback(\n (): Date =>\n setTimeOfDay(new Date(), {\n seconds: enableSeconds ? undefined : 0,\n milliseconds: 0,\n }),\n [enableSeconds]\n );\n\n const inputReadOnlyAttr = !!readOnly || !editable;\n const canOpen = !!popover && !disabled && !readOnly;\n\n // Blocking predicate for manual entry, combining the calendar's\n // disabled-day logic with the wheels' unselectable-times predicate. The\n // candidate passed in carries the full date-time, so date predicates\n // should use day-based checks.\n const isBlocked = useMemo(() => {\n if (!shouldDisableDate && !unselectableDates?.length && !unselectableTimes)\n return undefined;\n return (d: Date) =>\n !!shouldDisableDate?.(d) ||\n !!unselectableDates?.some(u => isSameDay(u, d)) ||\n !!unselectableTimes?.(d);\n }, [shouldDisableDate, unselectableDates, unselectableTimes]);\n\n const { inputHandlers } = useSegmentedEntry({\n format: defaultFormat,\n value,\n commitValue,\n formatFn: formatDateTime,\n tryParse,\n text,\n setText,\n makeBaseDate,\n locale,\n min: lowerBound,\n max,\n isBlocked,\n disabled,\n readOnly,\n editable,\n popover,\n openOnFocus,\n closeOnSelect,\n isOpen: open,\n setOpen,\n inputRef,\n containerRef,\n onFocus,\n onClick,\n onKeyDown,\n onBlur,\n });\n\n const combinedRef = useCallback(\n (node: HTMLInputElement | null) => {\n (inputRef as React.MutableRefObject<HTMLInputElement | null>).current =\n node;\n if (typeof ref === 'function') ref(node);\n else if (ref)\n (ref as React.MutableRefObject<HTMLInputElement | null>).current = node;\n },\n [ref]\n );\n\n if (useNative) {\n const nativeStep = enableSeconds ? incrementSeconds : incrementMinutes * 60;\n return (\n <input\n {...localeScope.rootAttrs}\n {...cleanRest}\n ref={combinedRef}\n type=\"datetime-local\"\n step={nativeStep}\n className={classNames(inputClass, bulmaHelperClasses, className)}\n value={value ? toIsoDateTime(value, enableSeconds) : ''}\n onChange={e => {\n const parsed = e.target.value\n ? fromIsoDateTime(e.target.value)\n : null;\n commitValue(parsed);\n }}\n min={min ? toIsoDateTime(lowerBound, enableSeconds) : undefined}\n max={max ? toIsoDateTime(max, enableSeconds) : undefined}\n disabled={disabled}\n readOnly={readOnly}\n placeholder={placeholder}\n name={name}\n form={form}\n required={required}\n id={id}\n />\n );\n }\n\n const spinnerValue = {\n hours: value?.getHours() ?? 0,\n minutes: value?.getMinutes() ?? 0,\n seconds: enableSeconds ? (value?.getSeconds() ?? 0) : undefined,\n };\n\n const panel = (\n <div\n ref={panelRef}\n className={panelClass}\n onKeyDown={e => {\n // First Escape collapses the floating time wheels; the popover's own\n // Escape handler (which closes the whole panel) only sees the second.\n if (timeOpen && e.key === 'Escape') {\n e.stopPropagation();\n closeTime();\n }\n }}\n >\n <div className={calendarWrapClass}>\n <div {...inertProps(timeOpen)}>\n <Calendar\n value={value}\n focusedDate={focusedDate}\n onSelect={handleDateSelect}\n onFocusedDateChange={setFocusedDate}\n min={min}\n max={max}\n shouldDisableDate={shouldDisableDate}\n unselectableDates={unselectableDates}\n firstDayOfWeek={firstDayOfWeek}\n locale={locale}\n dayNames={dayNames}\n monthNames={monthNames}\n nearbyMonthDays={nearbyMonthDays}\n color={color}\n size={size}\n id={`${popoverId}-cal`}\n autoFocusCell={open}\n labels={labels}\n disabled={disabled}\n readOnly={readOnly}\n />\n </div>\n {timeOpen && (\n <div\n ref={timeOverlayRef}\n className={timeOverlayClass}\n onClick={e => {\n // Tap outside the wheel card (on the covered calendar area)\n // collapses the wheels without selecting a date, matching the\n // native behavior.\n if (e.target === e.currentTarget) closeTime();\n }}\n >\n <div className={timeCardClass}>\n <TimeWheels\n value={spinnerValue}\n onChange={handleTimeChange}\n hourFormat={effectiveHourFormat}\n enableSeconds={enableSeconds}\n incrementHours={incrementHours}\n incrementMinutes={incrementMinutes}\n incrementSeconds={incrementSeconds}\n unselectableTimes={unselectableTimes}\n color={color}\n size={size}\n disabled={disabled || readOnly}\n id={timeWheelsId}\n labels={labels}\n itemHeight={wheelItemHeight}\n audioTick={effectiveAudioTick}\n // Enter on a wheel commits the time, which the wheels already\n // did live, and closes: the popover, or inline, where there\n // is no popover, the wheels, as Escape does.\n onCommit={() => (inline ? closeTime() : setOpen(false))}\n />\n </div>\n </div>\n )}\n </div>\n <div className={footerClass}>\n <button\n ref={timeButtonRef}\n type=\"button\"\n className={footerTimeClass}\n onClick={() => (timeOpen ? closeTime() : setTimeOpen(true))}\n aria-expanded={timeOpen}\n // The wheels exist only while open, so only then is there an\n // element for the button to name.\n aria-controls={timeOpen ? timeWheelsId : undefined}\n disabled={disabled || readOnly}\n >\n <span>{t.time}</span>\n <span className={footerTimePillClass}>\n {value ? formatTime(value, timeDisplayFormat, locale) : '—'}\n </span>\n </button>\n <div className={footerActionsClass}>\n <button\n type=\"button\"\n className={footerResetClass}\n onClick={() => commitValue(valueAtOpenRef.current)}\n disabled={disabled || readOnly}\n >\n {t.reset}\n </button>\n <button\n type=\"button\"\n className={footerDoneClass}\n aria-label={t.done}\n onClick={() => setOpen(false)}\n disabled={disabled}\n >\n <svg width=\"22\" height=\"22\" viewBox=\"0 0 22 22\" aria-hidden=\"true\">\n <path\n d=\"M5 11l4 4 8-8\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"2.5\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n />\n </svg>\n </button>\n </div>\n </div>\n </div>\n );\n\n if (inline) {\n return (\n <div\n {...localeScope.rootAttrs}\n {...cleanRest}\n ref={containerRef}\n className={classNames(containerClass, bulmaHelperClasses, className)}\n >\n {panel}\n {name && (\n <input\n type=\"hidden\"\n name={name}\n form={form}\n value={value ? toIsoDateTime(value, enableSeconds) : ''}\n required={required}\n />\n )}\n </div>\n );\n }\n\n return (\n <div\n ref={containerRef}\n className={classNames(containerClass, bulmaHelperClasses, className)}\n {...localeScope.rootAttrs}\n {...cleanRest}\n >\n <input\n ref={combinedRef}\n type=\"text\"\n role=\"combobox\"\n aria-haspopup=\"dialog\"\n aria-expanded={open}\n aria-controls={popoverId}\n autoComplete=\"off\"\n className={inputClass}\n value={text}\n placeholder={placeholder}\n disabled={disabled}\n readOnly={inputReadOnlyAttr}\n name={name}\n form={form}\n required={required}\n id={id}\n {...inputHandlers}\n />\n {popover && triggerIcon && (\n <button\n type=\"button\"\n className={triggerClass}\n onClick={() => {\n if (canOpen) setOpen(!open);\n }}\n disabled={!canOpen}\n aria-label={t.chooseDateTime}\n aria-haspopup=\"dialog\"\n aria-controls={popoverId}\n aria-expanded={open}\n tabIndex={canOpen ? 0 : -1}\n >\n <Icon name={triggerIconName} size={size} />\n </button>\n )}\n {popover && (\n <PickerPopover\n localeScope={localeScope.panel}\n isOpen={open}\n onClose={() => setOpen(false)}\n anchorRef={containerRef}\n position={position}\n appendToBody={appendToBody}\n ariaLabel={t.chooseDateTime}\n id={popoverId}\n restoreFocusRef={inputRef}\n initialFocusSelector={C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EAAE,EAAE,EAAA,GACF,aAAa,GACjB,EACD,OAAO,IAAI,WAAW,KACrBA,gBACE,IAAI,EAAC,QAAQ,EACb,SAAS,EAAE,YAAY,EACvB,OAAO,EAAE,MAAK;AACZ,oBAAA,IAAI,OAAO;AAAE,wBAAA,OAAO,CAAC,CAAC,IAAI,CAAC;gBAC7B,CAAC,EACD,QAAQ,EAAE,CAAC,OAAO,EAAA,YAAA,EACN,CAAC,CAAC,cAAc,EAAA,eAAA,EACd,QAAQ,mBACP,SAAS,EAAA,eAAA,EACT,IAAI,EACnB,QAAQ,EAAE,OAAO,GAAG,CAAC,GAAG,EAAE,YAE1BA,GAAA,CAAC,IAAI,IAAC,IAAI,EAAE,eAAe,EAAE,IAAI,EAAE,IAAI,EAAA,CAAI,EAAA,CACpC,CACV,EACA,OAAO,KACNA,GAAA,CAAC,aAAa,EAAA,EACZ,WAAW,EAAE,WAAW,CAAC,KAAK,EAC9B,MAAM,EAAE,IAAI,EACZ,OAAO,EAAE,MAAM,OAAO,CAAC,KAAK,CAAC,EAC7B,SAAS,EAAE,YAAY,EACvB,QAAQ,EAAE,QAAQ,EAClB,YAAY,EAAE,YAAY,EAC1B,SAAS,EAAE,CAAC,CAAC,cAAc,EAC3B,EAAE,EAAE,SAAS,EACb,eAAe,EAAE,QAAQ,EACzB,oBAAoB,EAAE,qBAAqB,EAAA,QAAA,EAE1C,KAAK,EAAA,CACQ,CACjB,CAAA,EAAA,CACG;AAEV,CAAC;AAED,iBAAiB,CAAC,WAAW,GAAG,mBAAmB;;"}
|
package/dist/esm/form/Field.js
CHANGED
|
@@ -41,8 +41,7 @@ const FieldLabel = ({ size, textColor, bgColor, className, children, ...props })
|
|
|
41
41
|
[`is-${size}`]: !!size,
|
|
42
42
|
});
|
|
43
43
|
const fieldLabelClass = classNames(mainClass, bulmaHelperClasses, className);
|
|
44
|
-
|
|
45
|
-
return (jsx("div", { className: fieldLabelClass, ...props, ...rest, children: children }));
|
|
44
|
+
return (jsx("div", { className: fieldLabelClass, ...rest, children: children }));
|
|
46
45
|
};
|
|
47
46
|
/**
|
|
48
47
|
* FieldBody component for rendering Bulma field body.
|
|
@@ -62,8 +61,7 @@ const FieldBody = ({ textColor, bgColor, className, children, ...props }) => {
|
|
|
62
61
|
});
|
|
63
62
|
const mainClass = usePrefixedClassNames('field-body');
|
|
64
63
|
const fieldBodyClass = classNames(mainClass, bulmaHelperClasses, className);
|
|
65
|
-
|
|
66
|
-
return (jsx("div", { className: fieldBodyClass, ...props, ...rest, children: children }));
|
|
64
|
+
return (jsx("div", { className: fieldBodyClass, ...rest, children: children }));
|
|
67
65
|
};
|
|
68
66
|
/**
|
|
69
67
|
* The `Field` component is a Bulma-styled form field container.
|