@react-spectrum/datepicker 3.0.0-alpha.2 → 3.0.0-alpha.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/module.js CHANGED
@@ -1,783 +1,835 @@
1
- import { Flex } from "@react-spectrum/layout";
2
- import { useProviderProps, useProvider } from "@react-spectrum/provider";
3
- import { mergeProps, useEvent, useLayoutEffect, useResizeObserver } from "@react-aria/utils";
4
- import _spectrumIconsUiCheckmarkMedium from "@spectrum-icons/ui/CheckmarkMedium";
5
- import _spectrumIconsUiAlertMedium from "@spectrum-icons/ui/AlertMedium";
6
- import { FieldButton } from "@react-spectrum/button";
7
- import { Field } from "@react-spectrum/label";
8
- import { Dialog, DialogTrigger } from "@react-spectrum/dialog";
9
- import { useDatePickerFieldState, useTimeFieldState, useDatePickerState, useDateRangePickerState } from "@react-stately/datepicker";
10
- import { usePress, useHover } from "@react-aria/interactions";
11
- import { useLocale, useDateFormatter } from "@react-aria/i18n";
12
- import { useFocusManager, FocusRing, FocusScope, useFocusRing } from "@react-aria/focus";
13
- import { useDateSegment, useDateField, useDatePicker, useDisplayNames, useDateRangePicker } from "@react-aria/datepicker";
14
- import _react, { useMemo, useRef, useCallback, useState } from "react";
15
- import { NumberParser } from "@internationalized/number";
16
- import _babelRuntimeHelpersEsmObjectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
17
- import { createCalendar } from "@internationalized/date";
18
- import { Content } from "@react-spectrum/view";
19
- import { classNames, useValueEffect, useStyleProps } from "@react-spectrum/utils";
20
- import _spectrumIconsWorkflowCalendar from "@spectrum-icons/workflow/Calendar";
21
- import { Calendar, RangeCalendar } from "@react-spectrum/calendar";
22
- import _babelRuntimeHelpersEsmExtends from "@babel/runtime/helpers/esm/extends";
23
1
  import "./main.css";
2
+ import {Calendar as $aayOp$Calendar, RangeCalendar as $aayOp$RangeCalendar} from "@react-spectrum/calendar";
3
+ import $aayOp$spectrumiconsworkflowCalendar from "@spectrum-icons/workflow/Calendar";
4
+ import {classNames as $aayOp$classNames, useValueEffect as $aayOp$useValueEffect, useStyleProps as $aayOp$useStyleProps} from "@react-spectrum/utils";
5
+ import {Content as $aayOp$Content} from "@react-spectrum/view";
6
+ import {DialogTrigger as $aayOp$DialogTrigger, Dialog as $aayOp$Dialog} from "@react-spectrum/dialog";
7
+ import {Field as $aayOp$Field} from "@react-spectrum/label";
8
+ import {FieldButton as $aayOp$FieldButton} from "@react-spectrum/button";
9
+ import {mergeProps as $aayOp$mergeProps, useLayoutEffect as $aayOp$useLayoutEffect, useResizeObserver as $aayOp$useResizeObserver, useEvent as $aayOp$useEvent} from "@react-aria/utils";
10
+ import $aayOp$react, {useRef as $aayOp$useRef, useMemo as $aayOp$useMemo, useCallback as $aayOp$useCallback, useState as $aayOp$useState} from "react";
11
+ import {useDatePicker as $aayOp$useDatePicker, useDateField as $aayOp$useDateField, useDateSegment as $aayOp$useDateSegment, useTimeField as $aayOp$useTimeField, useDisplayNames as $aayOp$useDisplayNames, useDateRangePicker as $aayOp$useDateRangePicker} from "@react-aria/datepicker";
12
+ import {useDatePickerState as $aayOp$useDatePickerState, useDateFieldState as $aayOp$useDateFieldState, useTimeFieldState as $aayOp$useTimeFieldState, useDateRangePickerState as $aayOp$useDateRangePickerState} from "@react-stately/datepicker";
13
+ import {useFocusRing as $aayOp$useFocusRing, FocusRing as $aayOp$FocusRing} from "@react-aria/focus";
14
+ import {useHover as $aayOp$useHover} from "@react-aria/interactions";
15
+ import {useLocale as $aayOp$useLocale, useDateFormatter as $aayOp$useDateFormatter} from "@react-aria/i18n";
16
+ import {useProviderProps as $aayOp$useProviderProps, useProvider as $aayOp$useProvider} from "@react-spectrum/provider";
17
+ import {createCalendar as $aayOp$createCalendar} from "@internationalized/date";
18
+ import {NumberParser as $aayOp$NumberParser} from "@internationalized/number";
19
+ import $aayOp$spectrumiconsuiAlertMedium from "@spectrum-icons/ui/AlertMedium";
20
+ import $aayOp$spectrumiconsuiCheckmarkMedium from "@spectrum-icons/ui/CheckmarkMedium";
21
+ import {Flex as $aayOp$Flex} from "@react-spectrum/layout";
24
22
 
25
23
  function $parcel$interopDefault(a) {
26
24
  return a && a.__esModule ? a.default : a;
27
25
  }
