@react-spectrum/datepicker 3.11.0 → 3.12.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.
Files changed (44) hide show
  1. package/dist/DateField.main.js +3 -7
  2. package/dist/DateField.main.js.map +1 -1
  3. package/dist/DateField.mjs +3 -7
  4. package/dist/DateField.module.js +3 -7
  5. package/dist/DateField.module.js.map +1 -1
  6. package/dist/DatePicker.main.js +7 -9
  7. package/dist/DatePicker.main.js.map +1 -1
  8. package/dist/DatePicker.mjs +7 -9
  9. package/dist/DatePicker.module.js +7 -9
  10. package/dist/DatePicker.module.js.map +1 -1
  11. package/dist/DatePickerField.main.js +1 -1
  12. package/dist/DatePickerField.mjs +1 -1
  13. package/dist/DatePickerField.module.js +1 -1
  14. package/dist/DatePickerSegment.main.js +1 -1
  15. package/dist/DatePickerSegment.mjs +1 -1
  16. package/dist/DatePickerSegment.module.js +1 -1
  17. package/dist/DateRangePicker.main.js +6 -9
  18. package/dist/DateRangePicker.main.js.map +1 -1
  19. package/dist/DateRangePicker.mjs +6 -9
  20. package/dist/DateRangePicker.module.js +6 -9
  21. package/dist/DateRangePicker.module.js.map +1 -1
  22. package/dist/Input.main.js +4 -5
  23. package/dist/Input.main.js.map +1 -1
  24. package/dist/Input.mjs +4 -5
  25. package/dist/Input.module.js +4 -5
  26. package/dist/Input.module.js.map +1 -1
  27. package/dist/TimeField.main.js +3 -7
  28. package/dist/TimeField.main.js.map +1 -1
  29. package/dist/TimeField.mjs +3 -7
  30. package/dist/TimeField.module.js +3 -7
  31. package/dist/TimeField.module.js.map +1 -1
  32. package/dist/{styles.4bf108e6.css → styles.d49f4d83.css} +5 -5
  33. package/dist/{styles.4bf108e6.css.map → styles.d49f4d83.css.map} +1 -1
  34. package/dist/types.d.ts.map +1 -1
  35. package/dist/{vars.61240e3b.css → vars.ba84240a.css} +3 -3
  36. package/dist/{vars.61240e3b.css.map → vars.ba84240a.css.map} +1 -1
  37. package/dist/{vars.6aae6db6.css → vars.cf48e391.css} +2 -2
  38. package/dist/{vars.6aae6db6.css.map → vars.cf48e391.css.map} +1 -1
  39. package/package.json +21 -21
  40. package/src/DateField.tsx +6 -9
  41. package/src/DatePicker.tsx +8 -9
  42. package/src/DateRangePicker.tsx +9 -10
  43. package/src/Input.tsx +2 -5
  44. package/src/TimeField.tsx +6 -9
@@ -97,6 +97,7 @@
97
97
  border-radius: var(--spectrum-textfield-border-radius, var(--spectrum-alias-border-radius-regular));
98
98
  padding: 3px var(--spectrum-textfield-padding-x, var(--spectrum-global-dimension-size-150)) 5px calc(var(--spectrum-textfield-padding-x, var(--spectrum-global-dimension-size-150)) - 1px);
99
99
  text-indent: 0;
100
+ inline-size: 100%;
100
101
  height: var(--spectrum-textfield-height, var(--spectrum-alias-single-line-height));
101
102
  vertical-align: top;
102
103
  font-size: var(--spectrum-textfield-text-size, var(--spectrum-alias-font-size-default));
@@ -106,7 +107,6 @@
106
107
  -webkit-appearance: none;
107
108
  -moz-appearance: textfield;
108
109
  outline: none;
109
- inline-size: 100%;
110
110
  margin: 0;
111
111
  overflow: visible;
112
112
  }
@@ -199,10 +199,10 @@
199
199
  }
200
200
 
201
201
  .zo2IKa_spectrum-Textfield--multiline .zo2IKa_spectrum-Textfield-input {
202
+ height: auto;
202
203
  min-height: var(--spectrum-global-dimension-size-700);
203
204
  padding: 3px var(--spectrum-textfield-padding-x, var(--spectrum-global-dimension-size-150)) 5px calc(var(--spectrum-textfield-padding-x, var(--spectrum-global-dimension-size-150)) - 1px);
204
205
  resize: none;
205
- height: auto;
206
206
  overflow: auto;
207
207
  }
