@react-aria/datepicker 3.10.0 → 3.11.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 (71) hide show
  1. package/dist/ar-AE.mjs +1 -1
  2. package/dist/bg-BG.mjs +1 -1
  3. package/dist/cs-CZ.mjs +1 -1
  4. package/dist/da-DK.mjs +1 -1
  5. package/dist/de-DE.mjs +1 -1
  6. package/dist/el-GR.mjs +1 -1
  7. package/dist/en-US.mjs +1 -1
  8. package/dist/es-ES.mjs +1 -1
  9. package/dist/et-EE.mjs +1 -1
  10. package/dist/fi-FI.mjs +1 -1
  11. package/dist/fr-FR.mjs +1 -1
  12. package/dist/he-IL.mjs +1 -1
  13. package/dist/hr-HR.mjs +1 -1
  14. package/dist/hu-HU.mjs +1 -1
  15. package/dist/intlStrings.mjs +1 -1
  16. package/dist/it-IT.mjs +1 -1
  17. package/dist/ja-JP.mjs +1 -1
  18. package/dist/ko-KR.mjs +1 -1
  19. package/dist/lt-LT.mjs +1 -1
  20. package/dist/lv-LV.mjs +1 -1
  21. package/dist/nb-NO.mjs +1 -1
  22. package/dist/nl-NL.mjs +1 -1
  23. package/dist/pl-PL.mjs +1 -1
  24. package/dist/pt-BR.mjs +1 -1
  25. package/dist/pt-PT.mjs +1 -1
  26. package/dist/ro-RO.mjs +1 -1
  27. package/dist/ru-RU.mjs +1 -1
  28. package/dist/sk-SK.mjs +1 -1
  29. package/dist/sl-SI.mjs +1 -1
  30. package/dist/sr-SP.mjs +1 -1
  31. package/dist/sv-SE.mjs +1 -1
  32. package/dist/tr-TR.mjs +1 -1
  33. package/dist/types.d.ts +10 -10
  34. package/dist/types.d.ts.map +1 -1
  35. package/dist/uk-UA.mjs +1 -1
  36. package/dist/useDateField.main.js +27 -26
  37. package/dist/useDateField.main.js.map +1 -1
  38. package/dist/useDateField.mjs +28 -27
  39. package/dist/useDateField.module.js +27 -26
  40. package/dist/useDateField.module.js.map +1 -1
  41. package/dist/useDatePicker.main.js +23 -23
  42. package/dist/useDatePicker.main.js.map +1 -1
  43. package/dist/useDatePicker.mjs +24 -24
  44. package/dist/useDatePicker.module.js +23 -23
  45. package/dist/useDatePicker.module.js.map +1 -1
  46. package/dist/useDatePickerGroup.main.js +10 -10
  47. package/dist/useDatePickerGroup.main.js.map +1 -1
  48. package/dist/useDatePickerGroup.mjs +11 -11
  49. package/dist/useDatePickerGroup.module.js +10 -10
  50. package/dist/useDatePickerGroup.module.js.map +1 -1
  51. package/dist/useDateRangePicker.main.js +28 -28
  52. package/dist/useDateRangePicker.main.js.map +1 -1
  53. package/dist/useDateRangePicker.mjs +29 -29
  54. package/dist/useDateRangePicker.module.js +28 -28
  55. package/dist/useDateRangePicker.module.js.map +1 -1
  56. package/dist/useDateSegment.main.js +79 -72
  57. package/dist/useDateSegment.main.js.map +1 -1
  58. package/dist/useDateSegment.mjs +80 -73
  59. package/dist/useDateSegment.module.js +79 -72
  60. package/dist/useDateSegment.module.js.map +1 -1
  61. package/dist/useDisplayNames.main.js +2 -2
  62. package/dist/useDisplayNames.mjs +3 -3
  63. package/dist/useDisplayNames.module.js +2 -2
  64. package/dist/zh-CN.mjs +1 -1
  65. package/dist/zh-TW.mjs +1 -1
  66. package/package.json +21 -21
  67. package/src/useDateField.ts +8 -7
  68. package/src/useDatePicker.ts +3 -3
  69. package/src/useDatePickerGroup.ts +4 -4
  70. package/src/useDateRangePicker.ts +3 -3
  71. package/src/useDateSegment.ts +15 -5
