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