208
208
 
@@ -547,4 +547,4 @@
547
547
  border-color: var(--spectrum-textfield-quiet-border-color-key-focus, var(--spectrum-alias-border-color-focus));
548
548
  }
549
549
  }
550
- /*# sourceMappingURL=vars.61240e3b.css.map */
550
+ /*# sourceMappingURL=vars.ba84240a.css.map */
@@ -1 +1 @@
1
- {"mappings":"AA4DA;;;;;AAIE;;;;AAIA;;;;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 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\n@import './index.css';\n@import './skin.css';\n"],"names":[],"version":3,"file":"vars.61240e3b.css.map"}
1
+ {"mappings":"AA4DA;;;;;AAIE;;;;AAIA;;;;AAIA;;;;AAIA;;;;AAIA;;;;AAIA;;;;AAQA;;;;AAIA;;;;AAKF;;;;;;;;AAOE;;;;;;;;;;;AAqBE;;;;;AAQF;;;;AAKE;;;;;AAOJ;EACE;;;;EAIE;;;;;AAMJ;;;;;;;AAQE;;;;;;AAWF;;;;;;;;;;;;;;;;;;;;AA4CE;;;;;;;;AAYA;;;;;;;AAWE;;;;AAIA;;;;AAJA;;;;AAIA;;;;AAJA;;;;AAIA;;;;AAJA;;;;AAIA;;;;AAJA;;;;AAIA;;;;AAMA;;;;AAKF;;;;;AAME;;;;AAQF;;;;;AAOA;;;;;AAAA;;;;;AAOA;;;;AAIA;;;;;;;;AAUA;;;;;;;AASA;;;;AAIA;;;;AASF;;;;AAIA;;;;;AAKE;;;;AAIA;;;;;AAME;;;;AAOJ;;;;;;;;AAUE;;;;AAKF;;;;;;AAAA;;;;AAAA;;;;AAAA;;;;AAAA;;;;AAOA;;;;;;AAAA;;;;AAAA;;;;AAAA;;;;AAAA;;;;AASA;;;;;;;;;AAAA;;;;AAAA;;;;AAAA;;;;AAAA;;;;AAaA;;;;AASE;;;;AAIE;;;;AAAA;;;;AAAA;;;;AAAA;;;;AAKF;;;;;AAQF;;;;;AAAA;;;;AAAA;;;;AAAA;;;;AAAA;;;;AAME;;;;AAiBF;;;;;;AAKE;;;;AAKA;;;;;AAIE;;;;AAMF;;;;;;AAKE;;;;AAMF;;;;AAME;;;;;AAMF;;;;;;;AASE;;;;AAKA;;;;AAdF;;;;;;;AASE;;;;AAKA;;;;AAKF;;;;AAGE;;;;AAcE;;;;;AAOJ;;;;;AAIE;;;;AAIA;;;;AAIA;;;;AAME;;;;;AAMF;;;;;AAOF;;;;AAGE;;;;AAIA;;;;AAIA;;;;AAME;;;;;AASA;;;;AASJ;;;;AAIA;;;;AAKF;EACE;;;;;;;;;;;;EAUE;;;;;EAKE;;;;;;EAKE","sources":["packages/@adobe/spectrum-css-temp/components/textfield/vars.css"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\n@import './index.css';\n@import './skin.css';\n"],"names":[],"version":3,"file":"vars.ba84240a.css.map"}
@@ -79,10 +79,10 @@
79
79
  }
80
80
 
81
81
  .penpuW_spectrum-InputGroup {
82
+ block-size: max-content;
82
83
  min-width: calc(2.5 * var(--spectrum-dropdown-height, var(--spectrum-global-dimension-size-400)));
83
84
  border-radius: var(--spectrum-alias-border-radius-regular, var(--spectrum-global-dimension-size-50));
84
85
  flex-flow: row;
85
- block-size: max-content;
86
86
  display: inline-flex;
87
87
  position: relative;
88
88
  }
@@ -646,4 +646,4 @@
646
646
  box-shadow: 0 2px 0 0 var(--spectrum-dropdown-border-color-key-focus, var(--spectrum-alias-border-color-focus));
647
647
  }
648
648
  }
