@react-aria/datepicker 3.0.0-nightly.3173 → 3.0.0-rc.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/main.js +286 -263
- package/dist/main.js.map +1 -1
- package/dist/module.js +287 -251
- 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 +16 -16
- package/src/index.ts +7 -1
- package/src/useDateField.ts +48 -19
- package/src/useDatePicker.ts +13 -5
- package/src/useDatePickerGroup.ts +3 -3
- package/src/useDateRangePicker.ts +17 -15
- package/src/useDateSegment.ts +25 -27
- package/src/useDisplayNames.ts +1 -0
package/dist/module.js
CHANGED
|
@@ -1,155 +1,153 @@
|
|
|
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
3
|
import {useField as $cIPI0$useField} from "@react-aria/label";
|
|
4
4
|
import {useMessageFormatter as $cIPI0$useMessageFormatter, useLocale as $cIPI0$useLocale, useDateFormatter as $cIPI0$useDateFormatter, useFilter as $cIPI0$useFilter} from "@react-aria/i18n";
|
|
5
|
-
import {
|
|
5
|
+
import $cIPI0$react, {useMemo as $cIPI0$useMemo, useRef as $cIPI0$useRef, useEffect as $cIPI0$useEffect} from "react";
|
|
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
|
-
Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
|
|
16
|
-
}
|
|
14
|
+
|
|
17
15
|
|
|
18
16
|
var $204383cf4f6b0d06$exports = {};
|
|
19
17
|
var $f23889fffbde9058$exports = {};
|
|
20
|
-
$f23889fffbde9058$exports = JSON.parse("{\"calendar\":\"التقويم\",\"
|
|
18
|
+
$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
19
|
|
|
22
20
|
|
|
23
21
|
var $09d9badaa8903929$exports = {};
|
|
24
|
-
$09d9badaa8903929$exports = JSON.parse("{\"calendar\":\"Календар\",\"
|
|
22
|
+
$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
23
|
|
|
26
24
|
|
|
27
25
|
var $151b77e0fd711730$exports = {};
|
|
28
|
-
$151b77e0fd711730$exports = JSON.parse("{\"calendar\":\"Kalendář\",\"
|
|
26
|
+
$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
27
|
|
|
30
28
|
|
|
31
29
|
var $61915aa8630b90a2$exports = {};
|
|
32
|
-
$61915aa8630b90a2$exports = JSON.parse("{\"calendar\":\"Kalender\",\"
|
|
30
|
+
$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
31
|
|
|
34
32
|
|
|
35
33
|
var $35cea00159787840$exports = {};
|
|
36
|
-
$35cea00159787840$exports = JSON.parse("{\"calendar\":\"Kalender\",\"
|
|
34
|
+
$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
35
|
|
|
38
36
|
|
|
39
37
|
var $518b4e82b9eacafd$exports = {};
|
|
40
|
-
$518b4e82b9eacafd$exports = JSON.parse("{\"calendar\":\"Ημερολόγιο\",\"
|
|
38
|
+
$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
39
|
|
|
42
40
|
|
|
43
41
|
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\",\"
|
|
42
|
+
$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
43
|
|
|
46
44
|
|
|
47
45
|
var $07f628a707cf9b18$exports = {};
|
|
48
|
-
$07f628a707cf9b18$exports = JSON.parse("{\"calendar\":\"Calendario\",\"
|
|
46
|
+
$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
47
|
|
|
50
48
|
|
|
51
49
|
var $db553ffe17c7f4db$exports = {};
|
|
52
|
-
$db553ffe17c7f4db$exports = JSON.parse("{\"calendar\":\"Kalender\",\"
|
|
50
|
+
$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
51
|
|
|
54
52
|
|
|
55
53
|
var $4afcfe00cd703f83$exports = {};
|
|
56
|
-
$4afcfe00cd703f83$exports = JSON.parse("{\"calendar\":\"Kalenteri\",\"
|
|
54
|
+
$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
55
|
|
|
58
56
|
|
|
59
57
|
var $1d2645d18d4c5be0$exports = {};
|
|
60
|
-
$1d2645d18d4c5be0$exports = JSON.parse("{\"calendar\":\"Calendrier\",\"
|
|
58
|
+
$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
59
|
|
|
62
60
|
|
|
63
61
|
var $64cb6a9be1f6fa48$exports = {};
|
|
64
|
-
$64cb6a9be1f6fa48$exports = JSON.parse("{\"calendar\":\"לוח שנה\",\"
|
|
62
|
+
$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
63
|
|
|
66
64
|
|
|
67
65
|
var $2a1ef2e8050be27a$exports = {};
|
|
68
|
-
$2a1ef2e8050be27a$exports = JSON.parse("{\"calendar\":\"Kalendar\",\"
|
|
66
|
+
$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
67
|
|
|
70
68
|
|
|
71
69
|
var $ad429dca102acd0e$exports = {};
|
|
72
|
-
$ad429dca102acd0e$exports = JSON.parse("{\"calendar\":\"Naptár\",\"
|
|
70
|
+
$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
71
|
|
|
74
72
|
|
|
75
73
|
var $6e68cb5d1cb97bd2$exports = {};
|
|
76
|
-
$6e68cb5d1cb97bd2$exports = JSON.parse("{\"calendar\":\"Calendario\",\"
|
|
74
|
+
$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
75
|
|
|
78
76
|
|
|
79
77
|
var $a82ee9af063ee069$exports = {};
|
|
80
|
-
$a82ee9af063ee069$exports = JSON.parse("{\"calendar\":\"カレンダー\",\"
|
|
78
|
+
$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
79
|
|
|
82
80
|
|
|
83
81
|
var $67e9091dbf37d4eb$exports = {};
|
|
84
|
-
$67e9091dbf37d4eb$exports = JSON.parse("{\"calendar\":\"달력\",\"
|
|
82
|
+
$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
83
|
|
|
86
84
|
|
|
87
85
|
var $75834f9729f653d1$exports = {};
|
|
88
|
-
$75834f9729f653d1$exports = JSON.parse("{\"calendar\":\"Kalendorius\",\"
|
|
86
|
+
$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
87
|
|
|
90
88
|
|
|
91
89
|
var $a2df2c2520b4a7f0$exports = {};
|
|
92
|
-
$a2df2c2520b4a7f0$exports = JSON.parse("{\"calendar\":\"Kalendārs\",\"
|
|
90
|
+
$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
91
|
|
|
94
92
|
|
|
95
93
|
var $aedcd71db4933ed5$exports = {};
|
|
96
|
-
$aedcd71db4933ed5$exports = JSON.parse("{\"calendar\":\"Kalender\",\"
|
|
94
|
+
$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
95
|
|
|
98
96
|
|
|
99
97
|
var $3b2df9e54353046c$exports = {};
|
|
100
|
-
$3b2df9e54353046c$exports = JSON.parse("{\"calendar\":\"Kalender\",\"
|
|
98
|
+
$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
99
|
|
|
102
100
|
|
|
103
101
|
var $c03fe977fcfafe93$exports = {};
|
|
104
|
-
$c03fe977fcfafe93$exports = JSON.parse("{\"calendar\":\"Kalendarz\",\"
|
|
102
|
+
$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
103
|
|
|
106
104
|
|
|
107
105
|
var $569f006fc292345f$exports = {};
|
|
108
|
-
$569f006fc292345f$exports = JSON.parse("{\"calendar\":\"Calendário\",\"
|
|
106
|
+
$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
107
|
|
|
110
108
|
|
|
111
109
|
var $7c2494e14452f2dd$exports = {};
|
|
112
|
-
$7c2494e14452f2dd$exports = JSON.parse("{\"calendar\":\"Calendário\",\"
|
|
110
|
+
$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
111
|
|
|
114
112
|
|
|
115
113
|
var $eb82ef981b5592bf$exports = {};
|
|
116
|
-
$eb82ef981b5592bf$exports = JSON.parse("{\"calendar\":\"Calendar\",\"
|
|
114
|
+
$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
115
|
|
|
118
116
|
|
|
119
117
|
var $6efa0e119f396950$exports = {};
|
|
120
|
-
$6efa0e119f396950$exports = JSON.parse("{\"calendar\":\"Календарь\",\"
|
|
118
|
+
$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
119
|
|
|
122
120
|
|
|
123
121
|
var $7f5e57085d7f5049$exports = {};
|
|
124
|
-
$7f5e57085d7f5049$exports = JSON.parse("{\"calendar\":\"Kalendár\",\"
|
|
122
|
+
$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
123
|
|
|
126
124
|
|
|
127
125
|
var $578ee7c11dcdde7a$exports = {};
|
|
128
|
-
$578ee7c11dcdde7a$exports = JSON.parse("{\"calendar\":\"Koledar\",\"
|
|
126
|
+
$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
127
|
|
|
130
128
|
|
|
131
129
|
var $bbc3fd6cd0bc9d50$exports = {};
|
|
132
|
-
$bbc3fd6cd0bc9d50$exports = JSON.parse("{\"calendar\":\"Kalendar\",\"
|
|
130
|
+
$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
131
|
|
|
134
132
|
|
|
135
133
|
var $0b04512118591d2a$exports = {};
|
|
136
|
-
$0b04512118591d2a$exports = JSON.parse("{\"calendar\":\"Kalender\",\"
|
|
134
|
+
$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
135
|
|
|
138
136
|
|
|
139
137
|
var $3a49d121fe4c9e1d$exports = {};
|
|
140
|
-
$3a49d121fe4c9e1d$exports = JSON.parse("{\"calendar\":\"Takvim\",\"
|
|
138
|
+
$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
139
|
|
|
142
140
|
|
|
143
141
|
var $5ba21dbb8914919d$exports = {};
|
|
144
|
-
$5ba21dbb8914919d$exports = JSON.parse("{\"calendar\":\"Календар\",\"
|
|
142
|
+
$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
143
|
|
|
146
144
|
|
|
147
145
|
var $51078838e1b16cd7$exports = {};
|
|
148
|
-
$51078838e1b16cd7$exports = JSON.parse("{\"calendar\":\"日历\",\"
|
|
146
|
+
$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
147
|
|
|
150
148
|
|
|
151
149
|
var $33fab8219207655a$exports = {};
|
|
152
|
-
$33fab8219207655a$exports = JSON.parse("{\"calendar\":\"日曆\",\"
|
|
150
|
+
$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
151
|
|
|
154
152
|
|
|
155
153
|
$204383cf4f6b0d06$exports = {
|
|
@@ -194,10 +192,13 @@ $204383cf4f6b0d06$exports = {
|
|
|
194
192
|
|
|
195
193
|
|
|
196
194
|
|
|
195
|
+
|
|
196
|
+
|
|
197
|
+
|
|
197
198
|
function $3dfb0f96be0d6a08$export$4a931266a3838b86(state, ref1) {
|
|
198
199
|
// Open the popover on alt + arrow down
|
|
199
200
|
let onKeyDown = (e)=>{
|
|
200
|
-
if (e.altKey && e.key === 'ArrowDown' && 'setOpen' in state) {
|
|
201
|
+
if (e.altKey && (e.key === 'ArrowDown' || e.key === 'ArrowUp') && 'setOpen' in state) {
|
|
201
202
|
e.preventDefault();
|
|
202
203
|
e.stopPropagation();
|
|
203
204
|
state.setOpen(true);
|
|
@@ -247,6 +248,93 @@ function $3dfb0f96be0d6a08$export$4a931266a3838b86(state, ref1) {
|
|
|
247
248
|
|
|
248
249
|
|
|
249
250
|
|
|
251
|
+
|
|
252
|
+
const $16f0b7bb276bc17e$export$653eddfc964b0f8a = new WeakMap();
|
|
253
|
+
const $16f0b7bb276bc17e$export$300019f83c56d282 = '__role_' + Date.now();
|
|
254
|
+
const $16f0b7bb276bc17e$export$7b3062cd49e80452 = '__focusManager_' + Date.now();
|
|
255
|
+
function $16f0b7bb276bc17e$export$5591b0b878c1a989(props, state, ref) {
|
|
256
|
+
let { labelProps: labelProps , fieldProps: fieldProps , descriptionProps: descriptionProps , errorMessageProps: errorMessageProps } = $cIPI0$useField({
|
|
257
|
+
...props,
|
|
258
|
+
labelElementType: 'span'
|
|
259
|
+
});
|
|
260
|
+
let groupProps = $3dfb0f96be0d6a08$export$4a931266a3838b86(state, ref);
|
|
261
|
+
let { focusWithinProps: focusWithinProps } = $cIPI0$useFocusWithin({
|
|
262
|
+
onBlurWithin () {
|
|
263
|
+
state.confirmPlaceholder();
|
|
264
|
+
}
|
|
265
|
+
});
|
|
266
|
+
let formatMessage = $cIPI0$useMessageFormatter((/*@__PURE__*/$parcel$interopDefault($204383cf4f6b0d06$exports)));
|
|
267
|
+
let message = state.maxGranularity === 'hour' ? 'selectedTimeDescription' : 'selectedDateDescription';
|
|
268
|
+
let field = state.maxGranularity === 'hour' ? 'time' : 'date';
|
|
269
|
+
let description = state.value ? formatMessage(message, {
|
|
270
|
+
[field]: state.formatValue({
|
|
271
|
+
month: 'long'
|
|
272
|
+
})
|
|
273
|
+
}) : '';
|
|
274
|
+
let descProps = $cIPI0$useDescription(description);
|
|
275
|
+
// If within a date picker or date range picker, the date field will have role="presentation" and an aria-describedby
|
|
276
|
+
// will be passed in that references the value (e.g. entire range). Otherwise, add the field's value description.
|
|
277
|
+
let describedBy = props[$16f0b7bb276bc17e$export$300019f83c56d282] === 'presentation' ? fieldProps['aria-describedby'] : [
|
|
278
|
+
descProps['aria-describedby'],
|
|
279
|
+
fieldProps['aria-describedby']
|
|
280
|
+
].filter(Boolean).join(' ') || undefined;
|
|
281
|
+
let propsFocusManager = props[$16f0b7bb276bc17e$export$7b3062cd49e80452];
|
|
282
|
+
let focusManager = $cIPI0$useMemo(()=>propsFocusManager || $cIPI0$createFocusManager(ref)
|
|
283
|
+
, [
|
|
284
|
+
propsFocusManager,
|
|
285
|
+
ref
|
|
286
|
+
]);
|
|
287
|
+
// Pass labels and other information to segments.
|
|
288
|
+
$16f0b7bb276bc17e$export$653eddfc964b0f8a.set(state, {
|
|
289
|
+
ariaLabel: props['aria-label'],
|
|
290
|
+
ariaLabelledBy: [
|
|
291
|
+
props['aria-labelledby'],
|
|
292
|
+
labelProps.id
|
|
293
|
+
].filter(Boolean).join(' ') || undefined,
|
|
294
|
+
ariaDescribedBy: describedBy,
|
|
295
|
+
focusManager: focusManager
|
|
296
|
+
});
|
|
297
|
+
let autoFocusRef = $cIPI0$useRef(props.autoFocus);
|
|
298
|
+
// When used within a date picker or date range picker, the field gets role="presentation"
|
|
299
|
+
// rather than role="group". Since the date picker/date range picker already has a role="group"
|
|
300
|
+
// with a label and description, and the segments are already labeled by this as well, this
|
|
301
|
+
// avoids very verbose duplicate announcements.
|
|
302
|
+
let fieldDOMProps;
|
|
303
|
+
if (props[$16f0b7bb276bc17e$export$300019f83c56d282] === 'presentation') fieldDOMProps = {
|
|
304
|
+
role: 'presentation'
|
|
305
|
+
};
|
|
306
|
+
else fieldDOMProps = $cIPI0$mergeProps(fieldProps, {
|
|
307
|
+
role: 'group',
|
|
308
|
+
'aria-disabled': props.isDisabled || undefined,
|
|
309
|
+
'aria-describedby': describedBy
|
|
310
|
+
});
|
|
311
|
+
$cIPI0$useEffect(()=>{
|
|
312
|
+
if (autoFocusRef.current) focusManager.focusFirst();
|
|
313
|
+
autoFocusRef.current = false;
|
|
314
|
+
}, [
|
|
315
|
+
focusManager
|
|
316
|
+
]);
|
|
317
|
+
let domProps = $cIPI0$filterDOMProps(props);
|
|
318
|
+
return {
|
|
319
|
+
labelProps: {
|
|
320
|
+
...labelProps,
|
|
321
|
+
onClick: ()=>{
|
|
322
|
+
focusManager.focusFirst();
|
|
323
|
+
}
|
|
324
|
+
},
|
|
325
|
+
fieldProps: $cIPI0$mergeProps(domProps, fieldDOMProps, groupProps, focusWithinProps),
|
|
326
|
+
descriptionProps: descriptionProps,
|
|
327
|
+
errorMessageProps: errorMessageProps
|
|
328
|
+
};
|
|
329
|
+
}
|
|
330
|
+
function $16f0b7bb276bc17e$export$4c842f6a241dc825(props, state, ref) {
|
|
331
|
+
return $16f0b7bb276bc17e$export$5591b0b878c1a989(props, state, ref);
|
|
332
|
+
}
|
|
333
|
+
|
|
334
|
+
|
|
335
|
+
|
|
336
|
+
|
|
337
|
+
|
|
250
338
|
function $6057a3d2a53a12fd$export$42df105a73306d51(props, state, ref) {
|
|
251
339
|
let buttonId = $cIPI0$useId();
|
|
252
340
|
let dialogId = $cIPI0$useId();
|
|
@@ -258,15 +346,20 @@ function $6057a3d2a53a12fd$export$42df105a73306d51(props, state, ref) {
|
|
|
258
346
|
let groupProps = $3dfb0f96be0d6a08$export$4a931266a3838b86(state, ref);
|
|
259
347
|
let labelledBy = fieldProps['aria-labelledby'] || fieldProps.id;
|
|
260
348
|
let { locale: locale } = $cIPI0$useLocale();
|
|
261
|
-
let
|
|
349
|
+
let date = state.formatValue(locale, {
|
|
262
350
|
month: 'long'
|
|
263
|
-
})
|
|
351
|
+
});
|
|
352
|
+
let description = date ? formatMessage('selectedDateDescription', {
|
|
353
|
+
date: date
|
|
354
|
+
}) : '';
|
|
355
|
+
let descProps = $cIPI0$useDescription(description);
|
|
264
356
|
let ariaDescribedBy = [
|
|
265
357
|
descProps['aria-describedby'],
|
|
266
358
|
fieldProps['aria-describedby']
|
|
267
359
|
].filter(Boolean).join(' ') || undefined;
|
|
360
|
+
let domProps = $cIPI0$filterDOMProps(props);
|
|
268
361
|
return {
|
|
269
|
-
groupProps: $cIPI0$mergeProps(groupProps, descProps, {
|
|
362
|
+
groupProps: $cIPI0$mergeProps(domProps, groupProps, fieldProps, descProps, {
|
|
270
363
|
role: 'group',
|
|
271
364
|
'aria-disabled': props.isDisabled || null,
|
|
272
365
|
'aria-labelledby': labelledBy,
|
|
@@ -281,6 +374,8 @@ function $6057a3d2a53a12fd$export$42df105a73306d51(props, state, ref) {
|
|
|
281
374
|
},
|
|
282
375
|
fieldProps: {
|
|
283
376
|
...fieldProps,
|
|
377
|
+
[$16f0b7bb276bc17e$export$300019f83c56d282]: 'presentation',
|
|
378
|
+
'aria-describedby': ariaDescribedBy,
|
|
284
379
|
value: state.value,
|
|
285
380
|
onChange: state.setValue,
|
|
286
381
|
minValue: props.minValue,
|
|
@@ -320,128 +415,9 @@ function $6057a3d2a53a12fd$export$42df105a73306d51(props, state, ref) {
|
|
|
320
415
|
isDisabled: props.isDisabled,
|
|
321
416
|
isReadOnly: props.isReadOnly,
|
|
322
417
|
isDateUnavailable: props.isDateUnavailable,
|
|
323
|
-
defaultFocusedValue: state.dateValue ? undefined : props.placeholderValue
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
}
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
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;
|
|
342
|
-
let formatMessage = $cIPI0$useMessageFormatter((/*@__PURE__*/$parcel$interopDefault($204383cf4f6b0d06$exports)));
|
|
343
|
-
let { labelProps: labelProps , fieldProps: fieldProps , descriptionProps: descriptionProps , errorMessageProps: errorMessageProps } = $cIPI0$useField({
|
|
344
|
-
...props,
|
|
345
|
-
labelElementType: 'span'
|
|
346
|
-
});
|
|
347
|
-
let labelledBy = fieldProps['aria-labelledby'] || fieldProps.id;
|
|
348
|
-
let { locale: locale } = $cIPI0$useLocale();
|
|
349
|
-
let description = state.formatValue(locale, {
|
|
350
|
-
month: 'long'
|
|
351
|
-
});
|
|
352
|
-
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
|
-
let ariaDescribedBy = [
|
|
370
|
-
descProps['aria-describedby'],
|
|
371
|
-
fieldProps['aria-describedby']
|
|
372
|
-
].filter(Boolean).join(' ') || undefined;
|
|
373
|
-
let focusManager = $cIPI0$useMemo(()=>$cIPI0$createFocusManager(ref)
|
|
374
|
-
, [
|
|
375
|
-
ref
|
|
376
|
-
]);
|
|
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
|
-
return {
|
|
391
|
-
groupProps: $cIPI0$mergeProps(groupProps, fieldProps, descProps, focusWithinProps, {
|
|
392
|
-
role: 'group',
|
|
393
|
-
'aria-disabled': props.isDisabled || null,
|
|
394
|
-
'aria-describedby': ariaDescribedBy
|
|
395
|
-
}),
|
|
396
|
-
labelProps: {
|
|
397
|
-
...labelProps,
|
|
398
|
-
onClick: ()=>{
|
|
399
|
-
focusManager.focusFirst();
|
|
400
|
-
}
|
|
401
|
-
},
|
|
402
|
-
buttonProps: {
|
|
403
|
-
...descProps,
|
|
404
|
-
id: buttonId,
|
|
405
|
-
excludeFromTabOrder: true,
|
|
406
|
-
'aria-haspopup': 'dialog',
|
|
407
|
-
'aria-label': formatMessage('calendar'),
|
|
408
|
-
'aria-labelledby': `${labelledBy} ${buttonId}`,
|
|
409
|
-
'aria-describedby': ariaDescribedBy,
|
|
410
|
-
onPress: ()=>state.setOpen(true)
|
|
411
|
-
},
|
|
412
|
-
dialogProps: {
|
|
413
|
-
id: dialogId,
|
|
414
|
-
'aria-labelledby': `${labelledBy} ${buttonId}`
|
|
415
|
-
},
|
|
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
|
-
calendarProps: {
|
|
435
|
-
autoFocus: true,
|
|
436
|
-
value: state.dateRange,
|
|
437
|
-
onChange: state.setDateRange,
|
|
438
|
-
minValue: props.minValue,
|
|
439
|
-
maxValue: props.maxValue,
|
|
440
|
-
isDisabled: props.isDisabled,
|
|
441
|
-
isReadOnly: props.isReadOnly,
|
|
442
|
-
isDateUnavailable: props.isDateUnavailable,
|
|
443
|
-
allowsNonContiguousRanges: props.allowsNonContiguousRanges,
|
|
444
|
-
defaultFocusedValue: state.dateRange ? undefined : props.placeholderValue
|
|
418
|
+
defaultFocusedValue: state.dateValue ? undefined : props.placeholderValue,
|
|
419
|
+
validationState: state.validationState,
|
|
420
|
+
errorMessage: props.errorMessage
|
|
445
421
|
}
|
|
446
422
|
};
|
|
447
423
|
}
|
|
@@ -453,73 +429,6 @@ function $887cac91b7cc8801$export$12fd5f0e9f4bb192(props, state, ref) {
|
|
|
453
429
|
|
|
454
430
|
|
|
455
431
|
|
|
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
432
|
|
|
524
433
|
|
|
525
434
|
|
|
@@ -552,12 +461,11 @@ class $3aeceb3a64eb8358$var$DisplayNamesPolyfill {
|
|
|
552
461
|
|
|
553
462
|
|
|
554
463
|
|
|
555
|
-
|
|
556
464
|
function $32489daedd52963e$export$1315d136e6f7581(segment, state, ref) {
|
|
557
465
|
let enteredKeys = $cIPI0$useRef('');
|
|
558
466
|
let { locale: locale , direction: direction } = $cIPI0$useLocale();
|
|
559
467
|
let displayNames = $3aeceb3a64eb8358$export$d42c60378c8168f8();
|
|
560
|
-
let { ariaLabelledBy: ariaLabelledBy , ariaDescribedBy: ariaDescribedBy , focusManager: focusManager } = $16f0b7bb276bc17e$export$653eddfc964b0f8a.get(state);
|
|
468
|
+
let { ariaLabel: ariaLabel , ariaLabelledBy: ariaLabelledBy , ariaDescribedBy: ariaDescribedBy , focusManager: focusManager } = $16f0b7bb276bc17e$export$653eddfc964b0f8a.get(state);
|
|
561
469
|
let textValue = segment.text;
|
|
562
470
|
let options = $cIPI0$useMemo(()=>state.dateFormatter.resolvedOptions()
|
|
563
471
|
, [
|
|
@@ -575,7 +483,7 @@ function $32489daedd52963e$export$1315d136e6f7581(segment, state, ref) {
|
|
|
575
483
|
if (segment.type === 'month') {
|
|
576
484
|
let monthTextValue = monthDateFormatter.format(state.dateValue);
|
|
577
485
|
textValue = monthTextValue !== textValue ? `${textValue} – ${monthTextValue}` : monthTextValue;
|
|
578
|
-
} else if (segment.type === 'hour'
|
|
486
|
+
} else if (segment.type === 'hour') textValue = hourDateFormatter.format(state.dateValue);
|
|
579
487
|
let { spinButtonProps: spinButtonProps } = $cIPI0$useSpinButton({
|
|
580
488
|
value: segment.value,
|
|
581
489
|
textValue: textValue,
|
|
@@ -785,17 +693,6 @@ function $32489daedd52963e$export$1315d136e6f7581(segment, state, ref) {
|
|
|
785
693
|
break;
|
|
786
694
|
}
|
|
787
695
|
});
|
|
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
696
|
// For Android: prevent selection on long press.
|
|
800
697
|
$cIPI0$useEvent(ref, 'selectstart', (e)=>{
|
|
801
698
|
e.preventDefault();
|
|
@@ -819,6 +716,13 @@ function $32489daedd52963e$export$1315d136e6f7581(segment, state, ref) {
|
|
|
819
716
|
if (segment !== firstSegment && state.validationState !== 'invalid') ariaDescribedBy = undefined;
|
|
820
717
|
let id = $cIPI0$useId();
|
|
821
718
|
let isEditable = !state.isDisabled && !state.isReadOnly && segment.isEditable;
|
|
719
|
+
// Prepend the label passed from the field to each segment name.
|
|
720
|
+
// This is needed because VoiceOver on iOS does not announce groups.
|
|
721
|
+
let name = segment.type === 'literal' ? '' : displayNames.of(segment.type);
|
|
722
|
+
let labelProps = $cIPI0$useLabels({
|
|
723
|
+
'aria-label': (ariaLabel ? ariaLabel + ' ' : '') + name,
|
|
724
|
+
'aria-labelledby': ariaLabelledBy
|
|
725
|
+
});
|
|
822
726
|
// Literal segments should not be visible to screen readers. We don't really need any of the above,
|
|
823
727
|
// but the rules of hooks mean hooks cannot be conditional so we have to put this condition here.
|
|
824
728
|
if (segment.type === 'literal') return {
|
|
@@ -827,12 +731,10 @@ function $32489daedd52963e$export$1315d136e6f7581(segment, state, ref) {
|
|
|
827
731
|
}
|
|
828
732
|
};
|
|
829
733
|
return {
|
|
830
|
-
segmentProps: $cIPI0$mergeProps(spinButtonProps,
|
|
734
|
+
segmentProps: $cIPI0$mergeProps(spinButtonProps, labelProps, {
|
|
831
735
|
id: id,
|
|
832
736
|
...touchPropOverrides,
|
|
833
737
|
'aria-invalid': state.validationState === 'invalid' ? 'true' : undefined,
|
|
834
|
-
'aria-label': displayNames.of(segment.type),
|
|
835
|
-
'aria-labelledby': `${ariaLabelledBy} ${id}`,
|
|
836
738
|
'aria-describedby': ariaDescribedBy,
|
|
837
739
|
'aria-placeholder': segment.isPlaceholder ? segment.text : undefined,
|
|
838
740
|
'aria-readonly': state.isReadOnly || !segment.isEditable ? 'true' : undefined,
|
|
@@ -848,7 +750,16 @@ function $32489daedd52963e$export$1315d136e6f7581(segment, state, ref) {
|
|
|
848
750
|
onKeyDown: onKeyDown,
|
|
849
751
|
onFocus: onFocus,
|
|
850
752
|
style: {
|
|
851
|
-
caretColor: 'transparent'
|
|
753
|
+
caretColor: 'transparent',
|
|
754
|
+
userSelect: 'none',
|
|
755
|
+
WebkitUserSelect: 'none'
|
|
756
|
+
},
|
|
757
|
+
// Prevent pointer events from reaching useDatePickerGroup, and allow native browser behavior to focus the segment.
|
|
758
|
+
onPointerDown (e) {
|
|
759
|
+
e.stopPropagation();
|
|
760
|
+
},
|
|
761
|
+
onMouseDown (e) {
|
|
762
|
+
e.stopPropagation();
|
|
852
763
|
}
|
|
853
764
|
})
|
|
854
765
|
};
|
|
@@ -860,5 +771,130 @@ function $32489daedd52963e$export$1315d136e6f7581(segment, state, ref) {
|
|
|
860
771
|
|
|
861
772
|
|
|
862
773
|
|
|
774
|
+
|
|
775
|
+
|
|
776
|
+
|
|
777
|
+
|
|
778
|
+
|
|
779
|
+
function $887cac91b7cc8801$export$12fd5f0e9f4bb192(props, state, ref) {
|
|
780
|
+
var ref1, ref2;
|
|
781
|
+
let formatMessage = $cIPI0$useMessageFormatter((/*@__PURE__*/$parcel$interopDefault($204383cf4f6b0d06$exports)));
|
|
782
|
+
let { labelProps: labelProps , fieldProps: fieldProps , descriptionProps: descriptionProps , errorMessageProps: errorMessageProps } = $cIPI0$useField({
|
|
783
|
+
...props,
|
|
784
|
+
labelElementType: 'span'
|
|
785
|
+
});
|
|
786
|
+
let labelledBy = fieldProps['aria-labelledby'] || fieldProps.id;
|
|
787
|
+
let { locale: locale } = $cIPI0$useLocale();
|
|
788
|
+
let range = state.formatValue(locale, {
|
|
789
|
+
month: 'long'
|
|
790
|
+
});
|
|
791
|
+
let description = range ? formatMessage('selectedRangeDescription', {
|
|
792
|
+
startDate: range.start,
|
|
793
|
+
endDate: range.end
|
|
794
|
+
}) : '';
|
|
795
|
+
let descProps = $cIPI0$useDescription(description);
|
|
796
|
+
let startFieldProps = {
|
|
797
|
+
'aria-label': formatMessage('startDate'),
|
|
798
|
+
'aria-labelledby': labelledBy
|
|
799
|
+
};
|
|
800
|
+
let endFieldProps = {
|
|
801
|
+
'aria-label': formatMessage('endDate'),
|
|
802
|
+
'aria-labelledby': labelledBy
|
|
803
|
+
};
|
|
804
|
+
let buttonId = $cIPI0$useId();
|
|
805
|
+
let dialogId = $cIPI0$useId();
|
|
806
|
+
let groupProps = $3dfb0f96be0d6a08$export$4a931266a3838b86(state, ref);
|
|
807
|
+
let { focusWithinProps: focusWithinProps } = $cIPI0$useFocusWithin({
|
|
808
|
+
onBlurWithin () {
|
|
809
|
+
state.confirmPlaceholder();
|
|
810
|
+
}
|
|
811
|
+
});
|
|
812
|
+
let ariaDescribedBy = [
|
|
813
|
+
descProps['aria-describedby'],
|
|
814
|
+
fieldProps['aria-describedby']
|
|
815
|
+
].filter(Boolean).join(' ') || undefined;
|
|
816
|
+
let focusManager = $cIPI0$useMemo(()=>$cIPI0$createFocusManager(ref)
|
|
817
|
+
, [
|
|
818
|
+
ref
|
|
819
|
+
]);
|
|
820
|
+
let commonFieldProps = {
|
|
821
|
+
[$16f0b7bb276bc17e$export$7b3062cd49e80452]: focusManager,
|
|
822
|
+
[$16f0b7bb276bc17e$export$300019f83c56d282]: 'presentation',
|
|
823
|
+
'aria-describedby': ariaDescribedBy,
|
|
824
|
+
minValue: props.minValue,
|
|
825
|
+
maxValue: props.maxValue,
|
|
826
|
+
placeholderValue: props.placeholderValue,
|
|
827
|
+
hideTimeZone: props.hideTimeZone,
|
|
828
|
+
hourCycle: props.hourCycle,
|
|
829
|
+
granularity: props.granularity,
|
|
830
|
+
isDisabled: props.isDisabled,
|
|
831
|
+
isReadOnly: props.isReadOnly,
|
|
832
|
+
isRequired: props.isRequired,
|
|
833
|
+
validationState: state.validationState
|
|
834
|
+
};
|
|
835
|
+
let domProps = $cIPI0$filterDOMProps(props);
|
|
836
|
+
return {
|
|
837
|
+
groupProps: $cIPI0$mergeProps(domProps, groupProps, fieldProps, descProps, focusWithinProps, {
|
|
838
|
+
role: 'group',
|
|
839
|
+
'aria-disabled': props.isDisabled || null,
|
|
840
|
+
'aria-describedby': ariaDescribedBy
|
|
841
|
+
}),
|
|
842
|
+
labelProps: {
|
|
843
|
+
...labelProps,
|
|
844
|
+
onClick: ()=>{
|
|
845
|
+
focusManager.focusFirst();
|
|
846
|
+
}
|
|
847
|
+
},
|
|
848
|
+
buttonProps: {
|
|
849
|
+
...descProps,
|
|
850
|
+
id: buttonId,
|
|
851
|
+
excludeFromTabOrder: true,
|
|
852
|
+
'aria-haspopup': 'dialog',
|
|
853
|
+
'aria-label': formatMessage('calendar'),
|
|
854
|
+
'aria-labelledby': `${labelledBy} ${buttonId}`,
|
|
855
|
+
'aria-describedby': ariaDescribedBy,
|
|
856
|
+
onPress: ()=>state.setOpen(true)
|
|
857
|
+
},
|
|
858
|
+
dialogProps: {
|
|
859
|
+
id: dialogId,
|
|
860
|
+
'aria-labelledby': `${labelledBy} ${buttonId}`
|
|
861
|
+
},
|
|
862
|
+
startFieldProps: {
|
|
863
|
+
...startFieldProps,
|
|
864
|
+
...commonFieldProps,
|
|
865
|
+
value: (ref1 = state.value) === null || ref1 === void 0 ? void 0 : ref1.start,
|
|
866
|
+
onChange: (start)=>state.setDateTime('start', start)
|
|
867
|
+
,
|
|
868
|
+
autoFocus: props.autoFocus
|
|
869
|
+
},
|
|
870
|
+
endFieldProps: {
|
|
871
|
+
...endFieldProps,
|
|
872
|
+
...commonFieldProps,
|
|
873
|
+
value: (ref2 = state.value) === null || ref2 === void 0 ? void 0 : ref2.end,
|
|
874
|
+
onChange: (end)=>state.setDateTime('end', end)
|
|
875
|
+
},
|
|
876
|
+
descriptionProps: descriptionProps,
|
|
877
|
+
errorMessageProps: errorMessageProps,
|
|
878
|
+
calendarProps: {
|
|
879
|
+
autoFocus: true,
|
|
880
|
+
value: state.dateRange,
|
|
881
|
+
onChange: state.setDateRange,
|
|
882
|
+
minValue: props.minValue,
|
|
883
|
+
maxValue: props.maxValue,
|
|
884
|
+
isDisabled: props.isDisabled,
|
|
885
|
+
isReadOnly: props.isReadOnly,
|
|
886
|
+
isDateUnavailable: props.isDateUnavailable,
|
|
887
|
+
allowsNonContiguousRanges: props.allowsNonContiguousRanges,
|
|
888
|
+
defaultFocusedValue: state.dateRange ? undefined : props.placeholderValue,
|
|
889
|
+
validationState: state.validationState,
|
|
890
|
+
errorMessage: props.errorMessage
|
|
891
|
+
}
|
|
892
|
+
};
|
|
893
|
+
}
|
|
894
|
+
|
|
895
|
+
|
|
896
|
+
|
|
897
|
+
|
|
898
|
+
|
|
863
899
|
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
900
|
//# sourceMappingURL=module.js.map
|