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","sources":["packages/react-aria-components/src/DateField.tsx"],"sourcesContent":["/*\n * Copyright 2022 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\nimport {\n  AriaDateFieldProps,\n  useDateField,\n  useDateSegment\n} from 'react-aria/useDateField';\nimport {AriaTimeFieldProps, useTimeField} from 'react-aria/useTimeField';\nimport {\n  ClassNameOrFunction,\n  ContextValue,\n  dom,\n  Provider,\n  RACValidation,\n  removeDataAttributes,\n  RenderProps,\n  SlotProps,\n  StyleRenderProps,\n  useContextProps,\n  useRenderProps,\n  useSlot,\n  useSlottedContext\n} from './utils';\nimport {createCalendar} from '@internationalized/date';\nimport {\n  DateFieldState,\n  DateSegmentType,\n  DateValue,\n  DateSegment as IDateSegment,\n  useDateFieldState\n} from 'react-stately/useDateFieldState';\nimport {FieldErrorContext} from './FieldError';\nimport {filterDOMProps} from 'react-aria/filterDOMProps';\nimport {FormContext} from './Form';\nimport {forwardRefType, GlobalDOMAttributes} from '@react-types/shared';\nimport {Group, GroupContext} from './Group';\nimport {HiddenDateInput} from './HiddenDateInput';\nimport {HoverEvents} from '@react-types/shared';\nimport {Input, InputContext} from './Input';\nimport {LabelContext} from './Label';\nimport {mergeProps} from 'react-aria/mergeProps';\nimport React, {cloneElement, createContext, ForwardedRef, forwardRef, JSX, ReactElement, useContext, useRef} from 'react';\nimport {TextContext} from './Text';\nimport {TimeFieldState, useTimeFieldState} from 'react-stately/useTimeFieldState';\nimport {TimeValue} from 'react-stately/useTimeFieldState';\nimport {useFocusRing} from 'react-aria/useFocusRing';\nimport {useHover} from 'react-aria/useHover';\nimport {useLocale} from 'react-aria/I18nProvider';\nimport {useObjectRef} from 'react-aria/useObjectRef';\n\nexport interface DateFieldRenderProps {\n  /**\n   * State of the date field.\n   */\n  state: DateFieldState,\n  /**\n   * Whether the date field is invalid.\n   * @selector [data-invalid]\n   */\n  isInvalid: boolean,\n  /**\n   * Whether the date field is disabled.\n   * @selector [data-disabled]\n   */\n  isDisabled: boolean,\n  /**\n   * Whether the date field is read only.\n   * @selector [data-readonly]\n   */\n  isReadOnly: boolean,\n  /**\n   * Whether the date field is required.\n   * @selector [data-required]\n   */\n  isRequired: boolean\n}\nexport interface DateFieldProps<T extends DateValue> extends Omit<AriaDateFieldProps<T>, 'label' | 'description' | 'errorMessage' | 'validationState' | 'validationBehavior'>, RACValidation, RenderProps<DateFieldRenderProps>, SlotProps, GlobalDOMAttributes<HTMLDivElement> {\n  /**\n   * The CSS [className](https://developer.mozilla.org/en-US/docs/Web/API/Element/className) for the element. A function may be provided to compute the class based on component state.\n   * @default 'react-aria-DateField'\n   */\n  className?: ClassNameOrFunction<DateFieldRenderProps>\n}\nexport interface TimeFieldProps<T extends TimeValue> extends Omit<AriaTimeFieldProps<T>, 'label' | 'description' | 'errorMessage' | 'validationState' | 'validationBehavior'>, RACValidation, RenderProps<DateFieldRenderProps>, SlotProps, GlobalDOMAttributes<HTMLDivElement> {\n  /**\n   * The CSS [className](https://developer.mozilla.org/en-US/docs/Web/API/Element/className) for the element. A function may be provided to compute the class based on component state.\n   * @default 'react-aria-TimeField'\n   */\n  className?: ClassNameOrFunction<DateFieldRenderProps>\n}\n\nexport const DateFieldContext = createContext<ContextValue<DateFieldProps<any>, HTMLDivElement>>(null);\nexport const TimeFieldContext = createContext<ContextValue<TimeFieldProps<any>, HTMLDivElement>>(null);\nexport const DateFieldStateContext = createContext<DateFieldState | null>(null);\nexport const TimeFieldStateContext = createContext<TimeFieldState | null>(null);\n\n/**\n * A date field allows users to enter and edit date and time values using a keyboard.\n * Each part of a date value is displayed in an individually editable segment.\n */\nexport const DateField = /*#__PURE__*/ (forwardRef as forwardRefType)(function DateField<T extends DateValue>(props: DateFieldProps<T>, ref: ForwardedRef<HTMLDivElement>) {\n  [props, ref] = useContextProps(props, ref, DateFieldContext);\n  let {validationBehavior: formValidationBehavior} = useSlottedContext(FormContext) || {};\n  let validationBehavior = props.validationBehavior ?? formValidationBehavior ?? 'native';\n  let {locale} = useLocale();\n  let state = useDateFieldState({\n    ...props,\n    locale,\n    createCalendar,\n    validationBehavior\n  });\n\n  let fieldRef = useRef<HTMLDivElement>(null);\n  let [labelRef, label] = useSlot(\n    !props['aria-label'] && !props['aria-labelledby']\n  );\n  let inputRef = useRef<HTMLInputElement>(null);\n  let {labelProps, fieldProps, inputProps, descriptionProps, errorMessageProps, ...validation} = useDateField({\n    ...removeDataAttributes(props),\n    label,\n    inputRef,\n    validationBehavior\n  }, state, fieldRef);\n\n  let renderProps = useRenderProps({\n    ...removeDataAttributes(props),\n    values: {\n      state,\n      isInvalid: state.isInvalid,\n      isDisabled: state.isDisabled,\n      isReadOnly: state.isReadOnly,\n      isRequired: props.isRequired || false\n    },\n    defaultClassName: 'react-aria-DateField'\n  });\n\n  let DOMProps = filterDOMProps(props, {global: true});\n  delete DOMProps.id;\n\n  return (\n    <Provider\n      values={[\n        [DateFieldStateContext, state],\n        [GroupContext, {...fieldProps, ref: fieldRef, isInvalid: state.isInvalid, isDisabled: state.isDisabled}],\n        [InputContext, {...inputProps, ref: inputRef}],\n        [LabelContext, {...labelProps, ref: labelRef, elementType: 'span'}],\n        [TextContext, {\n          slots: {\n            description: descriptionProps,\n            errorMessage: errorMessageProps\n          }\n        }],\n        [FieldErrorContext, validation]\n      ]}>\n      <dom.div\n        {...DOMProps}\n        {...renderProps}\n        ref={ref}\n        slot={props.slot || undefined}\n        data-invalid={state.isInvalid || undefined}\n        data-disabled={state.isDisabled || undefined}\n        data-readonly={state.isReadOnly || undefined}\n        data-required={props.isRequired || undefined} />\n      <HiddenDateInput\n        autoComplete={props.autoComplete}\n        name={props.name}\n        isDisabled={props.isDisabled}\n        state={state} />\n    </Provider>\n  );\n});\n\n/**\n * A time field allows users to enter and edit time values using a keyboard.\n * Each part of a time value is displayed in an individually editable segment.\n */\nexport const TimeField = /*#__PURE__*/ (forwardRef as forwardRefType)(function TimeField<T extends TimeValue>(props: TimeFieldProps<T>, ref: ForwardedRef<HTMLDivElement>) {\n  [props, ref] = useContextProps(props, ref, TimeFieldContext);\n  let {validationBehavior: formValidationBehavior} = useSlottedContext(FormContext) || {};\n  let validationBehavior = props.validationBehavior ?? formValidationBehavior ?? 'native';\n  let {locale} = useLocale();\n  let state = useTimeFieldState({\n    ...props,\n    locale,\n    validationBehavior\n  });\n\n  let fieldRef = useRef<HTMLDivElement>(null);\n  let [labelRef, label] = useSlot(\n    !props['aria-label'] && !props['aria-labelledby']\n  );\n  let inputRef = useRef<HTMLInputElement>(null);\n  let {labelProps, fieldProps, inputProps, descriptionProps, errorMessageProps, ...validation} = useTimeField({\n    ...removeDataAttributes(props),\n    label,\n    inputRef,\n    validationBehavior\n  }, state, fieldRef);\n\n  let renderProps = useRenderProps({\n    ...props,\n    values: {\n      state,\n      isInvalid: state.isInvalid,\n      isDisabled: state.isDisabled,\n      isReadOnly: state.isReadOnly,\n      isRequired: props.isRequired || false\n    },\n    defaultClassName: 'react-aria-TimeField'\n  });\n\n  let DOMProps = filterDOMProps(props, {global: true});\n  delete DOMProps.id;\n\n  return (\n    <Provider\n      values={[\n        [TimeFieldStateContext, state],\n        [GroupContext, {...fieldProps, ref: fieldRef, isInvalid: state.isInvalid, isDisabled: state.isDisabled}],\n        [InputContext, {...inputProps, ref: inputRef}],\n        [LabelContext, {...labelProps, ref: labelRef, elementType: 'span'}],\n        [TextContext, {\n          slots: {\n            description: descriptionProps,\n            errorMessage: errorMessageProps\n          }\n        }],\n        [FieldErrorContext, validation]\n      ]}>\n      <dom.div\n        {...DOMProps}\n        {...renderProps}\n        ref={ref}\n        slot={props.slot || undefined}\n        data-invalid={state.isInvalid || undefined}\n        data-disabled={state.isDisabled || undefined}\n        data-readonly={state.isReadOnly || undefined}\n        data-required={props.isRequired || undefined} />\n    </Provider>\n  );\n});\n\nexport interface DateInputRenderProps {\n  /**\n   * Whether the date input is currently hovered with a mouse.\n   * @selector [data-hovered]\n   */\n  isHovered: boolean,\n  /**\n   * Whether an element within the date input is focused, either via a mouse or keyboard.\n   * @selector [data-focus-within]\n   */\n  isFocusWithin: boolean,\n  /**\n   * Whether an element within the date input is keyboard focused.\n   * @selector [data-focus-visible]\n   */\n  isFocusVisible: boolean,\n  /**\n   * Whether the date input is disabled.\n   * @selector [data-disabled]\n   */\n  isDisabled: boolean,\n\n  /**\n   * Whether the date input is invalid.\n   * @selector [data-invalid]\n   */\n  isInvalid: boolean\n}\n\nexport interface DateInputProps extends SlotProps, StyleRenderProps<DateInputRenderProps>, GlobalDOMAttributes<HTMLDivElement> {\n  /**\n   * The CSS [className](https://developer.mozilla.org/en-US/docs/Web/API/Element/className) for the element. A function may be provided to compute the class based on component state.\n   * @default 'react-aria-DateInput'\n   */\n  className?: ClassNameOrFunction<DateInputRenderProps>,\n  children: (segment: IDateSegment) => ReactElement\n}\n\n/**\n * A date input groups the editable date segments within a date field.\n */\nexport const DateInput = /*#__PURE__*/ (forwardRef as forwardRefType)(function DateInput(props: DateInputProps, ref: ForwardedRef<HTMLDivElement>): JSX.Element {\n  // If state is provided by DateField/TimeField, just render.\n  // Otherwise (e.g. in DatePicker), we need to call hooks and create state ourselves.\n  let dateFieldState = useContext(DateFieldStateContext);\n  let timeFieldState = useContext(TimeFieldStateContext);\n  return dateFieldState || timeFieldState\n    ? <DateInputInner {...props} ref={ref} />\n    : <DateInputStandalone {...props} ref={ref} />;\n});\n\nconst DateInputStandalone = forwardRef((props: DateInputProps, ref: ForwardedRef<HTMLDivElement>) => {\n  let [dateFieldProps, fieldRef] = useContextProps({slot: props.slot} as DateFieldProps<any>, ref, DateFieldContext);\n  let {locale} = useLocale();\n  let state = useDateFieldState({\n    ...dateFieldProps,\n    locale,\n    createCalendar\n  });\n\n  let inputRef = useRef<HTMLInputElement>(null);\n  let {fieldProps, inputProps} = useDateField({...dateFieldProps, inputRef}, state, fieldRef);\n\n  return (\n    <Provider\n      values={[\n        [DateFieldStateContext, state],\n        [InputContext, {...inputProps, ref: inputRef}],\n        [GroupContext, {...fieldProps, ref: fieldRef, isInvalid: state.isInvalid, isDisabled: state.isDisabled}]\n      ]}>\n      <DateInputInner {...props} />\n    </Provider>\n  );\n});\n\nconst DateInputInner = forwardRef((props: DateInputProps, ref: ForwardedRef<HTMLDivElement>) => {\n  let {className, children} = props;\n  let dateFieldState = useContext(DateFieldStateContext);\n  let timeFieldState = useContext(TimeFieldStateContext);\n  let state = dateFieldState ?? timeFieldState!;\n\n  return (\n    <>\n      <Group\n        {...props}\n        ref={ref}\n        slot={props.slot || undefined}\n        className={className ?? 'react-aria-DateInput'}\n        isReadOnly={state.isReadOnly}\n        isInvalid={state.isInvalid}\n        isDisabled={state.isDisabled}>\n        {state.segments.map((segment, i) => cloneElement(children(segment), {key: i}))}\n      </Group>\n      <Input className=\"\" />\n    </>\n  );\n});\n\nexport interface DateSegmentRenderProps extends Omit<IDateSegment, 'isEditable'> {\n  /**\n   * Whether the segment is currently hovered with a mouse.\n   * @selector [data-hovered]\n   */\n  isHovered: boolean,\n  /**\n   * Whether the segment is focused, either via a mouse or keyboard.\n   * @selector [data-focused]\n   */\n  isFocused: boolean,\n  /**\n   * Whether the segment is keyboard focused.\n   * @selector [data-focus-visible]\n   */\n  isFocusVisible: boolean,\n  /**\n   * Whether the value is a placeholder.\n   * @selector [data-placeholder]\n   */\n  isPlaceholder: boolean,\n  /**\n   * Whether the segment is read only.\n   * @selector [data-readonly]\n   */\n  isReadOnly: boolean,\n  /**\n   * Whether the date field is disabled.\n   * @selector [data-disabled]\n   */\n  isDisabled: boolean,\n  /**\n   * Whether the date field is in an invalid state.\n   * @selector [data-invalid]\n   */\n  isInvalid: boolean,\n  /**\n   * The type of segment. Values include `literal`, `year`, `month`, `day`, etc.\n   * @selector [data-type=\"...\"]\n   */\n  type: DateSegmentType\n}\n\nexport interface DateSegmentProps extends RenderProps<DateSegmentRenderProps, 'span'>, HoverEvents, GlobalDOMAttributes<HTMLSpanElement> {\n  /**\n   * The CSS [className](https://developer.mozilla.org/en-US/docs/Web/API/Element/className) for the element. A function may be provided to compute the class based on component state.\n   * @default 'react-aria-DateSegment'\n   */\n  className?: ClassNameOrFunction<DateSegmentRenderProps>,\n  segment: IDateSegment\n}\n\n/**\n * A date segment displays an individual unit of a date and time, and allows users to edit\n * the value by typing or using the arrow keys to increment and decrement.\n */\nexport const DateSegment = /*#__PURE__*/ (forwardRef as forwardRefType)(function DateSegment({segment, ...otherProps}: DateSegmentProps, ref: ForwardedRef<HTMLSpanElement>) {\n  let dateFieldState = useContext(DateFieldStateContext);\n  let timeFieldState = useContext(TimeFieldStateContext);\n  let state = dateFieldState ?? timeFieldState!;\n  let domRef = useObjectRef(ref);\n  let {segmentProps} = useDateSegment(segment, state, domRef);\n  let {focusProps, isFocused, isFocusVisible} = useFocusRing();\n  let {hoverProps, isHovered} = useHover({...otherProps, isDisabled: state.isDisabled || segment.type === 'literal'});\n  let renderProps = useRenderProps({\n    ...otherProps,\n    values: {\n      ...segment,\n      isReadOnly: state.isReadOnly,\n      isInvalid: state.isInvalid,\n      isDisabled: state.isDisabled,\n      isHovered,\n      isFocused,\n      isFocusVisible\n    },\n    defaultChildren: segment.text,\n    defaultClassName: 'react-aria-DateSegment'\n  });\n\n  return (\n    <dom.span\n      {...mergeProps(filterDOMProps(otherProps, {global: true}), segmentProps, focusProps, hoverProps)}\n      {...renderProps}\n      style={segmentProps.style}\n      ref={domRef}\n      data-placeholder={segment.isPlaceholder || undefined}\n      data-invalid={state.isInvalid || undefined}\n      data-readonly={state.isReadOnly || undefined}\n      data-disabled={state.isDisabled || undefined}\n      data-type={segment.type}\n      data-hovered={isHovered || undefined}\n      data-focused={isFocused || undefined}\n      data-focus-visible={isFocusVisible || undefined} />\n  );\n});\n"],"names":[],"version":3,"file":"DateField.mjs.map"}