@react-spectrum/datepicker 3.0.0-alpha.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1 @@
1
+ {"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAAA,SAASA,sBAAT,CAAgCC,CAAhC,EAAmC;AACjC,SAAOA,CAAC,IAAIA,CAAC,CAACC,UAAP,GAAoBD,CAAC,CAACE,OAAtB,GAAgCF,CAAvC;AACD;;;;ACFD,yCAAiB;AACf,4CAA0C,+CAD3B;AAEf,0CAAwC,6CAFzB;AAGf,wCAAsC,2CAHvB;AAIf,qCAAmC,wCAJpB;AAKf,qCAAmC,wCALpB;AAMf,8BAA4B,iCANb;AAOf,8BAA4B,iCAPb;AAQf,2CAAyC,8CAR1B;AASf,6CAA2C,gDAT5B;AAUf,yCAAuC,4CAVxB;AAWf,wCAAsC,2CAXvB;AAYf,uCAAqC,0CAZtB;AAaf,oCAAkC,uCAbnB;AAcf,oBAAkB,uBAdH;AAef,kBAAgB,qBAfD;AAgBf,sCAAoC,yCAhBrB;AAiBf,6CAA2C,gDAjB5B;AAkBf,0CAAwC;AAlBzB,CAAjB;;ACgCO,SAASG,0DAAT,OAAoF;AAAA,MAAzD;AAACC,IAAAA,OAAD;AAAUC,IAAAA;AAAV,GAAyD;AAAA,MAArCC,UAAqC;;AACzF,UAAQF,OAAO,CAACG,IAAhB;AACE;AACA,SAAK,SAAL;AACE,0BAAO,qBAAC,oDAAD;AAAgB,QAAA,OAAO,EAAEH;AAAzB,QAAP;AAEF;;AACA;AACE,0BAAO,qBAAC,qDAAD;AAAiB,QAAA,OAAO,EAAEA,OAA1B;AAAmC,QAAA,KAAK,EAAEC;AAA1C,SAAqDC,UAArD,EAAP;AAPJ;AASD;;;;AAED,SAASE,oDAAT,QAAwD;AAAA,MAAhC;AAACJ,IAAAA;AAAD,GAAgC;AACtD,MAAIK,YAAY,GAAGC,eAAe,EAAlC;AACA,MAAI;AAACC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d;AAEE,IAAA,UAAU,EAAEN,UAFd;AAGE,IAAA,OAAO,EAAEa,OAHX;AAIE,IAAA,SAAS,EAAEK,SAJb;AAKE,IAAA,eAAe,EAAExD,KAAK,CAACoD,eALzB;AAME,IAAA,QAAQ,EAAEjC,GANZ;AAOE,IAAA,SAAS,EAAEH,UAAU,kDAAmB,0BAAnB;AAPvB,KAQGhB,KAAK,CAAC8C,QAAN,CAAeC,GAAf,CAAmB,CAAChD,OAAD,EAAUiD,CAAV,kBACjB;AACC,IAAA,GAAG,EAAEA,CADN;AAEC,IAAA,OAAO,EAAEjD,OAFV;AAGC,IAAA,KAAK,EAAEC,KAHR;AAIC,IAAA,UAAU,EAAEsC,UAJb;AAKC,IAAA,UAAU,EAAEC,UALb;AAMC,IAAA,UAAU,EAAEC;AANb,IADF,CARH,CARF,CADF;AA6BD","sources":["./node_modules/@parcel/scope-hoisting/lib/helpers.js","./packages/@react-spectrum/datepicker/src/index.css","./packages/@react-spectrum/datepicker/src/DatePickerSegment.tsx","./packages/@react-spectrum/datepicker/src/DatePickerField.tsx","./node_modules/@adobe/spectrum-css-temp/components/textfield/vars.css","./packages/@react-spectrum/datepicker/src/Input.tsx","./node_modules/@adobe/spectrum-css-temp/components/inputgroup/vars.css","./packages/@react-spectrum/datepicker/src/TimeField.tsx","./packages/@react-spectrum/datepicker/src/utils.ts","./packages/@react-spectrum/datepicker/src/DatePicker.tsx","./packages/@react-spectrum/datepicker/src/DateRangePicker.tsx","./packages/@react-spectrum/datepicker/src/DateField.tsx"],"sourcesContent":["function $parcel$interopDefault(a) {\n return a && a.__esModule ? a.default : a;\n}\n\nfunction $parcel$defineInteropFlag(a) {\n Object.defineProperty(a, '__esModule', {value: true});\n}\n\nfunction $parcel$exportWildcard(dest, source) {\n Object.keys(source).forEach(function(key) {\n if (key === 'default' || key === '__esModule') {\n return;\n }\n\n Object.defineProperty(dest, key, {\n enumerable: true,\n get: function get() {\n return source[key];\n },\n });\n });\n\n return dest;\n}\n\nfunction $parcel$missingModule(name) {\n var err = new Error(\"Cannot find module '\" + name + \"'\");\n err.code = 'MODULE_NOT_FOUND';\n throw err;\n}\n\nvar $parcel$global =\n typeof globalThis !== 'undefined'\n ? globalThis\n : typeof self !== 'undefined'\n ? self\n : typeof window !== 'undefined'\n ? window\n : typeof global !== 'undefined'\n ? global\n : {};\n","/*\n * Copyright 2020 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 */\n\n.react-spectrum-Datepicker-fieldWrapper.react-spectrum-Datepicker-fieldWrapper {\n width: auto;\n min-width: var(--spectrum-global-dimension-size-2000);\n }\n\n.react-spectrum-Datepicker-startField {\n width: auto;\n padding-inline-end: var(--spectrum-global-dimension-size-100);\n}\n\n.react-spectrum-Datepicker-endField {\n width: auto;\n flex: 1;\n padding-inline-start: var(--spectrum-global-dimension-size-100);\n}\n\n.react-spectrum-Datepicker-field ~ .react-spectrum-Datepicker-endField > .react-spectrum-Datepicker-input {\n border-inline-start-width: 0;\n border-start-start-radius: 0;\n border-end-start-radius: 0;\n}\n\n.react-spectrum-Datepicker-field.react-spectrum-Datepicker-field {\n width: auto;\n}\n\n/* specificity war with .spectrum-Field--positionSide etc. */\n.react-spectrum-DateField.react-spectrum-DateField.react-spectrum-DateField.react-spectrum-DateField {\n min-width: var(--spectrum-global-dimension-size-2000)\n}\n\n.react-spectrum-TimeField.react-spectrum-TimeField.react-spectrum-TimeField.react-spectrum-TimeField {\n min-width: var(--spectrum-global-dimension-size-1250);\n}\n\n.react-spectrum-TimeField-fieldWrapper.react-spectrum-TimeField-fieldWrapper {\n width: auto;\n min-width: var(--spectrum-global-dimension-size-1250);\n}\n\n.react-spectrum-Datepicker-input.react-spectrum-Datepicker-input {\n /* always reserve space for the validation icon */\n padding-inline-end: calc(var(--spectrum-textfield-padding-x) + var(--spectrum-icon-alert-medium-width) + var(--spectrum-textfield-icon-margin-left));\n}\n\n.react-spectrum-Datepicker-inputContents {\n display: flex;\n align-items: center;\n /* width: auto; */\n overflow-x: auto;\n scrollbar-width: none; /* Firefox */\n -ms-overflow-style: none; /* Internet Explorer 10+ */\n\n &::-webkit-scrollbar { /* WebKit */\n width: 0;\n height: 0;\n display: none;\n }\n}\n\n.react-spectrum-Datepicker-rangeDash {\n &:before {\n content: '–';\n }\n}\n\n.react-spectrum-Datepicker-segments {\n display: flex;\n align-items: center;\n}\n\n.react-spectrum-Datepicker-literal {\n white-space: pre;\n user-select: none;\n color: var(--spectrum-textfield-text-color);\n}\n\n.react-spectrum-DatePicker-cell {\n border: none;\n background: none;\n padding: 0 2px;\n border-radius: 2px;\n font-variant-numeric: tabular-nums;\n text-align: end;\n box-sizing: content-box;\n white-space: nowrap;\n color: var(--spectrum-textfield-text-color);\n\n &::selection {\n /* hide the selection because there is no way to fully prevent it in Firefox */\n /* https://bugzilla.mozilla.org/show_bug.cgi?id=1742153 */\n background: transparent;\n }\n}\n\n.react-spectrum-DatePicker-cell:focus {\n background-color: var(--spectrum-global-color-static-blue);\n color: white;\n caret-color: transparent;\n outline: none;\n}\n\n.react-spectrum-DatePicker-cell.is-placeholder {\n color: var(--spectrum-textfield-placeholder-text-color, var(--spectrum-global-color-gray-600));\n\n &:before {\n content: attr(aria-placeholder);\n }\n}\n\n.react-spectrum-DatePicker-cell.is-placeholder ~ .react-spectrum-Datepicker-literal {\n color: var(--spectrum-textfield-placeholder-text-color, var(--spectrum-global-color-gray-600));\n}\n\n.react-spectrum-DatePicker-cell.is-placeholder:focus {\n color: var(--spectrum-global-color-static-gray-400);\n}\n\n.react-spectrum-DatePicker-cell.is-read-only {\n color: var(--spectrum-global-color-gray-700);\n &:focus {\n color: var(--spectrum-global-color-static-gray-300);\n }\n}\n\n.react-spectrum-Datepicker-dialog {\n width: auto;\n}\n\n/* when displayed in a tray, reduce the padding of the dialog */\n@media (max-width: 700px) {\n .react-spectrum-Datepicker-dialog {\n --spectrum-dialog-padding-x: 8px;\n\n .react-spectrum-Datepicker-dialogContent {\n display: flex;\n flex-direction: column;\n align-items: center;\n }\n }\n}\n\n.react-spectrum-Datepicker-timeFields {\n width: 100%;\n min-width: calc(var(--spectrum-calendar-day-width) * 7);\n max-width: calc((var(--spectrum-calendar-day-width) * 7) + (var(--spectrum-calendar-day-padding) * 12));\n padding: 0 var(--spectrum-calendar-day-padding);\n box-sizing: border-box;\n}\n","/*\n * Copyright 2020 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 */\n\nimport {classNames} from '@react-spectrum/utils';\nimport {DatePickerBase, DateValue} from '@react-types/datepicker';\nimport {DatePickerFieldState, DateSegment} from '@react-stately/datepicker';\nimport {NumberParser} from '@internationalized/number';\nimport React, {useMemo, useRef} from 'react';\nimport styles from './index.css';\nimport {useDateSegment} from '@react-aria/datepicker';\nimport {useFocusManager} from '@react-aria/focus';\nimport {useLocale} from '@react-aria/i18n';\nimport {usePress} from '@react-aria/interactions';\n\ninterface DatePickerSegmentProps extends DatePickerBase<DateValue> {\n segment: DateSegment,\n state: DatePickerFieldState\n}\n\ninterface LiteralSegmentProps {\n segment: DateSegment\n}\n\nexport function DatePickerSegment({segment, state, ...otherProps}: DatePickerSegmentProps) {\n switch (segment.type) {\n // A separator, e.g. punctuation\n case 'literal':\n return <LiteralSegment segment={segment} />;\n\n // Editable segment\n default:\n return <EditableSegment segment={segment} state={state} {...otherProps} />;\n }\n}\n\nfunction LiteralSegment({segment}: LiteralSegmentProps) {\n let focusManager = useFocusManager();\n let {pressProps} = usePress({\n onPressStart: (e) => {\n if (e.pointerType === 'mouse') {\n let res = focusManager.focusNext({from: e.target as HTMLElement});\n if (!res) {\n focusManager.focusPrevious({from: e.target as HTMLElement});\n }\n }\n }\n });\n\n return (\n <span\n aria-hidden=\"true\"\n className={classNames(styles, 'react-spectrum-Datepicker-literal')}\n {...pressProps}\n data-testid={segment.type === 'literal' ? undefined : segment.type}>\n {segment.text}\n </span>\n );\n}\n\nfunction EditableSegment({segment, state, ...otherProps}: DatePickerSegmentProps) {\n let ref = useRef();\n let {segmentProps} = useDateSegment(otherProps, segment, state, ref);\n let {locale} = useLocale();\n let parser = useMemo(() => new NumberParser(locale), [locale]);\n let isNumeric = useMemo(() => parser.isValidPartialNumber(segment.text), [segment.text, parser]);\n return (\n <div\n ref={ref}\n className={classNames(styles, 'react-spectrum-DatePicker-cell', {\n 'is-placeholder': segment.isPlaceholder,\n 'is-read-only': !segment.isEditable\n })}\n style={{\n minWidth: !isNumeric ? null : String(segment.maxValue).length + 'ch'\n }}\n data-testid={segment.type}\n {...segmentProps}>\n {segment.isPlaceholder ? '' : segment.text}\n </div>\n );\n}\n","/*\n * Copyright 2020 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 */\n\nimport {classNames} from '@react-spectrum/utils';\nimport {createCalendar} from '@internationalized/date';\nimport {DatePickerSegment} from './DatePickerSegment';\nimport datepickerStyles from './index.css';\nimport {DateValue, SpectrumDatePickerProps} from '@react-types/datepicker';\nimport React, {useRef} from 'react';\nimport {useDateField} from '@react-aria/datepicker';\nimport {useDatePickerFieldState} from '@react-stately/datepicker';\nimport {useLocale} from '@react-aria/i18n';\n\ninterface DatePickerFieldProps<T extends DateValue> extends SpectrumDatePickerProps<T> {\n inputClassName?: string,\n hideValidationIcon?: boolean,\n maxGranularity?: SpectrumDatePickerProps<T>['granularity']\n}\n\nexport function DatePickerField<T extends DateValue>(props: DatePickerFieldProps<T>) {\n let {\n isDisabled,\n isReadOnly,\n isRequired,\n inputClassName\n } = props;\n let ref = useRef();\n let {locale} = useLocale();\n let state = useDatePickerFieldState({\n ...props,\n locale,\n createCalendar\n });\n\n let {fieldProps} = useDateField(props, state, ref);\n\n return (\n <div {...fieldProps} className={classNames(datepickerStyles, 'react-spectrum-Datepicker-segments', inputClassName)} ref={ref}>\n {state.segments.map((segment, i) =>\n (<DatePickerSegment\n key={i}\n segment={segment}\n state={state}\n isDisabled={isDisabled}\n isReadOnly={isReadOnly}\n isRequired={isRequired} />)\n )}\n </div>\n );\n}\n","/*\n * Copyright 2020 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 */\n\n@import './index.css';\n@import './skin.css';\n","/*\n * Copyright 2020 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 */\n\nimport Alert from '@spectrum-icons/ui/AlertMedium';\nimport Checkmark from '@spectrum-icons/ui/CheckmarkMedium';\nimport {classNames, useValueEffect} from '@react-spectrum/utils';\nimport datepickerStyles from './index.css';\nimport {FocusRing, FocusScope} from '@react-aria/focus';\nimport {mergeProps, useEvent, useLayoutEffect, useResizeObserver} from '@react-aria/utils';\nimport React, {useCallback, useRef} from 'react';\nimport textfieldStyles from '@adobe/spectrum-css-temp/components/textfield/vars.css';\n\nexport function Input(props) {\n let defaultRef = useRef();\n let {\n isDisabled,\n isQuiet,\n inputClassName,\n validationState,\n children,\n fieldProps,\n inputRef = defaultRef,\n className,\n autoFocus,\n style\n } = props;\n\n // Reserve padding for the error icon when the width of the input is unconstrained.\n // When constrained, don't reserve space because adding it only when invalid will\n // not cause a layout shift.\n let [reservePadding, setReservePadding] = useValueEffect(false);\n let onResize = useCallback(() => setReservePadding(function *(reservePadding) {\n if (reservePadding) {\n // Try to collapse padding if the content is clipped.\n if (inputRef.current.scrollWidth > inputRef.current.offsetWidth) {\n let width = inputRef.current.parentElement.offsetWidth;\n yield false;\n\n // If removing padding causes a layout shift, add it back.\n if (inputRef.current.parentElement.offsetWidth !== width) {\n yield true;\n }\n }\n } else {\n // Try to add padding if the content is not clipped.\n if (inputRef.current.offsetWidth >= inputRef.current.scrollWidth) {\n let width = inputRef.current.parentElement.offsetWidth;\n yield true;\n\n // If adding padding does not change the width (i.e. width is constrained), remove it again.\n if (inputRef.current.parentElement.offsetWidth === width) {\n yield false;\n }\n }\n }\n }), [inputRef, setReservePadding]);\n\n useLayoutEffect(onResize, [onResize]);\n useResizeObserver({\n ref: inputRef,\n onResize\n });\n\n // We also need to listen for resize events of the window so we can detect\n // when there is enough space for the padding to be re-added. Ideally we'd\n // use a resize observer on a parent element, but it's hard to know _what_\n // parent element.\n useEvent(useRef(window), 'resize', onResize);\n\n let isInvalid = validationState === 'invalid';\n let textfieldClass = classNames(\n textfieldStyles,\n 'spectrum-Textfield',\n {\n 'spectrum-Textfield--invalid': isInvalid,\n 'spectrum-Textfield--valid': validationState === 'valid',\n 'spectrum-Textfield--quiet': isQuiet\n },\n classNames(datepickerStyles, 'react-spectrum-Datepicker-field'),\n className\n );\n\n let inputClass = classNames(\n textfieldStyles,\n 'spectrum-Textfield-input',\n {\n 'is-disabled': isDisabled,\n 'is-invalid': isInvalid\n },\n reservePadding && classNames(datepickerStyles, 'react-spectrum-Datepicker-input'),\n inputClassName\n );\n\n let iconClass = classNames(\n textfieldStyles,\n 'spectrum-Textfield-validationIcon'\n );\n\n let validationIcon = null;\n if (validationState === 'invalid') {\n validationIcon = <Alert data-testid=\"invalid-icon\" UNSAFE_className={iconClass} />;\n } else if (validationState === 'valid') {\n validationIcon = <Checkmark data-testid=\"valid-icon\" UNSAFE_className={iconClass} />;\n }\n\n return (\n <div {...mergeProps(fieldProps)} className={textfieldClass} style={style}>\n <FocusRing focusClass={classNames(textfieldStyles, 'is-focused')} focusRingClass={classNames(textfieldStyles, 'focus-ring')} isTextInput within>\n <div role=\"presentation\" className={inputClass}>\n <div role=\"presentation\" className={classNames(datepickerStyles, 'react-spectrum-Datepicker-inputContents')} ref={inputRef}>\n <FocusScope autoFocus={autoFocus}>\n {children}\n </FocusScope>\n </div>\n </div>\n </FocusRing>\n {validationIcon}\n </div>\n );\n}\n","/*\n * Copyright 2020 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 */\n\n@import './index.css';\n@import './skin.css';\n","/*\n * Copyright 2020 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 */\n\nimport {classNames} from '@react-spectrum/utils';\nimport {createCalendar} from '@internationalized/date';\nimport {DatePickerSegment} from './DatePickerSegment';\nimport datepickerStyles from './index.css';\nimport {Field} from '@react-spectrum/label';\nimport {Input} from './Input';\nimport React, {useRef} from 'react';\nimport {SpectrumTimePickerProps, TimeValue} from '@react-types/datepicker';\nimport {useDateField} from '@react-aria/datepicker';\nimport {useLocale} from '@react-aria/i18n';\nimport {useProviderProps} from '@react-spectrum/provider';\nimport {useTimeFieldState} from '@react-stately/datepicker';\n\nexport function TimeField<T extends TimeValue>(props: SpectrumTimePickerProps<T>) {\n props = useProviderProps(props);\n let {\n autoFocus,\n isDisabled,\n isReadOnly,\n isRequired,\n isQuiet\n } = props;\n\n let ref = useRef();\n let {locale} = useLocale();\n let state = useTimeFieldState({\n ...props,\n locale,\n createCalendar\n });\n\n let {labelProps, fieldProps, descriptionProps, errorMessageProps} = useDateField(props, state, ref);\n\n return (\n <Field\n {...props}\n labelProps={labelProps}\n descriptionProps={descriptionProps}\n errorMessageProps={errorMessageProps}\n validationState={state.validationState}\n UNSAFE_className={classNames(datepickerStyles, 'react-spectrum-TimeField-fieldWrapper')}>\n <Input\n fieldProps={fieldProps}\n isDisabled={isDisabled}\n isQuiet={isQuiet}\n autoFocus={autoFocus}\n validationState={state.validationState}\n inputRef={ref}\n className={classNames(datepickerStyles, 'react-spectrum-TimeField')}>\n {state.segments.map((segment, i) =>\n (<DatePickerSegment\n key={i}\n segment={segment}\n state={state}\n isDisabled={isDisabled}\n isReadOnly={isReadOnly}\n isRequired={isRequired} />)\n )}\n </Input>\n </Field>\n );\n}\n","/*\n * Copyright 2020 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 {SpectrumDatePickerBase} from '@react-types/datepicker';\nimport {useDateFormatter} from '@react-aria/i18n';\nimport {useDisplayNames} from '@react-aria/datepicker';\nimport {useLayoutEffect} from '@react-aria/utils';\nimport {useMemo, useState} from 'react';\nimport {useProvider} from '@react-spectrum/provider';\n\nexport function useFormatHelpText(props: Pick<SpectrumDatePickerBase<any>, 'description' | 'showFormatHelpText'>) {\n let formatter = useDateFormatter({dateStyle: 'short'});\n let displayNames = useDisplayNames();\n return useMemo(() => {\n if (props.description) {\n return props.description;\n }\n\n if (props.showFormatHelpText) {\n return formatter.formatToParts(new Date()).map(s => {\n if (s.type === 'literal') {\n return s.value;\n }\n\n return displayNames.of(s.type);\n }).join(' ');\n }\n\n return '';\n }, [props.description, props.showFormatHelpText, formatter, displayNames]);\n}\n\nexport function useVisibleMonths(maxVisibleMonths: number) {\n let {scale} = useProvider();\n let [visibleMonths, setVisibleMonths] = useState(getVisibleMonths(scale));\n useLayoutEffect(() => {\n let onResize = () => setVisibleMonths(getVisibleMonths(scale));\n onResize();\n\n window.addEventListener('resize', onResize);\n return () => {\n window.removeEventListener('resize', onResize);\n };\n }, [scale]);\n\n return Math.max(1, Math.min(visibleMonths, maxVisibleMonths, 3));\n}\n\nfunction getVisibleMonths(scale) {\n let monthWidth = scale === 'large' ? 336 : 280;\n let gap = scale === 'large' ? 30 : 24;\n let popoverPadding = scale === 'large' ? 32 : 48;\n return Math.floor((window.innerWidth - popoverPadding * 2) / (monthWidth + gap));\n}\n","/*\n * Copyright 2020 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 */\n\nimport {Calendar} from '@react-spectrum/calendar';\nimport CalendarIcon from '@spectrum-icons/workflow/Calendar';\nimport {classNames} from '@react-spectrum/utils';\nimport {Content} from '@react-spectrum/view';\nimport {DatePickerField} from './DatePickerField';\nimport datepickerStyles from './index.css';\nimport {DateValue, SpectrumDatePickerProps} from '@react-types/datepicker';\nimport {Dialog, DialogTrigger} from '@react-spectrum/dialog';\nimport {Field} from '@react-spectrum/label';\nimport {FieldButton} from '@react-spectrum/button';\nimport {Input} from './Input';\nimport {mergeProps} from '@react-aria/utils';\nimport React, {useRef} from 'react';\nimport '@adobe/spectrum-css-temp/components/textfield/vars.css'; // HACK: must be included BEFORE inputgroup\nimport styles from '@adobe/spectrum-css-temp/components/inputgroup/vars.css';\nimport {TimeField} from './TimeField';\nimport {useDatePicker} from '@react-aria/datepicker';\nimport {useDatePickerState} from '@react-stately/datepicker';\nimport {useFocusRing} from '@react-aria/focus';\nimport {useFormatHelpText, useVisibleMonths} from './utils';\nimport {useHover} from '@react-aria/interactions';\nimport {useLocale} from '@react-aria/i18n';\nimport {useProviderProps} from '@react-spectrum/provider';\n\nexport function DatePicker<T extends DateValue>(props: SpectrumDatePickerProps<T>) {\n props = useProviderProps(props);\n let {\n autoFocus,\n isQuiet,\n isDisabled,\n isReadOnly,\n isRequired,\n placeholderValue,\n maxVisibleMonths = 1\n } = props;\n let {hoverProps, isHovered} = useHover({isDisabled});\n let targetRef = useRef<HTMLDivElement>();\n let state = useDatePickerState(props);\n let {groupProps, labelProps, fieldProps, descriptionProps, errorMessageProps, buttonProps, dialogProps} = useDatePicker(props, state, targetRef);\n let {value, setValue, isOpen, setOpen} = state;\n let {direction} = useLocale();\n\n let {isFocused, isFocusVisible, focusProps} = useFocusRing({\n within: true,\n isTextInput: true,\n autoFocus\n });\n\n let className = classNames(\n styles,\n 'spectrum-InputGroup',\n {\n 'spectrum-InputGroup--quiet': isQuiet,\n 'spectrum-InputGroup--invalid': state.validationState === 'invalid',\n 'is-disabled': isDisabled,\n 'is-hovered': isHovered,\n 'is-focused': isFocused,\n 'focus-ring': isFocusVisible\n }\n );\n\n let fieldClassName = classNames(\n styles,\n 'spectrum-InputGroup-input',\n {\n 'is-disabled': isDisabled,\n 'is-invalid': state.validationState === 'invalid'\n }\n );\n\n // Note: this description is intentionally not passed to useDatePicker.\n // The format help text is unnecessary for screen reader users because each segment already has a label.\n let description = useFormatHelpText(props);\n if (description && !props.description) {\n descriptionProps.id = null;\n }\n\n let placeholder: DateValue = placeholderValue;\n let timePlaceholder = placeholder && 'hour' in placeholder ? placeholder : null;\n let timeMinValue = props.minValue && 'hour' in props.minValue ? props.minValue : null;\n let timeMaxValue = props.maxValue && 'hour' in props.maxValue ? props.maxValue : null;\n let timeGranularity = state.granularity === 'hour' || state.granularity === 'minute' || state.granularity === 'second' || state.granularity === 'millisecond' ? state.granularity : null;\n let showTimeField = !!timeGranularity;\n\n let visibleMonths = useVisibleMonths(maxVisibleMonths);\n\n return (\n <Field\n {...props}\n ref={targetRef}\n description={description}\n labelProps={labelProps}\n descriptionProps={descriptionProps}\n errorMessageProps={errorMessageProps}\n validationState={state.validationState}\n UNSAFE_className={classNames(datepickerStyles, 'react-spectrum-Datepicker-fieldWrapper')}>\n <div\n {...mergeProps(groupProps, hoverProps, focusProps)}\n className={className}>\n <Input\n isDisabled={isDisabled}\n isQuiet={isQuiet}\n validationState={state.validationState}\n autoFocus={autoFocus}\n className={classNames(styles, 'spectrum-InputGroup-field')}\n inputClassName={fieldClassName}>\n <DatePickerField\n {...fieldProps}\n data-testid=\"date-field\"\n isQuiet={isQuiet}\n validationState={state.validationState}\n value={value}\n onChange={setValue}\n placeholderValue={placeholderValue}\n isDisabled={isDisabled}\n isReadOnly={isReadOnly}\n isRequired={isRequired}\n granularity={props.granularity}\n hourCycle={props.hourCycle}\n inputClassName={fieldClassName}\n hideTimeZone={props.hideTimeZone} />\n </Input>\n <DialogTrigger\n type=\"popover\"\n mobileType=\"tray\"\n placement={direction === 'rtl' ? 'bottom right' : 'bottom left'}\n targetRef={targetRef}\n hideArrow\n isOpen={isOpen}\n onOpenChange={setOpen}>\n <FieldButton\n {...buttonProps}\n UNSAFE_className={classNames(styles, 'spectrum-FieldButton')}\n isQuiet={isQuiet}\n validationState={state.validationState}\n isDisabled={isDisabled || isReadOnly}>\n <CalendarIcon />\n </FieldButton>\n <Dialog UNSAFE_className={classNames(datepickerStyles, 'react-spectrum-Datepicker-dialog')} {...dialogProps}>\n <Content UNSAFE_className={classNames(datepickerStyles, 'react-spectrum-Datepicker-dialogContent')}>\n <Calendar\n autoFocus\n value={state.dateValue}\n onChange={state.setDateValue}\n visibleMonths={visibleMonths}\n minValue={props.minValue}\n maxValue={props.maxValue} />\n {showTimeField &&\n <div className={classNames(datepickerStyles, 'react-spectrum-Datepicker-timeFields')}>\n <TimeField\n label=\"Time\"\n value={state.timeValue}\n onChange={state.setTimeValue}\n placeholderValue={timePlaceholder}\n granularity={timeGranularity}\n minValue={timeMinValue}\n maxValue={timeMaxValue}\n hourCycle={props.hourCycle}\n hideTimeZone={props.hideTimeZone}\n marginTop=\"size-100\" />\n </div>\n }\n </Content>\n </Dialog>\n </DialogTrigger>\n </div>\n </Field>\n );\n}\n","/*\n * Copyright 2020 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 */\n\nimport CalendarIcon from '@spectrum-icons/workflow/Calendar';\nimport {classNames, useStyleProps} from '@react-spectrum/utils';\nimport {Content} from '@react-spectrum/view';\nimport {DatePickerField} from './DatePickerField';\nimport datepickerStyles from './index.css';\nimport {DateValue, SpectrumDateRangePickerProps} from '@react-types/datepicker';\nimport {Dialog, DialogTrigger} from '@react-spectrum/dialog';\nimport {Field} from '@react-spectrum/label';\nimport {FieldButton} from '@react-spectrum/button';\nimport {Flex} from '@react-spectrum/layout';\nimport {Input} from './Input';\nimport {mergeProps} from '@react-aria/utils';\nimport {RangeCalendar} from '@react-spectrum/calendar';\nimport React, {useRef} from 'react';\nimport styles from '@adobe/spectrum-css-temp/components/inputgroup/vars.css';\nimport {TimeField} from './TimeField';\nimport {useDateRangePicker} from '@react-aria/datepicker';\nimport {useDateRangePickerState} from '@react-stately/datepicker';\nimport {useFocusRing} from '@react-aria/focus';\nimport {useFormatHelpText, useVisibleMonths} from './utils';\nimport {useHover} from '@react-aria/interactions';\nimport {useLocale} from '@react-aria/i18n';\nimport {useProviderProps} from '@react-spectrum/provider';\n\nexport function DateRangePicker<T extends DateValue>(props: SpectrumDateRangePickerProps<T>) {\n props = useProviderProps(props);\n let {\n isQuiet,\n isDisabled,\n isReadOnly,\n isRequired,\n autoFocus,\n placeholderValue,\n maxVisibleMonths = 1,\n ...otherProps\n } = props;\n let {styleProps} = useStyleProps(otherProps);\n let {hoverProps, isHovered} = useHover({isDisabled});\n let targetRef = useRef<HTMLDivElement>();\n let state = useDateRangePickerState(props);\n let {labelProps, groupProps, buttonProps, dialogProps, startFieldProps, endFieldProps, descriptionProps, errorMessageProps} = useDateRangePicker(props, state, targetRef);\n let {value, isOpen, setOpen} = state;\n let {direction} = useLocale();\n\n let {isFocused, isFocusVisible, focusProps} = useFocusRing({\n within: true,\n isTextInput: true,\n autoFocus\n });\n\n let className = classNames(\n styles,\n 'spectrum-InputGroup',\n {\n 'spectrum-InputGroup--quiet': isQuiet,\n 'spectrum-InputGroup--invalid': state.validationState === 'invalid',\n 'is-disabled': isDisabled,\n 'is-hovered': isHovered,\n 'is-focused': isFocused,\n 'focus-ring': isFocusVisible\n },\n styleProps.className\n );\n\n let fieldClassName = classNames(\n styles,\n 'spectrum-InputGroup-input',\n {\n 'is-disabled': isDisabled,\n 'is-invalid': state.validationState === 'invalid'\n }\n );\n\n // Note: this description is intentionally not passed to useDatePicker.\n // The format help text is unnecessary for screen reader users because each segment already has a label.\n let description = useFormatHelpText(props);\n if (description && !props.description) {\n descriptionProps.id = null;\n }\n\n let placeholder: DateValue = placeholderValue;\n let timePlaceholder = placeholder && 'hour' in placeholder ? placeholder : null;\n let timeMinValue = props.minValue && 'hour' in props.minValue ? props.minValue : null;\n let timeMaxValue = props.maxValue && 'hour' in props.maxValue ? props.maxValue : null;\n let timeGranularity = state.granularity === 'hour' || state.granularity === 'minute' || state.granularity === 'second' || state.granularity === 'millisecond' ? state.granularity : null;\n let showTimeField = !!timeGranularity;\n\n let visibleMonths = useVisibleMonths(maxVisibleMonths);\n\n return (\n <Field\n {...props}\n ref={targetRef}\n description={description}\n labelProps={labelProps}\n descriptionProps={descriptionProps}\n errorMessageProps={errorMessageProps}\n validationState={state.validationState}\n UNSAFE_className={classNames(datepickerStyles, 'react-spectrum-Datepicker-fieldWrapper')}>\n <div\n {...styleProps}\n {...mergeProps(groupProps, hoverProps, focusProps)}\n className={className}>\n <Input\n isDisabled={isDisabled}\n isQuiet={isQuiet}\n validationState={state.validationState}\n autoFocus={autoFocus}\n className={classNames(styles, 'spectrum-InputGroup-field')}\n inputClassName={fieldClassName}>\n <DatePickerField\n {...startFieldProps}\n isQuiet={props.isQuiet}\n isDisabled={isDisabled}\n isReadOnly={isReadOnly}\n isRequired={isRequired}\n validationState={state.validationState}\n placeholderValue={placeholderValue}\n value={value?.start || null}\n defaultValue={null}\n onChange={start => state.setDateTime('start', start)}\n granularity={props.granularity}\n hourCycle={props.hourCycle}\n inputClassName={classNames(datepickerStyles, 'react-spectrum-Datepicker-startField')} />\n <DateRangeDash />\n <DatePickerField\n {...endFieldProps}\n isQuiet={props.isQuiet}\n isDisabled={isDisabled}\n isReadOnly={isReadOnly}\n isRequired={isRequired}\n validationState={state.validationState}\n placeholderValue={placeholderValue}\n value={value?.end || null}\n defaultValue={null}\n onChange={end => state.setDateTime('end', end)}\n granularity={props.granularity}\n hourCycle={props.hourCycle}\n inputClassName={classNames(\n styles,\n 'spectrum-Datepicker-endField',\n classNames(\n datepickerStyles,\n 'react-spectrum-Datepicker-endField'\n )\n )} />\n </Input>\n <DialogTrigger\n type=\"popover\"\n mobileType=\"tray\"\n placement={direction === 'rtl' ? 'bottom right' : 'bottom left'}\n targetRef={targetRef}\n hideArrow\n isOpen={isOpen}\n onOpenChange={setOpen}>\n <FieldButton\n {...buttonProps}\n UNSAFE_className={classNames(styles, 'spectrum-FieldButton')}\n isQuiet={isQuiet}\n validationState={state.validationState}\n isDisabled={isDisabled || isReadOnly}>\n <CalendarIcon />\n </FieldButton>\n <Dialog UNSAFE_className={classNames(datepickerStyles, 'react-spectrum-Datepicker-dialog')} {...dialogProps}>\n <Content UNSAFE_className={classNames(datepickerStyles, 'react-spectrum-Datepicker-dialogContent')}>\n <RangeCalendar\n autoFocus\n value={state.dateRange}\n onChange={state.setDateRange}\n visibleMonths={visibleMonths}\n minValue={props.minValue}\n maxValue={props.maxValue} />\n {showTimeField &&\n <Flex gap=\"size-100\" marginTop=\"size-100\" UNSAFE_className={classNames(datepickerStyles, 'react-spectrum-Datepicker-timeFields')}>\n <TimeField\n label=\"Start time\"\n value={state.timeRange?.start || null}\n onChange={v => state.setTime('start', v)}\n placeholderValue={timePlaceholder}\n granularity={timeGranularity}\n minValue={timeMinValue}\n maxValue={timeMaxValue}\n hourCycle={props.hourCycle}\n hideTimeZone={props.hideTimeZone}\n flex />\n <TimeField\n label=\"End time\"\n value={state.timeRange?.end || null}\n onChange={v => state.setTime('end', v)}\n placeholderValue={timePlaceholder}\n granularity={timeGranularity}\n minValue={timeMinValue}\n maxValue={timeMaxValue}\n hourCycle={props.hourCycle}\n hideTimeZone={props.hideTimeZone}\n flex />\n </Flex>\n }\n </Content>\n </Dialog>\n </DialogTrigger>\n </div>\n </Field>\n );\n}\n\nfunction DateRangeDash() {\n return (\n <div\n aria-hidden=\"true\"\n data-testid=\"date-range-dash\"\n className={classNames(datepickerStyles, 'react-spectrum-Datepicker-rangeDash')} />\n );\n}\n","/*\n * Copyright 2020 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 */\n\nimport {classNames} from '@react-spectrum/utils';\nimport {createCalendar} from '@internationalized/date';\nimport {DatePickerSegment} from './DatePickerSegment';\nimport datepickerStyles from './index.css';\nimport {DateValue, SpectrumDatePickerProps} from '@react-types/datepicker';\nimport {Field} from '@react-spectrum/label';\nimport {Input} from './Input';\nimport React, {useRef} from 'react';\nimport {useDateField} from '@react-aria/datepicker';\nimport {useDatePickerFieldState} from '@react-stately/datepicker';\nimport {useFormatHelpText} from './utils';\nimport {useLocale} from '@react-aria/i18n';\nimport {useProviderProps} from '@react-spectrum/provider';\n\nexport function DateField<T extends DateValue>(props: SpectrumDatePickerProps<T>) {\n props = useProviderProps(props);\n let {\n autoFocus,\n isDisabled,\n isReadOnly,\n isRequired,\n isQuiet\n } = props;\n\n let ref = useRef();\n let {locale} = useLocale();\n let state = useDatePickerFieldState({\n ...props,\n locale,\n createCalendar\n });\n\n let {labelProps, fieldProps, descriptionProps, errorMessageProps} = useDateField(props, state, ref);\n\n // Note: this description is intentionally not passed to useDatePicker.\n // The format help text is unnecessary for screen reader users because each segment already has a label.\n let description = useFormatHelpText(props);\n if (description && !props.description) {\n descriptionProps.id = null;\n }\n\n return (\n <Field\n {...props}\n description={description}\n labelProps={labelProps}\n descriptionProps={descriptionProps}\n errorMessageProps={errorMessageProps}\n validationState={state.validationState}\n UNSAFE_className={classNames(datepickerStyles, 'react-spectrum-Datepicker-fieldWrapper')}>\n <Input\n fieldProps={fieldProps}\n isDisabled={isDisabled}\n isQuiet={isQuiet}\n autoFocus={autoFocus}\n validationState={state.validationState}\n inputRef={ref}\n className={classNames(datepickerStyles, 'react-spectrum-DateField')}>\n {state.segments.map((segment, i) =>\n (<DatePickerSegment\n key={i}\n segment={segment}\n state={state}\n isDisabled={isDisabled}\n isReadOnly={isReadOnly}\n isRequired={isRequired} />)\n )}\n </Input>\n </Field>\n );\n}\n"],"names":["$parcel$interopDefault","a","__esModule","default","DatePickerSegment","segment","state","otherProps","type","LiteralSegment","focusManager","useFocusManager","pressProps","usePress","onPressStart","e","pointerType","res","focusNext","from","target","focusPrevious","classNames","text","EditableSegment","ref","useRef","segmentProps","useDateSegment","locale","useLocale","parser","useMemo","NumberParser","isNumeric","isValidPartialNumber","isPlaceholder","isEditable","minWidth","String","maxValue","length","DatePickerField","props","isDisabled","isReadOnly","isRequired","inputClassName","useDatePickerFieldState","createCalendar","fieldProps","useDateField","segments","map","i","Input","defaultRef","isQuiet","validationState","children","inputRef","className","autoFocus","style","reservePadding","setReservePadding","useValueEffect","onResize","useCallback","current","scrollWidth","offsetWidth","width","parentElement","useLayoutEffect","useResizeObserver","useEvent","window","isInvalid","textfieldClass","inputClass","iconClass","validationIcon","mergeProps","TimeField","useProviderProps","useTimeFieldState","labelProps","descriptionProps","errorMessageProps","useFormatHelpText","formatter","useDateFormatter","dateStyle","displayNames","useDisplayNames","description","showFormatHelpText","formatToParts","Date","s","value","of","join","useVisibleMonths","maxVisibleMonths","scale","useProvider","visibleMonths","setVisibleMonths","useState","getVisibleMonths","addEventListener","removeEventListener","Math","max","min","monthWidth","gap","popoverPadding","floor","innerWidth","DatePicker","placeholderValue","hoverProps","isHovered","useHover","targetRef","useDatePickerState","groupProps","buttonProps","dialogProps","useDatePicker","setValue","isOpen","setOpen","direction","isFocused","isFocusVisible","focusProps","useFocusRing","within","isTextInput","fieldClassName","id","placeholder","timePlaceholder","timeMinValue","minValue","timeMaxValue","timeGranularity","granularity","showTimeField","hourCycle","hideTimeZone","dateValue","setDateValue","timeValue","setTimeValue","DateRangePicker","styleProps","useStyleProps","useDateRangePickerState","startFieldProps","endFieldProps","useDateRangePicker","start","setDateTime","end","dateRange","setDateRange","timeRange","v","setTime","DateRangeDash","DateField"],"version":3,"file":"module.js.map"}
@@ -0,0 +1,7 @@
1
+ import { SpectrumTimePickerProps, TimeValue, DateValue, SpectrumDatePickerProps, SpectrumDateRangePickerProps } from "@react-types/datepicker";
2
+ export function TimeField<T extends TimeValue>(props: SpectrumTimePickerProps<T>): JSX.Element;
3
+ export function DatePicker<T extends DateValue>(props: SpectrumDatePickerProps<T>): JSX.Element;
4
+ export function DateRangePicker<T extends DateValue>(props: SpectrumDateRangePickerProps<T>): JSX.Element;
5
+ export function DateField<T extends DateValue>(props: SpectrumDatePickerProps<T>): JSX.Element;
6
+
7
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"mappings":"A;AGyBA,0BAA0B,CAAC,SAAS,SAAS,EAAE,KAAK,EAAE,wBAAwB,CAAC,CAAC,eAgD/E;AErCD,2BAA2B,CAAC,SAAS,SAAS,EAAE,KAAK,EAAE,wBAAwB,CAAC,CAAC,eAgJhF;AChJD,gCAAgC,CAAC,SAAS,SAAS,EAAE,KAAK,EAAE,6BAA6B,CAAC,CAAC,eAoL1F;AC9LD,0BAA0B,CAAC,SAAS,SAAS,EAAE,KAAK,EAAE,wBAAwB,CAAC,CAAC,eAwD/E","sources":["./packages/@react-spectrum/datepicker/src/packages/@react-spectrum/datepicker/src/DatePickerSegment.tsx","./packages/@react-spectrum/datepicker/src/packages/@react-spectrum/datepicker/src/DatePickerField.tsx","./packages/@react-spectrum/datepicker/src/packages/@react-spectrum/datepicker/src/Input.tsx","./packages/@react-spectrum/datepicker/src/packages/@react-spectrum/datepicker/src/TimeField.tsx","./packages/@react-spectrum/datepicker/src/packages/@react-spectrum/datepicker/src/utils.ts","./packages/@react-spectrum/datepicker/src/packages/@react-spectrum/datepicker/src/DatePicker.tsx","./packages/@react-spectrum/datepicker/src/packages/@react-spectrum/datepicker/src/DateRangePicker.tsx","./packages/@react-spectrum/datepicker/src/packages/@react-spectrum/datepicker/src/DateField.tsx","./packages/@react-spectrum/datepicker/src/packages/@react-spectrum/datepicker/src/index.ts"],"sourcesContent":[null,null,null,null,null,null,null,null,null],"names":[],"version":3,"file":"types.d.ts.map"}
package/package.json ADDED
@@ -0,0 +1,70 @@
1
+ {
2
+ "name": "@react-spectrum/datepicker",
3
+ "version": "3.0.0-alpha.0",
4
+ "description": "Spectrum UI components in React",
5
+ "license": "Apache-2.0",
6
+ "main": "dist/main.js",
7
+ "module": "dist/module.js",
8
+ "types": "dist/types.d.ts",
9
+ "source": "src/index.ts",
10
+ "files": [
11
+ "dist",
12
+ "src"
13
+ ],
14
+ "sideEffects": [
15
+ "*.css"
16
+ ],
17
+ "targets": {
18
+ "main": {
19
+ "includeNodeModules": [
20
+ "@adobe/spectrum-css-temp"
21
+ ]
22
+ },
23
+ "module": {
24
+ "includeNodeModules": [
25
+ "@adobe/spectrum-css-temp"
26
+ ]
27
+ }
28
+ },
29
+ "repository": {
30
+ "type": "git",
31
+ "url": "https://github.com/adobe/react-spectrum"
32
+ },
33
+ "dependencies": {
34
+ "@babel/runtime": "^7.6.2",
35
+ "@internationalized/date": "3.0.0-alpha.0",
36
+ "@internationalized/number": "^3.0.2",
37
+ "@react-aria/datepicker": "3.0.0-alpha.0",
38
+ "@react-aria/focus": "^3.1.0",
39
+ "@react-aria/i18n": "^3.3.3",
40
+ "@react-aria/interactions": "^3.7.0",
41
+ "@react-aria/utils": "^3.10.0",
42
+ "@react-spectrum/button": "^3.1.0",
43
+ "@react-spectrum/calendar": "3.0.0-alpha.0",
44
+ "@react-spectrum/dialog": "^3.1.0",
45
+ "@react-spectrum/label": "^3.4.1",
46
+ "@react-spectrum/layout": "^3.2.1",
47
+ "@react-spectrum/utils": "^3.6.3",
48
+ "@react-spectrum/view": "^3.1.1",
49
+ "@react-stately/datepicker": "3.0.0-alpha.0",
50
+ "@react-stately/utils": "^3.3.0",
51
+ "@react-types/datepicker": "3.0.0-alpha.0",
52
+ "@react-types/shared": "^3.10.0",
53
+ "@spectrum-icons/ui": "^3.1.0",
54
+ "@spectrum-icons/workflow": "^3.1.0",
55
+ "date-fns": "^1.30.1"
56
+ },
57
+ "devDependencies": {
58
+ "@adobe/spectrum-css-temp": "3.0.0-alpha.1",
59
+ "@react-spectrum/test-utils": "3.0.0-alpha.1"
60
+ },
61
+ "peerDependencies": {
62
+ "@react-spectrum/provider": "^3.0.0",
63
+ "react": "^16.8.0 || ^17.0.0-rc.1",
64
+ "react-dom": "^16.8.0 || ^17.0.0-rc.1"
65
+ },
66
+ "publishConfig": {
67
+ "access": "public"
68
+ },
69
+ "gitHead": "896eabe5521a0349a675c4773ed7629addd4b8c4"
70
+ }
package/src/.DS_Store ADDED
Binary file
@@ -0,0 +1,83 @@
1
+ /*
2
+ * Copyright 2020 Adobe. All rights reserved.
3
+ * This file is licensed to you under the Apache License, Version 2.0 (the "License");
4
+ * you may not use this file except in compliance with the License. You may obtain a copy
5
+ * of the License at http://www.apache.org/licenses/LICENSE-2.0
6
+ *
7
+ * Unless required by applicable law or agreed to in writing, software distributed under
8
+ * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
9
+ * OF ANY KIND, either express or implied. See the License for the specific language
10
+ * governing permissions and limitations under the License.
11
+ */
12
+
13
+ import {classNames} from '@react-spectrum/utils';
14
+ import {createCalendar} from '@internationalized/date';
15
+ import {DatePickerSegment} from './DatePickerSegment';
16
+ import datepickerStyles from './index.css';
17
+ import {DateValue, SpectrumDatePickerProps} from '@react-types/datepicker';
18
+ import {Field} from '@react-spectrum/label';
19
+ import {Input} from './Input';
20
+ import React, {useRef} from 'react';
21
+ import {useDateField} from '@react-aria/datepicker';
22
+ import {useDatePickerFieldState} from '@react-stately/datepicker';
23
+ import {useFormatHelpText} from './utils';
24
+ import {useLocale} from '@react-aria/i18n';
25
+ import {useProviderProps} from '@react-spectrum/provider';
26
+
27
+ export function DateField<T extends DateValue>(props: SpectrumDatePickerProps<T>) {
28
+ props = useProviderProps(props);
29
+ let {
30
+ autoFocus,
31
+ isDisabled,
32
+ isReadOnly,
33
+ isRequired,
34
+ isQuiet
35
+ } = props;
36
+
37
+ let ref = useRef();
38
+ let {locale} = useLocale();
39
+ let state = useDatePickerFieldState({
40
+ ...props,
41
+ locale,
42
+ createCalendar
43
+ });
44
+
45
+ let {labelProps, fieldProps, descriptionProps, errorMessageProps} = useDateField(props, state, ref);
46
+
47
+ // Note: this description is intentionally not passed to useDatePicker.
48
+ // The format help text is unnecessary for screen reader users because each segment already has a label.
49
+ let description = useFormatHelpText(props);
50
+ if (description && !props.description) {
51
+ descriptionProps.id = null;
52
+ }
53
+
54
+ return (
55
+ <Field
56
+ {...props}
57
+ description={description}
58
+ labelProps={labelProps}
59
+ descriptionProps={descriptionProps}
60
+ errorMessageProps={errorMessageProps}
61
+ validationState={state.validationState}
62
+ UNSAFE_className={classNames(datepickerStyles, 'react-spectrum-Datepicker-fieldWrapper')}>
63
+ <Input
64
+ fieldProps={fieldProps}
65
+ isDisabled={isDisabled}
66
+ isQuiet={isQuiet}
67
+ autoFocus={autoFocus}
68
+ validationState={state.validationState}
69
+ inputRef={ref}
70
+ className={classNames(datepickerStyles, 'react-spectrum-DateField')}>
71
+ {state.segments.map((segment, i) =>
72
+ (<DatePickerSegment
73
+ key={i}
74
+ segment={segment}
75
+ state={state}
76
+ isDisabled={isDisabled}
77
+ isReadOnly={isReadOnly}
78
+ isRequired={isRequired} />)
79
+ )}
80
+ </Input>
81
+ </Field>
82
+ );
83
+ }
@@ -0,0 +1,181 @@
1
+ /*
2
+ * Copyright 2020 Adobe. All rights reserved.
3
+ * This file is licensed to you under the Apache License, Version 2.0 (the "License");
4
+ * you may not use this file except in compliance with the License. You may obtain a copy
5
+ * of the License at http://www.apache.org/licenses/LICENSE-2.0
6
+ *
7
+ * Unless required by applicable law or agreed to in writing, software distributed under
8
+ * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
9
+ * OF ANY KIND, either express or implied. See the License for the specific language
10
+ * governing permissions and limitations under the License.
11
+ */
12
+
13
+ import {Calendar} from '@react-spectrum/calendar';
14
+ import CalendarIcon from '@spectrum-icons/workflow/Calendar';
15
+ import {classNames} from '@react-spectrum/utils';
16
+ import {Content} from '@react-spectrum/view';
17
+ import {DatePickerField} from './DatePickerField';
18
+ import datepickerStyles from './index.css';
19
+ import {DateValue, SpectrumDatePickerProps} from '@react-types/datepicker';
20
+ import {Dialog, DialogTrigger} from '@react-spectrum/dialog';
21
+ import {Field} from '@react-spectrum/label';
22
+ import {FieldButton} from '@react-spectrum/button';
23
+ import {Input} from './Input';
24
+ import {mergeProps} from '@react-aria/utils';
25
+ import React, {useRef} from 'react';
26
+ import '@adobe/spectrum-css-temp/components/textfield/vars.css'; // HACK: must be included BEFORE inputgroup
27
+ import styles from '@adobe/spectrum-css-temp/components/inputgroup/vars.css';
28
+ import {TimeField} from './TimeField';
29
+ import {useDatePicker} from '@react-aria/datepicker';
30
+ import {useDatePickerState} from '@react-stately/datepicker';
31
+ import {useFocusRing} from '@react-aria/focus';
32
+ import {useFormatHelpText, useVisibleMonths} from './utils';
33
+ import {useHover} from '@react-aria/interactions';
34
+ import {useLocale} from '@react-aria/i18n';
35
+ import {useProviderProps} from '@react-spectrum/provider';
36
+
37
+ export function DatePicker<T extends DateValue>(props: SpectrumDatePickerProps<T>) {
38
+ props = useProviderProps(props);
39
+ let {
40
+ autoFocus,
41
+ isQuiet,
42
+ isDisabled,
43
+ isReadOnly,
44
+ isRequired,
45
+ placeholderValue,
46
+ maxVisibleMonths = 1
47
+ } = props;
48
+ let {hoverProps, isHovered} = useHover({isDisabled});
49
+ let targetRef = useRef<HTMLDivElement>();
50
+ let state = useDatePickerState(props);
51
+ let {groupProps, labelProps, fieldProps, descriptionProps, errorMessageProps, buttonProps, dialogProps} = useDatePicker(props, state, targetRef);
52
+ let {value, setValue, isOpen, setOpen} = state;
53
+ let {direction} = useLocale();
54
+
55
+ let {isFocused, isFocusVisible, focusProps} = useFocusRing({
56
+ within: true,
57
+ isTextInput: true,
58
+ autoFocus
59
+ });
60
+
61
+ let className = classNames(
62
+ styles,
63
+ 'spectrum-InputGroup',
64
+ {
65
+ 'spectrum-InputGroup--quiet': isQuiet,
66
+ 'spectrum-InputGroup--invalid': state.validationState === 'invalid',
67
+ 'is-disabled': isDisabled,
68
+ 'is-hovered': isHovered,
69
+ 'is-focused': isFocused,
70
+ 'focus-ring': isFocusVisible
71
+ }
72
+ );
73
+
74
+ let fieldClassName = classNames(
75
+ styles,
76
+ 'spectrum-InputGroup-input',
77
+ {
78
+ 'is-disabled': isDisabled,
79
+ 'is-invalid': state.validationState === 'invalid'
80
+ }
81
+ );
82
+
83
+ // Note: this description is intentionally not passed to useDatePicker.
84
+ // The format help text is unnecessary for screen reader users because each segment already has a label.
85
+ let description = useFormatHelpText(props);
86
+ if (description && !props.description) {
87
+ descriptionProps.id = null;
88
+ }
89
+
90
+ let placeholder: DateValue = placeholderValue;
91
+ let timePlaceholder = placeholder && 'hour' in placeholder ? placeholder : null;
92
+ let timeMinValue = props.minValue && 'hour' in props.minValue ? props.minValue : null;
93
+ let timeMaxValue = props.maxValue && 'hour' in props.maxValue ? props.maxValue : null;
94
+ let timeGranularity = state.granularity === 'hour' || state.granularity === 'minute' || state.granularity === 'second' || state.granularity === 'millisecond' ? state.granularity : null;
95
+ let showTimeField = !!timeGranularity;
96
+
97
+ let visibleMonths = useVisibleMonths(maxVisibleMonths);
98
+
99
+ return (
100
+ <Field
101
+ {...props}
102
+ ref={targetRef}
103
+ description={description}
104
+ labelProps={labelProps}
105
+ descriptionProps={descriptionProps}
106
+ errorMessageProps={errorMessageProps}
107
+ validationState={state.validationState}
108
+ UNSAFE_className={classNames(datepickerStyles, 'react-spectrum-Datepicker-fieldWrapper')}>
109
+ <div
110
+ {...mergeProps(groupProps, hoverProps, focusProps)}
111
+ className={className}>
112
+ <Input
113
+ isDisabled={isDisabled}
114
+ isQuiet={isQuiet}
115
+ validationState={state.validationState}
116
+ autoFocus={autoFocus}
117
+ className={classNames(styles, 'spectrum-InputGroup-field')}
118
+ inputClassName={fieldClassName}>
119
+ <DatePickerField
120
+ {...fieldProps}
121
+ data-testid="date-field"
122
+ isQuiet={isQuiet}
123
+ validationState={state.validationState}
124
+ value={value}
125
+ onChange={setValue}
126
+ placeholderValue={placeholderValue}
127
+ isDisabled={isDisabled}
128
+ isReadOnly={isReadOnly}
129
+ isRequired={isRequired}
130
+ granularity={props.granularity}
131
+ hourCycle={props.hourCycle}
132
+ inputClassName={fieldClassName}
133
+ hideTimeZone={props.hideTimeZone} />
134
+ </Input>
135
+ <DialogTrigger
136
+ type="popover"
137
+ mobileType="tray"
138
+ placement={direction === 'rtl' ? 'bottom right' : 'bottom left'}
139
+ targetRef={targetRef}
140
+ hideArrow
141
+ isOpen={isOpen}
142
+ onOpenChange={setOpen}>
143
+ <FieldButton
144
+ {...buttonProps}
145
+ UNSAFE_className={classNames(styles, 'spectrum-FieldButton')}
146
+ isQuiet={isQuiet}
147
+ validationState={state.validationState}
148
+ isDisabled={isDisabled || isReadOnly}>
149
+ <CalendarIcon />
150
+ </FieldButton>
151
+ <Dialog UNSAFE_className={classNames(datepickerStyles, 'react-spectrum-Datepicker-dialog')} {...dialogProps}>
152
+ <Content UNSAFE_className={classNames(datepickerStyles, 'react-spectrum-Datepicker-dialogContent')}>
153
+ <Calendar
154
+ autoFocus
155
+ value={state.dateValue}
156
+ onChange={state.setDateValue}
157
+ visibleMonths={visibleMonths}
158
+ minValue={props.minValue}
159
+ maxValue={props.maxValue} />
160
+ {showTimeField &&
161
+ <div className={classNames(datepickerStyles, 'react-spectrum-Datepicker-timeFields')}>
162
+ <TimeField
163
+ label="Time"
164
+ value={state.timeValue}
165
+ onChange={state.setTimeValue}
166
+ placeholderValue={timePlaceholder}
167
+ granularity={timeGranularity}
168
+ minValue={timeMinValue}
169
+ maxValue={timeMaxValue}
170
+ hourCycle={props.hourCycle}
171
+ hideTimeZone={props.hideTimeZone}
172
+ marginTop="size-100" />
173
+ </div>
174
+ }
175
+ </Content>
176
+ </Dialog>
177
+ </DialogTrigger>
178
+ </div>
179
+ </Field>
180
+ );
181
+ }
@@ -0,0 +1,59 @@
1
+ /*
2
+ * Copyright 2020 Adobe. All rights reserved.
3
+ * This file is licensed to you under the Apache License, Version 2.0 (the "License");
4
+ * you may not use this file except in compliance with the License. You may obtain a copy
5
+ * of the License at http://www.apache.org/licenses/LICENSE-2.0
6
+ *
7
+ * Unless required by applicable law or agreed to in writing, software distributed under
8
+ * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
9
+ * OF ANY KIND, either express or implied. See the License for the specific language
10
+ * governing permissions and limitations under the License.
11
+ */
12
+
13
+ import {classNames} from '@react-spectrum/utils';
14
+ import {createCalendar} from '@internationalized/date';
15
+ import {DatePickerSegment} from './DatePickerSegment';
16
+ import datepickerStyles from './index.css';
17
+ import {DateValue, SpectrumDatePickerProps} from '@react-types/datepicker';
18
+ import React, {useRef} from 'react';
19
+ import {useDateField} from '@react-aria/datepicker';
20
+ import {useDatePickerFieldState} from '@react-stately/datepicker';
21
+ import {useLocale} from '@react-aria/i18n';
22
+
23
+ interface DatePickerFieldProps<T extends DateValue> extends SpectrumDatePickerProps<T> {
24
+ inputClassName?: string,
25
+ hideValidationIcon?: boolean,
26
+ maxGranularity?: SpectrumDatePickerProps<T>['granularity']
27
+ }
28
+
29
+ export function DatePickerField<T extends DateValue>(props: DatePickerFieldProps<T>) {
30
+ let {
31
+ isDisabled,
32
+ isReadOnly,
33
+ isRequired,
34
+ inputClassName
35
+ } = props;
36
+ let ref = useRef();
37
+ let {locale} = useLocale();
38
+ let state = useDatePickerFieldState({
39
+ ...props,
40
+ locale,
41
+ createCalendar
42
+ });
43
+
44
+ let {fieldProps} = useDateField(props, state, ref);
45
+
46
+ return (
47
+ <div {...fieldProps} className={classNames(datepickerStyles, 'react-spectrum-Datepicker-segments', inputClassName)} ref={ref}>
48
+ {state.segments.map((segment, i) =>
49
+ (<DatePickerSegment
50
+ key={i}
51
+ segment={segment}
52
+ state={state}
53
+ isDisabled={isDisabled}
54
+ isReadOnly={isReadOnly}
55
+ isRequired={isRequired} />)
56
+ )}
57
+ </div>
58
+ );
59
+ }