@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/main.js
CHANGED
|
@@ -1,32 +1,16 @@
|
|
|
1
1
|
var $IwcIq$reactariafocus = require("@react-aria/focus");
|
|
2
2
|
var $IwcIq$reactariautils = require("@react-aria/utils");
|
|
3
|
+
var $IwcIq$react = require("react");
|
|
3
4
|
var $IwcIq$reactarialabel = require("@react-aria/label");
|
|
4
5
|
var $IwcIq$reactariai18n = require("@react-aria/i18n");
|
|
5
6
|
var $IwcIq$reactariainteractions = require("@react-aria/interactions");
|
|
6
7
|
var $IwcIq$internationalizednumber = require("@internationalized/number");
|
|
7
|
-
var $IwcIq$react = require("react");
|
|
8
8
|
var $IwcIq$reactariaspinbutton = require("@react-aria/spinbutton");
|
|
9
9
|
var $IwcIq$internationalizedmessage = require("@internationalized/message");
|
|
10
10
|
|
|
11
11
|
function $parcel$export(e, n, v, s) {
|
|
12
12
|
Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
|
|
13
13
|
}
|
|
14
|
-
function $parcel$exportWildcard(dest, source) {
|
|
15
|
-
Object.keys(source).forEach(function(key) {
|
|
16
|
-
if (key === 'default' || key === '__esModule' || dest.hasOwnProperty(key)) {
|
|
17
|
-
return;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
Object.defineProperty(dest, key, {
|
|
21
|
-
enumerable: true,
|
|
22
|
-
get: function get() {
|
|
23
|
-
return source[key];
|
|
24
|
-
}
|
|
25
|
-
});
|
|
26
|
-
});
|
|
27
|
-
|
|
28
|
-
return dest;
|
|
29
|
-
}
|
|
30
14
|
function $parcel$interopDefault(a) {
|
|
31
15
|
return a && a.__esModule ? a.default : a;
|
|
32
16
|
}
|
|
@@ -36,142 +20,145 @@ $parcel$export(module.exports, "useDateSegment", () => $5c015c6316d1904d$export$
|
|
|
36
20
|
$parcel$export(module.exports, "useDateField", () => $4acc2f407c169e55$export$5591b0b878c1a989);
|
|
37
21
|
$parcel$export(module.exports, "useTimeField", () => $4acc2f407c169e55$export$4c842f6a241dc825);
|
|
38
22
|
$parcel$export(module.exports, "useDateRangePicker", () => $20f695b1b69e6b9e$export$12fd5f0e9f4bb192);
|
|
23
|
+
$parcel$export(module.exports, "useDisplayNames", () => $934ac650a0aceb4b$export$d42c60378c8168f8);
|
|
24
|
+
|
|
25
|
+
|
|
39
26
|
|
|
40
27
|
var $c7d0e80b992ca68a$exports = {};
|
|
41
28
|
var $aa344be62785b256$exports = {};
|
|
42
|
-
$aa344be62785b256$exports = JSON.parse("{\"calendar\":\"التقويم\",\"
|
|
29
|
+
$aa344be62785b256$exports = JSON.parse("{\"calendar\":\"التقويم\",\"day\":\"يوم\",\"dayPeriod\":\"ص/م\",\"endDate\":\"تاريخ الانتهاء\",\"era\":\"العصر\",\"hour\":\"الساعات\",\"minute\":\"الدقائق\",\"month\":\"الشهر\",\"second\":\"الثواني\",\"selectedDateDescription\":\"تاريخ محدد: {date}\",\"selectedRangeDescription\":\"المدى الزمني المحدد: {startDate} إلى {endDate}\",\"selectedTimeDescription\":\"الوقت المحدد: {time}\",\"startDate\":\"تاريخ البدء\",\"timeZoneName\":\"التوقيت\",\"weekday\":\"اليوم\",\"year\":\"السنة\"}");
|
|
43
30
|
|
|
44
31
|
|
|
45
32
|
var $615986c3475e7c8c$exports = {};
|
|
46
|
-
$615986c3475e7c8c$exports = JSON.parse("{\"calendar\":\"Календар\",\"
|
|
33
|
+
$615986c3475e7c8c$exports = JSON.parse("{\"calendar\":\"Календар\",\"day\":\"ден\",\"dayPeriod\":\"пр.об./сл.об.\",\"endDate\":\"Крайна дата\",\"era\":\"ера\",\"hour\":\"час\",\"minute\":\"минута\",\"month\":\"месец\",\"second\":\"секунда\",\"selectedDateDescription\":\"Избрана дата: {date}\",\"selectedRangeDescription\":\"Избран диапазон: {startDate} до {endDate}\",\"selectedTimeDescription\":\"Избрано време: {time}\",\"startDate\":\"Начална дата\",\"timeZoneName\":\"часова зона\",\"weekday\":\"ден от седмицата\",\"year\":\"година\"}");
|
|
47
34
|
|
|
48
35
|
|
|
49
36
|
var $6c6207692f1ab248$exports = {};
|
|
50
|
-
$6c6207692f1ab248$exports = JSON.parse("{\"calendar\":\"Kalendář\",\"
|
|
37
|
+
$6c6207692f1ab248$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\"}");
|
|
51
38
|
|
|
52
39
|
|
|
53
40
|
var $fb37a9d024dd70f8$exports = {};
|
|
54
|
-
$fb37a9d024dd70f8$exports = JSON.parse("{\"calendar\":\"Kalender\",\"
|
|
41
|
+
$fb37a9d024dd70f8$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\"}");
|
|
55
42
|
|
|
56
43
|
|
|
57
44
|
var $d7780bd4790f7ae9$exports = {};
|
|
58
|
-
$d7780bd4790f7ae9$exports = JSON.parse("{\"calendar\":\"Kalender\",\"
|
|
45
|
+
$d7780bd4790f7ae9$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\"}");
|
|
59
46
|
|
|
60
47
|
|
|
61
48
|
var $9cdf03311f06c4ac$exports = {};
|
|
62
|
-
$9cdf03311f06c4ac$exports = JSON.parse("{\"calendar\":\"Ημερολόγιο\",\"
|
|
49
|
+
$9cdf03311f06c4ac$exports = JSON.parse("{\"calendar\":\"Ημερολόγιο\",\"day\":\"ημέρα\",\"dayPeriod\":\"π.μ./μ.μ.\",\"endDate\":\"Ημερομηνία λήξης\",\"era\":\"περίοδος\",\"hour\":\"ώρα\",\"minute\":\"λεπτό\",\"month\":\"μήνας\",\"second\":\"δευτερόλεπτο\",\"selectedDateDescription\":\"Επιλεγμένη ημερομηνία: {date}\",\"selectedRangeDescription\":\"Επιλεγμένο εύρος: {startDate} έως {endDate}\",\"selectedTimeDescription\":\"Επιλεγμένη ώρα: {time}\",\"startDate\":\"Ημερομηνία έναρξης\",\"timeZoneName\":\"ζώνη ώρας\",\"weekday\":\"καθημερινή\",\"year\":\"έτος\"}");
|
|
63
50
|
|
|
64
51
|
|
|
65
52
|
var $f93fc9e164ae811c$exports = {};
|
|
66
|
-
$f93fc9e164ae811c$exports = JSON.parse("{\"era\":\"era\",\"year\":\"year\",\"month\":\"month\",\"day\":\"day\",\"hour\":\"hour\",\"minute\":\"minute\",\"second\":\"second\",\"dayPeriod\":\"AM/PM\",\"calendar\":\"Calendar\",\"
|
|
53
|
+
$f93fc9e164ae811c$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}\"}");
|
|
67
54
|
|
|
68
55
|
|
|
69
56
|
var $7426c3264bf5ffea$exports = {};
|
|
70
|
-
$7426c3264bf5ffea$exports = JSON.parse("{\"calendar\":\"Calendario\",\"
|
|
57
|
+
$7426c3264bf5ffea$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\"}");
|
|
71
58
|
|
|
72
59
|
|
|
73
60
|
var $1115cc0042de790c$exports = {};
|
|
74
|
-
$1115cc0042de790c$exports = JSON.parse("{\"calendar\":\"Kalender\",\"
|
|
61
|
+
$1115cc0042de790c$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\"}");
|
|
75
62
|
|
|
76
63
|
|
|
77
64
|
var $4e80389dccb9283f$exports = {};
|
|
78
|
-
$4e80389dccb9283f$exports = JSON.parse("{\"calendar\":\"Kalenteri\",\"
|
|
65
|
+
$4e80389dccb9283f$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\"}");
|
|
79
66
|
|
|
80
67
|
|
|
81
68
|
var $78ad6f738c1f38d1$exports = {};
|
|
82
|
-
$78ad6f738c1f38d1$exports = JSON.parse("{\"calendar\":\"Calendrier\",\"
|
|
69
|
+
$78ad6f738c1f38d1$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\"}");
|
|
83
70
|
|
|
84
71
|
|
|
85
72
|
var $50fa4716d827cd97$exports = {};
|
|
86
|
-
$50fa4716d827cd97$exports = JSON.parse("{\"calendar\":\"לוח שנה\",\"
|
|
73
|
+
$50fa4716d827cd97$exports = JSON.parse("{\"calendar\":\"לוח שנה\",\"day\":\"יום\",\"dayPeriod\":\"לפנה״צ/אחה״צ\",\"endDate\":\"תאריך סיום\",\"era\":\"תקופה\",\"hour\":\"שעה\",\"minute\":\"דקה\",\"month\":\"חודש\",\"second\":\"שנייה\",\"selectedDateDescription\":\"תאריך נבחר: {date}\",\"selectedRangeDescription\":\"טווח נבחר: {startDate} עד {endDate}\",\"selectedTimeDescription\":\"זמן נבחר: {time}\",\"startDate\":\"תאריך התחלה\",\"timeZoneName\":\"אזור זמן\",\"weekday\":\"יום בשבוע\",\"year\":\"שנה\"}");
|
|
87
74
|
|
|
88
75
|
|
|
89
76
|
var $7297908fac4cf6c2$exports = {};
|
|
90
|
-
$7297908fac4cf6c2$exports = JSON.parse("{\"calendar\":\"Kalendar\",\"
|
|
77
|
+
$7297908fac4cf6c2$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\"}");
|
|
91
78
|
|
|
92
79
|
|
|
93
80
|
var $f95c1b06e1d5ba32$exports = {};
|
|
94
|
-
$f95c1b06e1d5ba32$exports = JSON.parse("{\"calendar\":\"Naptár\",\"
|
|
81
|
+
$f95c1b06e1d5ba32$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\"}");
|
|
95
82
|
|
|
96
83
|
|
|
97
84
|
var $437a8dc519258a01$exports = {};
|
|
98
|
-
$437a8dc519258a01$exports = JSON.parse("{\"calendar\":\"Calendario\",\"
|
|
85
|
+
$437a8dc519258a01$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\"}");
|
|
99
86
|
|
|
100
87
|
|
|
101
88
|
var $bd0aa2b50092a836$exports = {};
|
|
102
|
-
$bd0aa2b50092a836$exports = JSON.parse("{\"calendar\":\"カレンダー\",\"
|
|
89
|
+
$bd0aa2b50092a836$exports = JSON.parse("{\"calendar\":\"カレンダー\",\"day\":\"日\",\"dayPeriod\":\"午前/午後\",\"endDate\":\"終了日\",\"era\":\"時代\",\"hour\":\"時\",\"minute\":\"分\",\"month\":\"月\",\"second\":\"秒\",\"selectedDateDescription\":\"選択した日付 : {date}\",\"selectedRangeDescription\":\"選択範囲 : {startDate} から {endDate}\",\"selectedTimeDescription\":\"選択した時間 : {time}\",\"startDate\":\"開始日\",\"timeZoneName\":\"タイムゾーン\",\"weekday\":\"曜日\",\"year\":\"年\"}");
|
|
103
90
|
|
|
104
91
|
|
|
105
92
|
var $bbd8176c2e044bc1$exports = {};
|
|
106
|
-
$bbd8176c2e044bc1$exports = JSON.parse("{\"calendar\":\"달력\",\"
|
|
93
|
+
$bbd8176c2e044bc1$exports = JSON.parse("{\"calendar\":\"달력\",\"day\":\"일\",\"dayPeriod\":\"오전/오후\",\"endDate\":\"종료 날짜\",\"era\":\"연호\",\"hour\":\"시\",\"minute\":\"분\",\"month\":\"월\",\"second\":\"초\",\"selectedDateDescription\":\"선택 일자: {date}\",\"selectedRangeDescription\":\"선택 범위: {startDate} ~ {endDate}\",\"selectedTimeDescription\":\"선택 시간: {time}\",\"startDate\":\"시작 날짜\",\"timeZoneName\":\"시간대\",\"weekday\":\"요일\",\"year\":\"년\"}");
|
|
107
94
|
|
|
108
95
|
|
|
109
96
|
var $1af703df56ff5180$exports = {};
|
|
110
|
-
$1af703df56ff5180$exports = JSON.parse("{\"calendar\":\"Kalendorius\",\"
|
|
97
|
+
$1af703df56ff5180$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\"}");
|
|
111
98
|
|
|
112
99
|
|
|
113
100
|
var $9705eb4511dea9f8$exports = {};
|
|
114
|
-
$9705eb4511dea9f8$exports = JSON.parse("{\"calendar\":\"Kalendārs\",\"
|
|
101
|
+
$9705eb4511dea9f8$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\"}");
|
|
115
102
|
|
|
116
103
|
|
|
117
104
|
var $8ef984876a7160bc$exports = {};
|
|
118
|
-
$8ef984876a7160bc$exports = JSON.parse("{\"calendar\":\"Kalender\",\"
|
|
105
|
+
$8ef984876a7160bc$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\"}");
|
|
119
106
|
|
|
120
107
|
|
|
121
108
|
var $b6e9809e1ecaa25e$exports = {};
|
|
122
|
-
$b6e9809e1ecaa25e$exports = JSON.parse("{\"calendar\":\"Kalender\",\"
|
|
109
|
+
$b6e9809e1ecaa25e$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\"}");
|
|
123
110
|
|
|
124
111
|
|
|
125
112
|
var $deb2fa609661fe31$exports = {};
|
|
126
|
-
$deb2fa609661fe31$exports = JSON.parse("{\"calendar\":\"Kalendarz\",\"
|
|
113
|
+
$deb2fa609661fe31$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\"}");
|
|
127
114
|
|
|
128
115
|
|
|
129
116
|
var $591c8c054c84fa56$exports = {};
|
|
130
|
-
$591c8c054c84fa56$exports = JSON.parse("{\"calendar\":\"Calendário\",\"
|
|
117
|
+
$591c8c054c84fa56$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\"}");
|
|
131
118
|
|
|
132
119
|
|
|
133
120
|
var $f1633bd6cbc228e8$exports = {};
|
|
134
|
-
$f1633bd6cbc228e8$exports = JSON.parse("{\"calendar\":\"Calendário\",\"
|
|
121
|
+
$f1633bd6cbc228e8$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\"}");
|
|
135
122
|
|
|
136
123
|
|
|
137
124
|
var $14e09da03f3d1c5b$exports = {};
|
|
138
|
-
$14e09da03f3d1c5b$exports = JSON.parse("{\"calendar\":\"Calendar\",\"
|
|
125
|
+
$14e09da03f3d1c5b$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\"}");
|
|
139
126
|
|
|
140
127
|
|
|
141
128
|
var $63247a3456bc40d1$exports = {};
|
|
142
|
-
$63247a3456bc40d1$exports = JSON.parse("{\"calendar\":\"Календарь\",\"
|
|
129
|
+
$63247a3456bc40d1$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\":\"год\"}");
|
|
143
130
|
|
|
144
131
|
|
|
145
132
|
var $22150dd20c353dd4$exports = {};
|
|
146
|
-
$22150dd20c353dd4$exports = JSON.parse("{\"calendar\":\"Kalendár\",\"
|
|
133
|
+
$22150dd20c353dd4$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\"}");
|
|
147
134
|
|
|
148
135
|
|
|
149
136
|
var $701eb9a0385c55fd$exports = {};
|
|
150
|
-
$701eb9a0385c55fd$exports = JSON.parse("{\"calendar\":\"Koledar\",\"
|
|
137
|
+
$701eb9a0385c55fd$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\"}");
|
|
151
138
|
|
|
152
139
|
|
|
153
140
|
var $54684a4891ca6dc5$exports = {};
|
|
154
|
-
$54684a4891ca6dc5$exports = JSON.parse("{\"calendar\":\"Kalendar\",\"
|
|
141
|
+
$54684a4891ca6dc5$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\":\"година\"}");
|
|
155
142
|
|
|
156
143
|
|
|
157
144
|
var $545887f88a5a52db$exports = {};
|
|
158
|
-
$545887f88a5a52db$exports = JSON.parse("{\"calendar\":\"Kalender\",\"
|
|
145
|
+
$545887f88a5a52db$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\"}");
|
|
159
146
|
|
|
160
147
|
|
|
161
148
|
var $492d49420dd96ff4$exports = {};
|
|
162
|
-
$492d49420dd96ff4$exports = JSON.parse("{\"calendar\":\"Takvim\",\"
|
|
149
|
+
$492d49420dd96ff4$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\"}");
|
|
163
150
|
|
|
164
151
|
|
|
165
152
|
var $dc85765e85e8f267$exports = {};
|
|
166
|
-
$dc85765e85e8f267$exports = JSON.parse("{\"calendar\":\"Календар\",\"
|
|
153
|
+
$dc85765e85e8f267$exports = JSON.parse("{\"calendar\":\"Календар\",\"day\":\"день\",\"dayPeriod\":\"дп/пп\",\"endDate\":\"Дата завершення\",\"era\":\"ера\",\"hour\":\"година\",\"minute\":\"хвилина\",\"month\":\"місяць\",\"second\":\"секунда\",\"selectedDateDescription\":\"Вибрана дата: {date}\",\"selectedRangeDescription\":\"Вибраний діапазон: {startDate} — {endDate}\",\"selectedTimeDescription\":\"Вибраний час: {time}\",\"startDate\":\"Дата початку\",\"timeZoneName\":\"часовий пояс\",\"weekday\":\"день тижня\",\"year\":\"рік\"}");
|
|
167
154
|
|
|
168
155
|
|
|
169
156
|
var $2157d63cb80c7c63$exports = {};
|
|
170
|
-
$2157d63cb80c7c63$exports = JSON.parse("{\"calendar\":\"日历\",\"
|
|
157
|
+
$2157d63cb80c7c63$exports = JSON.parse("{\"calendar\":\"日历\",\"day\":\"日\",\"dayPeriod\":\"上午/下午\",\"endDate\":\"结束日期\",\"era\":\"纪元\",\"hour\":\"小时\",\"minute\":\"分钟\",\"month\":\"月\",\"second\":\"秒\",\"selectedDateDescription\":\"选定的日期:{date}\",\"selectedRangeDescription\":\"选定的范围:{startDate} 至 {endDate}\",\"selectedTimeDescription\":\"选定的时间:{time}\",\"startDate\":\"开始日期\",\"timeZoneName\":\"时区\",\"weekday\":\"工作日\",\"year\":\"年\"}");
|
|
171
158
|
|
|
172
159
|
|
|
173
160
|
var $0335c3ddb5f70cbe$exports = {};
|
|
174
|
-
$0335c3ddb5f70cbe$exports = JSON.parse("{\"calendar\":\"日曆\",\"
|
|
161
|
+
$0335c3ddb5f70cbe$exports = JSON.parse("{\"calendar\":\"日曆\",\"day\":\"日\",\"dayPeriod\":\"上午/下午\",\"endDate\":\"結束日期\",\"era\":\"纪元\",\"hour\":\"小时\",\"minute\":\"分钟\",\"month\":\"月\",\"second\":\"秒\",\"selectedDateDescription\":\"選定的日期:{date}\",\"selectedRangeDescription\":\"選定的範圍:{startDate} 至 {endDate}\",\"selectedTimeDescription\":\"選定的時間:{time}\",\"startDate\":\"開始日期\",\"timeZoneName\":\"时区\",\"weekday\":\"工作日\",\"year\":\"年\"}");
|
|
175
162
|
|
|
176
163
|
|
|
177
164
|
$c7d0e80b992ca68a$exports = {
|
|
@@ -216,14 +203,39 @@ $c7d0e80b992ca68a$exports = {
|
|
|
216
203
|
|
|
217
204
|
|
|
218
205
|
|
|
219
|
-
|
|
206
|
+
|
|
207
|
+
|
|
208
|
+
|
|
209
|
+
|
|
210
|
+
|
|
211
|
+
function $715562ad3b4cced4$export$4a931266a3838b86(state, ref1, disableArrowNavigation) {
|
|
212
|
+
let { direction: direction } = $IwcIq$reactariai18n.useLocale();
|
|
213
|
+
let focusManager = $IwcIq$react.useMemo(()=>$IwcIq$reactariafocus.createFocusManager(ref1)
|
|
214
|
+
, [
|
|
215
|
+
ref1
|
|
216
|
+
]);
|
|
220
217
|
// Open the popover on alt + arrow down
|
|
221
218
|
let onKeyDown = (e)=>{
|
|
222
|
-
if (e.altKey && e.key === 'ArrowDown' && 'setOpen' in state) {
|
|
219
|
+
if (e.altKey && (e.key === 'ArrowDown' || e.key === 'ArrowUp') && 'setOpen' in state) {
|
|
223
220
|
e.preventDefault();
|
|
224
221
|
e.stopPropagation();
|
|
225
222
|
state.setOpen(true);
|
|
226
223
|
}
|
|
224
|
+
if (disableArrowNavigation) return;
|
|
225
|
+
switch(e.key){
|
|
226
|
+
case 'ArrowLeft':
|
|
227
|
+
e.preventDefault();
|
|
228
|
+
e.stopPropagation();
|
|
229
|
+
if (direction === 'rtl') focusManager.focusNext();
|
|
230
|
+
else focusManager.focusPrevious();
|
|
231
|
+
break;
|
|
232
|
+
case 'ArrowRight':
|
|
233
|
+
e.preventDefault();
|
|
234
|
+
e.stopPropagation();
|
|
235
|
+
if (direction === 'rtl') focusManager.focusPrevious();
|
|
236
|
+
else focusManager.focusNext();
|
|
237
|
+
break;
|
|
238
|
+
}
|
|
227
239
|
};
|
|
228
240
|
// Focus the first placeholder segment from the end on mouse down/touch up in the field.
|
|
229
241
|
let focusLast = ()=>{
|
|
@@ -269,150 +281,125 @@ function $715562ad3b4cced4$export$4a931266a3838b86(state, ref1) {
|
|
|
269
281
|
|
|
270
282
|
|
|
271
283
|
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
284
|
+
|
|
285
|
+
const $4acc2f407c169e55$export$653eddfc964b0f8a = new WeakMap();
|
|
286
|
+
const $4acc2f407c169e55$export$300019f83c56d282 = '__role_' + Date.now();
|
|
287
|
+
const $4acc2f407c169e55$export$7b3062cd49e80452 = '__focusManager_' + Date.now();
|
|
288
|
+
function $4acc2f407c169e55$export$5591b0b878c1a989(props, state, ref) {
|
|
276
289
|
let { labelProps: labelProps , fieldProps: fieldProps , descriptionProps: descriptionProps , errorMessageProps: errorMessageProps } = $IwcIq$reactarialabel.useField({
|
|
277
290
|
...props,
|
|
278
291
|
labelElementType: 'span'
|
|
279
292
|
});
|
|
280
|
-
let
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
let
|
|
293
|
+
let { focusWithinProps: focusWithinProps } = $IwcIq$reactariainteractions.useFocusWithin({
|
|
294
|
+
onBlurWithin () {
|
|
295
|
+
state.confirmPlaceholder();
|
|
296
|
+
}
|
|
297
|
+
});
|
|
298
|
+
let formatMessage = $IwcIq$reactariai18n.useMessageFormatter((/*@__PURE__*/$parcel$interopDefault($c7d0e80b992ca68a$exports)));
|
|
299
|
+
let message = state.maxGranularity === 'hour' ? 'selectedTimeDescription' : 'selectedDateDescription';
|
|
300
|
+
let field = state.maxGranularity === 'hour' ? 'time' : 'date';
|
|
301
|
+
let description = state.value ? formatMessage(message, {
|
|
302
|
+
[field]: state.formatValue({
|
|
303
|
+
month: 'long'
|
|
304
|
+
})
|
|
305
|
+
}) : '';
|
|
306
|
+
let descProps = $IwcIq$reactariautils.useDescription(description);
|
|
307
|
+
// If within a date picker or date range picker, the date field will have role="presentation" and an aria-describedby
|
|
308
|
+
// will be passed in that references the value (e.g. entire range). Otherwise, add the field's value description.
|
|
309
|
+
let describedBy = props[$4acc2f407c169e55$export$300019f83c56d282] === 'presentation' ? fieldProps['aria-describedby'] : [
|
|
287
310
|
descProps['aria-describedby'],
|
|
288
311
|
fieldProps['aria-describedby']
|
|
289
312
|
].filter(Boolean).join(' ') || undefined;
|
|
313
|
+
let propsFocusManager = props[$4acc2f407c169e55$export$7b3062cd49e80452];
|
|
314
|
+
let focusManager = $IwcIq$react.useMemo(()=>propsFocusManager || $IwcIq$reactariafocus.createFocusManager(ref)
|
|
315
|
+
, [
|
|
316
|
+
propsFocusManager,
|
|
317
|
+
ref
|
|
318
|
+
]);
|
|
319
|
+
let groupProps = $715562ad3b4cced4$export$4a931266a3838b86(state, ref, props[$4acc2f407c169e55$export$300019f83c56d282] === 'presentation');
|
|
320
|
+
// Pass labels and other information to segments.
|
|
321
|
+
$4acc2f407c169e55$export$653eddfc964b0f8a.set(state, {
|
|
322
|
+
ariaLabel: props['aria-label'],
|
|
323
|
+
ariaLabelledBy: [
|
|
324
|
+
props['aria-labelledby'],
|
|
325
|
+
labelProps.id
|
|
326
|
+
].filter(Boolean).join(' ') || undefined,
|
|
327
|
+
ariaDescribedBy: describedBy,
|
|
328
|
+
focusManager: focusManager
|
|
329
|
+
});
|
|
330
|
+
let autoFocusRef = $IwcIq$react.useRef(props.autoFocus);
|
|
331
|
+
// When used within a date picker or date range picker, the field gets role="presentation"
|
|
332
|
+
// rather than role="group". Since the date picker/date range picker already has a role="group"
|
|
333
|
+
// with a label and description, and the segments are already labeled by this as well, this
|
|
334
|
+
// avoids very verbose duplicate announcements.
|
|
335
|
+
let fieldDOMProps;
|
|
336
|
+
if (props[$4acc2f407c169e55$export$300019f83c56d282] === 'presentation') fieldDOMProps = {
|
|
337
|
+
role: 'presentation'
|
|
338
|
+
};
|
|
339
|
+
else fieldDOMProps = $IwcIq$reactariautils.mergeProps(fieldProps, {
|
|
340
|
+
role: 'group',
|
|
341
|
+
'aria-disabled': props.isDisabled || undefined,
|
|
342
|
+
'aria-describedby': describedBy
|
|
343
|
+
});
|
|
344
|
+
$IwcIq$react.useEffect(()=>{
|
|
345
|
+
if (autoFocusRef.current) focusManager.focusFirst();
|
|
346
|
+
autoFocusRef.current = false;
|
|
347
|
+
}, [
|
|
348
|
+
focusManager
|
|
349
|
+
]);
|
|
350
|
+
let domProps = $IwcIq$reactariautils.filterDOMProps(props);
|
|
290
351
|
return {
|
|
291
|
-
groupProps: $IwcIq$reactariautils.mergeProps(groupProps, descProps, {
|
|
292
|
-
role: 'group',
|
|
293
|
-
'aria-disabled': props.isDisabled || null,
|
|
294
|
-
'aria-labelledby': labelledBy,
|
|
295
|
-
'aria-describedby': ariaDescribedBy
|
|
296
|
-
}),
|
|
297
352
|
labelProps: {
|
|
298
353
|
...labelProps,
|
|
299
354
|
onClick: ()=>{
|
|
300
|
-
let focusManager = $IwcIq$reactariafocus.createFocusManager(ref);
|
|
301
355
|
focusManager.focusFirst();
|
|
302
356
|
}
|
|
303
357
|
},
|
|
304
|
-
fieldProps:
|
|
305
|
-
...fieldProps,
|
|
306
|
-
value: state.value,
|
|
307
|
-
onChange: state.setValue,
|
|
308
|
-
minValue: props.minValue,
|
|
309
|
-
maxValue: props.maxValue,
|
|
310
|
-
placeholderValue: props.placeholderValue,
|
|
311
|
-
hideTimeZone: props.hideTimeZone,
|
|
312
|
-
hourCycle: props.hourCycle,
|
|
313
|
-
granularity: props.granularity,
|
|
314
|
-
isDisabled: props.isDisabled,
|
|
315
|
-
isReadOnly: props.isReadOnly,
|
|
316
|
-
isRequired: props.isRequired,
|
|
317
|
-
validationState: state.validationState,
|
|
318
|
-
autoFocus: props.autoFocus
|
|
319
|
-
},
|
|
358
|
+
fieldProps: $IwcIq$reactariautils.mergeProps(domProps, fieldDOMProps, groupProps, focusWithinProps),
|
|
320
359
|
descriptionProps: descriptionProps,
|
|
321
|
-
errorMessageProps: errorMessageProps
|
|
322
|
-
buttonProps: {
|
|
323
|
-
...descProps,
|
|
324
|
-
id: buttonId,
|
|
325
|
-
excludeFromTabOrder: true,
|
|
326
|
-
'aria-haspopup': 'dialog',
|
|
327
|
-
'aria-label': formatMessage('calendar'),
|
|
328
|
-
'aria-labelledby': `${labelledBy} ${buttonId}`,
|
|
329
|
-
'aria-describedby': ariaDescribedBy,
|
|
330
|
-
onPress: ()=>state.setOpen(true)
|
|
331
|
-
},
|
|
332
|
-
dialogProps: {
|
|
333
|
-
id: dialogId,
|
|
334
|
-
'aria-labelledby': `${labelledBy} ${buttonId}`
|
|
335
|
-
},
|
|
336
|
-
calendarProps: {
|
|
337
|
-
autoFocus: true,
|
|
338
|
-
value: state.dateValue,
|
|
339
|
-
onChange: state.setDateValue,
|
|
340
|
-
minValue: props.minValue,
|
|
341
|
-
maxValue: props.maxValue,
|
|
342
|
-
isDisabled: props.isDisabled,
|
|
343
|
-
isReadOnly: props.isReadOnly,
|
|
344
|
-
isDateUnavailable: props.isDateUnavailable,
|
|
345
|
-
defaultFocusedValue: state.dateValue ? undefined : props.placeholderValue
|
|
346
|
-
}
|
|
360
|
+
errorMessageProps: errorMessageProps
|
|
347
361
|
};
|
|
348
362
|
}
|
|
363
|
+
function $4acc2f407c169e55$export$4c842f6a241dc825(props, state, ref) {
|
|
364
|
+
return $4acc2f407c169e55$export$5591b0b878c1a989(props, state, ref);
|
|
365
|
+
}
|
|
349
366
|
|
|
350
367
|
|
|
351
368
|
|
|
352
369
|
|
|
353
370
|
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
const $20f695b1b69e6b9e$export$7b3062cd49e80452 = '__focusManager_' + Date.now();
|
|
362
|
-
function $20f695b1b69e6b9e$export$12fd5f0e9f4bb192(props, state, ref) {
|
|
363
|
-
var ref1, ref2;
|
|
371
|
+
function $e90ae7c26a69c6b1$export$42df105a73306d51(props, state, ref) {
|
|
372
|
+
let buttonId = $IwcIq$reactariautils.useId();
|
|
373
|
+
let dialogId = $IwcIq$reactariautils.useId();
|
|
364
374
|
let formatMessage = $IwcIq$reactariai18n.useMessageFormatter((/*@__PURE__*/$parcel$interopDefault($c7d0e80b992ca68a$exports)));
|
|
365
375
|
let { labelProps: labelProps , fieldProps: fieldProps , descriptionProps: descriptionProps , errorMessageProps: errorMessageProps } = $IwcIq$reactarialabel.useField({
|
|
366
376
|
...props,
|
|
367
377
|
labelElementType: 'span'
|
|
368
378
|
});
|
|
379
|
+
let groupProps = $715562ad3b4cced4$export$4a931266a3838b86(state, ref);
|
|
369
380
|
let labelledBy = fieldProps['aria-labelledby'] || fieldProps.id;
|
|
370
381
|
let { locale: locale } = $IwcIq$reactariai18n.useLocale();
|
|
371
|
-
let
|
|
382
|
+
let date = state.formatValue(locale, {
|
|
372
383
|
month: 'long'
|
|
373
384
|
});
|
|
385
|
+
let description = date ? formatMessage('selectedDateDescription', {
|
|
386
|
+
date: date
|
|
387
|
+
}) : '';
|
|
374
388
|
let descProps = $IwcIq$reactariautils.useDescription(description);
|
|
375
|
-
let startFieldProps = $IwcIq$reactariautils.useLabels({
|
|
376
|
-
'aria-label': formatMessage('startDate'),
|
|
377
|
-
'aria-labelledby': labelledBy
|
|
378
|
-
});
|
|
379
|
-
let endFieldProps = $IwcIq$reactariautils.useLabels({
|
|
380
|
-
'aria-label': formatMessage('endDate'),
|
|
381
|
-
'aria-labelledby': labelledBy
|
|
382
|
-
});
|
|
383
|
-
let buttonId = $IwcIq$reactariautils.useId();
|
|
384
|
-
let dialogId = $IwcIq$reactariautils.useId();
|
|
385
|
-
let groupProps = $715562ad3b4cced4$export$4a931266a3838b86(state, ref);
|
|
386
|
-
let { focusWithinProps: focusWithinProps } = $IwcIq$reactariainteractions.useFocusWithin({
|
|
387
|
-
onBlurWithin () {
|
|
388
|
-
state.confirmPlaceholder();
|
|
389
|
-
}
|
|
390
|
-
});
|
|
391
389
|
let ariaDescribedBy = [
|
|
392
390
|
descProps['aria-describedby'],
|
|
393
391
|
fieldProps['aria-describedby']
|
|
394
392
|
].filter(Boolean).join(' ') || undefined;
|
|
393
|
+
let domProps = $IwcIq$reactariautils.filterDOMProps(props);
|
|
395
394
|
let focusManager = $IwcIq$react.useMemo(()=>$IwcIq$reactariafocus.createFocusManager(ref)
|
|
396
395
|
, [
|
|
397
396
|
ref
|
|
398
397
|
]);
|
|
399
|
-
let commonFieldProps = {
|
|
400
|
-
[$20f695b1b69e6b9e$export$7b3062cd49e80452]: focusManager,
|
|
401
|
-
minValue: props.minValue,
|
|
402
|
-
maxValue: props.maxValue,
|
|
403
|
-
placeholderValue: props.placeholderValue,
|
|
404
|
-
hideTimeZone: props.hideTimeZone,
|
|
405
|
-
hourCycle: props.hourCycle,
|
|
406
|
-
granularity: props.granularity,
|
|
407
|
-
isDisabled: props.isDisabled,
|
|
408
|
-
isReadOnly: props.isReadOnly,
|
|
409
|
-
isRequired: props.isRequired,
|
|
410
|
-
validationState: state.validationState
|
|
411
|
-
};
|
|
412
398
|
return {
|
|
413
|
-
groupProps: $IwcIq$reactariautils.mergeProps(groupProps, fieldProps, descProps,
|
|
399
|
+
groupProps: $IwcIq$reactariautils.mergeProps(domProps, groupProps, fieldProps, descProps, {
|
|
414
400
|
role: 'group',
|
|
415
401
|
'aria-disabled': props.isDisabled || null,
|
|
402
|
+
'aria-labelledby': labelledBy,
|
|
416
403
|
'aria-describedby': ariaDescribedBy
|
|
417
404
|
}),
|
|
418
405
|
labelProps: {
|
|
@@ -421,10 +408,29 @@ function $20f695b1b69e6b9e$export$12fd5f0e9f4bb192(props, state, ref) {
|
|
|
421
408
|
focusManager.focusFirst();
|
|
422
409
|
}
|
|
423
410
|
},
|
|
411
|
+
fieldProps: {
|
|
412
|
+
...fieldProps,
|
|
413
|
+
[$4acc2f407c169e55$export$300019f83c56d282]: 'presentation',
|
|
414
|
+
'aria-describedby': ariaDescribedBy,
|
|
415
|
+
value: state.value,
|
|
416
|
+
onChange: state.setValue,
|
|
417
|
+
minValue: props.minValue,
|
|
418
|
+
maxValue: props.maxValue,
|
|
419
|
+
placeholderValue: props.placeholderValue,
|
|
420
|
+
hideTimeZone: props.hideTimeZone,
|
|
421
|
+
hourCycle: props.hourCycle,
|
|
422
|
+
granularity: props.granularity,
|
|
423
|
+
isDisabled: props.isDisabled,
|
|
424
|
+
isReadOnly: props.isReadOnly,
|
|
425
|
+
isRequired: props.isRequired,
|
|
426
|
+
validationState: state.validationState,
|
|
427
|
+
autoFocus: props.autoFocus
|
|
428
|
+
},
|
|
429
|
+
descriptionProps: descriptionProps,
|
|
430
|
+
errorMessageProps: errorMessageProps,
|
|
424
431
|
buttonProps: {
|
|
425
432
|
...descProps,
|
|
426
433
|
id: buttonId,
|
|
427
|
-
excludeFromTabOrder: true,
|
|
428
434
|
'aria-haspopup': 'dialog',
|
|
429
435
|
'aria-label': formatMessage('calendar'),
|
|
430
436
|
'aria-labelledby': `${labelledBy} ${buttonId}`,
|
|
@@ -435,35 +441,18 @@ function $20f695b1b69e6b9e$export$12fd5f0e9f4bb192(props, state, ref) {
|
|
|
435
441
|
id: dialogId,
|
|
436
442
|
'aria-labelledby': `${labelledBy} ${buttonId}`
|
|
437
443
|
},
|
|
438
|
-
startFieldProps: {
|
|
439
|
-
...startFieldProps,
|
|
440
|
-
...commonFieldProps,
|
|
441
|
-
'aria-describedby': fieldProps['aria-describedby'],
|
|
442
|
-
value: (ref1 = state.value) === null || ref1 === void 0 ? void 0 : ref1.start,
|
|
443
|
-
onChange: (start)=>state.setDateTime('start', start)
|
|
444
|
-
,
|
|
445
|
-
autoFocus: props.autoFocus
|
|
446
|
-
},
|
|
447
|
-
endFieldProps: {
|
|
448
|
-
...endFieldProps,
|
|
449
|
-
...commonFieldProps,
|
|
450
|
-
'aria-describedby': fieldProps['aria-describedby'],
|
|
451
|
-
value: (ref2 = state.value) === null || ref2 === void 0 ? void 0 : ref2.end,
|
|
452
|
-
onChange: (end)=>state.setDateTime('end', end)
|
|
453
|
-
},
|
|
454
|
-
descriptionProps: descriptionProps,
|
|
455
|
-
errorMessageProps: errorMessageProps,
|
|
456
444
|
calendarProps: {
|
|
457
445
|
autoFocus: true,
|
|
458
|
-
value: state.
|
|
459
|
-
onChange: state.
|
|
446
|
+
value: state.dateValue,
|
|
447
|
+
onChange: state.setDateValue,
|
|
460
448
|
minValue: props.minValue,
|
|
461
449
|
maxValue: props.maxValue,
|
|
462
450
|
isDisabled: props.isDisabled,
|
|
463
451
|
isReadOnly: props.isReadOnly,
|
|
464
452
|
isDateUnavailable: props.isDateUnavailable,
|
|
465
|
-
|
|
466
|
-
|
|
453
|
+
defaultFocusedValue: state.dateValue ? undefined : props.placeholderValue,
|
|
454
|
+
validationState: state.validationState,
|
|
455
|
+
errorMessage: props.errorMessage
|
|
467
456
|
}
|
|
468
457
|
};
|
|
469
458
|
}
|
|
@@ -475,73 +464,6 @@ function $20f695b1b69e6b9e$export$12fd5f0e9f4bb192(props, state, ref) {
|
|
|
475
464
|
|
|
476
465
|
|
|
477
466
|
|
|
478
|
-
const $4acc2f407c169e55$export$653eddfc964b0f8a = new WeakMap();
|
|
479
|
-
function $4acc2f407c169e55$export$5591b0b878c1a989(props, state, ref) {
|
|
480
|
-
let { labelProps: labelProps , fieldProps: fieldProps , descriptionProps: descriptionProps , errorMessageProps: errorMessageProps } = $IwcIq$reactarialabel.useField({
|
|
481
|
-
...props,
|
|
482
|
-
labelElementType: 'span'
|
|
483
|
-
});
|
|
484
|
-
let groupProps = $715562ad3b4cced4$export$4a931266a3838b86(state, ref);
|
|
485
|
-
let { focusWithinProps: focusWithinProps } = $IwcIq$reactariainteractions.useFocusWithin({
|
|
486
|
-
onBlurWithin () {
|
|
487
|
-
state.confirmPlaceholder();
|
|
488
|
-
}
|
|
489
|
-
});
|
|
490
|
-
let formatter = $IwcIq$reactariai18n.useDateFormatter(state.getFormatOptions({
|
|
491
|
-
month: 'long'
|
|
492
|
-
}));
|
|
493
|
-
let descProps = $IwcIq$reactariautils.useDescription(state.value ? formatter.format(state.dateValue) : null);
|
|
494
|
-
let segmentLabelledBy = fieldProps['aria-labelledby'] || fieldProps.id;
|
|
495
|
-
let describedBy = [
|
|
496
|
-
descProps['aria-describedby'],
|
|
497
|
-
fieldProps['aria-describedby']
|
|
498
|
-
].filter(Boolean).join(' ') || undefined;
|
|
499
|
-
let propsFocusManager = props[$20f695b1b69e6b9e$export$7b3062cd49e80452];
|
|
500
|
-
let focusManager = $IwcIq$react.useMemo(()=>propsFocusManager || $IwcIq$reactariafocus.createFocusManager(ref)
|
|
501
|
-
, [
|
|
502
|
-
propsFocusManager,
|
|
503
|
-
ref
|
|
504
|
-
]);
|
|
505
|
-
$4acc2f407c169e55$export$653eddfc964b0f8a.set(state, {
|
|
506
|
-
ariaLabelledBy: segmentLabelledBy,
|
|
507
|
-
ariaDescribedBy: describedBy,
|
|
508
|
-
focusManager: focusManager
|
|
509
|
-
});
|
|
510
|
-
let autoFocusRef = $IwcIq$react.useRef(props.autoFocus);
|
|
511
|
-
$IwcIq$react.useEffect(()=>{
|
|
512
|
-
if (autoFocusRef.current) focusManager.focusFirst();
|
|
513
|
-
autoFocusRef.current = false;
|
|
514
|
-
}, [
|
|
515
|
-
focusManager
|
|
516
|
-
]);
|
|
517
|
-
return {
|
|
518
|
-
labelProps: {
|
|
519
|
-
...labelProps,
|
|
520
|
-
onClick: ()=>{
|
|
521
|
-
focusManager.focusFirst();
|
|
522
|
-
}
|
|
523
|
-
},
|
|
524
|
-
fieldProps: $IwcIq$reactariautils.mergeProps(fieldProps, descProps, groupProps, focusWithinProps, {
|
|
525
|
-
role: 'group',
|
|
526
|
-
'aria-disabled': props.isDisabled || undefined,
|
|
527
|
-
'aria-describedby': describedBy
|
|
528
|
-
}),
|
|
529
|
-
descriptionProps: descriptionProps,
|
|
530
|
-
errorMessageProps: errorMessageProps
|
|
531
|
-
};
|
|
532
|
-
}
|
|
533
|
-
function $4acc2f407c169e55$export$4c842f6a241dc825(props, state, ref) {
|
|
534
|
-
return $4acc2f407c169e55$export$5591b0b878c1a989(props, state, ref);
|
|
535
|
-
}
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
var $934ac650a0aceb4b$exports = {};
|
|
542
|
-
|
|
543
|
-
$parcel$export($934ac650a0aceb4b$exports, "useDisplayNames", () => $934ac650a0aceb4b$export$d42c60378c8168f8);
|
|
544
|
-
|
|
545
467
|
|
|
546
468
|
|
|
547
469
|
|
|
@@ -574,12 +496,11 @@ class $934ac650a0aceb4b$var$DisplayNamesPolyfill {
|
|
|
574
496
|
|
|
575
497
|
|
|
576
498
|
|
|
577
|
-
|
|
578
499
|
function $5c015c6316d1904d$export$1315d136e6f7581(segment, state, ref) {
|
|
579
500
|
let enteredKeys = $IwcIq$react.useRef('');
|
|
580
|
-
let { locale: locale
|
|
501
|
+
let { locale: locale } = $IwcIq$reactariai18n.useLocale();
|
|
581
502
|
let displayNames = $934ac650a0aceb4b$export$d42c60378c8168f8();
|
|
582
|
-
let { ariaLabelledBy: ariaLabelledBy , ariaDescribedBy: ariaDescribedBy , focusManager: focusManager } = $4acc2f407c169e55$export$653eddfc964b0f8a.get(state);
|
|
503
|
+
let { ariaLabel: ariaLabel , ariaLabelledBy: ariaLabelledBy , ariaDescribedBy: ariaDescribedBy , focusManager: focusManager } = $4acc2f407c169e55$export$653eddfc964b0f8a.get(state);
|
|
583
504
|
let textValue = segment.text;
|
|
584
505
|
let options = $IwcIq$react.useMemo(()=>state.dateFormatter.resolvedOptions()
|
|
585
506
|
, [
|
|
@@ -597,7 +518,7 @@ function $5c015c6316d1904d$export$1315d136e6f7581(segment, state, ref) {
|
|
|
597
518
|
if (segment.type === 'month') {
|
|
598
519
|
let monthTextValue = monthDateFormatter.format(state.dateValue);
|
|
599
520
|
textValue = monthTextValue !== textValue ? `${textValue} – ${monthTextValue}` : monthTextValue;
|
|
600
|
-
} else if (segment.type === 'hour'
|
|
521
|
+
} else if (segment.type === 'hour') textValue = hourDateFormatter.format(state.dateValue);
|
|
601
522
|
let { spinButtonProps: spinButtonProps } = $IwcIq$reactariaspinbutton.useSpinButton({
|
|
602
523
|
value: segment.value,
|
|
603
524
|
textValue: textValue,
|
|
@@ -652,33 +573,11 @@ function $5c015c6316d1904d$export$1315d136e6f7581(segment, state, ref) {
|
|
|
652
573
|
if (e.key === 'a' && ($IwcIq$reactariautils.isMac() ? e.metaKey : e.ctrlKey)) e.preventDefault();
|
|
653
574
|
if (e.ctrlKey || e.metaKey || e.shiftKey || e.altKey) return;
|
|
654
575
|
switch(e.key){
|
|
655
|
-
case 'ArrowLeft':
|
|
656
|
-
e.preventDefault();
|
|
657
|
-
e.stopPropagation();
|
|
658
|
-
if (direction === 'rtl') focusManager.focusNext({
|
|
659
|
-
tabbable: true
|
|
660
|
-
});
|
|
661
|
-
else focusManager.focusPrevious({
|
|
662
|
-
tabbable: true
|
|
663
|
-
});
|
|
664
|
-
break;
|
|
665
|
-
case 'ArrowRight':
|
|
666
|
-
e.preventDefault();
|
|
667
|
-
e.stopPropagation();
|
|
668
|
-
if (direction === 'rtl') focusManager.focusPrevious({
|
|
669
|
-
tabbable: true
|
|
670
|
-
});
|
|
671
|
-
else focusManager.focusNext({
|
|
672
|
-
tabbable: true
|
|
673
|
-
});
|
|
674
|
-
break;
|
|
675
576
|
case 'Enter':
|
|
676
577
|
e.preventDefault();
|
|
677
578
|
e.stopPropagation();
|
|
678
579
|
if (segment.isPlaceholder && !state.isReadOnly) state.confirmPlaceholder(segment.type);
|
|
679
|
-
focusManager.focusNext(
|
|
680
|
-
tabbable: true
|
|
681
|
-
});
|
|
580
|
+
focusManager.focusNext();
|
|
682
581
|
break;
|
|
683
582
|
case 'Tab':
|
|
684
583
|
break;
|
|
@@ -723,9 +622,7 @@ function $5c015c6316d1904d$export$1315d136e6f7581(segment, state, ref) {
|
|
|
723
622
|
if (startsWith(am, key)) state.setSegment('dayPeriod', 0);
|
|
724
623
|
else if (startsWith(pm, key)) state.setSegment('dayPeriod', 12);
|
|
725
624
|
else break;
|
|
726
|
-
focusManager.focusNext(
|
|
727
|
-
tabbable: true
|
|
728
|
-
});
|
|
625
|
+
focusManager.focusNext();
|
|
729
626
|
break;
|
|
730
627
|
case 'day':
|
|
731
628
|
case 'hour':
|
|
@@ -755,9 +652,7 @@ function $5c015c6316d1904d$export$1315d136e6f7581(segment, state, ref) {
|
|
|
755
652
|
if (shouldSetValue) state.setSegment(segment.type, segmentValue);
|
|
756
653
|
if (Number(numberValue + '0') > segment.maxValue || newValue.length >= String(segment.maxValue).length) {
|
|
757
654
|
enteredKeys.current = '';
|
|
758
|
-
if (shouldSetValue) focusManager.focusNext(
|
|
759
|
-
tabbable: true
|
|
760
|
-
});
|
|
655
|
+
if (shouldSetValue) focusManager.focusNext();
|
|
761
656
|
} else enteredKeys.current = newValue;
|
|
762
657
|
break;
|
|
763
658
|
}
|
|
@@ -769,9 +664,11 @@ function $5c015c6316d1904d$export$1315d136e6f7581(segment, state, ref) {
|
|
|
769
664
|
// Safari requires that a selection is set or it won't fire input events.
|
|
770
665
|
// Since usePress disables text selection, this won't happen by default.
|
|
771
666
|
ref.current.style.webkitUserSelect = 'text';
|
|
667
|
+
ref.current.style.userSelect = 'text';
|
|
772
668
|
let selection = window.getSelection();
|
|
773
669
|
selection.collapse(ref.current);
|
|
774
|
-
ref.current.style.webkitUserSelect = '';
|
|
670
|
+
ref.current.style.webkitUserSelect = 'none';
|
|
671
|
+
ref.current.style.userSelect = 'none';
|
|
775
672
|
};
|
|
776
673
|
let compositionRef = $IwcIq$react.useRef('');
|
|
777
674
|
// @ts-ignore - TODO: possibly old TS version? doesn't fail in my editor...
|
|
@@ -807,17 +704,6 @@ function $5c015c6316d1904d$export$1315d136e6f7581(segment, state, ref) {
|
|
|
807
704
|
break;
|
|
808
705
|
}
|
|
809
706
|
});
|
|
810
|
-
// Focus on mouse down/touch up to match native textfield behavior.
|
|
811
|
-
// usePress handles canceling text selection.
|
|
812
|
-
let { pressProps: pressProps } = $IwcIq$reactariainteractions.usePress({
|
|
813
|
-
preventFocusOnPress: true,
|
|
814
|
-
onPressStart: (e)=>{
|
|
815
|
-
if (e.pointerType === 'mouse') e.target.focus();
|
|
816
|
-
},
|
|
817
|
-
onPress (e) {
|
|
818
|
-
if (e.pointerType !== 'mouse') e.target.focus();
|
|
819
|
-
}
|
|
820
|
-
});
|
|
821
707
|
// For Android: prevent selection on long press.
|
|
822
708
|
$IwcIq$reactariautils.useEvent(ref, 'selectstart', (e)=>{
|
|
823
709
|
e.preventDefault();
|
|
@@ -841,6 +727,13 @@ function $5c015c6316d1904d$export$1315d136e6f7581(segment, state, ref) {
|
|
|
841
727
|
if (segment !== firstSegment && state.validationState !== 'invalid') ariaDescribedBy = undefined;
|
|
842
728
|
let id = $IwcIq$reactariautils.useId();
|
|
843
729
|
let isEditable = !state.isDisabled && !state.isReadOnly && segment.isEditable;
|
|
730
|
+
// Prepend the label passed from the field to each segment name.
|
|
731
|
+
// This is needed because VoiceOver on iOS does not announce groups.
|
|
732
|
+
let name = segment.type === 'literal' ? '' : displayNames.of(segment.type);
|
|
733
|
+
let labelProps = $IwcIq$reactariautils.useLabels({
|
|
734
|
+
'aria-label': (ariaLabel ? ariaLabel + ' ' : '') + name,
|
|
735
|
+
'aria-labelledby': ariaLabelledBy
|
|
736
|
+
});
|
|
844
737
|
// Literal segments should not be visible to screen readers. We don't really need any of the above,
|
|
845
738
|
// but the rules of hooks mean hooks cannot be conditional so we have to put this condition here.
|
|
846
739
|
if (segment.type === 'literal') return {
|
|
@@ -849,12 +742,10 @@ function $5c015c6316d1904d$export$1315d136e6f7581(segment, state, ref) {
|
|
|
849
742
|
}
|
|
850
743
|
};
|
|
851
744
|
return {
|
|
852
|
-
segmentProps: $IwcIq$reactariautils.mergeProps(spinButtonProps,
|
|
745
|
+
segmentProps: $IwcIq$reactariautils.mergeProps(spinButtonProps, labelProps, {
|
|
853
746
|
id: id,
|
|
854
747
|
...touchPropOverrides,
|
|
855
748
|
'aria-invalid': state.validationState === 'invalid' ? 'true' : undefined,
|
|
856
|
-
'aria-label': displayNames.of(segment.type),
|
|
857
|
-
'aria-labelledby': `${ariaLabelledBy} ${id}`,
|
|
858
749
|
'aria-describedby': ariaDescribedBy,
|
|
859
750
|
'aria-placeholder': segment.isPlaceholder ? segment.text : undefined,
|
|
860
751
|
'aria-readonly': state.isReadOnly || !segment.isEditable ? 'true' : undefined,
|
|
@@ -870,7 +761,16 @@ function $5c015c6316d1904d$export$1315d136e6f7581(segment, state, ref) {
|
|
|
870
761
|
onKeyDown: onKeyDown,
|
|
871
762
|
onFocus: onFocus,
|
|
872
763
|
style: {
|
|
873
|
-
caretColor: 'transparent'
|
|
764
|
+
caretColor: 'transparent',
|
|
765
|
+
userSelect: 'none',
|
|
766
|
+
WebkitUserSelect: 'none'
|
|
767
|
+
},
|
|
768
|
+
// Prevent pointer events from reaching useDatePickerGroup, and allow native browser behavior to focus the segment.
|
|
769
|
+
onPointerDown (e) {
|
|
770
|
+
e.stopPropagation();
|
|
771
|
+
},
|
|
772
|
+
onMouseDown (e) {
|
|
773
|
+
e.stopPropagation();
|
|
874
774
|
}
|
|
875
775
|
})
|
|
876
776
|
};
|
|
@@ -880,7 +780,134 @@ function $5c015c6316d1904d$export$1315d136e6f7581(segment, state, ref) {
|
|
|
880
780
|
|
|
881
781
|
|
|
882
782
|
|
|
883
|
-
|
|
783
|
+
|
|
784
|
+
|
|
785
|
+
|
|
786
|
+
|
|
787
|
+
|
|
788
|
+
|
|
789
|
+
|
|
790
|
+
function $20f695b1b69e6b9e$export$12fd5f0e9f4bb192(props, state, ref) {
|
|
791
|
+
var ref1, ref2;
|
|
792
|
+
let formatMessage = $IwcIq$reactariai18n.useMessageFormatter((/*@__PURE__*/$parcel$interopDefault($c7d0e80b992ca68a$exports)));
|
|
793
|
+
let { labelProps: labelProps , fieldProps: fieldProps , descriptionProps: descriptionProps , errorMessageProps: errorMessageProps } = $IwcIq$reactarialabel.useField({
|
|
794
|
+
...props,
|
|
795
|
+
labelElementType: 'span'
|
|
796
|
+
});
|
|
797
|
+
let labelledBy = fieldProps['aria-labelledby'] || fieldProps.id;
|
|
798
|
+
let { locale: locale } = $IwcIq$reactariai18n.useLocale();
|
|
799
|
+
let range = state.formatValue(locale, {
|
|
800
|
+
month: 'long'
|
|
801
|
+
});
|
|
802
|
+
let description = range ? formatMessage('selectedRangeDescription', {
|
|
803
|
+
startDate: range.start,
|
|
804
|
+
endDate: range.end
|
|
805
|
+
}) : '';
|
|
806
|
+
let descProps = $IwcIq$reactariautils.useDescription(description);
|
|
807
|
+
let startFieldProps = {
|
|
808
|
+
'aria-label': formatMessage('startDate'),
|
|
809
|
+
'aria-labelledby': labelledBy
|
|
810
|
+
};
|
|
811
|
+
let endFieldProps = {
|
|
812
|
+
'aria-label': formatMessage('endDate'),
|
|
813
|
+
'aria-labelledby': labelledBy
|
|
814
|
+
};
|
|
815
|
+
let buttonId = $IwcIq$reactariautils.useId();
|
|
816
|
+
let dialogId = $IwcIq$reactariautils.useId();
|
|
817
|
+
let groupProps = $715562ad3b4cced4$export$4a931266a3838b86(state, ref);
|
|
818
|
+
let { focusWithinProps: focusWithinProps } = $IwcIq$reactariainteractions.useFocusWithin({
|
|
819
|
+
onBlurWithin () {
|
|
820
|
+
state.confirmPlaceholder();
|
|
821
|
+
}
|
|
822
|
+
});
|
|
823
|
+
let ariaDescribedBy = [
|
|
824
|
+
descProps['aria-describedby'],
|
|
825
|
+
fieldProps['aria-describedby']
|
|
826
|
+
].filter(Boolean).join(' ') || undefined;
|
|
827
|
+
let focusManager = $IwcIq$react.useMemo(()=>$IwcIq$reactariafocus.createFocusManager(ref, {
|
|
828
|
+
// Exclude the button from the focus manager.
|
|
829
|
+
accept: (element)=>element.id !== buttonId
|
|
830
|
+
})
|
|
831
|
+
, [
|
|
832
|
+
ref,
|
|
833
|
+
buttonId
|
|
834
|
+
]);
|
|
835
|
+
let commonFieldProps = {
|
|
836
|
+
[$4acc2f407c169e55$export$7b3062cd49e80452]: focusManager,
|
|
837
|
+
[$4acc2f407c169e55$export$300019f83c56d282]: 'presentation',
|
|
838
|
+
'aria-describedby': ariaDescribedBy,
|
|
839
|
+
minValue: props.minValue,
|
|
840
|
+
maxValue: props.maxValue,
|
|
841
|
+
placeholderValue: props.placeholderValue,
|
|
842
|
+
hideTimeZone: props.hideTimeZone,
|
|
843
|
+
hourCycle: props.hourCycle,
|
|
844
|
+
granularity: props.granularity,
|
|
845
|
+
isDisabled: props.isDisabled,
|
|
846
|
+
isReadOnly: props.isReadOnly,
|
|
847
|
+
isRequired: props.isRequired,
|
|
848
|
+
validationState: state.validationState
|
|
849
|
+
};
|
|
850
|
+
let domProps = $IwcIq$reactariautils.filterDOMProps(props);
|
|
851
|
+
return {
|
|
852
|
+
groupProps: $IwcIq$reactariautils.mergeProps(domProps, groupProps, fieldProps, descProps, focusWithinProps, {
|
|
853
|
+
role: 'group',
|
|
854
|
+
'aria-disabled': props.isDisabled || null,
|
|
855
|
+
'aria-describedby': ariaDescribedBy
|
|
856
|
+
}),
|
|
857
|
+
labelProps: {
|
|
858
|
+
...labelProps,
|
|
859
|
+
onClick: ()=>{
|
|
860
|
+
focusManager.focusFirst();
|
|
861
|
+
}
|
|
862
|
+
},
|
|
863
|
+
buttonProps: {
|
|
864
|
+
...descProps,
|
|
865
|
+
id: buttonId,
|
|
866
|
+
'aria-haspopup': 'dialog',
|
|
867
|
+
'aria-label': formatMessage('calendar'),
|
|
868
|
+
'aria-labelledby': `${labelledBy} ${buttonId}`,
|
|
869
|
+
'aria-describedby': ariaDescribedBy,
|
|
870
|
+
onPress: ()=>state.setOpen(true)
|
|
871
|
+
},
|
|
872
|
+
dialogProps: {
|
|
873
|
+
id: dialogId,
|
|
874
|
+
'aria-labelledby': `${labelledBy} ${buttonId}`
|
|
875
|
+
},
|
|
876
|
+
startFieldProps: {
|
|
877
|
+
...startFieldProps,
|
|
878
|
+
...commonFieldProps,
|
|
879
|
+
value: (ref1 = state.value) === null || ref1 === void 0 ? void 0 : ref1.start,
|
|
880
|
+
onChange: (start)=>state.setDateTime('start', start)
|
|
881
|
+
,
|
|
882
|
+
autoFocus: props.autoFocus
|
|
883
|
+
},
|
|
884
|
+
endFieldProps: {
|
|
885
|
+
...endFieldProps,
|
|
886
|
+
...commonFieldProps,
|
|
887
|
+
value: (ref2 = state.value) === null || ref2 === void 0 ? void 0 : ref2.end,
|
|
888
|
+
onChange: (end)=>state.setDateTime('end', end)
|
|
889
|
+
},
|
|
890
|
+
descriptionProps: descriptionProps,
|
|
891
|
+
errorMessageProps: errorMessageProps,
|
|
892
|
+
calendarProps: {
|
|
893
|
+
autoFocus: true,
|
|
894
|
+
value: state.dateRange,
|
|
895
|
+
onChange: state.setDateRange,
|
|
896
|
+
minValue: props.minValue,
|
|
897
|
+
maxValue: props.maxValue,
|
|
898
|
+
isDisabled: props.isDisabled,
|
|
899
|
+
isReadOnly: props.isReadOnly,
|
|
900
|
+
isDateUnavailable: props.isDateUnavailable,
|
|
901
|
+
allowsNonContiguousRanges: props.allowsNonContiguousRanges,
|
|
902
|
+
defaultFocusedValue: state.dateRange ? undefined : props.placeholderValue,
|
|
903
|
+
validationState: state.validationState,
|
|
904
|
+
errorMessage: props.errorMessage
|
|
905
|
+
}
|
|
906
|
+
};
|
|
907
|
+
}
|
|
908
|
+
|
|
909
|
+
|
|
910
|
+
|
|
884
911
|
|
|
885
912
|
|
|
886
913
|
//# sourceMappingURL=main.js.map
|