649
- /*# sourceMappingURL=vars.6aae6db6.css.map */
649
+ /*# sourceMappingURL=vars.cf48e391.css.map */
@@ -1 +1 @@
1
- {"mappings":"AA4DA;;;;;AAIE;;;;AAIA;;;;AAIA;;;;AA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AAKJ;;;;AAQR;EACE;;;;;;;;;;;;;;;;EAeE;;;;;;EAKA;;;;;;;;;;;;;;;;EAiBE;;;;EAeI;;;;EAQF;;;;EAQF;;;;EAIF;;;;EAuBE;;;;EAGA","sources":["packages/@adobe/spectrum-css-temp/components/inputgroup/vars.css"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\n@import './index.css';\n@import './skin.css';\n"],"names":[],"version":3,"file":"vars.6aae6db6.css.map"}
1
+ {"mappings":"AA4DA;;;;;AAIE;;;;AAIA;;;;AAIA;;;;AAIA;;;;AAIA;;;;AAIA;;;;AAQA;;;;AAIA;;;;AAKF;;;;;;;;AAOE;;;;;;;;;;;AAqBE;;;;;AAQF;;;;AAKE;;;;;AAOJ;EACE;;;;EAIE;;;;;AAMJ;;;;;;;;;AAWE;;;;;;;;;;AAAA;;;;;;;AAAA;;;;;;;AAAA;;;;;;;AAAA;;;;;;;AAaE;;;;;;;;;;;AAAA;;;;;AAAA;;;;;AAAA;;;;;AAAA;;;;;AAaA;;;;AAAA;;;;;AAAA;;;;;AAAA;;;;;AAAA;;;;;AASA;;;;;AAAA;;;;;AAAA;;;;;AAAA;;;;;AAAA;;;;;AASA;;;;AAAA;;;;AAAA;;;;AAAA;;;;AAAA;;;;AAKA;;;;AAAA;;;;AAAA;;;;AAAA;;;;AAAA;;;;AAOJ;;;;AAMA;;;;AAAA;;;;;AAAA;;;;;AAAA;;;;;AAAA;;;;;AAMA;;;;;AAME;;;;;;;AAOE;;;;;;;AAQA;;;;;;;AAAA;;;;AAAA;;;;AAAA;;;;AAAA;;;;AASF;;;;AAAA;;;;AAAA;;;;AAAA;;;;AAKE;;;;AAMA;;;;AAAA;;;;AAAA;;;;AAAA;;;;AAAA;;;;AAKA;;;;AAAA;;;;AAAA;;;;AAAA;;;;AAAA;;;;AAOJ;;;;;AAMA;;;;AAGE;;;;AASE;;;;;AAMF;;;;;;AAME;;;;;AAKA;;;;AAKA;;;;;;;AAQF;;;;;;;;AAME;;;;;;;;;;AAYA;;;;;;;AAYE;;;;;AAMA;;;;AAmBN;;;;;AAKI;;;;AAOE;;;;AAcA;;;;AAWF;;;;AAME;;;;AAOA;;;;AASA;;;;AAQJ;;;;AAgBA;;;;AAKF;;;;AAQM;;;;AAqBA;;;;AAgBA;;;;AAQA;;;;AAME;;;;AAOA;;;;AAQF;;;;AAgBF;;;;AAMA;;;;AAMF;;;;AAGE;;;;AAUA;;;;AAME;;;;AACE;;;;AAOF;;;;AAIE;;;;;AAQJ;;;;AAII;;;;AAEE;;;;AAIE;;;;AAKJ;;;;AAQR;EACE;;;;;;;;;;;;;;;;EAeE;;;;;;EAKA;;;;;;;;;;;;;;;;EAiBE;;;;EAeI;;;;EAQF;;;;EAQF;;;;EAIF;;;;EAuBE;;;;EAGA","sources":["packages/@adobe/spectrum-css-temp/components/inputgroup/vars.css"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\n@import './index.css';\n@import './skin.css';\n"],"names":[],"version":3,"file":"vars.cf48e391.css.map"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@react-spectrum/datepicker",
3
- "version": "3.11.0",
3
+ "version": "3.12.0",
4
4
  "description": "Spectrum UI components in React",
5
5
  "license": "Apache-2.0",
6
6
  "main": "dist/main.js",
@@ -36,25 +36,25 @@
36
36
  "url": "https://github.com/adobe/react-spectrum"
37
37
  },
38
38
  "dependencies": {
39
- "@internationalized/date": "^3.6.0",
40
- "@react-aria/datepicker": "^3.12.0",
41
- "@react-aria/focus": "^3.19.0",
42
- "@react-aria/i18n": "^3.12.4",
43
- "@react-aria/interactions": "^3.22.5",
44
- "@react-aria/utils": "^3.26.0",
45
- "@react-spectrum/button": "^3.16.9",
46
- "@react-spectrum/calendar": "^3.5.0",
47
- "@react-spectrum/dialog": "^3.8.16",
48
- "@react-spectrum/form": "^3.7.10",
49
- "@react-spectrum/label": "^3.16.10",
50
- "@react-spectrum/layout": "^3.6.10",
51
- "@react-spectrum/utils": "^3.12.0",
52
- "@react-spectrum/view": "^3.6.14",
53
- "@react-stately/datepicker": "^3.11.0",
54
- "@react-types/datepicker": "^3.9.0",
55
- "@react-types/shared": "^3.26.0",
56
- "@spectrum-icons/ui": "^3.6.11",
57
- "@spectrum-icons/workflow": "^4.2.16",
39
+ "@internationalized/date": "^3.7.0",
40
+ "@react-aria/datepicker": "^3.13.0",
41
+ "@react-aria/focus": "^3.19.1",
42
+ "@react-aria/i18n": "^3.12.5",
43
+ "@react-aria/interactions": "^3.23.0",
44
+ "@react-aria/utils": "^3.27.0",
45
+ "@react-spectrum/button": "^3.16.10",
46
+ "@react-spectrum/calendar": "^3.6.0",
47
+ "@react-spectrum/dialog": "^3.8.17",
48
+ "@react-spectrum/form": "^3.7.11",
49
+ "@react-spectrum/label": "^3.16.11",
50
+ "@react-spectrum/layout": "^3.6.11",
51
+ "@react-spectrum/utils": "^3.12.1",
52
+ "@react-spectrum/view": "^3.6.15",
53
+ "@react-stately/datepicker": "^3.12.0",
54
+ "@react-types/datepicker": "^3.10.0",
55
+ "@react-types/shared": "^3.27.0",
56
+ "@spectrum-icons/ui": "^3.6.12",
57
+ "@spectrum-icons/workflow": "^4.2.17",
58
58
  "@swc/helpers": "^0.5.0"
59
59
  },
60
60
  "devDependencies": {
@@ -69,5 +69,5 @@
69
69
  "publishConfig": {
70
70
  "access": "public"
71
71
  },
72
- "gitHead": "71f0ef23053f9e03ee7e97df736e8b083e006849"
72
+ "gitHead": "09e7f44bebdc9d89122926b2b439a0a38a2814ea"
73
73
  }
package/src/DateField.tsx CHANGED
@@ -26,7 +26,11 @@ import {useFormProps} from '@react-spectrum/form';
26
26
  import {useLocale} from '@react-aria/i18n';
27
27
  import {useProviderProps} from '@react-spectrum/provider';
28
28
 
29
- function DateField<T extends DateValue>(props: SpectrumDateFieldProps<T>, ref: FocusableRef<HTMLElement>) {
29
+ /**
30
+ * DateFields allow users to enter and edit date and time values using a keyboard.
31
+ * Each part of a date value is displayed in an individually editable segment.
32
+ */
33
+ export const DateField = React.forwardRef(function DateField<T extends DateValue>(props: SpectrumDateFieldProps<T>, ref: FocusableRef<HTMLElement>) {
30
34
  props = useProviderProps(props);
31
35
  props = useFormProps(props);
32
36
  let {
@@ -99,11 +103,4 @@ function DateField<T extends DateValue>(props: SpectrumDateFieldProps<T>, ref: F
99
103
  </Input>
100
104
  </Field>
101
105
  );
102
- }
103
-
104
- /**
105
- * DateFields allow users to enter and edit date and time values using a keyboard.
106
- * Each part of a date value is displayed in an individually editable segment.
107
- */
108
- const _DateField = React.forwardRef(DateField) as <T extends DateValue>(props: SpectrumDateFieldProps<T> & {ref?: FocusableRef<HTMLElement>}) => ReactElement;
109
- export {_DateField as DateField};
106
+ }) as <T extends DateValue>(props: SpectrumDateFieldProps<T> & {ref?: FocusableRef<HTMLElement>}) => ReactElement;
@@ -38,7 +38,10 @@ import {useHover} from '@react-aria/interactions';
38
38
  import {useLocale, useLocalizedStringFormatter} from '@react-aria/i18n';
39
39
  import {useProviderProps} from '@react-spectrum/provider';
40
40
 
41
- function DatePicker<T extends DateValue>(props: SpectrumDatePickerProps<T>, ref: FocusableRef<HTMLElement>) {
41
+ /**
42
+ * DatePickers combine a DateField and a Calendar popover to allow users to enter or select a date and time value.
43
+ */
44
+ export const DatePicker = React.forwardRef(function DatePicker<T extends DateValue>(props: SpectrumDatePickerProps<T>, ref: FocusableRef<HTMLElement>) {
42
45
  props = useProviderProps(props);
43
46
  props = useFormProps(props);
44
47
  let {
@@ -47,7 +50,8 @@ function DatePicker<T extends DateValue>(props: SpectrumDatePickerProps<T>, ref:
47
50
  isDisabled,
48
51
  placeholderValue,
49
52
  maxVisibleMonths = 1,
50
- pageBehavior
53
+ pageBehavior,
54
+ firstDayOfWeek
51
55
  } = props;
52
56
  let {hoverProps, isHovered} = useHover({isDisabled});
53
57
  let targetRef = useRef<HTMLDivElement | null>(null);
@@ -168,6 +172,7 @@ function DatePicker<T extends DateValue>(props: SpectrumDatePickerProps<T>, ref:
168
172
  {...calendarProps}
169
173
  visibleMonths={visibleMonths}
170
174
  pageBehavior={pageBehavior}
175
+ firstDayOfWeek={firstDayOfWeek}
171
176
  UNSAFE_className={classNames(datepickerStyles, 'react-spectrum-Datepicker-calendar', {'is-invalid': isInvalid})} />
172
177
  {showTimeField &&
173
178
  <div className={classNames(datepickerStyles, 'react-spectrum-Datepicker-timeFields')}>
@@ -191,10 +196,4 @@ function DatePicker<T extends DateValue>(props: SpectrumDatePickerProps<T>, ref:
191
196
  </div>
192
197
  </Field>
193
198
  );
194
- }
195
-
196
- /**
197
- * DatePickers combine a DateField and a Calendar popover to allow users to enter or select a date and time value.
198
- */
199
- const _DatePicker = React.forwardRef(DatePicker) as <T extends DateValue>(props: SpectrumDatePickerProps<T> & {ref?: FocusableRef<HTMLElement>}) => ReactElement;
200
- export {_DatePicker as DatePicker};
199
+ }) as <T extends DateValue>(props: SpectrumDatePickerProps<T> & {ref?: FocusableRef<HTMLElement>}) => ReactElement;
@@ -38,7 +38,11 @@ import {useHover} from '@react-aria/interactions';
38
38
  import {useLocale, useLocalizedStringFormatter} from '@react-aria/i18n';
39
39
  import {useProviderProps} from '@react-spectrum/provider';
40
40
 
41
- function DateRangePicker<T extends DateValue>(props: SpectrumDateRangePickerProps<T>, ref: FocusableRef<HTMLElement>) {
41
+ /**
42
+ * DateRangePickers combine two DateFields and a RangeCalendar popover to allow users
43
+ * to enter or select a date and time range.
44
+ */
45
+ export const DateRangePicker = React.forwardRef(function DateRangePicker<T extends DateValue>(props: SpectrumDateRangePickerProps<T>, ref: FocusableRef<HTMLElement>) {
42
46
  props = useProviderProps(props);
43
47
  props = useFormProps(props);
44
48
  let {
@@ -47,7 +51,8 @@ function DateRangePicker<T extends DateValue>(props: SpectrumDateRangePickerProp
47
51
  autoFocus,
48
52
  placeholderValue,
49
53
  maxVisibleMonths = 1,
50
- pageBehavior
54
+ pageBehavior,
55
+ firstDayOfWeek
51
56
  } = props;
52
57
  let {hoverProps, isHovered} = useHover({isDisabled});
53
58
  let targetRef = useRef<HTMLDivElement | null>(null);
@@ -183,6 +188,7 @@ function DateRangePicker<T extends DateValue>(props: SpectrumDateRangePickerProp
183
188
  {...calendarProps}
184
189
  visibleMonths={visibleMonths}
185
190
  pageBehavior={pageBehavior}
191
+ firstDayOfWeek={firstDayOfWeek}
186
192
  UNSAFE_className={classNames(datepickerStyles, 'react-spectrum-Datepicker-calendar', {'is-invalid': validationState === 'invalid'})} />
187
193
  {showTimeField &&
188
194
  <Flex gap="size-100" marginTop="size-100" UNSAFE_className={classNames(datepickerStyles, 'react-spectrum-Datepicker-timeFields')}>
@@ -217,7 +223,7 @@ function DateRangePicker<T extends DateValue>(props: SpectrumDateRangePickerProp
217
223
  </div>
218
224
  </Field>
219
225
  );
220
- }
226
+ }) as <T extends DateValue>(props: SpectrumDateRangePickerProps<T> & {ref?: FocusableRef<HTMLElement>}) => ReactElement;
221
227
 
222
228
  function DateRangeDash() {
223
229
  return (
@@ -227,10 +233,3 @@ function DateRangeDash() {
227
233
  className={classNames(datepickerStyles, 'react-spectrum-Datepicker-rangeDash')} />
228
234
  );
229
235
  }
230
-
231
- /**
232
- * DateRangePickers combine two DateFields and a RangeCalendar popover to allow users
233
- * to enter or select a date and time range.
234
- */
235
- const _DateRangePicker = React.forwardRef(DateRangePicker) as <T extends DateValue>(props: SpectrumDateRangePickerProps<T> & {ref?: FocusableRef<HTMLElement>}) => ReactElement;
236
- export {_DateRangePicker as DateRangePicker};
package/src/Input.tsx CHANGED
@@ -19,7 +19,7 @@ import React, {ReactElement, useCallback, useRef} from 'react';
19
19
  import textfieldStyles from '@adobe/spectrum-css-temp/components/textfield/vars.css';
20
20
  import {useFocusRing} from '@react-aria/focus';
21
21
 
22
- function Input(props, ref) {
22
+ export const Input = React.forwardRef(function Input(props: any, ref: any) {
23
23
  let inputRef = useRef<HTMLInputElement | null>(null);
24
24
  let {
25
25
  isDisabled,
@@ -139,7 +139,4 @@ function Input(props, ref) {
139
139
  {validationIcon}
140
140
  </div>
141
141
  );
142
- }
143
-
144
- const _Input = React.forwardRef(Input);
145
- export {_Input as Input};
142
+ });
package/src/TimeField.tsx CHANGED
@@ -25,7 +25,11 @@ import {useProviderProps} from '@react-spectrum/provider';
25
25
  import {useTimeField} from '@react-aria/datepicker';
26
26
  import {useTimeFieldState} from '@react-stately/datepicker';
27
27
 
28
- function TimeField<T extends TimeValue>(props: SpectrumTimeFieldProps<T>, ref: FocusableRef<HTMLElement>) {
28
+ /**
29
+ * TimeFields allow users to enter and edit time values using a keyboard.
30
+ * Each part of the time is displayed in an individually editable segment.
31
+ */
32
+ export const TimeField = React.forwardRef(function TimeField<T extends TimeValue>(props: SpectrumTimeFieldProps<T>, ref: FocusableRef<HTMLElement>) {
29
33
  props = useProviderProps(props);
30
34
  props = useFormProps(props);
31
35
  let {
@@ -89,11 +93,4 @@ function TimeField<T extends TimeValue>(props: SpectrumTimeFieldProps<T>, ref: F
89
93
  </Input>
90
94
  </Field>
91
95
  );
92
- }
93
-
94
- /**
95
- * TimeFields allow users to enter and edit time values using a keyboard.
96
- * Each part of the time is displayed in an individually editable segment.
97
- */
98
- const _TimeField = React.forwardRef(TimeField) as <T extends TimeValue>(props: SpectrumTimeFieldProps<T> & {ref?: FocusableRef<HTMLElement>}) => ReactElement;
99
- export {_TimeField as TimeField};
96
+ }) as <T extends TimeValue>(props: SpectrumTimeFieldProps<T> & {ref?: FocusableRef<HTMLElement>}) => ReactElement;