@react-spectrum/datepicker 3.2.0 → 3.3.1
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 -1
- package/dist/main.js +349 -260
- package/dist/main.js.map +1 -1
- package/dist/module.js +350 -261
- package/dist/module.js.map +1 -1
- package/dist/types.d.ts.map +1 -1
- package/package.json +23 -23
- package/src/DatePicker.tsx +4 -3
- package/src/DateRangePicker.tsx +4 -3
- package/src/Input.tsx +22 -16
- package/src/styles.css +4 -4
package/dist/main.js
CHANGED
|
@@ -30,13 +30,54 @@ $parcel$export(module.exports, "DatePicker", () => $5c1ddf85d7c27889$export$5109
|
|
|
30
30
|
$parcel$export(module.exports, "DateRangePicker", () => $16cafb71dac155a4$export$17334619f3ac2224);
|
|
31
31
|
$parcel$export(module.exports, "TimeField", () => $740ff83729a8f317$export$5eaee2322dd727eb);
|
|
32
32
|
$parcel$export(module.exports, "DateField", () => $1ab74d2cd1dc2e45$export$d9781c7894a82487);
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
33
|
+
/*
|
|
34
|
+
* Copyright 2020 Adobe. All rights reserved.
|
|
35
|
+
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
36
|
+
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
37
|
+
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
38
|
+
*
|
|
39
|
+
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
40
|
+
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
41
|
+
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
42
|
+
* governing permissions and limitations under the License.
|
|
43
|
+
*/ /// <reference types="css-module-types" />
|
|
44
|
+
/*
|
|
45
|
+
* Copyright 2020 Adobe. All rights reserved.
|
|
46
|
+
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
47
|
+
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
48
|
+
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
49
|
+
*
|
|
50
|
+
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
51
|
+
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
52
|
+
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
53
|
+
* governing permissions and limitations under the License.
|
|
54
|
+
*/
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
/*
|
|
59
|
+
* Copyright 2020 Adobe. All rights reserved.
|
|
60
|
+
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
61
|
+
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
62
|
+
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
63
|
+
*
|
|
64
|
+
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
65
|
+
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
66
|
+
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
67
|
+
* governing permissions and limitations under the License.
|
|
68
|
+
*/
|
|
69
|
+
|
|
70
|
+
/*
|
|
71
|
+
* Copyright 2020 Adobe. All rights reserved.
|
|
72
|
+
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
73
|
+
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
74
|
+
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
75
|
+
*
|
|
76
|
+
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
77
|
+
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
78
|
+
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
79
|
+
* governing permissions and limitations under the License.
|
|
80
|
+
*/
|
|
40
81
|
|
|
41
82
|
var $91c3db8c6a21ca71$exports = {};
|
|
42
83
|
|
|
@@ -109,45 +150,45 @@ $91c3db8c6a21ca71$export$8d47712a13573e39 = "react-spectrum-Datepicker-timeField
|
|
|
109
150
|
function $edac158d20ebe4a9$export$6388987c5223b54e({ segment: segment , state: state , ...otherProps }) {
|
|
110
151
|
switch(segment.type){
|
|
111
152
|
// A separator, e.g. punctuation
|
|
112
|
-
case
|
|
113
|
-
return
|
|
153
|
+
case "literal":
|
|
154
|
+
return /*#__PURE__*/ (0, ($parcel$interopDefault($9kQ8p$react))).createElement($edac158d20ebe4a9$var$LiteralSegment, {
|
|
114
155
|
segment: segment
|
|
115
|
-
})
|
|
156
|
+
});
|
|
116
157
|
// Editable segment
|
|
117
158
|
default:
|
|
118
|
-
return
|
|
159
|
+
return /*#__PURE__*/ (0, ($parcel$interopDefault($9kQ8p$react))).createElement($edac158d20ebe4a9$var$EditableSegment, {
|
|
119
160
|
segment: segment,
|
|
120
161
|
state: state,
|
|
121
162
|
...otherProps
|
|
122
|
-
})
|
|
163
|
+
});
|
|
123
164
|
}
|
|
124
165
|
}
|
|
125
166
|
function $edac158d20ebe4a9$var$LiteralSegment({ segment: segment }) {
|
|
126
|
-
return
|
|
167
|
+
return /*#__PURE__*/ (0, ($parcel$interopDefault($9kQ8p$react))).createElement("span", {
|
|
127
168
|
"aria-hidden": "true",
|
|
128
|
-
className: $9kQ8p$reactspectrumutils.classNames((/*@__PURE__*/$parcel$interopDefault($91c3db8c6a21ca71$exports)),
|
|
129
|
-
"data-testid": segment.type ===
|
|
130
|
-
}, segment.text)
|
|
169
|
+
className: (0, $9kQ8p$reactspectrumutils.classNames)((0, (/*@__PURE__*/$parcel$interopDefault($91c3db8c6a21ca71$exports))), "react-spectrum-Datepicker-literal"),
|
|
170
|
+
"data-testid": segment.type === "literal" ? undefined : segment.type
|
|
171
|
+
}, segment.text);
|
|
131
172
|
}
|
|
132
173
|
function $edac158d20ebe4a9$var$EditableSegment({ segment: segment , state: state }) {
|
|
133
|
-
let ref = $9kQ8p$react.useRef();
|
|
134
|
-
let { segmentProps: segmentProps } = $9kQ8p$reactariadatepicker.useDateSegment(segment, state, ref);
|
|
135
|
-
return
|
|
174
|
+
let ref = (0, $9kQ8p$react.useRef)();
|
|
175
|
+
let { segmentProps: segmentProps } = (0, $9kQ8p$reactariadatepicker.useDateSegment)(segment, state, ref);
|
|
176
|
+
return /*#__PURE__*/ (0, ($parcel$interopDefault($9kQ8p$react))).createElement("div", {
|
|
136
177
|
...segmentProps,
|
|
137
178
|
ref: ref,
|
|
138
|
-
className: $9kQ8p$reactspectrumutils.classNames((/*@__PURE__*/$parcel$interopDefault($91c3db8c6a21ca71$exports)),
|
|
139
|
-
|
|
140
|
-
|
|
179
|
+
className: (0, $9kQ8p$reactspectrumutils.classNames)((0, (/*@__PURE__*/$parcel$interopDefault($91c3db8c6a21ca71$exports))), "react-spectrum-DatePicker-cell", {
|
|
180
|
+
"is-placeholder": segment.isPlaceholder,
|
|
181
|
+
"is-read-only": !segment.isEditable
|
|
141
182
|
}),
|
|
142
183
|
style: {
|
|
143
184
|
...segmentProps.style,
|
|
144
|
-
minWidth: segment.maxValue != null ? String(segment.maxValue).length +
|
|
185
|
+
minWidth: segment.maxValue != null ? String(segment.maxValue).length + "ch" : null
|
|
145
186
|
},
|
|
146
187
|
"data-testid": segment.type
|
|
147
|
-
}, /*#__PURE__*/ ($parcel$interopDefault($9kQ8p$react)).createElement("span", {
|
|
188
|
+
}, /*#__PURE__*/ (0, ($parcel$interopDefault($9kQ8p$react))).createElement("span", {
|
|
148
189
|
"aria-hidden": "true",
|
|
149
|
-
className: $9kQ8p$reactspectrumutils.classNames((/*@__PURE__*/$parcel$interopDefault($91c3db8c6a21ca71$exports)),
|
|
150
|
-
}, segment.placeholder), segment.isPlaceholder ?
|
|
190
|
+
className: (0, $9kQ8p$reactspectrumutils.classNames)((0, (/*@__PURE__*/$parcel$interopDefault($91c3db8c6a21ca71$exports))), "react-spectrum-DatePicker-placeholder")
|
|
191
|
+
}, segment.placeholder), segment.isPlaceholder ? "" : segment.text);
|
|
151
192
|
}
|
|
152
193
|
|
|
153
194
|
|
|
@@ -158,28 +199,27 @@ function $edac158d20ebe4a9$var$EditableSegment({ segment: segment , state: state
|
|
|
158
199
|
|
|
159
200
|
function $bd22dc8dad9522bc$export$34dc4cfa15ead1(props) {
|
|
160
201
|
let { isDisabled: isDisabled , isReadOnly: isReadOnly , isRequired: isRequired , inputClassName: inputClassName } = props;
|
|
161
|
-
let ref = $9kQ8p$react.useRef();
|
|
162
|
-
let { locale: locale } = $9kQ8p$reactariai18n.useLocale();
|
|
163
|
-
let state = $9kQ8p$reactstatelydatepicker.useDateFieldState({
|
|
202
|
+
let ref = (0, $9kQ8p$react.useRef)();
|
|
203
|
+
let { locale: locale } = (0, $9kQ8p$reactariai18n.useLocale)();
|
|
204
|
+
let state = (0, $9kQ8p$reactstatelydatepicker.useDateFieldState)({
|
|
164
205
|
...props,
|
|
165
206
|
locale: locale,
|
|
166
207
|
createCalendar: $9kQ8p$internationalizeddate.createCalendar
|
|
167
208
|
});
|
|
168
|
-
let { fieldProps: fieldProps } = $9kQ8p$reactariadatepicker.useDateField(props, state, ref);
|
|
169
|
-
return
|
|
209
|
+
let { fieldProps: fieldProps } = (0, $9kQ8p$reactariadatepicker.useDateField)(props, state, ref);
|
|
210
|
+
return /*#__PURE__*/ (0, ($parcel$interopDefault($9kQ8p$react))).createElement("div", {
|
|
170
211
|
...fieldProps,
|
|
171
|
-
"data-testid": props[
|
|
172
|
-
className: $9kQ8p$reactspectrumutils.classNames((/*@__PURE__*/$parcel$interopDefault($91c3db8c6a21ca71$exports)),
|
|
212
|
+
"data-testid": props["data-testid"],
|
|
213
|
+
className: (0, $9kQ8p$reactspectrumutils.classNames)((0, (/*@__PURE__*/$parcel$interopDefault($91c3db8c6a21ca71$exports))), "react-spectrum-Datepicker-segments", inputClassName),
|
|
173
214
|
ref: ref
|
|
174
|
-
}, state.segments.map((segment, i)=>/*#__PURE__*/ ($parcel$interopDefault($9kQ8p$react)).createElement($edac158d20ebe4a9$export$6388987c5223b54e, {
|
|
215
|
+
}, state.segments.map((segment, i)=>/*#__PURE__*/ (0, ($parcel$interopDefault($9kQ8p$react))).createElement((0, $edac158d20ebe4a9$export$6388987c5223b54e), {
|
|
175
216
|
key: i,
|
|
176
217
|
segment: segment,
|
|
177
218
|
state: state,
|
|
178
219
|
isDisabled: isDisabled,
|
|
179
220
|
isReadOnly: isReadOnly,
|
|
180
221
|
isRequired: isRequired
|
|
181
|
-
})
|
|
182
|
-
)));
|
|
222
|
+
})));
|
|
183
223
|
}
|
|
184
224
|
|
|
185
225
|
|
|
@@ -187,8 +227,17 @@ function $bd22dc8dad9522bc$export$34dc4cfa15ead1(props) {
|
|
|
187
227
|
|
|
188
228
|
|
|
189
229
|
|
|
190
|
-
|
|
191
|
-
|
|
230
|
+
/*
|
|
231
|
+
* Copyright 2020 Adobe. All rights reserved.
|
|
232
|
+
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
233
|
+
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
234
|
+
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
235
|
+
*
|
|
236
|
+
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
237
|
+
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
238
|
+
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
239
|
+
* governing permissions and limitations under the License.
|
|
240
|
+
*/
|
|
192
241
|
|
|
193
242
|
|
|
194
243
|
|
|
@@ -198,6 +247,7 @@ var $40cb3a00c193680f$exports = {};
|
|
|
198
247
|
|
|
199
248
|
$parcel$export($40cb3a00c193680f$exports, "spectrum-Textfield-input", () => $40cb3a00c193680f$export$1ac009feb2b0bd0c, (v) => $40cb3a00c193680f$export$1ac009feb2b0bd0c = v);
|
|
200
249
|
$parcel$export($40cb3a00c193680f$exports, "spectrum-Textfield", () => $40cb3a00c193680f$export$2c8a10299d8b3418, (v) => $40cb3a00c193680f$export$2c8a10299d8b3418 = v);
|
|
250
|
+
$parcel$export($40cb3a00c193680f$exports, "focus-ring", () => $40cb3a00c193680f$export$f39a09f249340e2a, (v) => $40cb3a00c193680f$export$f39a09f249340e2a = v);
|
|
201
251
|
$parcel$export($40cb3a00c193680f$exports, "spectrum-Textfield--quiet", () => $40cb3a00c193680f$export$bffd5e3d61a81737, (v) => $40cb3a00c193680f$export$bffd5e3d61a81737 = v);
|
|
202
252
|
$parcel$export($40cb3a00c193680f$exports, "spectrum-Textfield--multiline", () => $40cb3a00c193680f$export$9699f1c538a448a0, (v) => $40cb3a00c193680f$export$9699f1c538a448a0 = v);
|
|
203
253
|
$parcel$export($40cb3a00c193680f$exports, "is-placeholder", () => $40cb3a00c193680f$export$e5b2f5233e4e5194, (v) => $40cb3a00c193680f$export$e5b2f5233e4e5194 = v);
|
|
@@ -206,15 +256,16 @@ $parcel$export($40cb3a00c193680f$exports, "spectrum-Textfield--valid", () => $40
|
|
|
206
256
|
$parcel$export($40cb3a00c193680f$exports, "spectrum-Textfield--invalid", () => $40cb3a00c193680f$export$58e50b10d30123df, (v) => $40cb3a00c193680f$export$58e50b10d30123df = v);
|
|
207
257
|
$parcel$export($40cb3a00c193680f$exports, "spectrum-Textfield--loadable", () => $40cb3a00c193680f$export$14fd30fea6f1348c, (v) => $40cb3a00c193680f$export$14fd30fea6f1348c = v);
|
|
208
258
|
$parcel$export($40cb3a00c193680f$exports, "spectrum-Textfield-wrapper", () => $40cb3a00c193680f$export$dd1165e0e6012973, (v) => $40cb3a00c193680f$export$dd1165e0e6012973 = v);
|
|
259
|
+
$parcel$export($40cb3a00c193680f$exports, "spectrum-Textfield-wrapper--quiet", () => $40cb3a00c193680f$export$9fcb3d6af94a9d12, (v) => $40cb3a00c193680f$export$9fcb3d6af94a9d12 = v);
|
|
209
260
|
$parcel$export($40cb3a00c193680f$exports, "spectrum-Textfield-validationIcon", () => $40cb3a00c193680f$export$cf0ead5b44db0da3, (v) => $40cb3a00c193680f$export$cf0ead5b44db0da3 = v);
|
|
210
261
|
$parcel$export($40cb3a00c193680f$exports, "spectrum-Textfield-icon", () => $40cb3a00c193680f$export$222d1ccd1870be1d, (v) => $40cb3a00c193680f$export$222d1ccd1870be1d = v);
|
|
211
262
|
$parcel$export($40cb3a00c193680f$exports, "spectrum-Textfield-inputIcon", () => $40cb3a00c193680f$export$c1cdcaa5fe76a871, (v) => $40cb3a00c193680f$export$c1cdcaa5fe76a871 = v);
|
|
212
263
|
$parcel$export($40cb3a00c193680f$exports, "spectrum-Textfield-circleLoader", () => $40cb3a00c193680f$export$82a249fb4d6127, (v) => $40cb3a00c193680f$export$82a249fb4d6127 = v);
|
|
213
264
|
$parcel$export($40cb3a00c193680f$exports, "is-focused", () => $40cb3a00c193680f$export$e7dc768d35940237, (v) => $40cb3a00c193680f$export$e7dc768d35940237 = v);
|
|
214
|
-
$parcel$export($40cb3a00c193680f$exports, "focus-ring", () => $40cb3a00c193680f$export$f39a09f249340e2a, (v) => $40cb3a00c193680f$export$f39a09f249340e2a = v);
|
|
215
265
|
$parcel$export($40cb3a00c193680f$exports, "is-disabled", () => $40cb3a00c193680f$export$d35bc1e505d1ebbf, (v) => $40cb3a00c193680f$export$d35bc1e505d1ebbf = v);
|
|
216
266
|
var $40cb3a00c193680f$export$1ac009feb2b0bd0c;
|
|
217
267
|
var $40cb3a00c193680f$export$2c8a10299d8b3418;
|
|
268
|
+
var $40cb3a00c193680f$export$f39a09f249340e2a;
|
|
218
269
|
var $40cb3a00c193680f$export$bffd5e3d61a81737;
|
|
219
270
|
var $40cb3a00c193680f$export$9699f1c538a448a0;
|
|
220
271
|
var $40cb3a00c193680f$export$e5b2f5233e4e5194;
|
|
@@ -223,15 +274,16 @@ var $40cb3a00c193680f$export$c2abbc3f970170b7;
|
|
|
223
274
|
var $40cb3a00c193680f$export$58e50b10d30123df;
|
|
224
275
|
var $40cb3a00c193680f$export$14fd30fea6f1348c;
|
|
225
276
|
var $40cb3a00c193680f$export$dd1165e0e6012973;
|
|
277
|
+
var $40cb3a00c193680f$export$9fcb3d6af94a9d12;
|
|
226
278
|
var $40cb3a00c193680f$export$cf0ead5b44db0da3;
|
|
227
279
|
var $40cb3a00c193680f$export$222d1ccd1870be1d;
|
|
228
280
|
var $40cb3a00c193680f$export$c1cdcaa5fe76a871;
|
|
229
281
|
var $40cb3a00c193680f$export$82a249fb4d6127;
|
|
230
282
|
var $40cb3a00c193680f$export$e7dc768d35940237;
|
|
231
|
-
var $40cb3a00c193680f$export$f39a09f249340e2a;
|
|
232
283
|
var $40cb3a00c193680f$export$d35bc1e505d1ebbf;
|
|
233
284
|
$40cb3a00c193680f$export$1ac009feb2b0bd0c = "spectrum-Textfield-input_73bc77";
|
|
234
285
|
$40cb3a00c193680f$export$2c8a10299d8b3418 = "spectrum-Textfield_73bc77";
|
|
286
|
+
$40cb3a00c193680f$export$f39a09f249340e2a = "focus-ring_73bc77";
|
|
235
287
|
$40cb3a00c193680f$export$bffd5e3d61a81737 = "spectrum-Textfield--quiet_73bc77";
|
|
236
288
|
$40cb3a00c193680f$export$9699f1c538a448a0 = "spectrum-Textfield--multiline_73bc77";
|
|
237
289
|
$40cb3a00c193680f$export$e5b2f5233e4e5194 = "is-placeholder_73bc77";
|
|
@@ -240,23 +292,24 @@ $40cb3a00c193680f$export$c2abbc3f970170b7 = "spectrum-Textfield--valid_73bc77";
|
|
|
240
292
|
$40cb3a00c193680f$export$58e50b10d30123df = "spectrum-Textfield--invalid_73bc77";
|
|
241
293
|
$40cb3a00c193680f$export$14fd30fea6f1348c = "spectrum-Textfield--loadable_73bc77";
|
|
242
294
|
$40cb3a00c193680f$export$dd1165e0e6012973 = "spectrum-Textfield-wrapper_73bc77";
|
|
295
|
+
$40cb3a00c193680f$export$9fcb3d6af94a9d12 = "spectrum-Textfield-wrapper--quiet_73bc77";
|
|
243
296
|
$40cb3a00c193680f$export$cf0ead5b44db0da3 = "spectrum-Textfield-validationIcon_73bc77";
|
|
244
297
|
$40cb3a00c193680f$export$222d1ccd1870be1d = "spectrum-Textfield-icon_73bc77";
|
|
245
298
|
$40cb3a00c193680f$export$c1cdcaa5fe76a871 = "spectrum-Textfield-inputIcon_73bc77";
|
|
246
299
|
$40cb3a00c193680f$export$82a249fb4d6127 = "spectrum-Textfield-circleLoader_73bc77";
|
|
247
300
|
$40cb3a00c193680f$export$e7dc768d35940237 = "is-focused_73bc77";
|
|
248
|
-
$40cb3a00c193680f$export$f39a09f249340e2a = "focus-ring_73bc77";
|
|
249
301
|
$40cb3a00c193680f$export$d35bc1e505d1ebbf = "is-disabled_73bc77";
|
|
250
302
|
|
|
251
303
|
|
|
304
|
+
|
|
252
305
|
function $c3ebc4931d9b9977$var$Input(props, ref) {
|
|
253
|
-
let inputRef = $9kQ8p$react.useRef(null);
|
|
254
|
-
let { isDisabled: isDisabled , isQuiet: isQuiet , inputClassName: inputClassName , validationState: validationState , children: children , fieldProps: fieldProps , className: className , style: style } = props;
|
|
306
|
+
let inputRef = (0, $9kQ8p$react.useRef)(null);
|
|
307
|
+
let { isDisabled: isDisabled , isQuiet: isQuiet , inputClassName: inputClassName , validationState: validationState , children: children , fieldProps: fieldProps , className: className , style: style , disableFocusRing: disableFocusRing } = props;
|
|
255
308
|
// Reserve padding for the error icon when the width of the input is unconstrained.
|
|
256
309
|
// When constrained, don't reserve space because adding it only when invalid will
|
|
257
310
|
// not cause a layout shift.
|
|
258
|
-
let [
|
|
259
|
-
let onResize = $9kQ8p$react.useCallback(()=>setReservePadding(function*(reservePadding) {
|
|
311
|
+
let [reservePadding, setReservePadding] = (0, $9kQ8p$reactspectrumutils.useValueEffect)(false);
|
|
312
|
+
let onResize = (0, $9kQ8p$react.useCallback)(()=>setReservePadding(function*(reservePadding) {
|
|
260
313
|
if (inputRef.current) {
|
|
261
314
|
if (reservePadding) // Try to collapse padding if the content is clipped.
|
|
262
315
|
{
|
|
@@ -268,21 +321,20 @@ function $c3ebc4931d9b9977$var$Input(props, ref) {
|
|
|
268
321
|
}
|
|
269
322
|
} else // Try to add padding if the content is not clipped.
|
|
270
323
|
if (inputRef.current.offsetWidth >= inputRef.current.scrollWidth) {
|
|
271
|
-
let
|
|
324
|
+
let width1 = inputRef.current.parentElement.offsetWidth;
|
|
272
325
|
yield true;
|
|
273
326
|
// If adding padding does not change the width (i.e. width is constrained), remove it again.
|
|
274
|
-
if (inputRef.current.parentElement.offsetWidth ===
|
|
327
|
+
if (inputRef.current.parentElement.offsetWidth === width1) yield false;
|
|
275
328
|
}
|
|
276
329
|
}
|
|
277
|
-
})
|
|
278
|
-
, [
|
|
330
|
+
}), [
|
|
279
331
|
inputRef,
|
|
280
332
|
setReservePadding
|
|
281
333
|
]);
|
|
282
|
-
$9kQ8p$reactariautils.useLayoutEffect(onResize, [
|
|
334
|
+
(0, $9kQ8p$reactariautils.useLayoutEffect)(onResize, [
|
|
283
335
|
onResize
|
|
284
336
|
]);
|
|
285
|
-
$9kQ8p$reactariautils.useResizeObserver({
|
|
337
|
+
(0, $9kQ8p$reactariautils.useResizeObserver)({
|
|
286
338
|
ref: inputRef,
|
|
287
339
|
onResize: onResize
|
|
288
340
|
});
|
|
@@ -290,47 +342,48 @@ function $c3ebc4931d9b9977$var$Input(props, ref) {
|
|
|
290
342
|
// when there is enough space for the padding to be re-added. Ideally we'd
|
|
291
343
|
// use a resize observer on a parent element, but it's hard to know _what_
|
|
292
344
|
// parent element.
|
|
293
|
-
$9kQ8p$reactariautils.useEvent($9kQ8p$react.useRef(typeof window !==
|
|
294
|
-
let
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
345
|
+
(0, $9kQ8p$reactariautils.useEvent)((0, $9kQ8p$react.useRef)(typeof window !== "undefined" ? window : null), "resize", onResize);
|
|
346
|
+
let { focusProps: focusProps , isFocusVisible: isFocusVisible , isFocused: isFocused } = (0, $9kQ8p$reactariafocus.useFocusRing)({
|
|
347
|
+
isTextInput: true,
|
|
348
|
+
within: true
|
|
349
|
+
});
|
|
350
|
+
let isInvalid = validationState === "invalid" && !isDisabled;
|
|
351
|
+
let textfieldClass = (0, $9kQ8p$reactspectrumutils.classNames)((0, (/*@__PURE__*/$parcel$interopDefault($40cb3a00c193680f$exports))), "spectrum-Textfield", {
|
|
352
|
+
"spectrum-Textfield--invalid": isInvalid,
|
|
353
|
+
"spectrum-Textfield--valid": validationState === "valid" && !isDisabled,
|
|
354
|
+
"spectrum-Textfield--quiet": isQuiet,
|
|
355
|
+
"focus-ring": isFocusVisible && !disableFocusRing
|
|
356
|
+
}, (0, $9kQ8p$reactspectrumutils.classNames)((0, (/*@__PURE__*/$parcel$interopDefault($91c3db8c6a21ca71$exports))), "react-spectrum-Datepicker-field"), className);
|
|
357
|
+
let inputClass = (0, $9kQ8p$reactspectrumutils.classNames)((0, (/*@__PURE__*/$parcel$interopDefault($40cb3a00c193680f$exports))), "spectrum-Textfield-input", {
|
|
358
|
+
"is-disabled": isDisabled,
|
|
359
|
+
"is-invalid": isInvalid,
|
|
360
|
+
"is-focused": isFocused
|
|
361
|
+
}, reservePadding && (0, $9kQ8p$reactspectrumutils.classNames)((0, (/*@__PURE__*/$parcel$interopDefault($91c3db8c6a21ca71$exports))), "react-spectrum-Datepicker-input"), inputClassName);
|
|
362
|
+
let iconClass = (0, $9kQ8p$reactspectrumutils.classNames)((0, (/*@__PURE__*/$parcel$interopDefault($40cb3a00c193680f$exports))), "spectrum-Textfield-validationIcon");
|
|
305
363
|
let validationIcon = null;
|
|
306
|
-
if (validationState ===
|
|
364
|
+
if (validationState === "invalid" && !isDisabled) validationIcon = /*#__PURE__*/ (0, ($parcel$interopDefault($9kQ8p$react))).createElement((0, ($parcel$interopDefault($9kQ8p$spectrumiconsuiAlertMedium))), {
|
|
307
365
|
"data-testid": "invalid-icon",
|
|
308
366
|
UNSAFE_className: iconClass
|
|
309
367
|
});
|
|
310
|
-
else if (validationState ===
|
|
368
|
+
else if (validationState === "valid" && !isDisabled) validationIcon = /*#__PURE__*/ (0, ($parcel$interopDefault($9kQ8p$react))).createElement((0, ($parcel$interopDefault($9kQ8p$spectrumiconsuiCheckmarkMedium))), {
|
|
311
369
|
"data-testid": "valid-icon",
|
|
312
370
|
UNSAFE_className: iconClass
|
|
313
371
|
});
|
|
314
|
-
return
|
|
372
|
+
return /*#__PURE__*/ (0, ($parcel$interopDefault($9kQ8p$react))).createElement("div", {
|
|
315
373
|
role: "presentation",
|
|
316
|
-
...fieldProps,
|
|
374
|
+
...(0, $9kQ8p$reactariautils.mergeProps)(fieldProps, focusProps),
|
|
317
375
|
className: textfieldClass,
|
|
318
376
|
style: style
|
|
319
|
-
}, /*#__PURE__*/ ($parcel$interopDefault($9kQ8p$react)).createElement(
|
|
320
|
-
focusClass: $9kQ8p$reactspectrumutils.classNames((/*@__PURE__*/$parcel$interopDefault($40cb3a00c193680f$exports)), 'is-focused'),
|
|
321
|
-
focusRingClass: $9kQ8p$reactspectrumutils.classNames((/*@__PURE__*/$parcel$interopDefault($40cb3a00c193680f$exports)), 'focus-ring'),
|
|
322
|
-
isTextInput: true,
|
|
323
|
-
within: true
|
|
324
|
-
}, /*#__PURE__*/ ($parcel$interopDefault($9kQ8p$react)).createElement("div", {
|
|
377
|
+
}, /*#__PURE__*/ (0, ($parcel$interopDefault($9kQ8p$react))).createElement("div", {
|
|
325
378
|
role: "presentation",
|
|
326
379
|
className: inputClass
|
|
327
|
-
}, /*#__PURE__*/ ($parcel$interopDefault($9kQ8p$react)).createElement("div", {
|
|
380
|
+
}, /*#__PURE__*/ (0, ($parcel$interopDefault($9kQ8p$react))).createElement("div", {
|
|
328
381
|
role: "presentation",
|
|
329
|
-
className: $9kQ8p$reactspectrumutils.classNames((/*@__PURE__*/$parcel$interopDefault($91c3db8c6a21ca71$exports)),
|
|
330
|
-
ref: $9kQ8p$reactariautils.mergeRefs(ref, inputRef)
|
|
331
|
-
}, children))
|
|
382
|
+
className: (0, $9kQ8p$reactspectrumutils.classNames)((0, (/*@__PURE__*/$parcel$interopDefault($91c3db8c6a21ca71$exports))), "react-spectrum-Datepicker-inputContents"),
|
|
383
|
+
ref: (0, $9kQ8p$reactariautils.mergeRefs)(ref, inputRef)
|
|
384
|
+
}, children)), validationIcon);
|
|
332
385
|
}
|
|
333
|
-
const $c3ebc4931d9b9977$export$f5b8910cec6cf069 = /*#__PURE__*/ ($parcel$interopDefault($9kQ8p$react)).forwardRef($c3ebc4931d9b9977$var$Input);
|
|
386
|
+
const $c3ebc4931d9b9977$export$f5b8910cec6cf069 = /*#__PURE__*/ (0, ($parcel$interopDefault($9kQ8p$react))).forwardRef($c3ebc4931d9b9977$var$Input);
|
|
334
387
|
|
|
335
388
|
|
|
336
389
|
var $188c230fe6744622$exports = {};
|
|
@@ -650,10 +703,11 @@ $188c230fe6744622$exports = {
|
|
|
650
703
|
var $2f86633ce5b04f1e$exports = {};
|
|
651
704
|
|
|
652
705
|
$parcel$export($2f86633ce5b04f1e$exports, "spectrum-InputGroup", () => $2f86633ce5b04f1e$export$5be359c1227eedcb, (v) => $2f86633ce5b04f1e$export$5be359c1227eedcb = v);
|
|
706
|
+
$parcel$export($2f86633ce5b04f1e$exports, "focus-ring", () => $2f86633ce5b04f1e$export$f39a09f249340e2a, (v) => $2f86633ce5b04f1e$export$f39a09f249340e2a = v);
|
|
707
|
+
$parcel$export($2f86633ce5b04f1e$exports, "spectrum-InputGroup--quiet", () => $2f86633ce5b04f1e$export$ebf265ffc062029b, (v) => $2f86633ce5b04f1e$export$ebf265ffc062029b = v);
|
|
653
708
|
$parcel$export($2f86633ce5b04f1e$exports, "spectrum-FieldButton", () => $2f86633ce5b04f1e$export$a024c99ecf6b5741, (v) => $2f86633ce5b04f1e$export$a024c99ecf6b5741 = v);
|
|
654
709
|
$parcel$export($2f86633ce5b04f1e$exports, "is-disabled", () => $2f86633ce5b04f1e$export$d35bc1e505d1ebbf, (v) => $2f86633ce5b04f1e$export$d35bc1e505d1ebbf = v);
|
|
655
710
|
$parcel$export($2f86633ce5b04f1e$exports, "spectrum-InputGroup--invalid", () => $2f86633ce5b04f1e$export$3b48509739a9cda0, (v) => $2f86633ce5b04f1e$export$3b48509739a9cda0 = v);
|
|
656
|
-
$parcel$export($2f86633ce5b04f1e$exports, "spectrum-InputGroup--quiet", () => $2f86633ce5b04f1e$export$ebf265ffc062029b, (v) => $2f86633ce5b04f1e$export$ebf265ffc062029b = v);
|
|
657
711
|
$parcel$export($2f86633ce5b04f1e$exports, "spectrum-InputGroup-field", () => $2f86633ce5b04f1e$export$ea77459595e26bec, (v) => $2f86633ce5b04f1e$export$ea77459595e26bec = v);
|
|
658
712
|
$parcel$export($2f86633ce5b04f1e$exports, "spectrum-InputGroup-input-validationIcon", () => $2f86633ce5b04f1e$export$f7ab13ee113f4884, (v) => $2f86633ce5b04f1e$export$f7ab13ee113f4884 = v);
|
|
659
713
|
$parcel$export($2f86633ce5b04f1e$exports, "spectrum-InputGroup-input-circleLoader", () => $2f86633ce5b04f1e$export$dcc9e00cdad967fa, (v) => $2f86633ce5b04f1e$export$dcc9e00cdad967fa = v);
|
|
@@ -668,14 +722,14 @@ $parcel$export($2f86633ce5b04f1e$exports, "spectrum-Datepicker--rangeDash", () =
|
|
|
668
722
|
$parcel$export($2f86633ce5b04f1e$exports, "is-focused", () => $2f86633ce5b04f1e$export$e7dc768d35940237, (v) => $2f86633ce5b04f1e$export$e7dc768d35940237 = v);
|
|
669
723
|
$parcel$export($2f86633ce5b04f1e$exports, "spectrum-Datepicker-focusRing", () => $2f86633ce5b04f1e$export$eb262b15b9261fde, (v) => $2f86633ce5b04f1e$export$eb262b15b9261fde = v);
|
|
670
724
|
$parcel$export($2f86633ce5b04f1e$exports, "is-hovered", () => $2f86633ce5b04f1e$export$b8813cd5d7824ce7, (v) => $2f86633ce5b04f1e$export$b8813cd5d7824ce7 = v);
|
|
671
|
-
$parcel$export($2f86633ce5b04f1e$exports, "focus-ring", () => $2f86633ce5b04f1e$export$f39a09f249340e2a, (v) => $2f86633ce5b04f1e$export$f39a09f249340e2a = v);
|
|
672
725
|
$parcel$export($2f86633ce5b04f1e$exports, "is-selected", () => $2f86633ce5b04f1e$export$1e0fb04f31d3c22a, (v) => $2f86633ce5b04f1e$export$1e0fb04f31d3c22a = v);
|
|
673
726
|
$parcel$export($2f86633ce5b04f1e$exports, "spectrum-FieldButton--invalid", () => $2f86633ce5b04f1e$export$c9f503f672e8a3c1, (v) => $2f86633ce5b04f1e$export$c9f503f672e8a3c1 = v);
|
|
674
727
|
var $2f86633ce5b04f1e$export$5be359c1227eedcb;
|
|
728
|
+
var $2f86633ce5b04f1e$export$f39a09f249340e2a;
|
|
729
|
+
var $2f86633ce5b04f1e$export$ebf265ffc062029b;
|
|
675
730
|
var $2f86633ce5b04f1e$export$a024c99ecf6b5741;
|
|
676
731
|
var $2f86633ce5b04f1e$export$d35bc1e505d1ebbf;
|
|
677
732
|
var $2f86633ce5b04f1e$export$3b48509739a9cda0;
|
|
678
|
-
var $2f86633ce5b04f1e$export$ebf265ffc062029b;
|
|
679
733
|
var $2f86633ce5b04f1e$export$ea77459595e26bec;
|
|
680
734
|
var $2f86633ce5b04f1e$export$f7ab13ee113f4884;
|
|
681
735
|
var $2f86633ce5b04f1e$export$dcc9e00cdad967fa;
|
|
@@ -690,14 +744,14 @@ var $2f86633ce5b04f1e$export$202113e883898dc;
|
|
|
690
744
|
var $2f86633ce5b04f1e$export$e7dc768d35940237;
|
|
691
745
|
var $2f86633ce5b04f1e$export$eb262b15b9261fde;
|
|
692
746
|
var $2f86633ce5b04f1e$export$b8813cd5d7824ce7;
|
|
693
|
-
var $2f86633ce5b04f1e$export$f39a09f249340e2a;
|
|
694
747
|
var $2f86633ce5b04f1e$export$1e0fb04f31d3c22a;
|
|
695
748
|
var $2f86633ce5b04f1e$export$c9f503f672e8a3c1;
|
|
696
749
|
$2f86633ce5b04f1e$export$5be359c1227eedcb = "spectrum-InputGroup_a0942f";
|
|
750
|
+
$2f86633ce5b04f1e$export$f39a09f249340e2a = "focus-ring_a0942f";
|
|
751
|
+
$2f86633ce5b04f1e$export$ebf265ffc062029b = "spectrum-InputGroup--quiet_a0942f";
|
|
697
752
|
$2f86633ce5b04f1e$export$a024c99ecf6b5741 = "spectrum-FieldButton_a0942f";
|
|
698
753
|
$2f86633ce5b04f1e$export$d35bc1e505d1ebbf = "is-disabled_a0942f";
|
|
699
754
|
$2f86633ce5b04f1e$export$3b48509739a9cda0 = "spectrum-InputGroup--invalid_a0942f";
|
|
700
|
-
$2f86633ce5b04f1e$export$ebf265ffc062029b = "spectrum-InputGroup--quiet_a0942f";
|
|
701
755
|
$2f86633ce5b04f1e$export$ea77459595e26bec = "spectrum-InputGroup-field_a0942f";
|
|
702
756
|
$2f86633ce5b04f1e$export$f7ab13ee113f4884 = "spectrum-InputGroup-input-validationIcon_a0942f";
|
|
703
757
|
$2f86633ce5b04f1e$export$dcc9e00cdad967fa = "spectrum-InputGroup-input-circleLoader_a0942f";
|
|
@@ -712,18 +766,37 @@ $2f86633ce5b04f1e$export$202113e883898dc = "spectrum-Datepicker--rangeDash_a0942
|
|
|
712
766
|
$2f86633ce5b04f1e$export$e7dc768d35940237 = "is-focused_a0942f";
|
|
713
767
|
$2f86633ce5b04f1e$export$eb262b15b9261fde = "spectrum-Datepicker-focusRing_a0942f";
|
|
714
768
|
$2f86633ce5b04f1e$export$b8813cd5d7824ce7 = "is-hovered_a0942f";
|
|
715
|
-
$2f86633ce5b04f1e$export$f39a09f249340e2a = "focus-ring_a0942f";
|
|
716
769
|
$2f86633ce5b04f1e$export$1e0fb04f31d3c22a = "is-selected_a0942f";
|
|
717
770
|
$2f86633ce5b04f1e$export$c9f503f672e8a3c1 = "spectrum-FieldButton--invalid_a0942f";
|
|
718
771
|
|
|
719
772
|
|
|
773
|
+
/*
|
|
774
|
+
* Copyright 2020 Adobe. All rights reserved.
|
|
775
|
+
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
776
|
+
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
777
|
+
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
778
|
+
*
|
|
779
|
+
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
780
|
+
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
781
|
+
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
782
|
+
* governing permissions and limitations under the License.
|
|
783
|
+
*/
|
|
720
784
|
|
|
721
785
|
|
|
722
786
|
|
|
723
787
|
|
|
724
788
|
|
|
725
|
-
|
|
726
|
-
|
|
789
|
+
/*
|
|
790
|
+
* Copyright 2020 Adobe. All rights reserved.
|
|
791
|
+
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
792
|
+
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
793
|
+
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
794
|
+
*
|
|
795
|
+
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
796
|
+
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
797
|
+
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
798
|
+
* governing permissions and limitations under the License.
|
|
799
|
+
*/
|
|
727
800
|
|
|
728
801
|
|
|
729
802
|
|
|
@@ -731,17 +804,17 @@ $2f86633ce5b04f1e$export$c9f503f672e8a3c1 = "spectrum-FieldButton--invalid_a0942
|
|
|
731
804
|
|
|
732
805
|
|
|
733
806
|
function $4d2e419f522adb48$export$322f4580ccd8dde6(props) {
|
|
734
|
-
let formatter = $9kQ8p$reactariai18n.useDateFormatter({
|
|
735
|
-
dateStyle:
|
|
807
|
+
let formatter = (0, $9kQ8p$reactariai18n.useDateFormatter)({
|
|
808
|
+
dateStyle: "short"
|
|
736
809
|
});
|
|
737
|
-
let displayNames = $9kQ8p$reactariadatepicker.useDisplayNames();
|
|
738
|
-
return $9kQ8p$react.useMemo(()=>{
|
|
810
|
+
let displayNames = (0, $9kQ8p$reactariadatepicker.useDisplayNames)();
|
|
811
|
+
return (0, $9kQ8p$react.useMemo)(()=>{
|
|
739
812
|
if (props.description) return props.description;
|
|
740
813
|
if (props.showFormatHelpText) return formatter.formatToParts(new Date()).map((s)=>{
|
|
741
|
-
if (s.type ===
|
|
814
|
+
if (s.type === "literal") return s.value;
|
|
742
815
|
return displayNames.of(s.type);
|
|
743
|
-
}).join(
|
|
744
|
-
return
|
|
816
|
+
}).join(" ");
|
|
817
|
+
return "";
|
|
745
818
|
}, [
|
|
746
819
|
props.description,
|
|
747
820
|
props.showFormatHelpText,
|
|
@@ -750,15 +823,14 @@ function $4d2e419f522adb48$export$322f4580ccd8dde6(props) {
|
|
|
750
823
|
]);
|
|
751
824
|
}
|
|
752
825
|
function $4d2e419f522adb48$export$12ce2869ce471b1f(maxVisibleMonths) {
|
|
753
|
-
let { scale: scale } = $9kQ8p$reactspectrumprovider.useProvider();
|
|
754
|
-
let [visibleMonths, setVisibleMonths] = $9kQ8p$react.useState($4d2e419f522adb48$var$getVisibleMonths(scale));
|
|
755
|
-
$9kQ8p$reactariautils.useLayoutEffect(()=>{
|
|
756
|
-
let onResize = ()=>setVisibleMonths($4d2e419f522adb48$var$getVisibleMonths(scale))
|
|
757
|
-
;
|
|
826
|
+
let { scale: scale } = (0, $9kQ8p$reactspectrumprovider.useProvider)();
|
|
827
|
+
let [visibleMonths, setVisibleMonths] = (0, $9kQ8p$react.useState)($4d2e419f522adb48$var$getVisibleMonths(scale));
|
|
828
|
+
(0, $9kQ8p$reactariautils.useLayoutEffect)(()=>{
|
|
829
|
+
let onResize = ()=>setVisibleMonths($4d2e419f522adb48$var$getVisibleMonths(scale));
|
|
758
830
|
onResize();
|
|
759
|
-
window.addEventListener(
|
|
831
|
+
window.addEventListener("resize", onResize);
|
|
760
832
|
return ()=>{
|
|
761
|
-
window.removeEventListener(
|
|
833
|
+
window.removeEventListener("resize", onResize);
|
|
762
834
|
};
|
|
763
835
|
}, [
|
|
764
836
|
scale
|
|
@@ -766,23 +838,22 @@ function $4d2e419f522adb48$export$12ce2869ce471b1f(maxVisibleMonths) {
|
|
|
766
838
|
return Math.max(1, Math.min(visibleMonths, maxVisibleMonths, 3));
|
|
767
839
|
}
|
|
768
840
|
function $4d2e419f522adb48$var$getVisibleMonths(scale) {
|
|
769
|
-
if (typeof window ===
|
|
770
|
-
let monthWidth = scale ===
|
|
771
|
-
let gap = scale ===
|
|
772
|
-
let popoverPadding = scale ===
|
|
841
|
+
if (typeof window === "undefined") return 1;
|
|
842
|
+
let monthWidth = scale === "large" ? 336 : 280;
|
|
843
|
+
let gap = scale === "large" ? 30 : 24;
|
|
844
|
+
let popoverPadding = scale === "large" ? 32 : 48;
|
|
773
845
|
return Math.floor((window.innerWidth - popoverPadding * 2) / (monthWidth + gap));
|
|
774
846
|
}
|
|
775
847
|
function $4d2e419f522adb48$export$71a23a36270e4bf0(ref) {
|
|
776
|
-
let domRef = $9kQ8p$react.useRef();
|
|
777
|
-
$9kQ8p$react.useImperativeHandle(ref, ()=>({
|
|
778
|
-
|
|
848
|
+
let domRef = (0, $9kQ8p$react.useRef)();
|
|
849
|
+
(0, $9kQ8p$react.useImperativeHandle)(ref, ()=>({
|
|
850
|
+
...(0, $9kQ8p$reactspectrumutils.createDOMRef)(domRef),
|
|
779
851
|
focus () {
|
|
780
|
-
$9kQ8p$reactariafocus.createFocusManager(domRef).focusFirst({
|
|
852
|
+
(0, $9kQ8p$reactariafocus.createFocusManager)(domRef).focusFirst({
|
|
781
853
|
tabbable: true
|
|
782
854
|
});
|
|
783
855
|
}
|
|
784
|
-
})
|
|
785
|
-
);
|
|
856
|
+
}));
|
|
786
857
|
return domRef;
|
|
787
858
|
}
|
|
788
859
|
|
|
@@ -792,17 +863,17 @@ function $4d2e419f522adb48$export$71a23a36270e4bf0(ref) {
|
|
|
792
863
|
|
|
793
864
|
|
|
794
865
|
function $740ff83729a8f317$var$TimeField(props, ref) {
|
|
795
|
-
props = $9kQ8p$reactspectrumprovider.useProviderProps(props);
|
|
866
|
+
props = (0, $9kQ8p$reactspectrumprovider.useProviderProps)(props);
|
|
796
867
|
let { autoFocus: autoFocus , isDisabled: isDisabled , isReadOnly: isReadOnly , isRequired: isRequired , isQuiet: isQuiet } = props;
|
|
797
|
-
let domRef = $4d2e419f522adb48$export$71a23a36270e4bf0(ref);
|
|
798
|
-
let { locale: locale } = $9kQ8p$reactariai18n.useLocale();
|
|
799
|
-
let state = $9kQ8p$reactstatelydatepicker.useTimeFieldState({
|
|
868
|
+
let domRef = (0, $4d2e419f522adb48$export$71a23a36270e4bf0)(ref);
|
|
869
|
+
let { locale: locale } = (0, $9kQ8p$reactariai18n.useLocale)();
|
|
870
|
+
let state = (0, $9kQ8p$reactstatelydatepicker.useTimeFieldState)({
|
|
800
871
|
...props,
|
|
801
872
|
locale: locale
|
|
802
873
|
});
|
|
803
|
-
let inputRef = $9kQ8p$react.useRef(null);
|
|
804
|
-
let { labelProps: labelProps , fieldProps: fieldProps , descriptionProps: descriptionProps , errorMessageProps: errorMessageProps } = $9kQ8p$reactariadatepicker.useTimeField(props, state, inputRef);
|
|
805
|
-
return
|
|
874
|
+
let inputRef = (0, $9kQ8p$react.useRef)(null);
|
|
875
|
+
let { labelProps: labelProps , fieldProps: fieldProps , descriptionProps: descriptionProps , errorMessageProps: errorMessageProps } = (0, $9kQ8p$reactariadatepicker.useTimeField)(props, state, inputRef);
|
|
876
|
+
return /*#__PURE__*/ (0, ($parcel$interopDefault($9kQ8p$react))).createElement((0, $9kQ8p$reactspectrumlabel.Field), {
|
|
806
877
|
...props,
|
|
807
878
|
ref: domRef,
|
|
808
879
|
elementType: "span",
|
|
@@ -810,29 +881,28 @@ function $740ff83729a8f317$var$TimeField(props, ref) {
|
|
|
810
881
|
descriptionProps: descriptionProps,
|
|
811
882
|
errorMessageProps: errorMessageProps,
|
|
812
883
|
validationState: state.validationState,
|
|
813
|
-
UNSAFE_className: $9kQ8p$reactspectrumutils.classNames((/*@__PURE__*/$parcel$interopDefault($91c3db8c6a21ca71$exports)),
|
|
814
|
-
}, /*#__PURE__*/ ($parcel$interopDefault($9kQ8p$react)).createElement($c3ebc4931d9b9977$export$f5b8910cec6cf069, {
|
|
884
|
+
UNSAFE_className: (0, $9kQ8p$reactspectrumutils.classNames)((0, (/*@__PURE__*/$parcel$interopDefault($91c3db8c6a21ca71$exports))), "react-spectrum-TimeField-fieldWrapper")
|
|
885
|
+
}, /*#__PURE__*/ (0, ($parcel$interopDefault($9kQ8p$react))).createElement((0, $c3ebc4931d9b9977$export$f5b8910cec6cf069), {
|
|
815
886
|
ref: inputRef,
|
|
816
887
|
fieldProps: fieldProps,
|
|
817
888
|
isDisabled: isDisabled,
|
|
818
889
|
isQuiet: isQuiet,
|
|
819
890
|
autoFocus: autoFocus,
|
|
820
891
|
validationState: state.validationState,
|
|
821
|
-
className: $9kQ8p$reactspectrumutils.classNames((/*@__PURE__*/$parcel$interopDefault($91c3db8c6a21ca71$exports)),
|
|
822
|
-
}, state.segments.map((segment, i)=>/*#__PURE__*/ ($parcel$interopDefault($9kQ8p$react)).createElement($edac158d20ebe4a9$export$6388987c5223b54e, {
|
|
892
|
+
className: (0, $9kQ8p$reactspectrumutils.classNames)((0, (/*@__PURE__*/$parcel$interopDefault($91c3db8c6a21ca71$exports))), "react-spectrum-TimeField")
|
|
893
|
+
}, state.segments.map((segment, i)=>/*#__PURE__*/ (0, ($parcel$interopDefault($9kQ8p$react))).createElement((0, $edac158d20ebe4a9$export$6388987c5223b54e), {
|
|
823
894
|
key: i,
|
|
824
895
|
segment: segment,
|
|
825
896
|
state: state,
|
|
826
897
|
isDisabled: isDisabled,
|
|
827
898
|
isReadOnly: isReadOnly,
|
|
828
899
|
isRequired: isRequired
|
|
829
|
-
})
|
|
830
|
-
))));
|
|
900
|
+
}))));
|
|
831
901
|
}
|
|
832
902
|
/**
|
|
833
903
|
* TimeFields allow users to enter and edit time values using a keyboard.
|
|
834
904
|
* Each part of the time is displayed in an individually editable segment.
|
|
835
|
-
*/ const $740ff83729a8f317$export$5eaee2322dd727eb = /*#__PURE__*/ ($parcel$interopDefault($9kQ8p$react)).forwardRef($740ff83729a8f317$var$TimeField);
|
|
905
|
+
*/ const $740ff83729a8f317$export$5eaee2322dd727eb = /*#__PURE__*/ (0, ($parcel$interopDefault($9kQ8p$react))).forwardRef($740ff83729a8f317$var$TimeField);
|
|
836
906
|
|
|
837
907
|
|
|
838
908
|
|
|
@@ -843,55 +913,55 @@ function $740ff83729a8f317$var$TimeField(props, ref) {
|
|
|
843
913
|
|
|
844
914
|
|
|
845
915
|
function $5c1ddf85d7c27889$var$DatePicker(props, ref) {
|
|
846
|
-
props = $9kQ8p$reactspectrumprovider.useProviderProps(props);
|
|
916
|
+
props = (0, $9kQ8p$reactspectrumprovider.useProviderProps)(props);
|
|
847
917
|
let { autoFocus: autoFocus , isQuiet: isQuiet , isDisabled: isDisabled , isReadOnly: isReadOnly , placeholderValue: placeholderValue , maxVisibleMonths: maxVisibleMonths = 1 } = props;
|
|
848
|
-
let { hoverProps: hoverProps , isHovered: isHovered } = $9kQ8p$reactariainteractions.useHover({
|
|
918
|
+
let { hoverProps: hoverProps , isHovered: isHovered } = (0, $9kQ8p$reactariainteractions.useHover)({
|
|
849
919
|
isDisabled: isDisabled
|
|
850
920
|
});
|
|
851
|
-
let targetRef = $9kQ8p$react.useRef();
|
|
852
|
-
let state = $9kQ8p$reactstatelydatepicker.useDatePickerState({
|
|
921
|
+
let targetRef = (0, $9kQ8p$react.useRef)();
|
|
922
|
+
let state = (0, $9kQ8p$reactstatelydatepicker.useDatePickerState)({
|
|
853
923
|
...props,
|
|
854
924
|
shouldCloseOnSelect: ()=>!state.hasTime
|
|
855
925
|
});
|
|
856
|
-
let { groupProps: groupProps , labelProps: labelProps , fieldProps: fieldProps , descriptionProps: descriptionProps , errorMessageProps: errorMessageProps , buttonProps: buttonProps , dialogProps: dialogProps , calendarProps: calendarProps } = $9kQ8p$reactariadatepicker.useDatePicker(props, state, targetRef);
|
|
926
|
+
let { groupProps: groupProps , labelProps: labelProps , fieldProps: fieldProps , descriptionProps: descriptionProps , errorMessageProps: errorMessageProps , buttonProps: buttonProps , dialogProps: dialogProps , calendarProps: calendarProps } = (0, $9kQ8p$reactariadatepicker.useDatePicker)(props, state, targetRef);
|
|
857
927
|
let { isOpen: isOpen , setOpen: setOpen } = state;
|
|
858
|
-
let { direction: direction } = $9kQ8p$reactariai18n.useLocale();
|
|
859
|
-
let domRef = $4d2e419f522adb48$export$71a23a36270e4bf0(ref);
|
|
860
|
-
let stringFormatter = $9kQ8p$reactariai18n.useLocalizedStringFormatter((/*@__PURE__*/$parcel$interopDefault($188c230fe6744622$exports)));
|
|
861
|
-
let { isFocused: isFocused , isFocusVisible: isFocusVisible , focusProps: focusProps } = $9kQ8p$reactariafocus.useFocusRing({
|
|
928
|
+
let { direction: direction } = (0, $9kQ8p$reactariai18n.useLocale)();
|
|
929
|
+
let domRef = (0, $4d2e419f522adb48$export$71a23a36270e4bf0)(ref);
|
|
930
|
+
let stringFormatter = (0, $9kQ8p$reactariai18n.useLocalizedStringFormatter)((0, (/*@__PURE__*/$parcel$interopDefault($188c230fe6744622$exports))));
|
|
931
|
+
let { isFocused: isFocused , isFocusVisible: isFocusVisible , focusProps: focusProps } = (0, $9kQ8p$reactariafocus.useFocusRing)({
|
|
862
932
|
within: true,
|
|
863
933
|
isTextInput: true,
|
|
864
934
|
autoFocus: autoFocus
|
|
865
935
|
});
|
|
866
|
-
let { isFocused: isFocusedButton , focusProps: focusPropsButton } = $9kQ8p$reactariafocus.useFocusRing({
|
|
936
|
+
let { isFocused: isFocusedButton , focusProps: focusPropsButton } = (0, $9kQ8p$reactariafocus.useFocusRing)({
|
|
867
937
|
within: false,
|
|
868
938
|
isTextInput: false,
|
|
869
939
|
autoFocus: autoFocus
|
|
870
940
|
});
|
|
871
|
-
let className = $9kQ8p$reactspectrumutils.classNames((/*@__PURE__*/$parcel$interopDefault($2f86633ce5b04f1e$exports)),
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
941
|
+
let className = (0, $9kQ8p$reactspectrumutils.classNames)((0, (/*@__PURE__*/$parcel$interopDefault($2f86633ce5b04f1e$exports))), "spectrum-InputGroup", {
|
|
942
|
+
"spectrum-InputGroup--quiet": isQuiet,
|
|
943
|
+
"spectrum-InputGroup--invalid": state.validationState === "invalid" && !isDisabled,
|
|
944
|
+
"is-disabled": isDisabled,
|
|
945
|
+
"is-hovered": isHovered,
|
|
946
|
+
"is-focused": isFocused,
|
|
947
|
+
"focus-ring": isFocusVisible && !isFocusedButton
|
|
878
948
|
});
|
|
879
|
-
let fieldClassName = $9kQ8p$reactspectrumutils.classNames((/*@__PURE__*/$parcel$interopDefault($2f86633ce5b04f1e$exports)),
|
|
880
|
-
|
|
881
|
-
|
|
949
|
+
let fieldClassName = (0, $9kQ8p$reactspectrumutils.classNames)((0, (/*@__PURE__*/$parcel$interopDefault($2f86633ce5b04f1e$exports))), "spectrum-InputGroup-input", {
|
|
950
|
+
"is-disabled": isDisabled,
|
|
951
|
+
"is-invalid": state.validationState === "invalid" && !isDisabled
|
|
882
952
|
});
|
|
883
953
|
// Note: this description is intentionally not passed to useDatePicker.
|
|
884
954
|
// The format help text is unnecessary for screen reader users because each segment already has a label.
|
|
885
|
-
let description = $4d2e419f522adb48$export$322f4580ccd8dde6(props);
|
|
955
|
+
let description = (0, $4d2e419f522adb48$export$322f4580ccd8dde6)(props);
|
|
886
956
|
if (description && !props.description) descriptionProps.id = null;
|
|
887
957
|
let placeholder = placeholderValue;
|
|
888
|
-
let timePlaceholder = placeholder &&
|
|
889
|
-
let timeMinValue = props.minValue &&
|
|
890
|
-
let timeMaxValue = props.maxValue &&
|
|
891
|
-
let timeGranularity = state.granularity ===
|
|
958
|
+
let timePlaceholder = placeholder && "hour" in placeholder ? placeholder : null;
|
|
959
|
+
let timeMinValue = props.minValue && "hour" in props.minValue ? props.minValue : null;
|
|
960
|
+
let timeMaxValue = props.maxValue && "hour" in props.maxValue ? props.maxValue : null;
|
|
961
|
+
let timeGranularity = state.granularity === "hour" || state.granularity === "minute" || state.granularity === "second" ? state.granularity : null;
|
|
892
962
|
let showTimeField = !!timeGranularity;
|
|
893
|
-
let visibleMonths = $4d2e419f522adb48$export$12ce2869ce471b1f(maxVisibleMonths);
|
|
894
|
-
return
|
|
963
|
+
let visibleMonths = (0, $4d2e419f522adb48$export$12ce2869ce471b1f)(maxVisibleMonths);
|
|
964
|
+
return /*#__PURE__*/ (0, ($parcel$interopDefault($9kQ8p$react))).createElement((0, $9kQ8p$reactspectrumlabel.Field), {
|
|
895
965
|
...props,
|
|
896
966
|
ref: domRef,
|
|
897
967
|
elementType: "span",
|
|
@@ -900,51 +970,52 @@ function $5c1ddf85d7c27889$var$DatePicker(props, ref) {
|
|
|
900
970
|
descriptionProps: descriptionProps,
|
|
901
971
|
errorMessageProps: errorMessageProps,
|
|
902
972
|
validationState: state.validationState,
|
|
903
|
-
UNSAFE_className: $9kQ8p$reactspectrumutils.classNames((/*@__PURE__*/$parcel$interopDefault($91c3db8c6a21ca71$exports)),
|
|
904
|
-
}, /*#__PURE__*/ ($parcel$interopDefault($9kQ8p$react)).createElement("div", {
|
|
905
|
-
|
|
973
|
+
UNSAFE_className: (0, $9kQ8p$reactspectrumutils.classNames)((0, (/*@__PURE__*/$parcel$interopDefault($91c3db8c6a21ca71$exports))), "react-spectrum-Datepicker-fieldWrapper")
|
|
974
|
+
}, /*#__PURE__*/ (0, ($parcel$interopDefault($9kQ8p$react))).createElement("div", {
|
|
975
|
+
...(0, $9kQ8p$reactariautils.mergeProps)(groupProps, hoverProps, focusProps),
|
|
906
976
|
className: className,
|
|
907
977
|
ref: targetRef
|
|
908
|
-
}, /*#__PURE__*/ ($parcel$interopDefault($9kQ8p$react)).createElement($c3ebc4931d9b9977$export$f5b8910cec6cf069, {
|
|
978
|
+
}, /*#__PURE__*/ (0, ($parcel$interopDefault($9kQ8p$react))).createElement((0, $c3ebc4931d9b9977$export$f5b8910cec6cf069), {
|
|
909
979
|
isDisabled: isDisabled,
|
|
910
980
|
isQuiet: isQuiet,
|
|
911
981
|
validationState: state.validationState,
|
|
912
|
-
className: $9kQ8p$reactspectrumutils.classNames((/*@__PURE__*/$parcel$interopDefault($2f86633ce5b04f1e$exports)),
|
|
913
|
-
inputClassName: fieldClassName
|
|
914
|
-
|
|
982
|
+
className: (0, $9kQ8p$reactspectrumutils.classNames)((0, (/*@__PURE__*/$parcel$interopDefault($2f86633ce5b04f1e$exports))), "spectrum-InputGroup-field"),
|
|
983
|
+
inputClassName: fieldClassName,
|
|
984
|
+
disableFocusRing: true
|
|
985
|
+
}, /*#__PURE__*/ (0, ($parcel$interopDefault($9kQ8p$react))).createElement((0, $bd22dc8dad9522bc$export$34dc4cfa15ead1), {
|
|
915
986
|
...fieldProps,
|
|
916
987
|
"data-testid": "date-field",
|
|
917
988
|
isQuiet: isQuiet
|
|
918
|
-
})), /*#__PURE__*/ ($parcel$interopDefault($9kQ8p$react)).createElement($9kQ8p$reactspectrumdialog.DialogTrigger, {
|
|
989
|
+
})), /*#__PURE__*/ (0, ($parcel$interopDefault($9kQ8p$react))).createElement((0, $9kQ8p$reactspectrumdialog.DialogTrigger), {
|
|
919
990
|
type: "popover",
|
|
920
991
|
mobileType: "tray",
|
|
921
|
-
placement: direction ===
|
|
992
|
+
placement: direction === "rtl" ? "bottom right" : "bottom left",
|
|
922
993
|
targetRef: targetRef,
|
|
923
994
|
hideArrow: true,
|
|
924
995
|
isOpen: isOpen,
|
|
925
996
|
onOpenChange: setOpen,
|
|
926
997
|
shouldFlip: props.shouldFlip
|
|
927
|
-
}, /*#__PURE__*/ ($parcel$interopDefault($9kQ8p$react)).createElement($9kQ8p$reactspectrumbutton.FieldButton, {
|
|
928
|
-
|
|
929
|
-
UNSAFE_className: $9kQ8p$reactspectrumutils.classNames((/*@__PURE__*/$parcel$interopDefault($2f86633ce5b04f1e$exports)),
|
|
998
|
+
}, /*#__PURE__*/ (0, ($parcel$interopDefault($9kQ8p$react))).createElement((0, $9kQ8p$reactspectrumbutton.FieldButton), {
|
|
999
|
+
...(0, $9kQ8p$reactariautils.mergeProps)(buttonProps, focusPropsButton),
|
|
1000
|
+
UNSAFE_className: (0, $9kQ8p$reactspectrumutils.classNames)((0, (/*@__PURE__*/$parcel$interopDefault($2f86633ce5b04f1e$exports))), "spectrum-FieldButton"),
|
|
930
1001
|
isQuiet: isQuiet,
|
|
931
1002
|
validationState: state.validationState,
|
|
932
1003
|
isDisabled: isDisabled || isReadOnly
|
|
933
|
-
}, /*#__PURE__*/ ($parcel$interopDefault($9kQ8p$react)).createElement(($parcel$interopDefault($9kQ8p$spectrumiconsworkflowCalendar)), null)), /*#__PURE__*/ ($parcel$interopDefault($9kQ8p$react)).createElement($9kQ8p$reactspectrumdialog.Dialog, {
|
|
934
|
-
UNSAFE_className: $9kQ8p$reactspectrumutils.classNames((/*@__PURE__*/$parcel$interopDefault($91c3db8c6a21ca71$exports)),
|
|
1004
|
+
}, /*#__PURE__*/ (0, ($parcel$interopDefault($9kQ8p$react))).createElement((0, ($parcel$interopDefault($9kQ8p$spectrumiconsworkflowCalendar))), null)), /*#__PURE__*/ (0, ($parcel$interopDefault($9kQ8p$react))).createElement((0, $9kQ8p$reactspectrumdialog.Dialog), {
|
|
1005
|
+
UNSAFE_className: (0, $9kQ8p$reactspectrumutils.classNames)((0, (/*@__PURE__*/$parcel$interopDefault($91c3db8c6a21ca71$exports))), "react-spectrum-Datepicker-dialog"),
|
|
935
1006
|
...dialogProps
|
|
936
|
-
}, /*#__PURE__*/ ($parcel$interopDefault($9kQ8p$react)).createElement($9kQ8p$reactspectrumview.Content, null, /*#__PURE__*/ ($parcel$interopDefault($9kQ8p$react)).createElement("div", {
|
|
937
|
-
className: $9kQ8p$reactspectrumutils.classNames((/*@__PURE__*/$parcel$interopDefault($91c3db8c6a21ca71$exports)),
|
|
938
|
-
}, /*#__PURE__*/ ($parcel$interopDefault($9kQ8p$react)).createElement($9kQ8p$reactspectrumcalendar.Calendar, {
|
|
1007
|
+
}, /*#__PURE__*/ (0, ($parcel$interopDefault($9kQ8p$react))).createElement((0, $9kQ8p$reactspectrumview.Content), null, /*#__PURE__*/ (0, ($parcel$interopDefault($9kQ8p$react))).createElement("div", {
|
|
1008
|
+
className: (0, $9kQ8p$reactspectrumutils.classNames)((0, (/*@__PURE__*/$parcel$interopDefault($91c3db8c6a21ca71$exports))), "react-spectrum-Datepicker-dialogContent")
|
|
1009
|
+
}, /*#__PURE__*/ (0, ($parcel$interopDefault($9kQ8p$react))).createElement((0, $9kQ8p$reactspectrumcalendar.Calendar), {
|
|
939
1010
|
...calendarProps,
|
|
940
1011
|
visibleMonths: visibleMonths,
|
|
941
|
-
UNSAFE_className: $9kQ8p$reactspectrumutils.classNames((/*@__PURE__*/$parcel$interopDefault($91c3db8c6a21ca71$exports)),
|
|
942
|
-
|
|
1012
|
+
UNSAFE_className: (0, $9kQ8p$reactspectrumutils.classNames)((0, (/*@__PURE__*/$parcel$interopDefault($91c3db8c6a21ca71$exports))), "react-spectrum-Datepicker-calendar", {
|
|
1013
|
+
"is-invalid": state.validationState === "invalid"
|
|
943
1014
|
})
|
|
944
|
-
}), showTimeField && /*#__PURE__*/ ($parcel$interopDefault($9kQ8p$react)).createElement("div", {
|
|
945
|
-
className: $9kQ8p$reactspectrumutils.classNames((/*@__PURE__*/$parcel$interopDefault($91c3db8c6a21ca71$exports)),
|
|
946
|
-
}, /*#__PURE__*/ ($parcel$interopDefault($9kQ8p$react)).createElement($740ff83729a8f317$export$5eaee2322dd727eb, {
|
|
947
|
-
label: stringFormatter.format(
|
|
1015
|
+
}), showTimeField && /*#__PURE__*/ (0, ($parcel$interopDefault($9kQ8p$react))).createElement("div", {
|
|
1016
|
+
className: (0, $9kQ8p$reactspectrumutils.classNames)((0, (/*@__PURE__*/$parcel$interopDefault($91c3db8c6a21ca71$exports))), "react-spectrum-Datepicker-timeFields")
|
|
1017
|
+
}, /*#__PURE__*/ (0, ($parcel$interopDefault($9kQ8p$react))).createElement((0, $740ff83729a8f317$export$5eaee2322dd727eb), {
|
|
1018
|
+
label: stringFormatter.format("time"),
|
|
948
1019
|
value: state.timeValue,
|
|
949
1020
|
onChange: state.setTimeValue,
|
|
950
1021
|
placeholderValue: timePlaceholder,
|
|
@@ -954,14 +1025,24 @@ function $5c1ddf85d7c27889$var$DatePicker(props, ref) {
|
|
|
954
1025
|
hourCycle: props.hourCycle,
|
|
955
1026
|
hideTimeZone: props.hideTimeZone,
|
|
956
1027
|
marginTop: "size-100"
|
|
957
|
-
}))))))))
|
|
1028
|
+
}))))))));
|
|
958
1029
|
}
|
|
959
1030
|
/**
|
|
960
1031
|
* DatePickers combine a DateField and a Calendar popover to allow users to enter or select a date and time value.
|
|
961
|
-
*/ const $5c1ddf85d7c27889$export$5109c6dd95d8fb00 = /*#__PURE__*/ ($parcel$interopDefault($9kQ8p$react)).forwardRef($5c1ddf85d7c27889$var$DatePicker);
|
|
962
|
-
|
|
1032
|
+
*/ const $5c1ddf85d7c27889$export$5109c6dd95d8fb00 = /*#__PURE__*/ (0, ($parcel$interopDefault($9kQ8p$react))).forwardRef($5c1ddf85d7c27889$var$DatePicker);
|
|
963
1033
|
|
|
964
1034
|
|
|
1035
|
+
/*
|
|
1036
|
+
* Copyright 2020 Adobe. All rights reserved.
|
|
1037
|
+
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
1038
|
+
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
1039
|
+
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
1040
|
+
*
|
|
1041
|
+
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
1042
|
+
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
1043
|
+
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
1044
|
+
* governing permissions and limitations under the License.
|
|
1045
|
+
*/
|
|
965
1046
|
|
|
966
1047
|
|
|
967
1048
|
|
|
@@ -985,56 +1066,56 @@ function $5c1ddf85d7c27889$var$DatePicker(props, ref) {
|
|
|
985
1066
|
|
|
986
1067
|
|
|
987
1068
|
function $16cafb71dac155a4$var$DateRangePicker(props, ref) {
|
|
988
|
-
var
|
|
989
|
-
props = $9kQ8p$reactspectrumprovider.useProviderProps(props);
|
|
1069
|
+
var _state_timeRange, _state_timeRange1;
|
|
1070
|
+
props = (0, $9kQ8p$reactspectrumprovider.useProviderProps)(props);
|
|
990
1071
|
let { isQuiet: isQuiet , isDisabled: isDisabled , isReadOnly: isReadOnly , autoFocus: autoFocus , placeholderValue: placeholderValue , maxVisibleMonths: maxVisibleMonths = 1 } = props;
|
|
991
|
-
let { hoverProps: hoverProps , isHovered: isHovered } = $9kQ8p$reactariainteractions.useHover({
|
|
1072
|
+
let { hoverProps: hoverProps , isHovered: isHovered } = (0, $9kQ8p$reactariainteractions.useHover)({
|
|
992
1073
|
isDisabled: isDisabled
|
|
993
1074
|
});
|
|
994
|
-
let targetRef = $9kQ8p$react.useRef();
|
|
995
|
-
let state = $9kQ8p$reactstatelydatepicker.useDateRangePickerState({
|
|
1075
|
+
let targetRef = (0, $9kQ8p$react.useRef)();
|
|
1076
|
+
let state = (0, $9kQ8p$reactstatelydatepicker.useDateRangePickerState)({
|
|
996
1077
|
...props,
|
|
997
1078
|
shouldCloseOnSelect: ()=>!state.hasTime
|
|
998
1079
|
});
|
|
999
|
-
let { labelProps: labelProps , groupProps: groupProps , buttonProps: buttonProps , dialogProps: dialogProps , startFieldProps: startFieldProps , endFieldProps: endFieldProps , descriptionProps: descriptionProps , errorMessageProps: errorMessageProps , calendarProps: calendarProps } = $9kQ8p$reactariadatepicker.useDateRangePicker(props, state, targetRef);
|
|
1080
|
+
let { labelProps: labelProps , groupProps: groupProps , buttonProps: buttonProps , dialogProps: dialogProps , startFieldProps: startFieldProps , endFieldProps: endFieldProps , descriptionProps: descriptionProps , errorMessageProps: errorMessageProps , calendarProps: calendarProps } = (0, $9kQ8p$reactariadatepicker.useDateRangePicker)(props, state, targetRef);
|
|
1000
1081
|
let { isOpen: isOpen , setOpen: setOpen } = state;
|
|
1001
|
-
let { direction: direction } = $9kQ8p$reactariai18n.useLocale();
|
|
1002
|
-
let domRef = $4d2e419f522adb48$export$71a23a36270e4bf0(ref);
|
|
1003
|
-
let stringFormatter = $9kQ8p$reactariai18n.useLocalizedStringFormatter((/*@__PURE__*/$parcel$interopDefault($188c230fe6744622$exports)));
|
|
1004
|
-
let { isFocused: isFocused , isFocusVisible: isFocusVisible , focusProps: focusProps } = $9kQ8p$reactariafocus.useFocusRing({
|
|
1082
|
+
let { direction: direction } = (0, $9kQ8p$reactariai18n.useLocale)();
|
|
1083
|
+
let domRef = (0, $4d2e419f522adb48$export$71a23a36270e4bf0)(ref);
|
|
1084
|
+
let stringFormatter = (0, $9kQ8p$reactariai18n.useLocalizedStringFormatter)((0, (/*@__PURE__*/$parcel$interopDefault($188c230fe6744622$exports))));
|
|
1085
|
+
let { isFocused: isFocused , isFocusVisible: isFocusVisible , focusProps: focusProps } = (0, $9kQ8p$reactariafocus.useFocusRing)({
|
|
1005
1086
|
within: true,
|
|
1006
1087
|
isTextInput: true,
|
|
1007
1088
|
autoFocus: autoFocus
|
|
1008
1089
|
});
|
|
1009
|
-
let { isFocused: isFocusedButton , focusProps: focusPropsButton } = $9kQ8p$reactariafocus.useFocusRing({
|
|
1090
|
+
let { isFocused: isFocusedButton , focusProps: focusPropsButton } = (0, $9kQ8p$reactariafocus.useFocusRing)({
|
|
1010
1091
|
within: false,
|
|
1011
1092
|
isTextInput: false,
|
|
1012
1093
|
autoFocus: autoFocus
|
|
1013
1094
|
});
|
|
1014
|
-
let className = $9kQ8p$reactspectrumutils.classNames((/*@__PURE__*/$parcel$interopDefault($2f86633ce5b04f1e$exports)),
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1095
|
+
let className = (0, $9kQ8p$reactspectrumutils.classNames)((0, (/*@__PURE__*/$parcel$interopDefault($2f86633ce5b04f1e$exports))), "spectrum-InputGroup", {
|
|
1096
|
+
"spectrum-InputGroup--quiet": isQuiet,
|
|
1097
|
+
"spectrum-InputGroup--invalid": state.validationState === "invalid" && !isDisabled,
|
|
1098
|
+
"is-disabled": isDisabled,
|
|
1099
|
+
"is-hovered": isHovered,
|
|
1100
|
+
"is-focused": isFocused,
|
|
1101
|
+
"focus-ring": isFocusVisible && !isFocusedButton
|
|
1021
1102
|
});
|
|
1022
|
-
let fieldClassName = $9kQ8p$reactspectrumutils.classNames((/*@__PURE__*/$parcel$interopDefault($2f86633ce5b04f1e$exports)),
|
|
1023
|
-
|
|
1024
|
-
|
|
1103
|
+
let fieldClassName = (0, $9kQ8p$reactspectrumutils.classNames)((0, (/*@__PURE__*/$parcel$interopDefault($2f86633ce5b04f1e$exports))), "spectrum-InputGroup-input", {
|
|
1104
|
+
"is-disabled": isDisabled,
|
|
1105
|
+
"is-invalid": state.validationState === "invalid" && !isDisabled
|
|
1025
1106
|
});
|
|
1026
1107
|
// Note: this description is intentionally not passed to useDatePicker.
|
|
1027
1108
|
// The format help text is unnecessary for screen reader users because each segment already has a label.
|
|
1028
|
-
let description = $4d2e419f522adb48$export$322f4580ccd8dde6(props);
|
|
1109
|
+
let description = (0, $4d2e419f522adb48$export$322f4580ccd8dde6)(props);
|
|
1029
1110
|
if (description && !props.description) descriptionProps.id = null;
|
|
1030
1111
|
let placeholder = placeholderValue;
|
|
1031
|
-
let timePlaceholder = placeholder &&
|
|
1032
|
-
let timeMinValue = props.minValue &&
|
|
1033
|
-
let timeMaxValue = props.maxValue &&
|
|
1034
|
-
let timeGranularity = state.granularity ===
|
|
1112
|
+
let timePlaceholder = placeholder && "hour" in placeholder ? placeholder : null;
|
|
1113
|
+
let timeMinValue = props.minValue && "hour" in props.minValue ? props.minValue : null;
|
|
1114
|
+
let timeMaxValue = props.maxValue && "hour" in props.maxValue ? props.maxValue : null;
|
|
1115
|
+
let timeGranularity = state.granularity === "hour" || state.granularity === "minute" || state.granularity === "second" ? state.granularity : null;
|
|
1035
1116
|
let showTimeField = !!timeGranularity;
|
|
1036
|
-
let visibleMonths = $4d2e419f522adb48$export$12ce2869ce471b1f(maxVisibleMonths);
|
|
1037
|
-
return
|
|
1117
|
+
let visibleMonths = (0, $4d2e419f522adb48$export$12ce2869ce471b1f)(maxVisibleMonths);
|
|
1118
|
+
return /*#__PURE__*/ (0, ($parcel$interopDefault($9kQ8p$react))).createElement((0, $9kQ8p$reactspectrumlabel.Field), {
|
|
1038
1119
|
...props,
|
|
1039
1120
|
ref: domRef,
|
|
1040
1121
|
elementType: "span",
|
|
@@ -1043,62 +1124,62 @@ function $16cafb71dac155a4$var$DateRangePicker(props, ref) {
|
|
|
1043
1124
|
descriptionProps: descriptionProps,
|
|
1044
1125
|
errorMessageProps: errorMessageProps,
|
|
1045
1126
|
validationState: state.validationState,
|
|
1046
|
-
UNSAFE_className: $9kQ8p$reactspectrumutils.classNames((/*@__PURE__*/$parcel$interopDefault($91c3db8c6a21ca71$exports)),
|
|
1047
|
-
}, /*#__PURE__*/ ($parcel$interopDefault($9kQ8p$react)).createElement("div", {
|
|
1048
|
-
|
|
1127
|
+
UNSAFE_className: (0, $9kQ8p$reactspectrumutils.classNames)((0, (/*@__PURE__*/$parcel$interopDefault($91c3db8c6a21ca71$exports))), "react-spectrum-Datepicker-fieldWrapper")
|
|
1128
|
+
}, /*#__PURE__*/ (0, ($parcel$interopDefault($9kQ8p$react))).createElement("div", {
|
|
1129
|
+
...(0, $9kQ8p$reactariautils.mergeProps)(groupProps, hoverProps, focusProps),
|
|
1049
1130
|
className: className,
|
|
1050
1131
|
ref: targetRef
|
|
1051
|
-
}, /*#__PURE__*/ ($parcel$interopDefault($9kQ8p$react)).createElement($c3ebc4931d9b9977$export$f5b8910cec6cf069, {
|
|
1132
|
+
}, /*#__PURE__*/ (0, ($parcel$interopDefault($9kQ8p$react))).createElement((0, $c3ebc4931d9b9977$export$f5b8910cec6cf069), {
|
|
1052
1133
|
isDisabled: isDisabled,
|
|
1053
1134
|
isQuiet: isQuiet,
|
|
1054
1135
|
validationState: state.validationState,
|
|
1055
|
-
className: $9kQ8p$reactspectrumutils.classNames((/*@__PURE__*/$parcel$interopDefault($2f86633ce5b04f1e$exports)),
|
|
1056
|
-
inputClassName: fieldClassName
|
|
1057
|
-
|
|
1136
|
+
className: (0, $9kQ8p$reactspectrumutils.classNames)((0, (/*@__PURE__*/$parcel$interopDefault($2f86633ce5b04f1e$exports))), "spectrum-InputGroup-field"),
|
|
1137
|
+
inputClassName: fieldClassName,
|
|
1138
|
+
disableFocusRing: true
|
|
1139
|
+
}, /*#__PURE__*/ (0, ($parcel$interopDefault($9kQ8p$react))).createElement((0, $bd22dc8dad9522bc$export$34dc4cfa15ead1), {
|
|
1058
1140
|
...startFieldProps,
|
|
1059
1141
|
"data-testid": "start-date",
|
|
1060
1142
|
isQuiet: props.isQuiet,
|
|
1061
|
-
inputClassName: $9kQ8p$reactspectrumutils.classNames((/*@__PURE__*/$parcel$interopDefault($91c3db8c6a21ca71$exports)),
|
|
1062
|
-
}), /*#__PURE__*/ ($parcel$interopDefault($9kQ8p$react)).createElement($16cafb71dac155a4$var$DateRangeDash, null), /*#__PURE__*/ ($parcel$interopDefault($9kQ8p$react)).createElement($bd22dc8dad9522bc$export$34dc4cfa15ead1, {
|
|
1143
|
+
inputClassName: (0, $9kQ8p$reactspectrumutils.classNames)((0, (/*@__PURE__*/$parcel$interopDefault($91c3db8c6a21ca71$exports))), "react-spectrum-Datepicker-startField")
|
|
1144
|
+
}), /*#__PURE__*/ (0, ($parcel$interopDefault($9kQ8p$react))).createElement($16cafb71dac155a4$var$DateRangeDash, null), /*#__PURE__*/ (0, ($parcel$interopDefault($9kQ8p$react))).createElement((0, $bd22dc8dad9522bc$export$34dc4cfa15ead1), {
|
|
1063
1145
|
...endFieldProps,
|
|
1064
1146
|
"data-testid": "end-date",
|
|
1065
1147
|
isQuiet: props.isQuiet,
|
|
1066
|
-
inputClassName: $9kQ8p$reactspectrumutils.classNames((/*@__PURE__*/$parcel$interopDefault($2f86633ce5b04f1e$exports)),
|
|
1067
|
-
})), /*#__PURE__*/ ($parcel$interopDefault($9kQ8p$react)).createElement($9kQ8p$reactspectrumdialog.DialogTrigger, {
|
|
1148
|
+
inputClassName: (0, $9kQ8p$reactspectrumutils.classNames)((0, (/*@__PURE__*/$parcel$interopDefault($2f86633ce5b04f1e$exports))), "spectrum-Datepicker-endField", (0, $9kQ8p$reactspectrumutils.classNames)((0, (/*@__PURE__*/$parcel$interopDefault($91c3db8c6a21ca71$exports))), "react-spectrum-Datepicker-endField"))
|
|
1149
|
+
})), /*#__PURE__*/ (0, ($parcel$interopDefault($9kQ8p$react))).createElement((0, $9kQ8p$reactspectrumdialog.DialogTrigger), {
|
|
1068
1150
|
type: "popover",
|
|
1069
1151
|
mobileType: "tray",
|
|
1070
|
-
placement: direction ===
|
|
1152
|
+
placement: direction === "rtl" ? "bottom right" : "bottom left",
|
|
1071
1153
|
targetRef: targetRef,
|
|
1072
1154
|
hideArrow: true,
|
|
1073
1155
|
isOpen: isOpen,
|
|
1074
1156
|
onOpenChange: setOpen,
|
|
1075
1157
|
shouldFlip: props.shouldFlip
|
|
1076
|
-
}, /*#__PURE__*/ ($parcel$interopDefault($9kQ8p$react)).createElement($9kQ8p$reactspectrumbutton.FieldButton, {
|
|
1077
|
-
|
|
1078
|
-
UNSAFE_className: $9kQ8p$reactspectrumutils.classNames((/*@__PURE__*/$parcel$interopDefault($2f86633ce5b04f1e$exports)),
|
|
1158
|
+
}, /*#__PURE__*/ (0, ($parcel$interopDefault($9kQ8p$react))).createElement((0, $9kQ8p$reactspectrumbutton.FieldButton), {
|
|
1159
|
+
...(0, $9kQ8p$reactariautils.mergeProps)(buttonProps, focusPropsButton),
|
|
1160
|
+
UNSAFE_className: (0, $9kQ8p$reactspectrumutils.classNames)((0, (/*@__PURE__*/$parcel$interopDefault($2f86633ce5b04f1e$exports))), "spectrum-FieldButton"),
|
|
1079
1161
|
isQuiet: isQuiet,
|
|
1080
1162
|
validationState: state.validationState,
|
|
1081
1163
|
isDisabled: isDisabled || isReadOnly
|
|
1082
|
-
}, /*#__PURE__*/ ($parcel$interopDefault($9kQ8p$react)).createElement(($parcel$interopDefault($9kQ8p$spectrumiconsworkflowCalendar)), null)), /*#__PURE__*/ ($parcel$interopDefault($9kQ8p$react)).createElement($9kQ8p$reactspectrumdialog.Dialog, {
|
|
1083
|
-
UNSAFE_className: $9kQ8p$reactspectrumutils.classNames((/*@__PURE__*/$parcel$interopDefault($91c3db8c6a21ca71$exports)),
|
|
1164
|
+
}, /*#__PURE__*/ (0, ($parcel$interopDefault($9kQ8p$react))).createElement((0, ($parcel$interopDefault($9kQ8p$spectrumiconsworkflowCalendar))), null)), /*#__PURE__*/ (0, ($parcel$interopDefault($9kQ8p$react))).createElement((0, $9kQ8p$reactspectrumdialog.Dialog), {
|
|
1165
|
+
UNSAFE_className: (0, $9kQ8p$reactspectrumutils.classNames)((0, (/*@__PURE__*/$parcel$interopDefault($91c3db8c6a21ca71$exports))), "react-spectrum-Datepicker-dialog"),
|
|
1084
1166
|
...dialogProps
|
|
1085
|
-
}, /*#__PURE__*/ ($parcel$interopDefault($9kQ8p$react)).createElement($9kQ8p$reactspectrumview.Content, null, /*#__PURE__*/ ($parcel$interopDefault($9kQ8p$react)).createElement("div", {
|
|
1086
|
-
className: $9kQ8p$reactspectrumutils.classNames((/*@__PURE__*/$parcel$interopDefault($91c3db8c6a21ca71$exports)),
|
|
1087
|
-
}, /*#__PURE__*/ ($parcel$interopDefault($9kQ8p$react)).createElement($9kQ8p$reactspectrumcalendar.RangeCalendar, {
|
|
1167
|
+
}, /*#__PURE__*/ (0, ($parcel$interopDefault($9kQ8p$react))).createElement((0, $9kQ8p$reactspectrumview.Content), null, /*#__PURE__*/ (0, ($parcel$interopDefault($9kQ8p$react))).createElement("div", {
|
|
1168
|
+
className: (0, $9kQ8p$reactspectrumutils.classNames)((0, (/*@__PURE__*/$parcel$interopDefault($91c3db8c6a21ca71$exports))), "react-spectrum-Datepicker-dialogContent")
|
|
1169
|
+
}, /*#__PURE__*/ (0, ($parcel$interopDefault($9kQ8p$react))).createElement((0, $9kQ8p$reactspectrumcalendar.RangeCalendar), {
|
|
1088
1170
|
...calendarProps,
|
|
1089
1171
|
visibleMonths: visibleMonths,
|
|
1090
|
-
UNSAFE_className: $9kQ8p$reactspectrumutils.classNames((/*@__PURE__*/$parcel$interopDefault($91c3db8c6a21ca71$exports)),
|
|
1091
|
-
|
|
1172
|
+
UNSAFE_className: (0, $9kQ8p$reactspectrumutils.classNames)((0, (/*@__PURE__*/$parcel$interopDefault($91c3db8c6a21ca71$exports))), "react-spectrum-Datepicker-calendar", {
|
|
1173
|
+
"is-invalid": state.validationState === "invalid"
|
|
1092
1174
|
})
|
|
1093
|
-
}), showTimeField && /*#__PURE__*/ ($parcel$interopDefault($9kQ8p$react)).createElement($9kQ8p$reactspectrumlayout.Flex, {
|
|
1175
|
+
}), showTimeField && /*#__PURE__*/ (0, ($parcel$interopDefault($9kQ8p$react))).createElement((0, $9kQ8p$reactspectrumlayout.Flex), {
|
|
1094
1176
|
gap: "size-100",
|
|
1095
1177
|
marginTop: "size-100",
|
|
1096
|
-
UNSAFE_className: $9kQ8p$reactspectrumutils.classNames((/*@__PURE__*/$parcel$interopDefault($91c3db8c6a21ca71$exports)),
|
|
1097
|
-
}, /*#__PURE__*/ ($parcel$interopDefault($9kQ8p$react)).createElement($740ff83729a8f317$export$5eaee2322dd727eb, {
|
|
1098
|
-
label: stringFormatter.format(
|
|
1099
|
-
value: ((
|
|
1100
|
-
onChange: (v)=>state.setTime(
|
|
1101
|
-
,
|
|
1178
|
+
UNSAFE_className: (0, $9kQ8p$reactspectrumutils.classNames)((0, (/*@__PURE__*/$parcel$interopDefault($91c3db8c6a21ca71$exports))), "react-spectrum-Datepicker-timeFields")
|
|
1179
|
+
}, /*#__PURE__*/ (0, ($parcel$interopDefault($9kQ8p$react))).createElement((0, $740ff83729a8f317$export$5eaee2322dd727eb), {
|
|
1180
|
+
label: stringFormatter.format("startTime"),
|
|
1181
|
+
value: ((_state_timeRange = state.timeRange) === null || _state_timeRange === void 0 ? void 0 : _state_timeRange.start) || null,
|
|
1182
|
+
onChange: (v)=>state.setTime("start", v),
|
|
1102
1183
|
placeholderValue: timePlaceholder,
|
|
1103
1184
|
granularity: timeGranularity,
|
|
1104
1185
|
minValue: timeMinValue,
|
|
@@ -1106,11 +1187,10 @@ function $16cafb71dac155a4$var$DateRangePicker(props, ref) {
|
|
|
1106
1187
|
hourCycle: props.hourCycle,
|
|
1107
1188
|
hideTimeZone: props.hideTimeZone,
|
|
1108
1189
|
flex: true
|
|
1109
|
-
}), /*#__PURE__*/ ($parcel$interopDefault($9kQ8p$react)).createElement($740ff83729a8f317$export$5eaee2322dd727eb, {
|
|
1110
|
-
label: stringFormatter.format(
|
|
1111
|
-
value: ((
|
|
1112
|
-
onChange: (v)=>state.setTime(
|
|
1113
|
-
,
|
|
1190
|
+
}), /*#__PURE__*/ (0, ($parcel$interopDefault($9kQ8p$react))).createElement((0, $740ff83729a8f317$export$5eaee2322dd727eb), {
|
|
1191
|
+
label: stringFormatter.format("endTime"),
|
|
1192
|
+
value: ((_state_timeRange1 = state.timeRange) === null || _state_timeRange1 === void 0 ? void 0 : _state_timeRange1.end) || null,
|
|
1193
|
+
onChange: (v)=>state.setTime("end", v),
|
|
1114
1194
|
placeholderValue: timePlaceholder,
|
|
1115
1195
|
granularity: timeGranularity,
|
|
1116
1196
|
minValue: timeMinValue,
|
|
@@ -1118,23 +1198,33 @@ function $16cafb71dac155a4$var$DateRangePicker(props, ref) {
|
|
|
1118
1198
|
hourCycle: props.hourCycle,
|
|
1119
1199
|
hideTimeZone: props.hideTimeZone,
|
|
1120
1200
|
flex: true
|
|
1121
|
-
}))))))))
|
|
1201
|
+
}))))))));
|
|
1122
1202
|
}
|
|
1123
1203
|
function $16cafb71dac155a4$var$DateRangeDash() {
|
|
1124
|
-
return
|
|
1204
|
+
return /*#__PURE__*/ (0, ($parcel$interopDefault($9kQ8p$react))).createElement("div", {
|
|
1125
1205
|
"aria-hidden": "true",
|
|
1126
1206
|
"data-testid": "date-range-dash",
|
|
1127
|
-
className: $9kQ8p$reactspectrumutils.classNames((/*@__PURE__*/$parcel$interopDefault($91c3db8c6a21ca71$exports)),
|
|
1128
|
-
})
|
|
1207
|
+
className: (0, $9kQ8p$reactspectrumutils.classNames)((0, (/*@__PURE__*/$parcel$interopDefault($91c3db8c6a21ca71$exports))), "react-spectrum-Datepicker-rangeDash")
|
|
1208
|
+
});
|
|
1129
1209
|
}
|
|
1130
1210
|
/**
|
|
1131
1211
|
* DateRangePickers combine two DateFields and a RangeCalendar popover to allow users
|
|
1132
1212
|
* to enter or select a date and time range.
|
|
1133
|
-
*/ const $16cafb71dac155a4$export$17334619f3ac2224 = /*#__PURE__*/ ($parcel$interopDefault($9kQ8p$react)).forwardRef($16cafb71dac155a4$var$DateRangePicker);
|
|
1134
|
-
|
|
1213
|
+
*/ const $16cafb71dac155a4$export$17334619f3ac2224 = /*#__PURE__*/ (0, ($parcel$interopDefault($9kQ8p$react))).forwardRef($16cafb71dac155a4$var$DateRangePicker);
|
|
1135
1214
|
|
|
1136
1215
|
|
|
1137
1216
|
|
|
1217
|
+
/*
|
|
1218
|
+
* Copyright 2020 Adobe. All rights reserved.
|
|
1219
|
+
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
1220
|
+
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
1221
|
+
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
1222
|
+
*
|
|
1223
|
+
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
1224
|
+
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
1225
|
+
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
1226
|
+
* governing permissions and limitations under the License.
|
|
1227
|
+
*/
|
|
1138
1228
|
|
|
1139
1229
|
|
|
1140
1230
|
|
|
@@ -1147,22 +1237,22 @@ function $16cafb71dac155a4$var$DateRangeDash() {
|
|
|
1147
1237
|
|
|
1148
1238
|
|
|
1149
1239
|
function $1ab74d2cd1dc2e45$var$DateField(props, ref) {
|
|
1150
|
-
props = $9kQ8p$reactspectrumprovider.useProviderProps(props);
|
|
1240
|
+
props = (0, $9kQ8p$reactspectrumprovider.useProviderProps)(props);
|
|
1151
1241
|
let { autoFocus: autoFocus , isDisabled: isDisabled , isReadOnly: isReadOnly , isRequired: isRequired , isQuiet: isQuiet } = props;
|
|
1152
|
-
let domRef = $4d2e419f522adb48$export$71a23a36270e4bf0(ref);
|
|
1153
|
-
let { locale: locale } = $9kQ8p$reactariai18n.useLocale();
|
|
1154
|
-
let state = $9kQ8p$reactstatelydatepicker.useDateFieldState({
|
|
1242
|
+
let domRef = (0, $4d2e419f522adb48$export$71a23a36270e4bf0)(ref);
|
|
1243
|
+
let { locale: locale } = (0, $9kQ8p$reactariai18n.useLocale)();
|
|
1244
|
+
let state = (0, $9kQ8p$reactstatelydatepicker.useDateFieldState)({
|
|
1155
1245
|
...props,
|
|
1156
1246
|
locale: locale,
|
|
1157
1247
|
createCalendar: $9kQ8p$internationalizeddate.createCalendar
|
|
1158
1248
|
});
|
|
1159
|
-
let inputRef = $9kQ8p$react.useRef(null);
|
|
1160
|
-
let { labelProps: labelProps , fieldProps: fieldProps , descriptionProps: descriptionProps , errorMessageProps: errorMessageProps } = $9kQ8p$reactariadatepicker.useDateField(props, state, inputRef);
|
|
1249
|
+
let inputRef = (0, $9kQ8p$react.useRef)(null);
|
|
1250
|
+
let { labelProps: labelProps , fieldProps: fieldProps , descriptionProps: descriptionProps , errorMessageProps: errorMessageProps } = (0, $9kQ8p$reactariadatepicker.useDateField)(props, state, inputRef);
|
|
1161
1251
|
// Note: this description is intentionally not passed to useDatePicker.
|
|
1162
1252
|
// The format help text is unnecessary for screen reader users because each segment already has a label.
|
|
1163
|
-
let description = $4d2e419f522adb48$export$322f4580ccd8dde6(props);
|
|
1253
|
+
let description = (0, $4d2e419f522adb48$export$322f4580ccd8dde6)(props);
|
|
1164
1254
|
if (description && !props.description) descriptionProps.id = null;
|
|
1165
|
-
return
|
|
1255
|
+
return /*#__PURE__*/ (0, ($parcel$interopDefault($9kQ8p$react))).createElement((0, $9kQ8p$reactspectrumlabel.Field), {
|
|
1166
1256
|
...props,
|
|
1167
1257
|
ref: domRef,
|
|
1168
1258
|
elementType: "span",
|
|
@@ -1171,29 +1261,28 @@ function $1ab74d2cd1dc2e45$var$DateField(props, ref) {
|
|
|
1171
1261
|
descriptionProps: descriptionProps,
|
|
1172
1262
|
errorMessageProps: errorMessageProps,
|
|
1173
1263
|
validationState: state.validationState,
|
|
1174
|
-
UNSAFE_className: $9kQ8p$reactspectrumutils.classNames((/*@__PURE__*/$parcel$interopDefault($91c3db8c6a21ca71$exports)),
|
|
1175
|
-
}, /*#__PURE__*/ ($parcel$interopDefault($9kQ8p$react)).createElement($c3ebc4931d9b9977$export$f5b8910cec6cf069, {
|
|
1264
|
+
UNSAFE_className: (0, $9kQ8p$reactspectrumutils.classNames)((0, (/*@__PURE__*/$parcel$interopDefault($91c3db8c6a21ca71$exports))), "react-spectrum-Datepicker-fieldWrapper")
|
|
1265
|
+
}, /*#__PURE__*/ (0, ($parcel$interopDefault($9kQ8p$react))).createElement((0, $c3ebc4931d9b9977$export$f5b8910cec6cf069), {
|
|
1176
1266
|
ref: inputRef,
|
|
1177
1267
|
fieldProps: fieldProps,
|
|
1178
1268
|
isDisabled: isDisabled,
|
|
1179
1269
|
isQuiet: isQuiet,
|
|
1180
1270
|
autoFocus: autoFocus,
|
|
1181
1271
|
validationState: state.validationState,
|
|
1182
|
-
className: $9kQ8p$reactspectrumutils.classNames((/*@__PURE__*/$parcel$interopDefault($91c3db8c6a21ca71$exports)),
|
|
1183
|
-
}, state.segments.map((segment, i)=>/*#__PURE__*/ ($parcel$interopDefault($9kQ8p$react)).createElement($edac158d20ebe4a9$export$6388987c5223b54e, {
|
|
1272
|
+
className: (0, $9kQ8p$reactspectrumutils.classNames)((0, (/*@__PURE__*/$parcel$interopDefault($91c3db8c6a21ca71$exports))), "react-spectrum-DateField")
|
|
1273
|
+
}, state.segments.map((segment, i)=>/*#__PURE__*/ (0, ($parcel$interopDefault($9kQ8p$react))).createElement((0, $edac158d20ebe4a9$export$6388987c5223b54e), {
|
|
1184
1274
|
key: i,
|
|
1185
1275
|
segment: segment,
|
|
1186
1276
|
state: state,
|
|
1187
1277
|
isDisabled: isDisabled,
|
|
1188
1278
|
isReadOnly: isReadOnly,
|
|
1189
1279
|
isRequired: isRequired
|
|
1190
|
-
})
|
|
1191
|
-
))));
|
|
1280
|
+
}))));
|
|
1192
1281
|
}
|
|
1193
1282
|
/**
|
|
1194
1283
|
* DateFields allow users to enter and edit date and time values using a keyboard.
|
|
1195
1284
|
* Each part of a date value is displayed in an individually editable segment.
|
|
1196
|
-
*/ const $1ab74d2cd1dc2e45$export$d9781c7894a82487 = /*#__PURE__*/ ($parcel$interopDefault($9kQ8p$react)).forwardRef($1ab74d2cd1dc2e45$var$DateField);
|
|
1285
|
+
*/ const $1ab74d2cd1dc2e45$export$d9781c7894a82487 = /*#__PURE__*/ (0, ($parcel$interopDefault($9kQ8p$react))).forwardRef($1ab74d2cd1dc2e45$var$DateField);
|
|
1197
1286
|
|
|
1198
1287
|
|
|
1199
1288
|
|