package/dist/ar-AE.mjs CHANGED
@@ -20,4 +20,4 @@ $f23889fffbde9058$exports = {
20
20
 
21
21
 
22
22
  export {$f23889fffbde9058$exports as default};
23
- //# sourceMappingURL=ar-AE.mjs.map
23
+ //# sourceMappingURL=ar-AE.module.js.map
package/dist/bg-BG.mjs CHANGED
@@ -20,4 +20,4 @@ $09d9badaa8903929$exports = {
20
20
 
21
21
 
22
22
  export {$09d9badaa8903929$exports as default};
23
- //# sourceMappingURL=bg-BG.mjs.map
23
+ //# sourceMappingURL=bg-BG.module.js.map
package/dist/cs-CZ.mjs CHANGED
@@ -20,4 +20,4 @@ $151b77e0fd711730$exports = {
20
20
 
21
21
 
22
22
  export {$151b77e0fd711730$exports as default};
23
- //# sourceMappingURL=cs-CZ.mjs.map
23
+ //# sourceMappingURL=cs-CZ.module.js.map
package/dist/da-DK.mjs CHANGED
@@ -20,4 +20,4 @@ $61915aa8630b90a2$exports = {
20
20
 
21
21
 
22
22
  export {$61915aa8630b90a2$exports as default};
23
- //# sourceMappingURL=da-DK.mjs.map
23
+ //# sourceMappingURL=da-DK.module.js.map
package/dist/de-DE.mjs CHANGED
@@ -20,4 +20,4 @@ $35cea00159787840$exports = {
20
20
 
21
21
 
22
22
  export {$35cea00159787840$exports as default};
23
- //# sourceMappingURL=de-DE.mjs.map
23
+ //# sourceMappingURL=de-DE.module.js.map
package/dist/el-GR.mjs CHANGED
@@ -20,4 +20,4 @@ $518b4e82b9eacafd$exports = {
20
20
 
21
21
 
22
22
  export {$518b4e82b9eacafd$exports as default};
23
- //# sourceMappingURL=el-GR.mjs.map
23
+ //# sourceMappingURL=el-GR.module.js.map
package/dist/en-US.mjs CHANGED
@@ -20,4 +20,4 @@ $1c2b297f7e2cf474$exports = {
20
20
 
21
21
 
22
22
  export {$1c2b297f7e2cf474$exports as default};
23
- //# sourceMappingURL=en-US.mjs.map
23
+ //# sourceMappingURL=en-US.module.js.map
package/dist/es-ES.mjs CHANGED
@@ -20,4 +20,4 @@ $07f628a707cf9b18$exports = {
20
20
 
21
21
 
22
22
  export {$07f628a707cf9b18$exports as default};
23
- //# sourceMappingURL=es-ES.mjs.map
23
+ //# sourceMappingURL=es-ES.module.js.map
package/dist/et-EE.mjs CHANGED
@@ -20,4 +20,4 @@ $db553ffe17c7f4db$exports = {
20
20
 
21
21
 
22
22
  export {$db553ffe17c7f4db$exports as default};
23
- //# sourceMappingURL=et-EE.mjs.map
23
+ //# sourceMappingURL=et-EE.module.js.map
package/dist/fi-FI.mjs CHANGED
@@ -20,4 +20,4 @@ $4afcfe00cd703f83$exports = {
20
20
 
21
21
 
22
22
  export {$4afcfe00cd703f83$exports as default};
23
- //# sourceMappingURL=fi-FI.mjs.map
23
+ //# sourceMappingURL=fi-FI.module.js.map
package/dist/fr-FR.mjs CHANGED
@@ -20,4 +20,4 @@ $1d2645d18d4c5be0$exports = {
20
20
 
21
21
 
22
22
  export {$1d2645d18d4c5be0$exports as default};
23
- //# sourceMappingURL=fr-FR.mjs.map
23
+ //# sourceMappingURL=fr-FR.module.js.map
package/dist/he-IL.mjs CHANGED
@@ -20,4 +20,4 @@ $64cb6a9be1f6fa48$exports = {
20
20
 
21
21
 
22
22
  export {$64cb6a9be1f6fa48$exports as default};
23
- //# sourceMappingURL=he-IL.mjs.map
23
+ //# sourceMappingURL=he-IL.module.js.map
package/dist/hr-HR.mjs CHANGED
@@ -20,4 +20,4 @@ $2a1ef2e8050be27a$exports = {
20
20
 
21
21
 
22
22
  export {$2a1ef2e8050be27a$exports as default};
23
- //# sourceMappingURL=hr-HR.mjs.map
23
+ //# sourceMappingURL=hr-HR.module.js.map
package/dist/hu-HU.mjs CHANGED
@@ -20,4 +20,4 @@ $ad429dca102acd0e$exports = {
20
20
 
21
21
 
22
22
  export {$ad429dca102acd0e$exports as default};
23
- //# sourceMappingURL=hu-HU.mjs.map
23
+ //# sourceMappingURL=hu-HU.module.js.map
@@ -107,4 +107,4 @@ $dfb4eba373ed9493$exports = {
107
107
 
108
108
 
109
109
  export {$dfb4eba373ed9493$exports as default};
110
- //# sourceMappingURL=intlStrings.mjs.map
110
+ //# sourceMappingURL=intlStrings.module.js.map
package/dist/it-IT.mjs CHANGED
@@ -20,4 +20,4 @@ $6e68cb5d1cb97bd2$exports = {
20
20
 
21
21
 
22
22
  export {$6e68cb5d1cb97bd2$exports as default};
23
- //# sourceMappingURL=it-IT.mjs.map
23
+ //# sourceMappingURL=it-IT.module.js.map
package/dist/ja-JP.mjs CHANGED
@@ -20,4 +20,4 @@ $a82ee9af063ee069$exports = {
20
20
 
21
21
 
22
22
  export {$a82ee9af063ee069$exports as default};
23
- //# sourceMappingURL=ja-JP.mjs.map
23
+ //# sourceMappingURL=ja-JP.module.js.map
package/dist/ko-KR.mjs CHANGED
@@ -20,4 +20,4 @@ $67e9091dbf37d4eb$exports = {
20
20
 
21
21
 
22
22
  export {$67e9091dbf37d4eb$exports as default};
23
- //# sourceMappingURL=ko-KR.mjs.map
23
+ //# sourceMappingURL=ko-KR.module.js.map
package/dist/lt-LT.mjs CHANGED
@@ -20,4 +20,4 @@ $75834f9729f653d1$exports = {
20
20
 
21
21
 
22
22
  export {$75834f9729f653d1$exports as default};
23
- //# sourceMappingURL=lt-LT.mjs.map
23
+ //# sourceMappingURL=lt-LT.module.js.map
package/dist/lv-LV.mjs CHANGED
@@ -20,4 +20,4 @@ $a2df2c2520b4a7f0$exports = {
20
20
 
21
21
 
22
22
  export {$a2df2c2520b4a7f0$exports as default};
23
- //# sourceMappingURL=lv-LV.mjs.map
23
+ //# sourceMappingURL=lv-LV.module.js.map
package/dist/nb-NO.mjs CHANGED
@@ -20,4 +20,4 @@ $aedcd71db4933ed5$exports = {
20
20
 
21
21
 
22
22
  export {$aedcd71db4933ed5$exports as default};
23
- //# sourceMappingURL=nb-NO.mjs.map
23
+ //# sourceMappingURL=nb-NO.module.js.map
package/dist/nl-NL.mjs CHANGED
@@ -20,4 +20,4 @@ $3b2df9e54353046c$exports = {
20
20
 
21
21
 
22
22
  export {$3b2df9e54353046c$exports as default};
23
- //# sourceMappingURL=nl-NL.mjs.map
23
+ //# sourceMappingURL=nl-NL.module.js.map
package/dist/pl-PL.mjs CHANGED
@@ -20,4 +20,4 @@ $c03fe977fcfafe93$exports = {
20
20
 
21
21
 
22
22
  export {$c03fe977fcfafe93$exports as default};
23
- //# sourceMappingURL=pl-PL.mjs.map
23
+ //# sourceMappingURL=pl-PL.module.js.map
package/dist/pt-BR.mjs CHANGED
@@ -20,4 +20,4 @@ $569f006fc292345f$exports = {
20
20
 
21
21
 
22
22
  export {$569f006fc292345f$exports as default};
23
- //# sourceMappingURL=pt-BR.mjs.map
23
+ //# sourceMappingURL=pt-BR.module.js.map
package/dist/pt-PT.mjs CHANGED
@@ -20,4 +20,4 @@ $7c2494e14452f2dd$exports = {
20
20
 
21
21
 
22
22
  export {$7c2494e14452f2dd$exports as default};
23
- //# sourceMappingURL=pt-PT.mjs.map
23
+ //# sourceMappingURL=pt-PT.module.js.map
package/dist/ro-RO.mjs CHANGED
@@ -20,4 +20,4 @@ $eb82ef981b5592bf$exports = {
20
20
 
21
21
 
22
22
  export {$eb82ef981b5592bf$exports as default};
23
- //# sourceMappingURL=ro-RO.mjs.map
23
+ //# sourceMappingURL=ro-RO.module.js.map
package/dist/ru-RU.mjs CHANGED
@@ -20,4 +20,4 @@ $6efa0e119f396950$exports = {
20
20
 
21
21
 
22
22
  export {$6efa0e119f396950$exports as default};
23
- //# sourceMappingURL=ru-RU.mjs.map
23
+ //# sourceMappingURL=ru-RU.module.js.map
package/dist/sk-SK.mjs CHANGED
@@ -20,4 +20,4 @@ $7f5e57085d7f5049$exports = {
20
20
 
21
21
 
22
22
  export {$7f5e57085d7f5049$exports as default};
23
- //# sourceMappingURL=sk-SK.mjs.map
23
+ //# sourceMappingURL=sk-SK.module.js.map
package/dist/sl-SI.mjs CHANGED
@@ -20,4 +20,4 @@ $578ee7c11dcdde7a$exports = {
20
20
 
21
21
 
22
22
  export {$578ee7c11dcdde7a$exports as default};
23
- //# sourceMappingURL=sl-SI.mjs.map
23
+ //# sourceMappingURL=sl-SI.module.js.map
package/dist/sr-SP.mjs CHANGED
@@ -20,4 +20,4 @@ $bbc3fd6cd0bc9d50$exports = {
20
20
 
21
21
 
22
22
  export {$bbc3fd6cd0bc9d50$exports as default};
23
- //# sourceMappingURL=sr-SP.mjs.map
23
+ //# sourceMappingURL=sr-SP.module.js.map
package/dist/sv-SE.mjs CHANGED
@@ -20,4 +20,4 @@ $0b04512118591d2a$exports = {
20
20
 
21
21
 
22
22
  export {$0b04512118591d2a$exports as default};
23
- //# sourceMappingURL=sv-SE.mjs.map
23
+ //# sourceMappingURL=sv-SE.module.js.map
package/dist/tr-TR.mjs CHANGED
@@ -20,4 +20,4 @@ $3a49d121fe4c9e1d$exports = {
20
20
 
21
21
 
22
22
  export {$3a49d121fe4c9e1d$exports as default};
23
- //# sourceMappingURL=tr-TR.mjs.map
23
+ //# sourceMappingURL=tr-TR.module.js.map
package/dist/types.d.ts CHANGED
@@ -1,13 +1,13 @@
1
1
  import { AriaDateFieldProps, AriaTimeFieldProps, DateValue, TimeValue, AriaDatePickerProps, AriaDateRangePickerProps } from "@react-types/datepicker";
2
2
  import { DateFieldState, TimeFieldState, DatePickerState, DateSegment, DateRangePickerState } from "@react-stately/datepicker";
3
- import { DOMAttributes, GroupDOMAttributes, ValidationResult } from "@react-types/shared";
4
- import { InputHTMLAttributes, RefObject } from "react";
3
+ import { DOMAttributes, GroupDOMAttributes, RefObject, ValidationResult } from "@react-types/shared";
4
+ import React, { InputHTMLAttributes } from "react";
5
5
  import { AriaButtonProps } from "@react-types/button";
6
6
  import { AriaDialogProps } from "@react-types/dialog";
7
7
  import { CalendarProps, RangeCalendarProps } from "@react-types/calendar";
8
8
  export interface AriaDateFieldOptions<T extends DateValue> extends Omit<AriaDateFieldProps<T>, 'value' | 'defaultValue' | 'onChange' | 'minValue' | 'maxValue' | 'placeholderValue' | 'validate'> {
9
9
  /** A ref for the hidden input element for HTML form submission. */
10
- inputRef?: RefObject<HTMLInputElement>;
10
+ inputRef?: RefObject<HTMLInputElement | null>;
11
11
  }
12
12
  export interface DateFieldAria extends ValidationResult {
13
13
  /** Props for the field's visible label element, if any. */
@@ -26,17 +26,17 @@ export interface DateFieldAria extends ValidationResult {
26
26
  * A date field allows users to enter and edit date and time values using a keyboard.
27
27
  * Each part of a date value is displayed in an individually editable segment.
28
28
  */
29
- export function useDateField<T extends DateValue>(props: AriaDateFieldOptions<T>, state: DateFieldState, ref: RefObject<Element>): DateFieldAria;
29
+ export function useDateField<T extends DateValue>(props: AriaDateFieldOptions<T>, state: DateFieldState, ref: RefObject<Element | null>): DateFieldAria;
30
30
  interface AriaTimeFieldOptions<T extends TimeValue> extends AriaTimeFieldProps<T> {
31
31
  /** A ref for the hidden input element for HTML form submission. */
32
- inputRef?: RefObject<HTMLInputElement>;
32
+ inputRef?: RefObject<HTMLInputElement | null>;
33
33
  }
34
34
  /**
35
35
  * Provides the behavior and accessibility implementation for a time field component.
36
36
  * A time field allows users to enter and edit time values using a keyboard.
37
37
  * Each part of a time value is displayed in an individually editable segment.
38
38
  */
39
- export function useTimeField<T extends TimeValue>(props: AriaTimeFieldOptions<T>, state: TimeFieldState, ref: RefObject<Element>): DateFieldAria;
39
+ export function useTimeField<T extends TimeValue>(props: AriaTimeFieldOptions<T>, state: TimeFieldState, ref: RefObject<Element | null>): DateFieldAria;
40
40
  export interface DatePickerAria extends ValidationResult {
41
41
  /** Props for the date picker's visible label element, if any. */
42
42
  labelProps: DOMAttributes;
@@ -59,7 +59,7 @@ export interface DatePickerAria extends ValidationResult {
59
59
  * Provides the behavior and accessibility implementation for a date picker component.
60
60
  * A date picker combines a DateField and a Calendar popover to allow users to enter or select a date and time value.
61
61
  */
62
- export function useDatePicker<T extends DateValue>(props: AriaDatePickerProps<T>, state: DatePickerState, ref: RefObject<Element>): DatePickerAria;
62
+ export function useDatePicker<T extends DateValue>(props: AriaDatePickerProps<T>, state: DatePickerState, ref: RefObject<Element | null>): DatePickerAria;
63
63
  type Field = Intl.DateTimeFormatPartTypes;
64
64
  interface DisplayNames {
65
65
  of(field: Field): string;
@@ -68,14 +68,14 @@ interface DisplayNames {
68
68
  export function useDisplayNames(): DisplayNames;
69
69
  export interface DateSegmentAria {
70
70
  /** Props for the segment element. */
71
- segmentProps: DOMAttributes;
71
+ segmentProps: React.HTMLAttributes<HTMLDivElement>;
72
72
  }
73
73
  /**
74
74
  * Provides the behavior and accessibility implementation for a segment in a date field.
75
75
  * A date segment displays an individual unit of a date and time, and allows users to edit
76
76
  * the value by typing or using the arrow keys to increment and decrement.
77
77
  */
78
- export function useDateSegment(segment: DateSegment, state: DateFieldState, ref: RefObject<HTMLElement>): DateSegmentAria;
78
+ export function useDateSegment(segment: DateSegment, state: DateFieldState, ref: RefObject<HTMLElement | null>): DateSegmentAria;
79
79
  export interface DateRangePickerAria extends ValidationResult {
80
80
  /** Props for the date range picker's visible label element, if any. */
81
81
  labelProps: DOMAttributes;
@@ -101,7 +101,7 @@ export interface DateRangePickerAria extends ValidationResult {
101
101
  * A date range picker combines two DateFields and a RangeCalendar popover to allow
102
102
  * users to enter or select a date and time range.
103
103
  */
104
- export function useDateRangePicker<T extends DateValue>(props: AriaDateRangePickerProps<T>, state: DateRangePickerState, ref: RefObject<Element>): DateRangePickerAria;
104
+ export function useDateRangePicker<T extends DateValue>(props: AriaDateRangePickerProps<T>, state: DateRangePickerState, ref: RefObject<Element | null>): DateRangePickerAria;
105
105
  export type { AriaDateFieldProps, AriaDatePickerProps, AriaDateRangePickerProps, DateRange, DateValue, TimeValue } from '@react-types/datepicker';
106
106
  export type { AriaTimeFieldProps } from '@react-types/datepicker';
107
107
 
@@ -1 +1 @@
1
- {"mappings":";;;;;;;AC2BA,sCAAsC,CAAC,SAAS,SAAS,CAAE,SAAQ,IAAI,CAAC,mBAAuB,CAAC,CAAC,EAAE,OAAO,GAAG,cAAc,GAAG,UAAU,GAAG,UAAU,GAAG,UAAU,GAAG,kBAAkB,GAAG,UAAU,CAAC;IACnM,mEAAmE;IACnE,QAAQ,CAAC,EAAE,UAAU,gBAAgB,CAAC,CAAA;CACvC;AAED,8BAA+B,SAAQ,gBAAgB;IACpD,2DAA2D;IAC5D,UAAU,EAAE,aAAa,CAAC;IACzB,4CAA4C;IAC7C,UAAU,EAAE,kBAAkB,CAAC;IAC/B,mEAAmE;IACnE,UAAU,EAAE,oBAAoB,gBAAgB,CAAC,CAAC;IAClD,iDAAiD;IACjD,gBAAgB,EAAE,aAAa,CAAC;IAChC,mDAAm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,YAAY,CAa9C;ACdD;IACE,qCAAqC;IACrC,YAAY,EAAE,aAAa,CAAA;CAC5B;AAED;;;;GAIG;AACH,+BAA+B,OAAO,EAAE,WAAW,EAAE,KAAK,EAAE,cAAc,EAAE,GAAG,EAAE,UAAU,WAAW,CAAC,GAAG,eAAe,CA4WxH;AC/WD,oCAAqC,SAAQ,gBAAgB;IAC3D,uEAAuE;IACvE,UAAU,EAAE,aAAa,CAAC;IAC1B,4EAA4E;IAC5E,UAAU,EAAE,kBAAkB,CAAC;IAC/B,sCAAsC;IACtC,eAAe,EAAE,oBAAoB,SAAS,CAAC,CAAC;IAChD,oCAAoC;IACpC,aAAa,EAAE,oBAAoB,SAAS,CAAC,CAAC;IAC9C,4CAA4C;IAC5C,WAAW,EAAE,eAAe,CAAC;IAC7B,iDAAiD;IACjD,gBAAgB,EAAE,aAAa,CAAC;IAChC,mDAAmD;IACnD,iBAAiB,EAAE,aAAa,CAAC;IACjC,oCAAoC;IACpC,WAAW,EAAE,eAAe,CAAC;IAC7B,8DAA8D;IAC9D,aAAa,EAAE,mBAAmB,SAAS,CAAC,CAAA;CAC7C;AAED;;;;GAIG;AACH,mCAAmC,CAAC,SAAS,SAAS,EAAE,KAAK,EAAE,yBAAyB,CAAC,CAAC,EAAE,KAAK,EAAE,oBAAoB,EAAE,GAAG,EAAE,UAAU,OAAO,CAAC,GAAG,mBAAmB,CAsKrK;AC5MD,YAAY,EAAC,kBAAkB,EAAE,mBAAmB,EAAE,wBAAwB,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAC,MAAM,yBAAyB,CAAC;AAKhJ,YAAY,EAAC,kBAAkB,EAAC,MAAM,yBAAyB,CAAC","sources":["packages/@react-aria/datepicker/src/packages/@react-aria/datepicker/src/useDatePickerGroup.ts","packages/@react-aria/datepicker/src/packages/@react-aria/datepicker/src/useDateField.ts","packages/@react-aria/datepicker/src/packages/@react-aria/datepicker/src/useDatePicker.ts","packages/@react-aria/datepicker/src/packages/@react-aria/datepicker/src/useDisplayNames.ts","packages/@react-aria/datepicker/src/packages/@react-aria/datepicker/src/useDateSegment.ts","packages/@react-aria/datepicker/src/packages/@react-aria/datepicker/src/useDateRangePicker.ts","packages/@react-aria/datepicker/src/packages/@react-aria/datepicker/src/index.ts","packages/@react-aria/datepicker/src/index.ts"],"sourcesContent":[null,null,null,null,null,null,null,"/*\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\nexport {useDatePicker} from './useDatePicker';\nexport {useDateSegment} from './useDateSegment';\nexport {useDateField, useTimeField} from './useDateField';\nexport {useDateRangePicker} from './useDateRangePicker';\nexport {useDisplayNames} from './useDisplayNames';\n\nexport type {AriaDateFieldProps, AriaDatePickerProps, AriaDateRangePickerProps, DateRange, DateValue, TimeValue} from '@react-types/datepicker';\nexport type {AriaDateFieldOptions, DateFieldAria} from './useDateField';\nexport type {DatePickerAria} from './useDatePicker';\nexport type {DateRangePickerAria} from './useDateRangePicker';\nexport type {DateSegmentAria} from './useDateSegment';\nexport type {AriaTimeFieldProps} from '@react-types/datepicker';\n"],"names":[],"version":3,"file":"types.d.ts.map"}
1
+ {"mappings":";;;;;;;AC2BA,sCAAsC,CAAC,SAAS,SAAS,CAAE,SAAQ,IAAI,CAAC,mBAAuB,CAAC,CAAC,EAAE,OAAO,GAAG,cAAc,GAAG,UAAU,GAAG,UAAU,GAAG,UAAU,GAAG,kBAAkB,GAAG,UAAU,CAAC;IACnM,mEAAmE;IACnE,QAAQ,CAAC,EAAE,UAAU,gBAAgB,GAAG,IAAI,CAAC,CAAA;CAC9C;AAED,8BAA+B,SAAQ,gBAA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BAAwB,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAC,MAAM,yBAAyB,CAAC;AAKhJ,YAAY,EAAC,kBAAkB,EAAC,MAAM,yBAAyB,CAAC","sources":["packages/@react-aria/datepicker/src/packages/@react-aria/datepicker/src/useDatePickerGroup.ts","packages/@react-aria/datepicker/src/packages/@react-aria/datepicker/src/useDateField.ts","packages/@react-aria/datepicker/src/packages/@react-aria/datepicker/src/useDatePicker.ts","packages/@react-aria/datepicker/src/packages/@react-aria/datepicker/src/useDisplayNames.ts","packages/@react-aria/datepicker/src/packages/@react-aria/datepicker/src/useDateSegment.ts","packages/@react-aria/datepicker/src/packages/@react-aria/datepicker/src/useDateRangePicker.ts","packages/@react-aria/datepicker/src/packages/@react-aria/datepicker/src/index.ts","packages/@react-aria/datepicker/src/index.ts"],"sourcesContent":[null,null,null,null,null,null,null,"/*\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\nexport {useDatePicker} from './useDatePicker';\nexport {useDateSegment} from './useDateSegment';\nexport {useDateField, useTimeField} from './useDateField';\nexport {useDateRangePicker} from './useDateRangePicker';\nexport {useDisplayNames} from './useDisplayNames';\n\nexport type {AriaDateFieldProps, AriaDatePickerProps, AriaDateRangePickerProps, DateRange, DateValue, TimeValue} from '@react-types/datepicker';\nexport type {AriaDateFieldOptions, DateFieldAria} from './useDateField';\nexport type {DatePickerAria} from './useDatePicker';\nexport type {DateRangePickerAria} from './useDateRangePicker';\nexport type {DateSegmentAria} from './useDateSegment';\nexport type {AriaTimeFieldProps} from '@react-types/datepicker';\n"],"names":[],"version":3,"file":"types.d.ts.map"}
package/dist/uk-UA.mjs CHANGED
@@ -20,4 +20,4 @@ $5ba21dbb8914919d$exports = {
20
20
 
21
21
 
22
22
  export {$5ba21dbb8914919d$exports as default};
23
- //# sourceMappingURL=uk-UA.mjs.map
23
+ //# sourceMappingURL=uk-UA.module.js.map
@@ -42,14 +42,14 @@ $parcel$export(module.exports, "useTimeField", () => $4acc2f407c169e55$export$4c
42
42
 
43
43
 
44
44
  const $4acc2f407c169e55$export$653eddfc964b0f8a = new WeakMap();
45
- const $4acc2f407c169e55$export$300019f83c56d282 = "__role_" + Date.now();
46
- const $4acc2f407c169e55$export$7b3062cd49e80452 = "__focusManager_" + Date.now();
45
+ const $4acc2f407c169e55$export$300019f83c56d282 = '__role_' + Date.now();
46
+ const $4acc2f407c169e55$export$7b3062cd49e80452 = '__focusManager_' + Date.now();
47
47
  function $4acc2f407c169e55$export$5591b0b878c1a989(props, state, ref) {
48
48
  var _state_value;
49
49
  let { isInvalid: isInvalid, validationErrors: validationErrors, validationDetails: validationDetails } = state.displayValidation;
50
50
  let { labelProps: labelProps, fieldProps: fieldProps, descriptionProps: descriptionProps, errorMessageProps: errorMessageProps } = (0, $lVMtq$reactarialabel.useField)({
51
51
  ...props,
52
- labelElementType: "span",
52
+ labelElementType: 'span',
53
53
  isInvalid: isInvalid,
54
54
  errorMessage: props.errorMessage || validationErrors
55
55
  });
@@ -69,34 +69,34 @@ function $4acc2f407c169e55$export$5591b0b878c1a989(props, state, ref) {
69
69
  },
70
70
  onFocusWithinChange: props.onFocusChange
71
71
  });
72
- let stringFormatter = (0, $lVMtq$reactariai18n.useLocalizedStringFormatter)((0, ($parcel$interopDefault($c1905b78f6d2f5bf$exports))), "@react-aria/datepicker");
73
- let message = state.maxGranularity === "hour" ? "selectedTimeDescription" : "selectedDateDescription";
74
- let field = state.maxGranularity === "hour" ? "time" : "date";
72
+ let stringFormatter = (0, $lVMtq$reactariai18n.useLocalizedStringFormatter)((0, ($parcel$interopDefault($c1905b78f6d2f5bf$exports))), '@react-aria/datepicker');
73
+ let message = state.maxGranularity === 'hour' ? 'selectedTimeDescription' : 'selectedDateDescription';
74
+ let field = state.maxGranularity === 'hour' ? 'time' : 'date';
75
75
  let description = state.value ? stringFormatter.format(message, {
76
76
  [field]: state.formatValue({
77
- month: "long"
77
+ month: 'long'
78
78
  })
79
- }) : "";
79
+ }) : '';
80
80
  let descProps = (0, $lVMtq$reactariautils.useDescription)(description);
81
81
  // If within a date picker or date range picker, the date field will have role="presentation" and an aria-describedby
82
82
  // will be passed in that references the value (e.g. entire range). Otherwise, add the field's value description.
83
- let describedBy = props[$4acc2f407c169e55$export$300019f83c56d282] === "presentation" ? fieldProps["aria-describedby"] : [
84
- descProps["aria-describedby"],
85
- fieldProps["aria-describedby"]
86
- ].filter(Boolean).join(" ") || undefined;
83
+ let describedBy = props[$4acc2f407c169e55$export$300019f83c56d282] === 'presentation' ? fieldProps['aria-describedby'] : [
84
+ descProps['aria-describedby'],
85
+ fieldProps['aria-describedby']
86
+ ].filter(Boolean).join(' ') || undefined;
87
87
  let propsFocusManager = props[$4acc2f407c169e55$export$7b3062cd49e80452];
88
88
  let focusManager = (0, $lVMtq$react.useMemo)(()=>propsFocusManager || (0, $lVMtq$reactariafocus.createFocusManager)(ref), [
89
89
  propsFocusManager,
90
90
  ref
91
91
  ]);
92
- let groupProps = (0, $715562ad3b4cced4$exports.useDatePickerGroup)(state, ref, props[$4acc2f407c169e55$export$300019f83c56d282] === "presentation");
92
+ let groupProps = (0, $715562ad3b4cced4$exports.useDatePickerGroup)(state, ref, props[$4acc2f407c169e55$export$300019f83c56d282] === 'presentation');
93
93
  // Pass labels and other information to segments.
94
94
  $4acc2f407c169e55$export$653eddfc964b0f8a.set(state, {
95
- ariaLabel: props["aria-label"],
95
+ ariaLabel: props['aria-label'],
96
96
  ariaLabelledBy: [
97
97
  labelProps.id,
98
- props["aria-labelledby"]
99
- ].filter(Boolean).join(" ") || undefined,
98
+ props['aria-labelledby']
99
+ ].filter(Boolean).join(' ') || undefined,
100
100
  ariaDescribedBy: describedBy,
101
101
  focusManager: focusManager
102
102
  });
@@ -106,13 +106,13 @@ function $4acc2f407c169e55$export$5591b0b878c1a989(props, state, ref) {
106
106
  // with a label and description, and the segments are already labeled by this as well, this
107
107
  // avoids very verbose duplicate announcements.
108
108
  let fieldDOMProps;
109
- if (props[$4acc2f407c169e55$export$300019f83c56d282] === "presentation") fieldDOMProps = {
110
- role: "presentation"
109
+ if (props[$4acc2f407c169e55$export$300019f83c56d282] === 'presentation') fieldDOMProps = {
110
+ role: 'presentation'
111
111
  };
112
112
  else fieldDOMProps = (0, $lVMtq$reactariautils.mergeProps)(fieldProps, {
113
- role: "group",
114
- "aria-disabled": props.isDisabled || undefined,
115
- "aria-describedby": describedBy
113
+ role: 'group',
114
+ 'aria-disabled': props.isDisabled || undefined,
115
+ 'aria-describedby': describedBy
116
116
  });
117
117
  (0, $lVMtq$react.useEffect)(()=>{
118
118
  if (autoFocusRef.current) focusManager.focusFirst();
@@ -128,14 +128,15 @@ function $4acc2f407c169e55$export$5591b0b878c1a989(props, state, ref) {
128
128
  }
129
129
  }, state, props.inputRef);
130
130
  let inputProps = {
131
- type: "hidden",
131
+ type: 'hidden',
132
132
  name: props.name,
133
- value: ((_state_value = state.value) === null || _state_value === void 0 ? void 0 : _state_value.toString()) || ""
133
+ value: ((_state_value = state.value) === null || _state_value === void 0 ? void 0 : _state_value.toString()) || '',
134
+ disabled: props.isDisabled
134
135
  };
135
- if (props.validationBehavior === "native") {
136
+ if (props.validationBehavior === 'native') {
136
137
  // Use a hidden <input type="text"> rather than <input type="hidden">
137
138
  // so that an empty value blocks HTML form submission when the field is required.
138
- inputProps.type = "text";
139
+ inputProps.type = 'text';
139
140
  inputProps.hidden = true;
140
141
  inputProps.required = props.isRequired;
141
142
  // Ignore react warning.
@@ -168,7 +169,7 @@ function $4acc2f407c169e55$export$5591b0b878c1a989(props, state, ref) {
168
169
  function $4acc2f407c169e55$export$4c842f6a241dc825(props, state, ref) {
169
170
  var _state_timeValue;
170
171
  let res = $4acc2f407c169e55$export$5591b0b878c1a989(props, state, ref);
171
- res.inputProps.value = ((_state_timeValue = state.timeValue) === null || _state_timeValue === void 0 ? void 0 : _state_timeValue.toString()) || "";
172
+ res.inputProps.value = ((_state_timeValue = state.timeValue) === null || _state_timeValue === void 0 ? void 0 : _state_timeValue.toString()) || '';
172
173
  return res;
173
174
  }
174
175
 
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;;;AA2CM,MAAM,4CAAW,IAAI;AAIrB,MAAM,4CAAa,YAAY,KAAK,GAAG;AACvC,MAAM,4CAAqB,oBAAoB,KAAK,GAAG;AAOvD,SAAS,0CAAkC,KAA8B,EAAE,KAAqB,EAAE,GAAuB;QAsFrH;IArFT,IAAI,aAAC,SAAS,oBAAE,gBAAgB,qBAAE,iBAAiB,EAAC,GAAG,MAAM,iBAAiB;IAC9E,IAAI,cAAC,UAAU,cAAE,UAAU,oBAAE,gBAAgB,qBAAE,iBAAiB,EAAC,GAAG,CAAA,GAAA,8BAAO,EAAE;QAC3E,GAAG,KAAK;QACR,kBAAkB;mBAClB;QACA,cAAc,MAAM,YAAY,IAAI;IACtC;IAEA,IAAI,eAAe,CAAA,GAAA,mBAAK,EAAoB;IAC5C,IAAI,oBAAC,gBAAgB,EAAC,GAAG,CAAA,GAAA,2CAAa,EAAE;QACtC,GAAG,KAAK;QACR,eAAc,CAAC;gBAEb;YADA,aAAa,OAAO,GAAG,MAAM,KAAK;aAClC,iBAAA,MAAM,OAAO,cAAb,qCAAA,oBAAA,OAAgB;QAClB;QACA,cAAc,CAAC;gBAKb;YAJA,MAAM,kBAAkB;YACxB,IAAI,MAAM,KAAK,KAAK,aAAa,OAAO,EACtC,MAAM,gBAAgB;aAExB,gBAAA,MAAM,MAAM,cAAZ,oCAAA,mBAAA,OAAe;QACjB;QACA,qBAAqB,MAAM,aAAa;IAC1C;IA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U,CAAC,KAAK,GAAG,EAAA,mBAAA,MAAM,SAAS,cAAf,uCAAA,iBAAiB,QAAQ,OAAM;IACtD,OAAO;AACT","sources":["packages/@react-aria/datepicker/src/useDateField.ts"],"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\nimport {AriaDateFieldProps as AriaDateFieldPropsBase, AriaTimeFieldProps, DateValue, TimeValue} from '@react-types/datepicker';\nimport {createFocusManager, FocusManager} from '@react-aria/focus';\nimport {DateFieldState, TimeFieldState} from '@react-stately/datepicker';\nimport {DOMAttributes, GroupDOMAttributes, KeyboardEvent, ValidationResult} from '@react-types/shared';\nimport {filterDOMProps, mergeProps, useDescription, useFormReset} from '@react-aria/utils';\nimport {InputHTMLAttributes, RefObject, useEffect, useMemo, useRef} from 'react';\n// @ts-ignore\nimport intlMessages from '../intl/*.json';\nimport {useDatePickerGroup} from './useDatePickerGroup';\nimport {useField} from '@react-aria/label';\nimport {useFocusWithin} from '@react-aria/interactions';\nimport {useFormValidation} from '@react-aria/form';\nimport {useLocalizedStringFormatter} from '@react-aria/i18n';\n\n// Allows this hook to also be used with TimeField\nexport interface AriaDateFieldOptions<T extends DateValue> extends Omit<AriaDateFieldPropsBase<T>, 'value' | 'defaultValue' | 'onChange' | 'minValue' | 'maxValue' | 'placeholderValue' | 'validate'> {\n /** A ref for the hidden input element for HTML form submission. */\n inputRef?: RefObject<HTMLInputElement>\n}\n\nexport interface DateFieldAria extends ValidationResult {\n /** Props for the field's visible label element, if any. */\n labelProps: DOMAttributes,\n /** Props for the field grouping element. */\n fieldProps: GroupDOMAttributes,\n /** Props for the hidden input element for HTML form submission. */\n inputProps: InputHTMLAttributes<HTMLInputElement>,\n /** Props for the description element, if any. */\n descriptionProps: DOMAttributes,\n /** Props for the error message element, if any. */\n errorMessageProps: DOMAttributes\n}\n\n// Data that is passed between useDateField and useDateSegment.\ninterface HookData {\n ariaLabel: string,\n ariaLabelledBy: string,\n ariaDescribedBy: string,\n focusManager: FocusManager\n}\n\nexport const hookData = new WeakMap<DateFieldState, HookData>();\n\n// Private props that we pass from useDatePicker/useDateRangePicker.\n// Ideally we'd use a Symbol for this, but React doesn't support them: https://github.com/facebook/react/issues/7552\nexport const roleSymbol = '__role_' + Date.now();\nexport const focusManagerSymbol = '__focusManager_' + Date.now();\n\n/**\n * Provides the behavior and accessibility implementation for a date field component.\n * A date field allows users to enter and edit date and time values using a keyboard.\n * Each part of a date value is displayed in an individually editable segment.\n */\nexport function useDateField<T extends DateValue>(props: AriaDateFieldOptions<T>, state: DateFieldState, ref: RefObject<Element>): DateFieldAria {\n let {isInvalid, validationErrors, validationDetails} = state.displayValidation;\n let {labelProps, fieldProps, descriptionProps, errorMessageProps} = useField({\n ...props,\n labelElementType: 'span',\n isInvalid,\n errorMessage: props.errorMessage || validationErrors\n });\n\n let valueOnFocus = useRef<DateValue | null>(null);\n let {focusWithinProps} = useFocusWithin({\n ...props,\n onFocusWithin(e) {\n valueOnFocus.current = state.value;\n props.onFocus?.(e);\n },\n onBlurWithin: (e) => {\n state.confirmPlaceholder();\n if (state.value !== valueOnFocus.current) {\n state.commitValidation();\n }\n props.onBlur?.(e);\n },\n onFocusWithinChange: props.onFocusChange\n });\n\n let stringFormatter = useLocalizedStringFormatter(intlMessages, '@react-aria/datepicker');\n let message = state.maxGranularity === 'hour' ? 'selectedTimeDescription' : 'selectedDateDescription';\n let field = state.maxGranularity === 'hour' ? 'time' : 'date';\n let description = state.value ? stringFormatter.format(message, {[field]: state.formatValue({month: 'long'})}) : '';\n let descProps = useDescription(description);\n\n // If within a date picker or date range picker, the date field will have role=\"presentation\" and an aria-describedby\n // will be passed in that references the value (e.g. entire range). Otherwise, add the field's value description.\n let describedBy = props[roleSymbol] === 'presentation'\n ? fieldProps['aria-describedby']\n : [descProps['aria-describedby'], fieldProps['aria-describedby']].filter(Boolean).join(' ') || undefined;\n let propsFocusManager = props[focusManagerSymbol];\n let focusManager = useMemo(() => propsFocusManager || createFocusManager(ref), [propsFocusManager, ref]);\n let groupProps = useDatePickerGroup(state, ref, props[roleSymbol] === 'presentation');\n\n // Pass labels and other information to segments.\n hookData.set(state, {\n ariaLabel: props['aria-label'],\n ariaLabelledBy: [labelProps.id, props['aria-labelledby']].filter(Boolean).join(' ') || undefined,\n ariaDescribedBy: describedBy,\n focusManager\n });\n\n let autoFocusRef = useRef(props.autoFocus);\n\n // When used within a date picker or date range picker, the field gets role=\"presentation\"\n // rather than role=\"group\". Since the date picker/date range picker already has a role=\"group\"\n // with a label and description, and the segments are already labeled by this as well, this\n // avoids very verbose duplicate announcements.\n let fieldDOMProps: GroupDOMAttributes;\n if (props[roleSymbol] === 'presentation') {\n fieldDOMProps = {\n role: 'presentation'\n };\n } else {\n fieldDOMProps = mergeProps(fieldProps, {\n role: 'group' as const,\n 'aria-disabled': props.isDisabled || undefined,\n 'aria-describedby': describedBy\n });\n }\n\n useEffect(() => {\n if (autoFocusRef.current) {\n focusManager.focusFirst();\n }\n autoFocusRef.current = false;\n }, [focusManager]);\n\n useFormReset(props.inputRef, state.value, state.setValue);\n useFormValidation({\n ...props,\n focus() {\n focusManager.focusFirst();\n }\n }, state, props.inputRef);\n\n let inputProps: InputHTMLAttributes<HTMLInputElement> = {\n type: 'hidden',\n name: props.name,\n value: state.value?.toString() || ''\n };\n\n if (props.validationBehavior === 'native') {\n // Use a hidden <input type=\"text\"> rather than <input type=\"hidden\">\n // so that an empty value blocks HTML form submission when the field is required.\n inputProps.type = 'text';\n inputProps.hidden = true;\n inputProps.required = props.isRequired;\n // Ignore react warning.\n inputProps.onChange = () => {};\n }\n\n let domProps = filterDOMProps(props);\n return {\n labelProps: {\n ...labelProps,\n onClick: () => {\n focusManager.focusFirst();\n }\n },\n fieldProps: mergeProps(domProps, fieldDOMProps, groupProps, focusWithinProps, {\n onKeyDown(e: KeyboardEvent) {\n if (props.onKeyDown) {\n props.onKeyDown(e);\n }\n },\n onKeyUp(e: KeyboardEvent) {\n if (props.onKeyUp) {\n props.onKeyUp(e);\n }\n }\n }),\n inputProps,\n descriptionProps,\n errorMessageProps,\n isInvalid,\n validationErrors,\n validationDetails\n };\n}\n\nexport interface AriaTimeFieldOptions<T extends TimeValue> extends AriaTimeFieldProps<T> {\n /** A ref for the hidden input element for HTML form submission. */\n inputRef?: RefObject<HTMLInputElement>\n}\n\n/**\n * Provides the behavior and accessibility implementation for a time field component.\n * A time field allows users to enter and edit time values using a keyboard.\n * Each part of a time value is displayed in an individually editable segment.\n */\nexport function useTimeField<T extends TimeValue>(props: AriaTimeFieldOptions<T>, state: TimeFieldState, ref: RefObject<Element>): DateFieldAria {\n let res = useDateField(props, state, ref);\n res.inputProps.value = state.timeValue?.toString() || '';\n return res;\n}\n"],"names":[],"version":3,"file":"useDateField.main.js.map"}
1
+ {"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;;;AA2CM,MAAM,4CAAW,IAAI;AAIrB,MAAM,4CAAa,YAAY,KAAK,GAAG;AACvC,MAAM,4CAAqB,oBAAoB,KAAK,GAAG;AAOvD,SAAS,0CAAkC,KAA8B,EAAE,KAAqB,EAAE,GAA8B;QAsF5H;IArFT,IAAI,aAAC,SAAS,oBAAE,gBAAgB,qBAAE,iBAAiB,EAAC,GAAG,MAAM,iBAAiB;IAC9E,IAAI,cAAC,UAAU,cAAE,UAAU,oBAAE,gBAAgB,qBAAE,iBAAiB,EAAC,GAAG,CAAA,GAAA,8BAAO,EAAE;QAC3E,GAAG,KAAK;QACR,kBAAkB;mBAClB;QACA,cAAc,MAAM,YAAY,IAAI;IACtC;IAEA,IAAI,eA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IAC9B,OAAO;QACL,YAAY;YACV,GAAG,UAAU;YACb,SAAS;gBACP,aAAa,UAAU;YACzB;QACF;QACA,YAAY,CAAA,GAAA,gCAAS,EAAE,UAAU,eAAe,YAAY,kBAAkB;YAC5E,WAAU,CAAgB;gBACxB,IAAI,MAAM,SAAS,EACjB,MAAM,SAAS,CAAC;YAEpB;YACA,SAAQ,CAAgB;gBACtB,IAAI,MAAM,OAAO,EACf,MAAM,OAAO,CAAC;YAElB;QACF;oBACA;0BACA;2BACA;mBACA;0BACA;2BACA;IACF;AACF;AAYO,SAAS,0CAAkC,KAA8B,EAAE,KAAqB,EAAE,GAA8B;QAE9G;IADvB,IAAI,MAAM,0CAAa,OAAO,OAAO;IACrC,IAAI,UAAU,CAAC,KAAK,GAAG,EAAA,mBAAA,MAAM,SAAS,cAAf,uCAAA,iBAAiB,QAAQ,OAAM;IACtD,OAAO;AACT","sources":["packages/@react-aria/datepicker/src/useDateField.ts"],"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\nimport {AriaDateFieldProps as AriaDateFieldPropsBase, AriaTimeFieldProps, DateValue, TimeValue} from '@react-types/datepicker';\nimport {createFocusManager, FocusManager} from '@react-aria/focus';\nimport {DateFieldState, TimeFieldState} from '@react-stately/datepicker';\nimport {DOMAttributes, GroupDOMAttributes, KeyboardEvent, RefObject, ValidationResult} from '@react-types/shared';\nimport {filterDOMProps, mergeProps, useDescription, useFormReset} from '@react-aria/utils';\nimport {InputHTMLAttributes, useEffect, useMemo, useRef} from 'react';\n// @ts-ignore\nimport intlMessages from '../intl/*.json';\nimport {useDatePickerGroup} from './useDatePickerGroup';\nimport {useField} from '@react-aria/label';\nimport {useFocusWithin} from '@react-aria/interactions';\nimport {useFormValidation} from '@react-aria/form';\nimport {useLocalizedStringFormatter} from '@react-aria/i18n';\n\n// Allows this hook to also be used with TimeField\nexport interface AriaDateFieldOptions<T extends DateValue> extends Omit<AriaDateFieldPropsBase<T>, 'value' | 'defaultValue' | 'onChange' | 'minValue' | 'maxValue' | 'placeholderValue' | 'validate'> {\n /** A ref for the hidden input element for HTML form submission. */\n inputRef?: RefObject<HTMLInputElement | null>\n}\n\nexport interface DateFieldAria extends ValidationResult {\n /** Props for the field's visible label element, if any. */\n labelProps: DOMAttributes,\n /** Props for the field grouping element. */\n fieldProps: GroupDOMAttributes,\n /** Props for the hidden input element for HTML form submission. */\n inputProps: InputHTMLAttributes<HTMLInputElement>,\n /** Props for the description element, if any. */\n descriptionProps: DOMAttributes,\n /** Props for the error message element, if any. */\n errorMessageProps: DOMAttributes\n}\n\n// Data that is passed between useDateField and useDateSegment.\ninterface HookData {\n ariaLabel: string,\n ariaLabelledBy: string,\n ariaDescribedBy: string,\n focusManager: FocusManager\n}\n\nexport const hookData = new WeakMap<DateFieldState, HookData>();\n\n// Private props that we pass from useDatePicker/useDateRangePicker.\n// Ideally we'd use a Symbol for this, but React doesn't support them: https://github.com/facebook/react/issues/7552\nexport const roleSymbol = '__role_' + Date.now();\nexport const focusManagerSymbol = '__focusManager_' + Date.now();\n\n/**\n * Provides the behavior and accessibility implementation for a date field component.\n * A date field allows users to enter and edit date and time values using a keyboard.\n * Each part of a date value is displayed in an individually editable segment.\n */\nexport function useDateField<T extends DateValue>(props: AriaDateFieldOptions<T>, state: DateFieldState, ref: RefObject<Element | null>): DateFieldAria {\n let {isInvalid, validationErrors, validationDetails} = state.displayValidation;\n let {labelProps, fieldProps, descriptionProps, errorMessageProps} = useField({\n ...props,\n labelElementType: 'span',\n isInvalid,\n errorMessage: props.errorMessage || validationErrors\n });\n\n let valueOnFocus = useRef<DateValue | null>(null);\n let {focusWithinProps} = useFocusWithin({\n ...props,\n onFocusWithin(e) {\n valueOnFocus.current = state.value;\n props.onFocus?.(e);\n },\n onBlurWithin: (e) => {\n state.confirmPlaceholder();\n if (state.value !== valueOnFocus.current) {\n state.commitValidation();\n }\n props.onBlur?.(e);\n },\n onFocusWithinChange: props.onFocusChange\n });\n\n let stringFormatter = useLocalizedStringFormatter(intlMessages, '@react-aria/datepicker');\n let message = state.maxGranularity === 'hour' ? 'selectedTimeDescription' : 'selectedDateDescription';\n let field = state.maxGranularity === 'hour' ? 'time' : 'date';\n let description = state.value ? stringFormatter.format(message, {[field]: state.formatValue({month: 'long'})}) : '';\n let descProps = useDescription(description);\n\n // If within a date picker or date range picker, the date field will have role=\"presentation\" and an aria-describedby\n // will be passed in that references the value (e.g. entire range). Otherwise, add the field's value description.\n let describedBy = props[roleSymbol] === 'presentation'\n ? fieldProps['aria-describedby']\n : [descProps['aria-describedby'], fieldProps['aria-describedby']].filter(Boolean).join(' ') || undefined;\n let propsFocusManager = props[focusManagerSymbol];\n let focusManager = useMemo(() => propsFocusManager || createFocusManager(ref), [propsFocusManager, ref]);\n let groupProps = useDatePickerGroup(state, ref, props[roleSymbol] === 'presentation');\n\n // Pass labels and other information to segments.\n hookData.set(state, {\n ariaLabel: props['aria-label'],\n ariaLabelledBy: [labelProps.id, props['aria-labelledby']].filter(Boolean).join(' ') || undefined,\n ariaDescribedBy: describedBy,\n focusManager\n });\n\n let autoFocusRef = useRef(props.autoFocus);\n\n // When used within a date picker or date range picker, the field gets role=\"presentation\"\n // rather than role=\"group\". Since the date picker/date range picker already has a role=\"group\"\n // with a label and description, and the segments are already labeled by this as well, this\n // avoids very verbose duplicate announcements.\n let fieldDOMProps: GroupDOMAttributes;\n if (props[roleSymbol] === 'presentation') {\n fieldDOMProps = {\n role: 'presentation'\n };\n } else {\n fieldDOMProps = mergeProps(fieldProps, {\n role: 'group' as const,\n 'aria-disabled': props.isDisabled || undefined,\n 'aria-describedby': describedBy\n });\n }\n\n useEffect(() => {\n if (autoFocusRef.current) {\n focusManager.focusFirst();\n }\n autoFocusRef.current = false;\n }, [focusManager]);\n\n useFormReset(props.inputRef, state.value, state.setValue);\n useFormValidation({\n ...props,\n focus() {\n focusManager.focusFirst();\n }\n }, state, props.inputRef);\n\n let inputProps: InputHTMLAttributes<HTMLInputElement> = {\n type: 'hidden',\n name: props.name,\n value: state.value?.toString() || '',\n disabled: props.isDisabled\n };\n\n if (props.validationBehavior === 'native') {\n // Use a hidden <input type=\"text\"> rather than <input type=\"hidden\">\n // so that an empty value blocks HTML form submission when the field is required.\n inputProps.type = 'text';\n inputProps.hidden = true;\n inputProps.required = props.isRequired;\n // Ignore react warning.\n inputProps.onChange = () => {};\n }\n\n let domProps = filterDOMProps(props);\n return {\n labelProps: {\n ...labelProps,\n onClick: () => {\n focusManager.focusFirst();\n }\n },\n fieldProps: mergeProps(domProps, fieldDOMProps, groupProps, focusWithinProps, {\n onKeyDown(e: KeyboardEvent) {\n if (props.onKeyDown) {\n props.onKeyDown(e);\n }\n },\n onKeyUp(e: KeyboardEvent) {\n if (props.onKeyUp) {\n props.onKeyUp(e);\n }\n }\n }),\n inputProps,\n descriptionProps,\n errorMessageProps,\n isInvalid,\n validationErrors,\n validationDetails\n };\n}\n\nexport interface AriaTimeFieldOptions<T extends TimeValue> extends AriaTimeFieldProps<T> {\n /** A ref for the hidden input element for HTML form submission. */\n inputRef?: RefObject<HTMLInputElement | null>\n}\n\n/**\n * Provides the behavior and accessibility implementation for a time field component.\n * A time field allows users to enter and edit time values using a keyboard.\n * Each part of a time value is displayed in an individually editable segment.\n */\nexport function useTimeField<T extends TimeValue>(props: AriaTimeFieldOptions<T>, state: TimeFieldState, ref: RefObject<Element | null>): DateFieldAria {\n let res = useDateField(props, state, ref);\n res.inputProps.value = state.timeValue?.toString() || '';\n return res;\n}\n"],"names":[],"version":3,"file":"useDateField.main.js.map"}