28
-
29
- // ASSET: /Users/govett/Downloads/react-spectrum-release/packages/@react-spectrum/datepicker/src/index.css
30
- var $fc5c1aaa653a82d8278e64c777eca$exports = {};
31
- $fc5c1aaa653a82d8278e64c777eca$exports = {
32
- "react-spectrum-Datepicker-fieldWrapper": "_react-spectrum-Datepicker-fieldWrapper_32c20",
33
- "react-spectrum-Datepicker-startField": "_react-spectrum-Datepicker-startField_32c20",
34
- "react-spectrum-Datepicker-endField": "_react-spectrum-Datepicker-endField_32c20",
35
- "react-spectrum-Datepicker-field": "_react-spectrum-Datepicker-field_32c20",
36
- "react-spectrum-Datepicker-input": "_react-spectrum-Datepicker-input_32c20",
37
- "react-spectrum-DateField": "_react-spectrum-DateField_32c20",
38
- "react-spectrum-TimeField": "_react-spectrum-TimeField_32c20",
39
- "react-spectrum-TimeField-fieldWrapper": "_react-spectrum-TimeField-fieldWrapper_32c20",
40
- "react-spectrum-Datepicker-inputContents": "_react-spectrum-Datepicker-inputContents_32c20",
41
- "react-spectrum-Datepicker-rangeDash": "_react-spectrum-Datepicker-rangeDash_32c20",
42
- "react-spectrum-Datepicker-segments": "_react-spectrum-Datepicker-segments_32c20",
43
- "react-spectrum-Datepicker-literal": "_react-spectrum-Datepicker-literal_32c20",
44
- "react-spectrum-DatePicker-cell": "_react-spectrum-DatePicker-cell_32c20",
45
- "is-placeholder": "_is-placeholder_32c20",
46
- "is-read-only": "_is-read-only_32c20",
47
- "react-spectrum-Datepicker-dialog": "_react-spectrum-Datepicker-dialog_32c20",
48
- "react-spectrum-Datepicker-dialogContent": "_react-spectrum-Datepicker-dialogContent_32c20",
49
- "react-spectrum-Datepicker-timeFields": "_react-spectrum-Datepicker-timeFields_32c20"
50
- };
51
-
52
- function $d90fc87ed39803c47c775d8a63e9b3ac$export$DatePickerSegment(_ref) {
53
- let {
54
- segment,
55
- state
56
- } = _ref,
57
- otherProps = _babelRuntimeHelpersEsmObjectWithoutPropertiesLoose(_ref, ["segment", "state"]);
58
-
59
- switch (segment.type) {
60
- // A separator, e.g. punctuation
61
- case 'literal':
62
- return /*#__PURE__*/_react.createElement($d90fc87ed39803c47c775d8a63e9b3ac$var$LiteralSegment, {
63
- segment: segment
64
- });
65
- // Editable segment
66
-
67
- default:
68
- return /*#__PURE__*/_react.createElement($d90fc87ed39803c47c775d8a63e9b3ac$var$EditableSegment, _babelRuntimeHelpersEsmExtends({
69
- segment: segment,
70
- state: state
71
- }, otherProps));
72
- }
26
+ function $parcel$export(e, n, v, s) {
27
+ Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
73
28
  }
74
-
75
- var $fc5c1aaa653a82d8278e64c777eca$$interop$default = $parcel$interopDefault($fc5c1aaa653a82d8278e64c777eca$exports);
76
-
77
- function $d90fc87ed39803c47c775d8a63e9b3ac$var$LiteralSegment(_ref2) {
78
- let {
79
- segment
80
- } = _ref2;
81
- let focusManager = useFocusManager();
82
- let {
83
- pressProps
84
- } = usePress({
85
- onPressStart: e => {
86
- if (e.pointerType === 'mouse') {
87
- let res = focusManager.focusNext({
88
- from: e.target
89
- });
90
-
91
- if (!res) {
92
- focusManager.focusPrevious({
93
- from: e.target
94
- });
95
- }
96
- }
29
+ var $beaeefa091999363$exports = {};
30
+
31
+ $parcel$export($beaeefa091999363$exports, "DatePicker", () => $beaeefa091999363$export$5109c6dd95d8fb00);
32
+
33
+
34
+
35
+
36
+
37
+
38
+
39
+
40
+
41
+ var $8e15de0211b274e3$exports = {};
42
+
43
+ $parcel$export($8e15de0211b274e3$exports, "react-spectrum-Datepicker-fieldWrapper", () => $8e15de0211b274e3$export$48501287c6ce4708, (v) => $8e15de0211b274e3$export$48501287c6ce4708 = v);
44
+ $parcel$export($8e15de0211b274e3$exports, "react-spectrum-Datepicker-startField", () => $8e15de0211b274e3$export$eec05853f5fc7ef8, (v) => $8e15de0211b274e3$export$eec05853f5fc7ef8 = v);
45
+ $parcel$export($8e15de0211b274e3$exports, "react-spectrum-Datepicker-endField", () => $8e15de0211b274e3$export$b41789438b49c852, (v) => $8e15de0211b274e3$export$b41789438b49c852 = v);
46
+ $parcel$export($8e15de0211b274e3$exports, "react-spectrum-Datepicker-field", () => $8e15de0211b274e3$export$8cbece9fb909350d, (v) => $8e15de0211b274e3$export$8cbece9fb909350d = v);
47
+ $parcel$export($8e15de0211b274e3$exports, "react-spectrum-Datepicker-input", () => $8e15de0211b274e3$export$4cdb39b006dc840a, (v) => $8e15de0211b274e3$export$4cdb39b006dc840a = v);
48
+ $parcel$export($8e15de0211b274e3$exports, "react-spectrum-DateField", () => $8e15de0211b274e3$export$c96d01b692101b8a, (v) => $8e15de0211b274e3$export$c96d01b692101b8a = v);
49
+ $parcel$export($8e15de0211b274e3$exports, "react-spectrum-TimeField", () => $8e15de0211b274e3$export$61c201f1ba261729, (v) => $8e15de0211b274e3$export$61c201f1ba261729 = v);
50
+ $parcel$export($8e15de0211b274e3$exports, "react-spectrum-TimeField-fieldWrapper", () => $8e15de0211b274e3$export$3008240fa163ee96, (v) => $8e15de0211b274e3$export$3008240fa163ee96 = v);
51
+ $parcel$export($8e15de0211b274e3$exports, "react-spectrum-Datepicker-inputContents", () => $8e15de0211b274e3$export$609545772ae0466a, (v) => $8e15de0211b274e3$export$609545772ae0466a = v);
52
+ $parcel$export($8e15de0211b274e3$exports, "react-spectrum-Datepicker-rangeDash", () => $8e15de0211b274e3$export$1ae39afd2cf49425, (v) => $8e15de0211b274e3$export$1ae39afd2cf49425 = v);
53
+ $parcel$export($8e15de0211b274e3$exports, "react-spectrum-Datepicker-segments", () => $8e15de0211b274e3$export$b9c34f0306ac2ffc, (v) => $8e15de0211b274e3$export$b9c34f0306ac2ffc = v);
54
+ $parcel$export($8e15de0211b274e3$exports, "react-spectrum-Datepicker-literal", () => $8e15de0211b274e3$export$24a265734c16a355, (v) => $8e15de0211b274e3$export$24a265734c16a355 = v);
55
+ $parcel$export($8e15de0211b274e3$exports, "react-spectrum-DatePicker-cell", () => $8e15de0211b274e3$export$947f5cb8a73639a4, (v) => $8e15de0211b274e3$export$947f5cb8a73639a4 = v);
56
+ $parcel$export($8e15de0211b274e3$exports, "is-placeholder", () => $8e15de0211b274e3$export$e5b2f5233e4e5194, (v) => $8e15de0211b274e3$export$e5b2f5233e4e5194 = v);
57
+ $parcel$export($8e15de0211b274e3$exports, "is-read-only", () => $8e15de0211b274e3$export$dddce3ae23a6e3ea, (v) => $8e15de0211b274e3$export$dddce3ae23a6e3ea = v);
58
+ $parcel$export($8e15de0211b274e3$exports, "react-spectrum-Datepicker-dialog", () => $8e15de0211b274e3$export$7c3cb625bb792356, (v) => $8e15de0211b274e3$export$7c3cb625bb792356 = v);
59
+ $parcel$export($8e15de0211b274e3$exports, "react-spectrum-Datepicker-dialogContent", () => $8e15de0211b274e3$export$94c97d6b6a927921, (v) => $8e15de0211b274e3$export$94c97d6b6a927921 = v);
60
+ $parcel$export($8e15de0211b274e3$exports, "react-spectrum-Datepicker-timeFields", () => $8e15de0211b274e3$export$8d47712a13573e39, (v) => $8e15de0211b274e3$export$8d47712a13573e39 = v);
61
+ var $8e15de0211b274e3$export$48501287c6ce4708;
62
+ var $8e15de0211b274e3$export$eec05853f5fc7ef8;
63
+ var $8e15de0211b274e3$export$b41789438b49c852;
64
+ var $8e15de0211b274e3$export$8cbece9fb909350d;
65
+ var $8e15de0211b274e3$export$4cdb39b006dc840a;
66
+ var $8e15de0211b274e3$export$c96d01b692101b8a;
67
+ var $8e15de0211b274e3$export$61c201f1ba261729;
68
+ var $8e15de0211b274e3$export$3008240fa163ee96;
69
+ var $8e15de0211b274e3$export$609545772ae0466a;
70
+ var $8e15de0211b274e3$export$1ae39afd2cf49425;
71
+ var $8e15de0211b274e3$export$b9c34f0306ac2ffc;
72
+ var $8e15de0211b274e3$export$24a265734c16a355;
73
+ var $8e15de0211b274e3$export$947f5cb8a73639a4;
74
+ var $8e15de0211b274e3$export$e5b2f5233e4e5194;
75
+ var $8e15de0211b274e3$export$dddce3ae23a6e3ea;
76
+ var $8e15de0211b274e3$export$7c3cb625bb792356;
77
+ var $8e15de0211b274e3$export$94c97d6b6a927921;
78
+ var $8e15de0211b274e3$export$8d47712a13573e39;
79
+ $8e15de0211b274e3$export$48501287c6ce4708 = "react-spectrum-Datepicker-fieldWrapper_0b973d";
80
+ $8e15de0211b274e3$export$eec05853f5fc7ef8 = "react-spectrum-Datepicker-startField_0b973d";
81
+ $8e15de0211b274e3$export$b41789438b49c852 = "react-spectrum-Datepicker-endField_0b973d";
82
+ $8e15de0211b274e3$export$8cbece9fb909350d = "react-spectrum-Datepicker-field_0b973d";
83
+ $8e15de0211b274e3$export$4cdb39b006dc840a = "react-spectrum-Datepicker-input_0b973d";
84
+ $8e15de0211b274e3$export$c96d01b692101b8a = "react-spectrum-DateField_0b973d";
85
+ $8e15de0211b274e3$export$61c201f1ba261729 = "react-spectrum-TimeField_0b973d";
86
+ $8e15de0211b274e3$export$3008240fa163ee96 = "react-spectrum-TimeField-fieldWrapper_0b973d";
87
+ $8e15de0211b274e3$export$609545772ae0466a = "react-spectrum-Datepicker-inputContents_0b973d";
88
+ $8e15de0211b274e3$export$1ae39afd2cf49425 = "react-spectrum-Datepicker-rangeDash_0b973d";
89
+ $8e15de0211b274e3$export$b9c34f0306ac2ffc = "react-spectrum-Datepicker-segments_0b973d";
90
+ $8e15de0211b274e3$export$24a265734c16a355 = "react-spectrum-Datepicker-literal_0b973d";
91
+ $8e15de0211b274e3$export$947f5cb8a73639a4 = "react-spectrum-DatePicker-cell_0b973d";
92
+ $8e15de0211b274e3$export$e5b2f5233e4e5194 = "is-placeholder_0b973d";
93
+ $8e15de0211b274e3$export$dddce3ae23a6e3ea = "is-read-only_0b973d";
94
+ $8e15de0211b274e3$export$7c3cb625bb792356 = "react-spectrum-Datepicker-dialog_0b973d";
95
+ $8e15de0211b274e3$export$94c97d6b6a927921 = "react-spectrum-Datepicker-dialogContent_0b973d";
96
+ $8e15de0211b274e3$export$8d47712a13573e39 = "react-spectrum-Datepicker-timeFields_0b973d";
97
+
98
+
99
+
100
+
101
+ function $cfa347761f172638$export$6388987c5223b54e({ segment: segment , state: state , ...otherProps }) {
102
+ switch(segment.type){
103
+ // A separator, e.g. punctuation
104
+ case 'literal':
105
+ return(/*#__PURE__*/ $aayOp$react.createElement($cfa347761f172638$var$LiteralSegment, {
106
+ segment: segment
107
+ }));
108
+ // Editable segment
109
+ default:
110
+ return(/*#__PURE__*/ $aayOp$react.createElement($cfa347761f172638$var$EditableSegment, {
111
+ segment: segment,
112
+ state: state,
113
+ ...otherProps
114
+ }));
97
115
  }
98
- });
99
- return /*#__PURE__*/_react.createElement("span", _babelRuntimeHelpersEsmExtends({
100
- "aria-hidden": "true",
101
- className: classNames($fc5c1aaa653a82d8278e64c777eca$$interop$default, 'react-spectrum-Datepicker-literal')
102
- }, pressProps), segment.text);
103
116
  }
104
-
105
- function $d90fc87ed39803c47c775d8a63e9b3ac$var$EditableSegment(_ref3) {
106
- let {
107
- segment,
108
- state
109
- } = _ref3,
110
- otherProps = _babelRuntimeHelpersEsmObjectWithoutPropertiesLoose(_ref3, ["segment", "state"]);
111
-
112
- let ref = useRef();
113
- let {
114
- segmentProps
115
- } = useDateSegment(otherProps, segment, state, ref);
116
- let {
117
- locale
118
- } = useLocale();
119
- let parser = useMemo(() => new NumberParser(locale), [locale]);
120
- let isNumeric = useMemo(() => parser.isValidPartialNumber(segment.text), [segment.text, parser]);
121
- return /*#__PURE__*/_react.createElement("div", _babelRuntimeHelpersEsmExtends({
122
- ref: ref,
123
- className: classNames($fc5c1aaa653a82d8278e64c777eca$$interop$default, 'react-spectrum-DatePicker-cell', {
124
- 'is-placeholder': segment.isPlaceholder,
125
- 'is-read-only': !segment.isEditable
126
- }),
127
- style: {
128
- minWidth: !isNumeric ? null : String(segment.maxValue).length + 'ch'
129
- }
130
- }, segmentProps), segment.isPlaceholder ? '' : segment.text);
117
+ function $cfa347761f172638$var$LiteralSegment({ segment: segment }) {
118
+ return(/*#__PURE__*/ $aayOp$react.createElement("span", {
119
+ "aria-hidden": "true",
120
+ className: $aayOp$classNames((/*@__PURE__*/$parcel$interopDefault($8e15de0211b274e3$exports)), 'react-spectrum-Datepicker-literal'),
121
+ "data-testid": segment.type === 'literal' ? undefined : segment.type
122
+ }, segment.text));
131
123
  }
124
+ function $cfa347761f172638$var$EditableSegment({ segment: segment , state: state }) {
125
+ let ref = $aayOp$useRef();
126
+ let { segmentProps: segmentProps } = $aayOp$useDateSegment(segment, state, ref);
127
+ let { locale: locale } = $aayOp$useLocale();
128
+ let parser = $aayOp$useMemo(()=>new $aayOp$NumberParser(locale)
129
+ , [
130
+ locale
131
+ ]);
132
+ let isNumeric = $aayOp$useMemo(()=>parser.isValidPartialNumber(segment.text)
133
+ , [
134
+ segment.text,
135
+ parser
136
+ ]);
137
+ return(/*#__PURE__*/ $aayOp$react.createElement("div", {
138
+ ...segmentProps,
139
+ ref: ref,
140
+ className: $aayOp$classNames((/*@__PURE__*/$parcel$interopDefault($8e15de0211b274e3$exports)), 'react-spectrum-DatePicker-cell', {
141
+ 'is-placeholder': segment.isPlaceholder,
142
+ 'is-read-only': !segment.isEditable
143
+ }),
144
+ style: {
145
+ ...segmentProps.style,
146
+ minWidth: !isNumeric ? null : String(segment.maxValue).length + 'ch'
147
+ },
148
+ "data-testid": segment.type
149
+ }, segment.isPlaceholder ? '' : segment.text));
150
+ }
151
+
152
+
132
153
 
133
- function $f89a664b25735c9291b8addecfd59013$export$DatePickerField(props) {
134
- let {
135
- isDisabled,
136
- isReadOnly,
137
- isRequired,
138
- inputClassName
139
- } = props;
140
- let ref = useRef();
141
- let {
142
- locale
143
- } = useLocale();
144
- let state = useDatePickerFieldState(_babelRuntimeHelpersEsmExtends({}, props, {
145
- locale,
146
- createCalendar
147
- }));
148
- let {
149
- fieldProps
150
- } = useDateField(props, state, ref);
151
- return /*#__PURE__*/_react.createElement("div", _babelRuntimeHelpersEsmExtends({}, fieldProps, {
152
- className: classNames($fc5c1aaa653a82d8278e64c777eca$$interop$default, 'react-spectrum-Datepicker-segments', inputClassName),
153
- ref: ref
154
- }), state.segments.map((segment, i) => /*#__PURE__*/_react.createElement($d90fc87ed39803c47c775d8a63e9b3ac$export$DatePickerSegment, {
155
- key: i,
156
- segment: segment,
157
- state: state,
158
- isDisabled: isDisabled,
159
- isReadOnly: isReadOnly,
160
- isRequired: isRequired
161
- })));
154
+
155
+
156
+
157
+
158
+ function $d2bb88c82604b25f$export$34dc4cfa15ead1(props) {
159
+ let { isDisabled: isDisabled , isReadOnly: isReadOnly , isRequired: isRequired , inputClassName: inputClassName } = props;
160
+ let ref = $aayOp$useRef();
161
+ let { locale: locale } = $aayOp$useLocale();
162
+ let state = $aayOp$useDateFieldState({
163
+ ...props,
164
+ locale: locale,
165
+ createCalendar: $aayOp$createCalendar
166
+ });
167
+ let { fieldProps: fieldProps } = $aayOp$useDateField(props, state, ref);
168
+ return(/*#__PURE__*/ $aayOp$react.createElement("div", {
169
+ ...fieldProps,
170
+ "data-testid": props['data-testid'],
171
+ className: $aayOp$classNames((/*@__PURE__*/$parcel$interopDefault($8e15de0211b274e3$exports)), 'react-spectrum-Datepicker-segments', inputClassName),
172
+ ref: ref
173
+ }, state.segments.map((segment, i)=>/*#__PURE__*/ $aayOp$react.createElement($cfa347761f172638$export$6388987c5223b54e, {
174
+ key: i,
175
+ segment: segment,
176
+ state: state,
177
+ isDisabled: isDisabled,
178
+ isReadOnly: isReadOnly,
179
+ isRequired: isRequired
180
+ })
181
+ )));
162
182
  }
163
183
 
164
- // ASSET: /Users/govett/Downloads/react-spectrum-release/node_modules/@adobe/spectrum-css-temp/components/textfield/vars.css
165
- var $aa1c742e7a2a16aa7981ca9e2f4a89$exports = {};
166
- $aa1c742e7a2a16aa7981ca9e2f4a89$exports = {
167
- "spectrum-Textfield": "_spectrum-Textfield_d5778",
168
- "spectrum-Textfield--quiet": "_spectrum-Textfield--quiet_d5778",
169
- "spectrum-Textfield--multiline": "_spectrum-Textfield--multiline_d5778",
170
- "spectrum-Textfield-input": "_spectrum-Textfield-input_d5778",
171
- "is-placeholder": "_is-placeholder_d5778",
172
- "is-hovered": "_is-hovered_d5778",
173
- "spectrum-Textfield--valid": "_spectrum-Textfield--valid_d5778",
174
- "spectrum-Textfield--invalid": "_spectrum-Textfield--invalid_d5778",
175
- "spectrum-Textfield--loadable": "_spectrum-Textfield--loadable_d5778",
176
- "spectrum-Textfield-validationIcon": "_spectrum-Textfield-validationIcon_d5778",
177
- "spectrum-Textfield-icon": "_spectrum-Textfield-icon_d5778",
178
- "spectrum-Textfield-inputIcon": "_spectrum-Textfield-inputIcon_d5778",
179
- "spectrum-Textfield-circleLoader": "_spectrum-Textfield-circleLoader_d5778",
180
- "is-focused": "_is-focused_d5778",
181
- "focus-ring": "_focus-ring_d5778",
182
- "is-disabled": "_is-disabled_d5778"
183
- };
184
- var $aa1c742e7a2a16aa7981ca9e2f4a89$$interop$default = $parcel$interopDefault($aa1c742e7a2a16aa7981ca9e2f4a89$exports);
185
-
186
- function $f7a3dc9c77601846b3cceddb1f68b1a$export$Input(props) {
187
- let defaultRef = useRef();
188
- let {
189
- isDisabled,
190
- isQuiet,
191
- inputClassName,
192
- validationState,
193
- children,
194
- fieldProps,
195
- inputRef = defaultRef,
196
- className,
197
- autoFocus,
198
- style
199
- } = props; // Reserve padding for the error icon when the width of the input is unconstrained.
200
- // When constrained, don't reserve space because adding it only when invalid will
201
- // not cause a layout shift.
202
-
203
- let [reservePadding, setReservePadding] = useValueEffect(false);
204
- let onResize = useCallback(() => setReservePadding(function* (reservePadding) {
205
- if (reservePadding) {
206
- // Try to collapse padding if the content is clipped.
207
- if (inputRef.current.scrollWidth > inputRef.current.offsetWidth) {
208
- let width = inputRef.current.parentElement.offsetWidth;
209
- yield false; // If removing padding causes a layout shift, add it back.
210
-
211
- if (inputRef.current.parentElement.offsetWidth !== width) {
212
- yield true;
213
- }
214
- }
215
- } else {
216
- // Try to add padding if the content is not clipped.
217
- if (inputRef.current.offsetWidth >= inputRef.current.scrollWidth) {
218
- let width = inputRef.current.parentElement.offsetWidth;
219
- yield true; // If adding padding does not change the width (i.e. width is constrained), remove it again.
220
-
221
- if (inputRef.current.parentElement.offsetWidth === width) {
222
- yield false;
223
- }
224
- }
225
- }
226
- }), [inputRef, setReservePadding]);
227
- useLayoutEffect(onResize, [onResize]);
228
- useResizeObserver({
229
- ref: inputRef,
230
- onResize
231
- }); // We also need to listen for resize events of the window so we can detect
232
- // when there is enough space for the padding to be re-added. Ideally we'd
233
- // use a resize observer on a parent element, but it's hard to know _what_
234
- // parent element.
235
-
236
- useEvent(useRef(window), 'resize', onResize);
237
- let isInvalid = validationState === 'invalid';
238
- let textfieldClass = classNames($aa1c742e7a2a16aa7981ca9e2f4a89$$interop$default, 'spectrum-Textfield', {
239
- 'spectrum-Textfield--invalid': isInvalid,
240
- 'spectrum-Textfield--valid': validationState === 'valid',
241
- 'spectrum-Textfield--quiet': isQuiet
242
- }, classNames($fc5c1aaa653a82d8278e64c777eca$$interop$default, 'react-spectrum-Datepicker-field'), className);
243
- let inputClass = classNames($aa1c742e7a2a16aa7981ca9e2f4a89$$interop$default, 'spectrum-Textfield-input', {
244
- 'is-disabled': isDisabled,
245
- 'is-invalid': isInvalid
246
- }, reservePadding && classNames($fc5c1aaa653a82d8278e64c777eca$$interop$default, 'react-spectrum-Datepicker-input'), inputClassName);
247
- let iconClass = classNames($aa1c742e7a2a16aa7981ca9e2f4a89$$interop$default, 'spectrum-Textfield-validationIcon');
248
- let validationIcon = null;
249
-
250
- if (validationState === 'invalid') {
251
- validationIcon = /*#__PURE__*/_react.createElement(_spectrumIconsUiAlertMedium, {
252
- UNSAFE_className: iconClass
184
+
185
+
186
+
187
+
188
+
189
+
190
+
191
+
192
+
193
+
194
+
195
+ var $c14528ddc146317f$exports = {};
196
+
197
+ $parcel$export($c14528ddc146317f$exports, "spectrum-Textfield-input", () => $c14528ddc146317f$export$1ac009feb2b0bd0c, (v) => $c14528ddc146317f$export$1ac009feb2b0bd0c = v);
198
+ $parcel$export($c14528ddc146317f$exports, "spectrum-Textfield", () => $c14528ddc146317f$export$2c8a10299d8b3418, (v) => $c14528ddc146317f$export$2c8a10299d8b3418 = v);
199
+ $parcel$export($c14528ddc146317f$exports, "spectrum-Textfield--quiet", () => $c14528ddc146317f$export$bffd5e3d61a81737, (v) => $c14528ddc146317f$export$bffd5e3d61a81737 = v);
200
+ $parcel$export($c14528ddc146317f$exports, "spectrum-Textfield--multiline", () => $c14528ddc146317f$export$9699f1c538a448a0, (v) => $c14528ddc146317f$export$9699f1c538a448a0 = v);
201
+ $parcel$export($c14528ddc146317f$exports, "is-placeholder", () => $c14528ddc146317f$export$e5b2f5233e4e5194, (v) => $c14528ddc146317f$export$e5b2f5233e4e5194 = v);
202
+ $parcel$export($c14528ddc146317f$exports, "is-hovered", () => $c14528ddc146317f$export$b8813cd5d7824ce7, (v) => $c14528ddc146317f$export$b8813cd5d7824ce7 = v);
203
+ $parcel$export($c14528ddc146317f$exports, "spectrum-Textfield--valid", () => $c14528ddc146317f$export$c2abbc3f970170b7, (v) => $c14528ddc146317f$export$c2abbc3f970170b7 = v);
204
+ $parcel$export($c14528ddc146317f$exports, "spectrum-Textfield--invalid", () => $c14528ddc146317f$export$58e50b10d30123df, (v) => $c14528ddc146317f$export$58e50b10d30123df = v);
205
+ $parcel$export($c14528ddc146317f$exports, "spectrum-Textfield--loadable", () => $c14528ddc146317f$export$14fd30fea6f1348c, (v) => $c14528ddc146317f$export$14fd30fea6f1348c = v);
206
+ $parcel$export($c14528ddc146317f$exports, "spectrum-Textfield-validationIcon", () => $c14528ddc146317f$export$cf0ead5b44db0da3, (v) => $c14528ddc146317f$export$cf0ead5b44db0da3 = v);
207
+ $parcel$export($c14528ddc146317f$exports, "spectrum-Textfield-icon", () => $c14528ddc146317f$export$222d1ccd1870be1d, (v) => $c14528ddc146317f$export$222d1ccd1870be1d = v);
208
+ $parcel$export($c14528ddc146317f$exports, "spectrum-Textfield-inputIcon", () => $c14528ddc146317f$export$c1cdcaa5fe76a871, (v) => $c14528ddc146317f$export$c1cdcaa5fe76a871 = v);
209
+ $parcel$export($c14528ddc146317f$exports, "spectrum-Textfield-circleLoader", () => $c14528ddc146317f$export$82a249fb4d6127, (v) => $c14528ddc146317f$export$82a249fb4d6127 = v);
210
+ $parcel$export($c14528ddc146317f$exports, "is-focused", () => $c14528ddc146317f$export$e7dc768d35940237, (v) => $c14528ddc146317f$export$e7dc768d35940237 = v);
211
+ $parcel$export($c14528ddc146317f$exports, "focus-ring", () => $c14528ddc146317f$export$f39a09f249340e2a, (v) => $c14528ddc146317f$export$f39a09f249340e2a = v);
212
+ $parcel$export($c14528ddc146317f$exports, "is-disabled", () => $c14528ddc146317f$export$d35bc1e505d1ebbf, (v) => $c14528ddc146317f$export$d35bc1e505d1ebbf = v);
213
+ var $c14528ddc146317f$export$1ac009feb2b0bd0c;
214
+ var $c14528ddc146317f$export$2c8a10299d8b3418;
215
+ var $c14528ddc146317f$export$bffd5e3d61a81737;
216
+ var $c14528ddc146317f$export$9699f1c538a448a0;
217
+ var $c14528ddc146317f$export$e5b2f5233e4e5194;
218
+ var $c14528ddc146317f$export$b8813cd5d7824ce7;
219
+ var $c14528ddc146317f$export$c2abbc3f970170b7;
220
+ var $c14528ddc146317f$export$58e50b10d30123df;
221
+ var $c14528ddc146317f$export$14fd30fea6f1348c;
222
+ var $c14528ddc146317f$export$cf0ead5b44db0da3;
223
+ var $c14528ddc146317f$export$222d1ccd1870be1d;
224
+ var $c14528ddc146317f$export$c1cdcaa5fe76a871;
225
+ var $c14528ddc146317f$export$82a249fb4d6127;
226
+ var $c14528ddc146317f$export$e7dc768d35940237;
227
+ var $c14528ddc146317f$export$f39a09f249340e2a;
228
+ var $c14528ddc146317f$export$d35bc1e505d1ebbf;
229
+ $c14528ddc146317f$export$1ac009feb2b0bd0c = "spectrum-Textfield-input_73bc77";
230
+ $c14528ddc146317f$export$2c8a10299d8b3418 = "spectrum-Textfield_73bc77";
231
+ $c14528ddc146317f$export$bffd5e3d61a81737 = "spectrum-Textfield--quiet_73bc77";
232
+ $c14528ddc146317f$export$9699f1c538a448a0 = "spectrum-Textfield--multiline_73bc77";
233
+ $c14528ddc146317f$export$e5b2f5233e4e5194 = "is-placeholder_73bc77";
234
+ $c14528ddc146317f$export$b8813cd5d7824ce7 = "is-hovered_73bc77";
235
+ $c14528ddc146317f$export$c2abbc3f970170b7 = "spectrum-Textfield--valid_73bc77";
236
+ $c14528ddc146317f$export$58e50b10d30123df = "spectrum-Textfield--invalid_73bc77";
237
+ $c14528ddc146317f$export$14fd30fea6f1348c = "spectrum-Textfield--loadable_73bc77";
238
+ $c14528ddc146317f$export$cf0ead5b44db0da3 = "spectrum-Textfield-validationIcon_73bc77";
239
+ $c14528ddc146317f$export$222d1ccd1870be1d = "spectrum-Textfield-icon_73bc77";
240
+ $c14528ddc146317f$export$c1cdcaa5fe76a871 = "spectrum-Textfield-inputIcon_73bc77";
241
+ $c14528ddc146317f$export$82a249fb4d6127 = "spectrum-Textfield-circleLoader_73bc77";
242
+ $c14528ddc146317f$export$e7dc768d35940237 = "is-focused_73bc77";
243
+ $c14528ddc146317f$export$f39a09f249340e2a = "focus-ring_73bc77";
244
+ $c14528ddc146317f$export$d35bc1e505d1ebbf = "is-disabled_73bc77";
245
+
246
+
247
+
248
+ function $79348162c55d687f$export$f5b8910cec6cf069(props) {
249
+ let defaultRef = $aayOp$useRef();
250
+ let { isDisabled: isDisabled , isQuiet: isQuiet , inputClassName: inputClassName , validationState: validationState , children: children , fieldProps: fieldProps , inputRef: inputRef = defaultRef , className: className , style: style } = props;
251
+ // Reserve padding for the error icon when the width of the input is unconstrained.
252
+ // When constrained, don't reserve space because adding it only when invalid will
253
+ // not cause a layout shift.
254
+ let [reservePadding1, setReservePadding] = $aayOp$useValueEffect(false);
255
+ let onResize = $aayOp$useCallback(()=>setReservePadding(function*(reservePadding) {
256
+ if (reservePadding) // Try to collapse padding if the content is clipped.
257
+ {
258
+ if (inputRef.current.scrollWidth > inputRef.current.offsetWidth) {
259
+ let width = inputRef.current.parentElement.offsetWidth;
260
+ yield false;
261
+ // If removing padding causes a layout shift, add it back.
262
+ if (inputRef.current.parentElement.offsetWidth !== width) yield true;
263
+ }
264
+ } else // Try to add padding if the content is not clipped.
265
+ if (inputRef.current.offsetWidth >= inputRef.current.scrollWidth) {
266
+ let width = inputRef.current.parentElement.offsetWidth;
267
+ yield true;
268
+ // If adding padding does not change the width (i.e. width is constrained), remove it again.
269
+ if (inputRef.current.parentElement.offsetWidth === width) yield false;
270
+ }
271
+ })
272
+ , [
273
+ inputRef,
274
+ setReservePadding
275
+ ]);
276
+ $aayOp$useLayoutEffect(onResize, [
277
+ onResize
278
+ ]);
279
+ $aayOp$useResizeObserver({
280
+ ref: inputRef,
281
+ onResize: onResize
282
+ });
283
+ // We also need to listen for resize events of the window so we can detect
284
+ // when there is enough space for the padding to be re-added. Ideally we'd
285
+ // use a resize observer on a parent element, but it's hard to know _what_
286
+ // parent element.
287
+ $aayOp$useEvent($aayOp$useRef(window), 'resize', onResize);
288
+ let isInvalid = validationState === 'invalid';
289
+ let textfieldClass = $aayOp$classNames((/*@__PURE__*/$parcel$interopDefault($c14528ddc146317f$exports)), 'spectrum-Textfield', {
290
+ 'spectrum-Textfield--invalid': isInvalid,
291
+ 'spectrum-Textfield--valid': validationState === 'valid',
292
+ 'spectrum-Textfield--quiet': isQuiet
293
+ }, $aayOp$classNames((/*@__PURE__*/$parcel$interopDefault($8e15de0211b274e3$exports)), 'react-spectrum-Datepicker-field'), className);
294
+ let inputClass = $aayOp$classNames((/*@__PURE__*/$parcel$interopDefault($c14528ddc146317f$exports)), 'spectrum-Textfield-input', {
295
+ 'is-disabled': isDisabled,
296
+ 'is-invalid': isInvalid
297
+ }, reservePadding1 && $aayOp$classNames((/*@__PURE__*/$parcel$interopDefault($8e15de0211b274e3$exports)), 'react-spectrum-Datepicker-input'), inputClassName);
298
+ let iconClass = $aayOp$classNames((/*@__PURE__*/$parcel$interopDefault($c14528ddc146317f$exports)), 'spectrum-Textfield-validationIcon');
299
+ let validationIcon = null;
300
+ if (validationState === 'invalid') validationIcon = /*#__PURE__*/ $aayOp$react.createElement($aayOp$spectrumiconsuiAlertMedium, {
301
+ "data-testid": "invalid-icon",
302
+ UNSAFE_className: iconClass
253
303
  });
254
- } else if (validationState === 'valid') {
255
- validationIcon = /*#__PURE__*/_react.createElement(_spectrumIconsUiCheckmarkMedium, {
256
- UNSAFE_className: iconClass
304
+ else if (validationState === 'valid') validationIcon = /*#__PURE__*/ $aayOp$react.createElement($aayOp$spectrumiconsuiCheckmarkMedium, {
305
+ "data-testid": "valid-icon",
306
+ UNSAFE_className: iconClass
257
307
  });
258
- }
259
-
260
- return /*#__PURE__*/_react.createElement("div", _babelRuntimeHelpersEsmExtends({}, mergeProps(fieldProps), {
261
- className: textfieldClass,
262
- style: style
263
- }), /*#__PURE__*/_react.createElement(FocusRing, {
264
- focusClass: classNames($aa1c742e7a2a16aa7981ca9e2f4a89$$interop$default, 'is-focused'),
265
- focusRingClass: classNames($aa1c742e7a2a16aa7981ca9e2f4a89$$interop$default, 'focus-ring'),
266
- isTextInput: true,
267
- within: true
268
- }, /*#__PURE__*/_react.createElement("div", {
269
- role: "presentation",
270
- className: inputClass
271
- }, /*#__PURE__*/_react.createElement("div", {
272
- role: "presentation",
273
- className: classNames($fc5c1aaa653a82d8278e64c777eca$$interop$default, 'react-spectrum-Datepicker-inputContents'),
274
- ref: inputRef
275
- }, /*#__PURE__*/_react.createElement(FocusScope, {
276
- autoFocus: autoFocus
277
- }, children)))), validationIcon);
308
+ return(/*#__PURE__*/ $aayOp$react.createElement("div", {
309
+ role: "presentation",
310
+ ...fieldProps,
311
+ className: textfieldClass,
312
+ style: style
313
+ }, /*#__PURE__*/ $aayOp$react.createElement($aayOp$FocusRing, {
314
+ focusClass: $aayOp$classNames((/*@__PURE__*/$parcel$interopDefault($c14528ddc146317f$exports)), 'is-focused'),
315
+ focusRingClass: $aayOp$classNames((/*@__PURE__*/$parcel$interopDefault($c14528ddc146317f$exports)), 'focus-ring'),
316
+ isTextInput: true,
317
+ within: true
318
+ }, /*#__PURE__*/ $aayOp$react.createElement("div", {
319
+ role: "presentation",
320
+ className: inputClass
321
+ }, /*#__PURE__*/ $aayOp$react.createElement("div", {
322
+ role: "presentation",
323
+ className: $aayOp$classNames((/*@__PURE__*/$parcel$interopDefault($8e15de0211b274e3$exports)), 'react-spectrum-Datepicker-inputContents'),
324
+ ref: inputRef
325
+ }, children))), validationIcon));
278
326
  }
279
327
 
280
- // ASSET: /Users/govett/Downloads/react-spectrum-release/node_modules/@adobe/spectrum-css-temp/components/inputgroup/vars.css
281
- var $ed163f34af6780259e0266609fb62099$exports = {};
282
- $ed163f34af6780259e0266609fb62099$exports = {
283
- "spectrum-InputGroup": "_spectrum-InputGroup_7d93f",
284
- "spectrum-FieldButton": "_spectrum-FieldButton_7d93f",
285
- "is-disabled": "_is-disabled_7d93f",
286
- "spectrum-InputGroup--invalid": "_spectrum-InputGroup--invalid_7d93f",
287
- "spectrum-InputGroup--quiet": "_spectrum-InputGroup--quiet_7d93f",
288
- "spectrum-InputGroup-field": "_spectrum-InputGroup-field_7d93f",
289
- "spectrum-InputGroup-input-validationIcon": "_spectrum-InputGroup-input-validationIcon_7d93f",
290
- "spectrum-InputGroup-input-circleLoader": "_spectrum-InputGroup-input-circleLoader_7d93f",
291
- "spectrum-InputGroup-input": "_spectrum-InputGroup-input_7d93f",
292
- "spectrum-InputGroup-icon": "_spectrum-InputGroup-icon_7d93f",
293
- "spectrum-InputGroup-popover--quiet": "_spectrum-InputGroup-popover--quiet_7d93f",
294
- "spectrum-Datepicker--range": "_spectrum-Datepicker--range_7d93f",
295
- "spectrum-Datepicker--datetimeRange": "_spectrum-Datepicker--datetimeRange_7d93f",
296
- "spectrum-Datepicker-startField": "_spectrum-Datepicker-startField_7d93f",
297
- "spectrum-Datepicker-endField": "_spectrum-Datepicker-endField_7d93f",
298
- "spectrum-Datepicker--rangeDash": "_spectrum-Datepicker--rangeDash_7d93f",
299
- "is-focused": "_is-focused_7d93f",
300
- "spectrum-Datepicker-focusRing": "_spectrum-Datepicker-focusRing_7d93f",
301
- "is-hovered": "_is-hovered_7d93f",
302
- "focus-ring": "_focus-ring_7d93f",
303
- "is-selected": "_is-selected_7d93f",
304
- "spectrum-FieldButton--invalid": "_spectrum-FieldButton--invalid_7d93f"
305
- };
306
- export function TimeField(props) {
307
- props = useProviderProps(props);
308
- let {
309
- autoFocus,
310
- isDisabled,
311
- isReadOnly,
312
- isRequired,
313
- isQuiet
314
- } = props;
315
- let ref = useRef();
316
- let {
317
- locale
318
- } = useLocale();
319
- let state = useTimeFieldState(_babelRuntimeHelpersEsmExtends({}, props, {
320
- locale,
321
- createCalendar
322
- }));
323
- let {
324
- labelProps,
325
- fieldProps,
326
- descriptionProps,
327
- errorMessageProps
328
- } = useDateField(props, state, ref);
329
- return /*#__PURE__*/_react.createElement(Field, _babelRuntimeHelpersEsmExtends({}, props, {
330
- labelProps: labelProps,
331
- descriptionProps: descriptionProps,
332
- errorMessageProps: errorMessageProps,
333
- validationState: state.validationState,
334
- UNSAFE_className: classNames($fc5c1aaa653a82d8278e64c777eca$$interop$default, 'react-spectrum-TimeField-fieldWrapper')
335
- }), /*#__PURE__*/_react.createElement($f7a3dc9c77601846b3cceddb1f68b1a$export$Input, {
336
- fieldProps: fieldProps,
337
- isDisabled: isDisabled,
338
- isQuiet: isQuiet,
339
- autoFocus: autoFocus,
340
- validationState: state.validationState,
341
- inputRef: ref,
342
- className: classNames($fc5c1aaa653a82d8278e64c777eca$$interop$default, 'react-spectrum-TimeField')
343
- }, state.segments.map((segment, i) => /*#__PURE__*/_react.createElement($d90fc87ed39803c47c775d8a63e9b3ac$export$DatePickerSegment, {
344
- key: i,
345
- segment: segment,
346
- state: state,
347
- isDisabled: isDisabled,
348
- isReadOnly: isReadOnly,
349
- isRequired: isRequired
350
- }))));
351
- }
352
328
 
353
- function $fceb515efc46c02b9fa71489a5fd9a8$export$useFormatHelpText(props) {
354
- let formatter = useDateFormatter({
355
- dateStyle: 'short'
356
- });
357
- let displayNames = useDisplayNames();
358
- return useMemo(() => {
359
- if (props.description) {
360
- return props.description;
361
- }
362
329
 
363
- if (props.showFormatHelpText) {
364
- return formatter.formatToParts(new Date()).map(s => {
365
- if (s.type === 'literal') {
366
- return s.value;
367
- }
368
330
 
369
- return displayNames.of(s.type);
370
- }).join(' ');
371
- }
372
331
 
373
- return '';
374
- }, [props.description, props.showFormatHelpText, formatter, displayNames]);
332
+ var $8fb52a80fe52b1c7$exports = {};
333
+
334
+ $parcel$export($8fb52a80fe52b1c7$exports, "spectrum-InputGroup", () => $8fb52a80fe52b1c7$export$5be359c1227eedcb, (v) => $8fb52a80fe52b1c7$export$5be359c1227eedcb = v);
335
+ $parcel$export($8fb52a80fe52b1c7$exports, "spectrum-FieldButton", () => $8fb52a80fe52b1c7$export$a024c99ecf6b5741, (v) => $8fb52a80fe52b1c7$export$a024c99ecf6b5741 = v);
336
+ $parcel$export($8fb52a80fe52b1c7$exports, "is-disabled", () => $8fb52a80fe52b1c7$export$d35bc1e505d1ebbf, (v) => $8fb52a80fe52b1c7$export$d35bc1e505d1ebbf = v);
337
+ $parcel$export($8fb52a80fe52b1c7$exports, "spectrum-InputGroup--invalid", () => $8fb52a80fe52b1c7$export$3b48509739a9cda0, (v) => $8fb52a80fe52b1c7$export$3b48509739a9cda0 = v);
338
+ $parcel$export($8fb52a80fe52b1c7$exports, "spectrum-InputGroup--quiet", () => $8fb52a80fe52b1c7$export$ebf265ffc062029b, (v) => $8fb52a80fe52b1c7$export$ebf265ffc062029b = v);
339
+ $parcel$export($8fb52a80fe52b1c7$exports, "spectrum-InputGroup-field", () => $8fb52a80fe52b1c7$export$ea77459595e26bec, (v) => $8fb52a80fe52b1c7$export$ea77459595e26bec = v);
340
+ $parcel$export($8fb52a80fe52b1c7$exports, "spectrum-InputGroup-input-validationIcon", () => $8fb52a80fe52b1c7$export$f7ab13ee113f4884, (v) => $8fb52a80fe52b1c7$export$f7ab13ee113f4884 = v);
341
+ $parcel$export($8fb52a80fe52b1c7$exports, "spectrum-InputGroup-input-circleLoader", () => $8fb52a80fe52b1c7$export$dcc9e00cdad967fa, (v) => $8fb52a80fe52b1c7$export$dcc9e00cdad967fa = v);
342
+ $parcel$export($8fb52a80fe52b1c7$exports, "spectrum-InputGroup-input", () => $8fb52a80fe52b1c7$export$92706f5c6fe4074, (v) => $8fb52a80fe52b1c7$export$92706f5c6fe4074 = v);
343
+ $parcel$export($8fb52a80fe52b1c7$exports, "spectrum-InputGroup-icon", () => $8fb52a80fe52b1c7$export$b91b6af799fd93a8, (v) => $8fb52a80fe52b1c7$export$b91b6af799fd93a8 = v);
344
+ $parcel$export($8fb52a80fe52b1c7$exports, "spectrum-InputGroup-popover--quiet", () => $8fb52a80fe52b1c7$export$5e116178f9b1556a, (v) => $8fb52a80fe52b1c7$export$5e116178f9b1556a = v);
345
+ $parcel$export($8fb52a80fe52b1c7$exports, "spectrum-Datepicker--range", () => $8fb52a80fe52b1c7$export$1d8b0b29e11d7cd, (v) => $8fb52a80fe52b1c7$export$1d8b0b29e11d7cd = v);
346
+ $parcel$export($8fb52a80fe52b1c7$exports, "spectrum-Datepicker--datetimeRange", () => $8fb52a80fe52b1c7$export$58dd7cd23c92699f, (v) => $8fb52a80fe52b1c7$export$58dd7cd23c92699f = v);
347
+ $parcel$export($8fb52a80fe52b1c7$exports, "spectrum-Datepicker-startField", () => $8fb52a80fe52b1c7$export$80f9c838a8406469, (v) => $8fb52a80fe52b1c7$export$80f9c838a8406469 = v);
348
+ $parcel$export($8fb52a80fe52b1c7$exports, "spectrum-Datepicker-endField", () => $8fb52a80fe52b1c7$export$1c72fb41fa4f21ee, (v) => $8fb52a80fe52b1c7$export$1c72fb41fa4f21ee = v);
349
+ $parcel$export($8fb52a80fe52b1c7$exports, "spectrum-Datepicker--rangeDash", () => $8fb52a80fe52b1c7$export$202113e883898dc, (v) => $8fb52a80fe52b1c7$export$202113e883898dc = v);
350
+ $parcel$export($8fb52a80fe52b1c7$exports, "is-focused", () => $8fb52a80fe52b1c7$export$e7dc768d35940237, (v) => $8fb52a80fe52b1c7$export$e7dc768d35940237 = v);
351
+ $parcel$export($8fb52a80fe52b1c7$exports, "spectrum-Datepicker-focusRing", () => $8fb52a80fe52b1c7$export$eb262b15b9261fde, (v) => $8fb52a80fe52b1c7$export$eb262b15b9261fde = v);
352
+ $parcel$export($8fb52a80fe52b1c7$exports, "is-hovered", () => $8fb52a80fe52b1c7$export$b8813cd5d7824ce7, (v) => $8fb52a80fe52b1c7$export$b8813cd5d7824ce7 = v);
353
+ $parcel$export($8fb52a80fe52b1c7$exports, "focus-ring", () => $8fb52a80fe52b1c7$export$f39a09f249340e2a, (v) => $8fb52a80fe52b1c7$export$f39a09f249340e2a = v);
354
+ $parcel$export($8fb52a80fe52b1c7$exports, "is-selected", () => $8fb52a80fe52b1c7$export$1e0fb04f31d3c22a, (v) => $8fb52a80fe52b1c7$export$1e0fb04f31d3c22a = v);
355
+ $parcel$export($8fb52a80fe52b1c7$exports, "spectrum-FieldButton--invalid", () => $8fb52a80fe52b1c7$export$c9f503f672e8a3c1, (v) => $8fb52a80fe52b1c7$export$c9f503f672e8a3c1 = v);
356
+ var $8fb52a80fe52b1c7$export$5be359c1227eedcb;
357
+ var $8fb52a80fe52b1c7$export$a024c99ecf6b5741;
358
+ var $8fb52a80fe52b1c7$export$d35bc1e505d1ebbf;
359
+ var $8fb52a80fe52b1c7$export$3b48509739a9cda0;
360
+ var $8fb52a80fe52b1c7$export$ebf265ffc062029b;
361
+ var $8fb52a80fe52b1c7$export$ea77459595e26bec;
362
+ var $8fb52a80fe52b1c7$export$f7ab13ee113f4884;
363
+ var $8fb52a80fe52b1c7$export$dcc9e00cdad967fa;
364
+ var $8fb52a80fe52b1c7$export$92706f5c6fe4074;
365
+ var $8fb52a80fe52b1c7$export$b91b6af799fd93a8;
366
+ var $8fb52a80fe52b1c7$export$5e116178f9b1556a;
367
+ var $8fb52a80fe52b1c7$export$1d8b0b29e11d7cd;
368
+ var $8fb52a80fe52b1c7$export$58dd7cd23c92699f;
369
+ var $8fb52a80fe52b1c7$export$80f9c838a8406469;
370
+ var $8fb52a80fe52b1c7$export$1c72fb41fa4f21ee;
371
+ var $8fb52a80fe52b1c7$export$202113e883898dc;
372
+ var $8fb52a80fe52b1c7$export$e7dc768d35940237;
373
+ var $8fb52a80fe52b1c7$export$eb262b15b9261fde;
374
+ var $8fb52a80fe52b1c7$export$b8813cd5d7824ce7;
375
+ var $8fb52a80fe52b1c7$export$f39a09f249340e2a;
376
+ var $8fb52a80fe52b1c7$export$1e0fb04f31d3c22a;
377
+ var $8fb52a80fe52b1c7$export$c9f503f672e8a3c1;
378
+ $8fb52a80fe52b1c7$export$5be359c1227eedcb = "spectrum-InputGroup_a0942f";
379
+ $8fb52a80fe52b1c7$export$a024c99ecf6b5741 = "spectrum-FieldButton_a0942f";
380
+ $8fb52a80fe52b1c7$export$d35bc1e505d1ebbf = "is-disabled_a0942f";
381
+ $8fb52a80fe52b1c7$export$3b48509739a9cda0 = "spectrum-InputGroup--invalid_a0942f";
382
+ $8fb52a80fe52b1c7$export$ebf265ffc062029b = "spectrum-InputGroup--quiet_a0942f";
383
+ $8fb52a80fe52b1c7$export$ea77459595e26bec = "spectrum-InputGroup-field_a0942f";
384
+ $8fb52a80fe52b1c7$export$f7ab13ee113f4884 = "spectrum-InputGroup-input-validationIcon_a0942f";
385
+ $8fb52a80fe52b1c7$export$dcc9e00cdad967fa = "spectrum-InputGroup-input-circleLoader_a0942f";
386
+ $8fb52a80fe52b1c7$export$92706f5c6fe4074 = "spectrum-InputGroup-input_a0942f";
387
+ $8fb52a80fe52b1c7$export$b91b6af799fd93a8 = "spectrum-InputGroup-icon_a0942f";
388
+ $8fb52a80fe52b1c7$export$5e116178f9b1556a = "spectrum-InputGroup-popover--quiet_a0942f";
389
+ $8fb52a80fe52b1c7$export$1d8b0b29e11d7cd = "spectrum-Datepicker--range_a0942f";
390
+ $8fb52a80fe52b1c7$export$58dd7cd23c92699f = "spectrum-Datepicker--datetimeRange_a0942f";
391
+ $8fb52a80fe52b1c7$export$80f9c838a8406469 = "spectrum-Datepicker-startField_a0942f";
392
+ $8fb52a80fe52b1c7$export$1c72fb41fa4f21ee = "spectrum-Datepicker-endField_a0942f";
393
+ $8fb52a80fe52b1c7$export$202113e883898dc = "spectrum-Datepicker--rangeDash_a0942f";
394
+ $8fb52a80fe52b1c7$export$e7dc768d35940237 = "is-focused_a0942f";
395
+ $8fb52a80fe52b1c7$export$eb262b15b9261fde = "spectrum-Datepicker-focusRing_a0942f";
396
+ $8fb52a80fe52b1c7$export$b8813cd5d7824ce7 = "is-hovered_a0942f";
397
+ $8fb52a80fe52b1c7$export$f39a09f249340e2a = "focus-ring_a0942f";
398
+ $8fb52a80fe52b1c7$export$1e0fb04f31d3c22a = "is-selected_a0942f";
399
+ $8fb52a80fe52b1c7$export$c9f503f672e8a3c1 = "spectrum-FieldButton--invalid_a0942f";
400
+
401
+
402
+ var $f0a04554754386b6$exports = {};
403
+
404
+ $parcel$export($f0a04554754386b6$exports, "TimeField", () => $f0a04554754386b6$export$5eaee2322dd727eb);
405
+
406
+
407
+
408
+
409
+
410
+
411
+
412
+
413
+
414
+
415
+ function $f0a04554754386b6$export$5eaee2322dd727eb(props) {
416
+ props = $aayOp$useProviderProps(props);
417
+ let { autoFocus: autoFocus , isDisabled: isDisabled , isReadOnly: isReadOnly , isRequired: isRequired , isQuiet: isQuiet } = props;
418
+ let ref = $aayOp$useRef();
419
+ let { locale: locale } = $aayOp$useLocale();
420
+ let state = $aayOp$useTimeFieldState({
421
+ ...props,
422
+ locale: locale
423
+ });
424
+ let { labelProps: labelProps , fieldProps: fieldProps , descriptionProps: descriptionProps , errorMessageProps: errorMessageProps } = $aayOp$useTimeField(props, state, ref);
425
+ return(/*#__PURE__*/ $aayOp$react.createElement($aayOp$Field, {
426
+ ...props,
427
+ elementType: "span",
428
+ labelProps: labelProps,
429
+ descriptionProps: descriptionProps,
430
+ errorMessageProps: errorMessageProps,
431
+ validationState: state.validationState,
432
+ UNSAFE_className: $aayOp$classNames((/*@__PURE__*/$parcel$interopDefault($8e15de0211b274e3$exports)), 'react-spectrum-TimeField-fieldWrapper')
433
+ }, /*#__PURE__*/ $aayOp$react.createElement($79348162c55d687f$export$f5b8910cec6cf069, {
434
+ fieldProps: fieldProps,
435
+ isDisabled: isDisabled,
436
+ isQuiet: isQuiet,
437
+ autoFocus: autoFocus,
438
+ validationState: state.validationState,
439
+ inputRef: ref,
440
+ className: $aayOp$classNames((/*@__PURE__*/$parcel$interopDefault($8e15de0211b274e3$exports)), 'react-spectrum-TimeField')
441
+ }, state.segments.map((segment, i)=>/*#__PURE__*/ $aayOp$react.createElement($cfa347761f172638$export$6388987c5223b54e, {
442
+ key: i,
443
+ segment: segment,
444
+ state: state,
445
+ isDisabled: isDisabled,
446
+ isReadOnly: isReadOnly,
447
+ isRequired: isRequired
448
+ })
449
+ ))));
375
450
  }
376
451
 
377
- function $fceb515efc46c02b9fa71489a5fd9a8$export$useVisibleMonths(maxVisibleMonths) {
378
- let {
379
- scale
380
- } = useProvider();
381
- let [visibleMonths, setVisibleMonths] = useState($fceb515efc46c02b9fa71489a5fd9a8$var$getVisibleMonths(scale));
382
- useLayoutEffect(() => {
383
- let onResize = () => setVisibleMonths($fceb515efc46c02b9fa71489a5fd9a8$var$getVisibleMonths(scale));
384
-
385
- onResize();
386
- window.addEventListener('resize', onResize);
387
- return () => {
388
- window.removeEventListener('resize', onResize);
389
- };
390
- }, [scale]);
391
- return Math.max(1, Math.min(visibleMonths, maxVisibleMonths, 3));
452
+
453
+
454
+
455
+
456
+
457
+
458
+
459
+
460
+
461
+ function $04e96200274b03de$export$322f4580ccd8dde6(props) {
462
+ let formatter = $aayOp$useDateFormatter({
463
+ dateStyle: 'short'
464
+ });
465
+ let displayNames = $aayOp$useDisplayNames();
466
+ return $aayOp$useMemo(()=>{
467
+ if (props.description) return props.description;
468
+ if (props.showFormatHelpText) return formatter.formatToParts(new Date()).map((s)=>{
469
+ if (s.type === 'literal') return s.value;
470
+ return displayNames.of(s.type);
471
+ }).join(' ');
472
+ return '';
473
+ }, [
474
+ props.description,
475
+ props.showFormatHelpText,
476
+ formatter,
477
+ displayNames
478
+ ]);
479
+ }
480
+ function $04e96200274b03de$export$12ce2869ce471b1f(maxVisibleMonths) {
481
+ let { scale: scale } = $aayOp$useProvider();
482
+ let [visibleMonths, setVisibleMonths] = $aayOp$useState($04e96200274b03de$var$getVisibleMonths(scale));
483
+ $aayOp$useLayoutEffect(()=>{
484
+ let onResize = ()=>setVisibleMonths($04e96200274b03de$var$getVisibleMonths(scale))
485
+ ;
486
+ onResize();
487
+ window.addEventListener('resize', onResize);
488
+ return ()=>{
489
+ window.removeEventListener('resize', onResize);
490
+ };
491
+ }, [
492
+ scale
493
+ ]);
494
+ return Math.max(1, Math.min(visibleMonths, maxVisibleMonths, 3));
392
495
  }
496
+ function $04e96200274b03de$var$getVisibleMonths(scale) {
497
+ let monthWidth = scale === 'large' ? 336 : 280;
498
+ let gap = scale === 'large' ? 30 : 24;
499
+ let popoverPadding = scale === 'large' ? 32 : 48;
500
+ return Math.floor((window.innerWidth - popoverPadding * 2) / (monthWidth + gap));
501
+ }
502
+
503
+
393
504
 
394
- function $fceb515efc46c02b9fa71489a5fd9a8$var$getVisibleMonths(scale) {
395
- let monthWidth = scale === 'large' ? 336 : 280;
396
- let gap = scale === 'large' ? 30 : 24;
397
- let popoverPadding = scale === 'large' ? 32 : 48;
398
- return Math.floor((window.innerWidth - popoverPadding * 2) / (monthWidth + gap));
505
+
506
+
507
+ function $beaeefa091999363$export$5109c6dd95d8fb00(props) {
508
+ props = $aayOp$useProviderProps(props);
509
+ let { autoFocus: autoFocus , isQuiet: isQuiet , isDisabled: isDisabled , isReadOnly: isReadOnly , placeholderValue: placeholderValue , maxVisibleMonths: maxVisibleMonths = 1 } = props;
510
+ let { hoverProps: hoverProps , isHovered: isHovered } = $aayOp$useHover({
511
+ isDisabled: isDisabled
512
+ });
513
+ let targetRef = $aayOp$useRef();
514
+ let state = $aayOp$useDatePickerState({
515
+ ...props,
516
+ shouldCloseOnSelect: ()=>!state.hasTime
517
+ });
518
+ let { groupProps: groupProps , labelProps: labelProps , fieldProps: fieldProps , descriptionProps: descriptionProps , errorMessageProps: errorMessageProps , buttonProps: buttonProps , dialogProps: dialogProps , calendarProps: calendarProps } = $aayOp$useDatePicker(props, state, targetRef);
519
+ let { isOpen: isOpen , setOpen: setOpen } = state;
520
+ let { direction: direction } = $aayOp$useLocale();
521
+ let { isFocused: isFocused , isFocusVisible: isFocusVisible , focusProps: focusProps } = $aayOp$useFocusRing({
522
+ within: true,
523
+ isTextInput: true,
524
+ autoFocus: autoFocus
525
+ });
526
+ let className = $aayOp$classNames((/*@__PURE__*/$parcel$interopDefault($8fb52a80fe52b1c7$exports)), 'spectrum-InputGroup', {
527
+ 'spectrum-InputGroup--quiet': isQuiet,
528
+ 'spectrum-InputGroup--invalid': state.validationState === 'invalid',
529
+ 'is-disabled': isDisabled,
530
+ 'is-hovered': isHovered,
531
+ 'is-focused': isFocused,
532
+ 'focus-ring': isFocusVisible
533
+ });
534
+ let fieldClassName = $aayOp$classNames((/*@__PURE__*/$parcel$interopDefault($8fb52a80fe52b1c7$exports)), 'spectrum-InputGroup-input', {
535
+ 'is-disabled': isDisabled,
536
+ 'is-invalid': state.validationState === 'invalid'
537
+ });
538
+ // Note: this description is intentionally not passed to useDatePicker.
539
+ // The format help text is unnecessary for screen reader users because each segment already has a label.
540
+ let description = $04e96200274b03de$export$322f4580ccd8dde6(props);
541
+ if (description && !props.description) descriptionProps.id = null;
542
+ let placeholder = placeholderValue;
543
+ let timePlaceholder = placeholder && 'hour' in placeholder ? placeholder : null;
544
+ let timeMinValue = props.minValue && 'hour' in props.minValue ? props.minValue : null;
545
+ let timeMaxValue = props.maxValue && 'hour' in props.maxValue ? props.maxValue : null;
546
+ let timeGranularity = state.granularity === 'hour' || state.granularity === 'minute' || state.granularity === 'second' || state.granularity === 'millisecond' ? state.granularity : null;
547
+ let showTimeField = !!timeGranularity;
548
+ let visibleMonths = $04e96200274b03de$export$12ce2869ce471b1f(maxVisibleMonths);
549
+ return(/*#__PURE__*/ $aayOp$react.createElement($aayOp$Field, {
550
+ ...props,
551
+ elementType: "span",
552
+ ref: targetRef,
553
+ description: description,
554
+ labelProps: labelProps,
555
+ descriptionProps: descriptionProps,
556
+ errorMessageProps: errorMessageProps,
557
+ validationState: state.validationState,
558
+ UNSAFE_className: $aayOp$classNames((/*@__PURE__*/$parcel$interopDefault($8e15de0211b274e3$exports)), 'react-spectrum-Datepicker-fieldWrapper')
559
+ }, /*#__PURE__*/ $aayOp$react.createElement("div", {
560
+ ...$aayOp$mergeProps(groupProps, hoverProps, focusProps),
561
+ className: className
562
+ }, /*#__PURE__*/ $aayOp$react.createElement($79348162c55d687f$export$f5b8910cec6cf069, {
563
+ isDisabled: isDisabled,
564
+ isQuiet: isQuiet,
565
+ validationState: state.validationState,
566
+ className: $aayOp$classNames((/*@__PURE__*/$parcel$interopDefault($8fb52a80fe52b1c7$exports)), 'spectrum-InputGroup-field'),
567
+ inputClassName: fieldClassName
568
+ }, /*#__PURE__*/ $aayOp$react.createElement($d2bb88c82604b25f$export$34dc4cfa15ead1, {
569
+ ...fieldProps,
570
+ "data-testid": "date-field",
571
+ isQuiet: isQuiet,
572
+ inputClassName: fieldClassName
573
+ })), /*#__PURE__*/ $aayOp$react.createElement($aayOp$DialogTrigger, {
574
+ type: "popover",
575
+ mobileType: "tray",
576
+ placement: direction === 'rtl' ? 'bottom right' : 'bottom left',
577
+ targetRef: targetRef,
578
+ hideArrow: true,
579
+ isOpen: isOpen,
580
+ onOpenChange: setOpen
581
+ }, /*#__PURE__*/ $aayOp$react.createElement($aayOp$FieldButton, {
582
+ ...buttonProps,
583
+ UNSAFE_className: $aayOp$classNames((/*@__PURE__*/$parcel$interopDefault($8fb52a80fe52b1c7$exports)), 'spectrum-FieldButton'),
584
+ isQuiet: isQuiet,
585
+ validationState: state.validationState,
586
+ isDisabled: isDisabled || isReadOnly
587
+ }, /*#__PURE__*/ $aayOp$react.createElement($aayOp$spectrumiconsworkflowCalendar, null)), /*#__PURE__*/ $aayOp$react.createElement($aayOp$Dialog, {
588
+ UNSAFE_className: $aayOp$classNames((/*@__PURE__*/$parcel$interopDefault($8e15de0211b274e3$exports)), 'react-spectrum-Datepicker-dialog'),
589
+ ...dialogProps
590
+ }, /*#__PURE__*/ $aayOp$react.createElement($aayOp$Content, {
591
+ UNSAFE_className: $aayOp$classNames((/*@__PURE__*/$parcel$interopDefault($8e15de0211b274e3$exports)), 'react-spectrum-Datepicker-dialogContent')
592
+ }, /*#__PURE__*/ $aayOp$react.createElement($aayOp$Calendar, {
593
+ ...calendarProps,
594
+ visibleMonths: visibleMonths
595
+ }), showTimeField && /*#__PURE__*/ $aayOp$react.createElement("div", {
596
+ className: $aayOp$classNames((/*@__PURE__*/$parcel$interopDefault($8e15de0211b274e3$exports)), 'react-spectrum-Datepicker-timeFields')
597
+ }, /*#__PURE__*/ $aayOp$react.createElement($f0a04554754386b6$export$5eaee2322dd727eb, {
598
+ label: "Time",
599
+ value: state.timeValue,
600
+ onChange: state.setTimeValue,
601
+ placeholderValue: timePlaceholder,
602
+ granularity: timeGranularity,
603
+ minValue: timeMinValue,
604
+ maxValue: timeMaxValue,
605
+ hourCycle: props.hourCycle,
606
+ hideTimeZone: props.hideTimeZone,
607
+ marginTop: "size-100"
608
+ }))))))));
399
609
  }
400
610
 
401
- var $ed163f34af6780259e0266609fb62099$$interop$default = $parcel$interopDefault($ed163f34af6780259e0266609fb62099$exports);
402
- export function DatePicker(props) {
403
- props = useProviderProps(props);
404
- let {
405
- autoFocus,
406
- isQuiet,
407
- isDisabled,
408
- isReadOnly,
409
- isRequired,
410
- placeholderValue,
411
- maxVisibleMonths = 1
412
- } = props;
413
- let {
414
- hoverProps,
415
- isHovered
416
- } = useHover({
417
- isDisabled
418
- });
419
- let targetRef = useRef();
420
- let state = useDatePickerState(props);
421
- let {
422
- groupProps,
423
- labelProps,
424
- fieldProps,
425
- descriptionProps,
426
- errorMessageProps,
427
- buttonProps,
428
- dialogProps
429
- } = useDatePicker(props, state, targetRef);
430
- let {
431
- value,
432
- setValue,
433
- isOpen,
434
- setOpen
435
- } = state;
436
- let {
437
- direction
438
- } = useLocale();
439
- let {
440
- isFocused,
441
- isFocusVisible,
442
- focusProps
443
- } = useFocusRing({
444
- within: true,
445
- isTextInput: true,
446
- autoFocus
447
- });
448
- let className = classNames($ed163f34af6780259e0266609fb62099$$interop$default, 'spectrum-InputGroup', {
449
- 'spectrum-InputGroup--quiet': isQuiet,
450
- 'spectrum-InputGroup--invalid': state.validationState === 'invalid',
451
- 'is-disabled': isDisabled,
452
- 'is-hovered': isHovered,
453
- 'is-focused': isFocused,
454
- 'focus-ring': isFocusVisible
455
- });
456
- let fieldClassName = classNames($ed163f34af6780259e0266609fb62099$$interop$default, 'spectrum-InputGroup-input', {
457
- 'is-disabled': isDisabled,
458
- 'is-invalid': state.validationState === 'invalid'
459
- }); // Note: this description is intentionally not passed to useDatePicker.
460
- // The format help text is unnecessary for screen reader users because each segment already has a label.
461
-
462
- let description = $fceb515efc46c02b9fa71489a5fd9a8$export$useFormatHelpText(props);
463
-
464
- if (description && !props.description) {
465
- descriptionProps.id = null;
466
- }
467
-
468
- let placeholder = placeholderValue;
469
- let timePlaceholder = placeholder && 'hour' in placeholder ? placeholder : null;
470
- let timeMinValue = props.minValue && 'hour' in props.minValue ? props.minValue : null;
471
- let timeMaxValue = props.maxValue && 'hour' in props.maxValue ? props.maxValue : null;
472
- let timeGranularity = state.granularity === 'hour' || state.granularity === 'minute' || state.granularity === 'second' || state.granularity === 'millisecond' ? state.granularity : null;
473
- let showTimeField = !!timeGranularity;
474
- let visibleMonths = $fceb515efc46c02b9fa71489a5fd9a8$export$useVisibleMonths(maxVisibleMonths);
475
- return /*#__PURE__*/_react.createElement(Field, _babelRuntimeHelpersEsmExtends({}, props, {
476
- ref: targetRef,
477
- description: description,
478
- labelProps: labelProps,
479
- descriptionProps: descriptionProps,
480
- errorMessageProps: errorMessageProps,
481
- validationState: state.validationState,
482
- UNSAFE_className: classNames($fc5c1aaa653a82d8278e64c777eca$$interop$default, 'react-spectrum-Datepicker-fieldWrapper')
483
- }), /*#__PURE__*/_react.createElement("div", _babelRuntimeHelpersEsmExtends({}, mergeProps(groupProps, hoverProps, focusProps), {
484
- className: className
485
- }), /*#__PURE__*/_react.createElement($f7a3dc9c77601846b3cceddb1f68b1a$export$Input, {
486
- isDisabled: isDisabled,
487
- isQuiet: isQuiet,
488
- validationState: state.validationState,
489
- autoFocus: autoFocus,
490
- className: classNames($ed163f34af6780259e0266609fb62099$$interop$default, 'spectrum-InputGroup-field'),
491
- inputClassName: fieldClassName
492
- }, /*#__PURE__*/_react.createElement($f89a664b25735c9291b8addecfd59013$export$DatePickerField, _babelRuntimeHelpersEsmExtends({}, fieldProps, {
493
- isQuiet: isQuiet,
494
- validationState: state.validationState,
495
- value: value,
496
- onChange: setValue,
497
- placeholderValue: placeholderValue,
498
- isDisabled: isDisabled,
499
- isReadOnly: isReadOnly,
500
- isRequired: isRequired,
501
- granularity: props.granularity,
502
- hourCycle: props.hourCycle,
503
- inputClassName: fieldClassName,
504
- hideTimeZone: props.hideTimeZone
505
- }))), /*#__PURE__*/_react.createElement(DialogTrigger, {
506
- type: "popover",
507
- mobileType: "tray",
508
- placement: direction === 'rtl' ? 'bottom right' : 'bottom left',
509
- targetRef: targetRef,
510
- hideArrow: true,
511
- isOpen: isOpen,
512
- onOpenChange: setOpen
513
- }, /*#__PURE__*/_react.createElement(FieldButton, _babelRuntimeHelpersEsmExtends({}, buttonProps, {
514
- UNSAFE_className: classNames($ed163f34af6780259e0266609fb62099$$interop$default, 'spectrum-FieldButton'),
515
- isQuiet: isQuiet,
516
- validationState: state.validationState,
517
- isDisabled: isDisabled || isReadOnly
518
- }), /*#__PURE__*/_react.createElement(_spectrumIconsWorkflowCalendar, null)), /*#__PURE__*/_react.createElement(Dialog, _babelRuntimeHelpersEsmExtends({
519
- UNSAFE_className: classNames($fc5c1aaa653a82d8278e64c777eca$$interop$default, 'react-spectrum-Datepicker-dialog')
520
- }, dialogProps), /*#__PURE__*/_react.createElement(Content, {
521
- UNSAFE_className: classNames($fc5c1aaa653a82d8278e64c777eca$$interop$default, 'react-spectrum-Datepicker-dialogContent')
522
- }, /*#__PURE__*/_react.createElement(Calendar, {
523
- autoFocus: true,
524
- value: state.dateValue,
525
- onChange: state.setDateValue,
526
- visibleMonths: visibleMonths,
527
- minValue: props.minValue,
528
- maxValue: props.maxValue
529
- }), showTimeField && /*#__PURE__*/_react.createElement("div", {
530
- className: classNames($fc5c1aaa653a82d8278e64c777eca$$interop$default, 'react-spectrum-Datepicker-timeFields')
531
- }, /*#__PURE__*/_react.createElement(TimeField, {
532
- label: "Time",
533
- value: state.timeValue,
534
- onChange: state.setTimeValue,
535
- placeholderValue: timePlaceholder,
536
- granularity: timeGranularity,
537
- minValue: timeMinValue,
538
- maxValue: timeMaxValue,
539
- hourCycle: props.hourCycle,
540
- hideTimeZone: props.hideTimeZone,
541
- marginTop: "size-100"
542
- })))))));
611
+
612
+ var $cb301300011a98f7$exports = {};
613
+
614
+ $parcel$export($cb301300011a98f7$exports, "DateRangePicker", () => $cb301300011a98f7$export$17334619f3ac2224);
615
+
616
+
617
+
618
+
619
+
620
+
621
+
622
+
623
+
624
+
625
+
626
+
627
+
628
+
629
+
630
+
631
+
632
+
633
+
634
+
635
+
636
+
637
+ function $cb301300011a98f7$export$17334619f3ac2224(props) {
638
+ var ref, ref1;
639
+ props = $aayOp$useProviderProps(props);
640
+ let { isQuiet: isQuiet , isDisabled: isDisabled , isReadOnly: isReadOnly , autoFocus: autoFocus , placeholderValue: placeholderValue , maxVisibleMonths: maxVisibleMonths = 1 , ...otherProps } = props;
641
+ let { styleProps: styleProps } = $aayOp$useStyleProps(otherProps);
642
+ let { hoverProps: hoverProps , isHovered: isHovered } = $aayOp$useHover({
643
+ isDisabled: isDisabled
644
+ });
645
+ let targetRef = $aayOp$useRef();
646
+ let state = $aayOp$useDateRangePickerState({
647
+ ...props,
648
+ shouldCloseOnSelect: ()=>!state.hasTime
649
+ });
650
+ let { labelProps: labelProps , groupProps: groupProps , buttonProps: buttonProps , dialogProps: dialogProps , startFieldProps: startFieldProps , endFieldProps: endFieldProps , descriptionProps: descriptionProps , errorMessageProps: errorMessageProps , calendarProps: calendarProps } = $aayOp$useDateRangePicker(props, state, targetRef);
651
+ let { isOpen: isOpen , setOpen: setOpen } = state;
652
+ let { direction: direction } = $aayOp$useLocale();
653
+ let { isFocused: isFocused , isFocusVisible: isFocusVisible , focusProps: focusProps } = $aayOp$useFocusRing({
654
+ within: true,
655
+ isTextInput: true,
656
+ autoFocus: autoFocus
657
+ });
658
+ let className = $aayOp$classNames((/*@__PURE__*/$parcel$interopDefault($8fb52a80fe52b1c7$exports)), 'spectrum-InputGroup', {
659
+ 'spectrum-InputGroup--quiet': isQuiet,
660
+ 'spectrum-InputGroup--invalid': state.validationState === 'invalid',
661
+ 'is-disabled': isDisabled,
662
+ 'is-hovered': isHovered,
663
+ 'is-focused': isFocused,
664
+ 'focus-ring': isFocusVisible
665
+ }, styleProps.className);
666
+ let fieldClassName = $aayOp$classNames((/*@__PURE__*/$parcel$interopDefault($8fb52a80fe52b1c7$exports)), 'spectrum-InputGroup-input', {
667
+ 'is-disabled': isDisabled,
668
+ 'is-invalid': state.validationState === 'invalid'
669
+ });
670
+ // Note: this description is intentionally not passed to useDatePicker.
671
+ // The format help text is unnecessary for screen reader users because each segment already has a label.
672
+ let description = $04e96200274b03de$export$322f4580ccd8dde6(props);
673
+ if (description && !props.description) descriptionProps.id = null;
674
+ let placeholder = placeholderValue;
675
+ let timePlaceholder = placeholder && 'hour' in placeholder ? placeholder : null;
676
+ let timeMinValue = props.minValue && 'hour' in props.minValue ? props.minValue : null;
677
+ let timeMaxValue = props.maxValue && 'hour' in props.maxValue ? props.maxValue : null;
678
+ let timeGranularity = state.granularity === 'hour' || state.granularity === 'minute' || state.granularity === 'second' || state.granularity === 'millisecond' ? state.granularity : null;
679
+ let showTimeField = !!timeGranularity;
680
+ let visibleMonths = $04e96200274b03de$export$12ce2869ce471b1f(maxVisibleMonths);
681
+ return(/*#__PURE__*/ $aayOp$react.createElement($aayOp$Field, {
682
+ ...props,
683
+ elementType: "span",
684
+ ref: targetRef,
685
+ description: description,
686
+ labelProps: labelProps,
687
+ descriptionProps: descriptionProps,
688
+ errorMessageProps: errorMessageProps,
689
+ validationState: state.validationState,
690
+ UNSAFE_className: $aayOp$classNames((/*@__PURE__*/$parcel$interopDefault($8e15de0211b274e3$exports)), 'react-spectrum-Datepicker-fieldWrapper')
691
+ }, /*#__PURE__*/ $aayOp$react.createElement("div", {
692
+ ...styleProps,
693
+ ...$aayOp$mergeProps(groupProps, hoverProps, focusProps),
694
+ className: className
695
+ }, /*#__PURE__*/ $aayOp$react.createElement($79348162c55d687f$export$f5b8910cec6cf069, {
696
+ isDisabled: isDisabled,
697
+ isQuiet: isQuiet,
698
+ validationState: state.validationState,
699
+ className: $aayOp$classNames((/*@__PURE__*/$parcel$interopDefault($8fb52a80fe52b1c7$exports)), 'spectrum-InputGroup-field'),
700
+ inputClassName: fieldClassName
701
+ }, /*#__PURE__*/ $aayOp$react.createElement($d2bb88c82604b25f$export$34dc4cfa15ead1, {
702
+ ...startFieldProps,
703
+ "data-testid": "start-date",
704
+ isQuiet: props.isQuiet,
705
+ inputClassName: $aayOp$classNames((/*@__PURE__*/$parcel$interopDefault($8e15de0211b274e3$exports)), 'react-spectrum-Datepicker-startField')
706
+ }), /*#__PURE__*/ $aayOp$react.createElement($cb301300011a98f7$var$DateRangeDash, null), /*#__PURE__*/ $aayOp$react.createElement($d2bb88c82604b25f$export$34dc4cfa15ead1, {
707
+ ...endFieldProps,
708
+ "data-testid": "end-date",
709
+ isQuiet: props.isQuiet,
710
+ inputClassName: $aayOp$classNames((/*@__PURE__*/$parcel$interopDefault($8fb52a80fe52b1c7$exports)), 'spectrum-Datepicker-endField', $aayOp$classNames((/*@__PURE__*/$parcel$interopDefault($8e15de0211b274e3$exports)), 'react-spectrum-Datepicker-endField'))
711
+ })), /*#__PURE__*/ $aayOp$react.createElement($aayOp$DialogTrigger, {
712
+ type: "popover",
713
+ mobileType: "tray",
714
+ placement: direction === 'rtl' ? 'bottom right' : 'bottom left',
715
+ targetRef: targetRef,
716
+ hideArrow: true,
717
+ isOpen: isOpen,
718
+ onOpenChange: setOpen
719
+ }, /*#__PURE__*/ $aayOp$react.createElement($aayOp$FieldButton, {
720
+ ...buttonProps,
721
+ UNSAFE_className: $aayOp$classNames((/*@__PURE__*/$parcel$interopDefault($8fb52a80fe52b1c7$exports)), 'spectrum-FieldButton'),
722
+ isQuiet: isQuiet,
723
+ validationState: state.validationState,
724
+ isDisabled: isDisabled || isReadOnly
725
+ }, /*#__PURE__*/ $aayOp$react.createElement($aayOp$spectrumiconsworkflowCalendar, null)), /*#__PURE__*/ $aayOp$react.createElement($aayOp$Dialog, {
726
+ UNSAFE_className: $aayOp$classNames((/*@__PURE__*/$parcel$interopDefault($8e15de0211b274e3$exports)), 'react-spectrum-Datepicker-dialog'),
727
+ ...dialogProps
728
+ }, /*#__PURE__*/ $aayOp$react.createElement($aayOp$Content, {
729
+ UNSAFE_className: $aayOp$classNames((/*@__PURE__*/$parcel$interopDefault($8e15de0211b274e3$exports)), 'react-spectrum-Datepicker-dialogContent')
730
+ }, /*#__PURE__*/ $aayOp$react.createElement($aayOp$RangeCalendar, {
731
+ ...calendarProps,
732
+ visibleMonths: visibleMonths
733
+ }), showTimeField && /*#__PURE__*/ $aayOp$react.createElement($aayOp$Flex, {
734
+ gap: "size-100",
735
+ marginTop: "size-100",
736
+ UNSAFE_className: $aayOp$classNames((/*@__PURE__*/$parcel$interopDefault($8e15de0211b274e3$exports)), 'react-spectrum-Datepicker-timeFields')
737
+ }, /*#__PURE__*/ $aayOp$react.createElement($f0a04554754386b6$export$5eaee2322dd727eb, {
738
+ label: "Start time",
739
+ value: ((ref = state.timeRange) === null || ref === void 0 ? void 0 : ref.start) || null,
740
+ onChange: (v)=>state.setTime('start', v)
741
+ ,
742
+ placeholderValue: timePlaceholder,
743
+ granularity: timeGranularity,
744
+ minValue: timeMinValue,
745
+ maxValue: timeMaxValue,
746
+ hourCycle: props.hourCycle,
747
+ hideTimeZone: props.hideTimeZone,
748
+ flex: true
749
+ }), /*#__PURE__*/ $aayOp$react.createElement($f0a04554754386b6$export$5eaee2322dd727eb, {
750
+ label: "End time",
751
+ value: ((ref1 = state.timeRange) === null || ref1 === void 0 ? void 0 : ref1.end) || null,
752
+ onChange: (v)=>state.setTime('end', v)
753
+ ,
754
+ placeholderValue: timePlaceholder,
755
+ granularity: timeGranularity,
756
+ minValue: timeMinValue,
757
+ maxValue: timeMaxValue,
758
+ hourCycle: props.hourCycle,
759
+ hideTimeZone: props.hideTimeZone,
760
+ flex: true
761
+ }))))))));
543
762
  }
544
- export function DateRangePicker(props) {
545
- var _state$timeRange, _state$timeRange2;
546
-
547
- props = useProviderProps(props);
548
-
549
- let {
550
- isQuiet,
551
- isDisabled,
552
- isReadOnly,
553
- isRequired,
554
- autoFocus,
555
- placeholderValue,
556
- maxVisibleMonths = 1
557
- } = props,
558
- otherProps = _babelRuntimeHelpersEsmObjectWithoutPropertiesLoose(props, ["isQuiet", "isDisabled", "isReadOnly", "isRequired", "autoFocus", "placeholderValue", "maxVisibleMonths"]);
559
-
560
- let {
561
- styleProps
562
- } = useStyleProps(otherProps);
563
- let {
564
- hoverProps,
565
- isHovered
566
- } = useHover({
567
- isDisabled
568
- });
569
- let targetRef = useRef();
570
- let state = useDateRangePickerState(props);
571
- let {
572
- labelProps,
573
- groupProps,
574
- buttonProps,
575
- dialogProps,
576
- startFieldProps,
577
- endFieldProps,
578
- descriptionProps,
579
- errorMessageProps
580
- } = useDateRangePicker(props, state, targetRef);
581
- let {
582
- value,
583
- isOpen,
584
- setOpen
585
- } = state;
586
- let {
587
- direction
588
- } = useLocale();
589
- let {
590
- isFocused,
591
- isFocusVisible,
592
- focusProps
593
- } = useFocusRing({
594
- within: true,
595
- isTextInput: true,
596
- autoFocus
597
- });
598
- let className = classNames($ed163f34af6780259e0266609fb62099$$interop$default, 'spectrum-InputGroup', {
599
- 'spectrum-InputGroup--quiet': isQuiet,
600
- 'spectrum-InputGroup--invalid': state.validationState === 'invalid',
601
- 'is-disabled': isDisabled,
602
- 'is-hovered': isHovered,
603
- 'is-focused': isFocused,
604
- 'focus-ring': isFocusVisible
605
- }, styleProps.className);
606
- let fieldClassName = classNames($ed163f34af6780259e0266609fb62099$$interop$default, 'spectrum-InputGroup-input', {
607
- 'is-disabled': isDisabled,
608
- 'is-invalid': state.validationState === 'invalid'
609
- }); // Note: this description is intentionally not passed to useDatePicker.
610
- // The format help text is unnecessary for screen reader users because each segment already has a label.
611
-
612
- let description = $fceb515efc46c02b9fa71489a5fd9a8$export$useFormatHelpText(props);
613
-
614
- if (description && !props.description) {
615
- descriptionProps.id = null;
616
- }
617
-
618
- let placeholder = placeholderValue;
619
- let timePlaceholder = placeholder && 'hour' in placeholder ? placeholder : null;
620
- let timeMinValue = props.minValue && 'hour' in props.minValue ? props.minValue : null;
621
- let timeMaxValue = props.maxValue && 'hour' in props.maxValue ? props.maxValue : null;
622
- let timeGranularity = state.granularity === 'hour' || state.granularity === 'minute' || state.granularity === 'second' || state.granularity === 'millisecond' ? state.granularity : null;
623
- let showTimeField = !!timeGranularity;
624
- let visibleMonths = $fceb515efc46c02b9fa71489a5fd9a8$export$useVisibleMonths(maxVisibleMonths);
625
- return /*#__PURE__*/_react.createElement(Field, _babelRuntimeHelpersEsmExtends({}, props, {
626
- ref: targetRef,
627
- description: description,
628
- labelProps: labelProps,
629
- descriptionProps: descriptionProps,
630
- errorMessageProps: errorMessageProps,
631
- validationState: state.validationState,
632
- UNSAFE_className: classNames($fc5c1aaa653a82d8278e64c777eca$$interop$default, 'react-spectrum-Datepicker-fieldWrapper')
633
- }), /*#__PURE__*/_react.createElement("div", _babelRuntimeHelpersEsmExtends({}, styleProps, mergeProps(groupProps, hoverProps, focusProps), {
634
- className: className
635
- }), /*#__PURE__*/_react.createElement($f7a3dc9c77601846b3cceddb1f68b1a$export$Input, {
636
- isDisabled: isDisabled,
637
- isQuiet: isQuiet,
638
- validationState: state.validationState,
639
- autoFocus: autoFocus,
640
- className: classNames($ed163f34af6780259e0266609fb62099$$interop$default, 'spectrum-InputGroup-field'),
641
- inputClassName: fieldClassName
642
- }, /*#__PURE__*/_react.createElement($f89a664b25735c9291b8addecfd59013$export$DatePickerField, _babelRuntimeHelpersEsmExtends({}, startFieldProps, {
643
- isQuiet: props.isQuiet,
644
- isDisabled: isDisabled,
645
- isReadOnly: isReadOnly,
646
- isRequired: isRequired,
647
- validationState: state.validationState,
648
- placeholderValue: placeholderValue,
649
- value: (value == null ? void 0 : value.start) || null,
650
- defaultValue: null,
651
- onChange: start => state.setDateTime('start', start),
652
- granularity: props.granularity,
653
- hourCycle: props.hourCycle,
654
- inputClassName: classNames($fc5c1aaa653a82d8278e64c777eca$$interop$default, 'react-spectrum-Datepicker-startField')
655
- })), /*#__PURE__*/_react.createElement($f52d33e8ff443414997ed587ce7ed905$var$DateRangeDash, null), /*#__PURE__*/_react.createElement($f89a664b25735c9291b8addecfd59013$export$DatePickerField, _babelRuntimeHelpersEsmExtends({}, endFieldProps, {
656
- isQuiet: props.isQuiet,
657
- isDisabled: isDisabled,
658
- isReadOnly: isReadOnly,
659
- isRequired: isRequired,
660
- validationState: state.validationState,
661
- placeholderValue: placeholderValue,
662
- value: (value == null ? void 0 : value.end) || null,
663
- defaultValue: null,
664
- onChange: end => state.setDateTime('end', end),
665
- granularity: props.granularity,
666
- hourCycle: props.hourCycle,
667
- inputClassName: classNames($ed163f34af6780259e0266609fb62099$$interop$default, 'spectrum-Datepicker-endField', classNames($fc5c1aaa653a82d8278e64c777eca$$interop$default, 'react-spectrum-Datepicker-endField'))
668
- }))), /*#__PURE__*/_react.createElement(DialogTrigger, {
669
- type: "popover",
670
- mobileType: "tray",
671
- placement: direction === 'rtl' ? 'bottom right' : 'bottom left',
672
- targetRef: targetRef,
673
- hideArrow: true,
674
- isOpen: isOpen,
675
- onOpenChange: setOpen
676
- }, /*#__PURE__*/_react.createElement(FieldButton, _babelRuntimeHelpersEsmExtends({}, buttonProps, {
677
- UNSAFE_className: classNames($ed163f34af6780259e0266609fb62099$$interop$default, 'spectrum-FieldButton'),
678
- isQuiet: isQuiet,
679
- validationState: state.validationState,
680
- isDisabled: isDisabled || isReadOnly
681
- }), /*#__PURE__*/_react.createElement(_spectrumIconsWorkflowCalendar, null)), /*#__PURE__*/_react.createElement(Dialog, _babelRuntimeHelpersEsmExtends({
682
- UNSAFE_className: classNames($fc5c1aaa653a82d8278e64c777eca$$interop$default, 'react-spectrum-Datepicker-dialog')
683
- }, dialogProps), /*#__PURE__*/_react.createElement(Content, {
684
- UNSAFE_className: classNames($fc5c1aaa653a82d8278e64c777eca$$interop$default, 'react-spectrum-Datepicker-dialogContent')
685
- }, /*#__PURE__*/_react.createElement(RangeCalendar, {
686
- autoFocus: true,
687
- value: state.dateRange,
688
- onChange: state.setDateRange,
689
- visibleMonths: visibleMonths,
690
- minValue: props.minValue,
691
- maxValue: props.maxValue
692
- }), showTimeField && /*#__PURE__*/_react.createElement(Flex, {
693
- gap: "size-100",
694
- marginTop: "size-100",
695
- UNSAFE_className: classNames($fc5c1aaa653a82d8278e64c777eca$$interop$default, 'react-spectrum-Datepicker-timeFields')
696
- }, /*#__PURE__*/_react.createElement(TimeField, {
697
- label: "Start time",
698
- value: ((_state$timeRange = state.timeRange) == null ? void 0 : _state$timeRange.start) || null,
699
- onChange: v => state.setTime('start', v),
700
- placeholderValue: timePlaceholder,
701
- granularity: timeGranularity,
702
- minValue: timeMinValue,
703
- maxValue: timeMaxValue,
704
- hourCycle: props.hourCycle,
705
- hideTimeZone: props.hideTimeZone,
706
- flex: true
707
- }), /*#__PURE__*/_react.createElement(TimeField, {
708
- label: "End time",
709
- value: ((_state$timeRange2 = state.timeRange) == null ? void 0 : _state$timeRange2.end) || null,
710
- onChange: v => state.setTime('end', v),
711
- placeholderValue: timePlaceholder,
712
- granularity: timeGranularity,
713
- minValue: timeMinValue,
714
- maxValue: timeMaxValue,
715
- hourCycle: props.hourCycle,
716
- hideTimeZone: props.hideTimeZone,
717
- flex: true
718
- })))))));
763
+ function $cb301300011a98f7$var$DateRangeDash() {
764
+ return(/*#__PURE__*/ $aayOp$react.createElement("div", {
765
+ "aria-hidden": "true",
766
+ "data-testid": "date-range-dash",
767
+ className: $aayOp$classNames((/*@__PURE__*/$parcel$interopDefault($8e15de0211b274e3$exports)), 'react-spectrum-Datepicker-rangeDash')
768
+ }));
719
769
  }
720
770
 
721
- function $f52d33e8ff443414997ed587ce7ed905$var$DateRangeDash() {
722
- return /*#__PURE__*/_react.createElement("div", {
723
- "aria-hidden": "true",
724
- className: classNames($fc5c1aaa653a82d8278e64c777eca$$interop$default, 'react-spectrum-Datepicker-rangeDash')
725
- });
726
- }
727
771
 
728
- export function DateField(props) {
729
- props = useProviderProps(props);
730
- let {
731
- autoFocus,
732
- isDisabled,
733
- isReadOnly,
734
- isRequired,
735
- isQuiet
736
- } = props;
737
- let ref = useRef();
738
- let {
739
- locale
740
- } = useLocale();
741
- let state = useDatePickerFieldState(_babelRuntimeHelpersEsmExtends({}, props, {
742
- locale,
743
- createCalendar
744
- }));
745
- let {
746
- labelProps,
747
- fieldProps,
748
- descriptionProps,
749
- errorMessageProps
750
- } = useDateField(props, state, ref); // Note: this description is intentionally not passed to useDatePicker.
751
- // The format help text is unnecessary for screen reader users because each segment already has a label.
752
-
753
- let description = $fceb515efc46c02b9fa71489a5fd9a8$export$useFormatHelpText(props);
754
-
755
- if (description && !props.description) {
756
- descriptionProps.id = null;
757
- }
758
-
759
- return /*#__PURE__*/_react.createElement(Field, _babelRuntimeHelpersEsmExtends({}, props, {
760
- description: description,
761
- labelProps: labelProps,
762
- descriptionProps: descriptionProps,
763
- errorMessageProps: errorMessageProps,
764
- validationState: state.validationState,
765
- UNSAFE_className: classNames($fc5c1aaa653a82d8278e64c777eca$$interop$default, 'react-spectrum-Datepicker-fieldWrapper')
766
- }), /*#__PURE__*/_react.createElement($f7a3dc9c77601846b3cceddb1f68b1a$export$Input, {
767
- fieldProps: fieldProps,
768
- isDisabled: isDisabled,
769
- isQuiet: isQuiet,
770
- autoFocus: autoFocus,
771
- validationState: state.validationState,
772
- inputRef: ref,
773
- className: classNames($fc5c1aaa653a82d8278e64c777eca$$interop$default, 'react-spectrum-DateField')
774
- }, state.segments.map((segment, i) => /*#__PURE__*/_react.createElement($d90fc87ed39803c47c775d8a63e9b3ac$export$DatePickerSegment, {
775
- key: i,
776
- segment: segment,
777
- state: state,
778
- isDisabled: isDisabled,
779
- isReadOnly: isReadOnly,
780
- isRequired: isRequired
781
- }))));
772
+
773
+ var $0129798af6791690$exports = {};
774
+
775
+ $parcel$export($0129798af6791690$exports, "DateField", () => $0129798af6791690$export$d9781c7894a82487);
776
+
777
+
778
+
779
+
780
+
781
+
782
+
783
+
784
+
785
+
786
+
787
+
788
+ function $0129798af6791690$export$d9781c7894a82487(props) {
789
+ props = $aayOp$useProviderProps(props);
790
+ let { autoFocus: autoFocus , isDisabled: isDisabled , isReadOnly: isReadOnly , isRequired: isRequired , isQuiet: isQuiet } = props;
791
+ let ref = $aayOp$useRef();
792
+ let { locale: locale } = $aayOp$useLocale();
793
+ let state = $aayOp$useDateFieldState({
794
+ ...props,
795
+ locale: locale,
796
+ createCalendar: $aayOp$createCalendar
797
+ });
798
+ let { labelProps: labelProps , fieldProps: fieldProps , descriptionProps: descriptionProps , errorMessageProps: errorMessageProps } = $aayOp$useDateField(props, state, ref);
799
+ // Note: this description is intentionally not passed to useDatePicker.
800
+ // The format help text is unnecessary for screen reader users because each segment already has a label.
801
+ let description = $04e96200274b03de$export$322f4580ccd8dde6(props);
802
+ if (description && !props.description) descriptionProps.id = null;
803
+ return(/*#__PURE__*/ $aayOp$react.createElement($aayOp$Field, {
804
+ ...props,
805
+ elementType: "span",
806
+ description: description,
807
+ labelProps: labelProps,
808
+ descriptionProps: descriptionProps,
809
+ errorMessageProps: errorMessageProps,
810
+ validationState: state.validationState,
811
+ UNSAFE_className: $aayOp$classNames((/*@__PURE__*/$parcel$interopDefault($8e15de0211b274e3$exports)), 'react-spectrum-Datepicker-fieldWrapper')
812
+ }, /*#__PURE__*/ $aayOp$react.createElement($79348162c55d687f$export$f5b8910cec6cf069, {
813
+ fieldProps: fieldProps,
814
+ isDisabled: isDisabled,
815
+ isQuiet: isQuiet,
816
+ autoFocus: autoFocus,
817
+ validationState: state.validationState,
818
+ inputRef: ref,
819
+ className: $aayOp$classNames((/*@__PURE__*/$parcel$interopDefault($8e15de0211b274e3$exports)), 'react-spectrum-DateField')
820
+ }, state.segments.map((segment, i)=>/*#__PURE__*/ $aayOp$react.createElement($cfa347761f172638$export$6388987c5223b54e, {
821
+ key: i,
822
+ segment: segment,
823
+ state: state,
824
+ isDisabled: isDisabled,
825
+ isReadOnly: isReadOnly,
826
+ isRequired: isRequired
827
+ })
828
+ ))));
782
829
  }
830
+
831
+
832
+
833
+
834
+ export {$beaeefa091999363$export$5109c6dd95d8fb00 as DatePicker, $cb301300011a98f7$export$17334619f3ac2224 as DateRangePicker, $f0a04554754386b6$export$5eaee2322dd727eb as TimeField, $0129798af6791690$export$d9781c7894a82487 as DateField};
783
835
  //# sourceMappingURL=module.js.map