@react-spectrum/datepicker 3.3.0 → 3.3.2

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