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-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 {AriaDateFieldProps, useDateField, useDateSegment} 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, {\n  cloneElement,\n  createContext,\n  ForwardedRef,\n  forwardRef,\n  JSX,\n  ReactElement,\n  useContext,\n  useRef\n} 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   *\n   * @selector [data-invalid]\n   */\n  isInvalid: boolean;\n  /**\n   * Whether the date field is disabled.\n   *\n   * @selector [data-disabled]\n   */\n  isDisabled: boolean;\n  /**\n   * Whether the date field is read only.\n   *\n   * @selector [data-readonly]\n   */\n  isReadOnly: boolean;\n  /**\n   * Whether the date field is required.\n   *\n   * @selector [data-required]\n   */\n  isRequired: boolean;\n}\nexport interface DateFieldProps<T extends DateValue>\n  extends\n    Omit<\n      AriaDateFieldProps<T>,\n      'label' | 'description' | 'errorMessage' | 'validationState' | 'validationBehavior'\n    >,\n    RACValidation,\n    RenderProps<DateFieldRenderProps>,\n    SlotProps,\n    GlobalDOMAttributes<HTMLDivElement> {\n  /**\n   * The CSS [className](https://developer.mozilla.org/en-US/docs/Web/API/Element/className) for the\n   * element. A function may be provided to compute the class based on component state.\n   *\n   * @default 'react-aria-DateField'\n   */\n  className?: ClassNameOrFunction<DateFieldRenderProps>;\n}\nexport interface TimeFieldProps<T extends TimeValue>\n  extends\n    Omit<\n      AriaTimeFieldProps<T>,\n      'label' | 'description' | 'errorMessage' | 'validationState' | 'validationBehavior'\n    >,\n    RACValidation,\n    RenderProps<DateFieldRenderProps>,\n    SlotProps,\n    GlobalDOMAttributes<HTMLDivElement> {\n  /**\n   * The CSS [className](https://developer.mozilla.org/en-US/docs/Web/API/Element/className) for the\n   * element. A function may be provided to compute the class based on component state.\n   *\n   * @default 'react-aria-TimeField'\n   */\n  className?: ClassNameOrFunction<DateFieldRenderProps>;\n}\n\nexport const DateFieldContext =\n  createContext<ContextValue<DateFieldProps<any>, HTMLDivElement>>(null);\nexport const TimeFieldContext =\n  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<\n  T extends DateValue\n>(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(!props['aria-label'] && !props['aria-labelledby']);\n  let inputRef = useRef<HTMLInputElement>(null);\n  let {labelProps, fieldProps, inputProps, descriptionProps, errorMessageProps, ...validation} =\n    useDateField(\n      {\n        ...removeDataAttributes(props),\n        label,\n        inputRef,\n        validationBehavior\n      },\n      state,\n      fieldRef\n    );\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        [\n          GroupContext,\n          {...fieldProps, ref: fieldRef, isInvalid: state.isInvalid, isDisabled: state.isDisabled}\n        ],\n        [InputContext, {...inputProps, ref: inputRef}],\n        [LabelContext, {...labelProps, ref: labelRef, elementType: 'span'}],\n        [\n          TextContext,\n          {\n            slots: {\n              description: descriptionProps,\n              errorMessage: errorMessageProps\n            }\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      />\n      <HiddenDateInput\n        autoComplete={props.autoComplete}\n        name={props.name}\n        isDisabled={props.isDisabled}\n        state={state}\n      />\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<\n  T extends TimeValue\n>(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(!props['aria-label'] && !props['aria-labelledby']);\n  let inputRef = useRef<HTMLInputElement>(null);\n  let {labelProps, fieldProps, inputProps, descriptionProps, errorMessageProps, ...validation} =\n    useTimeField(\n      {\n        ...removeDataAttributes(props),\n        label,\n        inputRef,\n        validationBehavior\n      },\n      state,\n      fieldRef\n    );\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        [\n          GroupContext,\n          {...fieldProps, ref: fieldRef, isInvalid: state.isInvalid, isDisabled: state.isDisabled}\n        ],\n        [InputContext, {...inputProps, ref: inputRef}],\n        [LabelContext, {...labelProps, ref: labelRef, elementType: 'span'}],\n        [\n          TextContext,\n          {\n            slots: {\n              description: descriptionProps,\n              errorMessage: errorMessageProps\n            }\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      />\n    </Provider>\n  );\n});\n\nexport interface DateInputRenderProps {\n  /**\n   * Whether the date input is currently hovered with a mouse.\n   *\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   *\n   * @selector [data-focus-within]\n   */\n  isFocusWithin: boolean;\n  /**\n   * Whether an element within the date input is keyboard focused.\n   *\n   * @selector [data-focus-visible]\n   */\n  isFocusVisible: boolean;\n  /**\n   * Whether the date input is disabled.\n   *\n   * @selector [data-disabled]\n   */\n  isDisabled: boolean;\n\n  /**\n   * Whether the date input is invalid.\n   *\n   * @selector [data-invalid]\n   */\n  isInvalid: boolean;\n}\n\nexport interface DateInputProps\n  extends SlotProps, StyleRenderProps<DateInputRenderProps>, GlobalDOMAttributes<HTMLDivElement> {\n  /**\n   * The CSS [className](https://developer.mozilla.org/en-US/docs/Web/API/Element/className) for the\n   * element. A function may be provided to compute the class based on component state.\n   *\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(\n  props: DateInputProps,\n  ref: ForwardedRef<HTMLDivElement>\n): 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  ) : (\n    <DateInputStandalone {...props} ref={ref} />\n  );\n});\n\nconst DateInputStandalone = forwardRef(\n  (props: DateInputProps, ref: ForwardedRef<HTMLDivElement>) => {\n    let [dateFieldProps, fieldRef] = useContextProps(\n      {slot: props.slot} as DateFieldProps<any>,\n      ref,\n      DateFieldContext\n    );\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          [\n            GroupContext,\n            {...fieldProps, ref: fieldRef, isInvalid: state.isInvalid, isDisabled: state.isDisabled}\n          ]\n        ]}>\n        <DateInputInner {...props} />\n      </Provider>\n    );\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   *\n   * @selector [data-hovered]\n   */\n  isHovered: boolean;\n  /**\n   * Whether the segment is focused, either via a mouse or keyboard.\n   *\n   * @selector [data-focused]\n   */\n  isFocused: boolean;\n  /**\n   * Whether the segment is keyboard focused.\n   *\n   * @selector [data-focus-visible]\n   */\n  isFocusVisible: boolean;\n  /**\n   * Whether the value is a placeholder.\n   *\n   * @selector [data-placeholder]\n   */\n  isPlaceholder: boolean;\n  /**\n   * Whether the segment is read only.\n   *\n   * @selector [data-readonly]\n   */\n  isReadOnly: boolean;\n  /**\n   * Whether the date field is disabled.\n   *\n   * @selector [data-disabled]\n   */\n  isDisabled: boolean;\n  /**\n   * Whether the date field is in an invalid state.\n   *\n   * @selector [data-invalid]\n   */\n  isInvalid: boolean;\n  /**\n   * The type of segment. Values include `literal`, `year`, `month`, `day`, etc.\n   *\n   * @selector [data-type=\"...\"]\n   */\n  type: DateSegmentType;\n}\n\nexport interface DateSegmentProps\n  extends\n    RenderProps<DateSegmentRenderProps, 'span'>,\n    HoverEvents,\n    GlobalDOMAttributes<HTMLSpanElement> {\n  /**\n   * The CSS [className](https://developer.mozilla.org/en-US/docs/Web/API/Element/className) for the\n   * element. A function may be provided to compute the class based on component state.\n   *\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(\n  {segment, ...otherProps}: DateSegmentProps,\n  ref: ForwardedRef<HTMLSpanElement>\n) {\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({\n    ...otherProps,\n    isDisabled: state.isDisabled || segment.type === 'literal'\n  });\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(\n        filterDOMProps(otherProps, {global: true}),\n        segmentProps,\n        focusProps,\n        hoverProps\n      )}\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});\n"],"names":[],"version":3,"file":"DateField.cjs.map"}