@react-spectrum/datepicker 3.1.2 → 3.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/main.css +1 -1
- package/dist/main.js +42 -32
- package/dist/main.js.map +1 -1
- package/dist/module.js +43 -33
- package/dist/module.js.map +1 -1
- package/dist/types.d.ts.map +1 -1
- package/package.json +19 -19
- package/src/DateField.tsx +4 -2
- package/src/DatePicker.tsx +4 -3
- package/src/DateRangePicker.tsx +4 -3
- package/src/Input.tsx +22 -16
- package/src/TimeField.tsx +4 -2
- package/src/styles.css +3 -3
package/dist/module.js
CHANGED
|
@@ -10,7 +10,7 @@ import {mergeProps as $aayOp$mergeProps, useLayoutEffect as $aayOp$useLayoutEffe
|
|
|
10
10
|
import $aayOp$react, {useRef as $aayOp$useRef, useCallback as $aayOp$useCallback, useMemo as $aayOp$useMemo, useState as $aayOp$useState, useImperativeHandle as $aayOp$useImperativeHandle} from "react";
|
|
11
11
|
import {useDatePicker as $aayOp$useDatePicker, useDateField as $aayOp$useDateField, useDateSegment as $aayOp$useDateSegment, useTimeField as $aayOp$useTimeField, useDisplayNames as $aayOp$useDisplayNames, useDateRangePicker as $aayOp$useDateRangePicker} from "@react-aria/datepicker";
|
|
12
12
|
import {useDatePickerState as $aayOp$useDatePickerState, useDateFieldState as $aayOp$useDateFieldState, useTimeFieldState as $aayOp$useTimeFieldState, useDateRangePickerState as $aayOp$useDateRangePickerState} from "@react-stately/datepicker";
|
|
13
|
-
import {useFocusRing as $aayOp$useFocusRing,
|
|
13
|
+
import {useFocusRing as $aayOp$useFocusRing, createFocusManager as $aayOp$createFocusManager} from "@react-aria/focus";
|
|
14
14
|
import {useHover as $aayOp$useHover} from "@react-aria/interactions";
|
|
15
15
|
import {useLocale as $aayOp$useLocale, useLocalizedStringFormatter as $aayOp$useLocalizedStringFormatter, useDateFormatter as $aayOp$useDateFormatter} from "@react-aria/i18n";
|
|
16
16
|
import {useProviderProps as $aayOp$useProviderProps, useProvider as $aayOp$useProvider} from "@react-spectrum/provider";
|
|
@@ -188,11 +188,11 @@ function $d2bb88c82604b25f$export$34dc4cfa15ead1(props) {
|
|
|
188
188
|
|
|
189
189
|
|
|
190
190
|
|
|
191
|
-
|
|
192
191
|
var $c14528ddc146317f$exports = {};
|
|
193
192
|
|
|
194
193
|
$parcel$export($c14528ddc146317f$exports, "spectrum-Textfield-input", () => $c14528ddc146317f$export$1ac009feb2b0bd0c, (v) => $c14528ddc146317f$export$1ac009feb2b0bd0c = v);
|
|
195
194
|
$parcel$export($c14528ddc146317f$exports, "spectrum-Textfield", () => $c14528ddc146317f$export$2c8a10299d8b3418, (v) => $c14528ddc146317f$export$2c8a10299d8b3418 = v);
|
|
195
|
+
$parcel$export($c14528ddc146317f$exports, "focus-ring", () => $c14528ddc146317f$export$f39a09f249340e2a, (v) => $c14528ddc146317f$export$f39a09f249340e2a = v);
|
|
196
196
|
$parcel$export($c14528ddc146317f$exports, "spectrum-Textfield--quiet", () => $c14528ddc146317f$export$bffd5e3d61a81737, (v) => $c14528ddc146317f$export$bffd5e3d61a81737 = v);
|
|
197
197
|
$parcel$export($c14528ddc146317f$exports, "spectrum-Textfield--multiline", () => $c14528ddc146317f$export$9699f1c538a448a0, (v) => $c14528ddc146317f$export$9699f1c538a448a0 = v);
|
|
198
198
|
$parcel$export($c14528ddc146317f$exports, "is-placeholder", () => $c14528ddc146317f$export$e5b2f5233e4e5194, (v) => $c14528ddc146317f$export$e5b2f5233e4e5194 = v);
|
|
@@ -201,15 +201,16 @@ $parcel$export($c14528ddc146317f$exports, "spectrum-Textfield--valid", () => $c1
|
|
|
201
201
|
$parcel$export($c14528ddc146317f$exports, "spectrum-Textfield--invalid", () => $c14528ddc146317f$export$58e50b10d30123df, (v) => $c14528ddc146317f$export$58e50b10d30123df = v);
|
|
202
202
|
$parcel$export($c14528ddc146317f$exports, "spectrum-Textfield--loadable", () => $c14528ddc146317f$export$14fd30fea6f1348c, (v) => $c14528ddc146317f$export$14fd30fea6f1348c = v);
|
|
203
203
|
$parcel$export($c14528ddc146317f$exports, "spectrum-Textfield-wrapper", () => $c14528ddc146317f$export$dd1165e0e6012973, (v) => $c14528ddc146317f$export$dd1165e0e6012973 = v);
|
|
204
|
+
$parcel$export($c14528ddc146317f$exports, "spectrum-Textfield-wrapper--quiet", () => $c14528ddc146317f$export$9fcb3d6af94a9d12, (v) => $c14528ddc146317f$export$9fcb3d6af94a9d12 = v);
|
|
204
205
|
$parcel$export($c14528ddc146317f$exports, "spectrum-Textfield-validationIcon", () => $c14528ddc146317f$export$cf0ead5b44db0da3, (v) => $c14528ddc146317f$export$cf0ead5b44db0da3 = v);
|
|
205
206
|
$parcel$export($c14528ddc146317f$exports, "spectrum-Textfield-icon", () => $c14528ddc146317f$export$222d1ccd1870be1d, (v) => $c14528ddc146317f$export$222d1ccd1870be1d = v);
|
|
206
207
|
$parcel$export($c14528ddc146317f$exports, "spectrum-Textfield-inputIcon", () => $c14528ddc146317f$export$c1cdcaa5fe76a871, (v) => $c14528ddc146317f$export$c1cdcaa5fe76a871 = v);
|
|
207
208
|
$parcel$export($c14528ddc146317f$exports, "spectrum-Textfield-circleLoader", () => $c14528ddc146317f$export$82a249fb4d6127, (v) => $c14528ddc146317f$export$82a249fb4d6127 = v);
|
|
208
209
|
$parcel$export($c14528ddc146317f$exports, "is-focused", () => $c14528ddc146317f$export$e7dc768d35940237, (v) => $c14528ddc146317f$export$e7dc768d35940237 = v);
|
|
209
|
-
$parcel$export($c14528ddc146317f$exports, "focus-ring", () => $c14528ddc146317f$export$f39a09f249340e2a, (v) => $c14528ddc146317f$export$f39a09f249340e2a = v);
|
|
210
210
|
$parcel$export($c14528ddc146317f$exports, "is-disabled", () => $c14528ddc146317f$export$d35bc1e505d1ebbf, (v) => $c14528ddc146317f$export$d35bc1e505d1ebbf = v);
|
|
211
211
|
var $c14528ddc146317f$export$1ac009feb2b0bd0c;
|
|
212
212
|
var $c14528ddc146317f$export$2c8a10299d8b3418;
|
|
213
|
+
var $c14528ddc146317f$export$f39a09f249340e2a;
|
|
213
214
|
var $c14528ddc146317f$export$bffd5e3d61a81737;
|
|
214
215
|
var $c14528ddc146317f$export$9699f1c538a448a0;
|
|
215
216
|
var $c14528ddc146317f$export$e5b2f5233e4e5194;
|
|
@@ -218,15 +219,16 @@ var $c14528ddc146317f$export$c2abbc3f970170b7;
|
|
|
218
219
|
var $c14528ddc146317f$export$58e50b10d30123df;
|
|
219
220
|
var $c14528ddc146317f$export$14fd30fea6f1348c;
|
|
220
221
|
var $c14528ddc146317f$export$dd1165e0e6012973;
|
|
222
|
+
var $c14528ddc146317f$export$9fcb3d6af94a9d12;
|
|
221
223
|
var $c14528ddc146317f$export$cf0ead5b44db0da3;
|
|
222
224
|
var $c14528ddc146317f$export$222d1ccd1870be1d;
|
|
223
225
|
var $c14528ddc146317f$export$c1cdcaa5fe76a871;
|
|
224
226
|
var $c14528ddc146317f$export$82a249fb4d6127;
|
|
225
227
|
var $c14528ddc146317f$export$e7dc768d35940237;
|
|
226
|
-
var $c14528ddc146317f$export$f39a09f249340e2a;
|
|
227
228
|
var $c14528ddc146317f$export$d35bc1e505d1ebbf;
|
|
228
229
|
$c14528ddc146317f$export$1ac009feb2b0bd0c = "spectrum-Textfield-input_73bc77";
|
|
229
230
|
$c14528ddc146317f$export$2c8a10299d8b3418 = "spectrum-Textfield_73bc77";
|
|
231
|
+
$c14528ddc146317f$export$f39a09f249340e2a = "focus-ring_73bc77";
|
|
230
232
|
$c14528ddc146317f$export$bffd5e3d61a81737 = "spectrum-Textfield--quiet_73bc77";
|
|
231
233
|
$c14528ddc146317f$export$9699f1c538a448a0 = "spectrum-Textfield--multiline_73bc77";
|
|
232
234
|
$c14528ddc146317f$export$e5b2f5233e4e5194 = "is-placeholder_73bc77";
|
|
@@ -235,18 +237,19 @@ $c14528ddc146317f$export$c2abbc3f970170b7 = "spectrum-Textfield--valid_73bc77";
|
|
|
235
237
|
$c14528ddc146317f$export$58e50b10d30123df = "spectrum-Textfield--invalid_73bc77";
|
|
236
238
|
$c14528ddc146317f$export$14fd30fea6f1348c = "spectrum-Textfield--loadable_73bc77";
|
|
237
239
|
$c14528ddc146317f$export$dd1165e0e6012973 = "spectrum-Textfield-wrapper_73bc77";
|
|
240
|
+
$c14528ddc146317f$export$9fcb3d6af94a9d12 = "spectrum-Textfield-wrapper--quiet_73bc77";
|
|
238
241
|
$c14528ddc146317f$export$cf0ead5b44db0da3 = "spectrum-Textfield-validationIcon_73bc77";
|
|
239
242
|
$c14528ddc146317f$export$222d1ccd1870be1d = "spectrum-Textfield-icon_73bc77";
|
|
240
243
|
$c14528ddc146317f$export$c1cdcaa5fe76a871 = "spectrum-Textfield-inputIcon_73bc77";
|
|
241
244
|
$c14528ddc146317f$export$82a249fb4d6127 = "spectrum-Textfield-circleLoader_73bc77";
|
|
242
245
|
$c14528ddc146317f$export$e7dc768d35940237 = "is-focused_73bc77";
|
|
243
|
-
$c14528ddc146317f$export$f39a09f249340e2a = "focus-ring_73bc77";
|
|
244
246
|
$c14528ddc146317f$export$d35bc1e505d1ebbf = "is-disabled_73bc77";
|
|
245
247
|
|
|
246
248
|
|
|
249
|
+
|
|
247
250
|
function $79348162c55d687f$var$Input(props, ref) {
|
|
248
251
|
let inputRef = $aayOp$useRef(null);
|
|
249
|
-
let { isDisabled: isDisabled , isQuiet: isQuiet , inputClassName: inputClassName , validationState: validationState , children: children , fieldProps: fieldProps , className: className , style: style } = props;
|
|
252
|
+
let { isDisabled: isDisabled , isQuiet: isQuiet , inputClassName: inputClassName , validationState: validationState , children: children , fieldProps: fieldProps , className: className , style: style , disableFocusRing: disableFocusRing } = props;
|
|
250
253
|
// Reserve padding for the error icon when the width of the input is unconstrained.
|
|
251
254
|
// When constrained, don't reserve space because adding it only when invalid will
|
|
252
255
|
// not cause a layout shift.
|
|
@@ -286,36 +289,37 @@ function $79348162c55d687f$var$Input(props, ref) {
|
|
|
286
289
|
// use a resize observer on a parent element, but it's hard to know _what_
|
|
287
290
|
// parent element.
|
|
288
291
|
$aayOp$useEvent($aayOp$useRef(typeof window !== 'undefined' ? window : null), 'resize', onResize);
|
|
289
|
-
let
|
|
292
|
+
let { focusProps: focusProps , isFocusVisible: isFocusVisible , isFocused: isFocused } = $aayOp$useFocusRing({
|
|
293
|
+
isTextInput: true,
|
|
294
|
+
within: true
|
|
295
|
+
});
|
|
296
|
+
let isInvalid = validationState === 'invalid' && !isDisabled;
|
|
290
297
|
let textfieldClass = $aayOp$classNames((/*@__PURE__*/$parcel$interopDefault($c14528ddc146317f$exports)), 'spectrum-Textfield', {
|
|
291
298
|
'spectrum-Textfield--invalid': isInvalid,
|
|
292
|
-
'spectrum-Textfield--valid': validationState === 'valid',
|
|
293
|
-
'spectrum-Textfield--quiet': isQuiet
|
|
299
|
+
'spectrum-Textfield--valid': validationState === 'valid' && !isDisabled,
|
|
300
|
+
'spectrum-Textfield--quiet': isQuiet,
|
|
301
|
+
'focus-ring': isFocusVisible && !disableFocusRing
|
|
294
302
|
}, $aayOp$classNames((/*@__PURE__*/$parcel$interopDefault($465eb3a688ef3440$exports)), 'react-spectrum-Datepicker-field'), className);
|
|
295
303
|
let inputClass = $aayOp$classNames((/*@__PURE__*/$parcel$interopDefault($c14528ddc146317f$exports)), 'spectrum-Textfield-input', {
|
|
296
304
|
'is-disabled': isDisabled,
|
|
297
|
-
'is-invalid': isInvalid
|
|
305
|
+
'is-invalid': isInvalid,
|
|
306
|
+
'is-focused': isFocused
|
|
298
307
|
}, reservePadding1 && $aayOp$classNames((/*@__PURE__*/$parcel$interopDefault($465eb3a688ef3440$exports)), 'react-spectrum-Datepicker-input'), inputClassName);
|
|
299
308
|
let iconClass = $aayOp$classNames((/*@__PURE__*/$parcel$interopDefault($c14528ddc146317f$exports)), 'spectrum-Textfield-validationIcon');
|
|
300
309
|
let validationIcon = null;
|
|
301
|
-
if (validationState === 'invalid') validationIcon = /*#__PURE__*/ $aayOp$react.createElement($aayOp$spectrumiconsuiAlertMedium, {
|
|
310
|
+
if (validationState === 'invalid' && !isDisabled) validationIcon = /*#__PURE__*/ $aayOp$react.createElement($aayOp$spectrumiconsuiAlertMedium, {
|
|
302
311
|
"data-testid": "invalid-icon",
|
|
303
312
|
UNSAFE_className: iconClass
|
|
304
313
|
});
|
|
305
|
-
else if (validationState === 'valid') validationIcon = /*#__PURE__*/ $aayOp$react.createElement($aayOp$spectrumiconsuiCheckmarkMedium, {
|
|
314
|
+
else if (validationState === 'valid' && !isDisabled) validationIcon = /*#__PURE__*/ $aayOp$react.createElement($aayOp$spectrumiconsuiCheckmarkMedium, {
|
|
306
315
|
"data-testid": "valid-icon",
|
|
307
316
|
UNSAFE_className: iconClass
|
|
308
317
|
});
|
|
309
318
|
return(/*#__PURE__*/ $aayOp$react.createElement("div", {
|
|
310
319
|
role: "presentation",
|
|
311
|
-
|
|
320
|
+
...$aayOp$mergeProps(fieldProps, focusProps),
|
|
312
321
|
className: textfieldClass,
|
|
313
322
|
style: style
|
|
314
|
-
}, /*#__PURE__*/ $aayOp$react.createElement($aayOp$FocusRing, {
|
|
315
|
-
focusClass: $aayOp$classNames((/*@__PURE__*/$parcel$interopDefault($c14528ddc146317f$exports)), 'is-focused'),
|
|
316
|
-
focusRingClass: $aayOp$classNames((/*@__PURE__*/$parcel$interopDefault($c14528ddc146317f$exports)), 'focus-ring'),
|
|
317
|
-
isTextInput: true,
|
|
318
|
-
within: true
|
|
319
323
|
}, /*#__PURE__*/ $aayOp$react.createElement("div", {
|
|
320
324
|
role: "presentation",
|
|
321
325
|
className: inputClass
|
|
@@ -323,7 +327,7 @@ function $79348162c55d687f$var$Input(props, ref) {
|
|
|
323
327
|
role: "presentation",
|
|
324
328
|
className: $aayOp$classNames((/*@__PURE__*/$parcel$interopDefault($465eb3a688ef3440$exports)), 'react-spectrum-Datepicker-inputContents'),
|
|
325
329
|
ref: $aayOp$mergeRefs(ref, inputRef)
|
|
326
|
-
}, children))
|
|
330
|
+
}, children)), validationIcon));
|
|
327
331
|
}
|
|
328
332
|
const $79348162c55d687f$export$f5b8910cec6cf069 = /*#__PURE__*/ $aayOp$react.forwardRef($79348162c55d687f$var$Input);
|
|
329
333
|
|
|
@@ -645,10 +649,11 @@ $71a986712918c3de$exports = {
|
|
|
645
649
|
var $8fb52a80fe52b1c7$exports = {};
|
|
646
650
|
|
|
647
651
|
$parcel$export($8fb52a80fe52b1c7$exports, "spectrum-InputGroup", () => $8fb52a80fe52b1c7$export$5be359c1227eedcb, (v) => $8fb52a80fe52b1c7$export$5be359c1227eedcb = v);
|
|
652
|
+
$parcel$export($8fb52a80fe52b1c7$exports, "focus-ring", () => $8fb52a80fe52b1c7$export$f39a09f249340e2a, (v) => $8fb52a80fe52b1c7$export$f39a09f249340e2a = v);
|
|
653
|
+
$parcel$export($8fb52a80fe52b1c7$exports, "spectrum-InputGroup--quiet", () => $8fb52a80fe52b1c7$export$ebf265ffc062029b, (v) => $8fb52a80fe52b1c7$export$ebf265ffc062029b = v);
|
|
648
654
|
$parcel$export($8fb52a80fe52b1c7$exports, "spectrum-FieldButton", () => $8fb52a80fe52b1c7$export$a024c99ecf6b5741, (v) => $8fb52a80fe52b1c7$export$a024c99ecf6b5741 = v);
|
|
649
655
|
$parcel$export($8fb52a80fe52b1c7$exports, "is-disabled", () => $8fb52a80fe52b1c7$export$d35bc1e505d1ebbf, (v) => $8fb52a80fe52b1c7$export$d35bc1e505d1ebbf = v);
|
|
650
656
|
$parcel$export($8fb52a80fe52b1c7$exports, "spectrum-InputGroup--invalid", () => $8fb52a80fe52b1c7$export$3b48509739a9cda0, (v) => $8fb52a80fe52b1c7$export$3b48509739a9cda0 = v);
|
|
651
|
-
$parcel$export($8fb52a80fe52b1c7$exports, "spectrum-InputGroup--quiet", () => $8fb52a80fe52b1c7$export$ebf265ffc062029b, (v) => $8fb52a80fe52b1c7$export$ebf265ffc062029b = v);
|
|
652
657
|
$parcel$export($8fb52a80fe52b1c7$exports, "spectrum-InputGroup-field", () => $8fb52a80fe52b1c7$export$ea77459595e26bec, (v) => $8fb52a80fe52b1c7$export$ea77459595e26bec = v);
|
|
653
658
|
$parcel$export($8fb52a80fe52b1c7$exports, "spectrum-InputGroup-input-validationIcon", () => $8fb52a80fe52b1c7$export$f7ab13ee113f4884, (v) => $8fb52a80fe52b1c7$export$f7ab13ee113f4884 = v);
|
|
654
659
|
$parcel$export($8fb52a80fe52b1c7$exports, "spectrum-InputGroup-input-circleLoader", () => $8fb52a80fe52b1c7$export$dcc9e00cdad967fa, (v) => $8fb52a80fe52b1c7$export$dcc9e00cdad967fa = v);
|
|
@@ -663,14 +668,14 @@ $parcel$export($8fb52a80fe52b1c7$exports, "spectrum-Datepicker--rangeDash", () =
|
|
|
663
668
|
$parcel$export($8fb52a80fe52b1c7$exports, "is-focused", () => $8fb52a80fe52b1c7$export$e7dc768d35940237, (v) => $8fb52a80fe52b1c7$export$e7dc768d35940237 = v);
|
|
664
669
|
$parcel$export($8fb52a80fe52b1c7$exports, "spectrum-Datepicker-focusRing", () => $8fb52a80fe52b1c7$export$eb262b15b9261fde, (v) => $8fb52a80fe52b1c7$export$eb262b15b9261fde = v);
|
|
665
670
|
$parcel$export($8fb52a80fe52b1c7$exports, "is-hovered", () => $8fb52a80fe52b1c7$export$b8813cd5d7824ce7, (v) => $8fb52a80fe52b1c7$export$b8813cd5d7824ce7 = v);
|
|
666
|
-
$parcel$export($8fb52a80fe52b1c7$exports, "focus-ring", () => $8fb52a80fe52b1c7$export$f39a09f249340e2a, (v) => $8fb52a80fe52b1c7$export$f39a09f249340e2a = v);
|
|
667
671
|
$parcel$export($8fb52a80fe52b1c7$exports, "is-selected", () => $8fb52a80fe52b1c7$export$1e0fb04f31d3c22a, (v) => $8fb52a80fe52b1c7$export$1e0fb04f31d3c22a = v);
|
|
668
672
|
$parcel$export($8fb52a80fe52b1c7$exports, "spectrum-FieldButton--invalid", () => $8fb52a80fe52b1c7$export$c9f503f672e8a3c1, (v) => $8fb52a80fe52b1c7$export$c9f503f672e8a3c1 = v);
|
|
669
673
|
var $8fb52a80fe52b1c7$export$5be359c1227eedcb;
|
|
674
|
+
var $8fb52a80fe52b1c7$export$f39a09f249340e2a;
|
|
675
|
+
var $8fb52a80fe52b1c7$export$ebf265ffc062029b;
|
|
670
676
|
var $8fb52a80fe52b1c7$export$a024c99ecf6b5741;
|
|
671
677
|
var $8fb52a80fe52b1c7$export$d35bc1e505d1ebbf;
|
|
672
678
|
var $8fb52a80fe52b1c7$export$3b48509739a9cda0;
|
|
673
|
-
var $8fb52a80fe52b1c7$export$ebf265ffc062029b;
|
|
674
679
|
var $8fb52a80fe52b1c7$export$ea77459595e26bec;
|
|
675
680
|
var $8fb52a80fe52b1c7$export$f7ab13ee113f4884;
|
|
676
681
|
var $8fb52a80fe52b1c7$export$dcc9e00cdad967fa;
|
|
@@ -685,14 +690,14 @@ var $8fb52a80fe52b1c7$export$202113e883898dc;
|
|
|
685
690
|
var $8fb52a80fe52b1c7$export$e7dc768d35940237;
|
|
686
691
|
var $8fb52a80fe52b1c7$export$eb262b15b9261fde;
|
|
687
692
|
var $8fb52a80fe52b1c7$export$b8813cd5d7824ce7;
|
|
688
|
-
var $8fb52a80fe52b1c7$export$f39a09f249340e2a;
|
|
689
693
|
var $8fb52a80fe52b1c7$export$1e0fb04f31d3c22a;
|
|
690
694
|
var $8fb52a80fe52b1c7$export$c9f503f672e8a3c1;
|
|
691
695
|
$8fb52a80fe52b1c7$export$5be359c1227eedcb = "spectrum-InputGroup_a0942f";
|
|
696
|
+
$8fb52a80fe52b1c7$export$f39a09f249340e2a = "focus-ring_a0942f";
|
|
697
|
+
$8fb52a80fe52b1c7$export$ebf265ffc062029b = "spectrum-InputGroup--quiet_a0942f";
|
|
692
698
|
$8fb52a80fe52b1c7$export$a024c99ecf6b5741 = "spectrum-FieldButton_a0942f";
|
|
693
699
|
$8fb52a80fe52b1c7$export$d35bc1e505d1ebbf = "is-disabled_a0942f";
|
|
694
700
|
$8fb52a80fe52b1c7$export$3b48509739a9cda0 = "spectrum-InputGroup--invalid_a0942f";
|
|
695
|
-
$8fb52a80fe52b1c7$export$ebf265ffc062029b = "spectrum-InputGroup--quiet_a0942f";
|
|
696
701
|
$8fb52a80fe52b1c7$export$ea77459595e26bec = "spectrum-InputGroup-field_a0942f";
|
|
697
702
|
$8fb52a80fe52b1c7$export$f7ab13ee113f4884 = "spectrum-InputGroup-input-validationIcon_a0942f";
|
|
698
703
|
$8fb52a80fe52b1c7$export$dcc9e00cdad967fa = "spectrum-InputGroup-input-circleLoader_a0942f";
|
|
@@ -707,7 +712,6 @@ $8fb52a80fe52b1c7$export$202113e883898dc = "spectrum-Datepicker--rangeDash_a0942
|
|
|
707
712
|
$8fb52a80fe52b1c7$export$e7dc768d35940237 = "is-focused_a0942f";
|
|
708
713
|
$8fb52a80fe52b1c7$export$eb262b15b9261fde = "spectrum-Datepicker-focusRing_a0942f";
|
|
709
714
|
$8fb52a80fe52b1c7$export$b8813cd5d7824ce7 = "is-hovered_a0942f";
|
|
710
|
-
$8fb52a80fe52b1c7$export$f39a09f249340e2a = "focus-ring_a0942f";
|
|
711
715
|
$8fb52a80fe52b1c7$export$1e0fb04f31d3c22a = "is-selected_a0942f";
|
|
712
716
|
$8fb52a80fe52b1c7$export$c9f503f672e8a3c1 = "spectrum-FieldButton--invalid_a0942f";
|
|
713
717
|
|
|
@@ -795,7 +799,8 @@ function $f0a04554754386b6$var$TimeField(props, ref) {
|
|
|
795
799
|
...props,
|
|
796
800
|
locale: locale
|
|
797
801
|
});
|
|
798
|
-
let
|
|
802
|
+
let inputRef = $aayOp$useRef(null);
|
|
803
|
+
let { labelProps: labelProps , fieldProps: fieldProps , descriptionProps: descriptionProps , errorMessageProps: errorMessageProps } = $aayOp$useTimeField(props, state, inputRef);
|
|
799
804
|
return(/*#__PURE__*/ $aayOp$react.createElement($aayOp$Field, {
|
|
800
805
|
...props,
|
|
801
806
|
ref: domRef,
|
|
@@ -806,6 +811,7 @@ function $f0a04554754386b6$var$TimeField(props, ref) {
|
|
|
806
811
|
validationState: state.validationState,
|
|
807
812
|
UNSAFE_className: $aayOp$classNames((/*@__PURE__*/$parcel$interopDefault($465eb3a688ef3440$exports)), 'react-spectrum-TimeField-fieldWrapper')
|
|
808
813
|
}, /*#__PURE__*/ $aayOp$react.createElement($79348162c55d687f$export$f5b8910cec6cf069, {
|
|
814
|
+
ref: inputRef,
|
|
809
815
|
fieldProps: fieldProps,
|
|
810
816
|
isDisabled: isDisabled,
|
|
811
817
|
isQuiet: isQuiet,
|
|
@@ -863,7 +869,7 @@ function $beaeefa091999363$var$DatePicker(props, ref) {
|
|
|
863
869
|
});
|
|
864
870
|
let className = $aayOp$classNames((/*@__PURE__*/$parcel$interopDefault($8fb52a80fe52b1c7$exports)), 'spectrum-InputGroup', {
|
|
865
871
|
'spectrum-InputGroup--quiet': isQuiet,
|
|
866
|
-
'spectrum-InputGroup--invalid': state.validationState === 'invalid',
|
|
872
|
+
'spectrum-InputGroup--invalid': state.validationState === 'invalid' && !isDisabled,
|
|
867
873
|
'is-disabled': isDisabled,
|
|
868
874
|
'is-hovered': isHovered,
|
|
869
875
|
'is-focused': isFocused,
|
|
@@ -871,7 +877,7 @@ function $beaeefa091999363$var$DatePicker(props, ref) {
|
|
|
871
877
|
});
|
|
872
878
|
let fieldClassName = $aayOp$classNames((/*@__PURE__*/$parcel$interopDefault($8fb52a80fe52b1c7$exports)), 'spectrum-InputGroup-input', {
|
|
873
879
|
'is-disabled': isDisabled,
|
|
874
|
-
'is-invalid': state.validationState === 'invalid'
|
|
880
|
+
'is-invalid': state.validationState === 'invalid' && !isDisabled
|
|
875
881
|
});
|
|
876
882
|
// Note: this description is intentionally not passed to useDatePicker.
|
|
877
883
|
// The format help text is unnecessary for screen reader users because each segment already has a label.
|
|
@@ -903,7 +909,8 @@ function $beaeefa091999363$var$DatePicker(props, ref) {
|
|
|
903
909
|
isQuiet: isQuiet,
|
|
904
910
|
validationState: state.validationState,
|
|
905
911
|
className: $aayOp$classNames((/*@__PURE__*/$parcel$interopDefault($8fb52a80fe52b1c7$exports)), 'spectrum-InputGroup-field'),
|
|
906
|
-
inputClassName: fieldClassName
|
|
912
|
+
inputClassName: fieldClassName,
|
|
913
|
+
disableFocusRing: true
|
|
907
914
|
}, /*#__PURE__*/ $aayOp$react.createElement($d2bb88c82604b25f$export$34dc4cfa15ead1, {
|
|
908
915
|
...fieldProps,
|
|
909
916
|
"data-testid": "date-field",
|
|
@@ -1006,7 +1013,7 @@ function $cb301300011a98f7$var$DateRangePicker(props, ref) {
|
|
|
1006
1013
|
});
|
|
1007
1014
|
let className = $aayOp$classNames((/*@__PURE__*/$parcel$interopDefault($8fb52a80fe52b1c7$exports)), 'spectrum-InputGroup', {
|
|
1008
1015
|
'spectrum-InputGroup--quiet': isQuiet,
|
|
1009
|
-
'spectrum-InputGroup--invalid': state.validationState === 'invalid',
|
|
1016
|
+
'spectrum-InputGroup--invalid': state.validationState === 'invalid' && !isDisabled,
|
|
1010
1017
|
'is-disabled': isDisabled,
|
|
1011
1018
|
'is-hovered': isHovered,
|
|
1012
1019
|
'is-focused': isFocused,
|
|
@@ -1014,7 +1021,7 @@ function $cb301300011a98f7$var$DateRangePicker(props, ref) {
|
|
|
1014
1021
|
});
|
|
1015
1022
|
let fieldClassName = $aayOp$classNames((/*@__PURE__*/$parcel$interopDefault($8fb52a80fe52b1c7$exports)), 'spectrum-InputGroup-input', {
|
|
1016
1023
|
'is-disabled': isDisabled,
|
|
1017
|
-
'is-invalid': state.validationState === 'invalid'
|
|
1024
|
+
'is-invalid': state.validationState === 'invalid' && !isDisabled
|
|
1018
1025
|
});
|
|
1019
1026
|
// Note: this description is intentionally not passed to useDatePicker.
|
|
1020
1027
|
// The format help text is unnecessary for screen reader users because each segment already has a label.
|
|
@@ -1046,7 +1053,8 @@ function $cb301300011a98f7$var$DateRangePicker(props, ref) {
|
|
|
1046
1053
|
isQuiet: isQuiet,
|
|
1047
1054
|
validationState: state.validationState,
|
|
1048
1055
|
className: $aayOp$classNames((/*@__PURE__*/$parcel$interopDefault($8fb52a80fe52b1c7$exports)), 'spectrum-InputGroup-field'),
|
|
1049
|
-
inputClassName: fieldClassName
|
|
1056
|
+
inputClassName: fieldClassName,
|
|
1057
|
+
disableFocusRing: true
|
|
1050
1058
|
}, /*#__PURE__*/ $aayOp$react.createElement($d2bb88c82604b25f$export$34dc4cfa15ead1, {
|
|
1051
1059
|
...startFieldProps,
|
|
1052
1060
|
"data-testid": "start-date",
|
|
@@ -1149,7 +1157,8 @@ function $0129798af6791690$var$DateField(props, ref) {
|
|
|
1149
1157
|
locale: locale,
|
|
1150
1158
|
createCalendar: $aayOp$createCalendar
|
|
1151
1159
|
});
|
|
1152
|
-
let
|
|
1160
|
+
let inputRef = $aayOp$useRef(null);
|
|
1161
|
+
let { labelProps: labelProps , fieldProps: fieldProps , descriptionProps: descriptionProps , errorMessageProps: errorMessageProps } = $aayOp$useDateField(props, state, inputRef);
|
|
1153
1162
|
// Note: this description is intentionally not passed to useDatePicker.
|
|
1154
1163
|
// The format help text is unnecessary for screen reader users because each segment already has a label.
|
|
1155
1164
|
let description = $04e96200274b03de$export$322f4580ccd8dde6(props);
|
|
@@ -1165,6 +1174,7 @@ function $0129798af6791690$var$DateField(props, ref) {
|
|
|
1165
1174
|
validationState: state.validationState,
|
|
1166
1175
|
UNSAFE_className: $aayOp$classNames((/*@__PURE__*/$parcel$interopDefault($465eb3a688ef3440$exports)), 'react-spectrum-Datepicker-fieldWrapper')
|
|
1167
1176
|
}, /*#__PURE__*/ $aayOp$react.createElement($79348162c55d687f$export$f5b8910cec6cf069, {
|
|
1177
|
+
ref: inputRef,
|
|
1168
1178
|
fieldProps: fieldProps,
|
|
1169
1179
|
isDisabled: isDisabled,
|
|
1170
1180
|
isQuiet: isQuiet,
|