@react-aria/datepicker 3.0.0-nightly.3175 → 3.0.0-rc.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/main.js +321 -294
- package/dist/main.js.map +1 -1
- package/dist/module.js +322 -282
- package/dist/module.js.map +1 -1
- package/dist/types.d.ts +46 -44
- package/dist/types.d.ts.map +1 -1
- package/package.json +18 -18
- package/src/index.ts +7 -1
- package/src/useDateField.ts +49 -21
- package/src/useDatePicker.ts +15 -8
- package/src/useDatePickerGroup.ts +34 -5
- package/src/useDateRangePicker.ts +22 -17
- package/src/useDateSegment.ts +32 -50
- package/src/useDisplayNames.ts +1 -0
package/dist/module.js
CHANGED
|
@@ -1,155 +1,154 @@
|
|
|
1
1
|
import {createFocusManager as $cIPI0$createFocusManager, getFocusableTreeWalker as $cIPI0$getFocusableTreeWalker} from "@react-aria/focus";
|
|
2
|
-
import {useId as $cIPI0$useId, useDescription as $cIPI0$useDescription, mergeProps as $cIPI0$mergeProps, isMac as $cIPI0$isMac, scrollIntoView as $cIPI0$scrollIntoView, getScrollParent as $cIPI0$getScrollParent, useEvent as $cIPI0$useEvent, isIOS as $cIPI0$isIOS, useLabels as $cIPI0$useLabels} from "@react-aria/utils";
|
|
2
|
+
import {useId as $cIPI0$useId, useDescription as $cIPI0$useDescription, filterDOMProps as $cIPI0$filterDOMProps, mergeProps as $cIPI0$mergeProps, isMac as $cIPI0$isMac, scrollIntoView as $cIPI0$scrollIntoView, getScrollParent as $cIPI0$getScrollParent, useEvent as $cIPI0$useEvent, isIOS as $cIPI0$isIOS, useLabels as $cIPI0$useLabels} from "@react-aria/utils";
|
|
3
|
+
import $cIPI0$react, {useMemo as $cIPI0$useMemo, useRef as $cIPI0$useRef, useEffect as $cIPI0$useEffect} from "react";
|
|
3
4
|
import {useField as $cIPI0$useField} from "@react-aria/label";
|
|
4
5
|
import {useMessageFormatter as $cIPI0$useMessageFormatter, useLocale as $cIPI0$useLocale, useDateFormatter as $cIPI0$useDateFormatter, useFilter as $cIPI0$useFilter} from "@react-aria/i18n";
|
|
5
|
-
import {
|
|
6
|
+
import {useFocusWithin as $cIPI0$useFocusWithin, usePress as $cIPI0$usePress} from "@react-aria/interactions";
|
|
6
7
|
import {NumberParser as $cIPI0$NumberParser} from "@internationalized/number";
|
|
7
|
-
import $cIPI0$react, {useRef as $cIPI0$useRef, useMemo as $cIPI0$useMemo, useEffect as $cIPI0$useEffect} from "react";
|
|
8
8
|
import {useSpinButton as $cIPI0$useSpinButton} from "@react-aria/spinbutton";
|
|
9
9
|
import {MessageDictionary as $cIPI0$MessageDictionary} from "@internationalized/message";
|
|
10
10
|
|
|
11
11
|
function $parcel$interopDefault(a) {
|
|
12
12
|
return a && a.__esModule ? a.default : a;
|
|
13
13
|
}
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
}
|
|
14
|
+
|
|
15
|
+
|
|
17
16
|
|
|
18
17
|
var $204383cf4f6b0d06$exports = {};
|
|
19
18
|
var $f23889fffbde9058$exports = {};
|
|
20
|
-
$f23889fffbde9058$exports = JSON.parse("{\"calendar\":\"التقويم\",\"
|
|
19
|
+
$f23889fffbde9058$exports = JSON.parse("{\"calendar\":\"التقويم\",\"day\":\"يوم\",\"dayPeriod\":\"ص/م\",\"endDate\":\"تاريخ الانتهاء\",\"era\":\"العصر\",\"hour\":\"الساعات\",\"minute\":\"الدقائق\",\"month\":\"الشهر\",\"second\":\"الثواني\",\"selectedDateDescription\":\"تاريخ محدد: {date}\",\"selectedRangeDescription\":\"المدى الزمني المحدد: {startDate} إلى {endDate}\",\"selectedTimeDescription\":\"الوقت المحدد: {time}\",\"startDate\":\"تاريخ البدء\",\"timeZoneName\":\"التوقيت\",\"weekday\":\"اليوم\",\"year\":\"السنة\"}");
|
|
21
20
|
|
|
22
21
|
|
|
23
22
|
var $09d9badaa8903929$exports = {};
|
|
24
|
-
$09d9badaa8903929$exports = JSON.parse("{\"calendar\":\"Календар\",\"
|
|
23
|
+
$09d9badaa8903929$exports = JSON.parse("{\"calendar\":\"Календар\",\"day\":\"ден\",\"dayPeriod\":\"пр.об./сл.об.\",\"endDate\":\"Крайна дата\",\"era\":\"ера\",\"hour\":\"час\",\"minute\":\"минута\",\"month\":\"месец\",\"second\":\"секунда\",\"selectedDateDescription\":\"Избрана дата: {date}\",\"selectedRangeDescription\":\"Избран диапазон: {startDate} до {endDate}\",\"selectedTimeDescription\":\"Избрано време: {time}\",\"startDate\":\"Начална дата\",\"timeZoneName\":\"часова зона\",\"weekday\":\"ден от седмицата\",\"year\":\"година\"}");
|
|
25
24
|
|
|
26
25
|
|
|
27
26
|
var $151b77e0fd711730$exports = {};
|
|
28
|
-
$151b77e0fd711730$exports = JSON.parse("{\"calendar\":\"Kalendář\",\"
|
|
27
|
+
$151b77e0fd711730$exports = JSON.parse("{\"calendar\":\"Kalendář\",\"day\":\"den\",\"dayPeriod\":\"část dne\",\"endDate\":\"Konečné datum\",\"era\":\"letopočet\",\"hour\":\"hodina\",\"minute\":\"minuta\",\"month\":\"měsíc\",\"second\":\"sekunda\",\"selectedDateDescription\":\"Vybrané datum: {date}\",\"selectedRangeDescription\":\"Vybrané období: {startDate} až {endDate}\",\"selectedTimeDescription\":\"Vybraný čas: {time}\",\"startDate\":\"Počáteční datum\",\"timeZoneName\":\"časové pásmo\",\"weekday\":\"den v týdnu\",\"year\":\"rok\"}");
|
|
29
28
|
|
|
30
29
|
|
|
31
30
|
var $61915aa8630b90a2$exports = {};
|
|
32
|
-
$61915aa8630b90a2$exports = JSON.parse("{\"calendar\":\"Kalender\",\"
|
|
31
|
+
$61915aa8630b90a2$exports = JSON.parse("{\"calendar\":\"Kalender\",\"day\":\"dag\",\"dayPeriod\":\"AM/PM\",\"endDate\":\"Slutdato\",\"era\":\"æra\",\"hour\":\"time\",\"minute\":\"minut\",\"month\":\"måned\",\"second\":\"sekund\",\"selectedDateDescription\":\"Valgt dato: {date}\",\"selectedRangeDescription\":\"Valgt interval: {startDate} til {endDate}\",\"selectedTimeDescription\":\"Valgt tidspunkt: {time}\",\"startDate\":\"Startdato\",\"timeZoneName\":\"tidszone\",\"weekday\":\"ugedag\",\"year\":\"år\"}");
|
|
33
32
|
|
|
34
33
|
|
|
35
34
|
var $35cea00159787840$exports = {};
|
|
36
|
-
$35cea00159787840$exports = JSON.parse("{\"calendar\":\"Kalender\",\"
|
|
35
|
+
$35cea00159787840$exports = JSON.parse("{\"calendar\":\"Kalender\",\"day\":\"Tag\",\"dayPeriod\":\"Tageshälfte\",\"endDate\":\"Enddatum\",\"era\":\"Epoche\",\"hour\":\"Stunde\",\"minute\":\"Minute\",\"month\":\"Monat\",\"second\":\"Sekunde\",\"selectedDateDescription\":\"Ausgewähltes Datum: {date}\",\"selectedRangeDescription\":\"Ausgewählter Bereich: {startDate} bis {endDate}\",\"selectedTimeDescription\":\"Ausgewählte Zeit: {time}\",\"startDate\":\"Anfangsdatum\",\"timeZoneName\":\"Zeitzone\",\"weekday\":\"Wochentag\",\"year\":\"Jahr\"}");
|
|
37
36
|
|
|
38
37
|
|
|
39
38
|
var $518b4e82b9eacafd$exports = {};
|
|
40
|
-
$518b4e82b9eacafd$exports = JSON.parse("{\"calendar\":\"Ημερολόγιο\",\"
|
|
39
|
+
$518b4e82b9eacafd$exports = JSON.parse("{\"calendar\":\"Ημερολόγιο\",\"day\":\"ημέρα\",\"dayPeriod\":\"π.μ./μ.μ.\",\"endDate\":\"Ημερομηνία λήξης\",\"era\":\"περίοδος\",\"hour\":\"ώρα\",\"minute\":\"λεπτό\",\"month\":\"μήνας\",\"second\":\"δευτερόλεπτο\",\"selectedDateDescription\":\"Επιλεγμένη ημερομηνία: {date}\",\"selectedRangeDescription\":\"Επιλεγμένο εύρος: {startDate} έως {endDate}\",\"selectedTimeDescription\":\"Επιλεγμένη ώρα: {time}\",\"startDate\":\"Ημερομηνία έναρξης\",\"timeZoneName\":\"ζώνη ώρας\",\"weekday\":\"καθημερινή\",\"year\":\"έτος\"}");
|
|
41
40
|
|
|
42
41
|
|
|
43
42
|
var $1c2b297f7e2cf474$exports = {};
|
|
44
|
-
$1c2b297f7e2cf474$exports = JSON.parse("{\"era\":\"era\",\"year\":\"year\",\"month\":\"month\",\"day\":\"day\",\"hour\":\"hour\",\"minute\":\"minute\",\"second\":\"second\",\"dayPeriod\":\"AM/PM\",\"calendar\":\"Calendar\",\"
|
|
43
|
+
$1c2b297f7e2cf474$exports = JSON.parse("{\"era\":\"era\",\"year\":\"year\",\"month\":\"month\",\"day\":\"day\",\"hour\":\"hour\",\"minute\":\"minute\",\"second\":\"second\",\"dayPeriod\":\"AM/PM\",\"calendar\":\"Calendar\",\"startDate\":\"Start Date\",\"endDate\":\"End Date\",\"weekday\":\"day of the week\",\"timeZoneName\":\"time zone\",\"selectedDateDescription\":\"Selected Date: {date}\",\"selectedRangeDescription\":\"Selected Range: {startDate} to {endDate}\",\"selectedTimeDescription\":\"Selected Time: {time}\"}");
|
|
45
44
|
|
|
46
45
|
|
|
47
46
|
var $07f628a707cf9b18$exports = {};
|
|
48
|
-
$07f628a707cf9b18$exports = JSON.parse("{\"calendar\":\"Calendario\",\"
|
|
47
|
+
$07f628a707cf9b18$exports = JSON.parse("{\"calendar\":\"Calendario\",\"day\":\"día\",\"dayPeriod\":\"a. m./p. m.\",\"endDate\":\"Fecha final\",\"era\":\"era\",\"hour\":\"hora\",\"minute\":\"minuto\",\"month\":\"mes\",\"second\":\"segundo\",\"selectedDateDescription\":\"Fecha seleccionada: {date}\",\"selectedRangeDescription\":\"Rango seleccionado: {startDate} a {endDate}\",\"selectedTimeDescription\":\"Hora seleccionada: {time}\",\"startDate\":\"Fecha de inicio\",\"timeZoneName\":\"zona horaria\",\"weekday\":\"día de la semana\",\"year\":\"año\"}");
|
|
49
48
|
|
|
50
49
|
|
|
51
50
|
var $db553ffe17c7f4db$exports = {};
|
|
52
|
-
$db553ffe17c7f4db$exports = JSON.parse("{\"calendar\":\"Kalender\",\"
|
|
51
|
+
$db553ffe17c7f4db$exports = JSON.parse("{\"calendar\":\"Kalender\",\"day\":\"päev\",\"dayPeriod\":\"enne/pärast lõunat\",\"endDate\":\"Lõppkuupäev\",\"era\":\"ajastu\",\"hour\":\"tund\",\"minute\":\"minut\",\"month\":\"kuu\",\"second\":\"sekund\",\"selectedDateDescription\":\"Valitud kuupäev: {date}\",\"selectedRangeDescription\":\"Valitud vahemik: {startDate} kuni {endDate}\",\"selectedTimeDescription\":\"Valitud aeg: {time}\",\"startDate\":\"Alguskuupäev\",\"timeZoneName\":\"ajavöönd\",\"weekday\":\"nädalapäev\",\"year\":\"aasta\"}");
|
|
53
52
|
|
|
54
53
|
|
|
55
54
|
var $4afcfe00cd703f83$exports = {};
|
|
56
|
-
$4afcfe00cd703f83$exports = JSON.parse("{\"calendar\":\"Kalenteri\",\"
|
|
55
|
+
$4afcfe00cd703f83$exports = JSON.parse("{\"calendar\":\"Kalenteri\",\"day\":\"päivä\",\"dayPeriod\":\"vuorokaudenaika\",\"endDate\":\"Päättymispäivä\",\"era\":\"aikakausi\",\"hour\":\"tunti\",\"minute\":\"minuutti\",\"month\":\"kuukausi\",\"second\":\"sekunti\",\"selectedDateDescription\":\"Valittu päivämäärä: {date}\",\"selectedRangeDescription\":\"Valittu aikaväli: {startDate} – {endDate}\",\"selectedTimeDescription\":\"Valittu aika: {time}\",\"startDate\":\"Alkamispäivä\",\"timeZoneName\":\"aikavyöhyke\",\"weekday\":\"viikonpäivä\",\"year\":\"vuosi\"}");
|
|
57
56
|
|
|
58
57
|
|
|
59
58
|
var $1d2645d18d4c5be0$exports = {};
|
|
60
|
-
$1d2645d18d4c5be0$exports = JSON.parse("{\"calendar\":\"Calendrier\",\"
|
|
59
|
+
$1d2645d18d4c5be0$exports = JSON.parse("{\"calendar\":\"Calendrier\",\"day\":\"jour\",\"dayPeriod\":\"cadran\",\"endDate\":\"Date de fin\",\"era\":\"ère\",\"hour\":\"heure\",\"minute\":\"minute\",\"month\":\"mois\",\"second\":\"seconde\",\"selectedDateDescription\":\"Date sélectionnée : {date}\",\"selectedRangeDescription\":\"Plage sélectionnée : {startDate} au {endDate}\",\"selectedTimeDescription\":\"Heure choisie : {time}\",\"startDate\":\"Date de début\",\"timeZoneName\":\"fuseau horaire\",\"weekday\":\"jour de la semaine\",\"year\":\"année\"}");
|
|
61
60
|
|
|
62
61
|
|
|
63
62
|
var $64cb6a9be1f6fa48$exports = {};
|
|
64
|
-
$64cb6a9be1f6fa48$exports = JSON.parse("{\"calendar\":\"לוח שנה\",\"
|
|
63
|
+
$64cb6a9be1f6fa48$exports = JSON.parse("{\"calendar\":\"לוח שנה\",\"day\":\"יום\",\"dayPeriod\":\"לפנה״צ/אחה״צ\",\"endDate\":\"תאריך סיום\",\"era\":\"תקופה\",\"hour\":\"שעה\",\"minute\":\"דקה\",\"month\":\"חודש\",\"second\":\"שנייה\",\"selectedDateDescription\":\"תאריך נבחר: {date}\",\"selectedRangeDescription\":\"טווח נבחר: {startDate} עד {endDate}\",\"selectedTimeDescription\":\"זמן נבחר: {time}\",\"startDate\":\"תאריך התחלה\",\"timeZoneName\":\"אזור זמן\",\"weekday\":\"יום בשבוע\",\"year\":\"שנה\"}");
|
|
65
64
|
|
|
66
65
|
|
|
67
66
|
var $2a1ef2e8050be27a$exports = {};
|
|
68
|
-
$2a1ef2e8050be27a$exports = JSON.parse("{\"calendar\":\"Kalendar\",\"
|
|
67
|
+
$2a1ef2e8050be27a$exports = JSON.parse("{\"calendar\":\"Kalendar\",\"day\":\"dan\",\"dayPeriod\":\"AM/PM\",\"endDate\":\"Datum završetka\",\"era\":\"era\",\"hour\":\"sat\",\"minute\":\"minuta\",\"month\":\"mjesec\",\"second\":\"sekunda\",\"selectedDateDescription\":\"Odabrani datum: {date}\",\"selectedRangeDescription\":\"Odabrani raspon: {startDate} do {endDate}\",\"selectedTimeDescription\":\"Odabrano vrijeme: {time}\",\"startDate\":\"Datum početka\",\"timeZoneName\":\"vremenska zona\",\"weekday\":\"dan u tjednu\",\"year\":\"godina\"}");
|
|
69
68
|
|
|
70
69
|
|
|
71
70
|
var $ad429dca102acd0e$exports = {};
|
|
72
|
-
$ad429dca102acd0e$exports = JSON.parse("{\"calendar\":\"Naptár\",\"
|
|
71
|
+
$ad429dca102acd0e$exports = JSON.parse("{\"calendar\":\"Naptár\",\"day\":\"nap\",\"dayPeriod\":\"napszak\",\"endDate\":\"Befejező dátum\",\"era\":\"éra\",\"hour\":\"óra\",\"minute\":\"perc\",\"month\":\"hónap\",\"second\":\"másodperc\",\"selectedDateDescription\":\"Kijelölt dátum: {date}\",\"selectedRangeDescription\":\"Kijelölt tartomány: {startDate}–{endDate}\",\"selectedTimeDescription\":\"Kijelölt idő: {time}\",\"startDate\":\"Kezdő dátum\",\"timeZoneName\":\"időzóna\",\"weekday\":\"hét napja\",\"year\":\"év\"}");
|
|
73
72
|
|
|
74
73
|
|
|
75
74
|
var $6e68cb5d1cb97bd2$exports = {};
|
|
76
|
-
$6e68cb5d1cb97bd2$exports = JSON.parse("{\"calendar\":\"Calendario\",\"
|
|
75
|
+
$6e68cb5d1cb97bd2$exports = JSON.parse("{\"calendar\":\"Calendario\",\"day\":\"giorno\",\"dayPeriod\":\"AM/PM\",\"endDate\":\"Data finale\",\"era\":\"era\",\"hour\":\"ora\",\"minute\":\"minuto\",\"month\":\"mese\",\"second\":\"secondo\",\"selectedDateDescription\":\"Data selezionata: {date}\",\"selectedRangeDescription\":\"Intervallo selezionato: da {startDate} a {endDate}\",\"selectedTimeDescription\":\"Ora selezionata: {time}\",\"startDate\":\"Data iniziale\",\"timeZoneName\":\"fuso orario\",\"weekday\":\"giorno della settimana\",\"year\":\"anno\"}");
|
|
77
76
|
|
|
78
77
|
|
|
79
78
|
var $a82ee9af063ee069$exports = {};
|
|
80
|
-
$a82ee9af063ee069$exports = JSON.parse("{\"calendar\":\"カレンダー\",\"
|
|
79
|
+
$a82ee9af063ee069$exports = JSON.parse("{\"calendar\":\"カレンダー\",\"day\":\"日\",\"dayPeriod\":\"午前/午後\",\"endDate\":\"終了日\",\"era\":\"時代\",\"hour\":\"時\",\"minute\":\"分\",\"month\":\"月\",\"second\":\"秒\",\"selectedDateDescription\":\"選択した日付 : {date}\",\"selectedRangeDescription\":\"選択範囲 : {startDate} から {endDate}\",\"selectedTimeDescription\":\"選択した時間 : {time}\",\"startDate\":\"開始日\",\"timeZoneName\":\"タイムゾーン\",\"weekday\":\"曜日\",\"year\":\"年\"}");
|
|
81
80
|
|
|
82
81
|
|
|
83
82
|
var $67e9091dbf37d4eb$exports = {};
|
|
84
|
-
$67e9091dbf37d4eb$exports = JSON.parse("{\"calendar\":\"달력\",\"
|
|
83
|
+
$67e9091dbf37d4eb$exports = JSON.parse("{\"calendar\":\"달력\",\"day\":\"일\",\"dayPeriod\":\"오전/오후\",\"endDate\":\"종료 날짜\",\"era\":\"연호\",\"hour\":\"시\",\"minute\":\"분\",\"month\":\"월\",\"second\":\"초\",\"selectedDateDescription\":\"선택 일자: {date}\",\"selectedRangeDescription\":\"선택 범위: {startDate} ~ {endDate}\",\"selectedTimeDescription\":\"선택 시간: {time}\",\"startDate\":\"시작 날짜\",\"timeZoneName\":\"시간대\",\"weekday\":\"요일\",\"year\":\"년\"}");
|
|
85
84
|
|
|
86
85
|
|
|
87
86
|
var $75834f9729f653d1$exports = {};
|
|
88
|
-
$75834f9729f653d1$exports = JSON.parse("{\"calendar\":\"Kalendorius\",\"
|
|
87
|
+
$75834f9729f653d1$exports = JSON.parse("{\"calendar\":\"Kalendorius\",\"day\":\"diena\",\"dayPeriod\":\"iki pietų / po pietų\",\"endDate\":\"Pabaigos data\",\"era\":\"era\",\"hour\":\"valanda\",\"minute\":\"minutė\",\"month\":\"mėnuo\",\"second\":\"sekundė\",\"selectedDateDescription\":\"Pasirinkta data: {date}\",\"selectedRangeDescription\":\"Pasirinktas intervalas: nuo {startDate} iki {endDate}\",\"selectedTimeDescription\":\"Pasirinktas laikas: {time}\",\"startDate\":\"Pradžios data\",\"timeZoneName\":\"laiko juosta\",\"weekday\":\"savaitės diena\",\"year\":\"metai\"}");
|
|
89
88
|
|
|
90
89
|
|
|
91
90
|
var $a2df2c2520b4a7f0$exports = {};
|
|
92
|
-
$a2df2c2520b4a7f0$exports = JSON.parse("{\"calendar\":\"Kalendārs\",\"
|
|
91
|
+
$a2df2c2520b4a7f0$exports = JSON.parse("{\"calendar\":\"Kalendārs\",\"day\":\"diena\",\"dayPeriod\":\"priekšpusdienā/pēcpusdienā\",\"endDate\":\"Beigu datums\",\"era\":\"ēra\",\"hour\":\"stundas\",\"minute\":\"minūtes\",\"month\":\"mēnesis\",\"second\":\"sekundes\",\"selectedDateDescription\":\"Atlasītais datums: {date}\",\"selectedRangeDescription\":\"Atlasītais diapazons: no {startDate} līdz {endDate}\",\"selectedTimeDescription\":\"Atlasītais laiks: {time}\",\"startDate\":\"Sākuma datums\",\"timeZoneName\":\"laika josla\",\"weekday\":\"nedēļas diena\",\"year\":\"gads\"}");
|
|
93
92
|
|
|
94
93
|
|
|
95
94
|
var $aedcd71db4933ed5$exports = {};
|
|
96
|
-
$aedcd71db4933ed5$exports = JSON.parse("{\"calendar\":\"Kalender\",\"
|
|
95
|
+
$aedcd71db4933ed5$exports = JSON.parse("{\"calendar\":\"Kalender\",\"day\":\"dag\",\"dayPeriod\":\"a.m./p.m.\",\"endDate\":\"Sluttdato\",\"era\":\"tidsalder\",\"hour\":\"time\",\"minute\":\"minutt\",\"month\":\"måned\",\"second\":\"sekund\",\"selectedDateDescription\":\"Valgt dato: {date}\",\"selectedRangeDescription\":\"Valgt område: {startDate} til {endDate}\",\"selectedTimeDescription\":\"Valgt tid: {time}\",\"startDate\":\"Startdato\",\"timeZoneName\":\"tidssone\",\"weekday\":\"ukedag\",\"year\":\"år\"}");
|
|
97
96
|
|
|
98
97
|
|
|
99
98
|
var $3b2df9e54353046c$exports = {};
|
|
100
|
-
$3b2df9e54353046c$exports = JSON.parse("{\"calendar\":\"Kalender\",\"
|
|
99
|
+
$3b2df9e54353046c$exports = JSON.parse("{\"calendar\":\"Kalender\",\"day\":\"dag\",\"dayPeriod\":\"a.m./p.m.\",\"endDate\":\"Einddatum\",\"era\":\"tijdperk\",\"hour\":\"uur\",\"minute\":\"minuut\",\"month\":\"maand\",\"second\":\"seconde\",\"selectedDateDescription\":\"Geselecteerde datum: {date}\",\"selectedRangeDescription\":\"Geselecteerd bereik: {startDate} tot {endDate}\",\"selectedTimeDescription\":\"Geselecteerde tijd: {time}\",\"startDate\":\"Startdatum\",\"timeZoneName\":\"tijdzone\",\"weekday\":\"dag van de week\",\"year\":\"jaar\"}");
|
|
101
100
|
|
|
102
101
|
|
|
103
102
|
var $c03fe977fcfafe93$exports = {};
|
|
104
|
-
$c03fe977fcfafe93$exports = JSON.parse("{\"calendar\":\"Kalendarz\",\"
|
|
103
|
+
$c03fe977fcfafe93$exports = JSON.parse("{\"calendar\":\"Kalendarz\",\"day\":\"dzień\",\"dayPeriod\":\"rano / po południu / wieczorem\",\"endDate\":\"Data końcowa\",\"era\":\"era\",\"hour\":\"godzina\",\"minute\":\"minuta\",\"month\":\"miesiąc\",\"second\":\"sekunda\",\"selectedDateDescription\":\"Wybrana data: {date}\",\"selectedRangeDescription\":\"Wybrany zakres: {startDate} do {endDate}\",\"selectedTimeDescription\":\"Wybrany czas: {time}\",\"startDate\":\"Data początkowa\",\"timeZoneName\":\"strefa czasowa\",\"weekday\":\"dzień tygodnia\",\"year\":\"rok\"}");
|
|
105
104
|
|
|
106
105
|
|
|
107
106
|
var $569f006fc292345f$exports = {};
|
|
108
|
-
$569f006fc292345f$exports = JSON.parse("{\"calendar\":\"Calendário\",\"
|
|
107
|
+
$569f006fc292345f$exports = JSON.parse("{\"calendar\":\"Calendário\",\"day\":\"dia\",\"dayPeriod\":\"AM/PM\",\"endDate\":\"Data final\",\"era\":\"era\",\"hour\":\"hora\",\"minute\":\"minuto\",\"month\":\"mês\",\"second\":\"segundo\",\"selectedDateDescription\":\"Data selecionada: {date}\",\"selectedRangeDescription\":\"Intervalo selecionado: {startDate} a {endDate}\",\"selectedTimeDescription\":\"Hora selecionada: {time}\",\"startDate\":\"Data inicial\",\"timeZoneName\":\"fuso horário\",\"weekday\":\"dia da semana\",\"year\":\"ano\"}");
|
|
109
108
|
|
|
110
109
|
|
|
111
110
|
var $7c2494e14452f2dd$exports = {};
|
|
112
|
-
$7c2494e14452f2dd$exports = JSON.parse("{\"calendar\":\"Calendário\",\"
|
|
111
|
+
$7c2494e14452f2dd$exports = JSON.parse("{\"calendar\":\"Calendário\",\"day\":\"dia\",\"dayPeriod\":\"am/pm\",\"endDate\":\"Data de Término\",\"era\":\"era\",\"hour\":\"hora\",\"minute\":\"minuto\",\"month\":\"mês\",\"second\":\"segundo\",\"selectedDateDescription\":\"Data selecionada: {date}\",\"selectedRangeDescription\":\"Intervalo selecionado: {startDate} a {endDate}\",\"selectedTimeDescription\":\"Hora selecionada: {time}\",\"startDate\":\"Data de Início\",\"timeZoneName\":\"fuso horário\",\"weekday\":\"dia da semana\",\"year\":\"ano\"}");
|
|
113
112
|
|
|
114
113
|
|
|
115
114
|
var $eb82ef981b5592bf$exports = {};
|
|
116
|
-
$eb82ef981b5592bf$exports = JSON.parse("{\"calendar\":\"Calendar\",\"
|
|
115
|
+
$eb82ef981b5592bf$exports = JSON.parse("{\"calendar\":\"Calendar\",\"day\":\"zi\",\"dayPeriod\":\"a.m/p.m.\",\"endDate\":\"Dată final\",\"era\":\"eră\",\"hour\":\"oră\",\"minute\":\"minut\",\"month\":\"lună\",\"second\":\"secundă\",\"selectedDateDescription\":\"Dată selectată: {date}\",\"selectedRangeDescription\":\"Interval selectat: de la {startDate} până la {endDate}\",\"selectedTimeDescription\":\"Ora selectată: {time}\",\"startDate\":\"Dată început\",\"timeZoneName\":\"fus orar\",\"weekday\":\"ziua din săptămână\",\"year\":\"an\"}");
|
|
117
116
|
|
|
118
117
|
|
|
119
118
|
var $6efa0e119f396950$exports = {};
|
|
120
|
-
$6efa0e119f396950$exports = JSON.parse("{\"calendar\":\"Календарь\",\"
|
|
119
|
+
$6efa0e119f396950$exports = JSON.parse("{\"calendar\":\"Календарь\",\"day\":\"день\",\"dayPeriod\":\"AM/PM\",\"endDate\":\"Дата окончания\",\"era\":\"эра\",\"hour\":\"час\",\"minute\":\"минута\",\"month\":\"месяц\",\"second\":\"секунда\",\"selectedDateDescription\":\"Выбранная дата: {date}\",\"selectedRangeDescription\":\"Выбранный диапазон: с {startDate} по {endDate}\",\"selectedTimeDescription\":\"Выбранное время: {time}\",\"startDate\":\"Дата начала\",\"timeZoneName\":\"часовой пояс\",\"weekday\":\"день недели\",\"year\":\"год\"}");
|
|
121
120
|
|
|
122
121
|
|
|
123
122
|
var $7f5e57085d7f5049$exports = {};
|
|
124
|
-
$7f5e57085d7f5049$exports = JSON.parse("{\"calendar\":\"Kalendár\",\"
|
|
123
|
+
$7f5e57085d7f5049$exports = JSON.parse("{\"calendar\":\"Kalendár\",\"day\":\"deň\",\"dayPeriod\":\"AM/PM\",\"endDate\":\"Dátum ukončenia\",\"era\":\"letopočet\",\"hour\":\"hodina\",\"minute\":\"minúta\",\"month\":\"mesiac\",\"second\":\"sekunda\",\"selectedDateDescription\":\"Vybratý dátum: {date}\",\"selectedRangeDescription\":\"Vybratý rozsah: od {startDate} do {endDate}\",\"selectedTimeDescription\":\"Vybratý čas: {time}\",\"startDate\":\"Dátum začatia\",\"timeZoneName\":\"časové pásmo\",\"weekday\":\"deň týždňa\",\"year\":\"rok\"}");
|
|
125
124
|
|
|
126
125
|
|
|
127
126
|
var $578ee7c11dcdde7a$exports = {};
|
|
128
|
-
$578ee7c11dcdde7a$exports = JSON.parse("{\"calendar\":\"Koledar\",\"
|
|
127
|
+
$578ee7c11dcdde7a$exports = JSON.parse("{\"calendar\":\"Koledar\",\"day\":\"dan\",\"dayPeriod\":\"dop/pop\",\"endDate\":\"Datum konca\",\"era\":\"doba\",\"hour\":\"ura\",\"minute\":\"minuta\",\"month\":\"mesec\",\"second\":\"sekunda\",\"selectedDateDescription\":\"Izbrani datum: {date}\",\"selectedRangeDescription\":\"Izbrano območje: {startDate} do {endDate}\",\"selectedTimeDescription\":\"Izbrani čas: {time}\",\"startDate\":\"Datum začetka\",\"timeZoneName\":\"časovni pas\",\"weekday\":\"dan v tednu\",\"year\":\"leto\"}");
|
|
129
128
|
|
|
130
129
|
|
|
131
130
|
var $bbc3fd6cd0bc9d50$exports = {};
|
|
132
|
-
$bbc3fd6cd0bc9d50$exports = JSON.parse("{\"calendar\":\"Kalendar\",\"
|
|
131
|
+
$bbc3fd6cd0bc9d50$exports = JSON.parse("{\"calendar\":\"Kalendar\",\"day\":\"дан\",\"dayPeriod\":\"пре подне/по подне\",\"endDate\":\"Datum završetka\",\"era\":\"ера\",\"hour\":\"сат\",\"minute\":\"минут\",\"month\":\"месец\",\"second\":\"секунд\",\"selectedDateDescription\":\"Izabrani datum: {date}\",\"selectedRangeDescription\":\"Izabrani opseg: od {startDate} do {endDate}\",\"selectedTimeDescription\":\"Izabrano vreme: {time}\",\"startDate\":\"Datum početka\",\"timeZoneName\":\"временска зона\",\"weekday\":\"дан у недељи\",\"year\":\"година\"}");
|
|
133
132
|
|
|
134
133
|
|
|
135
134
|
var $0b04512118591d2a$exports = {};
|
|
136
|
-
$0b04512118591d2a$exports = JSON.parse("{\"calendar\":\"Kalender\",\"
|
|
135
|
+
$0b04512118591d2a$exports = JSON.parse("{\"calendar\":\"Kalender\",\"day\":\"dag\",\"dayPeriod\":\"fm/em\",\"endDate\":\"Slutdatum\",\"era\":\"era\",\"hour\":\"timme\",\"minute\":\"minut\",\"month\":\"månad\",\"second\":\"sekund\",\"selectedDateDescription\":\"Valt datum: {date}\",\"selectedRangeDescription\":\"Valt intervall: {startDate} till {endDate}\",\"selectedTimeDescription\":\"Vald tid: {time}\",\"startDate\":\"Startdatum\",\"timeZoneName\":\"tidszon\",\"weekday\":\"veckodag\",\"year\":\"år\"}");
|
|
137
136
|
|
|
138
137
|
|
|
139
138
|
var $3a49d121fe4c9e1d$exports = {};
|
|
140
|
-
$3a49d121fe4c9e1d$exports = JSON.parse("{\"calendar\":\"Takvim\",\"
|
|
139
|
+
$3a49d121fe4c9e1d$exports = JSON.parse("{\"calendar\":\"Takvim\",\"day\":\"gün\",\"dayPeriod\":\"ÖÖ/ÖS\",\"endDate\":\"Bitiş Tarihi\",\"era\":\"çağ\",\"hour\":\"saat\",\"minute\":\"dakika\",\"month\":\"ay\",\"second\":\"saniye\",\"selectedDateDescription\":\"Seçilen Tarih: {date}\",\"selectedRangeDescription\":\"Seçilen Aralık: {startDate} - {endDate}\",\"selectedTimeDescription\":\"Seçilen Zaman: {time}\",\"startDate\":\"Başlangıç Tarihi\",\"timeZoneName\":\"saat dilimi\",\"weekday\":\"haftanın günü\",\"year\":\"yıl\"}");
|
|
141
140
|
|
|
142
141
|
|
|
143
142
|
var $5ba21dbb8914919d$exports = {};
|
|
144
|
-
$5ba21dbb8914919d$exports = JSON.parse("{\"calendar\":\"Календар\",\"
|
|
143
|
+
$5ba21dbb8914919d$exports = JSON.parse("{\"calendar\":\"Календар\",\"day\":\"день\",\"dayPeriod\":\"дп/пп\",\"endDate\":\"Дата завершення\",\"era\":\"ера\",\"hour\":\"година\",\"minute\":\"хвилина\",\"month\":\"місяць\",\"second\":\"секунда\",\"selectedDateDescription\":\"Вибрана дата: {date}\",\"selectedRangeDescription\":\"Вибраний діапазон: {startDate} — {endDate}\",\"selectedTimeDescription\":\"Вибраний час: {time}\",\"startDate\":\"Дата початку\",\"timeZoneName\":\"часовий пояс\",\"weekday\":\"день тижня\",\"year\":\"рік\"}");
|
|
145
144
|
|
|
146
145
|
|
|
147
146
|
var $51078838e1b16cd7$exports = {};
|
|
148
|
-
$51078838e1b16cd7$exports = JSON.parse("{\"calendar\":\"日历\",\"
|
|
147
|
+
$51078838e1b16cd7$exports = JSON.parse("{\"calendar\":\"日历\",\"day\":\"日\",\"dayPeriod\":\"上午/下午\",\"endDate\":\"结束日期\",\"era\":\"纪元\",\"hour\":\"小时\",\"minute\":\"分钟\",\"month\":\"月\",\"second\":\"秒\",\"selectedDateDescription\":\"选定的日期:{date}\",\"selectedRangeDescription\":\"选定的范围:{startDate} 至 {endDate}\",\"selectedTimeDescription\":\"选定的时间:{time}\",\"startDate\":\"开始日期\",\"timeZoneName\":\"时区\",\"weekday\":\"工作日\",\"year\":\"年\"}");
|
|
149
148
|
|
|
150
149
|
|
|
151
150
|
var $33fab8219207655a$exports = {};
|
|
152
|
-
$33fab8219207655a$exports = JSON.parse("{\"calendar\":\"日曆\",\"
|
|
151
|
+
$33fab8219207655a$exports = JSON.parse("{\"calendar\":\"日曆\",\"day\":\"日\",\"dayPeriod\":\"上午/下午\",\"endDate\":\"結束日期\",\"era\":\"纪元\",\"hour\":\"小时\",\"minute\":\"分钟\",\"month\":\"月\",\"second\":\"秒\",\"selectedDateDescription\":\"選定的日期:{date}\",\"selectedRangeDescription\":\"選定的範圍:{startDate} 至 {endDate}\",\"selectedTimeDescription\":\"選定的時間:{time}\",\"startDate\":\"開始日期\",\"timeZoneName\":\"时区\",\"weekday\":\"工作日\",\"year\":\"年\"}");
|
|
153
152
|
|
|
154
153
|
|
|
155
154
|
$204383cf4f6b0d06$exports = {
|
|
@@ -194,14 +193,39 @@ $204383cf4f6b0d06$exports = {
|
|
|
194
193
|
|
|
195
194
|
|
|
196
195
|
|
|
197
|
-
|
|
196
|
+
|
|
197
|
+
|
|
198
|
+
|
|
199
|
+
|
|
200
|
+
|
|
201
|
+
function $3dfb0f96be0d6a08$export$4a931266a3838b86(state, ref1, disableArrowNavigation) {
|
|
202
|
+
let { direction: direction } = $cIPI0$useLocale();
|
|
203
|
+
let focusManager = $cIPI0$useMemo(()=>$cIPI0$createFocusManager(ref1)
|
|
204
|
+
, [
|
|
205
|
+
ref1
|
|
206
|
+
]);
|
|
198
207
|
// Open the popover on alt + arrow down
|
|
199
208
|
let onKeyDown = (e)=>{
|
|
200
|
-
if (e.altKey && e.key === 'ArrowDown' && 'setOpen' in state) {
|
|
209
|
+
if (e.altKey && (e.key === 'ArrowDown' || e.key === 'ArrowUp') && 'setOpen' in state) {
|
|
201
210
|
e.preventDefault();
|
|
202
211
|
e.stopPropagation();
|
|
203
212
|
state.setOpen(true);
|
|
204
213
|
}
|
|
214
|
+
if (disableArrowNavigation) return;
|
|
215
|
+
switch(e.key){
|
|
216
|
+
case 'ArrowLeft':
|
|
217
|
+
e.preventDefault();
|
|
218
|
+
e.stopPropagation();
|
|
219
|
+
if (direction === 'rtl') focusManager.focusNext();
|
|
220
|
+
else focusManager.focusPrevious();
|
|
221
|
+
break;
|
|
222
|
+
case 'ArrowRight':
|
|
223
|
+
e.preventDefault();
|
|
224
|
+
e.stopPropagation();
|
|
225
|
+
if (direction === 'rtl') focusManager.focusPrevious();
|
|
226
|
+
else focusManager.focusNext();
|
|
227
|
+
break;
|
|
228
|
+
}
|
|
205
229
|
};
|
|
206
230
|
// Focus the first placeholder segment from the end on mouse down/touch up in the field.
|
|
207
231
|
let focusLast = ()=>{
|
|
@@ -247,150 +271,125 @@ function $3dfb0f96be0d6a08$export$4a931266a3838b86(state, ref1) {
|
|
|
247
271
|
|
|
248
272
|
|
|
249
273
|
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
274
|
+
|
|
275
|
+
const $16f0b7bb276bc17e$export$653eddfc964b0f8a = new WeakMap();
|
|
276
|
+
const $16f0b7bb276bc17e$export$300019f83c56d282 = '__role_' + Date.now();
|
|
277
|
+
const $16f0b7bb276bc17e$export$7b3062cd49e80452 = '__focusManager_' + Date.now();
|
|
278
|
+
function $16f0b7bb276bc17e$export$5591b0b878c1a989(props, state, ref) {
|
|
254
279
|
let { labelProps: labelProps , fieldProps: fieldProps , descriptionProps: descriptionProps , errorMessageProps: errorMessageProps } = $cIPI0$useField({
|
|
255
280
|
...props,
|
|
256
281
|
labelElementType: 'span'
|
|
257
282
|
});
|
|
258
|
-
let
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
let
|
|
283
|
+
let { focusWithinProps: focusWithinProps } = $cIPI0$useFocusWithin({
|
|
284
|
+
onBlurWithin () {
|
|
285
|
+
state.confirmPlaceholder();
|
|
286
|
+
}
|
|
287
|
+
});
|
|
288
|
+
let formatMessage = $cIPI0$useMessageFormatter((/*@__PURE__*/$parcel$interopDefault($204383cf4f6b0d06$exports)));
|
|
289
|
+
let message = state.maxGranularity === 'hour' ? 'selectedTimeDescription' : 'selectedDateDescription';
|
|
290
|
+
let field = state.maxGranularity === 'hour' ? 'time' : 'date';
|
|
291
|
+
let description = state.value ? formatMessage(message, {
|
|
292
|
+
[field]: state.formatValue({
|
|
293
|
+
month: 'long'
|
|
294
|
+
})
|
|
295
|
+
}) : '';
|
|
296
|
+
let descProps = $cIPI0$useDescription(description);
|
|
297
|
+
// If within a date picker or date range picker, the date field will have role="presentation" and an aria-describedby
|
|
298
|
+
// will be passed in that references the value (e.g. entire range). Otherwise, add the field's value description.
|
|
299
|
+
let describedBy = props[$16f0b7bb276bc17e$export$300019f83c56d282] === 'presentation' ? fieldProps['aria-describedby'] : [
|
|
265
300
|
descProps['aria-describedby'],
|
|
266
301
|
fieldProps['aria-describedby']
|
|
267
302
|
].filter(Boolean).join(' ') || undefined;
|
|
303
|
+
let propsFocusManager = props[$16f0b7bb276bc17e$export$7b3062cd49e80452];
|
|
304
|
+
let focusManager = $cIPI0$useMemo(()=>propsFocusManager || $cIPI0$createFocusManager(ref)
|
|
305
|
+
, [
|
|
306
|
+
propsFocusManager,
|
|
307
|
+
ref
|
|
308
|
+
]);
|
|
309
|
+
let groupProps = $3dfb0f96be0d6a08$export$4a931266a3838b86(state, ref, props[$16f0b7bb276bc17e$export$300019f83c56d282] === 'presentation');
|
|
310
|
+
// Pass labels and other information to segments.
|
|
311
|
+
$16f0b7bb276bc17e$export$653eddfc964b0f8a.set(state, {
|
|
312
|
+
ariaLabel: props['aria-label'],
|
|
313
|
+
ariaLabelledBy: [
|
|
314
|
+
props['aria-labelledby'],
|
|
315
|
+
labelProps.id
|
|
316
|
+
].filter(Boolean).join(' ') || undefined,
|
|
317
|
+
ariaDescribedBy: describedBy,
|
|
318
|
+
focusManager: focusManager
|
|
319
|
+
});
|
|
320
|
+
let autoFocusRef = $cIPI0$useRef(props.autoFocus);
|
|
321
|
+
// When used within a date picker or date range picker, the field gets role="presentation"
|
|
322
|
+
// rather than role="group". Since the date picker/date range picker already has a role="group"
|
|
323
|
+
// with a label and description, and the segments are already labeled by this as well, this
|
|
324
|
+
// avoids very verbose duplicate announcements.
|
|
325
|
+
let fieldDOMProps;
|
|
326
|
+
if (props[$16f0b7bb276bc17e$export$300019f83c56d282] === 'presentation') fieldDOMProps = {
|
|
327
|
+
role: 'presentation'
|
|
328
|
+
};
|
|
329
|
+
else fieldDOMProps = $cIPI0$mergeProps(fieldProps, {
|
|
330
|
+
role: 'group',
|
|
331
|
+
'aria-disabled': props.isDisabled || undefined,
|
|
332
|
+
'aria-describedby': describedBy
|
|
333
|
+
});
|
|
334
|
+
$cIPI0$useEffect(()=>{
|
|
335
|
+
if (autoFocusRef.current) focusManager.focusFirst();
|
|
336
|
+
autoFocusRef.current = false;
|
|
337
|
+
}, [
|
|
338
|
+
focusManager
|
|
339
|
+
]);
|
|
340
|
+
let domProps = $cIPI0$filterDOMProps(props);
|
|
268
341
|
return {
|
|
269
|
-
groupProps: $cIPI0$mergeProps(groupProps, descProps, {
|
|
270
|
-
role: 'group',
|
|
271
|
-
'aria-disabled': props.isDisabled || null,
|
|
272
|
-
'aria-labelledby': labelledBy,
|
|
273
|
-
'aria-describedby': ariaDescribedBy
|
|
274
|
-
}),
|
|
275
342
|
labelProps: {
|
|
276
343
|
...labelProps,
|
|
277
344
|
onClick: ()=>{
|
|
278
|
-
let focusManager = $cIPI0$createFocusManager(ref);
|
|
279
345
|
focusManager.focusFirst();
|
|
280
346
|
}
|
|
281
347
|
},
|
|
282
|
-
fieldProps:
|
|
283
|
-
...fieldProps,
|
|
284
|
-
value: state.value,
|
|
285
|
-
onChange: state.setValue,
|
|
286
|
-
minValue: props.minValue,
|
|
287
|
-
maxValue: props.maxValue,
|
|
288
|
-
placeholderValue: props.placeholderValue,
|
|
289
|
-
hideTimeZone: props.hideTimeZone,
|
|
290
|
-
hourCycle: props.hourCycle,
|
|
291
|
-
granularity: props.granularity,
|
|
292
|
-
isDisabled: props.isDisabled,
|
|
293
|
-
isReadOnly: props.isReadOnly,
|
|
294
|
-
isRequired: props.isRequired,
|
|
295
|
-
validationState: state.validationState,
|
|
296
|
-
autoFocus: props.autoFocus
|
|
297
|
-
},
|
|
348
|
+
fieldProps: $cIPI0$mergeProps(domProps, fieldDOMProps, groupProps, focusWithinProps),
|
|
298
349
|
descriptionProps: descriptionProps,
|
|
299
|
-
errorMessageProps: errorMessageProps
|
|
300
|
-
buttonProps: {
|
|
301
|
-
...descProps,
|
|
302
|
-
id: buttonId,
|
|
303
|
-
excludeFromTabOrder: true,
|
|
304
|
-
'aria-haspopup': 'dialog',
|
|
305
|
-
'aria-label': formatMessage('calendar'),
|
|
306
|
-
'aria-labelledby': `${labelledBy} ${buttonId}`,
|
|
307
|
-
'aria-describedby': ariaDescribedBy,
|
|
308
|
-
onPress: ()=>state.setOpen(true)
|
|
309
|
-
},
|
|
310
|
-
dialogProps: {
|
|
311
|
-
id: dialogId,
|
|
312
|
-
'aria-labelledby': `${labelledBy} ${buttonId}`
|
|
313
|
-
},
|
|
314
|
-
calendarProps: {
|
|
315
|
-
autoFocus: true,
|
|
316
|
-
value: state.dateValue,
|
|
317
|
-
onChange: state.setDateValue,
|
|
318
|
-
minValue: props.minValue,
|
|
319
|
-
maxValue: props.maxValue,
|
|
320
|
-
isDisabled: props.isDisabled,
|
|
321
|
-
isReadOnly: props.isReadOnly,
|
|
322
|
-
isDateUnavailable: props.isDateUnavailable,
|
|
323
|
-
defaultFocusedValue: state.dateValue ? undefined : props.placeholderValue
|
|
324
|
-
}
|
|
350
|
+
errorMessageProps: errorMessageProps
|
|
325
351
|
};
|
|
326
352
|
}
|
|
353
|
+
function $16f0b7bb276bc17e$export$4c842f6a241dc825(props, state, ref) {
|
|
354
|
+
return $16f0b7bb276bc17e$export$5591b0b878c1a989(props, state, ref);
|
|
355
|
+
}
|
|
327
356
|
|
|
328
357
|
|
|
329
358
|
|
|
330
359
|
|
|
331
360
|
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
const $887cac91b7cc8801$export$7b3062cd49e80452 = '__focusManager_' + Date.now();
|
|
340
|
-
function $887cac91b7cc8801$export$12fd5f0e9f4bb192(props, state, ref) {
|
|
341
|
-
var ref1, ref2;
|
|
361
|
+
function $6057a3d2a53a12fd$export$42df105a73306d51(props, state, ref) {
|
|
362
|
+
let buttonId = $cIPI0$useId();
|
|
363
|
+
let dialogId = $cIPI0$useId();
|
|
342
364
|
let formatMessage = $cIPI0$useMessageFormatter((/*@__PURE__*/$parcel$interopDefault($204383cf4f6b0d06$exports)));
|
|
343
365
|
let { labelProps: labelProps , fieldProps: fieldProps , descriptionProps: descriptionProps , errorMessageProps: errorMessageProps } = $cIPI0$useField({
|
|
344
366
|
...props,
|
|
345
367
|
labelElementType: 'span'
|
|
346
368
|
});
|
|
369
|
+
let groupProps = $3dfb0f96be0d6a08$export$4a931266a3838b86(state, ref);
|
|
347
370
|
let labelledBy = fieldProps['aria-labelledby'] || fieldProps.id;
|
|
348
371
|
let { locale: locale } = $cIPI0$useLocale();
|
|
349
|
-
let
|
|
372
|
+
let date = state.formatValue(locale, {
|
|
350
373
|
month: 'long'
|
|
351
374
|
});
|
|
375
|
+
let description = date ? formatMessage('selectedDateDescription', {
|
|
376
|
+
date: date
|
|
377
|
+
}) : '';
|
|
352
378
|
let descProps = $cIPI0$useDescription(description);
|
|
353
|
-
let startFieldProps = $cIPI0$useLabels({
|
|
354
|
-
'aria-label': formatMessage('startDate'),
|
|
355
|
-
'aria-labelledby': labelledBy
|
|
356
|
-
});
|
|
357
|
-
let endFieldProps = $cIPI0$useLabels({
|
|
358
|
-
'aria-label': formatMessage('endDate'),
|
|
359
|
-
'aria-labelledby': labelledBy
|
|
360
|
-
});
|
|
361
|
-
let buttonId = $cIPI0$useId();
|
|
362
|
-
let dialogId = $cIPI0$useId();
|
|
363
|
-
let groupProps = $3dfb0f96be0d6a08$export$4a931266a3838b86(state, ref);
|
|
364
|
-
let { focusWithinProps: focusWithinProps } = $cIPI0$useFocusWithin({
|
|
365
|
-
onBlurWithin () {
|
|
366
|
-
state.confirmPlaceholder();
|
|
367
|
-
}
|
|
368
|
-
});
|
|
369
379
|
let ariaDescribedBy = [
|
|
370
380
|
descProps['aria-describedby'],
|
|
371
381
|
fieldProps['aria-describedby']
|
|
372
382
|
].filter(Boolean).join(' ') || undefined;
|
|
383
|
+
let domProps = $cIPI0$filterDOMProps(props);
|
|
373
384
|
let focusManager = $cIPI0$useMemo(()=>$cIPI0$createFocusManager(ref)
|
|
374
385
|
, [
|
|
375
386
|
ref
|
|
376
387
|
]);
|
|
377
|
-
let commonFieldProps = {
|
|
378
|
-
[$887cac91b7cc8801$export$7b3062cd49e80452]: focusManager,
|
|
379
|
-
minValue: props.minValue,
|
|
380
|
-
maxValue: props.maxValue,
|
|
381
|
-
placeholderValue: props.placeholderValue,
|
|
382
|
-
hideTimeZone: props.hideTimeZone,
|
|
383
|
-
hourCycle: props.hourCycle,
|
|
384
|
-
granularity: props.granularity,
|
|
385
|
-
isDisabled: props.isDisabled,
|
|
386
|
-
isReadOnly: props.isReadOnly,
|
|
387
|
-
isRequired: props.isRequired,
|
|
388
|
-
validationState: state.validationState
|
|
389
|
-
};
|
|
390
388
|
return {
|
|
391
|
-
groupProps: $cIPI0$mergeProps(groupProps, fieldProps, descProps,
|
|
389
|
+
groupProps: $cIPI0$mergeProps(domProps, groupProps, fieldProps, descProps, {
|
|
392
390
|
role: 'group',
|
|
393
391
|
'aria-disabled': props.isDisabled || null,
|
|
392
|
+
'aria-labelledby': labelledBy,
|
|
394
393
|
'aria-describedby': ariaDescribedBy
|
|
395
394
|
}),
|
|
396
395
|
labelProps: {
|
|
@@ -399,10 +398,29 @@ function $887cac91b7cc8801$export$12fd5f0e9f4bb192(props, state, ref) {
|
|
|
399
398
|
focusManager.focusFirst();
|
|
400
399
|
}
|
|
401
400
|
},
|
|
401
|
+
fieldProps: {
|
|
402
|
+
...fieldProps,
|
|
403
|
+
[$16f0b7bb276bc17e$export$300019f83c56d282]: 'presentation',
|
|
404
|
+
'aria-describedby': ariaDescribedBy,
|
|
405
|
+
value: state.value,
|
|
406
|
+
onChange: state.setValue,
|
|
407
|
+
minValue: props.minValue,
|
|
408
|
+
maxValue: props.maxValue,
|
|
409
|
+
placeholderValue: props.placeholderValue,
|
|
410
|
+
hideTimeZone: props.hideTimeZone,
|
|
411
|
+
hourCycle: props.hourCycle,
|
|
412
|
+
granularity: props.granularity,
|
|
413
|
+
isDisabled: props.isDisabled,
|
|
414
|
+
isReadOnly: props.isReadOnly,
|
|
415
|
+
isRequired: props.isRequired,
|
|
416
|
+
validationState: state.validationState,
|
|
417
|
+
autoFocus: props.autoFocus
|
|
418
|
+
},
|
|
419
|
+
descriptionProps: descriptionProps,
|
|
420
|
+
errorMessageProps: errorMessageProps,
|
|
402
421
|
buttonProps: {
|
|
403
422
|
...descProps,
|
|
404
423
|
id: buttonId,
|
|
405
|
-
excludeFromTabOrder: true,
|
|
406
424
|
'aria-haspopup': 'dialog',
|
|
407
425
|
'aria-label': formatMessage('calendar'),
|
|
408
426
|
'aria-labelledby': `${labelledBy} ${buttonId}`,
|
|
@@ -413,35 +431,18 @@ function $887cac91b7cc8801$export$12fd5f0e9f4bb192(props, state, ref) {
|
|
|
413
431
|
id: dialogId,
|
|
414
432
|
'aria-labelledby': `${labelledBy} ${buttonId}`
|
|
415
433
|
},
|
|
416
|
-
startFieldProps: {
|
|
417
|
-
...startFieldProps,
|
|
418
|
-
...commonFieldProps,
|
|
419
|
-
'aria-describedby': fieldProps['aria-describedby'],
|
|
420
|
-
value: (ref1 = state.value) === null || ref1 === void 0 ? void 0 : ref1.start,
|
|
421
|
-
onChange: (start)=>state.setDateTime('start', start)
|
|
422
|
-
,
|
|
423
|
-
autoFocus: props.autoFocus
|
|
424
|
-
},
|
|
425
|
-
endFieldProps: {
|
|
426
|
-
...endFieldProps,
|
|
427
|
-
...commonFieldProps,
|
|
428
|
-
'aria-describedby': fieldProps['aria-describedby'],
|
|
429
|
-
value: (ref2 = state.value) === null || ref2 === void 0 ? void 0 : ref2.end,
|
|
430
|
-
onChange: (end)=>state.setDateTime('end', end)
|
|
431
|
-
},
|
|
432
|
-
descriptionProps: descriptionProps,
|
|
433
|
-
errorMessageProps: errorMessageProps,
|
|
434
434
|
calendarProps: {
|
|
435
435
|
autoFocus: true,
|
|
436
|
-
value: state.
|
|
437
|
-
onChange: state.
|
|
436
|
+
value: state.dateValue,
|
|
437
|
+
onChange: state.setDateValue,
|
|
438
438
|
minValue: props.minValue,
|
|
439
439
|
maxValue: props.maxValue,
|
|
440
440
|
isDisabled: props.isDisabled,
|
|
441
441
|
isReadOnly: props.isReadOnly,
|
|
442
442
|
isDateUnavailable: props.isDateUnavailable,
|
|
443
|
-
|
|
444
|
-
|
|
443
|
+
defaultFocusedValue: state.dateValue ? undefined : props.placeholderValue,
|
|
444
|
+
validationState: state.validationState,
|
|
445
|
+
errorMessage: props.errorMessage
|
|
445
446
|
}
|
|
446
447
|
};
|
|
447
448
|
}
|
|
@@ -453,73 +454,6 @@ function $887cac91b7cc8801$export$12fd5f0e9f4bb192(props, state, ref) {
|
|
|
453
454
|
|
|
454
455
|
|
|
455
456
|
|
|
456
|
-
const $16f0b7bb276bc17e$export$653eddfc964b0f8a = new WeakMap();
|
|
457
|
-
function $16f0b7bb276bc17e$export$5591b0b878c1a989(props, state, ref) {
|
|
458
|
-
let { labelProps: labelProps , fieldProps: fieldProps , descriptionProps: descriptionProps , errorMessageProps: errorMessageProps } = $cIPI0$useField({
|
|
459
|
-
...props,
|
|
460
|
-
labelElementType: 'span'
|
|
461
|
-
});
|
|
462
|
-
let groupProps = $3dfb0f96be0d6a08$export$4a931266a3838b86(state, ref);
|
|
463
|
-
let { focusWithinProps: focusWithinProps } = $cIPI0$useFocusWithin({
|
|
464
|
-
onBlurWithin () {
|
|
465
|
-
state.confirmPlaceholder();
|
|
466
|
-
}
|
|
467
|
-
});
|
|
468
|
-
let formatter = $cIPI0$useDateFormatter(state.getFormatOptions({
|
|
469
|
-
month: 'long'
|
|
470
|
-
}));
|
|
471
|
-
let descProps = $cIPI0$useDescription(state.value ? formatter.format(state.dateValue) : null);
|
|
472
|
-
let segmentLabelledBy = fieldProps['aria-labelledby'] || fieldProps.id;
|
|
473
|
-
let describedBy = [
|
|
474
|
-
descProps['aria-describedby'],
|
|
475
|
-
fieldProps['aria-describedby']
|
|
476
|
-
].filter(Boolean).join(' ') || undefined;
|
|
477
|
-
let propsFocusManager = props[$887cac91b7cc8801$export$7b3062cd49e80452];
|
|
478
|
-
let focusManager = $cIPI0$useMemo(()=>propsFocusManager || $cIPI0$createFocusManager(ref)
|
|
479
|
-
, [
|
|
480
|
-
propsFocusManager,
|
|
481
|
-
ref
|
|
482
|
-
]);
|
|
483
|
-
$16f0b7bb276bc17e$export$653eddfc964b0f8a.set(state, {
|
|
484
|
-
ariaLabelledBy: segmentLabelledBy,
|
|
485
|
-
ariaDescribedBy: describedBy,
|
|
486
|
-
focusManager: focusManager
|
|
487
|
-
});
|
|
488
|
-
let autoFocusRef = $cIPI0$useRef(props.autoFocus);
|
|
489
|
-
$cIPI0$useEffect(()=>{
|
|
490
|
-
if (autoFocusRef.current) focusManager.focusFirst();
|
|
491
|
-
autoFocusRef.current = false;
|
|
492
|
-
}, [
|
|
493
|
-
focusManager
|
|
494
|
-
]);
|
|
495
|
-
return {
|
|
496
|
-
labelProps: {
|
|
497
|
-
...labelProps,
|
|
498
|
-
onClick: ()=>{
|
|
499
|
-
focusManager.focusFirst();
|
|
500
|
-
}
|
|
501
|
-
},
|
|
502
|
-
fieldProps: $cIPI0$mergeProps(fieldProps, descProps, groupProps, focusWithinProps, {
|
|
503
|
-
role: 'group',
|
|
504
|
-
'aria-disabled': props.isDisabled || undefined,
|
|
505
|
-
'aria-describedby': describedBy
|
|
506
|
-
}),
|
|
507
|
-
descriptionProps: descriptionProps,
|
|
508
|
-
errorMessageProps: errorMessageProps
|
|
509
|
-
};
|
|
510
|
-
}
|
|
511
|
-
function $16f0b7bb276bc17e$export$4c842f6a241dc825(props, state, ref) {
|
|
512
|
-
return $16f0b7bb276bc17e$export$5591b0b878c1a989(props, state, ref);
|
|
513
|
-
}
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
var $3aeceb3a64eb8358$exports = {};
|
|
520
|
-
|
|
521
|
-
$parcel$export($3aeceb3a64eb8358$exports, "useDisplayNames", () => $3aeceb3a64eb8358$export$d42c60378c8168f8);
|
|
522
|
-
|
|
523
457
|
|
|
524
458
|
|
|
525
459
|
|
|
@@ -552,12 +486,11 @@ class $3aeceb3a64eb8358$var$DisplayNamesPolyfill {
|
|
|
552
486
|
|
|
553
487
|
|
|
554
488
|
|
|
555
|
-
|
|
556
489
|
function $32489daedd52963e$export$1315d136e6f7581(segment, state, ref) {
|
|
557
490
|
let enteredKeys = $cIPI0$useRef('');
|
|
558
|
-
let { locale: locale
|
|
491
|
+
let { locale: locale } = $cIPI0$useLocale();
|
|
559
492
|
let displayNames = $3aeceb3a64eb8358$export$d42c60378c8168f8();
|
|
560
|
-
let { ariaLabelledBy: ariaLabelledBy , ariaDescribedBy: ariaDescribedBy , focusManager: focusManager } = $16f0b7bb276bc17e$export$653eddfc964b0f8a.get(state);
|
|
493
|
+
let { ariaLabel: ariaLabel , ariaLabelledBy: ariaLabelledBy , ariaDescribedBy: ariaDescribedBy , focusManager: focusManager } = $16f0b7bb276bc17e$export$653eddfc964b0f8a.get(state);
|
|
561
494
|
let textValue = segment.text;
|
|
562
495
|
let options = $cIPI0$useMemo(()=>state.dateFormatter.resolvedOptions()
|
|
563
496
|
, [
|
|
@@ -575,7 +508,7 @@ function $32489daedd52963e$export$1315d136e6f7581(segment, state, ref) {
|
|
|
575
508
|
if (segment.type === 'month') {
|
|
576
509
|
let monthTextValue = monthDateFormatter.format(state.dateValue);
|
|
577
510
|
textValue = monthTextValue !== textValue ? `${textValue} – ${monthTextValue}` : monthTextValue;
|
|
578
|
-
} else if (segment.type === 'hour'
|
|
511
|
+
} else if (segment.type === 'hour') textValue = hourDateFormatter.format(state.dateValue);
|
|
579
512
|
let { spinButtonProps: spinButtonProps } = $cIPI0$useSpinButton({
|
|
580
513
|
value: segment.value,
|
|
581
514
|
textValue: textValue,
|
|
@@ -630,33 +563,11 @@ function $32489daedd52963e$export$1315d136e6f7581(segment, state, ref) {
|
|
|
630
563
|
if (e.key === 'a' && ($cIPI0$isMac() ? e.metaKey : e.ctrlKey)) e.preventDefault();
|
|
631
564
|
if (e.ctrlKey || e.metaKey || e.shiftKey || e.altKey) return;
|
|
632
565
|
switch(e.key){
|
|
633
|
-
case 'ArrowLeft':
|
|
634
|
-
e.preventDefault();
|
|
635
|
-
e.stopPropagation();
|
|
636
|
-
if (direction === 'rtl') focusManager.focusNext({
|
|
637
|
-
tabbable: true
|
|
638
|
-
});
|
|
639
|
-
else focusManager.focusPrevious({
|
|
640
|
-
tabbable: true
|
|
641
|
-
});
|
|
642
|
-
break;
|
|
643
|
-
case 'ArrowRight':
|
|
644
|
-
e.preventDefault();
|
|
645
|
-
e.stopPropagation();
|
|
646
|
-
if (direction === 'rtl') focusManager.focusPrevious({
|
|
647
|
-
tabbable: true
|
|
648
|
-
});
|
|
649
|
-
else focusManager.focusNext({
|
|
650
|
-
tabbable: true
|
|
651
|
-
});
|
|
652
|
-
break;
|
|
653
566
|
case 'Enter':
|
|
654
567
|
e.preventDefault();
|
|
655
568
|
e.stopPropagation();
|
|
656
569
|
if (segment.isPlaceholder && !state.isReadOnly) state.confirmPlaceholder(segment.type);
|
|
657
|
-
focusManager.focusNext(
|
|
658
|
-
tabbable: true
|
|
659
|
-
});
|
|
570
|
+
focusManager.focusNext();
|
|
660
571
|
break;
|
|
661
572
|
case 'Tab':
|
|
662
573
|
break;
|
|
@@ -701,9 +612,7 @@ function $32489daedd52963e$export$1315d136e6f7581(segment, state, ref) {
|
|
|
701
612
|
if (startsWith(am, key)) state.setSegment('dayPeriod', 0);
|
|
702
613
|
else if (startsWith(pm, key)) state.setSegment('dayPeriod', 12);
|
|
703
614
|
else break;
|
|
704
|
-
focusManager.focusNext(
|
|
705
|
-
tabbable: true
|
|
706
|
-
});
|
|
615
|
+
focusManager.focusNext();
|
|
707
616
|
break;
|
|
708
617
|
case 'day':
|
|
709
618
|
case 'hour':
|
|
@@ -733,9 +642,7 @@ function $32489daedd52963e$export$1315d136e6f7581(segment, state, ref) {
|
|
|
733
642
|
if (shouldSetValue) state.setSegment(segment.type, segmentValue);
|
|
734
643
|
if (Number(numberValue + '0') > segment.maxValue || newValue.length >= String(segment.maxValue).length) {
|
|
735
644
|
enteredKeys.current = '';
|
|
736
|
-
if (shouldSetValue) focusManager.focusNext(
|
|
737
|
-
tabbable: true
|
|
738
|
-
});
|
|
645
|
+
if (shouldSetValue) focusManager.focusNext();
|
|
739
646
|
} else enteredKeys.current = newValue;
|
|
740
647
|
break;
|
|
741
648
|
}
|
|
@@ -747,9 +654,11 @@ function $32489daedd52963e$export$1315d136e6f7581(segment, state, ref) {
|
|
|
747
654
|
// Safari requires that a selection is set or it won't fire input events.
|
|
748
655
|
// Since usePress disables text selection, this won't happen by default.
|
|
749
656
|
ref.current.style.webkitUserSelect = 'text';
|
|
657
|
+
ref.current.style.userSelect = 'text';
|
|
750
658
|
let selection = window.getSelection();
|
|
751
659
|
selection.collapse(ref.current);
|
|
752
|
-
ref.current.style.webkitUserSelect = '';
|
|
660
|
+
ref.current.style.webkitUserSelect = 'none';
|
|
661
|
+
ref.current.style.userSelect = 'none';
|
|
753
662
|
};
|
|
754
663
|
let compositionRef = $cIPI0$useRef('');
|
|
755
664
|
// @ts-ignore - TODO: possibly old TS version? doesn't fail in my editor...
|
|
@@ -785,17 +694,6 @@ function $32489daedd52963e$export$1315d136e6f7581(segment, state, ref) {
|
|
|
785
694
|
break;
|
|
786
695
|
}
|
|
787
696
|
});
|
|
788
|
-
// Focus on mouse down/touch up to match native textfield behavior.
|
|
789
|
-
// usePress handles canceling text selection.
|
|
790
|
-
let { pressProps: pressProps } = $cIPI0$usePress({
|
|
791
|
-
preventFocusOnPress: true,
|
|
792
|
-
onPressStart: (e)=>{
|
|
793
|
-
if (e.pointerType === 'mouse') e.target.focus();
|
|
794
|
-
},
|
|
795
|
-
onPress (e) {
|
|
796
|
-
if (e.pointerType !== 'mouse') e.target.focus();
|
|
797
|
-
}
|
|
798
|
-
});
|
|
799
697
|
// For Android: prevent selection on long press.
|
|
800
698
|
$cIPI0$useEvent(ref, 'selectstart', (e)=>{
|
|
801
699
|
e.preventDefault();
|
|
@@ -819,6 +717,13 @@ function $32489daedd52963e$export$1315d136e6f7581(segment, state, ref) {
|
|
|
819
717
|
if (segment !== firstSegment && state.validationState !== 'invalid') ariaDescribedBy = undefined;
|
|
820
718
|
let id = $cIPI0$useId();
|
|
821
719
|
let isEditable = !state.isDisabled && !state.isReadOnly && segment.isEditable;
|
|
720
|
+
// Prepend the label passed from the field to each segment name.
|
|
721
|
+
// This is needed because VoiceOver on iOS does not announce groups.
|
|
722
|
+
let name = segment.type === 'literal' ? '' : displayNames.of(segment.type);
|
|
723
|
+
let labelProps = $cIPI0$useLabels({
|
|
724
|
+
'aria-label': (ariaLabel ? ariaLabel + ' ' : '') + name,
|
|
725
|
+
'aria-labelledby': ariaLabelledBy
|
|
726
|
+
});
|
|
822
727
|
// Literal segments should not be visible to screen readers. We don't really need any of the above,
|
|
823
728
|
// but the rules of hooks mean hooks cannot be conditional so we have to put this condition here.
|
|
824
729
|
if (segment.type === 'literal') return {
|
|
@@ -827,12 +732,10 @@ function $32489daedd52963e$export$1315d136e6f7581(segment, state, ref) {
|
|
|
827
732
|
}
|
|
828
733
|
};
|
|
829
734
|
return {
|
|
830
|
-
segmentProps: $cIPI0$mergeProps(spinButtonProps,
|
|
735
|
+
segmentProps: $cIPI0$mergeProps(spinButtonProps, labelProps, {
|
|
831
736
|
id: id,
|
|
832
737
|
...touchPropOverrides,
|
|
833
738
|
'aria-invalid': state.validationState === 'invalid' ? 'true' : undefined,
|
|
834
|
-
'aria-label': displayNames.of(segment.type),
|
|
835
|
-
'aria-labelledby': `${ariaLabelledBy} ${id}`,
|
|
836
739
|
'aria-describedby': ariaDescribedBy,
|
|
837
740
|
'aria-placeholder': segment.isPlaceholder ? segment.text : undefined,
|
|
838
741
|
'aria-readonly': state.isReadOnly || !segment.isEditable ? 'true' : undefined,
|
|
@@ -848,7 +751,16 @@ function $32489daedd52963e$export$1315d136e6f7581(segment, state, ref) {
|
|
|
848
751
|
onKeyDown: onKeyDown,
|
|
849
752
|
onFocus: onFocus,
|
|
850
753
|
style: {
|
|
851
|
-
caretColor: 'transparent'
|
|
754
|
+
caretColor: 'transparent',
|
|
755
|
+
userSelect: 'none',
|
|
756
|
+
WebkitUserSelect: 'none'
|
|
757
|
+
},
|
|
758
|
+
// Prevent pointer events from reaching useDatePickerGroup, and allow native browser behavior to focus the segment.
|
|
759
|
+
onPointerDown (e) {
|
|
760
|
+
e.stopPropagation();
|
|
761
|
+
},
|
|
762
|
+
onMouseDown (e) {
|
|
763
|
+
e.stopPropagation();
|
|
852
764
|
}
|
|
853
765
|
})
|
|
854
766
|
};
|
|
@@ -860,5 +772,133 @@ function $32489daedd52963e$export$1315d136e6f7581(segment, state, ref) {
|
|
|
860
772
|
|
|
861
773
|
|
|
862
774
|
|
|
775
|
+
|
|
776
|
+
|
|
777
|
+
|
|
778
|
+
|
|
779
|
+
|
|
780
|
+
function $887cac91b7cc8801$export$12fd5f0e9f4bb192(props, state, ref) {
|
|
781
|
+
var ref1, ref2;
|
|
782
|
+
let formatMessage = $cIPI0$useMessageFormatter((/*@__PURE__*/$parcel$interopDefault($204383cf4f6b0d06$exports)));
|
|
783
|
+
let { labelProps: labelProps , fieldProps: fieldProps , descriptionProps: descriptionProps , errorMessageProps: errorMessageProps } = $cIPI0$useField({
|
|
784
|
+
...props,
|
|
785
|
+
labelElementType: 'span'
|
|
786
|
+
});
|
|
787
|
+
let labelledBy = fieldProps['aria-labelledby'] || fieldProps.id;
|
|
788
|
+
let { locale: locale } = $cIPI0$useLocale();
|
|
789
|
+
let range = state.formatValue(locale, {
|
|
790
|
+
month: 'long'
|
|
791
|
+
});
|
|
792
|
+
let description = range ? formatMessage('selectedRangeDescription', {
|
|
793
|
+
startDate: range.start,
|
|
794
|
+
endDate: range.end
|
|
795
|
+
}) : '';
|
|
796
|
+
let descProps = $cIPI0$useDescription(description);
|
|
797
|
+
let startFieldProps = {
|
|
798
|
+
'aria-label': formatMessage('startDate'),
|
|
799
|
+
'aria-labelledby': labelledBy
|
|
800
|
+
};
|
|
801
|
+
let endFieldProps = {
|
|
802
|
+
'aria-label': formatMessage('endDate'),
|
|
803
|
+
'aria-labelledby': labelledBy
|
|
804
|
+
};
|
|
805
|
+
let buttonId = $cIPI0$useId();
|
|
806
|
+
let dialogId = $cIPI0$useId();
|
|
807
|
+
let groupProps = $3dfb0f96be0d6a08$export$4a931266a3838b86(state, ref);
|
|
808
|
+
let { focusWithinProps: focusWithinProps } = $cIPI0$useFocusWithin({
|
|
809
|
+
onBlurWithin () {
|
|
810
|
+
state.confirmPlaceholder();
|
|
811
|
+
}
|
|
812
|
+
});
|
|
813
|
+
let ariaDescribedBy = [
|
|
814
|
+
descProps['aria-describedby'],
|
|
815
|
+
fieldProps['aria-describedby']
|
|
816
|
+
].filter(Boolean).join(' ') || undefined;
|
|
817
|
+
let focusManager = $cIPI0$useMemo(()=>$cIPI0$createFocusManager(ref, {
|
|
818
|
+
// Exclude the button from the focus manager.
|
|
819
|
+
accept: (element)=>element.id !== buttonId
|
|
820
|
+
})
|
|
821
|
+
, [
|
|
822
|
+
ref,
|
|
823
|
+
buttonId
|
|
824
|
+
]);
|
|
825
|
+
let commonFieldProps = {
|
|
826
|
+
[$16f0b7bb276bc17e$export$7b3062cd49e80452]: focusManager,
|
|
827
|
+
[$16f0b7bb276bc17e$export$300019f83c56d282]: 'presentation',
|
|
828
|
+
'aria-describedby': ariaDescribedBy,
|
|
829
|
+
minValue: props.minValue,
|
|
830
|
+
maxValue: props.maxValue,
|
|
831
|
+
placeholderValue: props.placeholderValue,
|
|
832
|
+
hideTimeZone: props.hideTimeZone,
|
|
833
|
+
hourCycle: props.hourCycle,
|
|
834
|
+
granularity: props.granularity,
|
|
835
|
+
isDisabled: props.isDisabled,
|
|
836
|
+
isReadOnly: props.isReadOnly,
|
|
837
|
+
isRequired: props.isRequired,
|
|
838
|
+
validationState: state.validationState
|
|
839
|
+
};
|
|
840
|
+
let domProps = $cIPI0$filterDOMProps(props);
|
|
841
|
+
return {
|
|
842
|
+
groupProps: $cIPI0$mergeProps(domProps, groupProps, fieldProps, descProps, focusWithinProps, {
|
|
843
|
+
role: 'group',
|
|
844
|
+
'aria-disabled': props.isDisabled || null,
|
|
845
|
+
'aria-describedby': ariaDescribedBy
|
|
846
|
+
}),
|
|
847
|
+
labelProps: {
|
|
848
|
+
...labelProps,
|
|
849
|
+
onClick: ()=>{
|
|
850
|
+
focusManager.focusFirst();
|
|
851
|
+
}
|
|
852
|
+
},
|
|
853
|
+
buttonProps: {
|
|
854
|
+
...descProps,
|
|
855
|
+
id: buttonId,
|
|
856
|
+
'aria-haspopup': 'dialog',
|
|
857
|
+
'aria-label': formatMessage('calendar'),
|
|
858
|
+
'aria-labelledby': `${labelledBy} ${buttonId}`,
|
|
859
|
+
'aria-describedby': ariaDescribedBy,
|
|
860
|
+
onPress: ()=>state.setOpen(true)
|
|
861
|
+
},
|
|
862
|
+
dialogProps: {
|
|
863
|
+
id: dialogId,
|
|
864
|
+
'aria-labelledby': `${labelledBy} ${buttonId}`
|
|
865
|
+
},
|
|
866
|
+
startFieldProps: {
|
|
867
|
+
...startFieldProps,
|
|
868
|
+
...commonFieldProps,
|
|
869
|
+
value: (ref1 = state.value) === null || ref1 === void 0 ? void 0 : ref1.start,
|
|
870
|
+
onChange: (start)=>state.setDateTime('start', start)
|
|
871
|
+
,
|
|
872
|
+
autoFocus: props.autoFocus
|
|
873
|
+
},
|
|
874
|
+
endFieldProps: {
|
|
875
|
+
...endFieldProps,
|
|
876
|
+
...commonFieldProps,
|
|
877
|
+
value: (ref2 = state.value) === null || ref2 === void 0 ? void 0 : ref2.end,
|
|
878
|
+
onChange: (end)=>state.setDateTime('end', end)
|
|
879
|
+
},
|
|
880
|
+
descriptionProps: descriptionProps,
|
|
881
|
+
errorMessageProps: errorMessageProps,
|
|
882
|
+
calendarProps: {
|
|
883
|
+
autoFocus: true,
|
|
884
|
+
value: state.dateRange,
|
|
885
|
+
onChange: state.setDateRange,
|
|
886
|
+
minValue: props.minValue,
|
|
887
|
+
maxValue: props.maxValue,
|
|
888
|
+
isDisabled: props.isDisabled,
|
|
889
|
+
isReadOnly: props.isReadOnly,
|
|
890
|
+
isDateUnavailable: props.isDateUnavailable,
|
|
891
|
+
allowsNonContiguousRanges: props.allowsNonContiguousRanges,
|
|
892
|
+
defaultFocusedValue: state.dateRange ? undefined : props.placeholderValue,
|
|
893
|
+
validationState: state.validationState,
|
|
894
|
+
errorMessage: props.errorMessage
|
|
895
|
+
}
|
|
896
|
+
};
|
|
897
|
+
}
|
|
898
|
+
|
|
899
|
+
|
|
900
|
+
|
|
901
|
+
|
|
902
|
+
|
|
863
903
|
export {$6057a3d2a53a12fd$export$42df105a73306d51 as useDatePicker, $32489daedd52963e$export$1315d136e6f7581 as useDateSegment, $16f0b7bb276bc17e$export$5591b0b878c1a989 as useDateField, $16f0b7bb276bc17e$export$4c842f6a241dc825 as useTimeField, $887cac91b7cc8801$export$12fd5f0e9f4bb192 as useDateRangePicker, $3aeceb3a64eb8358$export$d42c60378c8168f8 as useDisplayNames};
|
|
864
904
|
//# sourceMappingURL=module.js.map
|